fix:托盘入库添加任务校验;移动单修改功能,盘点单修改功能

This commit is contained in:
zhangzq
2024-07-26 10:37:42 +08:00
parent 486639cc2f
commit f89ac94bec
10 changed files with 105 additions and 24 deletions

View File

@@ -214,7 +214,11 @@
{{ tableEnum.label.st_ivt_sectattr[scope.row.sect_code] }}
</template>
</el-table-column>
<el-table-column prop="stor_name" label="所属仓库" width="150" />
<el-table-column prop="stor_code" label="所属仓库" width="150" >
<template slot-scope="scope">
{{ tableEnum.label.st_ivt_bsrealstorattr[scope.row.stor_code] }}
</template>
</el-table-column>
<el-table-column prop="vehicle_code" label="载具号" :min-width="flexWidth('vehicle_code',crud.data,'载具号')" />
<el-table-column prop="is_temp" label="是否临时" width="150" >
<template slot-scope="scope">

View File

@@ -67,7 +67,11 @@
{{ tableEnum.label.st_ivt_sectattr[scope.row.sect_code] }}
</template>
</el-table-column>
<el-table-column prop="stor_name" label="仓库" show-overflow-tooltip />
<el-table-column prop="stor_code" label="仓库" show-overflow-tooltip >
<template slot-scope="scope">
{{ tableEnum.label.st_ivt_bsrealstorattr[scope.row.stor_code] }}
</template>
</el-table-column>
<el-table-column prop="struct_code" label="仓位编码" show-overflow-tooltip />
<el-table-column prop="struct_name" label="仓位名称" show-overflow-tooltip />
<el-table-column prop="vehicle_code" label="载具编码" show-overflow-tooltip>
@@ -130,7 +134,7 @@ export default {
}})
},
mixins: [presenter(), header()],
tableEnums: [ 'bm_measure_unit#unit_name#unit_id','st_ivt_sectattr#sect_name#sect_code' ],
tableEnums: [ 'bm_measure_unit#unit_name#unit_id','st_ivt_bsrealstorattr#stor_name#stor_code','st_ivt_sectattr#sect_name#sect_code' ],
statusEnums: [ 'LOCK' ],
props: {
dialogShow: {

View File

@@ -239,6 +239,19 @@ export default {
this.dis_flag = true
}
},
[CRUD.HOOK.beforeCrudToCU]() {
this.$refs['form'].validate((valid) => {
if (valid) {
return true
}else {
return false
}
})
if (this.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
},
submitCU() {
// 提交前校验
this.$refs['form'].validate((valid) => {
@@ -260,7 +273,6 @@ export default {
this.crud.toQuery()
})
},
deleteRow(index, rows) {
rows.splice(index, 1)
},

View File

@@ -109,7 +109,7 @@
<!-- </template>-->
<!-- </el-table-column>-->
<template scope="scope">
<el-input v-model="tableData[scope.$index].form_data[item.value]" class="input-with-select" />
<el-input disabled v-model="tableData[scope.$index].form_data[item.value]" class="input-with-select" />
</template>
</el-table-column>
@@ -156,6 +156,7 @@ import StructAttrDialog from '@/views/wms/stor_manage/storIvtInfo/StructAttrDial
import StructAttrDialog2 from '@/views/wms/stor_manage/storIvtInfo/StructAttrDialog'
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
import crudMove from '@/views/wms/stor_manage/warehouse/move/move'
import crudFormData, {getSonFormData} from './formData'
const defaultForm = {
id: '',
@@ -277,14 +278,22 @@ export default {
return false
}
this.form.item = this.tableData
crudMove.add(this.form).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.close()
this.dialogVisible
this.crud.toQuery()
})
if (!this.form.id){
crudMove.add(this.form).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.close()
this.dialogVisible
this.crud.toQuery()
})
}else {
crudMove.edit(this.form).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.close()
this.dialogVisible
this.crud.toQuery()
})
}
},
deleteRow(index, rows) {
rows.splice(index, 1)
},
@@ -332,7 +341,13 @@ export default {
this.endStructs.push(end_struct_code)
this.$set(this.tableData[this.currentIndex].form_data,"end_struct_code",end_struct_code)
}
}
},
[CRUD.HOOK.beforeToEdit]() {
// 获取入库单明细
crudFormData.getSonFormData(this.form.id).then(res => {
this.tableData = res
})
},
}
}
</script>

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
export function add(data) {
return request({
url: '/api/move/save',
url: '/api/move',
method: 'post',
data
})
@@ -19,7 +19,7 @@ export function del(ids) {
export function edit(data) {
return request({
url: 'api/move',
method: 'post',
method: 'put',
data
})
}