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

🐞 fix: 修改新增物流单bug

parent ae1e372b
...@@ -232,6 +232,13 @@ const ModalTableOrder: React.FC<ModalTableProps> = (props) => { ...@@ -232,6 +232,13 @@ const ModalTableOrder: React.FC<ModalTableProps> = (props) => {
} }
}) })
break; 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) => { ...@@ -256,45 +263,46 @@ const ModalTableOrder: React.FC<ModalTableProps> = (props) => {
{...nestTableProps} {...nestTableProps}
/> />
) : ( ) : (
<StandardTable <StandardTable
tableType='small' tableType='small'
currentRef={selfRef} currentRef={selfRef}
fetchTableData={(params) => fetchData(params)} fetchTableData={(params) => fetchData(params)}
formRender={(child, ps) => <Row justify='space-between' style={{ marginBottom: 16 }}> formRender={(child, ps) => <Row justify='space-between' style={{ marginBottom: 16 }}>
<Col span={18} style={{ zIndex: 99 }}> <Col span={18} style={{ zIndex: 99 }}>
<Form form={form}> <Form form={form}>
<Form.Item name='radio' label='单据选择'> <Form.Item name='radio' label='单据选择'>
<Radio.Group onChange={(e) => { setType(e.target.value); selfRef.current.reload(); }}> <Radio.Group onChange={(e) => { setType(e.target.value); selfRef.current.reload(); }}>
<Radio value={1}>订单</Radio> <Radio value={1}>订单</Radio>
<Radio value={2}>换货申请单(退货发货)</Radio> <Radio value={2}>换货申请单(退货发货)</Radio>
<Radio value={3}>换货申请单(换货发货)</Radio> <Radio value={3}>换货申请单(换货发货)</Radio>
<Radio value={4}>退货申请单</Radio> <Radio value={4}>退货申请单</Radio>
</Radio.Group> <Radio value={5}>生产通知单</Radio>
</Form.Item> </Radio.Group>
</Form> </Form.Item>
</Col> </Form>
<Col style={{ marginTop: 4 }}>{ps}</Col> </Col>
<Col span={18} style={{ zIndex: 99 }}>{child}</Col> <Col style={{ marginTop: 4 }}>{ps}</Col>
</Row >} <Col span={18} style={{ zIndex: 99 }}>{child}</Col>
formilyProps={ </Row >}
{ formilyProps={
ctx: { {
schema: type === 1 ? logisticsDeliverySearchSchema : otherSearchSchema, ctx: {
components: { ModalSearch: Search, SearchSelect, Submit, DateSelect }, schema: type === 1 ? logisticsDeliverySearchSchema : otherSearchSchema,
effects: ($, actions) => { components: { ModalSearch: Search, SearchSelect, Submit, DateSelect },
useStateFilterSearchLinkageEffect( effects: ($, actions) => {
$, useStateFilterSearchLinkageEffect(
actions, $,
type === 1 ? 'orderNo' : 'applyNo', actions,
FORM_FILTER_PATH, type === 1 ? 'orderNo' : 'applyNo',
); FORM_FILTER_PATH,
} );
} }
} }
} }
{...resetTable} }
/> {...resetTable}
) />
)
} }
</Modal> </Modal>
......
...@@ -116,7 +116,7 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -116,7 +116,7 @@ const AddLogistics: React.FC<{}> = () => {
width: 120, width: 120,
dataIndex: 'amount', dataIndex: 'amount',
render: (text: any, record: any, index: number) => 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')} /> <Input type='number' min={1} onBlur={(e) => inputOnchange(record.productId, e, 'amount')} />
</Form.Item> </Form.Item>
...@@ -127,7 +127,7 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -127,7 +127,7 @@ const AddLogistics: React.FC<{}> = () => {
width: 120, width: 120,
dataIndex: 'carton', dataIndex: 'carton',
render: (text: any, record: any, index: number) => 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')} /> <Input type='number' min={1} onBlur={(e) => inputOnchange(record.productId, e, 'carton')} />
</Form.Item> </Form.Item>
}, },
...@@ -137,7 +137,7 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -137,7 +137,7 @@ const AddLogistics: React.FC<{}> = () => {
width: 120, width: 120,
dataIndex: 'weight', dataIndex: 'weight',
render: (text: any, record: any, index: number) => 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')} /> <Input type='number' min={1} onBlur={(e) => inputOnchange(record.productId, e, 'weight')} />
</Form.Item> </Form.Item>
}, },
...@@ -147,7 +147,7 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -147,7 +147,7 @@ const AddLogistics: React.FC<{}> = () => {
width: 120, width: 120,
dataIndex: 'volume', dataIndex: 'volume',
render: (text: any, record: any, index: number) => 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')} /> <Input type='number' min={1} onBlur={(e) => inputOnchange(record.productId, e, 'volume')} />
</Form.Item> </Form.Item>
}, },
...@@ -636,6 +636,7 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -636,6 +636,7 @@ const AddLogistics: React.FC<{}> = () => {
if (goodsRef.errorFields) { if (goodsRef.errorFields) {
data[1] = goodsRef.errorFields.length; data[1] = goodsRef.errorFields.length;
setbadge([...data]); setbadge([...data]);
setLoading(false);
} else { } else {
data[1] = 0; data[1] = 0;
setbadge(data) setbadge(data)
...@@ -849,7 +850,7 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -849,7 +850,7 @@ const AddLogistics: React.FC<{}> = () => {
/> />
{/* 选择对应订单号/售后单 */} {/* 选择对应订单号/售后单 */}
<ModalTableOrder <ModalTableOrder
width={900} width={1000}
visible={invoicesvisible} visible={invoicesvisible}
columns={invoicesColumns} columns={invoicesColumns}
invoicesNo={query.invoicesNo} 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