Merge branch 'master' of http://121.40.234.130:8899/root/wuHanXinRui
This commit is contained in:
@@ -7,6 +7,13 @@ export function cancel(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function audit(data) {
|
||||
return request({
|
||||
url: 'api/formula/audit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function submit(data) {
|
||||
return request({
|
||||
url: 'api/formula/submit',
|
||||
@@ -49,4 +56,4 @@ export function print(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { cancel, getform, submit, getView, pointCard, preview, print }
|
||||
export default { audit, cancel, getform, submit, getView, pointCard, preview, print }
|
||||
|
||||
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>
|
||||
@@ -428,9 +428,9 @@ export default {
|
||||
if (this.form.storagevehicle_code === '') {
|
||||
return this.crud.notify('请绑定配粉槽', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
if (this.form.status !== '30') {
|
||||
return this.crud.notify('配方状态不为生产中', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
// if (this.form.status !== '30') {
|
||||
// return this.crud.notify('配方状态不为生产中', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
// }
|
||||
const arr = this.tableDtl
|
||||
let num = 0
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
@@ -475,9 +475,9 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (this.form.status !== '30') {
|
||||
return this.crud.notify('配方状态不为生产中', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
// if (this.form.status !== '30') {
|
||||
// return this.crud.notify('配方状态不为生产中', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
// }
|
||||
if (this.dtlJson === null) {
|
||||
this.crud.notify('请选择物料', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
|
||||
@@ -34,6 +34,18 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="配方">
|
||||
<label slot="label">配 方:</label>
|
||||
<el-input
|
||||
v-model="query.formula_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入配方编码"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="批次">
|
||||
<label slot="label">批 次:</label>
|
||||
<el-input
|
||||
@@ -98,7 +110,11 @@
|
||||
<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="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="product_series" label="系列" />
|
||||
<el-table-column prop="pcsn" label="批次" width="80px" show-overflow-tooltip />
|
||||
@@ -122,6 +138,7 @@
|
||||
<pagination />
|
||||
</div>
|
||||
<WorkDialog :dialog-show.sync="openWorkDialog" :open-param="openParam" />
|
||||
<ShowWorkDialog :dialog-show.sync="openShowWorkDialog" :open-param="openParam" />
|
||||
<ExceptionDialog :dialog-show.sync="exceptionDialog" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -136,13 +153,13 @@ import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import WorkDialog from '@/views/wms/pf/flourwork/WorkDialog'
|
||||
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 {
|
||||
name: 'Flourwork',
|
||||
dicts: ['product_series'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, WorkDialog, ExceptionDialog },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, WorkDialog, ExceptionDialog, ShowWorkDialog },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -168,6 +185,7 @@ export default {
|
||||
biz_date: new Date().format('yyyy-MM-dd'),
|
||||
openParam: null,
|
||||
openWorkDialog: false,
|
||||
openShowWorkDialog: false,
|
||||
exceptionDialog: false,
|
||||
serieseList: [],
|
||||
deviceList: [],
|
||||
@@ -221,6 +239,10 @@ export default {
|
||||
this.openWorkDialog = true
|
||||
})
|
||||
},
|
||||
openShowWork(index, row) {
|
||||
this.openParam = row
|
||||
this.openShowWorkDialog = true
|
||||
},
|
||||
exception() {
|
||||
this.exceptionDialog = true
|
||||
},
|
||||
|
||||
@@ -90,6 +90,22 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否审核" prop="is_audit">
|
||||
<el-select
|
||||
v-model="form.is_audit"
|
||||
style="width: 210px"
|
||||
placeholder="是否审核"
|
||||
class="filter-item"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.is_again_put"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="配粉槽" prop="storagevehicle_code">
|
||||
<label slot="label">配 粉 槽:</label>
|
||||
<el-input v-model="form.storagevehicle_code" disabled style="width: 210px" />
|
||||
|
||||
@@ -40,6 +40,15 @@
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="配方编号">
|
||||
<el-input
|
||||
v-model="query.formula_code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="配方编号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="配方状态">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
@@ -56,15 +65,32 @@
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-form-item label="批次">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="批次"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
</el-form-item>
|
||||
<el-form-item label="是否审核">
|
||||
<el-select
|
||||
v-model="query.is_audit"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="是否审核"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.is_again_put"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="批次"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
@@ -82,6 +108,17 @@
|
||||
>
|
||||
作废
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="audit_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="audit"
|
||||
>
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -161,16 +198,19 @@
|
||||
<el-table-column prop="detail_count" min-width="100" label="明细数"/>
|
||||
<el-table-column prop="masterbucket_qty" min-width="100" label="重量" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="status" :formatter="stateFormat" min-width="80" label="状态" />
|
||||
<el-table-column prop="create_time" min-width="150" label="开单时间"/>
|
||||
<el-table-column prop="create_name" min-width="150" label="开单人"/>
|
||||
<el-table-column prop="update_time" min-width="150" label="修改时间"/>
|
||||
<el-table-column prop="update_optname" min-width="150" label="修改人"/>
|
||||
<el-table-column prop="start_time" min-width="150" label="开始时间"/>
|
||||
<el-table-column prop="start_name" min-width="150" label="开始人"/>
|
||||
<el-table-column prop="end_time" min-width="150" label="结束时间"/>
|
||||
<el-table-column prop="end_name" min-width="150" label="结束人"/>
|
||||
<el-table-column prop="add_time" min-width="150" label="补料时间"/>
|
||||
<el-table-column prop="add_name" min-width="150" label="补料人"/>
|
||||
<el-table-column prop="is_audit" :formatter="stateFormat2" min-width="80" label="是否审核" />
|
||||
<el-table-column prop="audit_time" min-width="140" label="审核时间"/>
|
||||
<el-table-column prop="audit_name" min-width="80" label="审核人"/>
|
||||
<el-table-column prop="create_time" min-width="140" label="开单时间"/>
|
||||
<el-table-column prop="create_name" min-width="80" label="开单人"/>
|
||||
<el-table-column prop="update_time" min-width="140" label="修改时间"/>
|
||||
<el-table-column prop="update_optname" min-width="80" label="修改人"/>
|
||||
<el-table-column prop="start_time" min-width="140" label="开始时间"/>
|
||||
<el-table-column prop="start_name" min-width="80" label="开始人"/>
|
||||
<el-table-column prop="end_time" min-width="140" label="结束时间"/>
|
||||
<el-table-column prop="end_name" min-width="80" label="结束人"/>
|
||||
<el-table-column prop="add_time" min-width="140" label="补料时间"/>
|
||||
<el-table-column prop="add_name" min-width="80" label="补料人"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -244,7 +284,7 @@ export default {
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['formula_status', 'workorder_type', 'product_series', 'bucket_type'],
|
||||
dicts: ['formula_status', 'workorder_type', 'product_series', 'bucket_type', 'is_again_put'],
|
||||
data() {
|
||||
return {
|
||||
dialogUpload: false,
|
||||
@@ -256,6 +296,7 @@ export default {
|
||||
},
|
||||
divShow: false,
|
||||
dissub_flag: true,
|
||||
audit_flag: true,
|
||||
change_flag: true,
|
||||
Export_flag: true,
|
||||
show_flag: true,
|
||||
@@ -301,6 +342,7 @@ export default {
|
||||
buttonChange(rows) {
|
||||
if (rows.length !== 0) {
|
||||
this.dissub_flag = false
|
||||
this.audit_flag = false
|
||||
this.change_flag = false
|
||||
this.Export_flag = false
|
||||
this.show_flag = false
|
||||
@@ -308,10 +350,13 @@ export default {
|
||||
if (rows[i].status !== '20') {
|
||||
this.dissub_flag = true
|
||||
}
|
||||
if (rows[i].status !== '20' || rows[i].is_audit !== '0') {
|
||||
this.audit_flag = true
|
||||
}
|
||||
if (rows[i].status === '99') {
|
||||
this.Export_flag = true
|
||||
}
|
||||
if (!'30,20'.includes(rows[i].status) || rows.length !== 1) {//后台校验首道工序
|
||||
if (!'30,20'.includes(rows[i].status) || rows.length !== 1) {
|
||||
this.change_flag = true
|
||||
}
|
||||
}
|
||||
@@ -322,6 +367,9 @@ export default {
|
||||
stateFormat(row) {
|
||||
return this.dict.label.formula_status[row.status]
|
||||
},
|
||||
stateFormat2(row) {
|
||||
return this.dict.label.is_again_put[row.is_audit]
|
||||
},
|
||||
bill_typeFormat(row) {
|
||||
return this.dict.label.workorder_type[row.workorder_type]
|
||||
},
|
||||
@@ -339,6 +387,7 @@ export default {
|
||||
this.checkrows = []
|
||||
this.mstrow = {}
|
||||
this.dissub_flag = true
|
||||
this.audit_flag = true
|
||||
this.change_flag = true
|
||||
this.Export_flag = true
|
||||
this.show_flag = true
|
||||
@@ -366,6 +415,17 @@ export default {
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
audit(){
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length === 0){
|
||||
this.crud.notify('请先选择需要审核的配方记录!')
|
||||
return false
|
||||
}
|
||||
formula.audit({'rows':this.checkrows}).then(res => {
|
||||
this.crud.notify('审核配方成功!')
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
this.handleCurrentChange()
|
||||
|
||||
Reference in New Issue
Block a user