| | |
| | | |
| | | <script> |
| | | import extend from "@/extension/basicinfo/scanStation.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | import { ref, defineComponent, onMounted } from "vue"; |
| | | import axios from "axios"; |
| | | |
| | | export default defineComponent({ |
| | | setup() { |
| | | // å
¨å±ä¸ææ°æ®æºåé - ææä¸ææ¡å
±ç¨ï¼ä¸å¤èµå¼ï¼ä¸å¤å¤ç¨ |
| | | const stationEndProductList = ref([]); |
| | | |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "æ«æå·¥ä½", |
| | | name: "scanStation", |
| | | url: "/scanStation/", |
| | | sortName: "createDate", |
| | | url: "/scanStation/", |
| | | sortName: "createDate", |
| | | }); |
| | | |
| | | // ãä¿®æ¹1ãæ°å¢ç»è£
人åãé¦ä»¶/æ«ä»¶æµæ°´å·å段ï¼ç§»é¤ä¸åå¨çisScanned |
| | | const editFormFields = ref({ |
| | | id: "", |
| | | stationCode: "", |
| | | stationCode: "", |
| | | stationName: "", |
| | | stationEndProduct: "", |
| | | stationComponentQty: "", |
| | | stationComponent1: "", |
| | | stationComponent2: "", |
| | | stationComponent3: "", |
| | | stationComponent4: "", |
| | | stationComponent5: "", |
| | | stationComponent6: "", |
| | | stationComponent7: "", |
| | | stationComponent8: "", |
| | | stationComponent9: "", |
| | | stationComponent10: "", |
| | | assembleUser: "", // ç»è£
人å |
| | | firstProductSn: "", // é¦ä»¶æµæ°´å· |
| | | lastProductSn: "", // æ«ä»¶æµæ°´å· |
| | | }); |
| | | |
| | | |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { |
| | |
| | | field: "stationCode", |
| | | type: "input", |
| | | width: 200, |
| | | require: true |
| | | require: true, |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "ç«å°åç§°", |
| | | field: "stationName", |
| | | type: "input", |
| | | width: 200, |
| | | require: true |
| | | require: true, |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "ç«å°æå", |
| | | field: "stationEndProduct", |
| | | type: "input", |
| | | type: "select", |
| | | data: stationEndProductList, // ç»å®å
¨å±æ¥å£æ°æ® |
| | | width: 200, |
| | | require: false |
| | | } |
| | | require: false, |
| | | }, |
| | | ], |
| | | // ãä¿®æ¹2ãç§»é¤isScanned䏿æ¡ï¼æ°å¢ç»è£
人åè¾å
¥æ¡ |
| | | [ |
| | | { |
| | | title: "é¶ä»¶æ°é", |
| | | field: "stationComponentQty", |
| | | title: "ç»è£
人å", |
| | | field: "assembleUser", |
| | | type: "input", |
| | | width: 200, |
| | | require: true |
| | | require: false, // å端å
è®¸ä¸ºç©ºï¼æ
设为éå¿
å¡« |
| | | }, |
| | | { |
| | | title: "é¶ä»¶1", |
| | | field: "stationComponent1", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | }, |
| | | { |
| | | title: "é¶ä»¶2", |
| | | field: "stationComponent2", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | } |
| | | ], |
| | | // ãæ°å¢ãé¦ä»¶æµæ°´å·è¾å
¥æ¡ |
| | | [ |
| | | { |
| | | title: "é¶ä»¶3", |
| | | field: "stationComponent3", |
| | | title: "é¦ä»¶æµæ°´å·", |
| | | field: "firstProductSn", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | width: 300, // æµæ°´å·è¾é¿ï¼å 宽è¾å
¥æ¡ |
| | | require: false, |
| | | }, |
| | | { |
| | | title: "é¶ä»¶4", |
| | | field: "stationComponent4", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | }, |
| | | { |
| | | title: "é¶ä»¶5", |
| | | field: "stationComponent5", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | } |
| | | ], |
| | | // ãæ°å¢ãæ«ä»¶æµæ°´å·è¾å
¥æ¡ |
| | | [ |
| | | { |
| | | title: "é¶ä»¶6", |
| | | field: "stationComponent6", |
| | | title: "æ«ä»¶æµæ°´å·", |
| | | field: "lastProductSn", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | width: 300, |
| | | require: false, |
| | | }, |
| | | { |
| | | title: "é¶ä»¶7", |
| | | field: "stationComponent7", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | }, |
| | | { |
| | | title: "é¶ä»¶8", |
| | | field: "stationComponent8", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | } |
| | | ], |
| | | [ |
| | | { |
| | | title: "é¶ä»¶9", |
| | | field: "stationComponent9", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | }, |
| | | { |
| | | title: "é¶ä»¶10", |
| | | field: "stationComponent10", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | }, |
| | | { |
| | | title: "主é®ID", |
| | | field: "id", |
| | | type: "input", |
| | | width: 100, |
| | | hidden: true, |
| | | readonly: true |
| | | } |
| | | ] |
| | | readonly: true, |
| | | }, |
| | | ], |
| | | ]); |
| | | |
| | | // ãä¿®æ¹3ãæç´¢è¡¨åç§»é¤isScannedï¼æ°å¢ç»è£
人åï¼æµæ°´å·ä¸è¬ä¸åæç´¢ï¼æ
䏿°å¢ï¼ |
| | | const searchFormFields = ref({ |
| | | stationCode: "", |
| | | stationName: "", |
| | | stationEndProduct: "", |
| | | assembleUser: "", // æ°å¢ç»è£
人åæç´¢ |
| | | creater: "", |
| | | createDate: "", |
| | | }); |
| | |
| | | [ |
| | | { title: "ç«å°ç¼å·", field: "stationCode", type: "like" }, |
| | | { title: "ç«å°åç§°", field: "stationName", type: "like" }, |
| | | { title: "ç«å°æå", field: "stationEndProduct", type: "like" }, |
| | | { |
| | | title: "ç«å°æå", |
| | | field: "stationEndProduct", |
| | | type: "select-search", |
| | | data: stationEndProductList, // ç»å®å
¨å±æ¥å£æ°æ® |
| | | }, |
| | | { title: "ç»è£
人å", field: "assembleUser", type: "like" }, // æ°å¢ç»è£
äººåæ¨¡ç³æç´¢ |
| | | ], |
| | | [ |
| | | // ãä¿®æ¹4ãç§»é¤æç´¢æ çisScannedä¸ææ¡ |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ], |
| | |
| | | { |
| | | field: "stationEndProduct", |
| | | title: "ç«å°æå", |
| | | type: "string", |
| | | type: "select", |
| | | bind: { |
| | | key: "value", |
| | | data: stationEndProductList, // ç»å®å
¨å±æ¥å£æ°æ® |
| | | }, |
| | | link: true, |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | // ãä¿®æ¹5ãç§»é¤è¡¨æ ¼çisScannedåï¼æ°å¢ä»¥ä¸ä¸å |
| | | { |
| | | field: "stationComponentQty", |
| | | title: "é¶ä»¶æ°é", |
| | | type: "int", |
| | | width: 200, |
| | | field: "assembleUser", |
| | | title: "ç»è£
人å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stationComponent1", |
| | | title: "é¶ä»¶1", |
| | | field: "firstProductSn", |
| | | title: "é¦ä»¶æµæ°´å·", |
| | | type: "string", |
| | | width: 200, |
| | | width: 220, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stationComponent2", |
| | | title: "é¶ä»¶2", |
| | | field: "lastProductSn", |
| | | title: "æ«ä»¶æµæ°´å·", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stationComponent3", |
| | | title: "é¶ä»¶3", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stationComponent4", |
| | | title: "é¶ä»¶4", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stationComponent5", |
| | | title: "é¶ä»¶5", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stationComponent6", |
| | | title: "é¶ä»¶6", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stationComponent7", |
| | | title: "é¶ä»¶7", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stationComponent8", |
| | | title: "é¶ä»¶8", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stationComponent9", |
| | | title: "é¶ä»¶9", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stationComponent10", |
| | | title: "é¶ä»¶10", |
| | | type: "string", |
| | | width: 200, |
| | | width: 220, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | align: "left", |
| | | }, |
| | | ]); |
| | | |
| | | const detail = ref({ |
| | | cnName: "", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | key: "", |
| | | }); |
| | | |
| | | // ãä¿çåæé»è¾ãè·åç«å°æåä¸ææ°æ® |
| | | const getStationEndProductData = async () => { |
| | | try { |
| | | const res = await axios.get("/api/formula/getEndProductList"); |
| | | stationEndProductList.value = (res.data?.data || []).map( |
| | | (item) => item || { key: "", value: "", disabled: false } |
| | | ); |
| | | } catch (error) { |
| | | stationEndProductList.value = []; |
| | | console.error("è·åç«å°æåæ°æ®å¤±è´¥ï¼", error); |
| | | } |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getStationEndProductData(); |
| | | }); |
| | | |
| | | return { |
| | |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | </script> |