rev:流程引擎维护;todo:节点功能开发

This commit is contained in:
zhangzq
2024-04-28 14:34:13 +08:00
parent 5f115921b8
commit 5bab3ae808
65 changed files with 3370 additions and 170 deletions

View File

@@ -0,0 +1,687 @@
<template>
<el-dialog
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
:show-close="false"
fullscreen
@close="close"
@open="open"
>
<span slot="title" class="dialog-footer">
<div class="crud-opts2">
<span class="el-dialog__title2">入库分配</span>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
</span>
</div>
</span>
<div class="crud-opts2">
<span class="role-span">入库明细项</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<!--表格渲染-->
<el-table
ref="dtl_table"
:data="this.openParam"
style="width: 100%;"
max-height="300"
border
highlight-current-row
:row-class-name="tableRowClassName"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@row-click="clcikRow"
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="bill_status" label="状态" align="center" width="110px">
<template slot-scope="scope">
<el-select
v-model="scope.row.bill_status"
class="filter-item"
:disabled="true"
>
<el-option
v-for="item in dict.IO_BILL_STATUS"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
<el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量" align="center" />
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
<el-table-column show-overflow-tooltip prop="base_bill_type" label="源单类型" :formatter="formatBaseType" align="center" />
<el-table-column show-overflow-tooltip prop="base_bill_code" label="源单号" align="center" />
<el-table-column show-overflow-tooltip prop="base_bill_table" label="源单行号" align="center" />
</el-table>
</el-card>
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
<el-form ref="form2" :inline="true" :model="form" :rules="rules" size="mini">
<el-form-item label="载具号:" prop="vehicle_code">
<el-input v-model="form.vehicle_code" style="width: 200px" size="mini" clearable placeholder="载具号">
<el-button slot="append" @click="vehicleCheck" >生成</el-button>
</el-input>
</el-form-item>
<el-form-item label="箱号:" prop="pageBox_code">
<el-input v-model="form.bucketunique" size="mini" style="width: 200px" disabled placeholder="箱号">
<el-button slot="append" icon="el-icon-plus" @click="queryBox" />
</el-input>
</el-form-item>
<el-form-item label="放入数量:" prop="storage_qty">
<el-input-number
v-model="form.storage_qty"
style="width: 200px"
size="mini"
:controls="false"
precision="3"
:min="0"
@change="changeQty"
placeholder="数量"
/>
</el-form-item>
<el-form-item label="入库点:" prop="point_code">
<el-select
v-model="form.point_code"
size="mini"
clearable
placeholder="请选择"
class="filter-item"
style="width: 200px;"
>
<el-option
v-for="item in pointlist"
:key="item.point_code"
:label="item.point_name"
:value="item.point_code"
/>
</el-select>
</el-form-item>
<el-form-item label="载具超限类型:" prop="vehicle_overstruct_type">
<el-select
v-model="form.vehicle_overstruct_type"
size="mini"
placeholder="请选择"
class="filter-item"
style="width: 200px;"
>
<el-option
v-for="item in dict.VEHICLE_OVER_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
</el-card>
<div class="crud-opts2">
<span class="role-span">载具物料明细</span>
<div class="crud-opts-form">
<el-form ref="form" :inline="true" :model="form" size="mini">
<el-form-item label="库区:" prop="gender5">
<el-cascader
placeholder="请选择"
:options="sects"
v-model="defaultList"
:props="{ checkStrictly: true }"
clearable
@change="sectQueryChange"
/>
</el-form-item>
<el-form-item prop="checked">
<el-checkbox v-model="form.checked">自动分配货位</el-checkbox>
</el-form-item>
</el-form>
</div>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="pushVehicle()"
>
装入托盘
</el-button>
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="confirmvehicle()"
>
组盘确认
</el-button>
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="cancelConfirmvehicle()"
>
取消组盘
</el-button>
<el-button
slot="left"
:loading="divBtn"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="divStruct()"
>
分配货位
</el-button>
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="unDivStruct()"
>
取消分配
</el-button>
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-delete"
size="mini"
@click="divPoint()"
>
设置起点
</el-button>
</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<!--表格渲染-->
<el-table
ref="dis_table"
:data="form.tableMater"
style="width: 100%;"
max-height="300"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@row-click="clcikRowDis"
>
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘号" align="center" />
<el-table-column show-overflow-tooltip prop="bucketunique" label="箱号" align="center" />
<el-table-column show-overflow-tooltip prop="qty" :formatter="crud.formatNum3" label="数量" align="center" />
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" />
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" />
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
<el-table-column align="center" label="操作" width="170" fixed="right">
<template scope="scope">
<el-button
type="danger"
class="filter-item"
size="mini"
:disabled="disabledIos(scope.row)"
icon="el-icon-delete"
@click.native.prevent="deleteRow(scope.$index, form.tableMater)"
/>
</template>
</el-table-column>
</el-table>
</el-card>
<!-- <StructDiv ref="child" :stor-id="storId" :dialog-show.sync="structShow" :sect-prop="sectProp" @tableChanged="tableChanged" />-->
<!-- <AddBox ref="child" :dialog-show.sync="addBoxShow" :add-box-param="boxParam" @tableChanged2="tableChanged2" />-->
</el-dialog>
</template>
<script>
import CRUD, { crud } from '@crud/crud'
// import StructDiv from '@/views/wms/storage_manage/product/productIn/StructDiv'
// import AddBox from '@/views/wms/storage_manage/product/productIn/AddBox'
import crudProductIn from '@/views/wms/stor_manage/in/storinvin'
import crudPoint from '@/views/wms/stor_manage/in/storinvin'
import crudSectattr from '@/api/wms/basedata/st/sectattr'
export default {
name: 'DivDialog',
components: { },
mixins: [crud()],
dicts: ['IO_BILL_STATUS', 'VEHICLE_OVER_TYPE', 'PCS_SAL_TYPE'],
props: {
dialogShow: {
type: Boolean,
default: false
},
openParam: {
type: Array,
default: () => {
return []
}
},
storId: {
type: String,
default: null
}
},
data() {
return {
dialogVisible: false,
stor_id: '1528627995269533696',
sect_id: '1528631043496742912',
sectProp: null,
structShow: false,
bucketObj: null,
divBtn: false,
bucketShow: false,
addBoxShow: false,
bucketuniqueObj: null,
sects: [],
defaultList: ['1528627995269533696', '1528631043496742912'],
dis_row: null,
form: {
dtl_row: null,
storage_qty: '',
sect_id: '',
stor_id: '',
point_code: null,
vehicle_code: '',
bucketunique: '',
checked: true,
vehicle_overstruct_type: '00',
tableMater: []
},
storlist: [],
pointlist: [],
rules: {},
boxParam: {}
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
}
},
methods: {
disabledIos(row) {
if (row.iostorinvdis_id === undefined) {
return false
} else {
return true
}
},
open() {
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
this.sects = res.content
})
const area_type = 'A1_CPRK01'
crudPoint.getPoint({ 'area_type': area_type }).then(res => {
this.pointlist = res
})
},
toDelete(data) {
data.pop = true
},
close() {
this.form.tableMater = []
this.form.dtl_row = null
this.form.bucketunique = null
this.sectProp = null
this.$emit('update:dialogShow', false)
this.$emit('AddChanged')
this.crud.refresh()
this.$refs['form2'].resetFields()
},
clcikRow(row, column, event) {
this.form.dtl_row = row
this.form.storage_qty = this.form.dtl_row.plan_qty
crudProductIn.getIosInvDis({ 'iostorinv_id': row.iostorinv_id, 'iostorinvdtl_id': row.iostorinvdtl_id }).then(res => {
if (res.length !== 0) {
this.form.tableMater = res
}
})
},
clcikRowDis(row, column, event) {
this.dis_row = row
},
vehicleCheck() {
// 生成托盘
crudProductIn.vehicleCheck().then(res => {
this.form.tableMater = []
this.form.vehicle_code = res.vehicle_code
this.crud.notify('生成成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(() => {
})
},
changeQty(val) {
if (parseFloat(this.form.dtl_row.plan_qty) < parseFloat(val)) {
this.crud.notify('放入数量不能大于明细数量!', CRUD.NOTIFICATION_TYPE.INFO)
this.$set(this.form, 'storage_qty', parseFloat(this.form.dtl_row.plan_qty))
}
},
queryBox() {
// 校验载具是否为空
if (!this.form.vehicle_code) {
this.crud.notify('请先填写载具号!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (!this.form.dtl_row) {
this.crud.notify('请选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.boxParam = {
'material_id': this.form.dtl_row.material_id,
'pcsn': this.form.dtl_row.pcsn
}
this.addBoxShow = true
},
pushVehicle() {
// 校验载具是否为空
if (!this.form.vehicle_code) {
this.crud.notify('载具号不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
// 校验明细不能为空
if (!this.form.dtl_row) {
this.crud.notify('请选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
// 有箱号
if (this.form.bucketunique) {
let fla = true
this.form.tableMater.forEach(item => {
if (item.bucketunique === this.bucketuniqueObj.bucketunique) {
fla = false
}
})
if (fla) {
this.bucketuniqueObj.iostorinvdtl_id = this.form.dtl_row.iostorinvdtl_id
this.form.tableMater.splice(-1, 0, this.bucketuniqueObj)
this.form.bucketunique = ''
}
} else {
// 无箱号
if (!this.form.storage_qty) {
this.crud.notify('数量不能为0', CRUD.NOTIFICATION_TYPE.INFO)
return
}
const item = {
'storagevehicle_code': this.form.vehicle_code,
'iostorinvdtl_id': this.form.dtl_row.iostorinvdtl_id,
'material_id': this.form.dtl_row.material_id,
'material_code': this.form.dtl_row.material_code,
'material_spec': this.form.dtl_row.material_spec,
'material_name': this.form.dtl_row.material_name,
'qty': this.form.storage_qty
}
let fla2 = true
this.form.tableMater.forEach(res => {
if (res.iostorinvdtl_id === item.iostorinvdtl_id && res.storagevehicle_code === item.storagevehicle_code) {
fla2 = false
}
})
if (fla2) {
this.form.tableMater.splice(-1, 0, item)
}
}
},
deleteRow(index, rows) {
rows.splice(index, 1)
},
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex
},
insertvehicle() {
if (!this.form.dtl_row) {
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (!this.form.storagevehicle_code) {
this.crud.notify('请输入托盘号', CRUD.NOTIFICATION_TYPE.INFO)
return
}
// 判断是否选择了桶号
if (this.bucketObj) {
if (!(this.bucketObj.status === '01')) {
this.crud.notify('请校验桶状态!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
const dis_dtl = JSON.parse(JSON.stringify(this.bucketObj))
// 判断选择的桶是否已经被选过
const flag = this.form.tableMater.some(mater => mater.bucketunique === dis_dtl.bucketunique)
if (!flag) {
const flag = this.form.tableMater.some(mater => mater.storagevehicle_code !== this.form.storagevehicle_code)
if (flag) {
this.crud.notify('存在不同载具号', CRUD.NOTIFICATION_TYPE.INFO)
return
}
dis_dtl.storagevehicle_code = this.form.storagevehicle_code
dis_dtl.pop = false
this.form.tableMater.splice(this.form.tableMater.length, 0, dis_dtl)
if (this.form.dtl_row.assign_qty) {
this.form.dtl_row.assign_qty = parseFloat(this.form.dtl_row.assign_qty) + parseFloat(this.form.storage_qty)
} else {
this.form.dtl_row.assign_qty = parseFloat(this.form.storage_qty)
}
if (parseFloat(this.form.dtl_row.unassign_qty) - parseFloat(this.form.storage_qty) > 0) {
this.form.dtl_row.unassign_qty = parseFloat(this.form.dtl_row.unassign_qty) - parseFloat(this.form.storage_qty)
} else {
this.form.dtl_row.unassign_qty = 0
}
this.openParam.splice(this.form.dtl_row.index, 1, this.form.dtl_row)
}
if (flag) {
this.crud.notify('该桶已被加入明细中', CRUD.NOTIFICATION_TYPE.INFO)
}
} else {
this.crud.notify('请选择桶号', CRUD.NOTIFICATION_TYPE.INFO)
return
}
},
confirmvehicle() {
if (!this.form.dtl_row) {
this.crud.notify('请选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.form.tableMater.length === 0) {
this.crud.notify('请先装入托盘!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
crudProductIn.confirmvehicle(this.form).then(res => {
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => {
this.form.vehicle_code = ''
this.form.bucketunique = ''
this.openParam = res
this.form.tableMater = []
this.dis_row = null
this.crud.notify('组盘成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
})
},
cancelConfirmvehicle() {
if (!this.dis_row) {
this.crud.notify('请选择一条分配明细', CRUD.NOTIFICATION_TYPE.INFO)
return
}
crudProductIn.cancelConfirmvehicle(this.dis_row).then(res => {
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => {
this.form.vehicle_code = ''
this.form.bucketunique = ''
this.openParam = res
this.form.tableMater = []
this.dis_row = null
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
})
},
sectQueryChange(val) {
this.sectProp = val
if (val.length === 1) {
this.stor_id = val[0]
this.sect_id = ''
}
if (val.length === 0) {
this.sect_id = ''
this.stor_id = ''
}
if (val.length === 2) {
this.stor_id = val[0]
this.sect_id = val[1]
}
},
tableChanged(row) {
this.form.sect_id = this.sect_id
this.form.stor_id = this.stor_id
this.dis_row.struct_id = row.struct_id
this.divBtn = true
crudProductIn.divStruct(this.dis_row).then(res => {
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.dis_row.iostorinv_id }).then(res => {
this.openParam = res
this.form.tableMater = []
this.dis_row = null
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
}).finally(() => {
this.divBtn = false
})
},
tableChanged2(row) {
this.form.bucketunique = row.bucketunique
row.storagevehicle_code = this.form.vehicle_code
row.qty = row.storage_qty
this.bucketuniqueObj = row
},
divStruct() {
if (this.dis_row === null) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
// 如果勾选了,直接跳后台
if (this.form.checked) {
if (!this.sect_id) {
this.crud.notify('请先选择区域!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.divBtn = true
this.dis_row.stor_id = this.stor_id.toString()
this.dis_row.sect_id = this.sect_id.toString()
this.dis_row.vehicle_overstruct_type = this.form.vehicle_overstruct_type
crudProductIn.divStruct(this.dis_row).then(res => {
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.dis_row.iostorinv_id }).then(res => {
this.openParam = res
this.form.tableMater = []
this.dis_row = null
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
}).finally(() => {
this.divBtn = false
})
} else {
if (!this.stor_id) {
this.crud.notify('请先选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.structShow = true
this.$refs.child.getMsg(false)
}
},
unDivStruct() {
if (this.dis_row === null) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.dis_row.vehicle_overstruct_type = this.form.vehicle_overstruct_type
crudProductIn.unDivStruct(this.dis_row).then(res => {
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.dis_row.iostorinv_id }).then(res => {
this.openParam = res
this.form.tableMater = []
this.dis_row = null
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
})
},
divPoint() {
if (!this.form.point_code) {
this.crud.notify('请选择入库点', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.dis_row === null) {
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.dis_row.point_code = this.form.point_code
crudProductIn.setPoint(this.dis_row).then(res => {
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.dis_row.iostorinv_id }).then(res => {
this.openParam = res
this.form.tableMater = []
this.dis_row = null
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
})
},
formatBaseType(row) {
return this.dict.label.PCS_SAL_TYPE[row.base_bill_type]
}
}
}
</script>
<style>
.crud-opts2 {
padding: 0;
display: -webkit-flex;
display: flex;
align-items: center;
}
.crud-opts2 .el-dialog__title2 {
line-height: 24px;
font-size: 20px;
color: #303133;
}
.crud-opts2 .role-span {
padding: 10px 0px 10px 0px;
}
.crud-opts2 .crud-opts-form {
padding: 10px 0px 0px 20px;
}
.input-with-select {
background-color: #fff;
}
</style>

View File

@@ -0,0 +1,317 @@
<template>
<el-dialog
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
:show-close="false"
fullscreen
@open="open"
>
<span slot="title" class="dialog-footer">
<div class="crud-opts2">
<span class="el-dialog__title2">入库组盘分配</span>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
</span>
</div>
</span>
<div class="crud-opts2">
<span class="role-span">入库明细项</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<!--表格渲染-->
<el-table
ref="dtl_table"
:data="this.form"
style="width: 100%;"
max-height="300"
border
highlight-current-row
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@row-click="clickRow"
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="bill_status" label="状态" align="center" width="110px">
<template slot-scope="scope">
<el-select
v-model="scope.row.bill_status"
class="filter-item"
:disabled="true"
>
<el-option
v-for="item in dict.IO_BILL_STATUS"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
<el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量" align="center" />
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
<el-table-column show-overflow-tooltip prop="base_bill_code" label="源单号" align="center" />
<el-table-column show-overflow-tooltip prop="base_bill_table" label="源单行号" align="center" />
</el-table>
</el-card>
<!-- <el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">-->
<!-- <el-form ref="form2" :inline="true" :model="form" :rules="rules" size="mini">-->
<!-- <el-form-item label="载具号:" prop="vehicle_code">-->
<!-- <el-input v-model="form.vehicle_code" style="width: 200px" size="mini" clearable placeholder="载具号">-->
<!-- <el-button slot="append" @click="" >生成</el-button>-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="箱号:" prop="pageBox_code">-->
<!-- <el-input v-model="form.bucketunique" size="mini" style="width: 200px" disabled placeholder="箱号">-->
<!-- <el-button slot="append" icon="el-icon-plus" @click="" />-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="放入数量:" prop="storage_qty">-->
<!-- <el-input-number-->
<!-- v-model="form.storage_qty"-->
<!-- style="width: 200px"-->
<!-- size="mini"-->
<!-- :controls="false"-->
<!-- precision="3"-->
<!-- :min="0"-->
<!-- placeholder="数量"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="入库点:" prop="point_code">-->
<!-- <el-select-->
<!-- v-model="form.point_code"-->
<!-- size="mini"-->
<!-- clearable-->
<!-- placeholder="请选择"-->
<!-- class="filter-item"-->
<!-- style="width: 200px;"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in pointlist"-->
<!-- :key="item.point_code"-->
<!-- :label="item.point_name"-->
<!-- :value="item.point_code"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="载具超限类型:" prop="vehicle_overstruct_type">-->
<!-- <el-select-->
<!-- v-model="form.vehicle_overstruct_type"-->
<!-- size="mini"-->
<!-- placeholder="请选择"-->
<!-- class="filter-item"-->
<!-- style="width: 200px;"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in dict.VEHICLE_OVER_TYPE"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </el-card>-->
<div class="crud-opts2">
<span class="role-span">载具物料明细</span>
<div class="crud-opts-form">
<el-form ref="form" :inline="true" :model="form" size="mini">
<el-form-item label="库区:" prop="gender5">
<el-cascader
placeholder="请选择"
:options="sects"
v-model="defaultList"
:props="{ checkStrictly: true }"
clearable
/>
</el-form-item>
<el-form-item prop="checked">
<el-checkbox v-model="form.checked">自动分配货位</el-checkbox>
</el-form-item>
</el-form>
</div>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="groupConfim((crud.selections[0]))"
>
组盘确认
</el-button>
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
>
取消组盘
</el-button>
</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<!--表格渲染-->
<el-table
ref="dis_table"
:data="form.tableMater"
style="width: 100%;"
max-height="300"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘号" align="center" />
<el-table-column show-overflow-tooltip prop="bucketunique" label="箱号" align="center" />
<el-table-column show-overflow-tooltip prop="qty" :formatter="crud.formatNum3" label="数量" align="center" />
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" />
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" />
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
<el-table-column align="center" label="操作" width="170" fixed="right">
<template scope="scope">
<el-button
type="danger"
class="filter-item"
size="mini"
icon="el-icon-delete"
/>
</template>
</el-table-column>
</el-table>
</el-card>
<!-- <StructDiv ref="child" :stor-id="storId" :dialog-show.sync="structShow" :sect-prop="sectProp" @tableChanged="tableChanged" />-->
<!-- <AddBox ref="child" :dialog-show.sync="addBoxShow" :add-box-param="boxParam" @tableChanged2="tableChanged2" />-->
<GroupVehicleDialog
ref="groupVehicle"
@setMaterValue="setTableDis"
/>
</el-dialog>
</template>
<script>
import CRUD, { crud } from '@crud/crud'
import GroupVehicleDialog from '@/views/wms/md_manage/group_dick/GroupVehicleDialog'
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
// import StructDiv from '@/views/wms/storage_manage/product/productIn/StructDiv'
import crudProductIn from '@/views/wms/stor_manage/in/storinvin'
import crudPoint from '@/views/wms/stor_manage/in/storinvin'
// import AddBox from '@/views/wms/storage_manage/product/productIn/AddBox'
import crudSectattr from '@/api/wms/basedata/st/sectattr'
export default {
name: 'GroupDialog',
components: { formstruc, GroupVehicleDialog, crudProductIn },
mixins: [crud()],
dicts: ['IO_BILL_STATUS', 'VEHICLE_OVER_TYPE', 'PCS_SAL_TYPE'],
props: {
dialogShow: {
type: Boolean,
default: false
},
openParam: {
type: Array,
default: () => {
return []
}
},
storId: {
type: String,
default: null
}
},
data() {
return {
dialogVisible: false,
GroupShow: false,
click_Row: {},
stor_id: '1528627995269533696',
sect_id: '1528631043496742912',
sectProp: null,
structShow: false,
bucketObj: null,
divBtn: false,
bucketShow: false,
addBoxShow: false,
bucketuniqueObj: null,
sects: [],
defaultList: ['1528627995269533696', '1528631043496742912'],
dis_row: null,
form: [],
storlist: [],
pointlist: [],
rules: {},
boxParam: {}
}
},
methods: {
open() {
// formstruc.getHeader('STOR_IN').then(res => {
// this.cols = res
// })
},
setForm(row) {
this.dialogVisible = true
crudProductIn.getIosInvDtl(row.id).then(res => {
this.form = res
})
},
clickRow(row) {
this.click_Row = row
},
groupConfim(){
if (this.click_Row !== null) {
this.$refs.groupVehicle.setForm(this.click_Row)
}
},
setTableDis(row){
console.log(row)
}
}
}
</script>
<style>
.crud-opts2 {
padding: 0;
display: -webkit-flex;
display: flex;
align-items: center;
}
.crud-opts2 .el-dialog__title2 {
line-height: 24px;
font-size: 20px;
color: #303133;
}
.crud-opts2 .role-span {
padding: 10px 0px 10px 0px;
}
.crud-opts2 .crud-opts-form {
padding: 10px 0px 0px 20px;
}
.input-with-select {
background-color: #fff;
}
</style>

View File

@@ -112,28 +112,6 @@
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="success"
:disabled="dis_flag"
icon="el-icon-position"
size="mini"
@click="divOpen"
>
分配
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-position"
size="mini"
:disabled="task_flag"
@click="taskOpen"
>
作业任务
</el-button>
<el-button
slot="right"
class="filter-item"
@@ -170,14 +148,9 @@
<el-table-column show-overflow-tooltip prop="form_type" min-width="120" label="单据类型" />
<el-table-column show-overflow-tooltip prop="biz_code" label="仓库" min-width="120" />
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
<el-table-column v-for="(item, index) in cols" :key="item.value" :label="item.lable" >
<template slot-scope="scope">{{scope.row.form_data[item.value]}}</template>
</el-table-column>
<!-- <template v-for="(col,index) in cols">-->
<!-- <el-table-column :prop="col.value" :label="col.lable" width="120px" show-overflow-tooltip />-->
<!-- </template>-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建人" align="center" prop="create_id" />
<el-table-column label="创建时间" align="center" prop="create_time" width="150" />
@@ -189,6 +162,9 @@
:disabled-edit="canUd(scope.row)"
:disabled-dle="canUd(scope.row)"
/>
<el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus-outline" @click="groupOpen(scope.row)">组盘</el-button>
<el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus-outline" @click="groupOpen(scope.row)">分配</el-button>
<el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus-outline" @click="groupOpen(scope.row)">任务</el-button>
</template>
</el-table-column>
</el-table>
@@ -197,7 +173,7 @@
</div>
<AddDialog @AddChanged="querytable" />
<ViewDialog ref="itemview"/>
<!-- <DivDialog :dialog-show.sync="divShow" :stor-id="storId" :open-param="openParam" @AddChanged="querytable" />-->
<GroupDialog ref="groupview" />
<!-- <TaskDialog :dialog-show.sync="taskShow" :open-param="taskOpenParam" />-->
</div>
</template>
@@ -211,13 +187,13 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import AddDialog from '@/views/wms/stor_manage/in/AddDialog'
// import DivDialog from '@/views/wms/storage_manage/product/productIn/DivDialog'
import GroupDialog from '@/views/wms/stor_manage/in/GroupDickDialog'
import ViewDialog from '@/views/wms/stor_manage/in/ViewDialog'
import { mapGetters } from 'vuex'
export default {
name: 'ProductIn',
components: { AddDialog, ViewDialog, formstruc, crudProductIn, crudOperation, rrOperation, udOperation, pagination },
components: { GroupDialog, AddDialog, ViewDialog, formstruc, crudProductIn, crudOperation, rrOperation, udOperation, pagination },
cruds() {
return CRUD({
title: '',
@@ -275,6 +251,45 @@ export default {
this.cols = res
})
},
toView(row) {
if (row !== null) {
this.$refs.itemview.setForm(row)
}
},
groupOpen(row) {
if (row !== null) {
this.$refs.groupview.setForm(row)
}
},
confirm() {
if (!this.currentRow) {
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
return
}
crudProductIn.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
},
stateFormat(row, column) {
return this.dict.label.IO_BILL_STATUS[row.bill_status]
},
divOpen() {
crudProductIn.getIosInvDtl({ 'bill_code': this.currentRow.bill_code }).then(res => {
this.openParam = res
this.storId = this.currentRow.stor_id
this.billType = this.currentRow.bill_type
this.divShow = true
})
},
taskOpen() {
crudProductIn.getIosInvDtl({ 'bill_code': this.currentRow.bill_code }).then(res => {
this.taskOpenParam = res
})
this.taskShow = true
},
fun(val) {
return Number(val).toFixed(3)
},
@@ -327,38 +342,6 @@ export default {
bill_typeFormat(row, column) {
return this.dict.label.ST_INV_CP_IN_TYPE[row.bill_type]
},
toView(row) {
if (row !== null) {
this.$refs.itemview.setForm(row)
}
},
confirm() {
if (!this.currentRow) {
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
return
}
crudProductIn.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
},
stateFormat(row, column) {
return this.dict.label.IO_BILL_STATUS[row.bill_status]
},
divOpen() {
crudProductIn.getIosInvDtl({ 'bill_code': this.currentRow.bill_code }).then(res => {
this.openParam = res
this.storId = this.currentRow.stor_id
this.billType = this.currentRow.bill_type
this.divShow = true
})
},
taskOpen() {
crudProductIn.getIosInvDtl({ 'bill_code': this.currentRow.bill_code }).then(res => {
this.taskOpenParam = res
})
this.taskShow = true
},
querytable() {
this.onSelectAll()
this.crud.toQuery()

View File

@@ -31,6 +31,13 @@ export function getIosInvDtl(data) {
data
})
}
export function getPoint(data) {
return request({
url: '/api/stIvtIostorinvIn/getIosInvDtl',
method: 'post',
data
})
}
export function getIosInvDis(data) {
return request({
url: '/api/stIvtIostorinvIn/getIosInvDis',
@@ -134,6 +141,7 @@ export default {
getIosInvDtl,
vehicleCheck,
confirmvehicle,
getPoint,
getSect,
divStruct,
unDivStruct,