配粉作业更新
This commit is contained in:
337
mes/qd/src/views/wms/pf/flourwork/ShowWorkDialog.vue
Normal file
337
mes/qd/src/views/wms/pf/flourwork/ShowWorkDialog.vue
Normal file
@@ -0,0 +1,337 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="配粉作业"
|
||||||
|
append-to-body
|
||||||
|
fullscreen
|
||||||
|
:before-close="closeView"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
@open="openView"
|
||||||
|
>
|
||||||
|
<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="指令卡">
|
||||||
|
<label slot="label">指 令 卡:</label>
|
||||||
|
<el-input v-model="form.workorder_id" disabled style="width: 210px" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="产品编码">
|
||||||
|
<el-input v-model="form.material_code" disabled style="width: 210px" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="批次">
|
||||||
|
<label slot="label">批 次:</label>
|
||||||
|
<el-input v-model="form.pcsn" size="mini" disabled style="width: 210px" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="配粉槽">
|
||||||
|
<label slot="label">配 粉 槽:</label>
|
||||||
|
<el-input v-model="form.storagevehicle_code" size="mini" disabled style="width: 210px" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="重量">
|
||||||
|
<label slot="label">重 量:</label>
|
||||||
|
<el-input v-model="form.masterbucket_qty" size="mini" disabled style="width: 210px" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="明细数">
|
||||||
|
<label slot="label">明 细 数:</label>
|
||||||
|
<el-input v-model="tableDtl.length" size="mini" disabled style="width: 210px" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="已配重量">
|
||||||
|
<el-input v-model="form.put_qty" size="mini" disabled style="width: 210px;" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="称重重量">
|
||||||
|
<el-input v-model="form.fact_qty" size="mini" disabled style="width: 210px;" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="配粉工位">
|
||||||
|
<el-input v-model="form.device_code" size="mini" disabled style="width: 210px" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="配方状态">
|
||||||
|
<el-select
|
||||||
|
v-model="form.status"
|
||||||
|
size="mini"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 210px;"
|
||||||
|
disabled
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in StatusList"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div class="crud-opts2">
|
||||||
|
<span class="role-span">配粉明细</span>
|
||||||
|
<span class="crud-opts-right2">
|
||||||
|
<!--左侧插槽-->
|
||||||
|
<slot name="left" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
class="el-table"
|
||||||
|
ref="table"
|
||||||
|
:data="tableDtl"
|
||||||
|
style="width: 100%;"
|
||||||
|
max-height="300"
|
||||||
|
size="mini"
|
||||||
|
border
|
||||||
|
:highlight-current-row="true"
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
@current-change="handleDtlCurrentChange"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column type="index" label="序号" width="55" align="center" />-->
|
||||||
|
<el-table-column show-overflow-tooltip prop="seq_no" label="配粉序号" align="center" width="70px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="status" label="状态" align="center" :formatter="statusName1" width="120px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" width="120px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" width="120px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" align="center" width="120px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="formula_qty" label="重量" align="center" width="120px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="put_qty" label="已投料重量" align="center" width="120px" :formatter="formaterPutQty"/>
|
||||||
|
<el-table-column show-overflow-tooltip prop="not_put" label="未配重量" :formatter="formatterNum" align="center" width="120px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" width="120px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="fact_qty" label="实际称重" align="center" width="120px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="confirm_qty" label="确认重量" align="center" width="120px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="dtlconfirm_type" label="物料确认" align="center" width="120px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="quality_scode" label="品质类型" align="center" :formatter="formatQua" width="120px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="ivt_level" label="库存等级" align="center" :formatter="formatIvt" width="120px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="is_active" label="是否可用" align="center" min-width="70" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="is_need_move" label="是否需移库" align="center" :formatter="statusName3" min-width="90" />
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<div class="crud-opts2">
|
||||||
|
<span class="role-span">作业明细</span>
|
||||||
|
<span class="crud-opts-right2">
|
||||||
|
<!--左侧插槽-->
|
||||||
|
<slot name="left" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="table2"
|
||||||
|
:data="tabledis"
|
||||||
|
style="width: 100%;"
|
||||||
|
max-height="300"
|
||||||
|
size="mini"
|
||||||
|
border
|
||||||
|
:highlight-current-row="true"
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
@current-change="handleDisCurrentChange"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column type="index" label="序号" width="55" align="center" />-->
|
||||||
|
<el-table-column show-overflow-tooltip prop="jobseq_no" label="作业序号" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="status" label="状态" align="center" :formatter="statusName2" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="jobstoragevehicle_code" label="托盘号" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="bucketunique" label="桶号" align="center" width="150px" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="storage_qty" label="桶重量" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="needout_qty" label="需出重量" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="out_type" label="出库方式" align="center" />
|
||||||
|
<!-- <el-table-column show-overflow-tooltip prop="outfit_qty" label="出库称重" align="center" />-->
|
||||||
|
<el-table-column show-overflow-tooltip prop="putfit_qty" label="投料称重" align="center" />
|
||||||
|
<!-- <el-table-column show-overflow-tooltip prop="outconfirm_type" label="出库确认" align="center" />-->
|
||||||
|
<el-table-column min-width="120" show-overflow-tooltip prop="putconfirm_type" label="投料确认" align="center" />
|
||||||
|
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||||
|
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="quality_scode" label="品质类型" align="center" :formatter="formatQua" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="ivt_level" label="库存等级" align="center" :formatter="formatIvt" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="is_active" label="是否可用" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="create_name" label="创建人" align="center" />
|
||||||
|
<el-table-column min-width="140" show-overflow-tooltip prop="create_time" label="创建时间" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="out_name" label="出库人" align="center" />
|
||||||
|
<el-table-column min-width="140" show-overflow-tooltip prop="out_time" label="出库时间" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="put_name" label="投料人" align="center" />
|
||||||
|
<el-table-column min-width="140" show-overflow-tooltip prop="put_time" label="投料时间" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="info" @click="closeView">取 消</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, { crud } from '@crud/crud'
|
||||||
|
import crudFlourwork from '@/api/wms/pf/flourwork'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AddDialog',
|
||||||
|
components: { },
|
||||||
|
dicts: ['ST_QUALITY_SCODE', 'ST_IVT_LEVEL'],
|
||||||
|
mixins: [crud()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fla: false,
|
||||||
|
form: {},
|
||||||
|
tableDtl: [],
|
||||||
|
tabledis: [],
|
||||||
|
dtlJson: null,
|
||||||
|
disJson: null,
|
||||||
|
StatusList: [
|
||||||
|
{ 'label': '生成', 'value': '10' },
|
||||||
|
{ 'label': '提交', 'value': '20' },
|
||||||
|
{ 'label': '生产中', 'value': '30' },
|
||||||
|
{ 'label': '完成', 'value': '99' }
|
||||||
|
],
|
||||||
|
dialogVisible: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
debugger
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
this.form = this.openParam
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClose(done) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
.catch(_ => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
closeView() {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.dtlJson = null
|
||||||
|
this.disJson = null
|
||||||
|
},
|
||||||
|
openView() {
|
||||||
|
crudFlourwork.getDtl({ 'formula_id': this.openParam.formula_id }).then(res => {
|
||||||
|
debugger
|
||||||
|
this.tableDtl = res
|
||||||
|
this.tabledis = []
|
||||||
|
})
|
||||||
|
crudFlourwork.getMst({ 'formula_id': this.openParam.formula_id }).then(res => {
|
||||||
|
this.form = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
formatQua(row, column) {
|
||||||
|
return this.dict.label.ST_QUALITY_SCODE[row.quality_scode]
|
||||||
|
},
|
||||||
|
formatIvt(row, column) {
|
||||||
|
return this.dict.label.ST_IVT_LEVEL[row.ivt_level]
|
||||||
|
},
|
||||||
|
handleDtlCurrentChange(current) {
|
||||||
|
this.dtlJson = current
|
||||||
|
crudFlourwork.getDis({ 'formuladtl_id': current.formuladtl_id }).then(res => {
|
||||||
|
this.tabledis = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.openView()
|
||||||
|
this.crud.notify('刷新成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.tabledis = []
|
||||||
|
},
|
||||||
|
handleDisCurrentChange(current) {
|
||||||
|
this.disJson = current
|
||||||
|
},
|
||||||
|
statusName1(row, column) {
|
||||||
|
if (row.status === '10') {
|
||||||
|
return '生成'
|
||||||
|
} else if (row.status === '20') {
|
||||||
|
return '生产中'
|
||||||
|
} else if (row.status === '99') {
|
||||||
|
return '完成'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
statusName2(row, column) {
|
||||||
|
if (row.status === '10') {
|
||||||
|
return '生成'
|
||||||
|
} else if (row.status === '20') {
|
||||||
|
return '出库确认'
|
||||||
|
} else if (row.status === '99') {
|
||||||
|
return '投料完成'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
statusName3(row, column) {
|
||||||
|
if (row.is_need_move === '1') {
|
||||||
|
return '是'
|
||||||
|
} else if (row.is_need_move === '0') {
|
||||||
|
return '否'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formatterNum(row, column) {
|
||||||
|
if (row.not_put !== '') {
|
||||||
|
const num = parseFloat(row.not_put)
|
||||||
|
if (num <= 0) {
|
||||||
|
return '0.000000'
|
||||||
|
} else {
|
||||||
|
return row.not_put
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (row.put_qty === '') {
|
||||||
|
return row.formula_qty
|
||||||
|
} else {
|
||||||
|
return '0.000000'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formaterPutQty(row, column) {
|
||||||
|
if (row.put_qty === '') {
|
||||||
|
return '0.000000'
|
||||||
|
} else {
|
||||||
|
return row.put_qty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.crud-opts2 {
|
||||||
|
padding: 0;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.crud-opts2 .el-dialog__title2 {
|
||||||
|
line-height: 24px;
|
||||||
|
font-size:20px;
|
||||||
|
color:#303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.crud-opts2 .role-span {
|
||||||
|
padding: 10px 50px 10px 0px;
|
||||||
|
}
|
||||||
|
.crud-opts2 .crud-opts-form {
|
||||||
|
padding: 10px 0px 0px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-with-select {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.crud-opt3 .el-form-item__label{
|
||||||
|
background-color: yellow;
|
||||||
|
}
|
||||||
|
.el-table{
|
||||||
|
width:99.9% !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -110,7 +110,11 @@
|
|||||||
<el-table-column prop="workorder_code" label="工令编码" width="120px" show-overflow-tooltip />
|
<el-table-column prop="workorder_code" label="工令编码" width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="workorder_type" label="工令类型" width="80px" show-overflow-tooltip />
|
<el-table-column prop="workorder_type" label="工令类型" width="80px" show-overflow-tooltip />
|
||||||
<el-table-column prop="worktask_code" label="工序任务号" min-width="130px" show-overflow-tooltip />
|
<el-table-column prop="worktask_code" label="工序任务号" min-width="130px" show-overflow-tooltip />
|
||||||
<el-table-column prop="formula_code" label="配方号" width="120px" show-overflow-tooltip />
|
<el-table-column prop="formula_code" label="配方号" width="120px" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="warning" @click="openShowWork(scope.$index, scope.row)">{{ scope.row.formula_code }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="material_code" label="产品编码" width="120px" show-overflow-tooltip />
|
<el-table-column prop="material_code" label="产品编码" width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="product_series" label="系列" />
|
<el-table-column prop="product_series" label="系列" />
|
||||||
<el-table-column prop="pcsn" label="批次" width="80px" show-overflow-tooltip />
|
<el-table-column prop="pcsn" label="批次" width="80px" show-overflow-tooltip />
|
||||||
@@ -134,6 +138,7 @@
|
|||||||
<pagination />
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
<WorkDialog :dialog-show.sync="openWorkDialog" :open-param="openParam" />
|
<WorkDialog :dialog-show.sync="openWorkDialog" :open-param="openParam" />
|
||||||
|
<ShowWorkDialog :dialog-show.sync="openShowWorkDialog" :open-param="openParam" />
|
||||||
<ExceptionDialog :dialog-show.sync="exceptionDialog" />
|
<ExceptionDialog :dialog-show.sync="exceptionDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -148,13 +153,13 @@ import pagination from '@crud/Pagination'
|
|||||||
import DateRangePicker from '@/components/DateRangePicker'
|
import DateRangePicker from '@/components/DateRangePicker'
|
||||||
import WorkDialog from '@/views/wms/pf/flourwork/WorkDialog'
|
import WorkDialog from '@/views/wms/pf/flourwork/WorkDialog'
|
||||||
import ExceptionDialog from '@/views/wms/pf/flourwork/ExceptionDialog'
|
import ExceptionDialog from '@/views/wms/pf/flourwork/ExceptionDialog'
|
||||||
import crudMaterialparameters from "@/api/wms/basedata/master/materialparameters";
|
import crudMaterialparameters from '@/api/wms/basedata/master/materialparameters'
|
||||||
|
import ShowWorkDialog from '@/views/wms/pf/flourwork/ShowWorkDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Flourwork',
|
name: 'Flourwork',
|
||||||
dicts: ['product_series'],
|
dicts: ['product_series'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, WorkDialog, ExceptionDialog },
|
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, WorkDialog, ExceptionDialog, ShowWorkDialog },
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -180,6 +185,7 @@ export default {
|
|||||||
biz_date: new Date().format('yyyy-MM-dd'),
|
biz_date: new Date().format('yyyy-MM-dd'),
|
||||||
openParam: null,
|
openParam: null,
|
||||||
openWorkDialog: false,
|
openWorkDialog: false,
|
||||||
|
openShowWorkDialog: false,
|
||||||
exceptionDialog: false,
|
exceptionDialog: false,
|
||||||
serieseList: [],
|
serieseList: [],
|
||||||
deviceList: [],
|
deviceList: [],
|
||||||
@@ -233,6 +239,10 @@ export default {
|
|||||||
this.openWorkDialog = true
|
this.openWorkDialog = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
openShowWork(index, row) {
|
||||||
|
this.openParam = row
|
||||||
|
this.openShowWorkDialog = true
|
||||||
|
},
|
||||||
exception() {
|
exception() {
|
||||||
this.exceptionDialog = true
|
this.exceptionDialog = true
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user