计划的设备选择方式修改

master
zhaoxiaolin 1 year ago
parent 9cbe8c9902
commit 50e20c3e0c

@ -243,7 +243,7 @@ export default {
/** 导出按钮操作 */
handleExport() {
this.download('mes/prepare/export', {
this.download('mes/reportWork/productionExport', {
...this.queryParams
}, `prepare_${new Date().getTime()}.xlsx`)
},

@ -345,18 +345,12 @@
</el-form-item>
</el-col>
<el-col :offset="1" :span="7">
<!-- 选择产线 -->
<el-form-item label="选择线体:">
<el-select @focus="changeEquipment" size="small" v-model="splitForm.prodLineCode" placeholder="请选择线体">
<el-option v-for="item in proline" :key="item.key" :label="item.label" :value="item.key"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :offset="1" :span="5">
<!-- 工单日期 -->
<el-form-item size="small" label="工单日期: ">
<el-date-picker @change="checkDate" v-model="splitForm.productDate" type="date" placeholder="选择日期"
></el-date-picker>
<el-form-item label="选择设备:">
<el-cascader
:options="eRouteOptions"
:props="eRouteProps"
v-model="splitForm.prodLineCodeArray"
clearable></el-cascader>
</el-form-item>
</el-col>
</el-row>
@ -378,6 +372,13 @@
<el-input required type="number" @input="splitNumChange" v-model="splitForm.splitNum"></el-input>
</el-form-item>
</el-col>
<el-col :offset="1" :span="5">
<!-- 工单日期 -->
<el-form-item size="small" label="工单日期: ">
<el-date-picker @change="checkDate" v-model="splitForm.productDate" type="date" placeholder="选择日期"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<!-- 第三行 -->
<el-row v-for="(item, index) in formFields" :key="index">
@ -411,12 +412,13 @@
row-key="workorderCode"
style="width: 100%"
max-height="240"
default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column width="200" align="center" prop="workorderCode" label="工单号"></el-table-column>
<el-table-column width="100" align="center" prop="productDate" label="工单日期"></el-table-column>
<el-table-column width="100" align="center" prop="prodLineCode" label="成型机"></el-table-column>
<el-table-column width="150" align="center" prop="prodLineCode" label="生产线体设备"></el-table-column>
<el-table-column width="80" align="center" prop="quantitySplit" label="数量"></el-table-column>
<el-table-column width="60" label="单位" align="center" prop="unit"/>
<el-table-column width="90" label="工艺编码" align="center" prop="routeCode"/>
@ -548,7 +550,7 @@ export default {
//
splitForm: {
id: null,
prodLineCode: null,
prodLineCodeArray: [],
splitNum: null,
productDate: null,
shiftId: null,
@ -557,7 +559,10 @@ export default {
},
//
rules: {},
addrules: {}
addrules: {},
/**********************************/
eRouteProps: { multiple: true },
eRouteOptions: []
}
},
created() {
@ -576,7 +581,7 @@ export default {
//
changeRoute(routeCode) {
getProEquipment(routeCode).then(response => {
this.proline = response.data
this.eRouteOptions = response.data
})
},
// 线
@ -877,9 +882,9 @@ export default {
})
return
}
if (this.splitForm.prodLineCode == null) {
if (this.splitForm.prodLineCodeArray.length ==0) {
this.$message({
message: '请选择线体',
message: '请选择各流程节点的设备',
type: 'warning'
})
return
@ -924,7 +929,7 @@ export default {
//
const data = {
formFields: this.formFields,
prodLineCode: this.splitForm.prodLineCode,
prodLineCodeArray: this.splitForm.prodLineCodeArray,
productDate: this.splitForm.productDate,
shiftId: this.splitForm.shiftId,
splitNum: this.splitForm.splitNum,
@ -946,7 +951,7 @@ export default {
//
this.splitForm = {
id: null,
prodLineCode: null,
prodLineCode: [],
splitNum: null,
productDate: null,
shiftId: null,
@ -1076,7 +1081,7 @@ export default {
resetBatch() {
this.splitForm = {
id: null,
prodLineCode: null,
prodLineCode: [],
splitNum: null,
productDate: null,
shiftId: null,
@ -1146,6 +1151,7 @@ export default {
if (row != null) {
this.splitForm.parentOrder = row.orderCode
}
getOrder(row.id).then(response => {
this.splitForm = response.data
this.splitOpen = true

@ -170,7 +170,7 @@
<el-table-column width="120" label="派工数量" align="center" prop="quantitySplit"/>
<el-table-column width="150" label="工艺编码" align="center" prop="routeCode" />
<el-table-column width="150" label="工艺名称" align="center" prop="routeName" />
<el-table-column width="130" label="产线设备" align="center" prop="prodLineCode" />
<el-table-column width="130" label="产线设备" align="center" prop="prodLineName" />
<el-table-column width="120" label="工单生产日期" align="center" prop="productDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span>
@ -343,18 +343,12 @@
</el-form-item>
</el-col>
<el-col :offset="1" :span="7">
<!-- 选择产线 -->
<el-form-item label="选择线体:">
<el-select @change="machineType" size="small" v-model="splitForm.prodLineCode" placeholder="请选择线体">
<el-option v-for="item in proline" :key="item.key" :label="item.label" :value="item.key"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :offset="1" :span="5">
<!-- 工单日期 -->
<el-form-item size="small" label="工单日期: ">
<el-date-picker value-format="yyyy-MM-dd" @change="checkDate" v-model="splitForm.productDate" type="date" placeholder="选择日期"
></el-date-picker>
<el-form-item label="选择设备:">
<el-cascader
:options="eRouteOptions"
:props="eRouteProps"
v-model="splitForm.prodLineCodeArray"
clearable></el-cascader>
</el-form-item>
</el-col>
</el-row>
@ -379,6 +373,13 @@
<el-input required type="number" @input="splitNumChange" v-model="splitForm.splitNum"></el-input>
</el-form-item>
</el-col>
<el-col :offset="1" :span="5">
<!-- 工单日期 -->
<el-form-item size="small" label="工单日期: ">
<el-date-picker @change="checkDate" v-model="splitForm.productDate" type="date" placeholder="选择日期"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<!-- 第三行 -->
<el-row v-for="(item, index) in formFields" :key="index">
@ -417,7 +418,7 @@
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column width="200" align="center" prop="workorderCode" label="工单号"></el-table-column>
<el-table-column width="100" align="center" prop="productDate" label="工单日期"></el-table-column>
<el-table-column width="100" align="center" prop="prodLineCode" label="成型机"></el-table-column>
<el-table-column width="150" align="center" prop="prodLineCode" label="生产线体设备"></el-table-column>
<el-table-column width="80" align="center" prop="quantitySplit" label="数量"></el-table-column>
<el-table-column width="60" label="单位" align="center" prop="unit"/>
<el-table-column width="90" label="工艺编码" align="center" prop="routeCode"/>
@ -505,7 +506,7 @@ export default {
refreshProTable: true,
// form
splitForm:{
prodLineCode: null,
prodLineCodeArray: [],
splitNum: null,
productDate: null,
shiftId: null,
@ -585,8 +586,12 @@ export default {
unit: [
{ required: true, message: "单位不能为空", trigger: "blur" }
],
}
},
/**********************************/
eRouteProps: { multiple: true },
eRouteOptions: []
};
},
created() {
this.getList();
@ -710,7 +715,7 @@ export default {
/** 更改工艺 */
routeChange(e){
getProEquipment(e).then(response => {
this.proline = response.data
this.eRouteOptions = response.data
})
this.workForm.routeCode = e
},
@ -768,10 +773,7 @@ export default {
checkDate(e){
this.workForm.productDate = e
},
/** 成型机选择 */
machineType(e) {
this.workForm.prodLineCode = e
},
/** 查询生产工单列表 */
getList() {
this.loading = true;
@ -809,6 +811,7 @@ export default {
quantitySplit: null,
routeCode: null,
prodLineCode: null,
prodLineCodeArray:[],
productDate: null,
shiftId: null,
parentOrder: null,
@ -859,14 +862,14 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
//
if (this.selectWork.status == "w1"){
this.$message({
message:'工单已派发!不可修改!',
type:'warning'
})
return;
}
// ()
//if (this.selectWork.status == "w1"){
// this.$message({
// message:'',
// type:'warning'
// })
// return;
//}
//
checkWorkOrder(this.selectWork.workorderId).then(response => {
if (response.code == 500){
@ -882,7 +885,7 @@ export default {
this.splitData = [];
this.productData =[];
this.splitForm={
prodLineCode: null,
prodLineCodeArray: [],
splitNum: null,
productDate: null,
shiftId: null,
@ -902,6 +905,10 @@ export default {
getProEquipment(this.selectWork.routeCode).then(response => {
this.proline = response.data
})
})
//
getProEquipment(this.selectWork.routeCode).then(response2 => {
this.eRouteOptions = response2.data
})
// list
getWorkBatchList(this.selectWork).then(response => {
@ -932,7 +939,7 @@ export default {
//
this.splitForm.splitNum = this.splitData[0].quantitySplit
//
this.splitForm.prodLineCode = this.splitData[0].prodLineCode
this.splitForm.prodLineCodeArray = response.data.workOrder.prodLineCodeArray
//
this.splitForm.shiftId = this.splitData[0].shiftDesc
//
@ -978,21 +985,6 @@ export default {
},
/** 拆分-提交按钮 */
submitForm() {
//
if (this.splitForm.splitNum == null || this.splitForm.shiftId == null || this.splitForm.prodLineCode == null || this.splitForm.routeCode == null) {
this.$message({
message: '数据不能为空!',
type: 'warning'
})
return
}
if (this.splitForm.routeCode == null) {
this.$message({
message: '数据不能为空!',
type: 'warning'
})
return
}
//
let sum = 0
for (let i = 0; i < this.formFields.length; i++) {
@ -1020,7 +1012,7 @@ export default {
//
const data = {
formFields: this.formFields,
prodLineCode: this.workForm.prodLineCode,
prodLineCodeArray: this.splitForm.prodLineCodeArray,
productDate: this.splitForm.productDate,
shiftId: this.workForm.shiftId,
splitNum: this.workForm.splitNum,
@ -1042,7 +1034,7 @@ export default {
//
this.splitForm = {
id: null,
prodLineCode: null,
prodLineCodeArray: [],
splitNum: null,
productDate: null,
shiftId: null,

Loading…
Cancel
Save