|
|
|
@ -212,7 +212,7 @@ |
|
|
|
min-width="100" |
|
|
|
label="调机用量"> |
|
|
|
<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" |
|
|
|
@input="value => { scope.row.componentScrap = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''; updateQtyToIssue(scope.row); }" |
|
|
|
style="height: 11px; width: 98%;"> |
|
|
|
@ -230,7 +230,7 @@ |
|
|
|
min-width="100" |
|
|
|
label="首检用量"> |
|
|
|
<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" |
|
|
|
@input="value => { scope.row.firstInspectionQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''; updateQtyToIssue(scope.row); }" |
|
|
|
style="height: 11px; width: 98%;"> |
|
|
|
@ -248,7 +248,7 @@ |
|
|
|
min-width="100" |
|
|
|
label="标准用量"> |
|
|
|
<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" |
|
|
|
@input="value => { scope.row.standardDosage = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''; updateQtyToIssue(scope.row); }" |
|
|
|
style="height: 11px; width: 98%;"> |
|
|
|
@ -266,7 +266,7 @@ |
|
|
|
min-width="180" |
|
|
|
label="领料仓库"> |
|
|
|
<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-input v-model="scope.row.warehouseName" readonly style="width:77%"></el-input> |
|
|
|
</span> |
|
|
|
@ -2729,29 +2729,15 @@ |
|
|
|
|
|
|
|
// 批量编辑模态框 |
|
|
|
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 |
|
|
|
} |
|
|
|
// 先查询材料汇总数据,校验是否有合计已发数量大于零 |
|
|
|
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 |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 批量保存 |
|
|
|
@ -4078,7 +4064,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
if (!this.isEditableStatus()) { |
|
|
|
this.$alert('当前状态不允许编辑!只有草稿、编辑中或待确认状态才能新增材料。', '提示', { |
|
|
|
this.$alert('当前状态不允许编辑!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}); |
|
|
|
return false; |
|
|
|
|