|
@@ -145,33 +145,15 @@
|
|
|
bordered>
|
|
|
<template slot="footer">
|
|
|
<a-row :gutter="15">
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 退货数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 开单退货金额:{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? totalData.totalPrice : '--' }}
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 实售退货金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? totalData.totalRealAmount : '--' }}
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 返工数量:{{ (totalData && (totalData.totalBackStockQty || totalData.totalBackStockQty==0)) ? totalData.totalBackStockQty : '--' }}
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 坏件数量:{{ (totalData && (totalData.totalBadQty || totalData.totalBadQty==0)) ? totalData.totalBadQty : '--' }}
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 正常退货数量:{{ (totalData && (totalData.totalNormalQty || totalData.totalNormalQty==0)) ? totalData.totalNormalQty : '--' }}
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 正常退货金额:{{ (totalData && (totalData.totalNormalPrice || totalData.totalNormalPrice==0)) ? totalData.totalNormalPrice : '--' }}
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 正常再入库金额:{{ (totalData && (totalData.totalNormalCost || totalData.totalNormalCost==0)) ? totalData.totalNormalCost : '--' }}
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 正常退货入库差额:{{ (totalData && (totalData.totalNormalBalance || totalData.totalNormalBalance==0)) ? totalData.totalNormalBalance : '--' }}
|
|
|
- </a-col>
|
|
|
+ <a-col :md="4" :sm="24">退货数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24" v-if="$hasPermissions('B_isShowPrice')">开单退货金额:{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? totalData.totalPrice : '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24" v-if="$hasPermissions('B_isShowPrice')">实售退货金额:{{ (totalData && (totalData.totalRealAmount || totalData.totalRealAmount==0)) ? totalData.totalRealAmount : '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24">返工数量:{{ (totalData && (totalData.totalBackStockQty || totalData.totalBackStockQty==0)) ? totalData.totalBackStockQty : '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24">坏件数量:{{ (totalData && (totalData.totalBadQty || totalData.totalBadQty==0)) ? totalData.totalBadQty : '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24">正常退货数量:{{ (totalData && (totalData.totalNormalQty || totalData.totalNormalQty==0)) ? totalData.totalNormalQty : '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24" v-if="$hasPermissions('B_isShowPrice')">正常退货金额:{{ (totalData && (totalData.totalNormalPrice || totalData.totalNormalPrice==0)) ? totalData.totalNormalPrice : '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24" v-if="$hasPermissions('B_isShowCost')">正常再入库金额:{{ (totalData && (totalData.totalNormalCost || totalData.totalNormalCost==0)) ? totalData.totalNormalCost : '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24" v-if="$hasPermissions('B_isShowCost')">正常退货入库差额:{{ (totalData && (totalData.totalNormalBalance || totalData.totalNormalBalance==0)) ? totalData.totalNormalBalance : '--' }}</a-col>
|
|
|
</a-row>
|
|
|
</template>
|
|
|
</s-table>
|
|
@@ -226,36 +208,6 @@ export default {
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
exportLoading: false,
|
|
|
- columns: [
|
|
|
- { title: '区域', dataIndex: 'subareaNames', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '退货单号', dataIndex: 'salesReturnBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '省份', dataIndex: 'dealerProvinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '客户名称', dataIndex: 'dealerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '直接绑定客户名称', dataIndex: 'directDealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '间接绑定客户名称', dataIndex: 'indirectDealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '退货完成日期', dataIndex: 'salesReturnDate', width: 130, 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: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '单位', dataIndex: 'productUnit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '退货数量', dataIndex: 'qty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '返库数量', dataIndex: 'backStockQty', 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: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '退货开单金额', dataIndex: 'totalPrice', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '退货实售价', dataIndex: 'realPrice', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '退货实售金额', dataIndex: 'totalRealAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '市级价金额', dataIndex: 'totalWholesalePrice2', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '直接差价', dataIndex: 'directRebateAmount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '间接差价', dataIndex: 'indirectRebateAmount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '再入库单价', dataIndex: 'cost', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '正常退货数量', dataIndex: 'normalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '正常退货金额', dataIndex: 'totalNormalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '正常再入库金额', dataIndex: 'totalNormalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '正常退货入库差额', dataIndex: 'totalNormalBalance', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
- ],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -263,13 +215,16 @@ export default {
|
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
|
delete params.time
|
|
|
return reportSalesReturnDetailList(params).then(res => {
|
|
|
- this.getCount(params)
|
|
|
- const data = res.data
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].no = no + i + 1
|
|
|
+ let data
|
|
|
+ if (res.status == 200) {
|
|
|
+ data = res.data
|
|
|
+ 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
|
|
|
return data
|
|
|
})
|
|
@@ -282,6 +237,58 @@ export default {
|
|
|
productTypeList: [] // 分类下拉数据
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ columns () {
|
|
|
+ const arr = [
|
|
|
+ { title: '区域', dataIndex: 'subareaNames', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '退货单号', dataIndex: 'salesReturnBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '省份', dataIndex: 'dealerProvinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '客户名称', dataIndex: 'dealerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '直接绑定客户名称', dataIndex: 'directDealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '间接绑定客户名称', dataIndex: 'indirectDealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '退货完成日期', dataIndex: 'salesReturnDate', width: 130, 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: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '退货数量', dataIndex: 'qty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '返库数量', dataIndex: 'backStockQty', 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: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ // { title: '退货开单金额', dataIndex: 'totalPrice', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ // { title: '退货实售价', dataIndex: 'realPrice', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ // { title: '退货实售金额', dataIndex: 'totalRealAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ // { title: '市级价金额', dataIndex: 'totalWholesalePrice2', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ // { title: '直接差价', dataIndex: 'directRebateAmount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ // { title: '间接差价', dataIndex: 'indirectRebateAmount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ // { title: '再入库单价', dataIndex: 'cost', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '正常退货数量', dataIndex: 'normalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
+ // { title: '正常退货金额', dataIndex: 'totalNormalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ // { title: '正常再入库金额', dataIndex: 'totalNormalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ // { title: '正常退货入库差额', dataIndex: 'totalNormalBalance', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
+ ]
|
|
|
+ if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
|
|
|
+ const ind = this.$hasPermissions('B_isShowPrice') ? 23 : 16
|
|
|
+ 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 : '--') } })
|
|
|
+ }
|
|
|
+ if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
|
|
|
+ const ind = this.$hasPermissions('B_isShowCost') ? 25 : 24
|
|
|
+ arr.splice(16, 0, { title: '退货开单价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(17, 0, { title: '退货开单金额', dataIndex: 'totalPrice', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(18, 0, { title: '退货实售价', dataIndex: 'realPrice', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(19, 0, { title: '退货实售金额', dataIndex: 'totalRealAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(20, 0, { title: '市级价金额', dataIndex: 'totalWholesalePrice2', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(21, 0, { title: '直接差价', dataIndex: 'directRebateAmount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(22, 0, { title: '间接差价', dataIndex: 'indirectRebateAmount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(ind, 0, { title: '正常退货金额', dataIndex: 'totalNormalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ }
|
|
|
+ return arr
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 盘点库存日期
|
|
|
handleStock () {
|