计划模块(湿料异常卡死BUG解决、订单拆分页页面布局+工艺线体逻辑变更、工单修改页面布局+工艺线体逻辑变更)

master
wws 1 year ago
parent 022bf207bf
commit 839c65dcb6

@ -1,6 +1,30 @@
import request from '@/utils/request'
//通过母订单id查询最新工单列表
// 获取班次信息
export function getProShifts() {
return request({
url: '/plan/order/getProShifts/',
method: 'get'
})
}
// 通过物料code获取工艺信息
export function getProRoutes(prodCode) {
return request({
url: '/plan/order/getProRoutes/' + prodCode,
method: 'get'
})
}
// 通过工艺code获取设备信息
export function getProEquipment(routeCode) {
return request({
url: '/plan/order/getProEquipment/' + routeCode,
method: 'get'
})
}
// 通过母订单id查询最新工单列表
export function getWorkOrderList(id) {
return request({
url: '/plan/order/getWorkOrderList/' + id,
@ -8,7 +32,7 @@ export function getWorkOrderList(id) {
})
}
//通过母订单id查询最新订单列表
// 通过母订单id查询最新订单列表
export function getOrderList(id) {
return request({
url: '/plan/order/getOrderList/' + id,

@ -124,16 +124,16 @@
>导出
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-sort"
size="mini"
@click="toggleExpandAll"
>展开/折叠
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="info"-->
<!-- plain-->
<!-- icon="el-icon-sort"-->
<!-- size="mini"-->
<!-- @click="toggleExpandAll"-->
<!-- >展开/折叠-->
<!-- </el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -334,22 +334,26 @@
<!-- 编辑框 -->
<!-- 第一行 -->
<el-row>
<!-- 选择产线 -->
<el-col :span="6">
<el-form-item label="选择机型:">
<el-select 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="changeRoute" 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 @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>
@ -358,7 +362,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 v-model="splitForm.shiftId" placeholder="请选择班次">
@ -368,14 +372,10 @@
</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 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>
@ -388,7 +388,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>
@ -435,6 +435,9 @@
<script>
import {
getProEquipment,
getProRoutes,
getProShifts,
getWorkOrderList,
getOrderList,
subSplitOrder,
@ -569,6 +572,22 @@ export default {
})
},
methods: {
//
changeRoute(routeCode) {
getProEquipment(routeCode).then(response => {
this.proline = response.data
})
},
// 线
changeEquipment(){
if (this.splitForm.routeCode == null) {
this.$message({
message: '请先选择工艺!',
type: 'warning'
})
return
}
},
// -
addQuantity(num){
if (num<=0){
@ -642,11 +661,14 @@ export default {
})
//
this.splitForm.productDate = new Date()
//
getprodLineShift(row.orderType).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(row.prodCode).then(response => {
this.routes = response.data
})
this.workerLoading = true // true
@ -848,7 +870,7 @@ export default {
}
if (this.splitForm.prodLineCode == null) {
this.$message({
message: '请选择机型',
message: '请选择线体',
type: 'warning'
})
return

@ -549,7 +549,6 @@ export default {
})
return
}
return
//
if (this.checkSelect === false) {
this.$message({

@ -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 => {

Loading…
Cancel
Save