第6项:统一业务控件、主题与移动布局,保留原生输入和焦点契约
This commit is contained in:
1 parent
ff8b05973a
commit
f30905b236
74 files changed
+3567
-2443
No files matched your search
@@ -36,6 +36,7 @@ type UpdateInput = (fields: Partial<EditInputs>) => void;
|
||||
import { Calc as LedgerCalc, Fees, Model, Values } from '../../shared';
|
||||
import { Button } from '../Settings/controls';
|
||||
import { Input, Choice } from './EditFields';
|
||||
import { LedgerButton, LedgerInput, LedgerTextArea } from '../../components/BusinessControls';
|
||||
const { yuan, grams, validateOrderIdentity } = Model;
|
||||
const feeCategories: Record<string, string> = {
|
||||
jd: 'shipping',
|
||||
@@ -440,7 +441,7 @@ function EditableFees({
|
||||
return (
|
||||
<div key={kind} className="order-cost-box">
|
||||
<label className="order-cost-option">
|
||||
<input
|
||||
<LedgerInput
|
||||
type="checkbox"
|
||||
name={'cost_' + kind}
|
||||
checked={checked}
|
||||
@@ -466,7 +467,7 @@ function EditableFees({
|
||||
{row.byQuantity && (
|
||||
<label className="order-cost-quantity">
|
||||
{configured ? '数量(个)' : '盒子数量(个)'}
|
||||
<input
|
||||
<LedgerInput
|
||||
type="number"
|
||||
name={'cost_' + kind + '_quantity'}
|
||||
min="1"
|
||||
@@ -548,7 +549,7 @@ function EditableFees({
|
||||
</Button>
|
||||
)}
|
||||
{!automatic && row.funding && (
|
||||
<input
|
||||
<LedgerInput
|
||||
type="hidden"
|
||||
className="cost-funding"
|
||||
data-component="fee"
|
||||
@@ -736,7 +737,7 @@ function LockLine({
|
||||
/>
|
||||
</div>
|
||||
<label className="check">
|
||||
<input
|
||||
<LedgerInput
|
||||
type="checkbox"
|
||||
name="lock_material_verified"
|
||||
checked={!!mat.verified}
|
||||
@@ -781,7 +782,7 @@ function LockLine({
|
||||
/>
|
||||
</div>
|
||||
<label className="check" hidden={pooledExtra}>
|
||||
<input
|
||||
<LedgerInput
|
||||
type="checkbox"
|
||||
name="lock_extra_verified"
|
||||
checked={!!extra.verified}
|
||||
@@ -1021,7 +1022,7 @@ export function LockOrderEditor({
|
||||
['returning', '老客户'],
|
||||
].map(([key, text]) => (
|
||||
<label key={key} title={key === 'new' ? '首次成交' : '再次成交'}>
|
||||
<input
|
||||
<LedgerInput
|
||||
type="radio"
|
||||
name="customer_type"
|
||||
value={key}
|
||||
@@ -1056,7 +1057,7 @@ export function LockOrderEditor({
|
||||
</p>
|
||||
<label>
|
||||
客户单备注
|
||||
<textarea
|
||||
<LedgerTextArea
|
||||
name="note"
|
||||
maxLength={240}
|
||||
rows={2}
|
||||
@@ -1066,7 +1067,7 @@ export function LockOrderEditor({
|
||||
</label>
|
||||
<label>
|
||||
内部备注(客户不可见)<span className="small muted">必填,至少3个字符(含#号),最多500字</span>
|
||||
<textarea
|
||||
<LedgerTextArea
|
||||
name="internal_note"
|
||||
ref={textarea}
|
||||
maxLength={500}
|
||||
@@ -1085,7 +1086,7 @@ export function LockOrderEditor({
|
||||
<div data-order-note-tags className="order-note-tag-options" aria-label="内部备注快捷标签">
|
||||
{filteredTags.length ? (
|
||||
filteredTags.map(tag => (
|
||||
<button
|
||||
<LedgerButton
|
||||
type="button"
|
||||
className="quiet"
|
||||
key={tag}
|
||||
@@ -1100,7 +1101,7 @@ export function LockOrderEditor({
|
||||
}}
|
||||
>
|
||||
{tag}
|
||||
</button>
|
||||
</LedgerButton>
|
||||
))
|
||||
) : (
|
||||
<span className="small muted">
|
||||
@@ -1160,7 +1161,7 @@ export function LockOrderEditor({
|
||||
</div>
|
||||
<label>
|
||||
修改原因
|
||||
<textarea
|
||||
<LedgerTextArea
|
||||
name="edit_reason"
|
||||
required
|
||||
maxLength={200}
|
||||
@@ -1171,7 +1172,7 @@ export function LockOrderEditor({
|
||||
/>
|
||||
</label>
|
||||
<label className="check">
|
||||
<input
|
||||
<LedgerInput
|
||||
type="checkbox"
|
||||
name="edit_verified"
|
||||
required
|
||||
@@ -1185,14 +1186,14 @@ export function LockOrderEditor({
|
||||
<Button action="cancel-order-edit" className="quiet" onClick={onCancel}>
|
||||
取消修改
|
||||
</Button>
|
||||
<button
|
||||
<LedgerButton
|
||||
className="primary"
|
||||
type="submit"
|
||||
data-order-edit-submit
|
||||
disabled={client.busy || !!client.pending() || entry.conflicted}
|
||||
>
|
||||
{approval ? '提交修改申请' : '保存修改'}
|
||||
</button>
|
||||
</LedgerButton>
|
||||
</div>
|
||||
<div id="order-error" aria-live="polite">
|
||||
{serverFeedback}
|
||||
|
||||
Reference in new issue
Block a user