2023-11-03 16:59:07 +08:00
|
|
|
<template>
|
|
|
|
<div class="orderDetailData">
|
|
|
|
<div class="box1">
|
|
|
|
<div class="boxTitle">
|
|
|
|
<span class="blueTitle"></span>
|
2023-11-09 15:01:50 +08:00
|
|
|
<span>订单编码: {{orderMsg.code}}</span>
|
2023-11-03 16:59:07 +08:00
|
|
|
</div>
|
2023-11-23 16:56:08 +08:00
|
|
|
<el-button type="primary" plain size="small" style="float: right;" @click="returnOrderManage"><svg-icon icon-class="return"/> 返回</el-button>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div style="padding-left: 14px;">
|
|
|
|
<el-row>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">订单名</div>
|
|
|
|
<div class="lightTip">{{orderMsg.name}}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">产品信息</div>
|
|
|
|
<div class="lightTip">{{orderMsg.productName}}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">产品规格</div>
|
|
|
|
<div class="lightTip">{{orderMsg.specifications}}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">客户</div>
|
|
|
|
<div class="lightTip">{{orderMsg.customerName}}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">包装规格</div>
|
|
|
|
<div class="lightTip">{{ getDictDataLabel(DICT_TYPE.PACK_SPEC, orderMsg.packSpec)}}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">物料计算方式</div>
|
|
|
|
<div class="lightTip">{{orderMsg.materialMethod ? (orderMsg.materialMethod === 1 ? '产品基础' : '工艺扩展') : ''}}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">创建时间</div>
|
2023-11-09 15:01:50 +08:00
|
|
|
<div class="lightTip">{{ parseTime(orderMsg.createTime) }}</div>
|
2023-11-03 16:59:07 +08:00
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">计划开始时间</div>
|
|
|
|
<div class="lightTip">{{ parseTime(orderMsg.planStartTime) }}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">计划完成时间</div>
|
|
|
|
<div class="lightTip">{{ parseTime(orderMsg.planFinishTime) }}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">计划加工数量</div>
|
|
|
|
<div class="lightTip">{{orderMsg.planQuantity}}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">加工平方数(平方米)</div>
|
|
|
|
<div class="lightTip">{{orderMsg.planArea}}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">预计用时(时)</div>
|
|
|
|
<div class="lightTip">{{ orderMsg.expectTime }}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">状态</div>
|
|
|
|
<div class="lightTip">{{getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderMsg.status)}}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">实际开始时间</div>
|
|
|
|
<div class="lightTip">{{ parseTime(orderMsg.startProduceTime) }}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">实际完成时间</div>
|
|
|
|
<div class="lightTip">{{ parseTime(orderMsg.finishProduceTime) }}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">实际生产数量</div>
|
|
|
|
<div class="lightTip">{{orderMsg.actualQuantity }}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">完成比%</div>
|
|
|
|
<div class="lightTip">{{orderMsg.completeProp}}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
2023-11-03 16:59:07 +08:00
|
|
|
<div class="blodTip">废片数量</div>
|
|
|
|
<div class="lightTip">{{orderMsg.nokQuantity}}</div>
|
|
|
|
</el-col>
|
2023-11-09 15:01:50 +08:00
|
|
|
<el-col :span='3'>
|
|
|
|
<div class="blodTip">负责人</div>
|
|
|
|
<div class="lightTip">{{orderMsg.workers}}</div>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span='3'>
|
|
|
|
<div class="blodTip">关联工艺</div>
|
|
|
|
<div class="lightTip">{{processFlowName}}</div>
|
|
|
|
</el-col>
|
2023-11-03 16:59:07 +08:00
|
|
|
</el-row>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="box2">
|
|
|
|
<div class="boxTitle">
|
|
|
|
<span class="blueTitle"></span>
|
|
|
|
<span>工单信息</span>
|
|
|
|
</div>
|
|
|
|
<!-- 列表 -->
|
|
|
|
<base-table
|
|
|
|
:page="queryParams.pageNo"
|
|
|
|
:limit="queryParams.pageSize"
|
|
|
|
:table-props="tableProps1"
|
|
|
|
:table-data="list1"
|
|
|
|
:max-height="tableH"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div class="box3">
|
|
|
|
<div class="boxTitle">
|
|
|
|
<span class="blueTitle"></span>
|
|
|
|
<span>预计用料信息</span>
|
|
|
|
</div>
|
|
|
|
<!-- 列表 -->
|
|
|
|
<base-table
|
|
|
|
:page="queryParams.pageNo"
|
|
|
|
:limit="queryParams.pageSize"
|
|
|
|
:table-props="tableProps2"
|
|
|
|
:table-data="list2"
|
|
|
|
:max-height="tableH"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import { parseTime } from '@/utils/ruoyi'
|
2023-11-09 15:01:50 +08:00
|
|
|
import { publicFormatter } from '@/utils/dict'
|
|
|
|
import { getProcessFlowList } from '@/api/base/orderManage'
|
2023-11-03 16:59:07 +08:00
|
|
|
const tableProps1 = [
|
|
|
|
{
|
|
|
|
prop: 'issueTime',
|
|
|
|
label: '下发时间',
|
|
|
|
filter: parseTime,
|
2023-11-22 16:58:32 +08:00
|
|
|
minWidth: 160
|
2023-11-03 16:59:07 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'name',
|
|
|
|
label: '工单名',
|
|
|
|
minWidth: 100,
|
|
|
|
showOverflowtooltip: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'code',
|
|
|
|
label: '工单编码',
|
|
|
|
minWidth: 150
|
|
|
|
},
|
|
|
|
{
|
2023-11-22 16:58:32 +08:00
|
|
|
prop: 'planAssignmentQuantity',
|
2023-11-03 16:59:07 +08:00
|
|
|
label: '计划加工量',
|
2023-11-22 16:58:32 +08:00
|
|
|
width: 100
|
2023-11-03 16:59:07 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'actualQuantity',
|
|
|
|
label: '实际加工量',
|
2023-11-22 16:58:32 +08:00
|
|
|
width: 100
|
2023-11-03 16:59:07 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'actualArea',
|
|
|
|
label: '加工平方数',
|
2023-11-22 16:58:32 +08:00
|
|
|
width: 100
|
2023-11-03 16:59:07 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'status',
|
|
|
|
label: '状态',
|
|
|
|
filter: publicFormatter('order_status')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'startProduceTime',
|
|
|
|
label: '开始时间',
|
|
|
|
filter: parseTime,
|
2023-11-22 16:58:32 +08:00
|
|
|
minWidth: 160
|
2023-11-03 16:59:07 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'finishProduceTime',
|
|
|
|
label: '结束时间',
|
|
|
|
filter: parseTime,
|
2023-11-22 16:58:32 +08:00
|
|
|
minWidth: 160
|
2023-11-03 16:59:07 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'productLineNames',
|
|
|
|
label: '关联产线',
|
2023-11-09 15:01:50 +08:00
|
|
|
filter: (val) => val ? val.join(',') : '',
|
2023-11-03 16:59:07 +08:00
|
|
|
showOverflowtooltip: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'workers',
|
|
|
|
label: '负责人'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'remark',
|
|
|
|
label: '备注'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
const tableProps2 = [
|
|
|
|
{
|
|
|
|
prop: 'materialName',
|
|
|
|
label: '物料名称'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'unit',
|
|
|
|
label: '单位',
|
|
|
|
filter: publicFormatter('unit_dict')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
prop: 'num',
|
|
|
|
label: '剩余生产预计消耗'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
import { orderDetail, bomUseNum } from '@/api/base/orderManage'
|
|
|
|
export default {
|
|
|
|
name: 'OrderDetailData',
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
orderId: '',
|
|
|
|
tableProps1,
|
|
|
|
tableProps2,
|
|
|
|
list1: [],
|
|
|
|
list2: [],
|
|
|
|
tableH: this.tableHeight(510) / 2,
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 500
|
|
|
|
},
|
2023-11-09 15:01:50 +08:00
|
|
|
orderMsg: {},
|
|
|
|
processFlowName: ''
|
2023-11-03 16:59:07 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
window.addEventListener('resize', () => {
|
|
|
|
this.tableH = this.tableHeight(510) / 2
|
|
|
|
})
|
2023-11-07 15:49:07 +08:00
|
|
|
this.orderId = location.href.split('?')[1].split('=')[1]
|
2023-11-03 16:59:07 +08:00
|
|
|
this.getMsg()
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
$route: 'initData'
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
initData(to) {
|
|
|
|
if (to.name === 'OrderDetailData') {
|
2023-11-07 15:49:07 +08:00
|
|
|
this.orderId = location.href.split('?')[1].split('=')[1]
|
2023-11-03 16:59:07 +08:00
|
|
|
this.getMsg()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
getMsg() {
|
|
|
|
orderDetail({
|
|
|
|
id: this.orderId
|
|
|
|
}).then(res => {
|
|
|
|
this.orderMsg = res.data
|
|
|
|
this.list1 = res.data.coreWorkOrderRespVOS
|
|
|
|
bomUseNum({
|
|
|
|
productId: this.orderMsg.planProductId
|
|
|
|
}).then(res2 => {
|
|
|
|
if (res2.data && res2.data.length > 0) {
|
|
|
|
let arr = res2.data
|
|
|
|
arr.map(item => {
|
|
|
|
if (item) {
|
2023-11-23 16:56:08 +08:00
|
|
|
let a = item.num * this.orderMsg.remainingQuantity
|
|
|
|
item.num = !isNaN(parseFloat(a)) && isFinite(a) ? a : ''
|
2023-11-03 16:59:07 +08:00
|
|
|
}
|
|
|
|
})
|
|
|
|
this.list2 = arr
|
|
|
|
}else {
|
|
|
|
this.list2 = []
|
|
|
|
}
|
|
|
|
})
|
2023-11-09 15:01:50 +08:00
|
|
|
// 工艺
|
|
|
|
getProcessFlowList().then(res => {
|
|
|
|
let arr = res.data || []
|
|
|
|
if (arr.length > 0) {
|
|
|
|
arr.map(item => {
|
|
|
|
if (item.id === this.orderMsg.processFlowId) {
|
|
|
|
this.processFlowName = item.name
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
2023-11-03 16:59:07 +08:00
|
|
|
})
|
2023-11-22 16:58:32 +08:00
|
|
|
},
|
|
|
|
// 返回
|
|
|
|
returnOrderManage() {
|
|
|
|
this.$router.push({path: '/order/base/order-manage'})
|
2023-11-03 16:59:07 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang='scss' scoped>
|
|
|
|
.orderDetailData {
|
|
|
|
background-color: rgb(242, 244, 249);
|
|
|
|
.box1, .box2, .box3 {
|
|
|
|
background-color: #fff;
|
|
|
|
border-radius: 9px;
|
|
|
|
}
|
|
|
|
.box2 {
|
|
|
|
height: calc((100vh - 360px) / 2);
|
|
|
|
padding: 12px 16px 0;
|
|
|
|
margin: 8px 0;
|
|
|
|
}
|
|
|
|
.box1 {
|
|
|
|
height: 215px;
|
|
|
|
padding: 16px 16px 0 16px;
|
|
|
|
.blodTip {
|
|
|
|
height: 16px;
|
2023-11-09 15:01:50 +08:00
|
|
|
font-size: 14px;
|
2023-11-03 16:59:07 +08:00
|
|
|
font-weight: 600;
|
|
|
|
color: rgba(0,0,0,0.85);
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
|
|
|
.lightTip {
|
|
|
|
height: 16px;
|
2023-11-09 15:01:50 +08:00
|
|
|
font-size: 14px;
|
2023-11-03 16:59:07 +08:00
|
|
|
font-weight: 400;
|
|
|
|
color: rgba(102,102,102,0.75);
|
|
|
|
margin-bottom: 12px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.box3 {
|
|
|
|
padding: 16px;
|
|
|
|
height: calc((100vh - 360px) / 2);
|
|
|
|
}
|
|
|
|
.boxTitle {
|
|
|
|
display: inline-block;
|
|
|
|
font-size: 16px;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #000000;
|
|
|
|
margin:0 10px 20px 0;
|
|
|
|
}
|
|
|
|
.blueTitle {
|
|
|
|
content: '';
|
|
|
|
display: inline-block;
|
|
|
|
width: 4px;
|
|
|
|
height: 18px;
|
|
|
|
background-color: #0B58FF;
|
|
|
|
border-radius: 1px;
|
|
|
|
margin-right: 8px;
|
|
|
|
vertical-align: bottom;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|