rev:成品损益修改

This commit is contained in:
2023-05-29 20:34:40 +08:00
parent 3de19fcecb
commit 02bc0fdb96
14 changed files with 140 additions and 11 deletions

View File

@@ -149,6 +149,18 @@
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="storagevehicle_code" label="载具号" align="center" min-width="200" show-overflow-tooltip>
<template scope="scope">
<el-input v-show="!scope.row.edit" v-model="scope.row.storagevehicle_code" class="input-with-select"/>
<span v-show="scope.row.edit">{{ scope.row.storagevehicle_code }}</span>
</template>
</el-table-column>
<el-table-column prop="bucketunique" label="箱号" align="center" min-width="200" show-overflow-tooltip>
<template scope="scope">
<el-input v-show="!scope.row.edit" v-model="scope.row.bucketunique" class="input-with-select"/>
<span v-show="scope.row.edit">{{ scope.row.bucketunique }}</span>
</template>
</el-table-column>
<el-table-column prop="material_code" label="物料编码" align="center" min-width="200" show-overflow-tooltip>
<template scope="scope">
<el-input v-show="!scope.row.edit" v-model="scope.row.material_code" disabled class="input-with-select">
@@ -284,7 +296,7 @@ export default {
methods: {
open() {
// 查询原材料库的仓库
crudStorattr.getStor({'stor_type': '3'}).then(res => {
crudStorattr.getStor({'stor_type': '4'}).then(res => {
this.storlist = res.content
})
},
@@ -408,6 +420,11 @@ export default {
this.nowrow = row
},
async insertdtl() {
if (!this.form.struct_code) {
this.crud.notify('请先选择货位', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
this.form.tableData.push({
quality_scode: '02',
ivt_qty: 0,
@@ -447,6 +464,12 @@ export default {
return false
}
}
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].storagevehicle_code !== row.storagevehicle_code) {
this.crud.notify('载具号不一致!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
}
// 修改行的编辑状态
row.edit = !row.edit
this.form.tableData.splice(index, 1, row) // 通过splice 替换数据 触发视图更新

View File

@@ -22,7 +22,7 @@
</el-col>
<el-col :span="6">
<el-input
v-model="query.search"
v-model="query.struct_code"
clearable
style="width: 200px"
size="mini"
@@ -123,7 +123,7 @@ export default {
methods: {
open() {
this.crud.resetQuery(false)
crudSectattr.getSect({ 'stor_type': '3' }).then(res => {
crudSectattr.getSect({ 'stor_type': '4' }).then(res => {
this.sects = res.content
})
if (this.sect) {

View File

@@ -218,7 +218,7 @@ export default {
}
},
created() {
crudStorattr.getStor({ 'stor_type': '3' }).then(res => {
crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
this.storlist = res.content
})
},

View File

@@ -26,7 +26,7 @@ export function edit(data) {
export function getStructIvt(params) {
return request({
url: '/api/stIvtStructivtYl/getStructIvt',
url: '/api/stIvtStructivtCp/getStructIvt',
method: 'post',
params
})