瀏覽代碼

装箱单成衣字段调整

jbb 2 年之前
父節點
當前提交
dff1671d59

+ 66 - 45
src/views/packing-list/clothes-list.vue

@@ -28,14 +28,34 @@
                 <a-input placeholder="请输入品名" v-model="queryParam.productName"></a-input>
               </a-form-item>
             </a-col>
-
-            <template v-if="toggleSearchStatus">
+             <a-col :md="6" :sm="8">
+              <a-form-item label="小po">
+                <a-input placeholder="请输入小po" v-model="queryParam.smallPo"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="分销点">
+                <a-input placeholder="请输入小分销点" v-model="queryParam.distributionPoint"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+               <a-form-item label="预发货日期">
+                 <a-range-picker
+                  :placeholder="['开始时间', '结束时间']"
+                  format="YYYY-MM-DD"
+                  style="width: 100%"
+                  v-model="preDeliveryDate"
+                  @change="onDateChange"
+                />
+               </a-form-item>
+              </a-col>
+            <!-- <template v-if="toggleSearchStatus">
               <a-col :md="6" :sm="8">
                 <a-form-item label="托书号">
                   <a-input placeholder="请输入托书号" v-model="queryParam.shippingOrderNumber"></a-input>
                 </a-form-item>
               </a-col>
-            </template>
+            </template> -->
 
             <a-col :md="6" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
@@ -117,9 +137,9 @@
         </span>
 
         <!-- 推送状态 -->
-        <span slot="pushState">
+        <span slot="pushState" slot-scope="text, record">
           <!-- v-if="record.isRelease == '0'" -->
-          <a-tag color="#f50">保存</a-tag>
+          <a-tag color="#f50" :title="record.cause">保存</a-tag>
           <!-- <a-tag color="#87d068" v-else>已提交</a-tag> -->
         </span>
 
@@ -207,16 +227,16 @@ export default {
           fixed: 'left',
           className: 'replacecolor'
         },
-        {
-          title: '单据号',
-          dataIndex: 'documentNo',
+         {
+          title: '号',
+          dataIndex: 'itemNumber',
           width: 120,
           fixed: 'left',
           className: 'replacecolor'
         },
         {
-          title: '号',
-          dataIndex: 'itemNumber',
+          title: '单据号',
+          dataIndex: 'documentNo',
           width: 120,
           fixed: 'left',
           className: 'replacecolor'
@@ -266,17 +286,24 @@ export default {
           className: 'replacecolor'
         },
         {
-          title: '订单类型',
-          dataIndex: 'orderType',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '工厂单价',
-          dataIndex: 'factoryUnitPrice',
-          width: 120,
+          title: '成衣工厂',
+          dataIndex: 'garmentFactory',
+          width: 140,
+          customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
+        // {
+        //   title: '订单类型',
+        //   dataIndex: 'orderType',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '工厂单价',
+        //   dataIndex: 'factoryUnitPrice',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
         {
           title: '数量(按合并规则累计)',
           dataIndex: 'total',
@@ -310,12 +337,12 @@ export default {
           className: 'replacecolor'
         },
 
-        {
-          title: '总价',
-          dataIndex: 'totalPrice',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '总价',
+        //   dataIndex: 'totalPrice',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
 
         {
           title: '集装箱代号',
@@ -339,14 +366,6 @@ export default {
           className: 'replacecolor'
         },
 
-        {
-          title: '成衣工厂',
-          dataIndex: 'garmentFactory',
-          width: 140,
-          customRender: t => ellipsis(t),
-          className: 'replacecolor'
-        },
-
         {
           title: '推送状态',
           dataIndex: 'pushState',
@@ -362,13 +381,13 @@ export default {
         //   scopedSlots: { customRender: 'documentState' },
         //   className: 'replacecolor'
         // },
-        {
-          title: '原因',
-          dataIndex: 'cause',
-          width: 180,
-          customRender: t => ellipsis(t),
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '原因',
+        //   dataIndex: 'cause',
+        //   width: 180,
+        //   customRender: t => ellipsis(t),
+        //   className: 'replacecolor'
+        // },
 
         {
           title: '是否云工厂推送',
@@ -418,13 +437,9 @@ export default {
 
       // 查询条件
       queryParam: {
-        documentNo:'', //单据号
-        orderNumber: '', // 订单号
-        itemNumber	: '', //款号
-        productName: '', // 品名
-        shippingOrderNumber: '' ,// 托书号
         pageNo: '' // 初始页
       },
+      preDeliveryDate:[],
       pagination: {
         // total: '',
         // current: 0,
@@ -476,6 +491,7 @@ export default {
     searchReset() {
       // console.log('>>>>重置')
       this.queryParam = {}
+      this.preDeliveryDate = []
       this.getSpltList()
     },
     // 推送
@@ -525,6 +541,7 @@ export default {
                 orderNum:editData.orderNumber,
                 styleNum:editData.itemNumber,
                 name:editData.productName,
+                englishProductName:editData.englishProductName,
                 sizeRange:editData.sizeRange,
                 customer:editData.customer,
                 containerCode:editData.containerCode,
@@ -611,6 +628,10 @@ export default {
         })
       })
     },
+    onDateChange(value, dateString) {
+      this.queryParam.stratDate = dateString[0]
+      this.queryParam.endDate = dateString[1]
+    },
     // --------------------------------------
     // ??
     modalFormOk() {},

+ 137 - 253
src/views/packing-list/packinglist-clothes/clothesAddDrawer.vue

@@ -15,25 +15,36 @@
             <a-row :gutter="24">
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="订单号" prop="orderNum">
-                  <a-input placeholder="请输入订单号" v-model="clothesAdd.orderNum"></a-input>
+                  {{clothesAdd.orderNum}}
+                  <!-- <a-input placeholder="请输入订单号" v-model="clothesAdd.orderNum" readOnly></a-input> -->
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="款号" prop="styleNum">
-                  <a-input placeholder="请输入款号" v-model="clothesAdd.styleNum"></a-input>
+                  {{clothesAdd.styleNum}}
+                  <!-- <a-input placeholder="请输入款号" v-model="clothesAdd.styleNum" readOnly></a-input> -->
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="品名" prop="name">
-                  <a-input placeholder="请输入品名" v-model="clothesAdd.name"></a-input>
+                <a-form-model-item label="中文品名" prop="name">
+                  {{clothesAdd.name}}
+                  <!-- <a-input placeholder="请输入中文品名" v-model="clothesAdd.name"></a-input> -->
+                </a-form-model-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-model-item label="英文品名" prop="englishProductName">
+                  {{clothesAdd.englishProductName}}
+                  <!-- <a-input placeholder="请输入英文品名" v-model="clothesAdd.englishProductName"></a-input> -->
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="尺码范围" prop="sizeRange">
-                  <a-input placeholder="请输入尺码范围" v-model="clothesAdd.sizeRange"></a-input>
+                  {{clothesAdd.sizeRange}}
+                  <!-- <a-input placeholder="请输入尺码范围" v-model="clothesAdd.sizeRange" readOnly></a-input> -->
                   <!-- <a-select placeholder="请选择尺码范围">
                 <a-select-option value="">请选择</a-select-option>
                 <a-select-option value="0">客户1</a-select-option>
@@ -44,20 +55,23 @@
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="客户" prop="customer">
-                  <a-input placeholder="请输入客户" v-model="clothesAdd.customer"></a-input>
+                <a-form-model-item label="客户" prop="customer" :title="clothesAdd.customer">
+                  <!-- {{clothesAdd.customer | ellipsis}} -->
+                  <a-input placeholder="请输入客户" v-model="clothesAdd.customer" ></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="集装箱代号" prop="containerCode">
-                  <a-input placeholder="请输入集装箱代号" v-model="clothesAdd.containerCode"></a-input>
+                  {{clothesAdd.containerCode}}
+                  <!-- <a-input placeholder="请输入集装箱代号" v-model="clothesAdd.containerCode" readOnly></a-input> -->
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="集装箱号" prop="containerNo">
-                  <a-input placeholder="请输入集装箱号" v-model="clothesAdd.containerNo"></a-input>
+                  {{clothesAdd.containerNo}}
+                  <!-- <a-input placeholder="请输入集装箱号" v-model="clothesAdd.containerNo" readOnly></a-input> -->
                 </a-form-model-item>
               </a-col>
 
@@ -81,37 +95,43 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="托书号" prop="bookNum">
-                  <a-input placeholder="请输入托书号" v-model="clothesAdd.bookNum"></a-input>
+                  {{clothesAdd.bookNum}}
+                  <!-- <a-input placeholder="请输入托书号" v-model="clothesAdd.bookNum" readOnly></a-input> -->
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="总箱数" prop="totalBoxes">
-                  <a-input placeholder="请输入总箱数" v-model="clothesAdd.totalBoxes"></a-input>
+                  {{clothesAdd.totalBoxes}}
+                  <!-- <a-input placeholder="请输入总箱数" v-model="clothesAdd.totalBoxes" readOnly></a-input> -->
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="总毛重" prop="totalGrossWeight">
-                  <a-input placeholder="请输入总毛重" v-model="clothesAdd.totalGrossWeight"></a-input>
+                  {{clothesAdd.totalGrossWeight}}
+                  <!-- <a-input placeholder="请输入总毛重" v-model="clothesAdd.totalGrossWeight" readOnly></a-input> -->
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="总净重" prop="totalNetWeight">
-                  <a-input placeholder="请输入总净重" v-model="clothesAdd.totalNetWeight"></a-input>
+                  {{clothesAdd.totalNetWeight}}
+                  <!-- <a-input placeholder="请输入总净重" v-model="clothesAdd.totalNetWeight" readOnly></a-input> -->
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="总体积" prop="totalVolume">
-                  <a-input placeholder="请输入总体积" v-model="clothesAdd.totalVolume"></a-input>
+                  {{clothesAdd.totalVolume}}
+                  <!-- <a-input placeholder="请输入总体积" v-model="clothesAdd.totalVolume" readOnly></a-input> -->
                 </a-form-model-item>
               </a-col>
-              <a-col :md="6" :sm="8">
+              <!-- <a-col :md="6" :sm="8">
                 <a-form-model-item label="总价" prop="totalPrice">
                   <a-input placeholder="请输入总价" v-model="clothesAdd.totalPrice"></a-input>
                 </a-form-model-item>
-              </a-col>
+              </a-col> -->
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="总件数" prop="total">
-                  <a-input placeholder="请输入总件数" v-model="clothesAdd.total"></a-input>
+                  {{clothesAdd.total}}
+                  <!-- <a-input placeholder="请输入总件数" v-model="clothesAdd.total" readOnly></a-input> -->
                 </a-form-model-item>
               </a-col>
             </a-row>
@@ -159,92 +179,6 @@
             </template>
             </j-vxe-table>
           </a-form-model>
-          <!-- <a-form-model ref="formRef" :rules="validatorRules">
-            <a-table
-              bordered
-              :row-key="record => record.id"
-              :columns="clothesAddColumns"
-              :data-source="clothesAddData"
-              :loading="loading"
-              :pagination="pagination"
-              :scroll="{ x: 1500 }"
-              @change="handleTableChange"
-            > -->
-              <!-- 启始箱号 输入框-->
-              <!-- <template slot="inceptionBoxNo" slot-scope="text, record, index">
-                <a-form-model-item prop="inceptionBoxNo" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.startingBoxNumber" />
-                </a-form-model-item>
-              </template> -->
-
-              <!-- 结束箱号 输入框-->
-              <!-- <template slot="endBoxNo" slot-scope="text, record, index">
-                <a-form-model-item prop="endBoxNo" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.endCaseNumber" />
-                </a-form-model-item>
-              </template> -->
-
-              <!-- 件数/箱 输入框-->
-
-              <!-- <template slot="packagesBox" slot-scope="text, record, index">
-                <a-form-model-item prop="packagesBox" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.piecesBox" />
-                </a-form-model-item>
-              </template> -->
-
-              <!--箱数 输入框-->
-              <!-- <template slot="boxes" slot-scope="text, record, index">
-                <a-form-model-item prop="boxes" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.boxNumber" />
-                </a-form-model-item>
-              </template> -->
-
-              <!--净重/箱 输入框-->
-              <!-- <template slot="suttle" slot-scope="text, record, index">
-                <a-form-model-item prop="suttle" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.netWeight" />
-                </a-form-model-item>
-              </template> -->
-
-              <!--毛重/箱 输入框-->
-              <!-- <template slot="roughWeight" slot-scope="text, record, index">
-                <a-form-model-item prop="roughWeight" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.grossWeight" />
-                </a-form-model-item>
-              </template> -->
-
-              <!--外箱长度 输入框-->
-              <!-- <template slot="boxLength" slot-scope="text, record, index">
-                <a-form-model-item prop="boxLength" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.outerBoxLength" />
-                </a-form-model-item>
-              </template> -->
-
-              <!--外箱宽度 输入框-->
-              <!-- <template slot="boxWidth" slot-scope="text, record, index">
-                <a-form-model-item prop="boxWidth" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.outerBoxWidth" />
-                </a-form-model-item>
-              </template> -->
-
-              <!--外箱高度 输入框-->
-
-              <!-- <template slot="boxHeight" slot-scope="text, record, index">
-                <a-form-model-item prop="boxHeight" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.outerBoxHeight" />
-                </a-form-model-item>
-              </template> -->
-
-              <!-- 操作 -->
-              <!-- <span slot="operationSlot" slot-scope="text, record">
-                <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
-                  <a href="javascript:void(0);" style="color:red;">删除</a>
-                </a-popconfirm>
-                <a-divider type="vertical" />
-                <a @click="copy(record)">复制</a>
-              </span>
-            </a-table>
-          </a-form-model> -->
         </a-spin>
       </a-card>
       <!-- 页面底部提交取消 -->
@@ -299,7 +233,7 @@ export default {
         },
       // 表头
       clothesAddColumns: [
-        {
+         {
           title: '账套',
           key: 'acSetNo',
           width: 160,
@@ -363,7 +297,7 @@ export default {
           title: '颜色(中英文)',
           key: 'colour',
           width: 140,
-         type: JVXETypes.input,
+         type: JVXETypes.normal,
         },
         {
           title: '配码',
@@ -381,9 +315,9 @@ export default {
           title: '箱数',
           key: 'boxNumber',
           width: 120,
-          type: JVXETypes.normal 
+          type: JVXETypes.inputNumber 
         },
-         {
+        {
           title: '计划尺码数量',
           key: 'planSize',
           width: 240,
@@ -405,7 +339,7 @@ export default {
           title: '净重/箱',
           key: 'netWeight',
           width: 120,
-          type: JVXETypes.input 
+          type: JVXETypes.inputNumber 
         },
         {
           title: '总净重',
@@ -455,18 +389,18 @@ export default {
           width: 120,
           type: JVXETypes.inputNumber,
         },
-        {
-          title: '单价',
-          key: 'unitPrice',
-          width: 120,
-          type: JVXETypes.normal,
-        },
-        {
-          title: '总价',
-          key: 'totalPrice',
-          width: 120,
-          type: JVXETypes.normal,
-        },
+        // {
+        //   title: '单价',
+        //   key: 'unitPrice',
+        //   width: 120,
+        //   type: JVXETypes.normal,
+        // },
+        // {
+        //   title: '总价',
+        //   key: 'totalPrice',
+        //   width: 120,
+        //   type: JVXETypes.normal,
+        // },
         {
           title: '备注',
           key: 'remarks',
@@ -486,6 +420,7 @@ export default {
         }
       ],
       clothesAddData: [],
+      judge:0,
       loading: false, // 表格加载
       clothesAdd: {},
        pagination: {
@@ -498,10 +433,13 @@ export default {
       sizeFields:[], // 尺码字段
       confirmLoading: false,
       validatorRules: {
-        orderNum: [{ required: true, message: '订单号不能为空', trigger: 'blur' }],
-        styleNum: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
-        name: [{ required: true, message: '品名不能为空', trigger: 'blur' }]
-        // 待确定还有哪些必填信息
+        // orderNum: [{ required: true, message: '订单号不能为空', trigger: 'blur' }],
+        // styleNum: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
+        // name: [{ required: true, message: '中文品名不能为空', trigger: 'blur' }],
+        // // englishProductName: [{ required: true, message: '英文品名不能为空', trigger: 'blur' }],
+        // // sizeRange: [{ required: true, message: '品名不能为空', trigger: 'blur' }],
+        // // sizeRange
+        // // 待确定还有哪些必填信息
       }
       // dateFormat: 'YYYY-MM-DD'
     }
@@ -525,10 +463,13 @@ export default {
      orderSpltListId({id:preId}).then(res => {
           var data = res.result
           if (res.success) {
+            debugger
             this.clothesAdd = {
+              documentNo:data.documentNo,
               orderNum: data.orderNumber,
               styleNum: data.itemNumber,
               name: data.productName,
+              englishProductName:data.englishProductName,
               sizeRange: data.sizeRange,
               customer:  data.customer,
               containerCode: data.containerCode,
@@ -669,8 +610,8 @@ export default {
         outerBoxHeight: '',
         totalVolume: '',
         netWeightToo: '',
-        unitPrice: '',
-        totalPrices: '',
+        // unitPrice: '',
+        // totalPrices: '',
         remarks: '',
         operation: ''
       }
@@ -689,10 +630,10 @@ export default {
      handleValueChange(event) {
        var dataRow = event.row
        console.log(dataRow)
-       if (dataRow.startingBoxNumber != undefined && dataRow.startingBoxNumber != "" &&
-        dataRow.endCaseNumber != undefined && dataRow.endCaseNumber != ""){
-          dataRow.boxNumber = dataRow.endCaseNumber*1-dataRow.startingBoxNumber*1+1;
-      }
+      //  if (dataRow.startingBoxNumber != undefined && dataRow.startingBoxNumber != "" &&
+      //   dataRow.endCaseNumber != undefined && dataRow.endCaseNumber != ""){
+      //     dataRow.boxNumber = dataRow.endCaseNumber*1-dataRow.startingBoxNumber*1+1;
+      // }
       var allSizeSum = this.getAllSizeSum(dataRow);
       dataRow.piecesBox = allSizeSum
       dataRow.total = dataRow.piecesBox*dataRow.boxNumber
@@ -732,7 +673,7 @@ export default {
     submitAdd() {
       const that = this;
       // 触发表单验证
-      that.$refs.formModel.validate(valid => {
+      that.$refs.formModel.validate(async valid => {
         if (valid) {
           if (this.sizeFields.length == 0){
           this.$message.error('当前记录没有尺码字段,无法保存');
@@ -768,9 +709,45 @@ export default {
           newObj.purchase=this.clothesAdd.purchase,
           newObj.customerAbbreviation=this.clothesAdd.customerAbbreviation,
           newObj.depositaryReceiptNo = this.clothesAdd.depositaryReceiptNo
-          var sort = 0;
-          for (var i=0; i<newObj.syPackingListTailoringItemList.length;i++){
-             var tableRow = newObj.syPackingListTailoringItemList[i];
+          await this.JudgeVluabled()
+          if(this.judge == 0){
+             if(this.editDecide === 'edit'){
+               editSpltList(newObj).then(res => {
+                if (res.success) {
+                 this.$message.success('编辑成功')
+                 this.close()
+                //清空信息
+                 newObj = {};
+                 that.fatherList() // 调用父组件 查询方法
+                }else{
+                  this.$message.error(res.message)
+              }
+              })
+            }else {
+               addSpltList(newObj).then(res => {
+               debugger
+               if (res.success) {
+                  this.$message.success('新增成功')
+                  this.close()
+                  //清空信息
+                  newObj = {};
+                  that.fatherList() // 调用父组件 查询方法
+               }else{
+                  this.$message.error(res.message)
+               }
+               })
+            }
+          }
+        
+        }
+      })
+    },
+
+    JudgeVluabled(){
+          var sort = 0
+          this.judge = 0
+          for (var i=0; i<this.clothesAddData.length;i++){
+             var tableRow = this.clothesAddData[i];
              var allSizeSum = this.getAllSizeSum(tableRow);
              if (allSizeSum == 0){
                this.$message.error('第'+(i+1)+'行所有尺码数量为0,无法保存');
@@ -782,16 +759,18 @@ export default {
                {key:'startingBoxNumber',value:'起始箱号'},
                {key:'endCaseNumber',value:'结束箱号'},
                {key:'netWeight',value:'净重/箱'},
-               {key:'piecesBox',value:'件数/箱'},
                {key:'grossWeight',value:'毛重/箱'},
                {key:'outerBoxLength',value:'外箱长度'},
                {key:'outerBoxWidth',value:'外箱宽度'},
                {key:'outerBoxHeight',value:'外箱高度'},
                {key:'netWeightToo',value:'净净重'},
+               {key:'boxNumber',value:'箱数'},
                ]
              for(var j=0 ; j<Valuable.length;j++){
                 if(tableRow[Valuable[j].key] == null || tableRow[Valuable[j].key] == "" || tableRow[Valuable[j].key] == undefined){
-                  this.$message.error('第'+(i+1)+'行'+Valuable[j].value+'未填,无法保存');
+                  debugger
+                  this.$message.error('第'+(i+1)+'行'+Valuable[j].value+'无值,无法保存');
+                  this.judge+=1
                   return
                 }
              }
@@ -803,107 +782,39 @@ export default {
              ]
              for(var v=0 ; v<integer.length;v++){
                 if(!Number.isInteger(Number(tableRow[integer[v].key]))){
+                  debugger
                   this.$message.error('第'+(i+1)+'行'+integer[v].value+'不为整数,无法保存');
+                  this.judge+=1
                   return
                 }
              }
 
             //  //判断小数位数
-              var Several = [
+            var Several = [
                {key:'netWeight',value:'净重/箱'},
                {key:'grossWeight',value:'毛重/箱'},
              ]
-              for(var s=0 ; s<Several.length;s++){
+            for(var s=0 ; s<Several.length;s++){
                 var position =  tableRow[Several[s].key].toString().indexOf('.')  + 1;   //小数点的位置
                 var digit = tableRow[Several[s].key].toString().length - position;  //小数的位值
                 if(digit > 2 && position!==0){
+                  debugger
                  this.$message.error('第'+(i+1)+'行'+Several[s].value+'小数超过两位,无法保存');
+                this.judge+=1
                  return 
               }
              }
 
             if(tableRow.startingBoxNumber > tableRow.endCaseNumber) {
               this.$message.error('第'+(i+1)+'行起始箱号大于结束箱号,无法保存');
+              this.judge+=1
               return;
             }
-          //   if (tableRow.startingBoxNumber == ""){
-          //     this.$message.error('第'+(i+1)+'行起始箱号未填,无法保存');
-          //     return;
-          //  }
-           //起始箱数判断
-          //  if(!Number.isInteger(Number(tableRow.startingBoxNumber))){
-          //     this.$message.error('第'+(i+1)+'行起始箱号不为整数,无法保存');
-          //     return
-          //  }
-          //  if (tableRow.endCaseNumber == ""){
-          //      this.$message.error('第'+(i+1)+'行结束箱号未填,无法保存');
-          //       return;
-          //   }
-            //结束箱数小数判断
-          //  if(!Number.isInteger(Number(tableRow.endCaseNumber))){
-          //     this.$message.error('第'+(i+1)+'行结束箱号不为整数,无法保存');
-          //     return
-          //   }
            if (tableRow.boxNumber == "" || tableRow.boxNumber == 0){
               this.$message.error('第'+(i+1)+'行箱数,无法保存');
+              this.judge+=1
               return;
            }
-          //  if (tableRow.netWeight == null || tableRow.netWeight == "" || tableRow.netWeight == undefined){
-          //    this.$message.error('第'+(i+1)+'行净重/箱未填,无法保存');
-          //    return;
-          //  }
-           //净重/箱小数判断
-          // if(!Number.isInteger(Number(tableRow.netWeight))){
-          //   var position = tableRow.netWeight.toString().indexOf('.') + 1;   //小数点的位置
-          //   var digit = tableRow.netWeight.toString().length - position;  //小数的位数
-          //   if(digit > 2){
-          //     this.$message.error('第'+(i+1)+'行净重/箱超过两位小数,无法保存');
-          //     return 
-          //   }
-          //  }
-          //  if (tableRow.piecesBox == null || tableRow.piecesBox == "" || tableRow.piecesBox == undefined){
-          //    this.$message.error('第'+(i+1)+'行件数/箱未填,无法保存');
-          //    return;
-          //  }
-           //件数/箱小数判断
-          //  if(!Number.isInteger(tableRow.piecesBox)){
-          //    for (var i=0; i<this.sizeFields.length; i++){
-          //      if (!Number.isInteger(tableRow[this.sizeFields[i]]) ){
-          //        this.$message.error('第'+(i+1)+'行'+this.sizeFields[i]+'不为整数,无法保存');
-          //        return;
-          //      }
-          //    }
-          // }
-          // if (tableRow.grossWeight == null || tableRow.grossWeight == "" || tableRow.grossWeight == undefined){
-          //   this.$message.error('第'+(i+1)+'行毛重/箱未填,无法保存');
-          //    return;
-          //   } 
-            //毛重/箱小数判断
-          // if(!Number.isInteger(Number(tableRow.grossWeight))){
-          //    var position = tableRow.grossWeight.toString().indexOf('.') + 1;   //小数点的位置
-          //     var digit = tableRow.grossWeight.toString().length - position;  //小数的位数
-          //     if(digit > 2){
-          //        this.$message.error('第'+(i+1)+'行毛重/箱超过两位小数,无法保存');
-          //        return 
-          //     }
-          // }
-          // if (tableRow.outerBoxLength == null || tableRow.outerBoxLength == "" || tableRow.outerBoxLength == undefined){
-          //    this.$message.error('第'+(i+1)+'行外箱长度未填,无法保存');
-          //    return;
-          //  }
-          // if (tableRow.outerBoxWidth == null || tableRow.outerBoxWidth == "" || tableRow.outerBoxWidth == undefined){
-          //   this.$message.error('第'+(i+1)+'行外箱宽度未填,无法保存');
-          //   return;
-          // // }
-          // if (tableRow.outerBoxHeight == null || tableRow.outerBoxHeight == "" || tableRow.outerBoxHeight == undefined){
-          //   this.$message.error('第'+(i+1)+'行外箱高度未填,无法保存');
-          //   return;
-          //  }
-          // if (tableRow.netWeightToo == null || tableRow.netWeightToo == "" || tableRow.netWeightToo == undefined){
-          //    this.$message.error('第'+(i+1)+'行净净重未填,无法保存');
-          //   return;
-          // }
-
           //尺码赋值
           for (var j=0; j<tableRow.sizeTables.length; j++){
            var sizeTable = tableRow.sizeTables[j];
@@ -912,33 +823,6 @@ export default {
           }
            tableRow.sort = ++sort;
          } 
-         if(this.editDecide === 'edit'){
-           editSpltList(newObj).then(res => {
-             if (res.success) {
-             this.$message.success('编辑成功')
-             this.close()
-             //清空信息
-             newObj = {};
-             that.fatherList() // 调用父组件 查询方法
-             }else{
-              this.$message.error(res.message)
-            }
-           })
-        }else {
-          addSpltList(newObj).then(res => {
-             if (res.success) {
-              this.$message.success('新增成功')
-              this.close()
-              //清空信息
-              newObj = {};
-             that.fatherList() // 调用父组件 查询方法
-           }else{
-             this.$message.error(res.message)
-           }
-         })
-       }
-        }
-      })
     },
 
     // 获取不同尺码数量之和
@@ -1031,7 +915,7 @@ export default {
           title: '颜色(中英文)',
           key: 'colour',
           width: 140,
-         type: JVXETypes.input,
+         type: JVXETypes.normal,
         },
         {
           title: '配码',
@@ -1049,7 +933,7 @@ export default {
           title: '箱数',
           key: 'boxNumber',
           width: 120,
-          type: JVXETypes.normal 
+          type: JVXETypes.inputNumber 
         },
         {
           title: '计划尺码数量',
@@ -1123,18 +1007,18 @@ export default {
           width: 120,
           type: JVXETypes.inputNumber,
         },
-        {
-          title: '单价',
-          key: 'unitPrice',
-          width: 120,
-          type: JVXETypes.normal,
-        },
-        {
-          title: '总价',
-          key: 'totalPrice',
-          width: 120,
-          type: JVXETypes.normal,
-        },
+        // {
+        //   title: '单价',
+        //   key: 'unitPrice',
+        //   width: 120,
+        //   type: JVXETypes.normal,
+        // },
+        // {
+        //   title: '总价',
+        //   key: 'totalPrice',
+        //   width: 120,
+        //   type: JVXETypes.normal,
+        // },
         {
           title: '备注',
           key: 'remarks',

+ 39 - 38
src/views/packing-list/packinglist-clothes/referencePrePacklist.vue

@@ -37,24 +37,24 @@
               </a-form-item>
             </a-col>
             <template v-if="toggleSearchStatus">
-               <a-col :md="6" :sm="8">
+               <!-- <a-col :md="6" :sm="8">
               <a-form-item label="分销点">
                 <a-input placeholder="请输入分销点" v-model="queryParam.distributionPoint"></a-input>
               </a-form-item>
-            </a-col>
+            </a-col> -->
             <a-col :md="6" :sm="8">
               <a-form-item label="款号">
                 <a-input placeholder="请输入款号" v-model="queryParam.itemNumber"></a-input>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="8">
+            <!-- <a-col :md="6" :sm="8">
               <a-form-item label="是否被参照">
                  <a-select v-model="queryParam.isReference" style="width: 200px" placeholder="请选择发货情况" >
                  <a-select-option value="n">未被参照</a-select-option>
                  <a-select-option value="y">已被参照</a-select-option>
                </a-select>
               </a-form-item>
-            </a-col>
+            </a-col> -->
             <a-col :md="6" :sm="8">
               <a-form-item label="发货情况">
                  <a-select v-model="queryParam.orderStatus" style="width: 200px" placeholder="请选择发货情况" >
@@ -115,15 +115,15 @@ export default {
       
       // 查询条件
       queryParam: {
-        customer: '', //客户
-        // preDeliveryDate: '', // 预发货日期\
-        stratDate:'',
-        endDate:'',
-        smallPo: '' , // 小PO
-        distributionPoint: '' , //分销点
-        itemNumber: '', //款号
-        pageNo:1,
-        isReference:'', // 是否被参照
+        // customer: '', //客户
+        // // preDeliveryDate: '', // 预发货日期\
+        // stratDate:'',
+        // endDate:'',
+        // smallPo: '' , // 小PO
+        // distributionPoint: '' , //分销点
+        // itemNumber: '', //款号
+        // pageNo:1,
+        // isReference:'', // 是否被参照
       },
       preDeliveryDate:[],
       selectedRowKeys: [], // 勾选航
@@ -176,13 +176,7 @@ export default {
           className: 'replacecolor'
         },
 
-        {
-          title: '备注',
-          dataIndex: 'u8Remarks',
-          width: 150,
-          customRender: t => ellipsis(t),
-          className: 'replacecolor'
-        },
+       
         {
           title: '客户',
           dataIndex: 'customer',
@@ -213,12 +207,12 @@ export default {
         },
 
 
-        {
-          title: '工厂单价',
-          dataIndex: 'factoryUnitPrice',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '工厂单价',
+        //   dataIndex: 'factoryUnitPrice',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
         
         {
           title: '箱数',
@@ -232,12 +226,12 @@ export default {
           width: 200,
           className: 'replacecolor'
         },
-        {
-          title: '订单类型',
-          dataIndex: 'orderType',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '订单类型',
+        //   dataIndex: 'orderType',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
         {
           title: '集装箱代号',
           dataIndex: 'containerCode',
@@ -270,12 +264,19 @@ export default {
           width: 90,
           className: 'replacecolor'
         },
-        {
-          title: '总价',
-          dataIndex: 'totalPrice',
-          width: 90,
+         {
+          title: '备注',
+          dataIndex: 'u8Remarks',
+          width: 150,
+          customRender: t => ellipsis(t),
           className: 'replacecolor'
-        },
+        }
+        // {
+        //   title: '总价',
+        //   dataIndex: 'totalPrice',
+        //   width: 90,
+        //   className: 'replacecolor'
+        // },
       ],
       advancePackingListData: [],
        pagination: {
@@ -326,7 +327,7 @@ export default {
 
     // 弹框查询按钮
     searchQuery() {
-       this.queryParam.pageNo = 1
+       this.queryParam.pageNo = ''
        this.getAdvancePackingListData()
     },
     // 重置