Browse Source

工程一览新增编辑问题

release_0.0.4
xingyongchun 2 years ago
parent
commit
a0b7b88f00
  1. 29
      web/client/src/sections/fillion/components/infor/details.js
  2. 34
      web/client/src/sections/fillion/components/project/project.js
  3. 1
      web/client/src/sections/fillion/components/transportationTable.js

29
web/client/src/sections/fillion/components/infor/details.js

@ -155,15 +155,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, level: whichofits, roadId: records?.[0]?.value || '' }
dispatch(putRoadway(query)).then((res) => {
setSuccess(res.success)
})
return true
} else {
setDelet(values)
const query = { ...values, level: whichofits }
dispatch(putRoadway(query)).then((res) => {
setSuccess(res.success)
})
return true
@ -174,14 +173,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, roadId: records?.[0]?.value || '' }
dispatch(putBridge(query)).then((res) => {
setSuccess(res.success)
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putBridge(query)).then((res) => {
setSuccess(res.success)
})
return true
}
@ -191,14 +190,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putSpecificVehicle(query)).then((res) => {
setSuccess(res.success)
})
return true
} else {
setDelet(values)
const query = { ...values, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putSpecificVehicle(query)).then((res) => {
setSuccess(res.success)
})
return true
}
@ -208,14 +207,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, businessId: records?.[0]?.value, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putHouseholds(query)).then((res) => {
setSuccess(res.success)
})
return true
} else {
setDelet(values)
const query = { ...values, type: rewkeys === 'chuzu' ? '出租车' : '危货' }
dispatch(putHouseholds(query)).then((res) => {
setSuccess(res.success)
})
return true
}
@ -224,14 +223,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, lineId: records?.[0]?.value || '' }
dispatch(putCircuit(query)).then((res) => {
setSuccess(res.success)
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putCircuit(query)).then((res) => {
setSuccess(res.success)
})
return true
}
@ -241,14 +240,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, carId: records?.[0]?.value || '' }
dispatch(putVehicle(query)).then((res) => {
setSuccess(res.success)
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putVehicle(query)).then((res) => {
setSuccess(res.success)
})
return true
}
@ -258,7 +257,7 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, overspeedId: records?.[0]?.value || '' }
dispatch(putPurchase(query)).then((res) => {
setSuccess(res.success)
setMonitor(res)
})
return true
@ -266,7 +265,7 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values }
dispatch(putPurchase(query)).then((res) => {
setSuccess(res.success)
setMonitor(res)
})
return true

34
web/client/src/sections/fillion/components/project/project.js

@ -23,7 +23,6 @@ const ProjectModal = (props) => {
const [records, setRecords] = useState()//处理
const [recordsay, setRecordsay] = useState()//必填数据
const [success, setSuccess] = useState() //状态
const [flage, setFlage] = useState() //xiangmujinzhan
useEffect(() => {
const array = []
if (rewkeys === 'road') {
@ -78,40 +77,39 @@ const ProjectModal = (props) => {
visible={visible}
onVisibleChange={onVisibleChange}
onFinish={(values) => {
console.log(values)
if (rewkeys === 'road') {
if (typecard == '111') {
setDelet(values)
setDelet(values)
const query = { ...values, type:rewkeys }
const query = { ...values, type:rewkeys,projectId:records?.[0]?.value || '' }
dispatch(putProject(query)).then((res) => {
setSuccess(res.success)
})
return success
return true
} else {
setDelet(values)
const query = { ...values, type:rewkeys }
dispatch(putProject(query)).then((res) => {
setSuccess(res.success)
})
return success
return true
}
}
if (rewkeys === 'bridge') {
if (typecard == '111') {
setDelet(values)
const query = { ...values, type:rewkeys }
const query = { ...values, type:rewkeys,projectId:records?.[0]?.value || '' }
dispatch(putProject(query)).then((res) => {
setSuccess(res.success)
})
return success
return true
} else {
setDelet(values)
const query = { ...values, type:rewkeys }
dispatch(putProject(query)).then((res) => {
setSuccess(res.success)
})
return success
return true
}
}
}}
@ -127,7 +125,7 @@ const ProjectModal = (props) => {
placeholder="请输入名称"
// value={recordsay?.[0]?.value}
rules={[{ required: true, message: "必填" }]}
// rules={[{ required: true, message: "必填" }]}
/><ProFormText
name={newlys?.[1]?.type}
width="md"
@ -135,7 +133,7 @@ const ProjectModal = (props) => {
placeholder="请输入名称"
// value={recordsay?.[1]?.value}
rules={[{ required: true, message: "必填" }]}
// rules={[{ required: true, message: "必填" }]}
/>
<ProFormSelect
options={[
@ -150,6 +148,7 @@ const ProjectModal = (props) => {
width="xs"
name='done'
label='是否已完成'
rules={[{ required: true, message: "必填" }]}
/>
{newlysay?.map((item, index) => {
return <ProFormText width="md"
@ -167,7 +166,7 @@ const ProjectModal = (props) => {
placeholder="请输入名称"
// value={recordssy?.[0]?.value}
rules={[{ required: true, message: "必填" }]}
// rules={[{ required: true, message: "必填" }]}
/><ProFormText
name={newlys?.[1]?.type}
width="md"
@ -175,7 +174,7 @@ const ProjectModal = (props) => {
placeholder="请输入名称"
// value={recordssy?.[1]?.value}
rules={[{ required: true, message: "必填" }]}
// rules={[{ required: true, message: "必填" }]}
/>
<ProFormSelect
options={[
@ -190,6 +189,7 @@ const ProjectModal = (props) => {
width="xs"
name='done'
label='是否已完成'
rules={[{ required: true, message: "必填" }]}
/>
{newlysay?.map((item, index) => {
return <ProFormText width="md"

1
web/client/src/sections/fillion/components/transportationTable.js

@ -3877,6 +3877,7 @@ const TransporTationTable = (props) => {
rewkeys={'road'}
recortd={recortd}
setRecortd={setRecortd}
setDelet={setDelet}
/> : ''}
</Spin >
)

Loading…
Cancel
Save