Forráskód Böngészése

发运明细字段调整

jbb 2 éve
szülő
commit
f99fce054d

+ 7 - 8
src/views/packing-list/packinglist-clothes/clothesAddDrawer.vue

@@ -721,16 +721,15 @@ export default {
                   this.$message.error(res.message)
               }
               })
-            }else {
+              }else {
                addSpltList(newObj).then(res => {
-               debugger
-               if (res.success) {
-                  this.$message.success('新增成功')
-                  this.close()
+                  if (res.success) {
+                    this.$message.success('新增成功')
+                    this.close()
                   //清空信息
-                  newObj = {};
-                  that.fatherList() // 调用父组件 查询方法
-               }else{
+                    newObj = {};
+                   that.fatherList() // 调用父组件 查询方法
+                  }else{
                   this.$message.error(res.message)
                }
                })

+ 151 - 165
src/views/shipment-details/addShipDetDrawer.vue

@@ -18,7 +18,7 @@
               <a-col :md="6" :sm="8">
                 <!-- required 必填项 disabled 禁用  -->
                 <a-form-model-item label="单据号" prop="documentNo">
-                  <a-input placeholder="自动生成" v-model="addShipDet.documentNo" readOnly></a-input>
+                  <a-input placeholder="自动生成" v-model="addShipDet.documentNo" ></a-input>
                 </a-form-model-item>
               </a-col>
 
@@ -35,7 +35,8 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="客户" prop="customer">
-                  <a-input placeholder="请输入客户" v-model="addShipDet.customer" readOnly></a-input>
+                  {{addShipDet.customer | ellipsis }}
+                  <!-- <a-input placeholder="请输入客户" v-model="addShipDet.customer" readOnly></a-input> -->
                 </a-form-model-item>
               </a-col>
 
@@ -61,11 +62,11 @@
                 </a-form-model-item>
               </a-col> -->
 
-              <a-col :md="6" :sm="8">
+              <!-- <a-col :md="6" :sm="8">
                 <a-form-model-item label="订单类型" prop="orderType">
                   <a-input placeholder="请输入订单类型" v-model="addShipDet.orderType" readOnly></a-input>
                 </a-form-model-item>
-              </a-col>
+              </a-col> -->
 
               <!-- <a-col :md="6" :sm="8">
                 <a-form-model-item label="成衣工厂" prop="garmentFactory">
@@ -280,9 +281,10 @@ export default {
     let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
     return {
       id: '',
+      judge : 0,
       validatorRules:{
           documentDate:[{required: true, message: '请输入单据日期!'}],
-         customer:[{required: true, message: '请输入客户!', trigger: 'change'}],
+          customer:[{required: true, message: '客户为空!', trigger: 'change'}],
          // preDeliveryDate:[{required: true, message: '请选择预发货时间!'}],
          // preCompletionDate:[{required: true, message: '请选择预完工日期!'}],
          // orderType:[{required: true, message: '请输入订单类型!'}],
@@ -474,12 +476,12 @@ export default {
           className: 'replacecolor',
            customRender: t => ellipsis(t),
         },
-        {
-          title: '汇率',
-          dataIndex: 'exchangeRate',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '汇率',
+        //   dataIndex: 'exchangeRate',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
 
         {
           title: '销售部门',
@@ -513,24 +515,24 @@ export default {
           align: 'left',
           className: 'replacecolor'
         },
-        {
-          title: '定金比例(%)',
-          dataIndex: 'depositRatio',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '定金',
-          dataIndex: 'deposit',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '协同路线',
-          dataIndex: 'collaborativeRoute',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '定金比例(%)',
+        //   dataIndex: 'depositRatio',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '定金',
+        //   dataIndex: 'deposit',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '协同路线',
+        //   dataIndex: 'collaborativeRoute',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
       
         
        
@@ -652,8 +654,8 @@ export default {
       this.manualYarnDisabled = false //初始化manualYarnDisabled
       var copyValList = JSON.parse(JSON.stringify(val));
       this.$set( this.addShipDet,'customer',copyValList[0].customerName)
+      this.$set( this.addShipDet,'orderType',copyValList[0].orderType)
       // this.addShipDet.customer = copyValList[0].customerName;
-      console.log(copyValList);
       for (var i in copyValList) {
         copyValList[i]['orderQuantity'] = copyValList[i].quantity
         copyValList[i]['orderRemainingQuantity'] = copyValList[i].surplusNum
@@ -692,7 +694,7 @@ export default {
       const that = this;
       console.log(this.addShipDet)
       // 触发表单验证
-      this.$refs.form.validate(valid => {
+      this.$refs.form.validate(async valid => {
       if (valid) {
         var newObj = {} // 新增对象
         newObj.documentNo = this.addShipDet.documentNo
@@ -706,7 +708,7 @@ export default {
         newObj.wholeOrderTotal = this.addShipDet.wholeOrderTotal
         newObj.memo = this.addShipDet.memo // U8系统适用
         newObj.syShippingDetailsItemList = this.syShippingDetailsItemList // 子表信息赋值
-
+        
         // 必须选择子表 --- 参照订单数据
         if (newObj.syShippingDetailsItemList.length == 0) {
           this.$message.error('请选择参照订单数据')
@@ -718,131 +720,10 @@ export default {
               return;
             }
           }
-          // 根据syOrderDataItemId判断重复子表id
-          for (var i=0; i<newObj.syShippingDetailsItemList.length; i++){
-            var rowData = newObj.syShippingDetailsItemList[i];
-            for (var j=i+1;j<newObj.syShippingDetailsItemList.length; j++){
-              var nextData = newObj.syShippingDetailsItemList[j];
-              if (rowData.smallPo == nextData.smallPo && rowData.orderNumber == nextData.orderNumber  && 
-              rowData.preDeliveryDate == nextData.preDeliveryDate  && rowData.preCompletionDate == nextData.preCompletionDate && 
-              rowData.itemNumber == nextData.itemNumber && rowData.inventoryCode == nextData.inventoryCode&& 
-              rowData.colour == nextData.colour&& rowData.size == nextData.size){
-                this.$message.error('第'+(i+1)+'行和第'+(j+1)+'行数据相同,无法保存');
-                return;
-              }
-            
-            
-            }
-          }
-          for(var i=0; i<newObj.syShippingDetailsItemList.length; i++){
-             var rowData = newObj.syShippingDetailsItemList[i];
-              //判断输入报关单价是否为数字
-              if(isNaN(Number(rowData.customsDeclarationUnitPrice,10)) && rowData.customsDeclarationUnitPrice){
-                this.$message.error('第'+(i+1)+'行报关单价必须为数字!');
-                return
-              }
-
-              //判断输入发货数量是否为数字
-              if(isNaN(Number(rowData.shipmentQuantity,10)) && rowData.shipmentQuantity){
-                this.$message.error('第'+(i+1)+'行发货数量必须为数字!');
-                return
-              }
-
-              //判断输入套装件数是否为数字
-              if(isNaN(Number(rowData.numberOfSets,10)) && rowData.numberOfSets){
-                this.$message.error('第'+(i+1)+'行套装件数必须为数字!');
-                return
-              }
-
-              //判断输入工厂单价是否为数字
-              if(isNaN(Number(rowData.factoryUnitPrice,10)) && rowData.factoryUnitPrice){
-                this.$message.error('第'+(i+1)+'行工厂单价必须为数字!');
-                return
-              }
-
-              //判断输入工厂单价是否为数字
-              if(isNaN(Number(rowData.manualYarnUnitPrice,10)) && rowData.manualYarnUnitPrice){
-                this.$message.error('手册纱单价必须为数字!');
-                return
-              }
-
-             //报关单价不超过四位小数
-             if(!Number.isInteger(Number(rowData.customsDeclarationUnitPrice)) && rowData.customsDeclarationUnitPrice !== '' && rowData.customsDeclarationUnitPrice !== undefined){
-              console.log(rowData.customsDeclarationUnitPrice)
-              var position = rowData.customsDeclarationUnitPrice.toString().indexOf('.') + 1;   //小数点的位置
-              var digit = rowData.customsDeclarationUnitPrice.toString().length - position;  //小数的位数
-              if(digit > 4){
-                this.$message.error('第'+(i+1)+'行报关单价超过四位小数!');
-                return 
-              }
-             }    
-             
-            //  //发货数量必须是整数
-            //  if(!Number.isInteger(Number(rowData.shipmentQuantity)) && rowData.shipmentQuantity !== '' && rowData.shipmentQuantity !== undefined){
-            //     this.$message.error('第'+(i+1)+'行发货数量不为整数!');
-            //     return
-            //  }
-             //套装件数必须为整数
-              if(!Number.isInteger(Number(rowData.numberOfSets)) && rowData.numberOfSets !== '' && rowData.numberOfSets !== undefined){
-                this.$message.error('第'+(i+1)+'行套装件数不为整数!');
-                return
-             }
-
-             //工厂单价不超过四位小数
-              if(!Number.isInteger(Number(rowData.factoryUnitPrice)) && rowData.factoryUnitPrice !== '' && rowData.factoryUnitPrice !== undefined){
-              var position = rowData.factoryUnitPrice.toString().indexOf('.') + 1;   //小数点的位置
-              var digit = rowData.factoryUnitPrice.toString().length - position;  //小数的位数
-              if(digit > 4){
-                this.$message.error('第'+(i+1)+'行工厂单价超过四位小数!');
-                return 
-              }
-             }    
-
-             //手册纱单价不超过四位小数
-              if(!Number.isInteger(Number(rowData.manualYarnUnitPrice)) && rowData.manualYarnUnitPrice !== '' && rowData.manualYarnUnitPrice !== undefined){
-              console.log(rowData.factoryUnitPrice)
-              var position = rowData.manualYarnUnitPrice.toString().indexOf('.') + 1;   //小数点的位置
-              var digit = rowData.manualYarnUnitPrice.toString().length - position;  //小数的位数
-              if(digit > 4){
-                this.$message.error('手册纱单价超过四位小数!');
-                return 
-              }
-             }   
-          }
-          //必填项
-          for (var i=0; i<newObj.syShippingDetailsItemList.length; i++){
-            var rowData = newObj.syShippingDetailsItemList[i];
-            if(rowData.purOrSubOrder == '' || !rowData.purOrSubOrder){
-                this.$message.error('第'+(i+1)+'行采购委外订单号未填!');
-                return
-            }
-            if(rowData.garmentFactory == '' || !rowData.garmentFactory){
-                this.$message.error('第'+(i+1)+'行成衣工厂未填!');
-                return
-            }
-            if(rowData.shipmentQuantity == '' || !rowData.shipmentQuantity || rowData.shipmentQuantity == 0){
-                this.$message.error('第'+(i+1)+'行发货数量未填!');
-                return
-            }
-             if(rowData.numberOfSets == '' || !rowData.numberOfSets || rowData.numberOfSets == 0){
-                this.$message.error('第'+(i+1)+'行套装件数未填!');
-                return
-             }
-              if(!rowData.hasOwnProperty("isTc") || rowData.isTc == ""){
-                this.$message.error('第'+(i+1)+'行是否TC功能未选择!');
-                return
-             }
-            // if((rowData.manualYarnFlag === 1 && !rowData.manualYarnUnitPrice) || (rowData.manualYarnFlag === 1 && rowData.manualYarnUnitPrice === '')|| (rowData.manualYarnFlag === 1 && rowData.manualYarnProportion === "0") || (rowData.manualYarnFlag === 1 && rowData.manualYarnProportion === 0) ){
-            //    this.$message.error('手册纱单价为必填项');
-            //    return
-            //  }else if((rowData.manualYarnFlag === 1 && !rowData.manualYarnProportion) || (rowData.manualYarnFlag === 1 && rowData.manualYarnProportion === '') || (rowData.manualYarnFlag === 1 && rowData.manualYarnProportion === "0") || (rowData.manualYarnFlag === 1 && rowData.manualYarnProportion === 0)){
-            //    this.$message.error('手册纱占比为必填项');
-            //    return
-            // }
-          }
-         
-          addShipmentList(newObj).then(res => {
-            if (res.success) {
+          await this.JudgeVluabled()
+           if(this.judge == 0){
+              addShipmentList(newObj).then(res => {
+              if (res.success) {
               this.$message.success('新增成功');
               this.close();
               // 清空信息
@@ -854,19 +735,15 @@ export default {
               this.$message.error(res.message);
             }
           })
+           }
+         
         }
       }else{
         return false;
       }
       });
-      
-      // const that = this
-      // // 触发表单验证
-      // this.$refs.form.validate(valid => {
-      //   if (valid) {
-      //     that.confirmLoading = true
-      //   }
-      // })
+
+
     },
     // 校验复制行数量和不能超订单,根据syOrderDataItemId判断
 
@@ -910,6 +787,115 @@ export default {
     //   this.syShippingDetailsItemList.push(addrow)
     // },
     // --------------------------------------
+
+
+     JudgeVluabled(){
+          this.judge = 0
+          for (var i=0; i<this.syShippingDetailsItemList.length;i++){
+             var tableRow = this.syShippingDetailsItemList[i];
+             for (var j=i+1;j<this.syShippingDetailsItemList.length; j++){
+              var nextData = this.syShippingDetailsItemList[j];
+              if (tableRow.smallPo == nextData.smallPo && tableRow.orderNumber == nextData.orderNumber  && 
+              tableRow.preDeliveryDate == nextData.preDeliveryDate  && tableRow.preCompletionDate == nextData.preCompletionDate && 
+              tableRow.itemNumber == nextData.itemNumber && tableRow.inventoryCode == nextData.inventoryCode&& 
+              tableRow.colour == nextData.colour&& tableRow.size == nextData.size){
+                this.$message.error('第'+(i+1)+'行和第'+(j+1)+'行数据相同,无法保存');
+                this.judge += 1
+                return;
+              }
+             } 
+           }
+           for (var i=0; i<this.syShippingDetailsItemList.length;i++){
+             var tableRow = this.syShippingDetailsItemList[i];
+            //是否未填
+            var required = [
+           {key:'account',value:'账套'},
+           {key:'orderNumber',value:'订单号'},
+           {key:'itemNumber',value:'款号'},
+           {key:'orderDate',value:'订单日期'},
+           {key:'preDeliveryDate',value:'预发货日期'},
+           {key:'preCompletionDate',value:'预完工日期'},
+           {key:'garmentFactory',value:'成衣工厂'},
+           {key:'businessTypeText',value:'业务类型'},
+           {key:'smallPo',value:'小po'},
+           {key:'packId',value:'Pack id'},
+           {key:'distributionPoint',value:'分销点'},
+           {key:'purOrSubOrder',value:'采购/委外订单'},
+           {key:'customsDeclarationUnitPrice',value:'报关单价'},
+           {key:'shipmentQuantity',value:'发货数量'},
+            {key:'numberOfSets',value:'套装件数'},
+           {key:'isTc',value:'是否TC功能'},
+           {key:'materialComposition',value:'物料成分'},
+           {key:'salesTypeText',value:'销售类型'},
+           {key:'customerAbbreviation',value:'客户简称'},
+           {key:'customerName',value:'客户名称'},
+           {key:'exchangeRate',value:'汇率'},
+           {key:'salesDepartment',value:'销售部门'},
+           {key:'salesman',value:'业务员'},
+           {key:'currencyText',value:'币种'},
+              ]
+             for(var j=0 ; j<required.length;j++){
+                if(tableRow[required[j].key] == null || tableRow[required[j].key] == "" || tableRow[required[j].key] == undefined){
+                  this.$message.error('第'+(i+1)+'行'+required[j].value+'无值,无法保存');
+                  this.judge+=1
+                  return
+                }
+             }
+            
+
+            //是否为数字
+             var number = [
+              //  {key:'customsDeclarationUnitPrice',value:'报关单价'},
+               {key:'shipmentQuantity',value:'发货数量'},
+               {key:'numberOfSets',value:'套装件数'},
+              //  {key:'factoryUnitPrice',value:'工厂单价'},
+               {key:'manualYarnUnitPrice',value:'手册纱单价'},
+             ]
+             for(var j=0 ; j<number.length;j++){
+                if(isNaN(Number(tableRow[number[j].key],10)) && tableRow[number[j].key]){
+                this.$message.error('第'+(i+1)+'行发货数量必须为数字!');
+                this.judge += 1
+                return
+              }
+             }
+             
+
+             //是否为整
+             var integer = [
+               {key:'numberOfSets',value:'套装件数'},
+               {key:'shipmentQuantity',value:'发货数量'},
+             ]
+             for(var v=0 ; v<integer.length;v++){
+                if(!Number.isInteger(Number(tableRow[integer[v].key]))){
+                  this.$message.error('第'+(i+1)+'行'+integer[v].value+'不为整数,无法保存');
+                  this.judge+=1
+                  return
+                }
+             }
+
+            //  //判断小数位数
+            var Several = [
+              //  {key:'customsDeclarationUnitPrice',value:'报关单价',dig:4},
+              //  {key:'factoryUnitPrice',value:'工厂单价',dig:4},
+               {key:'manualYarnUnitPrice',value:'手册纱单价',dig:4}
+             ]
+            for(var s=0 ; s<Several.length;s++){
+              if(tableRow.manualYarnFlag !== 0 && tableRow.manualYarnUnitPrice){
+                var position =  tableRow[Several[s].key].toString().indexOf('.')  + 1;   //小数点的位置
+                var digit = tableRow[Several[s].key].toString().length - position;  //小数的位值
+                if(digit > Several[s].dig && position!==0 ){
+                 this.$message.error('第'+(i+1)+'行'+Several[s].value+'小数超过两位,无法保存');
+                this.judge+=1
+                 return 
+              }
+              }
+               
+                
+             }   
+           }
+      
+    },
+
     // 操作 删除
     handleDelete(index) {
       return this.syShippingDetailsItemList.splice(index, 1)

+ 179 - 318
src/views/shipment-details/detailsShipDetDrawer.vue

@@ -25,20 +25,20 @@
                 </a-form-model-item>
               </a-col>
 
-              <a-col :md="6" :sm="8">
+              <!-- <a-col :md="6" :sm="8">
                 <a-form-model-item label="订单类型" prop="orderType">
                   {{ detailsShipDet.orderType }}
                 </a-form-model-item>
               </a-col>
 
 
-              <!-- U8系统适用 -->
+              U8系统适用
               <a-col :md="12" :sm="12">
                 <a-form-model-item label="备注" prop="memo">
                   {{ detailsShipDet.memo }}
                 </a-form-model-item>
               </a-col>
-            </a-row>
+            </a-row> -->
           </a-form-model>
         </div>
       </a-card>
@@ -82,7 +82,7 @@ export default {
       detailsShipDet: [], // 主表信息
       // 表头
       columns: [
-        {
+          {
           title: '账套',
           dataIndex: 'account',
           width: 80,
@@ -99,367 +99,228 @@ export default {
         {
           title: '款号',
           dataIndex: 'itemNumber',
-          scopedSlots: { customRender: 'itemNumber' },
           fixed: 'left',
           width: 180,
           className: 'replacecolor'
         },
-
- {
+        {
+          title: '订单日期',
+          dataIndex: 'orderDate',
+          width: 120,
+          className: 'replacecolor',
+          customRender: text => {
+            return moment(text).format('YYYY-MM-DD')
+          }
+        },
+        
+         {
+          title: '预发货日期',
+          dataIndex: 'preDeliveryDate',
+          width: 100,
+          className: 'replacecolor',
+        
+        },
+         {
+          title: '成衣工厂',
+          dataIndex: 'garmentFactory',
+          width: 100,
+          className: 'replacecolor'
+        },
+        {
+          title: '业务类型',
+          dataIndex: 'businessTypeText',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
           title: '小po',
           dataIndex: 'smallPo',
           width: 120,
           className: 'replacecolor'
         },
-         {
+        {
           title: 'Pack Id',
           dataIndex: 'packId',
           width: 120,
           className: 'replacecolor'
         },
-          {
+        {
           title: '分销点',
           dataIndex: 'distributionPoint',
           width: 120,
           className: 'replacecolor'
         },
         {
-          title: '存货编码',
-          dataIndex: 'inventoryCode',
-          width: 120,
+          title: '采购/委外订单号',
+          dataIndex: 'purOrSubOrder',
+          width: 180,
           className: 'replacecolor'
         },
         {
-          title: '存货名称',
-          dataIndex: 'inventoryName',
-          width: 250,
+          title: '单价(销售)',
+          dataIndex: 'salesUnitPrice',
+          width: 120,
           className: 'replacecolor'
         },
-         {
-          title: '颜色',
-          dataIndex: 'colour',
-          width: 160,
-          customRender: t => ellipsis(t),
+          {
+          title: '佣金',
+          dataIndex: 'ymoney',
+          width: 120,
           className: 'replacecolor'
         },
+
         {
-          title: '尺码',
-          dataIndex: 'size',
-          width: 100,
+          title: ' 报关单价',
+          dataIndex: 'customsDeclarationUnitPrice',
+          width: 180,
           className: 'replacecolor'
         },
-        {
-          title: '配码规格',
-          dataIndex: 'codingRules',
-          width: 180,
+         {
+          title: '工厂单价',
+          dataIndex: 'factoryUnitPrice',
+          width: 120,
           className: 'replacecolor'
         },
+
         {
           title: '订单数量',
           dataIndex: 'orderQuantity',
           width: 120,
           className: 'replacecolor'
         },
-          {
-          title: '发货数量',
-          dataIndex: 'shipmentQuantity',
+        {
+          title: '订单剩余数量',
+          dataIndex: 'orderRemainingQuantity',
           width: 120,
           className: 'replacecolor'
         },
 
-        // {
-        //   title: '创建时间',
-        //   dataIndex: 'createTime',
-        //   align: 'center',
-        //   sorter: true,
-        //   customRender: text => {
-        //     return moment(text).format('YYYY-MM-DD')
-        //   }
-        // },
-        // {
-        //   title: '订单日期',
-        //   dataIndex: 'orderDate',
-        //   width: 120,
-        //   className: 'replacecolor',
-        //   customRender: text => {
-        //     return moment(text).format('YYYY-MM-DD')
-        //   }
-        // },
-        //  {
-        //   title: '预发货日期',
-        //   dataIndex: 'preDeliveryDate',
-        //   width: 100,
-        //   className: 'replacecolor',
-        
-        // },
-        //  {
-        //   title: '预完工日期',
-        //   dataIndex: 'preCompletionDate',
-        //   width: 100,
-        //   className: 'replacecolor',
-         
-        // },
-        // {
-        //   title: '成衣工厂',
-        //   dataIndex: 'garmentFactory',
-        //   width: 100,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '业务类型',
-        //   dataIndex: 'businessTypeText',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '客户订单',
-        //   dataIndex: 'customerOrder',
-        //   width: 120,
-
-        //   className: 'replacecolor'
-        // },
-       
-       
-      
-       
-        // {
-        //   title: '采购/委外订单号',
-        //   dataIndex: 'purOrSubOrder',
-        //   scopedSlots: { customRender: 'purOrSubOrder' },
-        //   // fixed: 'left',
-        //   width: 180,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: ' 报关单价',
-        //   dataIndex: 'customsDeclarationUnitPrice',
-        //   scopedSlots: { customRender: 'customsDeclarationUnitPrice' },
-        //   // fixed: 'left',
-        //   width: 180,
-        //   className: 'replacecolor'
-        // },
-
-        // {
-        //   title: '订单数量',
-        //   dataIndex: 'orderQuantity',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '订单剩余数量',
-        //   dataIndex: 'orderRemainingQuantity',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-
-        // {
-        //   title: '发货数量',
-        //   dataIndex: 'shipmentQuantity',
-        //   scopedSlots: { customRender: 'shipmentQuantity' },
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-
-        // {
-        //   title: '套装件数',
-        //   dataIndex: 'numberOfSets',
-        //   scopedSlots: { customRender: 'numberOfSets' },
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '是否TC功能',
-        //   dataIndex: 'isTc',
-        //   width: 90,
-        //   className: 'replacecolor',
-        //   customRender:function(value){
-        //     if (value == "1")
-        //       return "是";
-        //     else if (value == "0")
-        //       return "否";
-        //     return value;
-        //   }
-        // },
-        // {
-        //   title: '物料成分',
-        //   dataIndex: 'materialComposition',
-        //   scopedSlots: { customRender: 'materialComposition' },
-        //   width: 140,
-        //   className: 'replacecolor'
-        // },
-
-        // {
-        //   title: '销售类型',
-        //   dataIndex: 'salesTypeText',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '客户简称',
-        //   dataIndex: 'customerAbbreviation',
-        //   width: 220,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '客户名称',
-        //   dataIndex: 'customerName',
-        //   width: 300,
-        //   className: 'replacecolor',
-        //   customRender: t => ellipsis(t),
-        // },
-        // {
-        //   title: '汇率',
-        //   dataIndex: 'exchangeRate',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-        // // {
-        // //   title: '整单(合计)',
-        // //   dataIndex: 'wholeOrderTotal',
-        // //   width: 120,
-        // //   className: 'replacecolor'
-        // // },
-        // {
-        //   title: '销售部门',
-        //   dataIndex: 'salesDepartment',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '业务员',
-        //   dataIndex: 'salesman',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '币种',
-        //   dataIndex: 'currencyText',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
+        {
+          title: '发货数量',
+          dataIndex: 'shipmentQuantity',
+          scopedSlots: { customRender: 'shipmentQuantity' },
+          width: 120,
+        },
 
-        // {
-        //   title: '品牌方',
-        //   dataIndex: 'brandSide',
-        //   width: 180,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '第三方',
-        //   dataIndex: 'thirdParty',
-        //   width: 220,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '定金比例(%)',
-        //   dataIndex: 'depositRatio',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '定金',
-        //   dataIndex: 'deposit',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '协同路线',
-        //   dataIndex: 'collaborativeRoute',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
+        {
+          title: '套装件数',
+          dataIndex: 'numberOfSets',
+          scopedSlots: { customRender: 'numberOfSets' },
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '是否TC功能',
+          dataIndex: 'isTC',
+          width: 90,
+          scopedSlots: { customRender: 'isTC' },
+          className: 'replacecolor'
+        },
+        {
+          title: '物料成分',
+          dataIndex: 'materialComposition',
+          width: 140,
+          className: 'replacecolor'
+        },
+        {
+          title: '客户简称',
+          dataIndex: 'customerAbbreviation',
+          width: 220,
+          align: 'left',
+          className: 'replacecolor'
+        },
+        {
+          title: '客户名称',
+          dataIndex: 'customerName',
+          width: 300,
+          align: 'left',
+          className: 'replacecolor',
+           customRender: t => ellipsis(t),
+        },
 
-        // {
-        //   title: '单价(销售)',
-        //   dataIndex: 'salesUnitPrice',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '工厂单价',
-        //   dataIndex: 'factoryUnitPrice',
-        //   width: 120,
-        //   scopedSlots: { customRender: 'factoryUnitPrice' },
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '付款条件',
-        //   dataIndex: 'termOfPayment',
-        //   width: 160,
-        //   customRender: t => ellipsis(t),
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '最终客户',
-        //   dataIndex: 'endCustomer',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '订单备注',
-        //   dataIndex: 'orderRemarks',
-        //   width: 200,
-        //   customRender: t => ellipsis(t),
-        //   className: 'replacecolor'
-        // },
+        {
+          title: '销售部门',
+          dataIndex: 'salesDepartment',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '业务员',
+          dataIndex: 'salesman',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '币种',
+          dataIndex: 'currencyText',
+          width: 120,
+          className: 'replacecolor'
+        },
 
-        // {
-        //   title: '申报要素',
-        //   dataIndex: 'declarationElements',
-        //   width: 160,
-        //   scopedSlots: { customRender: 'declarationElements' },
-        //   className: 'replacecolor'
-        // },
+        {
+          title: '品牌方',
+          dataIndex: 'brandSide',
+          width: 180,
+          className: 'replacecolor'
+        },
+        {
+          title: '第三方',
+          dataIndex: 'thirdParty',
+          width: 220,
+          align: 'left',
+          className: 'replacecolor'
+        },
+        {
+          title: '最终客户',
+          dataIndex: 'endCustomer',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '订单备注',
+          dataIndex: 'orderRemarks',
+          width: 200,
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
 
-        // {
-        //   title: '价格备注',
-        //   dataIndex: 'priceRemarks',
-        //   width: 160,
-        //   customRender: t => ellipsis(t),
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '订单变更说明',
-        //   dataIndex: 'orderChangeDescription',
-        //   width: 160,
-        //   customRender: t => ellipsis(t),
-        //   className: 'replacecolor'
-        // },
+        {
+          title: '处理方式',
+          dataIndex: 'treatmentMethod',
+          width: 160,
+          scopedSlots: { customRender: 'treatmentMethod' },
+          className: 'replacecolor'
+        },
+        {
+          title: '是否手册纱',
+          dataIndex: 'manualYarnFlag',
+          width: 140,
+          scopedSlots: { customRender: 'manualYarnFlag' },
+          className: 'replacecolor'
+        },
+        {
+          title: '手册纱单价',
+          dataIndex: 'manualYarnUnitPrice',
+          width: 160,
+          scopedSlots: { customRender: 'manualYarnUnitPrice' },
+          className: 'replacecolor'
+        },
+        {
+          title: '手册纱占比',
+          dataIndex: 'manualYarnProportion',
+          width: 120,
+          scopedSlots: { customRender: 'manualYarnProportion' },
+          className: 'replacecolor'
+        },
 
-        // {
-        //   title: '处理方式',
-        //   dataIndex: 'treatmentMethod',
-        //   width: 160,
-        //   scopedSlots: { customRender: 'treatmentMethod' },
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '是否手册纱',
-        //   dataIndex: 'manualYarnFlag',
-        //   width: 100,
-        //   customRender:function(value){
-        //     if (value == "1")
-        //       return "是";
-        //     else if (value == "0")
-        //       return "否";
-        //     return value;
-        //   },
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '手册纱单价',
-        //   dataIndex: 'manualYarnUnitPrice',
-        //   width: 160,
-        //   scopedSlots: { customRender: 'manualYarnUnitPrice' },
-        //   className: 'replacecolor'
-        // },
-        // {
-        //   title: '手册纱占比',
-        //   dataIndex: 'manualYarnProportion',
-        //   width: 120,
-        //   scopedSlots: { customRender: 'manualYarnProportion' },
-        //   className: 'replacecolor'
-        // }
+        {
+          title: '操作',
+          dataIndex: 'operation',
+          scopedSlots: { customRender: 'operationSlot' },
+          width: 100,
+          fixed: 'right',
+          className: 'replacecolor'
+        }
       ],
 
       syShippingDetailsItemList: [], // 子表信息

+ 138 - 158
src/views/shipment-details/editShipDetDrawer.vue

@@ -213,7 +213,7 @@
     </a-drawer>
 
     <!-- 参照订单数据弹框 -->
-    <referOrderData-modal ref="referOrderDataModal" @bao="getSon" @ok="referOrderDataOk"></referOrderData-modal>
+    <referOrderData-modal ref="referOrderDataModal" @ok="referOrderDataOk"></referOrderData-modal>
   </div>
 </template>
 
@@ -237,6 +237,7 @@ export default {
       id: '',
       validatorRules:{
           documentDate:[{required: true, message: '请输入单据日期!'}],
+          customer:[{required: true, message: '客户为空!', trigger: 'change'}],
          // customer:[{required: true, message: '请选择客户!'}],
          // preDeliveryDate:[{required: true, message: '请选择预发货时间!'}],
          // preCompletionDate:[{required: true, message: '请选择预完工日期!'}],
@@ -245,7 +246,7 @@ export default {
         btnDisabled:true,//参照数据按钮禁止使用
       // 表头
       columns: [
-      {
+       {
           title: '账套',
           dataIndex: 'account',
           width: 80,
@@ -294,6 +295,7 @@ export default {
           title: '成衣工厂',
           dataIndex: 'garmentFactory',
           scopedSlots: { customRender: 'garmentFactory' },
+          validateRules:[{ required: true, message: '${title}不能为空' }],
           width: 100,
           className: 'replacecolor'
         },
@@ -430,12 +432,12 @@ export default {
           className: 'replacecolor',
            customRender: t => ellipsis(t),
         },
-        {
-          title: '汇率',
-          dataIndex: 'exchangeRate',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '汇率',
+        //   dataIndex: 'exchangeRate',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
 
         {
           title: '销售部门',
@@ -469,24 +471,24 @@ export default {
           align: 'left',
           className: 'replacecolor'
         },
-        {
-          title: '定金比例(%)',
-          dataIndex: 'depositRatio',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '定金',
-          dataIndex: 'deposit',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '协同路线',
-          dataIndex: 'collaborativeRoute',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '定金比例(%)',
+        //   dataIndex: 'depositRatio',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '定金',
+        //   dataIndex: 'deposit',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '协同路线',
+        //   dataIndex: 'collaborativeRoute',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
       
         
        
@@ -581,23 +583,23 @@ export default {
   },
 
   methods: {
-    getSon(val) {
-      var copyValList = JSON.parse(JSON.stringify(val));
-      for (var i in copyValList) {
-        copyValList[i]['orderQuantity'] = copyValList[i].quantity
-        copyValList[i]['orderRemainingQuantity'] = copyValList[i].surplusNum
-        copyValList[i]['salesUnitPrice'] = copyValList[i].unitPriceIncludingTax
-        copyValList[i]['customerOrder'] = copyValList[i].customerOrderNumber
-        copyValList[i]['shipmentQuantity'] = copyValList[i].surplusNum // 订单剩余数量 赋值给发货数量
-      }
-      this.syShippingDetailsItemList = this.syShippingDetailsItemList.concat(copyValList);
-      this.msgFormSon = this.syShippingDetailsItemList;
-    },
+    // getSon(val) {
+    //   var copyValList = JSON.parse(JSON.stringify(val));
+    //   for (var i in copyValList) {
+    //     copyValList[i]['orderQuantity'] = copyValList[i].quantity
+    //     copyValList[i]['orderRemainingQuantity'] = copyValList[i].surplusNum
+    //     copyValList[i]['salesUnitPrice'] = copyValList[i].unitPriceIncludingTax
+    //     copyValList[i]['customerOrder'] = copyValList[i].customerOrderNumber
+    //     copyValList[i]['shipmentQuantity'] = copyValList[i].surplusNum // 订单剩余数量 赋值给发货数量
+    //   }
+    //   this.syShippingDetailsItemList = this.syShippingDetailsItemList.concat(copyValList);
+    //   this.msgFormSon = this.syShippingDetailsItemList;
+    // },
     // 编辑 保存
     editSave() {
       const that = this;
       // 触发表单验证
-      this.$refs.form.validate(valid => {
+      this.$refs.form.validate(async valid => {
       if (valid) {
         // 必须选择子表 --- 参照订单数据
         if (this.editShipDet.syShippingDetailsItemList.length == 0) {
@@ -610,124 +612,10 @@ export default {
               return;
             }
           }
-          // 根据syOrderDataItemId判断重复子表id
-          for (var i=0; i<this.editShipDet.syShippingDetailsItemList.length; i++){
-            var rowData = this.editShipDet.syShippingDetailsItemList[i];
-            for (var j=i+1;j<this.editShipDet.syShippingDetailsItemList.length; j++){
-              var nextData = this.editShipDet.syShippingDetailsItemList[j];
-              if (rowData.syOrderDataItemId == nextData.syOrderDataItemId){
-                this.$message.error('第'+(i+1)+'行和第'+(j+1)+'行物订单子表id重复,无法保存');
-                return;
-              }
-            }
-          }
-          for(var i=0; i<this.editShipDet.syShippingDetailsItemList.length; i++){
-             var rowData = this.editShipDet.syShippingDetailsItemList[i];
-              //判断输入报关单价是否为数字
-              if(isNaN(Number(rowData.customsDeclarationUnitPrice,10)) && rowData.customsDeclarationUnitPrice){
-                this.$message.error('第'+(i+1)+'行报关单价必须为数字!');
-                return
-              }
-
-              //判断输入发货数量是否为数字
-              if(isNaN(Number(rowData.shipmentQuantity,10)) && rowData.shipmentQuantity){
-                this.$message.error('第'+(i+1)+'行发货数量必须为数字!');
-                return
-              }
-
-              //判断输入套装件数是否为数字
-              if(isNaN(Number(rowData.numberOfSets,10)) && rowData.numberOfSets){
-                this.$message.error('第'+(i+1)+'行套装件数必须为数字!');
-                return
-              }
-
-              //判断输入工厂单价是否为数字
-              if(isNaN(Number(rowData.factoryUnitPrice,10)) && rowData.factoryUnitPrice){
-                this.$message.error('第'+(i+1)+'行工厂单价必须为数字!');
-                return
-              }
-
-              //判断输入工厂单价是否为数字
-              if(isNaN(Number(rowData.manualYarnUnitPrice,10)) && rowData.manualYarnUnitPrice){
-                this.$message.error('手册纱单价必须为数字!');
-                return
-              }
-
-             //报关单价不超过四位小数
-            if(!Number.isInteger(Number(rowData.customsDeclarationUnitPrice)) && rowData.customsDeclarationUnitPrice !== '' && rowData.customsDeclarationUnitPrice !== undefined){
-              var position = rowData.customsDeclarationUnitPrice.toString().indexOf('.') + 1;   //小数点的位置
-              var digit = rowData.customsDeclarationUnitPrice.toString().length - position;  //小数的位数
-              if(digit > 4){
-                this.$message.error('第'+(i+1)+'行报关单价超过四位小数!');
-                return 
-              }
-             }    
-             
-            //  //发货数量必须是整数
-            //  if(!Number.isInteger(Number(rowData.shipmentQuantity)) && rowData.shipmentQuantity !== '' && rowData.shipmentQuantity !== undefined){
-            //     this.$message.error('第'+(i+1)+'行发货数量不为整数!');
-            //     return
-            //  }
-             //套装件数必须为整数
-              if(!Number.isInteger(Number(rowData.numberOfSets)) && rowData.numberOfSets !== '' && rowData.numberOfSets !== undefined){
-                this.$message.error('第'+(i+1)+'行套装件数不为整数!');
-                return
-             }
-
-             //工厂单价不超过四位小数
-              if(!Number.isInteger(Number(rowData.factoryUnitPrice)) && rowData.factoryUnitPrice !== '' && rowData.factoryUnitPrice !== undefined){
-              console.log(rowData.factoryUnitPrice)
-              var position = rowData.factoryUnitPrice.toString().indexOf('.') + 1;   //小数点的位置
-              var digit = rowData.factoryUnitPrice.toString().length - position;  //小数的位数
-              if(digit > 4){
-                this.$message.error('第'+(i+1)+'行工厂单价超过四位小数!');
-                return 
-              }
-             }    
-
-             //手册纱单价不超过四位小数
-              if(!Number.isInteger(Number(rowData.manualYarnUnitPrice)) && rowData.manualYarnUnitPrice !== '' && rowData.manualYarnUnitPrice !== undefined){
-              var position = rowData.manualYarnUnitPrice.toString().indexOf('.') + 1;   //小数点的位置
-              var digit = rowData.manualYarnUnitPrice.toString().length - position;  //小数的位数
-              if(digit > 4){
-                this.$message.error('手册纱单价超过四位小数!');
-                return 
-              }
-             }   
-          }
-          
-          //判断当是手册纱时,手册纱单价和手册纱占比是否为空
-          for (var i=0; i<this.editShipDet.syShippingDetailsItemList.length; i++){
-            var rowData = this.editShipDet.syShippingDetailsItemList[i];
-            if(rowData.purOrSubOrder == '' || !rowData.purOrSubOrder){
-                this.$message.error('第'+(i+1)+'行采购委外订单号未填!');
-                return
-            }
-            if(rowData.garmentFactory == '' || !rowData.garmentFactory){
-                this.$message.error('第'+(i+1)+'行成衣工厂未填!');
-                return
-            }
-            if(rowData.shipmentQuantity == '' || !rowData.shipmentQuantity || rowData.shipmentQuantity == 0){
-                this.$message.error('第'+(i+1)+'行发货数量未填!');
-                return
-            }
-             if(rowData.numberOfSets == '' || !rowData.numberOfSets || rowData.numberOfSets == 0){
-                this.$message.error('第'+(i+1)+'行套装件数未填!');
-                return
-             }
-              if(!rowData.hasOwnProperty("isTc") || rowData.isTc == "" || !rowData.isTc){
-                this.$message.error('第'+(i+1)+'行是否TC功能未选择!');
-                return
-             }
-            // if((rowData.manualYarnFlag === 1 && !rowData.manualYarnUnitPrice) || (rowData.manualYarnFlag === 1 && rowData.manualYarnUnitPrice === '')|| (rowData.manualYarnFlag === 1 && rowData.manualYarnProportion === "0") || (rowData.manualYarnFlag === 1 && rowData.manualYarnProportion === 0) ){
-            //    this.$message.error('手册纱单价为必填项');
-            //    return
-            //  }else if((rowData.manualYarnFlag === 1 && !rowData.manualYarnProportion) || (rowData.manualYarnFlag === 1 && rowData.manualYarnProportion === '') || (rowData.manualYarnFlag === 1 && rowData.manualYarnProportion === "0") || (rowData.manualYarnFlag === 1 && rowData.manualYarnProportion === 0)){
-            //    this.$message.error('手册纱占比为必填项');
-            //    return
-            // }
-          }
-          editById(this.editShipDet).then(res => {
+         
+         await this.JudgeVluabled()
+          if(this.judge == 0){
+            editById(this.editShipDet).then(res => {
             if (res.success) {
               this.$message.success('编辑成功');
               this.addShipDet = {};
@@ -735,12 +623,104 @@ export default {
               this.close();
               this.fatherList(); // 调用父组件的查询方法
             }
-          })
+           })
+          }
+          
         }
       }else{
         return false;
       }
       });
+    },
+     JudgeVluabled(){
+          this.judge = 0
+          for (var i=0; i<this.syShippingDetailsItemList.length;i++){
+             var tableRow = this.syShippingDetailsItemList[i];
+             for (var j=i+1;j<this.syShippingDetailsItemList.length; j++){
+              var nextData = this.syShippingDetailsItemList[j];
+              if (tableRow.smallPo == nextData.smallPo && tableRow.orderNumber == nextData.orderNumber  && 
+              tableRow.preDeliveryDate == nextData.preDeliveryDate  && tableRow.preCompletionDate == nextData.preCompletionDate && 
+              tableRow.itemNumber == nextData.itemNumber && tableRow.inventoryCode == nextData.inventoryCode&& 
+              tableRow.colour == nextData.colour&& tableRow.size == nextData.size){
+                this.$message.error('第'+(i+1)+'行和第'+(j+1)+'行数据相同,无法保存');
+                this.judge += 1
+                return;
+              }
+             } 
+           }
+           for (var i=0; i<this.syShippingDetailsItemList.length;i++){
+             var tableRow = this.syShippingDetailsItemList[i];
+            //是否未填
+            var required = [
+           {key:'garmentFactory',value:'成衣工厂'},
+           {key:'purOrSubOrder',value:'采购/委外订单号'},
+           {key:'customsDeclarationUnitPrice',value:'报关单价'},
+           {key:'shipmentQuantity',value:'发货数量'},
+            {key:'numberOfSets',value:'套装件数'},
+           {key:'isTc',value:'是否TC功能'},
+          //  {key:'materialComposition',value:'物料成分'},
+           {key:'salesTypeText',value:'销售类型'},
+              ]
+             for(var j=0 ; j<required.length;j++){
+                if(tableRow[required[j].key] == null || tableRow[required[j].key] == "" || tableRow[required[j].key] == undefined){
+                  this.$message.error('第'+(i+1)+'行'+required[j].value+'无值,无法保存');
+                  this.judge+=1
+                  return
+                }
+             }
+            
+
+            //是否为数字
+             var number = [
+              //  {key:'customsDeclarationUnitPrice',value:'报关单价'},
+               {key:'shipmentQuantity',value:'发货数量'},
+               {key:'numberOfSets',value:'套装件数'},
+              //  {key:'factoryUnitPrice',value:'工厂单价'},
+               {key:'manualYarnUnitPrice',value:'手册纱单价'},
+             ]
+             for(var j=0 ; j<number.length;j++){
+                if(isNaN(Number(tableRow[number[j].key],10)) && tableRow[number[j].key]){
+                this.$message.error('第'+(i+1)+'行发货数量必须为数字!');
+                this.judge += 1
+                return
+              }
+             }
+             
+
+             //是否为整
+             var integer = [
+               {key:'numberOfSets',value:'套装件数'},
+               {key:'shipmentQuantity',value:'发货数量'},
+             ]
+             for(var v=0 ; v<integer.length;v++){
+                if(!Number.isInteger(Number(tableRow[integer[v].key]))){
+                  this.$message.error('第'+(i+1)+'行'+integer[v].value+'不为整数,无法保存');
+                  this.judge+=1
+                  return
+                }
+             }
+
+            //  //判断小数位数
+            var Several = [
+              //  {key:'customsDeclarationUnitPrice',value:'报关单价',dig:4},
+              //  {key:'factoryUnitPrice',value:'工厂单价',dig:4},
+               {key:'manualYarnUnitPrice',value:'手册纱单价',dig:4}
+             ]
+            for(var s=0 ; s<Several.length;s++){
+              if(tableRow.manualYarnFlag !== 0 && tableRow.manualYarnUnitPrice){
+                var position =  tableRow[Several[s].key].toString().indexOf('.')  + 1;   //小数点的位置
+                var digit = tableRow[Several[s].key].toString().length - position;  //小数的位值
+                if(digit > Several[s].dig && position!==0 ){
+                 this.$message.error('第'+(i+1)+'行'+Several[s].value+'小数超过两位,无法保存');
+                this.judge+=1
+                 return 
+              }
+              }
+               
+                
+             }   
+           }
+      
     },
     // 参照订单数据
     referOrderDataOpen() {