|
@@ -34,15 +34,15 @@
|
|
<div slot="message" style="display: flex;">
|
|
<div slot="message" style="display: flex;">
|
|
盘盈数量:<strong :style="{ color: productTotal && productTotal.profitQty>0?'red':productTotal && productTotal.profitQty<0?'green':'' }">{{ productTotal && (productTotal.profitQty || productTotal.profitQty==0) ? productTotal.profitQty : '--' }}</strong>,
|
|
盘盈数量:<strong :style="{ color: productTotal && productTotal.profitQty>0?'red':productTotal && productTotal.profitQty<0?'green':'' }">{{ productTotal && (productTotal.profitQty || productTotal.profitQty==0) ? productTotal.profitQty : '--' }}</strong>,
|
|
<div v-if="$hasPermissions('B_isShowCost')">
|
|
<div v-if="$hasPermissions('B_isShowCost')">
|
|
- 盘盈金额:<strong :style="{ color: productTotal && productTotal.profitCost>0?'red':productTotal && productTotal.profitCost<0?'green':'' }">{{ productTotal && (productTotal.profitCost || productTotal.profitCost==0) ? productTotal.profitCost : '--' }}</strong>,
|
|
|
|
- </div>
|
|
|
|
|
|
+ 盘盈金额:<strong :style="{ color: productTotal && productTotal.profitCost>0?'red':productTotal && productTotal.profitCost<0?'green':'' }">{{ productTotal && (productTotal.profitCost || productTotal.profitCost==0) ? productTotal.profitCost : '--' }}</strong>,
|
|
|
|
+ </div>
|
|
盘亏数量:<strong :style="{ color: productTotal && productTotal.lossQty>0?'red':productTotal && productTotal.lossQty<0?'green':'' }">{{ productTotal && (productTotal.lossQty || productTotal.lossQty==0) ? productTotal.lossQty : '--' }}</strong>,
|
|
盘亏数量:<strong :style="{ color: productTotal && productTotal.lossQty>0?'red':productTotal && productTotal.lossQty<0?'green':'' }">{{ productTotal && (productTotal.lossQty || productTotal.lossQty==0) ? productTotal.lossQty : '--' }}</strong>,
|
|
<div v-if="$hasPermissions('B_isShowCost')">
|
|
<div v-if="$hasPermissions('B_isShowCost')">
|
|
- 盘亏金额:<strong :style="{ color: productTotal && productTotal.lossCost>0?'red':productTotal && productTotal.lossCost<0?'green':'' }">{{ productTotal && (productTotal.lossCost || productTotal.lossCost==0) ? productTotal.lossCost : '--' }}</strong>,
|
|
|
|
|
|
+ 盘亏金额:<strong :style="{ color: productTotal && productTotal.lossCost>0?'red':productTotal && productTotal.lossCost<0?'green':'' }">{{ productTotal && (productTotal.lossCost || productTotal.lossCost==0) ? productTotal.lossCost : '--' }}</strong>,
|
|
</div>
|
|
</div>
|
|
盈亏总数量:<strong :style="{ color: productTotal && productTotal.profitLossQty>0?'red':productTotal && productTotal.profitLossQty<0?'green':'' }">{{ productTotal && (productTotal.profitLossQty || productTotal.profitLossQty ==0) ? productTotal.profitLossQty : '--' }}</strong>,
|
|
盈亏总数量:<strong :style="{ color: productTotal && productTotal.profitLossQty>0?'red':productTotal && productTotal.profitLossQty<0?'green':'' }">{{ productTotal && (productTotal.profitLossQty || productTotal.profitLossQty ==0) ? productTotal.profitLossQty : '--' }}</strong>,
|
|
<div v-if="$hasPermissions('B_isShowCost')">
|
|
<div v-if="$hasPermissions('B_isShowCost')">
|
|
- 盈亏总金额:<strong :style="{ color: productTotal && productTotal.profitLossCost>0?'red':productTotal && productTotal.profitLossCost<0?'green':'' }">{{ productTotal && (productTotal.profitLossCost || productTotal.profitLossCost==0) ? productTotal.profitLossCost : '--' }}</strong>
|
|
|
|
|
|
+ 盈亏总金额:<strong :style="{ color: productTotal && productTotal.profitLossCost>0?'red':productTotal && productTotal.profitLossCost<0?'green':'' }">{{ productTotal && (productTotal.profitLossCost || productTotal.profitLossCost==0) ? productTotal.profitLossCost : '--' }}</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a-alert>
|
|
</a-alert>
|
|
@@ -114,20 +114,23 @@ export default {
|
|
profitLossFlag: undefined,
|
|
profitLossFlag: undefined,
|
|
productCode: ''
|
|
productCode: ''
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
const params = Object.assign(parameter, this.queryParam, { checkWarehouseSn: this.$route.params.sn })
|
|
const params = Object.assign(parameter, this.queryParam, { checkWarehouseSn: this.$route.params.sn })
|
|
return checkWarehouseDetailFinanceList(params).then(res => {
|
|
return checkWarehouseDetailFinanceList(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
|
|
this.spinning = false
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
@@ -137,30 +140,30 @@ export default {
|
|
productTotal: null // 合计
|
|
productTotal: null // 合计
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- computed:{
|
|
|
|
- columns(){
|
|
|
|
- const arr=[
|
|
|
|
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
|
- { title: '产品名称', dataIndex: 'productName', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '单位', dataIndex: 'productUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '入库时间', dataIndex: 'lastStockTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '批次', dataIndex: 'stockBatchNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '库存数量', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '盘点数量', dataIndex: 'checkQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '监盘数量', dataIndex: 'checkSuperviseQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- // { title: '单价', dataIndex: 'checkCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '盈亏数量', dataIndex: 'profitLossQty', scopedSlots: { customRender: 'profitLossQty' }, width: '6%', align: 'center' },
|
|
|
|
|
|
+ computed: {
|
|
|
|
+ columns () {
|
|
|
|
+ const arr = [
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '入库时间', dataIndex: 'lastStockTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '批次', dataIndex: 'stockBatchNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '库存数量', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '盘点数量', dataIndex: 'checkQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '监盘数量', dataIndex: 'checkSuperviseQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ // { title: '单价', dataIndex: 'checkCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '盈亏数量', dataIndex: 'profitLossQty', scopedSlots: { customRender: 'profitLossQty' }, width: '6%', align: 'center' }
|
|
// { title: '盈亏金额', dataIndex: 'profitLossCost', scopedSlots: { customRender: 'profitLossCost' }, width: '6%', align: 'center' }
|
|
// { title: '盈亏金额', dataIndex: 'profitLossCost', scopedSlots: { customRender: 'profitLossCost' }, width: '6%', align: 'center' }
|
|
- ]
|
|
|
|
- if(this.$hasPermissions('B_isShowCost')){ //成本价权限
|
|
|
|
- arr.splice(11, 0, { title: '单价', dataIndex: 'checkCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
- arr.splice(13, 0, { title: '盈亏金额', dataIndex: 'profitLossCost', scopedSlots: { customRender: 'profitLossCost' }, width: '6%', align: 'center' })
|
|
|
|
|
|
+ ]
|
|
|
|
+ if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
|
|
|
|
+ arr.splice(11, 0, { title: '单价', dataIndex: 'checkCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
+ arr.splice(13, 0, { title: '盈亏金额', dataIndex: 'profitLossCost', scopedSlots: { customRender: 'profitLossCost' }, width: '6%', align: 'center' })
|
|
|
|
+ }
|
|
|
|
+ return arr
|
|
}
|
|
}
|
|
- return arr
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 返回列表
|
|
// 返回列表
|