|
@@ -79,7 +79,9 @@
|
|
退货金额:<strong>{{ (totalData && (totalData.price || totalData.price==0)) ? '¥'+totalData.price : '--' }}</strong>;
|
|
退货金额:<strong>{{ (totalData && (totalData.price || totalData.price==0)) ? '¥'+totalData.price : '--' }}</strong>;
|
|
折扣金额:<strong>{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? '¥'+totalData.discountAmount : '--' }}</strong>;
|
|
折扣金额:<strong>{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? '¥'+totalData.discountAmount : '--' }}</strong>;
|
|
折后退货金额:<strong>{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? '¥'+totalData.discountedAmount : '--' }}</strong>;
|
|
折后退货金额:<strong>{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? '¥'+totalData.discountedAmount : '--' }}</strong>;
|
|
- 退货成本:<strong>{{ (totalData && (totalData.cost || totalData.cost==0)) ? '¥'+totalData.cost : '--' }}</strong>。
|
|
|
|
|
|
+ <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
|
|
|
|
+ 退货成本:<strong>{{ (totalData && (totalData.cost || totalData.cost==0)) ? '¥'+totalData.cost : '--' }}</strong>。
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</a-alert>
|
|
</a-alert>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
@@ -135,22 +137,6 @@ export default {
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
exportLoading: false,
|
|
exportLoading: false,
|
|
- columns: [
|
|
|
|
- { 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 || '--' } }
|
|
|
|
- ],
|
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
@@ -177,6 +163,30 @@ export default {
|
|
totalData: null // 合计
|
|
totalData: null // 合计
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ columns () {
|
|
|
|
+ const arr = [
|
|
|
|
+ { 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 || '--' } }
|
|
|
|
+ ]
|
|
|
|
+ if (this.$hasPermissions('M_ShowAllCost')) {
|
|
|
|
+ arr.splice(12, 0, { title: '退货成本', dataIndex: 'cost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
+ }
|
|
|
|
+ return arr
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
// 合计
|
|
// 合计
|
|
getCount (params) {
|
|
getCount (params) {
|
|
@@ -231,6 +241,7 @@ export default {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
const params = _this.queryParam
|
|
const params = _this.queryParam
|
|
|
|
+ params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
|
|
_this.exportLoading = true
|
|
_this.exportLoading = true
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
reportSalesReturnDetailExport(params).then(res => {
|
|
reportSalesReturnDetailExport(params).then(res => {
|