|
|
|
@ -320,22 +320,26 @@
|
|
|
|
|
<!-- 编辑框 -->
|
|
|
|
|
<!-- 第一行 -->
|
|
|
|
|
<el-row>
|
|
|
|
|
<!-- 选择产线 -->
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<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-col :span="7">
|
|
|
|
|
<!-- 选择工艺 -->
|
|
|
|
|
<el-form-item size="small" label="选择工艺:" class="my-select my-first">
|
|
|
|
|
<el-select @change="routeChange" v-model="splitForm.routeCode" placeholder="请选择工艺">
|
|
|
|
|
<el-option v-for="item in routes" :key="item.routeCode" :label="item.routeName"
|
|
|
|
|
:value="item.routeCode"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- 拆分数量 -->
|
|
|
|
|
<el-col :offset="2" :span="7">
|
|
|
|
|
<el-form-item size="small" label="拆分数量:">
|
|
|
|
|
<el-input required type="number" @input="splitNumChange" v-model="splitForm.splitNum"></el-input>
|
|
|
|
|
<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>
|
|
|
|
@ -344,7 +348,7 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 第二行 -->
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<!-- 选择班次 -->
|
|
|
|
|
<el-form-item size="small" label="选择班次:" class="my-select my-first">
|
|
|
|
|
<el-select @change="shiftChange" v-model="splitForm.shiftId" placeholder="请选择班次" clearable>
|
|
|
|
@ -355,21 +359,12 @@
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
<!-- <el-select @change="shiftChange" v-model="splitForm.shiftId" placeholder="请选择班次">-->
|
|
|
|
|
<!-- <el-option v-for="item in workShift" :key="item.shiftId" :label="item.shiftDesc"-->
|
|
|
|
|
<!-- :value="item.shiftId"-->
|
|
|
|
|
<!-- ></el-option>-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :offset="2" :span="6">
|
|
|
|
|
<!-- 选择工艺 -->
|
|
|
|
|
<el-form-item size="small" label="选择工艺:" class="my-select my-first">
|
|
|
|
|
<el-select @change="routeChange" v-model="splitForm.routeCode" placeholder="请选择工艺">
|
|
|
|
|
<el-option v-for="item in routes" :key="item.routeCode" :label="item.routeName"
|
|
|
|
|
:value="item.routeCode"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
|
<!-- 拆分数量 -->
|
|
|
|
|
<el-form-item size="small" label="拆分数量:">
|
|
|
|
|
<el-input required type="number" @input="splitNumChange" v-model="splitForm.splitNum"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
@ -382,7 +377,7 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- 批次数量 -->
|
|
|
|
|
<el-col :offset="1" :span="4">
|
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
|
<el-form-item size="small" label="批次数量">
|
|
|
|
|
<el-input required @input="inBatch" type="number" v-model="item.batchQuantity"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -443,7 +438,7 @@ import {
|
|
|
|
|
checkWorkOrder
|
|
|
|
|
} from '@/api/plan/workorder'
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
import { getprodLineShift } from '@/api/plan/order'
|
|
|
|
|
import { getprodLineShift, getProEquipment, getProRoutes, getProShifts } from '@/api/plan/order'
|
|
|
|
|
export default {
|
|
|
|
|
name: "Workorder",
|
|
|
|
|
dicts: ['product_type','workorder_type','shift_type'],
|
|
|
|
@ -579,6 +574,17 @@ export default {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 选择线体改变
|
|
|
|
|
changeEquipment(){
|
|
|
|
|
if (this.splitForm.routeCode == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请先选择工艺!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 打印
|
|
|
|
|
handlePrint(params) {
|
|
|
|
|
printJS({
|
|
|
|
|
printable: params.printable, // 'printFrom', // 标签元素id
|
|
|
|
@ -681,6 +687,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 更改工艺 */
|
|
|
|
|
routeChange(e){
|
|
|
|
|
getProEquipment(e).then(response => {
|
|
|
|
|
this.proline = response.data
|
|
|
|
|
})
|
|
|
|
|
this.workForm.routeCode = e
|
|
|
|
|
},
|
|
|
|
|
/** 更改班次 */
|
|
|
|
@ -861,11 +870,16 @@ export default {
|
|
|
|
|
|
|
|
|
|
//初始化日期为默认今天
|
|
|
|
|
this.splitForm.productDate = new Date()
|
|
|
|
|
//获取成型机和班次
|
|
|
|
|
getprodLineShift(this.selectWork.prodType).then(response => {
|
|
|
|
|
this.proline = response.data.lines
|
|
|
|
|
this.workShift = response.data.shifts
|
|
|
|
|
this.routes = response.data.routes
|
|
|
|
|
// 获取班次信息
|
|
|
|
|
getProShifts().then(response => {
|
|
|
|
|
this.workShift = response.data
|
|
|
|
|
})
|
|
|
|
|
// 获取工艺信息
|
|
|
|
|
getProRoutes(this.selectWork.productCode).then(response => {
|
|
|
|
|
this.routes = response.data
|
|
|
|
|
getProEquipment(this.selectWork.routeCode).then(response => {
|
|
|
|
|
this.proline = response.data
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
// 获取批次信息list
|
|
|
|
|
getWorkBatchList(this.selectWork).then(response => {
|
|
|
|
|