diff --git a/src/views/device/repairOrder/index.vue b/src/views/device/repairOrder/index.vue
index df17742..8623238 100644
--- a/src/views/device/repairOrder/index.vue
+++ b/src/views/device/repairOrder/index.vue
@@ -1055,7 +1055,7 @@
-
+
@@ -1069,7 +1069,7 @@
-
+
@@ -1275,6 +1275,7 @@
@@ -1397,7 +1398,7 @@
-
+
@@ -1429,6 +1430,7 @@
:optType="optType"
:workCode="form.workCode"
:equipmentCode="form.equipmentCode"
+ :workStatus="form.workStatus"
v-if="form.workCode != null"
>
@@ -1991,34 +1993,51 @@ export default {
},
/** 提交填写维修记录按钮 */
submitWriteForm() {
- if (Array.isArray(this.form.afterRepairFile)) {
- this.form.afterRepairFile = this.listToString(
- this.form.afterRepairFile
- );
- }
-
- if (this.form.faultType != null) {
- this.form.faultType = this.form.faultType.join(",");
- }
-
- console.log(this.form.faultType);
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.workId != null) {
- this.form.standardList = this.detailList;
- //每个检查项
- this.form.standardList.forEach((item) => {
- if (Array.isArray(item.picturePath)) {
- item.picturePath = this.listToString(item.picturePath);
+ if (this.form.workStatus == null || this.form.workStatus == "") {
+ Message.warning("维修状态不能为空");
+ } else if (
+ this.form.workPerson == null ||
+ this.form.workPerson == ""
+ ) {
+ Message.warning("维修人员不能为空");
+ } else if (
+ this.form.workStartTime == null ||
+ this.form.workStartTime == ""
+ ) {
+ Message.warning("维修开始时间不能为空");
+ } else if (
+ this.form.workEndTime == null ||
+ this.form.workEndTime == ""
+ ) {
+ Message.warning("维修结束时间不能为空");
+ } else {
+ if (Array.isArray(this.form.afterRepairFile)) {
+ this.form.afterRepairFile = this.listToString(
+ this.form.afterRepairFile
+ );
}
- });
- console.log(this.form.standardList);
- writeRepairOrder(this.form).then((response) => {
- this.openWrite = false;
- this.$modal.msgSuccess("填写维修记录成功!");
- this.queryParams.workStatus = null;
- this.getList();
- });
+
+ if (this.form.faultType != null) {
+ this.form.faultType = this.form.faultType.join(",");
+ }
+
+ this.form.standardList = this.detailList;
+ //每个检查项
+ this.form.standardList.forEach((item) => {
+ if (Array.isArray(item.picturePath)) {
+ item.picturePath = this.listToString(item.picturePath);
+ }
+ });
+ writeRepairOrder(this.form).then((response) => {
+ this.openWrite = false;
+ this.$modal.msgSuccess("填写维修记录成功!");
+ this.queryParams.workStatus = null;
+ this.getList();
+ });
+ }
}
}
});
@@ -2139,10 +2158,6 @@ export default {
margin-left: 452px;
}
-.step-body {
- margin-top: 30px;
-}
-
.standardUrl_body {
height: 400px;
overflow-y: auto;
diff --git a/src/views/device/repairOrder/selectSpareParts.vue b/src/views/device/repairOrder/selectSpareParts.vue
index 74d2a4b..0fd786a 100644
--- a/src/views/device/repairOrder/selectSpareParts.vue
+++ b/src/views/device/repairOrder/selectSpareParts.vue
@@ -8,6 +8,7 @@
icon="el-icon-plus"
size="mini"
@click="handleSelectSparePartsLedger"
+ v-if = "this.queryParams.workStatus != '1' "
v-hasPermi="['device:sparePartsApplicationRecord:add']"
>新增
@@ -24,11 +25,13 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
+ v-if = "this.queryParams.workStatus != '1' "
v-hasPermi="['device:sparePartsApplicationRecord:remove']"
>删除
@@ -169,6 +172,7 @@ export default {
pageSize: 10,
workCode: this.workCode,
equipmentCode: this.equipmentCode,
+ workStatus:this.workStatus,
applyType: null,
applyCode: null,
spareCode: null,
@@ -196,6 +200,7 @@ export default {
equipmentCode: undefined,
workCode: undefined,
optType: undefined,
+ workStatus: undefined,
},
created() {
this.getList();