|
@@ -136,6 +136,21 @@
|
|
:scroll="{ x: 2960 }"
|
|
:scroll="{ x: 2960 }"
|
|
:defaultLoadData="false"
|
|
:defaultLoadData="false"
|
|
bordered>
|
|
bordered>
|
|
|
|
+ <!-- 附件 -->
|
|
|
|
+ <template slot="attachmentList" slot-scope="text, record">
|
|
|
|
+ <span v-if="record.attachmentList && record.attachmentList.length > 0">
|
|
|
|
+ <a
|
|
|
|
+ target="_blank"
|
|
|
|
+ style="color: #00aaff;text-decoration: underline;margin-right: 15px;"
|
|
|
|
+ :href="item.filePath"
|
|
|
|
+ v-for="item in record.attachmentList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ >
|
|
|
|
+ {{ item.fileName }}
|
|
|
|
+ </a>
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>--</span>
|
|
|
|
+ </template>
|
|
<template slot="footer">
|
|
<template slot="footer">
|
|
<a-row>
|
|
<a-row>
|
|
<a-col span="2">合计:</a-col>
|
|
<a-col span="2">合计:</a-col>
|
|
@@ -181,7 +196,7 @@ 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 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 { getArea } from '@/api/data'
|
|
@@ -189,11 +204,12 @@ import { productBrandQuery } from '@/api/productBrand'
|
|
import { productTypeQuery } from '@/api/productType'
|
|
import { productTypeQuery } from '@/api/productType'
|
|
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 { reportSalesReturnDetailList, reportSalesReturnDetailCount, reportSalesReturnDetailExport } from '@/api/reportData'
|
|
|
|
|
|
+import { toFixedDecimal } from '@/libs/tools.js'
|
|
|
|
+import { sparePartsReturnDetailReportList, sparePartsReturnDetailReportStat, sparePartsReturnReportExportDetail } from '@/api/reportData'
|
|
export default {
|
|
export default {
|
|
name: 'UrchaseDetailReturnList',
|
|
name: 'UrchaseDetailReturnList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { STable, VSelect, rangeDate, supplier, subarea, ProductBrand, reportModal },
|
|
|
|
|
|
+ components: { STable, VSelect, rangeDate, supplier, ProductBrand, reportModal },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -221,8 +237,7 @@ export default {
|
|
dealerCitySn: undefined,
|
|
dealerCitySn: undefined,
|
|
dealerCountySn: undefined
|
|
dealerCountySn: undefined
|
|
},
|
|
},
|
|
-
|
|
|
|
- productType: [],
|
|
|
|
|
|
+ // productType: [],
|
|
rules: {
|
|
rules: {
|
|
'time': [{ required: true, message: '请选择退货完成日期', trigger: 'change' }]
|
|
'time': [{ required: true, message: '请选择退货完成日期', trigger: 'change' }]
|
|
},
|
|
},
|
|
@@ -234,15 +249,11 @@ export default {
|
|
this.spinning = true
|
|
this.spinning = true
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
delete params.time
|
|
delete params.time
|
|
- return reportSalesReturnDetailList(params).then(res => {
|
|
|
|
|
|
+ return sparePartsReturnDetailReportList(params).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
this.getCount(params)
|
|
this.getCount(params)
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
|
- data.list[i].no = no + i + 1
|
|
|
|
- }
|
|
|
|
this.disabled = false
|
|
this.disabled = false
|
|
}
|
|
}
|
|
this.spinning = false
|
|
this.spinning = false
|
|
@@ -260,47 +271,37 @@ export default {
|
|
computed: {
|
|
computed: {
|
|
columns () {
|
|
columns () {
|
|
const arr = [
|
|
const arr = [
|
|
- { title: '采购退货单号', dataIndex: 'subareaNames', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '省份', dataIndex: 'dealerProvinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '供应商名称', dataIndex: 'dealerName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '退货原因', dataIndex: 'returnReason', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '补充说明', dataIndex: 'returnReason', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '附件', dataIndex: 'returnReason', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '退货完成日期', dataIndex: 'salesReturnDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '入库单号', dataIndex: 'salesReturnBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '品牌', dataIndex: 'productBrandName', width: 130, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '二级分类', dataIndex: 'productTypeName2', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '采购退货单号', dataIndex: 'sparePartsReturnNo', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '省份', dataIndex: 'supplier.provinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '供应商名称', dataIndex: 'supplier.supplierName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '退货原因', dataIndex: 'returnReasonDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '补充说明', dataIndex: 'explainInfo', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '附件', width: 100, align: 'center', scopedSlots: { customRender: 'attachmentList' } },
|
|
|
|
+ { title: '退货完成日期', dataIndex: 'auditDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '入库单号', dataIndex: 'sparePartsNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '品牌', dataIndex: 'product.productBrandName', width: 130, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '二级分类', dataIndex: 'product.productTypeName2', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '产品名称', dataIndex: 'productName', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '单位', dataIndex: 'productUnit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '批次号', dataIndex: 'productUnit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '入库数量', dataIndex: 'receiveQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '已退数量', dataIndex: 'badQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '申请退货数量', dataIndex: 'goodQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '操作员', dataIndex: 'goodQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
|
|
+ { title: '产品名称', dataIndex: 'product.name', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '单位', dataIndex: 'product.unit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '批次号', dataIndex: 'stockBatchNo', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '入库数量', dataIndex: 'putQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '已退数量', dataIndex: 'returnedQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '申请退货数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '操作员', dataIndex: 'submitorName', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
]
|
|
]
|
|
|
|
|
|
- if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
|
|
|
|
- arr.splice(14, 0, { title: '入库单价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
- arr.splice(18, 0, { title: '退货金额', dataIndex: 'totalPrice', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
|
|
+ if (this.$hasPermissions('B_isShowCost')) {
|
|
|
|
+ arr.splice(14, 0, { title: '入库单价', dataIndex: 'cost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } })
|
|
|
|
+ arr.splice(18, 0, { title: '退货金额', dataIndex: 'totalCost', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } })
|
|
}
|
|
}
|
|
- // if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
|
|
|
|
- // const ind = this.$hasPermissions('B_isShowPrice') ? 27 : 20
|
|
|
|
- // arr.splice(ind, 0, { title: '再入库单价', dataIndex: 'cost', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
- // arr.splice(ind + 3, 0, { title: '正常再入库金额', dataIndex: 'totalNormalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
- // arr.splice(ind + 4, 0, { title: '正常退货入库差额', dataIndex: 'totalNormalBalance', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
- // }
|
|
|
|
return arr
|
|
return arr
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- // 盘点库存日期
|
|
|
|
- handleStock () {
|
|
|
|
- this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
|
|
|
|
- },
|
|
|
|
// 总计
|
|
// 总计
|
|
getCount (params) {
|
|
getCount (params) {
|
|
- reportSalesReturnDetailCount(params).then(res => {
|
|
|
|
|
|
+ sparePartsReturnDetailReportStat(params).then(res => {
|
|
if (res.status == 200 && res.data) {
|
|
if (res.status == 200 && res.data) {
|
|
this.totalData = res.data
|
|
this.totalData = res.data
|
|
} else {
|
|
} else {
|
|
@@ -328,9 +329,6 @@ export default {
|
|
this.queryParam.beginDate = date[0] || ''
|
|
this.queryParam.beginDate = date[0] || ''
|
|
this.queryParam.endDate = date[1] || ''
|
|
this.queryParam.endDate = date[1] || ''
|
|
},
|
|
},
|
|
- custChange (val) {
|
|
|
|
- this.queryParam.dealerSn = val.key
|
|
|
|
- },
|
|
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam.time = [
|
|
this.queryParam.time = [
|
|
@@ -340,21 +338,20 @@ export default {
|
|
this.$refs.rangeDate.resetDate(this.queryParam.time)
|
|
this.$refs.rangeDate.resetDate(this.queryParam.time)
|
|
this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
|
|
this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
|
|
this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
- this.queryParam.salesReturnBillNo = ''
|
|
|
|
|
|
+ this.queryParam.sparePartsReturnNo = ''
|
|
this.queryParam.productCode = ''
|
|
this.queryParam.productCode = ''
|
|
this.queryParam.productName = ''
|
|
this.queryParam.productName = ''
|
|
- this.queryParam.dealerName = ''
|
|
|
|
- this.queryParam.dealerLevel = undefined
|
|
|
|
|
|
+ this.queryParam.supplierSn = ''
|
|
|
|
+ this.queryParam.returnReason = undefined
|
|
this.queryParam.productBrandTypeSn = undefined
|
|
this.queryParam.productBrandTypeSn = undefined
|
|
this.queryParam.productBrandSn = undefined
|
|
this.queryParam.productBrandSn = undefined
|
|
- this.queryParam.productTypeSn1 = ''
|
|
|
|
- this.queryParam.productTypeSn2 = ''
|
|
|
|
- this.queryParam.productTypeSn3 = ''
|
|
|
|
- this.queryParam.subareaSn = undefined
|
|
|
|
|
|
+ // this.queryParam.productTypeSn1 = ''
|
|
|
|
+ // this.queryParam.productTypeSn2 = ''
|
|
|
|
+ // this.queryParam.productTypeSn3 = ''
|
|
this.queryParam.dealerProvinceSn = undefined
|
|
this.queryParam.dealerProvinceSn = undefined
|
|
this.queryParam.dealerCitySn = undefined
|
|
this.queryParam.dealerCitySn = undefined
|
|
this.queryParam.dealerCountySn = undefined
|
|
this.queryParam.dealerCountySn = undefined
|
|
- this.productType = []
|
|
|
|
|
|
+ // this.productType = []
|
|
this.totalData = null
|
|
this.totalData = null
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.table.clearTable()
|
|
this.$refs.table.clearTable()
|
|
@@ -368,7 +365,7 @@ export default {
|
|
_this.showExport = true
|
|
_this.showExport = true
|
|
_this.exportLoading = true
|
|
_this.exportLoading = true
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
- hdExportExcel(reportSalesReturnDetailExport, params, '销售退货明细报表', function () {
|
|
|
|
|
|
+ hdExportExcel(sparePartsReturnReportExportDetail, params, '采购退货明细报表', function () {
|
|
_this.exportLoading = false
|
|
_this.exportLoading = false
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
})
|
|
})
|
|
@@ -377,11 +374,6 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- filterOption (input, option) {
|
|
|
|
- return (
|
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
- )
|
|
|
|
- },
|
|
|
|
// 产品分类 change
|
|
// 产品分类 change
|
|
changeProductType (val, opt) {
|
|
changeProductType (val, opt) {
|
|
this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
|
|
this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
|