|
@@ -58,51 +58,10 @@
|
|
<v-select code="BRAND_TYPE" id="urchaseDetailReturn-productBrandTypeSn" v-model="queryParam.product.brandType" allowClear placeholder="请选择品牌分类"></v-select>
|
|
<v-select code="BRAND_TYPE" id="urchaseDetailReturn-productBrandTypeSn" v-model="queryParam.product.brandType" allowClear placeholder="请选择品牌分类"></v-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <!-- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-model-item label="产品分类">
|
|
|
|
- <a-cascader
|
|
|
|
- @change="changeProductType"
|
|
|
|
- expand-trigger="hover"
|
|
|
|
- change-on-select
|
|
|
|
- :options="productTypeList"
|
|
|
|
- :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
|
|
|
|
- id="salesReturnDetailList-productType"
|
|
|
|
- placeholder="请选择产品分类"
|
|
|
|
- allowClear
|
|
|
|
- v-model="productType" />
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col> -->
|
|
|
|
- <!-- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-model-item label="所在区域">
|
|
|
|
- <subarea id="salesReturnDetailList-subareaSn" v-model="queryParam.subareaSn"></subarea>
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="地区">
|
|
|
|
+ <AreaList id="salesSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
- </a-col> -->
|
|
|
|
- <a-col :md="12" :sm="24">
|
|
|
|
- <a-row>
|
|
|
|
- <a-form-model-item label="地区">
|
|
|
|
- <a-col span="7">
|
|
|
|
- <a-form-model-item prop="provinceSn" style="margin: 0;">
|
|
|
|
- <a-select v-model="queryParam.supplier.provinceSn" allowClear @change="getCityList" placeholder="请选择省">
|
|
|
|
- <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + '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.supplier.citySn" allowClear @change="getAreaList" placeholder="请选择市">
|
|
|
|
- <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + '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="districtSn" style="margin: 0;">
|
|
|
|
- <a-select v-model="queryParam.supplier.districtSn" allowClear placeholder="请选择区/县">
|
|
|
|
- <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
|
|
|
|
- </a-select>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-row>
|
|
|
|
</a-col>
|
|
</a-col>
|
|
</template>
|
|
</template>
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
@@ -151,39 +110,7 @@
|
|
</span>
|
|
</span>
|
|
<span v-else>--</span>
|
|
<span v-else>--</span>
|
|
</template>
|
|
</template>
|
|
- <!-- <template slot="footer" v-if="totalData && $hasPermissions('M_urchaseDetailReturnList_costPrice')">
|
|
|
|
- <a-row>
|
|
|
|
- <a-col span="2">合计:</a-col>
|
|
|
|
- <a-col span="22">
|
|
|
|
- <a-row>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.jpLqqAmount">箭牌滤清器:{{ totalData.jpLqqAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.jpBsxLqqAmount">箭牌变速箱滤清器:{{ totalData.jpBsxLqqAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.jpYgpAmount">箭牌雨刮片:{{ totalData.jpYgpAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.jpLbAmount">箭牌喇叭:{{ totalData.jpLbAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.jpScpAmount">箭牌刹车片:{{ totalData.jpScpAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.jpGyxAmount">箭牌感应线:{{ totalData.jpGyxAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.gpLqqAmount">冠牌滤清器:{{ totalData.gpLqqAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.gpYgpAmount">冠牌雨刮片:{{ totalData.gpYgpAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.gpScpAmount">冠牌刹车片:{{ totalData.gpScpAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.wsDhxqAmount">稳升点火线圈:{{ totalData.wsDhxqAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.wsDpAmount">稳升灯泡:{{ totalData.wsDpAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.hjAmount">汇箭:{{ totalData.hjAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.dlsAmount">德路斯:{{ totalData.dlsAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.tbuAmount">TBU:{{ totalData.tbuAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.tbupAmount">TBU-P:{{ totalData.tbupAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.brsAmount">布瑞斯:{{ totalData.brsAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.ngkAmount">NGK:{{ totalData.ngkAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.flpAmount">飞利浦:{{ totalData.flpAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.cpAmount">车仆:{{ totalData.cpAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.wetAmount">瓦尔塔:{{ totalData.wetAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.lbstAmount">雷贝斯托:{{ totalData.lbstAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.defAmount">德尔福:{{ totalData.defAmount }}</a-col>
|
|
|
|
- <a-col span="4" v-if="totalData && totalData.bndAmount">巴诺德:{{ totalData.bndAmount }}</a-col>
|
|
|
|
- <a-col span="6" v-if="totalData && totalData.totalAmount">实售销售合计金额:{{ totalData.totalAmount }}</a-col>
|
|
|
|
- </a-row>
|
|
|
|
- </a-col>
|
|
|
|
- </a-row>
|
|
|
|
- </template> -->
|
|
|
|
|
|
+
|
|
<template slot="footer">
|
|
<template slot="footer">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="4" :sm="24">申请退货数量:{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</a-col>
|
|
<a-col :md="4" :sm="24">申请退货数量:{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</a-col>
|
|
@@ -202,19 +129,16 @@ import { commonMixin } from '@/utils/mixin'
|
|
import getDate from '@/libs/getDate.js'
|
|
import getDate from '@/libs/getDate.js'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
-// import subarea from '@/views/common/subarea.js'
|
|
|
|
import supplier from '@/views/common/supplier.js'
|
|
import supplier from '@/views/common/supplier.js'
|
|
import reportModal from '@/views/common/reportModal.vue'
|
|
import reportModal from '@/views/common/reportModal.vue'
|
|
-import { getArea } from '@/api/data'
|
|
|
|
-import { productBrandQuery } from '@/api/productBrand'
|
|
|
|
-import { productTypeQuery } from '@/api/productType'
|
|
|
|
|
|
+import AreaList from '@/views/common/areaList.js'
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
import { sparePartsReturnDetailReportList, sparePartsReturnDetailReportStat, sparePartsReturnReportExportDetail } from '@/api/reportData'
|
|
import { sparePartsReturnDetailReportList, sparePartsReturnDetailReportStat, sparePartsReturnReportExportDetail } from '@/api/reportData'
|
|
export default {
|
|
export default {
|
|
name: 'UrchaseDetailReturnList',
|
|
name: 'UrchaseDetailReturnList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { STable, VSelect, rangeDate, supplier, ProductBrand, reportModal },
|
|
|
|
|
|
+ components: { STable, VSelect, rangeDate, supplier, ProductBrand, reportModal, AreaList },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -244,7 +168,6 @@ export default {
|
|
districtSn: undefined
|
|
districtSn: undefined
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // productType: [],
|
|
|
|
rules: {
|
|
rules: {
|
|
'time': [{ required: true, message: '请选择退货完成日期', trigger: 'change' }]
|
|
'time': [{ required: true, message: '请选择退货完成日期', trigger: 'change' }]
|
|
},
|
|
},
|
|
@@ -267,12 +190,7 @@ export default {
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- totalData: null,
|
|
|
|
- addrProvinceList: [], // 省下拉
|
|
|
|
- addrCityList: [], // 市下拉
|
|
|
|
- addrDistrictList: [], // 区下拉
|
|
|
|
- productBrandList: [], // 品牌下拉数据
|
|
|
|
- productTypeList: [] // 分类下拉数据
|
|
|
|
|
|
+ totalData: null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -331,6 +249,7 @@ export default {
|
|
}
|
|
}
|
|
_this.$refs.table.refresh(true)
|
|
_this.$refs.table.refresh(true)
|
|
} else {
|
|
} else {
|
|
|
|
+ _this.$message.error("请选择退货完成日期")
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -366,6 +285,9 @@ export default {
|
|
this.queryParam.supplier.citySn = undefined
|
|
this.queryParam.supplier.citySn = undefined
|
|
this.queryParam.supplier.districtSn = undefined
|
|
this.queryParam.supplier.districtSn = undefined
|
|
this.totalData = null
|
|
this.totalData = null
|
|
|
|
+ if(this.advanced){
|
|
|
|
+ this.$refs.areaList.clearData()
|
|
|
|
+ }
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.table.clearTable()
|
|
this.$refs.table.clearTable()
|
|
},
|
|
},
|
|
@@ -389,88 +311,20 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 产品品牌 列表
|
|
|
|
- getProductBrand () {
|
|
|
|
- productBrandQuery({}).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.productBrandList = res.data
|
|
|
|
- } else {
|
|
|
|
- this.productBrandList = []
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 产品分类 列表
|
|
|
|
- getProductType () {
|
|
|
|
- productTypeQuery({}).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.productTypeList = res.data
|
|
|
|
- } else {
|
|
|
|
- this.productTypeList = []
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 获取城市列表
|
|
|
|
- getCityList (val) {
|
|
|
|
- this.addrCityList = []
|
|
|
|
- this.addrDistrictList = []
|
|
|
|
- this.queryParam.dealerCitySn = undefined
|
|
|
|
- this.queryParam.dealerCountySn = undefined
|
|
|
|
- if (val) {
|
|
|
|
- this.getArea('city', val)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- // 获取区县列表
|
|
|
|
- getAreaList (val) {
|
|
|
|
- this.addrDistrictList = []
|
|
|
|
- this.queryParam.dealerCountySn = 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.getProductBrand()
|
|
|
|
- this.getProductType()
|
|
|
|
- this.getArea('province')
|
|
|
|
|
|
+ areaChange(val){
|
|
|
|
+ this.queryParam.supplier.provinceSn = val[0] ? val[0] : ''
|
|
|
|
+ this.queryParam.supplier.citySn = val[1] ? val[1] : ''
|
|
|
|
+ this.queryParam.supplier.districtSn = val[2] ? val[2] : ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
- this.pageInit()
|
|
|
|
this.resetSearchForm()
|
|
this.resetSearchForm()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
activated () {
|
|
activated () {
|
|
// 如果是新页签打开,则重置当前页面
|
|
// 如果是新页签打开,则重置当前页面
|
|
if (this.$store.state.app.isNewTab) {
|
|
if (this.$store.state.app.isNewTab) {
|
|
- this.pageInit()
|
|
|
|
this.resetSearchForm()
|
|
this.resetSearchForm()
|
|
}
|
|
}
|
|
},
|
|
},
|