465 lines
11 KiB
Vue
465 lines
11 KiB
Vue
|
<!-- 整改详情页 -->
|
||
|
<template>
|
||
|
<view class="container">
|
||
|
<view class="card">
|
||
|
<app-hidden-view
|
||
|
:hidden-id="hiddenId"
|
||
|
@throw-basic-info="info = $event.pd"
|
||
|
/>
|
||
|
<view class="card">
|
||
|
<u-form
|
||
|
ref="formRef"
|
||
|
label-position="left"
|
||
|
:model="form"
|
||
|
:rules="rules"
|
||
|
label-width="auto"
|
||
|
>
|
||
|
<u-form-item label="是否正常整改" prop="IS_NORMAL" required>
|
||
|
<u-radio-group v-model="form.IS_NORMAL" direction="horizontal">
|
||
|
<u-radio name="1" label="是" />
|
||
|
<u-radio name="2" label="否" />
|
||
|
</u-radio-group>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
<block v-if="form.IS_NORMAL === '2'">
|
||
|
<u-form-item
|
||
|
label="无法整改原因"
|
||
|
label-position="top"
|
||
|
prop="disposalPlan"
|
||
|
required
|
||
|
>
|
||
|
<u-textarea
|
||
|
v-model="form.disposalPlan"
|
||
|
placeholder="请输入无法整改原因"
|
||
|
border="none"
|
||
|
auto-height
|
||
|
/>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
</block>
|
||
|
<block v-if="form.IS_NORMAL === '1'">
|
||
|
<u-divider text-position="left" text="隐患整改"></u-divider>
|
||
|
<u-form-item
|
||
|
label="隐患整改详细描述"
|
||
|
label-position="top"
|
||
|
prop="RECTIFYDESCR"
|
||
|
required
|
||
|
>
|
||
|
<u-textarea
|
||
|
v-model="form.RECTIFYDESCR"
|
||
|
placeholder="请输入隐患整改详细描述"
|
||
|
border="none"
|
||
|
auto-height
|
||
|
/>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
<app-time
|
||
|
:model-value="form.RECTIFICATIONTIME"
|
||
|
prop="RECTIFICATIONTIME"
|
||
|
mode="date"
|
||
|
label="整改日期"
|
||
|
@fn-confirm-emit="fnConfirmEmit"
|
||
|
/>
|
||
|
<u-form-item label="投入资金(元)" prop="INVEST_FUNDS" required>
|
||
|
<u-input
|
||
|
v-model="form.INVEST_FUNDS"
|
||
|
placeholder="请输入投入资金"
|
||
|
border="none"
|
||
|
type="number"
|
||
|
input-align="right"
|
||
|
/>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
<app-upload
|
||
|
v-model="form.AfterRectificationFile"
|
||
|
label="整改后照片"
|
||
|
prop="AfterRectificationFile"
|
||
|
/>
|
||
|
<view>
|
||
|
<view class="mt-10 flex-end">
|
||
|
<u-button
|
||
|
custom-style="width: 100rpx;margin:0"
|
||
|
type="primary"
|
||
|
size="mini"
|
||
|
text="添加"
|
||
|
@click="fnAddAcceptanceList"
|
||
|
/>
|
||
|
</view>
|
||
|
<view
|
||
|
v-for="(item, index) in acceptanceList"
|
||
|
:key="item.id"
|
||
|
style="
|
||
|
position: relative;
|
||
|
border: 1px dashed #ccc;
|
||
|
padding: 20rpx 20rpx 20rpx 40rpx;
|
||
|
"
|
||
|
class="mt-10"
|
||
|
>
|
||
|
<app-department
|
||
|
:id="item.DEPARTMENT_ID"
|
||
|
:name="item.DEPARTMENT_NAME"
|
||
|
:form="acceptanceList[index]"
|
||
|
clear-key="USER_NAME,USER_ID"
|
||
|
label="验收部门"
|
||
|
/>
|
||
|
<app-personnel
|
||
|
:id="item.USER_ID"
|
||
|
:name="item.USER_NAME"
|
||
|
:department-id="item.DEPARTMENT_ID"
|
||
|
label="验收人"
|
||
|
/>
|
||
|
<u-icon
|
||
|
v-if="index !== 0"
|
||
|
name="close-circle-fill"
|
||
|
color="#ff2929"
|
||
|
size="20"
|
||
|
custom-style="position: absolute;right: -20rpx;top: -20rpx"
|
||
|
@click="acceptanceList.splice(index, 1)"
|
||
|
/>
|
||
|
</view>
|
||
|
</view>
|
||
|
<u-form-item label="是否有整改方案" prop="HAVESCHEME" required>
|
||
|
<u-radio-group v-model="form.HAVESCHEME" direction="horizontal">
|
||
|
<u-radio name="1" label="是" />
|
||
|
<u-radio name="0" label="否" />
|
||
|
</u-radio-group>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
<block v-if="form.HAVESCHEME === '1'">
|
||
|
<u-cell-group :border="false">
|
||
|
<u-cell title="排查日期" :value="info.CREATTIME" />
|
||
|
<u-cell title="隐患清单" :value="info.LIST_NAME" />
|
||
|
</u-cell-group>
|
||
|
<u-form-item
|
||
|
label="治理标准"
|
||
|
label-position="top"
|
||
|
prop="GOVERNSTANDARDS"
|
||
|
required
|
||
|
>
|
||
|
<u-textarea
|
||
|
v-model="form.GOVERNSTANDARDS"
|
||
|
placeholder="请输入治理标准"
|
||
|
border="none"
|
||
|
auto-height
|
||
|
/>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
<u-form-item
|
||
|
label="治理方法"
|
||
|
label-position="top"
|
||
|
prop="GOVERNMETHOD"
|
||
|
required
|
||
|
>
|
||
|
<u-textarea
|
||
|
v-model="form.GOVERNMETHOD"
|
||
|
placeholder="请输入治理方法"
|
||
|
border="none"
|
||
|
auto-height
|
||
|
/>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
<u-form-item
|
||
|
label="经费落实"
|
||
|
label-position="top"
|
||
|
prop="EXPENDITURE"
|
||
|
required
|
||
|
>
|
||
|
<u-textarea
|
||
|
v-model="form.EXPENDITURE"
|
||
|
placeholder="请输入经费落实"
|
||
|
border="none"
|
||
|
auto-height
|
||
|
/>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
<u-form-item
|
||
|
label="负责人员"
|
||
|
label-position="top"
|
||
|
prop="PRINCIPAL"
|
||
|
required
|
||
|
>
|
||
|
<u-textarea
|
||
|
v-model="form.PRINCIPAL"
|
||
|
placeholder="请输入负责人员"
|
||
|
border="none"
|
||
|
auto-height
|
||
|
/>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
<u-form-item
|
||
|
label="工时安排"
|
||
|
label-position="top"
|
||
|
prop="PROGRAMMING"
|
||
|
required
|
||
|
>
|
||
|
<u-textarea
|
||
|
v-model="form.PROGRAMMING"
|
||
|
placeholder="请输入工时安排"
|
||
|
border="none"
|
||
|
auto-height
|
||
|
/>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
<u-form-item
|
||
|
label="时限要求"
|
||
|
label-position="top"
|
||
|
prop="TIMELIMITFOR"
|
||
|
required
|
||
|
>
|
||
|
<u-textarea
|
||
|
v-model="form.TIMELIMITFOR"
|
||
|
placeholder="请输入时限要求"
|
||
|
border="none"
|
||
|
auto-height
|
||
|
/>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
<u-form-item
|
||
|
label="工作要求"
|
||
|
label-position="top"
|
||
|
prop="JOBREQUIREMENT"
|
||
|
required
|
||
|
>
|
||
|
<u-textarea
|
||
|
v-model="form.JOBREQUIREMENT"
|
||
|
placeholder="请输入工作要求"
|
||
|
border="none"
|
||
|
auto-height
|
||
|
/>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
<u-form-item
|
||
|
label="其它事项"
|
||
|
label-position="top"
|
||
|
prop="OTHERBUSINESS"
|
||
|
required
|
||
|
>
|
||
|
<u-textarea
|
||
|
v-model="form.OTHERBUSINESS"
|
||
|
placeholder="请输入其它事项"
|
||
|
border="none"
|
||
|
auto-height
|
||
|
/>
|
||
|
</u-form-item>
|
||
|
<u-line />
|
||
|
<app-upload
|
||
|
:model-value="form.programmeFile"
|
||
|
label="方案照片"
|
||
|
prop="programmeFile"
|
||
|
/>
|
||
|
</block>
|
||
|
</block>
|
||
|
<view class="mt-10">
|
||
|
<u-button
|
||
|
type="primary"
|
||
|
shape="circle"
|
||
|
text="提交"
|
||
|
:throttle-time="1000"
|
||
|
@click="fnSubmit"
|
||
|
/>
|
||
|
</view>
|
||
|
</u-form>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import dayjs from "dayjs";
|
||
|
import AppHiddenView from "@/components/hiddenView/index.vue";
|
||
|
import AppTime from "@/components/time/index.vue";
|
||
|
import AppUpload from "@/components/upload/index.vue";
|
||
|
import useFormValidate from "@/utils/useFormValidate";
|
||
|
import AppDepartment from "@/components/department/index.vue";
|
||
|
import AppPersonnel from "@/components/personnel/index.vue";
|
||
|
|
||
|
export default {
|
||
|
components: {
|
||
|
AppHiddenView,
|
||
|
AppTime,
|
||
|
AppUpload,
|
||
|
AppDepartment,
|
||
|
AppPersonnel,
|
||
|
},
|
||
|
|
||
|
onLoad(query) {
|
||
|
this.hiddenId = query.HIDDEN_ID;
|
||
|
this.fnAddAcceptanceList();
|
||
|
},
|
||
|
|
||
|
data() {
|
||
|
return {
|
||
|
hiddenId: "",
|
||
|
form: {
|
||
|
IS_NORMAL: "1",
|
||
|
disposalPlan: "",
|
||
|
RECTIFYDESCR: "",
|
||
|
RECTIFICATIONTIME: "",
|
||
|
INVEST_FUNDS: "",
|
||
|
AfterRectificationFile: [],
|
||
|
HAVESCHEME: "0",
|
||
|
GOVERNSTANDARDS: "",
|
||
|
GOVERNMETHOD: "",
|
||
|
EXPENDITURE: "",
|
||
|
PRINCIPAL: "",
|
||
|
PROGRAMMING: "",
|
||
|
TIMELIMITFOR: "",
|
||
|
JOBREQUIREMENT: "",
|
||
|
OTHERBUSINESS: "",
|
||
|
programmeFile: [],
|
||
|
},
|
||
|
acceptanceList: [],
|
||
|
rules: {
|
||
|
IS_NORMAL: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请选择是否正常整改",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
disposalPlan: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请输入无法整改原因",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
RECTIFYDESCR: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请输入隐患整改详细描述",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
RECTIFICATIONTIME: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请选择整改日期",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
INVEST_FUNDS: {
|
||
|
type: "number",
|
||
|
required: true,
|
||
|
message: "请输入投入资金",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
AfterRectificationFile: {
|
||
|
type: "array",
|
||
|
required: true,
|
||
|
message: "请上传整改后照片",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
HAVESCHEME: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请选择是否有整改方案",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
GOVERNSTANDARDS: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请输入治理标准",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
GOVERNMETHOD: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请输入治理方法",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
EXPENDITURE: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请输入经费落实",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
PRINCIPAL: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请输入负责人员",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
PROGRAMMING: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请输入工时安排",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
TIMELIMITFOR: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请输入时限要求",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
JOBREQUIREMENT: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请输入工作要求",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
OTHERBUSINESS: {
|
||
|
type: "string",
|
||
|
required: true,
|
||
|
message: "请输入其它事项",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
programmeFile: {
|
||
|
type: "array",
|
||
|
required: true,
|
||
|
message: "请上传方案照片",
|
||
|
trigger: ["blur", "change"],
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
},
|
||
|
|
||
|
mounted() {},
|
||
|
|
||
|
methods: {
|
||
|
/** 添加验收列表的方法 */
|
||
|
fnAddAcceptanceList() {
|
||
|
this.acceptanceList.push({
|
||
|
DEPARTMENT_NAME: "",
|
||
|
DEPARTMENT_ID: "",
|
||
|
USER_NAME: "",
|
||
|
USER_ID: "",
|
||
|
id: uni.$u.guid(20),
|
||
|
});
|
||
|
},
|
||
|
/** 提交按钮方法 */
|
||
|
async fnSubmit() {
|
||
|
await useFormValidate(this.$refs.formRef);
|
||
|
for (let i = 0; i < this.acceptanceList.length; i++) {
|
||
|
if (
|
||
|
this.acceptanceList[i].DEPARTMENT_NAME ||
|
||
|
this.acceptanceList[i].USER_NAME
|
||
|
) {
|
||
|
uni.showToast({
|
||
|
icon: "none",
|
||
|
title: "请选择部门人员",
|
||
|
});
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
fnConfirmEmit({ mode, value }) {
|
||
|
if (mode === "datetime") {
|
||
|
this.form = {
|
||
|
...this.form,
|
||
|
RECTIFICATIONTIME: dayjs(value).format("YYYY-MM-DD HH:mm"),
|
||
|
};
|
||
|
} else if (mode === "date") {
|
||
|
this.form = {
|
||
|
...this.form,
|
||
|
RECTIFICATIONTIME: dayjs(value).format("YYYY-MM-DD"),
|
||
|
};
|
||
|
} else if (mode === "year-month") {
|
||
|
this.form = {
|
||
|
...this.form,
|
||
|
RECTIFICATIONTIME: dayjs(value).format("YYYY-MM"),
|
||
|
};
|
||
|
}
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
</script>
|
||
|
|
||
|
<style scoped lang="scss"></style>
|