Commit 0bfcd836 authored by 卢均锐's avatar 卢均锐

Merge branch 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into dev-srm

* 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform: 🐞 fix(商品询价、采购询价、需求采购计划): x修复bug
parents f3c9f4e3 80350fe3
...@@ -137,6 +137,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => { ...@@ -137,6 +137,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
{...otherProps} {...otherProps}
> >
<StandardTable <StandardTable
keepAlive={false}
columns={columns} columns={columns}
tableProps={{ tableProps={{
...tableProps, ...tableProps,
......
...@@ -33,6 +33,7 @@ const AddQuotes: React.FC<parmas> = (props) => { ...@@ -33,6 +33,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
PublicApi.getTransactionProductQuotationDetails({ id }).then(res => { PublicApi.getTransactionProductQuotationDetails({ id }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
setEditData(res.data); setEditData(res.data);
console.log(res.data, 123)
setInquiryLNo({ setInquiryLNo({
orderNo: res.data.inquiryListNo, orderNo: res.data.inquiryListNo,
orderId: res.data.inquiryListId orderId: res.data.inquiryListId
......
...@@ -115,7 +115,7 @@ const BasicInfo: React.FC<queryProps> = (props) => { ...@@ -115,7 +115,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
details: editData.details details: editData.details
}) })
setinquiryNo({ setinquiryNo({
orderId: editData.id, orderId: editData.inquiryListId || editData.id ,
orderNo: editData.inquiryListNo orderNo: editData.inquiryListNo
}); });
} }
......
...@@ -256,6 +256,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => { ...@@ -256,6 +256,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
case 'audit': case 'audit':
return 'auditOpinion'; return 'auditOpinion';
case 'planAudit': case 'planAudit':
case 'billBack':
return 'cause' return 'cause'
default: default:
return 'reason' return 'reason'
......
...@@ -62,7 +62,6 @@ const Material: React.FC<Materialprops> = (props: any) => { ...@@ -62,7 +62,6 @@ const Material: React.FC<Materialprops> = (props: any) => {
<Form.Item <Form.Item
style={{ marginBottom: 0 }} style={{ marginBottom: 0 }}
name={`needCount${index}`} name={`needCount${index}`}
initialValue={text}
rules={[ rules={[
{ {
required: true, required: true,
...@@ -102,7 +101,7 @@ const Material: React.FC<Materialprops> = (props: any) => { ...@@ -102,7 +101,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
<Form.Item <Form.Item
style={{ marginBottom: 0 }} style={{ marginBottom: 0 }}
name={`arriveTime${index}`} name={`arriveTime${index}`}
initialValue={text && moment(text)} rules={[{ required: true, message: '请选择到货日期', }]}
> >
<DatePicker <DatePicker
style={{ width: '100%' }} style={{ width: '100%' }}
...@@ -141,7 +140,12 @@ const Material: React.FC<Materialprops> = (props: any) => { ...@@ -141,7 +140,12 @@ const Material: React.FC<Materialprops> = (props: any) => {
const handleArriveTime = (val, index) => { const handleArriveTime = (val, index) => {
const data = [...dataSource]; const data = [...dataSource];
if (val) {
console.log(val)
data[index].arriveTime = val.format('x'); data[index].arriveTime = val.format('x');
} else {
data[index].arriveTime = undefined
}
setDataSource(data) setDataSource(data)
} }
...@@ -157,8 +161,8 @@ const Material: React.FC<Materialprops> = (props: any) => { ...@@ -157,8 +161,8 @@ const Material: React.FC<Materialprops> = (props: any) => {
number: item.code, number: item.code,
name: item.name, name: item.name,
model: item.type, model: item.type,
category: !isEmpty(item.customerCategory) && item.customerCategory.name, category: !isEmpty(item.customerCategory) ? item.customerCategory.name : null,
brand: !isEmpty(item.brand) && item.brand.name, brand: !isEmpty(item.brand) ? item.brand.name : null,
unit: item.unitName, unit: item.unitName,
needCount: item.needCount ? item.needCount : null, needCount: item.needCount ? item.needCount : null,
costPrice: item.costPrice, costPrice: item.costPrice,
...@@ -180,10 +184,12 @@ const Material: React.FC<Materialprops> = (props: any) => { ...@@ -180,10 +184,12 @@ const Material: React.FC<Materialprops> = (props: any) => {
const data = [...dataSource]; const data = [...dataSource];
data.splice(index, 1); data.splice(index, 1);
message.success('删除成功') message.success('删除成功')
form.resetFields();
data.forEach((item, index) => { data.forEach((item, index) => {
console.log(moment(Number(item.arriveTime)))
form.setFieldsValue({ form.setFieldsValue({
[`needCount${index}`]: item.needCount ? item.needCount : undefined, [`needCount${index}`]: item.needCount ? item.needCount : undefined,
[`arriveTime${index}`]: item.arriveTime ? moment(item.arriveTime) : undefined, [`arriveTime${index}`]: item.arriveTime ? moment(Number(item.arriveTime)) : undefined,
}) })
}) })
setDataSource(data) setDataSource(data)
...@@ -197,6 +203,7 @@ const Material: React.FC<Materialprops> = (props: any) => { ...@@ -197,6 +203,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
state: true, state: true,
name: 'material', name: 'material',
data: { data: {
addType: _res.addType,
details: dataSource, details: dataSource,
}, },
}) })
...@@ -214,6 +221,13 @@ const Material: React.FC<Materialprops> = (props: any) => { ...@@ -214,6 +221,13 @@ const Material: React.FC<Materialprops> = (props: any) => {
/**编辑回显数据 */ /**编辑回显数据 */
if (!isEmpty(fetchdata.details)) { if (!isEmpty(fetchdata.details)) {
const data = [...fetchdata.details]; const data = [...fetchdata.details];
form.resetFields();
data.forEach((item, index) => {
form.setFieldsValue({
[`needCount${index}`]: item.needCount ? item.needCount : undefined,
[`arriveTime${index}`]: item.arriveTime ? moment(item.arriveTime) : undefined,
})
})
setDataSource([...data]) setDataSource([...data])
} }
}, [fetchdata.details]) }, [fetchdata.details])
...@@ -222,12 +236,13 @@ const Material: React.FC<Materialprops> = (props: any) => { ...@@ -222,12 +236,13 @@ const Material: React.FC<Materialprops> = (props: any) => {
<Form {...layout} form={form}> <Form {...layout} form={form}>
<Form.Item <Form.Item
label='添加方式' label='添加方式'
name='materielMode' name='addType'
rules={[{ required: true, message: '请选择添加方式' }]} rules={[{ required: true, message: '请选择添加方式' }]}
initialValue={1}
> >
<Radio.Group> <Radio.Group>
<Radio value={1}>选择货品生成</Radio> <Radio value={1}>选择货品生成</Radio>
<Radio value={2}>导入计划采购物料</Radio> {/* <Radio value={2}>导入计划采购物料</Radio> */}
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
<Button <Button
......
...@@ -68,7 +68,7 @@ const DemandDetailed = () => { ...@@ -68,7 +68,7 @@ const DemandDetailed = () => {
const params = { const params = {
id, id,
} }
await PublicApi.getPurchaseNeedPlanDetails({ ...params }).then(res => { await PublicApi.getPurchaseNeedPlanDetails({ ...params }).then((res: any) => {
if (res.code !== 1000) { if (res.code !== 1000) {
history.goBack(); history.goBack();
return; return;
...@@ -92,6 +92,7 @@ const DemandDetailed = () => { ...@@ -92,6 +92,7 @@ const DemandDetailed = () => {
createRoleId: item.needPlanId, createRoleId: item.needPlanId,
createTime: item.operateTime, createTime: item.operateTime,
department: item.department, department: item.department,
stateName: item.status,
id: item.id, id: item.id,
memberId: null, memberId: null,
memberRoleId: null, memberRoleId: null,
......
...@@ -181,6 +181,7 @@ const Demand: React.FC<Iprops> = (props: any) => { ...@@ -181,6 +181,7 @@ const Demand: React.FC<Iprops> = (props: any) => {
type: 2, type: 2,
}) })
}) })
form.setFieldsValue({ "rowCol": data })
setRowCtl(data); setRowCtl(data);
} }
} }
...@@ -239,6 +240,7 @@ const Demand: React.FC<Iprops> = (props: any) => { ...@@ -239,6 +240,7 @@ const Demand: React.FC<Iprops> = (props: any) => {
setValue(fetchdata.type); setValue(fetchdata.type);
fetchdata.shopIds && handleStoreIds(fetchdata.shopIds); fetchdata.shopIds && handleStoreIds(fetchdata.shopIds);
fetchdata.demandMembers && setRowCtl([...fetchdata.demandMembers]); fetchdata.demandMembers && setRowCtl([...fetchdata.demandMembers]);
fetchdata.demandMembers && form.setFieldsValue({ "rowCol": fetchdata.demandMembers })
} }
}, [fetchdata]) }, [fetchdata])
...@@ -295,7 +297,7 @@ const Demand: React.FC<Iprops> = (props: any) => { ...@@ -295,7 +297,7 @@ const Demand: React.FC<Iprops> = (props: any) => {
)} )}
{value === 3 {value === 3
&& ( && (
<Form.Item noStyle> <Form.Item wrapperCol={{ span: 24 }} name="rowCol" rules={[{ required: true, message: "请选择会员" }]}>
<Button <Button
type='dashed' type='dashed'
block block
......
...@@ -66,7 +66,7 @@ const DemandDetailed = () => { ...@@ -66,7 +66,7 @@ const DemandDetailed = () => {
const params = { const params = {
id, id,
} }
await PublicApi.getPurchaseNeedPlanDetails({ ...params }).then(res => { await PublicApi.getPurchaseNeedPlanDetails({ ...params }).then((res: any) => {
if (res.code !== 1000) { if (res.code !== 1000) {
history.goBack(); history.goBack();
return; return;
...@@ -90,11 +90,12 @@ const DemandDetailed = () => { ...@@ -90,11 +90,12 @@ const DemandDetailed = () => {
createRoleId: item.needPlanId, createRoleId: item.needPlanId,
createTime: item.operateTime, createTime: item.operateTime,
department: item.department, department: item.department,
stateName: item.status,
id: item.id, id: item.id,
memberId: null, memberId: null,
memberRoleId: null, memberRoleId: null,
operation: item.operate, operation: item.operate,
position: '', position: item.jobTitle,
purchaseInquiryId: null, purchaseInquiryId: null,
roleName: item.operator, roleName: item.operator,
state: item.step + 1, state: item.step + 1,
......
...@@ -136,14 +136,15 @@ const PurchasePlanDetailed = () => { ...@@ -136,14 +136,15 @@ const PurchasePlanDetailed = () => {
createRoleId: item.needPlanId, createRoleId: item.needPlanId,
createTime: item.operateTime, createTime: item.operateTime,
department: item.department, department: item.department,
stateName: item.status,
id: item.id, id: item.id,
memberId: null, memberId: null,
memberRoleId: null, memberRoleId: null,
operation: item.operate, operation: item.operate,
position: '', position: item.jobTitle,
purchaseInquiryId: null, purchaseInquiryId: null,
roleName: item.operator, roleName: item.operator,
state: item.status, state: item.step + 1,
step: item.step, step: item.step,
}) })
}) })
......
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