rev: 成品入库功能修改

This commit is contained in:
2023-03-30 16:08:19 +08:00
parent 02e1caa99d
commit 8cba52a5da
9 changed files with 425 additions and 1085 deletions

View File

@@ -274,7 +274,7 @@ export default {
},
clcikRow(row, column, event) {
this.form.dtl_row = row
crudProductIn.getIODtl({ 'bill_code': this.form.dtl_row.bill_code }).then(res => {
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => {
this.openParam = res
this.form.dtl_row = res[row.index]
})
@@ -361,7 +361,7 @@ export default {
return
}
crudProductIn.confirmvehicle(this.dis_row).then(res => {
crudProductIn.getIODtl({ 'bill_code': this.form.dtl_row.bill_code }).then(res => {
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => {
this.openParam = res
})
crudProductIn.getDisDtl(this.form.dtl_row).then(res => {
@@ -370,27 +370,6 @@ export default {
})
})
},
deleteRow(index, rows) {
// 如果桶状态不是生成调后台逻辑
if (rows[index].status !== '01') {
crudProductIn.deleteDisDtl(rows[index]).then(res => {
crudProductIn.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
this.openParam = res
})
crudProductIn.getDisDtl(this.form.dtl_row).then(res => {
this.form.tableMater = res
})
rows[index].pop = false
}).catch(err => {
rows[index].pop = false
return
})
}
this.form.dtl_row.assign_qty = parseFloat(this.form.dtl_row.assign_qty) - parseFloat(rows[index].storage_qty)
this.form.dtl_row.unassign_qty = parseFloat(this.form.dtl_row.unassign_qty) + parseFloat(rows[index].storage_qty)
this.openParam.splice(this.form.dtl_row.index, 1, this.form.dtl_row)
rows.splice(index, 1)
},
sectQueryChange(val) {
this.sectProp = val
if (val.length === 1) {
@@ -419,29 +398,23 @@ export default {
this.form.tableMater.splice(i, 1, this.form.tableMater[i]) // 通过splice 替换数据 触发视图更新
}
crudProductIn.divStruct(this.form).then(res => {
crudProductIn.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
this.openParam = res
})
this.form.tableMater = []
})
},
bucketChange(row) {
this.bucketObj = row
this.form.bucketunique = row.bucketunique
this.form.storage_qty = row.storage_qty
},
divPoint() {
if (!this.form.point_code) {
this.crud.notify('请选择入库点', CRUD.NOTIFICATION_TYPE.INFO)
return
}
debugger
if (this.form.tableMater.length === 0) {
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
crudProductIn.divPoint(this.form).then(res => {
crudProductIn.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
this.openParam = res
})
crudProductIn.getDisDtl(this.form.dtl_row).then(res => {
@@ -466,7 +439,7 @@ export default {
this.form.stor_id = this.stor_id
this.form.is_pc = '1'
crudProductIn.divStruct(this.form).then(res => {
crudProductIn.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
this.openParam = res
})
crudProductIn.getDisDtl(this.form.dtl_row).then(res => {
@@ -482,9 +455,6 @@ export default {
this.$refs.child.getMsg(false)
}
},
doCancel(data) {
data.pop = false
},
unDivStruct() {
if (this.form.tableMater.length <= 0) {
this.crud.notify('不存在载具明细!', CRUD.NOTIFICATION_TYPE.INFO)
@@ -497,7 +467,7 @@ export default {
}
// 如果勾选了,直接跳后台
crudProductIn.unDivStruct(this.form).then(res => {
crudProductIn.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
this.openParam = res
})
crudProductIn.getDisDtl(this.form.dtl_row).then(res => {
@@ -505,37 +475,6 @@ export default {
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
})
},
dialogBucket() {
if (!this.form.dtl_row) {
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO)
return
}
/* const material_dtl_scode = this.form.dtl_row.material_dtl_scode
let type = ''
if (material_dtl_scode.slice(0, 4) === '0903') {
type = '01'
}
if (material_dtl_scode.slice(0, 4) === '0904') {
type = '02'
}
if (material_dtl_scode.slice(0, 6) === '090202') {
type = '04'
}
if (material_dtl_scode.slice(0, 6) === '090201') {
type = '03'
}*/
const bucket = {
'material_code': this.form.dtl_row.material_code,
'pcsn': this.form.dtl_row.pcsn,
'quality_scode': this.form.dtl_row.quality_scode,
'ivt_level': this.form.dtl_row.ivt_level,
'is_active': this.form.dtl_row.is_active,
// 'storagevehicle_type': type,
'bucket_status': '01'
}
this.bucketProp = bucket
this.bucketShow = true
}
}
}

View File

@@ -1,268 +0,0 @@
<template>
<el-dialog
title="任务修改"
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
fullscreen
width="1000px"
@close="close"
@open="open"
>
<el-row :gutter="20">
<el-col :span="20" style="border: 1px solid white">
<span />
</el-col>
<el-col :span="4">
<span>
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="submit">确定</el-button>
<el-button icon="el-icon-close" size="mini" type="info" @click="dialogVisible = false">关闭</el-button>
</span>
</el-col>
</el-row>
<el-form ref="taskForm" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" size="mini" label-width="85px" label-suffix=":">
<el-form-item label="任务号" prop="task_code">
<label slot="label">&nbsp;&nbsp;&nbsp;:</label>
<el-input v-model="form.task_code" disabled style="width: 210px" />
</el-form-item>
<el-form-item label="存储载具" prop="storagevehicle_code">
<el-input v-model="form.storagevehicle_code" disabled style="width: 210px" />
</el-form-item>
<el-form-item label="原入库点" prop="point_code">
<el-input v-model="form.point_code" disabled style="width: 210px" />
</el-form-item>
<el-form-item label="入库点" prop="new_point_code">
<label slot="label">&nbsp;&nbsp;&nbsp;:</label>
<el-select
v-model="form.new_point_code"
clearable
placeholder="请选择"
class="filter-item"
style="width: 210px"
>
<el-option
v-for="item in pointlist"
:key="item.point_code"
:label="item.point_code"
:value="item.point_code"
/>
</el-select>
</el-form-item>
<el-form-item label="原货位" prop="struct_code">
<label slot="label">&nbsp;&nbsp;&nbsp;:</label>
<el-input v-model="form.struct_code" disabled style="width: 210px" />
</el-form-item>
<el-form-item label="新货位" prop="new_struct_code">
<label slot="label">&nbsp;&nbsp;&nbsp;:</label>
<el-input v-model="form.new_struct_code" disabled style="width: 210px" />
</el-form-item>
<el-form-item label="所属库区" prop="new_struct_code">
<el-cascader
v-model="query.sect"
style="width: 210px"
placeholder="所属库区"
:options="sects"
:props="{ checkStrictly: true }"
clearable
@change="sectQueryChange"
/>
</el-form-item>
<el-form-item label="模糊查询" prop="struct_code">
<el-input
v-model="query.search"
clearable
style="width: 200px"
size="mini"
placeholder="输入货位编码、名称"
prefix-icon="el-icon-search"
class="filter-item"
/>
</el-form-item>
<rrOperation />
</el-form>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
style="width: 100%"
:row-class-name="tableRowClassName"
highlight-current-row
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@row-click="clcikRow"
@select="handleSelectionChange"
@select-all="onSelectAll"
>
<el-table-column prop="struct_code" label="货位编码" />
<el-table-column prop="struct_name" label="货位名称" />
<el-table-column prop="material_height_type_name" label="高度类型" />
<el-table-column prop="sect_name" label="库区名称" />
</el-table>
<!--分页组件-->
<pagination />
</el-dialog>
</template>
<script>
import CRUD, { header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
// import crudStructattr from '@/views/wms/basedata/st/struct/structattr'
// import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
import crudProductIn from '@/views/wms/st/productIn/productin'
import crudPoint from '@/views/wms/sch/point'
export default {
name: 'StructDiv',
components: { crudOperation, rrOperation, pagination },
cruds() {
return CRUD({
title: '仓位',
optShow: {},
url: 'api/structattr',
idField: 'struct_id',
sort: 'struct_id,desc',
crudMethod: { ...crudStructattr }
})
},
mixins: [presenter(), header()],
props: {
dialogShow: {
type: Boolean,
default: false
},
sectProp: {
type: Object,
default: null
},
bucketForm: {
type: Object,
default: null
}
},
data() {
return {
sects: [],
classes: [],
pointlist: [],
dialogVisible: false,
// sectProp: null,
checkrow: {},
form: {
task_id: '',
task_code: '',
storagevehicle_code: '',
point_code: '',
new_point_code: '',
struct_code: '',
new_struct_code: ''
},
rows: []
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
},
sectProp: {
handler(newValue, oldValue) {
this.sectProp = newValue
}
},
bucketForm: {
handler(newValue, oldValue) {
this.form = newValue
}
}
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.lock_type = '1'
},
open() {
crudSectattr.getSect({ 'is_materialstore': '1', 'sect_type_attr': '00' }).then(res => {
this.sects = res.content
})
crudPoint.getPoint({ 'area_type': '21' }).then(res => {
this.pointlist = res
})
if (this.sectProp) {
this.query.sect = this.sectProp
if (this.sectProp.length === 1) {
this.query.stor_id = this.sectProp[0]
this.query.sect_id = ''
}
if (this.sectProp.length === 0) {
this.query.sect_id = ''
this.query.stor_id = ''
}
if (this.sectProp.length === 2) {
this.query.stor_id = this.sectProp[0]
this.query.sect_id = this.sectProp[1]
}
}
this.crud.toQuery()
},
clcikRow(row, column, event) {
this.form.new_struct_code = row.struct_code
},
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex
},
sectQueryChange(val) {
if (val.length === 1) {
this.query.stor_id = val[0]
this.query.sect_id = ''
}
if (val.length === 0) {
this.query.sect_id = ''
this.query.stor_id = ''
}
if (val.length === 2) {
this.query.stor_id = val[0]
this.query.sect_id = val[1]
}
},
handleSelectionChange(val, row) {
if (val.length > 1) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(val.pop())
} else {
this.checkrow = row
}
},
onSelectAll() {
this.$refs.table.clearSelection()
},
close() {
this.crud.resetQuery()
this.query.sect = null
this.$emit('update:dialogShow', false)
},
submit() {
this.crud.resetQuery()
crudProductIn.updateTask(this.form).then(res => {
this.$emit('update:dialogShow', false)
this.$emit('updateCommit', this.checkrow)
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-dialog__body {
padding-top: 0px;
}
</style>

View File

@@ -13,35 +13,37 @@
<label slot="label">&nbsp;&nbsp;&nbsp;:</label>
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
</el-form-item>
<el-form-item label="仓库" prop="stor_id">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
<el-form-item label="生产区域">
<el-select
v-model="form.stor_id"
v-model="form.product_code"
clearable
placeholder="仓库"
class="filter-item"
style="width: 210px"
size="mini"
placeholder="全部"
:disabled="true"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in storlist"
:key="item.stor_id"
:label="item.stor_name"
:value="item.stor_id"
v-for="item in dict.product_area"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="业务类型" prop="bill_type">
<el-form-item label="业务类型">
<el-select
v-model="form.bill_type"
clearable
placeholder="业务类型"
style="width: 210px"
class="filter-item"
filterable
size="mini"
:disabled="true"
placeholder="业务类型"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.INANDOUT_BILL_TYPE"
v-for="item in dict.ST_INV_IN_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -58,7 +60,7 @@
disabled
>
<el-option
v-for="item in dict.io_bill_status"
v-for="item in dict.IO_BILL_STATUS"
:key="item.id"
:label="item.label"
:value="item.value"
@@ -105,16 +107,12 @@
@current-change="handleDtlCurrentChange"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="bill_code" label="单据号" align="center" />
<el-table-column :formatter="bill_statusFormat" prop="bill_status" label="状态" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column prop="pcsn" label="子卷号" width="150" align="center" />
<el-table-column prop="sap_pcsn" label="SAP批次号" width="150" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
<el-table-column prop="pcsn" label="订单号" 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 show-overflow-tooltip prop="remark" label="明细备注" align="center" />
</el-table>
</el-card>
@@ -136,12 +134,11 @@
>
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column prop="pcsn" label="子卷号" align="center" width="150"/>
<el-table-column prop="sap_pcsn" label="SAP批次号" align="center" />
<el-table-column prop="box_no" label="载具号" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
<el-table-column prop="pcsn" label="订单号" align="center" width="150" />
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
<el-table-column prop="next_point_code" label="起始位置" align="center" />
<el-table-column prop="struct_code" label="目的位置" align="center" />
<el-table-column prop="point_code1" label="起始位置" align="center" />
<el-table-column prop="point_code2" label="目的位置" align="center" />
<el-table-column prop="task_code" label="任务号" align="center" />
<el-table-column prop="task_type_name" label="任务类型" align="center" width="150px" />
</el-table>
@@ -152,14 +149,13 @@
<script>
import { crud } from '@crud/crud'
// import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
// import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
import crudProductIn from '@/views/wms/st/productIn/productin'
export default {
name: 'ViewDialog',
components: { },
mixins: [crud()],
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL', 'INANDOUT_BILL_TYPE'],
dicts: ['ST_INV_IN_TYPE', 'product_area', 'IO_BILL_STATUS'],
props: {
dialogShow: {
type: Boolean,
@@ -193,14 +189,6 @@ export default {
}
}
},
created() {
checkoutbill.getInvTypes().then(res => {
this.billtypelist = res
})
crudUserStor.getUserStor().then(res => {
this.storlist = res
})
},
methods: {
open() {
this.queryTableDtl()
@@ -213,8 +201,8 @@ export default {
this.tabledis = []
this.$emit('TaskChanged')
},
bill_statusFormat(row) {
return this.dict.label.io_bill_status[row.bill_status]
stateFormat(row, column) {
return this.dict.label.IO_BILL_STATUS[row.bill_status]
},
taskdtl_typeFormat(row) {
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
@@ -246,13 +234,14 @@ export default {
this.currentDis = current
},
queryTableDtl() {
checkoutbill.getOutBillDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
crudProductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
this.tableDtl = res
})
},
queryTableDdis() {
if (this.currentdtl !== null) {
checkoutbill.getOutBillTask({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
crudProductIn.getDisTask({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
debugger
this.tabledis = res
}).catch(() => {
this.tabledis = []

View File

@@ -32,14 +32,6 @@ export function getType(params) {
})
}
export function getBillDtl(params) {
return request({
url: '/api/in/productIn/getBillDtl',
method: 'get',
params
})
}
export function getIODtl(data) {
return request({
url: '/api/in/productIn/getIODtl',
@@ -80,14 +72,6 @@ export function confirmvehicle(data) {
})
}
export function deleteDisDtl(data) {
return request({
url: '/api/in/productIn/deleteDisDtl',
method: 'post',
data
})
}
export function getDisDtl(data) {
return request({
url: '/api/in/productIn/getDisDtl',
@@ -120,14 +104,6 @@ export function divPoint(data) {
})
}
export function queryTask(data) {
return request({
url: '/api/in/productIn/queryTask',
method: 'post',
data
})
}
export function bucketDtl(data) {
return request({
url: '/api/in/productIn/bucketDtl',
@@ -144,22 +120,6 @@ export function updateTask(data) {
})
}
export function delTask(data) {
return request({
url: '/api/in/productIn/delTask',
method: 'post',
data
})
}
export function reIssueTask(data) {
return request({
url: '/api/in/productIn/reIssueTask',
method: 'post',
data
})
}
export function confirmTask(data) {
return request({
url: '/api/in/productIn/confirmTask',
@@ -168,14 +128,6 @@ export function confirmTask(data) {
})
}
export function cancelTask(data) {
return request({
url: '/api/in/productIn/cancelTask',
method: 'post',
data
})
}
export function confirm(data) {
return request({
url: '/api/in/productIn/confirm',
@@ -184,14 +136,6 @@ export function confirm(data) {
})
}
export function backConfirm(data) {
return request({
url: '/api/in/productIn/backConfirm',
method: 'post',
data
})
}
export function delDis(data) {
return request({
url: '/api/in/productIn/delDis',
@@ -215,6 +159,14 @@ export function queryStor() {
})
}
export default { add, edit, del, getType, getBillDtl, insertDtl, getIODtl, commit, checkVehicle,
confirmvehicle, deleteDisDtl, getDisDtl, divStruct, unDivStruct, divPoint, delDis, queryBoxMater,
queryTask, bucketDtl, updateTask, delTask, reIssueTask, confirmTask, cancelTask, confirm, backConfirm, queryStor }
export function getDisTask(data) {
return request({
url: '/api/in/productIn/getDisTask',
method: 'post',
data
})
}
export default { add, edit, del, getType, insertDtl, getIODtl, commit, checkVehicle,
confirmvehicle, getDisDtl, divStruct, unDivStruct, divPoint, delDis, queryBoxMater,
bucketDtl, updateTask, confirmTask, confirm, queryStor, getDisTask }