zouzhd 3 anos atrás
pai
commit
f975d855e6

+ 1 - 1
build/utils.js

@@ -16,7 +16,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 let devModules = ['all'];
-// let devModules = ['index','sale','statisticalReport','appoint','RMS'];
+// let devModules = ['index','sale','statisticalReport','appoint','TMS'];
 // let devModules = ['index','appoint','TMS'];
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;

+ 1 - 1
config/index.js

@@ -58,7 +58,7 @@ let proxyTable = {
   "/api/v1": {
     target: "http://172.16.33.166:8080",
     // target: "http://172.16.33.162:8019",
-    // target: "http://192.168.1.109:8019",
+    // target: "http://localhost:8019",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 2 - 2
src/components/DilCommonUI/packages/table/src/table.js

@@ -109,8 +109,8 @@ export default {
     },
     // 刷新表头显示数据
     refreshColumnData(columnData) {
-      // 表头只赋值一次
-      if (this.dataColumnData.length > 0) return;
+      // 表头只赋值一次(在查出全部数据的情况下才只赋值一次)
+      // if (this.dataColumnData.length > 0) return;
 
       // 如果前端有写表头,则加在后端表头前面
       const d = this.columnData.concat(columnData);

+ 3 - 3
src/views/TMS/components/purchaseChemicalMaterials/transportationReservationAdd.vue

@@ -325,9 +325,9 @@ export default {
               this.purchaseOrderId = res.data.data.purchaseOrderId;
               this.purchaseOrderNo=res.data.data.purchaseOrderNo;
               if (res.data.data.receiveUnitId == 1) {
-                this.orderType = 6;
+                this.orderType = 17;
               } else {
-                this.orderType = 7;
+                this.orderType = 18;
               }
             }
           } else {
@@ -530,7 +530,7 @@ export default {
               message: "添加成功!",
               type: "success",
             });
-            this.$router.push("/transportReserveRan");
+            this.$router.push("/transportationReservation");
           }
         });
       }

+ 37 - 7
src/views/appoint/components/saleContract/addSaleOrderArrange.vue

@@ -87,6 +87,7 @@
                   class="textinput1"
                   placeholder="(必填)"
                   v-model.number="scope.row.cxh"
+                  @change="updateArragneCxh(scope.row.cxh)"
                 ></el-input>
               </template>
               <!-- 收货地址id -->
@@ -156,12 +157,11 @@
 
             <el-input
             style="width: 50px;"
-              placeholder="(非必填)"
               v-model.number="scope.row.arragneCount"
             ></el-input>
 
             <el-button
-              @click="deleteRow(scope.$index)"
+              @click="deleteRow(scope.$index,scope.row)"
               type="text"
               icon="el-icon-close"
               size="big"
@@ -354,17 +354,25 @@ export default {
       this.row.index = index;
       this.drawer = true;
     },
+    //修改输入框中的车序号,自动获取车序号最大值
+    updateArragneCxh(cxh){
+      if(this.arragneCxh<cxh){
+          this.arragneCxh = ++cxh;
+      }
+    },
     //复制多条的方法
     copyRow(index,row){
       let arr = [];
       for(var i = 0 ;i<this.selectionList.length; i++){
         if(i == index){
           arr.push(this.selectionList[i]);
+          //车序号自增
+          var cxhStart = row.cxh;
           for(var j = 0;j<this.selectionList[i].arragneCount; j++){
             arr.push({
             Specification:row.Specification,
             arragneCount:this.arragneCount,
-            cxh:row.cxh,
+            cxh:++cxhStart,
             materialName:row.materialName,
             orderPlanWeight:row.orderPlanWeight,
             saleDateOfReceipt:row.saleDateOfReceipt,
@@ -376,6 +384,10 @@ export default {
           })
 
           }
+          //确定车序号最大值并赋值给初始化车序号
+          if(this.arragneCxh<cxhStart){
+            this.arragneCxh = ++cxhStart;
+          }
         }else{
           arr.push(this.selectionList[i]);
         }
@@ -384,8 +396,28 @@ export default {
       this.selectionList = arr;
     },
     //点击删除按钮删除当前点击的对象
-    deleteRow(index){
-      this.selectionList.splice(index,1)
+    deleteRow(index,row){
+      //统计与当前最大车序号相等的车序号
+      var equalArragneCxh = 0;
+      //若为最后一个删除对象,初始化this.arragneCxh的值
+      if(this.selectionList.length==1){
+        this.arragneCxh = 1;
+      }else{
+        for(var i = 0 ;i<this.selectionList.length; i++){
+          if(this.selectionList[i].cxh==this.arragneCxh){
+            equalArragneCxh++;
+          }
+        }
+        //判断是否要减小最大车序号数
+        if(equalArragneCxh==0){
+          if((this.arragneCxh-1)==row.cxh){
+          this.arragneCxh=row.cxh;
+          }
+        }
+      }
+      
+      //删除当前点击的对象
+      this.selectionList.splice(index,1);
     },
     //监听模态框点击事件
     currentRadioChange1(radioList) {
@@ -471,8 +503,6 @@ export default {
           arragneCount : this.arragneCount,
         };
         this.selectionList.push(addmap);
-        //车序号自增
-        this.arragneCxh++;
       });
       this.selectionList1 = [];
       this.table = false;