| | |
| | | <span class="info-value">{{ routeInfo.bomNo || '-' }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="info-item" |
| | | v-if="routeInfo.quantity && routeInfo.quantity !== 0"> |
| | | <div class="info-label-wrapper"> |
| | | <span class="info-label">需求数量</span> |
| | | </div> |
| | | <div class="info-value-wrapper"> |
| | | <span class="info-value">{{ routeInfo.quantity || '-' }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="info-item full-width" |
| | | v-if="routeInfo.description"> |
| | | <div class="info-label-wrapper"> |
| | |
| | | <div class="section-header" |
| | | style="margin-top: 20px;"> |
| | | <div class="section-title">BOM 结构</div> |
| | | <!-- <div class="section-actions" |
| | | <div class="section-actions" |
| | | v-if="pageType === 'order'"> |
| | | <el-button v-if="!bomDataValue.isEdit" |
| | | type="primary" |
| | |
| | | :loading="bomDataValue.loading"> |
| | | 保存BOM |
| | | </el-button> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | <el-table :data="bomTableData" |
| | | border |
| | |
| | | :step="1" |
| | | controls-position="right" |
| | | style="width: 100%" |
| | | @change="handleUnitQuantityChange(row)" |
| | | :disabled="!bomDataValue.isEdit || bomDataValue.dataList.some(item => (item).tempId === row.tempId)" /> |
| | | </el-form-item> |
| | | </template> |
| | |
| | | import { |
| | | queryList, |
| | | queryList2, |
| | | addBomDetail, |
| | | add2, |
| | | } from "@/api/productionManagement/productStructure.js"; |
| | | |
| | | import { useRoute } from "vue-router"; |
| | |
| | | model: "", |
| | | bomNo: "", |
| | | description: "", |
| | | quantity: 0, |
| | | }); |
| | | |
| | | const processOptions = ref([]); |
| | |
| | | bomNo: route.query.bomNo || "", |
| | | bomId: route.query.bomId || "", |
| | | description: route.query.description || "", |
| | | quantity: route.query.quantity || 0, |
| | | status: !(route.query.status == 1 || route.query.status === "false"), |
| | | }; |
| | | bomTableData.value[0].productName = routeInfo.value.productName; |
| | |
| | | // 查看参数列表 |
| | | const handleViewParams = row => { |
| | | currentProcess.value = row; |
| | | const query = { |
| | | const param = { |
| | | productionOrderRoutingOperationId: row.id, |
| | | productionOrderId: orderId.value, |
| | | }; |
| | | const param1 = { |
| | | technologyRoutingOperationId: row.id, |
| | | productionOrderId: orderId.value, |
| | | }; |
| | | |
| | | const apiPromise = |
| | | pageType.value === "order" |
| | | ? findProcessParamListOrder(query) |
| | | : getProcessParamList(query); |
| | | ? findProcessParamListOrder(param) |
| | | : getProcessParamList(param1); |
| | | |
| | | apiPromise |
| | | .then(res => { |
| | |
| | | }); |
| | | }; |
| | | |
| | | const handleUnitQuantityChange = row => { |
| | | if (routeInfo.value.quantity && routeInfo.value.quantity !== 0) { |
| | | row.demandedQuantity = (row.unitQuantity || 0) * routeInfo.value.quantity; |
| | | } |
| | | }; |
| | | |
| | | const addchildItem = (item, tempId) => { |
| | | if (item.tempId === tempId) { |
| | | if (!item.children) { |
| | |
| | | "", |
| | | operationName: "", |
| | | unitQuantity: 1, |
| | | demandedQuantity: 0, |
| | | demandedQuantity: |
| | | routeInfo.value.quantity && routeInfo.value.quantity !== 0 |
| | | ? 1 * routeInfo.value.quantity |
| | | : 0, |
| | | children: [], |
| | | unit: "", |
| | | tempId: new Date().getTime(), |
| | |
| | | "", |
| | | operationName: "", |
| | | unitQuantity: 1, |
| | | demandedQuantity: 0, |
| | | demandedQuantity: |
| | | routeInfo.value.quantity && routeInfo.value.quantity !== 0 |
| | | ? 1 * routeInfo.value.quantity |
| | | : 0, |
| | | unit: "", |
| | | children: [], |
| | | tempId: new Date().getTime(), |
| | |
| | | |
| | | const valid = validateAllBom(); |
| | | if (valid) { |
| | | addBomDetail({ |
| | | bomId: Number(routeInfo.value.bomId), |
| | | add2({ |
| | | // bomId: Number(routeInfo.value.bomId), |
| | | productionOrderBomId: Number(routeInfo.value.bomId) || null, |
| | | children: buildSubmitTree(bomDataValue.value.dataList || []), |
| | | }) |
| | | .then(() => { |