| | |
| | | <!-- 生产订单 --> |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | |
| | | @selection-change="handleSelectionChange" |
| | | @pagination="pagination"> |
| | | <template #completionStatus="{ row }"> |
| | | <el-progress |
| | | :percentage="toProgressPercentage(row?.completionStatus)" |
| | | :color="progressColor(toProgressPercentage(row?.completionStatus))" |
| | | :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" |
| | | /> |
| | | <div class="progress-link" @click="goProductionDetail(row)"> |
| | | <el-progress |
| | | :percentage="toProgressPercentage(row?.completionStatus)" |
| | | :color="progressColor(toProgressPercentage(row?.completionStatus))" |
| | | :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" |
| | | /> |
| | | </div> |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | |
| | | const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue")); |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const { priority_type } = proxy.useDict("priority_type"); |
| | | |
| | | const router = useRouter(); |
| | | const isShowNewModal = ref(false); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "优先级", |
| | | prop: "priority", |
| | | width: '100px', |
| | | dataType: "tag", |
| | | formatData: val => proxy.selectDictLabel(priority_type.value, val), |
| | | formatType: val => { |
| | | const v = Number(val); |
| | | if (v === 0) return "danger"; // 红色 |
| | | if (v === 1) return "warning"; // 黄色 |
| | | if (v === 2) return "success"; // 绿色 |
| | | return ""; |
| | | }, |
| | | }, |
| | | { |
| | | label: "生产批号", |
| | | prop: "lotNo", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "生产订单号", |
| | | prop: "npsNo", |
| | |
| | | { |
| | | name: "工艺路线", |
| | | type: "text", |
| | | showHide: row => row.processRouteCode, |
| | | clickFun: row => { |
| | | showRouteItemModal(row); |
| | | }, |
| | |
| | | }); |
| | | }; |
| | | |
| | | const goProductionDetail = (row) => { |
| | | if (!row) return; |
| | | router.push({ |
| | | path: "/productionManagement/productionOrder/detail", |
| | | query: { |
| | | orderId: row.id, |
| | | npsNo: row.npsNo || "", |
| | | lotNo: row.lotNo || "", |
| | | productCategory: row.productCategory || "", |
| | | specificationModel: row.specificationModel || "", |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | // 表格选择数据 |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | |
| | | ::v-deep .purple{ |
| | | background-color: #F4DEFA; |
| | | } |
| | | .progress-link { |
| | | cursor: pointer; |
| | | } |
| | | |
| | | </style> |