fix:入库业务

This commit is contained in:
zhangzq
2025-06-30 17:46:38 +08:00
parent b786992008
commit bf1480032f
13 changed files with 123 additions and 131 deletions

View File

@@ -117,7 +117,7 @@
size="mini"
@click="insertEvent()"
>
添加箱号物料
添加组盘物料
</el-button>
</span>
@@ -134,8 +134,10 @@
<el-table-column show-overflow-tooltip width="150" prop="pcsn" label="批次号" />
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" />
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip width="170" prop="plan_qty" label="数量" />
<el-table-column show-overflow-tooltip width="170" prop="qty" label="数量" />
<el-table-column show-overflow-tooltip width="170" prop="qty_unit_name" label="计量单位名称" />
<el-table-column show-overflow-tooltip width="150" prop="ext_code" label="源单号" />
<el-table-column show-overflow-tooltip width="150" prop="ext_type" label="源单类型" />
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="120" fixed="right">
<template scope="scope">
<el-button
@@ -287,7 +289,7 @@ export default {
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.form.tableData.push({ quality_scode: '01', is_active: '1', ivt_level: '01', plan_qty: '0' })
this.form.tableData.push({ quality_scode: '01', is_active: '1', ivt_level: '01', qty: '0' })
this.form.detail_count = this.form.tableData.length
},
deleteRow(index, rows) {
@@ -298,7 +300,7 @@ export default {
if (pcsn === obj.pcsn) {
const index = rows.indexOf(obj)
if (index > -1) { // 移除找到的指定元素
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].qty)
rows.splice(index, 1)
this.form.detail_count = this.form.tableData.length
}
@@ -315,7 +317,7 @@ export default {
}
})
if (same_mater) {
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.qty)
this.form.tableData.splice(-1, 0, item)
}
})

View File

@@ -14,18 +14,18 @@
<span class="el-dialog__title2">入库分配</span>
<span class="crud-opts-right2">
<!--左侧插槽-->
<!-- <slot name="left">-->
<!-- <el-button-->
<!-- :loading="allDivBtn"-->
<!-- class="filter-item"-->
<!-- type="primary"-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="allDivStruct()"-->
<!-- >-->
<!-- 全部分配-->
<!-- </el-button>-->
<!-- </slot>-->
<!-- <slot name="left">-->
<!-- <el-button-->
<!-- :loading="allDivBtn"-->
<!-- class="filter-item"-->
<!-- type="primary"-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="allDivStruct()"-->
<!-- >-->
<!-- 全部分配-->
<!-- </el-button>-->
<!-- </slot>-->
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
</span>
</div>
@@ -69,10 +69,12 @@
show-overflow-tooltip
prop="plan_qty"
:formatter="crud.formatNum3"
label="量"
label="量"
align="center"
/>
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" align="center" />
<el-table-column show-overflow-tooltip prop="source_bill_type" label="源单类型" align="center" />
</el-table>
</el-card>
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
@@ -222,8 +224,8 @@ export default {
data() {
return {
dialogVisible: false,
stor_id: '',
sect_id: '',
stor_code: '',
sect_code: '',
sectProp: null,
bucketProp: {},
structShow: false,
@@ -314,16 +316,16 @@ export default {
sectQueryChange(val) {
this.sectProp = val
if (val.length === 1) {
this.stor_id = val[0]
this.sect_id = ''
this.stor_code = val[0]
this.sect_code = ''
}
if (val.length === 0) {
this.sect_id = ''
this.stor_id = ''
this.sect_code = ''
this.stor_code = ''
}
if (val.length === 2) {
this.stor_id = val[0]
this.sect_id = val[1]
this.stor_code = val[0]
this.sect_code = val[1]
}
},
tableChanged(row) {
@@ -363,23 +365,6 @@ export default {
})
})
},
// allDivStruct() {
// if (!this.sect_id) {
// this.crud.notify('请先选择虚拟库区区域!', CRUD.NOTIFICATION_TYPE.INFO)
// return
// }
// this.allDivBtn = true
// const data = {}
// data.sect_id = this.sect_id
// data.iostorinv_id = this.openParam[0].iostorinv_id
// crudRawAssist.allDivStruct(data).then(res => {
// crudRawAssist.getIODtl({ 'bill_code': this.openParam[0].bill_code, 'open_flag': '1' }).then(res => {
// this.openParam = res
// })
// }).finally(() => {
// this.allDivBtn = false
// })
// },
divStruct() {
if (this.form.tableMater.length === 0) {
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
@@ -387,13 +372,13 @@ export default {
}
// 如果勾选了,直接跳后台
if (this.form.checked) {
if (!this.sect_id) {
if (!this.sect_code) {
this.crud.notify('请先选择区域!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.divBtn = true
this.form.sect_id = this.sect_id
this.form.stor_id = this.stor_id
this.form.sect_code = this.sect_code
this.form.stor_code = this.stor_code
crudRawAssist.divStruct(this.form).then(res => {
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
this.openParam = res

View File

@@ -113,8 +113,8 @@
<!-- <el-table-column prop="sap_pcsn" label="SAP批次号" width="150" align="center" />-->
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
<el-table-column prop="qty_unit_name" label="单位" align="center" />
<!-- <el-table-column prop="source_bill_type" label="源单类型" align="center" width="130px" :formatter="invtypeFormat" />-->
<!-- <el-table-column prop="source_bill_code" label="源单号" align="center" width="130px" />-->
<el-table-column prop="source_bill_type" label="源单类型" align="center" width="130px" :formatter="invtypeFormat" />
<el-table-column prop="source_bill_code" label="源单号" align="center" width="130px" />
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
</el-table>
</el-card>