|
@@ -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()
|
|
|
}
|
|
|
},
|