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

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

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

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

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

Loading…
Cancel
Save