|
@@ -47,17 +47,17 @@
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="产品编码">
|
|
<a-form-model-item label="产品编码">
|
|
- <a-input id="urgentItemsOffsetReport-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
|
|
|
|
|
|
+ <a-input id="urgentItemsOffsetReport-code" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="产品名称">
|
|
<a-form-model-item label="产品名称">
|
|
- <a-input id="urgentItemsOffsetReport-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
|
|
|
|
|
|
+ <a-input id="urgentItemsOffsetReport-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品品牌">
|
|
<a-form-item label="产品品牌">
|
|
- <ProductBrand id="urgentItemsOffsetReport-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
|
|
|
|
|
|
+ <ProductBrand id="urgentItemsOffsetReport-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -75,8 +75,8 @@
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
:disabled="disabled"
|
|
:disabled="disabled"
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
- v-if="$hasPermissions('M_urgentItemsOffsetReportExport')"
|
|
|
|
class="button-warning"
|
|
class="button-warning"
|
|
|
|
+ v-if="$hasPermissions('M_urgentItemsOffsetReportExport')"
|
|
id="urgentItemsOffsetReport-export-btn">导出</a-button>
|
|
id="urgentItemsOffsetReport-export-btn">导出</a-button>
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
{{ advanced ? '收起' : '展开' }}
|
|
{{ advanced ? '收起' : '展开' }}
|
|
@@ -89,7 +89,7 @@
|
|
<!-- 合计 -->
|
|
<!-- 合计 -->
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
<div class="ftext" slot="message">
|
|
<div class="ftext" slot="message">
|
|
- 产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
|
|
|
|
|
|
+ 产品总数量:<strong>{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</strong>;
|
|
<div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
|
|
<div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
|
|
冲减总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? ('¥'+toThousands(totalData.totalCost)) : '--' }}</strong>。
|
|
冲减总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? ('¥'+toThousands(totalData.totalCost)) : '--' }}</strong>。
|
|
</div>
|
|
</div>
|
|
@@ -116,7 +116,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
-import { reportSalesReturnDetailPageList, reportSalesReturnDetailTotal, reportSalesReturnDetailExport } from '@/api/reportData'
|
|
|
|
|
|
+import { reportUrgentDetailQueryPage, reportUrgentDetailQueryCount, reportUrgentDetailExport } from '@/api/reportData'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
|
|
components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
@@ -136,17 +136,15 @@ export default {
|
|
urgentBillNo: '',
|
|
urgentBillNo: '',
|
|
bizType: undefined,
|
|
bizType: undefined,
|
|
productType: undefined,
|
|
productType: undefined,
|
|
- productEntity: {
|
|
|
|
- productBrandSn: undefined, // 产品品牌
|
|
|
|
- productTypeSn1: '', // 产品一级分类
|
|
|
|
- productTypeSn2: '', // 产品二级分类
|
|
|
|
- productTypeSn3: '', // 产品三级分类
|
|
|
|
- code: '', // 产品编码
|
|
|
|
- name: '' // 产品名称
|
|
|
|
- },
|
|
|
|
|
|
+ productBrandSn: undefined, // 产品品牌
|
|
|
|
+ productTypeSn1: '', // 产品一级分类
|
|
|
|
+ productTypeSn2: '', // 产品二级分类
|
|
|
|
+ productTypeSn3: '', // 产品三级分类
|
|
|
|
+ productCode: '', // 产品编码
|
|
|
|
+ productName: '' // 产品名称
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
- 'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
|
|
|
|
|
|
+ 'time': [{ required: true, message: '请选择冲减时间', trigger: 'change' }]
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
exportLoading: false,
|
|
exportLoading: false,
|
|
@@ -156,7 +154,8 @@ export default {
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
this.spinning = true
|
|
this.spinning = true
|
|
delete params.time
|
|
delete params.time
|
|
- return reportSalesReturnDetailPageList(params).then(res => {
|
|
|
|
|
|
+ delete params.productType
|
|
|
|
+ return reportUrgentDetailQueryPage(params).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
@@ -165,7 +164,6 @@ export default {
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
- data.list[i].inStockQty = data.list[i].qty
|
|
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
}
|
|
}
|
|
@@ -181,22 +179,18 @@ export default {
|
|
const _this = this
|
|
const _this = this
|
|
const arr = [
|
|
const arr = [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
- { title: '销售退货单号', dataIndex: 'salesReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '客户名称', dataIndex: 'buyerName', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '退货数量', dataIndex: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '废品数量', dataIndex: 'celQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '入库数量', dataIndex: 'inStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '退货金额', dataIndex: 'price', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '折扣金额', dataIndex: 'discountAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '折后退货金额', dataIndex: 'discountedAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- // { title: '退货成本', dataIndex: 'cost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
|
|
|
+ { title: '急件单号', dataIndex: 'urgentBillNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '急件类型', dataIndex: 'bizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '销售单号', dataIndex: 'bizBillNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '客户名称', dataIndex: 'buyerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '13%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '冲减时间', dataIndex: 'offSetTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
]
|
|
]
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
- arr.splice(12, 0, { title: '退货成本', dataIndex: 'cost', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
|
|
+ arr.splice(9, 0, { title: '成本', dataIndex: 'cost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
}
|
|
}
|
|
return arr
|
|
return arr
|
|
}
|
|
}
|
|
@@ -204,7 +198,7 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
// 合计
|
|
// 合计
|
|
getCount (params) {
|
|
getCount (params) {
|
|
- reportSalesReturnDetailTotal(params).then(res => {
|
|
|
|
|
|
+ reportUrgentDetailQueryCount(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.totalData = res.data
|
|
this.totalData = res.data
|
|
} else {
|
|
} else {
|
|
@@ -239,12 +233,12 @@ export default {
|
|
this.queryParam.buyerName = ''
|
|
this.queryParam.buyerName = ''
|
|
this.queryParam.urgentBillNo = ''
|
|
this.queryParam.urgentBillNo = ''
|
|
this.queryParam.bizType = undefined
|
|
this.queryParam.bizType = undefined
|
|
- this.queryParam.productEntity.productBrandSn = undefined
|
|
|
|
- this.queryParam.productEntity.productTypeSn1 = ''
|
|
|
|
- this.queryParam.productEntity.productTypeSn2 = ''
|
|
|
|
- this.queryParam.productEntity.productTypeSn3 = ''
|
|
|
|
- this.queryParam.productEntity.code = ''
|
|
|
|
- this.queryParam.productEntity.name = ''
|
|
|
|
|
|
+ this.queryParam.productBrandSn = undefined
|
|
|
|
+ this.queryParam.productTypeSn1 = ''
|
|
|
|
+ this.queryParam.productTypeSn2 = ''
|
|
|
|
+ this.queryParam.productTypeSn3 = ''
|
|
|
|
+ this.queryParam.productCode = ''
|
|
|
|
+ this.queryParam.productName = ''
|
|
this.queryParam.productType = []
|
|
this.queryParam.productType = []
|
|
this.productType = []
|
|
this.productType = []
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
@@ -260,8 +254,8 @@ export default {
|
|
params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
|
|
params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
|
|
_this.exportLoading = true
|
|
_this.exportLoading = true
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
- reportSalesReturnDetailExport(params).then(res => {
|
|
|
|
- downloadExcel(res, '销售退货明细报表')
|
|
|
|
|
|
+ reportUrgentDetailExport(params).then(res => {
|
|
|
|
+ downloadExcel(res, '急件冲减明细报表')
|
|
_this.exportLoading = false
|
|
_this.exportLoading = false
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
})
|
|
})
|
|
@@ -273,9 +267,9 @@ export default {
|
|
},
|
|
},
|
|
// 产品分类 change
|
|
// 产品分类 change
|
|
changeProductType (val, opt) {
|
|
changeProductType (val, opt) {
|
|
- this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
|
|
|
|
- this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
|
- this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
|
|
|
|
|
|
+ this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
|
|
|
|
+ this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
|
+ this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
},
|
|
},
|
|
pageInit () {
|
|
pageInit () {
|
|
this.disabled = false
|
|
this.disabled = false
|