|
|
|
@ -175,13 +175,19 @@ |
|
|
|
<!-- 页签 --> |
|
|
|
<el-tabs v-model="activeTable" style="width: 100%" :style="{height: secondHeight + 'px'}" type="border-card" @tab-click="tabClick" class="customer-tab"> |
|
|
|
<el-tab-pane label="入库明细" name="inboundDetail"> |
|
|
|
<el-form label-position="top" style="margin-left: 2px;"> |
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px;"> |
|
|
|
<el-form label-position="top" style="margin-left: 2px; margin-bottom: 0;"> |
|
|
|
<el-button v-if="currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中'" type="primary" @click="addInboundDetailModal()" icon="el-icon-plus">新增</el-button> |
|
|
|
<el-button v-if="currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中'" type="primary" @click="deleteInboundDetail()" icon="el-icon-minus">删除</el-button> |
|
|
|
<el-button v-if="!editBatchVisible && (currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中')" @click="editBatchModel">批量编辑</el-button> |
|
|
|
<el-button v-if="editBatchVisible" @click="batchModel" :loading="saveLoading">批量保存</el-button> |
|
|
|
<el-button v-if="editBatchVisible" @click="editBatchVisible = false" type="info">取消编辑</el-button> |
|
|
|
</el-form> |
|
|
|
<div style="display: flex; align-items: center; font-size: 14px; color: #606266;"> |
|
|
|
<span style="margin-right: 20px;">总张数:<span style="color: #409EFF; font-weight: bold;">{{ detailList.length }}</span></span> |
|
|
|
<span>总数量:<span style="color: #409EFF; font-weight: bold;">{{ detailTotalQty }}</span></span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-table |
|
|
|
:data="detailList" |
|
|
|
:height="secondHeight - 68" |
|
|
|
@ -1129,6 +1135,19 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
// 计算明细列表要求入库数量总和 |
|
|
|
detailTotalQty() { |
|
|
|
if (!this.detailList || this.detailList.length === 0) { |
|
|
|
return 0; |
|
|
|
} |
|
|
|
return this.detailList.reduce((sum, item) => { |
|
|
|
const qty = parseFloat(item.requiredQty) || 0; |
|
|
|
return sum + qty; |
|
|
|
}, 0); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
mounted () { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight / 2 - 100 |
|
|
|
|