rev:出库修改

This commit is contained in:
zhangzq
2024-12-03 21:15:36 +08:00
parent 48dcaa7089
commit 76ccf60d48
9 changed files with 71 additions and 17 deletions

View File

@@ -52,6 +52,22 @@
<el-form-item label="源单时间" prop="source_form_date">
<el-input v-model="form.source_form_date" clearable style="width: 150px" />
</el-form-item>
<el-select
v-model="form.stor_code"
clearable
size="mini"
placeholder="仓库"
class="filter-item"
style="width: 120px"
@change="storChange"
>
<el-option
v-for="item in tableEnum.st_ivt_bsrealstorattr"
:key="item.key"
:label="item.label"
:value="item.value"
/>
</el-select>
<template v-for="(col,index) in cols">
<el-form-item label="col.lable" prop="bill_code">
<label slot="label">{{ col.lable }}:</label>
@@ -103,7 +119,7 @@
size="mini"
@click="insertForm()"
>
添加单据
添加单据2
</el-button>
</span>
@@ -123,7 +139,7 @@
<el-table-column show-overflow-tooltip prop="pcsn" label="物料批次" width="160" align="center">
<template scope="scope"><el-input v-model="tableData[scope.$index].pcsn" class="input-with-select" /></template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="qty" label="计划数量" width="160" align="center">
<el-table-column show-overflow-tooltip prop="qty" label="分配数量" width="160" align="center">
<template scope="scope"><el-input-number v-model="tableData[scope.$index].qty" class="input-with-select" /></template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="160">
@@ -244,6 +260,7 @@ const defaultForm = {
status: '',
source_form_type: '',
source_form_id: '',
source_form_code: '',
source_form_date: '',
create_name: '',
create_time: '',
@@ -344,6 +361,13 @@ export default {
})
}
},
storChange(val) {
if (this.tableData.length > 0) {
this.tableData.forEach(a => {
this.$set(a, 'stor_code', val)
})
}
},
[CRUD.HOOK.beforeSubmit]() {
// 提交前校验
@@ -395,6 +419,7 @@ export default {
data.single_weight = row.single_weight
data.source_form_type = ''
data.source_form_id = ''
data.source_form_code = ''
data.unit_id = row.unit_id
data.form_data = {}
this.dtlCols.forEach(a => {
@@ -409,9 +434,11 @@ export default {
})
},
tableDtlMaterial2(data) {
debugger
const mst = data['t']
let rows = []
this.form.source_form_type = mst.form_type
this.form.source_form_code = mst.code
this.form.source_form_id = mst.id
const mst_form_data = mst.form_data
if (data['item'] == null || data['item'].length == 0) {
@@ -435,6 +462,7 @@ export default {
data.single_weight = row.single_weight
data.source_form_type = row.form_type
data.source_form_id = row.id
data.source_form_code = row.code
data.pcsn = row.pcsn
data.qty = row.qty
data.unit_id = row.unit_id