|
|
|
@ -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,
|
|
|
|
|