add;拼箱管理
This commit is contained in:
@@ -120,7 +120,7 @@
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.BOX_TYPE"
|
||||
v-for="item in dict.storagevehicle_type"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
@@ -172,7 +172,7 @@ import crudGroup from '@/views/wms/basedata/group/group'
|
||||
export default {
|
||||
name: 'WeighDialog',
|
||||
mixins: [crud()],
|
||||
dicts: ['BOX_TYPE', 'QUALITY_TYPE'],
|
||||
dicts: ['storagevehicle_type', 'QUALITY_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -139,26 +139,20 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有效日期" prop="quality_time">
|
||||
<el-date-picker v-model="form.quality_time" type="date" placeholder="选择日期" style="width: 200px" value-format="yyyy-MM-dd" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产日期" prop="produce_time">
|
||||
<el-date-picker v-model="form.produce_time" type="date" placeholder="选择日期" style="width: 200px" value-format="yyyy-MM-dd" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="烘干次数" prop="bake_num">
|
||||
<el-input-number v-model="form.bake_num" :precision="0" :controls="false" :min="0" :max="3" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="品质类型" prop="quality_type">
|
||||
<el-select
|
||||
@@ -187,7 +181,7 @@
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.BOX_TYPE"
|
||||
v-for="item in dict.storagevehicle_type"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
@@ -276,6 +270,7 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import { format, subDays } from 'date-fns'
|
||||
|
||||
const defaultForm = {
|
||||
group_id: null,
|
||||
@@ -305,7 +300,7 @@ export default {
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, AddDtl },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
// 数据字典
|
||||
dicts: ['is_used', 'GROUP_STATUS', 'BOX_TYPE', 'QUALITY_TYPE'],
|
||||
dicts: ['is_used', 'GROUP_STATUS', 'storagevehicle_type', 'QUALITY_TYPE'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '组盘记录',
|
||||
@@ -341,9 +336,6 @@ export default {
|
||||
supp_code: [
|
||||
{ required: true, message: '供应商不能为空', trigger: 'blur' }
|
||||
],
|
||||
quality_time: [
|
||||
{ required: true, message: '有效日期不能为空', trigger: 'blur' }
|
||||
],
|
||||
produce_time: [
|
||||
{ required: true, message: '生产日期不能为空', trigger: 'blur' }
|
||||
],
|
||||
@@ -385,7 +377,7 @@ export default {
|
||||
return this.dict.label.GROUP_STATUS[row.status]
|
||||
},
|
||||
formattBoxType(row) {
|
||||
return this.dict.label.BOX_TYPE[row.box_type]
|
||||
return this.dict.label.storagevehicle_type[row.box_type]
|
||||
},
|
||||
formattQuality(row) {
|
||||
return this.dict.label.QUALITY_TYPE[row.quality_type]
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
<el-card class="box-card" shadow="always">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-weight: bold;font-size: 15px;">库存信息:</span>
|
||||
<span style="font-weight: bold;font-size: 15px;">详细信息:</span>
|
||||
<!-- <el-button style="float: right; padding: 3px 10px;" type="text">操作按钮</el-button>-->
|
||||
</div>
|
||||
<el-form ref="form" disabled :inline="true" :model="groups" :rules="rules" size="mini" label-width="100px">
|
||||
@@ -59,30 +59,9 @@
|
||||
<el-form-item label="物料规格">
|
||||
<el-input v-model="groups.material_spec" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="泥料编码">
|
||||
<el-input v-model="groups.raw_material_code" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料批次">
|
||||
<el-input v-model="groups.pcsn" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料数量">
|
||||
<el-input v-model="groups.material_qty" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料重量">
|
||||
<el-input v-model="groups.material_weight" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备">
|
||||
<el-input v-model="groups.point_name" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库时间">
|
||||
<el-input v-model="groups.instorage_time" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="静置时间(分)">
|
||||
<el-input v-model="groups.standing_time" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="绑定状态">
|
||||
<el-input v-model="groups.group_bind_material_status_name" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
|
||||
@@ -283,25 +283,15 @@
|
||||
<el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'区域名称')" />
|
||||
<el-table-column prop="point_type_name" label="点位类型" :min-width="flexWidth('point_type_name',crud.data,'点位类型')"/>
|
||||
<el-table-column prop="point_status_name" label="点位状态" :min-width="flexWidth('point_status_name',crud.data,'点位类型')"/>
|
||||
<!-- <el-table-column prop="point_type" label="点位类型" :min-width="flexWidth('point_type',crud.data,'点位类型')" />-->
|
||||
<!-- <el-table-column prop="point_status" label="点位状态" :min-width="flexWidth('point_status',crud.data,'点位状态')" />-->
|
||||
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 30)">
|
||||
<el-table-column prop="storagevehicle_type" label="载具类型" :min-width="flexWidth('storagevehicle_type',crud.data,'载具类型', 30)">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||
{{ dict.label.storagevehicle_type[scope.row.storagevehicle_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
|
||||
<el-table-column prop="vehicle_qty" label="载具数量" :min-width="flexWidth('vehicle_qty',crud.data,'载具数量')" />
|
||||
<el-table-column label="是否锁定" :min-width="flexWidth('vehicle_qty',crud.data,'是否锁定')">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.ing_task_code?'是':'否'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'载具数量')" />
|
||||
<el-table-column prop="material_model" label="物料型号" :min-width="flexWidth('material_model',crud.data,'载具数量')" />
|
||||
<el-table-column prop="material_qty" label="物料数量" :min-width="flexWidth('material_qty',crud.data,'载具数量')" />
|
||||
<el-table-column prop="material_qty" label="物料重量" :min-width="flexWidth('material_qty',crud.data,'载具数量')" />
|
||||
<el-table-column prop="parent_point_code" label="父点位编码" :min-width="flexWidth('parent_point_code',crud.data,'父点位编码')"/>
|
||||
<el-table-column prop="ing_task_code" label="在执行的任务标识" :min-width="flexWidth('ing_task_code',crud.data,'在执行的任务标识')" />
|
||||
<el-table-column prop="is_has_workder" label="是否有工单" :min-width="flexWidth('is_has_workder',crud.data,'是否有工单')">
|
||||
@@ -395,7 +385,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Point',
|
||||
dicts: ['vehicle_type', 'TrueOrFalse'],
|
||||
dicts: ['storagevehicle_type', 'TrueOrFalse'],
|
||||
components: { PointDialog, ViewDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
|
||||
277
wms/nladmin-ui/src/views/wms/sch/pointtopoint/index.vue
Normal file
277
wms/nladmin-ui/src/views/wms/sch/pointtopoint/index.vue
Normal file
@@ -0,0 +1,277 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="载具编码">
|
||||
<el-input
|
||||
v-model="query.storagevehicle_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="载具编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<rrOperation />
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="800px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="载具编码" prop="storagevehicle_code">
|
||||
<el-input v-model="form.storagevehicle_code" style="width: 200px;" :disabled="crud.status.edit > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运送类型" prop="task_type">
|
||||
<el-select
|
||||
v-model="form.task_type"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.TASK_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起点点位" prop="point_code1">
|
||||
<el-select
|
||||
v-model="form.point_code1"
|
||||
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-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="终点点位" prop="point_code2">
|
||||
<el-select
|
||||
v-model="form.point_code2"
|
||||
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-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.task_type === '2'" label="物料编码" prop="material_code">
|
||||
<el-input v-model="form.material_code" style="width: 200px;" @change="queryMater" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.task_type === '2'" label="物料名称" prop="material_name">
|
||||
<el-input v-model="form.material_name" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.task_type === '2'" label="物料规格" prop="material_spec">
|
||||
<el-input v-model="form.material_spec" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.task_type === '2'" label="物料重量" prop="material_qty">
|
||||
<el-input-number v-model="form.material_qty" :precision="2" :controls="false" :min="0" style="width: 200px" />
|
||||
</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>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="task_code" label="任务编码" :min-width="flexWidth('task_code',crud.data,'任务编码')" />
|
||||
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.vehicle_code ? scope.row.vehicle_code : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="task_status" label="任务状态" :min-width="flexWidth('task_status',crud.data,'任务状态')">
|
||||
<template slot-scope="scope">
|
||||
{{ getStatusName(scope.row.task_status) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="config_code" label="配置编码" :min-width="flexWidth('config_code',crud.data,'配置编码')" />
|
||||
<el-table-column prop="task_name" label="配置名称" :min-width="flexWidth('task_name',crud.data,'任务名称')" />
|
||||
<el-table-column prop="point_code1" label="起点" :min-width="flexWidth('point_code1',crud.data,'起点')" />
|
||||
<el-table-column prop="point_code2" label="终点" :min-width="flexWidth('point_code2',crud.data,'终点')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column prop="material_qty" label="物料重量" :min-width="flexWidth('material_qty',crud.data,'物料重量')" />
|
||||
<el-table-column prop="task_type" label="运送类型" :min-width="flexWidth('task_type',crud.data,'运送类型')" :formatter="formattTaskType" />
|
||||
<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>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPointToPoint from '@/views/wms/sch/pointtopoint/pointtopoint'
|
||||
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'
|
||||
import crudSchBaseTask from '@/views/wms/sch/task/task'
|
||||
import crudPoint from '@/views/wms/sch/point/schBasePoint'
|
||||
import crudGroup from '@/views/wms/basedata/group/group'
|
||||
|
||||
const defaultForm = {
|
||||
storagevehicle_code: null,
|
||||
point_code1: null,
|
||||
point_code2: null,
|
||||
task_type: null,
|
||||
material_id: null,
|
||||
material_code: null,
|
||||
material_name: null,
|
||||
material_spec: null,
|
||||
material_qty: null
|
||||
}
|
||||
export default {
|
||||
name: 'PointToPoint',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
// 数据字典
|
||||
dicts: ['TASK_TYPE'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '点对点任务',
|
||||
url: 'api/pointToPoint',
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
},
|
||||
idField: 'task_id',
|
||||
sort: 'task_id,desc',
|
||||
crudMethod: { ...crudPointToPoint }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
taskStatusList: [],
|
||||
pointlist: [],
|
||||
rules: {
|
||||
point_code1: [
|
||||
{ required: true, message: '起点点位不能为空', trigger: 'blur' }
|
||||
],
|
||||
point_code2: [
|
||||
{ required: true, message: '终点点位不能为空', trigger: 'blur' }
|
||||
],
|
||||
task_type: [
|
||||
{ required: true, message: '运送类型不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTaskStatusList()
|
||||
crudPoint.getPointList({}).then(res => {
|
||||
this.pointlist = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
getTaskStatusList() {
|
||||
crudSchBaseTask.getTaskStatusList().then(res => {
|
||||
this.taskStatusList = res.content
|
||||
})
|
||||
},
|
||||
getStatusName(code) {
|
||||
const status = this.taskStatusList.find(item => item.code === code)
|
||||
return status ? status.name : '-'
|
||||
},
|
||||
formattTaskType(row) {
|
||||
return this.dict.label.TASK_TYPE[row.task_type]
|
||||
},
|
||||
queryMater(value) {
|
||||
crudGroup.queryMater({ 'material_code': value }).then(row => {
|
||||
this.form.material_spec = row.material_spec
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
}).catch(() => {
|
||||
this.form.material_spec = ''
|
||||
this.form.material_name = ''
|
||||
this.form.material_code = ''
|
||||
this.form.material_id = ''
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/pointToPoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/pointToPoint/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/pointToPoint',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
211
wms/nladmin-ui/src/views/wms/st/ivtlock/index.vue
Normal file
211
wms/nladmin-ui/src/views/wms/st/ivtlock/index.vue
Normal file
@@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="所属库区">
|
||||
<el-cascader
|
||||
placeholder="所属库区"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓位搜索">
|
||||
<el-input
|
||||
v-model="query.struct_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="仓位编码或名称"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料搜索">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="物料编码、名称或规格"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="批次号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="danger"
|
||||
icon="el-icon-close"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="ivtLock"
|
||||
>
|
||||
锁定库存
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="unIvtLock"
|
||||
>
|
||||
解锁库存
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="struct_code" label="仓位编码" :min-width="flexWidth('struct_code',crud.data,'仓位编码')" />
|
||||
<el-table-column prop="struct_name" label="仓位名称" :min-width="flexWidth('struct_name',crud.data,'仓位名称')" />
|
||||
<el-table-column prop="lock_type" label="库存状态" :min-width="flexWidth('lock_type',crud.data,'库存状态')" :formatter="formatLock" />
|
||||
<el-table-column prop="stor_name" label="仓库" :min-width="flexWidth('stor_name',crud.data,'仓库')" />
|
||||
<el-table-column prop="sect_name" label="库区" :min-width="flexWidth('sect_name',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="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料规格')" />
|
||||
<el-table-column prop="pcsn" label="批次号" :min-width="flexWidth('pcsn',crud.data,'批次号')" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具号" :min-width="flexWidth('storagevehicle_code',crud.data,'载具号')" />
|
||||
<el-table-column prop="canuse_qty" label="可用数" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="frozen_qty" label="冻结数" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="qty_unit_name" label="计量单位" :min-width="flexWidth('qty_unit_name',crud.data,'计量单位')" />
|
||||
<el-table-column prop="produce_time" label="生产日期" :min-width="flexWidth('produce_time',crud.data,'生产日期')" />
|
||||
<el-table-column prop="quality_time" label="有效日期" :min-width="flexWidth('quality_time',crud.data,'有效日期')" />
|
||||
<el-table-column prop="bake_num" label="烘干次数" :min-width="flexWidth('bake_num',crud.data,'烘干次数')" />
|
||||
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
||||
<el-table-column prop="insert_time" label="入库时间" :min-width="flexWidth('insert_time',crud.data,'入库时间')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudStructivt from '@/views/wms/statement/structivt/structivt'
|
||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudSectattr from '@/views/wms/basedata/sectattr/sectattr'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'IvtLock',
|
||||
components: { pagination, crudOperation, rrOperation },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '库存锁定', url: 'api/structivt', idField: 'stockrecord_id', sort: 'stockrecord_id,desc',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
showDtlLoading: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
},
|
||||
crudMethod: { ...crudStructivt }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sects: [],
|
||||
permission: {},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudSectattr.getSect({ 'stor_id': '' }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
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]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
formatLock(val) {
|
||||
if (val.lock_type === '7') {
|
||||
return '锁定'
|
||||
} else {
|
||||
return '正常'
|
||||
}
|
||||
},
|
||||
ivtLock() {
|
||||
const data = this.$refs.table.selection[0]
|
||||
crudStructivt.ivtLock(data).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
unIvtLock() {
|
||||
const data = this.$refs.table.selection[0]
|
||||
crudStructivt.unIvtLock(data).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
326
wms/nladmin-ui/src/views/wms/st/piecebox/AddDialog.vue
Normal file
326
wms/nladmin-ui/src/views/wms/st/piecebox/AddDialog.vue
Normal file
@@ -0,0 +1,326 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="crud.status.title"
|
||||
append-to-body
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
fullscreen
|
||||
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="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model.trim="form.bill_code" disabled placeholder="系统生成" clearable style="width: 200px" />
|
||||
</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: 200px"
|
||||
: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="material_code">
|
||||
<el-input v-model="form.material_code" :disabled="crud.status.view > 0" style="width: 200px;" @change="queryMater" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="material_name">
|
||||
<el-input v-model="form.material_name" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格" prop="material_spec">
|
||||
<el-input v-model="form.material_spec" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="明细数" prop="detail_count">
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model.trim="form.detail_count" size="mini" disabled style="width: 200px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="0"
|
||||
disabled
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="biz_date">
|
||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 200px" value-format="yyyy-MM-dd" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model.trim="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"
|
||||
v-if="crud.status.cu > 0"
|
||||
:disabled="form.stor_id === ''"
|
||||
@click="queryStruct()"
|
||||
>
|
||||
选择货位库存
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="form.tableData"
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column v-if="crud.status.view > 0" prop="bill_status" label="状态" align="center" :min-width="flexWidth('bill_status',crud.data,'状态')" :formatter="billStatusFormat" />
|
||||
<el-table-column prop="struct_code" label="仓位编码" align="center" :min-width="flexWidth('struct_code',crud.data,'仓位编码')" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具号" align="center" :min-width="flexWidth('storagevehicle_code',crud.data,'载具号')" />
|
||||
<el-table-column prop="material_code" label="物料编码" align="center" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" align="center" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column prop="pcsn" label="批次号" align="center" :min-width="flexWidth('pcsn',crud.data,'批次号')" />
|
||||
<el-table-column prop="qty" label="库存重量" align="center" :formatter="crud.formatNum3" :min-width="flexWidth('ivt_qty',crud.data,'库存重量')" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" :min-width="flexWidth('qty_unit_name',crud.data,'单位')" />
|
||||
<el-table-column v-if="crud.status.view > 0" prop="out_task_code" label="移出任务号" align="center" :min-width="flexWidth('out_task_code',crud.data,'移出任务号')" />
|
||||
<el-table-column v-if="crud.status.view > 0" prop="out_task_status" label="移出任务状态" align="center" :min-width="flexWidth('out_task_status',crud.data,'移出任务状态')">
|
||||
<template slot-scope="scope">
|
||||
{{ getStatusName(scope.row.out_task_status) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="crud.status.view > 0" prop="in_task_code" label="移入任务号" align="center" :min-width="flexWidth('in_task_code',crud.data,'移入任务号')" />
|
||||
<el-table-column v-if="crud.status.view > 0" prop="in_task_status" label="移入任务状态" align="center" :min-width="flexWidth('in_task_status',crud.data,'移入任务状态')">
|
||||
<template slot-scope="scope">
|
||||
{{ getStatusName(scope.row.in_task_status) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="crud.status.view > 0" prop="is_get" label="是否已取货" align="center" :min-width="flexWidth('is_get',crud.data,'是否已取货')" :formatter="isGetFormat" />
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="190" 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>
|
||||
<StructDiv ref="child" :stor-id="storId" :material-code="materialCode" :dialog-show.sync="structShow" @tableChanged="tableChanged" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPicecbox from '@/views/wms/st/piecebox/picecbox'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import crudStorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||
import StructDiv from '@/views/wms/st/piecebox/AddDtl'
|
||||
import crudGroup from '@/views/wms/basedata/group/group'
|
||||
import crudSchBaseTask from '@/views/wms/sch/task/task'
|
||||
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
bill_code: null,
|
||||
material_id: null,
|
||||
material_code: '',
|
||||
material_name: null,
|
||||
material_spec: null,
|
||||
biz_date: new Date(),
|
||||
stor_id: '',
|
||||
bill_status: '1',
|
||||
total_qty: '0',
|
||||
detail_count: '0',
|
||||
remark: '',
|
||||
tableData: []
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { crudOperation, StructDiv },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['PIECE_MST_STATUS', 'IS_OR_NOT'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
taskStatusList: [],
|
||||
storId: null,
|
||||
materialCode: null,
|
||||
structShow: false,
|
||||
mater_btn: true,
|
||||
storlist: [],
|
||||
rules: {
|
||||
stor_id: [
|
||||
{ required: true, message: '仓库不能为空', trigger: 'blur' }
|
||||
],
|
||||
material_code: [
|
||||
{ required: true, message: '物料编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
biz_date: [
|
||||
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
// 提交前校验
|
||||
if (this.form.tableData.length < 2) {
|
||||
this.crud.notify('请至少选择2条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
// 获取明细
|
||||
crudPicecbox.queryPieceDtl({ 'id': this.form.id }).then(res => {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
crudPicecbox.queryPieceDtl({ 'id': this.form.id }).then(res => {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
open() {
|
||||
// 查询原材料库的仓库
|
||||
crudStorattr.getStor({}).then(res => {
|
||||
this.storlist = res
|
||||
})
|
||||
this.getTaskStatusList()
|
||||
},
|
||||
getTaskStatusList() {
|
||||
crudSchBaseTask.getTaskStatusList().then(res => {
|
||||
this.taskStatusList = res.content
|
||||
})
|
||||
},
|
||||
getStatusName(code) {
|
||||
const status = this.taskStatusList.find(item => item.code === code)
|
||||
return status ? status.name : '-'
|
||||
},
|
||||
billStatusFormat(row) {
|
||||
return this.dict.label.PIECE_MST_STATUS[row.bill_status]
|
||||
},
|
||||
isGetFormat(row) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_get]
|
||||
},
|
||||
queryMater(value) {
|
||||
crudGroup.queryMater({ 'material_code': value }).then(row => {
|
||||
this.form.material_spec = row.material_spec
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
}).catch(() => {
|
||||
this.form.material_spec = ''
|
||||
this.form.material_name = ''
|
||||
this.form.material_code = ''
|
||||
this.form.material_id = ''
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
tableChanged(rows) {
|
||||
rows.forEach((item) => {
|
||||
if (this.form.tableData.length !== 0) {
|
||||
var flag = false
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
if (this.form.tableData[i].storagevehicle_code === item.storagevehicle_code && this.form.tableData[i].pcsn === item.pcsn) {
|
||||
flag = true
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
this.form.tableData.splice(-1, 0, item)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.qty)
|
||||
}
|
||||
} else {
|
||||
this.form.tableData.splice(-1, 0, item)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.qty)
|
||||
}
|
||||
})
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
queryStruct() {
|
||||
if (!this.form.stor_id) {
|
||||
this.crud.notify('请先选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (!this.form.material_code) {
|
||||
this.crud.notify('请先输入物料编码!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.structShow = true
|
||||
this.storId = this.form.stor_id
|
||||
this.materialCode = this.form.material_code
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
207
wms/nladmin-ui/src/views/wms/st/piecebox/AddDtl.vue
Normal file
207
wms/nladmin-ui/src/views/wms/st/piecebox/AddDtl.vue
Normal file
@@ -0,0 +1,207 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="库存选择"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="库区查询">
|
||||
<el-cascader
|
||||
disabled
|
||||
v-model="storId"
|
||||
placeholder="库区"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
disabled
|
||||
size="mini"
|
||||
placeholder="物料"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="货位编码">
|
||||
<el-input
|
||||
v-model="query.struct_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="货位号模糊查询"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="turnout_sect_name" label="库区名称" :min-width="flexWidth('turnout_sect_name',crud.data,'库区名称')" />
|
||||
<el-table-column prop="struct_code" label="仓位编码" :min-width="flexWidth('struct_code',crud.data,'仓位编码')" />
|
||||
<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="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>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudSectattr from '@/views/wms/basedata/sectattr/sectattr'
|
||||
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
components: { crudOperation, rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '库存物料',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
reset: true,
|
||||
download: false
|
||||
},
|
||||
url: 'api/combinedBox/getCanuseIvt',
|
||||
idField: 'struct_id',
|
||||
sort: 'storagevehicleext_id,desc'
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
dicts: ['d_lock_type'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
storId: {
|
||||
type: String
|
||||
},
|
||||
materialCode: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sects: [],
|
||||
dialogVisible: false,
|
||||
sect: {},
|
||||
mol_type: '',
|
||||
checkrow: {},
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.crud.resetQuery(false)
|
||||
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
if (this.sect) {
|
||||
this.query.sect = this.sect
|
||||
if (this.sect.length === 1) {
|
||||
this.query.stor_id = this.sect[0]
|
||||
this.query.sect_id = ''
|
||||
}
|
||||
if (this.sect.length === 0) {
|
||||
this.query.sect_id = ''
|
||||
this.query.stor_id = ''
|
||||
}
|
||||
if (this.sect.length === 2) {
|
||||
this.query.stor_id = this.sect[0]
|
||||
this.query.sect_id = this.sect[1]
|
||||
}
|
||||
}
|
||||
this.query.is_used = '1'
|
||||
this.query.is_delete = '0'
|
||||
this.query.stor_id = this.storId
|
||||
this.query.material_code = this.materialCode
|
||||
this.crud.toQuery()
|
||||
},
|
||||
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]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
/**
|
||||
* 接受父组件传值
|
||||
* @param msg
|
||||
*/
|
||||
getMsg(msg) {
|
||||
this.mol_type = msg
|
||||
},
|
||||
lockFormat(row, column) {
|
||||
return this.dict.label.d_lock_type[row.lock_type]
|
||||
},
|
||||
close() {
|
||||
this.sects = null
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
this.rows = this.$refs.table.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选仓位')
|
||||
return
|
||||
}
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
248
wms/nladmin-ui/src/views/wms/st/piecebox/ConfirmDialog.vue
Normal file
248
wms/nladmin-ui/src/views/wms/st/piecebox/ConfirmDialog.vue
Normal file
@@ -0,0 +1,248 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="取货确认"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="handleClose"
|
||||
width="1100px"
|
||||
fullscreen
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="22" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<span>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form2" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="formMst" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="单据号" prop="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model.trim="formMst.bill_code" disabled placeholder="系统生成" clearable style="width: 200px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="stor_id">
|
||||
<label slot="label">仓 库:</label>
|
||||
<el-select
|
||||
v-model="formMst.stor_id"
|
||||
disabled
|
||||
placeholder="仓库"
|
||||
class="filter-item"
|
||||
style="width: 200px"
|
||||
>
|
||||
<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="material_code">
|
||||
<el-input v-model="formMst.material_code" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="material_name">
|
||||
<el-input v-model="formMst.material_name" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格" prop="material_spec">
|
||||
<el-input v-model="formMst.material_spec" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="明细数" prop="detail_count">
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model.trim="formMst.detail_count" size="mini" disabled style="width: 200px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-input-number
|
||||
v-model="formMst.total_qty"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="0"
|
||||
disabled
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="biz_date">
|
||||
<el-date-picker v-model="formMst.biz_date" type="date" placeholder="选择日期" style="width: 200px" value-format="yyyy-MM-dd" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model.trim="formMst.remark" style="width: 380px;" rows="2" type="textarea" disabled />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="padding-top: 10px;padding-bottom: 10px">
|
||||
<span class="role-span">拼箱明细</span>
|
||||
<span />
|
||||
</div>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableData"
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="bill_status" label="状态" align="center" :min-width="flexWidth('bill_status',crud.data,'状态')" :formatter="billStatusFormat" />
|
||||
<el-table-column prop="struct_code" label="仓位编码" align="center" :min-width="flexWidth('struct_code',crud.data,'仓位编码')" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具号" align="center" :min-width="flexWidth('storagevehicle_code',crud.data,'载具号')" />
|
||||
<el-table-column prop="material_code" label="物料编码" align="center" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" align="center" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column prop="pcsn" label="批次号" align="center" :min-width="flexWidth('pcsn',crud.data,'批次号')" />
|
||||
<el-table-column prop="qty" label="库存重量" align="center" :formatter="crud.formatNum3" :min-width="flexWidth('ivt_qty',crud.data,'库存重量')" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" :min-width="flexWidth('qty_unit_name',crud.data,'单位')" />
|
||||
<el-table-column prop="out_task_code" label="移出任务号" align="center" :min-width="flexWidth('out_task_code',crud.data,'移出任务号')" />
|
||||
<el-table-column prop="out_task_status" label="移出任务状态" align="center" :min-width="flexWidth('out_task_status',crud.data,'移出任务状态')">
|
||||
<template slot-scope="scope">
|
||||
{{ getStatusName(scope.row.out_task_status) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="in_task_code" label="移入任务号" align="center" :min-width="flexWidth('in_task_code',crud.data,'移入任务号')" />
|
||||
<el-table-column prop="in_task_status" label="移入任务状态" align="center" :min-width="flexWidth('in_task_status',crud.data,'移入任务状态')">
|
||||
<template slot-scope="scope">
|
||||
{{ getStatusName(scope.row.in_task_status) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="is_get" label="是否已取货" align="center" :min-width="flexWidth('is_get',crud.data,'是否已取货')" :formatter="isGetFormat" />
|
||||
<el-table-column align="center" label="操作" width="190" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:loading="loadingGetConfirm"
|
||||
@click="getConfirm(scope.$index, scope.row)"
|
||||
>
|
||||
确认取货
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudPicecbox from '@/views/wms/st/piecebox/picecbox'
|
||||
import crudStorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||
import crudSchBaseTask from '@/views/wms/sch/task/task'
|
||||
|
||||
export default {
|
||||
name: 'ConfirmDialog',
|
||||
mixins: [crud()],
|
||||
dicts: ['PIECE_MST_STATUS', 'IS_OR_NOT'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
this.formMst = this.openParam
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
storlist: [],
|
||||
taskStatusList: [],
|
||||
formMst: {
|
||||
},
|
||||
current: null,
|
||||
loadingGetConfirm: false,
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$refs['form2'].resetFields()
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.crud.toQuery()
|
||||
},
|
||||
open() {
|
||||
this.getTaskStatusList()
|
||||
crudStorattr.getStor({}).then(res => {
|
||||
this.storlist = res
|
||||
})
|
||||
this.getDtl()
|
||||
},
|
||||
getDtl() {
|
||||
crudPicecbox.queryPieceDtl({ 'id': this.formMst.id }).then(res => {
|
||||
this.tableData = res
|
||||
})
|
||||
},
|
||||
getTaskStatusList() {
|
||||
crudSchBaseTask.getTaskStatusList().then(res => {
|
||||
this.taskStatusList = res.content
|
||||
})
|
||||
},
|
||||
getStatusName(code) {
|
||||
const status = this.taskStatusList.find(item => item.code === code)
|
||||
return status ? status.name : '-'
|
||||
},
|
||||
billStatusFormat(row) {
|
||||
return this.dict.label.PIECE_MST_STATUS[row.bill_status]
|
||||
},
|
||||
isGetFormat(row) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_get]
|
||||
},
|
||||
getConfirm(index, row) {
|
||||
if (row.bill_status !== '20') {
|
||||
this.crud.notify('只能对拼箱中明细状态进行操作!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.loadingGetConfirm = true
|
||||
crudPicecbox.getConfirm(row).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.getDtl()
|
||||
this.loadingGetConfirm = false
|
||||
}).catch(() => {
|
||||
this.loadingGetConfirm = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
padding: 4px 4px;
|
||||
}
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
209
wms/nladmin-ui/src/views/wms/st/piecebox/index.vue
Normal file
209
wms/nladmin-ui/src/views/wms/st/piecebox/index.vue
Normal file
@@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="单据编码">
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属仓库">
|
||||
<el-select
|
||||
v-model="query.stor_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
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"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<rrOperation />
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="pieceMove"
|
||||
>
|
||||
拼箱移出
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="getConfirm"
|
||||
>
|
||||
取货确认
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" width="150" label="单据号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="bill_status" label="单据状态" :min-width="flexWidth('bill_status',crud.data,'单据状态')" :formatter="billStatusFormat" />
|
||||
<el-table-column prop="stor_name" label="仓库" :min-width="flexWidth('stor_name',crud.data,'仓库')" />
|
||||
<el-table-column prop="biz_date" label="业务日期" :min-width="flexWidth('biz_date',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="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料规格')" />
|
||||
<el-table-column prop="total_qty" label="拼箱重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" :min-width="flexWidth('qty_unit_name',crud.data,'单位')" />
|
||||
<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','PieceBox:edit','PieceBox:del']"
|
||||
label="操作"
|
||||
width="150px"
|
||||
lign="center"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:disabled-dle="scope.row.bill_status !== '10'"
|
||||
:disabled-edit="scope.row.bill_status !== '10'"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog />
|
||||
<ConfirmDialog :dialog-show.sync="confirmDialog" :open-param="openParam" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPicecbox from '@/views/wms/st/piecebox/picecbox'
|
||||
import ConfirmDialog from '@/views/wms/st/piecebox/ConfirmDialog'
|
||||
import AddDialog from '@/views/wms/st/piecebox/AddDialog'
|
||||
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'
|
||||
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||
|
||||
export default {
|
||||
name: 'PieceBox',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, AddDialog, ConfirmDialog },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['PIECE_MST_STATUS'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '拼箱管理',
|
||||
url: 'api/pieceBox',
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
},
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
crudMethod: { ...crudPicecbox }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
openParam: null,
|
||||
confirmDialog: false,
|
||||
storList: [],
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudBsrealstorattr.getStor().then(res => {
|
||||
this.storList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
billStatusFormat(row) {
|
||||
return this.dict.label.PIECE_MST_STATUS[row.bill_status]
|
||||
},
|
||||
pieceMove() {
|
||||
const data = this.$refs.table.selection[0]
|
||||
if (data.bill_status !== '10') {
|
||||
this.crud.notify('只能对生成状态进行操作!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudPicecbox.pieceMove(data).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
getConfirm() {
|
||||
const data = this.$refs.table.selection[0]
|
||||
if (data.bill_status !== '20') {
|
||||
this.crud.notify('只能对拼箱中状态进行操作!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.openParam = data
|
||||
this.confirmDialog = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
51
wms/nladmin-ui/src/views/wms/st/piecebox/picecbox.js
Normal file
51
wms/nladmin-ui/src/views/wms/st/piecebox/picecbox.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/pieceBox',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/pieceBox/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/pieceBox',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryPieceDtl(data) {
|
||||
return request({
|
||||
url: 'api/pieceBox/queryPieceDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function pieceMove(data) {
|
||||
return request({
|
||||
url: 'api/pieceBox/pieceMove',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getConfirm(data) {
|
||||
return request({
|
||||
url: 'api/pieceBox/getConfirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, queryPieceDtl, pieceMove, getConfirm }
|
||||
@@ -76,6 +76,11 @@
|
||||
<el-input-number v-model="formMst.weigh_qty" :precision="2" :controls="false" :min="0" @change="changeQty" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="组盘载具:">
|
||||
<el-input v-model="formMst.new_vehicle" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
@@ -147,6 +152,7 @@ export default {
|
||||
weigh_qty: 0,
|
||||
iostorinvdtl_id: null,
|
||||
select_vehicle: null,
|
||||
new_vehicle: null,
|
||||
plan_qty: null
|
||||
},
|
||||
current: null,
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
<el-table-column prop="real_qty" label="出库重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="select_pcsn" label="拣选批次" :min-width="flexWidth('select_pcsn',crud.data,'拣选批次')" />
|
||||
<el-table-column prop="select_vehicle" label="拣选载具" :min-width="flexWidth('select_vehicle',crud.data,'拣选载具')" />
|
||||
<el-table-column prop="new_vehicle" label="组盘载具" :min-width="flexWidth('new_vehicle',crud.data,'组盘载具')" />
|
||||
<el-table-column prop="weigh_qty" label="称重重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="select_qty" label="拣选重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="source_bill_code" label="源单编码" :min-width="flexWidth('source_bill_code',crud.data,'源单编码')" />
|
||||
|
||||
@@ -70,4 +70,20 @@ export function statusChange(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getStruct, getStructById, getUnits, save, excelImport, statusChange }
|
||||
export function ivtLock(data) {
|
||||
return request({
|
||||
url: 'api/structivt/ivtLock',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function unIvtLock(data) {
|
||||
return request({
|
||||
url: 'api/structivt/unIvtLock',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getStruct, getStructById, getUnits, save, excelImport, statusChange, ivtLock, unIvtLock }
|
||||
|
||||
Reference in New Issue
Block a user