Merge branch 'master' of http://114.132.189.42:9002/r/mom-before
| | |
| | | <meta http-equiv="Expires" CONTENT="0"> |
| | | <meta http-equiv="Cache-Control" CONTENT="no-cache"> |
| | | <meta http-equiv="Pragma" CONTENT="no-cache"> |
| | | <title>ä¸å¤©æµ·æ´MOM</title> |
| | | <title>ä¸å¤©æµ·æ´MES</title> |
| | | <link rel="icon" type="image/x-icon" href="./static/img/logo.png"> |
| | | </head> |
| | | <body> |
| | |
| | | const standard = { |
| | | // ææ¯ç®¡ç-æ åBom |
| | | selectTreeByMaterial: "material/selectTreeByMaterial", //æ¥è¯¢ç©æçæ |
| | | selectVersion:"/material/selectVersion",//å³ä¾§çæ¬ |
| | | selectVersion: "/material/selectVersion", //å³ä¾§çæ¬ |
| | | selectProductByMaterial: "product/selectTreeByMaterial", //æ ¹æ®ç©ææ¥è¯¢é¡¹ç®è¡¨æ ¼ |
| | | selectTechnologyByMaterial: "technology/select", |
| | | selectAll:"/material/selectAll",//å³ä¾§æ°æ® |
| | | technologyWrite:"/technology/write",//å·¥èºè·¯çº¿ï¼ç§»å¼ä¿åç产å®é¢ |
| | | writeDevice:"/technology/writeDevice",//å·¥èºè·¯çº¿ï¼éæ©è®¾å¤ç»,ç§»å¼ä¿å |
| | | productWrite:"/product/write",//ææ¯ææ ï¼ç§»å¼ä¿åå
æ§å¼åæ åå¼ |
| | | chooseFather: "/technology/chooseFather",//è·åå·¥åºå表 |
| | | chooseDevice: "/technology/chooseDevice",//è·å设å¤ç»å表 |
| | | addTechnology: "/technology/add",//æ·»å å·¥èºè·¯çº¿ |
| | | leftAddOneTwo: "/material/add",//左侧æ°å¢1ï¼2级 |
| | | leftAddThree: "/standard/add",//左侧ä¸çº§æ°å¢ |
| | | leftAddFour: "/specifications/add",//左侧å级æ°å¢ |
| | | chooseTechByStandard:"/product/chooseTech",//å³ä¸è§æ°å¢-->ææ¯ææ -->鿩工åº,å·¥èº |
| | | chooseFatherByStandard:"/product/chooseFather",//å³ä¸è§æ°å¢-->ææ¯ææ -->鿩项ç®ç¶ç±» |
| | | addProductByStandard:"/product/add",//å³ä¸è§æ°å¢-->ææ¯ææ |
| | | addMBomByStandard:"/mbom/add",//å³ä¸è§æ°å¢-->ç©ææ¸
å |
| | | chooseTechByMBom:"/mbom/chooseTech",//å³ä¸è§æ°å¢-->ç©ææ¸
å-->鿩工åº,å·¥èº |
| | | mBomWrite:"/mbom/write",//ç©ææ¸
å-->æ°é,ç§»å¼ä¿å |
| | | chooseTechByProduct:"/technique/chooseTech",//å³ä¸è§æ°å¢-->ç产工èº-->鿩工åº,å·¥èº |
| | | addTechniqueByStandard:"/technique/add",//å³ä¸è§æ°å¢-->çäº§å·¥èº |
| | | chooseProByProduct:"/technique/choosePro",//å³ä¸è§æ°å¢-->ç产工èº-->鿩项ç®(ç¶å),åä½ |
| | | chooseDevByProduct:"/technique/chooseDev",//å³ä¸è§æ°å¢-->ç产工èº-->éæ©è®¾å¤ |
| | | addVersion:"/material/addVersion",//æ·»å åä¸ä¸ªåå·å·¥èºè·¯çº¿,ææ¯ææ ,ç©ææ¸
å,ç产工èºççæ¬ |
| | | delAllByTechnology:"/technology/delAllTech",//å·¥èºè·¯çº¿-æ¹éå é¤ |
| | | delAllByTarget:"/product/delAllPro",//ææ¯ææ -æ¹éå é¤ |
| | | delAllByMBom:"/mbom/delAllMbom",//ç©ææ¸
å-æ¹éå é¤ |
| | | delAllByProduct:"/technique/delAllTeq",//ç产工èº-æ¹éå é¤ |
| | | selectAll: "/material/selectAll", //å³ä¾§æ°æ® |
| | | technologyWrite: "/technology/write", //å·¥èºè·¯çº¿ï¼ç§»å¼ä¿åç产å®é¢ |
| | | writeDevice: "/technology/writeDevice", //å·¥èºè·¯çº¿ï¼éæ©è®¾å¤ç»,ç§»å¼ä¿å |
| | | productWrite: "/product/write", //ææ¯ææ ï¼ç§»å¼ä¿åå
æ§å¼åæ åå¼ |
| | | chooseFather: "/technology/chooseFather", //è·åå·¥åºå表 |
| | | chooseDevice: "/technology/chooseDevice", //è·å设å¤ç»å表 |
| | | addTechnology: "/technology/add", //æ·»å å·¥èºè·¯çº¿ |
| | | leftAddOneTwo: "/material/add", //左侧æ°å¢1ï¼2级 |
| | | leftAddThree: "/standard/add", //左侧ä¸çº§æ°å¢ |
| | | leftAddFour: "/specifications/add", //左侧å级æ°å¢ |
| | | chooseTechByStandard: "/product/chooseTech", //å³ä¸è§æ°å¢-->ææ¯ææ -->鿩工åº,å·¥èº |
| | | chooseFatherByStandard: "/product/chooseFather", //å³ä¸è§æ°å¢-->ææ¯ææ -->鿩项ç®ç¶ç±» |
| | | addProductByStandard: "/product/add", //å³ä¸è§æ°å¢-->ææ¯ææ |
| | | addMBomByStandard: "/mbom/add", //å³ä¸è§æ°å¢-->ç©ææ¸
å |
| | | chooseTechByMBom: "/mbom/chooseTech", //å³ä¸è§æ°å¢-->ç©ææ¸
å-->鿩工åº,å·¥èº |
| | | mBomWrite: "/mbom/write", //ç©ææ¸
å-->æ°é,ç§»å¼ä¿å |
| | | chooseTechByProduct: "/technique/chooseTech", //å³ä¸è§æ°å¢-->ç产工èº-->鿩工åº,å·¥èº |
| | | addTechniqueByStandard: "/technique/add", //å³ä¸è§æ°å¢-->çäº§å·¥èº |
| | | chooseProByProduct: "/technique/choosePro", //å³ä¸è§æ°å¢-->ç产工èº-->鿩项ç®(ç¶å),åä½ |
| | | chooseDevByProduct: "/technique/chooseDev", //å³ä¸è§æ°å¢-->ç产工èº-->éæ©è®¾å¤ |
| | | addVersion: "/material/addVersion", //æ·»å åä¸ä¸ªåå·å·¥èºè·¯çº¿,ææ¯ææ ,ç©ææ¸
å,ç产工èºççæ¬ |
| | | delAllByTechnology: "/technology/delAllTech", //å·¥èºè·¯çº¿-æ¹éå é¤ |
| | | delAllByTarget: "/product/delAllPro", //ææ¯ææ -æ¹éå é¤ |
| | | delAllByMBom: "/mbom/delAllMbom", //ç©ææ¸
å-æ¹éå é¤ |
| | | delAllByProduct: "/technique/delAllTeq", //ç产工èº-æ¹éå é¤ |
| | | // ææ¯ç®¡ç-ææ¯æä»¶ |
| | | selectAllOrder: "/orders/selectAllOrder", //æ¥è¯¢ææè®¢åå表 |
| | | selectOrderById: "/orders/selectOrderById", //æ ¹æ®è®¢åidæ¥è¯¢è®¢å详æ
|
| | | |
| | | |
| | | //订åBOM |
| | | delDevice:"/device/delDeviceById",//订åBom |
| | | compile:"/orders/compile",//ç¼å¶ |
| | | delDevice: "/device/delDeviceById", //订åBom |
| | | compile: "/orders/compile", //ç¼å¶ |
| | | } |
| | | // åæææ£éª |
| | | const raw = { |
| | |
| | | updateDevByRpId: "/rawInsProduct/updateDevByRpId", // æ´æ¹è®¾å¤ |
| | | } |
| | | //ä¸åæ ¼åææ |
| | | const unqualifiedaa ={ |
| | | const unqualifiedaa = { |
| | | selectUnRawInspectsList: "/inspectUnaccepted/selectURawMaterials", // æ¥è¯¢åææä¸åæ ¼åæ£éªåå表 |
| | | evaluatePassOrNo: "/inspectUnaccepted/evaluatePassOrNo" // è¯å®¡ |
| | | } |
| | | // æ¥è¯¢æåä¸åæ ¼å管ç |
| | | const unRawInspects ={ |
| | | const unRawInspects = { |
| | | inspectUnaccepted: "/inspectUnaccepted/selectUnRawInspectsList" |
| | | } |
| | | //ä¸åæ ¼åå¤ç½® |
| | | const dispose = { |
| | | getTable: "/inspectUnaccepted/selectDisposal", // ä¸åæ ¼åå页å表 |
| | | getTable: "/inspectUnaccepted/selectDisposal", // ä¸åæ ¼åå页å表 |
| | | descriptionUpdate: "/inspectUnaccepted/descriptionUpdate", // å¤±ç¦æ´æ°ç°åæè¿° |
| | | viewEditorial: "/inspectUnaccepted/viewEditorial", // æ¥çç¼è¾æè§ |
| | | clickEditing: "/inspectUnaccepted/clickEditing", // ç¹å»ç¼è¾æè§è§¦åæ¥è¯¢ |
| | |
| | | // listMaterial:"/finished-inspect/list_material",//æ·»å æ£éªåæ¶ç项ç®å表 |
| | | finishedInspectUser: "/finished-inspect/page_user", //è·åææä¸»æºå·¥ |
| | | projectListByfinishId: "/inspection-item/list_user", //æ ¹æ®idæ¥è¯¢ææé¡¹ç® |
| | | processInspectAddProcess: "/processInspect/addProcess",//æ°å¢æ£éª |
| | | inspectionItemListUser: "/inspection-item/list_user",//æ¥è¯¢æææ£éªé¡¹ç® |
| | | finishedInspectChooseMater: "/finished-inspect/chooseMater",//æ ¹æ®è®¢åå·å¾å°ä¿¡æ¯ |
| | | processInspectAddProcess: "/processInspect/addProcess", //æ°å¢æ£éª |
| | | inspectionItemListUser: "/inspection-item/list_user", //æ¥è¯¢æææ£éªé¡¹ç® |
| | | finishedInspectChooseMater: "/finished-inspect/chooseMater", //æ ¹æ®è®¢åå·å¾å°ä¿¡æ¯ |
| | | finishedInspectAddFinish: "/finished-inspect/addFinish", //æ°å¢æåæ£éª |
| | | finishedInspectUpdateFinishInspectsById: "/finished-inspect/updateFinishInspectsById",//䏿¥ |
| | | finishedInspectUpdateFinishInspectsById: "/finished-inspect/updateFinishInspectsById", //䏿¥ |
| | | finishedInspectSelectFinishInspectsListById: "/finished-inspect/selectFinishInspectsListById" |
| | | } |
| | | // è¿ç¨æ£éª |
| | | const processInspection = { |
| | | selectProcessInspectsList: "/processInspect/selectProcessInspectsList", // å页æ¥è¯¢è¿ç¨æ£éªåå表 |
| | | chooseMaterProcessInspect: "/processInspect/chooseMater",//æ ¹æ®è®¢åå·éæ©äº§ååå·¥èº |
| | | inspectionItemUpdateDevByInsId: "/inspection-item/updateDevByInsId",//æ´æ¹è®¾å¤ |
| | | inspectionItemlose_focus_update: "/inspection-item/lose_focus_update",//æ£éªå¼ |
| | | processInspectUpdateProcessInspectsById: "/processInspect/updateProcessInspectsById",//䏿¥ |
| | | chooseMaterProcessInspect: "/processInspect/chooseMater", //æ ¹æ®è®¢åå·éæ©äº§ååå·¥èº |
| | | inspectionItemUpdateDevByInsId: "/inspection-item/updateDevByInsId", //æ´æ¹è®¾å¤ |
| | | inspectionItemlose_focus_update: "/inspection-item/lose_focus_update", //æ£éªå¼ |
| | | processInspectUpdateProcessInspectsById: "/processInspect/updateProcessInspectsById", //䏿¥ |
| | | inspectionItemChooseDev: "/inspection-item/chooseDev", |
| | | processInspectSelectProcessInspectsListById: "/processInspect/selectProcessInspectsListById" |
| | | processInspectSelectProcessInspectsListById: "/processInspect/selectProcessInspectsListById" |
| | | } |
| | | // QMSå®éªå®¤ç®¡ç |
| | | const laboratory = { |
| | | delDeviceById:"/device/delDeviceById",//å é¤ |
| | | addApi:"/device/add",//æ°å¢ |
| | | listgroup:"/device/list_group", |
| | | selectDevice:"/device/selectDevice",//å³è¾¹å±ç¤º |
| | | addDeviceInspectDownBox: "/device/listInspect", // æ°å¢ä»ªå¨è®¾å¤ï¼æ£éªé¡¹ç®ä¸ææ¡ |
| | | selectDeviceInspectMessage: "/device/inspectId", // æ°å¢ä»ªå¨è®¾å¤ï¼æ ¹æ®æ£éªé¡¹ç®IDæ¥è¯¢æ°æ® |
| | | addDeviceKeeper: "/device/list_user",// æ°å¢ä»ªå¨è®¾å¤ï¼ä¿ç®¡äººä¸ææ¡ |
| | | addDeviceParentClassification: "/device/parent_classification", // æ°å¢ä»ªå¨è®¾å¤ï¼æ¥è¯¢ç¶çº§åç±» |
| | | addDeviceInstrument: "/device/add", // æ°å¢ä»ªå¨è®¾å¤ |
| | | towTree: "/device/two_tree", //äºçº§æ |
| | | tableDeviceList: "/device/table_list", // å®éªå®¤æ¨¡åè¡¨æ ¼æ°æ® |
| | | deleteDevice: "/device/delete", // å é¤å®éªå®¤è®¾å¤ |
| | | deleteIdorFather: "/device/deleteIdorFather" // å 餿 æ¨¡åæ°æ® |
| | | delDeviceById: "/device/delDeviceById", //å é¤ |
| | | addApi: "/device/add", //æ°å¢ |
| | | listgroup: "/device/list_group", |
| | | selectDevice: "/device/selectDevice", //å³è¾¹å±ç¤º |
| | | addDeviceInspectDownBox: "/device/listInspect", // æ°å¢ä»ªå¨è®¾å¤ï¼æ£éªé¡¹ç®ä¸ææ¡ |
| | | selectDeviceInspectMessage: "/device/inspectId", // æ°å¢ä»ªå¨è®¾å¤ï¼æ ¹æ®æ£éªé¡¹ç®IDæ¥è¯¢æ°æ® |
| | | addDeviceKeeper: "/device/list_user", // æ°å¢ä»ªå¨è®¾å¤ï¼ä¿ç®¡äººä¸ææ¡ |
| | | addDeviceParentClassification: "/device/parent_classification", // æ°å¢ä»ªå¨è®¾å¤ï¼æ¥è¯¢ç¶çº§åç±» |
| | | addDeviceInstrument: "/device/add", // æ°å¢ä»ªå¨è®¾å¤ |
| | | towTree: "/device/two_tree", //äºçº§æ |
| | | tableDeviceList: "/device/table_list", // å®éªå®¤æ¨¡åè¡¨æ ¼æ°æ® |
| | | deleteDevice: "/device/delete", // å é¤å®éªå®¤è®¾å¤ |
| | | deleteIdorFather: "/device/deleteIdorFather" // å 餿 æ¨¡åæ°æ® |
| | | } |
| | | |
| | | //search_class:codeNameModel |
| | |
| | | meteringPlanDevicePlan: "/meteringPlan/add_plan", // 计é计å-->æ°å¢æé® |
| | | } |
| | | //åºç¡æ°æ® |
| | | const Basicdata ={ |
| | | selectAllTechNam:"/technologyTemplate/selectAllTechNam",//å·¥èºè·¯çº¿-->å³è¾¹ |
| | | selectAllTechTem:"/technologyTemplate/selectAllTechTem",//å·¥èºè·¯çº¿-->左边 |
| | | chooseDevGroup:"/technologyTemplate/chooseDevGroup",//æ°å¢å·¥èºè·¯çº¿--ãéæ©è®¾å¤ç» |
| | | chooseElement:"/technologyTemplate/chooseElement",//æ°å¢å·¥èºè·¯çº¿-->éæ©å
ä»¶ |
| | | addTechTemp:"/technologyTemplate/addTechTemp",//æ°å¢å·¥èºè·¯çº¿==>æ°å¢ |
| | | chooseTech:"/technologyTemplate/chooseTech",//æ°å¢å·¥èºè·¯çº¿--ãéåå·¥åº |
| | | writeTechById:"/technologyTemplate/writeTechById",//æ°å¢å·¥èºè·¯çº¿-->ç¼è¾ä¼ å |
| | | delTechById:"/technologyTemplate/delTechById",//æ°å¢å·¥èºè·¯çº¿==>å é¤ |
| | | selecTechById:"/technologyTemplate/selecTechById",//æ°å¢å·¥èºè·¯çº¿--ãç¼è¾ |
| | | delAllTech:"/technologyTemplate/delAllTech",//æ¹éå é¤ |
| | | const Basicdata = { |
| | | selectAllTechNam: "/technologyTemplate/selectAllTechNam", //å·¥èºè·¯çº¿-->å³è¾¹ |
| | | selectAllTechTem: "/technologyTemplate/selectAllTechTem", //å·¥èºè·¯çº¿-->左边 |
| | | chooseDevGroup: "/technologyTemplate/chooseDevGroup", //æ°å¢å·¥èºè·¯çº¿--ãéæ©è®¾å¤ç» |
| | | chooseElement: "/technologyTemplate/chooseElement", //æ°å¢å·¥èºè·¯çº¿-->éæ©å
ä»¶ |
| | | addTechTemp: "/technologyTemplate/addTechTemp", //æ°å¢å·¥èºè·¯çº¿==>æ°å¢ |
| | | chooseTech: "/technologyTemplate/chooseTech", //æ°å¢å·¥èºè·¯çº¿--ãéåå·¥åº |
| | | writeTechById: "/technologyTemplate/writeTechById", //æ°å¢å·¥èºè·¯çº¿-->ç¼è¾ä¼ å |
| | | delTechById: "/technologyTemplate/delTechById", //æ°å¢å·¥èºè·¯çº¿==>å é¤ |
| | | selecTechById: "/technologyTemplate/selecTechById", //æ°å¢å·¥èºè·¯çº¿--ãç¼è¾ |
| | | delAllTech: "/technologyTemplate/delAllTech", //æ¹éå é¤ |
| | | |
| | | addTechMode:"/technicalModel/addTechMode",//ææ¯ææ ---ãæ°å¢ |
| | | delTechBy:"/technicalModel/delTechById",//ææ¯--.å é¤ |
| | | delAllTechskill:"/technicalModel/delAllTech",//æ¹éå é¤ |
| | | selectAllleft:"/technicalModel/selectAllTechTem",//ææ¯ææ -->左边 |
| | | selectAllright:"/technicalModel/selectAllTechNam",//ææ¯ææ --ãå³è¾¹ |
| | | chooseProFath:"/technicalModel/chooseProFath",//ææ¯ææ ---ãç¶ç±»éæ© |
| | | chooseTechFath: "/technicalModel/chooseTechFath",// ææ¯--->å·¥åºå·¥èº |
| | | selecTech:"/technicalModel/selecTechById",//ææ¯--->ç¼è¾ |
| | | writeTechByIdskill:"/technicalModel/writeTechById",//ç¼è¾ä¼ |
| | | addTechMode: "/technicalModel/addTechMode", //ææ¯ææ ---ãæ°å¢ |
| | | delTechBy: "/technicalModel/delTechById", //ææ¯--.å é¤ |
| | | delAllTechskill: "/technicalModel/delAllTech", //æ¹éå é¤ |
| | | selectAllleft: "/technicalModel/selectAllTechTem", //ææ¯ææ -->左边 |
| | | selectAllright: "/technicalModel/selectAllTechNam", //ææ¯ææ --ãå³è¾¹ |
| | | chooseProFath: "/technicalModel/chooseProFath", //ææ¯ææ ---ãç¶ç±»éæ© |
| | | chooseTechFath: "/technicalModel/chooseTechFath", // ææ¯--->å·¥åºå·¥èº |
| | | selecTech: "/technicalModel/selecTechById", //ææ¯--->ç¼è¾ |
| | | writeTechByIdskill: "/technicalModel/writeTechById", //ç¼è¾ä¼ |
| | | |
| | | selectAllMbom:"/mbomModel/selectAllMbom",//ç©æç»´æ¤--ãå³è¾¹ |
| | | addMbom:"/mbomModel/addMbom",//ç©æ--->æ°å¢ |
| | | material:"/mbomModel/delMbomById",//ç©ææ¸
åå é¤ |
| | | delAllMbom:"/mbomModel/delAllMbom",//æ¹éå é¤ |
| | | selectAllMbom: "/mbomModel/selectAllMbom", //ç©æç»´æ¤--ãå³è¾¹ |
| | | addMbom: "/mbomModel/addMbom", //ç©æ--->æ°å¢ |
| | | material: "/mbomModel/delMbomById", //ç©ææ¸
åå é¤ |
| | | delAllMbom: "/mbomModel/delAllMbom", //æ¹éå é¤ |
| | | |
| | | selectAllTeque:"/techniqueModel/selectAllTeque",//ç产工èºç»´æ¤---ãå³è¾¹ |
| | | selectAllTeque: "/techniqueModel/selectAllTeque", //ç产工èºç»´æ¤---ãå³è¾¹ |
| | | |
| | | selectAllSelf:"/selfcheckModel/selectAllSelf",//èªå»ºç»´æ¤-----ãå³è¾¹ |
| | | addSelfcheck:"/selfcheckModel/addSelfcheck",//èªæ£ ------ãæ°å¢ |
| | | delSelfcheck:"/selfcheckModel/delSelfcheckById",//èªæ£----.å é¤ |
| | | delAll:"selfcheckModel/delAllTech",//æ¹éå é¤---.èªæ£ |
| | | selectAllSelf: "/selfcheckModel/selectAllSelf", //èªå»ºç»´æ¤-----ãå³è¾¹ |
| | | addSelfcheck: "/selfcheckModel/addSelfcheck", //èªæ£ ------ãæ°å¢ |
| | | delSelfcheck: "/selfcheckModel/delSelfcheckById", //èªæ£----.å é¤ |
| | | delAll: "selfcheckModel/delAllTech", //æ¹éå é¤---.èªæ£ |
| | | |
| | | selectjilu:"/recordModel/selectAllRecord",//ç产记å½ç»´æ¤---ãå³è¾¹ |
| | | selecRecord:"/recordModel/selecRecordById",//ç产记å½----.æ°å¢ |
| | | writeRecordById:"/recordModel/writeRecordById",//ç¼è¾ |
| | | delQueByIdapi:"/recordModel/delQueById",//å é¤---.è®°å½å
容 |
| | | |
| | | delAllRecord:"/recordModel/delAllRecord",//å 餿¹é--->è®°å½ |
| | | addRecord:"/recordModel/addRecord",//ç产记å½-------.æ°å¢ |
| | | selectjilu: "/recordModel/selectAllRecord", //ç产记å½ç»´æ¤---ãå³è¾¹ |
| | | selecRecord: "/recordModel/selecRecordById", //ç产记å½----.æ°å¢ |
| | | writeRecordById: "/recordModel/writeRecordById", //ç¼è¾ |
| | | delQueByIdapi: "/recordModel/delQueById", //å é¤---.è®°å½å
容 |
| | | |
| | | choosePro:"/techniqueModel/choosePro",//æ°å¢ç产工èºç»´æ¤---ãéæ©ç¶ç±» |
| | | chooseDeiv:"/techniqueModel/chooseDeiv",//æ°å¢----->è®¾å¤ |
| | | addQeMode:"/techniqueModel/addQeMode",//æ°å¢----ãä¼ å |
| | | delQueById:"/techniqueModel/delQueById",//å é¤ |
| | | delAllQue:"/techniqueModel/delAllQue",//æ¹éå é¤ |
| | | selecQueById:"/techniqueModel/selecQueById",//ç¼è¾ |
| | | writeQueById:"/techniqueModel/writeQueById",//ç¼è¾ä¼ å |
| | | delAllRecord: "/recordModel/delAllRecord", //å 餿¹é--->è®°å½ |
| | | addRecord: "/recordModel/addRecord", //ç产记å½-------.æ°å¢ |
| | | |
| | | choosePro: "/techniqueModel/choosePro", //æ°å¢ç产工èºç»´æ¤---ãéæ©ç¶ç±» |
| | | chooseDeiv: "/techniqueModel/chooseDeiv", //æ°å¢----->è®¾å¤ |
| | | addQeMode: "/techniqueModel/addQeMode", //æ°å¢----ãä¼ å |
| | | delQueById: "/techniqueModel/delQueById", //å é¤ |
| | | delAllQue: "/techniqueModel/delAllQue", //æ¹éå é¤ |
| | | selecQueById: "/techniqueModel/selecQueById", //ç¼è¾ |
| | | writeQueById: "/techniqueModel/writeQueById", //ç¼è¾ä¼ å |
| | | |
| | | } |
| | | const url = { |
| | | enter: "user/enter", //ç»å½ |
| | | ...standard, |
| | | ...raw, |
| | | ...laboratory, |
| | | ...laboratory, |
| | | ...measure, |
| | | ...finishedIns, |
| | | ...unqualifiedaa, |
| | |
| | | selectSaleDatilById: "sale/selectSaleDatilById", //æ ¹æ®éå®åidæ¥ç详æ
, |
| | | addSale: "sale/addSale", //æ°å¢éå®å |
| | | saleCheck: "sale/check", //å®¡æ ¸éå®å |
| | | synchronization: "sale/synchronization",//忥 |
| | | synchronization: "sale/synchronization", //忥 |
| | | updateSaleById: "sale/updateSaleById", //æ ¹æ®éå®åidä¿®æ¹è¯¦æ
ä¿¡æ¯ |
| | | delSale: "sale/delSale", //æ ¹æ®éå®åidå é¤ |
| | | delAllSale: "sale/delAllSale", //æ¹éå é¤éå®å |
| | | delAllSale: "sale/delAllSale", //æ¹éå é¤éå®åï¼ |
| | | chooseType: "technologyTemplate/chooseType", //æ¥è¯¢ç±»å |
| | | } |
| | | |
| | | |
| | |
| | | Vue.prototype.$api = { |
| | | url |
| | | } |
| | | } |
| | | } |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-form-item label="项ç®ç»"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="åä½"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥åä½" style="width: 220px;"></el-input> |
| | | </el-form-item> |
| | |
| | | <span>ç±»åï¼</span> |
| | | <el-select v-model="search.type" size="small" placeholder="è¯·éæ©" @change="TYpe" |
| | | style="width: 224px;margin-right: 30px;"> |
| | | <el-option label="æ©¡è¶è¿æ¥å¨" :value="0"></el-option> |
| | | <el-option label="éå±è¿æ¥å¨" :value="1"></el-option> |
| | | <el-option label="湿ææçµè¿æ¥å¨" :value="2"></el-option> |
| | | <el-option label="忝ç»ä»¶" :value="3"></el-option> |
| | | <el-option v-for="(a, ai) in bigType" :key="ai" :value="a"></el-option> |
| | | </el-select> |
| | | <!-- <span>å·¥åºï¼</span> |
| | | <el-select v-model="search.name" size="small" placeholder="è¯·éæ©" style="width: 224px;margin-right: 30px;"> |
| | | <el-option v-for="(a, ai) in process" key="ai" :label="a.name" :value="a.id"></el-option> |
| | | </el-select> |
| | | <el-button size="mini"><span>é ç½®</span></el-button> |
| | | <el-button size="mini" type="primary" style="background: #004EA2;"><span>æ¥è¯¢</span></el-button> --> |
| | | </div> |
| | | <div class="thing"> |
| | | <!-- 主ä½å·¦ --> |
| | |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span><i :class="`node_i ${data.code != '[2]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i> |
| | | {{data.code}} {{ data.name }}</span> |
| | | <!-- <el-button type="text" size="mini" @click.stop="remove(node, data)"> |
| | | <i class="el-icon-delete"></i> |
| | | </el-button> --> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <!-- 主ä½å³ --> |
| | | <div class="right"> |
| | | <el-table :data="tableData" style="width: 100%;overflow-y: auto;min-height: 100%" |
| | | max-height="100%" row-key="name" border |
| | | @select-all="selectAll" |
| | | @select="selectTr" |
| | | ref="multipleTable" |
| | | @selection-change="handleSelectionChange" |
| | | default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> |
| | | <el-table :data="tableData" style="width: 100%;overflow-y: auto;min-height: 100%" max-height="100%" |
| | | row-key="name" border @select-all="selectAll" @select="selectTr" ref="multipleTable" |
| | | @selection-change="handleSelectionChange" default-expand-all |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> |
| | | <el-table-column type="selection" width="55"> |
| | | </el-table-column> |
| | | <el-table-column type="index" width="50"> |
| | |
| | | <div> |
| | | <el-dialog title="ç¼è¾ææ¯å
容" :visible.sync="upDia" width="500px"> |
| | | <div class="body"> |
| | | |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">ç±»å:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select v-model="edit.type" disabled placeholder="è¯·éæ©" @change="TYpe" |
| | | style="width: 306px;margin-right: 30px;"> |
| | | <el-option label="æ©¡è¶è¿æ¥å¨" :value="0"></el-option> |
| | | <el-option label="éå±è¿æ¥å¨" :value="1"></el-option> |
| | | <el-option label="湿ææçµè¿æ¥å¨" :value="2"></el-option> |
| | | <el-option label="忝ç»ä»¶" :value="3"></el-option> |
| | | <el-option v-for="(a, ai) in bigType" :key="ai" :value="a"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | |
| | | <template> |
| | | <el-select v-model="form.type" size="small" placeholder="è¯·éæ©" @change="edittype" |
| | | style="width: 98%;margin-right: 30px;"> |
| | | <el-option label="æ©¡è¶è¿æ¥å¨" :value="0"></el-option> |
| | | <el-option label="éå±è¿æ¥å¨" :value="1"></el-option> |
| | | <el-option label="湿ææçµè¿æ¥å¨" :value="2"></el-option> |
| | | <el-option label="忝ç»ä»¶" :value="3"></el-option> |
| | | <el-option v-for="(a, ai) in bigType" :key="ai" :value="a"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | |
| | | <el-col :span="11"> |
| | | <el-form-item label="å·¥åº"> |
| | | <template> |
| | | <el-select v-model="form.work" placeholder="è¯·éæ©" allow-create filterable @change="workevent"> |
| | | <el-select v-model="form.work" placeholder="è¯·éæ©" @change="workevent"> |
| | | <el-option v-for="(item,index) in process" :key="item.name" :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | |
| | | <el-col :span="11" :offset="2"> |
| | | <el-form-item label="å·¥èº"> |
| | | <template> |
| | | <el-select v-model="form.name" style="width: 95%;" placeholder="è¯·éæ©" @change="craftrow" allow-create filterable> |
| | | <el-select v-model="form.name" style="width: 95%;" placeholder="è¯·éæ©" @change="craftrow"> |
| | | <el-option v-for="item in craftapi" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-form-item label="项ç®ç»"> |
| | |
| | | <el-option v-for="item in higherlevel" :key="item" :label="item" :value="item"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-autocomplete |
| | | popper-class="my-autocomplete" |
| | | v-model="form.father" |
| | | :fetch-suggestions="higherlevel" |
| | | placeholder="请è¾å
¥å
容" |
| | | @select="electadd"> |
| | | <i |
| | | class="el-icon-edit el-input__icon" |
| | | slot="suffix" |
| | | @click="handleIconClick"> |
| | | </i> |
| | | <template slot-scope="{ item }"> |
| | | <div class="name">{{ item }}</div> |
| | | <span class="addr">{{ item}}</span> |
| | | </template> |
| | | </el-autocomplete> --> |
| | | |
| | | </template> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="åä½"> |
| | | <el-input v-model="form.unit" placeholder="请è¾å
¥åä½" style="width: 35.95%;"></el-input> |
| | | </el-form-item> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | search:{ |
| | | type:0, |
| | | technology:null, |
| | | }, |
| | | // handleClose:[], |
| | | checkTreeNode :{ |
| | | id:'', |
| | | }, |
| | | higherlevel:[], |
| | | value:{}, |
| | | options:[], |
| | | process:[], |
| | | filterNode:[], |
| | | list: [], |
| | | form:{ |
| | | father:'', |
| | | work:'', |
| | | name:'', |
| | | unit:'', |
| | | project:'', |
| | | }, |
| | | children:[], |
| | | modifyevent:false, |
| | | dialogVisible:false, |
| | | tableData: [], |
| | | crafval:'', |
| | | typeselect:0, |
| | | upData:{}, |
| | | upDia:false, |
| | | craftapi:[], |
| | | edit:{ |
| | | techFather:'', |
| | | techName:'', |
| | | father:'', |
| | | name:'', |
| | | unit:'', |
| | | id:'', |
| | | |
| | | }, |
| | | isAllSelect:false, |
| | | } |
| | | |
| | | }, |
| | | mounted() { |
| | | this.selectAllleft() |
| | | this.selectAllright() |
| | | search: { |
| | | type: 0, |
| | | technology: null, |
| | | }, |
| | | checkTreeNode: { |
| | | id: '', |
| | | }, |
| | | higherlevel: [], |
| | | value: {}, |
| | | options: [], |
| | | process: [], |
| | | filterNode: [], |
| | | list: [], |
| | | form: { |
| | | father: '', |
| | | work: '', |
| | | name: '', |
| | | unit: '', |
| | | project: '', |
| | | }, |
| | | children: [], |
| | | modifyevent: false, |
| | | dialogVisible: false, |
| | | tableData: [], |
| | | crafval: '', |
| | | typeselect: 0, |
| | | upData: {}, |
| | | upDia: false, |
| | | craftapi: [], |
| | | edit: { |
| | | techFather: '', |
| | | techName: '', |
| | | father: '', |
| | | name: '', |
| | | unit: '', |
| | | id: '', |
| | | }, |
| | | isAllSelect: false, |
| | | bigType: [] |
| | | } |
| | | }, |
| | | methods:{ |
| | | mounted() { |
| | | this.chooseType() |
| | | }, |
| | | methods: { |
| | | chooseType() { |
| | | this.$axios.get(this.$api.url.chooseType).then(res => { |
| | | this.bigType = res.data |
| | | this.typeselect = res.data[0] |
| | | this.search.type = res.data[0] |
| | | this.selectAllleft() |
| | | this.selectAllright() |
| | | }) |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selects = val; |
| | | this.deleteList = []; |
| | | val.forEach((v) => { |
| | | if (v.id !== undefined) { |
| | | this.deleteList.push(v.id); |
| | | } |
| | | }); |
| | | val.forEach((v) => { |
| | | if (v.id !== undefined) { |
| | | this.deleteList.push(v.id); |
| | | } |
| | | }); |
| | | }, |
| | | // å
¨é/åæ¶éæä½ |
| | | selectAll(val) { |
| | | this.isAllSelect = !this.isAllSelect; |
| | | let data = this.tableData; |
| | | this.toggleSelect(data, this.isAllSelect, "all"); |
| | | }, |
| | | //éæ©æè¡ |
| | | selectTr(selection, row) { |
| | | this.$set(row, "isChecked", !row.isChecked); |
| | | this.$nextTick(() => { |
| | | this.isAllSelect = row.isChecked; |
| | | this.toggleSelect(row, row.isChecked, "tr"); |
| | | }); |
| | | }, |
| | | // å
¨é/åæ¶éæä½ |
| | | selectAll(val) { |
| | | this.isAllSelect = !this.isAllSelect; |
| | | let data = this.tableData; |
| | | this.toggleSelect(data, this.isAllSelect, "all"); |
| | | }, |
| | | //éæ©æè¡ |
| | | selectTr(selection, row) { |
| | | this.$set(row, "isChecked", !row.isChecked); |
| | | this.$nextTick(() => { |
| | | this.isAllSelect = row.isChecked; |
| | | this.toggleSelect(row, row.isChecked, "tr"); |
| | | }); |
| | | }, |
| | | toggleSelection(row, flag) { |
| | | this.$set(row, "isChecked", flag); |
| | | this.$nextTick(() => { |
| | | if (flag) { |
| | | this.$refs.multipleTable.toggleRowSelection(row, flag); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | if (flag) { |
| | | this.$refs.multipleTable.toggleRowSelection(row, flag); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }); |
| | | }, |
| | | //éå½å级 |
| | | toggleSelect(data, flag, type) { |
| | | //éå½å级 |
| | | toggleSelect(data, flag, type) { |
| | | // console.log('222'); |
| | | if (type === "all") { |
| | | if (data.length > 0) { |
| | | data.forEach((item) => { |
| | | this.toggleSelection(item, flag); |
| | | if (item.children && item.children.length > 0) { |
| | | this.toggleSelect(item.children, flag, type); |
| | | } |
| | | }); |
| | | } |
| | | } else { |
| | | if (data.children && data.children.length > 0) { |
| | | data.children.forEach((item) => { |
| | | item.isChecked = !item.isChecked; |
| | | this.$refs.multipleTable.toggleRowSelection(item, flag); |
| | | this.toggleSelect(item, flag, type); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | //--------------------------------------------------------------------------------------------------------------------------------------- |
| | | handleClose(){}, |
| | | if (type === "all") { |
| | | if (data.length > 0) { |
| | | data.forEach((item) => { |
| | | this.toggleSelection(item, flag); |
| | | if (item.children && item.children.length > 0) { |
| | | this.toggleSelect(item.children, flag, type); |
| | | } |
| | | }); |
| | | } |
| | | } else { |
| | | if (data.children && data.children.length > 0) { |
| | | data.children.forEach((item) => { |
| | | item.isChecked = !item.isChecked; |
| | | this.$refs.multipleTable.toggleRowSelection(item, flag); |
| | | this.toggleSelect(item, flag, type); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | //--------------------------------------------------------------------------------------------------------------------------------------- |
| | | handleClose() {}, |
| | | selectDataList() { |
| | | this.list.forEach(a => { |
| | | a.code = '[1]' |
| | |
| | | } |
| | | }).then(res => { |
| | | /* this.selectAllright() */ |
| | | this.$parent.removeAllTab() |
| | | this.$parent.removeAllTab() |
| | | }) |
| | | }, |
| | | submitUpData() { //ç¡®å® |
| | |
| | | }).then(res => { |
| | | /* this.selectAllright() */ |
| | | this.$message.success('å é¤å®æ') |
| | | this.$parent.removeAllTab() |
| | | this.$parent.removeAllTab() |
| | | }) |
| | | }, |
| | | deleteRow(index, rows) { |
| | |
| | | ids: this.delete |
| | | }).then(res => { |
| | | /* this.selectAllright() */ |
| | | this.$parent.removeAllTab() |
| | | this.$parent.removeAllTab() |
| | | }) |
| | | }, |
| | | dels() { |
| | | |
| | | |
| | | let ee = [] |
| | | console.log(this.selects); |
| | | this.selects.forEach(el =>{ |
| | | if(el.children){ |
| | | el.children.forEach(ele =>{ |
| | | ee.push(ele.id) |
| | | }) |
| | | } |
| | | }) |
| | | console.log(this.selects); |
| | | this.selects.forEach(el => { |
| | | if (el.children) { |
| | | el.children.forEach(ele => { |
| | | ee.push(ele.id) |
| | | }) |
| | | } |
| | | }) |
| | | // cc.splice(0,1) |
| | | this.delete = ee.join(',') |
| | | console.log(this.delete); |
| | |
| | | console.log(this.tableData); |
| | | }); |
| | | }, |
| | | craftrow(val){ |
| | | craftrow(val) { |
| | | this.crafval = val |
| | | this.chooseProFath() |
| | | }, |
| | |
| | | console.log(this.checkTreeNode.id); |
| | | this.$axios.get(this.$api.url.chooseProFath, { |
| | | params: { |
| | | techTemId:this.crafval |
| | | techTemId: this.crafval |
| | | } |
| | | }).then(res => { |
| | | this.higherlevel = res.data; |
| | |
| | | height: 30px; |
| | | border-radius: 2px; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <template> |
| | | <div class="content-main"> |
| | | <div v-if="!showAdd&&!showLook&&!showUp" class="rawPage"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12">æåæ£éª</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button @click="handleAddNew" type="primary" size="mini" icon="el-icon-plus" style="background: #004EA2; ">æ°å¢</el-button> |
| | | <el-button icon="el-icon-delete" size="mini">å é¤</el-button> |
| | | <el-button icon="el-icon-download" size="mini">导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="nav"> |
| | | <span>æ£æµç»æï¼</span> |
| | | <el-select v-model="searchData.result" size="small" placeholder="è¯·éæ©" style="width: 224px;margin-right: 52px;"> |
| | | <el-option :value="''" label="å
¨é¨"></el-option> |
| | | <el-option :value="1" label="åæ ¼"></el-option> |
| | | <el-option :value="0" label="ä¸åæ ¼"></el-option> |
| | | </el-select> |
| | | <span>产ååç§°ï¼</span> |
| | | <el-input v-model="searchData.material" size="small" placeholder="请è¾å
¥äº§ååç§°" style="width: 224px;margin-right: 52px;"></el-input> |
| | | <el-button size="mini" @click="()=>{searchData={};getInspectionTableData()}"><span>é ç½®</span></el-button> |
| | | <el-button size="mini" type="primary" @click="getInspectionTableData" style="background: #004EA2;"><span>æ¥ è¯¢</span></el-button> |
| | | </div> |
| | | <div class="content-body"> |
| | | <div class="inspectionTable"> |
| | | <el-table |
| | | ref="inspectionTable" |
| | | height="620" |
| | | :cell-style="{textAlign: 'center'}" |
| | | :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}" |
| | | :data="inspectionTable" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="order_number" |
| | | label="订åå·" |
| | | min-width="100" |
| | | /> |
| | | <el-table-column |
| | | prop="customer_name" |
| | | label="客æ·åç§°" |
| | | min-width="80" |
| | | /> |
| | | <el-table-column |
| | | prop="project_name" |
| | | label="å·¥ç¨åç§°" |
| | | min-width="80" |
| | | /> |
| | | <el-table-column |
| | | prop="quality_traceability" |
| | | label="è´¨é追溯å·" |
| | | min-width="108" |
| | | /> |
| | | <el-table-column |
| | | prop="material_code" |
| | | label="产åç¼ç " |
| | | min-width="100" |
| | | /> |
| | | <el-table-column |
| | | prop="material" |
| | | label="产å大类" |
| | | min-width="72" |
| | | /> |
| | | <el-table-column |
| | | prop="specifications_model" |
| | | label="è§æ ¼åå·" |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="unit" |
| | | label="åä½" |
| | | min-width="50" |
| | | /> |
| | | <el-table-column |
| | | prop="quantity" |
| | | label="æ°é" |
| | | min-width="50" |
| | | /> |
| | | <el-table-column |
| | | prop="detectionPeriod" |
| | | label="æ£éªæ¥æ" |
| | | min-width="80" |
| | | /> |
| | | <el-table-column |
| | | prop="result" |
| | | label="æ£æµç»æ" |
| | | min-width="80" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.result === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.result === 0">ä¸åæ ¼</span> |
| | | <span v-else-if="scope.row.result === null || scope.row.result === undefined">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | |
| | | <el-table-column |
| | | label="æä½" |
| | | min-width="80" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="goToDetail(scope.row)">æ¥ç</el-button> |
| | | <el-button type="text" size="small">æå°</el-button> |
| | | <el-button v-if="scope.row.result == null" type="text" size="small" @click="goUp(scope.row)">ç¼è¾</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!-- åé¡µå¨ --> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | :current-page="pageParams.pageSize" |
| | | :page-sizes="[10, 50, 100, 200]" |
| | | :page-size="pageParams.countSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="pageParams.total" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="newPage" v-if="showAddPage"> |
| | | <!-- æ°å¢é¡µé¢ --> |
| | | <div class="addInspection"> |
| | | <el-row class="header"> |
| | | <el-col :span="12">æ°å¢æåæ£éªå</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- ç¹å»è¿åï¼å½å页é¢å¼ä¸ºfalse --> |
| | | <el-button @click="()=>{showAddPage = false;showDetail = false}" type="primary" size="mini" icon="el-icon-back" style="background: #004EA2; ">è¿å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form :model="addInspectionform" ref="addInspectionform" class="addInspectionform" label-position="right" label-width="100px" size="mini" > |
| | | <div class="formwrapper"> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="订åå·ï¼"> |
| | | <el-input v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.number" placeholder="请è¾å
¥è®¢åå·" autocomplete="off" /> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.order_number" placeholder="请è¾å
¥è®¢åå·1" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="客æ·åç§°ï¼"> |
| | | <el-input v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.username" placeholder="请è¾å
¥å®¢æ·åç§°" autocomplete="off" /> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.customer_name" placeholder="请è¾å
¥å®¢æ·åç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥ç¨åç§°ï¼"> |
| | | <el-input v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.projectname" placeholder="请è¾å
¥å·¥ç¨åç§°" autocomplete="off" /> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.project_name" placeholder="请è¾å
¥å·¥ç¨åç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="7"> |
| | | <el-form-item label="è´¨é追溯å·ï¼" > |
| | | <el-input v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.tracenumber" placeholder="请è¾å
¥è¿½æº¯å·" autocomplete="off" /> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.quality_traceability" placeholder="请è¾å
¥è¿½æº¯å·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产åç¼ç ï¼"> |
| | | <el-input v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.material_code" placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.material_code" placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <el-select v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.class" size="small" placeholder="è¯·éæ©äº§ååç§°"> |
| | | <el-option value="é项1"></el-option> |
| | | <el-option value="é项2"></el-option> |
| | | </el-select> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.material" placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | <div class="content-main"> |
| | | <div v-if="!showAdd&&!showLook&&!showUp" class="rawPage"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12">äº§åæ£éª</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button @click="handleAddNew" type="primary" size="mini" icon="el-icon-plus" |
| | | style="background: #004EA2; ">æ°å¢</el-button> |
| | | <el-button icon="el-icon-delete" size="mini">å é¤</el-button> |
| | | <el-button icon="el-icon-download" size="mini">导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="nav"> |
| | | <span>æ£æµç»æï¼</span> |
| | | <el-select v-model="searchData.result" size="small" placeholder="è¯·éæ©" style="width: 224px;margin-right: 52px;"> |
| | | <el-option :value="''" label="å
¨é¨"></el-option> |
| | | <el-option :value="1" label="åæ ¼"></el-option> |
| | | <el-option :value="0" label="ä¸åæ ¼"></el-option> |
| | | </el-select> |
| | | <span>产ååç§°ï¼</span> |
| | | <el-input v-model="searchData.material" size="small" placeholder="请è¾å
¥äº§ååç§°" |
| | | style="width: 224px;margin-right: 52px;"></el-input> |
| | | <el-button size="mini" @click="()=>{searchData={};getInspectionTableData()}"><span>é ç½®</span></el-button> |
| | | <el-button size="mini" type="primary" @click="getInspectionTableData" style="background: #004EA2;"><span>æ¥ |
| | | 询</span></el-button> |
| | | </div> |
| | | <div class="content-body"> |
| | | <div class="inspectionTable"> |
| | | <el-table ref="inspectionTable" height="620" :cell-style="{textAlign: 'center'}" |
| | | :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}" |
| | | :data="inspectionTable" style="width: 100%"> |
| | | <el-table-column type="selection" width="50"> |
| | | </el-table-column> |
| | | <el-table-column prop="order_number" label="订åå·" min-width="100" /> |
| | | <el-table-column prop="customer_name" label="客æ·åç§°" min-width="80" /> |
| | | <el-table-column prop="project_name" label="å·¥ç¨åç§°" min-width="80" /> |
| | | <el-table-column prop="quality_traceability" label="è´¨é追溯å·" min-width="108" /> |
| | | <el-table-column prop="material_code" label="产åç¼ç " min-width="100" /> |
| | | <el-table-column prop="material" label="产å大类" min-width="72" /> |
| | | <el-table-column prop="specifications_model" label="è§æ ¼åå·" min-width="110" /> |
| | | <el-table-column prop="unit" label="åä½" min-width="50" /> |
| | | <el-table-column prop="quantity" label="æ°é" min-width="50" /> |
| | | <el-table-column prop="detectionPeriod" label="æ£éªæ¥æ" min-width="80" /> |
| | | <el-table-column prop="result" label="æ£æµç»æ" min-width="80"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.result === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.result === 0">ä¸åæ ¼</span> |
| | | <span v-else-if="scope.row.result === null || scope.row.result === undefined">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" min-width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="goToDetail(scope.row)">æ¥ç</el-button> |
| | | <el-button type="text" size="small">æå°</el-button> |
| | | <el-button v-if="scope.row.result == null" type="text" size="small" |
| | | @click="goUp(scope.row)">ç¼è¾</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!-- åé¡µå¨ --> |
| | | <div class="pagination"> |
| | | <el-pagination :current-page="pageParams.pageSize" :page-sizes="[10, 50, 100, 200]" |
| | | :page-size="pageParams.countSize" layout="total, sizes, prev, pager, next, jumper" :total="pageParams.total" |
| | | @size-change="handleSizeChange" @current-change="handleCurrentChange" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="newPage" v-if="showAddPage"> |
| | | <!-- æ°å¢é¡µé¢ --> |
| | | <div class="addInspection"> |
| | | <el-row class="header"> |
| | | <el-col :span="12">æ°å¢æåæ£éªå</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- ç¹å»è¿åï¼å½å页é¢å¼ä¸ºfalse --> |
| | | <el-button @click="()=>{showAddPage = false;showDetail = false}" type="primary" size="mini" |
| | | icon="el-icon-back" style="background: #004EA2; ">è¿å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form :model="addInspectionform" ref="addInspectionform" class="addInspectionform" label-position="right" |
| | | label-width="100px" size="mini"> |
| | | <div class="formwrapper"> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="订åå·ï¼"> |
| | | <el-input v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.number" |
| | | placeholder="请è¾å
¥è®¢åå·" autocomplete="off" /> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.order_number" |
| | | placeholder="请è¾å
¥è®¢åå·1" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="客æ·åç§°ï¼"> |
| | | <el-input v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.username" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°" autocomplete="off" /> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.customer_name" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥ç¨åç§°ï¼"> |
| | | <el-input v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.projectname" |
| | | placeholder="请è¾å
¥å·¥ç¨åç§°" autocomplete="off" /> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.project_name" |
| | | placeholder="请è¾å
¥å·¥ç¨åç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è´¨é追溯å·ï¼"> |
| | | <el-input v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.tracenumber" |
| | | placeholder="请è¾å
¥è¿½æº¯å·" autocomplete="off" /> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" |
| | | v-model="finishedInsInfo.quality_traceability" placeholder="请è¾å
¥è¿½æº¯å·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产åç¼ç ï¼"> |
| | | <el-input v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.material_code" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.material_code" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <el-select v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.class" |
| | | size="small" placeholder="è¯·éæ©äº§ååç§°"> |
| | | <el-option value="é项1"></el-option> |
| | | <el-option value="é项2"></el-option> |
| | | </el-select> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.material" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="7"> |
| | | <el-form-item label="è§æ ¼åå·ï¼" > |
| | | <el-select v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.specificationmodel" size="small" placeholder="è¯·éæ©è§æ ¼åå·"> |
| | | <el-option value="é项1"></el-option> |
| | | <el-option value="é项2"></el-option> |
| | | </el-select> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.specifications_model" placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åä½ï¼" > |
| | | <el-select v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.unit" size="small" placeholder="è¯·éæ©åä½"> |
| | | <el-option value="é项1"></el-option> |
| | | <el-option value="é项2"></el-option> |
| | | </el-select> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.specifications_model" placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.quantity" placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.quantity" placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-select v-show="showDetail == false" style="width: 180px;" |
| | | v-model="addInspectionform.specificationmodel" size="small" placeholder="è¯·éæ©è§æ ¼åå·"> |
| | | <el-option value="é项1"></el-option> |
| | | <el-option value="é项2"></el-option> |
| | | </el-select> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" |
| | | v-model="finishedInsInfo.specifications_model" placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-select v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.unit" |
| | | size="small" placeholder="è¯·éæ©åä½"> |
| | | <el-option value="é项1"></el-option> |
| | | <el-option value="é项2"></el-option> |
| | | </el-select> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" |
| | | v-model="finishedInsInfo.specifications_model" placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input v-show="showDetail == false" style="width: 180px;" v-model="addInspectionform.quantity" |
| | | placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | <el-input v-show="showDetail !== false" style="width: 180px;" v-model="finishedInsInfo.quantity" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col v-show="showDetail !== false" :span="7"> |
| | | <el-form-item label="主æºå·¥ï¼" > |
| | | <el-input style="width: 180px;" v-model="finishedInsInfo.name" placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="inspectionProject"> |
| | | <span>æ£éªé¡¹ç®</span> |
| | | <el-table :data="inspectionItems"> |
| | | <el-table-column type="index" label="åºå·" width="60"></el-table-column> |
| | | <el-table-column prop="project" label="项ç®"></el-table-column> |
| | | <el-table-column prop="unit" label="åä½"></el-table-column> |
| | | <el-table-column prop="standardVal" label="æ åå¼"></el-table-column> |
| | | <el-table-column prop="controlVal" label="å
æµå¼"></el-table-column> |
| | | <el-table-column prop="detectionVal" label="æ£éªå¼"></el-table-column> |
| | | <el-table-column label="è¯éªè®¾å¤"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.device }} |
| | | <el-select v-model="scope.row.device" size="small" slot="append" style="width: 100px;"> |
| | | <el-option value="é项1"></el-option> |
| | | <el-option value="é项2"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="conclusion" label="ç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.insState==1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.insState==0">ä¸åæ ¼</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="inspectionResult"> |
| | | <span>æ£æµç»æ</span> |
| | | <el-table :data="inspectionResultForm"> |
| | | <el-table-column prop="id" label="ç©æç¼å·"></el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"></el-table-column> |
| | | <el-table-column prop="inspecter" label="æ£éªå"></el-table-column> |
| | | <el-table-column prop="conclusion" label="æ£éªç»è®º"></el-table-column> |
| | | <el-table-column prop="operation" label="䏿¥"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <div class="newPage" v-if="showAdd"> |
| | | <finishedProductInspectionAdd /> |
| | | </div> |
| | | <div class="newPage" v-if="showLook"> |
| | | <finishedProductInspectionLook :rowInfo="rowInfo"/> |
| | | </div> |
| | | <div class="newPage" v-if="showUp"> |
| | | <finishedProductInspectionUp :rowInfo="rowInfo"/> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col v-show="showDetail !== false" :span="7"> |
| | | <el-form-item label="主æºå·¥ï¼"> |
| | | <el-input style="width: 180px;" v-model="finishedInsInfo.name" placeholder="请è¾å
¥äº§åç¼ç " |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="inspectionProject"> |
| | | <span>æ£éªé¡¹ç®</span> |
| | | <el-table :data="inspectionItems"> |
| | | <el-table-column type="index" label="åºå·" width="60"></el-table-column> |
| | | <el-table-column prop="project" label="项ç®"></el-table-column> |
| | | <el-table-column prop="unit" label="åä½"></el-table-column> |
| | | <el-table-column prop="standardVal" label="æ åå¼"></el-table-column> |
| | | <el-table-column prop="controlVal" label="å
æµå¼"></el-table-column> |
| | | <el-table-column prop="detectionVal" label="æ£éªå¼"></el-table-column> |
| | | <el-table-column label="è¯éªè®¾å¤"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.device }} |
| | | <el-select v-model="scope.row.device" size="small" slot="append" style="width: 100px;"> |
| | | <el-option value="é项1"></el-option> |
| | | <el-option value="é项2"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="conclusion" label="ç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.insState==1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.insState==0">ä¸åæ ¼</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="inspectionResult"> |
| | | <span>æ£æµç»æ</span> |
| | | <el-table :data="inspectionResultForm"> |
| | | <el-table-column prop="id" label="ç©æç¼å·"></el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"></el-table-column> |
| | | <el-table-column prop="inspecter" label="æ£éªå"></el-table-column> |
| | | <el-table-column prop="conclusion" label="æ£éªç»è®º"></el-table-column> |
| | | <el-table-column prop="operation" label="䏿¥"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <div class="newPage" v-if="showAdd"> |
| | | <finishedProductInspectionAdd /> |
| | | </div> |
| | | <div class="newPage" v-if="showLook"> |
| | | <finishedProductInspectionLook :rowInfo="rowInfo" /> |
| | | </div> |
| | | <div class="newPage" v-if="showUp"> |
| | | <finishedProductInspectionUp :rowInfo="rowInfo" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import finishedProductInspectionAdd from '@/components/view/finishedProductInspectionAdd' |
| | | import finishedProductInspectionUp from '@/components/view/finishedProductInspectionUp' |
| | | import finishedProductInspectionLook from '@/components/view/finishedProductInspectionLook' |
| | | export default { |
| | | components: { finishedProductInspectionAdd,finishedProductInspectionUp, finishedProductInspectionLook}, |
| | | data(){ |
| | | return { |
| | | searchData:{ |
| | | result: '', |
| | | material: '', |
| | | }, |
| | | // 主æºå·¥ä¸ææ¡ |
| | | usernameOptions:[], |
| | | inspectionTable:[ |
| | | ], |
| | | rowInfo:{}, |
| | | pageParams:{ |
| | | countSize: 10, //æ¯é¡µæ°é |
| | | pageSize: 1, // å½å页ç |
| | | total:0 |
| | | }, |
| | | showAddPage: false, |
| | | showAdd: false, |
| | | showLook: false, |
| | | showUp: false, |
| | | showDetail:false, |
| | | addInspectionform: [{ |
| | | number: '', |
| | | username: '', |
| | | projectname: '', |
| | | tracenumber: '', |
| | | code: '', |
| | | class: '', |
| | | specificationmodel: '', |
| | | unit: '', |
| | | quantity: '', |
| | | group: '', |
| | | worker: '', |
| | | machine: '' |
| | | }], |
| | | inspectionItems:[{ |
| | | project:'å¸é迪', |
| | | unit:'å¨', |
| | | standardVal: '8219384314', |
| | | controlVal:'9823401', |
| | | detectionVal:'11111', |
| | | device:'', |
| | | conclusion:'åæ ¼' |
| | | }], |
| | | inspectionResultForm:[{ |
| | | id:'274024', |
| | | name:'111', |
| | | inspecter:'111', |
| | | conclusion:'', |
| | | operation:'' |
| | | }], |
| | | finishedInsInfo:{} |
| | | } |
| | | }, |
| | | created() { |
| | | this.init() |
| | | this.getInspectionTableData() |
| | | }, |
| | | methods:{ |
| | | // æ¯é¡µæ¡æ°æ¹åæ¶è§¦å éæ©ä¸é¡µæ¾ç¤ºå¤å°è¡ |
| | | handleSizeChange(val) { |
| | | console.log(`æ¯é¡µ ${val} æ¡`) |
| | | this.currentPage = 1 |
| | | this.pageSize = val |
| | | }, |
| | | // å½å页æ¹åæ¶è§¦å 跳转å
¶ä»é¡µ |
| | | handleCurrentChange(val) { |
| | | console.log(`å½å页: ${val}`) |
| | | this.currentPage = val |
| | | }, |
| | | handleAddNew(){ |
| | | this.showAdd=true |
| | | }, |
| | | async getInspectionTableData() { |
| | | const {data:{row,total}} = await this.$axios.get(this.$api.url.finishedInsListPage,{params:{...this.pageParams,...this.searchData}}) |
| | | this.inspectionTable = row |
| | | this.pageParams.total = total |
| | | }, |
| | | goToDetail(row) { |
| | | this.rowInfo = row |
| | | this.showLook=true |
| | | }, |
| | | goUp(row){ |
| | | this.rowInfo = row |
| | | this.showUp=true |
| | | }, |
| | | async init() { |
| | | // const {data} = await this.$axios.get(this.$api.url.finishedInspectUser) |
| | | // this.usernameOptions = data |
| | | import finishedProductInspectionAdd from '@/components/view/finishedProductInspectionAdd' |
| | | import finishedProductInspectionUp from '@/components/view/finishedProductInspectionUp' |
| | | import finishedProductInspectionLook from '@/components/view/finishedProductInspectionLook' |
| | | export default { |
| | | components: { |
| | | finishedProductInspectionAdd, |
| | | finishedProductInspectionUp, |
| | | finishedProductInspectionLook |
| | | }, |
| | | data() { |
| | | return { |
| | | searchData: { |
| | | result: '', |
| | | material: '', |
| | | }, |
| | | // 主æºå·¥ä¸ææ¡ |
| | | usernameOptions: [], |
| | | inspectionTable: [], |
| | | rowInfo: {}, |
| | | pageParams: { |
| | | countSize: 10, //æ¯é¡µæ°é |
| | | pageSize: 1, // å½å页ç |
| | | total: 0 |
| | | }, |
| | | showAddPage: false, |
| | | showAdd: false, |
| | | showLook: false, |
| | | showUp: false, |
| | | showDetail: false, |
| | | addInspectionform: [{ |
| | | number: '', |
| | | username: '', |
| | | projectname: '', |
| | | tracenumber: '', |
| | | code: '', |
| | | class: '', |
| | | specificationmodel: '', |
| | | unit: '', |
| | | quantity: '', |
| | | group: '', |
| | | worker: '', |
| | | machine: '' |
| | | }], |
| | | inspectionItems: [{ |
| | | project: 'å¸é迪', |
| | | unit: 'å¨', |
| | | standardVal: '8219384314', |
| | | controlVal: '9823401', |
| | | detectionVal: '11111', |
| | | device: '', |
| | | conclusion: 'åæ ¼' |
| | | }], |
| | | inspectionResultForm: [{ |
| | | id: '274024', |
| | | name: '111', |
| | | inspecter: '111', |
| | | conclusion: '', |
| | | operation: '' |
| | | }], |
| | | finishedInsInfo: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.init() |
| | | this.getInspectionTableData() |
| | | }, |
| | | methods: { |
| | | // æ¯é¡µæ¡æ°æ¹åæ¶è§¦å éæ©ä¸é¡µæ¾ç¤ºå¤å°è¡ |
| | | handleSizeChange(val) { |
| | | console.log(`æ¯é¡µ ${val} æ¡`) |
| | | this.currentPage = 1 |
| | | this.pageSize = val |
| | | }, |
| | | // å½å页æ¹åæ¶è§¦å 跳转å
¶ä»é¡µ |
| | | handleCurrentChange(val) { |
| | | console.log(`å½å页: ${val}`) |
| | | this.currentPage = val |
| | | }, |
| | | handleAddNew() { |
| | | this.showAdd = true |
| | | }, |
| | | async getInspectionTableData() { |
| | | const { |
| | | data: { |
| | | row, |
| | | total |
| | | } |
| | | } = await this.$axios.get(this.$api.url.finishedInsListPage, { |
| | | params: { |
| | | ...this.pageParams, |
| | | ...this.searchData |
| | | } |
| | | }) |
| | | this.inspectionTable = row |
| | | this.pageParams.total = total |
| | | }, |
| | | goToDetail(row) { |
| | | this.rowInfo = row |
| | | this.showLook = true |
| | | }, |
| | | goUp(row) { |
| | | this.rowInfo = row |
| | | this.showUp = true |
| | | }, |
| | | async init() { |
| | | // const {data} = await this.$axios.get(this.$api.url.finishedInspectUser) |
| | | // this.usernameOptions = data |
| | | |
| | | }, |
| | | comBackMain(val){ |
| | | this.showAdd=false |
| | | this.showLook=false |
| | | this.showUp=false |
| | | this.init() |
| | | this.getInspectionTableData() |
| | | if(val){ |
| | | this.$parent.removeAllTab() |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | comBackMain(val) { |
| | | this.showAdd = false |
| | | this.showLook = false |
| | | this.showUp = false |
| | | this.init() |
| | | this.getInspectionTableData() |
| | | if (val) { |
| | | this.$parent.removeAllTab() |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .title{ |
| | | padding: 12px; |
| | | .title { |
| | | padding: 12px; |
| | | |
| | | } |
| | | .nav{ |
| | | display: flex; |
| | | padding: 20px 20px; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | } |
| | | .nav *{ |
| | | font-size: 14px; |
| | | } |
| | | .content-body { |
| | | background-color: #fff; |
| | | overflow: hidden; |
| | | margin-top: 12px; |
| | | } |
| | | .inspectionTable{ |
| | | padding: 20px 20px; |
| | | } |
| | | .pagination{ |
| | | float: right; |
| | | margin-right: 20px; |
| | | } |
| | | .newPage{ |
| | | overflow: hidden; |
| | | } |
| | | .header{ |
| | | padding: 12px; |
| | | } |
| | | .addInspectionform{ |
| | | background-color: #fff; |
| | | } |
| | | .addInspectionform .formwrapper{ |
| | | padding: 20px 0px; |
| | | margin-left: 100px; |
| | | } |
| | | .inspectionProject span{ |
| | | display: block; |
| | | padding: 5px 0px; |
| | | } |
| | | .inspectionProject .el-table{ |
| | | background-color: #fff; |
| | | padding: 10px 12px; |
| | | } |
| | | .inspectionResult span{ |
| | | display: block; |
| | | padding: 5px 0px; |
| | | } |
| | | .inspectionResult .el-table{ |
| | | background-color: #fff; |
| | | padding: 10px 12px; |
| | | } |
| | | .rawPage{ |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | overflow-y: scroll; |
| | | } |
| | | .rawPage .content-body{ |
| | | flex: 1; |
| | | } |
| | | /* .inspectionTable{ |
| | | } |
| | | |
| | | .nav { |
| | | display: flex; |
| | | padding: 20px 20px; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .nav * { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .content-body { |
| | | background-color: #fff; |
| | | overflow: hidden; |
| | | margin-top: 12px; |
| | | } |
| | | |
| | | .inspectionTable { |
| | | padding: 20px 20px; |
| | | } |
| | | |
| | | .pagination { |
| | | float: right; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .newPage { |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .header { |
| | | padding: 12px; |
| | | } |
| | | |
| | | .addInspectionform { |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .addInspectionform .formwrapper { |
| | | padding: 20px 0px; |
| | | margin-left: 100px; |
| | | } |
| | | |
| | | .inspectionProject span { |
| | | display: block; |
| | | padding: 5px 0px; |
| | | } |
| | | |
| | | .inspectionProject .el-table { |
| | | background-color: #fff; |
| | | padding: 10px 12px; |
| | | } |
| | | |
| | | .inspectionResult span { |
| | | display: block; |
| | | padding: 5px 0px; |
| | | } |
| | | |
| | | .inspectionResult .el-table { |
| | | background-color: #fff; |
| | | padding: 10px 12px; |
| | | } |
| | | |
| | | .rawPage { |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | overflow-y: scroll; |
| | | } |
| | | |
| | | .rawPage .content-body { |
| | | flex: 1; |
| | | } |
| | | |
| | | /* .inspectionTable{ |
| | | flex: 1; |
| | | overflow-y: scroll; |
| | | } */ |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div> |
| | | <!-- æ°å¢é¡µé¢ --> |
| | | <div class="addInspection"> |
| | | <el-row class="header"> |
| | | <el-col :span="12">æ°å¢äº§åæ£éªå</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- ç¹å»è¿åï¼å½å页é¢å¼ä¸ºfalse --> |
| | | <!-- <el-button type="primary" size="mini" style="background: #004EA2; " |
| | | <div> |
| | | <!-- æ°å¢é¡µé¢ --> |
| | | <div class="addInspection"> |
| | | <el-row class="header"> |
| | | <el-col :span="12">æ°å¢äº§åæ£éªå</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- ç¹å»è¿åï¼å½å页é¢å¼ä¸ºfalse --> |
| | | <!-- <el-button type="primary" size="mini" style="background: #004EA2; " |
| | | icon="el-icon-circle-plus-outline">æ°å¢</el-button> --> |
| | | <el-button @click="comBack" type="primary" size="mini" icon="el-icon-back" |
| | | style="background: #004EA2; ">è¿å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form :model="processInspectVo" ref="addInspectionform" class="addInspectionform" label-position="right" |
| | | label-width="120px" size="small"> |
| | | <div class="formwrapper"> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="订åå·ï¼"> |
| | | <el-input disabled @blur="selectInfoByOrderId" style="width: 180px;" |
| | | v-model="processInspectVo.orderNumber" placeholder="请è¾å
¥è®¢åå·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="客æ·åç§°ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.prname" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥ç¨åç§°ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.sname" |
| | | placeholder="请è¾å
¥å·¥ç¨åç§°" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <el-select disabled @change="changeOptionsSamplename" style="width: 180px;" |
| | | v-model="processInspectVo.material" size="small" placeholder="è¯·éæ©äº§ååç§°"> |
| | | <el-option v-for="item in optionsSamplename" :key="item.id" :label="item.name" |
| | | :value="item.id + '-' + item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è´¨é追溯å·ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.qualityTraceability" |
| | | placeholder="请è¾å
¥è¿½æº¯å·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产åç¼ç ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.mcode" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.specificationsModel" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.unit" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.quantity" |
| | | placeholder="请è¾å
¥æ°é" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3" style="display: flex;justify-content: end;"> |
| | | <!-- <el-button type="primary" :disabled="isAddProject" @click="addTestProjevt">çææ£éªé¡¹ç®</el-button> --> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="inspectionProject"> |
| | | <el-row> |
| | | <el-col :span="12" class="inspectionProject_span">æ£éªé¡¹ç®</el-col> |
| | | <el-col v-if="!isUpBtn" :span="12" class="inspectionProject_span" |
| | | style="display: flex;justify-content: end;"> |
| | | <el-button size="mini" @click="clickDeleteInspectionColumn()">å 餿£éªå¼å</el-button> |
| | | <el-button style="margin-right: 30px;" size="mini" |
| | | @click="clickAddInspectionColumn()">æ·»å æ£éªå¼å</el-button> |
| | | <!-- <el-button |
| | | <el-button @click="comBack" type="primary" size="mini" icon="el-icon-back" |
| | | style="background: #004EA2; ">è¿å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form :model="processInspectVo" ref="addInspectionform" class="addInspectionform" label-position="right" |
| | | label-width="120px" size="small"> |
| | | <div class="formwrapper"> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="订åå·ï¼"> |
| | | <el-input disabled @blur="selectInfoByOrderId" style="width: 180px;" |
| | | v-model="processInspectVo.orderNumber" placeholder="请è¾å
¥è®¢åå·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="客æ·åç§°ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.prname" placeholder="请è¾å
¥å®¢æ·åç§°" |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥ç¨åç§°ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.sname" placeholder="请è¾å
¥å·¥ç¨åç§°" |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <el-select disabled @change="changeOptionsSamplename" style="width: 180px;" |
| | | v-model="processInspectVo.material" size="small" placeholder="è¯·éæ©äº§ååç§°"> |
| | | <el-option v-for="item in optionsSamplename" :key="item.id" :label="item.name" |
| | | :value="item.id + '-' + item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è´¨é追溯å·ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.qualityTraceability" |
| | | placeholder="请è¾å
¥è¿½æº¯å·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产åç¼ç ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.mcode" placeholder="请è¾å
¥äº§åç¼ç " |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.specificationsModel" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.unit" placeholder="请è¾å
¥äº§åç¼ç " |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input disabled style="width: 180px;" v-model="processInspectVo.quantity" placeholder="请è¾å
¥æ°é" |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3" style="display: flex;justify-content: end;"> |
| | | <!-- <el-button type="primary" :disabled="isAddProject" @click="addTestProjevt">çææ£éªé¡¹ç®</el-button> --> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="inspectionProject"> |
| | | <el-row> |
| | | <el-col :span="12" class="inspectionProject_span">æ£éªé¡¹ç®</el-col> |
| | | <el-col v-if="!isUpBtn" :span="12" class="inspectionProject_span" style="display: flex;justify-content: end;"> |
| | | <el-button size="mini" @click="clickDeleteInspectionColumn()">å 餿£éªå¼å</el-button> |
| | | <el-button style="margin-right: 30px;" size="mini" @click="clickAddInspectionColumn()">æ·»å æ£éªå¼å</el-button> |
| | | <!-- <el-button |
| | | size="mini" |
| | | style="margin-right: 30px;" |
| | | @click="clickAddLine()" |
| | | >æ·»å æ£éªè¡</el-button |
| | | > --> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="inspectionItems" max-height="420" :span-method="handleSpanMethod" height="calc(100vh - 550px)" |
| | | style="width: 100%"> |
| | | <el-table-column type="index" label="åºå·" width="60"></el-table-column> |
| | | <el-table-column label="项ç®" prop="father"></el-table-column> |
| | | <el-table-column prop="name" label="ææ "></el-table-column> |
| | | <el-table-column prop="unit" label="åä½"></el-table-column> |
| | | <el-table-column prop="required" label="æ åå¼"></el-table-column> |
| | | <el-table-column prop="internal" label="å
æµå¼"></el-table-column> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="æ£æµå¼" |
| | | min-width="100" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-tooltip :disabled="scope.row.dname != null" class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.dname === null" v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dname" label="è¯éªè®¾å¤" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="!scope.row.isSelectDevice" type="text" @click="clickTableSelect(scope)">{{ |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="inspectionItems" max-height="420" :span-method="handleSpanMethod" height="calc(100vh - 550px)" |
| | | style="width: 100%"> |
| | | <el-table-column type="index" label="åºå·" width="60"></el-table-column> |
| | | <el-table-column label="项ç®" prop="father"></el-table-column> |
| | | <el-table-column prop="name" label="ææ "></el-table-column> |
| | | <el-table-column prop="unit" label="åä½"></el-table-column> |
| | | <el-table-column prop="required" label="æ åå¼"></el-table-column> |
| | | <el-table-column prop="internal" label="å
æµå¼"></el-table-column> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="æ£æµå¼" |
| | | min-width="100" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-tooltip :disabled="scope.row.dname != null" class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.dname === null" v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dname" label="è¯éªè®¾å¤" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickTableSelect(scope)">{{ |
| | | scope.row.dname == null ? "è¯·éæ©" : scope.row.dname |
| | | }}</el-button> |
| | | <el-select v-if="scope.row.isSelectDevice" style="width: 100%;" @change="clickNodeSure(scope.row)" v-model="filterText" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in materialOptions" :key="item.id" :label="item.device" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.result === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.result === 0">ä¸åæ ¼</span> |
| | | <span v-show="scope.row.result === null">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column v-if="detailId == null" label="æä½" width="100"> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.result === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.result === 0">ä¸åæ ¼</span> |
| | | <span v-show="scope.row.result === null">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column v-if="detailId == null" label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickDeleteline(scope)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </div> |
| | | <div class="inspectionResult"> |
| | | <span>æ£æµç»æ</span> |
| | | <el-table :data="inspectionResultForm"> |
| | | <el-table-column prop="id" label="ç©æç¼å·"></el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"></el-table-column> |
| | | <el-table-column prop="inspecter" label="æ£éªå"></el-table-column> |
| | | <el-table-column prop="conclusion" label="æ£éªç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.conclusion === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.conclusion === 0">ä¸åæ ¼</span> |
| | | <span v-else-if="scope.row.conclusion === null || scope.row.conclusion === undefined">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="operation" label="䏿¥"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="scope.row.conclusion === null || scope.row.conclusion === undefined" type="primary" |
| | | @click="escalation" size="small">䏿¥</el-button> |
| | | <el-button v-else type="success" size="small">已䏿¥</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog title="è¯·éæ©è®¾å¤" :visible.sync="centerDialogVisible" width="20%"> |
| | | <div class="div_device_dialog"> |
| | | <el-select style="width: 100%;" @change="clickNodeSure()" v-model="filterText" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in materialOptions" :key="item.id" :label="item.device" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </el-table> |
| | | </div> |
| | | <div class="inspectionResult"> |
| | | <span>æ£æµç»æ</span> |
| | | <el-table :data="inspectionResultForm"> |
| | | <el-table-column prop="id" label="ç©æç¼å·"></el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"></el-table-column> |
| | | <el-table-column prop="inspecter" label="æ£éªå"></el-table-column> |
| | | <el-table-column prop="conclusion" label="æ£éªç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.conclusion === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.conclusion === 0">ä¸åæ ¼</span> |
| | | <span v-else-if="scope.row.conclusion === null || scope.row.conclusion === undefined">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="operation" label="䏿¥"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="scope.row.conclusion === null || scope.row.conclusion === undefined" type="primary" |
| | | @click="escalation" size="small">䏿¥</el-button> |
| | | <el-button v-else type="success" size="small">已䏿¥</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog title="è¯·éæ©è®¾å¤" :visible.sync="centerDialogVisible" width="20%"> |
| | | <div class="div_device_dialog"> |
| | | <el-input placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" v-model="filterText" style="margin-bottom: 6px;"> |
| | | </el-input> |
| | | <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all highlight-current |
| | | @node-click="nodeClick" :filter-node-method="filterNode" ref="tree"> |
| | | <div class="custom-tree-node" slot-scope="{ data }"> |
| | | <span><i |
| | | :class="`node_i ${data.children ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>{{ data.name }}</span> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="clickNodeSure()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: ['rowInfo'], |
| | | data() { |
| | | return { |
| | | isUpBtn: false, |
| | | showUp: false, |
| | | isAddProject: false, |
| | | showLook: false, |
| | | detailId: 0, |
| | | rowInfp: {}, |
| | | search: { |
| | | countSize: 10, |
| | | pageSize: 1, |
| | | result: "", // æ£æµç¶æ |
| | | name: "", // 产ååç§° |
| | | techfather: "" // å·¥åº |
| | | }, |
| | | optionsSamplename: [], |
| | | inspectionTable: [], |
| | | tableColumn: [], |
| | | optionSoptionSprocesses: [], |
| | | optionTechnology: [], |
| | | inspectionTableTotal: 0, |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | treeProject: [], |
| | | // æ·»å å |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | | empiricalValueAddMaxNumber: 0, |
| | | showAddPage: false, |
| | | processInspectVo: { |
| | | id: null, |
| | | material: null, |
| | | mcode: null, |
| | | prname: null, |
| | | sname: null, |
| | | orderNumber: "D-001", |
| | | qualityTraceability: null, |
| | | quantity: null, |
| | | specificationsModel: null, |
| | | unit: null, |
| | | technologyId: null |
| | | }, |
| | | InspectioniD: null, |
| | | addInspectionform: [ |
| | | { |
| | | number: "", |
| | | username: "", |
| | | projectname: "", |
| | | tracenumber: "", |
| | | code: "", |
| | | class: "", |
| | | specificationmodel: "", |
| | | unit: "", |
| | | quantity: "", |
| | | group: "", |
| | | worker: "", |
| | | machine: "" |
| | | }] |
| | | , |
| | | inspectionItems: [], // æ°å¢æ£éªé¡¹ç®è¡¨æ ¼ |
| | | inspectionResultForm: [ |
| | | { |
| | | id: "", |
| | | name: "", |
| | | inspecter: "", |
| | | conclusion: "", |
| | | operation: "" |
| | | } |
| | | ], |
| | | options: [], |
| | | value: "", |
| | | rowList: [], |
| | | spanArr: [], |
| | | position: 0, |
| | | // 设å¤éæ©æ æ¾ç¤º |
| | | centerDialogVisible: false, |
| | | filterText: "", |
| | | materialOptions: [], |
| | | defaultProps: { |
| | | // è®¾å¤æ æ°æ®è®¾ç½® |
| | | children: "children", |
| | | label: "name" |
| | | }, |
| | | nodeData: { |
| | | id: 0, |
| | | name: null |
| | | }, // nodeç¹å»ä¿åå½åç¹å»æ°æ® |
| | | clickSelectDevice: { |
| | | index: null, // ç¹å»éæ©åå¨å½åè¡ç´¢å¼ |
| | | rpId: null // ç¹å»éæ©åå¨å½åè¡é¡¹ç®Id |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | // filterText(val) { |
| | | // this.$refs.tree.filter(val); |
| | | // } |
| | | }, |
| | | mounted() { |
| | | if (this.rowInfo.result != null && this.rowInfo.result != '') { |
| | | this.isUpBtn = true |
| | | } |
| | | this.processInspectVo.material = this.rowInfo.material |
| | | this.processInspectVo.mcode = this.rowInfo.material_code |
| | | this.processInspectVo.orderNumber = this.rowInfo.order_number |
| | | this.processInspectVo.qualityTraceability = this.rowInfo.quality_traceability |
| | | this.processInspectVo.specificationsModel = this.rowInfo.specifications_model |
| | | this.processInspectVo.unit = this.rowInfo.unit |
| | | this.processInspectVo.quantity = this.rowInfo.quantity |
| | | this.processInspectVo.prname = this.rowInfo.customer_name |
| | | this.processInspectVo.sname = this.rowInfo.project_name |
| | | this.inspectionResultForm[0].id = this.rowInfo.material_code |
| | | this.inspectionResultForm[0].name = this.rowInfo.material |
| | | this.inspectionResultForm[0].conclusion = this.rowInfo.result |
| | | this.detailId = this.rowInfo.id |
| | | this.getTableData() |
| | | // this.getOptions(); |
| | | }, |
| | | methods: { |
| | | // blurNode(row){ |
| | | // console.log(11); |
| | | // row.isSelectDevice=false |
| | | // }, |
| | | escalation() { |
| | | let arr = this.inspectionItems |
| | | let bl = false |
| | | for (let index = 0; index < arr.length; index++) { |
| | | const element = arr[index]; |
| | | if (element.dname != null && element.empiricalValueAddss[0] != '') { |
| | | bl = true |
| | | break |
| | | } else { |
| | | bl = false |
| | | } |
| | | } |
| | | if (bl != true) { |
| | | this.$message({ |
| | | message: '请å
æ£æµä¸é¡¹é¡¹ç®ï¼', |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.$axios.post(this.$api.url.finishedInspectUpdateFinishInspectsById, { |
| | | id: this.detailId |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | if (res.message === 'é¡¹ç®æªæ£éªå®!') { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.$message({ |
| | | message: '䏿¥æå', |
| | | type: 'success' |
| | | }); |
| | | this.$parent.comBackMain(true) |
| | | } else { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }) |
| | | export default { |
| | | props: ['rowInfo'], |
| | | data() { |
| | | return { |
| | | isUpBtn: false, |
| | | showUp: false, |
| | | isAddProject: false, |
| | | showLook: false, |
| | | detailId: 0, |
| | | rowInfp: {}, |
| | | search: { |
| | | countSize: 10, |
| | | pageSize: 1, |
| | | result: "", // æ£æµç¶æ |
| | | name: "", // 产ååç§° |
| | | techfather: "" // å·¥åº |
| | | }, |
| | | optionsSamplename: [], |
| | | inspectionTable: [], |
| | | tableColumn: [], |
| | | optionSoptionSprocesses: [], |
| | | optionTechnology: [], |
| | | inspectionTableTotal: 0, |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | treeProject: [], |
| | | // æ·»å å |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | | empiricalValueAddMaxNumber: 0, |
| | | showAddPage: false, |
| | | processInspectVo: { |
| | | id: null, |
| | | material: null, |
| | | mcode: null, |
| | | prname: null, |
| | | sname: null, |
| | | orderNumber: "D-001", |
| | | qualityTraceability: null, |
| | | quantity: null, |
| | | specificationsModel: null, |
| | | unit: null, |
| | | technologyId: null |
| | | }, |
| | | InspectioniD: null, |
| | | addInspectionform: [{ |
| | | number: "", |
| | | username: "", |
| | | projectname: "", |
| | | tracenumber: "", |
| | | code: "", |
| | | class: "", |
| | | specificationmodel: "", |
| | | unit: "", |
| | | quantity: "", |
| | | group: "", |
| | | worker: "", |
| | | machine: "" |
| | | }], |
| | | inspectionItems: [], // æ°å¢æ£éªé¡¹ç®è¡¨æ ¼ |
| | | inspectionResultForm: [{ |
| | | id: "", |
| | | name: "", |
| | | inspecter: "", |
| | | conclusion: "", |
| | | operation: "" |
| | | }], |
| | | options: [], |
| | | value: "", |
| | | rowList: [], |
| | | spanArr: [], |
| | | position: 0, |
| | | // 设å¤éæ©æ æ¾ç¤º |
| | | centerDialogVisible: false, |
| | | filterText: "", |
| | | materialOptions: [], |
| | | defaultProps: { |
| | | // è®¾å¤æ æ°æ®è®¾ç½® |
| | | children: "children", |
| | | label: "name" |
| | | }, |
| | | nodeData: { |
| | | id: 0, |
| | | name: null |
| | | }, // nodeç¹å»ä¿åå½åç¹å»æ°æ® |
| | | clickSelectDevice: { |
| | | index: null, // ç¹å»éæ©åå¨å½åè¡ç´¢å¼ |
| | | rpId: null // ç¹å»éæ©åå¨å½åè¡é¡¹ç®Id |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | // filterText(val) { |
| | | // this.$refs.tree.filter(val); |
| | | // } |
| | | }, |
| | | mounted() { |
| | | if (this.rowInfo.result != null && this.rowInfo.result != '') { |
| | | this.isUpBtn = true |
| | | } |
| | | this.processInspectVo.material = this.rowInfo.material |
| | | this.processInspectVo.mcode = this.rowInfo.material_code |
| | | this.processInspectVo.orderNumber = this.rowInfo.order_number |
| | | this.processInspectVo.qualityTraceability = this.rowInfo.quality_traceability |
| | | this.processInspectVo.specificationsModel = this.rowInfo.specifications_model |
| | | this.processInspectVo.unit = this.rowInfo.unit |
| | | this.processInspectVo.quantity = this.rowInfo.quantity |
| | | this.processInspectVo.prname = this.rowInfo.customer_name |
| | | this.processInspectVo.sname = this.rowInfo.project_name |
| | | this.inspectionResultForm[0].id = this.rowInfo.material_code |
| | | this.inspectionResultForm[0].name = this.rowInfo.material |
| | | this.inspectionResultForm[0].conclusion = this.rowInfo.result |
| | | this.detailId = this.rowInfo.id |
| | | this.getTableData() |
| | | // this.getOptions(); |
| | | }, |
| | | methods: { |
| | | // blurNode(row){ |
| | | // console.log(11); |
| | | // row.isSelectDevice=false |
| | | // }, |
| | | escalation() { |
| | | let arr = this.inspectionItems |
| | | let bl = false |
| | | for (let index = 0; index < arr.length; index++) { |
| | | const element = arr[index]; |
| | | if (element.dname != null && element.empiricalValueAddss[0] != '') { |
| | | bl = true |
| | | break |
| | | } else { |
| | | bl = false |
| | | } |
| | | } |
| | | if (bl != true) { |
| | | this.$message({ |
| | | message: '请å
æ£æµä¸é¡¹é¡¹ç®ï¼', |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.$axios.post(this.$api.url.finishedInspectUpdateFinishInspectsById, { |
| | | id: this.detailId |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | if (res.message === 'é¡¹ç®æªæ£éªå®!') { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.$message({ |
| | | message: '䏿¥æå', |
| | | type: 'success' |
| | | }); |
| | | this.$parent.comBackMain(true) |
| | | } else { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | changeOptionsSamplename() { |
| | | let id = this.processInspectVo.material.split("-")[0] |
| | | let sample = this.optionsSamplename.filter(o => { |
| | | return o.id == id |
| | | })[0] |
| | | this.processInspectVo.qualityTraceability = sample.qualityTraceability |
| | | this.processInspectVo.mcode = sample.mcode |
| | | this.processInspectVo.specificationsModel = sample.specifications |
| | | this.processInspectVo.unit = sample.unit |
| | | }, |
| | | comBack() { |
| | | this.$parent.comBackMain() |
| | | }, |
| | | handleClick(row) { |
| | | this.rowInfp = row |
| | | this.showLook = true |
| | | }, |
| | | updateInsInfo(row) { |
| | | this.rowInfp = row |
| | | this.showUp = true |
| | | }, |
| | | combackMain() { |
| | | this.showUp = false |
| | | this.showLook = false |
| | | }, |
| | | searchPro() { |
| | | this.search.countSize = this.pageSize |
| | | this.search.pageSize = this.currentPage |
| | | this.defaultInitializationTable() |
| | | }, |
| | | // ç¹å»è®¾å¤æ ä¿åç¹å»è®°å½ |
| | | nodeClick(data) { |
| | | if (data.id != undefined) this.nodeData = data; |
| | | }, |
| | | // è®¾å¤æ è¿æ»¤æç´¢ |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | // è·åè®¾å¤æ å
容 |
| | | getOptions(row) { |
| | | this.$axios.get(this.$api.url.inspectionItemChooseDev, { |
| | | params: { |
| | | father: row.father, |
| | | name: row.name, |
| | | technologyId: this.processInspectVo.technologyId |
| | | } |
| | | }).then(res => { |
| | | this.materialOptions = res.data; |
| | | if(this.materialOptions.length===1&&row.did!=null){ |
| | | this.$message({ |
| | | message: '该项ç®ä¸åªæä¸ä¸ªè¯éªè®¾å¤ï¼æ ééæ©ï¼', |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | row.isSelectDevice = true |
| | | this.filterText = row.did |
| | | }); |
| | | }, |
| | | // ç¹å»è¡¨æ ¼éæ©è§¦å |
| | | clickTableSelect(scope) { |
| | | if(this.clickSelectDevice.index!=null){ |
| | | this.$set(this.inspectionItems[this.clickSelectDevice.index],'isSelectDevice',false) |
| | | } |
| | | this.clickSelectDevice.index = scope.$index; |
| | | this.clickSelectDevice.rpId = scope.row.id; |
| | | this.getOptions(scope.row); |
| | | }, |
| | | // ç¹å»æ éé¢çç¡®å® |
| | | clickNodeSure(row) { |
| | | let select = this.materialOptions.filter(item => { |
| | | return item.id === this.filterText |
| | | })[0] |
| | | this.nodeData.id = select.id |
| | | this.nodeData.name = select.device |
| | | if (this.detailId == null) { |
| | | this.inspectionItems[ |
| | | this.clickSelectDevice.index |
| | | ].did = this.nodeData.id; |
| | | this.inspectionItems[ |
| | | this.clickSelectDevice.index |
| | | ].dname = this.nodeData.name; |
| | | this.centerDialogVisible = false; |
| | | } else { |
| | | this.$axios |
| | | .post(this.$api.url.inspectionItemUpdateDevByInsId, { |
| | | id: this.clickSelectDevice.rpId, |
| | | type: 2, |
| | | devId: this.nodeData.id |
| | | }) |
| | | .then(res => { |
| | | this.getTableData() |
| | | this.centerDialogVisible = false; |
| | | row.isSelectDevice=false |
| | | }); |
| | | } |
| | | }, |
| | | changeState(row, index) { |
| | | if (row.did != null && row.did != '') { |
| | | // let val = row.empiricalValueAddss.filter(item => { |
| | | // return item != '' && item != null |
| | | // }) |
| | | // let eq = val.filter(item => { |
| | | // return /^[^><=]/.test(item) |
| | | // }) |
| | | // if (eq.length > 0) { |
| | | // this.$message({ |
| | | // message: "æ£æµå¼[" + eq + "]æ ¼å¼é¦ä½åºå
å«>,<æè
=", |
| | | // type: 'warning' |
| | | // }); |
| | | // return |
| | | // } |
| | | let str = "" |
| | | row.empiricalValueAddss.forEach(e => { |
| | | str += e + "," |
| | | }) |
| | | if (str.slice(0, -1) === '' || str.slice(0, -1) === null || str.slice(0, -1) === undefined) { |
| | | return |
| | | } |
| | | this.$axios.post(this.$api.url.inspectionItemlose_focus_update, { |
| | | deviceId: row.did, |
| | | inspectionItemId: row.id, |
| | | inspectionValue: str.slice(0, -1) |
| | | }, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res => { |
| | | row.result = res.data.result |
| | | row.username = res.data.username |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: 'è¯·éæ©æ©è®¾å¤ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }, |
| | | // æ¯é¡µæ¡æ°æ¹åæ¶è§¦å éæ©ä¸é¡µæ¾ç¤ºå¤å°è¡ |
| | | handleSizeChange(val) { |
| | | this.search.countSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | handleSpanMethod({ row, column, rowIndex, columnIndex }) { |
| | | if (columnIndex === 0) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | if (columnIndex === 1) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | }, |
| | | // åå¹¶è¡¨æ ¼ |
| | | mergeTable() { |
| | | this.rowList = [] |
| | | this.spanArr = [] |
| | | this.position = 0 |
| | | this.inspectionItems.forEach((item, index) => { |
| | | if (index === 0) { |
| | | this.spanArr.push(1); |
| | | this.position = 0; |
| | | } else { |
| | | if (this.inspectionItems[index].father === this.inspectionItems[index - 1].father) { |
| | | this.spanArr[this.position] += 1; |
| | | this.spanArr.push(0); |
| | | } else { |
| | | this.spanArr.push(1); |
| | | this.position = index; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | changeOptionSoptionSprocesses() { |
| | | this.optionTechnology = [] |
| | | let working = this.optionSoptionSprocesses.filter(item => { |
| | | return item.name === this.processInspectVo.techfather |
| | | })[0] |
| | | this.optionTechnology = working.children |
| | | }, |
| | | addTestProjevt() { |
| | | // this.isAddProject = true |
| | | let val = JSON.parse(JSON.stringify(this.processInspectVo)) |
| | | val.material = this.processInspectVo.material.split("-")[1] |
| | | val.id = this.processInspectVo.material.split("-")[0] |
| | | this.$axios.post(this.$api.url.finishedInspectAddFinish, val, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res => { |
| | | if (res.code == 201) { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.detailId = res.data |
| | | this.inspectionResultForm[0].id = val.mcode |
| | | this.inspectionResultForm[0].name = val.material |
| | | this.getTableData() |
| | | }) |
| | | }, |
| | | getTableData() { |
| | | console.log(this.rowInfo); |
| | | this.$axios.get(this.$api.url.finishedInspectSelectFinishInspectsListById, { |
| | | params: { |
| | | id: this.rowInfo.id |
| | | } |
| | | }).then(res => { |
| | | this.processInspectVo.technologyId = res.data[0].techId |
| | | }) |
| | | this.$axios.get(this.$api.url.inspectionItemListUser, { |
| | | params: { |
| | | id: this.detailId, |
| | | type: 2 |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length < 1) { |
| | | return |
| | | } |
| | | this.inspectionItems = res.data |
| | | let arr = [] |
| | | let val = JSON.parse(JSON.stringify(this.inspectionItems)) |
| | | const uName = [] |
| | | //转æä¸ç»´æ°ç» |
| | | val.forEach(l => { |
| | | let father = l.father |
| | | l.children.forEach(c => { |
| | | c.father = father |
| | | c.empiricalValueAddss = [] |
| | | if (c.inspectionValue != '' && c.inspectionValue != null) { |
| | | c.empiricalValueAddss = c.inspectionValue.split(","); |
| | | } else { |
| | | c.empiricalValueAddss.push("") |
| | | } |
| | | uName.push(c['username']) |
| | | c.isSelectDevice = false |
| | | arr.push(c) |
| | | }) |
| | | }) |
| | | this.inspectionItems = arr |
| | | let arrSort = JSON.parse(JSON.stringify(arr)) |
| | | //æ ¹æ®éå对象æ°ç»é¿åº¦æåº |
| | | arrSort.sort((a, b) => { |
| | | if (a.empiricalValueAddss.length < b.empiricalValueAddss.length) { |
| | | return -1; // aæå¨båé¢ |
| | | } else if (a.empiricalValueAddss.length > b.empiricalValueAddss.length) { |
| | | return 1; // aæå¨båé¢ |
| | | } else { |
| | | return 0; // ä¿æç¸å¯¹é¡ºåºä¸å |
| | | } |
| | | }); |
| | | // console.log(arrSort); |
| | | console.log(uName); |
| | | let name = [...new Set(uName)].filter(item => item !== null); |
| | | let rname = '' |
| | | name.forEach(m => { |
| | | rname += m + "," |
| | | }) |
| | | this.inspectionResultForm[0].inspecter = rname.slice(0, -1) |
| | | this.empiricalValueAdd = arrSort[arrSort.length - 1].empiricalValueAddss.length |
| | | this.mergeTable(arr) |
| | | }) |
| | | }, |
| | | selectSample() { |
| | | let sample = this.optionsSamplename.filter(item => { |
| | | return item.name === this.processInspectVo.material |
| | | })[0] |
| | | this.processInspectVo.techfather = null |
| | | this.processInspectVo.techname = null |
| | | this.processInspectVo.materialCode = sample.code |
| | | this.processInspectVo.specificationsModel = sample.specifications |
| | | this.processInspectVo.unit = sample.unit |
| | | this.optionSoptionSprocesses = [] |
| | | this.optionSoptionSprocesses = sample.children |
| | | }, |
| | | selectInfoByOrderId() { |
| | | this.$axios.get(this.$api.url.finishedInspectChooseMater, { |
| | | params: { |
| | | orderNumber: this.processInspectVo.orderNumber |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length > 0) { |
| | | console.log(res.data); |
| | | this.processInspectVo.sname = res.data[0].sname |
| | | this.processInspectVo.prname = res.data[0].prname |
| | | this.optionsSamplename = res.data[0].children |
| | | } else { |
| | | this.$message({ |
| | | message: '没æè¯¥è®¢åå·ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | // å½å页æ¹åæ¶è§¦å 跳转å
¶ä»é¡µ |
| | | handleCurrentChange(val) { |
| | | this.search.pageSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | // æ¾ç¤ºæ°å¢é¡µé¢ |
| | | handleAddNew() { |
| | | this.showAddPage = true; |
| | | // this.getTableData() |
| | | }, |
| | | // è¡¨æ ¼åå§åæ¥å£ |
| | | defaultInitializationTable() { |
| | | this.$axios |
| | | .post(this.$api.url.selectProcessInspectsList, this.search) |
| | | .then(res => { |
| | | this.inspectionTableTotal = res.data.total; |
| | | this.inspectionTable = res.data.row; |
| | | }); |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine() { |
| | | let obj = { |
| | | material: "", |
| | | materialCode: "", |
| | | orderNumber: "", |
| | | quantity: 0, |
| | | specificationsModel: "", |
| | | techfather: "", |
| | | techname: "", |
| | | technologyId: 0, |
| | | unit: "" |
| | | }; |
| | | this.inspectionItems.push(obj); |
| | | }, |
| | | // å é¤è¡ |
| | | clickDeleteline(scope) { |
| | | this.inspectionItems.splice(scope.$index, 1); |
| | | }, |
| | | // å 餿£éªå¼å |
| | | clickDeleteInspectionColumn() { |
| | | if (this.empiricalValueAdd - 1 === 0) { |
| | | } else { |
| | | if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { |
| | | this.empiricalValueAdd = this.empiricalValueAdd - 1; |
| | | this.inspectionItems.forEach(i => { |
| | | i.testValueList.splice(this.empiricalValueAdd, 1); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // æ·»å æ£éªå¼å |
| | | clickAddInspectionColumn() { |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | } |
| | | }, |
| | | created() { |
| | | this.defaultInitializationTable(); // åå§åè¡¨æ ¼æ°æ® |
| | | } |
| | | } |
| | | }, |
| | | changeOptionsSamplename() { |
| | | let id = this.processInspectVo.material.split("-")[0] |
| | | let sample = this.optionsSamplename.filter(o => { |
| | | return o.id == id |
| | | })[0] |
| | | this.processInspectVo.qualityTraceability = sample.qualityTraceability |
| | | this.processInspectVo.mcode = sample.mcode |
| | | this.processInspectVo.specificationsModel = sample.specifications |
| | | this.processInspectVo.unit = sample.unit |
| | | }, |
| | | comBack() { |
| | | this.$parent.comBackMain() |
| | | }, |
| | | handleClick(row) { |
| | | this.rowInfp = row |
| | | this.showLook = true |
| | | }, |
| | | updateInsInfo(row) { |
| | | this.rowInfp = row |
| | | this.showUp = true |
| | | }, |
| | | combackMain() { |
| | | this.showUp = false |
| | | this.showLook = false |
| | | }, |
| | | searchPro() { |
| | | this.search.countSize = this.pageSize |
| | | this.search.pageSize = this.currentPage |
| | | this.defaultInitializationTable() |
| | | }, |
| | | // ç¹å»è®¾å¤æ ä¿åç¹å»è®°å½ |
| | | nodeClick(data) { |
| | | if (data.id != undefined) this.nodeData = data; |
| | | }, |
| | | // è®¾å¤æ è¿æ»¤æç´¢ |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | // è·åè®¾å¤æ å
容 |
| | | getOptions(row) { |
| | | this.$axios.get(this.$api.url.inspectionItemChooseDev, { |
| | | params: { |
| | | father: row.father, |
| | | name: row.name, |
| | | technologyId: this.processInspectVo.technologyId |
| | | } |
| | | }).then(res => { |
| | | this.materialOptions = res.data; |
| | | if (this.materialOptions.length === 1 && row.did != null) { |
| | | this.$message({ |
| | | message: '该项ç®ä¸åªæä¸ä¸ªè¯éªè®¾å¤ï¼æ ééæ©ï¼', |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | row.isSelectDevice = true |
| | | }); |
| | | }, |
| | | // ç¹å»è¡¨æ ¼éæ©è§¦å |
| | | clickTableSelect(scope) { |
| | | this.centerDialogVisible = true; |
| | | this.clickSelectDevice.index = scope.$index; |
| | | this.clickSelectDevice.rpId = scope.row.id; |
| | | this.getOptions(scope.row); |
| | | }, |
| | | // ç¹å»æ éé¢çç¡®å® |
| | | clickNodeSure(row) { |
| | | if (this.detailId == null) { |
| | | this.projectTable[this.clickSelectDevice.index].deviceId = this.nodeData.id; |
| | | this.projectTable[this.clickSelectDevice.index].deviceName = this.nodeData.name; |
| | | this.centerDialogVisible = false; |
| | | } else { |
| | | this.$axios.post(this.$api.url.inspectionItemUpdateDevByInsId, { |
| | | id: this.clickSelectDevice.rpId, |
| | | devId: this.nodeData.id, |
| | | type: 2 |
| | | }).then(res => { |
| | | this.centerDialogVisible = false; |
| | | this.inspectionItems.forEach(a=>{ |
| | | if(a.id == this.clickSelectDevice.rpId){ |
| | | a.dname = this.nodeData.name |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | changeState(row, index) { |
| | | if (row.did != null && row.did != '') { |
| | | // let val = row.empiricalValueAddss.filter(item => { |
| | | // return item != '' && item != null |
| | | // }) |
| | | // let eq = val.filter(item => { |
| | | // return /^[^><=]/.test(item) |
| | | // }) |
| | | // if (eq.length > 0) { |
| | | // this.$message({ |
| | | // message: "æ£æµå¼[" + eq + "]æ ¼å¼é¦ä½åºå
å«>,<æè
=", |
| | | // type: 'warning' |
| | | // }); |
| | | // return |
| | | // } |
| | | let str = "" |
| | | row.empiricalValueAddss.forEach(e => { |
| | | str += e + "," |
| | | }) |
| | | if (str.slice(0, -1) === '' || str.slice(0, -1) === null || str.slice(0, -1) === undefined) { |
| | | return |
| | | } |
| | | this.$axios.post(this.$api.url.inspectionItemlose_focus_update, { |
| | | deviceId: row.did, |
| | | inspectionItemId: row.id, |
| | | inspectionValue: str.slice(0, -1) |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res => { |
| | | row.result = res.data.result |
| | | row.username = res.data.username |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: 'è¯·éæ©æ©è®¾å¤ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }, |
| | | // æ¯é¡µæ¡æ°æ¹åæ¶è§¦å éæ©ä¸é¡µæ¾ç¤ºå¤å°è¡ |
| | | handleSizeChange(val) { |
| | | this.search.countSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | handleSpanMethod({ |
| | | row, |
| | | column, |
| | | rowIndex, |
| | | columnIndex |
| | | }) { |
| | | if (columnIndex === 0) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | if (columnIndex === 1) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | }, |
| | | // åå¹¶è¡¨æ ¼ |
| | | mergeTable() { |
| | | this.rowList = [] |
| | | this.spanArr = [] |
| | | this.position = 0 |
| | | this.inspectionItems.forEach((item, index) => { |
| | | if (index === 0) { |
| | | this.spanArr.push(1); |
| | | this.position = 0; |
| | | } else { |
| | | if (this.inspectionItems[index].father === this.inspectionItems[index - 1].father) { |
| | | this.spanArr[this.position] += 1; |
| | | this.spanArr.push(0); |
| | | } else { |
| | | this.spanArr.push(1); |
| | | this.position = index; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | changeOptionSoptionSprocesses() { |
| | | this.optionTechnology = [] |
| | | let working = this.optionSoptionSprocesses.filter(item => { |
| | | return item.name === this.processInspectVo.techfather |
| | | })[0] |
| | | this.optionTechnology = working.children |
| | | }, |
| | | addTestProjevt() { |
| | | // this.isAddProject = true |
| | | let val = JSON.parse(JSON.stringify(this.processInspectVo)) |
| | | val.material = this.processInspectVo.material.split("-")[1] |
| | | val.id = this.processInspectVo.material.split("-")[0] |
| | | this.$axios.post(this.$api.url.finishedInspectAddFinish, val, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res => { |
| | | if (res.code == 201) { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.detailId = res.data |
| | | this.inspectionResultForm[0].id = val.mcode |
| | | this.inspectionResultForm[0].name = val.material |
| | | this.getTableData() |
| | | }) |
| | | }, |
| | | getTableData() { |
| | | console.log(this.rowInfo); |
| | | this.$axios.get(this.$api.url.finishedInspectSelectFinishInspectsListById, { |
| | | params: { |
| | | id: this.rowInfo.id |
| | | } |
| | | }).then(res => { |
| | | this.processInspectVo.technologyId = res.data[0].techId |
| | | }) |
| | | this.$axios.get(this.$api.url.inspectionItemListUser, { |
| | | params: { |
| | | id: this.detailId, |
| | | type: 2 |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length < 1) { |
| | | return |
| | | } |
| | | this.inspectionItems = res.data |
| | | let arr = [] |
| | | let val = JSON.parse(JSON.stringify(this.inspectionItems)) |
| | | const uName = [] |
| | | //转æä¸ç»´æ°ç» |
| | | val.forEach(l => { |
| | | let father = l.father |
| | | l.children.forEach(c => { |
| | | c.father = father |
| | | c.empiricalValueAddss = [] |
| | | if (c.inspectionValue != '' && c.inspectionValue != null) { |
| | | c.empiricalValueAddss = c.inspectionValue.split(","); |
| | | } else { |
| | | c.empiricalValueAddss.push("") |
| | | } |
| | | uName.push(c['username']) |
| | | c.isSelectDevice = false |
| | | arr.push(c) |
| | | }) |
| | | }) |
| | | this.inspectionItems = arr |
| | | let arrSort = JSON.parse(JSON.stringify(arr)) |
| | | //æ ¹æ®éå对象æ°ç»é¿åº¦æåº |
| | | arrSort.sort((a, b) => { |
| | | if (a.empiricalValueAddss.length < b.empiricalValueAddss.length) { |
| | | return -1; // aæå¨båé¢ |
| | | } else if (a.empiricalValueAddss.length > b.empiricalValueAddss.length) { |
| | | return 1; // aæå¨båé¢ |
| | | } else { |
| | | return 0; // ä¿æç¸å¯¹é¡ºåºä¸å |
| | | } |
| | | }); |
| | | // console.log(arrSort); |
| | | console.log(uName); |
| | | let name = [...new Set(uName)].filter(item => item !== null); |
| | | let rname = '' |
| | | name.forEach(m => { |
| | | rname += m + "," |
| | | }) |
| | | this.inspectionResultForm[0].inspecter = rname.slice(0, -1) |
| | | this.empiricalValueAdd = arrSort[arrSort.length - 1].empiricalValueAddss.length |
| | | this.mergeTable(arr) |
| | | }) |
| | | }, |
| | | selectSample() { |
| | | let sample = this.optionsSamplename.filter(item => { |
| | | return item.name === this.processInspectVo.material |
| | | })[0] |
| | | this.processInspectVo.techfather = null |
| | | this.processInspectVo.techname = null |
| | | this.processInspectVo.materialCode = sample.code |
| | | this.processInspectVo.specificationsModel = sample.specifications |
| | | this.processInspectVo.unit = sample.unit |
| | | this.optionSoptionSprocesses = [] |
| | | this.optionSoptionSprocesses = sample.children |
| | | }, |
| | | selectInfoByOrderId() { |
| | | this.$axios.get(this.$api.url.finishedInspectChooseMater, { |
| | | params: { |
| | | orderNumber: this.processInspectVo.orderNumber |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length > 0) { |
| | | console.log(res.data); |
| | | this.processInspectVo.sname = res.data[0].sname |
| | | this.processInspectVo.prname = res.data[0].prname |
| | | this.optionsSamplename = res.data[0].children |
| | | } else { |
| | | this.$message({ |
| | | message: '没æè¯¥è®¢åå·ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | // å½å页æ¹åæ¶è§¦å 跳转å
¶ä»é¡µ |
| | | handleCurrentChange(val) { |
| | | this.search.pageSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | // æ¾ç¤ºæ°å¢é¡µé¢ |
| | | handleAddNew() { |
| | | this.showAddPage = true; |
| | | // this.getTableData() |
| | | }, |
| | | // è¡¨æ ¼åå§åæ¥å£ |
| | | defaultInitializationTable() { |
| | | this.$axios |
| | | .post(this.$api.url.selectProcessInspectsList, this.search) |
| | | .then(res => { |
| | | this.inspectionTableTotal = res.data.total; |
| | | this.inspectionTable = res.data.row; |
| | | }); |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine() { |
| | | let obj = { |
| | | material: "", |
| | | materialCode: "", |
| | | orderNumber: "", |
| | | quantity: 0, |
| | | specificationsModel: "", |
| | | techfather: "", |
| | | techname: "", |
| | | technologyId: 0, |
| | | unit: "" |
| | | }; |
| | | this.inspectionItems.push(obj); |
| | | }, |
| | | // å é¤è¡ |
| | | clickDeleteline(scope) { |
| | | this.inspectionItems.splice(scope.$index, 1); |
| | | }, |
| | | // å 餿£éªå¼å |
| | | clickDeleteInspectionColumn() { |
| | | if (this.empiricalValueAdd - 1 === 0) {} else { |
| | | if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { |
| | | this.empiricalValueAdd = this.empiricalValueAdd - 1; |
| | | this.inspectionItems.forEach(i => { |
| | | i.testValueList.splice(this.empiricalValueAdd, 1); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // æ·»å æ£éªå¼å |
| | | clickAddInspectionColumn() { |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | } |
| | | }, |
| | | created() { |
| | | this.defaultInitializationTable(); // åå§åè¡¨æ ¼æ°æ® |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style></style> |
| | |
| | | <template> |
| | | <div class="laboratoryMangement"> |
| | | <el-row> |
| | | <el-col :span="12" class="top_left_name">设å¤ç»´æ¤</el-col> |
| | | <el-col :span="12" style="text-align: right;" class="title"> |
| | | <el-button |
| | | @click="testItem()" |
| | | type="primary" |
| | | size="mini" |
| | | icon="el-icon-plus" |
| | | style="background: #004EA2; " |
| | | >æ°å¢ä»ªå¨è®¾å¤</el-button |
| | | > |
| | | <el-dialog |
| | | title="æ°å¢ä»ªå¨è®¾å¤" |
| | | :visible.sync="dialogVisible" |
| | | width="750px" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form |
| | | :model="ruleForm" |
| | | :rules="rules" |
| | | ref="ruleForm" |
| | | label-width="130px" |
| | | class="demo-ruleForm" |
| | | > |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤åç§°" prop="name"> |
| | | <el-input |
| | | placeholder="请è¾å
¥ä»ªå¨è®¾å¤ç¼å·" |
| | | style="width: 206px" |
| | | clearable |
| | | v-model="ruleForm.name" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤ç¨é" prop="type"> |
| | | <el-select |
| | | v-model="ruleForm.type" |
| | | @change="selectinstall" |
| | | placeholder="è¯·éæ©è®¾å¤ç¨é" |
| | | > |
| | | <el-option label="ç产设å¤" value="1"></el-option> |
| | | <el-option label="æ£æµè®¾å¤" value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤ç»" prop="name"> |
| | | <el-select |
| | | v-model="ruleForm.equr" |
| | | allow-create |
| | | filterable |
| | | @create="" |
| | | placeholder="è¯·éæ©è®¾å¤ç»" |
| | | > |
| | | <el-option |
| | | v-for="list in equaip" |
| | | :key="list" |
| | | :label="list" |
| | | :value="list" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-autocomplete |
| | | class="inline-input" |
| | | v-model="ruleForm.equr" |
| | | :fetch-suggestions="querySearch" |
| | | placeholder="请è¾å
¥å
容" |
| | | ></el-autocomplete> --> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仪å¨è®¾å¤ç¼å·" prop="name"> |
| | | <el-input |
| | | placeholder="请è¾å
¥ä»ªå¨è®¾å¤ç¼å·" |
| | | style="width: 206px" |
| | | clearable |
| | | v-model="ruleForm.code" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¿ç®¡äºº" prop="keeper"> |
| | | <el-select |
| | | v-model="ruleForm.keeper" |
| | | placeholder="è¯·éæ©ä¿ç®¡äºº" |
| | | > |
| | | <el-option |
| | | v-for="list in keeperList" |
| | | :key="list.index" |
| | | :label="list.name" |
| | | :value="list.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è®¡éæªè³æææ" prop="endMeasure"> |
| | | <el-date-picker |
| | | style="width: 206px" |
| | | type="date" |
| | | placeholder="è¯·éæ©è®¡éæªè³æææ" |
| | | v-model="ruleForm.endMeasure" |
| | | :picker-options="pickerOptions" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤ç¶æ" prop="deviceStatus" required> |
| | | <el-select |
| | | v-model="ruleForm.deviceStatus" |
| | | placeholder="è¯·éæ©è®¾å¤ç¶æ" |
| | | > |
| | | <el-option |
| | | label="è¿è¡" |
| | | style="color: #66c03b" |
| | | value="1" |
| | | ></el-option> |
| | | <el-option |
| | | label="æ¥åº" |
| | | style="color: #ac9299" |
| | | value="2" |
| | | ></el-option> |
| | | <el-option |
| | | label="æ£ä¿®" |
| | | style="color: #52d6c0" |
| | | value="3" |
| | | ></el-option> |
| | | <el-option |
| | | label="æ
é" |
| | | style="color: #f36b6c" |
| | | value="4" |
| | | ></el-option> |
| | | <el-option |
| | | label="空é²" |
| | | style="color: #fcb642" |
| | | value="5" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå®¶" prop="factory" required> |
| | | <el-input |
| | | style="width: 206px" |
| | | placeholder="请è¾å
¥åå®¶" |
| | | clearable |
| | | v-model="ruleForm.factory" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è§æ ¼åå·"> |
| | | <el-input |
| | | placeholder="è§æ ¼åå·" |
| | | :disabled="true" |
| | | style="width: 206px" |
| | | v-model="showCodeNameModel.specifications" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> --> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row class="left_row"> |
| | | <div |
| | | :style=" |
| | | <div class="laboratoryMangement"> |
| | | <el-row> |
| | | <el-col :span="12" class="top_left_name">设å¤ç»´æ¤</el-col> |
| | | <el-col :span="12" style="text-align: right;" class="title"> |
| | | <el-button @click="testItem()" type="primary" size="mini" icon="el-icon-plus" |
| | | style="background: #004EA2; ">æ°å¢ä»ªå¨è®¾å¤</el-button> |
| | | <el-dialog title="æ°å¢ä»ªå¨è®¾å¤" :visible.sync="dialogVisible" width="750px" :before-close="handleClose"> |
| | | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤åç§°" prop="name"> |
| | | <el-input placeholder="请è¾å
¥ä»ªå¨è®¾å¤ç¼å·" style="width: 206px" clearable v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤ç¨é" prop="type"> |
| | | <el-select v-model="ruleForm.type" @change="selectinstall" placeholder="è¯·éæ©è®¾å¤ç¨é"> |
| | | <el-option label="ç产设å¤" value="1"></el-option> |
| | | <el-option label="æ£æµè®¾å¤" value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤ç»" prop="name"> |
| | | <el-select v-model="ruleForm.equr" allow-create filterable @create="" placeholder="è¯·éæ©è®¾å¤ç»"> |
| | | <el-option v-for="list in equaip" :key="list" :label="list" :value="list"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仪å¨è®¾å¤ç¼å·" prop="name"> |
| | | <el-input placeholder="请è¾å
¥ä»ªå¨è®¾å¤ç¼å·" style="width: 206px" clearable v-model="ruleForm.code"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¿ç®¡äºº" prop="keeper"> |
| | | <el-select v-model="ruleForm.keeper" placeholder="è¯·éæ©ä¿ç®¡äºº"> |
| | | <el-option v-for="list in keeperList" :key="list.index" :label="list.name" :value="list.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è®¡éæªè³æææ" prop="endMeasure"> |
| | | <el-date-picker style="width: 206px" type="date" placeholder="è¯·éæ©è®¡éæªè³æææ" |
| | | v-model="ruleForm.endMeasure" :picker-options="pickerOptions"></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤ç¶æ" prop="deviceStatus" required> |
| | | <el-select v-model="ruleForm.deviceStatus" placeholder="è¯·éæ©è®¾å¤ç¶æ"> |
| | | <el-option label="è¿è¡" style="color: #66c03b" value="1"></el-option> |
| | | <el-option label="æ¥åº" style="color: #ac9299" value="2"></el-option> |
| | | <el-option label="æ£ä¿®" style="color: #52d6c0" value="3"></el-option> |
| | | <el-option label="æ
é" style="color: #f36b6c" value="4"></el-option> |
| | | <el-option label="空é²" style="color: #fcb642" value="5"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå®¶" prop="factory" required> |
| | | <el-input style="width: 206px" placeholder="请è¾å
¥åå®¶" clearable v-model="ruleForm.factory"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row class="left_row"> |
| | | <div :style=" |
| | | `width: ${isCollapse ? 300 : 0}px;transition: 1s;opacity: ${ |
| | | isCollapse ? 1 : 0 |
| | | };` |
| | | " |
| | | class="class_sidebar" |
| | | > |
| | | <el-radio-group |
| | | class="ai-tab-change" |
| | | style="width: 270px; margin-top: 5px" |
| | | v-model="equipment" |
| | | @input="RadioChange" |
| | | > |
| | | <el-radio-button label="1">ç产设å¤</el-radio-button> |
| | | <el-radio-button label="2">æ£éªè®¾å¤</el-radio-button> |
| | | </el-radio-group> |
| | | <!-- <el-input |
| | | class="frame_input" |
| | | v-model="search_class" |
| | | placeholder="请è¾å
¥åç±»åç§°" |
| | | size="small" |
| | | > |
| | | <i |
| | | slot="suffix" |
| | | class="el-icon-search" |
| | | style="font-size: 23px; padding: 5px 0;cursor:pointer;" |
| | | @click="handlerDeptList" |
| | | ></i> |
| | | </el-input> --> |
| | | <el-tree |
| | | :data="towTree" |
| | | ref="tree" |
| | | :props="{ children: 'children', label: 'father' }" |
| | | node-key="father" |
| | | default-expand-all |
| | | highlight-current |
| | | style="margin-top: 20px;" |
| | | @node-click="handleNodeClick" |
| | | > |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span |
| | | ><i |
| | | :class=" |
| | | " class="class_sidebar"> |
| | | <el-radio-group class="ai-tab-change" style="width: 270px; margin-top: 5px" v-model="equipment" |
| | | @input="RadioChange"> |
| | | <el-radio-button label="1">ç产设å¤</el-radio-button> |
| | | <el-radio-button label="2">æ£éªè®¾å¤</el-radio-button> |
| | | </el-radio-group> |
| | | <el-tree :data="towTree" ref="tree" :props="{ children: 'children', label: 'father' }" node-key="father" |
| | | default-expand-all highlight-current style="margin-top: 20px;" @node-click="handleNodeClick"> |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span><i :class=" |
| | | `node_i ${ |
| | | data.code != '[4]' |
| | | ? 'el-icon-folder-opened' |
| | | : 'el-icon-tickets' |
| | | }` |
| | | " |
| | | ></i> |
| | | {{ data.father }}</span |
| | | > |
| | | <!-- <el-button type="text" size="mini" @click.stop="remove(node, data)"> |
| | | <i class="el-icon-delete"></i> |
| | | </el-button> --> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <div |
| | | class="table_div" |
| | | :style="`width: calc(100vw - ${isCollapse ? '475' : '170'}px);`" |
| | | > |
| | | <div |
| | | :title="isCollapse ? 'ç¹å»å±å¼' : 'ç¹å»æ¶èµ·'" |
| | | class="box_bgd" |
| | | @click="isC" |
| | | > |
| | | <div class="upper_triangle"></div> |
| | | <div class="corner"> |
| | | <!-- ç¹å»å±å¼æ¶èµ·å¯¼èªå忢坹åºå¾æ --> |
| | | <i |
| | | :class=" |
| | | "></i> |
| | | {{ data.father }}</span> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <div class="table_div" :style="`width: calc(100vw - ${isCollapse ? '475' : '170'}px);`"> |
| | | <div :title="isCollapse ? 'ç¹å»å±å¼' : 'ç¹å»æ¶èµ·'" class="box_bgd" @click="isC"> |
| | | <div class="upper_triangle"></div> |
| | | <div class="corner"> |
| | | <!-- ç¹å»å±å¼æ¶èµ·å¯¼èªå忢坹åºå¾æ --> |
| | | <i :class=" |
| | | !isCollapse ? 'el-icon-arrow-left' : 'el-icon-arrow-right' |
| | | " |
| | | ></i> |
| | | </div> |
| | | <div class="under_triangle"></div> |
| | | </div> |
| | | <div class="main_table_div"> |
| | | <div class="table_top_div"> |
| | | <el-input |
| | | class="table_top_input" |
| | | size="small" |
| | | v-model="codeNameModel" |
| | | prefix-icon="el-icon-search" |
| | | placeholder="请è¾å
¥ç¼å·/设å¤åç§°/åå·è§æ ¼" |
| | | clearable |
| | | > |
| | | </el-input> |
| | | <el-button size="mini" @click="reset"><span>é ç½®</span></el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="primary" |
| | | @click="selectSearch" |
| | | style="background: #004EA2;" |
| | | ><span>æ¥ è¯¢</span></el-button |
| | | > |
| | | <el-select |
| | | @change="staueValueChange" |
| | | v-model="staue_value" |
| | | size="small" |
| | | placeholder="è¯·éæ©è®¾å¤ç¶æ" |
| | | class="table_top" |
| | | > |
| | | <el-option |
| | | label="è¿è¡" |
| | | style="color: #66c03b" |
| | | value="1" |
| | | ></el-option> |
| | | <el-option |
| | | label="æ¥åº" |
| | | style="color: #ac9299" |
| | | value="2" |
| | | ></el-option> |
| | | <el-option |
| | | label="æ£ä¿®" |
| | | style="color: #52d6c0" |
| | | value="3" |
| | | ></el-option> |
| | | <el-option |
| | | label="æ
é" |
| | | style="color: #f36b6c" |
| | | value="4" |
| | | ></el-option> |
| | | <el-option |
| | | label="空é²" |
| | | style="color: #fcb642" |
| | | value="5" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | height="calc(100vh - 220px)" |
| | | style="padding: 10px;" |
| | | > |
| | | <el-table-column prop="date" label="åºå·" width="60"> |
| | | <template v-slot="scope"> |
| | | {{ scope.$index + 1 }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="仪å¨è®¾å¤ç¼å·" width="125"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="仪å¨è®¾å¤åç§°" width="125"> |
| | | </el-table-column> |
| | | <el-table-column prop="userName" label="ä¿ç®¡äºº"> </el-table-column> |
| | | <el-table-column |
| | | prop="DATE_FORMAT(end_measure, '%Y-%m-%d')" |
| | | label="è®¡éæªè³æææ" |
| | | width="147" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="device_status" label="使ç¨ç¶æ"> |
| | | <template slot-scope="scope"> |
| | | <el-tag |
| | | v-if="scope.row.device_status == 1" |
| | | disable-transitions |
| | | type="success" |
| | | >è¿è¡</el-tag |
| | | > |
| | | <el-tag |
| | | v-else-if="scope.row.device_status == 2" |
| | | disable-transitions |
| | | type="info" |
| | | >æ¥åº</el-tag |
| | | > |
| | | <el-tag |
| | | v-else-if="scope.row.device_status == 3" |
| | | style="color: #52d6c0" |
| | | disable-transitions |
| | | type="info" |
| | | >æ£ä¿®</el-tag |
| | | > |
| | | <el-tag |
| | | v-else-if="scope.row.device_status == 4" |
| | | disable-transitions |
| | | type="danger" |
| | | >æ
é</el-tag |
| | | > |
| | | <el-tag |
| | | v-else-if="scope.row.device_status == 5" |
| | | style="color: #fcb642" |
| | | disable-transitions |
| | | type="info" |
| | | >空é²</el-tag |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="factory" |
| | | label="åå®¶" |
| | | :show-overflow-tooltip="true" |
| | | > |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="inspectProject" label="æ£æµé¡¹ç®"> |
| | | </el-table-column> |
| | | <el-table-column prop="testSample" label="æ£éªæ ·å"> |
| | | </el-table-column> |
| | | <el-table-column prop="user_name" label="æ£æµäºº"> </el-table-column> --> |
| | | <el-table-column prop="name" label="æä½"> |
| | | <template v-slot="scope"> |
| | | <el-button |
| | | @click="handleClick(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </el-row> |
| | | </div> |
| | | "></i> |
| | | </div> |
| | | <div class="under_triangle"></div> |
| | | </div> |
| | | <div class="main_table_div"> |
| | | <div class="table_top_div"> |
| | | <el-input class="table_top_input" size="small" v-model="codeNameModel" prefix-icon="el-icon-search" |
| | | placeholder="请è¾å
¥ç¼å·/设å¤åç§°/åå·è§æ ¼" clearable> |
| | | </el-input> |
| | | <el-button size="mini" @click="reset"><span>é ç½®</span></el-button> |
| | | <el-button size="mini" type="primary" @click="selectSearch" style="background: #004EA2;"><span>æ¥ |
| | | 询</span></el-button> |
| | | <el-select @change="staueValueChange" v-model="staue_value" size="small" placeholder="è¯·éæ©è®¾å¤ç¶æ" |
| | | class="table_top"> |
| | | <el-option label="è¿è¡" style="color: #66c03b" value="1"></el-option> |
| | | <el-option label="æ¥åº" style="color: #ac9299" value="2"></el-option> |
| | | <el-option label="æ£ä¿®" style="color: #52d6c0" value="3"></el-option> |
| | | <el-option label="æ
é" style="color: #f36b6c" value="4"></el-option> |
| | | <el-option label="空é²" style="color: #fcb642" value="5"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <el-table :data="tableData" border height="calc(100vh - 220px)" style="padding: 10px;"> |
| | | <el-table-column prop="date" label="åºå·" width="60"> |
| | | <template v-slot="scope"> |
| | | {{ scope.$index + 1 }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="仪å¨è®¾å¤ç¼å·" width="125"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="仪å¨è®¾å¤åç§°" width="125"> |
| | | </el-table-column> |
| | | <el-table-column prop="userName" label="ä¿ç®¡äºº"> </el-table-column> |
| | | <el-table-column prop="DATE_FORMAT(end_measure, '%Y-%m-%d')" label="è®¡éæªè³æææ" width="147"> |
| | | </el-table-column> |
| | | <el-table-column prop="device_status" label="使ç¨ç¶æ"> |
| | | <template slot-scope="scope"> |
| | | <el-tag v-if="scope.row.device_status == 1" disable-transitions type="success">è¿è¡</el-tag> |
| | | <el-tag v-else-if="scope.row.device_status == 2" disable-transitions type="info">æ¥åº</el-tag> |
| | | <el-tag v-else-if="scope.row.device_status == 3" style="color: #52d6c0" disable-transitions |
| | | type="info">æ£ä¿®</el-tag> |
| | | <el-tag v-else-if="scope.row.device_status == 4" disable-transitions type="danger">æ
é</el-tag> |
| | | <el-tag v-else-if="scope.row.device_status == 5" style="color: #fcb642" disable-transitions |
| | | type="info">空é²</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="factory" label="åå®¶" :show-overflow-tooltip="true"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="æä½"> |
| | | <template v-slot="scope"> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "LaboratoryManagement", |
| | | data() { |
| | | return { |
| | | |
| | | value: "", |
| | | dialogVisible: false, |
| | | checkTreeNode:{}, |
| | | isCollapse: true, //é»è®¤ä¸ºå±å¼ |
| | | radio1: "true", // åç±»åæ¢ |
| | | tableData: [], // ä¸»é¡µè¡¨æ ¼æ°æ® |
| | | inspectionList: [], //æ£éªé¡¹ç®ä¸ææ¡å表 |
| | | showCodeNameModel: {}, // æ°å¢ä»ªå¨å±ç¤ºç¦æ¢æ¡ |
| | | keeperList: [], // æ°å¢è®¾å¤ä¿ç®¡äººä¸ææ¡ |
| | | parentClassificationList: [], // æ°å¢è®¾å¤ç¶çº§åç±»ä¸ææ¡ |
| | | search_class: "", // åç±»æç´¢æ¡å
容 |
| | | codeNameModel: "", // ç¼ç åç§°åå·æ¨¡ç³æ¥è¯¢ |
| | | staue_value: "", // ä¸»é¡µè¡¨æ ¼ä¸æ¹çç¶æéæ© |
| | | // BOMæ æ°æ®ç»æ |
| | | towTree: [], |
| | | equipment: '1', |
| | | equaip:[], |
| | | ruleForm: { |
| | | // æ°å¢ä»ªå¨è¡¨å |
| | | code: "", |
| | | father: "", |
| | | deviceStatus: "", |
| | | endMeasure: "", |
| | | factory: "", |
| | | keeper: "", |
| | | name: "", |
| | | rawInsProductId: "", |
| | | type: "", |
| | | // treedata:{ |
| | | // father:'设å¤ç»1', |
| | | // }, |
| | | equr:'', |
| | | |
| | | }, |
| | | delete:{}, |
| | | equip:1, |
| | | rules: { |
| | | name: [ |
| | | { required: true, message: "请è¾å
¥ä»ªå¨è®¾å¤ç¼å·", trigger: "blur" }, |
| | | { min: 2, max: 25, message: "é¿åº¦å¨ 2 å° 25 个å符", trigger: "blur" } |
| | | ], |
| | | keeper: [ |
| | | { required: true, message: "è¯·éæ©ä¿ç®¡äºº", trigger: "change" } |
| | | ], |
| | | endMeasure: [ |
| | | { |
| | | type: "date", |
| | | required: true, |
| | | message: "è¯·éæ©è®¡éæªè³æææ", |
| | | trigger: "change" |
| | | } |
| | | ], |
| | | deviceStatus: [ |
| | | { required: true, message: "è¯·éæ©è®¾å¤ç¶æ", trigger: "change" } |
| | | ], |
| | | factory: [ |
| | | { required: true, message: "请è¾å
¥åå®¶", trigger: "blur" }, |
| | | { min: 2, max: 25, message: "é¿åº¦å¨ 2 å° 50 个å符", trigger: "blur" } |
| | | ], |
| | | rawInsProductId: [ |
| | | { required: true, message: "è¯·éæ©æ£æµé¡¹ç®", trigger: "change" } |
| | | ], |
| | | type: [{ required: true, message: "è¯·éæ©è®¾å¤ç¨é", trigger: "change" }] |
| | | }, |
| | | pickerOptions: { |
| | | //ç¦ç¨å½åæ¥æä¹åçæ¥æ |
| | | disabledDate(time) { |
| | | //Date.now()æ¯javascriptä¸çå
ç½®å½æ°ï¼å®è¿åèª1970å¹´1æ1æ¥00:00:00 UTC以æ¥ç»è¿çæ¯«ç§æ°ã |
| | | return time.getTime() < Date.now() - 8.64e7; |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | // åå§åè°ç¨äºçº§æ |
| | | this.twoTreeApi(); |
| | | // åå§åè°ç¨è¡¨æ ¼æ°æ® |
| | | // this.tableDataApi(); |
| | | // this.selectDevice() |
| | | }, |
| | | methods: { |
| | | handleNodeClick(val) { |
| | | this.checkTreeNode = val |
| | | console.log(this.checkTreeNode); |
| | | this.selectDevice() |
| | | }, |
| | | selectInput(){ |
| | | |
| | | }, |
| | | // querySearch(queryString, cb) { |
| | | // console.log(this.equaip); |
| | | // var restaurants = this.equaip; |
| | | // var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants; |
| | | // // è°ç¨ callback è¿å建议åè¡¨çæ°æ® |
| | | // cb(results); |
| | | // }, |
| | | // createFilter(queryString) { |
| | | // return (restaurant) => { |
| | | // return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0); |
| | | // }; |
| | | // }, |
| | | staueValueChange() { |
| | | this.selectDevice() |
| | | // this.tableData = []; |
| | | // let val = 1; |
| | | // if (this.radio1 === "false") { |
| | | // val = 2; |
| | | // } |
| | | // this.$axios |
| | | // .get(this.$api.url.tableDeviceList, { |
| | | // params: { type: val, deviceStatue: this.staue_value } |
| | | // }) |
| | | // .then(res => { |
| | | // this.tableData = res.data; |
| | | // }); |
| | | }, |
| | | // 卿æ§å¶å±å¼ä¸æ¶èµ·å忢坹åºå¾æ |
| | | isC() { |
| | | this.isCollapse = !this.isCollapse; |
| | | }, |
| | | productSelect(e) { |
| | | let value = e.target.value; // è¾å
¥æ¡å¼ |
| | | if (value) { |
| | | // ä½ è¾å
¥ææè¿ä¸ªå¼ ä¸ä¸ºç©ºï¼å¦æä½ 䏿æ¡éæ©çè¯ è¿ä¸ªå¼ä¸ºç©º |
| | | this.value = value; |
| | | } |
| | | }, |
| | | submitForm() { |
| | | // this.$refs.ruleForm.validate(valid => { |
| | | // if (valid) { |
| | | // this.ruleForm.father = this.value; |
| | | // this.$axios |
| | | // .post(this.$api.url.addDeviceInstrument, this.ruleForm, { |
| | | // headers: { |
| | | // "Content-Type": "application/json" |
| | | // } |
| | | // }) |
| | | // .then(res => { |
| | | // this.keeperList = res.data; |
| | | // // æåå
³éæ°å¢å¼¹åºæ¡ |
| | | // this.dialogVisible = false; |
| | | // }); |
| | | // } else { |
| | | // console.log("error submit!!"); |
| | | // return false; |
| | | // } |
| | | // }); |
| | | this.addApi() |
| | | this.dialogVisible = false; |
| | | }, |
| | | handleClose(done) { |
| | | this.$confirm("确认å
³éï¼") |
| | | .then(_ => { |
| | | done(); |
| | | }) |
| | | .catch(_ => {}); |
| | | }, |
| | | testItem() { |
| | | this.dialogVisible = true; |
| | | this.$axios.get(this.$api.url.addDeviceKeeper).then(res => { |
| | | this.keeperList = res.data; |
| | | }); |
| | | }, |
| | | selectinstall(val) { |
| | | this.equip = val |
| | | this.listgroup() |
| | | }, |
| | | listgroup() { |
| | | this.$axios.get(this.$api.url.listgroup,{ |
| | | params:{ |
| | | type:this.equip |
| | | } |
| | | }) |
| | | .then(res =>{ |
| | | this.equaip = res.data |
| | | // res.data.forEach(item=>{ |
| | | // let obj={ |
| | | // id: item, |
| | | // value: item |
| | | // } |
| | | // this.equaip.push(obj) |
| | | console.log(this.equaip); |
| | | // }) |
| | | }) |
| | | }, |
| | | RadioChange(val){ |
| | | console.log(val); |
| | | this.equip = val |
| | | this.twoTreeApi() |
| | | }, |
| | | twoTreeApi() { |
| | | this.$axios.get(this.$api.url.towTree,{ |
| | | params:{ |
| | | type:this.equip, |
| | | } |
| | | }).then(res => { |
| | | // let list = res.data; |
| | | // list.forEach(i => { |
| | | // if (i.name === undefined) { |
| | | // i.name = i.children[0].name; |
| | | // i.id = i.children[0].id; |
| | | // i.children = undefined; |
| | | // } |
| | | // }); |
| | | this.towTree = res.data; |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.towTree[0].father) // é»è®¤éä¸èç¹ç¬¬ä¸ä¸ª |
| | | }) |
| | | console.log(this.towTree); |
| | | let one=this.towTree[0] |
| | | console.log(one); |
| | | let name =one.father |
| | | this.checkTreeNode.father = name |
| | | console.log(name); |
| | | this.selectDeviceStart(name) |
| | | }); |
| | | }, |
| | | selectDeviceStart(name,) {//å³è¾¹æ°æ® |
| | | this.$axios.get(this.$api.url.selectDevice,{ |
| | | params:{ |
| | | father:name, |
| | | type:this.equip, |
| | | deviceStatus:this.staue_value, |
| | | message:this.codeNameModel, |
| | | } |
| | | }).then(res =>{ |
| | | console.log(res); |
| | | this.tableData = res.data |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | selectDevice() {//å³è¾¹æ°æ® |
| | | this.$axios.get(this.$api.url.selectDevice,{ |
| | | params:{ |
| | | father:this.checkTreeNode.father, |
| | | type:this.equip, |
| | | deviceStatus:this.staue_value, |
| | | message:this.codeNameModel, |
| | | } |
| | | }).then(res =>{ |
| | | console.log(res); |
| | | this.tableData = res.data |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | }, |
| | | addApi() { |
| | | this.$axios.post(this.$api.url.addApi,{ |
| | | code:this.ruleForm.code, |
| | | deviceStatus:this.ruleForm.deviceStatus, |
| | | endMeasure:this.ruleForm.endMeasure, |
| | | factory:this.ruleForm.factory, |
| | | father:this.ruleForm.equr, |
| | | keeper:this.ruleForm.keeper, |
| | | name:this.ruleForm.name, |
| | | type:this.ruleForm.type, |
| | | }, {headers: {"Content-Type": "application/json"} |
| | | }).then(res =>{ |
| | | this.selectDevice() |
| | | this.$message.success('æ°å¢æå') |
| | | this.ruleForm = {} |
| | | }) |
| | | }, |
| | | // tableDataApi() { |
| | | // this.$axios.get(this.$api.url.tableDeviceList).then(res => { |
| | | // this.tableData = res.data; |
| | | // }); |
| | | // }, |
| | | reset() { |
| | | // this.tableDataApi(); |
| | | // this.radio1 = "true"; |
| | | // this.codeNameModel = ""; |
| | | // this.staue_value = ""; |
| | | this.staue_value = "" |
| | | this.codeNameModel = "" |
| | | this.selectDevice() |
| | | }, |
| | | handlerDeptList() { |
| | | this.towTree = []; |
| | | let val = 1; |
| | | if (this.radio1 === "false") { |
| | | val = 2; |
| | | } |
| | | this.$axios |
| | | .get(this.$api.url.towTree, { |
| | | params: { type: val, search_class: this.search_class } |
| | | }) |
| | | .then(res => { |
| | | this.towTree = res.data; |
| | | }); |
| | | }, |
| | | selectSearch() { |
| | | this.selectDevice() |
| | | // this.tableData = []; |
| | | // if (this.radio1 === "false") { |
| | | // this.$axios |
| | | // .get(this.$api.url.tableDeviceList, { |
| | | // params: { type: 1, codeNameModel: this.codeNameModel } |
| | | // }) |
| | | // .then(res => { |
| | | // this.tableData = res.data; |
| | | // }); |
| | | // } else if (this.radio1 === "true") { |
| | | // this.$axios |
| | | // .get(this.$api.url.tableDeviceList, { |
| | | // params: { type: 2, codeNameModel: this.codeNameModel } |
| | | // }) |
| | | // .then(res => { |
| | | // this.tableData = res.data; |
| | | // }); |
| | | // } |
| | | }, |
| | | delDeviceById() { |
| | | this.$axios.post(this.$api.url.delDeviceById,{ |
| | | id:this.delete.id |
| | | }).then(res=>{ |
| | | this.$parent.removeAllTab() |
| | | }); |
| | | }, |
| | | handleClick(row) { |
| | | console.log(row); |
| | | this.delete = row |
| | | this.delDeviceById() |
| | | this.selectDevice() |
| | | // this.$confirm("æ¤æä½å°æ°¸ä¹
å é¤è¯¥è®¾å¤, æ¯å¦ç»§ç»?", "æç¤º", { |
| | | // confirmButtonText: "ç¡®å®", |
| | | // cancelButtonText: "åæ¶", |
| | | // type: "warning" |
| | | // }).then(() => { |
| | | // this.$axios |
| | | // .delete(this.$api.url.deleteDevice, { params: { deviceId: row.id } }) |
| | | // .then(res => { |
| | | // this.$message({ |
| | | // message: res.message, |
| | | // type: "success" |
| | | // }); |
| | | // datas.splice(index, 1); |
| | | // }) |
| | | // .catch(err => { |
| | | // this.$message({ |
| | | // message: err.message, |
| | | // type: "warning" |
| | | // }); |
| | | // }); |
| | | // }); |
| | | }, |
| | | remove(node, data) { |
| | | this.$confirm("æ¤æä½å°æ°¸ä¹
å é¤è¯¥è®¾å¤, æ¯å¦ç»§ç»?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | console.log(`output->data`, data); |
| | | let val = 1; |
| | | if (this.radio1 === "false") { |
| | | val = 2; |
| | | } |
| | | if (data.id === undefined) { |
| | | console.log(`output->æ§è¡å`, "+++++++++++++++"); |
| | | this.$axios |
| | | .delete(this.$api.url.deleteIdorFather, { |
| | | params: { deviceFather: data.name, type: val } |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "success" |
| | | }); |
| | | this.handlerDeptList(); |
| | | this.selectSearch(); |
| | | } else { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "warning" |
| | | }); |
| | | } |
| | | }); |
| | | } else if (data.id !== undefined) { |
| | | console.log(`output->æ§è¡å`, "----------------"); |
| | | this.$axios |
| | | .delete(this.$api.url.deleteIdorFather, { params: { id: data.id } }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "success" |
| | | }); |
| | | this.handlerDeptList(); |
| | | this.selectSearch(); |
| | | } else { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "warning" |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | }, |
| | | |
| | | watch: { |
| | | "ruleForm.rawInsProductId": { |
| | | //çå¬ruleForm.rawInsProductId |
| | | handler: function(newVal, oldVal) { |
| | | if (newVal != null && newVal !== "") { |
| | | this.$axios |
| | | .get(this.$api.url.selectDeviceInspectMessage, { |
| | | params: { inspectId: newVal } |
| | | }) |
| | | .then(res => { |
| | | this.showCodeNameModel = res.data; |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // dialogVisible: { |
| | | // handler: function(newVal, oldVal) { |
| | | // if (newVal) { |
| | | // // æåæ¸
空è¾å
¥å
容 |
| | | // this.ruleForm = {}; |
| | | // this.value = ""; |
| | | // this.showCodeNameModel = {}; |
| | | // this.$refs.ruleForm.resetFields(); |
| | | // } |
| | | // } |
| | | // }, |
| | | radio1: { |
| | | handler: function(newVal, oldVal) { |
| | | this.towTree = []; |
| | | this.tableData = []; |
| | | if (newVal === "true") { |
| | | this.twoTreeApi(); |
| | | this.tableDataApi(); |
| | | } else if (newVal === "false") { |
| | | this.$axios |
| | | .get(this.$api.url.towTree, { params: { type: 2 } }) |
| | | .then(res => { |
| | | let list = res.data; |
| | | list.forEach(i => { |
| | | if (i.name === undefined) { |
| | | i.name = i.children[0].name; |
| | | i.id = i.children[0].id; |
| | | i.children = undefined; |
| | | } |
| | | }); |
| | | this.towTree = res.data; |
| | | }); |
| | | this.$axios |
| | | .get(this.$api.url.tableDeviceList, { params: { type: 2 } }) |
| | | .then(res => { |
| | | this.tableData = res.data; |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | export default { |
| | | name: "LaboratoryManagement", |
| | | data() { |
| | | return { |
| | | value: "", |
| | | dialogVisible: false, |
| | | checkTreeNode: {}, |
| | | isCollapse: true, //é»è®¤ä¸ºå±å¼ |
| | | radio1: "true", // åç±»åæ¢ |
| | | tableData: [], // ä¸»é¡µè¡¨æ ¼æ°æ® |
| | | inspectionList: [], //æ£éªé¡¹ç®ä¸ææ¡å表 |
| | | showCodeNameModel: {}, // æ°å¢ä»ªå¨å±ç¤ºç¦æ¢æ¡ |
| | | keeperList: [], // æ°å¢è®¾å¤ä¿ç®¡äººä¸ææ¡ |
| | | parentClassificationList: [], // æ°å¢è®¾å¤ç¶çº§åç±»ä¸ææ¡ |
| | | search_class: "", // åç±»æç´¢æ¡å
容 |
| | | codeNameModel: "", // ç¼ç åç§°åå·æ¨¡ç³æ¥è¯¢ |
| | | staue_value: "", // ä¸»é¡µè¡¨æ ¼ä¸æ¹çç¶æéæ© |
| | | // BOMæ æ°æ®ç»æ |
| | | towTree: [], |
| | | equipment: '1', |
| | | equaip: [], |
| | | ruleForm: { |
| | | // æ°å¢ä»ªå¨è¡¨å |
| | | code: "", |
| | | father: "", |
| | | deviceStatus: "", |
| | | endMeasure: "", |
| | | factory: "", |
| | | keeper: "", |
| | | name: "", |
| | | rawInsProductId: "", |
| | | type: "", |
| | | equr: '', |
| | | }, |
| | | delete: {}, |
| | | equip: 1, |
| | | rules: { |
| | | name: [{ |
| | | required: true, |
| | | message: "请è¾å
¥ä»ªå¨è®¾å¤ç¼å·", |
| | | trigger: "blur" |
| | | }, |
| | | { |
| | | min: 2, |
| | | max: 25, |
| | | message: "é¿åº¦å¨ 2 å° 25 个å符", |
| | | trigger: "blur" |
| | | } |
| | | ], |
| | | keeper: [{ |
| | | required: true, |
| | | message: "è¯·éæ©ä¿ç®¡äºº", |
| | | trigger: "change" |
| | | }], |
| | | endMeasure: [{ |
| | | type: "date", |
| | | required: true, |
| | | message: "è¯·éæ©è®¡éæªè³æææ", |
| | | trigger: "change" |
| | | }], |
| | | deviceStatus: [{ |
| | | required: true, |
| | | message: "è¯·éæ©è®¾å¤ç¶æ", |
| | | trigger: "change" |
| | | }], |
| | | factory: [{ |
| | | required: true, |
| | | message: "请è¾å
¥åå®¶", |
| | | trigger: "blur" |
| | | }, |
| | | { |
| | | min: 2, |
| | | max: 25, |
| | | message: "é¿åº¦å¨ 2 å° 50 个å符", |
| | | trigger: "blur" |
| | | } |
| | | ], |
| | | rawInsProductId: [{ |
| | | required: true, |
| | | message: "è¯·éæ©æ£æµé¡¹ç®", |
| | | trigger: "change" |
| | | }], |
| | | type: [{ |
| | | required: true, |
| | | message: "è¯·éæ©è®¾å¤ç¨é", |
| | | trigger: "change" |
| | | }] |
| | | }, |
| | | pickerOptions: { |
| | | //ç¦ç¨å½åæ¥æä¹åçæ¥æ |
| | | disabledDate(time) { |
| | | //Date.now()æ¯javascriptä¸çå
ç½®å½æ°ï¼å®è¿åèª1970å¹´1æ1æ¥00:00:00 UTC以æ¥ç»è¿çæ¯«ç§æ°ã |
| | | return time.getTime() < Date.now() - 8.64e7; |
| | | } |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.twoTreeApi(); |
| | | }, |
| | | methods: { |
| | | handleNodeClick(val) { |
| | | this.checkTreeNode = val |
| | | this.selectDevice() |
| | | }, |
| | | staueValueChange() { |
| | | this.selectDevice() |
| | | }, |
| | | // 卿æ§å¶å±å¼ä¸æ¶èµ·å忢坹åºå¾æ |
| | | isC() { |
| | | this.isCollapse = !this.isCollapse; |
| | | }, |
| | | productSelect(e) { |
| | | let value = e.target.value; // è¾å
¥æ¡å¼ |
| | | if (value) { |
| | | // ä½ è¾å
¥ææè¿ä¸ªå¼ ä¸ä¸ºç©ºï¼å¦æä½ 䏿æ¡éæ©çè¯ è¿ä¸ªå¼ä¸ºç©º |
| | | this.value = value; |
| | | } |
| | | }, |
| | | submitForm() { |
| | | this.addApi() |
| | | this.dialogVisible = false; |
| | | }, |
| | | handleClose(done) { |
| | | this.$confirm("确认å
³éï¼") |
| | | .then(_ => { |
| | | done(); |
| | | }) |
| | | .catch(_ => {}); |
| | | }, |
| | | testItem() { |
| | | this.dialogVisible = true; |
| | | this.$axios.get(this.$api.url.addDeviceKeeper).then(res => { |
| | | this.keeperList = res.data; |
| | | }); |
| | | }, |
| | | selectinstall(val) { |
| | | this.equip = val |
| | | this.listgroup() |
| | | }, |
| | | listgroup() { |
| | | this.$axios.get(this.$api.url.listgroup, { |
| | | params: { |
| | | type: this.equip |
| | | } |
| | | }) |
| | | .then(res => { |
| | | this.equaip = res.data |
| | | }) |
| | | }, |
| | | RadioChange(val) { |
| | | this.equip = val |
| | | this.twoTreeApi() |
| | | }, |
| | | twoTreeApi() { |
| | | this.$axios.get(this.$api.url.towTree, { |
| | | params: { |
| | | type: this.equip, |
| | | } |
| | | }).then(res => { |
| | | this.towTree = res.data; |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.towTree[0].father) // é»è®¤éä¸èç¹ç¬¬ä¸ä¸ª |
| | | }) |
| | | let one = this.towTree[0] |
| | | let name = one.father |
| | | this.checkTreeNode.father = name |
| | | this.selectDeviceStart(name) |
| | | }); |
| | | }, |
| | | selectDeviceStart(name, ) { //å³è¾¹æ°æ® |
| | | this.$axios.get(this.$api.url.selectDevice, { |
| | | params: { |
| | | father: name, |
| | | type: this.equip, |
| | | deviceStatus: this.staue_value, |
| | | message: this.codeNameModel, |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | }, |
| | | selectDevice() { //å³è¾¹æ°æ® |
| | | this.$axios.get(this.$api.url.selectDevice, { |
| | | params: { |
| | | father: this.checkTreeNode.father, |
| | | type: this.equip, |
| | | deviceStatus: this.staue_value, |
| | | message: this.codeNameModel, |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | }, |
| | | addApi() { |
| | | this.$axios.post(this.$api.url.addApi, { |
| | | code: this.ruleForm.code, |
| | | deviceStatus: this.ruleForm.deviceStatus, |
| | | endMeasure: this.ruleForm.endMeasure, |
| | | factory: this.ruleForm.factory, |
| | | father: this.ruleForm.equr, |
| | | keeper: this.ruleForm.keeper, |
| | | name: this.ruleForm.name, |
| | | type: this.ruleForm.type, |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res => { |
| | | this.twoTreeApi(); |
| | | this.$message.success('æ°å¢æå') |
| | | this.$refs.ruleForm.resetFields() |
| | | }) |
| | | }, |
| | | reset() { |
| | | this.staue_value = "" |
| | | this.codeNameModel = "" |
| | | this.selectDevice() |
| | | }, |
| | | handlerDeptList() { |
| | | this.towTree = []; |
| | | let val = 1; |
| | | if (this.radio1 === "false") { |
| | | val = 2; |
| | | } |
| | | this.$axios |
| | | .get(this.$api.url.towTree, { |
| | | params: { |
| | | type: val, |
| | | search_class: this.search_class |
| | | } |
| | | }) |
| | | .then(res => { |
| | | this.towTree = res.data; |
| | | }); |
| | | }, |
| | | selectSearch() { |
| | | this.selectDevice() |
| | | }, |
| | | delDeviceById() { |
| | | this.$axios.post(this.$api.url.delDeviceById, { |
| | | id: this.delete.id |
| | | }).then(res => { |
| | | this.$parent.removeAllTab() |
| | | }); |
| | | }, |
| | | handleClick(row) { |
| | | this.delete = row |
| | | this.delDeviceById() |
| | | this.selectDevice() |
| | | }, |
| | | remove(node, data) { |
| | | this.$confirm("æ¤æä½å°æ°¸ä¹
å é¤è¯¥è®¾å¤, æ¯å¦ç»§ç»?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | let val = 1; |
| | | if (this.radio1 === "false") { |
| | | val = 2; |
| | | } |
| | | if (data.id === undefined) { |
| | | this.$axios |
| | | .delete(this.$api.url.deleteIdorFather, { |
| | | params: { |
| | | deviceFather: data.name, |
| | | type: val |
| | | } |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "success" |
| | | }); |
| | | this.handlerDeptList(); |
| | | this.selectSearch(); |
| | | } else { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "warning" |
| | | }); |
| | | } |
| | | }); |
| | | } else if (data.id !== undefined) { |
| | | this.$axios |
| | | .delete(this.$api.url.deleteIdorFather, { |
| | | params: { |
| | | id: data.id |
| | | } |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "success" |
| | | }); |
| | | this.handlerDeptList(); |
| | | this.selectSearch(); |
| | | } else { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: "warning" |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | "ruleForm.rawInsProductId": { |
| | | //çå¬ruleForm.rawInsProductId |
| | | handler: function(newVal, oldVal) { |
| | | if (newVal != null && newVal !== "") { |
| | | this.$axios |
| | | .get(this.$api.url.selectDeviceInspectMessage, { |
| | | params: { |
| | | inspectId: newVal |
| | | } |
| | | }) |
| | | .then(res => { |
| | | this.showCodeNameModel = res.data; |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | radio1: { |
| | | handler: function(newVal, oldVal) { |
| | | this.towTree = []; |
| | | this.tableData = []; |
| | | if (newVal === "true") { |
| | | this.twoTreeApi(); |
| | | this.tableDataApi(); |
| | | } else if (newVal === "false") { |
| | | this.$axios |
| | | .get(this.$api.url.towTree, { |
| | | params: { |
| | | type: 2 |
| | | } |
| | | }) |
| | | .then(res => { |
| | | let list = res.data; |
| | | list.forEach(i => { |
| | | if (i.name === undefined) { |
| | | i.name = i.children[0].name; |
| | | i.id = i.children[0].id; |
| | | i.children = undefined; |
| | | } |
| | | }); |
| | | this.towTree = res.data; |
| | | }); |
| | | this.$axios |
| | | .get(this.$api.url.tableDeviceList, { |
| | | params: { |
| | | type: 2 |
| | | } |
| | | }) |
| | | .then(res => { |
| | | this.tableData = res.data; |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-tag.el-tag { |
| | | border-color: transparent; |
| | | background-color: transparent; |
| | | } |
| | | .el-tag.el-tag:hover { |
| | | border-color: transparent; |
| | | background-color: transparent; |
| | | } |
| | | .el-form-item >>> .el-form-item__error { |
| | | color: #f56c6c; |
| | | font-size: 12px; |
| | | line-height: 1; |
| | | padding-top: 6px; |
| | | position: absolute; |
| | | top: 100%; |
| | | left: 18px; |
| | | } |
| | | /deep/ .el-icon-arrow-left { |
| | | display: flex; |
| | | line-height: 60px !important; |
| | | justify-content: center; |
| | | } |
| | | /deep/ .el-icon-arrow-right { |
| | | display: flex; |
| | | line-height: 60px !important; |
| | | justify-content: center; |
| | | } |
| | | .top_left_name { |
| | | padding-left: 20px; |
| | | line-height: 32px; |
| | | } |
| | | .left_row { |
| | | height: calc(100vh - 165px); |
| | | margin-top: 9px; |
| | | } |
| | | .frame_input { |
| | | width: 90%; |
| | | margin: 10px 0; |
| | | transition: 1.5s; |
| | | } |
| | | .table_top_div { |
| | | margin-left: 20px; |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | .el-dialog__footer { |
| | | padding: 0px 20px 20px; |
| | | text-align: right; |
| | | -webkit-box-sizing: border-box; |
| | | box-sizing: border-box; |
| | | } |
| | | .table_top { |
| | | float: right; |
| | | width: 224px; |
| | | margin-right: 52px; |
| | | } |
| | | .main_table_div { |
| | | background-color: #fbfbfd; |
| | | height: 100%; |
| | | } |
| | | .dialog-footer { |
| | | display: block; |
| | | text-align: center; |
| | | } |
| | | .table_div { |
| | | padding-left: 5px; |
| | | transition: 1s; |
| | | float: left; |
| | | position: relative; |
| | | } |
| | | .table_top_input { |
| | | width: 20%; |
| | | margin-right: 24px; |
| | | } |
| | | .custom-tree-node { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | font-size: 14px; |
| | | padding-right: 8px; |
| | | width: 250px; |
| | | } |
| | | .el-tree { |
| | | width: 280px; |
| | | margin: 0 10px; |
| | | } |
| | | .custom-tree-node span { |
| | | font-size: 14px !important; |
| | | } |
| | | .el-icon-delete { |
| | | display: none; |
| | | color: #004ea2; |
| | | } |
| | | .custom-tree-node:hover .el-icon-delete { |
| | | display: inline; |
| | | } |
| | | .node_i { |
| | | color: orange; |
| | | } |
| | | ::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner { |
| | | background: #f2f2f2; |
| | | border: 0 !important; |
| | | color: #696969; |
| | | line-height: 14px; |
| | | outline: none; |
| | | box-shadow: none; |
| | | } |
| | | .class_sidebar { |
| | | overflow: hidden; |
| | | height: calc(100vh - 175px); |
| | | text-align: center; |
| | | padding: 8px; |
| | | float: left; |
| | | background-color: #fdfdfe; |
| | | } |
| | | .box_bgd { |
| | | width: 12px; |
| | | height: 60px; |
| | | position: absolute; |
| | | float: left; |
| | | top: 40%; |
| | | left: -10px; |
| | | } |
| | | .corner { |
| | | height: 60px; |
| | | background: #ebebec; |
| | | } |
| | | .upper_triangle { |
| | | width: 0px; /* 宽é«è®¾ç½®ä¸º0ï¼å¾éè¦ï¼å¦åè¾¾ä¸å°ææ */ |
| | | height: 0px; |
| | | border: 6px solid #ebebec; |
| | | border-left-color: transparent; |
| | | border-top-color: transparent; |
| | | } |
| | | .under_triangle { |
| | | width: 0px; /* 宽é«è®¾ç½®ä¸º0ï¼å¾éè¦ï¼å¦åè¾¾ä¸å°ææ */ |
| | | height: 0px; |
| | | border: 6px solid #ebebec; |
| | | border-left-color: transparent; |
| | | border-bottom-color: transparent; |
| | | } |
| | | .el-radio-button__inner { |
| | | border: 1px solid #ececed; |
| | | line-height: 14px; |
| | | } |
| | | .el-radio-button__orig-radio:checked + .el-radio-button__inner { |
| | | background: #fdfdfe; |
| | | border: 1px solid #004da2; |
| | | color: #004da2; |
| | | line-height: 14px; |
| | | } |
| | | .el-tag.el-tag { |
| | | border-color: transparent; |
| | | background-color: transparent; |
| | | } |
| | | |
| | | .el-tag.el-tag:hover { |
| | | border-color: transparent; |
| | | background-color: transparent; |
| | | } |
| | | |
| | | .el-form-item>>>.el-form-item__error { |
| | | color: #f56c6c; |
| | | font-size: 12px; |
| | | line-height: 1; |
| | | padding-top: 6px; |
| | | position: absolute; |
| | | top: 100%; |
| | | left: 18px; |
| | | } |
| | | |
| | | /deep/ .el-icon-arrow-left { |
| | | display: flex; |
| | | line-height: 60px !important; |
| | | justify-content: center; |
| | | } |
| | | |
| | | /deep/ .el-icon-arrow-right { |
| | | display: flex; |
| | | line-height: 60px !important; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .top_left_name { |
| | | padding-left: 20px; |
| | | line-height: 32px; |
| | | } |
| | | |
| | | .left_row { |
| | | height: calc(100vh - 165px); |
| | | margin-top: 9px; |
| | | } |
| | | |
| | | .frame_input { |
| | | width: 90%; |
| | | margin: 10px 0; |
| | | transition: 1.5s; |
| | | } |
| | | |
| | | .table_top_div { |
| | | margin-left: 20px; |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .el-dialog__footer { |
| | | padding: 0px 20px 20px; |
| | | text-align: right; |
| | | -webkit-box-sizing: border-box; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .table_top { |
| | | float: right; |
| | | width: 224px; |
| | | margin-right: 52px; |
| | | } |
| | | |
| | | .main_table_div { |
| | | background-color: #fbfbfd; |
| | | height: 100%; |
| | | } |
| | | |
| | | .dialog-footer { |
| | | display: block; |
| | | text-align: center; |
| | | } |
| | | |
| | | .table_div { |
| | | padding-left: 5px; |
| | | transition: 1s; |
| | | float: left; |
| | | position: relative; |
| | | } |
| | | |
| | | .table_top_input { |
| | | width: 20%; |
| | | margin-right: 24px; |
| | | } |
| | | |
| | | .custom-tree-node { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | font-size: 14px; |
| | | padding-right: 8px; |
| | | width: 250px; |
| | | } |
| | | |
| | | .el-tree { |
| | | width: 280px; |
| | | margin: 0 10px; |
| | | } |
| | | |
| | | .custom-tree-node span { |
| | | font-size: 14px !important; |
| | | } |
| | | |
| | | .el-icon-delete { |
| | | display: none; |
| | | color: #004ea2; |
| | | } |
| | | |
| | | .custom-tree-node:hover .el-icon-delete { |
| | | display: inline; |
| | | } |
| | | |
| | | .node_i { |
| | | color: orange; |
| | | } |
| | | |
| | | ::v-deep .el-radio-button__orig-radio:checked+.el-radio-button__inner { |
| | | background: #f2f2f2; |
| | | border: 0 !important; |
| | | color: #696969; |
| | | line-height: 14px; |
| | | outline: none; |
| | | box-shadow: none; |
| | | } |
| | | |
| | | .class_sidebar { |
| | | overflow: hidden; |
| | | height: calc(100vh - 175px); |
| | | text-align: center; |
| | | padding: 8px; |
| | | float: left; |
| | | background-color: #fdfdfe; |
| | | } |
| | | |
| | | .box_bgd { |
| | | width: 12px; |
| | | height: 60px; |
| | | position: absolute; |
| | | float: left; |
| | | top: 40%; |
| | | left: -10px; |
| | | } |
| | | |
| | | .corner { |
| | | height: 60px; |
| | | background: #ebebec; |
| | | } |
| | | |
| | | .upper_triangle { |
| | | width: 0px; |
| | | /* 宽é«è®¾ç½®ä¸º0ï¼å¾éè¦ï¼å¦åè¾¾ä¸å°ææ */ |
| | | height: 0px; |
| | | border: 6px solid #ebebec; |
| | | border-left-color: transparent; |
| | | border-top-color: transparent; |
| | | } |
| | | |
| | | .under_triangle { |
| | | width: 0px; |
| | | /* 宽é«è®¾ç½®ä¸º0ï¼å¾éè¦ï¼å¦åè¾¾ä¸å°ææ */ |
| | | height: 0px; |
| | | border: 6px solid #ebebec; |
| | | border-left-color: transparent; |
| | | border-bottom-color: transparent; |
| | | } |
| | | |
| | | .el-radio-button__inner { |
| | | border: 1px solid #ececed; |
| | | line-height: 14px; |
| | | } |
| | | |
| | | .el-radio-button__orig-radio:checked+.el-radio-button__inner { |
| | | background: #fdfdfe; |
| | | border: 1px solid #004da2; |
| | | color: #004da2; |
| | | line-height: 14px; |
| | | } |
| | | </style> |
| | | <style> |
| | | .laboratoryMangement .title *{ |
| | | .laboratoryMangement .title * { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .laboratoryMangement .table_top_div *{ |
| | | |
| | | .laboratoryMangement .table_top_div * { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | |
| | | .laboratoryMangement .title .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | |
| | | .laboratoryMangement .table_top_div .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | </style> |
| | |
| | | <el-form-item label="ç±»å:"> |
| | | <el-select v-model="search.type" size="small" placeholder="è¯·éæ©" |
| | | style="width: 224px;margin-right: 30px;"> |
| | | <el-option label="æ©¡è¶è¿æ¥å¨" :value="0"></el-option> |
| | | <el-option label="éå±è¿æ¥å¨" :value="1"></el-option> |
| | | <el-option label="湿ææçµè¿æ¥å¨" :value="2"></el-option> |
| | | <el-option label="忝ç»ä»¶" :value="3"></el-option> |
| | | <el-option v-for="(a, ai) in bigType" :key="ai" :value="a"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-table border :data="tableapi" height="calc(80vh - 250px)" style="width: 100%"> |
| | | <el-table-column type="index" label="åºå·" width="70"> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="date" label="ä¾åºååç§°" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.supplier" placeholder=""></el-input> |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-table-column prop="" label="è´¨é追溯å·" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.qualityTraceability" placeholder=""></el-input> |
| | |
| | | <span>ç±»åï¼</span> |
| | | <el-select v-model="search.type" size="small" @change="TYpe" placeholder="è¯·éæ©" |
| | | style="width: 224px;margin-right: 30px;"> |
| | | <el-option label="æ©¡è¶è¿æ¥å¨" :value="0"></el-option> |
| | | <el-option label="éå±è¿æ¥å¨" :value="1"></el-option> |
| | | <el-option label="湿ææçµè¿æ¥å¨" :value="2"></el-option> |
| | | <el-option label="忝ç»ä»¶" :value="3"></el-option> |
| | | <el-option v-for="(a, ai) in bigType" :key="ai" :value="a"></el-option> |
| | | </el-select> |
| | | <!-- <span>åææåç§°ï¼</span> |
| | | <el-select v-model="search.name" size="small" placeholder="è¯·éæ©" style="width: 224px;margin-right: 30px;"> |
| | | <el-option v-for="(a, ai) in process" key="ai" :label="a.name" :value="a.id"></el-option> |
| | | </el-select> |
| | | <el-button size="mini"><span>é ç½®</span></el-button> |
| | | <el-button size="mini" type="primary" style="background: #004EA2;"><span>æ¥è¯¢</span></el-button> --> |
| | | </div> |
| | | <div class="thing"> |
| | | <div class="left"> |
| | | <el-input v-model="search.technology" @input="query" suffix-icon="el-icon-search" placeholder="请è¾å
¥æç´¢å
容" |
| | | size="small" clearable></el-input> |
| | | <el-tree :data="list" ref="tree" style="overflow-y: auto;" highlight-current |
| | | <el-tree :data="list" ref="tree" style="overflow-y: auto;padding-top: 8px;" highlight-current |
| | | :props="{children: 'children',label: 'name'}" node-key="name" default-expand-all |
| | | @node-click="handleNodeClick"> |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span><i :class="`node_i ${data.code != '[2]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i> |
| | | {{data.code}} {{ data.name }}</span> |
| | | <!-- <el-button type="text" size="mini" @click.stop="remove(node, data)"> |
| | | <i class="el-icon-delete"></i> |
| | | </el-button> --> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="130"> |
| | | <template slot-scope="scope"> |
| | | <!-- <span class="table_do" @click="upContent(scope.row)">ç¼è¾ </span> --> |
| | | <span class="table_do" @click="deleteRow(scope.$index, scope.row)">å é¤</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <!-- <el-dialog title="ç¼è¾è®°å½å
容" :visible.sync="upDia" width="500px"> |
| | | <div class="body"> |
| | | |
| | | </div> |
| | | |
| | | </el-dialog> --> |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | list: [], |
| | | process: {}, |
| | | // handleClose:[], |
| | | checkTreeNode:{ |
| | | id:'', |
| | | checkTreeNode: { |
| | | id: '', |
| | | }, |
| | | tableData: [], |
| | | tableapi: [{ |
| | |
| | | upData: {}, |
| | | form: {}, |
| | | dialogVisible: false, |
| | | typeselect: 0, |
| | | typeselect: '', |
| | | input: '', |
| | | craftapi: [], |
| | | bigType: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.selectAllleft() |
| | | this.selectAllMbom() |
| | | this.chooseType() |
| | | }, |
| | | methods: { |
| | | chooseType() { |
| | | this.$axios.get(this.$api.url.chooseType).then(res => { |
| | | this.bigType = res.data |
| | | this.typeselect = res.data[0] |
| | | this.search.type = res.data[0] |
| | | this.selectAllleft() |
| | | this.selectAllMbom() |
| | | }) |
| | | }, |
| | | selectDataList() { |
| | | this.list.forEach(a => { |
| | | a.code = '[1]' |
| | |
| | | } |
| | | }) |
| | | }, |
| | | addMbom(data,cc) { |
| | | this.$axios.post(this.$api.url.addMbom,{ |
| | | mbomModelDto2List:data, |
| | | techTemId:cc, |
| | | addMbom(data, cc) { |
| | | this.$axios.post(this.$api.url.addMbom, { |
| | | mbomModelDto2List: data, |
| | | techTemId: cc, |
| | | |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res =>{ |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res => { |
| | | // console.log(res); |
| | | this.$message.success('æ·»å 宿') |
| | | this.selectAllMbom() |
| | |
| | | }, |
| | | //左边 |
| | | selectAllleft() { |
| | | this.$axios.get(this.$api.url.selectAllleft,{ |
| | | params:{type:this.typeselect, |
| | | message:this.search.technology |
| | | } |
| | | }).then(res => { |
| | | this.list = res.data; |
| | | console.log(this.list); |
| | | this.selectDataList() |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.list[0].children[0].name) // é»è®¤éä¸èç¹ç¬¬ä¸ä¸ª |
| | | }) |
| | | let one=this.list.filter(item=>{ |
| | | return item.children.length>0 |
| | | })[0] |
| | | console.log(one); |
| | | let name=one.children[0].id |
| | | console.log(name); |
| | | this.checkTreeNode.id = name |
| | | this.selectAllMbomStart(name) |
| | | this.selectDataList(); |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | this.$axios.get(this.$api.url.selectAllleft, { |
| | | params: { |
| | | type: this.typeselect, |
| | | message: this.search.technology |
| | | } |
| | | }).then(res => { |
| | | this.list = res.data; |
| | | this.selectDataList() |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.list[0].children[0].name) // é»è®¤éä¸èç¹ç¬¬ä¸ä¸ª |
| | | }) |
| | | let one = this.list.filter(item => { |
| | | return item.children.length > 0 |
| | | })[0] |
| | | let name = one.children[0].id |
| | | this.checkTreeNode.id = name |
| | | this.selectAllMbomStart(name) |
| | | this.selectDataList(); |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | }, |
| | | selectAllMbomStart(name) { |
| | | this.$axios.get(this.$api.url.selectAllMbom,{ |
| | | params:{id:name} |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | console.log(this.tableData); |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | this.$axios.get(this.$api.url.selectAllMbom, { |
| | | params: { |
| | | id: name |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | }, |
| | | //å³è¾¹ |
| | | selectAllMbom() { |
| | |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | console.log(this.tableData); |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | }, |
| | | handleNodeClick(data){ |
| | | this.checkTreeNode = data |
| | | console.log(data); |
| | | console.log(this.checkTreeNode.id); |
| | | handleNodeClick(data) { |
| | | this.checkTreeNode = data |
| | | this.selectAllMbom() |
| | | }, |
| | | handleClose(done) { |
| | |
| | | .catch(_ => {}); |
| | | }, |
| | | //æ°å¢ |
| | | event(){ |
| | | this.dialogVisible = true |
| | | event() { |
| | | this.dialogVisible = true |
| | | this.chooseTechFath() |
| | | }, |
| | | }, |
| | | //æ·»å è¡ |
| | | Addrow() { |
| | | if (this.tableapi == undefined) { |
| | | this.tableapi = new Array(); |
| | | } |
| | | let obj = {}; |
| | | this.tableapi.push(obj); |
| | | Addrow() { |
| | | if (this.tableapi == undefined) { |
| | | this.tableapi = new Array(); |
| | | } |
| | | let obj = {}; |
| | | this.tableapi.push(obj); |
| | | }, |
| | | skipshow() { |
| | | // let data = this.tableapi.at(-1) |
| | | // console.log(this.tableapi); |
| | | let cc = this.search.craft |
| | | this.addMbom(this.tableapi,cc) |
| | | this.addMbom(this.tableapi, cc) |
| | | this.dialogVisible = false |
| | | }, |
| | | //delAllMbom æ¹éå é¤ |
| | |
| | | return el.id |
| | | }) |
| | | this.delete = cc.join(',') |
| | | console.log(this.delete); |
| | | this.delAllMbom() |
| | | this.$message.success('å é¤å®æ') |
| | | }, |
| | |
| | | this.selects = val; |
| | | }, |
| | | deleteRow(index, rows) { |
| | | console.log(rows); |
| | | // this.tableData.splice(index,1) |
| | | this.upData.id = rows.id |
| | | console.log(this.upData); |
| | | this.material(index) |
| | | }, |
| | | |
| | |
| | | height: 30px; |
| | | border-radius: 2px; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | import processInspectionUpdate from '../view/processInspectionUpdate.vue' |
| | | import processInspectionLook from '../view/processInspectionLook.vue' |
| | | export default { |
| | | components: { processInspectionUpdate, processInspectionLook }, |
| | | components: { |
| | | processInspectionUpdate, |
| | | processInspectionLook |
| | | }, |
| | | data() { |
| | | return { |
| | | showUp: false, |
| | |
| | | techfather: val.techfather, |
| | | techname: val.techname, |
| | | techId: Number(val.technologyId), |
| | | mtId: Number(val.technologyId), |
| | | unit: val.unit |
| | | }, { |
| | | headers: { "Content-Type": "application/json" } |
| | |
| | | <template> |
| | | <div> |
| | | <!-- ç¼è¾é¡µé¢ --> |
| | | <div class="addInspection"> |
| | | <el-row class="header"> |
| | | <el-col :span="12">ç¼è¾è¿ç¨æ£éªå</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- ç¹å»è¿åï¼å½å页é¢å¼ä¸ºfalse --> |
| | | <!-- <el-button type="primary" size="mini" style="background: #004EA2; " |
| | | icon="el-icon-circle-plus-outline">æ°å¢</el-button> --> |
| | | <el-button @click="combackFather" type="primary" size="mini" icon="el-icon-back" |
| | | style="background: #004EA2; ">è¿å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form :model="processInspectVo" ref="addInspectionform" class="addInspectionform" label-position="right" |
| | | label-width="120px" size="small"> |
| | | <div class="formwrapper"> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="订åå·ï¼"> |
| | | <el-input @blur="selectInfoByOrderId" disabled style="width: 210px;" size="small" |
| | | v-model="processInspectVo.orderNumber" placeholder="请è¾å
¥è®¢åå·" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <el-select style="width: 210px;" size="small" disabled @change="selectSample" |
| | | v-model="processInspectVo.material" placeholder="è¯·éæ©äº§å"> |
| | | <el-option v-for="item in optionsSamplename" :key="item.value" :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产åç¼ç ï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled |
| | | v-model="processInspectVo.materialCode" placeholder="请è¾å
¥äº§åç¼ç " /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled |
| | | v-model="processInspectVo.specificationsModel" placeholder="请è¾å
¥è§æ ¼åå·" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥åºåç§°ï¼"> |
| | | <el-select @change="changeOptionSoptionSprocesses" disabled |
| | | v-model="processInspectVo.techfather" placeholder="è¯·éæ©" style="width: 210px;" |
| | | size="small"> |
| | | <el-option v-for="item in optionSoptionSprocesses" :key="item.name" :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥èºåç§°ï¼"> |
| | | <el-select v-model="processInspectVo.techname" disabled placeholder="è¯·éæ©" |
| | | style="width: 210px;" size="small"> |
| | | <el-option v-for="item in optionTechnology" :key="item.id" :label="item.name" |
| | | :value="item.id + '-' + item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.unit" |
| | | placeholder="请è¾å
¥åä½" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.quantity" |
| | | placeholder="请è¾å
¥æ°é" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="10" style="display: flex;justify-content: end;"> |
| | | <div> |
| | | <!-- ç¼è¾é¡µé¢ --> |
| | | <div class="addInspection"> |
| | | <el-row class="header"> |
| | | <el-col :span="12">ç¼è¾è¿ç¨æ£éªå</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- ç¹å»è¿åï¼å½å页é¢å¼ä¸ºfalse --> |
| | | <el-button @click="combackFather" type="primary" size="mini" icon="el-icon-back" |
| | | style="background: #004EA2; ">è¿å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form :model="processInspectVo" ref="addInspectionform" class="addInspectionform" label-position="right" |
| | | label-width="120px" size="small"> |
| | | <div class="formwrapper"> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="订åå·ï¼"> |
| | | <el-input @blur="selectInfoByOrderId" disabled style="width: 210px;" size="small" |
| | | v-model="processInspectVo.orderNumber" placeholder="请è¾å
¥è®¢åå·" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <el-select style="width: 210px;" size="small" disabled @change="selectSample" |
| | | v-model="processInspectVo.material" placeholder="è¯·éæ©äº§å"> |
| | | <el-option v-for="item in optionsSamplename" :key="item.value" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产åç¼ç ï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.materialCode" |
| | | placeholder="请è¾å
¥äº§åç¼ç " /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.specificationsModel" |
| | | placeholder="请è¾å
¥è§æ ¼åå·" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥åºåç§°ï¼"> |
| | | <el-select @change="changeOptionSoptionSprocesses" disabled v-model="processInspectVo.techfather" |
| | | placeholder="è¯·éæ©" style="width: 210px;" size="small"> |
| | | <el-option v-for="item in optionSoptionSprocesses" :key="item.name" :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="å·¥èºåç§°ï¼"> |
| | | <el-select v-model="processInspectVo.techname" disabled placeholder="è¯·éæ©" style="width: 210px;" |
| | | size="small"> |
| | | <el-option v-for="item in optionTechnology" :key="item.id" :label="item.name" |
| | | :value="item.id + '-' + item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.unit" |
| | | placeholder="请è¾å
¥åä½" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.quantity" |
| | | placeholder="请è¾å
¥æ°é" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="10" style="display: flex;justify-content: end;"> |
| | | <el-button type="primary" :disabled="isAddProject" @click="addTestProjevt">çææ£éªé¡¹ç®</el-button> |
| | | </el-col> --> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="inspectionProject"> |
| | | <el-row> |
| | | <el-col :span="12" class="inspectionProject_span">æ£éªé¡¹ç®</el-col> |
| | | <el-col v-if="!isUpBtn" :span="12" class="inspectionProject_span"> |
| | | <el-button size="mini" @click="clickDeleteInspectionColumn()">å 餿£éªå¼å</el-button> |
| | | <el-button style="margin-right: 30px;" size="mini" |
| | | @click="clickAddInspectionColumn()">æ·»å æ£éªå¼å</el-button> |
| | | <!-- <el-button |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="inspectionProject"> |
| | | <el-row> |
| | | <el-col :span="12" class="inspectionProject_span">æ£éªé¡¹ç®</el-col> |
| | | <el-col v-if="!isUpBtn" :span="12" class="inspectionProject_span"> |
| | | <el-button size="mini" @click="clickDeleteInspectionColumn()">å 餿£éªå¼å</el-button> |
| | | <el-button style="margin-right: 30px;" size="mini" @click="clickAddInspectionColumn()">æ·»å æ£éªå¼å</el-button> |
| | | <!-- <el-button |
| | | size="mini" |
| | | style="margin-right: 30px;" |
| | | @click="clickAddLine()" |
| | | >æ·»å æ£éªè¡</el-button |
| | | > --> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table border :data="inspectionItems" max-height="420" :span-method="handleSpanMethod" |
| | | height="calc(100vh - 550px)" style="width: 100%"> |
| | | <el-table-column type="index" label="åºå·" width="60"></el-table-column> |
| | | <el-table-column label="项ç®" prop="father"></el-table-column> |
| | | <el-table-column prop="name" label="ææ "></el-table-column> |
| | | <el-table-column prop="unit" label="åä½"></el-table-column> |
| | | <el-table-column prop="required" label="æ åå¼"></el-table-column> |
| | | <el-table-column prop="internal" label="å
æµå¼"></el-table-column> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="æ£æµå¼" |
| | | min-width="100" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-tooltip :disabled="scope.row.dname != null" class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.dname === null" v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dname" label="è¯éªè®¾å¤" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-col> |
| | | <el-button v-if="!scope.row.isSelectDevice" type="text" @click="clickTableSelect(scope)">{{ |
| | | scope.row.dname == null ? "è¯·éæ©" : scope.row.dname |
| | | }}</el-button> |
| | | <el-select @blur="blurNode(scope)" v-else-if="scope.row.isSelectDevice" style="width: 100%;" |
| | | @change="clickNodeSure(scope.row)" v-model="filterText" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in materialOptions" :key="item.id" :label="item.device" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.result === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.result === 0">ä¸åæ ¼</span> |
| | | <span v-show="scope.row.result === null">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column v-if="detailId == null" label="æä½" width="100"> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table border :data="inspectionItems" max-height="420" :span-method="handleSpanMethod" |
| | | height="calc(100vh - 550px)" style="width: 100%"> |
| | | <el-table-column type="index" label="åºå·" width="60"></el-table-column> |
| | | <el-table-column label="项ç®" prop="father"></el-table-column> |
| | | <el-table-column prop="name" label="ææ "></el-table-column> |
| | | <el-table-column prop="unit" label="åä½"></el-table-column> |
| | | <el-table-column prop="required" label="æ åå¼"></el-table-column> |
| | | <el-table-column prop="internal" label="å
æµå¼"></el-table-column> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="æ£æµå¼" |
| | | min-width="100" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-tooltip :disabled="scope.row.dname != null" class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.dname === null" v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dname" label="è¯éªè®¾å¤" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-col> |
| | | <el-button type="text" @click="clickTableSelect(scope)"> |
| | | {{scope.row.dname == null ? "è¯·éæ©" : scope.row.dname}} |
| | | </el-button> |
| | | </el-col> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.result === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.result === 0">ä¸åæ ¼</span> |
| | | <span v-show="scope.row.result === null">{{null}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column v-if="detailId == null" label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickDeleteline(scope)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </div> |
| | | <div class="inspectionResult"> |
| | | <span>æ£æµç»æ</span> |
| | | <el-table :data="inspectionResultForm"> |
| | | <el-table-column prop="id" label="ç©æç¼å·"></el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"></el-table-column> |
| | | <el-table-column prop="inspecter" label="æ£éªå"></el-table-column> |
| | | <el-table-column prop="conclusion" label="æ£éªç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.conclusion === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.conclusion === 0">ä¸åæ ¼</span> |
| | | <span v-show="scope.row.conclusion === null || scope.row.conclusion === undefined">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="operation" label="䏿¥"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="scope.row.conclusion === null || scope.row.conclusion === undefined" type="primary" |
| | | @click="escalation" size="small">䏿¥</el-button> |
| | | <el-button v-else type="success" size="small">已䏿¥</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog title="è¯·éæ©è®¾å¤" :visible.sync="centerDialogVisible" width="20%"> |
| | | <div class="div_device_dialog"> |
| | | <!-- <el-select style="width: 100%;" @change="clickNodeSure()" v-model="filterText" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in materialOptions" :key="item.id" :label="item.device" :value="item.id"> |
| | | </el-option> |
| | | </el-select> --> |
| | | </div> |
| | | <!-- <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="clickNodeSure()">ç¡® å®</el-button> |
| | | </span> --> |
| | | </el-dialog> |
| | | </div> |
| | | </el-table> |
| | | </div> |
| | | <div class="inspectionResult"> |
| | | <span>æ£æµç»æ</span> |
| | | <el-table :data="inspectionResultForm"> |
| | | <el-table-column prop="id" label="ç©æç¼å·"></el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"></el-table-column> |
| | | <el-table-column prop="inspecter" label="æ£éªå"></el-table-column> |
| | | <el-table-column prop="conclusion" label="æ£éªç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.conclusion === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.conclusion === 0">ä¸åæ ¼</span> |
| | | <span v-show="scope.row.conclusion === null || scope.row.conclusion === undefined">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="operation" label="䏿¥"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="scope.row.conclusion === null || scope.row.conclusion === undefined" type="primary" |
| | | @click="escalation" size="small">䏿¥</el-button> |
| | | <el-button v-else type="success" size="small">已䏿¥</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog title="è¯·éæ©è®¾å¤" :visible.sync="centerDialogVisible" width="20%"> |
| | | <div class="div_device_dialog"> |
| | | <el-input placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" v-model="filterText" style="margin-bottom: 6px;"> |
| | | </el-input> |
| | | <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all highlight-current |
| | | @node-click="nodeClick" :filter-node-method="filterNode" ref="tree"> |
| | | <div class="custom-tree-node" slot-scope="{ data }"> |
| | | <span><i :class="`node_i ${data.children ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>{{ data.name }}</span> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="clickNodeSure()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: ['rowInfo'], |
| | | data() { |
| | | return { |
| | | isUpBtn: false, |
| | | showUp: false, |
| | | isAddProject: false, |
| | | detailId: 0, |
| | | row: {}, |
| | | search: { |
| | | countSize: 10, |
| | | pageSize: 1, |
| | | result: "", // æ£æµç¶æ |
| | | name: "", // 产ååç§° |
| | | techfather: "" // å·¥åº |
| | | }, |
| | | optionsSamplename: [], |
| | | inspectionTable: [], |
| | | tableColumn: [], |
| | | optionSoptionSprocesses: [], |
| | | optionTechnology: [], |
| | | inspectionTableTotal: "", |
| | | treeProject: [], |
| | | // æ·»å å |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | | empiricalValueAddMaxNumber: 0, |
| | | showAddPage: false, |
| | | processInspectVo: { |
| | | material: null, |
| | | materialCode: null, |
| | | orderNumber: "", |
| | | quantity: null, |
| | | specificationsModel: null, |
| | | techfather: null, |
| | | techname: null, |
| | | technologyId: null, |
| | | unit: null |
| | | }, |
| | | InspectioniD: null, |
| | | addInspectionform: [ |
| | | { |
| | | number: "", |
| | | username: "", |
| | | projectname: "", |
| | | tracenumber: "", |
| | | code: "", |
| | | class: "", |
| | | specificationmodel: "", |
| | | unit: "", |
| | | quantity: "", |
| | | group: "", |
| | | worker: "", |
| | | machine: "" |
| | | }] |
| | | , |
| | | inspectionItems: [], // æ°å¢æ£éªé¡¹ç®è¡¨æ ¼ |
| | | inspectionResultForm: [ |
| | | { |
| | | id: "", |
| | | name: "", |
| | | inspecter: "", |
| | | conclusion: "", |
| | | operation: "" |
| | | } |
| | | ], |
| | | options: [], |
| | | value: "", |
| | | rowList: [], |
| | | spanArr: [], |
| | | position: 0, |
| | | // 设å¤éæ©æ æ¾ç¤º |
| | | centerDialogVisible: false, |
| | | filterText: "", |
| | | materialOptions: [], |
| | | defaultProps: { |
| | | // è®¾å¤æ æ°æ®è®¾ç½® |
| | | children: "children", |
| | | label: "name" |
| | | }, |
| | | nodeData: { |
| | | id: 0, |
| | | name: null |
| | | }, // nodeç¹å»ä¿åå½åç¹å»æ°æ® |
| | | clickSelectDevice: { |
| | | index: null, // ç¹å»éæ©åå¨å½åè¡ç´¢å¼ |
| | | rpId: null // ç¹å»éæ©åå¨å½åè¡é¡¹ç®Id |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | // filterText(val) { |
| | | // this.$refs.tree.filter(val); |
| | | // } |
| | | }, |
| | | created() { |
| | | if (this.rowInfo.result != null && this.rowInfo.result != '') { |
| | | this.isUpBtn = true |
| | | } |
| | | this.processInspectVo.orderNumber = this.rowInfo.order_number |
| | | this.processInspectVo.material = this.rowInfo.material |
| | | this.processInspectVo.materialCode = this.rowInfo.material_code |
| | | this.processInspectVo.specificationsModel = this.rowInfo.specifications_model |
| | | this.processInspectVo.techfather = this.rowInfo.techfather |
| | | this.processInspectVo.techname = this.rowInfo.techname |
| | | this.processInspectVo.unit = this.rowInfo.unit |
| | | this.processInspectVo.quantity = this.rowInfo.quantity |
| | | this.detailId = this.rowInfo.id |
| | | this.inspectionResultForm[0].id = this.rowInfo.material_code |
| | | this.inspectionResultForm[0].name = this.rowInfo.material |
| | | this.inspectionResultForm[0].conclusion = this.rowInfo.result |
| | | // console.log(this.detailId); |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | blurNode(scope) { |
| | | // console.log(11); |
| | | // this.$set(this.inspectionItems[scope.$index],'isSelectDevice',false) |
| | | }, |
| | | escalation() { |
| | | let arr = this.inspectionItems |
| | | let bl = false |
| | | for (let index = 0; index < arr.length; index++) { |
| | | const element = arr[index]; |
| | | if (element.dname != null && element.empiricalValueAddss[0] != '') { |
| | | bl = true |
| | | break |
| | | } else { |
| | | bl = false |
| | | } |
| | | } |
| | | if (bl != true) { |
| | | this.$message({ |
| | | message: '请å
æ£æµä¸é¡¹é¡¹ç®ï¼', |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.$axios.post(this.$api.url.processInspectUpdateProcessInspectsById, { |
| | | id: this.detailId |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | if (res.message === 'é¡¹ç®æªæ£éªå®!') { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.$message({ |
| | | message: '䏿¥æå', |
| | | type: 'success' |
| | | }); |
| | | this.$parent.combackMain(true) |
| | | } else { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | export default { |
| | | props: ['rowInfo'], |
| | | data() { |
| | | return { |
| | | isUpBtn: false, |
| | | showUp: false, |
| | | isAddProject: false, |
| | | detailId: 0, |
| | | row: {}, |
| | | search: { |
| | | countSize: 10, |
| | | pageSize: 1, |
| | | result: "", // æ£æµç¶æ |
| | | name: "", // 产ååç§° |
| | | techfather: "" // å·¥åº |
| | | }, |
| | | optionsSamplename: [], |
| | | inspectionTable: [], |
| | | tableColumn: [], |
| | | optionSoptionSprocesses: [], |
| | | optionTechnology: [], |
| | | inspectionTableTotal: "", |
| | | treeProject: [], |
| | | // æ·»å å |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | | empiricalValueAddMaxNumber: 0, |
| | | showAddPage: false, |
| | | processInspectVo: { |
| | | material: null, |
| | | materialCode: null, |
| | | orderNumber: "", |
| | | quantity: null, |
| | | specificationsModel: null, |
| | | techfather: null, |
| | | techname: null, |
| | | technologyId: null, |
| | | unit: null |
| | | }, |
| | | InspectioniD: null, |
| | | addInspectionform: [{ |
| | | number: "", |
| | | username: "", |
| | | projectname: "", |
| | | tracenumber: "", |
| | | code: "", |
| | | class: "", |
| | | specificationmodel: "", |
| | | unit: "", |
| | | quantity: "", |
| | | group: "", |
| | | worker: "", |
| | | machine: "" |
| | | }], |
| | | inspectionItems: [], // æ°å¢æ£éªé¡¹ç®è¡¨æ ¼ |
| | | inspectionResultForm: [{ |
| | | id: "", |
| | | name: "", |
| | | inspecter: "", |
| | | conclusion: "", |
| | | operation: "" |
| | | }], |
| | | options: [], |
| | | value: "", |
| | | rowList: [], |
| | | spanArr: [], |
| | | position: 0, |
| | | // 设å¤éæ©æ æ¾ç¤º |
| | | centerDialogVisible: false, |
| | | filterText: "", |
| | | materialOptions: [], |
| | | defaultProps: { |
| | | // è®¾å¤æ æ°æ®è®¾ç½® |
| | | children: "children", |
| | | label: "name" |
| | | }, |
| | | nodeData: { |
| | | id: 0, |
| | | name: null |
| | | }, // nodeç¹å»ä¿åå½åç¹å»æ°æ® |
| | | clickSelectDevice: { |
| | | index: null, // ç¹å»éæ©åå¨å½åè¡ç´¢å¼ |
| | | rpId: null // ç¹å»éæ©åå¨å½åè¡é¡¹ç®Id |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | // filterText(val) { |
| | | // this.$refs.tree.filter(val); |
| | | // } |
| | | }, |
| | | created() { |
| | | if (this.rowInfo.result != null && this.rowInfo.result != '') { |
| | | this.isUpBtn = true |
| | | } |
| | | this.processInspectVo.orderNumber = this.rowInfo.order_number |
| | | this.processInspectVo.material = this.rowInfo.material |
| | | this.processInspectVo.materialCode = this.rowInfo.material_code |
| | | this.processInspectVo.specificationsModel = this.rowInfo.specifications_model |
| | | this.processInspectVo.techfather = this.rowInfo.techfather |
| | | this.processInspectVo.techname = this.rowInfo.techname |
| | | this.processInspectVo.unit = this.rowInfo.unit |
| | | this.processInspectVo.quantity = this.rowInfo.quantity |
| | | this.detailId = this.rowInfo.id |
| | | this.inspectionResultForm[0].id = this.rowInfo.material_code |
| | | this.inspectionResultForm[0].name = this.rowInfo.material |
| | | this.inspectionResultForm[0].conclusion = this.rowInfo.result |
| | | // console.log(this.detailId); |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | blurNode(scope) { |
| | | // console.log(11); |
| | | // this.$set(this.inspectionItems[scope.$index],'isSelectDevice',false) |
| | | }, |
| | | escalation() { |
| | | let arr = this.inspectionItems |
| | | let bl = false |
| | | for (let index = 0; index < arr.length; index++) { |
| | | const element = arr[index]; |
| | | if (element.dname != null && element.empiricalValueAddss[0] != '') { |
| | | bl = true |
| | | break |
| | | } else { |
| | | bl = false |
| | | } |
| | | } |
| | | if (bl != true) { |
| | | this.$message({ |
| | | message: '请å
æ£æµä¸é¡¹é¡¹ç®ï¼', |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.$axios.post(this.$api.url.processInspectUpdateProcessInspectsById, { |
| | | id: this.detailId |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | if (res.message === 'é¡¹ç®æªæ£éªå®!') { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.$message({ |
| | | message: '䏿¥æå', |
| | | type: 'success' |
| | | }); |
| | | this.$parent.combackMain(true) |
| | | } else { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | handleClick() { }, |
| | | updateInsInfo(row) { |
| | | console.log(row); |
| | | this.row = row |
| | | this.showUp = true |
| | | }, |
| | | // ç¹å»è®¾å¤æ ä¿åç¹å»è®°å½ |
| | | nodeClick(data) { |
| | | if (data.id != undefined) this.nodeData = data; |
| | | }, |
| | | // è®¾å¤æ è¿æ»¤æç´¢ |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | // è·åè®¾å¤æ å
容 |
| | | getOptions(row) { |
| | | this.filterText = 0 |
| | | this.$axios.get(this.$api.url.inspectionItemChooseDev, { |
| | | params: { |
| | | father: row.father, |
| | | name: row.name, |
| | | technologyId: this.processInspectVo.technologyId |
| | | } |
| | | }).then(res => { |
| | | this.materialOptions = res.data; |
| | | if (this.materialOptions.length === 1&&row.did!=null) { |
| | | this.$message({ |
| | | message: '该项ç®ä¸åªæä¸ä¸ªè¯éªè®¾å¤ï¼æ ééæ©ï¼', |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | row.isSelectDevice = true |
| | | this.filterText = row.did |
| | | }); |
| | | }, |
| | | //è¿å |
| | | combackFather() { |
| | | this.$parent.combackMain() |
| | | }, |
| | | // ç¹å»è¡¨æ ¼éæ©è§¦å |
| | | clickTableSelect(scope) { |
| | | // return scope; |
| | | // this.centerDialogVisible = true; |
| | | if (this.clickSelectDevice.index != null) { |
| | | this.$set(this.inspectionItems[this.clickSelectDevice.index], 'isSelectDevice', false) |
| | | } |
| | | this.clickSelectDevice.index = scope.$index; |
| | | this.clickSelectDevice.rpId = scope.row.id; |
| | | this.getOptions(scope.row); |
| | | }, |
| | | // ç¹å»æ éé¢çç¡®å® |
| | | clickNodeSure(row) { |
| | | console.log(row); |
| | | let select = this.materialOptions.filter(item => { |
| | | return item.id === this.filterText |
| | | })[0] |
| | | this.nodeData.id = select.id |
| | | this.nodeData.name = select.device |
| | | this.$axios |
| | | .post(this.$api.url.inspectionItemUpdateDevByInsId, { |
| | | id: this.clickSelectDevice.rpId, |
| | | type: 1, |
| | | devId: this.nodeData.id |
| | | }) |
| | | .then(res => { |
| | | row.isSelectDevice = false |
| | | console.log("row", row); |
| | | this.filterText = 0 |
| | | this.getTableData() |
| | | this.centerDialogVisible = false; |
| | | }); |
| | | }, |
| | | changeState(row, index) { |
| | | if (row.did != null && row.did != '') { |
| | | // let val = row.empiricalValueAddss.filter(item => { |
| | | // return item != '' && item != null |
| | | // }) |
| | | // let eq = val.filter(item => { |
| | | // return /^[^><=]/.test(item) |
| | | // }) |
| | | // if (eq.length > 0) { |
| | | // this.$message({ |
| | | // message: "æ£æµå¼[" + eq + "]æ ¼å¼é¦ä½åºå
å«>,<æè
=", |
| | | // type: 'warning' |
| | | // }); |
| | | // return |
| | | // } |
| | | let str = "" |
| | | row.empiricalValueAddss.forEach(e => { |
| | | str += e + "," |
| | | }) |
| | | if (str.slice(0, -1) === '' || str.slice(0, -1) === null || str.slice(0, -1) === undefined) { |
| | | return |
| | | } |
| | | this.$axios.post(this.$api.url.inspectionItemlose_focus_update, { |
| | | deviceId: row.did, |
| | | inspectionItemId: row.id, |
| | | inspectionValue: str.slice(0, -1) |
| | | }, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res => { |
| | | row.result = res.data.result |
| | | row.username = res.data.username |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: 'è¯·éæ©æ©è®¾å¤ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }, |
| | | // æ¯é¡µæ¡æ°æ¹åæ¶è§¦å éæ©ä¸é¡µæ¾ç¤ºå¤å°è¡ |
| | | handleSizeChange(val) { |
| | | this.search.countSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | handleSpanMethod({ row, column, rowIndex, columnIndex }) { |
| | | if (columnIndex === 0) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | if (columnIndex === 1) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | }, |
| | | // åå¹¶è¡¨æ ¼ |
| | | mergeTable() { |
| | | this.rowList = [] |
| | | this.spanArr = [] |
| | | this.position = 0 |
| | | this.inspectionItems.forEach((item, index) => { |
| | | if (index === 0) { |
| | | this.spanArr.push(1); |
| | | this.position = 0; |
| | | } else { |
| | | if (this.inspectionItems[index].father === this.inspectionItems[index - 1].father) { |
| | | this.spanArr[this.position] += 1; |
| | | this.spanArr.push(0); |
| | | } else { |
| | | this.spanArr.push(1); |
| | | this.position = index; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | changeOptionSoptionSprocesses() { |
| | | this.optionTechnology = [] |
| | | let working = this.optionSoptionSprocesses.filter(item => { |
| | | return item.name === this.processInspectVo.techfather |
| | | })[0] |
| | | this.optionTechnology = working.children |
| | | }, |
| | | addTestProjevt() { |
| | | this.isAddProject = true |
| | | let val = JSON.parse(JSON.stringify(this.processInspectVo)) |
| | | val.techname = this.processInspectVo.techname.split("-")[1] |
| | | val.technologyId = this.processInspectVo.techname.split("-")[0] |
| | | this.$axios.post(this.$api.url.processInspectAddProcess, { |
| | | material: val.material, |
| | | materialCode: val.materialCode, |
| | | orderNumber: val.orderNumber, |
| | | quantity: val.quantity, |
| | | specificationsModel: val.specificationsModel, |
| | | techfather: val.techfather, |
| | | techname: val.techname, |
| | | technologyId: val.technologyId, |
| | | unit: val.unit |
| | | }, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.detailId = res.data |
| | | this.inspectionResultForm[0].id = res.data |
| | | this.inspectionResultForm[0].name = val.material |
| | | this.getTableData() |
| | | }) |
| | | }, |
| | | getTableData() { |
| | | this.$axios.get(this.$api.url.processInspectSelectProcessInspectsListById, { |
| | | params: { |
| | | id: this.rowInfo.id |
| | | } |
| | | }).then(res => { |
| | | // console.log(res.data); |
| | | this.processInspectVo.technologyId = res.data[0].techId |
| | | // console.log(this.processInspectVo); |
| | | }) |
| | | this.$axios.get(this.$api.url.inspectionItemListUser, { |
| | | params: { |
| | | id: this.detailId, |
| | | type: 1 |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length < 1) { |
| | | return |
| | | } |
| | | this.inspectionItems = res.data |
| | | let arr = [] |
| | | let val = JSON.parse(JSON.stringify(this.inspectionItems)) |
| | | const uName = [] |
| | | //转æä¸ç»´æ°ç» |
| | | val.forEach(l => { |
| | | let father = l.father |
| | | l.children.forEach(c => { |
| | | c.father = father |
| | | c.empiricalValueAddss = [] |
| | | if (c.inspectionValue != '' && c.inspectionValue != null) { |
| | | c.empiricalValueAddss = c.inspectionValue.split(","); |
| | | } else { |
| | | c.empiricalValueAddss.push("") |
| | | } |
| | | uName.push(c['username']) |
| | | c.isSelectDevice = false |
| | | this.filterText = 0 |
| | | arr.push(c) |
| | | }) |
| | | }) |
| | | this.inspectionItems = arr |
| | | let arrSort = JSON.parse(JSON.stringify(arr)) |
| | | //æ ¹æ®éå对象æ°ç»é¿åº¦æåº |
| | | arrSort.sort((a, b) => { |
| | | if (a.empiricalValueAddss.length < b.empiricalValueAddss.length) { |
| | | return -1; // aæå¨båé¢ |
| | | } else if (a.empiricalValueAddss.length > b.empiricalValueAddss.length) { |
| | | return 1; // aæå¨båé¢ |
| | | } else { |
| | | return 0; // ä¿æç¸å¯¹é¡ºåºä¸å |
| | | } |
| | | }); |
| | | // console.log(arrSort); |
| | | console.log(uName); |
| | | let name = [...new Set(uName)].filter(item => item !== null); |
| | | let rname = '' |
| | | name.forEach(m => { |
| | | rname += m + "," |
| | | }) |
| | | this.inspectionResultForm[0].inspecter = rname.slice(0, -1) |
| | | this.empiricalValueAdd = arrSort[arrSort.length - 1].empiricalValueAddss.length |
| | | this.mergeTable(arr) |
| | | }) |
| | | }, |
| | | selectSample() { |
| | | let sample = this.optionsSamplename.filter(item => { |
| | | return item.name === this.processInspectVo.material |
| | | })[0] |
| | | this.processInspectVo.techfather = null |
| | | this.processInspectVo.techname = null |
| | | this.processInspectVo.materialCode = sample.code |
| | | this.processInspectVo.specificationsModel = sample.specifications |
| | | this.processInspectVo.unit = sample.unit |
| | | this.optionSoptionSprocesses = [] |
| | | this.optionSoptionSprocesses = sample.children |
| | | }, |
| | | selectInfoByOrderId() { |
| | | this.$axios.get(this.$api.url.chooseMaterProcessInspect, { |
| | | params: { |
| | | orderNumber: this.processInspectVo.orderNumber |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length > 0) { |
| | | console.log(res.data); |
| | | this.optionsSamplename = res.data |
| | | } else { |
| | | this.$message({ |
| | | message: '没æè¯¥è®¢åå·ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | // å½å页æ¹åæ¶è§¦å 跳转å
¶ä»é¡µ |
| | | handleCurrentChange(val) { |
| | | this.search.pageSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | // æ¾ç¤ºæ°å¢é¡µé¢ |
| | | handleAddNew() { |
| | | this.showAddPage = true; |
| | | // this.getTableData() |
| | | }, |
| | | // è¡¨æ ¼åå§åæ¥å£ |
| | | defaultInitializationTable() { |
| | | this.$axios |
| | | .post(this.$api.url.selectProcessInspectsList, this.search) |
| | | .then(res => { |
| | | this.inspectionTableTotal = res.data.total; |
| | | this.inspectionTable = res.data.row; |
| | | }); |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine() { |
| | | let obj = { |
| | | material: "", |
| | | materialCode: "", |
| | | orderNumber: "", |
| | | quantity: 0, |
| | | specificationsModel: "", |
| | | techfather: "", |
| | | techname: "", |
| | | technologyId: 0, |
| | | unit: "" |
| | | }; |
| | | this.inspectionItems.push(obj); |
| | | }, |
| | | // å é¤è¡ |
| | | clickDeleteline(scope) { |
| | | this.inspectionItems.splice(scope.$index, 1); |
| | | }, |
| | | // å 餿£éªå¼å |
| | | clickDeleteInspectionColumn() { |
| | | if (this.empiricalValueAdd - 1 === 0) { |
| | | } else { |
| | | if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { |
| | | this.empiricalValueAdd = this.empiricalValueAdd - 1; |
| | | this.inspectionItems.forEach(i => { |
| | | i.testValueList.splice(this.empiricalValueAdd, 1); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // æ·»å æ£éªå¼å |
| | | clickAddInspectionColumn() { |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | handleClick() {}, |
| | | updateInsInfo(row) { |
| | | this.row = row |
| | | this.showUp = true |
| | | }, |
| | | // ç¹å»è®¾å¤æ ä¿åç¹å»è®°å½ |
| | | nodeClick(data) { |
| | | if (data.id != undefined) this.nodeData = data; |
| | | }, |
| | | // è®¾å¤æ è¿æ»¤æç´¢ |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | // è·åè®¾å¤æ å
容 |
| | | getOptions(row) { |
| | | this.$axios.get(this.$api.url.inspectionItemChooseDev, { |
| | | params: { |
| | | father: row.father, |
| | | name: row.name, |
| | | technologyId: this.processInspectVo.technologyId |
| | | } |
| | | }).then(res => { |
| | | this.materialOptions = res.data; |
| | | if (this.materialOptions.length === 1 && row.did != null) { |
| | | this.$message({ |
| | | message: '该项ç®ä¸åªæä¸ä¸ªè¯éªè®¾å¤ï¼æ ééæ©ï¼', |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | row.isSelectDevice = true |
| | | }); |
| | | }, |
| | | //è¿å |
| | | combackFather() { |
| | | this.$parent.combackMain() |
| | | }, |
| | | // ç¹å»è¡¨æ ¼éæ©è§¦å |
| | | clickTableSelect(scope) { |
| | | this.centerDialogVisible = true; |
| | | this.clickSelectDevice.index = scope.$index; |
| | | this.clickSelectDevice.rpId = scope.row.id; |
| | | this.getOptions(scope.row); |
| | | }, |
| | | // ç¹å»æ éé¢çç¡®å® |
| | | clickNodeSure() { |
| | | if (this.detailId == null) { |
| | | this.projectTable[this.clickSelectDevice.index].deviceId = this.nodeData.id; |
| | | this.projectTable[this.clickSelectDevice.index].deviceName = this.nodeData.name; |
| | | this.centerDialogVisible = false; |
| | | } else { |
| | | this.$axios.post(this.$api.url.inspectionItemUpdateDevByInsId, { |
| | | id: this.clickSelectDevice.rpId, |
| | | devId: this.nodeData.id, |
| | | type: 1 |
| | | }).then(res => { |
| | | this.centerDialogVisible = false; |
| | | this.inspectionItems.forEach(a=>{ |
| | | if(a.id == this.clickSelectDevice.rpId){ |
| | | a.dname = this.nodeData.name |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | changeState(row, index) { |
| | | if (row.did != null && row.did != '') { |
| | | let str = "" |
| | | row.empiricalValueAddss.forEach(e => { |
| | | str += e + "," |
| | | }) |
| | | if (str.slice(0, -1) === '' || str.slice(0, -1) === null || str.slice(0, -1) === undefined) { |
| | | return |
| | | } |
| | | this.$axios.post(this.$api.url.inspectionItemlose_focus_update, { |
| | | deviceId: row.did, |
| | | inspectionItemId: row.id, |
| | | inspectionValue: str.slice(0, -1) |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res => { |
| | | row.result = res.data.result |
| | | row.username = res.data.username |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | message: 'è¯·éæ©æ©è®¾å¤ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }, |
| | | // æ¯é¡µæ¡æ°æ¹åæ¶è§¦å éæ©ä¸é¡µæ¾ç¤ºå¤å°è¡ |
| | | handleSizeChange(val) { |
| | | this.search.countSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | handleSpanMethod({ |
| | | row, |
| | | column, |
| | | rowIndex, |
| | | columnIndex |
| | | }) { |
| | | if (columnIndex === 0) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | if (columnIndex === 1) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | }, |
| | | // åå¹¶è¡¨æ ¼ |
| | | mergeTable() { |
| | | this.rowList = [] |
| | | this.spanArr = [] |
| | | this.position = 0 |
| | | this.inspectionItems.forEach((item, index) => { |
| | | if (index === 0) { |
| | | this.spanArr.push(1); |
| | | this.position = 0; |
| | | } else { |
| | | if (this.inspectionItems[index].father === this.inspectionItems[index - 1].father) { |
| | | this.spanArr[this.position] += 1; |
| | | this.spanArr.push(0); |
| | | } else { |
| | | this.spanArr.push(1); |
| | | this.position = index; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | changeOptionSoptionSprocesses() { |
| | | this.optionTechnology = [] |
| | | let working = this.optionSoptionSprocesses.filter(item => { |
| | | return item.name === this.processInspectVo.techfather |
| | | })[0] |
| | | this.optionTechnology = working.children |
| | | }, |
| | | addTestProjevt() { |
| | | this.isAddProject = true |
| | | let val = JSON.parse(JSON.stringify(this.processInspectVo)) |
| | | val.techname = this.processInspectVo.techname.split("-")[1] |
| | | val.technologyId = this.processInspectVo.techname.split("-")[0] |
| | | this.$axios.post(this.$api.url.processInspectAddProcess, { |
| | | material: val.material, |
| | | materialCode: val.materialCode, |
| | | orderNumber: val.orderNumber, |
| | | quantity: val.quantity, |
| | | specificationsModel: val.specificationsModel, |
| | | techfather: val.techfather, |
| | | techname: val.techname, |
| | | technologyId: val.technologyId, |
| | | unit: val.unit |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.detailId = res.data |
| | | this.inspectionResultForm[0].id = res.data |
| | | this.inspectionResultForm[0].name = val.material |
| | | this.getTableData() |
| | | }) |
| | | }, |
| | | getTableData() { |
| | | this.$axios.get(this.$api.url.processInspectSelectProcessInspectsListById, { |
| | | params: { |
| | | id: this.rowInfo.id |
| | | } |
| | | }).then(res => { |
| | | // console.log(res.data); |
| | | this.processInspectVo.technologyId = res.data[0].techId |
| | | // console.log(this.processInspectVo); |
| | | }) |
| | | this.$axios.get(this.$api.url.inspectionItemListUser, { |
| | | params: { |
| | | id: this.detailId, |
| | | type: 1 |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length < 1) { |
| | | return |
| | | } |
| | | this.inspectionItems = res.data |
| | | let arr = [] |
| | | let val = JSON.parse(JSON.stringify(this.inspectionItems)) |
| | | const uName = [] |
| | | //转æä¸ç»´æ°ç» |
| | | val.forEach(l => { |
| | | let father = l.father |
| | | l.children.forEach(c => { |
| | | c.father = father |
| | | c.empiricalValueAddss = [] |
| | | if (c.inspectionValue != '' && c.inspectionValue != null) { |
| | | c.empiricalValueAddss = c.inspectionValue.split(","); |
| | | } else { |
| | | c.empiricalValueAddss.push("") |
| | | } |
| | | uName.push(c['username']) |
| | | c.isSelectDevice = false |
| | | arr.push(c) |
| | | }) |
| | | }) |
| | | this.inspectionItems = arr |
| | | let arrSort = JSON.parse(JSON.stringify(arr)) |
| | | //æ ¹æ®éå对象æ°ç»é¿åº¦æåº |
| | | arrSort.sort((a, b) => { |
| | | if (a.empiricalValueAddss.length < b.empiricalValueAddss.length) { |
| | | return -1; // aæå¨båé¢ |
| | | } else if (a.empiricalValueAddss.length > b.empiricalValueAddss.length) { |
| | | return 1; // aæå¨båé¢ |
| | | } else { |
| | | return 0; // ä¿æç¸å¯¹é¡ºåºä¸å |
| | | } |
| | | }); |
| | | // console.log(arrSort); |
| | | console.log(uName); |
| | | let name = [...new Set(uName)].filter(item => item !== null); |
| | | let rname = '' |
| | | name.forEach(m => { |
| | | rname += m + "," |
| | | }) |
| | | this.inspectionResultForm[0].inspecter = rname.slice(0, -1) |
| | | this.empiricalValueAdd = arrSort[arrSort.length - 1].empiricalValueAddss.length |
| | | this.mergeTable(arr) |
| | | }) |
| | | }, |
| | | selectSample() { |
| | | let sample = this.optionsSamplename.filter(item => { |
| | | return item.name === this.processInspectVo.material |
| | | })[0] |
| | | this.processInspectVo.techfather = null |
| | | this.processInspectVo.techname = null |
| | | this.processInspectVo.materialCode = sample.code |
| | | this.processInspectVo.specificationsModel = sample.specifications |
| | | this.processInspectVo.unit = sample.unit |
| | | this.optionSoptionSprocesses = [] |
| | | this.optionSoptionSprocesses = sample.children |
| | | }, |
| | | selectInfoByOrderId() { |
| | | this.$axios.get(this.$api.url.chooseMaterProcessInspect, { |
| | | params: { |
| | | orderNumber: this.processInspectVo.orderNumber |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length > 0) { |
| | | console.log(res.data); |
| | | this.optionsSamplename = res.data |
| | | } else { |
| | | this.$message({ |
| | | message: '没æè¯¥è®¢åå·ï¼', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | // å½å页æ¹åæ¶è§¦å 跳转å
¶ä»é¡µ |
| | | handleCurrentChange(val) { |
| | | this.search.pageSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | // æ¾ç¤ºæ°å¢é¡µé¢ |
| | | handleAddNew() { |
| | | this.showAddPage = true; |
| | | // this.getTableData() |
| | | }, |
| | | // è¡¨æ ¼åå§åæ¥å£ |
| | | defaultInitializationTable() { |
| | | this.$axios |
| | | .post(this.$api.url.selectProcessInspectsList, this.search) |
| | | .then(res => { |
| | | this.inspectionTableTotal = res.data.total; |
| | | this.inspectionTable = res.data.row; |
| | | }); |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine() { |
| | | let obj = { |
| | | material: "", |
| | | materialCode: "", |
| | | orderNumber: "", |
| | | quantity: 0, |
| | | specificationsModel: "", |
| | | techfather: "", |
| | | techname: "", |
| | | technologyId: 0, |
| | | unit: "" |
| | | }; |
| | | this.inspectionItems.push(obj); |
| | | }, |
| | | // å é¤è¡ |
| | | clickDeleteline(scope) { |
| | | this.inspectionItems.splice(scope.$index, 1); |
| | | }, |
| | | // å 餿£éªå¼å |
| | | clickDeleteInspectionColumn() { |
| | | if (this.empiricalValueAdd - 1 === 0) {} else { |
| | | if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { |
| | | this.empiricalValueAdd = this.empiricalValueAdd - 1; |
| | | this.inspectionItems.forEach(i => { |
| | | i.testValueList.splice(this.empiricalValueAdd, 1); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // æ·»å æ£éªå¼å |
| | | clickAddInspectionColumn() { |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style></style> |
| | |
| | | <style scoped> |
| | | .raw_ins { |
| | | height: 100%; |
| | | } |
| | | .raw_ins { |
| | | height: 100%; |
| | | } |
| | | |
| | | .raw_ins .title .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | .raw_ins .title .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | |
| | | .raw_ins .title { |
| | | margin-bottom: 10px; |
| | | padding: 0 20px; |
| | | } |
| | | .raw_ins .title { |
| | | margin-bottom: 10px; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | .choose { |
| | | padding: 21px 24px; |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | border-bottom: 3px solid rgb(245, 247, 251); |
| | | } |
| | | .choose { |
| | | padding: 21px 24px; |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | border-bottom: 3px solid rgb(245, 247, 251); |
| | | } |
| | | |
| | | .choose * { |
| | | font-size: 14px; |
| | | } |
| | | .choose * { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .choose .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | .choose .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | |
| | | .thing { |
| | | width: calc(100% - 44px); |
| | | height: calc(100% - 42px - 82px - 66px); |
| | | background-color: #fff; |
| | | overflow: auto; |
| | | padding: 33px 22px; |
| | | } |
| | | .thing { |
| | | width: calc(100% - 44px); |
| | | height: calc(100% - 42px - 82px - 66px); |
| | | background-color: #fff; |
| | | overflow: auto; |
| | | padding: 33px 22px; |
| | | } |
| | | |
| | | .table_do { |
| | | color: #004ea0; |
| | | cursor: pointer; |
| | | } |
| | | .table_do { |
| | | color: #004ea0; |
| | | cursor: pointer; |
| | | } |
| | | </style> |
| | | <style> |
| | | .raw_ins .thing * { |
| | | font-size: 14px; |
| | | } |
| | | .raw_ins .thing * { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .raw_ins .has-gutter .el-table__cell { |
| | | background-color: #f0f1f5 !important; |
| | | color: #333; |
| | | } |
| | | .raw_ins .has-gutter .el-table__cell { |
| | | background-color: #f0f1f5 !important; |
| | | color: #333; |
| | | } |
| | | |
| | | .raw_ins .has-gutter .el-table__cell .cell { |
| | | font-size: 16px; |
| | | font-weight: 500; |
| | | } |
| | | .raw_ins .has-gutter .el-table__cell .cell { |
| | | font-size: 16px; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .raw_ins .cell { |
| | | color: #333; |
| | | padding-left: 17px !important; |
| | | } |
| | | .raw_ins .cell { |
| | | color: #333; |
| | | padding-left: 17px !important; |
| | | } |
| | | |
| | | .raw_ins .el-table__body-wrapper { |
| | | height: 100%; |
| | | } |
| | | .raw_ins .el-table__body-wrapper { |
| | | height: 100%; |
| | | } |
| | | |
| | | .raw_ins .el-table__body { |
| | | height: 100%; |
| | | } |
| | | .raw_ins .el-table__body { |
| | | height: 100%; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | | <div class="raw_ins"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px;">åæææ£éª</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | style="background: #004EA2;" |
| | | @click="goDetail(null)" |
| | | >æ°å¢</el-button |
| | | > |
| | | <el-button icon="el-icon-download">导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="choose"> |
| | | <span>æ¥ææ¥æï¼</span> |
| | | <el-date-picker |
| | | v-model="search.formTime" |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | style="width: 13vw;margin-right: 5px;" |
| | | clearable |
| | | value-format="yyyy-MM-dd" |
| | | ></el-date-picker> |
| | | <span>åææç¼ç ï¼</span> |
| | | <el-input |
| | | v-model="search.code" |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | style="width: 13vw;margin-right: 5px;" |
| | | clearable |
| | | ></el-input> |
| | | <span>æ£æµç¶æï¼</span> |
| | | <el-select |
| | | v-model="search.insState" |
| | | size="small" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 13vw;margin-right: 5px;" |
| | | > |
| | | <el-option label="å
¨é¨" :value="2"></el-option> |
| | | <el-option label="æªæ£æµ" :value="0"></el-option> |
| | | <el-option label="å·²æ£æµ" :value="1"></el-option> |
| | | </el-select> |
| | | <span>åææåç§°ï¼</span> |
| | | <el-input |
| | | v-model="search.name" |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | style="width: 13vw;margin-right: 5px;" |
| | | clearable |
| | | ></el-input> |
| | | <el-button size="mini" @click="clean()"><span>é ç½®</span></el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="primary" |
| | | style="background: #004EA2;" |
| | | @click="selectRawInspectsList()" |
| | | ><span>æ¥ è¯¢</span></el-button |
| | | > |
| | | </div> |
| | | <div class="thing"> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | style="width: 100%;overflow-y: auto;min-height: calc(100% - 50px)" |
| | | max-height="calc(100% - 50px)" |
| | | @selection-change="handleSelectionChange" |
| | | default-expand-all |
| | | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
| | | row-key="id" |
| | | > |
| | | <el-table-column type="selection" width="50"> </el-table-column> |
| | | <el-table-column type="index" label="åºå·" width="70"> |
| | | </el-table-column> |
| | | <el-table-column prop="formTime" label="æ¥ææ¥æ"> </el-table-column> |
| | | <el-table-column prop="code" label="åææç¼ç "> </el-table-column> |
| | | <el-table-column prop="name" label="åææåç§°"> </el-table-column> |
| | | <el-table-column prop="specifications" label="è§æ ¼åå·"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="åä½"> </el-table-column> |
| | | <el-table-column prop="number" label="æ°é"> </el-table-column> |
| | | <el-table-column prop="createTime" label="æ¥æ£æ¥æ"> </el-table-column> |
| | | <el-table-column prop="user_name" label="æ¥æ£äºº"> </el-table-column> |
| | | <el-table-column prop="createTime" label="æ£éªæ¥æ"> </el-table-column> |
| | | <el-table-column prop="createTime" label="æ£æµç¶æ" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.ins_state == 1" |
| | | >å·²æ£æµ</span |
| | | > |
| | | <span style="color: #E84738;" v-else-if="scope.row.ins_state == 0" |
| | | >æªæ£æµ</span |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="judge_state" label="åæ ¼ç¶æ" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.judge_state == 1" |
| | | >åæ ¼</span |
| | | > |
| | | <span style="color: #E84738;" v-else-if="scope.row.judge_state == 0" |
| | | >ä¸åæ ¼</span |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span class="table_do" @click="changeShowDetail(scope.row)" |
| | | >æ¥ç</span |
| | | > |
| | | <span class="table_do">æå°</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-col |
| | | style="height: 50px;display: flex;align-items: center;justify-content: right;" |
| | | > |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="1" |
| | | :page-sizes="[10, 15, 20, 30, 50]" |
| | | :page-size="search.co" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | > |
| | | </el-pagination> |
| | | </el-col> |
| | | </div> |
| | | </div> |
| | | <div class="raw_ins"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px;">åæææ£éª</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button type="primary" icon="el-icon-plus" style="background: #004EA2;" |
| | | @click="goDetail(null)">æ°å¢</el-button> |
| | | <el-button icon="el-icon-download">导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="choose"> |
| | | <span>æ¥ææ¥æï¼</span> |
| | | <el-date-picker v-model="search.formTime" size="small" placeholder="请è¾å
¥" style="width: 13vw;margin-right: 5px;" |
| | | clearable value-format="yyyy-MM-dd"></el-date-picker> |
| | | <span>åææç¼ç ï¼</span> |
| | | <el-input v-model="search.code" placeholder="请è¾å
¥" size="small" style="width: 13vw;margin-right: 5px;" |
| | | clearable></el-input> |
| | | <span>æ£æµç¶æï¼</span> |
| | | <el-select v-model="search.insState" size="small" placeholder="è¯·éæ©" style="width: 13vw;margin-right: 5px;"> |
| | | <el-option label="å
¨é¨" :value="2"></el-option> |
| | | <el-option label="æªæ£æµ" :value="0"></el-option> |
| | | <el-option label="å·²æ£æµ" :value="1"></el-option> |
| | | </el-select> |
| | | <span>åææåç§°ï¼</span> |
| | | <el-input v-model="search.name" size="small" placeholder="请è¾å
¥" style="width: 13vw;margin-right: 5px;" |
| | | clearable></el-input> |
| | | <el-button size="mini" @click="clean()"><span>é ç½®</span></el-button> |
| | | <el-button size="mini" type="primary" style="background: #004EA2;" @click="selectRawInspectsList()"><span>æ¥ |
| | | 询</span></el-button> |
| | | </div> |
| | | <div class="thing"> |
| | | <el-table :data="tableData" border style="width: 100%;overflow-y: auto;min-height: calc(100% - 50px)" |
| | | max-height="calc(100% - 50px)" @selection-change="handleSelectionChange" default-expand-all |
| | | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" row-key="id"> |
| | | <el-table-column type="selection" width="50"> </el-table-column> |
| | | <el-table-column type="index" label="åºå·" width="70"> |
| | | </el-table-column> |
| | | <el-table-column prop="formTime" label="æ¥ææ¥æ"> </el-table-column> |
| | | <el-table-column prop="code" label="åææç¼ç "> </el-table-column> |
| | | <el-table-column prop="name" label="åææåç§°"> </el-table-column> |
| | | <el-table-column prop="specifications" label="è§æ ¼åå·"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="åä½"> </el-table-column> |
| | | <el-table-column prop="number" label="æ°é"> </el-table-column> |
| | | <el-table-column prop="createTime" label="æ¥æ£æ¥æ"> </el-table-column> |
| | | <el-table-column prop="user_name" label="æ¥æ£äºº"> </el-table-column> |
| | | <el-table-column prop="createTime" label="æ£éªæ¥æ"> </el-table-column> |
| | | <el-table-column prop="createTime" label="æ£æµç¶æ" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.ins_state == 1">å·²æ£æµ</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.ins_state == 0">æªæ£æµ</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="judge_state" label="åæ ¼ç¶æ" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.judge_state == 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.judge_state == 0">ä¸åæ ¼</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span class="table_do" @click="changeShowDetail(scope.row)">æ¥ç</span> |
| | | <span class="table_do">æå°</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-col style="height: 50px;display: flex;align-items: center;justify-content: right;"> |
| | | <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1" |
| | | :page-sizes="[10, 15, 20, 30, 50]" :page-size="search.co" layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total"> |
| | | </el-pagination> |
| | | </el-col> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | search: { |
| | | formTime: "", // æ¥ææ¶é´ |
| | | code: "", // åææç¼ç |
| | | insState: "", // æ£æµç¶æ |
| | | name: "", // |
| | | countSize: 10, // æ¡æ°/页 |
| | | pageSize: 1 // é¡µæ° |
| | | }, |
| | | total: 0, |
| | | tableData: [], |
| | | selects: [] |
| | | }; |
| | | }, |
| | | props: ["goDetail"], |
| | | mounted() { |
| | | this.selectRawInspectsList(); |
| | | }, |
| | | methods: { |
| | | handleSelectionChange(val) { |
| | | this.selects = val; |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.countSize = val; |
| | | this.selectRawInspectsList(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.pageSize = val; |
| | | this.selectRawInspectsList(); |
| | | }, |
| | | selectRawInspectsList() { |
| | | this.$axios |
| | | .get(this.$api.url.selectRawInspectsList, { params: this.search }) |
| | | .then(res => { |
| | | this.tableData = res.data.row; |
| | | this.total = res.data.total; |
| | | }); |
| | | }, |
| | | clean() { |
| | | this.search = { |
| | | formTime: "", // æ¥ææ¶é´ |
| | | code: "", // åææç¼ç |
| | | insState: "", // æ£æµç¶æ |
| | | name: "", // |
| | | countSize: 10, // æ¡æ°/页 |
| | | pageSize: 1 // é¡µæ° |
| | | }; |
| | | this.selectRawInspectsList(); |
| | | }, |
| | | changeShowDetail({ id }) { |
| | | this.goDetail(id); |
| | | // console.log(id) |
| | | // const res = await this.$axios.post(this.$api.url.selectRawInspectsListById,{params:{id}}) |
| | | // console.log(res) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | search: { |
| | | formTime: "", // æ¥ææ¶é´ |
| | | code: "", // åææç¼ç |
| | | insState: "", // æ£æµç¶æ |
| | | name: "", // |
| | | countSize: 10, // æ¡æ°/页 |
| | | pageSize: 1 // é¡µæ° |
| | | }, |
| | | total: 0, |
| | | tableData: [], |
| | | selects: [] |
| | | }; |
| | | }, |
| | | props: ["goDetail"], |
| | | mounted() { |
| | | this.selectRawInspectsList(); |
| | | }, |
| | | methods: { |
| | | handleSelectionChange(val) { |
| | | this.selects = val; |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.countSize = val; |
| | | this.selectRawInspectsList(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.pageSize = val; |
| | | this.selectRawInspectsList(); |
| | | }, |
| | | selectRawInspectsList() { |
| | | this.$axios |
| | | .get(this.$api.url.selectRawInspectsList, { |
| | | params: this.search |
| | | }) |
| | | .then(res => { |
| | | this.tableData = res.data.row; |
| | | this.total = res.data.total; |
| | | }); |
| | | }, |
| | | clean() { |
| | | this.search = { |
| | | formTime: "", // æ¥ææ¶é´ |
| | | code: "", // åææç¼ç |
| | | insState: "", // æ£æµç¶æ |
| | | name: "", // |
| | | countSize: 10, // æ¡æ°/页 |
| | | pageSize: 1 // é¡µæ° |
| | | }; |
| | | this.selectRawInspectsList(); |
| | | }, |
| | | changeShowDetail({ |
| | | id |
| | | }) { |
| | | this.goDetail(id); |
| | | // console.log(id) |
| | | // const res = await this.$axios.post(this.$api.url.selectRawInspectsListById,{params:{id}}) |
| | | // console.log(res) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | |
| | | <template> |
| | | <div class="rawInsBox"> |
| | | <RawIns v-if="!showDetail" :goDetail="goDetail"></RawIns> |
| | | <RawInsDetail v-if="showDetail" :goBack="goBack" :detailId="id"></RawInsDetail> |
| | | </div> |
| | | <div class="rawInsBox"> |
| | | <RawIns v-if="!showDetail" :goDetail="goDetail"></RawIns> |
| | | <RawInsDetail v-if="showDetail" :goBack="goBack" :detailId="id"></RawInsDetail> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import RawIns from './raw-ins.vue' |
| | | import RawInsDetail from './rawInsDetail.vue' |
| | | export default { |
| | | components:{RawIns,RawInsDetail}, |
| | | data() { |
| | | return { |
| | | showDetail: false, |
| | | id:0 |
| | | } |
| | | }, |
| | | mounted(){ |
| | | }, |
| | | methods:{ |
| | | goDetail(id) { |
| | | this.showDetail = true |
| | | this.id = id |
| | | console.log(this.id) |
| | | }, |
| | | goBack() { |
| | | this.$parent.removeAllTab() |
| | | this.showDetail = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | import RawIns from './raw-ins.vue' |
| | | import RawInsDetail from './rawInsDetail.vue' |
| | | export default { |
| | | components: { |
| | | RawIns, |
| | | RawInsDetail |
| | | }, |
| | | data() { |
| | | return { |
| | | showDetail: false, |
| | | id: 0 |
| | | } |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | goDetail(id) { |
| | | this.showDetail = true |
| | | this.id = id |
| | | }, |
| | | goBack() { |
| | | this.showDetail = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <div class="rawInsBox"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px;">åæææ£éª</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button |
| | | icon="el-icon-circle-plus-outline" |
| | | v-show="detailId === null" |
| | | @click="addNewRawInspect" |
| | | style="background-color: #004ea2; color: #ffffff;" |
| | | >æ 交</el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-back" |
| | | @click=" |
| | | <div class="rawInsBox"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px;">åæææ£éª</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button icon="el-icon-circle-plus-outline" v-show="detailId === null" @click="addNewRawInspect" |
| | | style="background-color: #004ea2; color: #ffffff;">æ 交</el-button> |
| | | <el-button icon="el-icon-back" @click=" |
| | | () => { |
| | | goBack(); |
| | | } |
| | | " |
| | | >è¿ å</el-button |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div |
| | | class="raw-detail-info" |
| | | :class="detailId === null ? 'raw-detail-info-edit' : ''" |
| | | > |
| | | <el-form v-model="detailInfo" label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ¥ææ¥æ:"> |
| | | <el-input |
| | | v-if="detailId !== null" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.formTime" |
| | | ></el-input> |
| | | <el-date-picker |
| | | v-else |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | v-model="detailInfo.formTime" |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åææåç§°:"> |
| | | <el-input |
| | | v-if="detailId !== null" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.name" |
| | | ></el-input> |
| | | <el-input |
| | | v-else |
| | | v-model="detailInfo.name" |
| | | placeholder="请è¾å
¥åææåç§°" |
| | | ></el-input> </el-form-item |
| | | ></el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åææç¼ç :"> |
| | | <el-input |
| | | v-if="detailId !== null" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.code" |
| | | ></el-input> |
| | | <el-input |
| | | v-else |
| | | v-model="detailInfo.code" |
| | | placeholder="请è¾å
¥åææç¼ç " |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è§æ ¼åå·:"> |
| | | <el-input |
| | | v-if="detailId !== null" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.specifications" |
| | | ></el-input> |
| | | <el-input |
| | | v-else |
| | | v-model="detailInfo.specifications" |
| | | placeholder="请è¾å
¥è§æ ¼åå·" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åä½:"> |
| | | <el-input |
| | | v-if="detailId !== null" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.runit" |
| | | ></el-input> |
| | | <el-input |
| | | v-else |
| | | placeholder="请è¾å
¥æ£éªåä½" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.unit" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ°é:"> |
| | | <el-input |
| | | :placeholder="detailId !== null ? '' : '请è¾å
¥æ£éªæ°é'" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.number" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="ä¾åºååç§°:"> |
| | | <el-input |
| | | :placeholder="detailId !== null ? '' : '请è¾å
¥ä¾åºååç§°'" |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.supplier" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item v-show="detailId !== null" label="æ¥æ£æ¥æ:"> |
| | | <el-input |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.creatTime" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item v-show="detailId !== null" label="æ¥æ£äºº:"> |
| | | <el-input |
| | | :disabled="detailId !== null" |
| | | v-model="detailInfo.userName" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px;">æ£éªé¡¹ç®</el-col> |
| | | <el-col :span="12" style="line-height: 32px; padding-top: 6px;"> |
| | | <el-button |
| | | style="float: right;" |
| | | @click="clickDeleteInspectionColumn()" |
| | | >å 餿£éªå¼å</el-button |
| | | > |
| | | <el-button |
| | | style="float: right;margin-right: 30px;" |
| | | @click="clickAddInspectionColumn()" |
| | | >æ·»å æ£éªå¼å</el-button |
| | | > |
| | | <el-button |
| | | v-if="detailId == null" |
| | | style="float: right;margin-right: 30px;" |
| | | @click="clickAddLine()" |
| | | >æ·»å æ£éªè¡</el-button |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="raw-project-table"> |
| | | <el-table :data="projectTable" style="width: 100%" height="320"> |
| | | <el-table-column type="index" label="åºå·" width="60"> |
| | | </el-table-column> |
| | | <el-table-column prop="rpName" label="项ç®" width="212"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-if="detailId == null" |
| | | v-model="scope.row.name" |
| | | placeholder="请è¾å
¥é¡¹ç®åç§°" |
| | | ></el-input> |
| | | <el-input v-else v-model="scope.row.rpName" disabled></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="åä½" width="148"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-if="detailId == null" |
| | | v-model="scope.row.unit" |
| | | placeholder="请è¾å
¥åä½" |
| | | ></el-input> |
| | | <el-input v-else v-model="scope.row.rpUnit" disabled></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="required" label="æ åå¼" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | :disabled="detailId != null" |
| | | @blur="assertTest(scope.row)" |
| | | v-model="scope.row.required" |
| | | placeholder="请è¾å
¥æ åå¼" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="internal" label="å
æ§å¼" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | @blur="assertTest(scope.row)" |
| | | :disabled="detailId != null" |
| | | v-model="scope.row.internal" |
| | | placeholder="请è¾å
¥å
æ§å¼" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="testValue" |
| | | label="æ£æµå¼" |
| | | min-width="150" |
| | | v-for="(item, index) in empiricalValueAdd" |
| | | :key="index" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tooltip |
| | | :disabled="scope.row.deviceId != null" |
| | | class="item" |
| | | effect="dark" |
| | | content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start" |
| | | > |
| | | <el-input |
| | | :disabled="scope.row.deviceId == null" |
| | | v-model="scope.row.testValueList[index]" |
| | | @blur="changeState(scope.row, index)" |
| | | placeholder="请è¾å
¥æ£æµå¼" |
| | | ></el-input> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="deviceName" label="è¯éªè®¾å¤" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickTableSelect(scope)">{{ |
| | | ">è¿ å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="raw-detail-info" :class="detailId === null ? 'raw-detail-info-edit' : ''"> |
| | | <el-form v-model="detailInfo" label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ¥ææ¥æ:"> |
| | | <el-input v-if="detailId !== null" :disabled="detailId !== null" v-model="detailInfo.formTime"></el-input> |
| | | <el-date-picker v-else type="date" value-format="yyyy-MM-dd" v-model="detailInfo.formTime" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åææåç§°:"> |
| | | <el-input v-if="detailId !== null" :disabled="detailId !== null" v-model="detailInfo.name"></el-input> |
| | | <el-input v-else v-model="detailInfo.name" placeholder="请è¾å
¥åææåç§°"></el-input> </el-form-item></el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åææç¼ç :"> |
| | | <el-input v-if="detailId !== null" :disabled="detailId !== null" v-model="detailInfo.code"></el-input> |
| | | <el-input v-else v-model="detailInfo.code" placeholder="请è¾å
¥åææç¼ç "></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="è§æ ¼åå·:"> |
| | | <el-input v-if="detailId !== null" :disabled="detailId !== null" |
| | | v-model="detailInfo.specifications"></el-input> |
| | | <el-input v-else v-model="detailInfo.specifications" placeholder="请è¾å
¥è§æ ¼åå·"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="åä½:"> |
| | | <el-input v-if="detailId !== null" :disabled="detailId !== null" v-model="detailInfo.runit"></el-input> |
| | | <el-input v-else placeholder="请è¾å
¥æ£éªåä½" :disabled="detailId !== null" v-model="detailInfo.unit"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="æ°é:"> |
| | | <el-input :placeholder="detailId !== null ? '' : '请è¾å
¥æ£éªæ°é'" :disabled="detailId !== null" |
| | | v-model="detailInfo.number"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="7"> |
| | | <el-form-item label="ä¾åºååç§°:"> |
| | | <el-input :placeholder="detailId !== null ? '' : '请è¾å
¥ä¾åºååç§°'" :disabled="detailId !== null" |
| | | v-model="detailInfo.supplier"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item v-show="detailId !== null" label="æ¥æ£æ¥æ:"> |
| | | <el-input :disabled="detailId !== null" v-model="detailInfo.creatTime"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item v-show="detailId !== null" label="æ¥æ£äºº:"> |
| | | <el-input :disabled="detailId !== null" v-model="detailInfo.userName"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px;">æ£éªé¡¹ç®</el-col> |
| | | <el-col :span="12" style="line-height: 32px; padding-top: 6px;"> |
| | | <el-button style="float: right;" @click="clickDeleteInspectionColumn()">å 餿£éªå¼å</el-button> |
| | | <el-button style="float: right;margin-right: 30px;" @click="clickAddInspectionColumn()">æ·»å æ£éªå¼å</el-button> |
| | | <el-button v-if="detailId == null" style="float: right;margin-right: 30px;" |
| | | @click="clickAddLine()">æ·»å æ£éªè¡</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="raw-project-table"> |
| | | <el-table :data="projectTable" style="width: 100%" height="320"> |
| | | <el-table-column type="index" label="åºå·" width="60"> |
| | | </el-table-column> |
| | | <el-table-column prop="rpName" label="项ç®" width="212"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="detailId == null" v-model="scope.row.name" placeholder="请è¾å
¥é¡¹ç®åç§°"></el-input> |
| | | <el-input v-else v-model="scope.row.rpName" disabled></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="åä½" width="148"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="detailId == null" v-model="scope.row.unit" placeholder="请è¾å
¥åä½"></el-input> |
| | | <el-input v-else v-model="scope.row.rpUnit" disabled></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="required" label="æ åå¼" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input :disabled="detailId != null" @blur="assertTest(scope.row)" v-model="scope.row.required" |
| | | placeholder="请è¾å
¥æ åå¼"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="internal" label="å
æ§å¼" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input @blur="assertTest(scope.row)" :disabled="detailId != null" v-model="scope.row.internal" |
| | | placeholder="请è¾å
¥å
æ§å¼"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="testValue" label="æ£æµå¼" min-width="150" v-for="(item, index) in empiricalValueAdd" |
| | | :key="index"> |
| | | <template slot-scope="scope"> |
| | | <el-tooltip :disabled="scope.row.deviceId != null" class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.deviceId == null" v-model="scope.row.testValueList[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="deviceName" label="è¯éªè®¾å¤" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickTableSelect(scope)">{{ |
| | | scope.row.deviceId == null ? "è¯·éæ©" : scope.row.deviceName |
| | | }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="detailId !== null" |
| | | prop="testState" |
| | | label="ç»è®º" |
| | | min-width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span |
| | | v-show="scope.row.testState != null" |
| | | :style="{ |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="detailId !== null" prop="testState" label="ç»è®º" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <span v-show="scope.row.testState != null" :style="{ |
| | | color: scope.row.testState === 1 ? '#67C23A' : '#F56C6C' |
| | | }" |
| | | >{{ scope.row.testState === 1 ? "åæ ¼" : "ä¸åæ ¼" }}</span |
| | | > |
| | | <span v-show="scope.row.testState == null">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="detailId == null" label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickDeleteline(scope)" |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px;">æ£éªç»è®º</el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="raw-conclusion-table"> |
| | | <el-table :data="conclusionTable" style="100%"> |
| | | <el-table-column prop="code" label="ç©æç¼å·"> </el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"> </el-table-column> |
| | | <el-table-column v-if="detailId != null" prop="uName" label="æ£éªå"> |
| | | <template slot-scope="scope"> |
| | | <span |
| | | v-for="item in scope.row.uName" |
| | | :key="item && item.uName" |
| | | :style="{ marginRight: '8px' }" |
| | | >{{ item }}</span |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="testState" label="æ£éªç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span |
| | | v-show="scope.row.testState != null" |
| | | :style="{ |
| | | }">{{ scope.row.testState === 1 ? "åæ ¼" : "ä¸åæ ¼" }}</span> |
| | | <span v-show="scope.row.testState == null">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="detailId == null" label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickDeleteline(scope)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px;">æ£éªç»è®º</el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="raw-conclusion-table"> |
| | | <el-table :data="conclusionTable" style="100%"> |
| | | <el-table-column prop="code" label="ç©æç¼å·"> </el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"> </el-table-column> |
| | | <el-table-column v-if="detailId != null" prop="uName" label="æ£éªå"> |
| | | <template slot-scope="scope"> |
| | | <span v-for="item in scope.row.uName" :key="item && item.uName" |
| | | :style="{ marginRight: '8px' }">{{ item }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="testState" label="æ£éªç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <span v-show="scope.row.testState != null" :style="{ |
| | | color: scope.row.testState === 1 ? '#67C23A' : '#F56C6C' |
| | | }" |
| | | >{{ scope.row.testState === 1 ? "åæ ¼" : "ä¸åæ ¼" }}</span |
| | | > |
| | | <span v-show="scope.row.testState == null">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="detailId !== null" label="æä½" width="120"> |
| | | <template> |
| | | <el-button type="text" size="small" @click.once="submitSave" |
| | | >䏿¥</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog |
| | | title="è¯·éæ©è®¾å¤" |
| | | :visible.sync="centerDialogVisible" |
| | | width="20%" |
| | | > |
| | | <div class="div_device_dialog"> |
| | | <el-input |
| | | placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" |
| | | v-model="filterText" |
| | | style="margin-bottom: 6px;" |
| | | > |
| | | </el-input> |
| | | <el-tree |
| | | class="filter-tree" |
| | | :data="materialOptions" |
| | | :props="defaultProps" |
| | | default-expand-all |
| | | highlight-current |
| | | @node-click="nodeClick" |
| | | :filter-node-method="filterNode" |
| | | ref="tree" |
| | | > |
| | | <div class="custom-tree-node" slot-scope="{ data }"> |
| | | <span |
| | | ><i |
| | | :class=" |
| | | }">{{ scope.row.testState === 1 ? "åæ ¼" : "ä¸åæ ¼" }}</span> |
| | | <span v-show="scope.row.testState != null">{{null}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="detailId !== null" label="æä½" width="120"> |
| | | <template> |
| | | <el-button type="text" size="small" @click.once="submitSave">䏿¥</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog title="è¯·éæ©è®¾å¤" :visible.sync="centerDialogVisible" width="20%"> |
| | | <div class="div_device_dialog"> |
| | | <el-input placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" v-model="filterText" style="margin-bottom: 6px;"> |
| | | </el-input> |
| | | <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all highlight-current |
| | | @node-click="nodeClick" :filter-node-method="filterNode" ref="tree"> |
| | | <div class="custom-tree-node" slot-scope="{ data }"> |
| | | <span><i :class=" |
| | | `node_i ${ |
| | | data.children ? 'el-icon-folder-opened' : 'el-icon-tickets' |
| | | }` |
| | | " |
| | | ></i> |
| | | {{ data.name }}</span |
| | | > |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="clickNodeSure()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | "></i> |
| | | {{ data.name }}</span> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="centerDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="clickNodeSure()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { triggerRef } from "vue"; |
| | | import RawIns from "./raw-ins.vue"; |
| | | export default { |
| | | components: { RawIns }, |
| | | props: ["goBack", "detailId"], |
| | | created() { |
| | | // æ¸
空 |
| | | this.detailInfo = {}; |
| | | if (this.detailId) { |
| | | this.getDetailInfo(); |
| | | } |
| | | this.getOptions(); |
| | | }, |
| | | mounted() { |
| | | import { |
| | | triggerRef |
| | | } from "vue"; |
| | | import RawIns from "./raw-ins.vue"; |
| | | export default { |
| | | components: { |
| | | RawIns |
| | | }, |
| | | props: ["goBack", "detailId"], |
| | | created() { |
| | | // æ¸
空 |
| | | this.detailInfo = {}; |
| | | if (this.detailId) { |
| | | this.getDetailInfo(); |
| | | } |
| | | this.getOptions(); |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | computed: { |
| | | conclusionTable() { |
| | | const conclusion = {}; |
| | | conclusion.name = this.detailInfo.name; |
| | | conclusion.code = this.detailInfo.code; |
| | | conclusion.uName = [ |
| | | ...new Set(this.projectTable.map(item => item.uName)) |
| | | ]; |
| | | if ( |
| | | this.projectTable.filter(item => item.testState === undefined).length === |
| | | this.projectTable.length |
| | | ) { |
| | | conclusion.testState = null; |
| | | return [conclusion]; |
| | | } |
| | | if (this.projectTable.filter(item => item.testState === 0).length > 0) { |
| | | conclusion.testState = 0; |
| | | } else { |
| | | conclusion.testState = 1; |
| | | } |
| | | console.log([conclusion]); |
| | | return [conclusion]; |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // æ·»å å |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | | empiricalValueAddMaxNumber: 0, |
| | | // 设å¤éæ©æ æ¾ç¤º |
| | | centerDialogVisible: false, |
| | | // 详æ
页就æ¯è¯¦æ
ä¿¡æ¯ |
| | | detailInfo: {}, |
| | | // è¡¨æ ¼ |
| | | projectTable: [], |
| | | // æ°å»ºæ£éªååæ°å¯¹è±¡ |
| | | rawInsParams: {}, |
| | | // 项ç®åç§°options |
| | | specificationOptions: [], |
| | | filterText: "", |
| | | materialOptions: [], // æ æ°æ® |
| | | defaultProps: { |
| | | // è®¾å¤æ æ°æ®è®¾ç½® |
| | | children: "children", |
| | | label: "name" |
| | | }, |
| | | nodeData: "", // nodeç¹å»ä¿åå½åç¹å»æ°æ® |
| | | clickSelectDevice: { |
| | | index: "", // ç¹å»éæ©åå¨å½åè¡ç´¢å¼ |
| | | rpId: "" // ç¹å»éæ©åå¨å½åè¡é¡¹ç®Id |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.tree.filter(val); |
| | | } |
| | | }, |
| | | methods: { |
| | | assertTest(row){ |
| | | // let fuArr=['>', '<', '='] |
| | | // if(!fuArr.includes(row.required[0])){ |
| | | // this.$message({ |
| | | // message: "æ åå¼["+row.required+"]æ ¼å¼é¦ä½åºå
å«>,<æè
=", |
| | | // type: 'warning' |
| | | // }); |
| | | // return |
| | | // } |
| | | // if(!fuArr.includes(row.internal[0])){ |
| | | // this.$message({ |
| | | // message: "å
æ§å¼["+row.internal+"]æ ¼å¼é¦ä½åºå
å«>,<æè
=", |
| | | // type: 'warning' |
| | | // }); |
| | | // return |
| | | // } |
| | | }, |
| | | // è®¾å¤æ è¿æ»¤æç´¢ |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | }, |
| | | computed: { |
| | | conclusionTable() { |
| | | const conclusion = {}; |
| | | conclusion.name = this.detailInfo.name; |
| | | conclusion.code = this.detailInfo.code; |
| | | conclusion.uName = [ |
| | | ...new Set(this.projectTable.map(item => item.uName)) |
| | | ]; |
| | | return [conclusion]; |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // æ·»å å |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | | empiricalValueAddMaxNumber: 0, |
| | | // 设å¤éæ©æ æ¾ç¤º |
| | | centerDialogVisible: false, |
| | | // 详æ
页就æ¯è¯¦æ
ä¿¡æ¯ |
| | | detailInfo: {}, |
| | | // è¡¨æ ¼ |
| | | projectTable: [], |
| | | // æ°å»ºæ£éªååæ°å¯¹è±¡ |
| | | rawInsParams: {}, |
| | | // 项ç®åç§°options |
| | | specificationOptions: [], |
| | | filterText: "", |
| | | materialOptions: [], // æ æ°æ® |
| | | defaultProps: { |
| | | // è®¾å¤æ æ°æ®è®¾ç½® |
| | | children: "children", |
| | | label: "name" |
| | | }, |
| | | nodeData: "", // nodeç¹å»ä¿åå½åç¹å»æ°æ® |
| | | clickSelectDevice: { |
| | | index: "", // ç¹å»éæ©åå¨å½åè¡ç´¢å¼ |
| | | rpId: "" // ç¹å»éæ©åå¨å½åè¡é¡¹ç®Id |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.tree.filter(val); |
| | | } |
| | | }, |
| | | methods: { |
| | | assertTest(row) { |
| | | // let fuArr=['>', '<', '='] |
| | | // if(!fuArr.includes(row.required[0])){ |
| | | // this.$message({ |
| | | // message: "æ åå¼["+row.required+"]æ ¼å¼é¦ä½åºå
å«>,<æè
=", |
| | | // type: 'warning' |
| | | // }); |
| | | // return |
| | | // } |
| | | // if(!fuArr.includes(row.internal[0])){ |
| | | // this.$message({ |
| | | // message: "å
æ§å¼["+row.internal+"]æ ¼å¼é¦ä½åºå
å«>,<æè
=", |
| | | // type: 'warning' |
| | | // }); |
| | | // return |
| | | // } |
| | | }, |
| | | // è®¾å¤æ è¿æ»¤æç´¢ |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | |
| | | // è·åæ¥æ£å详æ
ä¿¡æ¯ |
| | | async getDetailInfo() { |
| | | await this.$axios |
| | | .get(this.$api.url.selectRawInspectsListById + `${this.detailId}`, { |
| | | params: { id: this.detailId } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.detailInfo = res.data; |
| | | this.projectTable = res.data.children; |
| | | this.projectTable.forEach(i => { |
| | | // è§£å³éæ°èµå¼æ æ³ç¼è¾æä½ |
| | | if (i.testValue == null) { |
| | | this.$set(i, "testValueList", []); |
| | | } else { |
| | | this.$set(i, "testValueList", i.testValue.split(",")); |
| | | } |
| | | // åæé¿çåè¡¨æ° |
| | | if (i.testValueList.length > this.empiricalValueAdd) { |
| | | this.empiricalValueAdd = i.testValueList.length; |
| | | this.empiricalValueAddMaxNumber = i.testValueList.length - 1; |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | // æ°å¢æ£éªå |
| | | async addNewRawInspect() { |
| | | //TODO: |
| | | console.log(this.projectTable); |
| | | if(this.projectTable.length>0){ |
| | | let filterTable= this.projectTable.filter(item=>{ |
| | | return item.required===''||item.internal===''|| |
| | | item.required===null||item.internal===null||item.name==='' |
| | | }) |
| | | if(filterTable.length>0) { |
| | | this.$message({ |
| | | message: "项ç®åç§°ï¼æ åå¼åå
æ§å¼ä¸è½ä¸ºç©ºï¼", |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | } |
| | | this.projectTable.forEach(i => { |
| | | // å°å表转æ¢ä¸ºå符串 |
| | | i.testValue = i.testValueList.join(","); |
| | | }); |
| | | this.detailInfo.rawInsProducts = this.projectTable; |
| | | this.$axios.post( |
| | | this.$api.url.addRawInspects, |
| | | { ...this.detailInfo }, |
| | | { headers: { "Content-Type": "application/json" } } |
| | | ).then(res=>{ |
| | | console.log(res); |
| | | if(res.code=="201"){ |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | }else{ |
| | | // this.detailId = res.data; |
| | | // this.getDetailInfo(); |
| | | // // this.$message.success(res.message); |
| | | // this.goBack(); |
| | | } |
| | | }); |
| | | }, |
| | | // è·åæ¥æ£å详æ
ä¿¡æ¯ |
| | | async getDetailInfo() { |
| | | await this.$axios |
| | | .get(this.$api.url.selectRawInspectsListById + `${this.detailId}`, { |
| | | params: { |
| | | id: this.detailId |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | this.detailInfo = res.data; |
| | | this.projectTable = res.data.children; |
| | | this.projectTable.forEach(i => { |
| | | // è§£å³éæ°èµå¼æ æ³ç¼è¾æä½ |
| | | if (i.testValue == null) { |
| | | this.$set(i, "testValueList", []); |
| | | } else { |
| | | this.$set(i, "testValueList", i.testValue.split(",")); |
| | | } |
| | | // åæé¿çåè¡¨æ° |
| | | if (i.testValueList.length > this.empiricalValueAdd) { |
| | | this.empiricalValueAdd = i.testValueList.length; |
| | | this.empiricalValueAddMaxNumber = i.testValueList.length - 1; |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | // æ°å¢æ£éªå |
| | | async addNewRawInspect() { |
| | | //TODO: |
| | | console.log(this.projectTable); |
| | | if (this.projectTable.length > 0) { |
| | | let filterTable = this.projectTable.filter(item => { |
| | | return item.required === '' || item.internal === '' || |
| | | item.required === null || item.internal === null || item.name === '' |
| | | }) |
| | | if (filterTable.length > 0) { |
| | | this.$message({ |
| | | message: "项ç®åç§°ï¼æ åå¼åå
æ§å¼ä¸è½ä¸ºç©ºï¼", |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | } |
| | | this.projectTable.forEach(i => { |
| | | // å°å表转æ¢ä¸ºå符串 |
| | | i.testValue = i.testValueList.join(","); |
| | | }); |
| | | this.detailInfo.rawInsProducts = this.projectTable; |
| | | this.$axios.post( |
| | | this.$api.url.addRawInspects, { |
| | | ...this.detailInfo |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | } |
| | | ).then(res => { |
| | | console.log(res); |
| | | if (res.code == "201") { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } else { |
| | | // this.detailId = res.data; |
| | | // this.getDetailInfo(); |
| | | // // this.$message.success(res.message); |
| | | // this.goBack(); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // ä¿®æ¹é¡¹ç®çæ£æµå¼æ¹åç»è®º |
| | | async changeState(row, index) { |
| | | if (this.detailId !== null) { |
| | | const res = await this.$axios.post(this.$api.url.updaterawInsProduct, { |
| | | DevId: row.deviceId, |
| | | rpId: row.rpId, |
| | | testValue: row.testValueList.join(",") |
| | | }); |
| | | this.$message.success("æäº¤æå"); |
| | | this.getDetailInfo(); //éæ°å·æ°ä¿¡æ¯æ°æ® |
| | | } |
| | | }, |
| | | async submitSave() { |
| | | const res = await this.$axios.post( |
| | | this.$api.url.updateRawInspectsById + `${this.detailId}` |
| | | ).then(res=>{ |
| | | this.$message.success("æäº¤æå"); |
| | | this.getDetailInfo(); |
| | | this.goBack() |
| | | Â Â Â }); |
| | | }, |
| | | // è·åè®¾å¤æ å
容 |
| | | getOptions() { |
| | | this.$axios.get(this.$api.url.rawSelectDevice).then(res => { |
| | | this.materialOptions = res.data; |
| | | }); |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine() { |
| | | let obj = { |
| | | deviceId: null, |
| | | deviceName: "", |
| | | internal: "", |
| | | name: "", |
| | | required: "", |
| | | textValue: "", |
| | | testState:null, |
| | | testValueList: [], |
| | | unit: "" |
| | | }; |
| | | this.projectTable.push(obj); |
| | | }, |
| | | // å é¤è¡ |
| | | clickDeleteline(scope) { |
| | | this.projectTable.splice(scope.$index, 1); |
| | | }, |
| | | // ç¹å»è®¾å¤æ ä¿åç¹å»è®°å½ |
| | | nodeClick(data) { |
| | | if (data.id != undefined) this.nodeData = data; |
| | | }, |
| | | // ç¹å»è¡¨æ ¼éæ©è§¦å |
| | | clickTableSelect(scope) { |
| | | this.centerDialogVisible = true; |
| | | this.clickSelectDevice.index = scope.$index; |
| | | this.clickSelectDevice.rpId = scope.row.rpId; |
| | | }, |
| | | // ç¹å»æ éé¢çç¡®å® |
| | | clickNodeSure() { |
| | | if (this.detailId == null) { |
| | | this.projectTable[ |
| | | this.clickSelectDevice.index |
| | | ].deviceId = this.nodeData.id; |
| | | this.projectTable[ |
| | | this.clickSelectDevice.index |
| | | ].deviceName = this.nodeData.name; |
| | | this.centerDialogVisible = false; |
| | | } else { |
| | | this.$axios |
| | | .post(this.$api.url.updateDevByRpId, { |
| | | rpId: this.clickSelectDevice.rpId, |
| | | devId: this.nodeData.id |
| | | }) |
| | | .then(res => { |
| | | this.getDetailInfo(); |
| | | this.centerDialogVisible = false; |
| | | }); |
| | | } |
| | | }, |
| | | // å 餿£éªå¼å |
| | | clickDeleteInspectionColumn() { |
| | | if (this.empiricalValueAdd - 1 === 0) { |
| | | } else { |
| | | if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { |
| | | this.empiricalValueAdd = this.empiricalValueAdd - 1; |
| | | this.projectTable.forEach(i => { |
| | | i.testValueList.splice(this.empiricalValueAdd, 1); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // æ·»å æ£éªå¼å |
| | | clickAddInspectionColumn() { |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | } |
| | | } |
| | | }; |
| | | // ä¿®æ¹é¡¹ç®çæ£æµå¼æ¹åç»è®º |
| | | async changeState(row, index) { |
| | | if (this.detailId !== null) { |
| | | const res = await this.$axios.post(this.$api.url.updaterawInsProduct, { |
| | | DevId: row.deviceId, |
| | | rpId: row.rpId, |
| | | testValue: row.testValueList.join(",") |
| | | }); |
| | | this.$message.success("æäº¤æå"); |
| | | this.getDetailInfo(); //éæ°å·æ°ä¿¡æ¯æ°æ® |
| | | } |
| | | }, |
| | | async submitSave() { |
| | | const res = await this.$axios.post( |
| | | this.$api.url.updateRawInspectsById + `${this.detailId}` |
| | | ).then(res => { |
| | | this.$message.success("æäº¤æå"); |
| | | this.getDetailInfo(); |
| | | this.goBack() |
| | | }); |
| | | }, |
| | | // è·åè®¾å¤æ å
容 |
| | | getOptions() { |
| | | this.$axios.get(this.$api.url.rawSelectDevice).then(res => { |
| | | this.materialOptions = res.data; |
| | | }); |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine() { |
| | | let obj = { |
| | | deviceId: null, |
| | | deviceName: "", |
| | | internal: "", |
| | | name: "", |
| | | required: "", |
| | | textValue: "", |
| | | testState: null, |
| | | testValueList: [], |
| | | unit: "" |
| | | }; |
| | | this.projectTable.push(obj); |
| | | }, |
| | | // å é¤è¡ |
| | | clickDeleteline(scope) { |
| | | this.projectTable.splice(scope.$index, 1); |
| | | }, |
| | | // ç¹å»è®¾å¤æ ä¿åç¹å»è®°å½ |
| | | nodeClick(data) { |
| | | if (data.id != undefined) this.nodeData = data; |
| | | }, |
| | | // ç¹å»è¡¨æ ¼éæ©è§¦å |
| | | clickTableSelect(scope) { |
| | | this.centerDialogVisible = true; |
| | | this.clickSelectDevice.index = scope.$index; |
| | | this.clickSelectDevice.rpId = scope.row.rpId; |
| | | }, |
| | | // ç¹å»æ éé¢çç¡®å® |
| | | clickNodeSure() { |
| | | if (this.detailId == null) { |
| | | this.projectTable[ |
| | | this.clickSelectDevice.index |
| | | ].deviceId = this.nodeData.id; |
| | | this.projectTable[ |
| | | this.clickSelectDevice.index |
| | | ].deviceName = this.nodeData.name; |
| | | this.centerDialogVisible = false; |
| | | } else { |
| | | this.$axios |
| | | .post(this.$api.url.updateDevByRpId, { |
| | | rpId: this.clickSelectDevice.rpId, |
| | | devId: this.nodeData.id |
| | | }) |
| | | .then(res => { |
| | | this.getDetailInfo(); |
| | | this.centerDialogVisible = false; |
| | | }); |
| | | } |
| | | }, |
| | | // å 餿£éªå¼å |
| | | clickDeleteInspectionColumn() { |
| | | if (this.empiricalValueAdd - 1 === 0) {} else { |
| | | if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { |
| | | this.empiricalValueAdd = this.empiricalValueAdd - 1; |
| | | this.projectTable.forEach(i => { |
| | | i.testValueList.splice(this.empiricalValueAdd, 1); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | // æ·»å æ£éªå¼å |
| | | clickAddInspectionColumn() { |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .node_i { |
| | | color: orange; |
| | | } |
| | | .div_device_dialog { |
| | | min-height: 400px; |
| | | overflow: auto; |
| | | } |
| | | .rawInsBox { |
| | | height: 100%; |
| | | width: 100%; |
| | | overflow-y: scroll; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | .el-table__fixed-body-wrapper { |
| | | top: 48px; |
| | | } |
| | | .rawInsBox .title .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | .rawInsBox .title { |
| | | margin-bottom: 10px; |
| | | padding: 0 20px; |
| | | } |
| | | /* æ£éªè¯¦æ
*/ |
| | | .raw-detail-info { |
| | | background: #fff; |
| | | padding: 26px 0px 11px 80px; |
| | | } |
| | | .raw-detail-info >>> .el-form-item__label { |
| | | color: rgb(51, 51, 51); |
| | | font-family: 微软é
é»; |
| | | font-size: 16px; |
| | | font-weight: 400; |
| | | letter-spacing: 0px; |
| | | } |
| | | .raw-detail-info .el-input { |
| | | width: auto; |
| | | } |
| | | .raw-detail-info.raw-detail-info-edit >>> .el-input__inner { |
| | | background: #fff; |
| | | } |
| | | .raw-detail-info >>> .el-input__inner { |
| | | width: 224px; |
| | | height: 32px; |
| | | box-sizing: border-box; |
| | | background: rgb(238, 238, 238); |
| | | border: 1px solid rgb(221, 221, 221); |
| | | border-radius: 4px; |
| | | } |
| | | .raw-detail-info .el-form-item { |
| | | margin-bottom: 24px; |
| | | } |
| | | .raw-detail-info .el-form-item .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | .node_i { |
| | | color: orange; |
| | | } |
| | | |
| | | /* æ£éªé¡¹ç® */ |
| | | .raw-project-table { |
| | | padding: 24px 14px; |
| | | background: #fff; |
| | | flex: 1; |
| | | /* max-height: 360px; */ |
| | | /* overflow-y: hidden; */ |
| | | } |
| | | /* æ£éªç»è®º */ |
| | | .raw-conclusion-table { |
| | | padding: 9px 14px; |
| | | background: #fff; |
| | | } |
| | | </style> |
| | | .div_device_dialog { |
| | | min-height: 400px; |
| | | overflow: auto; |
| | | } |
| | | |
| | | .rawInsBox { |
| | | height: 100%; |
| | | width: 100%; |
| | | overflow-y: scroll; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .el-table__fixed-body-wrapper { |
| | | top: 48px; |
| | | } |
| | | |
| | | .rawInsBox .title .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | |
| | | .rawInsBox .title { |
| | | margin-bottom: 10px; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | /* æ£éªè¯¦æ
*/ |
| | | .raw-detail-info { |
| | | background: #fff; |
| | | padding: 26px 0px 11px 80px; |
| | | } |
| | | |
| | | .raw-detail-info>>>.el-form-item__label { |
| | | color: rgb(51, 51, 51); |
| | | font-family: 微软é
é»; |
| | | font-size: 16px; |
| | | font-weight: 400; |
| | | letter-spacing: 0px; |
| | | } |
| | | |
| | | .raw-detail-info .el-input { |
| | | width: auto; |
| | | } |
| | | |
| | | .raw-detail-info.raw-detail-info-edit>>>.el-input__inner { |
| | | background: #fff; |
| | | } |
| | | |
| | | .raw-detail-info>>>.el-input__inner { |
| | | width: 224px; |
| | | height: 32px; |
| | | box-sizing: border-box; |
| | | background: rgb(238, 238, 238); |
| | | border: 1px solid rgb(221, 221, 221); |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .raw-detail-info .el-form-item { |
| | | margin-bottom: 24px; |
| | | } |
| | | |
| | | .raw-detail-info .el-form-item .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | |
| | | /* æ£éªé¡¹ç® */ |
| | | .raw-project-table { |
| | | padding: 24px 14px; |
| | | background: #fff; |
| | | flex: 1; |
| | | /* max-height: 360px; */ |
| | | /* overflow-y: hidden; */ |
| | | } |
| | | |
| | | /* æ£éªç»è®º */ |
| | | .raw-conclusion-table { |
| | | padding: 9px 14px; |
| | | background: #fff; |
| | | } |
| | | </style> |
| | |
| | | <el-col :span="12" style="line-height: 32px;">ç产记å½ç»´æ¤</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button type="primary" icon="el-icon-plus" style="background: #004EA2;" @click="addend">æ°å¢</el-button> |
| | | <!-- <el-button icon="el-icon-edit-outline" @click="modify">ä¿®æ¹</el-button> --> |
| | | <el-button icon="el-icon-delete" @click="dels">å é¤</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="choose"> |
| | | <span>ç±»åï¼</span> |
| | | <el-select v-model="search.type" size="small" @change="TYpe" placeholder="è¯·éæ©" style="width: 224px;margin-right: 30px;"> |
| | | <el-option label="æ©¡è¶è¿æ¥å¨" :value="0"></el-option> |
| | | <el-option label="éå±è¿æ¥å¨" :value="1"></el-option> |
| | | <el-option label="湿ææçµè¿æ¥å¨" :value="2"></el-option> |
| | | <el-option label="忝ç»ä»¶" :value="3"></el-option> |
| | | <el-select v-model="search.type" size="small" @change="TYpe" placeholder="è¯·éæ©" |
| | | style="width: 224px;margin-right: 30px;"> |
| | | <el-option v-for="(a, ai) in bigType" :key="ai" :value="a"></el-option> |
| | | </el-select> |
| | | <!-- <span>å·¥åºï¼</span> |
| | | <el-select v-model="search.name" size="small" placeholder="è¯·éæ©" style="width: 224px;margin-right: 30px;"> |
| | | <el-option v-for="(a, ai) in process" key="ai" :label="a.name" :value="a.id"></el-option> |
| | | </el-select> |
| | | <el-button size="mini" @click="clean()"><span>é ç½®</span></el-button> |
| | | <el-button size="mini" type="primary" style="background: #004EA2;"><span>æ¥ |
| | | 询</span></el-button> --> |
| | | <!-- :style="{height: scrollerHeight,overflow:'auto',display: 'flex'}" --> |
| | | |
| | | </div> |
| | | <div class="thing"> |
| | | <div class="left"> |
| | | <el-input v-model="search.technology" suffix-icon="el-icon-search" placeholder="请è¾å
¥æç´¢å
容" size="small" clearable @input="query"></el-input> |
| | | <el-tree :data="list" ref="tree" |
| | | :props="{children: 'children',label: 'name'}" node-key="name" default-expand-all |
| | | @node-click="handleNodeClick" highlight-current |
| | | :key="upIndex"> |
| | | <el-input v-model="search.technology" suffix-icon="el-icon-search" placeholder="请è¾å
¥æç´¢å
容" size="small" clearable |
| | | @input="query"></el-input> |
| | | <el-tree :data="list" ref="tree" :props="{children: 'children',label: 'name'}" node-key="name" |
| | | default-expand-all @node-click="handleNodeClick" highlight-current :key="upIndex" style="padding-top: 8px;"> |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span><i :class="`node_i ${data.code != '[2]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i> |
| | | {{ data.code }}{{ data.name }}</span> |
| | | <!-- <el-button type="text" size="mini" @click.stop="remove(node, data)"> |
| | | <i class="el-icon-delete"></i> |
| | | </el-button> --> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">ç±»å:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select v-model="edit.type" disabled placeholder="è¯·éæ©" style="width: 310px;"> |
| | | <el-option label="æ©¡è¶è¿æ¥å¨" :value="0"></el-option> |
| | | <el-option label="éå±è¿æ¥å¨" :value="1"></el-option> |
| | | <el-option label="湿ææçµè¿æ¥å¨" :value="2"></el-option> |
| | | <el-option label="忝ç»ä»¶" :value="3"></el-option> |
| | | </el-select> |
| | | </template> |
| | | <el-select v-model="edit.type" disabled placeholder="è¯·éæ©" style="width: 310px;"> |
| | | <el-option v-for="(a, ai) in bigType" :key="ai" :value="a"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">å·¥åº:</el-col> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">å·¥åº:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select v-model="edit.techFather" |
| | | placeholder="è¯·éæ©" |
| | | disabled |
| | | @change="workevent" |
| | | style="width: 310px;"> |
| | | <el-option |
| | | v-for="item in process" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | <el-select v-model="edit.techFather" placeholder="è¯·éæ©" disabled @change="workevent" style="width: 310px;"> |
| | | <el-option v-for="item in process" :key="item.name" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">å·¥èº:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select v-model="edit.techName" disabled placeholder="è¯·éæ©" style="width: 310px;"> |
| | | <el-option |
| | | v-for="item in craftapi" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | <el-select v-model="edit.techName" disabled placeholder="è¯·éæ©" style="width: 310px;"> |
| | | <el-option v-for="item in craftapi" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px;"> |
| | |
| | | </span> |
| | | </el-dialog> |
| | | <!-- æ°å¢å¼¹çª --> |
| | | <el-dialog title="çäº§è®°å½æ°å¢" :visible.sync="dialogVisible" :rules="Rules" |
| | | ref="ruleForm" width="35%"> |
| | | <el-dialog title="çäº§è®°å½æ°å¢" :visible.sync="dialogVisible" :rules="Rules" ref="ruleForm" width="35%"> |
| | | <div> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="ç±»å" prop="type"> |
| | | <template> |
| | | <el-select v-model="form.type" |
| | | @change="edittype" placeholder="è¯·éæ©" style="width: 100%;"> |
| | | <el-option label="æ©¡è¶è¿æ¥å¨" :value="0"></el-option> |
| | | <el-option label="éå±è¿æ¥å¨" :value="1"></el-option> |
| | | <el-option label="湿ææçµè¿æ¥å¨" :value="2"></el-option> |
| | | <el-option label="忝ç»ä»¶" :value="3"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åº" prop="work"> |
| | | <template> |
| | | <el-select v-model="form.work" |
| | | @change="workevent" |
| | | placeholder="è¯·éæ©" style="width: 100%;"> |
| | | <el-option |
| | | v-for="item in process" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥èºåç§°" prop="name"> |
| | | <template> |
| | | <el-select v-model="form.craft" placeholder="è¯·éæ©" style="width: 100%;"> |
| | | <el-option |
| | | v-for="item in craftapi" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="è®°å½" prop="record"> |
| | | <el-input v-model="form.record"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input v-model="form.remarks"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="åä½" prop="unit"> |
| | | <el-input v-model="form.unit"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å" prop="type"> |
| | | <template> |
| | | <el-select v-model="form.type" @change="edittype" placeholder="è¯·éæ©" style="width: 100%;"> |
| | | <el-option v-for="(a, ai) in bigType" :key="ai" :value="a"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åº" prop="work"> |
| | | <template> |
| | | <el-select v-model="form.work" @change="workevent" placeholder="è¯·éæ©" style="width: 100%;"> |
| | | <el-option v-for="item in process" :key="item.name" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥èºåç§°" prop="name"> |
| | | <template> |
| | | <el-select v-model="form.craft" placeholder="è¯·éæ©" style="width: 100%;"> |
| | | <el-option v-for="item in craftapi" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="è®°å½" prop="record"> |
| | | <el-input v-model="form.record"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input v-model="form.remarks"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="åä½" prop="unit"> |
| | | <el-input v-model="form.unit"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="add(form)">ç¡® å®</el-button> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- ä¿®æ¹å¼¹çª --> |
| | | <el-dialog title="å·¥åºç¼è¾" :visible.sync="modifyVisible" width="35%"> |
| | | <div> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="ç±»å"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="è¯·éæ©" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åº"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="è¯·éæ©" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥èºåç§°"> |
| | | <template> |
| | | <el-select v-model="value" placeholder="è¯·éæ©" style="width: 480px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="è®°å½"> |
| | | <el-input v-model="form.record"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input v-model="form.remarks"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="åä½"> |
| | | <el-input v-model="form.unit"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="modifyVisible = false">ç¡® å®</el-button> |
| | | <el-button @click="modifyVisible = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | export default { |
| | | data() { |
| | | var checktype = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('ç±»åä¸è½ä¸ºç©º')); |
| | | }else{ |
| | | if (!value) { |
| | | return callback(new Error('ç±»åä¸è½ä¸ºç©º')); |
| | | } else { |
| | | return callback |
| | | } |
| | | }; |
| | | return { |
| | | return { |
| | | search: { |
| | | type: 0, |
| | | technology: null |
| | | }, |
| | | options:[], |
| | | value:{}, |
| | | craftapi:[], |
| | | form:{ |
| | | type:'', |
| | | work:'', |
| | | craft:'', |
| | | name:'', |
| | | record:'', |
| | | remarks:'', |
| | | unit:'', |
| | | options: [], |
| | | value: {}, |
| | | craftapi: [], |
| | | form: { |
| | | type: '', |
| | | work: '', |
| | | craft: '', |
| | | name: '', |
| | | record: '', |
| | | remarks: '', |
| | | unit: '', |
| | | }, |
| | | Rules:{ |
| | | type:{validator:checktype,required:true,message:'ç±»åä¸è½ä¸ºç©º',trigger:'change'}, |
| | | work:{required:true,message:'å·¥åºä¸è½ä¸ºç©º',trigger:'change'}, |
| | | name:{required:true,message:'å·¥èºä¸è½ä¸ºç©º',trigger:'change'}, |
| | | record:{required:true,message:'è®°å½ä¸è½ä¸ºç©º',trigger:'blur'}, |
| | | unit:{required:true,message:'åä½ä¸è½ä¸ºç©º',trigger:'blur'}, |
| | | Rules: { |
| | | type: { |
| | | validator: checktype, |
| | | required: true, |
| | | message: 'ç±»åä¸è½ä¸ºç©º', |
| | | trigger: 'change' |
| | | }, |
| | | work: { |
| | | required: true, |
| | | message: 'å·¥åºä¸è½ä¸ºç©º', |
| | | trigger: 'change' |
| | | }, |
| | | name: { |
| | | required: true, |
| | | message: 'å·¥èºä¸è½ä¸ºç©º', |
| | | trigger: 'change' |
| | | }, |
| | | record: { |
| | | required: true, |
| | | message: 'è®°å½ä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | }, |
| | | unit: { |
| | | required: true, |
| | | message: 'åä½ä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | }, |
| | | }, |
| | | modifyVisible:false, |
| | | dialogVisible:false, |
| | | modifyVisible: false, |
| | | dialogVisible: false, |
| | | process: {}, |
| | | list: [], |
| | | tableData: [], |
| | | upIndex: 0, |
| | | selects: [], |
| | | delete:[], |
| | | typeselect:0, |
| | | delete: [], |
| | | typeselect: 0, |
| | | upDia: false, |
| | | checkTreeNode:{ |
| | | id:'', |
| | | checkTreeNode: { |
| | | id: '', |
| | | }, |
| | | upData:{ |
| | | name:'', |
| | | unit:'', |
| | | note:'', |
| | | upData: { |
| | | name: '', |
| | | unit: '', |
| | | note: '', |
| | | }, |
| | | edit:{ |
| | | name:'', |
| | | note:'', |
| | | techFather:'', |
| | | techName:'', |
| | | type:'', |
| | | unit:'', |
| | | edit: { |
| | | name: '', |
| | | note: '', |
| | | techFather: '', |
| | | techName: '', |
| | | type: '', |
| | | unit: '', |
| | | }, |
| | | bigType: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.selectAllleft() |
| | | this.selectjilu() |
| | | this.chooseType() |
| | | }, |
| | | methods: { |
| | | chooseType() { |
| | | this.$axios.get(this.$api.url.chooseType).then(res => { |
| | | this.bigType = res.data |
| | | this.typeselect = res.data[0] |
| | | this.search.type = res.data[0] |
| | | this.selectAllleft() |
| | | this.selectjilu() |
| | | }) |
| | | }, |
| | | delQueById() { |
| | | this.$axios.get(this.$api.url.delQueById,) |
| | | this.$axios.get(this.$api.url.delQueById, ) |
| | | }, |
| | | childrenClick() {}, |
| | | TYpe(val) { |
| | | this.typeselect = val |
| | | console.log(this.typeselect); |
| | | this.selectAllleft() |
| | | }, |
| | | this.typeselect = val |
| | | this.selectAllleft() |
| | | }, |
| | | edittype(val) { |
| | | this.typeselect = val |
| | | this.chooseTechFath() |
| | | }, |
| | | //æ°å¢ |
| | | workevent(val){ |
| | | console.log(val); |
| | | let idx = this.process.findIndex(el => el.name === val) |
| | | this.craftapi = this.process[idx].children |
| | | console.log( this.craftapi); |
| | | }, |
| | | workevent(val) { |
| | | let idx = this.process.findIndex(el => el.name === val) |
| | | this.craftapi = this.process[idx].children |
| | | }, |
| | | chooseTechFath() { |
| | | this.$axios.get(this.$api.url.chooseTechFath,{ |
| | | params:{type:this.typeselect} |
| | | }).then(res => { |
| | | this.process = res.data; |
| | | console.log(this.process); |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res =>{ |
| | | this.$axios.get(this.$api.url.chooseTechFath, { |
| | | params: { |
| | | type: this.typeselect |
| | | } |
| | | }).then(res => { |
| | | this.process = res.data; |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res => { |
| | | |
| | | }) |
| | | }) |
| | | }, |
| | | addRecord() { |
| | | this.$axios.post(this.$api.url.addRecord,{ |
| | | name:this.form.record, |
| | | note:this.form.remarks, |
| | | techTemId:this.form.craft, |
| | | unit:this.form.unit, |
| | | } |
| | | , { |
| | | this.$axios.post(this.$api.url.addRecord, { |
| | | name: this.form.record, |
| | | note: this.form.remarks, |
| | | techTemId: this.form.craft, |
| | | unit: this.form.unit, |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | } |
| | | ).then(res =>{ |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res => { |
| | | this.$message.success('æ·»å æå') |
| | | this.selectjilu() |
| | | }) |
| | | }, |
| | | add(formName) { |
| | | this.dialogVisible = false |
| | | this.addRecord() |
| | | // this.$refs[formName].validate((valid) => { |
| | | // if (valid) { |
| | | // alert('submit!'); |
| | | // } else { |
| | | // console.log('error submit!!'); |
| | | // return false; |
| | | // } |
| | | // }); |
| | | this.form = {}; |
| | | }, |
| | | query() { |
| | | this.selectAllleft() |
| | | }, |
| | | //主ä½å·¦ |
| | | selectAllleft() { |
| | | this.$axios.get(this.$api.url.selectAllleft,{ |
| | | params:{type:this.typeselect,message:this.search.technology} |
| | | }).then(res => { |
| | | this.list = res.data; |
| | | this.selectDataList() |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.list[0].children[0].name) // é»è®¤éä¸èç¹ç¬¬ä¸ä¸ª |
| | | }) |
| | | console.log("======="); |
| | | console.log(this.list); |
| | | let one=this.list.filter(item=>{ |
| | | return item.children.length>0 |
| | | })[0] |
| | | console.log(one); |
| | | let name=one.children[0].id |
| | | console.log(name); |
| | | this.checkTreeNode.id = name |
| | | this.selectjiluStart(name) |
| | | this.selectDataList(); |
| | | }); |
| | | //主ä½å·¦ |
| | | selectAllleft() { |
| | | this.$axios.get(this.$api.url.selectAllleft, { |
| | | params: { |
| | | type: this.typeselect, |
| | | message: this.search.technology |
| | | } |
| | | }).then(res => { |
| | | this.list = res.data; |
| | | this.selectDataList() |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.list[0].children[0].name) // é»è®¤éä¸èç¹ç¬¬ä¸ä¸ª |
| | | }) |
| | | let one = this.list.filter(item => { |
| | | return item.children.length > 0 |
| | | })[0] |
| | | let name = one.children[0].id |
| | | this.checkTreeNode.id = name |
| | | this.selectjiluStart(name) |
| | | this.selectDataList(); |
| | | }); |
| | | }, |
| | | //é»è®¤ |
| | | selectjiluStart(name) { |
| | | this.$axios.get(this.$api.url.selectjilu,{ |
| | | params:{id:name} |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | console.log(this.tableData); |
| | | }) |
| | | this.$axios.get(this.$api.url.selectjilu, { |
| | | params: { |
| | | id: name |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | }) |
| | | }, |
| | | //selectjilu checkTreeNode |
| | | selectjilu() { |
| | | console.log(this.checkTreeNode.id); |
| | | this.$axios.get(this.$api.url.selectjilu,{ |
| | | params:{id:this.checkTreeNode.id} |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | console.log(this.tableData); |
| | | }) |
| | | this.$axios.get(this.$api.url.selectjilu, { |
| | | params: { |
| | | id: this.checkTreeNode.id |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | }) |
| | | }, |
| | | modify(){ |
| | | this.modifyVisible = true |
| | | }, |
| | | addend(){ |
| | | modify() { |
| | | this.modifyVisible = true |
| | | }, |
| | | addend() { |
| | | this.dialogVisible = true |
| | | this.chooseTechFath() |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | remove(node, data) { |
| | | this.$confirm("æ¯å¦å é¤", "è¦å", { |
| | |
| | | this.upIndex++ |
| | | }, |
| | | handleNodeClick(data) { |
| | | if(data.code != '[2]') return |
| | | this.checkTreeNode = data |
| | | this.selectjilu() |
| | | if(data.code=='[3]'){ |
| | | console.log(data); |
| | | } |
| | | }, |
| | | nodeOpen(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened') |
| | |
| | | return el.id |
| | | }) |
| | | this.delete = cc.join(',') |
| | | console.log(this.delete); |
| | | this.delAllRecord() |
| | | this.$message.success('å é¤å®æ') |
| | | }, |
| | | //æ¹éå é¤ |
| | | delAllRecord() { |
| | | this.$axios.post(this.$api.url.delAllRecord,{ |
| | | ids:this.delete |
| | | this.$axios.post(this.$api.url.delAllRecord, { |
| | | ids: this.delete |
| | | }) |
| | | }, |
| | | |
| | | //å é¤ |
| | | delQueByIdapi() { |
| | | this.$axios.post(this.$api.url.delQueByIdapi,{ |
| | | id:this.upData.id |
| | | this.$axios.post(this.$api.url.delQueByIdapi, { |
| | | id: this.upData.id |
| | | }) |
| | | }, |
| | | deleteRow(index, rows) { |
| | | this.tableData.splice(index,1) |
| | | this.tableData.splice(index, 1) |
| | | this.upData.id = rows.id |
| | | this.delQueByIdapi() |
| | | // this.selectjilu() |
| | | }, |
| | | //ç¼è¾ |
| | | upContent(ob) { |
| | | this.upData = ob |
| | | // console.log(this.upData); |
| | | this.selecRecord() |
| | | // this.chooseTechFath() |
| | | this.upDia = true |
| | | }, |
| | | selecRecord() { |
| | | this.$axios.get(this.$api.url.selecRecord,{ |
| | | params:{ |
| | | id:this.upData.id |
| | | this.$axios.get(this.$api.url.selecRecord, { |
| | | params: { |
| | | id: this.upData.id |
| | | } |
| | | }).then(res => { |
| | | this.edit = res.data[0] |
| | | }) |
| | | }, |
| | | writeRecordById() { |
| | | // console.log(this.upData.id); |
| | | this.$axios.post(this.$api.url.writeRecordById + '?id=' + this.upData.id,{ |
| | | name:this.upData.name, |
| | | note:this.upData.note, |
| | | techTemId:this.edit.id, |
| | | unit:this.upData.unit |
| | | this.$axios.post(this.$api.url.writeRecordById + '?id=' + this.upData.id, { |
| | | name: this.upData.name, |
| | | note: this.upData.note, |
| | | techTemId: this.edit.id, |
| | | unit: this.upData.unit |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res => { |
| | | this.selectjilu() |
| | | }) |
| | |
| | | submitUpData() { |
| | | this.writeRecordById() |
| | | this.$message.success('ä¿®æ¹æå') |
| | | |
| | | this.upDia = false |
| | | // this.tableData.forEach(a => { |
| | | // if (a.id == this.upData.id) { |
| | | // a.name = this.upData.name |
| | | // a.unit = this.upData.unit |
| | | // a.thing = this.upData.thing |
| | | // } |
| | | // }) |
| | | // console.log(this.upData); |
| | | } |
| | | } |
| | | } |
| | |
| | | height: 30px; |
| | | border-radius: 2px; |
| | | } |
| | | </style> |
| | | |
| | | |
| | | </style> |
| | |
| | | <el-button type="success" @click="syncOrder" |
| | | :icon="isSync ? 'el-icon-loading' : 'el-icon-refresh'">忥</el-button> |
| | | <el-button type="primary" icon="el-icon-plus" @click="openAddDia">æ°å¢</el-button> |
| | | <!-- <el-button icon="el-icon-edit-outline">ä¿®æ¹</el-button> --> |
| | | <el-button icon="el-icon-delete" @click="delSales">å é¤</el-button> |
| | | <el-button icon="el-icon-download">导åº</el-button> |
| | | </el-col> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="order_number" label="订åç¼å·" width="150"> |
| | | </el-table-column> |
| | | <el-table-column label="订åç±»å" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-tag effect="dark" size="mini" style="font-size: 8px;">{{scope.row.order_type}}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="ååç¼å·" width="220"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="å·¥ç¨åç§°"> |
| | | <el-table-column prop="name" label="å·¥ç¨åç§°" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="proname" label="客æ·åç§°"> |
| | | <el-table-column prop="proname" label="客æ·åç§°" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="äº¤è´§æ¥æ" label="äº¤è´§æ¥æ" width="150"> |
| | | </el-table-column> |
| | | <el-table-column prop="note" label="夿³¨" width="150"> |
| | | <el-table-column prop="note" label="夿³¨" width="150" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="type" label="ç¶æ" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.type == 1">éè¿</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.type == 0">ä¸éè¿</span> |
| | | <span v-else>æªå®¡æ ¸</span> |
| | | <span v-else>{{null}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="220"> |
| | | <template slot-scope="scope"> |
| | | <span class="table_do" @click="changeShowDetail(scope.row)"> æ¥ç详æ
</span> |
| | | <span class="table_do" v-if="scope.row.type == null" @click="saleCheck(scope)"> å®¡æ ¸ </span> |
| | | <span class="table_do" v-if="scope.row.type == 2" @click="saleCheck(scope)"> å®¡æ ¸ </span> |
| | | <span class="table_do" v-else> </span> |
| | | <span class="table_do" v-if="scope.row.type == null" |
| | | <span class="table_do" v-if="scope.row.type == 2" |
| | | @click="openUpDia(scope.row.id)"> ç¼è¾ </span> |
| | | <span class="table_do" v-else> </span> |
| | | <span class="table_do" @click="delSale(scope.$index)"> å é¤ </span> |
| | |
| | | </el-dialog> |
| | | </div> |
| | | <div class="select-model"> |
| | | <el-dialog :title="`éå®${upDia == true ? 'ä¿®æ¹' : 'æ°å¢'}`" :visible.sync="addDia" width="850px" |
| | | <el-dialog :title="`éå®${upDia == true ? 'ä¿®æ¹' : 'æ°å¢'}`" :visible.sync="addDia" width="900px" |
| | | @close="closeDialog"> |
| | | <div class="body"> |
| | | <div class="head">åºæ¬ä¿¡æ¯</div> |
| | |
| | | <el-col :span="3">å·¥ç¨åç§°</el-col> |
| | | <el-col :span="8"> |
| | | <el-input v-model="addData.name" size="small" placeholder="请è¾å
¥å·¥ç¨åç§°" clearable></el-input> |
| | | </el-col> |
| | | <el-col :span="3" :offset="2">夿³¨</el-col> |
| | | <el-col :span="8"> |
| | | <el-input v-model="addData.note" size="small" placeholder="请è¾å
¥å¤æ³¨" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | placeholder="请è¾å
¥è§æ ¼åå·"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="åä½"> |
| | | <el-table-column prop="unit" label="åä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.unit" size="small" clearable placeholder="请è¾å
¥"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="number" label="æ°é"> |
| | | <el-table-column prop="number" label="æ°é" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model.number="scope.row.number" size="small" |
| | | @change="(val) => scope.row.number = isNaN(val) ? null : val" clearable |
| | | placeholder="请è¾å
¥"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="price" label="åä»·"> |
| | | <el-table-column prop="price" label="åä»·" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.price" size="small" clearable placeholder="请è¾å
¥"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="username" label="è系人"> |
| | | <el-table-column prop="username" label="è系人" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.username" size="small" clearable |
| | | placeholder="请è¾å
¥"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="phone" label="çµè¯"> |
| | | <el-table-column prop="phone" label="çµè¯" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.phone" size="small" clearable placeholder="请è¾å
¥"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="å°å"> |
| | | <el-table-column prop="address" label="å°å" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.address" size="small" clearable |
| | | placeholder="请è¾å
¥"></el-input> |
| | |
| | | orderNumber: null, |
| | | code: null, |
| | | name: null, |
| | | note: null, |
| | | proname: null, |
| | | adress: null, |
| | | username: null, |
| | |
| | | orderNumber: null, |
| | | code: null, |
| | | name: null, |
| | | note: null, |
| | | proname: null, |
| | | adress: null, |
| | | username: null, |
| | |
| | | } else { |
| | | for (var c in this.addData.saleMaterialList[b]) { |
| | | if (this.addData.saleMaterialList[b][c] == null || this.addData.saleMaterialList[b][c] == '' || Object |
| | | .keys(this.addData.saleMaterialList[b]).length != 6) { |
| | | .keys(this.addData.saleMaterialList[b]).length != 9) { |
| | | this.$message.error('产åä¿¡æ¯æå¿
填项æªå¡«å') |
| | | return |
| | | } |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="pq" label="ç产å®é¢(个/天)" :resizable="false"> |
| | | <el-table-column prop="pq" label="ç产æç(个/天)" :resizable="false"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.pq" |
| | | v-if="scope.row.dg != null" size="small" |
| | |
| | | <el-option :value="0" label="å·¥èºè·¯çº¿"></el-option> |
| | | <el-option :value="1" label="ææ¯ææ "></el-option> |
| | | <el-option :value="2" label="ç©ææ¸
å"></el-option> |
| | | <el-option :value="3" label="ç产工èº"></el-option> |
| | | <!-- <el-option :value="3" label="ç产工èº"></el-option> --> |
| | | </el-select> |
| | | <span>çæ¬ï¼</span> |
| | | <el-select v-model="versionVal" @change="verevent" size="small" style="width: 13vw;margin-right: 15px;" placeholder="è¯·éæ©"> |
| | |
| | | <style scoped> |
| | | .title .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | .title .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | |
| | | .title { |
| | | margin-bottom: 10px; |
| | | padding: 0 20px; |
| | | } |
| | | .title { |
| | | margin-bottom: 10px; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | .title * { |
| | | font-size: 16px; |
| | | } |
| | | .title * { |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .choose { |
| | | padding: 21px 24px; |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | border-bottom: 3px solid rgb(245, 247, 251); |
| | | } |
| | | .choose { |
| | | padding: 21px 24px; |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | border-bottom: 3px solid rgb(245, 247, 251); |
| | | } |
| | | |
| | | .choose * { |
| | | font-size: 14px; |
| | | } |
| | | .choose * { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .choose .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | .choose .el-button { |
| | | height: 32px; |
| | | border: 1px solid rgba(190, 190, 190, 0.44); |
| | | box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); |
| | | padding: 0 12px; |
| | | } |
| | | |
| | | .thing { |
| | | width: 100%; |
| | | height: calc(100% - 120px); |
| | | background-color: #fff; |
| | | display: flex; |
| | | } |
| | | .thing { |
| | | width: 100%; |
| | | height: calc(100% - 120px); |
| | | background-color: #fff; |
| | | display: flex; |
| | | } |
| | | |
| | | .thing .left { |
| | | width: 295px; |
| | | height: calc(100% - 20px); |
| | | border-right: 3px solid rgb(245, 247, 251); |
| | | padding: 16px; |
| | | overflow-y: auto; |
| | | } |
| | | .thing .left { |
| | | width: 295px; |
| | | height: calc(100% - 20px); |
| | | border-right: 3px solid rgb(245, 247, 251); |
| | | padding: 16px; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .thing .left .custom-tree-node span { |
| | | font-size: 14px; |
| | | } |
| | | .thing .left .custom-tree-node span { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .thing .left .custom-tree-node { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | font-size: 14px; |
| | | padding-right: 8px; |
| | | } |
| | | .thing .left .custom-tree-node { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | font-size: 14px; |
| | | padding-right: 8px; |
| | | } |
| | | |
| | | .node_i { |
| | | color: orange; |
| | | } |
| | | .node_i { |
| | | color: orange; |
| | | } |
| | | |
| | | .el-icon-delete { |
| | | display: none; |
| | | color: #004ea2; |
| | | } |
| | | .el-icon-delete { |
| | | display: none; |
| | | color: #004ea2; |
| | | } |
| | | |
| | | .custom-tree-node:hover .el-icon-delete { |
| | | display: inline; |
| | | } |
| | | .custom-tree-node:hover .el-icon-delete { |
| | | display: inline; |
| | | } |
| | | |
| | | .thing .right { |
| | | width: calc(100% - 305px); |
| | | height: calc(100% - 25px); |
| | | overflow: hidden; |
| | | padding: 10px; |
| | | } |
| | | .thing .right { |
| | | width: calc(100% - 305px); |
| | | height: calc(100% - 25px); |
| | | overflow: hidden; |
| | | padding: 10px; |
| | | } |
| | | |
| | | .table_do { |
| | | color: #004ea0; |
| | | cursor: pointer; |
| | | } |
| | | .table_do { |
| | | color: #004ea0; |
| | | cursor: pointer; |
| | | } |
| | | </style> |
| | | <style> |
| | | .record_content .title .el-button * { |
| | | font-size: 14px; |
| | | } |
| | | .record_content .title .el-button * { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .record_content .title .el-button--default { |
| | | color: #004ea2; |
| | | } |
| | | .record_content .title .el-button--default { |
| | | color: #004ea2; |
| | | } |
| | | |
| | | .record_content |
| | | .thing |
| | | .left |
| | | .el-tree--highlight-current |
| | | .el-tree-node.is-current |
| | | > .el-tree-node__content { |
| | | background: rgba(58, 124, 253, 0.2); |
| | | color: #004ea2; |
| | | } |
| | | .record_content .thing .left .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content { |
| | | background: rgba(58, 124, 253, 0.2); |
| | | color: #004ea2; |
| | | } |
| | | |
| | | .record_content .el-tree-node__content { |
| | | height: 30px; |
| | | border-radius: 2px; |
| | | } |
| | | .record_content .el-tree-node__content { |
| | | height: 30px; |
| | | border-radius: 2px; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | | <div class="record_content"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px">å·¥èºè·¯çº¿ç»´æ¤</el-col> |
| | | <el-col :span="12" style="text-align: right"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | style="background: #004ea2" |
| | | @click="addend" |
| | | >æ°å¢</el-button |
| | | > |
| | | <!-- <el-button icon="el-icon-edit-outline" @click="modify">ä¿®æ¹</el-button> --> |
| | | <el-button icon="el-icon-delete" @click="dels">å é¤</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="choose"> |
| | | <span>ç±»åï¼</span> |
| | | <el-select |
| | | v-model="search.type" |
| | | size="small" |
| | | placeholder="è¯·éæ©" |
| | | @change="type" |
| | | style="width: 224px; margin-right: 30px" |
| | | > |
| | | <el-option label="æ©¡è¶è¿æ¥å¨" :value="0"></el-option> |
| | | <el-option label="éå±è¿æ¥å¨" :value="1"></el-option> |
| | | <el-option label="湿ææçµè¿æ¥å¨" :value="2"></el-option> |
| | | <el-option label="忝ç»ä»¶" :value="3"></el-option> |
| | | </el-select> |
| | | <!-- <span>å·¥åºï¼</span> |
| | | <el-select v-model="search.name" size="small" placeholder="è¯·éæ©" style="width: 224px;margin-right: 30px;"> |
| | | <el-option v-for="(a, ai) in process" key="ai" :label="a.name" :value="a.id"></el-option> |
| | | <div class="record_content"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12" style="line-height: 32px">å·¥èºè·¯çº¿ç»´æ¤</el-col> |
| | | <el-col :span="12" style="text-align: right"> |
| | | <el-button type="primary" icon="el-icon-plus" style="background: #004ea2" @click="addend">æ°å¢</el-button> |
| | | <el-button icon="el-icon-delete" @click="dels">å é¤</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="choose"> |
| | | <span>ç±»åï¼</span> |
| | | <el-select v-model="search.type" size="small" placeholder="è¯·éæ©" @change="type" |
| | | style="width: 224px; margin-right: 30px"> |
| | | <el-option v-for="(a, ai) in bigType" :key="ai" :value="a"></el-option> |
| | | </el-select> |
| | | <span>设å¤ç»ï¼</span> |
| | | <el-select v-model="search.name" size="small" placeholder="è¯·éæ©" style="width: 224px;margin-right: 30px;"> |
| | | <el-option v-for="(a, ai) in product" key="ai" :label="a.name" :value="a.id"></el-option> |
| | | </el-select> --> |
| | | <!-- <el-button size="mini" @click="clean()"><span>é ç½®</span></el-button> |
| | | <el-button size="mini" type="primary" style="background: #004EA2;"><span>æ¥ |
| | | 询</span></el-button> --> |
| | | </div> |
| | | <div class="thing"> |
| | | <div class="left"> |
| | | <el-input |
| | | v-model="search.technology" |
| | | suffix-icon="el-icon-search" |
| | | placeholder="请è¾å
¥æç´¢å
容" |
| | | size="small" |
| | | clearable |
| | | @input="query" |
| | | > |
| | | <!-- clearable @input="(val)=>$refs.tree.filter(val)"> --> |
| | | </el-input> |
| | | <el-tree |
| | | :data="towTree" |
| | | ref="tree" |
| | | :props="{ children: 'children', label: 'father' }" |
| | | node-key="father" |
| | | default-expand-all |
| | | @node-click="handleNodeClick" |
| | | :key="upIndex" |
| | | highlight-current |
| | | > |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span |
| | | ><i |
| | | :class="`node_i ${ |
| | | </div> |
| | | <div class="thing"> |
| | | <div class="left"> |
| | | <el-input v-model="search.technology" suffix-icon="el-icon-search" placeholder="请è¾å
¥æç´¢å
容" size="small" clearable |
| | | @input="query"> |
| | | </el-input> |
| | | <el-tree :data="towTree" ref="tree" :props="{ children: 'children', label: 'father' }" node-key="father" |
| | | default-expand-all @node-click="handleNodeClick" :key="upIndex" highlight-current style="padding-top: 8px;"> |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span><i :class="`node_i ${ |
| | | data.code != '[2]' |
| | | ? 'el-icon-folder-opened' |
| | | : 'el-icon-tickets' |
| | | }`" |
| | | ></i> |
| | | {{ data.father }}</span |
| | | > |
| | | <!-- <el-button type="text" size="mini" @click.stop="remove(node, data)"> |
| | | <i class="el-icon-delete"></i> |
| | | </el-button> --> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <div class="right"> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | style="width: 100%; overflow-y: auto; min-height: 100%" |
| | | max-height="100%" |
| | | @selection-change="handleSelectionChange" |
| | | default-expand-all |
| | | > |
| | | <el-table-column type="selection" width="50"> </el-table-column> |
| | | <el-table-column type="index" label="åºå·" width="70"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="å·¥èºåç§°"> </el-table-column> |
| | | <el-table-column prop="device_group" label="设å¤ç»"> |
| | | </el-table-column> |
| | | <el-table-column label="å
ä»¶"> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="info" style="margin-right: 10px;" v-for="(a, index) in JSON.parse(scope.row.element)" :key="index">{{ a }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="130"> |
| | | <template slot-scope="scope"> |
| | | <span class="table_do" @click="upContent(scope.row)" |
| | | >ç¼è¾ </span |
| | | > |
| | | <span class="table_do" @click="deleteRow(scope.$index, scope.row)" |
| | | >å é¤</span |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <el-dialog title="ç¼è¾è®°å½å
容" :visible.sync="upDia" width="500px"> |
| | | <div class="body"> |
| | | <el-row style="line-height: 46px"> |
| | | <el-col :span="4" style="font-size: 14px; text-align: right" |
| | | >ç±»å:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select |
| | | v-model="edit.type" |
| | | placeholder="è¯·éæ©" |
| | | disabled |
| | | style="width: 310px" |
| | | > |
| | | <el-option label="æ©¡è¶è¿æ¥å¨" :value="0"></el-option> |
| | | <el-option label="éå±è¿æ¥å¨" :value="1"></el-option> |
| | | <el-option label="湿ææçµè¿æ¥å¨" :value="2"></el-option> |
| | | <el-option label="忝ç»ä»¶" :value="3"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px"> |
| | | <el-col :span="4" style="font-size: 14px; text-align: right" |
| | | >å·¥åº:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <el-select |
| | | v-model="edit.father" |
| | | style="width: 310px" |
| | | disabled |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in procedure" |
| | | :key="item" |
| | | :label="item" |
| | | disabled |
| | | :value="item" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px"> |
| | | <el-col :span="4" style="font-size: 14px; text-align: right" |
| | | >å
ä»¶:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="cell" |
| | | placeholder="请è¾å
¥å
ä»¶åç§°" |
| | | style="width: 200px"> |
| | | </el-input> |
| | | <!-- <el-select |
| | | v-model="cell" |
| | | style="width: 310px" |
| | | disabled |
| | | multiple |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in element" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> --> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px"> |
| | | <el-col :span="4" style="font-size: 14px; text-align: right" |
| | | >å·¥èºåç§°:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="edit.name" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row style="line-height: 46px"> |
| | | <el-col :span="4" style="font-size: 14px; text-align: right" |
| | | >设å¤ç»:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <!-- <el-input |
| | | v-model="upData.device_group" |
| | | size="small" |
| | | clearable |
| | | ></el-input> --> |
| | | <template> |
| | | <el-select |
| | | v-model="upData.device_group" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 306px" |
| | | > |
| | | <el-option |
| | | v-for="item in equipment" |
| | | :key="item.index" |
| | | :label="item.father" |
| | | :value="item.father" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitUpData">ç¡® å®</el-button> |
| | | <el-button @click="upDia = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- å·¥èºè·¯çº¿æ°å¢ --> |
| | | <el-dialog title="å·¥èºè·¯çº¿æ°å¢" :visible.sync="dialogVisible" width="35%"> |
| | | <div> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="ç±»å"> |
| | | <template> |
| | | <el-select |
| | | v-model="form.type" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | @change="edittype" |
| | | > |
| | | <el-option label="æ©¡è¶è¿æ¥å¨" :value="0"></el-option> |
| | | <el-option label="éå±è¿æ¥å¨" :value="1"></el-option> |
| | | <el-option label="湿ææçµè¿æ¥å¨" :value="2"></el-option> |
| | | <el-option label="忝ç»ä»¶" :value="3"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åº"> |
| | | <template> |
| | | <el-select |
| | | v-model="form.father" |
| | | allow-create |
| | | filterable |
| | | @create="" |
| | | |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in procedure" |
| | | :key="item" |
| | | :label="item" |
| | | :value="item" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤ç»"> |
| | | <template> |
| | | <el-select |
| | | v-model="form.deviceGroup" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in equipment" |
| | | :key="item.index" |
| | | :label="item.father" |
| | | :value="item.father" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
ä»¶"> |
| | | <template> |
| | | <el-input v-model="form.elementId" placeholder="请è¾å
¥å
ä»¶åç§°" style="width: 100%"></el-input> |
| | | <!-- <el-select |
| | | v-model="form.elementId" |
| | | multiple |
| | | placeholder="è¯·éæ©" |
| | | style="width: 200px" |
| | | > |
| | | <el-option |
| | | v-for="item in element" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> --> |
| | | </template> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å·¥èºåç§°"> |
| | | <el-input placeholder="请è¾å
¥å·¥èºåç§°" v-model="form.name" style="width: 100%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="Neworder">ç¡® å®</el-button> |
| | | <el-button @click="Deleteapi">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- å·¥èºè·¯çº¿ä¿®æ¹ --> |
| | | <el-dialog title="å·¥èºè·¯çº¿æ°å¢" :visible.sync="modifyevent" width="35%"> |
| | | <div> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="ç±»å"> |
| | | <template> |
| | | <el-select |
| | | v-model="value" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 480px" |
| | | > |
| | | <!-- <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item." |
| | | :value="item.value"> |
| | | </el-option> --> |
| | | <el-option label="æ©¡è¶è¿æ¥å¨" :value="0"></el-option> |
| | | <el-option label="éå±è¿æ¥å¨" :value="1"></el-option> |
| | | <el-option label="湿ææçµè¿æ¥å¨" :value="2"></el-option> |
| | | <el-option label="忝ç»ä»¶" :value="3"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åº"> |
| | | <template> |
| | | <el-select |
| | | v-model="value" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 480px" |
| | | > |
| | | <el-option |
| | | v-for="item in procedure" |
| | | :key="item.value" |
| | | :label="item.j" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="10"> |
| | | <el-form-item label="å·¥èºåç§°"> |
| | | <template> |
| | | <el-select |
| | | v-model="value" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 200px" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10" :offset="2"> |
| | | <el-form-item label="å
ä»¶"> |
| | | <el-input v-model="form.name" style="width: 200px"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="modifyevent = false">ç¡® å®</el-button> |
| | | <el-button @click="modifyevent = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | }`"></i> |
| | | {{ data.father }}</span> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <div class="right"> |
| | | <el-table :data="tableData" border style="width: 100%; overflow-y: auto; min-height: 100%" max-height="100%" |
| | | @selection-change="handleSelectionChange" default-expand-all> |
| | | <el-table-column type="selection" width="50"> </el-table-column> |
| | | <el-table-column type="index" label="åºå·" width="70"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="å·¥èºåç§°"> </el-table-column> |
| | | <el-table-column prop="device_group" label="设å¤ç»"> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="130"> |
| | | <template slot-scope="scope"> |
| | | <span class="table_do" @click="upContent(scope.row)">ç¼è¾ </span> |
| | | <span class="table_do" @click="deleteRow(scope.$index, scope.row)">å é¤</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <el-dialog title="ç¼è¾å·¥èºä¿¡æ¯" :visible.sync="upDia" width="500px"> |
| | | <div class="body"> |
| | | <el-row style="line-height: 46px"> |
| | | <el-col :span="4" style="font-size: 14px; text-align: right">ç±»å:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select v-model="edit.type" placeholder="è¯·éæ©" disabled style="width: 310px"> |
| | | <el-option v-for="(a, ai) in bigType" :key="ai" :value="a"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px"> |
| | | <el-col :span="4" style="font-size: 14px; text-align: right">å·¥åº:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-select v-model="edit.father" style="width: 310px" disabled placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in procedure" :key="item" :label="item" disabled :value="item"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px"> |
| | | <el-col :span="4" style="font-size: 14px; text-align: right">å·¥èºåç§°:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="edit.name" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px"> |
| | | <el-col :span="4" style="font-size: 14px; text-align: right">设å¤ç»:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select v-model="upData.device_group" placeholder="è¯·éæ©" style="width: 306px"> |
| | | <el-option v-for="item in equipment" :key="item.index" :label="item.father" :value="item.father"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitUpData">ç¡® å®</el-button> |
| | | <el-button @click="upDia = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- å·¥èºè·¯çº¿æ°å¢ --> |
| | | <el-dialog title="å·¥èºè·¯çº¿æ°å¢" :visible.sync="dialogVisible" width="35%"> |
| | | <div> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="ç±»å"> |
| | | <template> |
| | | <el-select v-model="form.type" allow-create filterable placeholder="è¯·éæ©" style="width: 100%" |
| | | @change="edittype"> |
| | | <el-option v-for="(a,ai) in bigType" :key="ai" :value="a"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åº"> |
| | | <template> |
| | | <el-select v-model="form.father" allow-create filterable @create="" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="item in procedure" :key="item" :label="item" :value="item"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤ç»"> |
| | | <template> |
| | | <el-select v-model="form.deviceGroup" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="item in equipment" :key="item.index" :label="item.father" :value="item.father"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="å·¥èºåç§°"> |
| | | <el-input placeholder="请è¾å
¥å·¥èºåç§°" v-model="form.name" style="width: 100%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="Neworder">ç¡® å®</el-button> |
| | | <el-button @click="Deleteapi">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | search: { |
| | | type: 0, |
| | | technology: null, |
| | | }, |
| | | options: {}, |
| | | form: { |
| | | type: "", |
| | | father: "", |
| | | name: "", |
| | | elementId: "", |
| | | deviceGroup: "", |
| | | }, |
| | | // search: { |
| | | // type: "", |
| | | // }, |
| | | delete: [], |
| | | treetrunk: [], |
| | | process: [], |
| | | product: [], |
| | | procedure: [], |
| | | checkTreeNode: { |
| | | name: "", |
| | | }, |
| | | towTree: [], |
| | | value: "", |
| | | modifyevent: false, |
| | | dialogVisible: false, |
| | | tableData: [], |
| | | upIndex: 0, |
| | | selects: [], |
| | | upDia: false, |
| | | element: [], |
| | | equipment: [0], |
| | | cell:[], |
| | | AAA: [ |
| | | { |
| | | id: "", |
| | | }, |
| | | ], |
| | | edit: { |
| | | deviceGroup: "", |
| | | father: "", |
| | | name: "", |
| | | type: "", |
| | | children:[], |
| | | }, |
| | | upData: { |
| | | name: "", |
| | | deviceGroup: "", |
| | | ele: "", |
| | | father: "", |
| | | type: "", |
| | | }, |
| | | typeselect: 0, |
| | | newdata: { |
| | | type: "", |
| | | }, |
| | | upIndex: 0, |
| | | treeList:[], |
| | | elerow:{}, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.selectAllTechTem(); |
| | | |
| | | this.selectAllTechNam(); |
| | | console.log(this.treeList); |
| | | |
| | | }, |
| | | methods: { |
| | | selectDataList() { |
| | | this.towTree.forEach((a) => { |
| | | a.code = "[1]"; |
| | | if (a.children != undefined) { |
| | | a.children.forEach((b) => { |
| | | b.code = "[2]"; |
| | | }); |
| | | } |
| | | }); |
| | | this.upIndex++; |
| | | }, |
| | | type(val) { |
| | | this.typeselect = val; |
| | | this.upData.type = val; |
| | | console.log(this.typeselect); |
| | | this.selectAllTechTem(); |
| | | }, |
| | | export default { |
| | | data() { |
| | | return { |
| | | search: { |
| | | type: '', |
| | | technology: null, |
| | | }, |
| | | options: {}, |
| | | form: { |
| | | type: "", |
| | | father: "", |
| | | name: "", |
| | | elementId: "", |
| | | deviceGroup: "", |
| | | }, |
| | | delete: [], |
| | | treetrunk: [], |
| | | process: [], |
| | | product: [], |
| | | procedure: [], |
| | | checkTreeNode: { |
| | | name: "", |
| | | }, |
| | | towTree: [], |
| | | value: "", |
| | | modifyevent: false, |
| | | dialogVisible: false, |
| | | tableData: [], |
| | | upIndex: 0, |
| | | selects: [], |
| | | upDia: false, |
| | | element: [], |
| | | equipment: [0], |
| | | cell: [], |
| | | AAA: [{ |
| | | id: "", |
| | | }, ], |
| | | edit: { |
| | | deviceGroup: "", |
| | | father: "", |
| | | name: "", |
| | | type: "", |
| | | children: [], |
| | | }, |
| | | upData: { |
| | | name: "", |
| | | deviceGroup: "", |
| | | ele: "", |
| | | father: "", |
| | | type: "", |
| | | }, |
| | | typeselect: '', |
| | | newdata: { |
| | | type: "", |
| | | }, |
| | | upIndex: 0, |
| | | treeList: [], |
| | | elerow: {}, |
| | | bigType: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.chooseType() |
| | | }, |
| | | methods: { |
| | | chooseType() { |
| | | this.$axios.get(this.$api.url.chooseType).then(res => { |
| | | this.bigType = res.data |
| | | this.typeselect = res.data[0] |
| | | this.search.type = res.data[0] |
| | | this.selectAllTechTem(); |
| | | this.selectAllTechNam(); |
| | | }) |
| | | }, |
| | | selectDataList() { |
| | | this.towTree.forEach((a) => { |
| | | a.code = "[1]"; |
| | | if (a.children != undefined) { |
| | | a.children.forEach((b) => { |
| | | b.code = "[2]"; |
| | | }); |
| | | } |
| | | }); |
| | | this.upIndex++; |
| | | }, |
| | | type(val) { |
| | | this.typeselect = val; |
| | | this.upData.type = val; |
| | | console.log(this.typeselect); |
| | | this.selectAllTechTem(); |
| | | }, |
| | | |
| | | Neworder() { |
| | | this.dialogVisible = false; |
| | | this.addTechTemp(); |
| | | this.form = {}; |
| | | }, |
| | | Deleteapi() { |
| | | this.dialogVisible = false; |
| | | this.form = {}; |
| | | }, |
| | | addTechTemp() { |
| | | console.log(this.form.elementId.split(',')); |
| | | |
| | | this.$axios |
| | | .post( |
| | | this.$api.url.addTechTemp, |
| | | { |
| | | deviceGroup: this.form.deviceGroup, |
| | | // elementId: JSON.stringify(this.form.elementId).replace("[","").replace("]",""), |
| | | // element:this.form.elementId.split(','), |
| | | element:JSON.stringify(this.form.elementId.split(',')), |
| | | father: this.form.father, |
| | | name: this.form.name, |
| | | type: this.form.type, |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | console.log(res); |
| | | /* this.selectAllTechNam(); */ |
| | | this.form = {}; |
| | | this.$parent.removeAllTab() |
| | | }); |
| | | }, |
| | | |
| | | //å
ä»¶ |
| | | // chooseElement() { |
| | | // this.$axios.get(this.$api.url.chooseElement).then((res) => { |
| | | // this.element = res.data; |
| | | // console.log(this.element); |
| | | // }); |
| | | // }, |
| | | //è®¾å¤ |
| | | chooseDevGroup() { |
| | | this.$axios.get(this.$api.url.chooseDevGroup).then((res) => { |
| | | this.equipment = res.data; |
| | | // console.log(this.equipment); |
| | | }); |
| | | }, |
| | | // onTypeBlur(e) { |
| | | // if (e.target.value) { |
| | | // this.type = e.target.value;}}, |
| | | //å·¥åº |
| | | chooseTech() { |
| | | this.$axios.get(this.$api.url.chooseTech,{ |
| | | params:{ |
| | | type:this.typeselect |
| | | } |
| | | }).then(res =>{ |
| | | console.log(res); |
| | | this.procedure = res.data |
| | | }) |
| | | }, |
| | | edittype(val) { |
| | | Neworder() { |
| | | this.dialogVisible = false; |
| | | this.addTechTemp(); |
| | | this.form = {}; |
| | | }, |
| | | Deleteapi() { |
| | | this.dialogVisible = false; |
| | | this.form = {}; |
| | | }, |
| | | addTechTemp() { |
| | | this.$axios |
| | | .post( |
| | | this.$api.url.addTechTemp, { |
| | | deviceGroup: this.form.deviceGroup, |
| | | father: this.form.father, |
| | | name: this.form.name, |
| | | type: this.form.type, |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | console.log(res); |
| | | this.form = {}; |
| | | this.$parent.removeAllTab() |
| | | }); |
| | | }, |
| | | //è®¾å¤ |
| | | chooseDevGroup() { |
| | | this.$axios.get(this.$api.url.chooseDevGroup).then((res) => { |
| | | this.equipment = res.data; |
| | | }); |
| | | }, |
| | | //å·¥åº |
| | | chooseTech() { |
| | | this.$axios.get(this.$api.url.chooseTech, { |
| | | params: { |
| | | type: this.typeselect |
| | | } |
| | | }).then(res => { |
| | | this.procedure = res.data |
| | | }) |
| | | }, |
| | | edittype(val) { |
| | | this.typeselect = val |
| | | this.chooseTech() |
| | | }, |
| | | //æ¹éå é¤ |
| | | delAllTech() { |
| | | console.log(this.delete); |
| | | this.$axios.post(this.$api.url.delAllTech, { |
| | | ids: this.delete, |
| | | }).then(res=>{ |
| | | this.$parent.removeAllTab() |
| | | }); |
| | | }, |
| | | //å é¤ |
| | | delTechById() { |
| | | console.log(this.$api.url.delTechById, this.upData.id); |
| | | this.$axios.post(this.$api.url.delTechById, { |
| | | id: this.upData.id, |
| | | }).then(res=>{ |
| | | this.$parent.removeAllTab() |
| | | }); |
| | | }, |
| | | //ç¼è¾ |
| | | writeTechById() { |
| | | // console.log(JSON.stringify(this.edit.children)); |
| | | // console.log(JSON.stringify(this.edit.children)); |
| | | // var str = '' |
| | | // this.edit.children.forEach((a,ai)=>{ |
| | | // str += a.id |
| | | // if(ai!=this.edit.children.length-1) str+=',' |
| | | // }) |
| | | this.$axios |
| | | .post( |
| | | this.$api.url.writeTechById + `?id=${this.upData.id}`, |
| | | { |
| | | deviceGroup: this.upData.device_group, |
| | | element:JSON.stringify(this.cell.split(',')), |
| | | // element:JSON.stringify(this.form.elementId.split(',')) |
| | | father: this.edit.father, |
| | | name: this.edit.name, |
| | | type: this.edit.type |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | /* this.selectAllTechNam(), */ |
| | | this.$parent.removeAllTab() |
| | | }); |
| | | }, |
| | | |
| | | query(val) { |
| | | this.selectAllTechTem(); |
| | | }, |
| | | selectAllTechTem() { |
| | | this.$axios |
| | | .get(this.$api.url.selectAllTechTem, { |
| | | params: { type: this.typeselect, message: this.search.technology }, |
| | | }) |
| | | .then((res) => { |
| | | this.towTree = res.data; |
| | | console.log(this.towTree); |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.towTree[0].father) // é»è®¤éä¸èç¹ç¬¬ä¸ä¸ª |
| | | }) |
| | | // let one=this.towTree.filter(item=>{ |
| | | // return item.children.length>0 |
| | | // })[0] |
| | | // let name=one.children[0].name |
| | | // this.checkTreeNode.name=name |
| | | // this.selectAllTechNamStart(name) |
| | | // this.selectDataList(); |
| | | let one=this.towTree[0] |
| | | let name =one.father |
| | | this.checkTreeNode.father = name |
| | | console.log(name); |
| | | this.selectAllTechNamStart(name) |
| | | }); |
| | | }, |
| | | handleNodeClick(data, node) { |
| | | console.log(data); |
| | | this.checkTreeNode = data; |
| | | // this.treetrunk = node; |
| | | // console.log(this.treetrunk); |
| | | // console.log(this.checkTreeNode); |
| | | this.selectAllTechNam(); |
| | | |
| | | }, |
| | | selectAllTechNam() { |
| | | this.$axios |
| | | .get(this.$api.url.selectAllTechNam, { |
| | | params: { father: this.checkTreeNode.father }, |
| | | }) |
| | | .then((res) => { |
| | | this.tableData = res.data; |
| | | |
| | | let kk =this.tableData.map(el =>{ |
| | | console.log(el); |
| | | return el.element |
| | | })[0] |
| | | // console.log(kk.replace('[','').replace(']','') ); |
| | | // console.log(kk.split(',')); |
| | | this.elerow = kk |
| | | |
| | | }); |
| | | }, |
| | | selectAllTechNamStart(name) { |
| | | this.$axios |
| | | .get(this.$api.url.selectAllTechNam, { |
| | | params: { father: name }, |
| | | }) |
| | | .then((res) => { |
| | | this.tableData = res.data; |
| | | }); |
| | | }, |
| | | addend() { |
| | | this.dialogVisible = true; |
| | | this.chooseTech(); |
| | | this.chooseDevGroup(); |
| | | // this.chooseElement(); |
| | | }, |
| | | modify() { |
| | | this.modifyevent = true; |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | remove(node, data) { |
| | | this.$confirm("æ¯å¦å é¤", "è¦å", { |
| | | type: "warning", |
| | | }) |
| | | .then((res) => { |
| | | const parent = node.parent; |
| | | const children = parent.data.children || parent.data; |
| | | const index = children.findIndex((d) => d.id === data.id); |
| | | children.splice(index, 1); |
| | | }) |
| | | .catch((e) => {}); |
| | | }, |
| | | // selectDataList() { |
| | | // this.list.forEach(a => { |
| | | // a.code = '[1]' |
| | | // if (a.children != undefined) { |
| | | // a.children.forEach(b => { |
| | | // b.code = '[2]' |
| | | // }) |
| | | // } |
| | | // }) |
| | | // this.upIndex++ |
| | | // }, |
| | | |
| | | nodeOpen(data, node, el) { |
| | | $($(el.$el).find(".node_i")[0]).attr( |
| | | "class", |
| | | "node_i el-icon-folder-opened" |
| | | ); |
| | | }, |
| | | nodeClose(data, node, el) { |
| | | $($(el.$el).find(".node_i")[0]).attr("class", "node_i el-icon-folder"); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selects = val; |
| | | }, |
| | | dels() { |
| | | this.selects.forEach((a) => { |
| | | for (var b = 0; b < this.tableData.length; b++) { |
| | | if (this.tableData[b].id == a.id) { |
| | | this.tableData.splice(b, 1); |
| | | b--; |
| | | } |
| | | } |
| | | }); |
| | | let cc = this.selects.map((el) => { |
| | | return el.id; |
| | | }); |
| | | this.delete = cc.join(","); |
| | | console.log(this.delete); |
| | | this.delAllTech(); |
| | | this.$message.success("å é¤å®æ"); |
| | | }, |
| | | deleteRow(index, rows) { |
| | | this.tableData.splice(index, 1); |
| | | this.upData.id = rows.id; |
| | | this.delTechById(); |
| | | }, |
| | | selecTechById() { |
| | | this.$axios |
| | | .get(this.$api.url.selecTechById, { |
| | | params: { |
| | | id: this.upData.id, |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | this.edit = res.data[0]; |
| | | this.cell = this.edit.element |
| | | console.log(this.cell); |
| | | let cc = JSON.parse(this.cell).join(",") |
| | | console.log(cc); |
| | | this.cell = cc |
| | | console.log(this.cell); |
| | | // this.cell = this.edit.children.map(el => { |
| | | // return el.id |
| | | // }) |
| | | // this.cell = this.cell.join(',') |
| | | // this.cell = nn |
| | | // console.log(this.cell); |
| | | |
| | | |
| | | |
| | | // let cc = this.edit.element.join(", ") |
| | | // let str = cc.join(", "); |
| | | // let cc = JSON.parse(this.edit.element) |
| | | // console.log(cc); |
| | | // console.log(gg); |
| | | // console.log(json.parse(gg)); |
| | | |
| | | }); |
| | | }, |
| | | //ç¼è¾å
容 |
| | | upContent(ob) { |
| | | this.upData = ob; |
| | | this.chooseDevGroup(); |
| | | this.selecTechById() |
| | | this.upDia = true; |
| | | }, |
| | | |
| | | submitUpData() { |
| | | // this.tableData.forEach(a => { |
| | | // if (a.id == this.upData.id) { |
| | | // a.name = this.upData.name |
| | | // a.ask = this.upData.device_group |
| | | // } |
| | | // }) |
| | | this.writeTechById(); |
| | | this.$message.success("ä¿®æ¹æå"); |
| | | this.upIndex++; |
| | | this.upDia = false; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | //æ¹éå é¤ |
| | | delAllTech() { |
| | | this.$axios.post(this.$api.url.delAllTech, { |
| | | ids: this.delete, |
| | | }).then(res => { |
| | | this.$parent.removeAllTab() |
| | | }); |
| | | }, |
| | | //å é¤ |
| | | delTechById() { |
| | | this.$axios.post(this.$api.url.delTechById, { |
| | | id: this.upData.id, |
| | | }).then(res => { |
| | | this.$parent.removeAllTab() |
| | | }); |
| | | }, |
| | | //ç¼è¾ |
| | | writeTechById() { |
| | | this.$axios |
| | | .post( |
| | | this.$api.url.writeTechById + `?id=${this.upData.id}`, { |
| | | deviceGroup: this.upData.device_group, |
| | | father: this.edit.father, |
| | | name: this.edit.name, |
| | | type: this.edit.type |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | this.$message.success("ä¿®æ¹æå"); |
| | | this.$parent.removeAllTab() |
| | | }); |
| | | }, |
| | | query(val) { |
| | | this.selectAllTechTem(); |
| | | }, |
| | | selectAllTechTem() { |
| | | this.$axios |
| | | .get(this.$api.url.selectAllTechTem, { |
| | | params: { |
| | | type: this.typeselect, |
| | | message: this.search.technology |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | this.towTree = res.data; |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.towTree[0].father) // é»è®¤éä¸èç¹ç¬¬ä¸ä¸ª |
| | | }) |
| | | let one = this.towTree[0] |
| | | let name = one.father |
| | | this.checkTreeNode.father = name |
| | | this.selectAllTechNamStart(name) |
| | | }); |
| | | }, |
| | | handleNodeClick(data, node) { |
| | | this.checkTreeNode = data; |
| | | this.selectAllTechNam(); |
| | | }, |
| | | selectAllTechNam() { |
| | | this.$axios |
| | | .get(this.$api.url.selectAllTechNam, { |
| | | params: { |
| | | father: this.checkTreeNode.father |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | this.tableData = res.data; |
| | | let kk = this.tableData.map(el => { |
| | | return el.element |
| | | })[0] |
| | | this.elerow = kk |
| | | }); |
| | | }, |
| | | selectAllTechNamStart(name) { |
| | | this.$axios |
| | | .get(this.$api.url.selectAllTechNam, { |
| | | params: { |
| | | father: name |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | this.tableData = res.data; |
| | | }); |
| | | }, |
| | | addend() { |
| | | this.dialogVisible = true; |
| | | this.chooseDevGroup(); |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | remove(node, data) { |
| | | this.$confirm("æ¯å¦å é¤", "è¦å", { |
| | | type: "warning", |
| | | }) |
| | | .then((res) => { |
| | | const parent = node.parent; |
| | | const children = parent.data.children || parent.data; |
| | | const index = children.findIndex((d) => d.id === data.id); |
| | | children.splice(index, 1); |
| | | }) |
| | | .catch((e) => {}); |
| | | }, |
| | | nodeOpen(data, node, el) { |
| | | $($(el.$el).find(".node_i")[0]).attr( |
| | | "class", |
| | | "node_i el-icon-folder-opened" |
| | | ); |
| | | }, |
| | | nodeClose(data, node, el) { |
| | | $($(el.$el).find(".node_i")[0]).attr("class", "node_i el-icon-folder"); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selects = val; |
| | | }, |
| | | dels() { |
| | | this.selects.forEach((a) => { |
| | | for (var b = 0; b < this.tableData.length; b++) { |
| | | if (this.tableData[b].id == a.id) { |
| | | this.tableData.splice(b, 1); |
| | | b--; |
| | | } |
| | | } |
| | | }); |
| | | let cc = this.selects.map((el) => { |
| | | return el.id; |
| | | }); |
| | | this.delete = cc.join(","); |
| | | console.log(this.delete); |
| | | this.delAllTech(); |
| | | this.$message.success("å é¤å®æ"); |
| | | }, |
| | | deleteRow(index, rows) { |
| | | this.tableData.splice(index, 1); |
| | | this.upData.id = rows.id; |
| | | this.delTechById(); |
| | | }, |
| | | selecTechById() { |
| | | this.$axios |
| | | .get(this.$api.url.selecTechById, { |
| | | params: { |
| | | id: this.upData.id, |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | this.edit = res.data[0]; |
| | | }); |
| | | }, |
| | | //ç¼è¾å
容 |
| | | upContent(ob) { |
| | | this.upData = ob; |
| | | this.chooseDevGroup(); |
| | | this.selecTechById() |
| | | this.upDia = true; |
| | | }, |
| | | submitUpData() { |
| | | this.writeTechById(); |
| | | this.upIndex++; |
| | | this.upDia = false; |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | Vue.use(qs); |
| | | Vue.use(api); |
| | | |
| | | const javaApi = 'http://127.0.0.1:8001' |
| | | // localhost 127.0.0.1 |
| | | const javaApi = 'http://192.168.14.249:8001' |
| | | |
| | | // const javaApi = 'http://127.0.0.1:8001/' |
| | | |
| | |
| | | v: "WMS管ç", |
| | | i: "font icon-a-Inventorydumprequest", |
| | | c: [{ |
| | | k: 15, |
| | | v: "åææåºå", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 16, |
| | | v: "åå管ç", |
| | | i: "font icon-shouye", |
| | | u: "" |
| | | }, |
| | | { |
| | | k: 17, |
| | | v: "åæååºå", |
| | | i: "font icon-shouye", |
| | |
| | | }, |
| | | { |
| | | k: 6, |
| | | v: "æåæ£éª", |
| | | v: "äº§åæ£éª", |
| | | i: "font icon-shouye", |
| | | u: "finishedProductInspection" |
| | | }, |
| | |
| | | u: "record-content" |
| | | }, |
| | | { |
| | | k: 24, |
| | | v: "èªæ£é¡¹ç®ç»´æ¤", |
| | | i: "font icon-shouye", |
| | | u: "self-inspection" |
| | | }, |
| | | { |
| | | k: 25, |
| | | v: "ææ¯ææ ç»´æ¤", |
| | | i: "font icon-shouye", |
| | |
| | | v: "ç©ææ¸
åç»´æ¤", |
| | | i: "font icon-shouye", |
| | | u: "mbom" |
| | | }, |
| | | { |
| | | k: 30, |
| | | v: "ç产工èºç»´æ¤", |
| | | i: "font icon-shouye", |
| | | u: "equipmentmaintain" |
| | | } |
| | | ] |
| | | } |
| | |
| | | u: "index-index" |
| | | }] |
| | | }, |
| | | |
| | | |
| | | upTabActive(num) { |
| | | this.tabActive = num; |
| | | this.activeP = num; |
| | |
| | | localStorage.removeItem("autoenter"); |
| | | this.$router.push("/enter"); |
| | | }, |
| | | removeAllTab(){ |
| | | removeAllTab() { |
| | | this.upIndex++ |
| | | this.$message.warning('æ°æ®åå¨è¾å¤§,页é¢èªå¨æ´æ°!') |
| | | } |