695593266@qq.com 3 mesiacov pred
rodič
commit
4aa7bde7a4

+ 3 - 1
src/views/produce/components/workPlan/details.vue

@@ -572,6 +572,8 @@
           this.infoList.map((item) => {
             obj[item.prop] = res[item.prop];
           });
+          // 质检类型需要参与视图判断(如执行部门 / 执行班组切换),单独挂到 form 上
+          obj.qualityType = res.qualityType;
           this.form = obj;
           this.form.status = res.status;
           this.form.qualityWorkOrderDetailVO = res.qualityWorkOrderDetailVO;
@@ -618,7 +620,7 @@
         this.sourceData1 = res.qualityInventoryList || [];
         this.taskMonadList = res.taskMonadList || [];
         this.requestEntrustList = res.requestEntrustList || [];
-        let name = this.$route.query.name;
+        let name = '工单';
         // const result = name == '计划' ? res.qualityWorkOrderDetailVO : res;
         let result = {};
         if (name == '计划') {

+ 6 - 18
src/views/produce/components/workPlan/edit.vue

@@ -1132,17 +1132,13 @@
       },
       async getDetail(id) {
         getById(id).then((res) => {
+          console.log(res.data, 'res.data');
           if (res.data.jobList?.length == 1) {
             res.data.executeJobId = res.data.jobList[0].id;
             res.data.executeJobName = res.data.jobList[0].name;
-
-            // this.execute = res.data.jobList[0].userVOList;
           }
           this.form = res.data;
-          console.log(this.form.qualityResults, '返回的结果');
-          this.form.executeUserIdList = this.form.executeUserId
-            ? this.form.executeUserId.split(',')
-            : [];
+
           console.log(this.form, 'this.form');
           this.form.executeUserIdList = this.form.executeUserId
             ? this.form.executeUserId.split(',')
@@ -1531,17 +1527,7 @@
           if (!valid) {
             return false;
           }
-          // this.loading = true;
-          // let URL =
-          //   this.type == 'add' ? save : this.type == 'edit' ? update : '';
-
-          // this.form.qualityTimeStart = this.qualityTimeStart;
-          // this.form.qualityId = this.form.qualityIdList.join(',');
 
-          // delete this.form['qualityTimeEnd'];
-
-          // this.form.executeUserId = '';
-          // this.form.executeUserName = '';
           let URL =
             this.type == 'add' ? save : this.type == 'edit' ? update : '';
 
@@ -1758,8 +1744,8 @@
               this.form.executeUserIdList.length > 1
                 ? this.form.executeUserName +
                   ',' +
-                  this.$store.state.user.info.userName
-                : this.$store.state.user.info.userName;
+                  this.$store.state.user.info.name
+                : this.$store.state.user.info.name;
           }
           this.form.executeUserId = this.form.executeUserIdList.join(',');
 
@@ -1780,6 +1766,8 @@
           exeReportWork(params)
             .then((msg) => {
               this.loading = false;
+              console.log(params, 'paramsparams');
+
               this.restForm();
               this.$message.success(msg);
               this.visible = false;

+ 2 - 2
vue.config.js

@@ -32,10 +32,10 @@ module.exports = {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
         // target: 'http://124.71.68.31:50001',
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.251:18186',
-        // target: 'http://192.168.1.251:18086', // 开发环境
+        target: 'http://192.168.1.251:18086', // 开发环境
         // target: 'http://192.168.1.103:18086',192.168.1.116
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.30:18086',