|
@@ -51,6 +51,10 @@
|
|
|
:showPagination="false"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
+ <!-- 结存余额-成本 -->
|
|
|
+ <template slot="endAmount" slot-scope="text, record">
|
|
|
+ <span v-if="record.endDetail" :style="{background: text ? 'chartreuse':'', display: 'block'}">{{ text ? '¥' + text : '--' }}</span>
|
|
|
+ </template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
|
</a-card>
|
|
@@ -185,19 +189,7 @@ export default {
|
|
|
dataIndex: 'endAmount',
|
|
|
align: 'center',
|
|
|
width: '14%',
|
|
|
- customRender: function (text, record) {
|
|
|
- let str
|
|
|
- if (record.endDetail) {
|
|
|
- if (text) {
|
|
|
- str = '¥' + text
|
|
|
- } else {
|
|
|
- str = '--'
|
|
|
- }
|
|
|
- } else {
|
|
|
- str = ''
|
|
|
- }
|
|
|
- return str
|
|
|
- }
|
|
|
+ scopedSlots: { customRender: 'endAmount' }
|
|
|
}
|
|
|
]
|
|
|
}
|
|
@@ -211,28 +203,32 @@ export default {
|
|
|
return reportStockPutOutMonthList(params).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
- if (res.data.beginAmountHide) { // 是否隐藏期初金额
|
|
|
- res.data.beginAmount = null
|
|
|
- }
|
|
|
- if (res.data.endAmountHide) { // 是否隐藏结存金额
|
|
|
- res.data.endAmount = null
|
|
|
+ if (res.data) {
|
|
|
+ if (res.data.beginAmountHide) { // 是否隐藏期初金额
|
|
|
+ res.data.beginAmount = null
|
|
|
+ }
|
|
|
+ if (res.data.endAmountHide) { // 是否隐藏结存金额
|
|
|
+ res.data.endAmount = null
|
|
|
+ }
|
|
|
+ // 组装数据
|
|
|
+ data = [
|
|
|
+ { no: 1, beginDetail: '期初金额', beginAmount: res.data.beginAmount, putDetail: '采购入库', putAmount: res.data.putPurchaseAmount, outDetail: '采购退货', outAmount: res.data.outPurchaseReturnAmount, endDetail: null, endAmount: null },
|
|
|
+ { no: 2, beginDetail: null, beginAmount: null, putDetail: '散件入库', putAmount: res.data.putSparePartsAmount, outDetail: '散件退货', outAmount: res.data.outSparePartsReturnAmount, endDetail: null, endAmount: null },
|
|
|
+ { no: 3, beginDetail: null, beginAmount: null, putDetail: '销售退货', putAmount: res.data.putSalesReturnAmount, outDetail: '销售', outAmount: res.data.outSalesAmount, endDetail: null, endAmount: null },
|
|
|
+ { no: 4, beginDetail: null, beginAmount: null, putDetail: '仓库调入', putAmount: res.data.putWarehouseCallInAmount, outDetail: '仓库调出', outAmount: res.data.outWarehouseCallOutAmount, endDetail: null, endAmount: null },
|
|
|
+ { no: 5, beginDetail: null, beginAmount: null, putDetail: '库存盘点盘盈', putAmount: res.data.putStockCheckInAmount, outDetail: '库存盘点盘亏', outAmount: res.data.outCheckOrderOutAmount, endDetail: null, endAmount: null },
|
|
|
+ { no: 6, beginDetail: null, beginAmount: null, putDetail: '连锁调入', putAmount: res.data.putLinkageCallInAmount, outDetail: '连锁调出', outAmount: res.data.outLinkageCallOutAmount, endDetail: null, endAmount: null },
|
|
|
+ { no: 7, beginDetail: null, beginAmount: null, putDetail: '库存导入', putAmount: res.data.putStockImportAmount, outDetail: null, outAmount: null, endDetail: null, endAmount: null },
|
|
|
+ { no: 8, beginDetail: null, beginAmount: null, putDetail: '散件导入', putAmount: res.data.putSparePartsImportAmount, outDetail: null, outAmount: null, endDetail: null, endAmount: null },
|
|
|
+ { no: 9, beginDetail: null, beginAmount: null, putDetail: null, putAmount: null, outDetail: '店内调出', outAmount: res.data.outShopCallOutAmount, endDetail: null, endAmount: null },
|
|
|
+ { no: 10, beginDetail: null, beginAmount: null, putDetail: null, putAmount: null, outDetail: '急件冲减', outAmount: res.data.outDispatchDeductAmount, endDetail: null, endAmount: null },
|
|
|
+ { no: '成本合计', beginDetail: ' ', beginAmount: res.data.beginAmount, putDetail: ' ', putAmount: res.data.putAmount, outDetail: ' ', outAmount: res.data.outAmount, endDetail: '月末余额', endAmount: res.data.endAmount }
|
|
|
+ ]
|
|
|
+ } else {
|
|
|
+ data = []
|
|
|
}
|
|
|
- // 组装数据
|
|
|
- data = [
|
|
|
- { no: 1, beginDetail: '期初金额', beginAmount: res.data.beginAmount, putDetail: '采购入库', putAmount: res.data.putPurchaseAmount, outDetail: '采购退货', outAmount: res.data.outPurchaseReturnAmount, endDetail: null, endAmount: null },
|
|
|
- { no: 2, beginDetail: null, beginAmount: null, putDetail: '散件入库', putAmount: res.data.putSparePartsAmount, outDetail: '散件退货', outAmount: res.data.outSparePartsReturnAmount, endDetail: null, endAmount: null },
|
|
|
- { no: 3, beginDetail: null, beginAmount: null, putDetail: '销售退货', putAmount: res.data.putSalesReturnAmount, outDetail: '销售', outAmount: res.data.outSalesAmount, endDetail: null, endAmount: null },
|
|
|
- { no: 4, beginDetail: null, beginAmount: null, putDetail: '仓库调入', putAmount: res.data.putWarehouseCallInAmount, outDetail: '仓库调出', outAmount: res.data.outWarehouseCallOutAmount, endDetail: null, endAmount: null },
|
|
|
- { no: 5, beginDetail: null, beginAmount: null, putDetail: '库存盘点盘盈', putAmount: res.data.putStockCheckInAmount, outDetail: '库存盘点盘亏', outAmount: res.data.outCheckOrderOutAmount, endDetail: null, endAmount: null },
|
|
|
- { no: 6, beginDetail: null, beginAmount: null, putDetail: '连锁调入', putAmount: res.data.putLinkageCallInAmount, outDetail: '连锁调出', outAmount: res.data.outLinkageCallOutAmount, endDetail: null, endAmount: null },
|
|
|
- { no: 7, beginDetail: null, beginAmount: null, putDetail: '库存导入', putAmount: res.data.putStockImportAmount, outDetail: null, outAmount: null, endDetail: null, endAmount: null },
|
|
|
- { no: 8, beginDetail: null, beginAmount: null, putDetail: '散件导入', putAmount: res.data.putSparePartsImportAmount, outDetail: null, outAmount: null, endDetail: null, endAmount: null },
|
|
|
- { no: 9, beginDetail: null, beginAmount: null, putDetail: null, putAmount: null, outDetail: '店内调出', outAmount: res.data.outShopCallOutAmount, endDetail: null, endAmount: null },
|
|
|
- { no: 10, beginDetail: null, beginAmount: null, putDetail: null, putAmount: null, outDetail: '急件冲减', outAmount: res.data.outDispatchDeductAmount, endDetail: null, endAmount: null },
|
|
|
- { no: '成本合计', beginDetail: ' ', beginAmount: res.data.beginAmount, putDetail: ' ', putAmount: res.data.putAmount, outDetail: ' ', outAmount: res.data.outAmount, endDetail: '月末余额', endAmount: res.data.endAmount }
|
|
|
- ]
|
|
|
- this.disabled = false
|
|
|
}
|
|
|
+ this.disabled = false
|
|
|
this.spinning = false
|
|
|
return data
|
|
|
})
|