|
@@ -20,12 +20,12 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="销售退货单号">
|
|
|
- <a-input id="salesDetailReportList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售退货单号"/>
|
|
|
+ <a-input id="salesDetailReportList-salesReturnNo" v-model.trim="queryParam.salesReturnNo" allowClear placeholder="请输入销售退货单号"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="客户名称">
|
|
|
- <a-input id="salesDetailReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
|
|
|
+ <a-input id="salesDetailReportList-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
@@ -73,13 +73,13 @@
|
|
|
<!-- 合计 -->
|
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
|
<div class="ftext" slot="message">
|
|
|
- 总退货数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
|
|
|
- 废品数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
|
|
|
- 入库数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
|
|
|
- 退货金额:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
|
|
|
- 折扣金额:<strong>{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? '¥'+totalData.totalPrice : '--' }}</strong>;
|
|
|
- 折后退货金额:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+totalData.totalProfit : '--' }}</strong>。
|
|
|
- 退货成本:<strong>{{ (totalData && (totalData.totalProfit || totalData.totalProfit==0)) ? '¥'+totalData.totalProfit : '--' }}</strong>。
|
|
|
+ 总退货数量:<strong>{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</strong>;
|
|
|
+ 废品数量:<strong>{{ (totalData && (totalData.celQty || totalData.celQty==0)) ? totalData.celQty : '--' }}</strong>;
|
|
|
+ 入库数量:<strong>{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</strong>;
|
|
|
+ 退货金额:<strong>{{ (totalData && (totalData.price || totalData.price==0)) ? '¥'+totalData.price : '--' }}</strong>;
|
|
|
+ 折扣金额:<strong>{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? '¥'+totalData.discountAmount : '--' }}</strong>;
|
|
|
+ 折后退货金额:<strong>{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? '¥'+totalData.discountedAmount : '--' }}</strong>;
|
|
|
+ 退货成本:<strong>{{ (totalData && (totalData.cost || totalData.cost==0)) ? '¥'+totalData.cost : '--' }}</strong>。
|
|
|
</div>
|
|
|
</a-alert>
|
|
|
<!-- 列表 -->
|
|
@@ -103,7 +103,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
|
import ProductType from '../../common/productType.js'
|
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
|
-import { reportSalesBillDetailList, reportSalesBillDetailCount, reportSalesBillDetailExport } from '@/api/reportData'
|
|
|
+import { reportSalesReturnDetailPageList, reportSalesReturnDetailTotal, reportSalesReturnDetailExport } from '@/api/reportData'
|
|
|
export default {
|
|
|
components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
|
|
|
mixins: [commonMixin],
|
|
@@ -119,7 +119,7 @@ export default {
|
|
|
beginDate: '',
|
|
|
endDate: '',
|
|
|
productType: undefined,
|
|
|
- salesTargetName: '',
|
|
|
+ buyerName: '',
|
|
|
productEntity: {
|
|
|
productBrandSn: undefined, // 产品品牌
|
|
|
productTypeSn1: '', // 产品一级分类
|
|
@@ -128,7 +128,7 @@ export default {
|
|
|
code: '', // 产品编码
|
|
|
name: '' // 产品名称
|
|
|
},
|
|
|
- salesBillNo: ''
|
|
|
+ salesReturnNo: ''
|
|
|
},
|
|
|
rules: {
|
|
|
'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
|
|
@@ -137,19 +137,19 @@ export default {
|
|
|
exportLoading: false,
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '销售退货单号', dataIndex: 'salesBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '客户名称', dataIndex: 'salesTargetName', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { 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: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '废品数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '入库数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '退货金额', dataIndex: 'totalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '折扣金额', dataIndex: 'totalPrice', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '折后退货金额', dataIndex: 'totalProfit', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '退货成本', dataIndex: 'totalProfit', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '审核时间', dataIndex: 'salesAuditDate', width: '11%', 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 || '--' } }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -157,7 +157,7 @@ export default {
|
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
|
this.spinning = true
|
|
|
delete params.time
|
|
|
- return reportSalesBillDetailList(params).then(res => {
|
|
|
+ return reportSalesReturnDetailPageList(params).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -166,6 +166,7 @@ export default {
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
+ data.list[i].inStockQty = data.list[i].qty
|
|
|
}
|
|
|
this.disabled = false
|
|
|
}
|
|
@@ -179,7 +180,7 @@ export default {
|
|
|
methods: {
|
|
|
// 合计
|
|
|
getCount (params) {
|
|
|
- reportSalesBillDetailCount(params).then(res => {
|
|
|
+ reportSalesReturnDetailTotal(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.totalData = res.data
|
|
|
} else {
|
|
@@ -210,8 +211,8 @@ export default {
|
|
|
this.queryParam.time = []
|
|
|
this.queryParam.beginDate = ''
|
|
|
this.queryParam.endDate = ''
|
|
|
- this.queryParam.salesBillNo = ''
|
|
|
- this.queryParam.salesTargetName = ''
|
|
|
+ this.queryParam.salesReturnNo = ''
|
|
|
+ this.queryParam.buyerName = ''
|
|
|
this.queryParam.productEntity.productBrandSn = undefined
|
|
|
this.queryParam.productEntity.productTypeSn1 = ''
|
|
|
this.queryParam.productEntity.productTypeSn2 = ''
|
|
@@ -232,7 +233,7 @@ export default {
|
|
|
const params = _this.queryParam
|
|
|
_this.exportLoading = true
|
|
|
_this.spinning = true
|
|
|
- reportSalesBillDetailExport(params).then(res => {
|
|
|
+ reportSalesReturnDetailExport(params).then(res => {
|
|
|
downloadExcel(res, '销售退货明细报表')
|
|
|
_this.exportLoading = false
|
|
|
_this.spinning = false
|