|
|
|
@ -161,6 +161,18 @@
|
|
|
|
|
>工单详情
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="warning"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
size="mini"
|
|
|
|
|
:disabled="single"
|
|
|
|
|
@click="editMachine"
|
|
|
|
|
v-hasPermi="['mes:pro:workorder:edit']"
|
|
|
|
|
>设备修改
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
@ -538,6 +550,75 @@
|
|
|
|
|
<el-button @click="subMaterielBP" class="my-materiel-btn" type="primary">确定</el-button>
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 工单设备修改模块 -->
|
|
|
|
|
<el-dialog :title="titleM" :visible.sync="openM" width="1000px" append-to-body>
|
|
|
|
|
<el-table
|
|
|
|
|
border
|
|
|
|
|
v-if="refreshProTable"
|
|
|
|
|
v-loading="proLoading"
|
|
|
|
|
:data="productData"
|
|
|
|
|
row-key="orderCode"
|
|
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column width="150" label="订单编号" prop="orderCode"/>
|
|
|
|
|
<el-table-column width="380" label="产品名称" align="center" prop="prodDesc"/>
|
|
|
|
|
<el-table-column width="60" label="单位" align="center" prop="unit"/>
|
|
|
|
|
<el-table-column width="130" label="产品数量" align="center" prop="quantity"/>
|
|
|
|
|
<el-table-column label="已拆分数量" align="center" prop="quantitySplit"/>
|
|
|
|
|
<el-table-column label="拆分数量" align="center" prop="atrr1"/>
|
|
|
|
|
</el-table>
|
|
|
|
|
<el-form class="my-margin" :model="splitFormM" ref="dynamicForm" label-width="80px">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item label="选择设备:">
|
|
|
|
|
<div style="height: 130px;overflow-y: auto;">
|
|
|
|
|
<el-cascader
|
|
|
|
|
:options="eRouteOptionsM"
|
|
|
|
|
:props="eRouteProps"
|
|
|
|
|
v-model="splitFormM.prodLineCodeArray"
|
|
|
|
|
clearable></el-cascader>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<!-- 拆分尾 -->
|
|
|
|
|
<el-table
|
|
|
|
|
border
|
|
|
|
|
:data="splitData"
|
|
|
|
|
v-if="refreshWorkerTable"
|
|
|
|
|
v-loading="workerLoading"
|
|
|
|
|
row-key="workorderCode"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
max-height="240"
|
|
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column width="200" align="center" prop="workorderCode" label="工单号"></el-table-column>
|
|
|
|
|
<el-table-column width="100" align="center" prop="productDate" label="工单日期"></el-table-column>
|
|
|
|
|
<el-table-column width="150" align="center" label="生产线体设备">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-popover width="250" placement="top-start" trigger="hover" :content="scope.row.prodLineCode">
|
|
|
|
|
<span slot="reference" class="btn">{{ scope.row.prodLineCode }}</span>
|
|
|
|
|
</el-popover>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column width="80" align="center" prop="quantitySplit" label="数量"></el-table-column>
|
|
|
|
|
<el-table-column width="60" label="单位" align="center" prop="unit"/>
|
|
|
|
|
<el-table-column width="90" label="工艺编码" align="center" prop="routeCode"/>
|
|
|
|
|
<el-table-column width="90" label="班次" align="center" prop="shiftDesc" :formatter="shiftFormat"/>
|
|
|
|
|
<el-table-column align="center" width="230" prop="batchCodeList" label="批次号"></el-table-column>
|
|
|
|
|
<el-table-column align="center" width="150" prop="batchNumList" label="批次数量"></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<!-- 测试 -->
|
|
|
|
|
<!-- 操作按钮 -->
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitFormM">确 定</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -549,7 +630,7 @@ import {
|
|
|
|
|
downWorkorder,
|
|
|
|
|
getOrderAndWork,getProSortNo,
|
|
|
|
|
getWorkBatchList,
|
|
|
|
|
subChangeWorkOrder,
|
|
|
|
|
subChangeWorkOrder,subChangeWorkOrderM,
|
|
|
|
|
checkWorkOrder
|
|
|
|
|
} from '@/api/plan/workorder'
|
|
|
|
|
import moment from 'moment';
|
|
|
|
@ -625,6 +706,9 @@ export default {
|
|
|
|
|
materialCode:null,
|
|
|
|
|
materialName:null
|
|
|
|
|
},
|
|
|
|
|
splitFormM: {
|
|
|
|
|
prodLineCodeArray: []
|
|
|
|
|
},
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
// 选中数组
|
|
|
|
@ -646,6 +730,7 @@ export default {
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
openM:false,
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
productDateArray: [new Date(), new Date()],
|
|
|
|
@ -703,6 +788,7 @@ export default {
|
|
|
|
|
/**********************************/
|
|
|
|
|
eRouteProps: {multiple: true},
|
|
|
|
|
eRouteOptions: [],
|
|
|
|
|
eRouteOptionsM: [],
|
|
|
|
|
// 班次
|
|
|
|
|
workShift: [],
|
|
|
|
|
//组成白坯物料弹窗
|
|
|
|
@ -940,7 +1026,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setAtrr1(this.productData[0], this.splitData[0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
@ -1434,7 +1520,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setAtrr1(this.productData[0], this.splitData[0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
@ -1443,10 +1529,72 @@ export default {
|
|
|
|
|
this.title = "生产工单详情";
|
|
|
|
|
this.showDetail = false;
|
|
|
|
|
},
|
|
|
|
|
//工单设备修改开始-----》》》
|
|
|
|
|
editMachine(row) {
|
|
|
|
|
// 数据初始化
|
|
|
|
|
this.reset();
|
|
|
|
|
this.splitData = [];
|
|
|
|
|
this.productData = [];
|
|
|
|
|
this.splitFormM = {
|
|
|
|
|
prodLineCodeArray: [],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取工艺设备信息
|
|
|
|
|
getProEquipment(this.selectWork.routeCode).then(response2 => {
|
|
|
|
|
this.eRouteOptionsM = response2.data
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
getOrderAndWork(this.selectWork).then(response => {
|
|
|
|
|
// 设置选择机型
|
|
|
|
|
this.splitFormM.prodLineCodeArray = response.data.workOrder.prodLineCodeArray
|
|
|
|
|
this.splitData.push(response.data.workOrder)
|
|
|
|
|
this.productData.push(response.data.order)
|
|
|
|
|
this.refreshProTable = false // 先将refreshProTable设置为false,隐藏表格
|
|
|
|
|
this.refreshWorkerTable = false // 先将refreshProTable设置为false,隐藏表格
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
// 使用$nextTick来等待DOM更新完成
|
|
|
|
|
this.refreshProTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
|
this.proLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
|
})
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
// 使用$nextTick来等待DOM更新完成
|
|
|
|
|
this.refreshWorkerTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
|
this.workerLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.openM = true;
|
|
|
|
|
this.titleM = "生产工单设备修改";
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//工单设备修改结束-----《《《《《《
|
|
|
|
|
|
|
|
|
|
// 工单设备变更-变更提交按钮
|
|
|
|
|
submitFormM() {
|
|
|
|
|
//下面是请求处理
|
|
|
|
|
const data = {
|
|
|
|
|
proOrderWorkorder: this.selectWork,
|
|
|
|
|
prodLineCodeArray: this.splitFormM.prodLineCodeArray
|
|
|
|
|
}
|
|
|
|
|
subChangeWorkOrderM(data).then(response => {
|
|
|
|
|
if (response.code == 500) {
|
|
|
|
|
this.$modal.msgError(response.msg)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.getList()
|
|
|
|
|
this.$modal.msgSuccess('提交成功')
|
|
|
|
|
})
|
|
|
|
|
// 清除缓存
|
|
|
|
|
this.splitFormM = {
|
|
|
|
|
prodLineCodeArray: []
|
|
|
|
|
}
|
|
|
|
|
this.openM = false
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 取消按钮
|
|
|
|
|
cancel() {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.openM = false;
|
|
|
|
|
this.showDetail = true;
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|