|
|
|
@ -248,7 +248,7 @@ |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="出库类别" prop="category"> |
|
|
|
<el-select v-model="modalData.category" placeholder="请选择" style="width: 140px"> |
|
|
|
<el-select v-model="modalData.category" :disabled="modalData.orderType === '采购退货'" placeholder="请选择" style="width: 140px"> |
|
|
|
<el-option |
|
|
|
v-for="item in categoryList" |
|
|
|
:key="item.crdcode" |
|
|
|
@ -1293,7 +1293,17 @@ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: ['blur','change'] |
|
|
|
trigger: ['blur','change'], |
|
|
|
// 动态校验:采购退货时不必填,其他类型必填 |
|
|
|
validator: (rule, value, callback) => { |
|
|
|
if (this.modalData.orderType === '采购退货') { |
|
|
|
callback() |
|
|
|
} else if (!value || value === '') { |
|
|
|
callback(new Error(' ')) |
|
|
|
} else { |
|
|
|
callback() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
departmentNo: [ |
|
|
|
@ -1502,6 +1512,9 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
updateModal (row) { |
|
|
|
// 先更新当前行数据,确保使用的是点击行的数据 |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
|
|
|
|
if (this.currentRow.orderType === '销售出库') { |
|
|
|
this.$message.warning('销售出库单据不能编辑!') |
|
|
|
return |
|
|
|
@ -1611,6 +1624,11 @@ |
|
|
|
|
|
|
|
// 删除 |
|
|
|
deleteModal () { |
|
|
|
// 先更新当前行数据,确保校验的是当前选中行的数据 |
|
|
|
if (this.outboundSelection.length > 0) { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(this.outboundSelection[0])) |
|
|
|
} |
|
|
|
|
|
|
|
if (this.currentRow.orderType === '销售出库') { |
|
|
|
this.$message.warning('销售出库单据不能编辑!') |
|
|
|
return |
|
|
|
@ -1718,6 +1736,9 @@ |
|
|
|
|
|
|
|
// 关闭 |
|
|
|
closeModal (row) { |
|
|
|
// 先更新当前行数据 |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
|
|
|
|
if (this.currentRow.orderType === '销售出库') { |
|
|
|
this.$message.warning('销售出库单据不能编辑!') |
|
|
|
return |
|
|
|
@ -1734,6 +1755,9 @@ |
|
|
|
|
|
|
|
// 下达 |
|
|
|
issueModal (row) { |
|
|
|
// 先更新当前行数据 |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
|
|
|
|
if (this.currentRow.orderType === '销售出库') { |
|
|
|
this.$message.warning('销售出库单据不能编辑!') |
|
|
|
return |
|
|
|
@ -2074,6 +2098,10 @@ |
|
|
|
onOrderTypeChange () { |
|
|
|
this.modalData.customerId = '' |
|
|
|
this.modalData.customerName = '' |
|
|
|
// 如果是采购退货,清空出库类别 |
|
|
|
if (this.modalData.orderType === '采购退货') { |
|
|
|
this.modalData.category = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
chooseWareHouse (row) { |
|
|
|
|