| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="点检计划编码" |
| | | label="点检方案编码" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请输入点检计划编码'" |
| | | :placeholder="disableSubmit?'':'请输入点检方案编码'" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="对象部门" |
| | | label="使用部门" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <!-- <a-select |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请选择对象部门'" |
| | | :placeholder="disableSubmit?'':'请选择使用部门'" |
| | | :options="this.departs" |
| | | style="width: 100%" |
| | | v-decorator="['departId', validatorRules.departId]" |
| | |
| | | /> --> |
| | | <a-input-search |
| | | :disabled="disableSubmit" |
| | | placeholder="请选择对象部门" |
| | | placeholder="请选择使用部门" |
| | | enter-button |
| | | @search="onDepartList()" |
| | | :read-only="true" |
| | |
| | | > |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="对象部门Id" |
| | | label="使用部门Id" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请输入对象部门id'" |
| | | :placeholder="disableSubmit?'':'请输入使用部门id'" |
| | | v-decorator="['departId', validatorRules.departId ]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | dataIndex: 'version', |
| | | }, |
| | | { |
| | | title: '设备编码', |
| | | title: '统一编码', |
| | | align: 'center', |
| | | dataIndex: 'equipmentNum' |
| | | }, |
| | |
| | | form: this.$form.createForm(this), |
| | | headers: {}, |
| | | validatorRules: { |
| | | num: { |
| | | rules: [ |
| | | { required: true, message: '请输入点检计划编码!' }, |
| | | ] |
| | | }, |
| | | // num: { |
| | | // rules: [ |
| | | // { required: true, message: '请输入点检计划编码!' }, |
| | | // ] |
| | | // }, |
| | | inspectionCycleId: { |
| | | rules: [ |
| | | { required: true, message: '请选择点检周期!' }, |
| | |
| | | }, |
| | | useDepartName: { |
| | | rules: [ |
| | | { required: true, message: '请选择对象部门!' }, |
| | | { required: true, message: '请选择使用部门!' }, |
| | | ] |
| | | }, |
| | | assignMode: { |
| | |
| | | listByBusIdAndBusType: "/system/sysUploadRela/listByBusIdAndBusType", |
| | | getInspectionCycle: "/eam/inspectionStandardDetail/getInspectionCycle", |
| | | // getSysDeparts: "/eam/specialtyInspectionPlan/getSysDeparts", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | dataSource: [], |
| | | //用于展示文件 |
| | |
| | | selectInspectionProjects: function () { |
| | | let dataDepartId = this.form.getFieldsValue(['departId']); |
| | | if (dataDepartId.departId == "" || dataDepartId.departId == null || dataDepartId.departId == undefined) { |
| | | this.$message.warning("请选择对象部门!"); |
| | | this.$message.warning("请选择使用部门!"); |
| | | return |
| | | } |
| | | let data = this.form.getFieldsValue(['inspectionCycleId']); |
| | |
| | | for (let i = 0; i < this.dataSource.length; i++) { |
| | | ids.push(this.dataSource[i].specialtyInspectionStandardId); |
| | | } |
| | | debugger |
| | | let departId = dataDepartId.departId; |
| | | let inspectionCycleId = data.inspectionCycleId; |
| | | this.$refs.specialtyInspectionStandardModalForm.showModals(ids, departId, inspectionCycleId); |
| | |
| | | handleOk() { |
| | | const that = this; |
| | | // 触发表单验证 |
| | | that.form.validateFields((err, values) => { |
| | | that.form.validateFields(async (err, values) => { |
| | | if (JSON.stringify(that.fileObject.file) == '{}' && that.uploadId == '' && that.fileList.length == 0) { |
| | | that.$message.warning("请上传文件"); |
| | | return false |
| | |
| | | method = 'put'; |
| | | } |
| | | let formData = Object.assign(that.model, values); |
| | | |
| | | if(!formData.num){ |
| | | await getAction(this.url.getNum, { type: 'SpecialtyInspectionPlan', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | formData.num = res.message; |
| | | } |
| | | }); |
| | | } |
| | | formData.type = "inspection_path_photo"; |
| | | formData.uploadId = that.uploadId; |
| | | formData.fileType = "7";//文件类型 7:图片 |
| | |
| | | |
| | | onDepartList() { |
| | | this.$refs.DepartList.list(); |
| | | this.$refs.DepartList.title = "选择对象部门"; |
| | | this.$refs.DepartList.title = "选择使用部门"; |
| | | }, |
| | | sendDepartRecord(data) { |
| | | this.dataSource = []; |