| | |
| | | method: "get", |
| | | }); |
| | | } |
| | | // 分页查询-产品订单 |
| | | export function queryList2(id) { |
| | | return request({ |
| | | url: "/productionBomStructure/listByBomId/" + id, |
| | | method: "get", |
| | | }); |
| | | } |
| | | export function add(data) { |
| | | return request({ |
| | | url: "/productStructure/" + data.bomId, |
| | |
| | | }); |
| | | } |
| | | // 分页查询-产品订单 |
| | | export function queryList2(id) { |
| | | return request({ |
| | | url: "/productionOrderStructure/getBomStructs/" + id, |
| | | method: "get", |
| | | }); |
| | | } |
| | | // export function queryList2(id) { |
| | | // return request({ |
| | | // url: "/productionOrderStructure/getBomStructs/" + id, |
| | | // method: "get", |
| | | // }); |
| | | // } |
| | | |
| | | export function add2(data) { |
| | | return request({ |
| | |
| | | prop="technologyOperationId" |
| | | width="200"> |
| | | <template #default="scope"> |
| | | {{ getProcessName(scope.row.technologyOperationId) || '-' }} |
| | | {{ scope.row.technologyOperationName || scope.row.operationName || '-' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="参数列表" |
| | |
| | | <!-- 序号圆圈 --> |
| | | <div class="card-header"> |
| | | <div class="card-number">{{ index + 1 }}</div> |
| | | <div class="card-process-name">{{ getProcessName(item.technologyOperationId) || '-' }}</div> |
| | | <div class="card-process-name">{{ item.technologyOperationName || item.operationName || '-' }}</div> |
| | | </div> |
| | | <!-- 产品信息 --> |
| | | <div class="card-content"> |
| | |
| | | <!-- 参数列表对话框 --> |
| | | <!-- :editable="!routeInfo.status" --> |
| | | <ProcessParamListDialog v-model="showParamListDialog" |
| | | :title="`${currentProcess ? (currentProcess.processName || getProcessName(currentProcess.technologyOperationId)) : ''} - 参数列表`" |
| | | :title="`${currentProcess ? (currentProcess.processName || currentProcess.technologyOperationName || currentProcess.operationName) : ''} - 参数列表`" |
| | | :route-id="routeId" |
| | | :order-id="orderId" |
| | | :process="currentProcess" |
| | |
| | | import { listProcessBom } from "@/api/productionManagement/productionOrder.js"; |
| | | import { |
| | | queryList, |
| | | queryList2, |
| | | addBomDetail, |
| | | } from "@/api/productionManagement/productStructure.js"; |
| | | |
| | |
| | | |
| | | const addPromise = isOrderPage |
| | | ? addRouteItem({ |
| | | productOrderId: orderId.value, |
| | | productRouteId: routeId.value, |
| | | productOrderId: Number(orderId.value), |
| | | productRouteId: Number(routeId.value), |
| | | technologyOperationId: form.value.technologyOperationId, |
| | | productModelId: form.value.productModelId, |
| | | isQuality: form.value.isQuality, |
| | |
| | | |
| | | const fetchBomData = async () => { |
| | | try { |
| | | const { data } = await queryList(routeInfo.value.bomId); |
| | | const isOrderPage = pageType.value === "order"; |
| | | const { data } = await (isOrderPage ? queryList2 : queryList)( |
| | | routeInfo.value.bomId |
| | | ); |
| | | bomDataValue.value.dataList = data || []; |
| | | normalizeTreeData(bomDataValue.value.dataList); |
| | | } catch (err) { |
| | |
| | | |
| | | const handleSaveBom = () => { |
| | | bomDataValue.value.loading = true; |
| | | console.log(bomDataValue.value.dataList, "bomDataValue.value.dataList"); |
| | | |
| | | normalizeTreeData(bomDataValue.value.dataList); |
| | | |
| | | const valid = validateAllBom(); |
| | | if (valid) { |
| | | addBomDetail({ |
| | | bomId: routeInfo.value.bomId, |
| | | bomId: Number(routeInfo.value.bomId), |
| | | children: buildSubmitTree(bomDataValue.value.dataList || []), |
| | | }) |
| | | .then(() => { |
| | |
| | | type: "text", |
| | | showHide: row => !row.processRouteCode, |
| | | clickFun: row => { |
| | | openBindRouteDialog(row); |
| | | openBindRouteDialog(row, "add"); |
| | | }, |
| | | }, |
| | | { |
| | | name: "更换工艺路线", |
| | | type: "text", |
| | | showHide: row => row.processRouteCode, |
| | | clickFun: row => { |
| | | openBindRouteDialog(row, "change"); |
| | | }, |
| | | }, |
| | | // { |
| | |
| | | // showProductStructure(row); |
| | | // }, |
| | | // }, |
| | | { |
| | | name: "领料", |
| | | type: "text", |
| | | clickFun: row => { |
| | | openMaterialDialog(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "领料详情", |
| | | type: "text", |
| | | clickFun: row => { |
| | | openMaterialDetailDialog(row); |
| | | }, |
| | | }, |
| | | // { |
| | | // name: "领料", |
| | | // type: "text", |
| | | // clickFun: row => { |
| | | // openMaterialDialog(row); |
| | | // }, |
| | | // }, |
| | | // { |
| | | // name: "领料详情", |
| | | // type: "text", |
| | | // clickFun: row => { |
| | | // openMaterialDetailDialog(row); |
| | | // }, |
| | | // }, |
| | | ], |
| | | }, |
| | | ]); |
| | |
| | | const materialDetailDialogVisible = ref(false); |
| | | const currentMaterialDetailOrder = ref(null); |
| | | |
| | | const openBindRouteDialog = async row => { |
| | | const openBindRouteDialog = async (row, type) => { |
| | | bindForm.orderId = row.id; |
| | | bindForm.routeId = null; |
| | | bindForm.routeId = type === "add" ? null : row.processRouteCode; |
| | | bindRouteDialogVisible.value = true; |
| | | routeOptions.value = []; |
| | | if (!row.productModelId) { |
| | |
| | | path: "/productionManagement/processRouteItem", |
| | | query: { |
| | | id: data.id, |
| | | bomId: data.bomId, |
| | | bomId: data.orderBomId, |
| | | processRouteCode: data.processRouteCode || "", |
| | | productName: row.productName || "", |
| | | model: row.model || "", |