| | |
| | | icon='reload' |
| | | style='margin-left: 8px' |
| | | >重置</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导入</a-button> |
| | | <a-upload |
| | | name="file" |
| | | :showUploadList="false" |
| | | :multiple="false" |
| | | :headers="tokenHeader" |
| | | :action="importExcelUrl" |
| | | @change="handleImportExcel" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | icon="import" |
| | | >导入</a-button> |
| | | </a-upload> |
| | | </div> |
| | | |
| | |
| | | dataIndex: 'num', |
| | | }, |
| | | { |
| | | title: '标准类型', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceTypeName', |
| | | }, |
| | | { |
| | | title: '签审状态', |
| | | align: 'center', |
| | | dataIndex: 'approvalStatusName', |
| | |
| | | align: 'center', |
| | | dataIndex: 'useDepartName', |
| | | }, |
| | | { |
| | | title: '派工方式', |
| | | align: 'center', |
| | | dataIndex: 'assignModeName', |
| | | }, |
| | | |
| | | { |
| | | title: '责任班组', |
| | | align: 'center', |
| | |
| | | }, |
| | | methods: { |
| | | searchQuery() { |
| | | this.queryParam = { type: "daily", delFlag: '0', useId: this.useId }; |
| | | this.queryParam = { type: "daily", delFlag: '0', useId: this.useId, maintenanceType: '3' }; |
| | | this.loadData(1); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = { type: "daily", delFlag: '0', useId: this.useId }; |
| | | this.queryParam = { type: "daily", delFlag: '0', useId: this.useId, maintenanceType: '3' }; |
| | | this.loadData(1) |
| | | }, |
| | | list(useId) { |
| | | this.visible = true; |
| | | this.useId = useId; |
| | | this.queryParam = { type: "daily", delFlag: '0', useId: useId, versionStatus: '2' }; |
| | | this.queryParam = { type: "daily", delFlag: '0', useId: useId, versionStatus: '2', maintenanceType: '3' }; |
| | | this.loadData(1); |
| | | }, |
| | | clickThenCheck(record) { |
| | |
| | | }, |
| | | methods: { |
| | | searchQuery() { |
| | | this.queryParam = { type: "daily", delFlag: '0', useId: this.useId }; |
| | | this.queryParam = { type: "daily", delFlag: '0', useId: this.useId, maintenanceType: '2' }; |
| | | this.loadData(1); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = { type: "daily", delFlag: '0', useId: this.useId }; |
| | | this.queryParam = { type: "daily", delFlag: '0', useId: this.useId, maintenanceType: '2' }; |
| | | this.loadData(1) |
| | | }, |
| | | list(useId) { |
| | | this.visible = true; |
| | | this.useId = useId; |
| | | this.queryParam = { type: "daily", delFlag: '0', useId: useId, versionStatus: '2' }; |
| | | this.queryParam = { type: "daily", delFlag: '0', useId: useId, versionStatus: '2', maintenanceType: '2' }; |
| | | this.loadData(1); |
| | | }, |
| | | clickThenCheck(record) { |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="保养类型" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请选择保养类型'" |
| | | :triggerChange="true" |
| | | dictCode="maintenance_type" |
| | | v-decorator="['maintenanceType', validatorRules.maintenanceType]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!-- <a-col :span="12"> |
| | | <a-form-item |
| | | label="派工方式" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | |
| | | v-decorator="['assignMode', validatorRules.assignMode]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-col> --> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="版本" |
| | |
| | | > |
| | | <div :key="col.dataIndex"> |
| | | |
| | | <a-select |
| | | <!-- <a-select |
| | | v-if="col.dataIndex == 'maintenanceCycleId'" |
| | | :value="text" |
| | | :options="record.maintenanceCycles" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | style="width: 100%" |
| | | :disabled="false" |
| | | /> |
| | | /> --> |
| | | <a-textarea |
| | | :value="text" |
| | | v-if="col.dataIndex == 'maintenanceRequire'" |
| | |
| | | // scopedSlots: { customRender: 'location' }, |
| | | // width: 150, |
| | | }, |
| | | { |
| | | title: '周期', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceCycleId', |
| | | scopedSlots: { customRender: 'maintenanceCycleId' }, |
| | | width: 150, |
| | | }, |
| | | // { |
| | | // title: '周期', |
| | | // align: 'center', |
| | | // dataIndex: 'maintenanceCycleId', |
| | | // scopedSlots: { customRender: 'maintenanceCycleId' }, |
| | | // width: 150, |
| | | // }, |
| | | { |
| | | title: '保养角色', |
| | | align: 'center', |
| | |
| | | { required: true, message: '请选择设备!' }, |
| | | ] |
| | | }, |
| | | assignMode: { |
| | | maintenanceType: { |
| | | rules: [ |
| | | { required: true, message: '请选择派工方式!' }, |
| | | { required: true, message: '请选择保养类型!' }, |
| | | ] |
| | | }, |
| | | version: { |
| | |
| | | maintenanceRequire: data[i].maintenanceRequire, |
| | | workingHourQuota: data[i].workingHourQuota, |
| | | // upload: this.upload, |
| | | maintenanceCycles: this.maintenanceCycles, |
| | | // maintenanceCycles: this.maintenanceCycles, |
| | | }) |
| | | |
| | | // let formData = {}; |
| | |
| | | that.dataSource = temp; |
| | | } |
| | | that.$nextTick(() => { |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'departId', 'teamId', 'equipmentId', 'equipmentName', 'useDepartName', 'useId', 'teamName', 'assignMode', 'version', 'remark')); |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'departId', 'teamId', 'equipmentId', 'equipmentName', 'useDepartName', 'useId', 'maintenanceType', 'teamName', 'version', 'remark')); |
| | | }); |
| | | if (record.id) { |
| | | this.maintenanceCycles = [] |
| | | this.getMaintenanceCycle(this.model.equipmentId) |
| | | // this.maintenanceCycles = [] |
| | | // this.getMaintenanceCycle(this.model.equipmentId) |
| | | this.codeDisable = true; |
| | | that.$nextTick(() => { |
| | | if (that.isRevise) { |
| | |
| | | |
| | | onEquipmentList() { |
| | | let data = this.form.getFieldsValue(['departId']); |
| | | if (data.departId == null || data.departId == "") { |
| | | this.$message.warning("请先选择使用部门!"); |
| | | return |
| | | } |
| | | // if (data.departId == null || data.departId == "") { |
| | | // this.$message.warning("请先选择使用部门!"); |
| | | // return |
| | | // } |
| | | this.$refs.EquipmentList.list(data.departId); |
| | | this.$refs.EquipmentList.title = "选择设备信息"; |
| | | }, |
| | | sendEquipmentRecord(data) { |
| | | this.dataSource = []; |
| | | let record = data.record; |
| | | this.getMaintenanceCycle(record.id) |
| | | // this.getMaintenanceCycle(record.id) |
| | | this.form.setFieldsValue({ equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model, teamId: record.teamId, teamName: record.teamId_dictText }); |
| | | |
| | | }, |