Przeglądaj źródła

新增查询条件 区域和省份

chenrui 3 lat temu
rodzic
commit
5e8aae0f6f

+ 57 - 3
src/views/salesManagement/examineVerify/list.vue

@@ -53,6 +53,20 @@
                   <a-input id="examineVerifyList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="所在区域">
+                  <subarea id="examineVerifyList-subarea" v-model="queryParam.subareaSn"></subarea>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="地区">
+                  <a-form-model-item prop="shippingAddrProvinceSn">
+                    <a-select id="examineVerifyList-shippingAddrProvinceSn" allowClear v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省">
+                      <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="examineVerifyList-refresh">查询</a-button>
@@ -110,17 +124,19 @@
 <script>
 import moment from 'moment'
 import getDate from '@/libs/getDate.js'
+import subarea from '@/views/common/subarea.js'
+import { getArea } from '@/api/data'
 import rangeDate from '@/views/common/rangeDate.vue'
 import auditModal from '@/views/common/auditModal.vue'
 import { STable, VSelect } from '@/components'
 import custList from '@/views/common/custList.vue'
 import { dispatchlList, dispatchQueryCount, dispatchStockUpAduit } from '@/api/dispatch'
 export default {
-  components: { STable, VSelect, custList, rangeDate, auditModal },
+  components: { STable, VSelect, custList, rangeDate, auditModal, subarea },
   data () {
     return {
       spinning: false,
-      advanced: true, // 高级搜索 展开/关闭
+      advanced: false, // 高级搜索 展开/关闭
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
@@ -133,7 +149,9 @@ export default {
         dispatchBillNo: '', // 备货单号
         stockOutNo: '', // 出库单号
         printStatus: undefined, //  打印状态
-        billStatus: undefined //  业务状态
+        billStatus: undefined, //  业务状态
+        subareaSn: undefined,
+        shippingAddrProvinceSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
@@ -175,6 +193,7 @@ export default {
           return data
         })
       },
+      addrProvinceList: [], //  省下拉
       visibleAudit: false,
       auditInfo: null,
       spinningAudit: false
@@ -206,6 +225,8 @@ export default {
       this.queryParam.stockOutNo = '' // 出库单号
       this.queryParam.billStatus = undefined
       this.queryParam.printStatus = undefined
+      this.queryParam.subareaSn = undefined
+      this.queryParam.shippingAddrProvinceSn = undefined
       this.$refs.table.refresh(true)
     },
     //  审核
@@ -233,7 +254,40 @@ export default {
     //  详情
     handleDetail (row) {
       this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'pushOrder' } })
+    },
+    //  省/市/区
+    getArea (leve, sn) {
+      let params
+      if (leve == 'province') {
+        params = { type: '2' }
+      } else {
+        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
+      }
+      getArea(params).then(res => {
+        if (res.status == 200) {
+          if (leve == 'province') {
+            this.addrProvinceList = res.data || []
+          } else if (leve == 'city') {
+            this.addrCityList = res.data || []
+          } else if (leve == 'district') {
+            this.addrDistrictList = res.data || []
+          }
+        } else {
+          if (leve == 'province') {
+            this.addrProvinceList = []
+          } else if (leve == 'city') {
+            this.addrCityList = []
+          } else if (leve == 'district') {
+            this.addrDistrictList = []
+          }
+        }
+      })
     }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getArea('province')
+    })
   }
 }
 </script>

+ 57 - 3
src/views/salesManagement/outboundOrder/list.vue

@@ -48,6 +48,20 @@
                   <a-input id="outboundOrderList-stockOutNo" v-model.trim="queryParam.stockOutNo" allowClear placeholder="请输入出库单号"/>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="所在区域">
+                  <subarea id="outboundOrderList-subarea" v-model="queryParam.subareaSn"></subarea>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="地区">
+                  <a-form-model-item prop="shippingAddrProvinceSn">
+                    <a-select id="outboundOrderList-shippingAddrProvinceSn" allowClear v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省">
+                      <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="outboundOrderList-refresh">查询</a-button>
@@ -116,16 +130,18 @@
 
 <script>
 import rangeDate from '@/views/common/rangeDate.vue'
+import subarea from '@/views/common/subarea.js'
+import { getArea } from '@/api/data'
 import pushOrderDetailModal from '@/views/salesManagement/pushOrderManagement/detail.vue'
 import allocationDetailModal from '@/views/allocationManagement/transferOut/detail.vue'
 import { STable, VSelect } from '@/components'
 import { stockOutList, stockOutOut } from '@/api/stockOut'
 export default {
-  components: { STable, VSelect, rangeDate, pushOrderDetailModal, allocationDetailModal },
+  components: { STable, VSelect, rangeDate, pushOrderDetailModal, allocationDetailModal, subarea },
   data () {
     return {
       spinning: false,
-      advanced: true, // 高级搜索 展开/关闭
+      advanced: false, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
@@ -133,7 +149,9 @@ export default {
         outBizType: undefined, //  出库类型
         stockOutNo: '',
         outBizNo: '',
-        state: undefined //  状态
+        state: undefined, //  状态
+        subareaSn: undefined,
+        shippingAddrProvinceSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
@@ -165,6 +183,7 @@ export default {
           return data
         })
       },
+      addrProvinceList: [], //  省下拉
       openModal: false,
       orderSn: undefined,
       outBizType: null //  当前单子类型   SALES销售出库        ALLOCATE调拨出库
@@ -223,6 +242,8 @@ export default {
       this.queryParam.state = undefined
       this.queryParam.stockOutNo = ''
       this.queryParam.outBizNo = ''
+      this.queryParam.subareaSn = undefined
+      this.queryParam.shippingAddrProvinceSn = undefined
       this.$refs.table.refresh(true)
     },
     //  详情
@@ -339,7 +360,40 @@ export default {
           _this.selectedRows = _this.selectedRows.slice(item, item + 1)
         })
       }
+    },
+    //  省/市/区
+    getArea (leve, sn) {
+      let params
+      if (leve == 'province') {
+        params = { type: '2' }
+      } else {
+        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
+      }
+      getArea(params).then(res => {
+        if (res.status == 200) {
+          if (leve == 'province') {
+            this.addrProvinceList = res.data || []
+          } else if (leve == 'city') {
+            this.addrCityList = res.data || []
+          } else if (leve == 'district') {
+            this.addrDistrictList = res.data || []
+          }
+        } else {
+          if (leve == 'province') {
+            this.addrProvinceList = []
+          } else if (leve == 'city') {
+            this.addrCityList = []
+          } else if (leve == 'district') {
+            this.addrDistrictList = []
+          }
+        }
+      })
     }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getArea('province')
+    })
   }
 }
 </script>

+ 53 - 3
src/views/salesManagement/pushOrderManagement/list.vue

@@ -36,6 +36,20 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="所在区域">
+                <subarea id="pushOrder-subarea" v-model="queryParam.subareaSn"></subarea>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="地区">
+                <a-form-model-item prop="shippingAddrProvinceSn">
+                  <a-select id="pushOrder-shippingAddrProvinceSn" allowClear v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省">
+                    <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-form-model-item>
+            </a-col>
           </template>
           <a-col :md="6" :sm="24">
             <span class="table-page-search-submitButtons">
@@ -85,11 +99,13 @@
 <script>
 import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
+import subarea from '@/views/common/subarea.js'
+import { getArea } from '@/api/data'
 import custList from '@/views/common/custList.vue'
 import { dispatchlList, dispatchQueryCount } from '@/api/dispatch'
 export default {
   name: 'TableList',
-  components: { STable, VSelect, custList, rangeDate },
+  components: { STable, VSelect, custList, rangeDate, subarea },
   data () {
     return {
       advanced: true, // 高级搜索 展开/关闭
@@ -101,7 +117,9 @@ export default {
         buyerSn: undefined, //  客户名称
         salesBillNo: '', //  销售单号
         dispatchBillNo: '', //  备货单号
-        billStatus: undefined //  业务状态
+        billStatus: undefined, //  业务状态
+        subareaSn: undefined,
+        shippingAddrProvinceSn: undefined
       },
       totalData: {
         totalAmount: 0,
@@ -139,7 +157,8 @@ export default {
           this.disabled = false
           return data
         })
-      }
+      },
+      addrProvinceList: [] //  省下拉
     }
   },
   computed: {
@@ -176,11 +195,42 @@ export default {
       this.queryParam.payType = undefined
       this.queryParam.billStatus = undefined
       this.queryParam.financialStatus = undefined
+      this.queryParam.subareaSn = undefined
+      this.queryParam.shippingAddrProvinceSn = undefined
       this.$refs.table.refresh(true)
+    },
+    //  省/市/区
+    getArea (leve, sn) {
+      let params
+      if (leve == 'province') {
+        params = { type: '2' }
+      } else {
+        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
+      }
+      getArea(params).then(res => {
+        if (res.status == 200) {
+          if (leve == 'province') {
+            this.addrProvinceList = res.data || []
+          } else if (leve == 'city') {
+            this.addrCityList = res.data || []
+          } else if (leve == 'district') {
+            this.addrDistrictList = res.data || []
+          }
+        } else {
+          if (leve == 'province') {
+            this.addrProvinceList = []
+          } else if (leve == 'city') {
+            this.addrCityList = []
+          } else if (leve == 'district') {
+            this.addrDistrictList = []
+          }
+        }
+      })
     }
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
+      vm.getArea('province')
     })
   }
 }

+ 53 - 3
src/views/salesManagement/salesQuery/list.vue

@@ -59,6 +59,20 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="所在区域">
+                  <subarea id="salesManagementList-subarea" v-model="queryParam.subareaSn"></subarea>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="地区">
+                  <a-form-model-item prop="shippingAddrProvinceSn">
+                    <a-select id="salesManagementList-shippingAddrProvinceSn" allowClear v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省">
+                      <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
@@ -188,6 +202,8 @@
 <script>
 import moment from 'moment'
 import getDate from '@/libs/getDate.js'
+import subarea from '@/views/common/subarea.js'
+import { getArea } from '@/api/data'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
 import auditModal from '@/views/common/auditModal.vue'
@@ -197,11 +213,11 @@ import { salesList, salesDel, salesWriteAudit, salesCount } from '@/api/sales'
 import { findBySalesBillSn } from '@/api/dispatch'
 export default {
   name: 'TableList',
-  components: { STable, VSelect, chooseCustomModal, custList, rangeDate, auditModal },
+  components: { STable, VSelect, chooseCustomModal, custList, rangeDate, auditModal, subarea },
   data () {
     return {
       spinning: false,
-      advanced: true, // 高级搜索 展开/关闭
+      advanced: false, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       openModal: false, // 选择客户弹框是否显示
       time: [
@@ -217,7 +233,9 @@ export default {
         purchaseBillNo: '',
         printStatus: undefined,
         billStatus: undefined, //  业务状态
-        financialStatus: undefined //  财务状态
+        financialStatus: undefined, //  财务状态
+        subareaSn: undefined,
+        shippingAddrProvinceSn: undefined
       },
       totalData: {
         totalAmount: 0,
@@ -274,6 +292,7 @@ export default {
           return data
         })
       },
+      addrProvinceList: [], //  省下拉
       visibleAudit: false,
       auditInfo: null,
       spinningAudit: false
@@ -378,11 +397,42 @@ export default {
       this.queryParam.printStatus = undefined
       this.queryParam.billStatus = undefined
       this.queryParam.financialStatus = undefined
+      this.queryParam.subareaSn = undefined
+      this.queryParam.shippingAddrProvinceSn = undefined
       this.$refs.table.refresh(true)
+    },
+    //  省/市/区
+    getArea (leve, sn) {
+      let params
+      if (leve == 'province') {
+        params = { type: '2' }
+      } else {
+        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
+      }
+      getArea(params).then(res => {
+        if (res.status == 200) {
+          if (leve == 'province') {
+            this.addrProvinceList = res.data || []
+          } else if (leve == 'city') {
+            this.addrCityList = res.data || []
+          } else if (leve == 'district') {
+            this.addrDistrictList = res.data || []
+          }
+        } else {
+          if (leve == 'province') {
+            this.addrProvinceList = []
+          } else if (leve == 'city') {
+            this.addrCityList = []
+          } else if (leve == 'district') {
+            this.addrDistrictList = []
+          }
+        }
+      })
     }
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
+      vm.getArea('province')
     })
   }
 }

+ 55 - 4
src/views/salesManagement/salesReturn/list.vue

@@ -36,7 +36,7 @@
                   <v-select
                     v-model="queryParam.billStatus"
                     ref="billStatus"
-                    id="salesManagementList-billStatus"
+                    id="salesReturn-billStatus"
                     code="SALES_RETURN_BILL_STATUS"
                     placeholder="请选择业务状态"
                     allowClear></v-select>
@@ -53,6 +53,20 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col> -->
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="所在区域">
+                  <subarea id="salesReturn-subarea" v-model="queryParam.subareaSn"></subarea>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="地区">
+                  <a-form-model-item prop="shippingAddrProvinceSn">
+                    <a-select id="salesReturn-shippingAddrProvinceSn" allowClear v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省">
+                      <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
@@ -155,6 +169,8 @@
 
 <script>
 import { STable, VSelect } from '@/components'
+import subarea from '@/views/common/subarea.js'
+import { getArea } from '@/api/data'
 import chooseCustomModal from './chooseCustomModal.vue'
 import custList from '@/views/common/custList.vue'
 import auditModal from '@/views/common/auditModal.vue'
@@ -170,13 +186,14 @@ export default {
     chooseCustomModal,
     custList,
     rangeDate,
-    auditModal
+    auditModal,
+    subarea
   },
   data () {
     return {
       spinning: false,
       // 高级搜索 展开/关闭
-      advanced: true,
+      advanced: false,
       disabled: false, //  查询、重置按钮是否可操作
       createDate: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
@@ -192,8 +209,10 @@ export default {
         buyerSn: undefined, //  客户名称
         salesReturnBillNo: undefined, //  总部销退单号
         purchaseReturnBillNo: '',
-        billStatus: undefined // 业务状态
+        billStatus: undefined, // 业务状态
         // financialStatus: undefined, // 财务状态
+        subareaSn: undefined,
+        shippingAddrProvinceSn: undefined
       },
       countData: null, // 统计数据
       // 表头
@@ -229,6 +248,7 @@ export default {
           return data
         })
       },
+      addrProvinceList: [], //  省下拉
       visibleAudit: false,
       auditInfo: null,
       spinningAudit: false
@@ -327,16 +347,47 @@ export default {
       this.queryParam.purchaseReturnBillNo = ''
       this.queryParam.billStatus = undefined
       // this.queryParam.financialStatus = undefined
+      this.queryParam.subareaSn = undefined
+      this.queryParam.shippingAddrProvinceSn = undefined
       this.$refs.table.refresh(true)
     },
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
+    },
+    //  省/市/区
+    getArea (leve, sn) {
+      let params
+      if (leve == 'province') {
+        params = { type: '2' }
+      } else {
+        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
+      }
+      getArea(params).then(res => {
+        if (res.status == 200) {
+          if (leve == 'province') {
+            this.addrProvinceList = res.data || []
+          } else if (leve == 'city') {
+            this.addrCityList = res.data || []
+          } else if (leve == 'district') {
+            this.addrDistrictList = res.data || []
+          }
+        } else {
+          if (leve == 'province') {
+            this.addrProvinceList = []
+          } else if (leve == 'city') {
+            this.addrCityList = []
+          } else if (leve == 'district') {
+            this.addrDistrictList = []
+          }
+        }
+      })
     }
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
+      vm.getArea('province')
     })
   }
 }