add:退料管理
This commit is contained in:
289
wms/nladmin-ui/src/views/wms/basedata/group/AddDtl.vue
Normal file
289
wms/nladmin-ui/src/views/wms/basedata/group/AddDtl.vue
Normal file
@@ -0,0 +1,289 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="复制组盘"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="handleClose"
|
||||
width="1100px"
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form ref="form2" :model="formMst" :rules="rules" size="mini" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<el-input v-model="formMst.material_code" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料名称" prop="material_name">
|
||||
<el-input v-model="formMst.material_name" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料规格" prop="material_spec">
|
||||
<el-input v-model="formMst.material_spec" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="载具编码" prop="storagevehicle_code">
|
||||
<el-input v-model="formMst.storagevehicle_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="焊材批号" prop="pcsn">
|
||||
<el-input v-model="formMst.pcsn" disabled placeholder="由系统自动生成" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料重量" prop="qty">
|
||||
<el-input-number v-model="formMst.qty" :precision="2" :controls="false" :min="1" style="width: 200px" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商" prop="supp_code">
|
||||
<el-select
|
||||
v-model="formMst.supp_code"
|
||||
disabled
|
||||
size="mini"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in suppList"
|
||||
:label="item.supp_name"
|
||||
:value="item.supp_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有效日期" prop="quality_time">
|
||||
<el-date-picker v-model="formMst.quality_time" type="date" disabled placeholder="选择日期" style="width: 200px" value-format="yyyy-MM-dd" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产日期" prop="produce_time">
|
||||
<el-date-picker v-model="formMst.produce_time" type="date" disabled placeholder="选择日期" style="width: 200px" value-format="yyyy-MM-dd" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="烘干次数" prop="bake_num">
|
||||
<el-input-number v-model="formMst.bake_num" :precision="0" disabled :controls="false" :min="0" :max="3" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="品质类型" prop="quality_type">
|
||||
<el-select
|
||||
v-model="formMst.quality_type"
|
||||
disabled
|
||||
size="mini"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.QUALITY_TYPE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="料箱类型" prop="box_type">
|
||||
<el-select
|
||||
v-model="formMst.box_type"
|
||||
disabled
|
||||
size="mini"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.BOX_TYPE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="执行标准" prop="execution_stand">
|
||||
<el-input v-model="formMst.execution_stand" style="width: 380px;" disabled rows="2" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="formMst.remark" style="width: 380px;" rows="2" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="18">
|
||||
<el-col :span="18" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" type="primary" @click="copySave">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="18">
|
||||
<el-col :span="18" style="border: 10px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudGroup from '@/views/wms/basedata/group/group'
|
||||
|
||||
export default {
|
||||
name: 'WeighDialog',
|
||||
mixins: [crud()],
|
||||
dicts: ['BOX_TYPE', 'QUALITY_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
this.formMst = this.openParam
|
||||
this.formMst.storagevehicle_code = ''
|
||||
this.formMst.pcsn = null
|
||||
this.formMst.qty = 1
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formMst: {
|
||||
group_id: null,
|
||||
storagevehicle_code: null,
|
||||
material_id: null,
|
||||
pcsn: null,
|
||||
qty_unit_id: null,
|
||||
qty_unit_name: null,
|
||||
qty: null,
|
||||
remark: null,
|
||||
status: null,
|
||||
supp_code: null,
|
||||
quality_time: null,
|
||||
produce_time: new Date(),
|
||||
execution_stand: null,
|
||||
bake_num: null,
|
||||
quality_type: '1',
|
||||
box_type: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
material_spec: null,
|
||||
material_name: null
|
||||
},
|
||||
suppList: [],
|
||||
current: null,
|
||||
dialogVisible: false,
|
||||
rules: {
|
||||
material_code: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
||||
],
|
||||
storagevehicle_code: [
|
||||
{ required: true, message: '载具不能为空', trigger: 'blur' }
|
||||
],
|
||||
supp_code: [
|
||||
{ required: true, message: '供应商不能为空', trigger: 'blur' }
|
||||
],
|
||||
quality_time: [
|
||||
{ required: true, message: '有效日期不能为空', trigger: 'blur' }
|
||||
],
|
||||
produce_time: [
|
||||
{ required: true, message: '生产日期不能为空', trigger: 'blur' }
|
||||
],
|
||||
box_type: [
|
||||
{ required: true, message: '料箱类型不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$refs['form2'].resetFields()
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.crud.toQuery()
|
||||
},
|
||||
open() {
|
||||
crudGroup.querySupp({}).then(row => {
|
||||
this.suppList = row
|
||||
})
|
||||
},
|
||||
copySave() {
|
||||
if (this.formMst.storagevehicle_code === '') {
|
||||
this.crud.notify('载具不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudGroup.copySave(this.formMst).then(row => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.close()
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
padding: 4px 4px;
|
||||
}
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -48,4 +48,12 @@ export function querySupp(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, queryMater, checkVehicle, querySupp }
|
||||
export function copySave(data) {
|
||||
return request({
|
||||
url: 'api/group/copySave',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, queryMater, checkVehicle, querySupp, copySave }
|
||||
|
||||
@@ -58,7 +58,19 @@
|
||||
</div>
|
||||
<rrOperation />
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="openAddDtl"
|
||||
>
|
||||
复制新增
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
@@ -96,7 +108,7 @@
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="焊材批号" prop="pcsn">
|
||||
<el-input v-model="form.pcsn" style="width: 200px;" />
|
||||
<el-input v-model="form.pcsn" disabled placeholder="由系统自动生成" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -214,6 +226,7 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具编码" :min-width="flexWidth('storagevehicle_code',crud.data,'载具编码')" />
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
@@ -251,11 +264,13 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDtl :dialog-show.sync="openAddDtlDialog" :open-param="openParam" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudGroup from '@/views/wms/basedata/group/group'
|
||||
import AddDtl from '@/views/wms/basedata/group/AddDtl'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
@@ -287,7 +302,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Group',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, AddDtl },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
// 数据字典
|
||||
dicts: ['is_used', 'GROUP_STATUS', 'BOX_TYPE', 'QUALITY_TYPE'],
|
||||
@@ -310,14 +325,13 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
openParam: {},
|
||||
openAddDtlDialog: false,
|
||||
suppList: [],
|
||||
rules: {
|
||||
material_code: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
||||
],
|
||||
pcsn: [
|
||||
{ required: true, message: '批次不能为空', trigger: 'blur' }
|
||||
],
|
||||
storagevehicle_code: [
|
||||
{ required: true, message: '载具不能为空', trigger: 'blur' }
|
||||
],
|
||||
@@ -372,6 +386,10 @@ export default {
|
||||
},
|
||||
formattQuality(row) {
|
||||
return this.dict.label.QUALITY_TYPE[row.quality_type]
|
||||
},
|
||||
openAddDtl() {
|
||||
this.openAddDtlDialog = true
|
||||
this.openParam = this.$refs.table.selection[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
175
wms/nladmin-ui/src/views/wms/pdm/callmaterial/ViewDialog.vue
Normal file
175
wms/nladmin-ui/src/views/wms/pdm/callmaterial/ViewDialog.vue
Normal file
@@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="叫料单详情"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="handleClose"
|
||||
width="1100px"
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-row :gutter="22">
|
||||
<el-col :span="22" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="18">
|
||||
<el-col :span="18" style="border: 10px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form2" :model="formMst" :rules="rules" size="mini" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料编码:">
|
||||
<el-input v-model="formMst.material_code" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料名称:">
|
||||
<el-input v-model="formMst.material_name" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="机台编码:">
|
||||
<el-input v-model="formMst.device_code" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计划叫料重量:">
|
||||
<el-input v-model="formMst.call_qty" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="实际叫料重量:">
|
||||
<el-input v-model="formMst.real_qty" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="实际用料重量:">
|
||||
<el-input v-model="formMst.real_weigh_qty" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">叫料明细</span>
|
||||
<span />
|
||||
</div>
|
||||
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableData"
|
||||
style="width: 100%;"
|
||||
max-height="400"
|
||||
size="mini"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="bom_status" label="状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料规格')" />
|
||||
<el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'批次')" />
|
||||
<el-table-column prop="vehicle_code" label="载具号" :min-width="flexWidth('vehicle_code',crud.data,'载具号')" />
|
||||
<el-table-column prop="sect_name" label="出库库区" :min-width="flexWidth('sect_name',crud.data,'出库库区')" />
|
||||
<el-table-column prop="out_qty" label="出库重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="weigh_qty" label="称重重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="device_code" label="机台编码" :min-width="flexWidth('device_code',crud.data,'机台编码')" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { crud } from '@crud/crud'
|
||||
import crudCallMaterialDtl from '@/views/wms/pdm/callmaterialdtl/callmaterialdtl'
|
||||
|
||||
export default {
|
||||
name: 'CallMaterViewDialog',
|
||||
mixins: [crud()],
|
||||
dicts: ['BOM_DTL_STATUS'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
this.formMst = this.openParam
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formMst: {
|
||||
},
|
||||
current: null,
|
||||
tableData: [],
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$refs['form2'].resetFields()
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
formattStatus(row) {
|
||||
return this.dict.label.BOM_DTL_STATUS[row.bom_status]
|
||||
},
|
||||
open() {
|
||||
crudCallMaterialDtl.getDtl(this.formMst).then(res => {
|
||||
debugger
|
||||
this.tableData = res
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
padding: 4px 4px;
|
||||
}
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -117,7 +117,11 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="bom_code" label="工单单号" :min-width="flexWidth('bom_code',crud.data,'工单单号')" />
|
||||
<el-table-column show-overflow-tooltip prop="bom_code" width="150" label="叫料单号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bom_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="bom_status" label="工单状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
@@ -149,11 +153,13 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<ViewDialog :dialog-show.sync="ViewDialog" :open-param="openParam" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudCallMaterial from '@/views/wms/pdm/callmaterial/callmaterial'
|
||||
import ViewDialog from '@/views/wms/pdm/callmaterial/ViewDialog'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
@@ -179,7 +185,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'CallMaterial',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, ViewDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
// 数据字典
|
||||
dicts: ['BOM_STATUS'],
|
||||
@@ -201,6 +207,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ViewDialog: false,
|
||||
openParam: null,
|
||||
permission: {},
|
||||
rules: {
|
||||
material_code: [
|
||||
@@ -236,6 +244,10 @@ export default {
|
||||
},
|
||||
formattStatus(row) {
|
||||
return this.dict.label.BOM_STATUS[row.bom_status]
|
||||
},
|
||||
toView(index, row) {
|
||||
this.openParam = row
|
||||
this.ViewDialog = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
166
wms/nladmin-ui/src/views/wms/pdm/callmaterialdtl/WeighDialog.vue
Normal file
166
wms/nladmin-ui/src/views/wms/pdm/callmaterialdtl/WeighDialog.vue
Normal file
@@ -0,0 +1,166 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="称重信息"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="handleClose"
|
||||
width="1100px"
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<el-form ref="form2" :model="formMst" :rules="rules" size="mini" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料编码:">
|
||||
<el-input v-model="formMst.material_code" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料名称:">
|
||||
<el-input v-model="formMst.material_name" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料规格:">
|
||||
<el-input v-model="formMst.material_spec" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料批次:">
|
||||
<el-input v-model="formMst.pcsn" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="载具编码:">
|
||||
<el-input v-model="formMst.vehicle_code" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出库库区:">
|
||||
<el-input v-model="formMst.sect_name" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出库重量:">
|
||||
<el-input v-model="formMst.out_qty" disabled size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="称重重量:">
|
||||
<el-input-number v-model="formMst.weigh_qty" :precision="2" :controls="false" :min="0" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="18">
|
||||
<el-col :span="18" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" type="success" @click="getWeigh">称重</el-button>
|
||||
<el-button icon="el-icon-check" size="mini" type="primary" @click="saveWeigh">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="18">
|
||||
<el-col :span="18" style="border: 10px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudCallMaterialDtl from '@/views/wms/pdm/callmaterialdtl/callmaterialdtl'
|
||||
|
||||
export default {
|
||||
name: 'WeighDialog',
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParamWeigh: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
this.formMst = this.openParamWeigh
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formMst: {
|
||||
},
|
||||
current: null,
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.formMst.weigh_qty = 0
|
||||
this.$refs['form2'].resetFields()
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
getWeigh() {
|
||||
this.formMst.weigh_qty = '20'
|
||||
/* crudCallMaterialDtl.getWeigh(this.formMst).then(res => {
|
||||
this.formMst.weigh_qty = res.weigh_qty
|
||||
})*/
|
||||
},
|
||||
saveWeigh() {
|
||||
// 校验称重信息不能为0或者空
|
||||
if (this.formMst.weigh_qty === 0) {
|
||||
this.crud.notify('称重重量不能为0!', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
return
|
||||
}
|
||||
crudCallMaterialDtl.saveWeigh(this.formMst).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.close()
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
padding: 4px 4px;
|
||||
}
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,59 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/bomCallMaterialDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/bomCallMaterialDtl/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/bomCallMaterialDtl',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDtl(data) {
|
||||
return request({
|
||||
url: 'api/bomCallMaterialDtl/getDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getWeigh(data) {
|
||||
return request({
|
||||
url: 'api/bomCallMaterialDtl/getWeigh',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function saveWeigh(data) {
|
||||
return request({
|
||||
url: 'api/bomCallMaterialDtl/saveWeigh',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function confirm(data) {
|
||||
return request({
|
||||
url: 'api/bomCallMaterialDtl/confirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getDtl, getWeigh, saveWeigh, confirm }
|
||||
229
wms/nladmin-ui/src/views/wms/pdm/callmaterialdtl/index.vue
Normal file
229
wms/nladmin-ui/src/views/wms/pdm/callmaterialdtl/index.vue
Normal file
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="工单编码">
|
||||
<el-input
|
||||
v-model="query.bom_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="工单编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="机台编码">
|
||||
<el-input
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="机台编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料批次">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料批次"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具编码">
|
||||
<el-input
|
||||
v-model="query.vehicle_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="载具编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单状态">
|
||||
<el-select
|
||||
v-model="query.bom_status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.BOM_DTL_STATUS"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<rrOperation />
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="openWeigh"
|
||||
>
|
||||
退料称重
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="confirm"
|
||||
>
|
||||
退料确认
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="bom_code" label="叫料单号" :min-width="flexWidth('bom_code',crud.data,'叫料单号')" />
|
||||
<el-table-column prop="bom_status" label="状态" :formatter="formattStatus" :min-width="flexWidth('bom_status',crud.data,'工单状态')" />
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料规格')" />
|
||||
<el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'批次')" />
|
||||
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
|
||||
<el-table-column prop="sect_name" label="出库库区" :min-width="flexWidth('sect_name',crud.data,'出库库区')" />
|
||||
<el-table-column prop="out_qty" label="出库重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="weigh_qty" label="称重重量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="device_code" label="机台编码" :min-width="flexWidth('device_code',crud.data,'机台编码')" />
|
||||
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'叫料人')" />
|
||||
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'叫料时间')" />
|
||||
<el-table-column prop="confirm_time" label="结束时间" :min-width="flexWidth('confirm_time',crud.data,'结束时间')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<WeighDialog :dialog-show.sync="openWeighDialog" :open-param-weigh="openParamWeigh" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudCallMaterialDtl from '@/views/wms/pdm/callmaterialdtl/callmaterialdtl'
|
||||
import WeighDialog from '@/views/wms/pdm/callmaterialdtl/WeighDialog'
|
||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
|
||||
const defaultForm = {
|
||||
bomdtl_id: null,
|
||||
bom_id: null,
|
||||
material_id: null,
|
||||
pcsn: null,
|
||||
vehicle_code: null,
|
||||
struct_code: null,
|
||||
bom_status: null,
|
||||
out_dis_id: null,
|
||||
out_qty: null,
|
||||
weigh_qty: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
confirm_time: null
|
||||
}
|
||||
export default {
|
||||
name: 'CallMaterialDtl',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, WeighDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
// 数据字典
|
||||
dicts: ['BOM_DTL_STATUS'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '产线叫料',
|
||||
url: 'api/bomCallMaterialDtl',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
},
|
||||
query: {
|
||||
'bom_status': '1'
|
||||
},
|
||||
idField: 'bomdtl_id',
|
||||
sort: 'bomdtl_id,desc',
|
||||
crudMethod: { ...crudCallMaterialDtl }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
openParamWeigh: null,
|
||||
openWeighDialog: false,
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
formattStatus(row) {
|
||||
return this.dict.label.BOM_DTL_STATUS[row.bom_status]
|
||||
},
|
||||
openWeigh() {
|
||||
this.openParamWeigh = this.$refs.table.selection[0]
|
||||
this.openWeighDialog = true
|
||||
},
|
||||
confirm() {
|
||||
// 校验称重信息不能为0或者空
|
||||
const data = this.$refs.table.selection[0]
|
||||
if (data.weigh_qty === 0) {
|
||||
this.crud.notify('称重重量不能为0!', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
return
|
||||
}
|
||||
if (data.bom_status === '2') {
|
||||
this.crud.notify('当前明细已确认!', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
}
|
||||
crudCallMaterialDtl.confirm(data).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -371,6 +371,7 @@ export default {
|
||||
// 添加plan_qty
|
||||
item.plan_qty = item.call_qty
|
||||
item.source_bill_code = item.bom_code
|
||||
item.source_billdtl_id = item.bom_id
|
||||
if (this.form.tableData.length !== 0) {
|
||||
this.flagnow = false
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
|
||||
@@ -204,8 +204,8 @@ export default {
|
||||
this.crud.notify('拣选批次不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.formMst.weigh_qty = '87'
|
||||
this.formMst.select_qty = '1'
|
||||
this.formMst.weigh_qty = '51'
|
||||
this.formMst.select_qty = '30'
|
||||
/* crudSectout.getWeigh(this.current).then(res => {
|
||||
this.formMst.weigh_qty = res.weigh_qty
|
||||
this.formMst.select_qty = res.select_qty
|
||||
|
||||
Reference in New Issue
Block a user