add:出库功能
This commit is contained in:
29
wms_pro/qd/src/components/StatusEnum/StatusEnum.js
Normal file
29
wms_pro/qd/src/components/StatusEnum/StatusEnum.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import Vue from 'vue'
|
||||
import { get as getEnumDetail } from '@/views/system/dict/enumDetail'
|
||||
|
||||
export default class StatusEnum {
|
||||
constructor(statusEnum) {
|
||||
this.statusEnum = statusEnum
|
||||
}
|
||||
|
||||
async init(names, completeCallback) {
|
||||
if (names === undefined || name === null) {
|
||||
throw new Error('need StatusEnum names')
|
||||
}
|
||||
const ps = []
|
||||
names.forEach(n => {
|
||||
Vue.set(this.statusEnum.statusEnum, n, {})
|
||||
Vue.set(this.statusEnum.label, n, {})
|
||||
Vue.set(this.statusEnum, n, [])
|
||||
ps.push(getEnumDetail(n).then(data => {
|
||||
this.statusEnum[n].splice(0, 0, ...data)
|
||||
data.forEach(d => {
|
||||
Vue.set(this.statusEnum.statusEnum[n], d.value, d)
|
||||
Vue.set(this.statusEnum.label[n], d.value, d.label)
|
||||
})
|
||||
}))
|
||||
})
|
||||
await Promise.all(ps)
|
||||
completeCallback()
|
||||
}
|
||||
}
|
||||
29
wms_pro/qd/src/components/StatusEnum/index.js
Normal file
29
wms_pro/qd/src/components/StatusEnum/index.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import StatusEnum from './StatusEnum'
|
||||
|
||||
const install = function(Vue) {
|
||||
Vue.mixin({
|
||||
data() {
|
||||
if (this.$options.statusEnums instanceof Array) {
|
||||
const statusEnum = {
|
||||
statusEnum: {},
|
||||
label: {}
|
||||
}
|
||||
return {
|
||||
statusEnum
|
||||
}
|
||||
}
|
||||
return {}
|
||||
},
|
||||
created() {
|
||||
if (this.$options.statusEnums instanceof Array) {
|
||||
new StatusEnum(this.statusEnum).init(this.$options.statusEnums, () => {
|
||||
this.$nextTick(() => {
|
||||
this.$emit('dictReady')
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default { install }
|
||||
@@ -14,6 +14,8 @@ import 'mavon-editor/dist/css/index.css'
|
||||
|
||||
// 数据字典
|
||||
import dict from './components/Dict'
|
||||
// 数据字典
|
||||
import statusEnum from './components/StatusEnum'
|
||||
|
||||
import scroll from 'vue-seamless-scroll'
|
||||
// 权限指令
|
||||
@@ -54,6 +56,7 @@ Vue.use(VueHighlightJS)
|
||||
Vue.use(mavonEditor)
|
||||
Vue.use(permission)
|
||||
Vue.use(dict)
|
||||
Vue.use(statusEnum)
|
||||
Vue.use(VueBus)
|
||||
|
||||
// 全局设置控件样式https://codeantenna.com/a/0IN5FMJk5h
|
||||
|
||||
14
wms_pro/qd/src/views/system/dict/enumDetail.js
Normal file
14
wms_pro/qd/src/views/system/dict/enumDetail.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function get(code) {
|
||||
const params = {
|
||||
code
|
||||
}
|
||||
return request({
|
||||
url: 'api/dict/getStatusEnum',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export default { get }
|
||||
@@ -88,8 +88,8 @@
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="name" label="模型名称" width="150"/>
|
||||
<el-table-column prop="model_key" label="模型KEY" width="150"/>
|
||||
<el-table-column prop="description" label="模型描述" min-width="100"/>
|
||||
<el-table-column prop="model_comment" label="模型注释"/>
|
||||
<el-table-column prop="description" label="模型描述" min-width="150"/>
|
||||
<el-table-column prop="model_comment" label="模型注释" min-width="150"/>
|
||||
<el-table-column prop="status" label="发布状态">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
@@ -106,11 +106,11 @@
|
||||
<el-table-column prop="model_editor_json" label="模型数据" width="300"
|
||||
show-tooltip-when-overflow/>
|
||||
<el-table-column prop="thumbnail" label="模型封面"/>
|
||||
<el-table-column prop="model_type" label="模型类型" />
|
||||
<el-table-column prop="form_type" label="单据类型" min-width="120"/>
|
||||
<el-table-column prop="model_type" label="模型类型" min-width="120"/>
|
||||
<el-table-column prop="form_type" label="单据类型" min-width="150"/>
|
||||
<el-table-column prop="tenant_id" label="归属租户"/>
|
||||
<el-table-column prop="updated_id" label="修改者" min-width="150"/>
|
||||
<el-table-column prop="update_time" label="修改时间" width="135"/>
|
||||
<el-table-column prop="updated_id" label="修改者" min-width="120"/>
|
||||
<el-table-column prop="update_time" label="修改时间" width="120"/>
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
|
||||
@@ -74,16 +74,6 @@
|
||||
>
|
||||
单据组盘
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="insertdtl()"
|
||||
>
|
||||
新增一行
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
@@ -290,7 +280,7 @@ export default {
|
||||
let mst_form_data = mst.form_data;
|
||||
|
||||
this.cols.forEach(a=>{
|
||||
let item = null
|
||||
let item = ''
|
||||
if (a.value in mst_form_data) {
|
||||
item = mst_form_data[a.value];
|
||||
}
|
||||
@@ -308,7 +298,7 @@ export default {
|
||||
data.form_data = {}
|
||||
let row_form_data = row.form_data;
|
||||
this.dtlCols.forEach(a=>{
|
||||
let item = null
|
||||
let item = ''
|
||||
if (a.value in row_form_data) {
|
||||
item = row_form_data[a.value];
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IOBILL_TYPE"
|
||||
v-for="item in dict.IOBILL_TYPE_IN"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -168,7 +168,7 @@ export default {
|
||||
name: 'ViewDialog',
|
||||
components: { formstruc },
|
||||
mixins: [crud()],
|
||||
dicts: [ 'FORM_STATUS','IOBILL_TYPE' ],
|
||||
dicts: [ 'FORM_STATUS','IOBILL_TYPE_IN' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IOBILL_TYPE"
|
||||
v-for="item in dict.IOBILL_TYPE_IN"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -144,7 +144,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="bill_type" label="业务类型">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.IOBILL_TYPE[scope.row.bill_type] }}
|
||||
{{ dict.label.IOBILL_TYPE_IN[scope.row.bill_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
@@ -215,7 +215,7 @@ export default {
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: [ 'FORM_STATUS','IOBILL_TYPE' ],
|
||||
dicts: [ 'FORM_STATUS','IOBILL_TYPE_IN' ],
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
|
||||
364
wms_pro/qd/src/views/wms/stor_manage/out/AddDialog.vue
Normal file
364
wms_pro/qd/src/views/wms/stor_manage/out/AddDialog.vue
Normal file
@@ -0,0 +1,364 @@
|
||||
<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="1600px"
|
||||
@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="code">
|
||||
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="status">
|
||||
<el-select
|
||||
v-model="form.bill_type"
|
||||
clearable
|
||||
style="width: 100px; height: 35px;top: -5px;"
|
||||
placeholder="业务类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.IOBILL_TYPE_OUT"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-input v-model="form.status" disabled placeholder="生成" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源单类型" prop="source_form_type">
|
||||
<el-input v-model="form.source_form_type" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源单id" prop="source_form_id">
|
||||
<el-input v-model="form.source_form_id" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源单时间" prop="source_form_date">
|
||||
<el-input v-model="form.source_form_date" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{col.lable}}:</label>
|
||||
<el-input v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<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>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="insertForm()"
|
||||
>
|
||||
添加单据
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="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 prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="物料批次" width="160" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].pcsn" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="计划数量" width="160" align="center">
|
||||
<template scope="scope"><el-input-number v-model="tableData[scope.$index].plan_qty" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="tableData[scope.$index].unit_id"
|
||||
class="filter-item" placeholder="单位" size="small" style="width: 90px">
|
||||
<el-option
|
||||
v-for="item in unitDict"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="分配仓位" />
|
||||
<el-table-column show-overflow-tooltip prop="stor_code" label="仓库" width="190" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].stor_code" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单类型" width="190" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].source_form_type" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单id" width="190" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].source_form_id" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" width="160">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].form_data[item.value]" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].remark" rows="2" type="textarea"/>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click.native.prevent="deleteRow(scope.$index, tableData)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<MaterDialog
|
||||
:dialog-show.sync="materShow"
|
||||
:is-single="false"
|
||||
:mater-opt-code="materType"
|
||||
@setMaterValue="tableDtlMaterial"
|
||||
/>
|
||||
<FormDialog
|
||||
:dialog-show.sync="formShow"
|
||||
:is-single="false"
|
||||
@setMaterValue="tableDtlMaterial2"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import crudProductIn from '@/views/wms/stor_manage/in/storinvin'
|
||||
import MaterDialog from '@/views/wms/base_manage/material/MaterDialog'
|
||||
import FormDialog from '@/views/wms/pm_manage/form_data/FormDialog'
|
||||
import AddDtl from '@/views/wms/stor_manage/in/AddDtl'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import measureunit from '@/views/wms/base_manage/measure/measureunit'
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
code: '',
|
||||
bill_type: '',
|
||||
status: '',
|
||||
product_area: '',
|
||||
source_form_type: '',
|
||||
source_form_id: '',
|
||||
source_form_date: '',
|
||||
create_name: '',
|
||||
create_time: '',
|
||||
update_name: '',
|
||||
update_time: '',
|
||||
remark: '',
|
||||
form_data: {}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { formstruc, MaterDialog,measureunit, FormDialog, AddDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
statusEnums: [ 'FORM_STATUS', 'IOBILL_TYPE_OUT' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
dtlCols:[],
|
||||
tableData:[],
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
formShow: false,
|
||||
dtlShow: false,
|
||||
opendtlParam: null,
|
||||
materType: '03', // 关键成品
|
||||
storlist: [],
|
||||
billtypelist: [],
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.tableData = [],
|
||||
formstruc.getHeader('st_ivt_iostorinv_out').then(res => {
|
||||
this.cols = res
|
||||
res.forEach(a => {
|
||||
this.form.form_data[a.value,'']
|
||||
})
|
||||
})
|
||||
formstruc.getHeader('st_ivt_iostorinvdtl_out').then(res => {
|
||||
this.dtlCols = res
|
||||
}),
|
||||
measureunit.getSelect().then(res => {
|
||||
this.unitDict = res.content
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
|
||||
|
||||
insertEvent(row) {
|
||||
this.materShow = true
|
||||
},
|
||||
insertForm(row) {
|
||||
this.formShow = true
|
||||
},
|
||||
queryMater(index, row) {
|
||||
this.nowindex = index
|
||||
this.nowrow = row
|
||||
this.materShow = true
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
debugger
|
||||
// 提交前校验
|
||||
if (this.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return true
|
||||
}
|
||||
this.form.item = this.tableData
|
||||
},
|
||||
|
||||
deleteRow(index, rows) {
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
|
||||
tableDtlMaterial(rows) {
|
||||
rows.forEach((row) => {
|
||||
const data = {}
|
||||
data.material_name = row.material_name
|
||||
data.material_code = row.material_code
|
||||
data.material_id = row.material_id
|
||||
data.material_spec = row.material_spec
|
||||
data.source_form_type = ''
|
||||
data.source_form_id = ''
|
||||
data.unit_id = row.unit_id
|
||||
data.form_data = {}
|
||||
let row_form_data = row.form_data;
|
||||
this.dtlCols.forEach(a=>{
|
||||
let item = ''
|
||||
if (a.value in row_form_data) {
|
||||
item = row_form_data[a.value];
|
||||
}
|
||||
this.$set(data.form_data,a.value,item)
|
||||
})
|
||||
this.tableData.splice(-1, 0, data)
|
||||
})
|
||||
},
|
||||
tableDtlMaterial2(data) {
|
||||
let mst = data['t'];
|
||||
let rows = data['item'];
|
||||
this.form.source_form_type = mst.form_type
|
||||
this.form.source_form_id = mst.id
|
||||
let mst_form_data = mst.form_data;
|
||||
|
||||
this.cols.forEach(a=>{
|
||||
let item = ''
|
||||
if (a.value in mst_form_data) {
|
||||
item = mst_form_data[a.value];
|
||||
}
|
||||
this.$set(this.form.form_data,a.value,item)
|
||||
})
|
||||
rows.forEach((row) => {
|
||||
const data = {}
|
||||
data.material_name = row.material_name
|
||||
data.material_code = row.material_code
|
||||
data.material_id = row.material_id
|
||||
data.material_spec = row.material_spec
|
||||
data.source_form_type = row.form_type
|
||||
data.source_form_id = row.id
|
||||
data.unit_id = row.unit_id
|
||||
data.form_data = {}
|
||||
let row_form_data = row.form_data;
|
||||
this.dtlCols.forEach(a=>{
|
||||
let item = ''
|
||||
if (a.value in row_form_data) {
|
||||
item = row_form_data[a.value];
|
||||
}
|
||||
this.$set(data.form_data,a.value,item)
|
||||
})
|
||||
this.tableData.splice(-1, 0, data)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
317
wms_pro/qd/src/views/wms/stor_manage/out/GroupDickDialog.vue
Normal file
317
wms_pro/qd/src/views/wms/stor_manage/out/GroupDickDialog.vue
Normal file
@@ -0,0 +1,317 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@open="open"
|
||||
>
|
||||
<span slot="title" class="dialog-footer">
|
||||
<div class="crud-opts2">
|
||||
<span class="el-dialog__title2">入库组盘分配</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">入库明细项</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="dtl_table"
|
||||
:data="this.form"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
border
|
||||
highlight-current-row
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@row-click="clickRow"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="bill_status" label="状态" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.bill_status"
|
||||
class="filter-item"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IO_BILL_STATUS"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_code" label="源单号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_table" label="源单行号" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<!-- <el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">-->
|
||||
<!-- <el-form ref="form2" :inline="true" :model="form" :rules="rules" size="mini">-->
|
||||
<!-- <el-form-item label="载具号:" prop="vehicle_code">-->
|
||||
<!-- <el-input v-model="form.vehicle_code" style="width: 200px" size="mini" clearable placeholder="载具号">-->
|
||||
<!-- <el-button slot="append" @click="" >生成</el-button>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="箱号:" prop="pageBox_code">-->
|
||||
<!-- <el-input v-model="form.bucketunique" size="mini" style="width: 200px" disabled placeholder="箱号">-->
|
||||
<!-- <el-button slot="append" icon="el-icon-plus" @click="" />-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<!-- <el-form-item label="放入数量:" prop="storage_qty">-->
|
||||
<!-- <el-input-number-->
|
||||
<!-- v-model="form.storage_qty"-->
|
||||
<!-- style="width: 200px"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :controls="false"-->
|
||||
<!-- precision="3"-->
|
||||
<!-- :min="0"-->
|
||||
<!-- placeholder="数量"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<!-- <el-form-item label="入库点:" prop="point_code">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="form.point_code"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请选择"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- style="width: 200px;"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in pointlist"-->
|
||||
<!-- :key="item.point_code"-->
|
||||
<!-- :label="item.point_name"-->
|
||||
<!-- :value="item.point_code"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<!-- <el-form-item label="载具超限类型:" prop="vehicle_overstruct_type">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="form.vehicle_overstruct_type"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- placeholder="请选择"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- style="width: 200px;"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in dict.VEHICLE_OVER_TYPE"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-card>-->
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">载具物料明细</span>
|
||||
<div class="crud-opts-form">
|
||||
<el-form ref="form" :inline="true" :model="form" size="mini">
|
||||
<el-form-item label="库区:" prop="gender5">
|
||||
<el-cascader
|
||||
placeholder="请选择"
|
||||
:options="sects"
|
||||
v-model="defaultList"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="checked">
|
||||
<el-checkbox v-model="form.checked">自动分配货位</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="groupConfim((crud.selections[0]))"
|
||||
>
|
||||
组盘确认
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
>
|
||||
取消组盘
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="dis_table"
|
||||
:data="form.tableMater"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="bucketunique" label="箱号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column align="center" label="操作" width="170" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<!-- <StructDiv ref="child" :stor-id="storId" :dialog-show.sync="structShow" :sect-prop="sectProp" @tableChanged="tableChanged" />-->
|
||||
<!-- <AddBox ref="child" :dialog-show.sync="addBoxShow" :add-box-param="boxParam" @tableChanged2="tableChanged2" />-->
|
||||
<GroupVehicleDialog
|
||||
ref="groupVehicle"
|
||||
@setMaterValue="setTableDis"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import GroupVehicleDialog from '@/views/wms/md_manage/group_dick/GroupVehicleDialog'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
|
||||
// import StructDiv from '@/views/wms/storage_manage/product/productIn/StructDiv'
|
||||
import crudProductIn from '@/views/wms/stor_manage/in/storinvin'
|
||||
import crudPoint from '@/views/wms/stor_manage/in/storinvin'
|
||||
// import AddBox from '@/views/wms/storage_manage/product/productIn/AddBox'
|
||||
import crudSectattr from '@/api/wms/basedata/st/sectattr'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'GroupDialog',
|
||||
components: { formstruc, GroupVehicleDialog, crudProductIn },
|
||||
mixins: [crud()],
|
||||
dicts: ['IO_BILL_STATUS', 'VEHICLE_OVER_TYPE', 'PCS_SAL_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
storId: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
GroupShow: false,
|
||||
click_Row: {},
|
||||
stor_id: '1528627995269533696',
|
||||
sect_id: '1528631043496742912',
|
||||
sectProp: null,
|
||||
structShow: false,
|
||||
bucketObj: null,
|
||||
divBtn: false,
|
||||
bucketShow: false,
|
||||
addBoxShow: false,
|
||||
bucketuniqueObj: null,
|
||||
sects: [],
|
||||
defaultList: ['1528627995269533696', '1528631043496742912'],
|
||||
dis_row: null,
|
||||
form: [],
|
||||
storlist: [],
|
||||
pointlist: [],
|
||||
rules: {},
|
||||
boxParam: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
// formstruc.getHeader('STOR_IN').then(res => {
|
||||
// this.cols = res
|
||||
// })
|
||||
},
|
||||
setForm(row) {
|
||||
this.dialogVisible = true
|
||||
crudProductIn.getIosInvDtl(row.id).then(res => {
|
||||
this.form = res
|
||||
})
|
||||
},
|
||||
clickRow(row) {
|
||||
this.click_Row = row
|
||||
},
|
||||
groupConfim(){
|
||||
if (this.click_Row !== null) {
|
||||
this.$refs.groupVehicle.setForm(this.click_Row)
|
||||
}
|
||||
},
|
||||
setTableDis(row){
|
||||
console.log(row)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size: 20px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span {
|
||||
padding: 10px 0px 10px 0px;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-form {
|
||||
padding: 10px 0px 0px 20px;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
480
wms_pro/qd/src/views/wms/stor_manage/out/TaskDialog.vue
Normal file
480
wms_pro/qd/src/views/wms/stor_manage/out/TaskDialog.vue
Normal file
@@ -0,0 +1,480 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
|
||||
<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="code">
|
||||
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="status">
|
||||
<el-select disabled
|
||||
v-model="form.bill_type"
|
||||
style="width: 100px; height: 35px;top: -5px;"
|
||||
placeholder="业务类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.IOBILL_TYPE_OUT"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-input v-model="form.status" disabled placeholder="生成" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源单类型" prop="source_form_type">
|
||||
<el-input v-model="form.source_form_type" disabled style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源单id" prop="source_form_id">
|
||||
<el-input v-model="form.source_form_id" disabled style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源单时间" prop="source_form_date">
|
||||
<el-input v-model="form.source_form_date" disabled style="width: 150px" />
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{col.lable}}:</label>
|
||||
<el-input v-model="form.form_data[col.value]" :value="col.value" disabled style="width: 150px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" disabled style="width: 380px;" rows="2" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">出库明细</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left"/>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="divVehicle()"
|
||||
>
|
||||
自动分配物料
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="divVehicle()"
|
||||
>
|
||||
取消分配
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableData"
|
||||
style="width: 100%;"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
:highlight-current-row="true"
|
||||
@current-change="handleCurrentDtl"
|
||||
border
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="计划数量" />
|
||||
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="stor_code" label="仓库" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位" />
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="载具编码" width="160" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].vehicle_code" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单类型" />
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单id" />
|
||||
<el-table-column width="130" show-overflow-tooltip v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" >
|
||||
<template slot-scope="scope">{{scope.row.form_data[item.value]}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="备注" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudProductout from '@/views/wms/stor_manage/out/storinvout'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'TaskDialog',
|
||||
components: { },
|
||||
mixins: [crud()],
|
||||
dicts: ['IO_BILL_STATUS', 'VEHICLE_OVER_TYPE', 'PCS_SAL_TYPE'],
|
||||
statusEnums: [ 'IOBILL_TYPE_OUT' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
storId: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
cols: [],
|
||||
dtlCols: [],
|
||||
tableData: [],
|
||||
currentDtl: {},
|
||||
form: {
|
||||
id: '',
|
||||
code: '',
|
||||
bill_type: '',
|
||||
status: '',
|
||||
product_area: '',
|
||||
source_form_type: '',
|
||||
source_form_id: '',
|
||||
source_form_date: '',
|
||||
create_name: '',
|
||||
create_time: '',
|
||||
update_name: '',
|
||||
update_time: '',
|
||||
remark: '',
|
||||
form_data: {}
|
||||
},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
formstruc.getHeader('st_ivt_iostorinv_out').then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
formstruc.getHeader('st_ivt_iostorinvdtl_out').then(res => {
|
||||
this.dtlCols = res
|
||||
})
|
||||
},
|
||||
setForm(row) {
|
||||
this.dialogVisible = true
|
||||
this.form = row
|
||||
crudProductout.getIosInvDtl(row.id).then(res => {
|
||||
this.tableData = res
|
||||
})
|
||||
},
|
||||
handleCurrentDtl(row){
|
||||
this.currentDtl = row
|
||||
},
|
||||
divVehicle() {
|
||||
if (this.currentDtl === null) {
|
||||
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudProductout.
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
toDelete(data) {
|
||||
data.pop = true
|
||||
},
|
||||
close() {
|
||||
this.form.tableMater = []
|
||||
this.form.dtl_row = null
|
||||
this.form.bucketunique = null
|
||||
this.sectProp = null
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('AddChanged')
|
||||
this.crud.refresh()
|
||||
this.$refs['form2'].resetFields()
|
||||
},
|
||||
clcikRow(row, column, event) {
|
||||
this.form.dtl_row = row
|
||||
this.form.storage_qty = this.form.dtl_row.plan_qty
|
||||
crudProductout.getVehicleTask({ 'iostorinv_id': row.iostorinv_id, 'iostorinvdtl_id': row.iostorinvdtl_id }).then(res => {
|
||||
|
||||
if (res.length !== 0) {
|
||||
this.form.tableMater = res
|
||||
}
|
||||
})
|
||||
},
|
||||
clcikRowDis(row, column, event) {
|
||||
this.dis_row = row
|
||||
},
|
||||
vehicleCheck() {
|
||||
// 生成托盘
|
||||
crudProductout.vehicleCheck().then(res => {
|
||||
this.form.tableMater = []
|
||||
this.form.vehicle_code = res.vehicle_code
|
||||
this.crud.notify('生成成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
},
|
||||
changeQty(val) {
|
||||
if (parseFloat(this.form.dtl_row.plan_qty) < parseFloat(val)) {
|
||||
this.crud.notify('放入数量不能大于明细数量!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.$set(this.form, 'storage_qty', parseFloat(this.form.dtl_row.plan_qty))
|
||||
}
|
||||
},
|
||||
queryBox() {
|
||||
// 校验载具是否为空
|
||||
if (!this.form.vehicle_code) {
|
||||
this.crud.notify('请先填写载具号!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (!this.form.dtl_row) {
|
||||
this.crud.notify('请选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.boxParam = {
|
||||
'material_id': this.form.dtl_row.material_id,
|
||||
'pcsn': this.form.dtl_row.pcsn
|
||||
}
|
||||
this.addBoxShow = true
|
||||
},
|
||||
pushVehicle() {
|
||||
// 校验载具是否为空
|
||||
if (!this.form.vehicle_code) {
|
||||
this.crud.notify('载具号不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// 校验明细不能为空
|
||||
if (!this.form.dtl_row) {
|
||||
this.crud.notify('请选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// 有箱号
|
||||
if (this.form.bucketunique) {
|
||||
let fla = true
|
||||
this.form.tableMater.forEach(item => {
|
||||
if (item.bucketunique === this.bucketuniqueObj.bucketunique) {
|
||||
fla = false
|
||||
}
|
||||
})
|
||||
|
||||
if (fla) {
|
||||
this.bucketuniqueObj.iostorinvdtl_id = this.form.dtl_row.iostorinvdtl_id
|
||||
this.form.tableMater.splice(-1, 0, this.bucketuniqueObj)
|
||||
this.form.bucketunique = ''
|
||||
}
|
||||
} else {
|
||||
// 无箱号
|
||||
if (!this.form.storage_qty) {
|
||||
this.crud.notify('数量不能为0!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const item = {
|
||||
'storagevehicle_code': this.form.vehicle_code,
|
||||
'iostorinvdtl_id': this.form.dtl_row.iostorinvdtl_id,
|
||||
'material_id': this.form.dtl_row.material_id,
|
||||
'material_code': this.form.dtl_row.material_code,
|
||||
'material_spec': this.form.dtl_row.material_spec,
|
||||
'material_name': this.form.dtl_row.material_name,
|
||||
'qty': this.form.storage_qty
|
||||
}
|
||||
|
||||
let fla2 = true
|
||||
this.form.tableMater.forEach(res => {
|
||||
if (res.iostorinvdtl_id === item.iostorinvdtl_id && res.storagevehicle_code === item.storagevehicle_code) {
|
||||
fla2 = false
|
||||
}
|
||||
})
|
||||
|
||||
if (fla2) {
|
||||
this.form.tableMater.splice(-1, 0, item)
|
||||
}
|
||||
}
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
},
|
||||
insertvehicle() {
|
||||
if (!this.form.dtl_row) {
|
||||
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (!this.form.storagevehicle_code) {
|
||||
this.crud.notify('请输入托盘号', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// 判断是否选择了桶号
|
||||
if (this.bucketObj) {
|
||||
if (!(this.bucketObj.status === '01')) {
|
||||
this.crud.notify('请校验桶状态!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const dis_dtl = JSON.parse(JSON.stringify(this.bucketObj))
|
||||
// 判断选择的桶是否已经被选过
|
||||
const flag = this.form.tableMater.some(mater => mater.bucketunique === dis_dtl.bucketunique)
|
||||
if (!flag) {
|
||||
const flag = this.form.tableMater.some(mater => mater.storagevehicle_code !== this.form.storagevehicle_code)
|
||||
if (flag) {
|
||||
this.crud.notify('存在不同载具号', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
dis_dtl.storagevehicle_code = this.form.storagevehicle_code
|
||||
dis_dtl.pop = false
|
||||
this.form.tableMater.splice(this.form.tableMater.length, 0, dis_dtl)
|
||||
if (this.form.dtl_row.assign_qty) {
|
||||
this.form.dtl_row.assign_qty = parseFloat(this.form.dtl_row.assign_qty) + parseFloat(this.form.storage_qty)
|
||||
} else {
|
||||
this.form.dtl_row.assign_qty = parseFloat(this.form.storage_qty)
|
||||
}
|
||||
if (parseFloat(this.form.dtl_row.unassign_qty) - parseFloat(this.form.storage_qty) > 0) {
|
||||
this.form.dtl_row.unassign_qty = parseFloat(this.form.dtl_row.unassign_qty) - parseFloat(this.form.storage_qty)
|
||||
} else {
|
||||
this.form.dtl_row.unassign_qty = 0
|
||||
}
|
||||
this.openParam.splice(this.form.dtl_row.index, 1, this.form.dtl_row)
|
||||
}
|
||||
if (flag) {
|
||||
this.crud.notify('该桶已被加入明细中', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
} else {
|
||||
this.crud.notify('请选择桶号', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
},
|
||||
confirmvehicle() {
|
||||
if (!this.form.dtl_row) {
|
||||
this.crud.notify('请选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.form.tableMater.length === 0) {
|
||||
this.crud.notify('请先装入托盘!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
},
|
||||
cancelConfirmvehicle() {
|
||||
if (!this.dis_row) {
|
||||
this.crud.notify('请选择一条分配明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
|
||||
this.sectProp = val
|
||||
if (val.length === 1) {
|
||||
this.stor_id = val[0]
|
||||
this.sect_id = ''
|
||||
}
|
||||
if (val.length === 0) {
|
||||
this.sect_id = ''
|
||||
this.stor_id = ''
|
||||
}
|
||||
if (val.length === 2) {
|
||||
this.stor_id = val[0]
|
||||
this.sect_id = val[1]
|
||||
}
|
||||
},
|
||||
tableChanged(row) {
|
||||
this.form.sect_id = this.sect_id
|
||||
this.form.stor_id = this.stor_id
|
||||
this.dis_row.struct_id = row.struct_id
|
||||
this.divBtn = true
|
||||
},
|
||||
tableChanged2(row) {
|
||||
this.form.bucketunique = row.bucketunique
|
||||
row.storagevehicle_code = this.form.vehicle_code
|
||||
row.qty = row.storage_qty
|
||||
this.bucketuniqueObj = row
|
||||
},
|
||||
|
||||
undivVehicle() {
|
||||
if (this.dis_row === null) {
|
||||
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
|
||||
this.dis_row.vehicle_overstruct_type = this.form.vehicle_overstruct_type
|
||||
},
|
||||
divPoint() {
|
||||
if (!this.form.point_code) {
|
||||
this.crud.notify('请选择入库点', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.dis_row === null) {
|
||||
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.dis_row.point_code = this.form.point_code
|
||||
},
|
||||
formatBaseType(row) {
|
||||
return this.dict.label.PCS_SAL_TYPE[row.base_bill_type]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size: 20px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span {
|
||||
padding: 10px 0px 10px 0px;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-form {
|
||||
padding: 10px 0px 0px 20px;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
293
wms_pro/qd/src/views/wms/stor_manage/out/ViewDialog.vue
Normal file
293
wms_pro/qd/src/views/wms/stor_manage/out/ViewDialog.vue
Normal file
@@ -0,0 +1,293 @@
|
||||
<!--suppress ALL -->
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
title="出库详情"
|
||||
:visible.sync="dialogVisible"
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="单据号" prop="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model="form.code" disabled clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓 库">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
v-model="form.product_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
:disabled="true"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型">
|
||||
<el-select
|
||||
v-model="form.bill_type"
|
||||
style="width: 210px"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
:disabled="true"
|
||||
placeholder="业务类型"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IOBILL_TYPE_OUT"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select
|
||||
v-model="form.status"
|
||||
clearable
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.FORM_STATUS"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="源单类型" prop="source_form_type">
|
||||
<el-input v-model="form.source_form_type" disabled clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源单编号" prop="source_form_id">
|
||||
<el-input v-model="form.source_form_id" disabled clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源单日期" prop="source_form_date">
|
||||
<el-input v-model="form.source_form_date" disabled clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期" prop="bill_code">
|
||||
<el-input v-model="form.create_time" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{col.lable}}:</label>
|
||||
<el-input v-model="form.form_data[col.value]" :value="col.value" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span2">出库明细</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableDtl"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="handleDtlCurrentChange"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column prop="pcsn" label="批次" width="150" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="计划数量" align="center" />
|
||||
<el-table-column prop="qty" :formatter="crud.formatNum3" width="150" label="载具物料数量" align="center" />
|
||||
<el-table-column prop="unit_id" label="单位" align="center" />
|
||||
<el-table-column prop="vehicle_code" label="载具" align="center" />
|
||||
<el-table-column prop="stor_code" label="仓库编号" align="center" />
|
||||
<el-table-column prop="struct_code" label="分配仓位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单类型" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单号" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="150" v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" >
|
||||
<template slot-scope="scope">{{scope.row.form_data[item.value]}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">作业明细</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table2"
|
||||
:data="tabledis"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="handleDisCurrentChange"
|
||||
>
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column prop="pcsn" label="批次" align="center" width="150" />
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="托盘号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="bucketunique" label="箱号" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="point_code1" label="起始位置" align="center" width="120"/>
|
||||
<el-table-column prop="point_code2" label="目的位置" align="center" width="120"/>
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column prop="task_status" label="任务状态" align="center" :formatter="formatStatus"/>
|
||||
<el-table-column prop="source_form_type" label="源单类型" align="center" width="150"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单id" align="center" width="150"/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { crud } from '@crud/crud'
|
||||
import crudProductIn from '@/views/wms/stor_manage/out/storinvout'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog',
|
||||
components: { formstruc },
|
||||
mixins: [crud()],
|
||||
dicts: [ 'FORM_STATUS','IOBILL_TYPE_OUT' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
dtlCols:[],
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
billtypelist: [],
|
||||
storlist: [],
|
||||
currentdtl: null,
|
||||
currentDis: {},
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue) {
|
||||
this.form = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
formstruc.getHeader('st_ivt_iostorinv_out').then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
formstruc.getHeader('st_ivt_iostorinvdtl_out').then(res => {
|
||||
this.dtlCols = res
|
||||
})
|
||||
},
|
||||
setForm(row) {
|
||||
this.dialogVisible = true
|
||||
this.form = row
|
||||
this.queryTableDtl(row.id)
|
||||
},
|
||||
close() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
return this.dict.label.FORM_STATUS[row.bill_status]
|
||||
},
|
||||
|
||||
handleDtlCurrentChange(current) {
|
||||
if (current !== null) {
|
||||
this.tabledis = []
|
||||
this.currentdtl = current
|
||||
this.queryTableDdis()
|
||||
} else {
|
||||
this.tabledis = []
|
||||
this.currentdtl = {}
|
||||
}
|
||||
},
|
||||
invtypeFormat(row, column) {
|
||||
for (const item of this.billtypelist) {
|
||||
if (item.code === row.source_bill_type) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
handleDisCurrentChange(current) {
|
||||
this.currentDis = current
|
||||
},
|
||||
queryTableDtl(id) {
|
||||
crudProductIn.getIosInvDtl(id).then(res => {
|
||||
this.tableDtl = res
|
||||
})
|
||||
},
|
||||
queryTableDdis() {
|
||||
if (this.currentdtl !== null) {
|
||||
crudProductIn.getVehicleTask({ 'vehicle_code': this.currentdtl.vehicle_code }).then(res => {
|
||||
this.tabledis = res
|
||||
}).catch(() => {
|
||||
this.tabledis = []
|
||||
})
|
||||
}
|
||||
},
|
||||
formatStatus(row) {
|
||||
return this.dict.label.FORM_STATUS[row.task_status]
|
||||
},
|
||||
formatBaseType(row) {
|
||||
return this.dict.label.PCS_SAL_TYPE[row.base_bill_type]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size:20px;
|
||||
color:#303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span2 {
|
||||
padding: 0px 0px 20px 0px;
|
||||
}
|
||||
.crud-opts2 {
|
||||
padding: 10px 0px 0px 50px;
|
||||
}
|
||||
|
||||
</style>
|
||||
353
wms_pro/qd/src/views/wms/stor_manage/out/index.vue
Normal file
353
wms_pro/qd/src/views/wms/stor_manage/out/index.vue
Normal file
@@ -0,0 +1,353 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div >
|
||||
<!-- 搜索 -->
|
||||
<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.code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="单据号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型">
|
||||
<el-select
|
||||
v-model="query.bill_type"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="单据类型"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.IOBILL_TYPE_OUT"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.FORM_STATUS"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{col.lable}}:</label>
|
||||
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="dis_flag"
|
||||
@click="disOpen"
|
||||
>
|
||||
分配
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="task_flag"
|
||||
@click="taskOpen"
|
||||
>
|
||||
作业任务
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
:disabled="confirm_flag"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="confirm"
|
||||
>
|
||||
强制确认
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
size="mini"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="code" width="130" label="单据号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="bill_type" label="业务类型">
|
||||
<template slot-scope="scope">
|
||||
{{ statusEnum.label.IOBILL_TYPE_OUT[scope.row.bill_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
{{ statusEnum.label.FORM_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" min-width="120" label="源单类型" />
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单编码" min-width="155" />
|
||||
<el-table-column show-overflow-tooltip prop="source_form_date" label="源单时间" min-width="140" />
|
||||
<el-table-column v-for="(item, index) in cols" :key="item.value" :label="item.lable" >
|
||||
<template slot-scope="scope">{{scope.row.form_data[item.value]}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" align="center" prop="create_name" />
|
||||
<el-table-column label="创建时间" align="center" prop="create_time" width="150" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="canUd(scope.row)"
|
||||
:disabled-dle="canUd(scope.row)"
|
||||
/>
|
||||
</template>-->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog ref="itemview"/>
|
||||
<TaskDialog ref="taskDis"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import crudProductOut from '@/views/wms/stor_manage/out/storinvout'
|
||||
import CRUD, { crud, header,form, 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 AddDialog from '@/views/wms/stor_manage/out/AddDialog'
|
||||
import TaskDialog from '@/views/wms/stor_manage/out/TaskDialog'
|
||||
import ViewDialog from '@/views/wms/stor_manage/out/ViewDialog'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
code: '',
|
||||
bill_type: '',
|
||||
status: '',
|
||||
product_area: '',
|
||||
source_form_type: '',
|
||||
source_form_id: '',
|
||||
source_form_date: '',
|
||||
create_name: '',
|
||||
create_time: '',
|
||||
update_name: '',
|
||||
update_time: '',
|
||||
remark: '',
|
||||
form_data: {}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'ProductOut',
|
||||
components: { TaskDialog, AddDialog, ViewDialog, formstruc, crudProductOut, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '',
|
||||
optShow: { add: true, reset: true },
|
||||
idField: 'id',
|
||||
url: '/api/stIvtIostorinvOut',
|
||||
crudMethod: { ...crudProductOut },
|
||||
props: {
|
||||
size: 10
|
||||
}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
// 数据字典
|
||||
statusEnums: ['FORM_STATUS','IOBILL_TYPE_OUT','FLOW_STATUS'],
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {},
|
||||
dis_flag: true,
|
||||
task_flag: true,
|
||||
confirm_flag: true,
|
||||
disShow: false,
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
divShow: false,
|
||||
openParam: [],
|
||||
taskOpenParam: [],
|
||||
currentRow: null,
|
||||
storlist: [],
|
||||
storId: null,
|
||||
taskShow: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'user'
|
||||
])
|
||||
},
|
||||
mounted: function() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$set(this.query, 'form_query', {})
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
formstruc.getHeader('st_ivt_iostorinv_out').then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
},
|
||||
|
||||
toView(row) {
|
||||
if (row !== null) {
|
||||
this.$refs.itemview.setForm(row)
|
||||
}
|
||||
},
|
||||
|
||||
confirm() {
|
||||
if (!this.currentRow) {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudProductOut.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
|
||||
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
|
||||
disOpen(row) {
|
||||
if (this.currentRow !== null) {
|
||||
this.$refs.taskDis.setForm(this.currentRow)
|
||||
}
|
||||
},
|
||||
|
||||
taskOpen() {
|
||||
crudProductOut.getIosInvDtl({ 'bill_code': this.currentRow.bill_code }).then(res => {
|
||||
this.taskOpenParam = res
|
||||
})
|
||||
this.taskShow = true
|
||||
},
|
||||
fun(val) {
|
||||
return Number(val).toFixed(3)
|
||||
},
|
||||
canUd(row) {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
this.buttonChange(row)
|
||||
} else if (val.length === 1) {
|
||||
this.buttonChange(row)
|
||||
} else {
|
||||
this.handleCurrentChange(null)
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
buttonChange(currentRow) {
|
||||
if (currentRow !== null) {
|
||||
this.currentRow = currentRow
|
||||
if (currentRow.status === '10') {
|
||||
this.dis_flag = false
|
||||
} else {
|
||||
this.dis_flag = true
|
||||
}
|
||||
if (currentRow.bill_status === '30' || currentRow.bill_status === '20') {
|
||||
this.confirm_flag = false
|
||||
} else {
|
||||
this.confirm_flag = true
|
||||
}
|
||||
if (currentRow.status !== '99') {
|
||||
this.task_flag = false
|
||||
} else {
|
||||
this.task_flag = true
|
||||
}
|
||||
}
|
||||
},
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.dis_flag = true
|
||||
this.confirm_flag = true
|
||||
this.task_flag = true
|
||||
this.currentRow = {}
|
||||
}
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_outV_CP_out_TYPE[row.bill_type]
|
||||
},
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
47
wms_pro/qd/src/views/wms/stor_manage/out/storinvout.js
Normal file
47
wms_pro/qd/src/views/wms/stor_manage/out/storinvout.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinvOut',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinvOut/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinvOut/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getIosInvDtl(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinvOut/getIosInvDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function vehicleCheck() {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinvOut/vehicleCheck',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
del,
|
||||
getIosInvDtl,
|
||||
vehicleCheck
|
||||
}
|
||||
Reference in New Issue
Block a user