Pārlūkot izejas kodu

发运明细字段调整

jbb 2 gadi atpakaļ
vecāks
revīzija
2707cf8bde

+ 140 - 110
src/views/shipment-details/addShipDetDrawer.vue

@@ -35,7 +35,7 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="客户" prop="customer">
-                  <a-input placeholder="请输入客户" v-model="addShipDet.customer"></a-input>
+                  <a-input placeholder="请输入客户" v-model="addShipDet.customer" readOnly></a-input>
                 </a-form-model-item>
               </a-col>
 
@@ -63,7 +63,7 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="订单类型" prop="orderType">
-                  <a-input placeholder="请输入订单类型" v-model="addShipDet.orderType"></a-input>
+                  <a-input placeholder="请输入订单类型" v-model="addShipDet.orderType" readOnly></a-input>
                 </a-form-model-item>
               </a-col>
 
@@ -80,11 +80,11 @@
               </a-col> -->
 
               <!-- U8系统适用 -->
-              <a-col :md="12" :sm="12">
+              <!-- <a-col :md="12" :sm="12">
                 <a-form-model-item label="备注" prop="memo">
                   <a-input placeholder="U8系统适用" v-model="addShipDet.memo"></a-input>
                 </a-form-model-item>
-              </a-col>
+              </a-col> -->
             </a-row>
           </a-form-model>
         </div>
@@ -112,10 +112,16 @@
               size="small"
             >
               <!-- 款号 输入框 :rules="rules.itemNumber" -->
-              <template slot="itemNumber" slot-scope="text, record, index">
+              <!-- <template slot="itemNumber" slot-scope="text, record, index">
                 <a-form-model-item prop="itemNumber">
                   <a-input style="width:100%" type="text" v-model="record.itemNumber" readOnly />
                 </a-form-model-item>
+              </template> -->
+              <!-- 成衣工厂 :rules="rules.garmentFactory"-->
+              <template slot="garmentFactory" slot-scope="text, record, index">
+                <a-form-model-item prop="garmentFactory">
+                  <a-input style="width:100%" type="text" v-model="record.garmentFactory"/>
+                </a-form-model-item>
               </template>
 
               <!-- 发货数量 :rules="rules.shipQuantity"-->
@@ -147,14 +153,26 @@
               <!-- 采购/委外订单号 :rules="rules.purOrSubOrder"-->
               <template slot="purOrSubOrder" slot-scope="text, record, index">
                 <a-form-model-item prop="purOrSubOrder">
-                  <a-input style="width:100%" type="text" v-model="record.purOrSubOrder" readOnly/>
+                  <a-input style="width:100%" type="text" v-model="record.purOrSubOrder" />
+                </a-form-model-item>
+              </template>
+              <!-- 单价(销售) :rules="rules.salesUnitPrice"-->
+              <template slot="salesUnitPrice" slot-scope="text, record, index">
+                <a-form-model-item prop="salesUnitPrice">
+                  <a-input style="width:100%" type="text" v-model="record.salesUnitPrice"/>
+                </a-form-model-item>
+              </template>
+              <!-- 佣金 :rules="rules.ymoney"-->
+              <template slot="ymoney" slot-scope="text, record, index">
+                <a-form-model-item prop="ymoney">
+                  <a-input style="width:100%" type="text" v-model="record.ymoney" />
                 </a-form-model-item>
               </template>
 
               <!-- 报关单价 :rules="rules.customsDeclarationUnitPrice"-->
               <template slot="customsDeclarationUnitPrice" slot-scope="text, record, index">
                 <a-form-model-item prop="customsDeclarationUnitPrice">
-                  <a-input style="width:100%" type="text" v-model="record.customsDeclarationUnitPrice" readOnly/>
+                  <a-input style="width:100%" type="text" v-model="record.customsDeclarationUnitPrice" />
                 </a-form-model-item>
               </template>
               <!-- 套装件数 :rules="rules.numberOfSets"-->
@@ -264,7 +282,7 @@ export default {
       id: '',
       validatorRules:{
           documentDate:[{required: true, message: '请输入单据日期!'}],
-         // customer:[{required: true, message: '请选择客户!'}],
+         customer:[{required: true, message: '请输入客户!', trigger: 'change'}],
          // preDeliveryDate:[{required: true, message: '请选择预发货时间!'}],
          // preCompletionDate:[{required: true, message: '请选择预完工日期!'}],
          // orderType:[{required: true, message: '请输入订单类型!'}],
@@ -309,16 +327,17 @@ export default {
           className: 'replacecolor',
         
         },
-         {
-          title: '预完工日期',
-          dataIndex: 'preCompletionDate',
-          width: 100,
-          className: 'replacecolor',
+        //  {
+        //   title: '预完工日期',
+        //   dataIndex: 'preCompletionDate',
+        //   width: 100,
+        //   className: 'replacecolor',
          
-        },
+        // },
          {
           title: '成衣工厂',
           dataIndex: 'garmentFactory',
+          scopedSlots: { customRender: 'garmentFactory' },
           width: 100,
           className: 'replacecolor'
         },
@@ -328,13 +347,13 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
-        {
-          title: '客户订单',
-          dataIndex: 'customerOrder',
-          width: 120,
+        // {
+        //   title: '客户订单',
+        //   dataIndex: 'customerOrder',
+        //   width: 120,
 
-          className: 'replacecolor'
-        },
+        //   className: 'replacecolor'
+        // },
         {
           title: '小po',
           dataIndex: 'smallPo',
@@ -361,14 +380,36 @@ export default {
           width: 180,
           className: 'replacecolor'
         },
+        {
+          title: '单价(销售)',
+          // scopedSlots: { customRender: 'salesUnitPrice' },
+          dataIndex: 'salesUnitPrice',
+          width: 120,
+          className: 'replacecolor'
+        },
+          {
+          title: '佣金',
+          // scopedSlots: { customRender: 'ymoney' },
+          dataIndex: 'ymoney',
+          width: 120,
+          className: 'replacecolor'
+        },
+
         {
           title: ' 报关单价',
           dataIndex: 'customsDeclarationUnitPrice',
-          scopedSlots: { customRender: 'customsDeclarationUnitPrice' },
+          // scopedSlots: { customRender: 'customsDeclarationUnitPrice' },
           // fixed: 'left',
           width: 180,
           className: 'replacecolor'
         },
+         {
+          title: '工厂单价',
+          dataIndex: 'factoryUnitPrice',
+          width: 120,
+          // scopedSlots: { customRender: 'factoryUnitPrice' },
+          className: 'replacecolor'
+        },
 
         {
           title: '订单数量',
@@ -407,17 +448,17 @@ export default {
         {
           title: '物料成分',
           dataIndex: 'materialComposition',
-          scopedSlots: { customRender: 'materialComposition' },
+          // scopedSlots: { customRender: 'materialComposition' },
           width: 140,
           className: 'replacecolor'
         },
 
-        {
-          title: '销售类型',
-          dataIndex: 'salesTypeText',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '销售类型',
+        //   dataIndex: 'salesTypeText',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
         {
           title: '客户简称',
           dataIndex: 'customerAbbreviation',
@@ -490,33 +531,16 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
-        {
-          title: '佣金',
-          dataIndex: 'ymoney',
-          width: 120,
-          className: 'replacecolor'
-        },
-
-        {
-          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: 'termOfPayment',
+        //   width: 160,
+        //   customRender: t => ellipsis(t),
+        //   className: 'replacecolor'
+        // },
         {
           title: '最终客户',
           dataIndex: 'endCustomer',
@@ -530,20 +554,20 @@ export default {
           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: 'priceRemarks',
+        //   width: 160,
+        //   customRender: t => ellipsis(t),
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '订单变更说明',
+        //   dataIndex: 'orderChangeDescription',
+        //   width: 160,
+        //   customRender: t => ellipsis(t),
+        //   className: 'replacecolor'
+        // },
 
         {
           title: '处理方式',
@@ -587,7 +611,9 @@ export default {
       syShippingDetailsItemList: [], // 子表数据
       msgFormSon: 'test', // 子组件传来数据的变量
       manualYarnDisabled: false, //手工纱单价和手工纱占比可输入
-      addShipDet: {}, // 主表信息
+      addShipDet: {
+        documentDate:moment(new Date()).format('YYYY-MM-DD'),
+      }, // 主表信息
       visible: false,
       confirmLoading: false,
       dateFormat: 'YYYY-MM-DD',
@@ -606,34 +632,13 @@ export default {
   },
 
   methods: {
+    moment,
     //默认预发货日期
     defalutDate(){
-     Date.prototype.format = function(fmt) { 
-        var o = { 
-           "M+" : this.getMonth()+1,                 //月份 
-           "Y+" : this.getFullYear(),                 //年 
-           "d+" : this.getDate(),                    //日 
-           "h+" : this.getHours(),                   //小时 
-           "m+" : this.getMinutes(),                 //分 
-           "s+" : this.getSeconds(),                 //秒 
-           "q+" : Math.floor((this.getMonth()+3)/3), //季度 
-           "S"  : this.getMilliseconds()             //毫秒 
-        }; 
-        if(/(Y+)/.test(fmt)) {
-            fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); 
-        }
-        for(var k in o) {
-        if(new RegExp("("+ k +")").test(fmt)){
-             fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
-         }
-        }
-        return fmt; 
-       }  
-        var now = new Date(); //当前日期 
-        var nowMonth = now.getMonth(); //当前月 
-        var nowYear = now.getFullYear(); //当前年 
-        //本月的开始时间
-        this.monthStartDate = new Date(nowYear, nowMonth, 1).format('YYYY-MM-dd'); 
+     var now = new Date(); //当前日期 
+      var nowMonth = now.getMonth(); //当前月 
+      var nowYear = now.getFullYear(); //当前年
+      this.monthStartDate = moment(new Date(nowYear, nowMonth, 1)).format('YYYY-MM-DD');  
     },
 
     //参照数据重置,恢复默认值
@@ -646,7 +651,8 @@ export default {
     getSon(val) {
       this.manualYarnDisabled = false //初始化manualYarnDisabled
       var copyValList = JSON.parse(JSON.stringify(val));
-      this.addShipDet.customer = copyValList[0].customerName;
+      this.$set( this.addShipDet,'customer',copyValList[0].customerName)
+      // this.addShipDet.customer = copyValList[0].customerName;
       console.log(copyValList);
       for (var i in copyValList) {
         copyValList[i]['orderQuantity'] = copyValList[i].quantity
@@ -664,16 +670,17 @@ export default {
         item.manualYarnUnitPrice = null
         item.manualYarnProportion = null
       })
-      this.$forceUpdate()
+            this.$forceUpdate()
     },
     // 参照订单数据
     referOrderDataOpen() {
+      console.log(this.addShipDet.documentDate)
       this.$refs.referOrderDataModal.range = []
       if(this.syShippingDetailsItemList.length !== 0){
         this.$refs.referOrderDataModal.fatherData.push(this.syShippingDetailsItemList[0]) 
       }
       this.$refs.referOrderDataModal.referOrderDataModVis = true
-      this.defalutDate()
+      this.defalutDate() 
       this.$refs.referOrderDataModal.range.push(this.monthStartDate)     
       this.$refs.referOrderDataModal.queryParam.preDeliveryDateS = this.monthStartDate;
       this.$refs.referOrderDataModal.queryParam.preDeliveryDateE  = '';
@@ -683,12 +690,13 @@ export default {
     // 新增 保存
     addSave() {
       const that = this;
+      console.log(this.addShipDet)
       // 触发表单验证
       this.$refs.form.validate(valid => {
       if (valid) {
         var newObj = {} // 新增对象
         newObj.documentNo = this.addShipDet.documentNo
-        newObj.documentDate = this.addShipDet.documentDate.format('YYYY-MM-DD')
+        newObj.documentDate = this.addShipDet.documentDate
         newObj.customer = this.addShipDet.customer
         //newObj.preDeliveryDate = this.addShipDet.preDeliveryDate.format('YYYY-MM-DD') // 预发货日期
         //newObj.preCompletionDate = this.addShipDet.preCompletionDate.format('YYYY-MM-DD') // 预完工日期
@@ -801,16 +809,36 @@ export default {
               }
              }   
           }
-          //判断当是手册纱时,手册纱单价和手册纱占比是否为空
+          //必填项
           for (var i=0; i<newObj.syShippingDetailsItemList.length; i++){
             var rowData = newObj.syShippingDetailsItemList[i];
-            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
+            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 => {
@@ -818,8 +846,8 @@ export default {
               this.$message.success('新增成功');
               this.close();
               // 清空信息
-              this.addShipDet = {};
-              this.addShipDet.syShippingDetailsItemList = [];
+              // this.addShipDet = {};
+              // this.addShipDet.syShippingDetailsItemList = [];
               // this.fatherList(); // 调用父组件 查询方法
               // this.msgFormSon = {}  清空子表信息
             }else{
@@ -899,7 +927,9 @@ export default {
     close() {
       this.$emit('close');
       this.visible = false;
-      this.addShipDet = {};
+      this.addShipDet = {
+        documentDate:moment(new Date()).format('YYYY-MM-DD')
+      };
       this.syShippingDetailsItemList = [];
     },
 

+ 137 - 118
src/views/shipment-details/editShipDetDrawer.vue

@@ -27,7 +27,7 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="客户" prop="customer">
-                  <a-input placeholder="请输入客户" v-model="editShipDet.customer"></a-input>
+                  <a-input placeholder="请输入客户" v-model="editShipDet.customer" readOnly></a-input>
                 </a-form-model-item>
               </a-col>
 
@@ -39,11 +39,11 @@
               </a-col>
 
 
-              <a-col :md="12" :sm="12">
+              <!-- <a-col :md="12" :sm="12">
                 <a-form-model-item label="备注" prop="memo">
                   <a-input placeholder="请输入备注" v-model="editShipDet.memo"></a-input>
                 </a-form-model-item>
-              </a-col>
+              </a-col> -->
             </a-row>
           </a-form-model>
         </div>
@@ -70,16 +70,22 @@
               @change="handleTableChange"
             >
               <!-- 款号 输入框 :rules="rules.itemNumber" -->
-              <template slot="itemNumber" slot-scope="text, record, index">
+              <!-- <template slot="itemNumber" slot-scope="text, record, index">
                 <a-form-model-item prop="itemNumber">
-                  <a-input style="width:100%" type="text" v-model="record.itemNumber" />
+                  <a-input style="width:100%" type="text" v-model="record.itemNumber" readOnly />
+                </a-form-model-item>
+              </template> -->
+              <!-- 成衣工厂 :rules="rules.garmentFactory"-->
+              <template slot="garmentFactory" slot-scope="text, record, index">
+                <a-form-model-item prop="garmentFactory">
+                  <a-input style="width:100%" type="text" v-model="record.garmentFactory"/>
                 </a-form-model-item>
               </template>
 
               <!-- 发货数量 :rules="rules.shipQuantity"-->
               <template slot="shipmentQuantity" slot-scope="text, record, index">
                 <a-form-model-item prop="shipmentQuantity">
-                  <a-input style="width:100%" type="text" v-model="record.shipmentQuantity" />
+                  <a-input style="width:100%" type="text" v-model="record.shipmentQuantity"    />
                 </a-form-model-item>
               </template>
 
@@ -105,36 +111,42 @@
               <!-- 采购/委外订单号 :rules="rules.purOrSubOrder"-->
               <template slot="purOrSubOrder" slot-scope="text, record, index">
                 <a-form-model-item prop="purOrSubOrder">
-                  <a-input style="width:100%" type="text" v-model="record.purOrSubOrder" readOnly />
+                  <a-input style="width:100%" type="text" v-model="record.purOrSubOrder" />
+                </a-form-model-item>
+              </template>
+              <!-- 单价(销售) :rules="rules.salesUnitPrice"-->
+              <template slot="salesUnitPrice" slot-scope="text, record, index">
+                <a-form-model-item prop="salesUnitPrice">
+                  <a-input style="width:100%" type="text" v-model="record.salesUnitPrice"/>
+                </a-form-model-item>
+              </template>
+              <!-- 佣金 :rules="rules.ymoney"-->
+              <template slot="ymoney" slot-scope="text, record, index">
+                <a-form-model-item prop="ymoney">
+                  <a-input style="width:100%" type="text" v-model="record.ymoney" />
                 </a-form-model-item>
               </template>
 
               <!-- 报关单价 :rules="rules.customsDeclarationUnitPrice"-->
               <template slot="customsDeclarationUnitPrice" slot-scope="text, record, index">
                 <a-form-model-item prop="customsDeclarationUnitPrice">
-                  <a-input style="width:100%" type="text" v-model="record.customsDeclarationUnitPrice"  />
+                  <a-input style="width:100%" type="text" v-model="record.customsDeclarationUnitPrice" />
                 </a-form-model-item>
               </template>
               <!-- 套装件数 :rules="rules.numberOfSets"-->
               <template slot="numberOfSets" slot-scope="text, record, index">
                 <a-form-model-item prop="numberOfSets">
-                  <a-input style="width:100%" type="text" v-model="record.numberOfSets" />
+                  <a-input style="width:100%" type="text" v-model="record.numberOfSets"  />
                 </a-form-model-item>
               </template>
 
               <!-- 工厂单价 :rules="rules.factoryUnitPrice"-->
               <template slot="factoryUnitPrice" slot-scope="text, record, index">
                 <a-form-model-item prop="factoryUnitPrice">
-                  <a-input style="width:100%" type="text" v-model="record.factoryUnitPrice" />
+                  <a-input style="width:100%" type="text" v-model="record.factoryUnitPrice"   />
                 </a-form-model-item>
               </template>
 
-              <!-- 申报要素 :rules="rules.declarationElements"-->
-              <template slot="declarationElements" slot-scope="text, record, index">
-                <a-form-model-item prop="declarationElements">
-                  <a-input style="width:100%" type="text" v-model="record.declarationElements" />
-                </a-form-model-item>
-              </template>
               <!--处理方式 -->
               <template slot="treatmentMethod" slot-scope="text, record, index">
                 <a-form-model-item prop="treatmentMethod">
@@ -155,17 +167,18 @@
               <!--手册纱单价 -->
               <template slot="manualYarnUnitPrice" slot-scope="text, record, index">
                 <a-form-model-item prop="manualYarnUnitPrice">
-                  <a-input style="width:100%" type="text" v-model="record.manualYarnUnitPrice"  :disabled='manualYarnDisabled'  @change="changeManualYarn('Price',record.manualYarnUnitPrice)"/>
+                  <a-input style="width:100%" type="text" v-model="record.manualYarnUnitPrice" :disabled='manualYarnDisabled' @change="changeManualYarn('Price',record.manualYarnUnitPrice)" />
                 </a-form-model-item>
               </template>
 
               <!--手册纱占比 -->
               <template slot="manualYarnProportion" slot-scope="text, record, index">
                 <a-form-model-item prop="manualYarnProportion">
-                  <a-input style="width:100%" type="text" v-model="record.manualYarnProportion"  :disabled='manualYarnDisabled' @change="changeManualYarn('Proportion',record.manualYarnProportion)"/>
+                  <a-input style="width:100%" type="text" v-model="record.manualYarnProportion"  :disabled='manualYarnDisabled' @change="changeManualYarn('Proportion',record.manualYarnProportion)" />
                 </a-form-model-item>
               </template>
 
+
               <!-- 操作 -->
               <span slot="operationSlot" slot-scope="text, record">
                 <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
@@ -232,7 +245,7 @@ export default {
         btnDisabled:true,//参照数据按钮禁止使用
       // 表头
       columns: [
-        {
+      {
           title: '账套',
           dataIndex: 'account',
           width: 80,
@@ -253,38 +266,34 @@ export default {
           width: 180,
           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'
+          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: 'preCompletionDate',
+        //   width: 100,
+        //   className: 'replacecolor',
          
-        },
+        // },
          {
           title: '成衣工厂',
           dataIndex: 'garmentFactory',
+          scopedSlots: { customRender: 'garmentFactory' },
           width: 100,
           className: 'replacecolor'
         },
@@ -294,14 +303,13 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
+        // {
+        //   title: '客户订单',
+        //   dataIndex: 'customerOrder',
+        //   width: 120,
 
-        {
-          title: '客户订单',
-          dataIndex: 'customerOrder',
-          width: 120,
-
-          className: 'replacecolor'
-        },
+        //   className: 'replacecolor'
+        // },
         {
           title: '小po',
           dataIndex: 'smallPo',
@@ -328,14 +336,36 @@ export default {
           width: 180,
           className: 'replacecolor'
         },
+        {
+          title: '单价(销售)',
+          // scopedSlots: { customRender: 'salesUnitPrice' },
+          dataIndex: 'salesUnitPrice',
+          width: 120,
+          className: 'replacecolor'
+        },
+          {
+          title: '佣金',
+          // scopedSlots: { customRender: 'ymoney' },
+          dataIndex: 'ymoney',
+          width: 120,
+          className: 'replacecolor'
+        },
+
         {
           title: ' 报关单价',
           dataIndex: 'customsDeclarationUnitPrice',
-          scopedSlots: { customRender: 'customsDeclarationUnitPrice' },
+          // scopedSlots: { customRender: 'customsDeclarationUnitPrice' },
           // fixed: 'left',
           width: 180,
           className: 'replacecolor'
         },
+         {
+          title: '工厂单价',
+          dataIndex: 'factoryUnitPrice',
+          width: 120,
+          // scopedSlots: { customRender: 'factoryUnitPrice' },
+          className: 'replacecolor'
+        },
 
         {
           title: '订单数量',
@@ -355,7 +385,6 @@ export default {
           dataIndex: 'shipmentQuantity',
           scopedSlots: { customRender: 'shipmentQuantity' },
           width: 120,
-          className: 'replacecolor'
         },
 
         {
@@ -367,7 +396,7 @@ export default {
         },
         {
           title: '是否TC功能',
-          dataIndex: 'isTc',
+          dataIndex: 'isTC',
           width: 90,
           scopedSlots: { customRender: 'isTC' },
           className: 'replacecolor'
@@ -375,29 +404,31 @@ export default {
         {
           title: '物料成分',
           dataIndex: 'materialComposition',
-          scopedSlots: { customRender: 'materialComposition' },
+          // scopedSlots: { customRender: 'materialComposition' },
           width: 140,
           className: 'replacecolor'
         },
 
-        {
-          title: '销售类型',
-          dataIndex: 'salesTypeText',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '销售类型',
+        //   dataIndex: 'salesTypeText',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
         {
           title: '客户简称',
           dataIndex: 'customerAbbreviation',
           width: 220,
+          align: 'left',
           className: 'replacecolor'
         },
         {
           title: '客户名称',
           dataIndex: 'customerName',
           width: 300,
+          align: 'left',
           className: 'replacecolor',
-          customRender: t => ellipsis(t),
+           customRender: t => ellipsis(t),
         },
         {
           title: '汇率',
@@ -405,12 +436,6 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
-        // {
-        //   title: '整单(合计)',
-        //   dataIndex: 'wholeOrderTotal',
-        //   width: 120,
-        //   className: 'replacecolor'
-        // },
 
         {
           title: '销售部门',
@@ -435,13 +460,13 @@ export default {
           title: '品牌方',
           dataIndex: 'brandSide',
           width: 180,
-          className: 'replacecolor',
-          customRender: t => ellipsis(t),
+          className: 'replacecolor'
         },
         {
           title: '第三方',
           dataIndex: 'thirdParty',
           width: 220,
+          align: 'left',
           className: 'replacecolor'
         },
         {
@@ -462,33 +487,16 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
-        {
-          title: '佣金',
-          dataIndex: 'ymoney',
-          width: 120,
-          className: 'replacecolor'
-        },
-
-        {
-          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: 'termOfPayment',
+        //   width: 160,
+        //   customRender: t => ellipsis(t),
+        //   className: 'replacecolor'
+        // },
         {
           title: '最终客户',
           dataIndex: 'endCustomer',
@@ -502,29 +510,20 @@ export default {
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
-
-        {
-          title: '申报要素',
-          dataIndex: 'declarationElements',
-          width: 160,
-          scopedSlots: { customRender: 'declarationElements' },
-          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: 'priceRemarks',
+        //   width: 160,
+        //   customRender: t => ellipsis(t),
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '订单变更说明',
+        //   dataIndex: 'orderChangeDescription',
+        //   width: 160,
+        //   customRender: t => ellipsis(t),
+        //   className: 'replacecolor'
+        // },
 
         {
           title: '处理方式',
@@ -700,13 +699,33 @@ export default {
           //判断当是手册纱时,手册纱单价和手册纱占比是否为空
           for (var i=0; i<this.editShipDet.syShippingDetailsItemList.length; i++){
             var rowData = this.editShipDet.syShippingDetailsItemList[i];
-            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
+            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 => {
             if (res.success) {

+ 211 - 191
src/views/shipment-details/referOrderDataModal.vue

@@ -13,13 +13,7 @@
       <div class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="searchQuery">
           <a-row :gutter="24">
-            <a-col :md="6" :sm="8">
-              <a-form-item label="订单号">
-                <a-input placeholder="请输入订单号" v-model="queryParam.orderNumber"></a-input>
-              </a-form-item>
-            </a-col>
-
-            <a-col :md="6" :sm="8">
+            <a-col :md="5" :sm="8">
               <a-form-item label="账套">
                 <j-search-select-tag
                   placeholder="请选择账套"
@@ -28,7 +22,13 @@
                 </j-search-select-tag>
               </a-form-item>
             </a-col>
-             <a-col :md="6" :sm="8">
+            <a-col :md="5" :sm="8">
+              <a-form-item label="款号">
+                <a-input placeholder="请输入订单号" v-model="queryParam.itemNumber"></a-input>
+              </a-form-item>
+            </a-col>
+
+             <a-col :md="5" :sm="8">
                 <a-form-model-item label="类型">
                   <a-select v-model="queryParam.flourOrGarment">
                     <a-select-option value="">请选择</a-select-option>
@@ -37,13 +37,25 @@
                   </a-select>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="5" :sm="8">
+               <a-form-item label="预发货日期">
+                  <a-range-picker
+                    style="width: 100%"
+                    :mode="rangeMode"
+                    :placeholder="['开始日期', '结束日期']"
+                    :value="range"
+                    format = "YYYY-MM-DD"
+                    @change="rangeSelectChange"
+                  />
+                </a-form-item>
+              </a-col>
             <template v-if="toggleSearchStatus">
-              <a-col :md="6" :sm="8">
+              <a-col :md="5" :sm="8">
                 <a-form-item label="业务员">
                   <a-input placeholder="请输入业务员" v-model="queryParam.salesman"></a-input>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="8">
+              <!-- <a-col :md="5" :sm="8">
                 <a-form-item label="客户">
                   <j-search-select-tag
                     placeholder="请选择客户"
@@ -51,14 +63,14 @@
                     dict="view_customer,customerfullname,customerfullname">
                   </j-search-select-tag>
                 </a-form-item>              
-              </a-col>
-              <a-col :md="6" :sm="8">
+              </a-col> -->
+              <a-col :md="5" :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-col :md="5" :sm="8">
                 <a-form-item label="订单日期">
                   <a-range-picker
                     style="width: 100%"
@@ -70,23 +82,10 @@
                   />
                 </a-form-item>
               </a-col>
-
-              <a-col :md="6" :sm="8">
-               <a-form-item label="预发货日期">
-                  <a-range-picker
-                    style="width: 100%"
-                    :mode="rangeMode"
-                    :placeholder="['开始日期', '结束日期']"
-                    :value="range"
-                    format = "YYYY-MM-DD"
-                    @change="rangeSelectChange"
-                  />
-                </a-form-item>
-              </a-col>
             </template>
 
 
-            <a-col :md="6" :sm="8">
+            <a-col :md="4" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                 <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
@@ -155,7 +154,12 @@ export default {
           fixed: 'left',
           className: 'replacecolor'
         },
-
+         {
+          title: '预发货日期',
+          dataIndex: 'preDeliveryDate',
+          width: 120,
+          className: 'replacecolor'
+        },
         {
           title: '小po',
           dataIndex: 'smallPo',
@@ -163,30 +167,24 @@ export default {
           className: 'replacecolor'
         },
         // 账套替换
-        {
-          title: '账套',
-          dataIndex: 'account',
-          width: 80,
-          className: 'replacecolor'
-        },
-        {
-          title: '预发货日期',
-          dataIndex: 'preDeliveryDate',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '账套',
+        //   dataIndex: 'account',
+        //   width: 80,
+        //   className: 'replacecolor'
+        // },
          {
           title: '预完工日期',
           dataIndex: 'preCompletionDate',
           width: 120,
           className: 'replacecolor'
         },
-        {
-          title: 'packId',
-          dataIndex: 'packId',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: 'packId',
+        //   dataIndex: 'packId',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
         {
           title: '分销点',
           dataIndex: 'distributionPoint',
@@ -244,12 +242,12 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
-        {
-          title: '含税单价',
-          dataIndex: 'unitPriceIncludingTax',
-          width: 100,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '含税单价',
+        //   dataIndex: 'unitPriceIncludingTax',
+        //   width: 100,
+        //   className: 'replacecolor'
+        // },
          {
           title: '成衣工厂',
           dataIndex: 'garmentFactory',
@@ -262,32 +260,32 @@ export default {
         //   width: 100,
         //   className: 'replacecolor'
         // },
-        {
-          title: '业务类型',
-          dataIndex: 'businessTypeText',
-          width: 100,
-          className: 'replacecolor'
-        },
-        {
-          title: '客户订单',
-          dataIndex: 'customerOrderNumber',
-          width: 100,
-          className: 'replacecolor'
-        },
-        {
-          title: '销售类型',
-          dataIndex: 'salesTypeText',
-          width: 100,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '业务类型',
+        //   dataIndex: 'businessTypeText',
+        //   width: 100,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '客户订单',
+        //   dataIndex: 'customerOrderNumber',
+        //   width: 100,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '销售类型',
+        //   dataIndex: 'salesTypeText',
+        //   width: 100,
+        //   className: 'replacecolor'
+        // },
 
-        {
-          title: '客户简称',
-          dataIndex: 'customerAbbreviation',
-          width: 220,
-          align: 'left',
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '客户简称',
+        //   dataIndex: 'customerAbbreviation',
+        //   width: 220,
+        //   align: 'left',
+        //   className: 'replacecolor'
+        // },
         {
           title: '客户名称',
           dataIndex: 'customerName',
@@ -295,24 +293,24 @@ export default {
           width: 220,
           className: 'replacecolor'
         },
-         {
-          title: '供应商编码',
-          dataIndex: 'supplierCode',
-          width: 100,
-          className: 'replacecolor'
-        },
+        //  {
+        //   title: '供应商编码',
+        //   dataIndex: 'supplierCode',
+        //   width: 100,
+        //   className: 'replacecolor'
+        // },
         {
           title: '供应商',
           dataIndex: 'supplier',
           width: 120,
           className: 'replacecolor'
         },
-        {
-          title: '汇率',
-          dataIndex: 'exchangeRate',
-          width: 100,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '汇率',
+        //   dataIndex: 'exchangeRate',
+        //   width: 100,
+        //   className: 'replacecolor'
+        // },
         // {
         //   title: '整单合计',
         //   dataIndex: 'wholeOrderTotal',
@@ -320,76 +318,76 @@ export default {
         //   className: 'replacecolor'
         // },
 
-        {
-          title: '销售部门',
-          dataIndex: 'salesDepartment',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '业务员',
-          dataIndex: 'salesman',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '币种',
-          dataIndex: 'currencyText',
-          width: 100,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '销售部门',
+        //   dataIndex: 'salesDepartment',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '业务员',
+        //   dataIndex: 'salesman',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '币种',
+        //   dataIndex: 'currencyText',
+        //   width: 100,
+        //   className: 'replacecolor'
+        // },
 
-        {
-          title: '品牌方',
-          dataIndex: 'brandSide',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '第三方',
-          dataIndex: 'thirdParty',
-          width: 220,
-          align: 'left',
-          className: 'replacecolor'
-        },
-        {
-          title: '定金比例(%)',
-          dataIndex: 'depositRatio',
-          width: 100,
-          className: 'replacecolor'
-        },
-        {
-          title: '定金',
-          dataIndex: 'deposit',
-          width: 100,
-          className: 'replacecolor'
-        },
-        {
-          title: '协同路线',
-          dataIndex: 'collaborativeRoute',
-          width: 100,
-          className: 'replacecolor'
-        },
-        {
-          title: '付款条件',
-          dataIndex: 'termOfPayment',
-          width: 120,
-          customRender: t => ellipsis(t),
-          className: 'replacecolor'
-        },
-        {
-          title: '最终客户',
-          dataIndex: 'endCustomer',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '订单备注',
-          dataIndex: 'orderRemarks',
-          width: 280,
-          customRender: t => ellipsis(t),
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '品牌方',
+        //   dataIndex: 'brandSide',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '第三方',
+        //   dataIndex: 'thirdParty',
+        //   width: 220,
+        //   align: 'left',
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '定金比例(%)',
+        //   dataIndex: 'depositRatio',
+        //   width: 100,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '定金',
+        //   dataIndex: 'deposit',
+        //   width: 100,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '协同路线',
+        //   dataIndex: 'collaborativeRoute',
+        //   width: 100,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '付款条件',
+        //   dataIndex: 'termOfPayment',
+        //   width: 120,
+        //   customRender: t => ellipsis(t),
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '最终客户',
+        //   dataIndex: 'endCustomer',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '订单备注',
+        //   dataIndex: 'orderRemarks',
+        //   width: 280,
+        //   customRender: t => ellipsis(t),
+        //   className: 'replacecolor'
+        // },
         // {
         //   title: '价格备注',
         //   dataIndex: 'priceRemarks',
@@ -397,33 +395,33 @@ export default {
         //   customRender: t => ellipsis(t),
         //   className: 'replacecolor'
         // },
-        {
-          title: '订单变更说明',
-          dataIndex: 'orderChangeDescription',
-          width: 220,
-          customRender: t => ellipsis(t),
-          className: 'replacecolor'
-        },
-         {
-          title: '订单日期',
-          dataIndex: 'orderDate',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '订单主表ID',
-          dataIndex: 'syOrderDataId',
-          width: 120,
-          // fixed: 'right',
-          className: 'replacecolor1'
-        },
-        {
-          title: '订单子表ID',
-          dataIndex: 'syOrderDataItemId',
-          width: 450,
-          // fixed: 'right',
-          className: 'replacecolor'
-        }
+        // {
+        //   title: '订单变更说明',
+        //   dataIndex: 'orderChangeDescription',
+        //   width: 220,
+        //   customRender: t => ellipsis(t),
+        //   className: 'replacecolor'
+        // },
+        //  {
+        //   title: '订单日期',
+        //   dataIndex: 'orderDate',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: '订单主表ID',
+        //   dataIndex: 'syOrderDataId',
+        //   width: 120,
+        //   // fixed: 'right',
+        //   className: 'replacecolor1'
+        // },
+        // {
+        //   title: '订单子表ID',
+        //   dataIndex: 'syOrderDataItemId',
+        //   width: 450,
+        //   // fixed: 'right',
+        //   className: 'replacecolor'
+        // }
       ],
       orderListData: [], //订单数据
       confirmLoading: false,
@@ -433,7 +431,7 @@ export default {
 
       // 查询条件
       queryParam: {
-        orderNumber: '', // 订单号
+        itemNumber: '', // 订单号
         smallPo:'',//小po
         account: '', //账套
         pageSize:100,
@@ -505,7 +503,13 @@ export default {
           this.$message.error(this.errorFather +'至少一项不相同!');
            this.errorFather = ''
       }else{
-        confimOrderData(this.confimList).then(res => {
+        var garment = ''
+        if(this.queryParam.flourOrGarment == 1){
+          garment = '成衣'
+        }else {
+           garment = '面料'
+        }
+        confimOrderData({itemId:this.confimList,tOrf:garment}).then(res => {
           if (res.success) {
             this.propList = res.result;
             this.$emit('bao', this.propList);
@@ -584,23 +588,39 @@ export default {
     },
 
     searchQuery() {
+
       if(this.queryParam.flourOrGarment === ''){
         this.$message.error('请选择查询类型!');
       }else if(this.queryParam.account === ''){
         this.$message.error('请选择账套号!');
-      }else {
-           this.queryParam.pageNo = '';
+      }else if(this.range.length == 1 || this.range.length == 0){
+        this.$message.error('请选择预发货时间区间!');
+      }else{
+         var separator = "-"; //日期分隔符  
+         var startDates = this.queryParam.preDeliveryDateS.split(separator);  
+         var endDates = this.queryParam.preDeliveryDateE.split(separator);  
+         var startDate = new Date(startDates[0], startDates[1]-1, startDates[2]);  
+         var endDate = new Date(endDates[0], endDates[1]-1, endDates[2]);  
+        var timeInterval= parseInt(Math.abs(endDate - startDate ) / 1000 / 60 / 60 /24) + 1;
+        if(timeInterval > 31 ){
+           this.$message.error('预发货时间区间超过31天,请重新选择!');
+           this.range = []
+           this.queryParam.preDeliveryDateS = ''
+           this.queryParam.preDeliveryDateE = ''
+        }else{
+          this.queryParam.pageNo = '';
            this.getOrderList();
+        }
       }
     },
 
     // 重置
     searchReset() {
-      this.queryParam.orderNumber = '';
+      this.queryParam.itemNumber = '';
       this.queryParam.smallPo = ''
       this.queryParam.account = '';
       this.queryParam.salesman = '';
-      this.queryParam.customerName = '';
+      // this.queryParam.customerName = '';
       this.dateRange = [];
       this.range = [];
       this.queryParam.flourOrGarment = '';

+ 59 - 56
src/views/shipment-details/shipmentList.vue

@@ -6,19 +6,19 @@
     <a-card :bordered="false">
       <div class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="searchQuery">
-          <a-row :gutter="24">
-            <a-col :md="6" :sm="8">
+          <a-row :gutter="25">
+            <a-col :md="5" :sm="8">
               <a-form-item label="订单号">
                 <a-input placeholder="请输入订单号" v-model="queryParam.orderNumber"></a-input>
               </a-form-item>
             </a-col>
 
-            <a-col :md="6" :sm="8">
+            <a-col :md="5" :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="5" :sm="8">
                 <a-form-model-item label="类型">
                   <a-select v-model="queryParam.flourOrGarment">
                     <a-select-option value="">请选择</a-select-option>
@@ -28,14 +28,27 @@
                 </a-form-model-item>
               </a-col>
 
+              
+            <a-col :md="5" :sm="8">
+              <a-form-item label="预发货日期">
+                <a-range-picker
+                  :placeholder="['开始时间', '结束时间']"
+                  format="YYYY-MM-DD"
+                  style="width: 100%"
+                  v-model="preDeliveryDate"
+                  @change="deliveryDateChange"
+                />
+              </a-form-item>
+            </a-col>
+
             <template v-if="toggleSearchStatus">
-             <a-col :md="6" :sm="8">
+             <a-col :md="5" :sm="8">
                 <a-form-item label="业务员">
                   <a-input placeholder="请输入业务员" v-model="queryParam.salesman"></a-input>
                 </a-form-item>
               </a-col>
               
-              <a-col :md="6" :sm="8">
+              <a-col :md="5" :sm="8">
                 <a-form-item label="是否被参照">
                   <a-select v-model="queryParam.refer">
                     <a-select-option value="">请选择</a-select-option>
@@ -45,7 +58,7 @@
                 </a-form-item>
               </a-col>
 
-             <a-col :md="6" :sm="8">
+             <a-col :md="5" :sm="8">
               <a-form-item label="起始时间">
                 <a-range-picker
                   style="width: 100%"
@@ -58,19 +71,8 @@
               </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="deliveryDateChange"
-                />
-              </a-form-item>
-            </a-col>
 
-              <a-col :md="6" :sm="8">
+              <a-col :md="5" :sm="8">
                 <a-form-item label="供应商">
                   <a-input placeholder="请输入供应商" v-model="queryParam.supplier"></a-input>
                 </a-form-item>
@@ -78,7 +80,7 @@
 
             </template>
 
-            <a-col :md="6" :sm="8">
+            <a-col :md="4" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                 <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
@@ -288,6 +290,13 @@ export default {
       loading: false, // 表格加载
       id: '',
       shipmentListColumns: [
+        {
+          title: '账套',
+          dataIndex: 'account',
+          width: 90,
+           fixed: 'left',
+          className: 'replacecolor'
+        },
         {
           title: '单据号',
           dataIndex: 'documentNo',
@@ -372,17 +381,17 @@ export default {
           },
           className: 'replacecolor'
         },
-        {
-          title: '预完工日期',
-          dataIndex: 'preCompletionDate',
-          width: 120,
-          customRender: text => {
-            if (text == "" || text == null)
-              return "";
-            return moment(text).format('YYYY-MM-DD')
-          },
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '预完工日期',
+        //   dataIndex: 'preCompletionDate',
+        //   width: 120,
+        //   customRender: text => {
+        //     if (text == "" || text == null)
+        //       return "";
+        //     return moment(text).format('YYYY-MM-DD')
+        //   },
+        //   className: 'replacecolor'
+        // },
 
         {
           title: '存货名称',
@@ -398,13 +407,13 @@ export default {
         //   className: 'replacecolor',
         //   customRender: t => ellipsis(t),
         // },
-        {
-          title: '单价(销售)',
-          dataIndex: 'salesUnitPrice',
-          width: 120,
-          className: 'replacecolor',
+        // {
+        //   title: '单价(销售)',
+        //   dataIndex: 'salesUnitPrice',
+        //   width: 120,
+        //   className: 'replacecolor',
           
-        },
+        // },
 
         {
           title: '采购/委外订单号',
@@ -412,19 +421,19 @@ export default {
           width: 180,
           className: 'replacecolor'
         },
-        {
-          title: '订单类型',
-          dataIndex: 'orderType',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          // (采购/委外单价)
-          title: '工厂单价',
-          dataIndex: 'factoryUnitPrice',
-          width: 120,
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '订单类型',
+        //   dataIndex: 'orderType',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   // (采购/委外单价)
+        //   title: '工厂单价',
+        //   dataIndex: 'factoryUnitPrice',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
         // {
         //   title: '申报要素(单证维护)',
         //   dataIndex: 'declarationElements',
@@ -477,12 +486,6 @@ export default {
           width: 90,
           className: 'replacecolor'
         },
-        {
-          title: '账套',
-          dataIndex: 'account',
-          width: 90,
-          className: 'replacecolor'
-        },
         {
           title: '推送结果',
           dataIndex: 'pushState',