Commit 2e5c408d by 张立顺

发货单单位换算错误

1 parent ec993848
<template> <template>
<GLDialog v-if="dialogShow" bigTitle="详细信息" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false" :hasFooter="false"> <GLDialog v-if="dialogShow" bigTitle="详细信息" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false"
:hasFooter="false">
<div class="detail-info"> <div class="detail-info">
<div> <div>
发货单号: 发货单号:
...@@ -23,18 +24,26 @@ ...@@ -23,18 +24,26 @@
</div> </div>
<div> <div>
发货数量: 发货数量:
<span>{{ membraneTypeList.includes(detailInfo.goodsType) ? `${detailInfo.purchaseNumber}卷` : `${detailInfo.purchaseNumber}件` }}</span> <span>{{ membraneTypeList.includes(detailInfo.goodsType) ? `${detailInfo.purchaseNumber}卷` :
<span class="lookNumber" @click="lookNumber(detailInfo.deliveryCardList)" v-if="detailInfo.deliveryCardList && detailInfo.deliveryCardList.length > 0">查看卡号</span> `${detailInfo.purchaseNumber}件` }}</span>
<span class="lookNumber" @click="lookNumber(detailInfo.deliveryCardList)"
v-if="detailInfo.deliveryCardList && detailInfo.deliveryCardList.length > 0">查看卡号</span>
</div> </div>
<div> <div>
可用库存数量: 可用库存数量:
<span>{{ detailInfo.stockNum }}{{ membraneTypeList.includes(detailInfo.goodsType) ? `米` : `件` }}</span> <span>{{ detailInfo.stockNum }}{{ membraneTypeList.includes(detailInfo.goodsType) ? `米` : `件` }}</span>
</div> </div>
</div> </div>
<el-form ref="addForm" :model="detailInfo" size="small" v-if="detailInfo.deliveryCardList === null||detailInfo.deliveryCardList.length==0"> <el-form ref="addForm" :model="detailInfo" size="small"
<GLTable :tableData="detailInfo.goodsWarehousingList" :noDataImg="url" :tableParams="tableParams" :hasPage="false"> v-if="detailInfo.deliveryCardList === null || detailInfo.deliveryCardList.length == 0">
<GLTable :tableData="detailInfo.goodsWarehousingList" :noDataImg="url" :tableParams="tableParams"
:hasPage="false">
<template slot="increaseStockNum" slot-scope="scope"> <template slot="increaseStockNum" slot-scope="scope">
<span>{{ membraneTypeList.includes(scope.scope.goodsType) ? `${scope.scope.increaseStockNum}米` : `${scope.scope.increaseStockNum}件` }}</span> <!-- <span>{{ membraneTypeList.includes(scope.scope.goodsType) ? `${scope.scope.increaseStockNum}米` : `${scope.scope.increaseStockNum}件` }}</span> -->
<span>{{ scope.scope.increaseStockNum || scope.scope.increaseStockNum == 0 ?
(membraneTypeList.includes(scope.scope.goodsType) ? parseFloat(scope.scope.increaseStockNum /
scope.scope.alternateUnits).toFixed(2) : parseFloat(scope.scope.increaseStockNum).toFixed(2)) +
(membraneTypeList.includes(scope.scope.goodsType) ? '卷' : '件') : '-' }}</span>
</template> </template>
</GLTable> </GLTable>
</el-form> </el-form>
...@@ -44,7 +53,8 @@ ...@@ -44,7 +53,8 @@
</div> </div>
<!-- </template> --> <!-- </template> -->
<el-dialog width="750px" title="查看发货卡号" :visible.sync="innerVisible" append-to-body> <el-dialog width="750px" title="查看发货卡号" :visible.sync="innerVisible" append-to-body>
<GLTable class="look-card-wrap" :tableData="tableData" :noDataImg="url" :tableParams="innerParams" :hasPage="false"></GLTable> <GLTable class="look-card-wrap" :tableData="tableData" :noDataImg="url" :tableParams="innerParams" :hasPage="false">
</GLTable>
</el-dialog> </el-dialog>
</GLDialog> </GLDialog>
</template> </template>
...@@ -126,6 +136,12 @@ export default { ...@@ -126,6 +136,12 @@ export default {
this.$apis.delivery.getDeliveryDetail({ id: this.id }).then(res => { this.$apis.delivery.getDeliveryDetail({ id: this.id }).then(res => {
const { data } = res const { data } = res
if (res.code == 0) { if (res.code == 0) {
data.goodsWarehousingList.forEach(item => {
// 换算单位
// item.deliveryDetailList.forEach(info => {
item.alternateUnits = data?.stockNum / data?.purchaseNumber
// })
})
this.detailInfo = data this.detailInfo = data
} }
}) })
...@@ -148,42 +164,49 @@ export default { ...@@ -148,42 +164,49 @@ export default {
color: #666666ff; color: #666666ff;
font-size: 14px; font-size: 14px;
margin-bottom: 16px; margin-bottom: 16px;
span { span {
color: #333333ff; color: #333333ff;
} }
.add-btn { .add-btn {
font-size: 14px; font-size: 14px;
color: #5850ff; color: #5850ff;
cursor: pointer; cursor: pointer;
} }
} }
.table-wrap { .table-wrap {
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
padding: 16px; padding: 16px;
box-sizing: border-box; box-sizing: border-box;
margin-top: 16px; margin-top: 16px;
/deep/ .el-form-item__error { /deep/ .el-form-item__error {
padding-top: 2px; padding-top: 2px;
z-index: 9999999; z-index: 9999999;
position: static; position: static;
} }
} }
.lookNumber { .lookNumber {
font-size: 14px; font-size: 14px;
color: #5850ff !important; color: #5850ff !important;
cursor: pointer; cursor: pointer;
margin-left: 8px; margin-left: 8px;
} }
.look-card-wrap { .look-card-wrap {
max-height: 600px; max-height: 600px;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
/deep/.el-table th.el-table__cell > .cell {
/deep/.el-table th.el-table__cell>.cell {
padding: 0 16px; padding: 0 16px;
text-align: center; text-align: center;
} }
/deep/.el-table__body td.el-table__cell { /deep/.el-table__body td.el-table__cell {
text-align: center; text-align: center;
} }
} }</style>
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!