add:增加混碾满料接口,混碾工单增加任务下发和工单完成功能,物料维护增加泥料编码
This commit is contained in:
@@ -84,7 +84,9 @@
|
||||
label-width="125px"
|
||||
label-suffix=":"
|
||||
>
|
||||
|
||||
<el-form-item label="泥料编码" prop="raw_material_code">
|
||||
<el-input v-model="form.raw_material_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="order_number">
|
||||
<el-input v-model="form.order_number" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
@@ -208,8 +210,8 @@
|
||||
<!--表格渲染-->
|
||||
<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="raw_material_code" label="泥料编码" :min-width="flexWidth('raw_material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="half_material_code" label="半成品编码" :min-width="flexWidth('half_material_code',crud.data,'半成品编码')" /> -->
|
||||
<el-table-column prop="raw_material_code" label="泥料编码" :min-width="flexWidth('raw_material_code',crud.data,'物料编码')"/>
|
||||
<!-- <el-table-column prop="half_material_code" label="半成品编码" :min-width="flexWidth('half_material_code',crud.data,'半成品编码')" /> -->
|
||||
<el-table-column prop="order_number" label="订单编号" :min-width="flexWidth('order_number',crud.data,'订单编号')" />
|
||||
<el-table-column prop="product_code" label="产品编码" :min-width="flexWidth('product_code',crud.data,'产品编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
|
||||
@@ -72,6 +72,28 @@
|
||||
>
|
||||
开工
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="!(crud.selections[0]) || crud.selections[1]"
|
||||
@click="hnmlTask(crud.selections[0])"
|
||||
>
|
||||
任务下发
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="!(crud.selections[0]) || crud.selections[1]"
|
||||
@click="orderFinish(crud.selections[0])"
|
||||
>
|
||||
工单完成
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
slot="right"
|
||||
@@ -85,6 +107,27 @@
|
||||
同步
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<el-dialog
|
||||
title="填写条码"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%">
|
||||
<el-form
|
||||
ref="form"
|
||||
:inline="true"
|
||||
:model="barcodeForm"
|
||||
size="mini"
|
||||
label-width="135px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="条码">
|
||||
<el-input v-model="barcodeForm.barcode" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="info" @click="dialogCancle">取消</el-button>
|
||||
<el-button type="primary" @click="dialogCommit">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
@@ -161,7 +204,7 @@
|
||||
<el-form-item label="设备名称">
|
||||
<el-input v-model="form.point_name" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="原料编码" prop="material_name">
|
||||
<el-form-item label="原料编码" prop="raw_material_code">
|
||||
<el-input v-model="form.raw_material_code" style="width: 240px;" @focus="getMaterial(1)" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.region_code === 'HN' || form.region_code === 'YZ'" label="计划重量" prop="plan_weight">
|
||||
@@ -527,7 +570,11 @@ export default {
|
||||
materialDialog: false,
|
||||
orderDialog: false,
|
||||
fullscreenLoading: false,
|
||||
flag: 1
|
||||
flag: 1,
|
||||
dialogVisible:false,
|
||||
barcodeForm:{
|
||||
},
|
||||
orderCode:'',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -587,6 +634,7 @@ export default {
|
||||
this.flag = flag
|
||||
},
|
||||
tableChanged(row, flag) {
|
||||
console.log("row==>",row,"===flag===>",flag)
|
||||
if (flag === 1) {
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
@@ -634,6 +682,47 @@ export default {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
hnmlTask(row){
|
||||
this.dialogVisible = true
|
||||
this.orderCode = row.workorder_code
|
||||
},
|
||||
dialogCancle(){
|
||||
this.barcodeForm={}
|
||||
this.dialogVisible = false
|
||||
},
|
||||
dialogCommit(){
|
||||
this.fullscreenLoading = true
|
||||
let param = {
|
||||
orderCode:this.orderCode,
|
||||
barCode:this.barcodeForm.barcode
|
||||
}
|
||||
crudPdmBdWorkorder.hnmlTask(param).then(res => {
|
||||
this.crud.notify('任务下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
}).finally(() => {
|
||||
this.fullscreenLoading = false
|
||||
this.barcodeForm={}
|
||||
this.dialogVisible = false
|
||||
})
|
||||
},
|
||||
orderFinish(row){
|
||||
this.fullscreenLoading = true
|
||||
let param = {
|
||||
orderCode:row.workorder_code
|
||||
}
|
||||
crudPdmBdWorkorder.orderFinish(param).then(res => {
|
||||
this.crud.notify('工单完成', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
}).finally(() => {
|
||||
this.fullscreenLoading = false
|
||||
this.barcodeForm={}
|
||||
this.dialogVisible = false
|
||||
})
|
||||
},
|
||||
synchronize() {
|
||||
this.fullscreenLoading = true
|
||||
crudPdmBdWorkorder.orderSynchronize(this.crud.query).then(res => {
|
||||
|
||||
@@ -33,6 +33,22 @@ export function submits(param) {
|
||||
})
|
||||
}
|
||||
|
||||
export function orderFinish(param) {
|
||||
return request({
|
||||
url: 'api/pda/orderFinish',
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function hnmlTask(param) {
|
||||
return request({
|
||||
url: 'api/pda/hnmlTask',
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function orderSynchronize(data) {
|
||||
return request({
|
||||
url: 'api/pdmBdWorkorder/synchronize',
|
||||
@@ -61,4 +77,4 @@ export function userList() {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, submits, orderSynchronize, queryMaterials, userList }
|
||||
export default { add, edit, del, submits, orderFinish,hnmlTask,orderSynchronize, queryMaterials, userList }
|
||||
|
||||
Reference in New Issue
Block a user