add:增加组盘,出入库兼容混乱情况,数据库组盘表需要MD5字段需要修改
This commit is contained in:
288
nladmin-ui/src/views/wms/basedata/group/AddDialog.vue
Normal file
288
nladmin-ui/src/views/wms/basedata/group/AddDialog.vue
Normal file
@@ -0,0 +1,288 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="crud.status.title"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
width="1200px"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 0" :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="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="载具编码" prop="storagevehicle_code">
|
||||
<label slot="label">载具编码:</label>
|
||||
<el-input v-model="form.storagevehicle_code" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="stor_id">
|
||||
<label slot="label">仓 库:</label>
|
||||
<el-select
|
||||
v-model="form.stor_id"
|
||||
clearable
|
||||
placeholder="仓库"
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
:disabled="crud.status.view > 0"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="源单据号" prop="ext_code">
|
||||
<label slot="label">源单据号:</label>
|
||||
<el-input v-model="form.ext_code" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源单类型" prop="ext_type">
|
||||
<el-select
|
||||
v-model="form.ext_type"
|
||||
clearable
|
||||
placeholder="源单类型"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
:disabled="crud.status.view > 0"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_IN_TYPE"
|
||||
:key="item.value"
|
||||
:disabled="item.value === '0003'"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="insertEvent()"
|
||||
>
|
||||
添加物料
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="form.tableData"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="180" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip width="260" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip width="260" prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip width="180" prop="pcsn" label="批次号">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.pcsn" style="width: 150px;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip width="180" prop="qty" label="数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.qty" style="width: 150px;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip width="180" prop="qty" label="计量单位名称">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.qty_unit_name"
|
||||
style="width: 100px"
|
||||
placeholder=""
|
||||
@change="unitChange(scope.row)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in tableEnum.md_pb_measureunit"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value+'@'+item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="150" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click.native.prevent="deleteRow(scope.$index, form.tableData)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<MaterialDialog :dialog-show.sync="dtlShow" :is-single.sync="isSingle" @materialChoose="materialChoose" />
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import MaterialDialog from '@/views/wms/basedata/material/MaterialDialog'
|
||||
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||
|
||||
const defaultForm = {
|
||||
ext_code: '',
|
||||
storagevehicle_code: '',
|
||||
stor_id: '',
|
||||
status: '10',
|
||||
ext_type: '0',
|
||||
remark: '',
|
||||
tableData: []
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { MaterialDialog },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['io_bill_status', 'ST_QUALITY_SCODE', 'ST_INV_IN_TYPE'],
|
||||
tableEnums: ['md_pb_measureunit#unit_name#measure_unit_id'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bussConfig: {
|
||||
type: Object
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
dtlShow: false,
|
||||
isSingle: false,
|
||||
bill_btn: false,
|
||||
mater_btn: false,
|
||||
storlist: [],
|
||||
billtypelist: [],
|
||||
rules: {
|
||||
storagevehicle_code: [
|
||||
{ required: true, message: '载具不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudBsrealstorattr.getStor().then(res => {
|
||||
this.storlist = res
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
// 提交前校验
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
},
|
||||
|
||||
fun(val) {
|
||||
return Number(val).toFixed(3)
|
||||
},
|
||||
async insertdtl() {
|
||||
if (this.form.bill_type === '') {
|
||||
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
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) {
|
||||
const pcsn = rows[index].pcsn
|
||||
let len = rows.length
|
||||
while (len--) {
|
||||
const obj = rows[len]
|
||||
if (pcsn === obj.pcsn) {
|
||||
const index = rows.indexOf(obj)
|
||||
if (index > -1) { // 移除找到的指定元素
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
unitChange(row) {
|
||||
const split = row.qty_unit_name.split('@')
|
||||
row.qty_unit_id = split[0]
|
||||
row.qty_unit_name = split[1]
|
||||
},
|
||||
materialChoose(row) {
|
||||
// 对新增的行进行校验不能存在相同物料批次
|
||||
row.forEach((item) => {
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((row) => {
|
||||
debugger
|
||||
if (row.material_code === item.material_code && row.pcsn === item.pcsn) {
|
||||
debugger
|
||||
same_mater = false
|
||||
}
|
||||
})
|
||||
if (same_mater) {
|
||||
this.form.tableData.splice(-1, 0, item)
|
||||
}
|
||||
})
|
||||
},
|
||||
async insertEvent(row) {
|
||||
this.dtlShow = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -24,4 +24,12 @@ export function edit(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
export function getAllGroupInfo(data) {
|
||||
return request({
|
||||
url: 'api/group/getAllGroupInfo',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getAllGroupInfo }
|
||||
|
||||
@@ -2,62 +2,62 @@
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
物料查询:
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
size="mini"
|
||||
placeholder="物料编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
批次查询:
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
size="mini"
|
||||
placeholder="批次"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
载具编码:
|
||||
<el-input
|
||||
v-model="query.storagevehicle_code"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
size="mini"
|
||||
placeholder="载具编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
组盘状态:
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
size="mini"
|
||||
placeholder="状态"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.GROUP_STATUS"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
物料查询:
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
size="mini"
|
||||
placeholder="物料编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<rrOperation />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
批次查询:
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
size="mini"
|
||||
placeholder="批次"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
载具编码:
|
||||
<el-input
|
||||
v-model="query.storagevehicle_code"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
size="mini"
|
||||
placeholder="载具编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
组盘状态:
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
size="mini"
|
||||
placeholder="状态"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.GROUP_STATUS"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<rrOperation />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--新增表格-->
|
||||
@@ -179,6 +179,8 @@
|
||||
</div>
|
||||
<!--放引用的组件-->
|
||||
<MaterialDialog :dialog-show.sync="materialDialog" @materialChoose="materialChoose" />
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -190,6 +192,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import MaterialDialog from '@/views/wms/basedata/material/MaterialDialog'
|
||||
import AddDialog from '@/views/wms/basedata/group/AddDialog'
|
||||
|
||||
const defaultForm = {
|
||||
group_id: null,
|
||||
@@ -211,7 +214,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Group',
|
||||
components: { pagination, MaterialDialog, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, MaterialDialog, crudOperation, rrOperation, udOperation, AddDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
tableEnums: ['md_pb_measureunit#unit_name#measure_unit_id'],
|
||||
// 数据字典
|
||||
@@ -243,6 +246,9 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
formattStatus(row) {
|
||||
return this.dict.label.GROUP_STATUS[row.status]
|
||||
},
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
<el-select
|
||||
v-model="query.storagevehicle_type"
|
||||
clearable
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
@change="crud.toQuery"
|
||||
class="filter-item"
|
||||
style="width: 180px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.storagevehicle_type"
|
||||
@@ -26,13 +28,14 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="模糊搜索">
|
||||
|
||||
<el-form-item label="载具号">
|
||||
<el-input
|
||||
v-model="query.storagevehicle_code"
|
||||
v-model="query.vehicle_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="载具号、载具名称"
|
||||
style="width: 200px;"
|
||||
placeholder="载具号"
|
||||
style="width: 110px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
@@ -42,8 +45,114 @@
|
||||
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-printer"
|
||||
size="mini"
|
||||
@click="printView"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
title="载具物料信息"
|
||||
width="540px"
|
||||
@close="materiValueCancel()"
|
||||
>
|
||||
<el-form ref="form" :model="materialForm" :rules="rules" size="mini" label-width="110px">
|
||||
<el-form-item label="载具编码" prop="vehicle_code">
|
||||
<el-input v-model="materialForm.vehicle_code" disabled style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="materialForm.material_code" clearable style="width: 370px"
|
||||
@clear="materialForm.material_id='',materialForm.material_code='',materialForm.material_name='',materialForm.material_spec=''">
|
||||
<el-button slot="append" icon="el-icon-plus" @click="queryMater"/>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格" prop="material_spec">
|
||||
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批 次" prop="pcsn">
|
||||
<el-input v-model="materialForm.pcsn" clearable style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料数量" prop="qty">
|
||||
<el-input v-model="materialForm.qty" clearable style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="冻结数量" prop="frozen_qty">
|
||||
<el-input v-model="materialForm.frozen_qty" clearable style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程实例" prop="proc_inst_id">
|
||||
<el-input v-model="materialForm.proc_inst_id" clearable style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="materiValueCancel()">取消</el-button>
|
||||
<el-button type="primary" @click="materiValueSubmit()">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="pointMVisible"
|
||||
title="载具信息"
|
||||
width="540px"
|
||||
@close="materiValueCancel()"
|
||||
>
|
||||
<el-form ref="form" :model="updateForm" :rules="rules" size="mini" label-width="110px">
|
||||
<el-form-item label="载具编号" prop="vehicle_code">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="updateForm.vehicle_code" clearable/>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具重量(g)" prop="vehicle_weight">
|
||||
<el-input-number v-model="updateForm.vehicle_weight" clearable style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="materiValueCancel()">取消</el-button>
|
||||
<el-button type="primary" @click="pointMateriSubmit()">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:before-close="crud.cancelCU"
|
||||
:close-on-click-modal="false"
|
||||
title="打印配置"
|
||||
:visible.sync="printVisible"
|
||||
width="450px"
|
||||
>
|
||||
<el-form ref="form" :model="printForm" size="mini" label-width="150px">
|
||||
<el-form-item label="纸张高度(mm)" prop="pageh">
|
||||
<el-input v-model="printForm.pageh" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="纸张宽度(mm)" prop="pagew">
|
||||
<el-input v-model="printForm.pagew" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="页边距top(mm)" prop="pagetop">
|
||||
<el-input v-model="printForm.pagetop" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="页边距right(mm)" prop="pageright">
|
||||
<el-input v-model="printForm.pageright" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="页边距down(mm)" prop="pagedown">
|
||||
<el-input v-model="printForm.pagedown" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="页边距left(mm)" prop="pageleft">
|
||||
<el-input v-model="printForm.pageleft" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<br>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="info" @click="printClose">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="print">打印</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:before-close="crud.cancelCU"
|
||||
:close-on-click-modal="false"
|
||||
@@ -55,26 +164,38 @@
|
||||
<el-form-item label="载具类型" prop="storagevehicle_type">
|
||||
<el-select
|
||||
v-model="form.storagevehicle_type"
|
||||
class="filter-item"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
:disabled="crud.status.edit > 0"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
style="width: 250px;"
|
||||
@change="getVehicle"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.storagevehicle_type"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:value="item.para1"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具编码" prop="storagevehicle_code">
|
||||
<el-input v-model="form.storagevehicle_code" style="width: 200px;" :disabled="crud.status.edit > 0" />
|
||||
<br>
|
||||
<el-form-item label="起始载具号" prop="vehicle_code">
|
||||
<el-input v-model="form.vehicle_code" :disabled="true" style="width: 250px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具名称" prop="storagevehicle_name">
|
||||
<el-input v-model="form.storagevehicle_name" style="width: 200px;" />
|
||||
<el-form-item label="载具数量" prop="num">
|
||||
<el-input-number v-model="form.num" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具重量" prop="weigth">
|
||||
<el-input-number v-model="form.weigth" :precision="1" style="width: 200px;" />
|
||||
<el-form-item label="高度(mm)" prop="h">
|
||||
<el-input-number v-model="form.h" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="宽度(mm)" prop="w">
|
||||
<el-input-number v-model="form.w" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="深度(mm)" prop="l">
|
||||
<el-input-number v-model="form.l" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="重量(g)" prop="weight">
|
||||
<el-input-number v-model="form.weight" :precision="0" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用">
|
||||
<el-radio v-model="form.is_used" label="0">否</el-radio>
|
||||
@@ -83,7 +204,8 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="info" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">生成</el-button>
|
||||
<el-button type="primary" @click="addAndprint">生成并打印</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
@@ -131,50 +253,53 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<!-- 分页组件-->
|
||||
<pagination/>
|
||||
</div>
|
||||
<MaterDtl
|
||||
:dialog-show.sync="materialShow"
|
||||
:is-single="true"
|
||||
:mater-opt-code="materType"
|
||||
@setMaterValue="setMaterValue"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudStoragevehicleinfo from '@/views/wms/basedata/storagevehicleinfo/storagevehicleinfo'
|
||||
import crudStoragevehicleinfo from './storagevehicleinfo'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||
import MaterDtl from '@/views/wms/basedata/material/MaterialDialog'
|
||||
|
||||
|
||||
const defaultForm = {
|
||||
storagevehicle_id: null,
|
||||
storagevehicle_code: null,
|
||||
storagevehicle_name: null,
|
||||
vehicle_code: null,
|
||||
vehicle_name: null,
|
||||
one_code: null,
|
||||
two_code: null,
|
||||
rfid_code: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_name: null,
|
||||
update_time: null,
|
||||
is_delete: null,
|
||||
is_used: '1',
|
||||
storagevehicle_type: null,
|
||||
weigth: null,
|
||||
vehicle_width: null,
|
||||
vehicle_long: null,
|
||||
vehicle_height: null,
|
||||
overstruct_type: null,
|
||||
occupystruct_qty: null,
|
||||
ext_id: null,
|
||||
qty: null,
|
||||
pcsn: null
|
||||
w: null,
|
||||
l: null,
|
||||
h: null,
|
||||
weight: null,
|
||||
overstruct_type: '0',
|
||||
occupystruct_qty: '1',
|
||||
ext_json: null,
|
||||
num: '1'
|
||||
}
|
||||
export default {
|
||||
name: 'Storagevehicleinfo',
|
||||
dicts: ['storagevehicle_type', 'is_used'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
dicts: ['storagevehicle_type', "VEHICLE_OVER_TYPE"],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -203,31 +328,42 @@ export default {
|
||||
}
|
||||
}
|
||||
return {
|
||||
printVisible: false,
|
||||
updateForm: {},
|
||||
printForm: {
|
||||
pageh: '40mm',
|
||||
pagew: '60mm',
|
||||
pagetop: '4.3mm',
|
||||
pagedown: '50mm',
|
||||
pageright: '30mm',
|
||||
pageleft: '8mm'
|
||||
},
|
||||
pointMVisible: false,
|
||||
materType: '01',
|
||||
materialShow: false,
|
||||
dialogVisible: false,
|
||||
materialForm: {},
|
||||
resultCodeArr: [],
|
||||
permission: {},
|
||||
classes1: [],
|
||||
rules: {
|
||||
vehicle_code: [
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
],
|
||||
is_delete: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
],
|
||||
is_used: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
],
|
||||
storagevehicle_type: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
storagevehicle_code: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
storagevehicle_name: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
vehicle_type: [
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
],
|
||||
overstruct_type: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
{required: true, message: '不能为空', trigger: 'blur'}
|
||||
],
|
||||
num: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
{required: true, message: '不能为空', trigger: 'blur'},
|
||||
{validator: numberOne}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -237,39 +373,155 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
onCloseDialog() {
|
||||
this.form = defaultForm
|
||||
},
|
||||
queryMater() {
|
||||
this.materialShow = true
|
||||
},
|
||||
setMaterValue(row) {
|
||||
this.$set(this.materialForm, 'material_code', row.material_code)
|
||||
this.$set(this.materialForm, 'material_id', row.material_id)
|
||||
this.$set(this.materialForm, 'material_code', row.material_code)
|
||||
},
|
||||
materiValueCancel() {
|
||||
this.updateForm = {}
|
||||
this.pointMVisible = false
|
||||
this.dialogVisible = false
|
||||
},
|
||||
materiValueSubmit() {
|
||||
crudStoragevehicleinfo.updateVehicleMaterial(this.materialForm).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.materiValueCancel()
|
||||
})
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 改变状态
|
||||
changeEnabled(data, val) {
|
||||
this.$confirm('此操作将 "' + this.dict.label.is_used[val] + '" ' + data.storagevehicle_code + ', 是否继续?', '提示', {
|
||||
let msg = '此操作将停用载具,是否继续!'
|
||||
if (val !== '1') {
|
||||
msg = '此操作将启用载具,是否继续!'
|
||||
}
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudStoragevehicleinfo.edit(data).then(res => {
|
||||
this.crud.notify(this.dict.label.is_used[val] + '成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
crudStoragevehicleinfo.changeActive(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
if (data.is_used === '0') {
|
||||
data.is_used = '1'
|
||||
return
|
||||
}
|
||||
if (data.is_used === '1') {
|
||||
data.is_used = '0'
|
||||
}
|
||||
data.is_used = !data.is_used
|
||||
})
|
||||
}).catch(() => {
|
||||
if (data.is_used === '0') {
|
||||
data.is_used = '1'
|
||||
return
|
||||
}
|
||||
if (data.is_used === '1') {
|
||||
data.is_used = '0'
|
||||
}
|
||||
})
|
||||
},
|
||||
format_is_used(is_used) {
|
||||
return is_used === '1'
|
||||
},
|
||||
formattType(row) {
|
||||
return this.dict.label.storagevehicle_type[row.storagevehicle_type]
|
||||
},
|
||||
printView() {
|
||||
this.printForm = {
|
||||
pageh: '40mm',
|
||||
pagew: '60mm',
|
||||
pagetop: '4.3mm',
|
||||
pagedown: '50mm',
|
||||
pageright: '30mm',
|
||||
pageleft: '8mm'
|
||||
}
|
||||
this.printVisible = true
|
||||
},
|
||||
printClose() {
|
||||
this.printVisible = false
|
||||
this.printForm = {
|
||||
pageh: '40mm',
|
||||
pagew: '60mm',
|
||||
pagetop: '4.3mm',
|
||||
pagedown: '50mm',
|
||||
pageright: '30mm',
|
||||
pageleft: '8mm'
|
||||
}
|
||||
},
|
||||
print() {
|
||||
this.printVisible = false
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (!_selectData || _selectData.length < 1) {
|
||||
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
console.log(_selectData.length)
|
||||
console.log(this.printForm)
|
||||
for (let i = 0; i < _selectData.length; i++) {
|
||||
const code = _selectData[i].vehicle_code
|
||||
const LODOP = getLodop()
|
||||
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
||||
LODOP.SET_PRINT_PAGESIZE(1, this.printForm.pagew, this.printForm.pageh, '1')
|
||||
// LODOP.ADD_PRINT_RECT('0mm', '0mm', '50mm', '30mm', 0, 1)
|
||||
LODOP.ADD_PRINT_BARCODE(this.printForm.pagetop, this.printForm.pageleft, this.printForm.pagedown, this.printForm.pageright, '128Auto', code)
|
||||
// LODOP.PREVIEW()// 预览
|
||||
LODOP.PRINT()// 打印
|
||||
this.crud.notify('打印成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}
|
||||
},
|
||||
toView(row) {
|
||||
this.dialogVisible = true
|
||||
crudStoragevehicleinfo.getMaterialByVehicle(row).then(res => {
|
||||
this.materialForm = res
|
||||
})
|
||||
},
|
||||
updateweight(row) {
|
||||
this.pointMVisible = true
|
||||
this.updateForm = row
|
||||
},
|
||||
pointMateriSubmit() {
|
||||
console.log(this.updateForm)
|
||||
crudStoragevehicleinfo.edit(this.updateForm).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
this.updateForm = {}
|
||||
this.pointMVisible = false
|
||||
this.crud.refresh()
|
||||
},
|
||||
addAndprint() {
|
||||
const data = this.form
|
||||
if (!this.form.storagevehicle_type) {
|
||||
this.crud.notify('载具类型不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!this.form.num) {
|
||||
this.crud.notify('数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
crudStoragevehicleinfo.add(data).then(res => {
|
||||
res.forEach((item) => {
|
||||
const LODOP = getLodop()
|
||||
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
||||
LODOP.SET_PRINT_PAGESIZE(1, '60mm', '40mm', '1')
|
||||
// LODOP.ADD_PRINT_RECT('0mm', '0mm', '50mm', '30mm', 0, 1)
|
||||
LODOP.ADD_PRINT_BARCODE('4.3mm', '8mm', '50mm', '30mm', '128Auto', item)
|
||||
// LODOP.PREVIEW()// 预览
|
||||
LODOP.PRINT()// 打印
|
||||
})
|
||||
this.crud.status.add = CRUD.STATUS.NORMAL
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
getVehicle(code) {
|
||||
if (!code) {
|
||||
this.crud.notify('请选择载具类型', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.form.vehicle_code = ''
|
||||
return false
|
||||
}
|
||||
crudStoragevehicleinfo.getVehicle(code).then(res => {
|
||||
this.form.vehicle_code = res.value
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总数量" prop="total_qty">
|
||||
<label slot="label">总 数 量:</label>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
@@ -131,7 +131,7 @@
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="storagevehicle_code" label="载具编码" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="storagevehicle_code" label="批次号" />
|
||||
<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="物料名称" />
|
||||
@@ -313,7 +313,7 @@ export default {
|
||||
rows.forEach((item) => {
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((row) => {
|
||||
if (row.pcsn === item.pcsn) {
|
||||
if (row.pcsn === item.pcsn && row.material_id === item.material_id && row.storagevehicle_code === item.storagevehicle_code) {
|
||||
same_mater = false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -77,12 +77,12 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
|
||||
import group, { getAllGroupInfo } from '@/views/wms/basedata/group/group.js'
|
||||
|
||||
const start = new Date()
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
components: { crudOperation, rrOperation, pagination, DateRangePicker },
|
||||
components: { crudOperation, rrOperation, pagination, DateRangePicker, group },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '用户',
|
||||
@@ -149,10 +149,10 @@ export default {
|
||||
console.log('获取的rows:')
|
||||
console.log(this.rows)
|
||||
this.$emit('tableChanged', this.rows)
|
||||
// crudRawAssist.queryBoxMater(this.rows).then(res => {
|
||||
// this.rows = res
|
||||
// this.$emit('tableChanged', this.rows)
|
||||
// })
|
||||
group.getAllGroupInfo(this.rows).then(res => {
|
||||
this.rows = res.content
|
||||
this.$emit('tableChanged', this.rows)
|
||||
})
|
||||
// this.form = this.$options.data().form
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,20 @@
|
||||
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="source_bill_code" label="源单号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_type" label="源单类型" align="center" />
|
||||
@@ -155,10 +169,13 @@
|
||||
:data="form.tableMater"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
highlight-current-row
|
||||
@row-click="clcikDisRow"
|
||||
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="storagevehicle_code" label="载具编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" align="center" />
|
||||
@@ -166,7 +183,7 @@
|
||||
show-overflow-tooltip
|
||||
prop="plan_qty"
|
||||
:formatter="crud.formatNum3"
|
||||
label="数量"
|
||||
label="重量"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" />
|
||||
@@ -191,7 +208,6 @@ import crudSectattr from '@/views/wms/basedata/sectattr/sectattr'
|
||||
import StructDiv from '@/views/wms/pub/StructDialog'
|
||||
import crudRawAssist, { allDivStruct } from '@/views/wms/st/inbill/rawassist'
|
||||
import crudPoint from '@/views/wms/sch/point/schBasePoint'
|
||||
import { getPointList } from '../../sch/point/schBasePoint'
|
||||
|
||||
export default {
|
||||
name: 'DivDialog',
|
||||
@@ -237,6 +253,7 @@ export default {
|
||||
sect_val: null,
|
||||
form: {
|
||||
dtl_row: null,
|
||||
dis_row: null,
|
||||
storage_qty: '',
|
||||
point_code: null,
|
||||
checked: true,
|
||||
@@ -259,7 +276,10 @@ export default {
|
||||
crudSectattr.getSectCode({ 'stor_id': this.storId }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
crudPoint.getPointList().then(res => {
|
||||
|
||||
const area_type = 'RKQ'
|
||||
|
||||
crudPoint.getPointList({ 'region_code': area_type }).then(res => {
|
||||
this.pointlist = res
|
||||
})
|
||||
},
|
||||
@@ -281,11 +301,15 @@ export default {
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code }).then(res => {
|
||||
this.openParam = res
|
||||
this.form.dtl_row = res[row.index]
|
||||
this.form.dis_row = null
|
||||
})
|
||||
crudRawAssist.getDisDtl(row).then(res => {
|
||||
this.form.tableMater = res
|
||||
})
|
||||
},
|
||||
clcikDisRow(row, column, event) {
|
||||
this.form.dis_row = row
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
},
|
||||
@@ -312,7 +336,6 @@ export default {
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
this.sectProp = val
|
||||
debugger
|
||||
if (val.length === 1) {
|
||||
this.stor_code = val[0]
|
||||
this.sect_code = ''
|
||||
@@ -337,8 +360,6 @@ export default {
|
||||
this.form.tableMater[i].sect_name = row.sect_name
|
||||
this.form.tableMater.splice(i, 1, this.form.tableMater[i]) // 通过splice 替换数据 触发视图更新
|
||||
}
|
||||
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
|
||||
@@ -370,9 +391,12 @@ export default {
|
||||
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (!this.form.dis_row) {
|
||||
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// 如果勾选了,直接跳后台
|
||||
if (this.form.checked) {
|
||||
debugger
|
||||
if (!this.sect_code) {
|
||||
this.crud.notify('请先选择区域!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
@@ -387,6 +411,7 @@ export default {
|
||||
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.divBtn = false
|
||||
this.form.dis_row = null
|
||||
this.crud.notify('分配货位成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
}).finally(() => {
|
||||
@@ -405,9 +430,8 @@ export default {
|
||||
this.crud.notify('不存在载具明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const flag = this.form.tableMater.some(mater => !mater.struct_code)
|
||||
if (flag) {
|
||||
this.crud.notify('明细存在未分配货位!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
if (!this.form.dis_row) {
|
||||
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// 如果勾选了,直接跳后台
|
||||
@@ -417,6 +441,7 @@ export default {
|
||||
})
|
||||
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.form.dis_row = null
|
||||
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总数量" prop="total_qty">
|
||||
<label slot="label">总 数 量:</label>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
@@ -111,7 +111,7 @@
|
||||
<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 prop="plan_qty" :formatter="crud.formatNum3" label="数量" 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" />
|
||||
@@ -139,7 +139,7 @@
|
||||
<el-table-column prop="pcsn" label="批次号" align="center" width="150" />
|
||||
<!-- <el-table-column prop="sap_pcsn" label="SAP批次号" align="center" />-->
|
||||
<el-table-column prop="storagevehicle_code" label="载具号" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="point_code" label="起始位置" align="center" />
|
||||
<el-table-column prop="struct_code" label="目的位置" align="center" />
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
|
||||
<el-table-column show-overflow-tooltip prop="create_mode" :formatter="create_modeFormat" label="生成方式" />
|
||||
<el-table-column label="明细数" align="center" prop="detail_count" />
|
||||
<el-table-column label="总数量" align="center" prop="total_qty">
|
||||
<el-table-column label="总重量" align="center" prop="total_qty">
|
||||
<template slot-scope="scope">
|
||||
{{ fun(scope.row.total_qty) }}
|
||||
</template>
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总数量" prop="total_qty">
|
||||
<label slot="label">总 数 量:</label>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
@@ -110,14 +110,14 @@
|
||||
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="addFormDtl()"
|
||||
>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="addFormDtl()"
|
||||
>
|
||||
添加单据
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -126,7 +126,7 @@
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="addMaterDtl()"
|
||||
@click="queryDtl()"
|
||||
>
|
||||
添加物料
|
||||
</el-button>
|
||||
@@ -157,19 +157,13 @@
|
||||
<span v-show="scope.row.edit">{{ scope.row.pcsn }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="plan_qty" label="出库数量" width="150" align="center">
|
||||
<el-table-column prop="plan_qty" label="出库重量" width="150" align="center">
|
||||
<template scope="scope">
|
||||
<el-input-number v-show="!scope.row.edit" v-model="scope.row.plan_qty" :precision="3" :controls="false" :min="1" style="width: 120px" />
|
||||
<span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column prop="source_bill_code" label="源单号" align="center" />
|
||||
<el-table-column prop="source_bill_type" label="源单类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.INANDOUT_BILL_TYPE[scope.row.source_bill_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="scope.row.remark" size="mini" />
|
||||
@@ -186,6 +180,7 @@
|
||||
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged" />
|
||||
<MaterDialog :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @setMaterValue="setMaterValue" />
|
||||
<FormDialog :dialog-show.sync="formShow" @setFormValue="setFormValue" />
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@@ -194,6 +189,7 @@ import CRUD, { crud, form } from '@crud/crud'
|
||||
import AddDtl from '@/views/wms/st/outbill/AddDtl'
|
||||
import MaterDialog from '@/views/wms/pub/MaterDialog'
|
||||
import FormDialog from '@/views/wms/pm_manage/form_data/FormDialog'
|
||||
|
||||
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
|
||||
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||
|
||||
@@ -222,7 +218,7 @@ export default {
|
||||
default: false
|
||||
}
|
||||
},
|
||||
dicts: ['io_bill_status', 'ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_used', 'ST_INV_OUT_TYPE', 'INANDOUT_BILL_TYPE'],
|
||||
dicts: ['io_bill_status', 'ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_used', 'ST_INV_OUT_TYPE'],
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
@@ -322,18 +318,6 @@ export default {
|
||||
this.nowindex = index
|
||||
this.nowrow = row
|
||||
},
|
||||
addMaterDtl(index, row) {
|
||||
if (this.form.bill_type === '') {
|
||||
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.form.stor_id === '') {
|
||||
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.storId = this.form.stor_id
|
||||
this.dtlShow = true
|
||||
},
|
||||
addFormDtl(index, row) {
|
||||
if (this.form.bill_type === '') {
|
||||
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
@@ -346,6 +330,18 @@ export default {
|
||||
this.storId = this.form.stor_id
|
||||
this.formShow = true
|
||||
},
|
||||
queryDtl(index, row) {
|
||||
if (this.form.bill_type === '') {
|
||||
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.form.stor_id === '') {
|
||||
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.storId = this.form.stor_id
|
||||
this.dtlShow = true
|
||||
},
|
||||
tableChanged(rows) {
|
||||
rows.forEach((item) => {
|
||||
// 添加plan_qty
|
||||
@@ -396,7 +392,7 @@ export default {
|
||||
this.nowrow.plan_qty = data.qty
|
||||
this.nowrow.qty = data.qty
|
||||
this.nowrow.source_bill_code = data.code
|
||||
this.nowrow.source_billdtl_id = data.id
|
||||
this.nowrow.source_bill_id = data.id
|
||||
this.nowrow.source_bill_type = data.form_type
|
||||
this.nowrow.edit = false
|
||||
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
|
||||
|
||||
@@ -76,9 +76,9 @@
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'批次')" />
|
||||
<el-table-column prop="qty" label="数量" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="qty" label="重量" :formatter="crud.formatNum3" :min-width="flexWidth('qty',crud.data,'重量')" />
|
||||
<el-table-column prop="frozen_qty" label="冻结数量" :formatter="crud.formatNum3" :min-width="flexWidth('frozen_qty',crud.data,'冻结数量')" />
|
||||
<el-table-column prop="qty_unit_name" label="数量单位" :min-width="flexWidth('qty_unit_name',crud.data,'数量单位')" />
|
||||
<el-table-column prop="qty_unit_name" label="重量单位" :min-width="flexWidth('qty_unit_name',crud.data,'重量单位')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
|
||||
Reference in New Issue
Block a user