2025-06-23 18:18:19 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<!--工具栏-->
|
|
|
|
|
|
<div class="head-container">
|
2025-07-10 10:11:36 +08:00
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
物料查询:
|
2025-06-23 18:18:19 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.material_code"
|
|
|
|
|
|
clearable
|
2025-07-10 10:11:36 +08:00
|
|
|
|
style="width: 150px"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
size="mini"
|
|
|
|
|
|
placeholder="物料编码、名称"
|
|
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
2025-07-10 10:11:36 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
批次查询:
|
2025-06-23 18:18:19 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.pcsn"
|
|
|
|
|
|
clearable
|
2025-07-10 10:11:36 +08:00
|
|
|
|
style="width: 150px"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
size="mini"
|
|
|
|
|
|
placeholder="批次"
|
|
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
2025-07-10 10:11:36 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
载具编码:
|
2025-06-23 18:18:19 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.storagevehicle_code"
|
|
|
|
|
|
clearable
|
2025-07-10 10:11:36 +08:00
|
|
|
|
style="width: 150px"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
size="mini"
|
|
|
|
|
|
placeholder="载具编码"
|
|
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
2025-07-10 10:11:36 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
组盘状态:
|
2025-06-23 18:18:19 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="query.status"
|
|
|
|
|
|
clearable
|
2025-07-10 10:11:36 +08:00
|
|
|
|
style="width: 150px"
|
2025-06-23 18:18:19 +08:00
|
|
|
|
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>
|
2025-07-10 10:11:36 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
<rrOperation />
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
2025-06-23 18:18:19 +08:00
|
|
|
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
|
|
|
|
|
<crudOperation :permission="permission" />
|
2025-07-10 10:11:36 +08:00
|
|
|
|
<!--新增表格-->
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
|
:before-close="crud.cancelCU"
|
|
|
|
|
|
:visible.sync="crud.status.cu > 0"
|
|
|
|
|
|
:title="crud.status.title"
|
|
|
|
|
|
width="1200px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item label="物料编码" prop="material_code" >
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<el-input v-model="form.material_code" @focus="getMaterial" style="width: 200px;" :disabled="crud.status.edit > 0" />
|
2025-07-10 10:11:36 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<el-form-item label="物料名称" prop="material_name">
|
|
|
|
|
|
<el-input disabled v-model="form.material_name" style="width: 200px;" />
|
2025-07-10 10:11:36 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<el-form-item label="规格" prop="material_spec">
|
2025-07-10 10:11:36 +08:00
|
|
|
|
<label slot="label">规 格</label>
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<el-input disabled v-model="form.material_spec" style="width: 200px;" />
|
2025-07-10 10:11:36 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="8">
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<el-form-item label="载具编码" prop="storagevehicle_code">
|
|
|
|
|
|
<label slot="label">载具编码</label>
|
|
|
|
|
|
<el-input v-model="form.storagevehicle_code" style="width: 200px;" />
|
2025-07-10 10:11:36 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<el-form-item label="物料批号" prop="pcsn">
|
|
|
|
|
|
<el-input v-model="form.pcsn" style="width: 200px;" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item label="物料数量" prop="qty">
|
|
|
|
|
|
<el-input-number v-model="form.qty" style="width: 200px;" />
|
2025-07-10 10:11:36 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="8">
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<el-form-item label="单位" prop="qty_unit_name">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="form.qty_unit_name"
|
|
|
|
|
|
style="width: 100px"
|
|
|
|
|
|
placeholder=""
|
|
|
|
|
|
@change="unitChange"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in tableEnum.md_pb_measureunit"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value+'@'+item.label"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item label="源单号" prop="ext_code">
|
|
|
|
|
|
<el-input v-model="form.ext_code" style="width: 200px;" />
|
2025-07-10 10:11:36 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<el-form-item label="源单类型" prop="ext_type">
|
|
|
|
|
|
<el-input v-model="form.ext_type" style="width: 200px;" />
|
2025-07-10 10:11:36 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
|
|
|
|
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
2025-06-23 18:18:19 +08:00
|
|
|
|
<!--表格渲染-->
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
ref="table"
|
|
|
|
|
|
v-loading="crud.loading"
|
|
|
|
|
|
:data="crud.data"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
|
@selection-change="crud.selectionChangeHandler"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column prop="storagevehicle_code" label="载具编码" :min-width="flexWidth('storagevehicle_code',crud.data,'载具编码')" />
|
|
|
|
|
|
<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="status" label="状态" :formatter="formattStatus" :min-width="flexWidth('status',crud.data,'状态')" />
|
|
|
|
|
|
<el-table-column prop="qty" label="组盘数量" :formatter="crud.formatNum3" :min-width="100" />
|
|
|
|
|
|
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
2026-06-30 20:00:58 +08:00
|
|
|
|
<el-table-column prop="load_port" label="用料位置" :min-width="flexWidth('load_port',crud.data,'用料位置')" />
|
2025-06-23 18:18:19 +08:00
|
|
|
|
<el-table-column prop="create_name" label="组盘人" :min-width="flexWidth('create_name',crud.data,'组盘人')" />
|
|
|
|
|
|
<el-table-column prop="create_time" label="组盘时间" :min-width="flexWidth('create_time',crud.data,'组盘时间')" />
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
v-permission="['admin','Supplierbase:edit','Supplierbase:del']"
|
|
|
|
|
|
label="操作"
|
|
|
|
|
|
width="150px"
|
|
|
|
|
|
lign="center"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<udOperation
|
|
|
|
|
|
:data="scope.row"
|
|
|
|
|
|
:is-visiable-edit="false"
|
|
|
|
|
|
:disabled-dle="scope.row.status === '02'"
|
|
|
|
|
|
:permission="permission"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
<!--分页组件-->
|
|
|
|
|
|
<pagination />
|
|
|
|
|
|
</div>
|
2025-07-10 19:49:53 +08:00
|
|
|
|
<!--放引用的组件-->
|
|
|
|
|
|
<MaterialDialog :dialog-show.sync="materialDialog" @materialChoose="materialChoose" />
|
2026-06-04 10:02:18 +08:00
|
|
|
|
<AddDialog @AddChanged="querytable" />
|
|
|
|
|
|
|
2025-06-23 18:18:19 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import crudGroup from '@/views/wms/basedata/group/group'
|
|
|
|
|
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
|
|
|
|
|
import crudOperation from '@crud/CRUD.operation'
|
|
|
|
|
|
import udOperation from '@crud/UD.operation'
|
|
|
|
|
|
import pagination from '@crud/Pagination'
|
|
|
|
|
|
import rrOperation from '@crud/RR.operation'
|
2025-07-10 19:49:53 +08:00
|
|
|
|
import MaterialDialog from '@/views/wms/basedata/material/MaterialDialog'
|
2026-06-04 10:02:18 +08:00
|
|
|
|
import AddDialog from '@/views/wms/basedata/group/AddDialog'
|
2025-06-23 18:18:19 +08:00
|
|
|
|
|
|
|
|
|
|
const defaultForm = {
|
|
|
|
|
|
group_id: null,
|
|
|
|
|
|
storagevehicle_code: null,
|
|
|
|
|
|
material_id: null,
|
2025-07-10 19:49:53 +08:00
|
|
|
|
material_name: null,
|
|
|
|
|
|
material_spec: null,
|
2025-06-23 18:18:19 +08:00
|
|
|
|
pcsn: null,
|
|
|
|
|
|
qty_unit_id: null,
|
|
|
|
|
|
qty_unit_name: null,
|
|
|
|
|
|
qty: null,
|
|
|
|
|
|
remark: null,
|
|
|
|
|
|
status: null,
|
|
|
|
|
|
create_id: null,
|
|
|
|
|
|
create_name: null,
|
|
|
|
|
|
create_time: null,
|
|
|
|
|
|
ext_code: null,
|
|
|
|
|
|
ext_type: null
|
|
|
|
|
|
}
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'Group',
|
2026-06-04 10:02:18 +08:00
|
|
|
|
components: { pagination, MaterialDialog, crudOperation, rrOperation, udOperation, AddDialog },
|
2025-06-23 18:18:19 +08:00
|
|
|
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
2025-07-10 19:49:53 +08:00
|
|
|
|
tableEnums: ['md_pb_measureunit#unit_name#measure_unit_id'],
|
2025-06-23 18:18:19 +08:00
|
|
|
|
// 数据字典
|
|
|
|
|
|
dicts: ['is_used', 'GROUP_STATUS'],
|
|
|
|
|
|
cruds() {
|
|
|
|
|
|
return CRUD({
|
|
|
|
|
|
title: '组盘记录',
|
|
|
|
|
|
url: 'api/group',
|
|
|
|
|
|
optShow: {
|
2025-07-10 10:11:36 +08:00
|
|
|
|
add: true,
|
2025-06-23 18:18:19 +08:00
|
|
|
|
reset: true
|
|
|
|
|
|
},
|
|
|
|
|
|
idField: 'group_id',
|
|
|
|
|
|
sort: 'group_id,desc',
|
|
|
|
|
|
crudMethod: { ...crudGroup }
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
permission: {},
|
2025-07-10 19:49:53 +08:00
|
|
|
|
materialDialog: false,
|
2025-06-23 18:18:19 +08:00
|
|
|
|
classes: [],
|
|
|
|
|
|
rules: {
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
|
|
|
|
|
[CRUD.HOOK.beforeRefresh]() {
|
|
|
|
|
|
return true
|
|
|
|
|
|
},
|
2026-06-04 10:02:18 +08:00
|
|
|
|
querytable() {
|
|
|
|
|
|
this.crud.toQuery()
|
|
|
|
|
|
},
|
2025-06-23 18:18:19 +08:00
|
|
|
|
formattStatus(row) {
|
|
|
|
|
|
return this.dict.label.GROUP_STATUS[row.status]
|
2025-07-10 19:49:53 +08:00
|
|
|
|
},
|
|
|
|
|
|
getMaterial() {
|
|
|
|
|
|
this.materialDialog = true
|
|
|
|
|
|
},
|
|
|
|
|
|
unitChange(row) {
|
|
|
|
|
|
const split = row.split('@')
|
|
|
|
|
|
this.form.qty_unit_id = split[0]
|
|
|
|
|
|
this.form.qty_unit_name = split[1]
|
|
|
|
|
|
},
|
|
|
|
|
|
materialChoose(row) {
|
|
|
|
|
|
this.form.material_name = row.material_name
|
|
|
|
|
|
this.form.material_id = row.material_id
|
|
|
|
|
|
this.form.material_code = row.material_code
|
|
|
|
|
|
this.form.material_spec = row.material_spec
|
2025-06-23 18:18:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|