This commit is contained in:
zds
2022-07-06 16:14:06 +08:00
parent ecde2f60ec
commit ba122d2e4d
8 changed files with 155 additions and 21 deletions

View File

@@ -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">&nbsp;&nbsp;&nbsp;:</label>
<el-input v-model="form.storagevehicle_code" disabled style="width: 210px" />

View File

@@ -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()