| | |
| | | <div class="search_form"> |
| | | <el-form :model="searchForm" |
| | | :inline="true"> |
| | | <el-form-item label="客户名称:"> |
| | | <el-input v-model="searchForm.customerName" |
| | | placeholder="请输入" |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 160px;" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="合同号:"> |
| | | <el-input v-model="searchForm.salesContractNo" |
| | | placeholder="请输入" |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 160px;" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品名称:"> |
| | | <el-input v-model="searchForm.productCategory" |
| | | placeholder="请输入" |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 160px;" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="规格:"> |
| | | <el-input v-model="searchForm.specificationModel" |
| | | placeholder="请输入" |
| | | clearable |
| | | prefix-icon="Search" |
| | |
| | | |
| | | <new-product-order v-if="isShowNewModal" |
| | | v-model:visible="isShowNewModal" |
| | | type="qualified" |
| | | @completed="handleQuery" /> |
| | | </div> |
| | | </template> |
| | |
| | | productOrderListPage, |
| | | listProcessRoute, |
| | | bindingRoute, |
| | | listProcessBom, delProductOrder, |
| | | listProcessBom, delProductOrder, startOrPause, |
| | | } from "@/api/productionManagement/productionOrder.js"; |
| | | import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js"; |
| | | import {fileDel} from "@/api/financialManagement/revenueManagement.js"; |
| | |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "销售合同号", |
| | | prop: "salesContractNo", |
| | | width: '150px', |
| | | }, |
| | | { |
| | | label: "客户名称", |
| | | prop: "customerName", |
| | | width: '200px', |
| | | }, |
| | | { |
| | | label: "产品名称", |
| | | prop: "productCategory", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "图纸编号", |
| | | prop: "drawingNumber", |
| | | width: '160px', |
| | | }, |
| | | { |
| | | label: "规格", |
| | | prop: "specificationModel", |
| | | width: '120px', |
| | | width: '160px', |
| | | }, |
| | | { |
| | | label: "工艺路线编号", |
| | |
| | | label: "操作", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 200, |
| | | width: 240, |
| | | operation: [ |
| | | { |
| | | name: "开始", |
| | | type: "text", |
| | | showHide: row => row.status === '待生产', |
| | | clickFun: row => { |
| | | handleStartOrPause(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "暂停", |
| | | type: "text", |
| | | showHide: row => row.status === '生产中', |
| | | clickFun: row => { |
| | | handleStartOrPause(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "工艺路线", |
| | | type: "text", |
| | |
| | | }, |
| | | }, |
| | | { |
| | | name: "产品结构", |
| | | name: "物料清单", |
| | | type: "text", |
| | | clickFun: row => { |
| | | showProductStructure(row); |
| | |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | customerName: "", |
| | | salesContractNo: "", |
| | | projectName: "", |
| | | productCategory: "", |
| | | specificationModel: "", |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | |
| | | if (row.isFh) return ''; |
| | | |
| | | const diff = row.deliveryDaysDiff; |
| | | if (diff === undefined || diff === null || diff === '' || diff < 0) return ''; |
| | | |
| | | if (diff === 15) { |
| | | return 'yellow'; |
| | | } else if (diff === 10) { |
| | |
| | | const orderId = row.id; |
| | | try { |
| | | const res = await getOrderProcessRouteMain(orderId); |
| | | const data = res.data || {}; |
| | | if (!data || !data.id) { |
| | | const dataList = res.data || []; |
| | | if (!dataList || dataList.length === 0 || !dataList[0].id) { |
| | | proxy.$modal.msgWarning("未找到关联的工艺路线"); |
| | | return; |
| | | } |
| | | const data = dataList[0]; |
| | | router.push({ |
| | | path: "/productionManagement/processRouteItem", |
| | | query: { |
| | |
| | | } |
| | | }; |
| | | |
| | | const showProductStructure = row => { |
| | | const handleStartOrPause = async (row) => { |
| | | const operation = row.status === '待生产' ? 1 : 2; |
| | | const operationText = operation === 1 ? "开始" : "暂停"; |
| | | try { |
| | | await startOrPause({ id: row.id, operation }); |
| | | proxy.$modal.msgSuccess(`${operationText}成功`); |
| | | getList(); |
| | | } catch (e) { |
| | | console.error(`${operationText}失败:`, e); |
| | | proxy.$modal.msgError(`${operationText}失败`); |
| | | } |
| | | }; |
| | | |
| | | const showProductStructure = async row => { |
| | | let bomNo = row.bomNo || ""; |
| | | if (!bomNo && row.id) { |
| | | try { |
| | | const res = await getOrderProcessRouteMain(row.id); |
| | | const dataList = res.data || []; |
| | | if (dataList && dataList.length > 0 && dataList[0].bomNo) { |
| | | bomNo = dataList[0].bomNo; |
| | | } |
| | | } catch (e) { |
| | | console.error("获取BOM编号失败:", e); |
| | | } |
| | | } |
| | | router.push({ |
| | | path: "/productionManagement/productStructureDetail", |
| | | query: { |
| | | id: row.id, |
| | | bomNo: row.bomNo || "", |
| | | bomNo: bomNo, |
| | | drawingNumber: row.drawingNumber || "", |
| | | productName: row.productCategory || "", |
| | | productModelName: row.specificationModel || "", |
| | |
| | | align-items: start; |
| | | } |
| | | |
| | | ::v-deep .yellow { |
| | | :deep(.yellow) { |
| | | background-color: #FAF0DE; |
| | | } |
| | | |
| | | ::v-deep .pink { |
| | | :deep(.pink) { |
| | | background-color: #FAE1DE; |
| | | } |
| | | |
| | | ::v-deep .red { |
| | | background-color: #f80202; |
| | | :deep(.red) { |
| | | background-color: #FFCCCC; |
| | | } |
| | | |
| | | ::v-deep .purple{ |
| | | :deep(.purple){ |
| | | background-color: #F4DEFA; |
| | | } |
| | | </style> |