|
|
|
@ -7,7 +7,8 @@
|
|
|
|
|
<el-row :gutter="10">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<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="选择生产BOM:">-->
|
|
|
|
|
<!-- <el-select v-model="form.bomId" placeholder="请选择生产BOM">-->
|
|
|
|
@ -22,7 +23,8 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<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-col>
|
|
|
|
|
</el-row>
|
|
|
|
@ -61,14 +63,14 @@
|
|
|
|
|
<el-input v-model="scope.row.materialName" :disabled="true"/>
|
|
|
|
|
</template>
|
|
|
|
|
</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">
|
|
|
|
|
<el-input v-model="scope.row.planAmount" :disabled="true"/>
|
|
|
|
|
</template>
|
|
|
|
|
</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">
|
|
|
|
|
<el-select v-model="scope.row.stationCode" placeholder="请选择计划工位">
|
|
|
|
|
<el-select v-model="scope.row.stationCode" placeholder="请选择生产工位">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in productLineList"
|
|
|
|
|
:key="item.productLineCode"
|
|
|
|
@ -80,7 +82,7 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="计划班组" prop="teamCode" width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.teamCode" placeholder="请选择班组名称">
|
|
|
|
|
<el-select v-model="scope.row.teamCode" placeholder="请选择班组">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in teamMembersList"
|
|
|
|
|
:key="item.teamCode"
|
|
|
|
@ -121,8 +123,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getProdOrderInfo } from '@/api/mes/prod/prodOrderInfo'
|
|
|
|
|
import { findOrderBomList, generateTickets } from '@/api/mes/prod/prodBomInfo'
|
|
|
|
|
import { generateWorkOrder } from '@/api/mes/prod/prodOrderInfo'
|
|
|
|
|
import { getBaseProductLineList } from '@/api/mes/base/baseProductLine'
|
|
|
|
|
import { getTeamMembers } from '@/api/mes/base/baseTeamMembers'
|
|
|
|
|
import { orderAddProdPlanInfoList } from '@/api/mes/prod/prodPlanInfo'
|
|
|
|
@ -174,13 +175,10 @@ export default {
|
|
|
|
|
const objId = this.$route.params && this.$route.params.objId
|
|
|
|
|
if (objId) {
|
|
|
|
|
// 获取表详细信息
|
|
|
|
|
getProdOrderInfo(objId).then(res => {
|
|
|
|
|
this.form = res.data
|
|
|
|
|
// 查询生产BOM列表
|
|
|
|
|
// findOrderBomList({ materialCode: this.form.materialCode, parentId: 0 }).then(res => {
|
|
|
|
|
// this.orderBomList = res.data
|
|
|
|
|
// })
|
|
|
|
|
this.addTicketInfo();
|
|
|
|
|
generateWorkOrder({ objId: objId }).then(res => {
|
|
|
|
|
this.form = res.data.prodOrder
|
|
|
|
|
// 根据订单生成工单
|
|
|
|
|
this.addTicketInfo(res.data.planInfoList)
|
|
|
|
|
})
|
|
|
|
|
getBaseProductLineList({ productLineType: 2 }).then(response => {
|
|
|
|
|
this.productLineList = response.data
|
|
|
|
@ -215,22 +213,19 @@ export default {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//添加工单信息
|
|
|
|
|
addTicketInfo(bomId) {
|
|
|
|
|
addTicketInfo(planInfoList) {
|
|
|
|
|
this.mesProductPlanList = []
|
|
|
|
|
// generateTickets({ ancestors: bomId }).then(res => {
|
|
|
|
|
// let bomList = res.data
|
|
|
|
|
// bomList.forEach(e => {
|
|
|
|
|
// let obj = {}
|
|
|
|
|
// obj.planCode = e.planCode
|
|
|
|
|
// obj.orderCode = this.form.orderCode
|
|
|
|
|
// obj.materialCode = e.materialCode
|
|
|
|
|
// obj.materialName = e.materialName
|
|
|
|
|
// obj.planAmount = (e.standardAmount * this.form.orderAmount).toFixed(2)
|
|
|
|
|
// obj.planBeginTime = this.form.beginDate
|
|
|
|
|
// obj.planEndTime = this.form.endDate
|
|
|
|
|
// this.mesProductPlanList.push(obj)
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
planInfoList.forEach(e => {
|
|
|
|
|
let obj = {}
|
|
|
|
|
obj.planCode = e.planCode
|
|
|
|
|
obj.orderCode = this.form.orderCode
|
|
|
|
|
obj.materialCode = e.materialCode
|
|
|
|
|
obj.materialName = e.materialName
|
|
|
|
|
obj.planAmount = e.planAmount
|
|
|
|
|
obj.planBeginTime = this.form.beginDate
|
|
|
|
|
obj.planEndTime = this.form.endDate
|
|
|
|
|
this.mesProductPlanList.push(obj)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 生产计划明细序号 */
|
|
|
|
|