lilei 1 gadu atpakaļ
vecāks
revīzija
e5304abbaf

+ 1 - 1
public/version.json

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

+ 1 - 1
src/views/common/areaList.js

@@ -74,7 +74,7 @@ const AreaList = {
     //  省/市/区
     getArea () {
       const data = this.$store.state.app.allArea
-      if(data){
+      if(data&&data.length){
         this.list = data
       }else{
         getAreaAll().then(res => {

+ 1 - 1
src/views/common/custType.js

@@ -55,7 +55,7 @@ const custType = {
     },
     getList () {
       const data = this.$store.state.app.custTypeAll
-      if(data){
+      if(data&&data.length){
         this.list = data
       }else{
         custTypeFindAllList().then(res => {

+ 1 - 6
src/views/numsGoodsShelves/settlementManagement/list.vue

@@ -75,7 +75,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y:tableHeight }"
-        :defaultLoadData="true"
+        :defaultLoadData="false"
         bordered>
         <template slot="action" slot-scope="text,record">
           <a-button
@@ -289,8 +289,3 @@ export default {
 }
 </script>
 
-<style lang="less">
-  .accountManagementList-wrap{
-
-  }
-</style>

+ 0 - 6
src/views/numsGoodsShelves/withdrawalManagement/list.vue

@@ -180,9 +180,3 @@ export default {
   }
 }
 </script>
-
-<style lang="less">
-  .accountManagementList-wrap{
-
-  }
-</style>

+ 17 - 93
src/views/reportData/salesDetailReport/list.vue

@@ -36,12 +36,10 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="4" :sm="24">
-              <a-form-model-item label="客户类型">
-                <a-select id="salesDetailReportList-customerType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
-                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-                </a-select>
-              </a-form-model-item>
-            </a-col>
+                <a-form-item label="客户类型">
+                  <custType v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型"></custType>
+                </a-form-item>
+              </a-col>
             <a-col :md="4" :sm="24">
               <a-form-model-item label="收款方式">
                 <v-select
@@ -97,32 +95,10 @@
                 <a-input id="salesDetailReportList-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入业务员"/>
               </a-form-model-item>
             </a-col>
-            <a-col :md="12" :sm="24">
-              <a-row>
-                <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;">
-                  <a-col span="7">
-                    <a-form-model-item prop="provinceSn" style="margin: 0;">
-                      <a-select v-model="queryParam.provinceSn" @change="getCityList" placeholder="请选择省" allowClear>
-                        <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-col>
-                  <a-col span="7" offset="1">
-                    <a-form-model-item prop="citySn" style="margin: 0;">
-                      <a-select v-model="queryParam.citySn" @change="getAreaList" placeholder="请选择市" allowClear>
-                        <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-model-item>
-                  </a-col>
-                  <a-col span="7" offset="1">
-                    <a-form-model-item prop="countySn" style="margin: 0;">
-                      <a-select v-model="queryParam.countySn" placeholder="请选择区/县" allowClear>
-                        <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-model-item>
-                  </a-col>
-                </a-form-model-item>
-              </a-row>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客户所在区">
+                <AreaList changeOnSelect ref="areaList" @change="areaChange"></AreaList>
+              </a-form-item>
             </a-col>
           </template>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -184,10 +160,12 @@ import { custTypeFindAllList } from '@/api/custType'
 import { warehouseCascadeList } from '@/api/warehouse'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
+import custType from '@/views/common/custType.js'
+import AreaList from '@/views/common/areaList.js'
 import custList from '@/views/common/custList.vue'
 import { reportSalesBillDetailList, reportSalesBillDetailCount, reportSalesBillDetailExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, custList },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, custList, custType, AreaList },
   mixins: [commonMixin],
   data () {
     return {
@@ -259,7 +237,6 @@ export default {
       addrDistrictList: [], //  区下拉
       linkageGroupData: [],
       allocateTypeList: [], //  调拨类型
-      custTypeList: [], //  客户类型 下拉数据
       productType: [],
       warehouseCascadeData: [] //  仓库仓位
     }
@@ -339,6 +316,11 @@ export default {
         this.queryParam.buyerSnCurrent = undefined
       }
     },
+    areaChange (val) {
+      this.queryParam.provinceSn = val[0] ? val[0] : undefined
+      this.queryParam.citySn = val[1] ? val[1] : undefined
+      this.queryParam.countySn = val[2] ? val[2] : undefined
+    },
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
@@ -378,6 +360,7 @@ export default {
       this.$refs.table.clearTable()
       if (this.advanced) {
         this.$refs.custSatelliteList.resetForm()
+        this.$refs.areaList.clearData()
       }
     },
     // 导出
@@ -407,17 +390,6 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
-    //  获取客户类型列表
-    getCustTypeList () {
-      const _this = this
-      custTypeFindAllList().then(res => {
-        if (res.status == 200) {
-          _this.custTypeList = res.data || []
-        } else {
-          _this.custTypeList = []
-        }
-      })
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
@@ -452,57 +424,9 @@ export default {
         this.queryParam.warehouseLocationSn = ''
       }
     },
-    // 获取城市列表
-    getCityList (val) {
-      this.addrCityList = []
-      this.addrDistrictList = []
-      this.queryParam.citySn = undefined
-      this.queryParam.countySn = undefined
-      if (val) {
-        this.getArea('city', val)
-      }
-    },
-    // 获取区县列表
-    getAreaList (val) {
-      this.addrDistrictList = []
-      this.queryParam.countySn = undefined
-      if (val) {
-        this.getArea('district', val)
-      }
-    },
-    //  省/市/区
-    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 = []
-          }
-        }
-      })
-    },
     pageInit () {
       this.disabled = false
       this.spinning = false
-      this.getArea('province')
-      this.getCustTypeList()
       this.getWarehouseCascade()
     }
   },

+ 21 - 95
src/views/reportData/salesReport/list.vue

@@ -36,12 +36,10 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="4" :sm="24">
-              <a-form-model-item label="客户类型">
-                <a-select id="salesReportList-salesTargetType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
-                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-                </a-select>
-              </a-form-model-item>
-            </a-col>
+                <a-form-item label="客户类型">
+                  <custType v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型"></custType>
+                </a-form-item>
+              </a-col>
             <a-col :md="4" :sm="24">
               <a-form-model-item label="收款方式">
                 <v-select
@@ -63,33 +61,11 @@
                 <a-input id="salesReportList-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入业务员"/>
               </a-form-model-item>
             </a-col>
-            <a-col :md="10" :sm="24">
-              <a-row>
-                <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;">
-                  <a-col span="8">
-                    <a-form-model-item prop="provinceSn" style="margin: 0;">
-                      <a-select v-model="queryParam.provinceSn" allowClear @change="getCityList" 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-col>
-                  <a-col span="7" offset="1">
-                    <a-form-model-item prop="citySn" style="margin: 0;">
-                      <a-select v-model="queryParam.citySn" allowClear @change="getAreaList" placeholder="请选择市">
-                        <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-model-item>
-                  </a-col>
-                  <a-col span="7" offset="1">
-                    <a-form-model-item prop="countySn" style="margin: 0;">
-                      <a-select v-model="queryParam.countySn" allowClear placeholder="请选择区/县">
-                        <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-model-item>
-                  </a-col>
-                </a-form-model-item>
-              </a-row>
-            </a-col>
+            <a-col :md="6" :sm="24">
+                <a-form-item label="客户所在区">
+                  <AreaList changeOnSelect ref="areaList" @change="areaChange"></AreaList>
+                </a-form-item>
+              </a-col>
           </template>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesReportList-refresh">查询</a-button>
@@ -131,7 +107,8 @@
       class="sTable"
       ref="table"
       size="small"
-      :rowKey="(record) => record.id"
+      :rowKey="(record) => record.no"
+      rowKeyName="no"
       :columns="columns"
       :data="loadData"
       :defaultLoadData="false"
@@ -146,11 +123,12 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { getArea } from '@/api/data'
-import { custTypeFindAllList } from '@/api/custType'
+import custType from '@/views/common/custType.js'
+import AreaList from '@/views/common/areaList.js'
 import custList from '@/views/common/custList.vue'
 import { reportSalesBillList, reportSalesBillCount, reportSalesBillExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate, custList },
+  components: { STable, VSelect, rangeDate, custList, AreaList, custType },
   mixins: [commonMixin],
   data () {
     return {
@@ -241,6 +219,11 @@ export default {
     }
   },
   methods: {
+    areaChange (val) {
+      this.queryParam.provinceSn = val[0] ? val[0] : undefined
+      this.queryParam.citySn = val[1] ? val[1] : undefined
+      this.queryParam.countySn = val[2] ? val[2] : undefined
+    },
     // 合计
     getCount (params) {
       reportSalesBillCount(params).then(res => {
@@ -312,6 +295,7 @@ export default {
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.countySn = undefined
+      
       this.queryParam.settleStyleSn = undefined
       this.queryParam.showCost = undefined
       this.queryParam.salesBillNo = ''
@@ -320,6 +304,7 @@ export default {
       this.totalData = null
       if (this.advanced) {
         this.$refs.custSatelliteList.resetForm()
+        this.$refs.areaList.clearData()
       }
       this.$refs.table.clearTable()
     },
@@ -353,66 +338,7 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
-    //  获取客户类型列表
-    getCustTypeList () {
-      const _this = this
-      custTypeFindAllList().then(res => {
-        if (res.status == 200) {
-          _this.custTypeList = res.data || []
-        } else {
-          _this.custTypeList = []
-        }
-      })
-    },
-    // 获取城市列表
-    getCityList (val) {
-      this.addrCityList = []
-      this.addrDistrictList = []
-      this.queryParam.citySn = undefined
-      this.queryParam.countySn = undefined
-      if (val) {
-        this.getArea('city', val)
-      }
-    },
-    // 获取区县列表
-    getAreaList (val) {
-      this.addrDistrictList = []
-      this.queryParam.countySn = undefined
-      if (val) {
-        this.getArea('district', val)
-      }
-    },
-    //  省/市/区
-    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 = []
-          }
-        }
-      })
-    },
     pageInit () {
-      this.getArea('province')
-      this.getCustTypeList()
     }
   },
   mounted () {