linwenxin 1 gadu atpakaļ
vecāks
revīzija
80857153d8

+ 23 - 12
src/views/engineeringMaintenance/applicationWithoutFee/index.vue

@@ -48,6 +48,7 @@ export default {
         'selection-change': this.selectionChange
       },
       formData: {
+        examineStatus_cp:"",
         examineStatus: "",
         examineRemark: "",
       },
@@ -79,7 +80,7 @@ export default {
         md: 24,
         options: [{ value: "OK", label: "审批通过" }, { value: "FAIL", label: "审批驳回" }],
         attributes: { disabled: this.openType == 0 },
-        formItemAttributes: { label: '审批状态', prop: 'examineStatus', rules: [...required] },
+        formItemAttributes: { label: '审批状态', prop: 'examineStatus_cp', rules: [...required] },
       }, {
         name: 'el-input',
         md: 24,
@@ -88,6 +89,12 @@ export default {
       }]
     }
   },
+	created(){
+		if(this.$route.query.id){
+			this.formType = 0
+			this.getDetail(this.$route.query.id)
+		}
+	},
   methods: {
     // 列表请求函数
     getList(p, cb) {
@@ -119,20 +126,24 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
-
+		
+	getDetail(id){
+		enginMaterialDetail({
+		  id
+		}).then(res => {
+		  this.openType = 0
+		  this.formData = res.data
+		  this.$nextTick(() => {
+		    this.formBool = true
+		  })
+		})
+	},
+		
     operation() {
       return this.operationBtn({
         detail: {
           click: ({ row, index, column }) => {
-            enginMaterialDetail({
-              id: row.orderId
-            }).then(res => {
-              this.openType = 0
-              this.formData = res.data
-              this.$nextTick(() => {
-                this.formBool = true
-              })
-            })
+            this.getDetail(row.orderId)
           }
         },
         examine: {
@@ -165,7 +176,7 @@ export default {
         if (valid) {
           enginMaterialExamine({
             id: this.formData.orderId,
-            examineStatus: this.formData.examineStatus,
+            examineStatus: this.formData.examineStatus_cp,
             examineRemark: this.formData.examineRemark
           }).then(res => {
             this.$refs.pageRef.refreshList()

+ 14 - 12
src/views/workOrder/workOrderPool/components/reassignment/index.vue

@@ -41,7 +41,7 @@ export default {
         orderWorkers: [],
         recordSelected: []
       },
-      isAllWebsit:true
+      isAllWebsit: true
     }
   },
   computed: {
@@ -70,17 +70,19 @@ export default {
   methods: {
     allVerify() {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
-        changeOrderChangeWorker({
-          ids: this.orderInfo.recordSelected.map(item => item.id),
-          websitId: this.orderInfo.websitId,
-          workerIds: this.orderInfo.orderWorkers.map(item => item.workerId),
-        }).then(res => {
-          this.$message({
-            type: 'success',
-            message: '派单成功!'
+        if (valid) {
+          changeOrderChangeWorker({
+            ids: this.orderInfo.recordSelected.map(item => item.id),
+            websitId: this.orderInfo.websitId,
+            workerIds: this.orderInfo.orderWorkers.map(item => item.workerId),
+          }).then(res => {
+            this.$message({
+              type: 'success',
+              message: '派单成功!'
+            })
+            this.$emit("close")
           })
-          this.$emit("close")
-        })
+        }
       })
     },
   }
@@ -92,7 +94,7 @@ export default {
   box-sizing: border-box;
   padding-left: 16px;
 
-  ::v-deep & > .zj-page-fill-scroll {
+  ::v-deep &>.zj-page-fill-scroll {
     box-sizing: border-box;
     padding-right: 16px;
 

+ 13 - 11
src/views/workOrder/workOrderPool/components/reschedule/index.vue

@@ -78,17 +78,19 @@ export default {
   methods: {
     allVerify() {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
-        changeOrderChangeAppointmentTime({
-          ids: this.orderInfo.recordSelected.map(item => item.id),
-          appointmentTime: this.orderInfo.appointmentTime,
-          appointmentEndTime: this.orderInfo.appointmentTime
-        }).then(res => {
-          this.$message({
-            type: 'success',
-            message: '约单成功!'
+        if (valid) {
+          changeOrderChangeAppointmentTime({
+            ids: this.orderInfo.recordSelected.map(item => item.id),
+            appointmentTime: this.orderInfo.appointmentTime,
+            appointmentEndTime: this.orderInfo.appointmentTime
+          }).then(res => {
+            this.$message({
+              type: 'success',
+              message: '约单成功!'
+            })
+            this.$emit("close")
           })
-          this.$emit("close")
-        })
+        }
       })
     },
   }
@@ -100,7 +102,7 @@ export default {
   box-sizing: border-box;
   padding-left: 16px;
 
-  ::v-deep & > .zj-page-fill-scroll {
+  ::v-deep &>.zj-page-fill-scroll {
     box-sizing: border-box;
     padding-right: 16px;