| | |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | export function finishOrder(id) { |
| | | return request({ |
| | | url: `/productOrder/${id}`, |
| | | method: "patch", |
| | | }); |
| | | } |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æææï¼å¹´ï¼ï¼" prop="validityPeriod"> |
| | | <el-input-number |
| | | :step="0.01" |
| | | :min="0" |
| | | style="width: 100%" |
| | | v-model="modelForm.validityPeriod" |
| | | placeholder="请è¾å
¥æææ" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿¡åè¯å·ï¼" prop="filingCertificateNo"> |
| | | <el-input |
| | | v-model="modelForm.filingCertificateNo" |
| | | placeholder="请è¾å
¥å¤æ¡åè¯å·" |
| | | clearable |
| | | @keydown.enter.prevent |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="UIDç ï¼" prop="uidNo"> |
| | | <el-input |
| | | v-model="modelForm.uidNo" |
| | | placeholder="请è¾å
¥UIDç " |
| | | clearable |
| | | @keydown.enter.prevent |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "æææï¼å¹´ï¼", |
| | | prop: "validityPeriod", |
| | | }, |
| | | { |
| | | label: "夿¡åè¯å·", |
| | | prop: "filingCertificateNo", |
| | | }, |
| | | { |
| | | label: "UIDç ", |
| | | prop: "uidNo", |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | | align: "center", |
| | |
| | | modelForm: { |
| | | model: "", |
| | | unit: "", |
| | | validityPeriod: undefined, |
| | | filingCertificateNo: undefined, |
| | | uidNo: undefined, |
| | | }, |
| | | modelRules: { |
| | | model: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | |
| | | <el-form :model="form" label-width="120px" :rules="formRules" ref="formRef"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤ç¼å·" prop="deviceCode"> |
| | | <el-input v-model="form.deviceCode" placeholder="请è¾å
¥è®¾å¤ç¼å·" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤åç§°" prop="deviceName"> |
| | | <el-input v-model="form.deviceName" placeholder="请è¾å
¥è®¾å¤åç§°" /> |
| | | </el-form-item> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¾åºå" prop="supplierName"> |
| | | <el-input v-model="form.supplierName" placeholder="请è¾å
¥ä¾åºå" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="转æ°(转/min)" prop="rpm"> |
| | | <el-input-number :min="0" style="width: 100%" |
| | | v-model="form.rpm" |
| | | placeholder="请è¾å
¥è½¬æ°" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é¢è®¡è¿è¡æ¶é´" prop="planRuntimeTime"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é¢è®¡è¿è¡æ¶é´" prop="planRuntimeTime"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="form.planRuntimeTime" |
| | |
| | | 'å
¶ä»è®¾å¤' |
| | | ]); |
| | | const formRules = { |
| | | deviceCode: [{ required: true, trigger: "blur", message: "请è¾å
¥è®¾å¤ç¼å·" }], |
| | | deviceName: [{ required: true, trigger: "blur", message: "请è¾å
¥" }], |
| | | deviceModel: [{ required: true, trigger: "blur", message: "请è¾å
¥" }], |
| | | type: [{ required: true, trigger: "change", message: "è¯·éæ©æè¾å
¥è®¾å¤ç±»å" }], |
| | |
| | | } |
| | | |
| | | const { form, resetForm } = useFormData({ |
| | | deviceCode: undefined, // 设å¤ç¼å· |
| | | deviceName: undefined, // 设å¤åç§° |
| | | deviceModel: undefined, // è§æ ¼åå· |
| | | deviceBrand: undefined, // 设å¤åç |
| | |
| | | } |
| | | const { code, data } = await getLedgerById(id); |
| | | if (code == 200) { |
| | | form.deviceCode = data.deviceCode; |
| | | form.deviceName = data.deviceName; |
| | | form.deviceModel = data.deviceModel; |
| | | form.deviceBrand = data.deviceBrand; |
| | |
| | | }, |
| | | [ |
| | | { |
| | | label: "设å¤ç¼å·", |
| | | prop: "deviceCode", |
| | | }, |
| | | { |
| | | label: "设å¤åç§°", |
| | | prop: "deviceName", |
| | | }, |
| | |
| | | prop: "supplierName", |
| | | }, |
| | | { |
| | | label: "转æ°(转/min)", |
| | | prop: "rpm", |
| | | }, |
| | | { |
| | | label: "åæ¾ä½ç½®", |
| | | prop: "storageLocation", |
| | | }, |
| | |
| | | prop="model" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column label="UIDç " |
| | | prop="uidNO" |
| | | show-overflow-tooltip/> |
| | | <el-table-column |
| | | label="åä½" |
| | | prop="unit" |
| | |
| | | <el-table-column label="è§æ ¼åå·" |
| | | prop="model" |
| | | show-overflow-tooltip/> |
| | | <el-table-column label="UIDç " |
| | | prop="uidNO" |
| | | show-overflow-tooltip/> |
| | | <el-table-column label="åä½" |
| | | prop="unit" |
| | | show-overflow-tooltip/> |
| | |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | <el-table-column label="产å大类" prop="productName" show-overflow-tooltip /> |
| | | <el-table-column label="è§æ ¼åå·" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="UIDç " prop="uidNo" show-overflow-tooltip /> |
| | | <el-table-column label="åä½" prop="unit" show-overflow-tooltip /> |
| | | <el-table-column label="åºåæ°é" prop="qualitity" show-overflow-tooltip /> |
| | | <el-table-column label="å»ç»æ°é" prop="lockedQuantity" show-overflow-tooltip /> |
| | |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | <el-table-column label="产å大类" prop="productName" show-overflow-tooltip /> |
| | | <el-table-column label="è§æ ¼åå·" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="UIDç " prop="uidNo" show-overflow-tooltip /> |
| | | <el-table-column label="åä½" prop="unit" show-overflow-tooltip /> |
| | | <el-table-column label="åºåæ°é" prop="qualitity" show-overflow-tooltip /> |
| | | <el-table-column label="å»ç»æ°é" prop="lockedQuantity" show-overflow-tooltip /> |
| | |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="UIDç " |
| | | prop="uidç " |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="åä½" |
| | | prop="unit" |
| | | show-overflow-tooltip |
| | |
| | | prop: "model", |
| | | }, |
| | | { |
| | | label: "UIDç ", |
| | | prop: "uidç ", |
| | | }, |
| | | { |
| | | label: "BOMç¼å·", |
| | | prop: "bomNo", |
| | | }, |
| | |
| | | width: 100 |
| | | }, |
| | | { |
| | | label: "UIDç ", |
| | | prop: "uidNo", |
| | | width: 100 |
| | | }, |
| | | { |
| | | label: "夿³¨", |
| | | prop: "remark", |
| | | minWidth: 160 |
| | |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 160px;" |
| | | @change="handleQuery" /> |
| | | @change="handleQuery"/> |
| | | </el-form-item> |
| | | <el-form-item label="ååå·:"> |
| | | <el-input v-model="searchForm.salesContractNo" |
| | |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 160px;" |
| | | @change="handleQuery" /> |
| | | @change="handleQuery"/> |
| | | </el-form-item> |
| | | <el-form-item label="产ååç§°:"> |
| | | <el-input v-model="searchForm.productCategory" |
| | |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 160px;" |
| | | @change="handleQuery" /> |
| | | @change="handleQuery"/> |
| | | </el-form-item> |
| | | <el-form-item label="è§æ ¼:"> |
| | | <el-input v-model="searchForm.specificationModel" |
| | |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 160px;" |
| | | @change="handleQuery" /> |
| | | @change="handleQuery"/> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" |
| | | @click="handleQuery">æç´¢</el-button> |
| | | @click="handleQuery">æç´¢ |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | |
| | | @pagination="pagination"> |
| | | <template #completionStatus="{ row }"> |
| | | <el-progress |
| | | :percentage="toProgressPercentage(row?.completionStatus)" |
| | | :color="progressColor(toProgressPercentage(row?.completionStatus))" |
| | | :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" |
| | | :percentage="toProgressPercentage(row?.completionStatus)" |
| | | :color="progressColor(toProgressPercentage(row?.completionStatus))" |
| | | :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" |
| | | /> |
| | | </template> |
| | | </PIMTable> |
| | |
| | | <el-option v-for="item in routeOptions" |
| | | :key="item.id" |
| | | :label="`${item.processRouteCode || ''}`" |
| | | :value="item.id" /> |
| | | :value="item.id"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | </el-dialog> |
| | | |
| | | <new-product-order v-if="isShowNewModal" |
| | | v-model:visible="isShowNewModal" |
| | | @completed="handleQuery" /> |
| | | v-model:visible="isShowNewModal" |
| | | @completed="handleQuery"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { onMounted, ref } from "vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import { useRouter } from "vue-router"; |
| | | import { |
| | | productOrderListPage, |
| | | listProcessRoute, |
| | | bindingRoute, |
| | | listProcessBom, delProductOrder, |
| | | } from "@/api/productionManagement/productionOrder.js"; |
| | | import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js"; |
| | | import {fileDel} from "@/api/financialManagement/revenueManagement.js"; |
| | | import PIMTable from "@/components/PIMTable/PIMTable.vue"; |
| | | const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue")); |
| | | import {onMounted, ref} from "vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import {useRouter} from "vue-router"; |
| | | import { |
| | | productOrderListPage, |
| | | listProcessRoute, |
| | | bindingRoute, |
| | | delProductOrder, finishOrder, |
| | | } from "@/api/productionManagement/productionOrder.js"; |
| | | import {listMain as getOrderProcessRouteMain} from "@/api/productionManagement/productProcessRoute.js"; |
| | | import {fileDel} from "@/api/financialManagement/revenueManagement.js"; |
| | | import PIMTable from "@/components/PIMTable/PIMTable.vue"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue")); |
| | | |
| | | const router = useRouter(); |
| | | const isShowNewModal = ref(false); |
| | | const {proxy} = getCurrentInstance(); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "ç产订åå·", |
| | | prop: "npsNo", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "产ååç§°", |
| | | prop: "productCategory", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "è§æ ¼", |
| | | prop: "specificationModel", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "å·¥èºè·¯çº¿ç¼å·", |
| | | prop: "processRouteCode", |
| | | width: '200px', |
| | | }, |
| | | { |
| | | label: "é¢è®¡ç产æ°é", |
| | | prop: "quantity", |
| | | width: '140px', |
| | | }, |
| | | { |
| | | label: "宿æ°é", |
| | | prop: "completeQuantity", |
| | | }, |
| | | { |
| | | dataType: "slot", |
| | | label: "宿è¿åº¦", |
| | | prop: "completionStatus", |
| | | slot: "completionStatus", |
| | | width: 180, |
| | | }, |
| | | { |
| | | label: "å¼å§æ¥æ", |
| | | prop: "startTime", |
| | | formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""), |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "ç»ææ¥æ", |
| | | prop: "endTime", |
| | | formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""), |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "äº¤ä»æ¥æ", |
| | | prop: "deliveryDate", |
| | | formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""), |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "é¢è®¡æ¥ç¨ï¼å¤©ï¼", |
| | | prop: "expectedSchedule", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "å¶é çç»", |
| | | prop: "manufacturingTeam", |
| | | width: 120, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 200, |
| | | operation: [ |
| | | { |
| | | name: "å·¥èºè·¯çº¿", |
| | | type: "text", |
| | | clickFun: row => { |
| | | showRouteItemModal(row); |
| | | }, |
| | | const router = useRouter(); |
| | | const isShowNewModal = ref(false); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "ç产订åå·", |
| | | prop: "npsNo", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "产ååç§°", |
| | | prop: "productCategory", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "è§æ ¼", |
| | | prop: "specificationModel", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "UIDç ", |
| | | prop: "uidNo", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "å·¥èºè·¯çº¿ç¼å·", |
| | | prop: "processRouteCode", |
| | | width: '200px', |
| | | }, |
| | | { |
| | | label: "é¢è®¡ç产æ°é", |
| | | prop: "quantity", |
| | | width: '140px', |
| | | }, |
| | | { |
| | | label: "宿æ°é", |
| | | prop: "completeQuantity", |
| | | }, |
| | | { |
| | | dataType: "slot", |
| | | label: "宿è¿åº¦", |
| | | prop: "completionStatus", |
| | | slot: "completionStatus", |
| | | width: 180, |
| | | }, |
| | | { |
| | | label: "å¼å§æ¥æ", |
| | | prop: "startTime", |
| | | formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""), |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "ç»ææ¥æ", |
| | | prop: "endTime", |
| | | formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""), |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "äº¤ä»æ¥æ", |
| | | prop: "deliveryDate", |
| | | formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""), |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "é¢è®¡æ¥ç¨ï¼å¤©ï¼", |
| | | prop: "expectedSchedule", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "å¶é çç»", |
| | | prop: "manufacturingTeam", |
| | | width: 120, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 200, |
| | | operation: [ |
| | | { |
| | | name: "å·¥èºè·¯çº¿", |
| | | type: "text", |
| | | clickFun: row => { |
| | | showRouteItemModal(row); |
| | | }, |
| | | { |
| | | name: "ç»å®å·¥èºè·¯çº¿", |
| | | type: "text", |
| | | showHide: row => !row.processRouteCode, |
| | | clickFun: row => { |
| | | openBindRouteDialog(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "ç»å®å·¥èºè·¯çº¿", |
| | | type: "text", |
| | | showHide: row => !row.processRouteCode, |
| | | clickFun: row => { |
| | | openBindRouteDialog(row); |
| | | }, |
| | | { |
| | | name: "产åç»æ", |
| | | type: "text", |
| | | clickFun: row => { |
| | | showProductStructure(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "产åç»æ", |
| | | type: "text", |
| | | clickFun: row => { |
| | | showProductStructure(row); |
| | | }, |
| | | ], |
| | | }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0, |
| | | }); |
| | | const selectedRows = ref([]); |
| | | }, |
| | | { |
| | | name: "ç»æç产", |
| | | type: "text", |
| | | showHide: row => !row.isEnd, |
| | | clickFun: row => { |
| | | handleFinishOrder(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0, |
| | | }); |
| | | const selectedRows = ref([]); |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | customerName: "", |
| | | salesContractNo: "", |
| | | projectName: "", |
| | | productCategory: "", |
| | | specificationModel: "", |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | const data = reactive({ |
| | | searchForm: { |
| | | customerName: "", |
| | | salesContractNo: "", |
| | | projectName: "", |
| | | productCategory: "", |
| | | specificationModel: "", |
| | | }, |
| | | }); |
| | | const {searchForm} = toRefs(data); |
| | | |
| | | const toProgressPercentage = val => { |
| | | const n = Number(val); |
| | | if (!Number.isFinite(n)) return 0; |
| | | if (n <= 0) return 0; |
| | | if (n >= 100) return 100; |
| | | return Math.round(n); |
| | | }; |
| | | const toProgressPercentage = val => { |
| | | const n = Number(val); |
| | | if (!Number.isFinite(n)) return 0; |
| | | if (n <= 0) return 0; |
| | | if (n >= 100) return 100; |
| | | return Math.round(n); |
| | | }; |
| | | |
| | | // 30/50/80/100 åæ®µé¢è²ï¼çº¢/æ©/è/绿 |
| | | const progressColor = percentage => { |
| | | const p = toProgressPercentage(percentage); |
| | | if (p < 30) return "#f56c6c"; |
| | | if (p < 50) return "#e6a23c"; |
| | | if (p < 80) return "#409eff"; |
| | | return "#67c23a"; |
| | | }; |
| | | // 30/50/80/100 åæ®µé¢è²ï¼çº¢/æ©/è/绿 |
| | | const progressColor = percentage => { |
| | | const p = toProgressPercentage(percentage); |
| | | if (p < 30) return "#f56c6c"; |
| | | if (p < 50) return "#e6a23c"; |
| | | if (p < 80) return "#409eff"; |
| | | return "#67c23a"; |
| | | }; |
| | | |
| | | // æ·»å 表è¡ç±»åæ¹æ³ |
| | | const tableRowClassName = ({ row }) => { |
| | | if (!row.deliveryDate) return ''; |
| | | if (row.isFh) return ''; |
| | | // æ·»å 表è¡ç±»åæ¹æ³ |
| | | const tableRowClassName = ({row}) => { |
| | | if (!row.deliveryDate) return ''; |
| | | if (row.isFh) return ''; |
| | | |
| | | const diff = row.deliveryDaysDiff; |
| | | if (diff === 15) { |
| | | return 'yellow'; |
| | | } else if (diff === 10) { |
| | | return 'pink'; |
| | | } else if (diff === 2) { |
| | | return 'purple'; |
| | | } else if (diff < 2) { |
| | | return 'red'; |
| | | } |
| | | }; |
| | | const diff = row.deliveryDaysDiff; |
| | | if (diff === 15) { |
| | | return 'yellow'; |
| | | } else if (diff === 10) { |
| | | return 'pink'; |
| | | } else if (diff === 2) { |
| | | return 'purple'; |
| | | } else if (diff < 2) { |
| | | return 'red'; |
| | | } |
| | | }; |
| | | |
| | | // ç»å®å·¥èºè·¯çº¿å¼¹æ¡ |
| | | const bindRouteDialogVisible = ref(false); |
| | | const bindRouteLoading = ref(false); |
| | | const bindRouteSaving = ref(false); |
| | | const routeOptions = ref([]); |
| | | const bindForm = reactive({ |
| | | orderId: null, |
| | | routeId: null, |
| | | }); |
| | | // ç»å®å·¥èºè·¯çº¿å¼¹æ¡ |
| | | const bindRouteDialogVisible = ref(false); |
| | | const bindRouteLoading = ref(false); |
| | | const bindRouteSaving = ref(false); |
| | | const routeOptions = ref([]); |
| | | const bindForm = reactive({ |
| | | orderId: null, |
| | | routeId: null, |
| | | }); |
| | | |
| | | const openBindRouteDialog = async row => { |
| | | bindForm.orderId = row.id; |
| | | bindForm.routeId = null; |
| | | bindRouteDialogVisible.value = true; |
| | | routeOptions.value = []; |
| | | if (!row.productModelId) { |
| | | proxy.$modal.msgWarning("å½å订å缺å°äº§ååå·ï¼æ æ³æ¥è¯¢å·¥èºè·¯çº¿"); |
| | | bindRouteDialogVisible.value = false; |
| | | return; |
| | | } |
| | | bindRouteLoading.value = true; |
| | | try { |
| | | const res = await listProcessRoute({ productModelId: row.productModelId }); |
| | | routeOptions.value = res.data || []; |
| | | } catch (e) { |
| | | console.error("è·åå·¥èºè·¯çº¿å表失败ï¼", e); |
| | | proxy.$modal.msgError("è·åå·¥èºè·¯çº¿å表失败"); |
| | | } finally { |
| | | bindRouteLoading.value = false; |
| | | } |
| | | }; |
| | | const openBindRouteDialog = async row => { |
| | | bindForm.orderId = row.id; |
| | | bindForm.routeId = null; |
| | | bindRouteDialogVisible.value = true; |
| | | routeOptions.value = []; |
| | | if (!row.productModelId) { |
| | | proxy.$modal.msgWarning("å½å订å缺å°äº§ååå·ï¼æ æ³æ¥è¯¢å·¥èºè·¯çº¿"); |
| | | bindRouteDialogVisible.value = false; |
| | | return; |
| | | } |
| | | bindRouteLoading.value = true; |
| | | try { |
| | | const res = await listProcessRoute({productModelId: row.productModelId}); |
| | | routeOptions.value = res.data || []; |
| | | } catch (e) { |
| | | console.error("è·åå·¥èºè·¯çº¿å表失败ï¼", e); |
| | | proxy.$modal.msgError("è·åå·¥èºè·¯çº¿å表失败"); |
| | | } finally { |
| | | bindRouteLoading.value = false; |
| | | } |
| | | }; |
| | | |
| | | const handleBindRouteConfirm = async () => { |
| | | if (!bindForm.routeId) { |
| | | proxy.$modal.msgWarning("è¯·éæ©å·¥èºè·¯çº¿"); |
| | | return; |
| | | } |
| | | bindRouteSaving.value = true; |
| | | try { |
| | | await bindingRoute({ |
| | | id: bindForm.orderId, |
| | | routeId: bindForm.routeId, |
| | | }); |
| | | proxy.$modal.msgSuccess("ç»å®æå"); |
| | | bindRouteDialogVisible.value = false; |
| | | getList(); |
| | | } catch (e) { |
| | | console.error("ç»å®å·¥èºè·¯çº¿å¤±è´¥ï¼", e); |
| | | proxy.$modal.msgError("ç»å®å·¥èºè·¯çº¿å¤±è´¥"); |
| | | } finally { |
| | | bindRouteSaving.value = false; |
| | | } |
| | | }; |
| | | |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | const handleBindRouteConfirm = async () => { |
| | | if (!bindForm.routeId) { |
| | | proxy.$modal.msgWarning("è¯·éæ©å·¥èºè·¯çº¿"); |
| | | return; |
| | | } |
| | | bindRouteSaving.value = true; |
| | | try { |
| | | await bindingRoute({ |
| | | id: bindForm.orderId, |
| | | routeId: bindForm.routeId, |
| | | }); |
| | | proxy.$modal.msgSuccess("ç»å®æå"); |
| | | bindRouteDialogVisible.value = false; |
| | | getList(); |
| | | }; |
| | | const pagination = obj => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | const changeDaterange = value => { |
| | | if (value) { |
| | | searchForm.value.entryDateStart = value[0]; |
| | | searchForm.value.entryDateEnd = value[1]; |
| | | } else { |
| | | searchForm.value.entryDateStart = undefined; |
| | | searchForm.value.entryDateEnd = undefined; |
| | | } |
| | | handleQuery(); |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | // æé ä¸ä¸ªæ°ç对象ï¼ä¸å
å«entryDateåæ®µ |
| | | const params = { ...searchForm.value, ...page }; |
| | | params.entryDate = undefined; |
| | | productOrderListPage(params) |
| | | } catch (e) { |
| | | console.error("ç»å®å·¥èºè·¯çº¿å¤±è´¥ï¼", e); |
| | | proxy.$modal.msgError("ç»å®å·¥èºè·¯çº¿å¤±è´¥"); |
| | | } finally { |
| | | bindRouteSaving.value = false; |
| | | } |
| | | }; |
| | | |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const pagination = obj => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | const changeDaterange = value => { |
| | | if (value) { |
| | | searchForm.value.entryDateStart = value[0]; |
| | | searchForm.value.entryDateEnd = value[1]; |
| | | } else { |
| | | searchForm.value.entryDateStart = undefined; |
| | | searchForm.value.entryDateEnd = undefined; |
| | | } |
| | | handleQuery(); |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | // æé ä¸ä¸ªæ°ç对象ï¼ä¸å
å«entryDateåæ®µ |
| | | const params = {...searchForm.value, ...page}; |
| | | params.entryDate = undefined; |
| | | productOrderListPage(params) |
| | | .then(res => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records; |
| | |
| | | .catch(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }; |
| | | }; |
| | | |
| | | const showRouteItemModal = async row => { |
| | | const orderId = row.id; |
| | | try { |
| | | const res = await getOrderProcessRouteMain(orderId); |
| | | const data = res.data || {}; |
| | | if (!data || !data.id) { |
| | | proxy.$modal.msgWarning("æªæ¾å°å
³èçå·¥èºè·¯çº¿"); |
| | | return; |
| | | } |
| | | router.push({ |
| | | path: "/productionManagement/processRouteItem", |
| | | query: { |
| | | id: data.id, |
| | | processRouteCode: data.processRouteCode || "", |
| | | productName: data.productName || "", |
| | | model: data.model || "", |
| | | bomNo: data.bomNo || "", |
| | | description: data.description || "", |
| | | orderId, |
| | | type: "order", |
| | | }, |
| | | }); |
| | | } catch (e) { |
| | | console.error("è·åå·¥èºè·¯çº¿ä¸»ä¿¡æ¯å¤±è´¥ï¼", e); |
| | | proxy.$modal.msgError("è·åå·¥èºè·¯çº¿ä¿¡æ¯å¤±è´¥"); |
| | | const showRouteItemModal = async row => { |
| | | const orderId = row.id; |
| | | try { |
| | | const res = await getOrderProcessRouteMain(orderId); |
| | | const data = res.data || {}; |
| | | if (!data || !data.id) { |
| | | proxy.$modal.msgWarning("æªæ¾å°å
³èçå·¥èºè·¯çº¿"); |
| | | return; |
| | | } |
| | | }; |
| | | |
| | | const showProductStructure = row => { |
| | | router.push({ |
| | | path: "/productionManagement/productStructureDetail", |
| | | path: "/productionManagement/processRouteItem", |
| | | query: { |
| | | id: row.id, |
| | | bomNo: row.bomNo || "", |
| | | productName: row.productCategory || "", |
| | | productModelName: row.specificationModel || "", |
| | | orderId: row.id, |
| | | id: data.id, |
| | | processRouteCode: data.processRouteCode || "", |
| | | productName: data.productName || "", |
| | | model: data.model || "", |
| | | bomNo: data.bomNo || "", |
| | | description: data.description || "", |
| | | orderId, |
| | | type: "order", |
| | | }, |
| | | }); |
| | | }; |
| | | } catch (e) { |
| | | console.error("è·åå·¥èºè·¯çº¿ä¸»ä¿¡æ¯å¤±è´¥ï¼", e); |
| | | proxy.$modal.msgError("è·åå·¥èºè·¯çº¿ä¿¡æ¯å¤±è´¥"); |
| | | } |
| | | }; |
| | | |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | const showProductStructure = row => { |
| | | router.push({ |
| | | path: "/productionManagement/productStructureDetail", |
| | | query: { |
| | | id: row.id, |
| | | bomNo: row.bomNo || "", |
| | | productName: row.productCategory || "", |
| | | productModelName: row.specificationModel || "", |
| | | orderId: row.id, |
| | | type: "order", |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | ids = selectedRows.value.map((item) => item.id); |
| | | } else { |
| | | proxy.$modal.msgWarning("è¯·éæ©æ°æ®"); |
| | | return; |
| | | } |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å é¤ï¼æ¯å¦ç¡®è®¤å é¤ï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }).then(() => { |
| | | delProductOrder(ids).then((res) => { |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | getList(); |
| | | }); |
| | | }).catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | ids = selectedRows.value.map((item) => item.id); |
| | | } else { |
| | | proxy.$modal.msgWarning("è¯·éæ©æ°æ®"); |
| | | return; |
| | | } |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å é¤ï¼æ¯å¦ç¡®è®¤å é¤ï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }).then(() => { |
| | | delProductOrder(ids).then((res) => { |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | getList(); |
| | | }); |
| | | }; |
| | | }).catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | |
| | | // å¯¼åº |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | // å¯¼åº |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/productOrder/export", {...searchForm.value}, "ç产订å.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | }; |
| | | |
| | | const handleConfirmRoute = () => {}; |
| | | const handleConfirmRoute = () => { |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | const handleFinishOrder = (row) => { |
| | | ElMessageBox.confirm("æ¯å¦ç¡®è®¤ç»æï¼", "ç»æ", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | finishOrder(row.id).then(res => { |
| | | proxy.$modal.msgSuccess("ç»ææå"); |
| | | getList() |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .search_form{ |
| | | .search_form { |
| | | align-items: start; |
| | | } |
| | | |
| | |
| | | background-color: #f80202; |
| | | } |
| | | |
| | | ::v-deep .purple{ |
| | | ::v-deep .purple { |
| | | background-color: #F4DEFA; |
| | | } |
| | | </style> |
| | |
| | | width: 350, |
| | | operation: [ |
| | | { |
| | | name: "æ¥ç", |
| | | name: "çäº§åæ°", |
| | | type: "text", |
| | | clickFun: row => { |
| | | showProcessParamModal(row); |
| | |
| | | |
| | | // 设å¤å表åé
ç½® |
| | | const deviceColumns = ref([ |
| | | { label: "设å¤ç¼å·", prop: "deviceCode" }, |
| | | { label: "设å¤åç§°", prop: "deviceName" }, |
| | | { label: "è§æ ¼åå·", prop: "deviceModel" }, |
| | | { label: "设å¤åç", prop: "deviceBrand" }, |
| | |
| | | |
| | | // å¯é设å¤å表åé
ç½® |
| | | const selectDeviceColumns = ref([ |
| | | { label: "设å¤ç¼å·", prop: "deviceCode" }, |
| | | { label: "设å¤åç§°", prop: "deviceName" }, |
| | | { label: "è§æ ¼åå·", prop: "deviceModel" }, |
| | | { label: "设å¤åç", prop: "deviceBrand" }, |
| | |
| | | prop: 'model', |
| | | }, |
| | | { |
| | | label: 'UIDå', |
| | | prop: 'uid_no', |
| | | }, |
| | | { |
| | | label: 'æå
¥æ°é', |
| | | prop: 'quantity', |
| | | }, |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "UIDç ", |
| | | prop: "uidNo", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "äº§åºæ°é", |
| | | prop: "quantity", |
| | | width: 120, |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <script setup lang="ts"> |
| | | import {computed, reactive, ref, watch} from "vue"; |
| | | |
| | | defineOptions({ |
| | | name: "ProductionRecordForm" |
| | | }); |
| | | |
| | | const props = defineProps({ |
| | | list: { |
| | | type: Array, |
| | | default() { |
| | | return []; |
| | | } |
| | | }, |
| | | labelWidth: { |
| | | type: Number, |
| | | default: 120 |
| | | } |
| | | }); |
| | | |
| | | const formRef = ref(); |
| | | const formData = reactive({ |
| | | list: [] as any[], |
| | | }); |
| | | |
| | | const fieldLabel = (item: any) => { |
| | | if (!item.unit || item.unit === "/") { |
| | | return item.parameterItem; |
| | | } |
| | | return `${item.parameterItem}ï¼${item.unit}ï¼`; |
| | | }; |
| | | |
| | | const getType = (item: any) => item.type || "ææ¬æ ¼å¼"; |
| | | |
| | | const rules = computed(() => { |
| | | const result: Record<string, any[]> = {}; |
| | | formData.list.forEach((item, index) => { |
| | | if (String(item.isRequired) === "1") { |
| | | result[`list.${index}.value`] = [{required: true, message: `请è¾å
¥${item.parameterItem}`, trigger: "blur"}]; |
| | | } |
| | | }); |
| | | return result; |
| | | }); |
| | | |
| | | const initData = () => { |
| | | formData.list = props.list || []; |
| | | formData.list.forEach(item => { |
| | | if (item.value === undefined) { |
| | | item.value = null; |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | const submitData = async () => { |
| | | const valid = await formRef.value.validate().catch(() => false) |
| | | |
| | | if (valid) { |
| | | return formData.list |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | |
| | | watch( |
| | | () => props.list, |
| | | () => { |
| | | initData(); |
| | | }, |
| | | {immediate: true, deep: true} |
| | | ); |
| | | |
| | | defineExpose({ |
| | | submitData |
| | | }) |
| | | </script> |
| | | |
| | | <template> |
| | | <el-form ref="formRef" :model="formData" :rules="rules" :label-width="`${labelWidth}px`"> |
| | | <el-form-item |
| | | v-for="(item, index) in formData.list" |
| | | :key="item.id" |
| | | :label="fieldLabel(item)" |
| | | :prop="`list.${index}.value`" |
| | | > |
| | | <el-input-number |
| | | v-if="getType(item) === 'æ°å¼æ ¼å¼'" |
| | | v-model="item.value" |
| | | :controls="false" |
| | | style="width: 100%" |
| | | placeholder="请è¾å
¥" |
| | | /> |
| | | <el-date-picker |
| | | v-else-if="getType(item) === 'æ¶é´æ ¼å¼'" |
| | | v-model="item.value" |
| | | type="datetime" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | /> |
| | | <el-date-picker |
| | | v-else-if="getType(item) === 'æ¥ææ ¼å¼'" |
| | | v-model="item.value" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | /> |
| | | <el-select |
| | | v-else-if="getType(item) === 'æ¯/å¦éæ¡'" |
| | | v-model="item.value" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="æ¯" value="æ¯"/> |
| | | <el-option label="å¦" value="å¦"/> |
| | | </el-select> |
| | | <el-input |
| | | v-else |
| | | v-model="item.value" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | |
| | | :value="user.userId" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤éæ©"> |
| | | <el-select v-model="reportForm.deviceId" |
| | | style="width: 300px" |
| | | placeholder="è¯·éæ©è®¾å¤" |
| | | clearable |
| | | filterable |
| | | @change="handleDeviceChange"> |
| | | <el-option v-for="device in deviceOptions" |
| | | :key="device.id" |
| | | :label="device.deviceName" |
| | | :value="device.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="currentDevice" label="设å¤ç¼å·"> |
| | | <el-input v-model="currentDevice.deviceCode" |
| | | disabled |
| | | style="width: 300px" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="currentDevice" label="转æ°"> |
| | | <el-input v-model="currentDevice.rpm" |
| | | disabled |
| | | style="width: 300px" /> |
| | | </el-form-item> |
| | | <ProductionRecordForm ref="productionRecordFormRef" :list="processParamList"/> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { onMounted, ref, nextTick } from "vue"; |
| | | import { onMounted, ref, nextTick, computed } from "vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import { |
| | |
| | | downProductWorkOrder, |
| | | } from "@/api/productionManagement/workOrder.js"; |
| | | import { getUserProfile, userListNoPageByTenantId } from "@/api/system/user.js"; |
| | | import { getBindDevices } from "@/api/productionManagement/productionProcess.js"; |
| | | import QRCode from "qrcode"; |
| | | import { getCurrentInstance, reactive, toRefs } from "vue"; |
| | | import FilesDia from "./components/filesDia.vue"; |
| | | import { |
| | | listPage as listProcessParamPage, |
| | | } from "@/api/productionManagement/productProcessParameter.js"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const ProductionRecordForm = defineAsyncComponent(() => import("./components/ProductionRecordForm.vue")); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | |
| | | { |
| | | label: "è§æ ¼", |
| | | prop: "model", |
| | | }, |
| | | { |
| | | label: "UIDç ", |
| | | prop: "uidNo", |
| | | }, |
| | | { |
| | | label: "åä½", |
| | |
| | | clickFun: row => { |
| | | showReportDialog(row); |
| | | }, |
| | | disabled: row => row.planQuantity <= 0, |
| | | disabled: row => row.planQuantity <= 0 || row.productOrderIsEnd, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | const workOrderFilesRef = ref(null); |
| | | const reportFormRef = ref(null); |
| | | const userOptions = ref([]); |
| | | const deviceOptions = ref([]); |
| | | const reportForm = reactive({ |
| | | planQuantity: 0, |
| | | totalInvestment: 0, |
| | |
| | | productProcessRouteItemId: "", |
| | | userId: "", |
| | | productMainId: null, |
| | | deviceId: null, |
| | | otherData: { |
| | | rows: [] |
| | | }, |
| | | }); |
| | | const productionRecordFormRef = ref(); |
| | | |
| | | const currentDevice = computed(() => { |
| | | if (!reportForm.deviceId) return null; |
| | | return deviceOptions.value.find(device => device.id === reportForm.deviceId) || null; |
| | | }); |
| | | |
| | | // æå
¥æ»ééªè¯è§å |
| | |
| | | }); |
| | | }; |
| | | |
| | | const showReportDialog = row => { |
| | | const processParamPage = reactive({ |
| | | current: 1, |
| | | size: 9999, |
| | | total: 0, |
| | | }); |
| | | const getProcessParamList = async (row) => { |
| | | const params = { |
| | | processId: row.processId, |
| | | ...processParamPage, |
| | | }; |
| | | const res = await listProcessParamPage(params) |
| | | return res.data.records |
| | | }; |
| | | |
| | | const processParamList = ref([]) |
| | | const showReportDialog = async row => { |
| | | currentReportRowData.value = row; |
| | | processParamList.value = await getProcessParamList(row) |
| | | reportForm.planQuantity = row.planQuantity; |
| | | reportForm.totalInvestment = row.totalInvestment; |
| | | reportForm.quantity = |
| | |
| | | reportForm.inspectedQuantity = row.inspectedQuantity; |
| | | reportForm.scrapQty = |
| | | row.scrapQty !== undefined && row.scrapQty !== null ? row.scrapQty : null; |
| | | reportForm.deviceId = row.deviceId || null; |
| | | |
| | | // è·åå·¥åºç»å®è®¾å¤å表 |
| | | getDeviceList(row.processId); |
| | | |
| | | nextTick(() => { |
| | | reportFormRef.value?.clearValidate(); |
| | | }); |
| | |
| | | workOrderFilesRef.value?.openDialog(row); |
| | | }; |
| | | |
| | | const handleReport = () => { |
| | | const handleReport = async () => { |
| | | try { |
| | | const data = await productionRecordFormRef.value.submitData(); |
| | | console.log("ç产记å½è¡¨åæ°æ®:", data); |
| | | reportForm.otherData.rows = data || []; |
| | | } catch (error) { |
| | | console.error("è·åç产记å½è¡¨åæ°æ®å¤±è´¥", error); |
| | | return; |
| | | } |
| | | |
| | | reportFormRef.value?.validate(valid => { |
| | | if (!valid) { |
| | | return false; |
| | |
| | | ...reportForm, |
| | | quantity: quantity, |
| | | scrapQty: scrapQty, |
| | | otherData: JSON.stringify(reportForm.otherData) |
| | | }; |
| | | |
| | | // console.log(submitData); |
| | | addProductMain(submitData).then(res => { |
| | | if (res.code === 200) { |
| | | proxy.$modal.msgSuccess("æ¥å·¥æå"); |
| | |
| | | confirmButtonText: "ç¡®å®", |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | console.error("æ¥å·¥å¤±è´¥", err); |
| | | ElMessageBox.alert("æ¥å·¥å¤±è´¥", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | }); |
| | | }); |
| | | }); |
| | | }; |
| | |
| | | }); |
| | | }; |
| | | |
| | | // è·å设å¤å表 |
| | | const getDeviceList = (processId) => { |
| | | if (!processId) { |
| | | deviceOptions.value = []; |
| | | return; |
| | | } |
| | | getBindDevices(processId) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | deviceOptions.value = res.data || []; |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | console.error("è·å设å¤å表失败", err); |
| | | deviceOptions.value = []; |
| | | }); |
| | | }; |
| | | |
| | | // ç¨æ·éæ©ååæ¶æ´æ° userName |
| | | const handleUserChange = userId => { |
| | | if (userId) { |
| | |
| | | } |
| | | }; |
| | | |
| | | // 设å¤éæ©ååæ¶æ´æ° deviceId |
| | | const handleDeviceChange = deviceId => { |
| | | reportForm.deviceId = deviceId; |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | getUserList(); |
| | |
| | | prop: "model", |
| | | }, |
| | | { |
| | | label: "UIDç ", |
| | | prop: "uidNo", |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | |
| | | prop: "model", |
| | | }, |
| | | { |
| | | label: "UIDç ", |
| | | prop: "uidNo", |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | |
| | | prop: "model", |
| | | }, |
| | | { |
| | | label: "UIDç ", |
| | | prop: "uidNo", |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | |
| | | prop: "model", |
| | | }, |
| | | { |
| | | label: "UIDç ", |
| | | prop: "uidNO", |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | <el-table-column label="产å大类" prop="productCategory" /> |
| | | <el-table-column label="è§æ ¼åå·" prop="specificationModel" /> |
| | | <el-table-column label="UIDç " prop="uidNo" /> |
| | | <el-table-column label="åä½" prop="unit" /> |
| | | <el-table-column label="æ°é" prop="quantity" /> |
| | | <el-table-column label="ç¨ç(%)" prop="taxRate" /> |