Commit 28b6121a authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix: 修改新增物流单bug

parent ae1e372b
......@@ -232,6 +232,13 @@ const ModalTableOrder: React.FC<ModalTableProps> = (props) => {
}
})
break;
case 5:
PublicApi.getEnhanceProcessToBeDeliveryList({ ...parmas }).then((res: any) => {
if (res.code === 1000) {
resolve(res.data)
}
})
break;
}
})
}
......@@ -256,45 +263,46 @@ const ModalTableOrder: React.FC<ModalTableProps> = (props) => {
{...nestTableProps}
/>
) : (
<StandardTable
tableType='small'
currentRef={selfRef}
fetchTableData={(params) => fetchData(params)}
formRender={(child, ps) => <Row justify='space-between' style={{ marginBottom: 16 }}>
<Col span={18} style={{ zIndex: 99 }}>
<Form form={form}>
<Form.Item name='radio' label='单据选择'>
<Radio.Group onChange={(e) => { setType(e.target.value); selfRef.current.reload(); }}>
<Radio value={1}>订单</Radio>
<Radio value={2}>换货申请单(退货发货)</Radio>
<Radio value={3}>换货申请单(换货发货)</Radio>
<Radio value={4}>退货申请单</Radio>
</Radio.Group>
</Form.Item>
</Form>
</Col>
<Col style={{ marginTop: 4 }}>{ps}</Col>
<Col span={18} style={{ zIndex: 99 }}>{child}</Col>
</Row >}
formilyProps={
{
ctx: {
schema: type === 1 ? logisticsDeliverySearchSchema : otherSearchSchema,
components: { ModalSearch: Search, SearchSelect, Submit, DateSelect },
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
type === 1 ? 'orderNo' : 'applyNo',
FORM_FILTER_PATH,
);
}
<StandardTable
tableType='small'
currentRef={selfRef}
fetchTableData={(params) => fetchData(params)}
formRender={(child, ps) => <Row justify='space-between' style={{ marginBottom: 16 }}>
<Col span={18} style={{ zIndex: 99 }}>
<Form form={form}>
<Form.Item name='radio' label='单据选择'>
<Radio.Group onChange={(e) => { setType(e.target.value); selfRef.current.reload(); }}>
<Radio value={1}>订单</Radio>
<Radio value={2}>换货申请单(退货发货)</Radio>
<Radio value={3}>换货申请单(换货发货)</Radio>
<Radio value={4}>退货申请单</Radio>
<Radio value={5}>生产通知单</Radio>
</Radio.Group>
</Form.Item>
</Form>
</Col>
<Col style={{ marginTop: 4 }}>{ps}</Col>
<Col span={18} style={{ zIndex: 99 }}>{child}</Col>
</Row >}
formilyProps={
{
ctx: {
schema: type === 1 ? logisticsDeliverySearchSchema : otherSearchSchema,
components: { ModalSearch: Search, SearchSelect, Submit, DateSelect },
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
type === 1 ? 'orderNo' : 'applyNo',
FORM_FILTER_PATH,
);
}
}
}
{...resetTable}
/>
)
}
{...resetTable}
/>
)
}
</Modal>
......
......@@ -116,7 +116,7 @@ const AddLogistics: React.FC<{}> = () => {
width: 120,
dataIndex: 'amount',
render: (text: any, record: any, index: number) =>
<Form.Item noStyle name={`amount${index}`} initialValue={record.amount} rules={[{ required: true, message: '请输入数量' }]}>
<Form.Item style={{ marginBottom: 0 }} name={`amount${index}`} initialValue={record.amount} rules={[{ required: true, message: '请输入数量' }]}>
<Input type='number' min={1} onBlur={(e) => inputOnchange(record.productId, e, 'amount')} />
</Form.Item>
......@@ -127,7 +127,7 @@ const AddLogistics: React.FC<{}> = () => {
width: 120,
dataIndex: 'carton',
render: (text: any, record: any, index: number) =>
<Form.Item noStyle name={`carton${index}`} initialValue={record.carton} rules={[{ required: true, message: '请输入箱数' }]}>
<Form.Item style={{ marginBottom: 0 }} name={`carton${index}`} initialValue={record.carton} rules={[{ required: true, message: '请输入箱数' }]}>
<Input type='number' min={1} onBlur={(e) => inputOnchange(record.productId, e, 'carton')} />
</Form.Item>
},
......@@ -137,7 +137,7 @@ const AddLogistics: React.FC<{}> = () => {
width: 120,
dataIndex: 'weight',
render: (text: any, record: any, index: number) =>
<Form.Item noStyle name={`weight${index}`} initialValue={record.weight} rules={[{ required: true, message: '请输入重量 (KG)' }]}>
<Form.Item style={{ marginBottom: 0 }} name={`weight${index}`} initialValue={record.weight} rules={[{ required: true, message: '请输入重量 (KG)' }]}>
<Input type='number' min={1} onBlur={(e) => inputOnchange(record.productId, e, 'weight')} />
</Form.Item>
},
......@@ -147,7 +147,7 @@ const AddLogistics: React.FC<{}> = () => {
width: 120,
dataIndex: 'volume',
render: (text: any, record: any, index: number) =>
<Form.Item noStyle name={`volume${index}`} initialValue={record.volume} rules={[{ required: true, message: '请输入体积 (M3)' }]}>
<Form.Item style={{ marginBottom: 0 }} name={`volume${index}`} initialValue={record.volume} rules={[{ required: true, message: '请输入体积 (M3)' }]}>
<Input type='number' min={1} onBlur={(e) => inputOnchange(record.productId, e, 'volume')} />
</Form.Item>
},
......@@ -636,6 +636,7 @@ const AddLogistics: React.FC<{}> = () => {
if (goodsRef.errorFields) {
data[1] = goodsRef.errorFields.length;
setbadge([...data]);
setLoading(false);
} else {
data[1] = 0;
setbadge(data)
......@@ -849,7 +850,7 @@ const AddLogistics: React.FC<{}> = () => {
/>
{/* 选择对应订单号/售后单 */}
<ModalTableOrder
width={900}
width={1000}
visible={invoicesvisible}
columns={invoicesColumns}
invoicesNo={query.invoicesNo}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment