change - 订单下达

main
yinq 5 months ago
parent cbc43feaac
commit d915fe3af9

@ -42,3 +42,12 @@ export function delProdOrderInfo(objId) {
method: 'delete' method: 'delete'
}) })
} }
// 根据订单生成工单
export function generateWorkOrder(query) {
return request({
url: '/mes/prod/prodOrderInfo/generateWorkOrder',
method: 'get',
params: query
})
}

@ -7,22 +7,24 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="订单编号:">{{ form.orderCode }}</el-form-item> <el-form-item label="订单编号:">{{ form.orderCode }}</el-form-item>
<!-- <el-form-item label="成品编码:">{{ form.materialCode }}</el-form-item>--> <el-form-item label="成品名称:">{{ form.materialName }}</el-form-item>
<el-form-item label="面积与重量:">{{ form.orderDetail.AreaAndWeight }}</el-form-item>
<el-form-item label="计划开始时间:">{{ parseTime(form.beginDate) }}</el-form-item> <el-form-item label="计划开始时间:">{{ parseTime(form.beginDate) }}</el-form-item>
<!-- <el-form-item label="选择生产BOM">--> <!-- <el-form-item label="选择生产BOM">-->
<!-- <el-select v-model="form.bomId" placeholder="请选择生产BOM">--> <!-- <el-select v-model="form.bomId" placeholder="请选择生产BOM">-->
<!-- <el-option--> <!-- <el-option-->
<!-- v-for="item in orderBomList"--> <!-- v-for="item in orderBomList"-->
<!-- :key="item.objId"--> <!-- :key="item.objId"-->
<!-- :label="item.materialAll"--> <!-- :label="item.materialAll"-->
<!-- :value="item.objId"--> <!-- :value="item.objId"-->
<!-- />--> <!-- />-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="计划数量(米):" label-width="140px"> {{ form.orderAmount }}</el-form-item> <el-form-item label="计划数量(米):" label-width="140px"> {{ form.orderAmount }}</el-form-item>
<el-form-item label="成品名称:" label-width="140px">{{ form.materialName }}</el-form-item> <el-form-item label="客户信息:">{{ form.orderDetail.CustomerInfo }}</el-form-item>
<el-form-item label="使用原材料:">{{ form.orderDetail.UsingRawMaterials }}</el-form-item>
<el-form-item label="计划结束时间:" label-width="140px">{{ parseTime(form.endDate) }}</el-form-item> <el-form-item label="计划结束时间:" label-width="140px">{{ parseTime(form.endDate) }}</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -61,14 +63,14 @@
<el-input v-model="scope.row.materialName" :disabled="true"/> <el-input v-model="scope.row.materialName" :disabled="true"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="派工数量" prop="planAmount" width="100"> <el-table-column align="center" label="计划数量" prop="planAmount" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.planAmount" :disabled="true"/> <el-input v-model="scope.row.planAmount" :disabled="true"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="计划工位" prop="stationCode" width="180"> <el-table-column align="center" label="生产工位" prop="stationCode" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.stationCode" placeholder="请选择计划工位"> <el-select v-model="scope.row.stationCode" placeholder="请选择生产工位">
<el-option <el-option
v-for="item in productLineList" v-for="item in productLineList"
:key="item.productLineCode" :key="item.productLineCode"
@ -80,7 +82,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="计划班组" prop="teamCode" width="200"> <el-table-column align="center" label="计划班组" prop="teamCode" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.teamCode" placeholder="请选择班组名称"> <el-select v-model="scope.row.teamCode" placeholder="请选择班组">
<el-option <el-option
v-for="item in teamMembersList" v-for="item in teamMembersList"
:key="item.teamCode" :key="item.teamCode"
@ -121,8 +123,7 @@
</template> </template>
<script> <script>
import { getProdOrderInfo } from '@/api/mes/prod/prodOrderInfo' import { generateWorkOrder } from '@/api/mes/prod/prodOrderInfo'
import { findOrderBomList, generateTickets } from '@/api/mes/prod/prodBomInfo'
import { getBaseProductLineList } from '@/api/mes/base/baseProductLine' import { getBaseProductLineList } from '@/api/mes/base/baseProductLine'
import { getTeamMembers } from '@/api/mes/base/baseTeamMembers' import { getTeamMembers } from '@/api/mes/base/baseTeamMembers'
import { orderAddProdPlanInfoList } from '@/api/mes/prod/prodPlanInfo' import { orderAddProdPlanInfoList } from '@/api/mes/prod/prodPlanInfo'
@ -174,13 +175,10 @@ export default {
const objId = this.$route.params && this.$route.params.objId const objId = this.$route.params && this.$route.params.objId
if (objId) { if (objId) {
// //
getProdOrderInfo(objId).then(res => { generateWorkOrder({ objId: objId }).then(res => {
this.form = res.data this.form = res.data.prodOrder
// BOM //
// findOrderBomList({ materialCode: this.form.materialCode, parentId: 0 }).then(res => { this.addTicketInfo(res.data.planInfoList)
// this.orderBomList = res.data
// })
this.addTicketInfo();
}) })
getBaseProductLineList({ productLineType: 2 }).then(response => { getBaseProductLineList({ productLineType: 2 }).then(response => {
this.productLineList = response.data this.productLineList = response.data
@ -215,22 +213,19 @@ export default {
}, },
// //
addTicketInfo(bomId) { addTicketInfo(planInfoList) {
this.mesProductPlanList = [] this.mesProductPlanList = []
// generateTickets({ ancestors: bomId }).then(res => { planInfoList.forEach(e => {
// let bomList = res.data let obj = {}
// bomList.forEach(e => { obj.planCode = e.planCode
// let obj = {} obj.orderCode = this.form.orderCode
// obj.planCode = e.planCode obj.materialCode = e.materialCode
// obj.orderCode = this.form.orderCode obj.materialName = e.materialName
// obj.materialCode = e.materialCode obj.planAmount = e.planAmount
// obj.materialName = e.materialName obj.planBeginTime = this.form.beginDate
// obj.planAmount = (e.standardAmount * this.form.orderAmount).toFixed(2) obj.planEndTime = this.form.endDate
// obj.planBeginTime = this.form.beginDate this.mesProductPlanList.push(obj)
// obj.planEndTime = this.form.endDate })
// this.mesProductPlanList.push(obj)
// })
// })
}, },
/** 生产计划明细序号 */ /** 生产计划明细序号 */

Loading…
Cancel
Save