|
@@ -11,10 +11,10 @@
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
<div class="baseInfo" v-if="baseData">
|
|
|
<div>
|
|
|
- <span>产品编码:{{ baseData.dealerProductEntity.code }}</span>
|
|
|
+ <span>产品编码:{{ baseData.dealerProductEntity ? baseData.dealerProductEntity.code : baseData.productCode }}</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span>产品名称:{{ baseData.dealerProductEntity.name }}</span>
|
|
|
+ <span>产品名称:{{ baseData.dealerProductEntity ? baseData.dealerProductEntity.name : baseData.productName }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="outIndetail-modal-table">
|
|
@@ -52,6 +52,10 @@ export default {
|
|
|
// 弹框显示状态
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
+ },
|
|
|
+ outBizType: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
}
|
|
|
},
|
|
|
data () {
|
|
@@ -64,13 +68,25 @@ export default {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
// outBizType = SHOP_CALL_OUT(店内调出) / SALES (销售)
|
|
|
- return stockOutDetailList(Object.assign(parameter, { outBizSn: this.outBizSn, outBizNo: this.outBizNo, outBizType: this.outBizType })).then(res => {
|
|
|
+ const params = this.baseData
|
|
|
+ console.log(params)
|
|
|
+ const queryParams = { outBizType: this.outBizType, productSn: params.productSn }
|
|
|
+ if (this.outBizType == 'SALES') {
|
|
|
+ queryParams.outBizSn = params.salesBillSn
|
|
|
+ queryParams.outBizNo = params.salesBillNo
|
|
|
+ }
|
|
|
+ if (this.outBizType == 'SHOP_CALL_OUT') {
|
|
|
+ queryParams.outBizSn = params.storeCallOutSn
|
|
|
+ queryParams.outBizNo = params.storeCallOutNo
|
|
|
+ }
|
|
|
+ return stockOutDetailList(queryParams).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
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
|
|
|
+ data.list[i].totalCost = data.list[i].putCost * data.list[i].outQty
|
|
|
}
|
|
|
this.disabled = false
|
|
|
}
|
|
@@ -85,16 +101,16 @@ export default {
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
{ title: '库存批次', dataIndex: 'createDate', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '入库类型', dataIndex: 'callOutTypeName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '入库类型', dataIndex: 'outBizType', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '仓库', dataIndex: 'warehouseName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '仓位', dataIndex: 'warehouseLocationName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- // { title: '成本价', dataIndex: 'productTotalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '本次出库数量', dataIndex: 'productTotalCategory', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
- // { title: '成本小计', dataIndex: 'productTotalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
+ // { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '本次出库数量', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
+ // { title: '成本小计', dataIndex: 'totalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
]
|
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
|
- arr.splice(5, 0, { title: '成本价', dataIndex: 'productTotalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
- arr.splice(7, 0, { title: '成本小计', dataIndex: 'productTotalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(5, 0, { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(7, 0, { title: '成本小计', dataIndex: 'totalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
}
|
|
|
return arr
|
|
|
}
|