Selaa lähdekoodia

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-aps into dengfei

695593266@qq.com 9 kuukautta sitten
vanhempi
commit
2a8f0a2b2c

+ 1 - 1
src/views/saleOrder/components/order-detail.vue

@@ -173,7 +173,7 @@
           {{ form.businessInfo.customerName }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template slot="label"> 客户代 </template>
+          <template slot="label"> 客户代 </template>
           {{ form.businessInfo.customerCode }}
         </el-descriptions-item>
         <el-descriptions-item>

+ 12 - 3
src/views/saleOrder/components/plan-submit.vue

@@ -6,7 +6,14 @@
     append-to-body
   >
     <div class="main_container">
-      <el-descriptions title="" :column="3" size="medium" border label-class-name="title-col"  content-class-name="title-col">
+      <el-descriptions
+        title=""
+        :column="3"
+        size="medium"
+        border
+        label-class-name="title-col"
+        content-class-name="title-col"
+      >
         <el-descriptions-item>
           <template slot="label"> 计划编号 </template>
           {{ info.code }}
@@ -96,6 +103,8 @@
 <script>
   import { getCode } from '@/api/codeManagement';
   import dictMixins from '@/mixins/dictMixins';
+  import { debounce } from 'lodash';
+
   export default {
     mixins: [dictMixins],
     props: {
@@ -133,10 +142,10 @@
         this.loading = false;
       },
 
-      submit(type) {
+      submit: debounce(function (type) {
         this.$emit('publish', type);
         this.visible = false;
-      }
+      }, 800)
     }
   };
 </script>

+ 19 - 9
src/views/saleOrder/salesToProductionNewTwo.vue

@@ -1037,7 +1037,7 @@
       },
       async getProducedData() {
         console.log(111111111111111);
-        let query = {...this.$route.query };
+        let query = { ...this.$route.query };
         console.log(query, 'query');
 
         if (!query.producedList || query.producedList.length == 0) {
@@ -1052,7 +1052,7 @@
       },
       // 初始化时间赋值
       initTime() {
-        let data = {...this.$route.query };
+        let data = { ...this.$route.query };
         if (data.startTime) {
           this.$set(this.form, 'startTime', data.startTime);
         }
@@ -1182,7 +1182,7 @@
           if (res.length) {
             let o = res[0];
             if (type == 'init') {
-              let query = {...this.$route.query };
+              let query = { ...this.$route.query };
               let id = query.bomCategoryId ? query.bomCategoryId : o.id;
               this.$set(this.form, 'bomCategoryId', id);
             } else {
@@ -1210,7 +1210,7 @@
         this.form.produceVersionName = '';
         this.selectionRowShow = false; // ****
         if (type == 'init') {
-          let queryD = {...this.$route.query };
+          let queryD = { ...this.$route.query };
           if (queryD.produceRoutingId && !queryD.bomCategoryId) {
             this.form.produceRoutingName = queryD.produceRoutingName;
             this.form.produceRoutingId = queryD.produceRoutingId;
@@ -1261,8 +1261,15 @@
             res.produceRoutingName || this.$route.query.produceRoutingName;
           this.form.produceRoutingId =
             res.produceRoutingId || this.$route.query.produceRoutingId;
-          this.form.factoriesId =
-            res.factoriesId || this.$route.query.factoriesId;
+
+          if (
+            !this.form.factoriesId &&
+            (res.produceRoutingId || this.$route.query.produceRoutingId)
+          ) {
+            this.form.factoriesId =
+              res.factoriesId || this.$route.query.factoriesId;
+          }
+
           // this.form.produceType =
           //   res.produceType || this.$route.query.produceType
           //     ? parseInt(this.$route.query.produceType)
@@ -1344,8 +1351,9 @@
         this.$emit('cancel');
       },
       toSubmit() {
-        if (!this.form.factoriesId)
+        if (!this.form.factoriesId) {
           return this.$message.warning('请选择所属工厂');
+        }
         this.form.salesOrders.map((v) => {
           let arrTime = v.deliveryTime && v.deliveryTime.split(' ');
           let arrTimeTow =
@@ -1526,7 +1534,7 @@
         this.changeData();
       },
       addEquipment() {
-        let query = {...this.$route.query };
+        let query = { ...this.$route.query };
         let orderType = query.orderType;
         let arr = this.form.salesOrders;
         if (arr && arr.length > 0) {
@@ -1758,7 +1766,9 @@
                   .catch(() => {
                     this.$message.error('发布失败,请重新发布!');
                   });
-              } catch (error) {}
+              } catch (error) {
+                this.$message.error(error.message || '发布失败,请重新发布!');
+              }
 
               loading.close();
             }