Browse Source

2026-04-16

领料申请管理页面,材料明细页签的【批量编辑】功能优化
master
fengyuan_yang 2 days ago
parent
commit
86a02f2c73
  1. 38
      src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue

38
src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue

@ -212,7 +212,7 @@
min-width="100" min-width="100"
label="调机用量"> label="调机用量">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="editBatchVisible">
<span v-if="editBatchVisible && !(parseFloat(scope.row.actualOutQty) > 0)">
<el-input :controls="false" v-model="scope.row.componentScrap" <el-input :controls="false" v-model="scope.row.componentScrap"
@input="value => { scope.row.componentScrap = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''; updateQtyToIssue(scope.row); }" @input="value => { scope.row.componentScrap = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''; updateQtyToIssue(scope.row); }"
style="height: 11px; width: 98%;"> style="height: 11px; width: 98%;">
@ -230,7 +230,7 @@
min-width="100" min-width="100"
label="首检用量"> label="首检用量">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="editBatchVisible">
<span v-if="editBatchVisible && !(parseFloat(scope.row.actualOutQty) > 0)">
<el-input :controls="false" v-model="scope.row.firstInspectionQty" <el-input :controls="false" v-model="scope.row.firstInspectionQty"
@input="value => { scope.row.firstInspectionQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''; updateQtyToIssue(scope.row); }" @input="value => { scope.row.firstInspectionQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''; updateQtyToIssue(scope.row); }"
style="height: 11px; width: 98%;"> style="height: 11px; width: 98%;">
@ -248,7 +248,7 @@
min-width="100" min-width="100"
label="标准用量"> label="标准用量">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="editBatchVisible">
<span v-if="editBatchVisible && !(parseFloat(scope.row.actualOutQty) > 0)">
<el-input :controls="false" v-model="scope.row.standardDosage" <el-input :controls="false" v-model="scope.row.standardDosage"
@input="value => { scope.row.standardDosage = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''; updateQtyToIssue(scope.row); }" @input="value => { scope.row.standardDosage = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''; updateQtyToIssue(scope.row); }"
style="height: 11px; width: 98%;"> style="height: 11px; width: 98%;">
@ -266,7 +266,7 @@
min-width="180" min-width="180"
label="领料仓库"> label="领料仓库">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="editBatchVisible">
<span v-if="editBatchVisible && !(parseFloat(scope.row.actualOutQty) > 0)">
<el-button type="text" @click="chooseWareHouse(scope.row)" style="width:18%;padding: 3px 0px">选择</el-button> <el-button type="text" @click="chooseWareHouse(scope.row)" style="width:18%;padding: 3px 0px">选择</el-button>
<el-input v-model="scope.row.warehouseName" readonly style="width:77%"></el-input> <el-input v-model="scope.row.warehouseName" readonly style="width:77%"></el-input>
</span> </span>
@ -2729,29 +2729,15 @@
// //
editBatchModel() { editBatchModel() {
if (this.currentRow.status !== '草稿' && this.currentRow.status !== '编辑中' && this.currentRow.status !== '待确认') {
this.$message.warning('该类型单据不能编辑!')
if (this.currentRow.status !== '草稿' && this.currentRow.status !== '编辑中' && this.currentRow.status !== '待确认' && this.currentRow.status !== '待出库') {
this.$message.warning('该单据状态不允许编辑!')
return return
} }
//
searchSumNotifyMaterialList(this.currentRow).then(({data}) => {
if (data && data.code === 0 && data.rows && data.rows.length > 0) {
const hasIssuedQty = data.rows.some(item => {
const qty = parseFloat(item.qtyToIssueOriginal) || 0;
return qty > 0;
});
if (hasIssuedQty) {
this.$message.warning('该单据已有合计已发数量,不能批量编辑材料明细!');
return;
}
}
//
if (this.editBatchVisible) {
this.editBatchVisible = false
} else {
this.editBatchVisible = true
}
});
if (this.editBatchVisible) {
this.editBatchVisible = false
} else {
this.editBatchVisible = true
}
}, },
// //
@ -4078,7 +4064,7 @@
} }
if (!this.isEditableStatus()) { if (!this.isEditableStatus()) {
this.$alert('当前状态不允许编辑!只有草稿、编辑中或待确认状态才能新增材料。', '提示', {
this.$alert('当前状态不允许编辑!', '提示', {
confirmButtonText: '确定' confirmButtonText: '确定'
}); });
return false; return false;

Loading…
Cancel
Save