소스 검색

Merge branch 'develop_temp230103' of jianguan-web/qpls-md-html into pre-release

李磊 2 년 전
부모
커밋
2cdb40a5f0
4개의 변경된 파일47개의 추가작업 그리고 19개의 파일을 삭제
  1. 1 1
      public/version.json
  2. 41 13
      src/views/salesManagement/salesQuery/list.vue
  3. 3 3
      src/views/salesManagement/salesQuery/queryPart.vue
  4. 2 2
      vue.config.js

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1670838549944
+  "version": 1672730138035
 }

+ 41 - 13
src/views/salesManagement/salesQuery/list.vue

@@ -7,11 +7,11 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate :allowClear="false" :hasDisabledAreaTime="false" ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate :allowClear="isByCustQuery" :hasDisabledAreaTime="false" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}" :required="isByCustQuery">
                 <custList ref="custList" @change="custChange"></custList>
               </a-form-item>
             </a-col>
@@ -23,12 +23,12 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="审核时间">
-                  <rangeDate ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
+                  <rangeDate ref="auditRangeDate" v-model="auditTime" @change="auditDateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="出库时间">
-                  <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
+                  <rangeDate ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -111,6 +111,13 @@
       <div class="table-operator">
         <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(0)">新增(零售)</a-button>
         <a-button type="primary" class="button-warning" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(1)">新增(铺货)</a-button>
+        <a-checkbox style="margin-left:10px;" v-model="isByCustQuery" id="sales-byCustQuery">按客户查询</a-checkbox>
+        <a-popover placement="right">
+          <template slot="content">
+            使用此查询时,时间可清空,必须选择一个客户
+          </template>
+          <a-icon type="question-circle" />
+        </a-popover>
       </div>
       <a-alert type="info" style="margin-bottom:10px">
         <div slot="message">
@@ -242,6 +249,7 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       openModal: false, // 选择客户弹框是否显示
+      isByCustQuery: false, // 是否按客户查询
       time: [
         getDate.getMonthDays(12).starttime,
         getDate.getMonthDays(12).endtime
@@ -332,10 +340,12 @@ export default {
       this.queryParam.endDate = date[1]
     },
     auditDateChange (date) {
+      this.auditTime = date
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditEndDate = date[1]
     },
     outWareDateChange (date) {
+      this.outWareTime = date
       this.queryParam.outWarehouseBeginDate = date[0]
       this.queryParam.outWarehouseEndDate = date[1]
     },
@@ -439,14 +449,22 @@ export default {
       })
     },
     searchForm () {
-      const a = moment(this.queryParam.beginDate)
-      const b = moment(this.queryParam.endDate)
-      console.log(b.diff(a, 'days'), 365 * 2)
-      if (b.diff(a, 'days') > 730) {
-        this.$message.info('最多只能选择2年的时间区间')
-        return false
+      if (!this.isByCustQuery) {
+        const a = moment(this.queryParam.beginDate)
+        const b = moment(this.queryParam.endDate)
+        if (b.diff(a, 'days') > 730) {
+          this.$message.info('最多只能选择2年的时间区间')
+          return false
+        }
+        this.$refs.table.refresh(true)
+      } else {
+        if (this.queryParam.buyerSn) {
+          this.$refs.table.refresh(true)
+        } else {
+          this.$message.info('请选择客户')
+          return false
+        }
       }
-      this.$refs.table.refresh(true)
     },
     // 重置
     resetSearchForm () {
@@ -458,12 +476,17 @@ export default {
       this.$refs.rangeDate.resetDate(flag ? '' : this.time)
       this.queryParam.beginDate = flag ? '' : getDate.getMonthDays(12).starttime
       this.queryParam.endDate = flag ? '' : getDate.getMonthDays(12).endtime
-      this.$refs.auditRangeDate.resetDate('')
+
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditEndDate = ''
-      this.$refs.outWareRangeDate.resetDate('')
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseEndDate = ''
+      this.auditTime = []
+      this.outWareTime = []
+      if (this.advanced) {
+        this.$refs.auditRangeDate.resetDate('')
+        this.$refs.outWareRangeDate.resetDate('')
+      }
 
       this.queryParam.buyerName = undefined
       this.queryParam.buyerSn = undefined
@@ -556,6 +579,11 @@ export default {
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()
+    },
+    isByCustQuery (newValue, oldValue) {
+      if (!newValue) {
+        this.resetSearchForm()
+      }
     }
   },
   activated () {

+ 3 - 3
src/views/salesManagement/salesQuery/queryPart.vue

@@ -59,15 +59,15 @@
               </a-form-model-item>
             </a-col>
           </template>
-          <a-col :lg="4" :md="6" :sm="12" style="margin-bottom: 10px;">
+          <a-col :lg="3" :md="8" :sm="12" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" id="productInfoList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin:0 30px 0 10px">
+            <a @click="advanced=!advanced" style="margin:0 0 0 10px">
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
           </a-col>
-          <a-col :lg="4" :md="8" :sm="12" style="margin-top: 6px;">
+          <a-col :lg="5" :md="8" :sm="12" style="margin-top: 6px;">
             <a-checkbox v-model="cost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
             <a-checkbox v-model="cityPrice" id="salesQuery-cityPrice">市级价</a-checkbox>
             <a-checkbox v-model="tyuePrice" v-if="$store.state.user.isShowSpecialPrice==1" id="salesQuery-tyuePrice">特约价</a-checkbox>

+ 2 - 2
vue.config.js

@@ -211,8 +211,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.0.215:8503/qpls-md',
-        // target: 'http://p.iscm.360arrow.com/qpls-md',
+        // target: 'http://192.168.0.215:8503/qpls-md',
+        target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,