Browse Source

问题处理功能完善

master
peng.peng 2 years ago
parent
commit
87f2b01027
  1. 11
      script/1.0.3/schema/8.create_patrol_record_issue_handle.sql
  2. 92
      web/client/src/sections/issueHandle/components/isuue-handle-mdal.js
  3. 7
      web/client/src/sections/issueHandle/containers/patrolRecord.js

11
script/1.0.3/schema/8.create_patrol_record_issue_handle.sql

@ -1,4 +1,3 @@
DROP TABLE IF EXISTS "public"."patrol_record_issue_handle";
create table patrol_record_issue_handle
(
id serial
@ -17,8 +16,10 @@ create table patrol_record_issue_handle
approve_opinion varchar(255),
repair_desc varchar(255),
repair_image jsonb,
creator jsonb,
create_time timestamp(6) with time zone
create_time timestamp(6) with time zone,
creator jsonb,
check_opinion varchar(255),
check_image jsonb
);
comment on column patrol_record_issue_handle.patrol_record_id is '巡检记录id';
@ -48,10 +49,6 @@ comment on column patrol_record_issue_handle.approve_opinion is '审批意见';
comment on column patrol_record_issue_handle.repair_desc is '维修情况描述';
comment on column patrol_record_issue_handle.creator is '制定人';
comment on column patrol_record_issue_handle.create_time is '制定日期';
alter table patrol_record_issue_handle
owner to "FashionAdmin";

92
web/client/src/sections/issueHandle/components/isuue-handle-mdal.js

@ -127,8 +127,95 @@ export default (props) => {
</Row></>
}
const renderRepairInfo = () => {
return <>
<div className="item-title">{"维修处理"}</div>
<ProFormTextArea
name="repairDesc"
label="维修情况描述:"
disabled={true}
/>
<Form.Item label="完工图片:">
<Uploads
listType='picture-card'
uploadType='project'
maxFilesNum={1}
maxFileSize={10}
isQiniu={true}
disabled={true}
fileTypes={["png", "jpg"]}
defaultValue={
(() => {
let nextV = []
for (let s of (editData?.patrolRecordIssueHandles[0]?.repairImage || [])) {
if (s) {
nextV.push({
storageUrl: s
})
}
}
return nextV
})()
}
/>
</Form.Item>
</>
}
const renderCheckInfo = () => {
return <>
<div className="item-title">{"质检验收"}</div>
<ProFormTextArea
name="checkPerson1"
label="验收人:"
disabled={true}
value={ editData?.patrolRecordIssueHandles[0]?.checkPerson?.name}
/>
<Form.Item label="完工图片:">
<Uploads
listType='picture-card'
uploadType='project'
maxFilesNum={1}
maxFileSize={10}
isQiniu={true}
disabled={true}
fileTypes={["png", "jpg"]}
defaultValue={
(() => {
let nextV = []
for (let s of (editData?.patrolRecordIssueHandles[0]?.checkImage || [])) {
if (s) {
nextV.push({
storageUrl: s
})
}
}
return nextV
})()
}
/>
</Form.Item>
<ProFormTextArea
name="checkOpinion"
label="验收意见:"
disabled={true}
/>
<ProFormTextArea
name="checkState"
label="验收结果:"
disabled={true}
value={editData?.patrolRecordIssueHandles[0]?.state == 6 ? '验收通过' : '验收不通过'}
/>
</>
}
return (
<ModalForm
formRef={formRef}
@ -284,8 +371,6 @@ export default (props) => {
<div className="item-title">{"维修计划审批"}</div>
<div>
<ProFormTextArea
labelCol={{ span: 5 }}
wrapperCol={{ span: 16 }}
name="approveOpinion"
label="审批意见:"
disabled={title != '审核'}
@ -302,6 +387,9 @@ export default (props) => {
</div>
</>
}
{(editData?.patrolRecordIssueHandles[0]?.state && editData?.patrolRecordIssueHandles[0]?.state > 4) && renderRepairInfo()}
{(editData?.patrolRecordIssueHandles[0]?.state && editData?.patrolRecordIssueHandles[0]?.state > 5) && renderCheckInfo()}
</div>
</ ModalForm>
);

7
web/client/src/sections/issueHandle/containers/patrolRecord.js

@ -47,6 +47,13 @@ const PatrolRecord = (props) => {
dataToSave.state = 2;
msg = '维修计划修改';
}
if (editData?.patrolRecordIssueHandles[0]?.state == 1) {
dataToSave.state = 2;
dataToSave.creator = user;
dataToSave.createTime = moment();
msg = '计划制定';
}
return dispatch(
issueHandle.modifyPatrolRecordIssueHandle(editData?.patrolRecordIssueHandles[0]?.id, dataToSave,
values?.msg || msg),

Loading…
Cancel
Save