فهرست منبع

Merge branch 'develop_yh22' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh22

lilei 1 سال پیش
والد
کامیت
57e0b96820
2فایلهای تغییر یافته به همراه134 افزوده شده و 56 حذف شده
  1. 79 33
      src/views/salesManagement/salesList/list.vue
  2. 55 23
      src/views/salesReturnManagement/returnSchedule/list.vue

+ 79 - 33
src/views/salesManagement/salesList/list.vue

@@ -3,31 +3,38 @@
     <a-card size="small" :bordered="false" class="salesList-wrap">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline">
+        <a-form-model
+          id="allocateBillList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam"
+          @keyup.enter.native="handleSearch">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="提交时间">
-                <rangeDate ref="rangeDate" :value="time" @change="submitDateChange" />
-              </a-form-item>
+              <a-form-model-item label="提交时间" prop="time">
+                <rangeDate ref="rangeDate" :value="queryParam.time" @change="submitDateChange" />
+              </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="销售单号">
+              <a-form-model-item label="销售单号">
                 <a-input id="salesList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="所属区域/分区">
+              <a-form-model-item label="所属区域/分区">
                 <subarea id="salesList-subarea" ref="subarea" @change="subareaChange"></subarea>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-form-model-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
                 <dealerSubareaScopeList ref="dealerSubareaScopeList" id="salesList-buyerName" @change="custChange" />
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-item label="财务状态">
+                <a-form-model-item label="财务状态">
                   <v-select
                     v-model="queryParam.financialStatus"
                     ref="financialStatus"
@@ -35,20 +42,20 @@
                     code="FINANCIAL_RECEIVE_STATUS"
                     placeholder="请选择财务状态"
                     allowClear></v-select>
-                </a-form-item>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="审核时间">
+                <a-form-model-item label="审核时间">
                   <rangeDate ref="processRangeDate" :value="examineTime" @change="processDateChange" />
-                </a-form-item>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="收款时间">
+                <a-form-model-item label="收款时间">
                   <rangeDate ref="collectionRangeDate" :value="paymentTime" @change="collectionDateChange" />
-                </a-form-item>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="业务状态">
+                <a-form-model-item label="业务状态">
                   <v-select
                     v-model="queryParam.billStatus"
                     ref="billStatus"
@@ -56,10 +63,10 @@
                     code="SALES_OVERVIEW_BILL_STATUS"
                     placeholder="请选择业务状态"
                     allowClear></v-select>
-                </a-form-item>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="发货状态">
+                <a-form-model-item label="发货状态">
                   <v-select
                     v-model="queryParam.sendFlag"
                     ref="sendFlag"
@@ -67,7 +74,7 @@
                     code="SEND_FLAG"
                     placeholder="请选择发货状态"
                     allowClear></v-select>
-                </a-form-item>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="省份" prop="provinceSn">
@@ -77,7 +84,7 @@
             </template>
             <a-col :md="24" :sm="24">
               <div class="table-page-search-submitButtons" style="text-align:center;">
-                <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button type="primary" :disabled="disabled" @click="handleSearch">查询</a-button>
                 <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
                 <a @click="advanced=!advanced" style="margin-left: 8px">
                   {{ advanced ? '收起' : '展开' }}
@@ -86,7 +93,7 @@
               </div>
             </a-col>
           </a-row>
-        </a-form>
+        </a-form-model>
       </div>
     </a-card>
     <a-card size="small" :bordered="false" style="margin-top:8px;">
@@ -108,11 +115,15 @@
           <template slot="tip" slot-scope="text, record">
             <a-tooltip placement="top" v-if="record.dispatchOverDay*1!=0||record.sendOverDay*1!=0||record.settleOverDay*1!=0">
               <template slot="title">
-                <span>已超时{{ record.dispatchOverDay }}天(要求销售单下推后2天内备货)</span>
+                <div v-if="record.dispatchOverDay*1>0">已超时{{ record.dispatchOverDay }}天(要求销售单下推后3天内备货)</div>
+                <div v-if="record.settleOverDay*1>0">已超时{{ record.settleOverDay }}天(要求销售单下推后2天内收款)</div>
+                <div v-if="record.sendOverDay*1>0">已超时{{ record.sendOverDay }}天(要求销售单允许打印后3天内发货)</div>
               </template>
-              <div>
+              <div class="statusBox">
                 <a-icon type="exclamation-circle" :style="{color:'#ed1c24',fontSize:'20px',marginRight:'8px',display:'inlineBlock'}"/>
-                <span style="vertical-align:top;">{{ record.dispatchOverDay*1>0?'未备货':record.dispatchOverDay*1>0 &&record.settleOverDay*1>0?'未备货/未收款' :record.sendOverDay*1>0?'未发货':record.settleOverDay*1>0?'未收款':'--' }}</span>
+                <span v-if="record.dispatchOverDay*1>0">未备货</span>
+                <span v-if="record.settleOverDay*1>0">未收款</span>
+                <span v-if="record.sendOverDay*1>0">未发货</span>
               </div>
             </a-tooltip>
             <span v-else>--</span>
@@ -177,14 +188,17 @@ export default {
       bizSn: null,
       tableHeight: 0,
       detailType: 0,
-      time: [
-        moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
-      ],
       examineTime: [],
       paymentTime: [],
+      rules: {
+        'time': [{ required: true, message: '请选择退货完成时间', trigger: 'change' }]
+      },
       // 查询参数
       queryParam: {
+        time: [
+          moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
+          moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+        ],
         submitBeginDate: getDate.getCurrMonthDays().starttime,
         submitEndDate: getDate.getCurrMonthDays().endtime,
         salesBillNo: '', //  销售单号
@@ -266,10 +280,27 @@ export default {
     }
   },
   methods: {
+    // 查询
+    handleSearch () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$refs.table.refresh(true)
+        } else {
+          _this.$message.error('请选择提交时间')
+          return false
+        }
+      })
+    },
     //  提交时间  change
     submitDateChange (date) {
-      this.queryParam.submitBeginDate = date[0]
-      this.queryParam.submitEndDate = date[1]
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
+      this.queryParam.submitBeginDate = date[0] || ''
+      this.queryParam.submitEndDate = date[1] || ''
     },
     // 审核时间 change
     processDateChange (date) {
@@ -321,7 +352,11 @@ export default {
     },
     // 重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
       this.queryParam.submitBeginDate = getDate.getCurrMonthDays().starttime
       this.queryParam.submitEndDate = getDate.getCurrMonthDays().endtime
       this.queryParam.salesBillNo = ''
@@ -391,10 +426,21 @@ export default {
   }
 }
 </script>
-<style lang="less">
+<style lang="less" scoped>
   .salesList-wrap{
     .sTable{
       margin-top: 10px;
     }
   }
+  .statusBox{
+    span{
+      vertical-align:top;
+         }
+    span::after{
+      content:'/';
+    }
+    span:last-child::after{
+       content:'' !important;
+    }
+  }
 </style>

+ 55 - 23
src/views/salesReturnManagement/returnSchedule/list.vue

@@ -3,17 +3,24 @@
     <a-card size="small" :bordered="false" class="returnSchedule-wrap">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form-model
+          id="allocateBillList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam"
+          @keyup.enter.native="handleSearch">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="提交时间">
-                <rangeDate ref="rangeDate" @change="dateChange" />
-              </a-form-item>
+              <a-form-model-item label="提交时间" prop="time">
+                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+              </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="审核时间">
+              <a-form-model-item label="退货申请审核时间">
                 <rangeDate ref="rangeExamineDate" @change="dateExamineChange" />
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="所属区域/分区">
@@ -21,18 +28,18 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-form-model-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
                 <dealerSubareaScopeList ref="dealerSubareaScopeList" id="returnSchedule-buyerSn" @change="custChange" />
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-item label="总部销退单号">
+                <a-form-model-item label="总部销退单号">
                   <a-input id="returnSchedule-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入总部销退单号"/>
-                </a-form-item>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="业务状态">
+                <a-form-model-item label="业务状态">
                   <v-select
                     v-model="queryParam.billStatus"
                     ref="billStatus"
@@ -40,7 +47,7 @@
                     code="SALES_RETURN_BILL_STATUS2"
                     placeholder="请选择业务状态"
                     allowClear></v-select>
-                </a-form-item>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="省份" prop="provinceSn">
@@ -60,7 +67,7 @@
               </a-col>
             </template>
             <a-col :md="24" :sm="24" style="margin-top:16px;text-align:center">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="returnSchedule-refresh">查询</a-button>
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnSchedule-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="returnSchedule-reset">重置</a-button>
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
@@ -68,7 +75,7 @@
               </a>
             </a-col>
           </a-row>
-        </a-form>
+        </a-form-model>
       </div>
     </a-card>
     <a-card size="small" :bordered="false">
@@ -128,11 +135,11 @@ export default {
     return {
       spinning: false,
       tableHeight: 0,
-      time: [
-        moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
-      ],
       queryParam: { //  查询条件
+        time: [
+          moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
+          moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+        ],
         beginSubmitDate: getDate.getCurrMonthDays().starttime,
         endSubmitDate: getDate.getCurrMonthDays().endtime,
         beginAuditDate: undefined,
@@ -150,6 +157,9 @@ export default {
         provinceSn: undefined,
         salesReturnType: undefined// 退货类别
       },
+      rules: {
+        'time': [{ required: true, message: '请选择退货完成时间', trigger: 'change' }]
+      },
       disabled: false, //  查询、重置按钮是否可操作
       advanced: true,
       // 加载数据方法 必须为 Promise 对象
@@ -192,8 +202,8 @@ export default {
 
         { title: '申请退货数量', dataIndex: 'totalInitialQty', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '申请退货金额', dataIndex: 'initialAmount', width: '100px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
-        { title: '退货申请审核时间', dataIndex: 'updateDate', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '提货审核时间', dataIndex: 'auditTime', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货申请审核时间', dataIndex: 'auditTime', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '提货审核时间', dataIndex: 'pickUpAuditDate', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收货时间', dataIndex: 'receiveTime', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品检时间', dataIndex: 'checkTime', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客服确认时间', dataIndex: 'customerServiceConfirmTime', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
@@ -208,10 +218,27 @@ export default {
     }
   },
   methods: {
+    // 查询
+    handleSearch () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$refs.table.refresh(true)
+        } else {
+          _this.$message.error('请选择提交时间')
+          return false
+        }
+      })
+    },
     //  提交时间  change
     dateChange (date) {
-      this.queryParam.beginSubmitDate = date[0]
-      this.queryParam.endSubmitDate = date[1]
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
+      this.queryParam.beginSubmitDate = date[0] || ''
+      this.queryParam.endSubmitDate = date[1] || ''
     },
     // 审核时间
     dateExamineChange (date) {
@@ -235,12 +262,17 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
       this.queryParam.beginSubmitDate = getDate.getCurrMonthDays().starttime
       this.queryParam.endSubmitDate = getDate.getCurrMonthDays().endtime
 
       this.queryParam.beginAuditDate = undefined
       this.queryParam.endAuditDate = undefined
+      this.$refs.rangeExamineDate.resetDate()
 
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined