rev:组盘->流程实例关系
This commit is contained in:
@@ -110,7 +110,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = {
|
||||
measure_unit_id: null,
|
||||
unit_id: null,
|
||||
unit_code: null,
|
||||
unit_name: null,
|
||||
qty_precision: null,
|
||||
@@ -138,8 +138,8 @@ export default {
|
||||
add: true,
|
||||
reset: true
|
||||
},
|
||||
idField: 'measure_unit_id',
|
||||
sort: 'measure_unit_id,desc',
|
||||
idField: 'unit_id',
|
||||
sort: 'unit_id,desc',
|
||||
crudMethod: { ...crudMdPbMeasureunit }
|
||||
})
|
||||
},
|
||||
@@ -147,7 +147,7 @@ export default {
|
||||
return {
|
||||
permission: {},
|
||||
rules: {
|
||||
measure_unit_id: [
|
||||
unit_id: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
unit_code: [
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="表单对应JSON" prop="convert_json">
|
||||
<el-form-item label="数据映射字段" prop="convert_json">
|
||||
<el-input type="textarea" v-model="form.convert_json" style="width: 430px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -133,13 +133,18 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料单位" prop="pcsn">
|
||||
<el-input v-model="form.unit_id" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料批次映射" prop="pcsn">
|
||||
<el-input v-model="form.pcsn" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="自定义字段JSON" prop="form_param">
|
||||
<el-form-item label="自定义字段" prop="form_param">
|
||||
<el-input type="textarea" v-model="form.form_param" :formatter="jsonFormat" style="width: 430px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -163,7 +168,7 @@
|
||||
<el-table-column prop="form_type" show-overflow-tooltip width="150" label="表单类型"/>
|
||||
<el-table-column prop="form_name" show-overflow-tooltip width="120" label="表单名称"/>
|
||||
<el-table-column prop="form_desc" show-overflow-tooltip width="120" label="描述"/>
|
||||
<el-table-column prop="convert_json" show-overflow-tooltip width="120" label="表单对应JSON"/>
|
||||
<el-table-column prop="convert_json" show-overflow-tooltip width="120" label="数据映射字段"/>
|
||||
<el-table-column prop="has_child" show-overflow-tooltip width="120" :formatter="booleanFormat" label="是否关联子表"/>
|
||||
<!-- <el-table-column prop="parent_id" show-overflow-tooltip width="120" label="父表id"/>-->
|
||||
<el-table-column prop="bus_id" show-overflow-tooltip width="120" label="业务单据id映射"/>
|
||||
@@ -174,7 +179,8 @@
|
||||
<el-table-column prop="qty" show-overflow-tooltip width="120" label="物料数量映射"/>
|
||||
<el-table-column prop="pcsn" show-overflow-tooltip width="120" label="物料批次映射"/>
|
||||
<el-table-column prop="form_param" show-overflow-tooltip width="120" :formatter="jsonFormat" label="自定义字段映射"/>
|
||||
<el-table-column prop="create_time" show-overflow-tooltip width="150" label="创建时间"/>
|
||||
<el-table-column prop="update_time" show-overflow-tooltip width="150" label="更新时间"/>
|
||||
<el-table-column prop="update_name" show-overflow-tooltip width="150" label="更新人"/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="120px"
|
||||
@@ -202,8 +208,8 @@
|
||||
|
||||
<script>
|
||||
import formstruc from './formstruc'
|
||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||
import Treeselect, {LOAD_CHILDREN_OPTIONS} from '@riophae/vue-treeselect'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
@@ -233,15 +239,15 @@ const defaultForm = {
|
||||
export default {
|
||||
name: 'FormStruc',
|
||||
dicts: ['base_data'],
|
||||
components: {UploadDialog, pagination, crudOperation, rrOperation, udOperation, Treeselect},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
components: { UploadDialog, pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
||||
mixins: [ presenter(), header(), form(defaultForm), crud() ],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '基础类别',
|
||||
url: 'api/bmFormStruc',
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
crudMethod: {...formstruc},
|
||||
crudMethod: { ...formstruc },
|
||||
optShow: {
|
||||
add: true,
|
||||
reset: true
|
||||
|
||||
@@ -64,14 +64,14 @@
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="proc_inst_id" show-overflow-tooltip show-tooltip-when-overflow width="200" label="流程标识"/>
|
||||
<el-table-column prop="proc_inst_id" show-overflow-tooltip show-tooltip-when-overflow width="200" label="流程实例"/>
|
||||
<el-table-column prop="parent_id" width="200" label="父流程"/>
|
||||
<el-table-column v-if="false" prop="deployment_id" label="当前实例标识"/>
|
||||
<el-table-column v-if="false" prop="deployment_id" label="流程部署ID"/>
|
||||
<el-table-column prop="deployment_name" show-overflow-tooltip show-tooltip-when-overflow width="130"
|
||||
label="当前实例名称"/>
|
||||
<el-table-column v-if="false" prop="activity_id" label="当前实例节点"/>
|
||||
label="流程模型"/>
|
||||
<el-table-column v-if="false" prop="activity_id" label="当前节点ID"/>
|
||||
<el-table-column prop="activity_name" show-overflow-tooltip show-tooltip-when-overflow width="130"
|
||||
label="当前实例节点名称"/>
|
||||
label="当前节点"/>
|
||||
<el-table-column prop="is_active" label="启用">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@@ -86,21 +86,13 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="实例状态">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
v-for="(item, index) in statusList"
|
||||
:key="index"
|
||||
:value="item.value"
|
||||
v-if="scope.row.status == item.value"
|
||||
>
|
||||
{{ item.label }}
|
||||
</span>
|
||||
{{ dict.label.FLOW_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" show-overflow-tooltip show-tooltip-when-overflow label="备注"/>
|
||||
<el-table-column prop="form_id" show-overflow-tooltip show-tooltip-when-overflow width="130" label="业务主键"/>
|
||||
<el-table-column prop="form_type" show-overflow-tooltip show-tooltip-when-overflow width="130" label="业务类型"/>
|
||||
<el-table-column prop="form_data" show-overflow-tooltip show-tooltip-when-overflow width="130"
|
||||
show-overflow-tooltip show-tooltip-when-overflow label="业务数据"/>
|
||||
<el-table-column prop="form_data" show-overflow-tooltip show-tooltip-when-overflow width="130" label="业务数据" :formatter="jsonFormat"/>
|
||||
<el-table-column prop="create_id" label="创建人" width="135"/>
|
||||
<el-table-column prop="create_time" label="创建时间" width="135"/>
|
||||
<el-table-column prop="update_time" label="修改时间" width="135"/>
|
||||
@@ -154,7 +146,7 @@ const defaultForm = {
|
||||
form_data: null
|
||||
}
|
||||
export default {
|
||||
dicts: [],
|
||||
dicts: [ "FLOW_STATUS" ],
|
||||
name: 'Execution',
|
||||
components: {pagination, crudOperation, rrOperation, udOperation, ViewCurrentFlowDesigner},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
@@ -204,6 +196,12 @@ export default {
|
||||
this.form.form_data = JSON.stringify(this.form.form_data)
|
||||
return true
|
||||
},
|
||||
jsonFormat(row, index) {
|
||||
if (row.form_data != null) {
|
||||
return JSON.stringify(row.form_data)
|
||||
}
|
||||
return ''
|
||||
},
|
||||
viewClick(row) {
|
||||
curdExecution.getDeploymentById(row.deployment_id).then(res => {
|
||||
this.$refs.viewCurrentFlowDesigner.showLogicFlowDesigner(res.model_editor_json, row);
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
<el-form-item label="模型描述">
|
||||
<el-input v-model="form.description" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="模型KEY">
|
||||
<el-input v-model="form.model_key" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="模型注释">
|
||||
<el-input v-model="form.model_comment" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
fullscreen
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
width="1200px"
|
||||
width="1600px"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
@@ -22,47 +22,30 @@
|
||||
</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="parent_vehicle_code">
|
||||
<label slot="label">主载具编码:</label>
|
||||
<el-input v-model="form.parent_vehicle_code" clearable style="width: 210px" />
|
||||
<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="bill_status">
|
||||
<el-select
|
||||
v-model="form.bill_status"
|
||||
clearable
|
||||
style="width: 210px"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IO_BILL_STATUS"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<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="child_qty">
|
||||
<label slot="label">子托盘总数:</label>
|
||||
<el-input-number
|
||||
v-model="form.child_qty"
|
||||
:controls="false"
|
||||
:precision="0"
|
||||
:min="0"
|
||||
disabled
|
||||
style="width: 210px"
|
||||
/>
|
||||
<el-form-item label="父载具" prop="parent_vehicle_code">
|
||||
<el-input v-model="form.parent_vehicle_code" 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>
|
||||
<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: 210px" />
|
||||
<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" :disabled="crud.status.view > 0" />
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -114,47 +97,59 @@
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="载具编号" width="120" align="center">
|
||||
<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="has_child" label="是否含有子载具" width="120" align="center">
|
||||
<el-table-column show-overflow-tooltip prop="has_child" label="是否含有子载具" width="160" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].has_child" class="input-with-select" />
|
||||
<el-switch
|
||||
v-model="tableData[scope.$index].has_child"
|
||||
active-color="#F56C6C"
|
||||
inactive-color="#409EFF"
|
||||
active-value="1"
|
||||
inactive-valu="0"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="parent_vehicle_code" label="父载具编码" width="120" align="center">
|
||||
<el-table-column show-overflow-tooltip prop="parent_vehicle_code" label="父载具编码" width="160" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].parent_vehicle_code" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" width="120" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].material_name" disabled class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" width="120" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].material_spec" disabled class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="物料批次" width="120" align="center">
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" width="160" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" width="160" align="center" />
|
||||
<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="qty" label="数量" width="120" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].qty" class="input-with-select" /></template>
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="数量" width="160" align="center">
|
||||
<template scope="scope"><el-input-number v-model="tableData[scope.$index].qty" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" width="120" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].qty_unit_name" class="input-with-select" /></template>
|
||||
<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 v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" >
|
||||
<!-- <el-table-column v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" width="160">-->
|
||||
<!-- <template slot-scope="scope">{{scope.row.form_data[item.value]}}</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-table-column show-overflow-tooltip prop="remark" label="备注" width="120" align="center">
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单类型" width="160" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单id" width="210" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="备注" width="210" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].remark" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||
@@ -179,8 +174,7 @@
|
||||
<FormDialog
|
||||
:dialog-show.sync="formShow"
|
||||
:is-single="false"
|
||||
:mater-opt-code="materType"
|
||||
@setMaterValue="tableDtlMaterial"
|
||||
@setMaterValue="tableDtlMaterial2"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -190,6 +184,7 @@ import CRUD, { crud, form } from '@crud/crud'
|
||||
import MaterDialog from '@/views/wms/base_manage/material/MaterDialog'
|
||||
import FormDialog from '@/views/wms/pm_manage/form_data/FormDialog'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import measureunit from '@/views/wms/base_manage/measure/measureunit'
|
||||
|
||||
|
||||
const defaultForm = {
|
||||
@@ -206,9 +201,9 @@ const defaultForm = {
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { formstruc, MaterDialog, FormDialog },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_CP_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area', 'PCS_SAL_TYPE'],
|
||||
components: { formstruc, MaterDialog, FormDialog, measureunit },
|
||||
mixins: [ crud(), form(defaultForm) ],
|
||||
dicts: [ 'FORM_STATUS' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -220,17 +215,16 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
dtlCols:[],
|
||||
tableData:[],
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
formShow: false,
|
||||
dtlShow: false,
|
||||
opendtlParam: null,
|
||||
cols:[],
|
||||
dtlCols:[],
|
||||
tableData:[],
|
||||
unitDict: [],
|
||||
|
||||
materType: '03', // 关键成品
|
||||
storlist: [],
|
||||
billtypelist: [],
|
||||
rules: {
|
||||
|
||||
}
|
||||
@@ -245,16 +239,19 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
formstruc.getHeader('GROUP_MST').then(res => {
|
||||
this.tableData = []
|
||||
formstruc.getHeader('md_group_dick').then(res => {
|
||||
this.cols = res
|
||||
res.forEach(a => {
|
||||
this.form.form_data[a.value,'']
|
||||
})
|
||||
}),
|
||||
formstruc.getHeader('GROUP_DICK').then(res => {
|
||||
formstruc.getHeader('md_pb_vehicleivt').then(res => {
|
||||
this.dtlCols = res
|
||||
})
|
||||
|
||||
measureunit.getSelect().then(res => {
|
||||
this.unitDict = res.content
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
@@ -266,7 +263,8 @@ export default {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return true
|
||||
}
|
||||
this.form.tableData = this.tableData
|
||||
debugger
|
||||
this.form.item = this.tableData
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
rows.splice(index, 1)
|
||||
@@ -286,6 +284,29 @@ export default {
|
||||
})
|
||||
this.form.child_qty = this.tableData.length
|
||||
},
|
||||
tableDtlMaterial2(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 = 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 = null
|
||||
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)
|
||||
})
|
||||
this.form.child_qty = this.tableData.length
|
||||
},
|
||||
insertEvent(row) {
|
||||
this.materShow = true
|
||||
},
|
||||
@@ -304,8 +325,18 @@ export default {
|
||||
}
|
||||
this.tableData.push({ edit: false, qty: '0' })
|
||||
},
|
||||
formatBaseType(row) {
|
||||
return this.dict.label.PCS_SAL_TYPE[row.base_bill_type]
|
||||
|
||||
unitFormatter(row) {
|
||||
debugger
|
||||
if (row.unit_id!=null){
|
||||
for (let i = 0; i < this.unitDict.length; i++) {
|
||||
let item = this.unitDict[i];
|
||||
if (item.value == row.unit_id){
|
||||
return key.label
|
||||
}
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
177
wms_pro/qd/src/views/wms/md_manage/group_dick/ViewDialog.vue
Normal file
177
wms_pro/qd/src/views/wms/md_manage/group_dick/ViewDialog.vue
Normal file
@@ -0,0 +1,177 @@
|
||||
<!--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="code">
|
||||
<el-input v-model="form.code" disabled style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="父托盘" prop="parent_vehicle_code">
|
||||
<el-input v-model="form.parent_vehicle_code" disabled clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="bill_status">
|
||||
<el-select
|
||||
v-model="form.status"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
placeholder="单据状态"
|
||||
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 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>
|
||||
<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">
|
||||
<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-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'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="vehicle_code" label="托盘编号" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="parent_vehicle_code" label="父托盘编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_id" label="物料id" 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="qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="frozen_qty" :formatter="crud.formatNum3" label="冻结数" align="center" />
|
||||
<el-table-column prop="unit_id" 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 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="has_child" label="含子托盘" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="update_time" label="更新时间" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { crud } from '@crud/crud'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import crudVehicleMater from '@/views/wms/md_manage/vehicleMater/vehicleMater'
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog',
|
||||
components: { formstruc, crudVehicleMater },
|
||||
mixins: [ crud() ],
|
||||
dicts: [ 'FORM_STATUS' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols: [],
|
||||
dtlCols: [],
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
form: {},
|
||||
form_data: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue) {
|
||||
this.form = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
formstruc.getHeader('md_group_dick').then(res => {
|
||||
this.cols = res
|
||||
}),
|
||||
formstruc.getHeader('md_pb_vehicleivt').then(res => {
|
||||
this.dtlCols = res
|
||||
})
|
||||
},
|
||||
setForm(row) {
|
||||
this.dialogVisible = true
|
||||
this.form = row
|
||||
crudVehicleMater.getgroupDtl(this.form.id).then(res => {
|
||||
this.tableDtl = res.content
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -2,133 +2,26 @@
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="600px"
|
||||
>
|
||||
<el-form ref="form" :model="form" size="mini" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="表单类型" prop="class_code">
|
||||
<el-input v-model="form.form_type" style="width: 120px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="表单名称" prop="class_name">
|
||||
<el-input v-model="form.form_name" style="width: 120px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col >
|
||||
<el-form-item label="表单描述" prop="class_name">
|
||||
<el-input v-model="form.form_desc" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col >
|
||||
<el-form-item label="表单对应json" prop="class_name">
|
||||
<el-input v-model="form.convert_json" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col >
|
||||
<el-form-item label="是否含有子表" prop="class_name">
|
||||
<el-radio-group v-model="form.has_child" style="width: 140px">
|
||||
<el-radio label=true>是</el-radio>
|
||||
<el-radio label=false>否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-select
|
||||
v-model="form.parent_id"
|
||||
placeholder="父表类型"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in form_types"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="业务表id映射" prop="class_desc">
|
||||
<el-input v-model="form.bus_id" style="width: 120px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="业务表编码映射" prop="class_desc">
|
||||
<el-input v-model="form.bus_code" style="width: 120px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="业务表时间映射" prop="class_desc">
|
||||
<el-input v-model="form.bus_data" style="width: 120px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="业务表状态映射" prop="class_desc">
|
||||
<el-input v-model="form.bus_status" style="width: 120px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料id映射" prop="class_desc">
|
||||
<el-input v-model="form.material_id" style="width: 120px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料数量映射" prop="class_desc">
|
||||
<el-input v-model="form.qty" style="width: 120px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料批次映射" prop="class_desc">
|
||||
<el-input v-model="form.pcsn" style="width: 120px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="自定义字段JSON" prop="class_desc">
|
||||
<el-input type="textarea" v-model="form.form_param" :formatter="jsonFormat" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</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>
|
||||
<!--表格渲染-->
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">组盘表配置信息</span>
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<span>组盘配置信息</span>
|
||||
</div>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:load="load"
|
||||
lazy
|
||||
:load="getClassDatas"
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
:data="crud.data"
|
||||
row-key="id"
|
||||
@select="crud.selectChange"
|
||||
@select-all="crud.selectAllChange"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
row-key="form_type"
|
||||
table-layout="auto"
|
||||
>
|
||||
<el-table-column prop="form_type" label="表单类型" />
|
||||
<el-table-column prop="form_type" label="表单类型" width="180" />
|
||||
<el-table-column prop="form_name" label="表单名称" />
|
||||
<el-table-column prop="form_desc" label="描述" />
|
||||
<el-table-column prop="convert_json" label="表单对应json" />
|
||||
<el-table-column prop="convert_json" label="数据映射字段" />
|
||||
<el-table-column prop="create_time" label="创建时间" />
|
||||
<el-table-column prop="has_child" :formatter="booleanFormat" label="是否关联子表" />
|
||||
<el-table-column prop="parent_id" label="父表id" />
|
||||
@@ -139,72 +32,47 @@
|
||||
<el-table-column prop="material_id" label="物料id映射" />
|
||||
<el-table-column prop="qty" label="物料数量映射" />
|
||||
<el-table-column prop="pcsn" label="物料批次映射" />
|
||||
<el-table-column prop="form_param" :show-overflow-tooltip="true" :formatter="jsonFormat" label="自定义字段映射" />
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="操作"-->
|
||||
<!-- width="250px"-->
|
||||
<!-- align="center"-->
|
||||
<!-- >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <udOperation-->
|
||||
<!-- style="display: inline"-->
|
||||
<!-- :data="scope.row"-->
|
||||
<!-- :permission="permission"-->
|
||||
<!-- :disabled-edit="scope.row.is_modify === '0'"-->
|
||||
<!-- :disabled-dle="scope.row.is_modify === '0'"-->
|
||||
<!-- msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"-->
|
||||
<!-- />-->
|
||||
<!-- <el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus-outline" @click="crud.toAddAndData(addSibling(scope.row))">新增同级</el-button>-->
|
||||
<!-- <el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus" @click="crud.toAddAndData(addChildren(scope.row))">新增子级</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="form_param" show-overflow-tooltip :formatter="jsonFormat" label="自定义字段映射" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = {
|
||||
form_type: null,
|
||||
form_name: null,
|
||||
form_desc: null,
|
||||
convert_json: null,
|
||||
create_time: null,
|
||||
create_id: null,
|
||||
has_child: null,
|
||||
parent_id: null,
|
||||
bus_id: null,
|
||||
bus_code: null,
|
||||
bus_date: null,
|
||||
bus_status: null,
|
||||
status: null,
|
||||
material_id: null,
|
||||
qty: null,
|
||||
pcsn: null,
|
||||
form_param: null,
|
||||
has_child: false,
|
||||
parent_id: null
|
||||
}
|
||||
export default {
|
||||
name: 'FormStruc',
|
||||
dicts: ['base_data'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
components: {},
|
||||
mixins: [ presenter(), header(), form(defaultForm), crud() ],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '基础类别',
|
||||
url: 'api/bmFormStruc',
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
query: {'search':'组盘'},
|
||||
query: { search: '组盘' },
|
||||
crudMethod: { ...formstruc },
|
||||
optShow: {
|
||||
add: true,
|
||||
@@ -217,18 +85,38 @@ export default {
|
||||
classes: [],
|
||||
uploadShow: false,
|
||||
form_types: [],
|
||||
permission: {}
|
||||
permission: {},
|
||||
rules: {
|
||||
form_type: [
|
||||
{required: true, message: '表单类型不能为空', trigger: 'blur'}
|
||||
],
|
||||
form_name: [
|
||||
{required: true, message: '表单名称不能为空', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getFormSelect() // 获取分类
|
||||
// this.getFormSelect() // 获取分类
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.getFormSelect()
|
||||
},
|
||||
[CRUD.HOOK.beforeToEdit]() {
|
||||
this.form.form_param = JSON.stringify(this.form.form_param)
|
||||
return true
|
||||
},
|
||||
getFormSelect() {
|
||||
formstruc.getTypes().then((res) => { // 获取分类名称,查询根据分类编码查找对应分支树
|
||||
this.form_types = res
|
||||
})
|
||||
},
|
||||
load(tree, treeNode, resolve) {
|
||||
setTimeout(() => {
|
||||
resolve(tree.children)
|
||||
}, 100)
|
||||
},
|
||||
booleanFormat(row, index) {
|
||||
if (row.has_child) {
|
||||
return '是'
|
||||
|
||||
@@ -11,12 +11,8 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="query.sale_code" clearable placeholder="订单号" style="width: 200px;"
|
||||
class="filter-item"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘号">
|
||||
<el-input v-model="query.storagevehicle_code" clearable placeholder="托盘号" style="width: 200px;"
|
||||
<el-input v-model="query.vehicle_code" clearable placeholder="托盘号" style="width: 200px;"
|
||||
class="filter-item"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="组盘日期">
|
||||
@@ -38,7 +34,7 @@
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.BOX_STATUS"
|
||||
v-for="item in dict.FORM_STATUS"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -68,12 +64,38 @@
|
||||
导入
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<el-dialog width ="380px" :close-on-click-modal="false" :visible.sync="statusEdit" title="编辑托盘状态">
|
||||
<el-form
|
||||
ref="form"
|
||||
:inline="true"
|
||||
:model="editForm"
|
||||
label-width="100px"
|
||||
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
|
||||
>
|
||||
<el-form-item label="组盘编码" prop="code">
|
||||
<el-input v-model="editForm.code" disabled style="width: 160px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="editForm.status" placeholder="" style="width: 120px">
|
||||
<el-option
|
||||
v-for="item in dict.FORM_STATUS"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitStatus">确认</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 type="selection" width="55"/>
|
||||
<el-table-column prop="code" label="组盘编号">
|
||||
<el-table-column prop="code" label="组盘编号" width="160px">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="vechile(scope.row)">{{ scope.row.code }}</el-link>
|
||||
</template>
|
||||
@@ -83,7 +105,7 @@
|
||||
<el-table-column prop="source_form_id" label="源单id" show-overflow-tooltip/>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.BOX_STATUS[scope.row.status] }}
|
||||
{{ dict.label.FORM_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="组盘时间"/>
|
||||
@@ -98,7 +120,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
<pagination></pagination>
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog ref="viewRef" :form="form" />
|
||||
@@ -107,16 +129,13 @@
|
||||
|
||||
<script>
|
||||
import crudbucketrecord from '@/views/wms/md_manage/group_dick/groupdick'
|
||||
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
||||
import CRUD, { presenter, header, form, crud } 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/md_manage/group_dick/AddDialog'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import ViewDialog from '@/views/wms/md_manage/group_dick/viewDialog'
|
||||
|
||||
import ViewDialog from '@/views/wms/md_manage/group_dick/ViewDialog'
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
@@ -127,16 +146,17 @@ const defaultForm = {
|
||||
update_time: '',
|
||||
status: '',
|
||||
tableData: [],
|
||||
form_data: {}
|
||||
form_data: null
|
||||
}
|
||||
export default {
|
||||
name: 'DeliveryOrder',
|
||||
dicts: ['PCS_DELIVER_TYPE', 'BOX_STATUS'],
|
||||
components: {ViewDialog, AddDialog, formstruc,pagination, crudOperation, rrOperation, udOperation},
|
||||
dicts: ['PCS_DELIVER_TYPE', 'FORM_STATUS'],
|
||||
components: { ViewDialog, AddDialog, crudbucketrecord, formstruc, pagination, crudOperation, rrOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '组盘表', url: '/api/mdGruopDick', idField: 'id', sort: 'code,desc',
|
||||
crudMethod: { ...crudbucketrecord },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
@@ -144,17 +164,19 @@ export default {
|
||||
reset: true,
|
||||
download: false
|
||||
},
|
||||
crudMethod: {...crudbucketrecord}
|
||||
query: {
|
||||
form_data: {}
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
cols: [],
|
||||
GroupShow: false,
|
||||
viewShow: false,
|
||||
statusEdit:false,
|
||||
vachileView:false,
|
||||
editForm:{},
|
||||
editForm: {},
|
||||
classes3: [],
|
||||
uploadShow: false,
|
||||
dialogShow: false,
|
||||
@@ -171,7 +193,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
formstruc.getHeader('md_gruop_dick').then(res => {
|
||||
formstruc.getHeader('md_group_dick').then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
},
|
||||
@@ -180,7 +202,19 @@ export default {
|
||||
},
|
||||
vechile(row){
|
||||
this.$refs.viewRef.setForm(row)
|
||||
}
|
||||
},
|
||||
editStatus(row){
|
||||
this.editForm = row,
|
||||
this.statusEdit = true
|
||||
},
|
||||
submitStatus(){
|
||||
crudbucketrecord.updategroup(this.editForm).then(res => {
|
||||
this.editForm = {}
|
||||
this.crud.notify('编辑成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.statusEdit = false
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,224 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="crud.status.title"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="dialogVisible"
|
||||
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="parent_vehicle_code">
|
||||
<label slot="label">主载具编码:</label>
|
||||
<el-input v-model="form.parent_vehicle_code" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="bill_status">
|
||||
<el-select
|
||||
v-model="form.bill_status"
|
||||
clearable
|
||||
style="width: 210px"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IO_BILL_STATUS"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="子托盘总数" prop="child_qty">
|
||||
<label slot="label">子托盘总数:</label>
|
||||
<el-input-number
|
||||
v-model="form.child_qty"
|
||||
:controls="false"
|
||||
:precision="0"
|
||||
:min="0"
|
||||
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" clearable style="width: 210px" />
|
||||
</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" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<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="vehicle_code" label="载具编号" width="120" 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="has_child" label="是否含有子载具" width="120" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].has_child" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="parent_vehicle_code" label="父载具编码" width="120" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].parent_vehicle_code" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" width="120" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].material_name" disabled class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" width="120" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].material_spec" disabled class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="物料批次" width="120" 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="qty" label="数量" width="120" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].qty" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" width="120" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].qty_unit_name" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" >
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].form_data[item.value]" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="备注" width="120" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].remark" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import vehicleMater from '@/views/wms/md_manage/vehicleMater/vehicleMater'
|
||||
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
parent_vehicle_code: '',
|
||||
child_qty: '0',
|
||||
remark: '',
|
||||
update_name: '',
|
||||
update_time: '',
|
||||
status: '',
|
||||
tableData: [],
|
||||
form_data: {}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'viewDialog',
|
||||
components: { formstruc, vehicleMater },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_CP_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area', 'PCS_SAL_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
dtlCols:[],
|
||||
tableData:[],
|
||||
dialogVisible: false,
|
||||
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setForm(row){
|
||||
this.form=row
|
||||
this.dialogVisible = true
|
||||
vehicleMater.
|
||||
},
|
||||
open() {
|
||||
formstruc.getHeader('md_gruop_dick').then(res => {
|
||||
this.cols = res
|
||||
res.forEach(a => {
|
||||
this.form.form_data[a.value,'']
|
||||
})
|
||||
}),
|
||||
formstruc.getHeader('md_pb_vehicleivt').then(res => {
|
||||
this.dtlCols = res
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
formatBaseType(row) {
|
||||
return this.dict.label.PCS_SAL_TYPE[row.base_bill_type]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -1,16 +1,24 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/mdGruopDick',
|
||||
url: '/api/MdPbVehicleMater',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getgroupDtl(code) {
|
||||
return request({
|
||||
url: 'api/mdGruopDick/getVehicleMater/' + code,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/mdGruopDick/',
|
||||
url: '/api/MdPbVehicleMater/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
@@ -18,65 +26,10 @@ export function del(ids) {
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/mdGruopDick',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updategroup(data) {
|
||||
return request({
|
||||
url: '/api/mdGruopDick/updategroup',
|
||||
url: '/api/MdPbVehicleMater',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function addPersons(data) {
|
||||
return request({
|
||||
url: '/api/mdGruopDick/addPersons',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getHeader(data) {
|
||||
return request({
|
||||
url: '/api/mdGruopDick/getHeader',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDeviceIdByUserId(data) {
|
||||
return request({
|
||||
url: '/api/mdGruopDick/getDeviceIdByUserId',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function addDevices(data) {
|
||||
return request({
|
||||
url: '/api/mdGruopDick/addDevices',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteRow(data) {
|
||||
return request({
|
||||
url: '/api/mdGruopDick/deleteRow',
|
||||
method: 'delete',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function excelImport(data) {
|
||||
return request({
|
||||
url: '/api/mdGruopDick/excelImport',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, addPersons, getHeader, deleteRow, addDevices,excelImport,updategroup }
|
||||
export default { add, getgroupDtl, edit, del }
|
||||
|
||||
@@ -48,8 +48,6 @@
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
lazy
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
:data="crud.data"
|
||||
row-key="id"
|
||||
@select="crud.selectChange"
|
||||
@@ -57,7 +55,7 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="code" label="单据编码" show-overflow-tooltip width="120">
|
||||
<el-table-column prop="code" label="单据编码" show-overflow-tooltip width="210px">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.code }}</el-link>
|
||||
</template>
|
||||
@@ -77,7 +75,6 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间"/>
|
||||
<el-table-column
|
||||
v-permission="['admin','Classstandard:edit','Classstandard:del']"
|
||||
label="操作"
|
||||
width="120px"
|
||||
align="center"
|
||||
@@ -87,7 +84,6 @@
|
||||
<udOperation
|
||||
style="display: inline"
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="scope.row.is_modify === '0'"
|
||||
:disabled-dle="scope.row.is_modify === '0'"
|
||||
msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"
|
||||
@@ -101,16 +97,45 @@
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
<el-dialog
|
||||
title="单据明细"
|
||||
append-to-body
|
||||
:visible.sync="dtlVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
:data="childrenList">
|
||||
<el-table-column prop="code" label="单据编码" show-overflow-tooltip width="210px" />
|
||||
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="biz_code" label="业务单据编码" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="biz_date" label="业务单据时间" show-overflow-tooltip width="130"/>
|
||||
<el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip/>
|
||||
<el-table-column prop="vehicle_code" label="载具编号" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120"/>
|
||||
<el-table-column width="130" show-overflow-tooltip 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 prop="create_time" label="创建时间"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dtlVisible = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudMaterialbase from '@/views/wms/base_manage/material/material'
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudClassstandard from '@/views/wms/base_manage/class_standard/classstandard'
|
||||
import crudFormData from "./formData";
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
@@ -118,9 +143,9 @@ import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
|
||||
export default {
|
||||
name: 'FormDia',
|
||||
components: { rrOperation, pagination, Treeselect },
|
||||
components: { rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '单据', url: 'api/pmFormData', crudMethod: { ...crudMaterialbase }, optShow: {}})
|
||||
return CRUD({ title: '单据', url: 'api/pmFormData', crudMethod: { ...crudFormData }, optShow: {}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
dicts: ['product_series'],
|
||||
@@ -143,9 +168,9 @@ export default {
|
||||
fromTypes: [],
|
||||
cols: [],
|
||||
dialogVisible: false,
|
||||
classes: [],
|
||||
dtlVisible: false,
|
||||
childrenList: [],
|
||||
tableRadio: null,
|
||||
class_idStr: null,
|
||||
checkrow: null,
|
||||
rows: []
|
||||
}
|
||||
@@ -161,10 +186,6 @@ export default {
|
||||
open() {
|
||||
this.getFromTypes()
|
||||
},
|
||||
created() {
|
||||
console.log("created......")
|
||||
this.getFromTypes()
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.fromTypes.length > 0){
|
||||
formstruc.getHeader(this.query.form_type).then(res => {
|
||||
@@ -183,27 +204,18 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
toView(row){},
|
||||
toView(row){
|
||||
if (row.hasChildren){
|
||||
this.dtlVisible = true
|
||||
this.childrenList = row.children;
|
||||
}
|
||||
},
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
seriesFormat(row) {
|
||||
return this.dict.label.product_series[row.product_series]
|
||||
},
|
||||
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
}
|
||||
crudClassstandard.queryClassById(param).then(res => {
|
||||
this.classes = res.content.map(obj => {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (this.isSingle) {
|
||||
if (val.length > 1) {
|
||||
@@ -236,23 +248,8 @@ export default {
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('setMaterValue', this.rows)
|
||||
this.$emit('setMaterValue', this.rows[0].children)
|
||||
},
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user