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

yangwl
wws 1 year ago
parent 022bf207bf
commit 839c65dcb6

@ -1,6 +1,30 @@
import request from '@/utils/request' 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) { export function getWorkOrderList(id) {
return request({ return request({
url: '/plan/order/getWorkOrderList/' + id, url: '/plan/order/getWorkOrderList/' + id,
@ -8,7 +32,7 @@ export function getWorkOrderList(id) {
}) })
} }
//通过母订单id查询最新订单列表 // 通过母订单id查询最新订单列表
export function getOrderList(id) { export function getOrderList(id) {
return request({ return request({
url: '/plan/order/getOrderList/' + id, url: '/plan/order/getOrderList/' + id,

@ -124,16 +124,16 @@
>导出 >导出
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="info" <!-- type="info"-->
plain <!-- plain-->
icon="el-icon-sort" <!-- icon="el-icon-sort"-->
size="mini" <!-- size="mini"-->
@click="toggleExpandAll" <!-- @click="toggleExpandAll"-->
>展开/折叠 <!-- >展开/折叠-->
</el-button> <!-- </el-button>-->
</el-col> <!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -334,22 +334,26 @@
<!-- 编辑框 --> <!-- 编辑框 -->
<!-- 第一行 --> <!-- 第一行 -->
<el-row> <el-row>
<!-- 选择产线 --> <el-col :span="7">
<el-col :span="6"> <!-- 选择工艺 -->
<el-form-item label="选择机型:"> <el-form-item size="small" label="选择工艺:" class="my-select my-first">
<el-select size="small" v-model="splitForm.prodLineCode" placeholder="请选择成型机"> <el-select @change="changeRoute" v-model="splitForm.routeCode" placeholder="请选择工艺">
<el-option v-for="item in proline" :key="item.key" :label="item.label" :value="item.key"></el-option> <el-option v-for="item in routes" :key="item.routeCode" :label="item.routeName"
:value="item.routeCode"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 拆分数量 --> <el-col :offset="1" :span="7">
<el-col :offset="2" :span="7"> <!-- 选择产线 -->
<el-form-item size="small" label="拆分数量:"> <el-form-item label="选择线体:">
<el-input required type="number" @input="splitNumChange" v-model="splitForm.splitNum"></el-input> <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-form-item>
</el-col> </el-col>
<!-- 工单日期 -->
<el-col :offset="1" :span="5"> <el-col :offset="1" :span="5">
<!-- 工单日期 -->
<el-form-item size="small" label="工单日期: "> <el-form-item size="small" label="工单日期: ">
<el-date-picker @change="checkDate" v-model="splitForm.productDate" type="date" placeholder="选择日期" <el-date-picker @change="checkDate" v-model="splitForm.productDate" type="date" placeholder="选择日期"
></el-date-picker> ></el-date-picker>
@ -358,7 +362,7 @@
</el-row> </el-row>
<!-- 第二行 --> <!-- 第二行 -->
<el-row> <el-row>
<el-col :span="6"> <el-col :span="7">
<!-- 选择班次 --> <!-- 选择班次 -->
<el-form-item size="small" label="选择班次:" class="my-select my-first"> <el-form-item size="small" label="选择班次:" class="my-select my-first">
<el-select v-model="splitForm.shiftId" placeholder="请选择班次"> <el-select v-model="splitForm.shiftId" placeholder="请选择班次">
@ -368,14 +372,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :offset="2" :span="6"> <el-col :offset="1" :span="7">
<!-- 选择工艺 --> <!-- 拆分数量 -->
<el-form-item size="small" label="选择工艺:" class="my-select my-first"> <el-form-item size="small" label="拆分数量:">
<el-select v-model="splitForm.routeCode" placeholder="请选择工艺"> <el-input required type="number" @input="splitNumChange" v-model="splitForm.splitNum"></el-input>
<el-option v-for="item in routes" :key="item.routeCode" :label="item.routeName"
:value="item.routeCode"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -388,7 +388,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 批次数量 --> <!-- 批次数量 -->
<el-col :offset="1" :span="4"> <el-col :offset="1" :span="7">
<el-form-item size="small" label="批次数量"> <el-form-item size="small" label="批次数量">
<el-input required @input="inBatch" type="number" v-model="item.batchQuantity"></el-input> <el-input required @input="inBatch" type="number" v-model="item.batchQuantity"></el-input>
</el-form-item> </el-form-item>
@ -435,6 +435,9 @@
<script> <script>
import { import {
getProEquipment,
getProRoutes,
getProShifts,
getWorkOrderList, getWorkOrderList,
getOrderList, getOrderList,
subSplitOrder, subSplitOrder,
@ -569,6 +572,22 @@ export default {
}) })
}, },
methods: { 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){ addQuantity(num){
if (num<=0){ if (num<=0){
@ -642,11 +661,14 @@ export default {
}) })
// //
this.splitForm.productDate = new Date() this.splitForm.productDate = new Date()
//
getprodLineShift(row.orderType).then(response => { //
this.proline = response.data.lines getProShifts().then(response => {
this.workShift = response.data.shifts this.workShift = response.data
this.routes = response.data.routes })
//
getProRoutes(row.prodCode).then(response => {
this.routes = response.data
}) })
this.workerLoading = true // true this.workerLoading = true // true
@ -848,7 +870,7 @@ export default {
} }
if (this.splitForm.prodLineCode == null) { if (this.splitForm.prodLineCode == null) {
this.$message({ this.$message({
message: '请选择机型', message: '请选择线体',
type: 'warning' type: 'warning'
}) })
return return

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

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

Loading…
Cancel
Save