|
|
|
@ -499,6 +499,13 @@
|
|
|
|
|
<el-table-column align="center" width="150" prop="batchNumList" label="批次数量"></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<!-- 测试 -->
|
|
|
|
|
<el-row style="margin-top: 20px">
|
|
|
|
|
<el-steps :active="2">
|
|
|
|
|
<el-step title="成型" :description="totalQuantity_cx"></el-step>
|
|
|
|
|
<el-step title="烘房" :description="totalQuantity_hf"></el-step>
|
|
|
|
|
</el-steps>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<!-- 操作按钮 -->
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm" v-if="showDetail">确 定</el-button>
|
|
|
|
@ -640,6 +647,7 @@ import {
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
import { getProEquipment, getProRoutes, getProShifts,selectMaterielList} from '@/api/plan/order'
|
|
|
|
|
import {prototype} from "clipboard";
|
|
|
|
|
import {getHourProductionList} from '@/api/plan/whiteOrder';
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "WorkorderBP",
|
|
|
|
@ -728,6 +736,9 @@ export default {
|
|
|
|
|
showSearch: true,
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
//成型产量
|
|
|
|
|
totalQuantity_cx: 0,
|
|
|
|
|
totalQuantity_hf: 0,
|
|
|
|
|
// 生产工单表格数据
|
|
|
|
|
workorderList: [],
|
|
|
|
|
// 弹出层标题
|
|
|
|
@ -1445,6 +1456,34 @@ export default {
|
|
|
|
|
getWorkBatchList(this.selectWork).then(response => {
|
|
|
|
|
this.formFields = response.data
|
|
|
|
|
})
|
|
|
|
|
//获取产量信息
|
|
|
|
|
|
|
|
|
|
getHourProductionList({
|
|
|
|
|
workorderCode: this.selectWork.workorderCode,
|
|
|
|
|
}).then(response => {
|
|
|
|
|
let totalQuantity_cx = 0;
|
|
|
|
|
let totalQuantity_hf = 0;
|
|
|
|
|
|
|
|
|
|
// 遍历返回的结果,查找 equName 包含“成型”和“烘房”的项
|
|
|
|
|
response.forEach(item => {
|
|
|
|
|
// 确保 quantity 是数字类型
|
|
|
|
|
const quantity = Number(item.quantity) || 0;
|
|
|
|
|
|
|
|
|
|
if (item.equName.includes("成型")) {
|
|
|
|
|
totalQuantity_cx += quantity;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
response.forEach(item => {
|
|
|
|
|
// 确保 quantity 是数字类型
|
|
|
|
|
const quantity = Number(item.quantity) || 0;
|
|
|
|
|
|
|
|
|
|
if (item.equName.includes("烘房")) {
|
|
|
|
|
totalQuantity_hf += quantity;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.totalQuantity_cx = totalQuantity_cx;
|
|
|
|
|
this.totalQuantity_hf = totalQuantity_hf;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 获取工单和订单信息
|
|
|
|
|
// 在获取到新的数据后执行以下代码
|
|
|
|
|