Merge branch 'master' of http://222.71.245.114:9086/r/HIA24016N_PipeLineDemo
¶Ô±ÈÐÂÎļþ |
| | |
| | | node_modules/ |
| | | unpackage/release/apk/ |
| | | unpackage/dist/dev/ |
| | | unpackage/cache/ |
| | | unpackage/dist/build/ |
| | | package-lock.json |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <script> |
| | | export default { |
| | | onLaunch: function() { |
| | | uni.getSystemInfo({ |
| | | success:(res=>{ |
| | | if (!res.safeAreaInsets) res.safeAreaInsets = {} |
| | | if (!res.safeAreaInsets) res.safeArea = {} |
| | | let safetySize = { |
| | | top:(res.safeAreaInsets.top || 0), |
| | | bottom:(res.safeAreaInsets.bottom || 0), |
| | | left:(res.safeAreaInsets.left || 0), |
| | | right:(res.safeAreaInsets.right || 0) |
| | | } |
| | | safetySize.height = res.safeArea.height || 0 |
| | | this.$store.commit('system/setSafety',safetySize) |
| | | }) |
| | | }) |
| | | /* è·åå¹¶è®°å½çæ¬å· */ |
| | | try{ |
| | | plus.runtime.getProperty(plus.runtime.appid, (res)=>{ |
| | | this.$store.commit('system/setVersion',res.version) |
| | | }); |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | } |
| | | }, |
| | | onShow: function() { |
| | | console.log('App Show') |
| | | }, |
| | | onHide: function() { |
| | | console.log('App Hide') |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/static/fonts/iconfont.css"; |
| | | @import "@/uni_modules/uview-ui/index.scss"; |
| | | .app-page { |
| | | font-size: 28rpx; |
| | | color: $uni-text-color; |
| | | background-color: $uni-bg-color; |
| | | box-sizing: border-box; |
| | | overflow: hidden; |
| | | } |
| | | .auto-wrap{ |
| | | word-break:break-all; |
| | | word-wrap:break-word; |
| | | } |
| | | .no-wrap,.ellipsis{ |
| | | white-space:nowrap; |
| | | } |
| | | .ellipsis{ |
| | | overflow:hidden; |
| | | text-overflow:ellipsis; |
| | | } |
| | | .ml{ |
| | | margin-left: 12rpx; |
| | | } |
| | | .mr{ |
| | | margin-right: 12rpx; |
| | | } |
| | | .no-more-text-row{ |
| | | text-align: center; |
| | | color: $uni-text-color-grey; |
| | | padding: 4rpx 0; |
| | | } |
| | | .page-frame{ |
| | | position: relative; |
| | | box-sizing: border-box; |
| | | &.with-action-user-row{ |
| | | padding-top: 54rpx;; |
| | | } |
| | | .with-action-user-row-page-content{ |
| | | height: 100%; |
| | | position: relative; |
| | | box-sizing: border-box; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | .link-text,.enable-input{ |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | > ***<span style="color:#00008B;">å¦æææ°å¢ä¿®æ¹çéç¨å
容ï¼è¯·å¨æ¬æä»¶ä¸æ´æ°ä½¿ç¨æ¹æ³ï¼å¹¶æ³¨ææ´æ°äººãæ´æ°æ¶é´</span>*** |
| | | > ***<span style="color:#00008B;">åå»ºäººï¼æ°ç é«çº§å端 鿬¢æ¬¢ï¼å建æ¶é´ï¼2022å¹´11æ11æ¥</span>*** |
| | | |
| | | > ***<span style="color:#00008B;">æ´æ°1ï¼</span>*** |
| | | > ***<span style="color:#00008B;">æ´æ°äººï¼æ°ç é«çº§å端 鿬¢æ¬¢</span>*** |
| | | > ***<span style="color:#00008B;">æ´æ°æ¶é´ï¼2022å¹´11æ25æ¥</span>*** |
| | | > ***<span style="color:#00008B;">æ´æ°å
容ï¼ajaxè°ç¨ï¼ç¬¬ä¸åæ°å¢å fullRes设置</span>*** |
| | | |
| | | > ***<span style="color:#00008B;">æ´æ°2ï¼</span>*** |
| | | > ***<span style="color:#00008B;">æ´æ°äººï¼æ°ç é«çº§å端 鿬¢æ¬¢</span>*** |
| | | > ***<span style="color:#00008B;">æ´æ°æ¶é´ï¼2022å¹´11æ30æ¥</span>*** |
| | | > ***<span style="color:#00008B;">æ´æ°å
容ï¼</span>*** |
| | | >> ***<span style="color:#00008B;">configé
ç½®å¢å downUrl</span>*** |
| | | >> ***<span style="color:#00008B;">utilså¢å parseDicæ¹æ³ãdownloadApkæ¹æ³</span>*** |
| | | >> ***<span style="color:#00008B;">å¢å ActionUserRow ç»ä»¶</span>*** |
| | | >> ***<span style="color:#00008B;">å¢å ScanInputFormItem ç»ä»¶</span>*** |
| | | >> ***<span style="color:#00008B;">å¢å EasySelectFormItem ç»ä»¶</span>*** |
| | | |
| | | ---- |
| | | |
| | | ## 使ç¨ç«çæµè§å¨FireFoxé
è¯»æ¬æä»¶ |
| | | > ç«çæµè§å¨å®è£
Markdown Vieweræ©å±ç»ä»¶ï¼å®è£
ä¹å卿µè§å¨çå°åæ è¾å
¥æ¬æä»¶çå°åï¼å¯ä»¥æ¯æ¬å°çæä»¶å°åï¼å¦D:\README.mdï¼ï¼å车确认å³å¯ã |
| | | ---- |
| | | |
| | | ## ä½¿ç¨ææ¯æ¢³ç |
| | | ### ä¸ãuni-appï¼èµæç½ç«ï¼<a href="https://uniapp.dcloud.net.cn/" target="_blank">https://uniapp.dcloud.net.cn/</a> |
| | | ### äºãVUE2ï¼èµæç½ç«ï¼<a href="https://v2.cn.vuejs.org/" target="_blank">https://v2.cn.vuejs.org/</a> |
| | | ### ä¸ãvuexï¼storeå
¨å±æ°æ®ï¼èµæç½ç«ï¼<a href="https://v3.vuex.vuejs.org/zh/" target="_blank">https://v3.vuex.vuejs.org/zh/</a> |
| | | ### åãuviewï¼uiåºï¼èµæç½ç«ï¼<a href="https://www.uviewui.com/components/intro.html" target="_blank">https://www.uviewui.com/components/intro.html</a> |
| | | ### äºãDCloud<a href="https://ext.dcloud.net.cn/" target="_blank">æä»¶å¸åº</a>ï¼å
¶ä¸çç»å¤§å¤æ°æä»¶å¯ä»¥ä½¿ç¨HbuilderXç´æ¥å¯¼å
¥å°é¡¹ç®ä¸ |
| | | > HbuilderXä¼å°æä»¶å¯¼å
¥å°é¡¹ç®çuni_modulesæä»¶å¤¹ä¸ |
| | | > HbuilderXæä»¶å¯¼å
¥ä¾èµuniModulesæ ¸å¿æä»¶ï¼è¯·å
å®è£
ï¼è¥å¯¼å
¥å¤±è´¥ï¼å¾æå¯è½æ¯uniModulesççæ¬é®é¢ï¼è¯·å¸è½½å忬¡å®è£
åå导å
¥ã |
| | | > 使ç¨HbuilderX导å
¥æä»¶ï¼è¯·æ³¨ææä»¶ç平尿¯æä»¥åvueè¯è¨çæ¬ |
| | | ---- |
| | | |
| | | ## å¼å以åç¼è¯çå·¥å
·åç¯å¢ |
| | | ### ä¸ãå¼åå·¥å
·HbuilderXï¼å®ç½ï¼<a href="https://www.dcloud.io/hbuilderx.html" target="_blank">https://www.dcloud.io/hbuilderx.html</a>ï¼å®è£
ä¹å注ææä¸äºå¸¸ç¨æä»¶ä¹å®è£
äºãå¦ä½å®è£
æä»¶ï¼å®ç½æä»ç»ã |
| | | ### äºãnodejs |
| | | #### 1ãä¸è½½å°åï¼<a href="https://nodejs.org/zh-cn/" target="_blank">https://nodejs.org/zh-cn/</a> |
| | | #### 2ãå®è£
ä¹åçé
ç½® |
| | | > å¨nodejsçå®è£
æ ¹ç®å½ä¸æ°å»º2个æä»¶å¤¹node_globalånode_cacheï¼ç¶å以管çå身份æå¼å½ä»¤è¡çªå£ï¼cmdï¼è¾å
¥å¦ä¸ä»£ç : |
| | | ~~~ |
| | | npm config set prefix "node_globalæä»¶å¤¹å°å" |
| | | npm config set cache "node_cacheæä»¶å¤¹å°å" |
| | | ~~~ |
| | | > ç¯å¢åé设置ï¼å¦ä½æå¼è®¡ç®æºçç¯å¢åéçªå£ï¼è¿éä¸ä½éè¿°ï¼ä¸ç¥éçå»é®åº¦å¨ï¼ï¼ |
| | | >> NODE_PATH ç¨æ·åéï¼å¼ä¸ºï¼nodejsæ ¹ç®å½\node_modules |
| | | >> Path ç³»ç»åéï¼æ°å¢2ä¸ªå±æ§ï¼ |
| | | >>> nodejsæ ¹ç®å½\ |
| | | >>> nodejsæ ¹ç®å½\node_global |
| | | |
| | | > cnpméåé
ç½®ï¼è¾å
¥å¦ä¸å½ä»¤ï¼ |
| | | ~~~ |
| | | npm install -g cnpm --registry=https://registry.npm.taobao.org |
| | | ~~~ |
| | | ---- |
| | | |
| | | ## 项ç®è¿è¡åæå
|
| | | ### 馿¬¡å®è£
|
| | | > å¨é¡¹ç®çæ ¹ç®å½ï¼è¾å
¥å½ä»¤ |
| | | ~~~ |
| | | npm install æè
cnpm install |
| | | ~~~ |
| | | ### æµè§å¨è¿è¡ |
| | | > HbuilderXæå¼é¡¹ç®ï¼èåæ è¿è¡ > è¿è¡å°æµè§å¨ > éæ©æµè§å¨ |
| | | > æµè§å¨æå¼ å¼åè
å·¥å
· ï¼å°æ¾ç¤ºæ¨¡å¼æ¹ä¸º ç§»å¨è®¾å¤ æ¨¡å¼ |
| | | ### çæºï¼ææºæè
pdaï¼è°å¼ |
| | | > 1ãä½¿ç¨æ°æ®çº¿è¿æ¥ å¼åçµè å çæº |
| | | > 2ãçæºçusbè°è¯æé设置æå¼ |
| | | > 3ãç¡®ä¿ å¼åçµè å çæº å¤äºåä¸ç½ç» |
| | | > 4ãHbuilderXæå¼é¡¹ç®ï¼èåæ è¿è¡ > è¿è¡å°ææºææ¨¡æå¨ > éæ©è°è¯çæº |
| | | >> 注æï¼é¦æ¬¡è¿è¡çæ¶åï¼HbuilderXä¼ç»çæºå®è£
è°è¯appï¼éè¦å¨å®è£
宿å忬¡è¿è¡ |
| | | ### äºæå
|
| | | > 1ãHbuilderXå建账å·å¹¶ç»å½ |
| | | > 2ãå¦æä½ çHbuilderXæ¯é¦æ¬¡å¯¹é¡¹ç®è¿è¡æå
ï¼éè¦è·åä¸AppIdï¼å¨manifest.jsonçåºç¡è®¾ç½®ä¸ |
| | | <img src="./mdImgs/1664329468868.jpg" style="width:100%" /> |
| | | > 3ãåºç¨å¾æ ï¼åå¤ä¸å¼ å¾çï¼æå¥½æ¯1024*1024åç´ çï¼å¨manifest.jsonçApp徿 设置ä¸è¿è¡é
ç½®ã |
| | | <img src="./mdImgs/1664329790970.jpg" style="width:100%" /> |
| | | > 4ãèªå¨çæå®è£
apkï¼èåæ ->åè¡->åçAppäºæå
ãäºæå
éè¦çå¾
䏿®µæ¶é´ã |
| | | <img src="./mdImgs/1664330296712.png" style="width:100%" /> |
| | | > 5ãæå
宿ï¼apkå¨ unpackage\release\apk è·¯å¾ä¸èªå¨çæ |
| | | ----- |
| | | |
| | | ## 项ç®ç®å½ç»æ |
| | | > components èªå¼åçéç¨ç»ä»¶ |
| | | |
| | | > config 项ç®åæ°é
ç½® |
| | | |
| | | > node_modules å®è£
çç¬¬ä¸æ¹ä»£ç æç»ä»¶ |
| | | |
| | | > pages å¼å页é¢ç代ç |
| | | |
| | | > service å°è£
çæå¡ä»£ç |
| | | >> request æ¥å£è°ç¨å°è£
|
| | | >> store vuexå
¨å±æ°æ®å°è£
|
| | | |
| | | > static éæèµæº |
| | | >> fonts å使 ·å¼åº |
| | | >> img æ¬å°å¾çèµæº |
| | | >> js jsèµæº |
| | | >>> print èçæå° |
| | | >>> utils å
¬ç¨js代ç |
| | | |
| | | > uni_modules HbuilderX导å
¥çç¬¬ä¸æ¹ä»£ç æç»ä»¶ |
| | | |
| | | > unpackage HbuilderXæå
èªå¨çæçæä»¶å¤¹ãHbuilderXèªå¨çæçåºç¨å¾ç乿¯è¢«ä¿åå¨è¿éçã |
| | | ---- |
| | | |
| | | ## æ¥å£è°ç¨ |
| | | ### 1ã代ç å°è£
å¨ \service\request |
| | | ### 2ãä½¿ç¨ |
| | | > å·²ç»å¨main.jsä¸å
¨å±å¼å
¥ |
| | | ~~~ |
| | | this.$api |
| | | ~~~ |
| | | ### 3ãå¯ä»¥è°ç¨çæ¹æ³ |
| | | #### getãdeletetãpostãputï¼è¿åä¸ä¸ªPromiseï¼åæ°ï¼ |
| | | > 第ä¸ä¸ªåæ°ï¼stringï¼åç«¯çæ¹æ³åï¼å¿
ä¼ |
| | | |
| | | > 第äºä¸ªåæ°ï¼json objectï¼æ¥å£ä¼ åï¼æ²¡æåç»åæ°çæ¶åï¼å¯ä¸ä¼ |
| | | |
| | | > 第ä¸ä¸ªåæ°ï¼string æè
json objectï¼æ¥å£è°ç¨é
ç½®è®¾ç½®ï¼æ²¡æåç»åæ°çæ¶åï¼å¯ä¸ä¼ |
| | | >> stringæ¶ï¼å³json objectç»æçblockå¼ |
| | | >> json objectæ¶çç»æ |
| | | >>> warn: booleanï¼åºéæ¶æ¯å¦æç¤ºé误信æ¯ï¼å¯ä¸è®¾ç½®ï¼é»è®¤true |
| | | >>> hostï¼stringï¼æ¥å£å°åçåååç§°ï¼å¯¹åºconfigé
ç½®ä¸ajaxçhostï¼å¯ä¸è®¾ç½®ï¼é»è®¤default |
| | | >>> blockï¼stringï¼æ¥å£å°åçæ¨¡ååç§°ï¼å¯¹åºconfigé
ç½®ä¸ajaxçblockï¼å¯ä¸è®¾ç½®ï¼é»è®¤default |
| | | >>> needToken: booleanï¼headersæ¯å¦ä¼ å
¥tokenï¼å¯ä¸è®¾ç½®ï¼é»è®¤true |
| | | >>> loading: booleanï¼æ¥å£è°ç¨è¿ç¨ä¸æ¯å¦å¼å¯å
¨å±loadingï¼å¯ä¸è®¾ç½®ï¼é»è®¤true |
| | | >>> fullRes: booleanï¼æ¥å£è¿åæ¯å¦å°åç«¯çæ´ä¸ªç»æä½è¿åï¼å¯ä¸è®¾ç½®ï¼é»è®¤falseï¼åªè¿åç»æä½çdataï¼ï¼æ´æ°1ï¼ |
| | | #### postãputï¼åæ°ï¼ |
| | | > 第åä¸ªåæ°ï¼json objectï¼poståput以getä¼ åæ¹å¼ä¼ éçåæ°ï¼å¯ä¸ä¼ |
| | | #### baseï¼è¿åä¸ä¸ªPromiseï¼åæ°ï¼ |
| | | > 第ä¸ä¸ªåæ°ï¼stringï¼getãdeletetãpostãputä¸çä¸ä¸ªï¼å¿
ä¼ |
| | | > åç»åæ°ï¼æ²¿ç¨ getãdeletetãpostãput åèªçæ¹æ³ |
| | | #### getHeadersï¼è·å项ç®ä¸çheadersé
ç½®ï¼åæ° |
| | | > 第ä¸ä¸ªåæ°ï¼json objectï¼å¯ä¸ä¼ ï¼ç»æå¦ä¸ |
| | | >> needToken: booleanï¼headersæ¯å¦ä¼ å
¥tokenï¼å¯ä¸è®¾ç½®ï¼é»è®¤true |
| | | |
| | | > 第äºä¸ªåæ°ï¼json objectï¼åæçheadersï¼å¯ä¸ä¼ |
| | | |
| | | > è¿åä¸ä¸ªjson objectï¼ç»æå¦ä¸ |
| | | >> flag: booleanï¼è®¾ç½®headersæ¯å¦éè¿ |
| | | >> headers: json objectï¼é¡¹ç®é
ç½®åçheaders |
| | | #### getUrlï¼è¿åstringï¼ä¸ä¸ªå®æ´çurlï¼åæ°ï¼ |
| | | > 第ä¸ä¸ªåæ°ï¼stringï¼åç«¯çæ¹æ³åï¼å¿
ä¼ |
| | | |
| | | > 第äºä¸ªåæ°ï¼string æè
json objectï¼æ¥å£è°ç¨é
ç½®è®¾ç½®ï¼æ²¡æåç»åæ°çæ¶åï¼å¯ä¸ä¼ |
| | | >> stringæ¶ï¼å³json objectç»æçblockå¼ |
| | | >> json objectæ¶çç»æ |
| | | >>> hostï¼stringï¼æ¥å£å°åçåååç§°ï¼å¯¹åºconfigé
ç½®ä¸ajaxçhostï¼å¯ä¸è®¾ç½®ï¼é»è®¤default |
| | | >>> blockï¼stringï¼æ¥å£å°åçæ¨¡ååç§°ï¼å¯¹åºconfigé
ç½®ä¸ajaxçblockï¼å¯ä¸è®¾ç½®ï¼é»è®¤default |
| | | ---- |
| | | |
| | | ## configç¸å
³ |
| | | ### é
置说æ |
| | | > ajaxï¼æ¥å£è°ç¨ç¸å
³é
ç½® |
| | | |
| | | >> errMsgï¼stringï¼æ¥å£è°ç¨åºéåçé»è®¤æç¤ºä¿¡æ¯ |
| | | |
| | | >> hostï¼json objectï¼æ¥å£è°ç¨ååé
ç½® |
| | | |
| | | >>> defaultï¼stringï¼é»è®¤åå |
| | | |
| | | >> blockï¼json objectï¼æ¥å£è°ç¨æ¨¡åé
ç½® |
| | | |
| | | >>> defaultï¼stringï¼é»è®¤æ¨¡å |
| | | |
| | | > paginationï¼json objectï¼å页ç¸å
³ |
| | | |
| | | > pathï¼json objectï¼é¡µé¢è·¯å¾ï¼å
³èpages.jsonï¼é¡µé¢è·³è½¬çæ¶åä½¿ç¨æ¤å¤çé
ç½®ï¼ä¾¿äºç»´æ¤ |
| | | |
| | | > downUrlï¼stringï¼çæ¬æ´æ°ä¸è½½å°åé
ç½®ï¼æ´æ°2ï¼ |
| | | |
| | | ### å¼åä½¿ç¨ |
| | | > å·²ç»å¨main.jsä¸å
¨å±å¼å
¥ |
| | | ~~~ |
| | | this.$config |
| | | ~~~ |
| | | ----- |
| | | |
| | | ## utilsç¸å
³ |
| | | ### 使ç¨èä¾ |
| | | ~~~ |
| | | import { $alert } from '@/static/js/utils' |
| | | ~~~ |
| | | |
| | | ### utils说æ |
| | | > $successInfoï¼Functionç±»åï¼æåä¿¡æ¯æç¤ºï¼åæ°ï¼ |
| | | >> 第ä¸ä¸ªåæ°ï¼ stringï¼ æåæç¤ºä¿¡æ¯ï¼ å¿
ä¼ ï¼æåå°½éç²¾ç®ï¼å ä¸ºåªæ¯æåè¡æ¾ç¤º |
| | | |
| | | > $alertï¼Functionç±»åï¼å¼¹åºä¸ä¸ªä¿¡æ¯æç¤ºçªå£ï¼åæ°ï¼ |
| | | >> 第ä¸ä¸ªåæ°ï¼ stringï¼ æç¤ºä¿¡æ¯ï¼ å¿
ä¼ |
| | | >> 第äºä¸ªåæ°ï¼ stringï¼ å¼¹çªæ é¢ï¼å¯ä¸ä¼ ï¼é»è®¤âç³»ç»æç¤ºâ |
| | | >> 第ä¸ä¸ªåæ°ï¼ Functionï¼ ç¹å»ç¡®è®¤çåè°æ¹æ³ï¼ å¯ä¸ä¼ |
| | | |
| | | > colorï¼json对象类åï¼é¢è²å¤çç¸å
³ |
| | | |
| | | >> getRandomHexColorï¼Functionç±»åï¼è¿åä¸ä¸ª16è¿å¶çé¢è²å¼ |
| | | |
| | | > regexValidateï¼json对象类åï¼æ£åæ ¡éª |
| | | |
| | | > uuidï¼Functionç±»åï¼å建ä¸ä¸ªéæºç ï¼åæ°ï¼ |
| | | >> 第ä¸ä¸ªåæ°ï¼ numberï¼ éæºç é¿åº¦ï¼ é»è®¤6 |
| | | >> 第äºä¸ªåæ°ï¼ numberï¼ éæºç ç»åæ¹å¼ï¼é»è®¤0ï¼ |
| | | >>> 0ï¼å¤§å°å忝+æ°å |
| | | >>> 1ï¼å°å忝+æ°å |
| | | >>> 2ï¼çº¯æ°å |
| | | >>> 3ï¼å¤§å°å忝 |
| | | >>> 4ï¼å°å忝 |
| | | |
| | | > parseDicï¼Functionç±»åï¼è§£ææ°æ®åå
¸ï¼æ´æ°2ï¼ï¼ |
| | | >> 第ä¸ä¸ªåæ°ï¼ Objectï¼ vuexçstoreå¯¹è±¡ï¼ å¨vueæä»¶ä¸ä¸ºthis.$store |
| | | >> 第äºä¸ªåæ°ï¼ stringï¼ åå
¸éåç |
| | | >> 第ä¸ä¸ªåæ°ï¼ string/numberï¼ åå
¸å¼ |
| | | >> è¿åï¼ stringï¼ åå
¸å¼å¯¹åºåç§° |
| | | |
| | | > downloadApkï¼Functionç±»åï¼æ°çæ¬ä¸è½½çæ¹æ³ï¼æ´æ°2ï¼ï¼ |
| | | >> 第ä¸ä¸ªåæ°ï¼ Objectï¼ configå¯¹è±¡ï¼ å¨vueæä»¶ä¸ä¸ºthis.$config |
| | | ----- |
| | | |
| | | ## æä»¬èªå·±å¼åçç»ä»¶è¯´æ |
| | | ### ä¸ãPageHeaderç»ä»¶ï¼è¿ä¸ªæ¯HeaderPageLayoutç»ä»¶çå
ç½®ç»ä»¶ï¼ä¸å详ç»è¯´æ |
| | | ### äºãFullPageLayoutç»ä»¶ï¼é¡µé¢å¤å±ç»ä»¶ï¼é常使ç¨å¨é¡µé¢çæå¤å± |
| | | #### ç»ä»¶å±æ§ï¼ |
| | | > gradientï¼booleanï¼åºè²æ¸åï¼å³æ¯å¦è®¾ç½®cssçbackground-image屿§ï¼é»è®¤false |
| | | |
| | | > gradient-valueï¼stringï¼åºè²æ¸åå¼ï¼å³cssçbackground-image屿§çå¼ï¼é»è®¤ä¸è®¾ç½®ï¼éç¨é»è®¤æ¸åè² |
| | | |
| | | > background-colorï¼stringï¼åºè²ï¼å¨gradient为falseçæ¶åæçæï¼é»è®¤ä¸è®¾ç½®ï¼å³éæ |
| | | |
| | | > safetyï¼booleanï¼å®å
¨åºï¼é¡µé¢å
容æ¾ç¤ºçæ¶åï¼æ¯å¦å°å®å
¨åºæé¤ï¼é»è®¤trueï¼å³æé¤å®å
¨åº |
| | | |
| | | > fullï¼booleanï¼æ¯å¦æ´å±ï¼é»è®¤trueï¼å¦æç»ä»¶ä¸æ¯ç¨å¨é¡µé¢çæå¤å±ï¼åºè¯¥è®¾ç½®ä¸ºfalseï¼è¿æ¶åç»ä»¶ç宽é«ä¸ºç¶å®¹å¨ç100% |
| | | |
| | | > base-background-colorï¼stringï¼åºç¡åºè²ï¼é¡µé¢åºè²å¤å±çé¢è²ï¼å½æå®å
¨åºçæ¶åï¼å®å
¨åºçé¢è²ä¸ºæ¤é¢è²ãé»è®¤ä¸è®¾ç½®ï¼å³éæï¼è¿æ¶åæ¾ç¤ºçé¢è²ä¼æ¯uni-appä¸è®¾ç½®çé¢è² |
| | | #### ç»ä»¶ææ§½ï¼ |
| | | > defaultï¼é»è®¤ææ§½ï¼é¡µé¢bodyå
容 |
| | | ### ä¸ãHeaderPageLayoutç»ä»¶ï¼å¸¦æå¤´é¨å¸å±ç页é¢å¤å±ç»ä»¶ï¼é常使ç¨å¨é¡µé¢çæå¤å± |
| | | #### ç»ä»¶å±æ§ï¼ |
| | | > gradientï¼booleanï¼é¡µé¢bodyé¨ååºè²æ¸åï¼å³æ¯å¦è®¾ç½®cssçbackground-image屿§ï¼é»è®¤false |
| | | |
| | | > gradient-valueï¼stringï¼é¡µé¢bodyé¨ååºè²æ¸åå¼ï¼å³cssçbackground-image屿§çå¼ï¼é»è®¤ä¸è®¾ç½®ï¼éç¨é»è®¤æ¸åè² |
| | | |
| | | > background-colorï¼stringï¼é¡µé¢bodyé¨ååºè²ï¼å¨gradient为falseçæ¶åæçæï¼é»è®¤ä¸è®¾ç½®ï¼å³éæ |
| | | |
| | | > base-background-colorï¼stringï¼åºç¡åºè²ï¼é¡µé¢åºè²å¤å±çé¢è²ï¼å½æå®å
¨åºçæ¶åï¼å®å
¨åºçé¢è²ä¸ºæ¤é¢è²ãå½ä¸è®¾ç½®å¤´é¨åºè²çæ¶åï¼å¤´é¨çåºè²ä¹ä¸ºæ¤é¢è²ãé»è®¤ä¸è®¾ç½®ï¼å³éæï¼è¿æ¶åæ¾ç¤ºçé¢è²ä¼æ¯uni-appä¸è®¾ç½®çé¢è² |
| | | |
| | | > safetyï¼booleanï¼å®å
¨åºï¼é¡µé¢å
容æ¾ç¤ºçæ¶åï¼æ¯å¦å°å®å
¨åºæé¤ï¼é»è®¤trueï¼å³æé¤å®å
¨åº |
| | | |
| | | > fullï¼booleanï¼æ¯å¦æ´å±ï¼é»è®¤trueï¼å¦æç»ä»¶ä¸æ¯ç¨å¨é¡µé¢çæå¤å±ï¼åºè¯¥è®¾ç½®ä¸ºfalseï¼è¿æ¶åç»ä»¶ç宽é«ä¸ºç¶å®¹å¨ç100% |
| | | |
| | | > titleï¼stringï¼å¤´é¨æ é¢ï¼é»è®¤âTitleâ |
| | | |
| | | > header-colorï¼stringï¼å¤´é¨æåé¢è²ï¼é»è®¤â#212121â |
| | | |
| | | > header-gradientï¼booleanï¼å¤´é¨åºè²æ¸åï¼å³æ¯å¦è®¾ç½®cssçbackground-image屿§ï¼é»è®¤false |
| | | |
| | | > header-gradient-valueï¼stringï¼å¤´é¨åºè²æ¸åå¼ï¼å³cssçbackground-image屿§çå¼ï¼é»è®¤ä¸è®¾ç½®ï¼éç¨é»è®¤æ¸åè² |
| | | |
| | | > header-background-colorï¼stringï¼åºè²ï¼å¨header-gradient为falseçæ¶åæçæï¼é»è®¤ä¸è®¾ç½®ï¼å³éæ |
| | | #### ç»ä»¶ææ§½ï¼ |
| | | > defaultï¼é»è®¤ææ§½ï¼é¡µé¢bodyå
容 |
| | | |
| | | > footerï¼é¡µèææ§½ï¼é¡µé¢åºé¨å
容 |
| | | |
| | | > headerleftï¼é¡µé¢æ 颿 左侧å
容 |
| | | |
| | | > headerrightï¼é¡µé¢æ 颿 å³ä¾§å
容 |
| | | ### ç»ä»¶äºä»¶ï¼ |
| | | > headerclickï¼æ 颿 å·¦å³ä¸¤ä¾§çç¹å»äºä»¶ |
| | | >> 第ä¸ä¸ªåæ°ï¼å¼ä¸ºâleftâï¼è¡¨ç¤ºå·¦ä¾§çç¹å»ï¼å¼ä¸ºârightâï¼è¡¨ç¤ºå³ä¾§çç¹å» |
| | | ### ç»ä»¶æ¹æ³ï¼ |
| | | > getBodyHeightï¼è¿åç»ä»¶bodyçé«åº¦ï¼numberç±»åï¼åä½pxã |
| | | >> æä¾æ¤æ¹æ³çåå å¨äºuni-app使ç¨flexå¸å±çæ¶åï¼appåºç¨å¨flexæ ç¾å®¹å¨å
é¨flex-growï¼flexï¼çèªéåºæ ç¾ä¸çæ ç¾ï¼æ æ³éè¿%设置é«åº¦ã |
| | | >> èæ¬ç»ä»¶ä½¿ç¨äºflexå¸å±ï¼ç»ä»¶çbodyé¨å使ç¨çå°±æ¯flex-growèªéåº |
| | | ### åãDefaultHeaderPageLayoutç»ä»¶ï¼é»è®¤çå¸¦ææ é¢æ ç页é¢å¤å±ç»ä»¶ï¼é常使ç¨å¨ç»å½ä¹å页é¢çæå¤å± |
| | | #### ç»ä»¶å±æ§ï¼ |
| | | > titleï¼stringï¼å¤´é¨æ é¢ï¼é»è®¤âTitleâ |
| | | |
| | | > back-customï¼booleanï¼æ¯å¦å¼å¯è¿åäºä»¶èªå®ä¹ï¼é»è®¤falseä¸å¼å¯ |
| | | #### ç»ä»¶äºä»¶ï¼ |
| | | > backï¼èªå®ä¹è¿åäºä»¶ |
| | | |
| | | #### ç»ä»¶ææ§½ï¼ |
| | | > defaultï¼é»è®¤ææ§½ï¼é¡µé¢bodyå
容 |
| | | |
| | | > footerï¼é¡µèææ§½ï¼é¡µé¢åºé¨å
容 |
| | | ### ç»ä»¶æ¹æ³ï¼ |
| | | > getBodyHeightï¼åHeaderPageLayoutç»ä»¶ |
| | | |
| | | ### äºãEasyPickerï¼ç®æçåééæ©å¨ |
| | | #### ç»ä»¶å±æ§ï¼ |
| | | > visibleï¼booleanï¼æ¯å¦æ¾ç¤ºï¼é»è®¤false å¯ç¨è¯æ³ç³.sync |
| | | |
| | | > listï¼Arrayï¼éæ©é¡¹æ°æ® |
| | | |
| | | > value-fieldï¼stringï¼é项valueåæ®µï¼é»è®¤âvalueâ |
| | | |
| | | > label-fieldï¼stringï¼é项æ¾ç¤ºlabelåæ®µï¼é»è®¤âlabelâ |
| | | #### ç»ä»¶äºä»¶ï¼ |
| | | > selectï¼éæ©äºä»¶ï¼è¿åï¼ |
| | | >> 第ä¸ä¸ªåæ°ï¼éä¸é¡¹çvalueå¼ |
| | | >> 第äºä¸ªåæ°ï¼æ´ä¸ªéä¸é¡¹ |
| | | >> 第ä¸ä¸ªåæ°ï¼éä¸é¡¹å¨é项ä¸çä½ç½® |
| | | |
| | | ### å
ãActionUserRowç»ä»¶ï¼æ¾ç¤ºæä½åï¼æ´æ°2ï¼ |
| | | |
| | | ### ä¸ãScanInputFormItemç»ä»¶ï¼æ«ç è¾å
¥è¡¨åï¼æ´æ°2ï¼ |
| | | #### ç»ä»¶å±æ§ï¼ |
| | | > typeï¼stringï¼è¾å
¥æ¡typeï¼å¯éå¼ï¼numberãidcardãdigitãpasswordãtextï¼é»è®¤âtextâ |
| | | |
| | | > placeholderï¼stringï¼ç©ºç½®å 使åï¼é»è®¤â请è¾å
¥...â |
| | | |
| | | > labelï¼stringï¼æ ç¾åç§°ï¼é»è®¤ç©ºå符串 |
| | | |
| | | > msgï¼stringï¼æç¤ºä¿¡æ¯ï¼é»è®¤ç©ºå符串 |
| | | |
| | | > msg-typeï¼stringï¼æç¤ºä¿¡æ¯ç±»åï¼å¯éå¼ï¼errorï¼é误信æ¯ï¼çº¢è²ï¼ãinfoï¼å¸¸è§ä¿¡æ¯ï¼èè²ï¼ï¼é»è®¤âerrorâ |
| | | |
| | | > value/v-modelï¼string/number/null |
| | | |
| | | > has-searchï¼booleanï¼æ¯å¦æ¾ç¤ºæç´¢æé®ï¼é»è®¤false䏿¾ç¤º |
| | | |
| | | > disabledï¼booleanï¼æ¯å¦ç¦ç¨ï¼é»è®¤falseä¸ç¦ç¨ |
| | | #### ç»ä»¶äºä»¶ï¼ |
| | | > searchï¼æç´¢æé®ç¹å»äºä»¶ |
| | | |
| | | > clearï¼æ¸
é¤iconç¹å»äºä»¶ |
| | | |
| | | ### å
«ãEasySelectFormItemç»ä»¶ï¼åéä¸æè¡¨åï¼æ´æ°2ï¼ |
| | | #### ç»ä»¶å±æ§ï¼ |
| | | > placeholderï¼stringï¼ç©ºç½®å 使åï¼é»è®¤â请è¾å
¥...â |
| | | |
| | | > labelï¼stringï¼æ ç¾åç§°ï¼é»è®¤ç©ºå符串 |
| | | |
| | | > msgï¼stringï¼æç¤ºä¿¡æ¯ï¼é»è®¤ç©ºå符串 |
| | | |
| | | > msg-typeï¼stringï¼æç¤ºä¿¡æ¯ç±»åï¼å¯éå¼ï¼errorï¼é误信æ¯ï¼çº¢è²ï¼ãinfoï¼å¸¸è§ä¿¡æ¯ï¼èè²ï¼ï¼é»è®¤âerrorâ |
| | | |
| | | > value/v-modelï¼string/number/boolean/null |
| | | |
| | | > listï¼Arrayï¼éæ©é¡¹æ°æ® |
| | | |
| | | > value-fieldï¼stringï¼é项valueåæ®µï¼é»è®¤âvalueâ |
| | | |
| | | > label-fieldï¼stringï¼é项æ¾ç¤ºlabelåæ®µï¼é»è®¤âlabelâ |
| | | |
| | | > disabledï¼booleanï¼æ¯å¦ç¦ç¨ï¼é»è®¤falseä¸ç¦ç¨ |
| | | #### ç»ä»¶äºä»¶ï¼ |
| | | > selectï¼é项ç¹å»äºä»¶ |
| | | |
| | | > clearï¼æ¸
é¤iconç¹å»äºä»¶ |
| | | |
| | | ----- |
| | | |
| | | ## èçæå°ä½¿ç¨ |
| | | ### èä¾ |
| | | ~~~ |
| | | import BluePrint from '@/pages/print/bluePrint.js' |
| | | |
| | | const onPrint = function(){ |
| | | let ptintContext = [ |
| | | {type:'text',x:0,y:0,text:'',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:0,y:0,text:'',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:0,y:0,text:'',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | /* 以ä¸ç©ºæ°æ®ï¼ä¸ºé²æ¢ä¸¢å
æ¶æå°ä¸æ£å¸¸ */ |
| | | {type:'text',x:230,y:10,text:'PART:',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:300,y:10,text:'HFAHFOAJFOAJFO',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:230,y:95,text:'NAME:',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:300,y:95,text:'SAHFAKHFKAHFKANFK',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:230,y:180,text:'LOTS:',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:300,y:180,text:'LOTSLOTSLOTSLOTSLOTS',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:13,y:250,text:'SIZE:',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:83,y:250,text:'SIZESIZESIZESIZESIZESIZESIZESIZE',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:105,y:315,text:'MAKINO J(CHINA) CO.LTD',size:3,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'qr',x:10,y:10,text:'asndkajdkjalda-barcode',width:8,level:1} |
| | | ] |
| | | BluePrint.print(this.$store,ptintContext).then(()=>{ |
| | | console.log('printæåè°ç¨') |
| | | }).catch(()=>{ |
| | | console.log('printè°ç¨åºé') |
| | | }) |
| | | } |
| | | ~~~ |
| | | ### æå°æ°æ®å段说æ |
| | | > typeï¼stringï¼å¯éå¼ï¼(line)ç´çº¿ã(text)æåã(qr)äºç»´ç ã(bar)æ¡å½¢ç |
| | | |
| | | > xï¼numberï¼æå°æåãäºç»´ç ãæ¡å½¢ç æ¶åï¼èµ·å§ç¹æ¨ªåæ |
| | | |
| | | > yï¼numberï¼æå°æåãäºç»´ç ãæ¡å½¢ç æ¶åï¼èµ·å§ç¹çºµåæ |
| | | |
| | | > x1ï¼numberï¼æå°ç´çº¿æ¶åï¼èµ·å§ç¹æ¨ªåæ |
| | | |
| | | > y1ï¼numberï¼æå°ç´çº¿æ¶åï¼èµ·å§ç¹çºµåæ |
| | | |
| | | > x2ï¼numberï¼æå°ç´çº¿æ¶åï¼ç»æç¹æ¨ªåæ |
| | | |
| | | > y2ï¼numberï¼æå°ç´çº¿æ¶åï¼ç»æç¹çºµåæ |
| | | |
| | | > textï¼stringï¼æå°æåãäºç»´ç ãæ¡å½¢ç æ¶åï¼æå°å
容 |
| | | |
| | | > sizeï¼numberï¼æå°æåæ¶çåä½å¤§å°ï¼å¯éå¼ 20/1/2/3/4/5/6/7 ï¼å
¶ä»çæ¶åé»è®¤ä¸º2 |
| | | |
| | | > widthï¼number |
| | | >> æå°ç´çº¿ï¼è¡¨ç¤ºçº¿å®½ |
| | | >> æå°äºç»´ç ï¼è¡¨ç¤ºäºç»´ç å»åº¦å¼ï¼ä¸æ¯çæçäºç»´ç ç宽度ï¼åå¼ï¼2å°15ï¼ |
| | | >> æå°æ¡å½¢ç ï¼è¡¨ç¤ºæ¡å½¢ç å»åº¦å¼ï¼ä¸æ¯çæçæ¡å½¢ç ç宽度ï¼åå¼ï¼2å°6ï¼ |
| | | |
| | | > levelï¼numberï¼æå°äºç»´ç æ¶åï¼çº éç级ï¼åå¼ï¼0å°20ï¼ |
| | | |
| | | > heightï¼numberï¼æå°æ¡å½¢ç æ¶åï¼é«åº¦ï¼åå¼ï¼1å°255ï¼ |
| | | |
| | | > barTypeï¼numberï¼æå°æ¡å½¢ç æ¶åï¼æ¡å½¢ç ç±»åï¼å¯éå¼ï¼ |
| | | >> 0ï¼CODE39ï¼ |
| | | >> 1ï¼CODE128ï¼ |
| | | >> 2ï¼CODE93ï¼ |
| | | >> 3ï¼CODEBARï¼ |
| | | >> 4ï¼EAN8ï¼ |
| | | >> 5ï¼EAN13ï¼ |
| | | >> 6ï¼UPCA; |
| | | >> 7ï¼UPC-E; |
| | | >> 8ï¼ITF |
| | | |
| | | > rotateï¼numberï¼æå°æåæ¶åï¼éæ©è§åº¦ |
| | | |
| | | > boldï¼numberï¼æå°æåæ¶åï¼æ¯å¦å ç²(0å¦1æ¯) |
| | | |
| | | > underlineï¼booleanï¼æå°æåæ¶åï¼ä¸å线设置 |
| | | |
| | | > reverseï¼booleanï¼æå°æåæ¶åï¼å转设置 |
| | | |
| | | ------- |
| | | ## 页é¢è¯´æ |
| | | ### /pages/start/index |
| | | > å¯å¨é¡µï¼æ ¹æ®é¡¹ç®éæ±è°æ´ |
| | | |
| | | ### /pages/login/index |
| | | > ç»å½é¡µï¼ä¸è¬ä¸ä¼å¤§æ¹å¨äºï¼æ ¹æ®é¡¹ç®éæ±åå¾®è° |
| | | |
| | | ### /pages/home/index |
| | | > ç»å½åçé¦é¡µï¼æ ¹æ®é¡¹ç®éæ±ï¼å¾å¯è½åå±é¨è°æ´ |
| | | |
| | | ### /pages/baseTask/out |
| | | > å
¥åºé¡µé¢ï¼æ ¹æ®é¡¹ç®éæ±è°æ´ |
| | | |
| | | ### /pages/baseTask/out |
| | | > åºåºé¡µé¢ï¼æ ¹æ®é¡¹ç®éæ±è°æ´ |
| | | |
| | | ### /pages/print/bluetoothConnection |
| | | > ç©èèèçæå°æºï¼èçè¿æ¥é¡µé¢ï¼å 乿 éæ¹å¨ |
| | | |
| | | ### /pages/setting/host |
| | | > å端æ¥å£è°ç¨åå设置页é¢ï¼å 乿 éæ¹å¨ |
| | | |
| | | ----- |
| | | ## json-server åç«¯æ°æ®moke |
| | | ### å¯å¨é
ç½®ï¼å¦å¾å¨package.jsonä¸ï¼ç¶åå½ä»¤è¡è¿è¡ |
| | | ~~~ |
| | | npm run api |
| | | ~~~ |
| | | > --port 3012 端å£å·è®¾ç½®ä¸º3012 |
| | | > --host 0.0.0.0 å¼å¯ipå°åè®¿é® |
| | | <img src="./mdImgs/1665970038354.jpg" style="width:100%" /> |
| | | |
| | | ### RESET Api |
| | | > GET /demo è·åå
¨é¨å表 |
| | | > GET /demo/æ°æ®id è·å详æ
|
| | | > POST /demo å¢å |
| | | > PUT /demo/æ°æ®id æ´æ¡æ°æ®æ¿æ¢ |
| | | > PATCH /demo/æ°æ®id ä¿®æ¹æä¸ªåæ®µ |
| | | > DELETE /demo/æ°æ®id å é¤ |
| | | ### æ¡ä»¶æ¥è¯¢åå页æ¥è¯¢ |
| | | #### æ¡ä»¶æ¥è¯¢ï¼å段åç§°åå¢å |
| | | > _gte 大äºçäº |
| | | > _lte å°äºçäº |
| | | > _ne ä¸çäº |
| | | > _like å
å« |
| | | |
| | | #### å页æ¥è¯¢ |
| | | > _page 页ç ï¼ä»1å¼å§ |
| | | > _limit æ¯é¡µå¤å°æ¡æ°æ® |
| | | > _start æ°æ®ç´¢å¼å¼å§ï¼ä»0å¼å§ |
| | | > _end æ°æ®ç´¢å¼ç»æï¼ä¸å
å«endç´¢å¼ |
| | | |
| | | æ¡ä¾ï¼GETæ¨¡ç³æ¥æ¾å段name |
| | | ~~~ |
| | | /demo?name_like=value |
| | | ~~~ |
| | | |
| | | ------- |
| | | ## æ°å»ºé¡µé¢æ¥éª¤ |
| | | #### 1ãé
ç½®pages.json |
| | | #### 2ãé
ç½®config/index.jsä¸çpath |
| | | #### 3ãé¦é¡µé
置页é¢å
¥å£ï¼æ ¹æ®éè¦ï¼ |
| | | |
| | | |
| | | |
| | | ## å¼¹æ¡ä¸å¸¦æ¨¡ç³æ¥è¯¢ |
| | | <selectItem |
| | | :selectData="placeList" |
| | | :value.sync="form.placeNo" |
| | | label="åºä½ç¼å·" |
| | | labelField="placeNo" |
| | | valueField="placeNo" |
| | | @getCurrentData="getCurrentData" |
| | | :isShowSearch="true" |
| | | /> |
| | | import selectItem from "@/components/selectItemWithSearch.vue"; |
| | | import { palceList } from "@/service/mixins/mixins.js"; |
| | | mixins: [palceList], |
| | | //åºä½æ¨¡ç³æ¥è¯¢ |
| | | async getCurrentData(PlaceNo) { |
| | | await this.getPalceList({ |
| | | areaCode: this.form.areaNo, |
| | | PlaceNo: PlaceNo, |
| | | }); |
| | | }, |
| | | ## å¼¹æ¡ä¸å¸¦æ¨¡ç³æ¥è¯¢ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | > ***<span style="color:#00008B;">å¦æææ°å¢ä¿®æ¹çéç¨å
容ï¼è¯·å¨æ¬æä»¶ä¸æ´æ°ä½¿ç¨æ¹æ³ï¼å¹¶æ³¨ææ´æ°äººãæ´æ°æ¶é´</span>*** |
| | | > ***<span style="color:#00008B;">åå»ºäººï¼æ°ç é«çº§å端 鿬¢æ¬¢ï¼å建æ¶é´ï¼2022å¹´3æ16æ¥</span>*** |
| | | |
| | | ---- |
| | | |
| | | ## 使ç¨ç«çæµè§å¨FireFoxé
è¯»æ¬æä»¶ |
| | | > ç«çæµè§å¨å®è£
Markdown Vieweræ©å±ç»ä»¶ï¼å®è£
ä¹å卿µè§å¨çå°åæ è¾å
¥æ¬æä»¶çå°åï¼å¯ä»¥æ¯æ¬å°çæä»¶å°åï¼å¦D:\README.mdï¼ï¼å车确认å³å¯ã |
| | | ---- |
| | | |
| | | ## ä½¿ç¨ææ¯æ¢³ç |
| | | ### ä¸ãuni-appï¼èµæç½ç«ï¼<a href="https://uniapp.dcloud.net.cn/" target="_blank">https://uniapp.dcloud.net.cn/</a> |
| | | ### äºãVUE2ï¼èµæç½ç«ï¼<a href="https://v2.cn.vuejs.org/" target="_blank">https://v2.cn.vuejs.org/</a> |
| | | ### ä¸ãvuexï¼storeå
¨å±æ°æ®ï¼èµæç½ç«ï¼<a href="https://v3.vuex.vuejs.org/zh/" target="_blank">https://v3.vuex.vuejs.org/zh/</a> |
| | | ### åãuviewï¼uiåºï¼èµæç½ç«ï¼<a href="https://www.uviewui.com/components/intro.html" target="_blank">https://www.uviewui.com/components/intro.html</a> |
| | | ### äºãDCloud<a href="https://ext.dcloud.net.cn/" target="_blank">æä»¶å¸åº</a>ï¼å
¶ä¸çç»å¤§å¤æ°æä»¶å¯ä»¥ä½¿ç¨HbuilderXç´æ¥å¯¼å
¥å°é¡¹ç®ä¸ |
| | | > HbuilderXä¼å°æä»¶å¯¼å
¥å°é¡¹ç®çuni_modulesæä»¶å¤¹ä¸ |
| | | > HbuilderXæä»¶å¯¼å
¥ä¾èµuniModulesæ ¸å¿æä»¶ï¼è¯·å
å®è£
ï¼è¥å¯¼å
¥å¤±è´¥ï¼å¾æå¯è½æ¯uniModulesççæ¬é®é¢ï¼è¯·å¸è½½å忬¡å®è£
åå导å
¥ã |
| | | > 使ç¨HbuilderX导å
¥æä»¶ï¼è¯·æ³¨ææä»¶ç平尿¯æä»¥åvueè¯è¨çæ¬ |
| | | ---- |
| | | |
| | | ## å¼å以åç¼è¯çå·¥å
·åç¯å¢ |
| | | ### ä¸ãå¼åå·¥å
·HbuilderXï¼å®ç½ï¼<a href="https://www.dcloud.io/hbuilderx.html" target="_blank">https://www.dcloud.io/hbuilderx.html</a>ï¼å®è£
ä¹å注ææä¸äºå¸¸ç¨æä»¶ä¹å®è£
äºãå¦ä½å®è£
æä»¶ï¼å®ç½æä»ç»ã |
| | | ### äºãnodejs |
| | | #### 1ãä¸è½½å°åï¼<a href="https://nodejs.org/zh-cn/" target="_blank">https://nodejs.org/zh-cn/</a> |
| | | #### 2ãå®è£
ä¹åçé
ç½® |
| | | > å¨nodejsçå®è£
æ ¹ç®å½ä¸æ°å»º2个æä»¶å¤¹node_globalånode_cacheï¼ç¶å以管çå身份æå¼å½ä»¤è¡çªå£ï¼cmdï¼è¾å
¥å¦ä¸ä»£ç : |
| | | ~~~ |
| | | npm config set prefix "node_globalæä»¶å¤¹å°å" |
| | | npm config set cache "node_cacheæä»¶å¤¹å°å" |
| | | ~~~ |
| | | > ç¯å¢åé设置ï¼å¦ä½æå¼è®¡ç®æºçç¯å¢åéçªå£ï¼è¿éä¸ä½éè¿°ï¼ä¸ç¥éçå»é®åº¦å¨ï¼ï¼ |
| | | >> NODE_PATH ç¨æ·åéï¼å¼ä¸ºï¼nodejsæ ¹ç®å½\node_modules |
| | | >> Path ç³»ç»åéï¼æ°å¢2ä¸ªå±æ§ï¼ |
| | | >>> nodejsæ ¹ç®å½\ |
| | | >>> nodejsæ ¹ç®å½\node_global |
| | | |
| | | > cnpméåé
ç½®ï¼è¾å
¥å¦ä¸å½ä»¤ï¼ |
| | | ~~~ |
| | | npm install -g cnpm --registry=https://registry.npm.taobao.org |
| | | ~~~ |
| | | ---- |
| | | |
| | | ## 项ç®è¿è¡åæå
|
| | | ### 馿¬¡å®è£
|
| | | > å¨é¡¹ç®çæ ¹ç®å½ï¼è¾å
¥å½ä»¤ |
| | | ~~~ |
| | | npm install æè
cnpm install |
| | | ~~~ |
| | | ### æµè§å¨è¿è¡ |
| | | > HbuilderXæå¼é¡¹ç®ï¼èåæ è¿è¡ > è¿è¡å°æµè§å¨ > éæ©æµè§å¨ |
| | | > æµè§å¨æå¼ å¼åè
å·¥å
· ï¼å°æ¾ç¤ºæ¨¡å¼æ¹ä¸º ç§»å¨è®¾å¤ æ¨¡å¼ |
| | | ### çæºï¼ææºæè
pdaï¼è°å¼ |
| | | > 1ãä½¿ç¨æ°æ®çº¿è¿æ¥ å¼åçµè å çæº |
| | | > 2ãçæºçusbè°è¯æé设置æå¼ |
| | | > 3ãç¡®ä¿ å¼åçµè å çæº å¤äºåä¸ç½ç» |
| | | > 4ãHbuilderXæå¼é¡¹ç®ï¼èåæ è¿è¡ > è¿è¡å°ææºææ¨¡æå¨ > éæ©è°è¯çæº |
| | | >> 注æï¼é¦æ¬¡è¿è¡çæ¶åï¼HbuilderXä¼ç»çæºå®è£
è°è¯appï¼éè¦å¨å®è£
宿å忬¡è¿è¡ |
| | | ### äºæå
|
| | | > 1ãHbuilderXå建账å·å¹¶ç»å½ |
| | | > 2ãå¦æä½ çHbuilderXæ¯é¦æ¬¡å¯¹é¡¹ç®è¿è¡æå
ï¼éè¦è·åä¸AppIdï¼å¨manifest.jsonçåºç¡è®¾ç½®ä¸ |
| | | <img src="./mdImgs/1664329468868.jpg" style="width:100%" /> |
| | | > 3ãåºç¨å¾æ ï¼åå¤ä¸å¼ å¾çï¼æå¥½æ¯1024*1024åç´ çï¼å¨manifest.jsonçApp徿 设置ä¸è¿è¡é
ç½®ã |
| | | <img src="./mdImgs/1664329790970.jpg" style="width:100%" /> |
| | | > 4ãèªå¨çæå®è£
apkï¼èåæ ->åè¡->åçAppäºæå
ãäºæå
éè¦çå¾
䏿®µæ¶é´ã |
| | | <img src="./mdImgs/1664330296712.png" style="width:100%" /> |
| | | > 5ãæå
宿ï¼apkå¨ unpackage\release\apk è·¯å¾ä¸èªå¨çæ |
| | | ----- |
| | | |
| | | ## 项ç®ç®å½ç»æ |
| | | > components èªå¼åçéç¨ç»ä»¶ |
| | | |
| | | > config 项ç®åæ°é
ç½® |
| | | |
| | | > node_modules å®è£
çç¬¬ä¸æ¹ä»£ç æç»ä»¶ |
| | | |
| | | > pages å¼å页é¢ç代ç |
| | | |
| | | > service å°è£
çæå¡ä»£ç |
| | | >> request æ¥å£è°ç¨å°è£
|
| | | >> store vuexå
¨å±æ°æ®å°è£
|
| | | |
| | | > static éæèµæº |
| | | >> fonts å使 ·å¼åº |
| | | >> img æ¬å°å¾çèµæº |
| | | >> js jsèµæº |
| | | >>> print èçæå° |
| | | >>> utils å
¬ç¨js代ç |
| | | |
| | | > uni_modules HbuilderX导å
¥çç¬¬ä¸æ¹ä»£ç æç»ä»¶ |
| | | |
| | | > unpackage HbuilderXæå
èªå¨çæçæä»¶å¤¹ãHbuilderXèªå¨çæçåºç¨å¾ç乿¯è¢«ä¿åå¨è¿éçã |
| | | ---- |
| | | |
| | | ## æ¥å£è°ç¨ |
| | | ### 1ã代ç å°è£
å¨ \service\request |
| | | ### 2ãä½¿ç¨ |
| | | > å·²ç»å¨main.jsä¸å
¨å±å¼å
¥ |
| | | ~~~ |
| | | this.$api |
| | | ~~~ |
| | | ### 3ãå¯ä»¥è°ç¨çæ¹æ³ |
| | | #### getãdeletetãpostãputï¼è¿åä¸ä¸ªPromiseï¼åæ°ï¼ |
| | | > 第ä¸ä¸ªåæ°ï¼stringï¼åç«¯çæ¹æ³åï¼å¿
ä¼ |
| | | |
| | | > 第äºä¸ªåæ°ï¼json objectï¼æ¥å£ä¼ åï¼æ²¡æåç»åæ°çæ¶åï¼å¯ä¸ä¼ |
| | | |
| | | > 第ä¸ä¸ªåæ°ï¼string æè
json objectï¼æ¥å£è°ç¨é
ç½®è®¾ç½®ï¼æ²¡æåç»åæ°çæ¶åï¼å¯ä¸ä¼ |
| | | >> stringæ¶ï¼å³json objectç»æçblockå¼ |
| | | >> json objectæ¶çç»æ |
| | | >>> warn: booleanï¼åºéæ¶æ¯å¦æç¤ºé误信æ¯ï¼å¯ä¸è®¾ç½®ï¼é»è®¤true |
| | | >>> hostï¼stringï¼æ¥å£å°åçåååç§°ï¼å¯¹åºconfigé
ç½®ä¸ajaxçhostï¼å¯ä¸è®¾ç½®ï¼é»è®¤default |
| | | >>> blockï¼stringï¼æ¥å£å°åçæ¨¡ååç§°ï¼å¯¹åºconfigé
ç½®ä¸ajaxçblockï¼å¯ä¸è®¾ç½®ï¼é»è®¤default |
| | | >>> needToken: booleanï¼headersæ¯å¦ä¼ å
¥tokenï¼å¯ä¸è®¾ç½®ï¼é»è®¤true |
| | | >>> loading: booleanï¼æ¥å£è°ç¨è¿ç¨ä¸æ¯å¦å¼å¯å
¨å±loadingï¼å¯ä¸è®¾ç½®ï¼é»è®¤true |
| | | >>> fullRes: booleanï¼æ¥å£è¿åæ¯å¦å°åç«¯çæ´ä¸ªç»æä½è¿åï¼å¯ä¸è®¾ç½®ï¼é»è®¤falseï¼åªè¿åç»æä½çdataï¼ï¼æ´æ°1ï¼ |
| | | #### postãputï¼åæ°ï¼ |
| | | > 第åä¸ªåæ°ï¼json objectï¼poståput以getä¼ åæ¹å¼ä¼ éçåæ°ï¼å¯ä¸ä¼ |
| | | #### baseï¼è¿åä¸ä¸ªPromiseï¼åæ°ï¼ |
| | | > 第ä¸ä¸ªåæ°ï¼stringï¼getãdeletetãpostãputä¸çä¸ä¸ªï¼å¿
ä¼ |
| | | > åç»åæ°ï¼æ²¿ç¨ getãdeletetãpostãput åèªçæ¹æ³ |
| | | #### getHeadersï¼è·å项ç®ä¸çheadersé
ç½®ï¼åæ° |
| | | > 第ä¸ä¸ªåæ°ï¼json objectï¼å¯ä¸ä¼ ï¼ç»æå¦ä¸ |
| | | >> needToken: booleanï¼headersæ¯å¦ä¼ å
¥tokenï¼å¯ä¸è®¾ç½®ï¼é»è®¤true |
| | | |
| | | > 第äºä¸ªåæ°ï¼json objectï¼åæçheadersï¼å¯ä¸ä¼ |
| | | |
| | | > è¿åä¸ä¸ªjson objectï¼ç»æå¦ä¸ |
| | | >> flag: booleanï¼è®¾ç½®headersæ¯å¦éè¿ |
| | | >> headers: json objectï¼é¡¹ç®é
ç½®åçheaders |
| | | #### getUrlï¼è¿åstringï¼ä¸ä¸ªå®æ´çurlï¼åæ°ï¼ |
| | | > 第ä¸ä¸ªåæ°ï¼stringï¼åç«¯çæ¹æ³åï¼å¿
ä¼ |
| | | |
| | | > 第äºä¸ªåæ°ï¼string æè
json objectï¼æ¥å£è°ç¨é
ç½®è®¾ç½®ï¼æ²¡æåç»åæ°çæ¶åï¼å¯ä¸ä¼ |
| | | >> stringæ¶ï¼å³json objectç»æçblockå¼ |
| | | >> json objectæ¶çç»æ |
| | | >>> hostï¼stringï¼æ¥å£å°åçåååç§°ï¼å¯¹åºconfigé
ç½®ä¸ajaxçhostï¼å¯ä¸è®¾ç½®ï¼é»è®¤default |
| | | >>> blockï¼stringï¼æ¥å£å°åçæ¨¡ååç§°ï¼å¯¹åºconfigé
ç½®ä¸ajaxçblockï¼å¯ä¸è®¾ç½®ï¼é»è®¤default |
| | | ---- |
| | | |
| | | ## configç¸å
³ |
| | | ### é
置说æ |
| | | > ajaxï¼æ¥å£è°ç¨ç¸å
³é
ç½® |
| | | |
| | | >> errMsgï¼stringï¼æ¥å£è°ç¨åºéåçé»è®¤æç¤ºä¿¡æ¯ |
| | | |
| | | >> hostï¼json objectï¼æ¥å£è°ç¨ååé
ç½® |
| | | |
| | | >>> defaultï¼stringï¼é»è®¤åå |
| | | |
| | | >> blockï¼json objectï¼æ¥å£è°ç¨æ¨¡åé
ç½® |
| | | |
| | | >>> defaultï¼stringï¼é»è®¤æ¨¡å |
| | | |
| | | > paginationï¼json objectï¼å页ç¸å
³ |
| | | |
| | | > pathï¼json objectï¼é¡µé¢è·¯å¾ï¼å
³èpages.jsonï¼é¡µé¢è·³è½¬çæ¶åä½¿ç¨æ¤å¤çé
ç½®ï¼ä¾¿äºç»´æ¤ |
| | | |
| | | > downUrlï¼stringï¼çæ¬æ´æ°ä¸è½½å°åé
ç½®ï¼æ´æ°2ï¼ |
| | | |
| | | ### å¼åä½¿ç¨ |
| | | > å·²ç»å¨main.jsä¸å
¨å±å¼å
¥ |
| | | ~~~ |
| | | this.$config |
| | | ~~~ |
| | | ----- |
| | | |
| | | ## utilsç¸å
³ |
| | | ### 使ç¨èä¾ |
| | | ~~~ |
| | | import { $alert } from '@/static/js/utils' |
| | | ~~~ |
| | | |
| | | ### utils说æ |
| | | > $successInfoï¼Functionç±»åï¼æåä¿¡æ¯æç¤ºï¼åæ°ï¼ |
| | | >> 第ä¸ä¸ªåæ°ï¼ stringï¼ æåæç¤ºä¿¡æ¯ï¼ å¿
ä¼ ï¼æåå°½éç²¾ç®ï¼å ä¸ºåªæ¯æåè¡æ¾ç¤º |
| | | |
| | | > $alertï¼Functionç±»åï¼å¼¹åºä¸ä¸ªä¿¡æ¯æç¤ºçªå£ï¼åæ°ï¼ |
| | | >> 第ä¸ä¸ªåæ°ï¼ stringï¼ æç¤ºä¿¡æ¯ï¼ å¿
ä¼ |
| | | >> 第äºä¸ªåæ°ï¼ stringï¼ å¼¹çªæ é¢ï¼å¯ä¸ä¼ ï¼é»è®¤âç³»ç»æç¤ºâ |
| | | >> 第ä¸ä¸ªåæ°ï¼ Functionï¼ ç¹å»ç¡®è®¤çåè°æ¹æ³ï¼ å¯ä¸ä¼ |
| | | |
| | | > colorï¼json对象类åï¼é¢è²å¤çç¸å
³ |
| | | |
| | | >> getRandomHexColorï¼Functionç±»åï¼è¿åä¸ä¸ª16è¿å¶çé¢è²å¼ |
| | | |
| | | > regexValidateï¼json对象类åï¼æ£åæ ¡éª |
| | | |
| | | > uuidï¼Functionç±»åï¼å建ä¸ä¸ªéæºç ï¼åæ°ï¼ |
| | | >> 第ä¸ä¸ªåæ°ï¼ numberï¼ éæºç é¿åº¦ï¼ é»è®¤6 |
| | | >> 第äºä¸ªåæ°ï¼ numberï¼ éæºç ç»åæ¹å¼ï¼é»è®¤0ï¼ |
| | | >>> 0ï¼å¤§å°å忝+æ°å |
| | | >>> 1ï¼å°å忝+æ°å |
| | | >>> 2ï¼çº¯æ°å |
| | | >>> 3ï¼å¤§å°å忝 |
| | | >>> 4ï¼å°å忝 |
| | | |
| | | > parseDicï¼Functionç±»åï¼è§£ææ°æ®åå
¸ï¼æ´æ°2ï¼ï¼ |
| | | >> 第ä¸ä¸ªåæ°ï¼ Objectï¼ vuexçstoreå¯¹è±¡ï¼ å¨vueæä»¶ä¸ä¸ºthis.$store |
| | | >> 第äºä¸ªåæ°ï¼ stringï¼ åå
¸éåç |
| | | >> 第ä¸ä¸ªåæ°ï¼ string/numberï¼ åå
¸å¼ |
| | | >> è¿åï¼ stringï¼ åå
¸å¼å¯¹åºåç§° |
| | | |
| | | > downloadApkï¼Functionç±»åï¼æ°çæ¬ä¸è½½çæ¹æ³ï¼æ´æ°2ï¼ï¼ |
| | | >> 第ä¸ä¸ªåæ°ï¼ Objectï¼ configå¯¹è±¡ï¼ å¨vueæä»¶ä¸ä¸ºthis.$config |
| | | ----- |
| | | |
| | | ## æä»¬èªå·±å¼åçç»ä»¶è¯´æ |
| | | ### ä¸ãPageHeaderç»ä»¶ï¼è¿ä¸ªæ¯HeaderPageLayoutç»ä»¶çå
ç½®ç»ä»¶ï¼ä¸å详ç»è¯´æ |
| | | ### äºãFullPageLayoutç»ä»¶ï¼é¡µé¢å¤å±ç»ä»¶ï¼é常使ç¨å¨é¡µé¢çæå¤å± |
| | | #### ç»ä»¶å±æ§ï¼ |
| | | > gradientï¼booleanï¼åºè²æ¸åï¼å³æ¯å¦è®¾ç½®cssçbackground-image屿§ï¼é»è®¤false |
| | | |
| | | > gradient-valueï¼stringï¼åºè²æ¸åå¼ï¼å³cssçbackground-image屿§çå¼ï¼é»è®¤ä¸è®¾ç½®ï¼éç¨é»è®¤æ¸åè² |
| | | |
| | | > background-colorï¼stringï¼åºè²ï¼å¨gradient为falseçæ¶åæçæï¼é»è®¤ä¸è®¾ç½®ï¼å³éæ |
| | | |
| | | > safetyï¼booleanï¼å®å
¨åºï¼é¡µé¢å
容æ¾ç¤ºçæ¶åï¼æ¯å¦å°å®å
¨åºæé¤ï¼é»è®¤trueï¼å³æé¤å®å
¨åº |
| | | |
| | | > fullï¼booleanï¼æ¯å¦æ´å±ï¼é»è®¤trueï¼å¦æç»ä»¶ä¸æ¯ç¨å¨é¡µé¢çæå¤å±ï¼åºè¯¥è®¾ç½®ä¸ºfalseï¼è¿æ¶åç»ä»¶ç宽é«ä¸ºç¶å®¹å¨ç100% |
| | | |
| | | > base-background-colorï¼stringï¼åºç¡åºè²ï¼é¡µé¢åºè²å¤å±çé¢è²ï¼å½æå®å
¨åºçæ¶åï¼å®å
¨åºçé¢è²ä¸ºæ¤é¢è²ãé»è®¤ä¸è®¾ç½®ï¼å³éæï¼è¿æ¶åæ¾ç¤ºçé¢è²ä¼æ¯uni-appä¸è®¾ç½®çé¢è² |
| | | #### ç»ä»¶ææ§½ï¼ |
| | | > defaultï¼é»è®¤ææ§½ï¼é¡µé¢bodyå
容 |
| | | ### ä¸ãHeaderPageLayoutç»ä»¶ï¼å¸¦æå¤´é¨å¸å±ç页é¢å¤å±ç»ä»¶ï¼é常使ç¨å¨é¡µé¢çæå¤å± |
| | | #### ç»ä»¶å±æ§ï¼ |
| | | > gradientï¼booleanï¼é¡µé¢bodyé¨ååºè²æ¸åï¼å³æ¯å¦è®¾ç½®cssçbackground-image屿§ï¼é»è®¤false |
| | | |
| | | > gradient-valueï¼stringï¼é¡µé¢bodyé¨ååºè²æ¸åå¼ï¼å³cssçbackground-image屿§çå¼ï¼é»è®¤ä¸è®¾ç½®ï¼éç¨é»è®¤æ¸åè² |
| | | |
| | | > background-colorï¼stringï¼é¡µé¢bodyé¨ååºè²ï¼å¨gradient为falseçæ¶åæçæï¼é»è®¤ä¸è®¾ç½®ï¼å³éæ |
| | | |
| | | > base-background-colorï¼stringï¼åºç¡åºè²ï¼é¡µé¢åºè²å¤å±çé¢è²ï¼å½æå®å
¨åºçæ¶åï¼å®å
¨åºçé¢è²ä¸ºæ¤é¢è²ãå½ä¸è®¾ç½®å¤´é¨åºè²çæ¶åï¼å¤´é¨çåºè²ä¹ä¸ºæ¤é¢è²ãé»è®¤ä¸è®¾ç½®ï¼å³éæï¼è¿æ¶åæ¾ç¤ºçé¢è²ä¼æ¯uni-appä¸è®¾ç½®çé¢è² |
| | | |
| | | > safetyï¼booleanï¼å®å
¨åºï¼é¡µé¢å
容æ¾ç¤ºçæ¶åï¼æ¯å¦å°å®å
¨åºæé¤ï¼é»è®¤trueï¼å³æé¤å®å
¨åº |
| | | |
| | | > fullï¼booleanï¼æ¯å¦æ´å±ï¼é»è®¤trueï¼å¦æç»ä»¶ä¸æ¯ç¨å¨é¡µé¢çæå¤å±ï¼åºè¯¥è®¾ç½®ä¸ºfalseï¼è¿æ¶åç»ä»¶ç宽é«ä¸ºç¶å®¹å¨ç100% |
| | | |
| | | > titleï¼stringï¼å¤´é¨æ é¢ï¼é»è®¤âTitleâ |
| | | |
| | | > header-colorï¼stringï¼å¤´é¨æåé¢è²ï¼é»è®¤â#212121â |
| | | |
| | | > header-gradientï¼booleanï¼å¤´é¨åºè²æ¸åï¼å³æ¯å¦è®¾ç½®cssçbackground-image屿§ï¼é»è®¤false |
| | | |
| | | > header-gradient-valueï¼stringï¼å¤´é¨åºè²æ¸åå¼ï¼å³cssçbackground-image屿§çå¼ï¼é»è®¤ä¸è®¾ç½®ï¼éç¨é»è®¤æ¸åè² |
| | | |
| | | > header-background-colorï¼stringï¼åºè²ï¼å¨header-gradient为falseçæ¶åæçæï¼é»è®¤ä¸è®¾ç½®ï¼å³éæ |
| | | #### ç»ä»¶ææ§½ï¼ |
| | | > defaultï¼é»è®¤ææ§½ï¼é¡µé¢bodyå
容 |
| | | |
| | | > footerï¼é¡µèææ§½ï¼é¡µé¢åºé¨å
容 |
| | | |
| | | > headerleftï¼é¡µé¢æ 颿 左侧å
容 |
| | | |
| | | > headerrightï¼é¡µé¢æ 颿 å³ä¾§å
容 |
| | | ### ç»ä»¶äºä»¶ï¼ |
| | | > headerclickï¼æ 颿 å·¦å³ä¸¤ä¾§çç¹å»äºä»¶ |
| | | >> 第ä¸ä¸ªåæ°ï¼å¼ä¸ºâleftâï¼è¡¨ç¤ºå·¦ä¾§çç¹å»ï¼å¼ä¸ºârightâï¼è¡¨ç¤ºå³ä¾§çç¹å» |
| | | ### ç»ä»¶æ¹æ³ï¼ |
| | | > getBodyHeightï¼è¿åç»ä»¶bodyçé«åº¦ï¼numberç±»åï¼åä½pxã |
| | | >> æä¾æ¤æ¹æ³çåå å¨äºuni-app使ç¨flexå¸å±çæ¶åï¼appåºç¨å¨flexæ ç¾å®¹å¨å
é¨flex-growï¼flexï¼çèªéåºæ ç¾ä¸çæ ç¾ï¼æ æ³éè¿%设置é«åº¦ã |
| | | >> èæ¬ç»ä»¶ä½¿ç¨äºflexå¸å±ï¼ç»ä»¶çbodyé¨å使ç¨çå°±æ¯flex-growèªéåº |
| | | ### åãDefaultHeaderPageLayoutç»ä»¶ï¼é»è®¤çå¸¦ææ é¢æ ç页é¢å¤å±ç»ä»¶ï¼é常使ç¨å¨ç»å½ä¹å页é¢çæå¤å± |
| | | #### ç»ä»¶å±æ§ï¼ |
| | | > titleï¼stringï¼å¤´é¨æ é¢ï¼é»è®¤âTitleâ |
| | | |
| | | > back-customï¼booleanï¼æ¯å¦å¼å¯è¿åäºä»¶èªå®ä¹ï¼é»è®¤falseä¸å¼å¯ |
| | | #### ç»ä»¶äºä»¶ï¼ |
| | | > backï¼èªå®ä¹è¿åäºä»¶ |
| | | |
| | | #### ç»ä»¶ææ§½ï¼ |
| | | > defaultï¼é»è®¤ææ§½ï¼é¡µé¢bodyå
容 |
| | | |
| | | > footerï¼é¡µèææ§½ï¼é¡µé¢åºé¨å
容 |
| | | ### ç»ä»¶æ¹æ³ï¼ |
| | | > getBodyHeightï¼åHeaderPageLayoutç»ä»¶ |
| | | |
| | | ### äºãEasyPickerï¼ç®æçåééæ©å¨ |
| | | #### ç»ä»¶å±æ§ï¼ |
| | | > visibleï¼booleanï¼æ¯å¦æ¾ç¤ºï¼é»è®¤false å¯ç¨è¯æ³ç³.sync |
| | | |
| | | > listï¼Arrayï¼éæ©é¡¹æ°æ® |
| | | |
| | | > value-fieldï¼stringï¼é项valueåæ®µï¼é»è®¤âvalueâ |
| | | |
| | | > label-fieldï¼stringï¼é项æ¾ç¤ºlabelåæ®µï¼é»è®¤âlabelâ |
| | | #### ç»ä»¶äºä»¶ï¼ |
| | | > selectï¼éæ©äºä»¶ï¼è¿åï¼ |
| | | >> 第ä¸ä¸ªåæ°ï¼éä¸é¡¹çvalueå¼ |
| | | >> 第äºä¸ªåæ°ï¼æ´ä¸ªéä¸é¡¹ |
| | | >> 第ä¸ä¸ªåæ°ï¼éä¸é¡¹å¨é项ä¸çä½ç½® |
| | | |
| | | ### å
ãActionUserRowç»ä»¶ï¼æ¾ç¤ºæä½åï¼æ´æ°2ï¼ |
| | | |
| | | ### ä¸ãScanInputFormItemç»ä»¶ï¼æ«ç è¾å
¥è¡¨åï¼æ´æ°2ï¼ |
| | | #### ç»ä»¶å±æ§ï¼ |
| | | > typeï¼stringï¼è¾å
¥æ¡typeï¼å¯éå¼ï¼numberãidcardãdigitãpasswordãtextï¼é»è®¤âtextâ |
| | | |
| | | > placeholderï¼stringï¼ç©ºç½®å 使åï¼é»è®¤â请è¾å
¥...â |
| | | |
| | | > labelï¼stringï¼æ ç¾åç§°ï¼é»è®¤ç©ºå符串 |
| | | |
| | | > msgï¼stringï¼æç¤ºä¿¡æ¯ï¼é»è®¤ç©ºå符串 |
| | | |
| | | > msg-typeï¼stringï¼æç¤ºä¿¡æ¯ç±»åï¼å¯éå¼ï¼errorï¼é误信æ¯ï¼çº¢è²ï¼ãinfoï¼å¸¸è§ä¿¡æ¯ï¼èè²ï¼ï¼é»è®¤âerrorâ |
| | | |
| | | > value/v-modelï¼string/number/null |
| | | |
| | | > has-searchï¼booleanï¼æ¯å¦æ¾ç¤ºæç´¢æé®ï¼é»è®¤false䏿¾ç¤º |
| | | |
| | | > disabledï¼booleanï¼æ¯å¦ç¦ç¨ï¼é»è®¤falseä¸ç¦ç¨ |
| | | #### ç»ä»¶äºä»¶ï¼ |
| | | > searchï¼æç´¢æé®ç¹å»äºä»¶ |
| | | |
| | | > clearï¼æ¸
é¤iconç¹å»äºä»¶ |
| | | |
| | | ### å
«ãEasySelectFormItemç»ä»¶ï¼åéä¸æè¡¨åï¼æ´æ°2ï¼ |
| | | #### ç»ä»¶å±æ§ï¼ |
| | | > placeholderï¼stringï¼ç©ºç½®å 使åï¼é»è®¤â请è¾å
¥...â |
| | | |
| | | > labelï¼stringï¼æ ç¾åç§°ï¼é»è®¤ç©ºå符串 |
| | | |
| | | > msgï¼stringï¼æç¤ºä¿¡æ¯ï¼é»è®¤ç©ºå符串 |
| | | |
| | | > msg-typeï¼stringï¼æç¤ºä¿¡æ¯ç±»åï¼å¯éå¼ï¼errorï¼é误信æ¯ï¼çº¢è²ï¼ãinfoï¼å¸¸è§ä¿¡æ¯ï¼èè²ï¼ï¼é»è®¤âerrorâ |
| | | |
| | | > value/v-modelï¼string/number/boolean/null |
| | | |
| | | > listï¼Arrayï¼éæ©é¡¹æ°æ® |
| | | |
| | | > value-fieldï¼stringï¼é项valueåæ®µï¼é»è®¤âvalueâ |
| | | |
| | | > label-fieldï¼stringï¼é项æ¾ç¤ºlabelåæ®µï¼é»è®¤âlabelâ |
| | | |
| | | > disabledï¼booleanï¼æ¯å¦ç¦ç¨ï¼é»è®¤falseä¸ç¦ç¨ |
| | | #### ç»ä»¶äºä»¶ï¼ |
| | | > selectï¼é项ç¹å»äºä»¶ |
| | | |
| | | > clearï¼æ¸
é¤iconç¹å»äºä»¶ |
| | | |
| | | ----- |
| | | |
| | | ## èçæå°ä½¿ç¨ |
| | | ### èä¾ |
| | | ~~~ |
| | | import BluePrint from '@/pages/print/bluePrint.js' |
| | | |
| | | const onPrint = function(){ |
| | | let ptintContext = [ |
| | | {type:'text',x:0,y:0,text:'',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:0,y:0,text:'',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:0,y:0,text:'',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | /* 以ä¸ç©ºæ°æ®ï¼ä¸ºé²æ¢ä¸¢å
æ¶æå°ä¸æ£å¸¸ */ |
| | | {type:'text',x:230,y:10,text:'PART:',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:300,y:10,text:'HFAHFOAJFOAJFO',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:230,y:95,text:'NAME:',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:300,y:95,text:'SAHFAKHFKAHFKANFK',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:230,y:180,text:'LOTS:',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:300,y:180,text:'LOTSLOTSLOTSLOTSLOTS',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:13,y:250,text:'SIZE:',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:83,y:250,text:'SIZESIZESIZESIZESIZESIZESIZESIZE',size:2,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'text',x:105,y:315,text:'MAKINO J(CHINA) CO.LTD',size:3,rotate:0,bold:0,underline:false,reverse:false}, |
| | | {type:'qr',x:10,y:10,text:'asndkajdkjalda-barcode',width:8,level:1} |
| | | ] |
| | | BluePrint.print(this.$store,ptintContext).then(()=>{ |
| | | console.log('printæåè°ç¨') |
| | | }).catch(()=>{ |
| | | console.log('printè°ç¨åºé') |
| | | }) |
| | | } |
| | | ~~~ |
| | | ### æå°æ°æ®å段说æ |
| | | > typeï¼stringï¼å¯éå¼ï¼(line)ç´çº¿ã(text)æåã(qr)äºç»´ç ã(bar)æ¡å½¢ç |
| | | |
| | | > xï¼numberï¼æå°æåãäºç»´ç ãæ¡å½¢ç æ¶åï¼èµ·å§ç¹æ¨ªåæ |
| | | |
| | | > yï¼numberï¼æå°æåãäºç»´ç ãæ¡å½¢ç æ¶åï¼èµ·å§ç¹çºµåæ |
| | | |
| | | > x1ï¼numberï¼æå°ç´çº¿æ¶åï¼èµ·å§ç¹æ¨ªåæ |
| | | |
| | | > y1ï¼numberï¼æå°ç´çº¿æ¶åï¼èµ·å§ç¹çºµåæ |
| | | |
| | | > x2ï¼numberï¼æå°ç´çº¿æ¶åï¼ç»æç¹æ¨ªåæ |
| | | |
| | | > y2ï¼numberï¼æå°ç´çº¿æ¶åï¼ç»æç¹çºµåæ |
| | | |
| | | > textï¼stringï¼æå°æåãäºç»´ç ãæ¡å½¢ç æ¶åï¼æå°å
容 |
| | | |
| | | > sizeï¼numberï¼æå°æåæ¶çåä½å¤§å°ï¼å¯éå¼ 20/1/2/3/4/5/6/7 ï¼å
¶ä»çæ¶åé»è®¤ä¸º2 |
| | | |
| | | > widthï¼number |
| | | >> æå°ç´çº¿ï¼è¡¨ç¤ºçº¿å®½ |
| | | >> æå°äºç»´ç ï¼è¡¨ç¤ºäºç»´ç å»åº¦å¼ï¼ä¸æ¯çæçäºç»´ç ç宽度ï¼åå¼ï¼2å°15ï¼ |
| | | >> æå°æ¡å½¢ç ï¼è¡¨ç¤ºæ¡å½¢ç å»åº¦å¼ï¼ä¸æ¯çæçæ¡å½¢ç ç宽度ï¼åå¼ï¼2å°6ï¼ |
| | | |
| | | > levelï¼numberï¼æå°äºç»´ç æ¶åï¼çº éç级ï¼åå¼ï¼0å°20ï¼ |
| | | |
| | | > heightï¼numberï¼æå°æ¡å½¢ç æ¶åï¼é«åº¦ï¼åå¼ï¼1å°255ï¼ |
| | | |
| | | > barTypeï¼numberï¼æå°æ¡å½¢ç æ¶åï¼æ¡å½¢ç ç±»åï¼å¯éå¼ï¼ |
| | | >> 0ï¼CODE39ï¼ |
| | | >> 1ï¼CODE128ï¼ |
| | | >> 2ï¼CODE93ï¼ |
| | | >> 3ï¼CODEBARï¼ |
| | | >> 4ï¼EAN8ï¼ |
| | | >> 5ï¼EAN13ï¼ |
| | | >> 6ï¼UPCA; |
| | | >> 7ï¼UPC-E; |
| | | >> 8ï¼ITF |
| | | |
| | | > rotateï¼numberï¼æå°æåæ¶åï¼éæ©è§åº¦ |
| | | |
| | | > boldï¼numberï¼æå°æåæ¶åï¼æ¯å¦å ç²(0å¦1æ¯) |
| | | |
| | | > underlineï¼booleanï¼æå°æåæ¶åï¼ä¸å线设置 |
| | | |
| | | > reverseï¼booleanï¼æå°æåæ¶åï¼å转设置 |
| | | |
| | | ------- |
| | | ## 页é¢è¯´æ |
| | | ### /pages/start/index |
| | | > å¯å¨é¡µï¼æ ¹æ®é¡¹ç®éæ±è°æ´ |
| | | |
| | | ### /pages/login/index |
| | | > ç»å½é¡µï¼ä¸è¬ä¸ä¼å¤§æ¹å¨äºï¼æ ¹æ®é¡¹ç®éæ±åå¾®è° |
| | | |
| | | ### /pages/home/index |
| | | > ç»å½åçé¦é¡µï¼æ ¹æ®é¡¹ç®éæ±ï¼å¾å¯è½åå±é¨è°æ´ |
| | | |
| | | ### /pages/baseTask/out |
| | | > å
¥åºé¡µé¢ï¼æ ¹æ®é¡¹ç®éæ±è°æ´ |
| | | |
| | | ### /pages/baseTask/out |
| | | > åºåºé¡µé¢ï¼æ ¹æ®é¡¹ç®éæ±è°æ´ |
| | | |
| | | ### /pages/print/bluetoothConnection |
| | | > ç©èèèçæå°æºï¼èçè¿æ¥é¡µé¢ï¼å 乿 éæ¹å¨ |
| | | |
| | | ### /pages/setting/host |
| | | > å端æ¥å£è°ç¨åå设置页é¢ï¼å 乿 éæ¹å¨ |
| | | |
| | | ----- |
| | | ## json-server åç«¯æ°æ®moke |
| | | ### å¯å¨é
ç½®ï¼å¦å¾å¨package.jsonä¸ï¼ç¶åå½ä»¤è¡è¿è¡ |
| | | ~~~ |
| | | npm run api |
| | | ~~~ |
| | | > --port 3012 端å£å·è®¾ç½®ä¸º3012 |
| | | > --host 0.0.0.0 å¼å¯ipå°åè®¿é® |
| | | <img src="./mdImgs/1665970038354.jpg" style="width:100%" /> |
| | | |
| | | ### RESET Api |
| | | > GET /demo è·åå
¨é¨å表 |
| | | > GET /demo/æ°æ®id è·å详æ
|
| | | > POST /demo å¢å |
| | | > PUT /demo/æ°æ®id æ´æ¡æ°æ®æ¿æ¢ |
| | | > PATCH /demo/æ°æ®id ä¿®æ¹æä¸ªåæ®µ |
| | | > DELETE /demo/æ°æ®id å é¤ |
| | | ### æ¡ä»¶æ¥è¯¢åå页æ¥è¯¢ |
| | | #### æ¡ä»¶æ¥è¯¢ï¼å段åç§°åå¢å |
| | | > _gte 大äºçäº |
| | | > _lte å°äºçäº |
| | | > _ne ä¸çäº |
| | | > _like å
å« |
| | | |
| | | #### å页æ¥è¯¢ |
| | | > _page 页ç ï¼ä»1å¼å§ |
| | | > _limit æ¯é¡µå¤å°æ¡æ°æ® |
| | | > _start æ°æ®ç´¢å¼å¼å§ï¼ä»0å¼å§ |
| | | > _end æ°æ®ç´¢å¼ç»æï¼ä¸å
å«endç´¢å¼ |
| | | |
| | | æ¡ä¾ï¼GETæ¨¡ç³æ¥æ¾å段name |
| | | ~~~ |
| | | /demo?name_like=value |
| | | ~~~ |
| | | |
| | | ------- |
| | | ## æ°å»ºé¡µé¢æ¥éª¤ |
| | | #### 1ãé
ç½®pages.json |
| | | #### 2ãé
ç½®config/index.jsä¸çpath |
| | | #### 3ãé¦é¡µé
置页é¢å
¥å£ï¼æ ¹æ®éè¦ï¼ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "users": [ |
| | | { |
| | | "id": 1, |
| | | "name": "å°çº¢" |
| | | } |
| | | ], |
| | | "demo": [ |
| | | { |
| | | "text1": "æå1", |
| | | "number": "58", |
| | | "id": 1 |
| | | }, |
| | | { |
| | | "id": 2, |
| | | "text1": "æå21", |
| | | "text2": "æå22", |
| | | "text3": "æå23", |
| | | "number": "52" |
| | | }, |
| | | { |
| | | "id": 3, |
| | | "text1": "æå31", |
| | | "text2": "æå32", |
| | | "text3": "æå33", |
| | | "number": "1043" |
| | | }, |
| | | { |
| | | "id": 4, |
| | | "text1": "æå41", |
| | | "text2": "æå42", |
| | | "text3": "æå43", |
| | | "number": 1004 |
| | | }, |
| | | { |
| | | "id": 5, |
| | | "text1": "æå51", |
| | | "text2": "æå52", |
| | | "text3": "æå53", |
| | | "number": 1005 |
| | | }, |
| | | { |
| | | "id": 6, |
| | | "text1": "æå61", |
| | | "text2": "æå62", |
| | | "text3": "æå63", |
| | | "number": 1006 |
| | | }, |
| | | { |
| | | "id": 7, |
| | | "text1": "æå71", |
| | | "text2": "æå72", |
| | | "text3": "æå73", |
| | | "number": 1007 |
| | | }, |
| | | { |
| | | "id": 8, |
| | | "text1": "æå81", |
| | | "text2": "æå82", |
| | | "text3": "æå83", |
| | | "number": 1008 |
| | | }, |
| | | { |
| | | "id": 91, |
| | | "text1": "æå91", |
| | | "text2": "æå92", |
| | | "text3": "æå93", |
| | | "number": 1009 |
| | | }, |
| | | { |
| | | "id": 10, |
| | | "text1": "æå101", |
| | | "text2": "æå102", |
| | | "text3": "æå103", |
| | | "number": 1010 |
| | | }, |
| | | { |
| | | "id": 11, |
| | | "text1": "æå111", |
| | | "text2": "æå112", |
| | | "text3": "æå113", |
| | | "number": 1011 |
| | | }, |
| | | { |
| | | "id": 12, |
| | | "text1": "æå121", |
| | | "text2": "æå122", |
| | | "text3": "æå123", |
| | | "number": 1012 |
| | | }, |
| | | { |
| | | "id": 13, |
| | | "text1": "æå131", |
| | | "text2": "æå132", |
| | | "text3": "æå133", |
| | | "number": 1013 |
| | | }, |
| | | { |
| | | "id": 14, |
| | | "text1": "æå141", |
| | | "text2": "æå142", |
| | | "text3": "æå143", |
| | | "number": 1014 |
| | | }, |
| | | { |
| | | "id": 15, |
| | | "text1": "æå151", |
| | | "text2": "æå152", |
| | | "text3": "æå153", |
| | | "number": 1015 |
| | | }, |
| | | { |
| | | "id": 16, |
| | | "text1": "æå161", |
| | | "text2": "æå162", |
| | | "text3": "æå163", |
| | | "number": 1016 |
| | | }, |
| | | { |
| | | "id": 17, |
| | | "text1": "æå171", |
| | | "text2": "æå172", |
| | | "text3": "æå173", |
| | | "number": 1017 |
| | | }, |
| | | { |
| | | "id": 18, |
| | | "text1": "æå181", |
| | | "text2": "æå182", |
| | | "text3": "æå183", |
| | | "number": 1018 |
| | | }, |
| | | { |
| | | "id": 19, |
| | | "text1": "æå191", |
| | | "text2": "æå192", |
| | | "text3": "æå193", |
| | | "number": 1019 |
| | | }, |
| | | { |
| | | "id": 20, |
| | | "text1": "æå201", |
| | | "text2": "æå202", |
| | | "text3": "æå203", |
| | | "number": 1020 |
| | | }, |
| | | { |
| | | "id": 21, |
| | | "text1": "æå211", |
| | | "text2": "æå212", |
| | | "text3": "æå213", |
| | | "number": 1021 |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | |
| | | // ç¹å°ç¹æ¬è¿ /api/wcsToWms/pointHandlingTask |
| | | export function pointHandlingTask (data) { |
| | | return request({ |
| | | url: `/api/wcsToWms/pointHandlingTask`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // åæ¶åé弿¥è¯·æ±ç次æ°ï¼é²æ¢ä¸æ¬¡ç¹å»æå¤æ¬¡è¯·æ± |
| | | let ajaxTime = 0; |
| | | // export const baseUrl = 'http://10.10.40.166:2066' // http://localhost:5005 |
| | | export const baseUrl = 'http://192.168.1.100:2001' |
| | | // export const baseUrl = 'http://192.168.1.100:2001' |
| | | |
| | | // å
Œ
±çrequestæ¹æ³ |
| | | function request(option) { |
| | | //请æ±å¤´. |
| | | const header = {}; |
| | | // è¿åæ¹å¼ |
| | | header['Content-Type'] = option.contentType || 'application/json'; |
| | | // 夿æ¯å¦æ¯ç»å½è¯·æ±ï¼ä¸æ¯å¨headerä¸å ä¸token |
| | | if (option.url != '/login') { |
| | | header['Authorization'] = uni.getStorageSync('user_token') ? 'Bearer ' + uni.getStorageSync('user_token') : ''; |
| | | header['x-Authorization'] = uni.getStorageSync('refresh_token') ? 'Bearer ' + uni.getStorageSync('refresh_token') : ''; |
| | | header.Authorization = uni.getStorageSync('user_token') ? 'Bearer ' + uni.getStorageSync('user_token') : '' |
| | | } |
| | | ajaxTime++; |
| | | // æ¾ç¤ºå è½½ä¸ææ |
| | | uni.showLoading({ |
| | | title: 'å è½½ä¸...', |
| | | mask: true |
| | | }); |
| | | |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: baseUrl + option.url, |
| | | method: option.method || 'POST', |
| | | data: option.data || {}, |
| | | header, |
| | | timeout: 10000, |
| | | success: (res) => { |
| | | if(res.statusCode == 200) { |
| | | console.log(res,'res'); |
| | | const result = res.data; |
| | | if (result.code === 200||!Boolean(result.code)) { |
| | | // 请æ±ç¶ææ£å¸¸ï¼è¿åæ°æ® |
| | | resolve(result) |
| | | } else if (result.code === 401) { |
| | | //token失æï¼æ¸
é¤tokenå
³éå½å页é¢ï¼è·³è½¬å°ç»å½ |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'token失æï¼è¯·éæ°ç»é', |
| | | showCancel: false, |
| | | success:()=>{ |
| | | // æ¸
æ¥token |
| | | uni.removeStorageSync('token') |
| | | // 跳转å°ç»å½ |
| | | uni.redirectTo({ |
| | | url: '/pages/login/index' |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: `${result.code}:${JSON.stringify(result.message)}`, |
| | | showCancel: false |
| | | }) |
| | | // å¼å¸¸ï¼è¿åå¼å¸¸codeåmessage |
| | | reject(result) |
| | | } |
| | | |
| | | }else { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: `${res.statusCode}:${JSON.stringify(res.errMsg)}`, |
| | | showCancel: false |
| | | }) |
| | | |
| | | const {statusCode,errMsg} = res; |
| | | reject({statusCode,errMsg}) |
| | | } |
| | | }, |
| | | fail: (err) => { |
| | | // 请æ±å¤±è´¥ |
| | | reject(err); |
| | | }, |
| | | complete: () => { |
| | | // 请æ±å®æåå¤æç¶æ |
| | | ajaxTime--; |
| | | // åªæå¼çäº0ï¼ææ¸
é¤è½¬åææ |
| | | if (ajaxTime == 0) { |
| | | uni.hideLoading() |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | export default request |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // åæ¶åé弿¥è¯·æ±ç次æ°ï¼é²æ¢ä¸æ¬¡ç¹å»æå¤æ¬¡è¯·æ± |
| | | let ajaxTime = 0; |
| | | export const baseUrl = 'http://127.0.0.1:18000' |
| | | |
| | | |
| | | // å
Œ
±çrequestæ¹æ³ |
| | | function request(option) { |
| | | //请æ±å¤´. |
| | | const header = {}; |
| | | // è¿åæ¹å¼ |
| | | header['Content-Type'] = option.contentType || 'application/json'; |
| | | // 夿æ¯å¦æ¯ç»å½è¯·æ±ï¼ä¸æ¯å¨headerä¸å ä¸token |
| | | if (option.url != '/login') { |
| | | header['Authorization'] = uni.getStorageSync('user_token') ? 'Bearer ' + uni.getStorageSync('user_token') : ''; |
| | | header['x-Authorization'] = uni.getStorageSync('refresh_token') ? 'Bearer ' + uni.getStorageSync('refresh_token') : ''; |
| | | header.Authorization = uni.getStorageSync('user_token') ? 'Bearer ' + uni.getStorageSync('user_token') : '' |
| | | } |
| | | ajaxTime++; |
| | | // æ¾ç¤ºå è½½ä¸ææ |
| | | uni.showLoading({ |
| | | title: 'å è½½ä¸...', |
| | | mask: true |
| | | }); |
| | | |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: baseUrl + option.url, |
| | | method: option.method || 'POST', |
| | | data: option.data || {}, |
| | | header, |
| | | timeout: 10000, |
| | | success: (res) => { |
| | | if(res.statusCode == 200) { |
| | | console.log(res,'res'); |
| | | const result = res.data; |
| | | if (result.code === 200||!Boolean(result.code)) { |
| | | // 请æ±ç¶ææ£å¸¸ï¼è¿åæ°æ® |
| | | resolve(result) |
| | | } else if (result.code === 401) { |
| | | //token失æï¼æ¸
é¤tokenå
³éå½å页é¢ï¼è·³è½¬å°ç»å½ |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'token失æï¼è¯·éæ°ç»é', |
| | | showCancel: false, |
| | | success:()=>{ |
| | | // æ¸
æ¥token |
| | | uni.removeStorageSync('token') |
| | | // 跳转å°ç»å½ |
| | | uni.redirectTo({ |
| | | url: '/pages/login/index' |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: `${result.code}:${JSON.stringify(result.message)}`, |
| | | showCancel: false |
| | | }) |
| | | // å¼å¸¸ï¼è¿åå¼å¸¸codeåmessage |
| | | reject(result) |
| | | } |
| | | |
| | | }else { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: `${res.statusCode}:${JSON.stringify(res.errMsg)}`, |
| | | showCancel: false |
| | | }) |
| | | |
| | | const {statusCode,errMsg} = res; |
| | | reject({statusCode,errMsg}) |
| | | } |
| | | }, |
| | | fail: (err) => { |
| | | // 请æ±å¤±è´¥ |
| | | reject(err); |
| | | }, |
| | | complete: () => { |
| | | // 请æ±å®æåå¤æç¶æ |
| | | ajaxTime--; |
| | | // åªæå¼çäº0ï¼ææ¸
é¤è½¬åææ |
| | | if (ajaxTime == 0) { |
| | | uni.hideLoading() |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | export default request |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // åæ¶åé弿¥è¯·æ±ç次æ°ï¼é²æ¢ä¸æ¬¡ç¹å»æå¤æ¬¡è¯·æ± |
| | | let ajaxTime = 0; |
| | | export const baseUrl = 'http://127.0.0.1:18000' |
| | | |
| | | |
| | | // å
Œ
±çrequestæ¹æ³ |
| | | function request(option) { |
| | | //请æ±å¤´. |
| | | const header = {}; |
| | | // è¿åæ¹å¼ |
| | | header['Content-Type'] = option.contentType || 'application/json'; |
| | | // 夿æ¯å¦æ¯ç»å½è¯·æ±ï¼ä¸æ¯å¨headerä¸å ä¸token |
| | | if (option.url != '/login') { |
| | | header['Authorization'] = uni.getStorageSync('user_token') ? 'Bearer ' + uni.getStorageSync('user_token') : ''; |
| | | header['x-Authorization'] = uni.getStorageSync('refresh_token') ? 'Bearer ' + uni.getStorageSync('refresh_token') : ''; |
| | | header.Authorization = uni.getStorageSync('user_token') ? 'Bearer ' + uni.getStorageSync('user_token') : '' |
| | | } |
| | | ajaxTime++; |
| | | // æ¾ç¤ºå è½½ä¸ææ |
| | | uni.showLoading({ |
| | | title: 'å è½½ä¸...', |
| | | mask: true |
| | | }); |
| | | |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: baseUrl + option.url, |
| | | method: option.method || 'POST', |
| | | data: option.data || {}, |
| | | header, |
| | | timeout: 10000, |
| | | success: (res) => { |
| | | if(res.statusCode == 200) { |
| | | console.log(res,'res'); |
| | | const result = res.data; |
| | | if (result.code === 200||!Boolean(result.code)) { |
| | | // 请æ±ç¶ææ£å¸¸ï¼è¿åæ°æ® |
| | | resolve(result) |
| | | } else if (result.code === 401) { |
| | | //token失æï¼æ¸
é¤tokenå
³éå½å页é¢ï¼è·³è½¬å°ç»å½ |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'token失æï¼è¯·éæ°ç»é', |
| | | showCancel: false, |
| | | success:()=>{ |
| | | // æ¸
æ¥token |
| | | uni.removeStorageSync('token') |
| | | // 跳转å°ç»å½ |
| | | uni.redirectTo({ |
| | | url: '/pages/login/index' |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: `${result.code}:${JSON.stringify(result.message)}`, |
| | | showCancel: false |
| | | }) |
| | | // å¼å¸¸ï¼è¿åå¼å¸¸codeåmessage |
| | | reject(result) |
| | | } |
| | | |
| | | }else { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: `${res.statusCode}:${JSON.stringify(res.errMsg)}`, |
| | | showCancel: false |
| | | }) |
| | | |
| | | const {statusCode,errMsg} = res; |
| | | reject({statusCode,errMsg}) |
| | | } |
| | | }, |
| | | fail: (err) => { |
| | | // 请æ±å¤±è´¥ |
| | | reject(err); |
| | | }, |
| | | complete: () => { |
| | | // 请æ±å®æåå¤æç¶æ |
| | | ajaxTime--; |
| | | // åªæå¼çäº0ï¼ææ¸
é¤è½¬åææ |
| | | if (ajaxTime == 0) { |
| | | uni.hideLoading() |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | export default request |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | |
| | | // æ ¹æ®æçç¼å·è·åç©ææçç»å®ä¿¡æ¯ |
| | | export function getForContainerCode (data) { |
| | | return request({ |
| | | url: `/api/materialContainer/getForContainerNo?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // æ ¹æ®æçç¼å·è·åæçæçç»å®ä¿¡æ¯ |
| | | export function getForEmptyContainerNo (data) { |
| | | return request({ |
| | | url: `/api/materialContainer/getForEmptyContainerNo?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | |
| | | // æ ¹æ®ç©æç è·åç©æä¿¡æ¯ |
| | | export function getForMaterialNo (data) { |
| | | return request({ |
| | | url: `/api/material/getForMaterialNo?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // ç»ç |
| | | export function bindMaterialContainer(data) { |
| | | return request({ |
| | | url: `/api/materialContainer/add`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 忣 |
| | | export function pickPipeSpecCode(data) { |
| | | return request({ |
| | | url: `/api/v1/pipelinelems/workplanpublic/pick`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // å
¥åº 1æ¯èªå¶ä»¶ç»çå
¥åºï¼ 4æ¯å¤åä»¶ç»çå
¥åºï¼ |
| | | export function addInBound(data) { |
| | | return request({ |
| | | url: `/api/inAndOutOrder/addInBound`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | //èªå¶ä»¶å
¥åº |
| | | export function addInVirtualPlace(data) { |
| | | return request({ |
| | | url: `/api/inAndOutOrder/addInVirtualPlace`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | |
| | | //å¤åä»¶å
¥åº |
| | | export function addInVirtualWxjPlace(data) { |
| | | return request({ |
| | | url: `/api/inAndOutOrder/addInBound`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | // æµè¯PLC触åçæå
¥åºä»»å¡ /api/wcsToWms/addAGVTask |
| | | export function addAGVTask(data) { |
| | | return request({ |
| | | url: `/api/wcsToWms/addAGVTask`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | |
| | | // 空æå
¥åº |
| | | export function addEmptyContainerReturn(data) { |
| | | return request({ |
| | | url: `/api/inAndOutOrder/emptyContainerReturn`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | |
| | | // å¹³åºå
¥åº |
| | | export function AddInBoundForFlat(data) { |
| | | return request({ |
| | | url: `/api/inAndOutOrder/AddInBoundForFlat`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | |
| | | // è·åæä¸¾ä¿¡æ¯ /api/wcsToWms/callEmptyContainer |
| | | export function callEmptyContainer (data) { |
| | | return request({ |
| | | url: `/api/wcsToWms/callEmptyContainer`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | |
| | | // è·åæä¸¾ä¿¡æ¯ /api/sysEnumData/list |
| | | export function getSysEnumData (data) { |
| | | return request({ |
| | | url: `/api/sysDictType/dataList?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ ¹æ®æçç¼å·è·åæçä¿¡æ¯ |
| | | export function getContainerInfo (data) { |
| | | return request({ |
| | | url: `/api/container/detail?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ ¹æ®åºåºå·è·ååºä½å表 /api/place/getPlaceListByArea |
| | | export function getPalceList (data) { |
| | | return request({ |
| | | url: `/api/place/getPlaceListByArea?${qs.stringify(data)}`, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | |
| | | // æ ¹æ®åºåºå·è·ååºåºä¿¡æ¯ /api/area/list |
| | | export function getAreaInfo(data) { |
| | | return request({ |
| | | url: `/api/area/list?${qs.stringify(data)}`, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | // å°æ ç»å®åºåºä¿¡æ¯ /api/area/list |
| | | export function getAreaListContaninerBind(data) { |
| | | return request({ |
| | | url: `/api/area/getAreaList?${qs.stringify(data)}`, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | |
| | | // æ ¹æ®åºä½idè·åç©æä¿¡æ¯ /api/place/getMaterialDetail |
| | | export function getMaterialDetail(data) { |
| | | return request({ |
| | | url: `/api/place/getMaterialDetail?${qs.stringify(data)}`, |
| | | method: 'get', |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | |
| | | // æ ¹æ®æçç¼å·è·åæçåºä½ç»å®ä¿¡æ¯ api/container/getContainerPlaceInfo |
| | | export function getContainerPlaceInfo (data) { |
| | | return request({ |
| | | url: `/api/container/getContainerPlaceInfo?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æçæä½ |
| | | export function containerHandle (data) { |
| | | return request({ |
| | | url: `/api/container/containerHandle`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // æ ¹æ®åºä½å·è·åæçåºä½ä¿¡æ¯ |
| | | export function getContainerPlaceByPlace (data) { |
| | | return request({ |
| | | url: `/api/container/getContainerPlaceByPlace?${qs.stringify(data)}`, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | //ä¸é®è§£ç» |
| | | export function oneTouchUnBindHandle (data) { |
| | | return request({ |
| | | url: `/api/container/oneTouchUnBindHandle`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | //æ¥åºåç©æ |
| | | export function StockPageHandle(data) { |
| | | return request({ |
| | | url: `/api/materialStock/StockPage`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | //æ¥åºåç©æ+åºä½ä¿¡æ¯ |
| | | export function StockPageForPdaCwgl(data) { |
| | | return request({ |
| | | url: `/api/materialStock/StockPageForPdaCwgl`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | //æ¥åºåç©æ |
| | | export function placebatchUpdate (data) { |
| | | return request({ |
| | | url: `/api/place/batchUpdate`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | |
| | | // è·åæçä¿¡æ¯ /api/wmsinwarehouse/GetContainer |
| | | export function GetContainer (data) { |
| | | return request({ |
| | | url: `/api/wmsinwarehouse/GetContainer?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // è·ååæ®ä¿¡æ¯ /api/wmsinwarehouse/PadGetMaterial |
| | | export function GetMaterialPad (data) { |
| | | return request({ |
| | | url: `/api/wmsinwarehouse/PadGetMaterial?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // ç»ç /api/wmsinwarehouse/GroupDisk |
| | | export function GroupDisk (data) { |
| | | return request({ |
| | | url: `/api/wmsinwarehouse/GroupDisk`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // å
¥åº /api/wmsinwarehouse/PdaInWarehouse |
| | | export function PdaInWarehouse (data) { |
| | | return request({ |
| | | url: `/api/wmsinwarehouse/PdaInWarehouse`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 空æç»å® |
| | | export function emptyContainerBindKTHCPlace (data) { |
| | | return request({ |
| | | url: `/api/container/emptyContainerBindKTHCPlace`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | |
| | | // æ¥è¯¢å¼å¸¸å·¥ä½åºä½ |
| | | export function lisNoPage (data) { |
| | | return request({ |
| | | url: `/api/place/listNoPage`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // è·åå¼å¸¸ä»¶ä¿¡æ¯ |
| | | export function exceptionInfo (data) { |
| | | return request({ |
| | | url: `/api/wmsSortOrder/exceptionInfo?${qs.stringify(data)}`, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | // pda人工åºåº/èªå¨åºåº |
| | | export function outBound (data) { |
| | | return request({ |
| | | url: `/api/wmsSortOrder/exceptionHandle`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | |
| | | // è¿åç®æ å·¥ä½ |
| | | export function getLoadingDeliveryEnd (data) { |
| | | return request({ |
| | | url: `/api/loadingDelivery/LoadingDeliveryEnd?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // å建agvä»»å¡ |
| | | export function loadingDeliveryCreate (data) { |
| | | return request({ |
| | | url: `/api/loadingDelivery/LoadingDeliveryCreate`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // è£
æå®æ |
| | | export function loadingDeliveryContinueOne (data) { |
| | | return request({ |
| | | url: `/api/loadingDelivery/LoadingDeliveryContinueOne`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // åæå®æ |
| | | export function loadingDeliveryContinueTwo (data) { |
| | | return request({ |
| | | url: `/api/loadingDelivery/LoadingDeliveryContinueTwo`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | |
| | | // æ ¹æ®åæ®å·è·åæç» /api/pdareceiptorder/GetOrderDetail |
| | | export function GetOrderDetail (data) { |
| | | return request({ |
| | | url: `/api/pdareceiptorder/GetOrderDetail?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | |
| | | // å
¥åº /api/pdareceiptorder/ConfirmReceipt |
| | | export function confirmReceipt (data) { |
| | | return request({ |
| | | url: `/api/pdareceiptorder/ConfirmReceipt`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | |
| | | // è·åæä¸¾ä¿¡æ¯ /api/sysEnumData/list |
| | | export function materialStockListNoPage (data) { |
| | | return request({ |
| | | url: `/api/inAndOutOrder/getMaterialListNoPage?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // å¢å åºåºåæ® /api/inAndOutOrder/addRange |
| | | export function addRange (data) { |
| | | return request({ |
| | | url: `/api/inAndOutOrder/addRange`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | |
| | | // 空æåºåº /api/callempty/PdaContainerOut |
| | | export function PdaContainerOut (data) { |
| | | return request({ |
| | | url: `/api/callempty/PdaContainerOut`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | |
| | | // è·åæçä¿¡æ¯ /api/materialsorting/GetSortInfo |
| | | export function GetSortInfo (data) { |
| | | return request({ |
| | | url: `/api/materialsorting/GetSortInfo?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // åæ£ç¡®è®¤ /api/materialsorting/SortSure |
| | | export function SortSure (data) { |
| | | return request({ |
| | | url: `/api/materialsorting/SortSure`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // åºåºåæ¥è¯¢ /api/materialsorting/SortPdaPage |
| | | export function SortPdaPage (data) { |
| | | return request({ |
| | | url: `/api/materialsorting/SortPdaPage?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢åºåºåè·å¾åæ£åæç» /api/materialsorting/SortPdaDetailPage |
| | | export function SortPdaDetailPage(data) { |
| | | return request({ |
| | | url: `/api/materialsorting/SortPdaDetailPage?${qs.stringify(data)}`, |
| | | method: 'get' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/api/api.js' |
| | | import qs from 'qs' |
| | | |
| | | // æ¥è¯¢åæ£ä¿¡æ¯ |
| | | export function SortInfo (data) { |
| | | return request({ |
| | | url: `/api/wmsSortOrder/sortInfo`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢åæ®è¯¦æ
ä¿¡æ¯ |
| | | export function noPage (data) { |
| | | return request({ |
| | | url: `/api/InAndOutOrder/NoPage`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // æ·»å åæ£è¯¦æ
|
| | | export function addSortDetail (data) { |
| | | return request({ |
| | | url: `/api/wmsSortOrder/AddSortDetail`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { // launch.json é
ç½®äºå¯å¨è°è¯æ¶ç¸å
³è®¾ç½®ï¼configurationsä¸èç¹åç§°å¯ä¸º app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ |
| | | // launchtype项å¯é
ç½®å¼ä¸ºlocalæremote, local代表åç«¯è¿æ¬å°äºå½æ°ï¼remote代表å端è¿äºç«¯äºå½æ° |
| | | "version": "0.0", |
| | | "configurations": [{ |
| | | "app-plus" : |
| | | { |
| | | "launchtype" : "local" |
| | | }, |
| | | "default" : |
| | | { |
| | | "launchtype" : "local" |
| | | }, |
| | | "type" : "uniCloud" |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="action-user-row-compontent">æä½äººï¼{{userName}}</view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name:'actionUserRowCompontent', |
| | | data(){ |
| | | return { |
| | | userName:'' |
| | | } |
| | | }, |
| | | created() { |
| | | let _user = this.$store.getters['user/getUserInfo']; |
| | | this.userName = _user.name || _user.nickName; |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .action-user-row-compontent{ |
| | | text-align: right; |
| | | padding:8rpx 20rpx; |
| | | position: absolute; |
| | | box-sizing: border-box; |
| | | width: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: 1; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="auto-complete-scan-input-form-item-compontent"> |
| | | <view class="p-form-label" v-if="label"><text v-if="required" class="required-tag">*</text>{{label}}ï¼</view> |
| | | <view class="input-row" @tap.stop="onOpenPicker"> |
| | | <view class="mask" @tap.stop="" v-if="disabled"></view> |
| | | <view class="input-view"> |
| | | <text v-if="!innerValue" class="placeholder">{{placeholder}}</text> |
| | | <text v-else>{{innerValue}}</text> |
| | | </view> |
| | | <view class="close-view" @tap.stop="onClear" v-if="innerValue && clearable"> |
| | | <view class="close-circle"> |
| | | <u-icon |
| | | name="close" |
| | | size="11" |
| | | color="#ffffff" |
| | | customStyle="line-height: 12px" |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="msg-row" v-if="msg" :class="[msgType==='info'?'info-type':'']">{{msg}}</view> |
| | | |
| | | <u-popup mode="center" :show="pickerVisible" :closeOnClickOverlay="false" :safeAreaInsetTop="false" :safeAreaInsetBottom="false"> |
| | | <view class="auto-complete-picker-page" :style="{ |
| | | paddingTop:safetySize.top+'px', |
| | | paddingBottom:safetySize.bottom+'px', |
| | | paddingLeft:safetySize.left+'px', |
| | | paddingRight:safetySize.right+'px' |
| | | }"> |
| | | <view class="picker-input-box"> |
| | | <view class="input-row"> |
| | | <view class="input-view"> |
| | | <u--input |
| | | :clearable="true" |
| | | border="none" |
| | | :type="type" |
| | | :placeholder="placeholder" |
| | | :focus="pickerFocus" |
| | | v-model.trim="pickerValue" |
| | | @clear="onPickerClear" |
| | | @confirm="onPickerInputConfirm" |
| | | /> |
| | | </view> |
| | | <view class="scan-view" v-if="hasScan"> |
| | | <view @tap.stop="onPickerScan"><u-icon name="scan" color="#F18201" :size="32"></u-icon></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="picker-err-box" v-if="pickerErrMsg">{{pickerErrMsg}}</view> |
| | | <view class="picker-list-view"> |
| | | <view class="picker-list-group"> |
| | | <view class="picker-item auto-wrap" v-for="(item,index) in list" :key="'picker-item-'+index" @tap.stop="onItemClick(item)">{{item}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="picker-bottom-btns"> |
| | | <view class="btn-frame"><u-button text="å æ¶" @click="onCancelPicker"></u-button></view> |
| | | <view class="divider"></view> |
| | | <view class="btn-frame"><u-button type="primary" text="确 认" @click="onPickerConfirm"></u-button></view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getObjectType } from '@/static/js/utils/index.js' |
| | | export default { |
| | | name:'autoCompleteScanInputFormItemCompontent', |
| | | emits:['input','changeOptions','clear','confirm','change'], |
| | | props:{ |
| | | type:{ |
| | | type:String, |
| | | default:'text' |
| | | }, |
| | | label:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | placeholder:{ |
| | | type:String, |
| | | default:'请è¾å
¥...' |
| | | }, |
| | | msg:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | pickerErrMsg:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | msgType:{ |
| | | type:String, |
| | | default:'error' |
| | | }, |
| | | value:{ |
| | | type:[String,Number,null], |
| | | default:null |
| | | }, |
| | | hasScan:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | disabled:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | clearable:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | required:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | initPickerList:{ |
| | | type:Boolean, |
| | | default:false |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | innerValue:'', |
| | | pickerValue:'', |
| | | pickerVisible:false, |
| | | pickerFocus:false, |
| | | list:[], |
| | | safetySize:{ |
| | | top:0, |
| | | bottom:0, |
| | | left:0, |
| | | right:0 |
| | | } |
| | | } |
| | | }, |
| | | watch:{ |
| | | value(newVal,oldVal){ |
| | | if (newVal!==this.innerValue) { |
| | | this.innerValue = newVal; |
| | | } |
| | | }, |
| | | innerValue(newVal,oldVal){ |
| | | if (newVal!==this.value) { |
| | | this.$emit('input',newVal) |
| | | this.$emit('change',newVal) |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | onOpenPicker(){ |
| | | this.pickerValue = this.innerValue |
| | | this.pickerVisible = true |
| | | this.$nextTick(()=>{ |
| | | this.pickerFocus = true |
| | | }) |
| | | if (this.initPickerList) { |
| | | this.getPickerList() |
| | | } |
| | | }, |
| | | onClear(){ |
| | | this.innerValue = null; |
| | | this.$emit('clear') |
| | | }, |
| | | onPickerClear(){ |
| | | this.pickerValue = null |
| | | }, |
| | | onPickerInputConfirm(){ |
| | | this.getPickerList() |
| | | }, |
| | | getPickerList(){ |
| | | this.$emit('changeOptions',this.pickerValue,(d)=>{ |
| | | if (getObjectType(d)==='array') { |
| | | this.list = [...d] |
| | | } |
| | | }) |
| | | }, |
| | | onItemClick(val){ |
| | | this.pickerValue = val; |
| | | this.list = [] |
| | | }, |
| | | onPickerScan(){ |
| | | uni.scanCode({ |
| | | success:(res)=>{ |
| | | this.pickerValue = res.result; |
| | | this.getPickerList() |
| | | }, |
| | | fail:function(){ |
| | | console.log('scanCode fail') |
| | | } |
| | | }) |
| | | }, |
| | | closePicker(){ |
| | | this.pickerVisible = false |
| | | this.pickerFocus = false |
| | | }, |
| | | onCancelPicker(){ |
| | | this.closePicker() |
| | | }, |
| | | onPickerConfirm(){ |
| | | this.innerValue = this.pickerValue |
| | | this.$emit('confirm',this.innerValue) |
| | | this.closePicker() |
| | | } |
| | | }, |
| | | created() { |
| | | this.innerValue = this.value |
| | | }, |
| | | beforeMount(){ |
| | | let safety = this.$store.getters['system/getSafety']; |
| | | if (safety) { |
| | | this.safetySize.top = safety.top |
| | | this.safetySize.bottom = safety.bottom |
| | | this.safetySize.left = safety.left |
| | | this.safetySize.right = safety.right |
| | | } else { |
| | | uni.getSystemInfo({ |
| | | success:(res=>{ |
| | | if (!res.safeAreaInsets) res.safeAreaInsets = {} |
| | | this.safetySize.top = res.safeAreaInsets.top || 0; |
| | | this.safetySize.bottom = res.safeAreaInsets.bottom || 0; |
| | | this.safetySize.left = res.safeAreaInsets.left || 0; |
| | | this.safetySize.right = res.safeAreaInsets.right || 0; |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .auto-complete-scan-input-form-item-compontent{ |
| | | width: 100%; |
| | | .p-form-label{ |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag{ |
| | | color:$u-error; |
| | | } |
| | | } |
| | | .msg-row{ |
| | | padding: 6rpx 20rpx 0 20rpx; |
| | | line-height: 1.3; |
| | | font-size: 24rpx; |
| | | color: $u-error; |
| | | word-break:break-all; |
| | | word-wrap:break-word; |
| | | &.info-type{ |
| | | color:$color-blue; |
| | | } |
| | | } |
| | | } |
| | | .input-row{ |
| | | width: 100%; |
| | | height: 90rpx; |
| | | overflow: hidden; |
| | | background-color: $uni-bg-color; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | .close-view{ |
| | | .close-circle{ |
| | | width: 20px; |
| | | height: 20px; |
| | | border-radius: 50%; |
| | | background-color: #c6c7cb; |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | justify-content: center; |
| | | transform: scale(0.82); |
| | | margin-left: 4px; |
| | | } |
| | | } |
| | | .scan-view,.close-view{ |
| | | flex-shrink: 0; |
| | | } |
| | | .scan-view,.close-view{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .scan-view{ |
| | | padding-right: 10rpx; |
| | | } |
| | | .input-view{ |
| | | flex-grow: 1; |
| | | padding-left: 20rpx; |
| | | font-size: 30rpx; |
| | | white-space:nowrap; |
| | | overflow:hidden; |
| | | text-overflow:ellipsis; |
| | | color: rgb(48, 49, 51); |
| | | .placeholder{ |
| | | color: rgb(192, 196, 204); |
| | | } |
| | | } |
| | | &>.mask{ |
| | | background-color: #000; |
| | | opacity: 0.25; |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | z-index: 100; |
| | | } |
| | | } |
| | | .auto-complete-picker-page{ |
| | | width: 100vw; |
| | | height: 100vh; |
| | | box-sizing: border-box; |
| | | background-color: #f2f2f2; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .picker-input-box,.picker-bottom-btns,.picker-err-box{ |
| | | flex-shrink: 0; |
| | | } |
| | | .picker-input-box{ |
| | | padding: 16rpx; |
| | | .input-row{ |
| | | border-radius: 6rpx; |
| | | } |
| | | } |
| | | .picker-err-box{ |
| | | color: $u-error; |
| | | padding: 0 16rpx 16rpx 16rpx; |
| | | line-height: 1.3; |
| | | font-size: 24rpx; |
| | | word-break:break-all; |
| | | word-wrap:break-word; |
| | | } |
| | | .picker-bottom-btns{ |
| | | display: flex; |
| | | padding: 10rpx 20rpx; |
| | | .btn-frame{ |
| | | width: 1%; |
| | | box-sizing: border-box; |
| | | flex-grow: 1; |
| | | } |
| | | .divider{ |
| | | width: 20rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | } |
| | | .picker-list-view{ |
| | | flex-grow: 1; |
| | | height: 1px; |
| | | background-color: $uni-bg-color; |
| | | overflow: auto; |
| | | .picker-list-group{ |
| | | padding: 12rpx 16rpx; |
| | | .picker-item{ |
| | | text-align: center; |
| | | background-image: linear-gradient(to right, $color-paimary-darken, $color-paimary-lighten); |
| | | border: 1px solid #e4e4e4; |
| | | border-radius: 10rpx; |
| | | padding: 20rpx; |
| | | margin-bottom: 16rpx; |
| | | &:last-child{ |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <header-page-layout ref="page" :title="title" base-background-color="#f8f8ff" background-color="#f2f2f2" @headerclick="onHeaderClick"> |
| | | <template v-slot:headerleft><u-icon name="arrow-left"></u-icon></template> |
| | | <template v-slot:headerright><u-icon name="list"></u-icon></template> |
| | | <slot></slot> |
| | | <template v-slot:footer v-if="$scopedSlots.footer"><slot name="footer"></slot></template> |
| | | |
| | | <easy-picker :visible.sync="actionVisible" :list="actionList" @select="onActionClick"></easy-picker> |
| | | </header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import HeaderPageLayout from './HeaderPageLayout.vue' |
| | | import EasyPicker from './EasyPicker.vue' |
| | | import { downloadApk } from '@/static/js/utils/index.js' |
| | | export default { |
| | | name:'defaultHeaderPageCompontent', |
| | | emits:['back'], |
| | | components:{HeaderPageLayout,EasyPicker}, |
| | | props:{ |
| | | title:{ |
| | | type:String, |
| | | default:'Title' |
| | | }, |
| | | backCustom:{ |
| | | type:Boolean, |
| | | default:false |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | actionVisible:false, |
| | | actionList:['å·æ°','é¦é¡µ','éåº'] |
| | | } |
| | | }, |
| | | methods:{ |
| | | onHeaderClick(type){ |
| | | if (type==='left'){ |
| | | if (this.backCustom===true) { |
| | | this.$emit('back') |
| | | } else { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | } |
| | | } else { |
| | | this.actionVisible = true |
| | | } |
| | | }, |
| | | onActionClick(val){ |
| | | if (val==='å·æ°'){ |
| | | uni.navigateBack({ |
| | | delta: 0 |
| | | }); |
| | | } else if (val==='é¦é¡µ') { |
| | | uni.redirectTo({url:this.$config.path.home}) |
| | | } else if (val==='éåº') { |
| | | uni.redirectTo({url:this.$config.path.login}) |
| | | } else if (val==='æ°çä¸è½½') { |
| | | downloadApk(this.$config) |
| | | } |
| | | }, |
| | | getBodyHeight(){ |
| | | let res = null; |
| | | if (this.$refs.page) { |
| | | res = this.$refs.page.getBodyHeight() |
| | | } |
| | | return res; |
| | | } |
| | | }, |
| | | created() { |
| | | if (process.env.NODE_ENV!=='development') { |
| | | this.actionList.push('æ°çä¸è½½') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-popup mode="center" :show="visible" @close="close" :round="10" :safeAreaInsetTop="true" :safeAreaInsetBottom="true"> |
| | | <view class="picker-box" :style="{maxHeight:maxHeight+'px'}"> |
| | | <view class="picker-item-group"> |
| | | <view class="picker-item auto-wrap" v-for="(item,index) in list" :key="'picker-item-'+index" @tap.stop="onItemClick(index,item)"> |
| | | {{(typeof(item)==='string'||typeof(item)==='number'||typeof(item)==='boolean'||item===null)?item:item[labelField]}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </template> |
| | | |
| | | <script> |
| | | const MAX_HEIGHT = 500 |
| | | export default { |
| | | name:'easyPickerCompontent', |
| | | emits:['update:visible','select'], |
| | | props:{ |
| | | visible:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | list:{ |
| | | type:Array, |
| | | default:function(){ |
| | | return [] |
| | | } |
| | | }, |
| | | valueField:{ |
| | | type:String, |
| | | default:'value' |
| | | }, |
| | | labelField:{ |
| | | type:String, |
| | | default:'label' |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | maxHeight:MAX_HEIGHT |
| | | } |
| | | }, |
| | | methods:{ |
| | | close(){ |
| | | this.$emit('update:visible',false) |
| | | }, |
| | | onItemClick(index,selection){ |
| | | let valObj = selection; |
| | | let val; |
| | | if (typeof selection === 'string' || typeof selection === 'number'||typeof(selection)==='boolean'||selection===null) { |
| | | val = selection; |
| | | } else { |
| | | try{ |
| | | val = selection[this.valueField]; |
| | | }catch(e){ |
| | | val = selection; |
| | | } |
| | | } |
| | | this.close() |
| | | this.$emit('select',val,valObj,index) |
| | | }, |
| | | setMaxHeight(calHeight) { |
| | | const spaceHeight = 10 |
| | | if (calHeight>spaceHeight) { |
| | | calHeight = calHeight - spaceHeight |
| | | this.maxHeight = calHeight |
| | | } |
| | | } |
| | | }, |
| | | beforeMount(){ |
| | | let safety = this.$store.getters['system/getSafety']; |
| | | if (safety) { |
| | | this.setMaxHeight(safety.height) |
| | | } else { |
| | | uni.getSystemInfo({ |
| | | success:(res=>{ |
| | | if (!res.safeAreaInsets) res.safeArea = {} |
| | | this.setMaxHeight(res.safeArea.height || 0) |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .picker-box{ |
| | | width: 80vw; |
| | | background-color:#f0f8ff; |
| | | border-radius: 20rpx; |
| | | padding-top: 30rpx; |
| | | overflow: auto; |
| | | display: flex; |
| | | justify-content: center; |
| | | box-sizing: border-box; |
| | | .picker-item-group{ |
| | | width: 80%; |
| | | } |
| | | .picker-item{ |
| | | margin: 0 20rpx 30rpx 20rpx; |
| | | text-align: center; |
| | | background-image: linear-gradient(to right, $color-paimary-darken, $color-paimary-lighten); |
| | | border: 1px solid #e4e4e4; |
| | | border-radius: 10rpx; |
| | | font-size: 1.2rem; |
| | | padding: 20rpx; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-popup mode="center" :show="visible" @close="close" :round="10" :safeAreaInsetTop="true" :safeAreaInsetBottom="true"> |
| | | |
| | | <view class="picker-boxWrap" :style="{maxHeight:maxHeight+'px'}"> |
| | | |
| | | <!-- æ·»å è¾å
¥æ¡ï¼æ¨¡ç³æ¥è¯¢ è°ç¨æ¥å£ --> |
| | | <view class="picker-input" v-if="isShowSearch"> |
| | | <u-input v-model="searchValue" type="text" placeholder="请è¾å
¥..." clearable></u-input> |
| | | <u-button type="primary" @click="onSearch" :disabled="!searchValue">æç´¢</u-button> |
| | | </view> |
| | | |
| | | <view class="picker-box"> |
| | | <view class="picker-item-group"> |
| | | <view class="picker-item auto-wrap" v-for="(item,index) in list" :key="'picker-item-'+index" @tap.stop="onItemClick(index,item)"> |
| | | {{(typeof(item)==='string'||typeof(item)==='number'||typeof(item)==='boolean'||item===null)?item:item[labelField]}} |
| | | </view> |
| | | |
| | | <view v-if="list.length===0" class="text-tip"> |
| | | ææ æ°æ® |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </u-popup> |
| | | </template> |
| | | |
| | | <script> |
| | | const MAX_HEIGHT = 500 |
| | | export default { |
| | | name:'easyPickerCompontent', |
| | | emits:['update:visible','select','getCurrentData'], |
| | | props:{ |
| | | visible:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | list:{ |
| | | type:Array, |
| | | default:function(){ |
| | | return [] |
| | | } |
| | | }, |
| | | valueField:{ |
| | | type:String, |
| | | default:'value' |
| | | }, |
| | | labelField:{ |
| | | type:String, |
| | | default:'label' |
| | | }, |
| | | isShowSearch:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | }, |
| | | data(){ |
| | | return { |
| | | maxHeight:MAX_HEIGHT, |
| | | searchValue:'' |
| | | } |
| | | }, |
| | | methods:{ |
| | | close(){ |
| | | this.$emit('update:visible',false) |
| | | }, |
| | | onItemClick(index,selection){ |
| | | let valObj = selection; |
| | | let val; |
| | | if (typeof selection === 'string' || typeof selection === 'number'||typeof(selection)==='boolean'||selection===null) { |
| | | val = selection; |
| | | } else { |
| | | try{ |
| | | val = selection[this.valueField]; |
| | | }catch(e){ |
| | | val = selection; |
| | | } |
| | | } |
| | | this.close() |
| | | this.$emit('select',val,valObj,index) |
| | | }, |
| | | setMaxHeight(calHeight) { |
| | | const spaceHeight = 10 |
| | | if (calHeight>spaceHeight) { |
| | | calHeight = calHeight - spaceHeight |
| | | this.maxHeight = calHeight |
| | | } |
| | | }, |
| | | // æ¨¡ç³æ¥è¯¢ |
| | | onSearch(){ |
| | | let searchValue = this.searchValue.trim() |
| | | if (searchValue) { |
| | | this.$emit('getCurrentData',searchValue) |
| | | } |
| | | } |
| | | }, |
| | | beforeMount(){ |
| | | let safety = this.$store.getters['system/getSafety']; |
| | | if (safety) { |
| | | this.setMaxHeight(safety.height) |
| | | } else { |
| | | uni.getSystemInfo({ |
| | | success:(res=>{ |
| | | if (!res.safeAreaInsets) res.safeArea = {} |
| | | this.setMaxHeight(res.safeArea.height || 0) |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .picker-boxWrap{ |
| | | width: 80vw; |
| | | background-color:#f0f8ff; |
| | | overflow: auto; |
| | | box-sizing: border-box; |
| | | } |
| | | .picker-box{ |
| | | width: 80vw; |
| | | background-color:#f0f8ff; |
| | | border-radius: 20rpx; |
| | | padding-top: 30rpx; |
| | | overflow: auto; |
| | | display: flex; |
| | | justify-content: center; |
| | | box-sizing: border-box; |
| | | .picker-item-group{ |
| | | width: 80%; |
| | | } |
| | | .picker-item{ |
| | | margin: 0 20rpx 30rpx 20rpx; |
| | | text-align: center; |
| | | background-image: linear-gradient(to right, $color-paimary-darken, $color-paimary-lighten); |
| | | border: 1px solid #e4e4e4; |
| | | border-radius: 10rpx; |
| | | font-size: 1.2rem; |
| | | padding: 20rpx; |
| | | } |
| | | } |
| | | .picker-input{ |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 20rpx; |
| | | .u-input{ |
| | | flex: 1; |
| | | } |
| | | .u-button{ |
| | | margin-left: 10rpx; |
| | | width: 150rpx; |
| | | } |
| | | } |
| | | .text-tip{ |
| | | text-align: center; |
| | | font-size: 1.2rem; |
| | | color: #999; |
| | | padding: 20rpx 0; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="easy-select-form-item-compontent"> |
| | | <view class="p-form-label" v-if="label"><text v-if="required" class="required-tag">*</text>{{label}}ï¼</view> |
| | | <view class="input-row" @tap.stop="onOpenPicker"> |
| | | <view class="mask" @tap.stop="" v-if="disabled"></view> |
| | | <view class="input-view"> |
| | | <text v-if="!innerLabel" class="placeholder">{{placeholder}}</text> |
| | | <text v-else>{{innerLabel}}</text> |
| | | </view> |
| | | <view class="close-view" @tap.stop="onClear" v-if="innerLabel && clearable"> |
| | | <view class="close-circle"> |
| | | <u-icon |
| | | name="close" |
| | | size="11" |
| | | color="#ffffff" |
| | | customStyle="line-height: 12px" |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="right-icon-view"><u-icon name="arrow-right" color="#909193" :size="24"></u-icon></view> |
| | | </view> |
| | | <view class="msg-row" v-if="msg" :class="[msgType==='info'?'info-type':'']">{{msg}}</view> |
| | | |
| | | <easy-picker :visible.sync="pickerVisible" :list="list" :value-field="valueField" :label-field="labelField" @select="onPickerSelect" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import EasyPicker from './EasyPicker.vue' |
| | | export default { |
| | | name:'EasySelectFormItemCompontent', |
| | | components:{EasyPicker}, |
| | | emits:['input','select','clear'], |
| | | props:{ |
| | | label:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | placeholder:{ |
| | | type:String, |
| | | default:'è¯·éæ©...' |
| | | }, |
| | | msg:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | msgType:{ |
| | | type:String, |
| | | default:'error' |
| | | }, |
| | | value:{ |
| | | type:[String,Boolean,Number,null], |
| | | default:null |
| | | }, |
| | | list:{ |
| | | type:Array, |
| | | default:function(){ |
| | | return [] |
| | | } |
| | | }, |
| | | valueField:{ |
| | | type:String, |
| | | default:'value' |
| | | }, |
| | | labelField:{ |
| | | type:String, |
| | | default:'label' |
| | | }, |
| | | disabled:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | clearable:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | required:{ |
| | | type:Boolean, |
| | | default:false |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | innerValue:'', |
| | | innerLabel:'', |
| | | pickerVisible:false, |
| | | initFlag:false |
| | | } |
| | | }, |
| | | watch:{ |
| | | value(newVal,oldVal){ |
| | | if (newVal!==this.innerValue) { |
| | | this.innerValue = newVal; |
| | | } |
| | | }, |
| | | innerValue(newVal,oldVal){ |
| | | if (newVal!==this.value) { |
| | | this.$emit('input',newVal) |
| | | } |
| | | if (newVal!==oldVal) { |
| | | this.setLabelValue() |
| | | } |
| | | }, |
| | | list(){ |
| | | this.setInitData() |
| | | } |
| | | }, |
| | | methods:{ |
| | | onOpenPicker(){ |
| | | if (this.list.length<=0) return false |
| | | this.pickerVisible = true |
| | | }, |
| | | onPickerSelect(value,selection,index){ |
| | | if (value===this.innerValue) return false; |
| | | this.innerValue = value; |
| | | this.$emit('select',value,selection,index) |
| | | }, |
| | | setLabelValue(){ |
| | | let noMatch = true; |
| | | for (let i=0;i<this.list.length;i++) { |
| | | if (this.isBaseItem(this.list[i])) { |
| | | if (this.list[i]===this.innerValue) { |
| | | this.innerLabel = this.list[i]; |
| | | noMatch = false; |
| | | break; |
| | | } |
| | | } else { |
| | | if (this.list[i][this.valueField]===this.innerValue) { |
| | | this.innerLabel = this.list[i][this.labelField]; |
| | | noMatch = false; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if (noMatch) { |
| | | this.innerLabel = this.innerValue |
| | | } |
| | | }, |
| | | isBaseItem(item){ |
| | | if (typeof(item)==='string'||typeof(item)==='number'||typeof(item)==='boolean'||item===undefined||item===null){ |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | setInitData(){ |
| | | this.innerValue = this.value; |
| | | if (this.list.length===1) { |
| | | if (!this.initFlag) { |
| | | this.initFlag = true |
| | | let _tempVal = null; |
| | | if (!this.isBaseItem(this.list[0])) { |
| | | _tempVal = this.list[0][this.valueField]; |
| | | } else { |
| | | _tempVal = this.list[0]; |
| | | } |
| | | if (!this.innerValue) { |
| | | this.innerValue = _tempVal; |
| | | } |
| | | } |
| | | } else { |
| | | this.setLabelValue() |
| | | } |
| | | }, |
| | | onClear(){ |
| | | this.innerValue = null; |
| | | this.$emit('clear') |
| | | } |
| | | }, |
| | | created() { |
| | | this.setInitData() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .easy-select-form-item-compontent{ |
| | | width: 100%; |
| | | .p-form-label{ |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag{ |
| | | color:$u-error; |
| | | } |
| | | } |
| | | .input-row{ |
| | | width: 100%; |
| | | height: 90rpx; |
| | | overflow: hidden; |
| | | background-color: $uni-bg-color; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | .close-view,.right-icon-view{ |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .right-icon-view{ |
| | | padding-right: 10rpx; |
| | | } |
| | | .close-view{ |
| | | .close-circle{ |
| | | width: 20px; |
| | | height: 20px; |
| | | border-radius: 50%; |
| | | background-color: #c6c7cb; |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | justify-content: center; |
| | | transform: scale(0.82); |
| | | margin-left: 4px; |
| | | } |
| | | } |
| | | .input-view{ |
| | | flex-grow: 1; |
| | | padding-left: 20rpx; |
| | | font-size: 30rpx; |
| | | white-space:nowrap; |
| | | overflow:hidden; |
| | | text-overflow:ellipsis; |
| | | color: rgb(48, 49, 51); |
| | | .placeholder{ |
| | | color: rgb(192, 196, 204); |
| | | } |
| | | } |
| | | &>.mask{ |
| | | background-color: #000; |
| | | opacity: 0.25; |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | z-index: 100; |
| | | } |
| | | } |
| | | .msg-row{ |
| | | padding: 6rpx 20rpx 0 20rpx; |
| | | line-height: 1.3; |
| | | font-size: 24rpx; |
| | | color: $u-error; |
| | | word-break:break-all; |
| | | word-wrap:break-word; |
| | | &.info-type{ |
| | | color:$color-blue; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="full-page-layout app-page" :style="{ |
| | | paddingTop:safetySize.top+'px', |
| | | paddingBottom:safetySize.bottom+'px', |
| | | paddingLeft:safetySize.left+'px', |
| | | paddingRight:safetySize.right+'px', |
| | | height:full?'100vh':'100%', |
| | | width:full?'100vw':'100%', |
| | | backgroundColor:baseBackgroundColor?baseBackgroundColor:'transparent' |
| | | }"> |
| | | <view class="full-page-layout-containter" :class="[(gradient&&gradientValue==='default')?'gradient-default':'']" :style="{ |
| | | backgroundColor:gradient?'transparent':(backgroundColor?backgroundColor:'transparent'), |
| | | backgroundImage:gradient?(gradientValue!=='default'?gradientValue:'none'):'none' |
| | | }"> |
| | | <slot></slot> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name:'fullPageCompontent', |
| | | props:{ |
| | | /* æ¯å¦å¯ç¨åºè²æ¸åï¼backgroundImageï¼ */ |
| | | gradient:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | /* åºè²æ¸å(backgroundImage)å¼ï¼cssè¯æ³ï¼defaultæ¶ä½¿ç¨é»è®¤æ¸åè² */ |
| | | gradientValue:{ |
| | | type:String, |
| | | default:'default' |
| | | }, |
| | | backgroundColor:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | safety:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | full:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | baseBackgroundColor:{ |
| | | type:String, |
| | | default:'' |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | safetySize:{ |
| | | top:0, |
| | | bottom:0, |
| | | left:0, |
| | | right:0 |
| | | } |
| | | } |
| | | }, |
| | | beforeMount(){ |
| | | if (this.safety) { |
| | | let safety = this.$store.getters['system/getSafety']; |
| | | if (safety) { |
| | | this.safetySize.top = safety.top |
| | | this.safetySize.bottom = safety.bottom |
| | | this.safetySize.left = safety.left |
| | | this.safetySize.right = safety.right |
| | | } else { |
| | | uni.getSystemInfo({ |
| | | success:(res=>{ |
| | | if (!res.safeAreaInsets) res.safeAreaInsets = {} |
| | | this.safetySize.top = res.safeAreaInsets.top || 0; |
| | | this.safetySize.bottom = res.safeAreaInsets.bottom || 0; |
| | | this.safetySize.left = res.safeAreaInsets.left || 0; |
| | | this.safetySize.right = res.safeAreaInsets.right || 0; |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .full-page-layout{ |
| | | .full-page-layout-containter{ |
| | | height: 100%; |
| | | overflow: auto; |
| | | position: relative; |
| | | &.gradient-default{ |
| | | background-image: linear-gradient(to right, $color-paimary-darken, $color-paimary-middle) !important; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <full-page-layout :gradient="gradient" :base-background-color="baseBackgroundColor" :gradient-value="gradientValue" :safety="safety" :full="full"> |
| | | <view class="header-page-containter"> |
| | | <view class="header-page-containter-header"> |
| | | <page-header :color="headerColor" :gradient="headerGradient" :gradient-value="headerGradientValue" :background-color="headerBackgroundColor" @click="onHeaderAsideClick"> |
| | | <template v-slot:left v-if="$scopedSlots.headerleft"><slot name="headerleft"></slot></template> |
| | | {{title}} |
| | | <template v-slot:right v-if="$scopedSlots.headerright"><slot name="headerright"></slot></template> |
| | | </page-header> |
| | | </view> |
| | | <view class="header-page-containter-body" :style="{backgroundColor:backgroundColor}"> |
| | | <slot></slot> |
| | | </view> |
| | | <view class="header-page-footer" :style="{backgroundColor:backgroundColor}"> |
| | | <slot name="footer"></slot> |
| | | </view> |
| | | </view> |
| | | </full-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import FullPageLayout from './FullPageLayout.vue' |
| | | import PageHeader from './PageHeader.vue' |
| | | export default { |
| | | name:'headerPageCompontent', |
| | | emits:['headerclick'], |
| | | components:{FullPageLayout,PageHeader}, |
| | | props:{ |
| | | /* æ¯å¦å¯ç¨åºè²æ¸åï¼backgroundImageï¼ */ |
| | | gradient:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | /* åºè²æ¸å(backgroundImage)å¼ï¼cssè¯æ³ï¼defaultæ¶ä½¿ç¨é»è®¤æ¸åè² */ |
| | | gradientValue:{ |
| | | type:String, |
| | | default:'default' |
| | | }, |
| | | backgroundColor:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | baseBackgroundColor:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | safety:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | title:{ |
| | | type:String, |
| | | default:'Title' |
| | | }, |
| | | headerColor:{ |
| | | type:String, |
| | | default:'#212121' |
| | | }, |
| | | /* 头鍿¯å¦å¯ç¨åºè²æ¸åï¼backgroundImageï¼ */ |
| | | headerGradient:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | /* 头é¨åºè²æ¸å(backgroundImage)å¼ï¼cssè¯æ³ï¼defaultæ¶ä½¿ç¨é»è®¤æ¸åè² */ |
| | | headerGradientValue:{ |
| | | type:String, |
| | | default:'default' |
| | | }, |
| | | headerBackgroundColor:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | full:{ |
| | | type:Boolean, |
| | | default:true |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | bodyHeight:0 |
| | | } |
| | | }, |
| | | methods:{ |
| | | onHeaderAsideClick(type){ |
| | | this.$emit('headerclick',type) |
| | | }, |
| | | getBodyHeight(){ |
| | | return this.bodyHeight |
| | | } |
| | | }, |
| | | mounted() { |
| | | const query = uni.createSelectorQuery().in(this); |
| | | query.select('.header-page-containter-body').boundingClientRect(data => { |
| | | this.bodyHeight = data.height |
| | | }).exec(); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .header-page-containter{ |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | overflow: hidden; |
| | | .header-page-containter-header,.header-page-footer{ |
| | | flex-shrink: 0; |
| | | } |
| | | .header-page-containter-body{ |
| | | flex-grow: 1; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="page-header-compontent" :class="[(gradient&&gradientValue==='default')?'gradient-default':'']" :style="{ |
| | | color:color, |
| | | backgroundColor:gradient?'transparent':(backgroundColor?backgroundColor:'transparent'), |
| | | backgroundImage:gradient?(gradientValue!=='default'?gradientValue:'none'):'none' |
| | | }"> |
| | | <view class="left-action" v-if="$scopedSlots.left" @tap.stop="onAsideClick('left')"><slot name="left"></slot></view> |
| | | <view class="title"><slot></slot></view> |
| | | <view class="right-action" v-if="$scopedSlots.right" @tap.stop="onAsideClick('right')"><slot name="right"></slot></view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name:'pageheaderCompontent', |
| | | emits:['click'], |
| | | props:{ |
| | | color:{ |
| | | type:String, |
| | | default:'#212121' |
| | | }, |
| | | /* æ¯å¦å¯ç¨åºè²æ¸åï¼backgroundImageï¼ */ |
| | | gradient:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | /* åºè²æ¸å(backgroundImage)å¼ï¼cssè¯æ³ï¼defaultæ¶ä½¿ç¨é»è®¤æ¸åè² */ |
| | | gradientValue:{ |
| | | type:String, |
| | | default:'default' |
| | | }, |
| | | backgroundColor:{ |
| | | type:String, |
| | | default:'' |
| | | } |
| | | }, |
| | | methods:{ |
| | | onAsideClick(type){ |
| | | this.$emit('click',type) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .page-header-compontent{ |
| | | width: 100%; |
| | | height: 90rpx; |
| | | position: relative; |
| | | font-size: 32rpx; |
| | | &.gradient-default{ |
| | | background-image: linear-gradient(to right, $color-paimary-darken, $color-paimary-middle) !important; |
| | | } |
| | | .title{ |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 1.2em; |
| | | } |
| | | >.left-action,>.right-action{ |
| | | position: absolute; |
| | | top:0; |
| | | height: 100%; |
| | | z-index: 5; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | >.left-action{ |
| | | left: 0rpx; |
| | | padding-left: 8px; |
| | | } |
| | | >.right-action{ |
| | | right: 0rpx; |
| | | padding-right: 8px; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="radio-input-form-item-component"> |
| | | <view class="p-form-label" v-if="label"><text v-if="required" class="required-tag">*</text>{{label}}ï¼</view> |
| | | <view class="input-row"> |
| | | <view class="mask" @tap.stop="" v-if="disabled"></view> |
| | | <view class="input-view"> |
| | | <radio-group @change="change" v-model="innerValue" style="{display: flex;justify-content: space-evenly;}"> |
| | | <radio :value="option.value" :shape="shape" :key="option.value" v-for="option in options" |
| | | >{{ option.label }}</radio> |
| | | </radio-group> |
| | | </view> |
| | | <!-- <view class="scan-view" v-if="hasScan"> |
| | | <view @tap.stop="onScan"><u-icon name="scan" color="#F18201" :size="32"></u-icon></view> |
| | | </view> |
| | | <view class="btn-view" v-if="hasSearch"> |
| | | <view class="search-btn" @tap.stop="onSearch">æ</view> |
| | | </view> --> |
| | | </view> |
| | | <!-- <view class="msg-row" v-if="msg" :class="[msgType==='info'?'info-type':'']">{{msg}}</view> --> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'RadioInputFormItemComponent', |
| | | emits: ['input', 'search', 'clear', 'blur', 'confirm', 'change'], |
| | | props: { |
| | | label: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | msg: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | msgType: { |
| | | type: String, |
| | | default: 'error' |
| | | }, |
| | | shape: { |
| | | type: String, |
| | | denfault: 'square' |
| | | }, |
| | | options: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | value: { |
| | | type: [String, Number, null], |
| | | default: '' |
| | | }, |
| | | hasScan: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | hasSearch: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | required: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | innerValue: '' |
| | | } |
| | | }, |
| | | watch: { |
| | | value(newVal, oldVal) { |
| | | if (newVal != this.innerValue) { |
| | | this.innerValue = newVal |
| | | console.log(this.innerValue); |
| | | } |
| | | }, |
| | | innerValue(newVal, oldVal) { |
| | | if (newVal !== this.value) { |
| | | this.$emit('input', newVal) |
| | | this.$emit('change', newVal) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | change(object){ |
| | | var {detail}=object |
| | | this.$emit('change', detail?.value) |
| | | }, |
| | | onScan() { |
| | | uni.scanCode({ |
| | | success: (res) => { |
| | | this.innerValue = res.result; |
| | | }, |
| | | fail: function() { |
| | | console.log('scanCode fail') |
| | | } |
| | | }) |
| | | }, |
| | | onSearch() { |
| | | this.$emit('search', this.innerValue) |
| | | }, |
| | | onClear() { |
| | | this.innerValue = null; |
| | | this.$emit('clear') |
| | | }, |
| | | onBlur() { |
| | | this.$emit('blur', this.innerValue) |
| | | }, |
| | | onConfirm() { |
| | | this.$emit('search', this.innerValue) |
| | | } |
| | | }, |
| | | created() { |
| | | this.innerValue = this.value |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .radio-input-form-item-component { |
| | | width: 100%; |
| | | |
| | | .p-form-label { |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | |
| | | .required-tag { |
| | | color: $u-error; |
| | | } |
| | | } |
| | | |
| | | .input-row { |
| | | width: 100%; |
| | | height: 90rpx; |
| | | overflow: hidden; |
| | | background-color: $uni-bg-color; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | |
| | | .scan-view, |
| | | .btn-view { |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .scan-view { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding-right: 10rpx; |
| | | } |
| | | |
| | | .input-view { |
| | | flex-grow: 1; |
| | | padding-left: 20rpx; |
| | | |
| | | .custom-radio-group { |
| | | /* éå uni-radio-group çæ ·å¼ */ |
| | | display: flex; |
| | | /* å
¶ä»æ ·å¼ */ |
| | | } |
| | | |
| | | .custom-radio-group .uni-radio { |
| | | /* éå uni-radio çæ ·å¼ */ |
| | | display: flex; |
| | | /* å
¶ä»æ ·å¼ */ |
| | | } |
| | | } |
| | | |
| | | &>.mask { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | z-index: 100; |
| | | background-color: #fff; |
| | | opacity: 0.25; |
| | | } |
| | | } |
| | | |
| | | .msg-row { |
| | | padding: 6rpx 20rpx 0 20rpx; |
| | | line-height: 1.3; |
| | | font-size: 24rpx; |
| | | color: $u-error; |
| | | word-break: break-all; |
| | | word-wrap: break-word; |
| | | |
| | | &.info-type { |
| | | color: $color-blue; |
| | | } |
| | | } |
| | | } |
| | | |
| | | ::v-deep radio { |
| | | margin-right:20rpx |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <view class="uni-padding-wrap"> |
| | | NFC |
| | | <view class="uni-common-mt" style="background: #fff; padding: 20upx"> |
| | | <text>UID: {{ UID }}</text> |
| | | <text>ç¶æï¼{{ tip }}</text> |
| | | <text>æ¶æ¯ï¼{{ msg }}</text> |
| | | </view> |
| | | </view> |
| | | <button @click="writeData">writeData</button> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | var NfcAdapter; |
| | | |
| | | export default { |
| | | props: { |
| | | // å®ä¹ä¸ä¸ª UID 屿§ï¼å¯ä»¥ç¨æ¥æ¥æ¶ç¶ç»ä»¶ä¼ éçæ°æ® |
| | | uid: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'redNFC', |
| | | UID: '', |
| | | msg: '', |
| | | tip: '', |
| | | readyWriteData: false |
| | | }; |
| | | }, |
| | | watch: { |
| | | uid(newVal) { |
| | | // å½ç¶ç»ä»¶æ´æ° UID æ¶ï¼åæ¥å°æ¬å°æ°æ® |
| | | this.UID = newVal; |
| | | } |
| | | }, |
| | | onLoad() { |
| | | console.log('onLoad'); |
| | | }, |
| | | onShow() { |
| | | console.log('onShow'); |
| | | this.NFCInit(); |
| | | }, |
| | | onHide() { |
| | | console.log('onHide'); |
| | | this.NFCReadUID(); |
| | | }, |
| | | methods: { |
| | | clearInfo() { |
| | | this.UID = ''; |
| | | this.tip = ''; |
| | | this.msg = ''; |
| | | }, |
| | | writeData() { |
| | | // Your existing writeData logic |
| | | }, |
| | | NFCReadUID2() { |
| | | // Your existing NFCReadUID2 logic |
| | | }, |
| | | hexStringToBytes(str) { |
| | | var bytes = []; |
| | | for (var i = 0; i < str.length; i += 2) { |
| | | bytes.push(parseInt(str.substring(i, i + 2), 16)); |
| | | } |
| | | return bytes; |
| | | }, |
| | | NFCInit() { |
| | | try { |
| | | var main = plus.android.runtimeMainActivity(); |
| | | var Intent = plus.android.importClass('android.content.Intent'); |
| | | var Activity = plus.android.importClass('android.app.Activity'); |
| | | var PendingIntent = plus.android.importClass('android.app.PendingIntent'); |
| | | var IntentFilter = plus.android.importClass('android.content.IntentFilter'); |
| | | NfcAdapter = plus.android.importClass('android.nfc.NfcAdapter'); |
| | | var _nfcAdapter = NfcAdapter.getDefaultAdapter(main); |
| | | |
| | | var ndef = new IntentFilter('android.nfc.action.NDEF_DISCOVERED'); //NfcAdapter.ACTION_NDEF_DISCOVERED |
| | | var tag = new IntentFilter('android.nfc.action.TAG_DISCOVERED'); //NfcAdapter.ACTION_TECH_DISCOVERED |
| | | var tech = new IntentFilter('android.nfc.action.TECH_DISCOVERED'); |
| | | var intentFiltersArray = [ndef, tag, tech]; |
| | | |
| | | var techListsArray = [ |
| | | ['android.nfc.tech.Ndef'], |
| | | ['android.nfc.tech.IsoDep'], |
| | | ['android.nfc.tech.NfcA'], |
| | | ['android.nfc.tech.NfcB'], |
| | | ['android.nfc.tech.NfcF'], |
| | | ['android.nfc.tech.Nfcf'], |
| | | ['android.nfc.tech.NfcV'], |
| | | ['android.nfc.tech.NdefFormatable'], |
| | | ['android.nfc.tech.MifareClassi'], |
| | | ['android.nfc.tech.MifareUltralight'] |
| | | ]; |
| | | |
| | | var _intent = new Intent(main, main.getClass()); |
| | | _intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); |
| | | |
| | | var pendingIntent = PendingIntent.getActivity(main, 0, _intent, 0); |
| | | |
| | | if (_nfcAdapter == null) { |
| | | this.tip = 'æ¬è®¾å¤ä¸æ¯æNFC!'; |
| | | } else if (_nfcAdapter.isEnabled() == false) { |
| | | this.tip = 'NFCåè½æªæå¼!'; |
| | | } else { |
| | | this.tip = 'NFCæ£å¸¸'; |
| | | _nfcAdapter.enableForegroundDispatch(main, pendingIntent, IntentFilter, techListsArray); |
| | | } |
| | | } catch (e) { |
| | | console.log(e); |
| | | } |
| | | }, |
| | | NFCReadUID() { |
| | | console.log(1234567890) |
| | | var main = plus.android.runtimeMainActivity(); |
| | | var _intent = main.getIntent(); |
| | | var _action = _intent.getAction(); |
| | | |
| | | console.log('NFCReadUID action:', _action); |
| | | |
| | | if (NfcAdapter.ACTION_NDEF_DISCOVERED == _action || NfcAdapter.ACTION_TAG_DISCOVERED == _action || NfcAdapter.ACTION_TECH_DISCOVERED == _action) { |
| | | var Tag = plus.android.importClass('android.nfc.Tag'); |
| | | var tagFromIntent = _intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); |
| | | var uid = _intent.getByteArrayExtra(NfcAdapter.EXTRA_ID); |
| | | var text = _intent.getByteArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES); |
| | | var rawMsgs = _intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES); |
| | | |
| | | this.UID = this.Bytes2HexString(uid); |
| | | this.msg = text; |
| | | |
| | | // 触åèªå®ä¹äºä»¶ï¼å° UID ä¼ éç»ç¶ç»ä»¶ |
| | | this.$emit('update:uid', this.UID); |
| | | |
| | | uni.showToast({ |
| | | title: text + "~~" + this.UID, |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | Bytes2HexString(arrBytes) { |
| | | var str = ''; |
| | | for (var i = 0; i < arrBytes.length; i++) { |
| | | var tmp; |
| | | var num = arrBytes[i]; |
| | | if (num < 0) { |
| | | tmp = (255 + num + 1).toString(16); |
| | | } else { |
| | | tmp = num.toString(16); |
| | | } |
| | | if (tmp.length == 1) { |
| | | tmp = '0' + tmp; |
| | | } |
| | | str += tmp; |
| | | } |
| | | return str; |
| | | }, |
| | | toast(content) { |
| | | uni.showToast({ |
| | | title: content, |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | </template> |
| | | |
| | | <script> |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="scan-input-form-item-compontent"> |
| | | <view class="p-form-label" v-if="label"><text v-if="required" class="required-tag">*</text>{{label}}ï¼</view> |
| | | <view class="input-row" v-if="content"> |
| | | <view class="mask" @tap.stop="" v-if="disabled"></view> |
| | | <view class="input-view"> |
| | | <u--input |
| | | :clearable="clearable" |
| | | border="none" |
| | | :type="type" |
| | | :placeholder="placeholder" |
| | | v-model.trim="innerValue" |
| | | @clear="onClear" |
| | | @blur="onBlur" |
| | | @confirm="onConfirm" |
| | | /> |
| | | </view> |
| | | <view class="scan-view" v-if="hasScan"> |
| | | <view @tap.stop="onScan"><u-icon name="scan" color="#F18201" :size="32"></u-icon></view> |
| | | </view> |
| | | <view class="btn-view" v-if="hasSearch"> |
| | | <view class="search-btn" @tap.stop="onSearch">æ</view> |
| | | </view> |
| | | </view> |
| | | <view class="msg-row" v-if="msg" :class="[msgType==='info'?'info-type':'']">{{msg}}</view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name:'ScanInputFormItemCompontent', |
| | | emits:['input','search','clear','blur','confirm','change'], |
| | | props:{ |
| | | type:{ |
| | | type:String, |
| | | default:'text' |
| | | }, |
| | | label:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | placeholder:{ |
| | | type:String, |
| | | default:'请è¾å
¥...' |
| | | }, |
| | | msg:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | msgType:{ |
| | | type:String, |
| | | default:'error' |
| | | }, |
| | | value:{ |
| | | type:[String,Number,null], |
| | | default:'' |
| | | }, |
| | | hasScan:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | hasSearch:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | disabled:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | clearable:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | required:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | content:{ |
| | | type:Boolean, |
| | | default:true |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | innerValue:this.value||'' |
| | | } |
| | | }, |
| | | watch:{ |
| | | value(newVal,oldVal){ |
| | | if (newVal!==this.innerValue) { |
| | | this.innerValue = newVal |
| | | } |
| | | }, |
| | | innerValue(newVal,oldVal){ |
| | | if (newVal!==this.value) { |
| | | this.$emit('input',newVal) |
| | | this.$emit('change',newVal) |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | onScan(){ |
| | | uni.scanCode({ |
| | | success:(res)=>{ |
| | | this.innerValue = res.result; |
| | | }, |
| | | fail:function(){ |
| | | console.log('scanCode fail') |
| | | } |
| | | }) |
| | | }, |
| | | onSearch(){ |
| | | this.$emit('search',this.innerValue) |
| | | }, |
| | | onClear(){ |
| | | this.innerValue = null; |
| | | this.$emit('clear') |
| | | }, |
| | | onBlur(){ |
| | | this.$emit('blur',this.innerValue) |
| | | }, |
| | | onConfirm(){ |
| | | this.$emit('search',this.innerValue) |
| | | } |
| | | }, |
| | | created() { |
| | | this.innerValue = this.value |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .scan-input-form-item-compontent{ |
| | | width: 100%; |
| | | .p-form-label{ |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag{ |
| | | color:$u-error; |
| | | } |
| | | } |
| | | .input-row{ |
| | | width: 100%; |
| | | height: 75rpx; |
| | | overflow: hidden; |
| | | background-color: $uni-bg-color; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | .scan-view,.btn-view{ |
| | | flex-shrink: 0; |
| | | } |
| | | .scan-view{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding-right: 10rpx; |
| | | } |
| | | .input-view{ |
| | | flex-grow: 1; |
| | | padding-left: 20rpx; |
| | | } |
| | | .btn-view{ |
| | | width:70rpx; |
| | | height: 100%; |
| | | padding: 20rpx; |
| | | padding-left: 0rpx; |
| | | box-sizing: border-box; |
| | | .search-btn{ |
| | | height: 100%; |
| | | width: 100%; |
| | | border-radius: 8rpx; |
| | | background: linear-gradient(157.342820970935deg, rgba(194, 128, 255, 1) -20%, rgba(194, 128, 255, 1) -19%, rgba(132, 0, 255, 1) 119%); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: $uni-bg-color; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | &>.mask{ |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | z-index: 100; |
| | | background-color: #fff; |
| | | opacity: 0.25; |
| | | } |
| | | } |
| | | .msg-row{ |
| | | padding: 6rpx 20rpx 0 20rpx; |
| | | line-height: 1.3; |
| | | font-size: 24rpx; |
| | | color: $u-error; |
| | | word-break:break-all; |
| | | word-wrap:break-word; |
| | | &.info-type{ |
| | | color:$color-blue; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="scan-input-form-item-compontent"> |
| | | <view class="p-form-label" v-if="label"><text v-if="required" class="required-tag">*</text>{{label}}ï¼</view> |
| | | <view class="input-row" v-if="content"> |
| | | <view class="mask" @tap.stop="" v-if="disabled"></view> |
| | | <view class="input-view"> |
| | | <u--input |
| | | :clearable="clearable" |
| | | border="none" |
| | | :type="type" |
| | | :placeholder="placeholder" |
| | | v-model.trim="innerValue" |
| | | @clear="onClear" |
| | | @blur="onBlur" |
| | | @focus="innerValue=''" |
| | | @confirm="onConfirm" |
| | | /> |
| | | </view> |
| | | <view class="scan-view" v-if="hasScan"> |
| | | <view @tap.stop="onScan"><u-icon name="scan" color="#F18201" :size="32"></u-icon></view> |
| | | </view> |
| | | <view class="btn-view" v-if="hasSearch"> |
| | | <view class="search-btn" @tap.stop="searchShowBox">æ</view> |
| | | </view> |
| | | </view> |
| | | <view class="msg-row" v-if="msg" :class="[msgType==='info'?'info-type':'']">{{msg}}</view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name:'ScanInputFormItemCompontent', |
| | | emits:['input','search','clear','blur','confirm','change','searchShowBox'], |
| | | props:{ |
| | | type:{ |
| | | type:String, |
| | | default:'text' |
| | | }, |
| | | label:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | placeholder:{ |
| | | type:String, |
| | | default:'请è¾å
¥...' |
| | | }, |
| | | msg:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | msgType:{ |
| | | type:String, |
| | | default:'error' |
| | | }, |
| | | value:{ |
| | | type:[String,Number,null], |
| | | default:'' |
| | | }, |
| | | hasScan:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | hasSearch:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | disabled:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | clearable:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | required:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | content:{ |
| | | type:Boolean, |
| | | default:true |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | innerValue:this.value||'' |
| | | } |
| | | }, |
| | | watch:{ |
| | | value(newVal,oldVal){ |
| | | if (newVal!==this.innerValue) { |
| | | this.innerValue = newVal |
| | | } |
| | | }, |
| | | innerValue(newVal,oldVal){ |
| | | if (newVal!==this.value) { |
| | | this.$emit('input',newVal) |
| | | this.$emit('change',newVal) |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | onScan(){ |
| | | uni.scanCode({ |
| | | success:(res)=>{ |
| | | this.innerValue = res.result; |
| | | }, |
| | | fail:function(){ |
| | | console.log('scanCode fail') |
| | | } |
| | | }) |
| | | }, |
| | | onSearch(){ |
| | | this.$emit('search',this.innerValue) |
| | | }, |
| | | searchShowBox(){ |
| | | this.$emit('searchShowBox',this.innerValue) |
| | | }, |
| | | onClear(){ |
| | | this.innerValue = null; |
| | | this.$emit('clear') |
| | | }, |
| | | onBlur(){ |
| | | this.$emit('blur',this.innerValue) |
| | | }, |
| | | onConfirm(){ |
| | | this.$emit('search',this.innerValue) |
| | | } |
| | | }, |
| | | created() { |
| | | this.innerValue = this.value |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .scan-input-form-item-compontent{ |
| | | width: 100%; |
| | | .p-form-label{ |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag{ |
| | | color:$u-error; |
| | | } |
| | | } |
| | | .input-row{ |
| | | width: 100%; |
| | | height: 75rpx; |
| | | overflow: hidden; |
| | | background-color: $uni-bg-color; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | .scan-view,.btn-view{ |
| | | flex-shrink: 0; |
| | | } |
| | | .scan-view{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding-right: 10rpx; |
| | | } |
| | | .input-view{ |
| | | flex-grow: 1; |
| | | padding-left: 20rpx; |
| | | } |
| | | .btn-view{ |
| | | width:70rpx; |
| | | height: 100%; |
| | | padding: 20rpx; |
| | | padding-left: 0rpx; |
| | | box-sizing: border-box; |
| | | .search-btn{ |
| | | height: 100%; |
| | | width: 100%; |
| | | border-radius: 8rpx; |
| | | background: linear-gradient(157.342820970935deg, rgba(194, 128, 255, 1) -20%, rgba(194, 128, 255, 1) -19%, rgba(132, 0, 255, 1) 119%); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: $uni-bg-color; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | &>.mask{ |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | z-index: 100; |
| | | background-color: #fff; |
| | | opacity: 0.25; |
| | | } |
| | | } |
| | | .msg-row{ |
| | | padding: 6rpx 20rpx 0 20rpx; |
| | | line-height: 1.3; |
| | | font-size: 24rpx; |
| | | color: $u-error; |
| | | word-break:break-all; |
| | | word-wrap:break-word; |
| | | &.info-type{ |
| | | color:$color-blue; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-view-form-select-picker-component"> |
| | | <view class="input-row" @tap.stop="onOpenPicker" :style="{backgroundColor:disabled?disabledColor:''}"> |
| | | <view class="mask" @tap.stop="" v-if="disabled"></view> |
| | | <view class="input-view"> |
| | | <text v-if="!innerLabel" class="placeholder">{{placeholder}}</text> |
| | | <text v-else>{{innerLabel}}</text> |
| | | </view> |
| | | <view class="close-view" @tap.stop="onClear" v-if="innerLabel && clearable"> |
| | | <view class="close-circle"> |
| | | <u-icon |
| | | name="close" |
| | | size="11" |
| | | color="#ffffff" |
| | | customStyle="line-height: 12px" |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="right-icon-view"><u-icon name="arrow-right"></u-icon></view> |
| | | </view> |
| | | |
| | | <easy-picker :visible.sync="pickerVisible" :list="list" :value-field="valueField" :label-field="labelField" @select="onPickerSelect" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import EasyPicker from './EasyPicker.vue' |
| | | export default { |
| | | name:'uViewFormSelectPickerComponent', |
| | | components:{EasyPicker}, |
| | | emits:['input','select','clear'], |
| | | props:{ |
| | | placeholder:{ |
| | | type:String, |
| | | default:'è¯·éæ©...' |
| | | }, |
| | | value:{ |
| | | type:[String,Boolean,Number,null], |
| | | default:null |
| | | }, |
| | | list:{ |
| | | type:Array, |
| | | default:function(){ |
| | | return [] |
| | | } |
| | | }, |
| | | valueField:{ |
| | | type:String, |
| | | default:'value' |
| | | }, |
| | | labelField:{ |
| | | type:String, |
| | | default:'label' |
| | | }, |
| | | disabled:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | clearable:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | disabledColor:{ |
| | | type:String, |
| | | default:'#f5f7fa' |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | innerValue:'', |
| | | innerLabel:'', |
| | | pickerVisible:false, |
| | | initFlag:false |
| | | } |
| | | }, |
| | | watch:{ |
| | | value(newVal,oldVal){ |
| | | if (newVal!==this.innerValue) { |
| | | this.innerValue = newVal; |
| | | } |
| | | }, |
| | | innerValue(newVal,oldVal){ |
| | | if (newVal!==this.value) { |
| | | this.$emit('input',newVal) |
| | | } |
| | | if (newVal!==oldVal) { |
| | | this.setLabelValue() |
| | | } |
| | | }, |
| | | list(){ |
| | | this.setInitData() |
| | | } |
| | | }, |
| | | methods:{ |
| | | onOpenPicker(){ |
| | | if (this.list.length<=0) return false |
| | | uni.hideKeyboard() |
| | | this.pickerVisible = true |
| | | }, |
| | | onPickerSelect(value,selection,index){ |
| | | this.innerValue = value; |
| | | this.$emit('select',value,selection,index) |
| | | }, |
| | | setLabelValue(){ |
| | | let noMatch = true; |
| | | for (let i=0;i<this.list.length;i++) { |
| | | if (this.isBaseItem(this.list[i])) { |
| | | if (this.list[i]===this.innerValue) { |
| | | this.innerLabel = this.list[i]; |
| | | noMatch = false; |
| | | break; |
| | | } |
| | | } else { |
| | | if (this.list[i][this.valueField]===this.innerValue) { |
| | | this.innerLabel = this.list[i][this.labelField]; |
| | | noMatch = false; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if (noMatch) { |
| | | this.innerLabel = this.innerValue |
| | | } |
| | | }, |
| | | isBaseItem(item){ |
| | | if (typeof(item)==='string'||typeof(item)==='number'||typeof(item)==='boolean'||item===undefined||item===null){ |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | setInitData(){ |
| | | this.innerValue = this.value; |
| | | if (this.list.length===1) { |
| | | if (!this.initFlag) { |
| | | this.initFlag = true |
| | | let _tempVal = null; |
| | | if (!this.isBaseItem(this.list[0])) { |
| | | _tempVal = this.list[0][this.valueField]; |
| | | } else { |
| | | _tempVal = this.list[0]; |
| | | } |
| | | if (!this.innerValue) { |
| | | this.innerValue = _tempVal; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onClear(){ |
| | | this.innerValue = null; |
| | | this.$emit('clear') |
| | | } |
| | | }, |
| | | created() { |
| | | this.setInitData() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-view-form-select-picker-component{ |
| | | width: 100%; |
| | | .input-row{ |
| | | width: 100%; |
| | | min-height: 48rpx; |
| | | border-radius: 8rpx; |
| | | overflow: hidden; |
| | | background-color: $uni-bg-color; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | .close-view,.right-icon-view{ |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .close-view{ |
| | | .close-circle{ |
| | | width: 20px; |
| | | height: 20px; |
| | | border-radius: 50%; |
| | | background-color: #c6c7cb; |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | justify-content: center; |
| | | transform: scale(0.82); |
| | | margin-left: 4px; |
| | | } |
| | | } |
| | | .input-view{ |
| | | flex-grow: 1; |
| | | font-size: 30rpx; |
| | | white-space:nowrap; |
| | | overflow:hidden; |
| | | text-overflow:ellipsis; |
| | | color: rgb(48, 49, 51); |
| | | .placeholder{ |
| | | color: rgb(192, 196, 204); |
| | | } |
| | | } |
| | | &>.mask{ |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | z-index: 100; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="forma-item"> |
| | | <scan-input-form-item placeholder="è¯·éæ©" :clearable="false" :hasScan="false" :hasSearch="false" |
| | | @click.native="visible=true" class="forma-item" :label="label" v-model="value" :disabled="disabled"/> |
| | | <EasyPicker :visible.sync="visible" :list="selectData" :labelField="labelField" :valueField="valueField" |
| | | @select="getSelectData" /> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import { |
| | | parseDic |
| | | } from '@/static/js/utils/index.js' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | export default { |
| | | props: { |
| | | selectData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | value:{ |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | label:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | labelField:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | valueField:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | disabled:{ |
| | | type:Boolean, |
| | | default:false |
| | | } |
| | | |
| | | }, |
| | | components: { |
| | | EasyPicker, |
| | | ScanInputFormItem |
| | | }, |
| | | data() { |
| | | return { |
| | | radiolist1: [], |
| | | radiovalue1: '', |
| | | visible:false, |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | getSelectData(val,obj){ |
| | | this.$emit('update:value',val,obj) |
| | | }, |
| | | parseDic |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- <style scoped> |
| | | .custom-radio { |
| | | font-size: 16px; |
| | | line-height: 24px; |
| | | } |
| | | |
| | | .material-item-group { |
| | | padding-top: 10rpx; |
| | | display: flex; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | position: relative; |
| | | flex: 1; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .radio-row { |
| | | background-color: rgb(255, 255, 255); |
| | | margin-bottom: 10px; |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .p-form-label { |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | |
| | | .required-tag { |
| | | color: $u-error; |
| | | } |
| | | } |
| | | |
| | | .radio-group u-radio { |
| | | width: 50%; |
| | | } |
| | | </style> --> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- ç¹å»è¾å
¥æ¡ å¯è¾å
¥ï¼ä¹å¯ç¹å»æç´¢æé® å¼¹åºéæ©æ¡ --> |
| | | <view class="forma-item"> |
| | | <view class="scan-input-form-item-compontent"> |
| | | <view class="p-form-label" v-if="label"> |
| | | <text v-if="required" class="required-tag">*</text>{{ label }}ï¼ |
| | | </view> |
| | | <view class="input-row" v-if="content"> |
| | | <view class="mask" @tap.stop="" v-if="disabled"></view> |
| | | <view class="input-view"> |
| | | <input |
| | | :clearable="clearable" |
| | | border="none" |
| | | :type="type" |
| | | :placeholder="placeholder" |
| | | v-model.trim="innerValue" |
| | | @clear="onClear" |
| | | @blur="onBlur" |
| | | @focus="innerValue = ''" |
| | | @confirm="onConfirm(innerValue)" |
| | | /> |
| | | </view> |
| | | <view class="scan-view" v-if="hasScan"> |
| | | <view @tap.stop="onScan"> |
| | | <u-icon name="scan" color="#F18201" :size="32"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="btn-view" v-if="hasSearch"> |
| | | <view class="search-btn" @tap.stop="searchShowBox">æ</view> |
| | | </view> |
| | | </view> |
| | | <!-- :class="msgType === 'info' ? 'info-type' : ''" --> |
| | | <view class="msg-row info-type" v-if="innerValue"> |
| | | {{ msg }} |
| | | </view> |
| | | </view> |
| | | <EasyPicker |
| | | :visible.sync="visible" |
| | | :list="selectData" |
| | | :labelField="labelField" |
| | | :valueField="valueField" |
| | | @select="getSelectData" |
| | | :isShowSearch="true" |
| | | @getCurrentData="getCurrentData" |
| | | /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { parseDic } from "@/static/js/utils/index.js"; |
| | | import EasyPicker from "@/components/EasyPickerWithSearch.vue"; |
| | | |
| | | export default { |
| | | emits: ["getPropData", "confirmHc"], |
| | | props: { |
| | | type: { type: String, default: "text" }, |
| | | label: { type: String, default: "" }, |
| | | placeholder: { type: String, default: "请è¾å
¥..." }, |
| | | msg: { type: String, default: "" }, |
| | | msgType: { type: String, default: "error" }, |
| | | hasScan: { type: Boolean, default: true }, |
| | | hasSearch: { type: Boolean, default: true }, |
| | | disabled: { type: Boolean, default: false }, |
| | | clearable: { type: Boolean, default: true }, |
| | | required: { type: Boolean, default: false }, |
| | | content: { type: Boolean, default: true }, |
| | | selectData: { type: Array, default: () => [] }, |
| | | labelField: { type: String, default: "" }, |
| | | valueField: { type: String, default: "" }, |
| | | value: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | }, |
| | | components: { |
| | | EasyPicker, |
| | | }, |
| | | watch: { |
| | | value(newVal) { |
| | | this.innerValue = newVal; // é¿å
ç¶ç»ä»¶æ´æ°å localValue ä¸åæ¥ |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | innerValue: this.value, |
| | | }; |
| | | }, |
| | | methods: { |
| | | // å¼¹æ¡æ°æ® ç¹å»æä¸é¡¹ç¡®è®¤ |
| | | getSelectData(val) { |
| | | this.$emit("update:value", val); |
| | | this.$emit("confirmHc",val); // æç´¢åè°ç¨çæ¥å£ |
| | | }, |
| | | //å¼¹æ¡ä¸çæ°æ® |
| | | getCurrentData(val) { |
| | | this.$emit("getPropData", val); |
| | | }, |
| | | onScan() { |
| | | uni.scanCode({ |
| | | success: (res) => { |
| | | this.innerValue = res.result; |
| | | }, |
| | | fail: () => { |
| | | console.log("scanCode fail"); |
| | | }, |
| | | }); |
| | | }, |
| | | searchShowBox() { |
| | | this.visible = true; // æ¾ç¤ºå¼¹æ¡ |
| | | this.$emit("searchShowBox", this.innerValue); |
| | | }, |
| | | onClear() { |
| | | this.innerValue = null; |
| | | this.$emit("clear"); |
| | | }, |
| | | onBlur() { |
| | | this.$emit("blur", this.innerValue); |
| | | }, |
| | | onConfirm(val) { |
| | | if (this.innerValue) { |
| | | this.$emit("update:value", val); |
| | | this.$emit("confirmHc",val); |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | }; |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .scan-input-form-item-compontent { |
| | | width: 100%; |
| | | .p-form-label { |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag { |
| | | color: $u-error; |
| | | } |
| | | } |
| | | .input-row { |
| | | width: 100%; |
| | | height: 75rpx; |
| | | overflow: hidden; |
| | | background-color: $uni-bg-color; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | .scan-view, |
| | | .btn-view { |
| | | flex-shrink: 0; |
| | | } |
| | | .scan-view { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding-right: 10rpx; |
| | | } |
| | | .input-view { |
| | | flex-grow: 1; |
| | | padding-left: 20rpx; |
| | | } |
| | | .btn-view { |
| | | width: 70rpx; |
| | | height: 100%; |
| | | padding: 20rpx; |
| | | padding-left: 0rpx; |
| | | box-sizing: border-box; |
| | | .search-btn { |
| | | height: 100%; |
| | | width: 100%; |
| | | border-radius: 8rpx; |
| | | background: linear-gradient( |
| | | 157.342820970935deg, |
| | | rgba(194, 128, 255, 1) -20%, |
| | | rgba(194, 128, 255, 1) -19%, |
| | | rgba(132, 0, 255, 1) 119% |
| | | ); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: $uni-bg-color; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | & > .mask { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | z-index: 100; |
| | | background-color: #fff; |
| | | opacity: 0.25; |
| | | } |
| | | } |
| | | .msg-row { |
| | | padding: 6rpx 20rpx 0 20rpx; |
| | | line-height: 1.3; |
| | | font-size: 24rpx; |
| | | color: $u-error; |
| | | word-break: break-all; |
| | | word-wrap: break-word; |
| | | &.info-type { |
| | | color: $color-blue; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import ajax from './modules/ajax.js' |
| | | import pagination from './modules/pagination.js' |
| | | |
| | | export default { |
| | | ajax, |
| | | pagination, |
| | | downUrl:'http://127.0.0.1:18000/wc2.apk', |
| | | path: { |
| | | home:'/pages/home/index', |
| | | login:'/pages/login/index', |
| | | bluetooth:'/pages/print/bluetoothConnection', |
| | | host:'/pages/setting/host', |
| | | online:'/pages/online/index', |
| | | bind:'/pages/bind/index', |
| | | bindInForLocation:'/pages/bindInForLocation/index', |
| | | bindContaniner:'/pages/bindContaniner/index', |
| | | pick:'/pages/pick/index', |
| | | receive:'/pages/receiveIn/index', |
| | | temporaryIn:'/pages/temporaryInstore/index', |
| | | manualOut:'/pages/manual/out', |
| | | unbind:'/pages/unbind/index', |
| | | tasks:'/pages/tasks/index', |
| | | notices:'/pages/notices/index', |
| | | fapaoIn:'/pages/fapaoInStore/index', |
| | | fapaoOut:'/pages/fapiaoOutStore/index', |
| | | slicingOn:'/pages/slicingOn/index', |
| | | slicingOff:'/pages/slicingOff/index', |
| | | plywoodBind:'/pages/plywoodBind/index', |
| | | plywoodInstore:'/pages/plywoodInstore/index', |
| | | plywoodOut:'/pages/plywoodOut/index', |
| | | emptyOut:'/pages/emptyOut/index', |
| | | rsbIn:'/pages/rsbIn/index', |
| | | emptyIn:'/pages/emptyIn/index', |
| | | rsbOut:'/pages/rsbOut/index', |
| | | sandingIn:'/pages/sandingInstore/index', |
| | | endProductIn:'/pages/endProductInstore/index', |
| | | innerTailBack:'/pages/innerTailBack/index', |
| | | unstackingIn:'/pages/unstackingInstore/index', |
| | | transport:'/pages/transport/index', |
| | | changeStore:'/pages/changeStore/index', |
| | | takeInStore:'/pages/takeInStore/index', |
| | | checkStock:'/pages/checkStock/index', |
| | | receiptExecution:'/pages/receiptExecution/index', |
| | | sortingSearch:'/pages/sortingSearch/index', |
| | | Outbound:'/pages/inAndOutBound/index', |
| | | replenishMent:'/pages/replenishMent/index', |
| | | sorting:'/pages/sortingSearch/index', |
| | | exception:'/pages/exceptionHandle/index', |
| | | containerHandle:'/pages/containerHandle/index', |
| | | bindWXJ:'/pages/bindWXJ/index', |
| | | containerUnBind:'/pages/containerUnBind/index', |
| | | oneTouchUnBind:'/pages/oneTouchUnBind/index', |
| | | PointHandling:'/pages/PointHandling/index', |
| | | emptyInCopy:'/pages/emptyInCopy/index', |
| | | emptyContainerReturn:'/pages/emptyContainerReturn/index', |
| | | writeRfid:'/pages/writeRfid/index', |
| | | loadingDelivery:'/pages/loadingDelivery/index', |
| | | materialStorage:'/pages/materialStorage/index' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | errMsg:'ç½ç»é误ï¼', |
| | | host:{ //æ¥å£è°ç¨çåå设置 |
| | | //'default':'http://10.15.250.185:2001' |
| | | 'default':'http://localhost:5006', |
| | | // 'default':'http://192.168.1.10:2001', |
| | | 'auth':'http://10.10.40.166:183', |
| | | 'mock':'http://localhost:3012' |
| | | }, |
| | | block:{ |
| | | default:'/api/', |
| | | sysDic:'/api/sysDictType/', |
| | | online:'/api/FoamBoard/', |
| | | offline:'/api/Receipt/', |
| | | quickIn:'/api/QuickWoreHouse/', |
| | | exware:'/api/ExWarePDA/', |
| | | task:'/api/pdatask/', |
| | | fapaoIn:'/api/automaticwarehouse/', |
| | | fapaoOut:'/api/groupdiskoutwarehouse/', |
| | | wentrance:'/api/warewarehouseentrance/', |
| | | generic:'/api/BeCurrent/', |
| | | plywood:'/api/PlywoodGroupDisk/', |
| | | emptyOut:'/api/CallEmpty/', |
| | | emptyIn:'/api/InEmpty/', |
| | | rsbIn:'/api/RSBGroupDisk/', |
| | | sandingIn:'/api/SandingWarehouse/', |
| | | endProduct:'/api/FinishProductInWare/', |
| | | innerTail:'/api/TailStockReturn/', |
| | | unstacking:'/api/UnstackingRuKu/', |
| | | transport:'/api/Transport/', |
| | | changeStore:'/api/Relocation/', |
| | | checkStock:'/api/inventoryplanexce/' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | errMsg:'ç½ç»é误ï¼', |
| | | host:{ //æ¥å£è°ç¨çåå设置 |
| | | 'default':'http://127.0.0.1:18000', |
| | | 'auth':'http://10.10.40.166:183', |
| | | 'mock':'http://localhost:3012' |
| | | }, |
| | | block:{ |
| | | default:'/api/', |
| | | sysDic:'/api/sysDictType/', |
| | | online:'/api/FoamBoard/', |
| | | offline:'/api/Receipt/', |
| | | quickIn:'/api/QuickWoreHouse/', |
| | | exware:'/api/ExWarePDA/', |
| | | task:'/api/pdatask/', |
| | | fapaoIn:'/api/automaticwarehouse/', |
| | | fapaoOut:'/api/groupdiskoutwarehouse/', |
| | | wentrance:'/api/warewarehouseentrance/', |
| | | generic:'/api/BeCurrent/', |
| | | plywood:'/api/PlywoodGroupDisk/', |
| | | emptyOut:'/api/CallEmpty/', |
| | | emptyIn:'/api/InEmpty/', |
| | | rsbIn:'/api/RSBGroupDisk/', |
| | | sandingIn:'/api/SandingWarehouse/', |
| | | endProduct:'/api/FinishProductInWare/', |
| | | innerTail:'/api/TailStockReturn/', |
| | | unstacking:'/api/UnstackingRuKu/', |
| | | transport:'/api/Transport/', |
| | | changeStore:'/api/Relocation/', |
| | | checkStock:'/api/inventoryplanexce/' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | errMsg:'ç½ç»é误ï¼', |
| | | host:{ //æ¥å£è°ç¨çåå设置 |
| | | 'default':'http:///localhost:8080', |
| | | 'auth':'http://10.10.40.166:183', |
| | | 'mock':'http://localhost:3012' |
| | | }, |
| | | block:{ |
| | | default:'/api/', |
| | | sysDic:'/api/sysDictType/', |
| | | online:'/api/FoamBoard/', |
| | | offline:'/api/Receipt/', |
| | | quickIn:'/api/QuickWoreHouse/', |
| | | exware:'/api/ExWarePDA/', |
| | | task:'/api/pdatask/', |
| | | fapaoIn:'/api/automaticwarehouse/', |
| | | fapaoOut:'/api/groupdiskoutwarehouse/', |
| | | wentrance:'/api/warewarehouseentrance/', |
| | | generic:'/api/BeCurrent/', |
| | | plywood:'/api/PlywoodGroupDisk/', |
| | | emptyOut:'/api/CallEmpty/', |
| | | emptyIn:'/api/InEmpty/', |
| | | rsbIn:'/api/RSBGroupDisk/', |
| | | sandingIn:'/api/SandingWarehouse/', |
| | | endProduct:'/api/FinishProductInWare/', |
| | | innerTail:'/api/TailStockReturn/', |
| | | unstacking:'/api/UnstackingRuKu/', |
| | | transport:'/api/Transport/', |
| | | changeStore:'/api/Relocation/', |
| | | checkStock:'/api/inventoryplanexce/' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | pageNo:1, |
| | | pageSize:10 |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8" /> |
| | | <script> |
| | | var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || |
| | | CSS.supports('top: constant(a)')) |
| | | document.write( |
| | | '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + |
| | | (coverSupport ? ', viewport-fit=cover' : '') + '" />') |
| | | </script> |
| | | <title></title> |
| | | <!--preload-links--> |
| | | <!--app-context--> |
| | | </head> |
| | | <body> |
| | | <div id="app"><!--app-html--></div> |
| | | <script type="module" src="/main.js"></script> |
| | | </body> |
| | | </html> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import App from './App' |
| | | import Vue from 'vue' |
| | | import uView from '@/uni_modules/uview-ui' |
| | | import createStore from './service/store' |
| | | import config from './config/index.js' |
| | | import defineApi from './service/request' |
| | | |
| | | const store = createStore(Vue); |
| | | const $api = new defineApi(store,config) |
| | | |
| | | Vue.config.productionTip = false |
| | | App.mpType = 'app' |
| | | Vue.use(uView) |
| | | |
| | | Vue.prototype.$modal = function(content,callback=()=>{},type = 0,title="æç¤º") { |
| | | uni.showModal({ |
| | | title, |
| | | content, |
| | | icon: type = 0 ? 'success' : 'error', |
| | | showCancel:false, |
| | | success:callback |
| | | }) |
| | | } |
| | | |
| | | Vue.prototype.$config = config; |
| | | Vue.prototype.$api = $api; |
| | | |
| | | const app = new Vue({ |
| | | ...App, |
| | | store: store |
| | | }) |
| | | app.$mount() |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name" : "wc2Pad", |
| | | "appid" : "__UNI__1A52976", |
| | | "description" : "", |
| | | "versionName" : "2025-03-01", |
| | | "versionCode" : 100, |
| | | "transformPx" : false, |
| | | /* 5+Appç¹æç¸å
³ */ |
| | | "app-plus" : { |
| | | "usingComponents" : true, |
| | | "nvueStyleCompiler" : "uni-app", |
| | | "compilerVersion" : 3, |
| | | "splashscreen" : { |
| | | "alwaysShowBeforeRender" : true, |
| | | "waiting" : true, |
| | | "autoclose" : true, |
| | | "delay" : 0 |
| | | }, |
| | | /* 模åé
ç½® */ |
| | | "modules" : {}, |
| | | /* åºç¨åå¸ä¿¡æ¯ */ |
| | | "distribute" : { |
| | | /* androidæå
é
ç½® */ |
| | | "android" : { |
| | | "permissions" : [ |
| | | "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", |
| | | "<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.READ_LOGS\"/>", |
| | | "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", |
| | | "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", |
| | | "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.CAMERA\"/>", |
| | | "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", |
| | | "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
| | | "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", |
| | | "<uses-feature android:name=\"android.hardware.camera\"/>", |
| | | "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
| | | ] |
| | | }, |
| | | /* iosæå
é
ç½® */ |
| | | "ios" : { |
| | | "dSYMs" : false |
| | | }, |
| | | /* SDKé
ç½® */ |
| | | "sdkConfigs" : { |
| | | "ad" : {} |
| | | }, |
| | | "icons" : { |
| | | "android" : { |
| | | "hdpi" : "unpackage/res/icons/72x72.png", |
| | | "xhdpi" : "unpackage/res/icons/96x96.png", |
| | | "xxhdpi" : "unpackage/res/icons/144x144.png", |
| | | "xxxhdpi" : "unpackage/res/icons/192x192.png" |
| | | }, |
| | | "ios" : { |
| | | "appstore" : "unpackage/res/icons/1024x1024.png", |
| | | "ipad" : { |
| | | "app" : "unpackage/res/icons/76x76.png", |
| | | "app@2x" : "unpackage/res/icons/152x152.png", |
| | | "notification" : "unpackage/res/icons/20x20.png", |
| | | "notification@2x" : "unpackage/res/icons/40x40.png", |
| | | "proapp@2x" : "unpackage/res/icons/167x167.png", |
| | | "settings" : "unpackage/res/icons/29x29.png", |
| | | "settings@2x" : "unpackage/res/icons/58x58.png", |
| | | "spotlight" : "unpackage/res/icons/40x40.png", |
| | | "spotlight@2x" : "unpackage/res/icons/80x80.png" |
| | | }, |
| | | "iphone" : { |
| | | "app@2x" : "unpackage/res/icons/120x120.png", |
| | | "app@3x" : "unpackage/res/icons/180x180.png", |
| | | "notification@2x" : "unpackage/res/icons/40x40.png", |
| | | "notification@3x" : "unpackage/res/icons/60x60.png", |
| | | "settings@2x" : "unpackage/res/icons/58x58.png", |
| | | "settings@3x" : "unpackage/res/icons/87x87.png", |
| | | "spotlight@2x" : "unpackage/res/icons/80x80.png", |
| | | "spotlight@3x" : "unpackage/res/icons/120x120.png" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | /* å¿«åºç¨ç¹æç¸å
³ */ |
| | | "quickapp" : {}, |
| | | /* å°ç¨åºç¹æç¸å
³ */ |
| | | "mp-weixin" : { |
| | | "appid" : "", |
| | | "setting" : { |
| | | "urlCheck" : false |
| | | }, |
| | | "usingComponents" : true |
| | | }, |
| | | "mp-alipay" : { |
| | | "usingComponents" : true |
| | | }, |
| | | "mp-baidu" : { |
| | | "usingComponents" : true |
| | | }, |
| | | "mp-toutiao" : { |
| | | "usingComponents" : true |
| | | }, |
| | | "uniStatistics" : { |
| | | "enable" : false |
| | | }, |
| | | "vueVersion" : "2", |
| | | "fallbackLocale" : "en", |
| | | "locale" : "en", |
| | | "h5" : { |
| | | "router" : { |
| | | "mode" : "hash", |
| | | "base" : "./" |
| | | }, |
| | | "title" : "wc3_pda", |
| | | "devServer" : { |
| | | "port" : 2066 |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "pda_vue2_demo", |
| | | "version": "1.0.0", |
| | | "description": "", |
| | | "main": "main.js", |
| | | "scripts": { |
| | | "test": "echo \"Error: no test specified\" && exit 1", |
| | | "api": "json-server __json_server_mock__/db.json --watch --port 3012 --host 0.0.0.0" |
| | | }, |
| | | "author": "", |
| | | "license": "ISC", |
| | | "dependencies": { |
| | | "dayjs": "^1.11.10", |
| | | "vuex": "^3.6.2" |
| | | }, |
| | | "devDependencies": { |
| | | "json-server": "^0.17.1" |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "pages": [ //pagesæ°ç»ä¸ç¬¬ä¸é¡¹è¡¨ç¤ºåºç¨å¯å¨é¡µï¼åèï¼https://uniapp.dcloud.io/collocation/pages |
| | | { |
| | | "path": "pages/start/index" |
| | | }, |
| | | { |
| | | "path": "pages/login/index" |
| | | }, |
| | | { |
| | | "path": "pages/home/index" |
| | | }, |
| | | { |
| | | "path": "pages/setting/host" |
| | | }, |
| | | { |
| | | "path": "pages/print/bluetoothConnection" |
| | | }, |
| | | { |
| | | "path": "pages/online/index" |
| | | }, |
| | | { |
| | | "path": "pages/bind/index" |
| | | }, |
| | | { |
| | | "path": "pages/bindInForLocation/index" // å
¥åº éæ©åºä½ |
| | | }, |
| | | { |
| | | "path": "pages/emptyContainerReturn/index" |
| | | }, |
| | | { |
| | | "path": "pages/bindContaniner/index" |
| | | }, |
| | | { |
| | | "path": "pages/pick/index" |
| | | }, |
| | | { |
| | | "path":"pages/sortingSearch/index" |
| | | } |
| | | ,{ |
| | | "path" : "pages/replenishMent/index", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | } |
| | | ,{ |
| | | "path" : "pages/inAndOutBound/index", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | } |
| | | ,{ |
| | | "path" : "pages/exceptionHandle/index", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | } |
| | | ,{ |
| | | "path" : "pages/exceptionHandle/modules/exceptionPlace", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | } |
| | | ,{ |
| | | "path" : "pages/exceptionHandle/modules/materialInfo", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | }, |
| | | { |
| | | "path": "pages/emptyOut/index" |
| | | }, |
| | | { |
| | | "path": "pages/emptyIn/index" |
| | | }, |
| | | { |
| | | "path": "pages/containerHandle/index" |
| | | }, |
| | | { |
| | | "path": "pages/bindWXJ/index" |
| | | }, |
| | | { |
| | | "path": "pages/containerUnBind/index" |
| | | }, |
| | | { |
| | | "path": "pages/oneTouchUnBind/index" |
| | | }, |
| | | { |
| | | "path": "pages/PointHandling/index" |
| | | }, |
| | | { |
| | | "path": "pages/emptyInCopy/index" |
| | | }, |
| | | { |
| | | "path" : "pages/writeRfid/index", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | }, |
| | | { |
| | | "path": "pages/loadingDelivery/index" |
| | | }, |
| | | { |
| | | "path": "pages/materialStorage/index" |
| | | } |
| | | ], |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "black", |
| | | "navigationBarTitleText": "管å线LMESDemo", |
| | | "navigationBarBackgroundColor": "#F8F8F8", |
| | | "backgroundColor": "#F8F8F8", |
| | | "navigationStyle": "custom" |
| | | }, |
| | | "uniIdRouter": {} |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="ç¹å°ç¹æ¬è¿"> |
| | | <view |
| | | class="page-frame with-action-user-row" |
| | | :style="{ height: pageBodyHeight + 'px' }" |
| | | v-if="pageBodyHeight" |
| | | > |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- åºåº --> |
| | | <selectItem |
| | | :selectData="areaData" |
| | | :value.sync="form.areaNo" |
| | | label="èµ·å§åºåº" |
| | | labelField="areaName" |
| | | valueField="areaNo" |
| | | /> |
| | | <!-- åºä½ --> |
| | | <selectItemWc2 |
| | | :selectData="placeList" |
| | | :value.sync="form.placeNo" |
| | | label="åºä½ç¼ç " |
| | | labelField="placeNo" |
| | | valueField="placeNo" |
| | | @getPropData="getPropData" |
| | | @confirmHc="getStockPageHandle" |
| | | /> |
| | | |
| | | <!-- æçç¼ç --> |
| | | <scan-input-form-item |
| | | v-show="Boolean(form.containerNo)" |
| | | disabled |
| | | :clearable="false" |
| | | placeholder="" |
| | | :hasScan="false" |
| | | :hasSearch="false" |
| | | @click.native="ctVisible = true" |
| | | class="forma-item" |
| | | label="æçç¼ç " |
| | | v-model="form.containerNo" |
| | | /> |
| | | |
| | | <!-- ç®æ åºåº --> |
| | | <selectItem |
| | | :selectData="areaData" |
| | | :value.sync="form.targetAreaNo" |
| | | label="ç®æ åºåº" |
| | | labelField="areaName" |
| | | valueField="areaNo" |
| | | /> |
| | | |
| | | <div v-if="false"> |
| | | <scan-input-form-item |
| | | class="forma-item" |
| | | label="åºä½å·²ææçä¿¡æ¯" |
| | | :content="false" |
| | | /> |
| | | <containerInfo :containerInfo="containerPlaceInfo" /> |
| | | </div> |
| | | |
| | | <!-- <placeInfo v-show="selectDisabled" :placeInfo="containerInfo.placeInfo" /> --> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template> |
| | | <div class="btn-frame"> |
| | | <u-button |
| | | type="primary" |
| | | :disabled="!abled" |
| | | text="æäº¤" |
| | | @click="onSubmit" |
| | | ></u-button> |
| | | </div> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from "@/components/DefaultHeaderPageLayout.vue"; |
| | | import ActionUserRow from "@/components/ActionUserRow.vue"; |
| | | import ScanInputFormItem from "@/components/ScanInputFormItem.vue"; |
| | | import selectItem from "@/components/selectItem.vue"; |
| | | import selectItemWc2 from "@/components/selectItemWithSearchWc2.vue"; |
| | | import placeInfo from "./modules/placeInfo.vue"; |
| | | import containerInfo from "./modules/containerInfo.vue"; |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | | $successInfo, |
| | | getDicList, |
| | | } from "@/static/js/utils/index.js"; |
| | | import { palceList } from "@/service/mixins/mixins.js"; |
| | | import { |
| | | getContainerPlaceInfo, |
| | | containerHandle, |
| | | getContainerPlaceByPlace, |
| | | } from "@/api/containerHandle.js"; |
| | | import { getAreaInfo, getAreaListContaninerBind } from "@/api/common.js"; |
| | | |
| | | import { pointHandlingTask } from "@/api/PointHandling.js"; |
| | | let initInterVal = null; |
| | | export default { |
| | | name: "containerHandle", |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | placeInfo, |
| | | selectItem, |
| | | containerInfo, |
| | | selectItemWc2 |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | containter: null, |
| | | form: { |
| | | containerNo: "", |
| | | areaNo: "", |
| | | placeNo: "", |
| | | targetPlaceNo: "", |
| | | }, |
| | | msg: { |
| | | containter: "", |
| | | }, |
| | | msgType: { |
| | | containter: "info", |
| | | }, |
| | | containerInfo: {}, |
| | | areaData: [], |
| | | targetPlaceList: [], |
| | | containerPlaceInfo: {}, |
| | | }; |
| | | }, |
| | | computed: { |
| | | selectDisabled() { |
| | | return Boolean(this.containerInfo?.placeInfo?.placeNo); |
| | | }, |
| | | abled() { |
| | | //return Boolean(this.form.containerNo) |
| | | return true; |
| | | // return Boolean(this.form.containerNo) && Boolean(this.form.targetPlaceNo) |
| | | }, |
| | | placeInfoShow() { |
| | | return ( |
| | | Boolean(this.containerInfo.containerNo) && |
| | | Boolean(this.form.placeNo) && |
| | | Boolean(this.containerPlaceInfo.containerNo) && |
| | | !Boolean(this.containerInfo?.placeInfo?.placeNo) |
| | | ); |
| | | }, |
| | | }, |
| | | watch: { |
| | | "form.areaNo": { |
| | | handler(val, oldVal) { |
| | | if (val != "") { |
| | | this.form.placeNo = ""; |
| | | this.form.containerNo = ""; |
| | | this.placeList = []; |
| | | this.getPalceList({ |
| | | areaCode: val, |
| | | }); |
| | | // if (Boolean(this.containerInfo?.placeInfo?.placeNo)) { |
| | | // this.$set(this.form, 'placeNo', this.containerInfo.placeInfo.placeNo) |
| | | // } |
| | | } |
| | | }, |
| | | }, |
| | | "form.targetAreaNo": { |
| | | async handler(val, oldVal) { |
| | | if (val != "") { |
| | | this.form.targetPlaceNo = ""; |
| | | this.targetPlaceList = []; |
| | | this.targetPlaceList = await this.getTargetPlaceList({ |
| | | areaCode: val, |
| | | }); |
| | | // if (Boolean(this.containerInfo?.placeInfo?.placeNo)) { |
| | | // this.$set(this.form, 'placeNo', this.containerInfo.placeInfo.placeNo) |
| | | // } |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | "form.placeNo": { |
| | | async handler(val, oldVal) { |
| | | if (val != "" && val!=oldVal) { |
| | | this.containerPlaceInfo = {}; |
| | | try { |
| | | let { result } = await getContainerPlaceByPlace({ |
| | | placeNo: this.form.placeNo, |
| | | }); |
| | | this.containerPlaceInfo = result == null ? {} : result; |
| | | this.$set(this.form, "containerNo", result?.containerNo); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | methods: { |
| | | //åºä½æ¨¡ç³æ¥è¯¢ |
| | | async getPropData(PlaceNo) { |
| | | await this.getPalceList({ |
| | | areaCode: this.form.areaNo, |
| | | PlaceNo: PlaceNo, |
| | | }); |
| | | }, |
| | | /* æçç¼ç æç´¢ */ |
| | | async onSearchContainter() { |
| | | const { containerNo } = this.form; |
| | | if (!Boolean(containerNo)) { |
| | | this.msgType.containter = "error"; |
| | | this.msg.containter = "请è¾å
¥æçç¼å·ï¼"; |
| | | return false; |
| | | } |
| | | // è·å代ç |
| | | try { |
| | | let { result } = await getContainerPlaceInfo({ |
| | | containerNo, |
| | | }); |
| | | this.containerInfo = result; |
| | | if (Boolean(this.containerInfo?.placeInfo?.placeNo)) { |
| | | this.getAreaList(); |
| | | this.$nextTick(() => { |
| | | this.$set( |
| | | this.form, |
| | | "areaNo", |
| | | this.containerInfo?.placeInfo?.areaCode |
| | | ); |
| | | }); |
| | | } |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* æ¸
é¤ç¼ç */ |
| | | onClear() { |
| | | this.form = { |
| | | containterNo: "", |
| | | areaNo: "", |
| | | placeNo: "", |
| | | targetAreaNo: "", |
| | | targetPlaceNo: "", |
| | | }; |
| | | }, |
| | | |
| | | // è·ååºåºæ°æ® |
| | | async getAreaList() { |
| | | try { |
| | | let { result } = await getAreaInfo(); |
| | | this.areaData = result; |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | // æçå¤ç |
| | | async onSubmit() { |
| | | try { |
| | | await pointHandlingTask(this.form); |
| | | this.$modal("ç¹å°ç¹æ¬è¿ä»»å¡çææå"); |
| | | this.onClear(); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval(); |
| | | callback && callback(); |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight(); |
| | | } |
| | | }, 200); |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal); |
| | | initInterVal = null; |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | }, |
| | | //1è·ååºå |
| | | async getStockPageHandle(val) { |
| | | console.log(val); |
| | | }, |
| | | }, |
| | | mixins: [palceList], |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | this.getAreaList(); |
| | | this.ContainerType = getDicList( |
| | | this.$store, |
| | | "container_type" |
| | | ).sysDictDatas; |
| | | }); |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval(); |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | & > .label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | & > .content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .label { |
| | | margin-left: 25rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="material-list-item" > |
| | | <!-- <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> --> |
| | | <!-- <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> --> |
| | | <view class="item-row"> |
| | | <view class="label">æçç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?containerInfo.containerNo:''}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">åºä½ç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?containerInfo.placeNo:''}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æçåºä½ç¶æï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?(parseDic($store,'common_status',containerInfo.containerPlaceStatus)):''}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | containerInfo: { |
| | | type: Object, |
| | | default: () => {} |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | margin:-20rpx auto; |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* text-align: right; */ |
| | | /* font-weight:5; */ |
| | | width: 200rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="scan-input-form-item-compontent"> |
| | | <view class="p-form-label">åºä½è¯¦æ
ï¼</view> |
| | | <view class="material-item-group" v-if="Boolean(placeInfo)"> |
| | | <view class="material-list-item"> |
| | | <view class="item-row"> |
| | | <view class="label">åºä½ç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{placeInfo.placeNo}}</view> |
| | | </view> |
| | | |
| | | <view class="item-row"> |
| | | <view class="label">æå±åºåºï¼</view> |
| | | <view class="content auto-wrap">{{placeInfo.areaCode}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | placeInfo: { |
| | | type: Object, |
| | | default: () => {placeNo:''} |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style:{ |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }], |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .scan-input-form-item-compontent{ |
| | | width: 100%; |
| | | |
| | | .p-form-label{ |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag{ |
| | | color:$u-error; |
| | | } |
| | | }} |
| | | .material-item-group { |
| | | /* background-color: transparent!impor; */ |
| | | padding-top: 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* font-weight:5; */ |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="forma-item"> |
| | | <scan-input-form-item placeholder="è¯·éæ©" :clearable="false" :hasScan="false" :hasSearch="false" |
| | | @click.native="visible=true" class="forma-item" :label="label" v-model="value" :disabled="disabled"/> |
| | | <EasyPicker :visible.sync="visible" :list="selectData" :labelField="labelField" :valueField="valueField" |
| | | @select="getSelectData" :isShowSearch="isShowSearch" @getCurrentData="getCurrentData"/> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import { |
| | | parseDic |
| | | } from '@/static/js/utils/index.js' |
| | | import EasyPicker from '@/components/EasyPickerWithSearch.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | export default { |
| | | emits:['getCurrentData'], |
| | | props: { |
| | | selectData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | value:{ |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | label:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | labelField:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | valueField:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | disabled:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | isShowSearch:{ |
| | | type:Boolean, |
| | | default:false |
| | | } |
| | | }, |
| | | components: { |
| | | EasyPicker, |
| | | ScanInputFormItem |
| | | }, |
| | | data() { |
| | | return { |
| | | radiolist1: [], |
| | | radiovalue1: '', |
| | | visible:false, |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | getSelectData(val){ |
| | | this.$emit('update:value',val) |
| | | }, |
| | | getCurrentData(val){ |
| | | //è°ç¨åºä½æ¥å£ï¼è·ååºä½å表 |
| | | this.$emit('getCurrentData',val) |
| | | }, |
| | | parseDic |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- <style scoped> |
| | | .custom-radio { |
| | | font-size: 16px; |
| | | line-height: 24px; |
| | | } |
| | | |
| | | .material-item-group { |
| | | padding-top: 10rpx; |
| | | display: flex; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | position: relative; |
| | | flex: 1; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .radio-row { |
| | | background-color: rgb(255, 255, 255); |
| | | margin-bottom: 10px; |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .p-form-label { |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | |
| | | .required-tag { |
| | | color: $u-error; |
| | | } |
| | | } |
| | | |
| | | .radio-group u-radio { |
| | | width: 50%; |
| | | } |
| | | </style> --> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="èªå¶ä»¶ç»çå
¥åº"> |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- step 1 start --> |
| | | <scan-input-form-item class="forma-item" label="æçç¼ç " v-model="form.containterCode" |
| | | :msg="msg.containter" :msg-type="msgType.containter" @search="onSearchContainter" |
| | | @clear="onClearContainter" /> |
| | | |
| | | <scan-input-form-item placeholder="è¯·éæ©" |
| | | :disabled = "disabledContainerType" |
| | | :clearable="false" |
| | | :hasScan="false" :hasSearch="false" @click.native="ctVisible=true" class="forma-item" label="æçç±»å" |
| | | v-model="form.containerType" /> |
| | | <EasyPicker :visible.sync="ctVisible" :list="ContainerType" labelField="value" valueField="code" |
| | | @select="getTypeVal" /> |
| | | |
| | | <scan-input-form-item v-show="Boolean(containerInfo.containerNo)" class="forma-item" label="ç©æäºç»´ç " v-model="form.materialNo" :msg="msg.material" |
| | | :msg-type="msgType.material" @search="onSearchMaterial" @clear="onClearMaterial" /> |
| | | |
| | | <!-- <scan-input-form-item v-show="Boolean(containerInfo.containerNo)" placeholder="è¯·éæ©" :clearable="false" :hasScan="false" :hasSearch="false" |
| | | @click.native="visible=true" class="forma-item" label="éæ©å
¥åºå£" v-model="form.site" /> |
| | | <EasyPicker :visible.sync="visible" :list="placeList.filter(item=>item.columnNo!=3&&item.columnNo!=4)" |
| | | labelField="placeNo" valueField="placeNo" @select="getSiteVal" /> --> |
| | | <!-- èªå¶ä»¶å
¥åºæµè¯ --> |
| | | <scan-input-form-item v-show="Boolean(containerInfo.containerNo)" class="forma-item" label="åºä½å·" v-model="form.placeNo" :hasScan="false" |
| | | :hasSearch="false" /> |
| | | <materialList :materialData="materialData" @delMaterialData="delMaterialData" /> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template v-if="abled&&materialData.length>0"> |
| | | <!-- <div class="btn-frame"><u-button type="primary" text="ç» ç" @click="onSubmit(1)" |
| | | :disabled="!abled"></u-button></div> --> |
| | | <div class="btn-frame"><u-button type="primary" text="ç»çå¨åº" @click="onSubmit(2)" |
| | | :disabled="!abled"></u-button></div> |
| | | <!-- <div class="btn-frame"><u-button type="primary" text="ç»çå
¥åº" @click="addInBound(1)" |
| | | :disabled="!abled"></u-button></div> --> |
| | | <!-- <div class="btn-frame" style="margin-left:10rpx"><u-button type="primary" text="èªå¶ä»¶å
¥åº" |
| | | @click="addVirtual(1)" :disabled="!abled"></u-button></div> --> |
| | | <!-- <div class="btn-frame" style="margin-left:10rpx"><u-button type="primary" text="çæä»»å¡" |
| | | @click="addVirtualTask" :disabled="!abled"></u-button></div> --> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import materialList from './modules/materialList.vue' |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | | $successInfo, |
| | | getDicList |
| | | } from '@/static/js/utils/index.js' |
| | | import { |
| | | palceList |
| | | } from '@/service/mixins/mixins.js' |
| | | import { |
| | | getForContainerCode, |
| | | getForMaterialNo, |
| | | bindMaterialContainer, |
| | | addInBound, |
| | | addInVirtualPlace, |
| | | addAGVTask |
| | | } from '@/api/bind.js' |
| | | let initInterVal = null; |
| | | export default { |
| | | name: 'receiveInPage', |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | EasySelectFormItem, |
| | | materialList, |
| | | EasyPicker |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | containter: null, |
| | | form: { |
| | | containterCode: '', |
| | | materialNo: '', |
| | | site: '', |
| | | containerTypeCode: 0, |
| | | containerType: '' |
| | | }, |
| | | msg: { |
| | | containter: '', |
| | | material: '', |
| | | site: '', |
| | | }, |
| | | msgType: { |
| | | containter: 'info', |
| | | material: 'error', |
| | | site: 'error' |
| | | }, |
| | | containerInfo: {}, |
| | | materialData: [], |
| | | ContainerType: [], |
| | | visible: false, |
| | | ctVisible: false, |
| | | disabledContainerType:false |
| | | } |
| | | }, |
| | | computed: { |
| | | |
| | | abled() { |
| | | let { |
| | | containerStatus |
| | | } = this.containerInfo |
| | | return containerStatus != 0 && containerStatus != 3 && this.materialData.length > 0 |
| | | } |
| | | }, |
| | | watch: { |
| | | 'form.containterCode': { |
| | | handler(val, oldVal) { |
| | | this.resetContainerNo() |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | // æµè¯PLC触åçæå
¥åºä»»å¡ |
| | | async addVirtualTask() { |
| | | try { |
| | | await addAGVTask({ |
| | | containerNo: this.form.containterCode |
| | | }) |
| | | $alert("çæä»»å¡æå"); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | // éæ©ç«ç¹è¿åå¼ |
| | | getSiteVal(val, valObj, index) { |
| | | this.form.site = val |
| | | }, |
| | | // éæ©æçç±»åè¿åå¼ |
| | | getTypeVal(val, valObj, index) { |
| | | this.form.containerTypeCode = valObj.code |
| | | this.form.containerType = valObj.value |
| | | }, |
| | | /* æçç¼ç æç´¢ */ |
| | | async onSearchContainter() { |
| | | if (!this.form.containterCode) { |
| | | this.msgType.containter = 'error' |
| | | this.msg.containter = '请è¾å
¥æçç¼å·ï¼'; |
| | | return false; |
| | | } |
| | | // è·å代ç |
| | | try { |
| | | let { |
| | | result |
| | | } = await getForContainerCode({ |
| | | code: this.form.containterCode |
| | | }) |
| | | this.containerInfo = result |
| | | // æç详æ
|
| | | let containerStatusName = parseDic(this.$store, 'container_status', result?.containerStatus); |
| | | containerStatusName = containerStatusName == 'æ æ¤åå
¸' ? '' : containerStatusName; |
| | | this.msg.containter = `ç¶æï¼${containerStatusName}, 尺寸ï¼${result?.specLength}*${result?.specWidth}*${result?.specHeight}`; |
| | | |
| | | if(result.containerType){ //妿æçåå¨ èµå¼æçç±»å |
| | | var arr = this.ContainerType.filter(v=>v.code == result.containerType); |
| | | this.form.containerType = arr[0]?.value || ""; |
| | | this.form.containerTypeCode = arr[0]?.code || ""; |
| | | this.disabledContainerType = true; |
| | | }else{ |
| | | this.disabledContainerType = false; |
| | | this.form.containerType =""; |
| | | this.form.containerTypeCode = ""; |
| | | } |
| | | |
| | | result?.materialContainers.forEach(item => { |
| | | let isExist = this.materialData.some(item1 => item1.materialId == item.materialId) |
| | | if (!isExist) { |
| | | this.materialData.push(item) |
| | | } |
| | | }) |
| | | |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* æ¸
餿çç¼ç */ |
| | | onClearContainter() { |
| | | this.form = { |
| | | containterCode: '', |
| | | materialNo: '', |
| | | site: '', |
| | | containerTypeCode: 0, |
| | | containerType: '' |
| | | } |
| | | this.disabledContainerType = false; |
| | | this.$set(this.form, 'site', '') |
| | | this.resetContainerNo() |
| | | }, |
| | | resetContainerNo() { |
| | | this.msg = { |
| | | containter: '', |
| | | material: '', |
| | | site: '', |
| | | } |
| | | this.msgType = { |
| | | containter: 'info', |
| | | material: 'error', |
| | | site: 'error' |
| | | } |
| | | this.containerStatus = null |
| | | this.materialData = [] |
| | | this.form.materialNo = '' |
| | | this.form.site = '' |
| | | this.form.containerTypeCode = 0 |
| | | this.form.containerType = '' |
| | | this.containerInfo = {} |
| | | }, |
| | | /* ç©æç¼ç æç´¢ */ |
| | | async onSearchMaterial() { |
| | | if (!this.form.materialNo) { |
| | | this.msg.material = '请è¾å
¥ç©æç¼å·ï¼'; |
| | | return false; |
| | | } |
| | | this.msg.material = '' |
| | | try { |
| | | let { |
| | | result |
| | | } = await getForMaterialNo({ |
| | | code: this.form.materialNo |
| | | }) |
| | | const isExist = this.materialData.some(item => item.materialId == result.materialId) |
| | | if (!isExist) { |
| | | this.materialData.push(result) |
| | | }else{ |
| | | $alert(`ç©æå¯ä¸ç å·²åå¨,请å é¤ååè¾å
¥ï¼`); |
| | | } |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* ç©æç¼ç æ¸
é¤ */ |
| | | onClearMaterial() { |
| | | this.form.materialNo = '' |
| | | }, |
| | | //å é¤ç©æ |
| | | delMaterialData(materialId) { |
| | | this.materialData = this.materialData.filter(item => item.materialId != materialId) |
| | | }, |
| | | // ç»ç |
| | | async onSubmit(param) { |
| | | if (this.containerInfo.isExist == 2 && this.form.containerTypeCode == 0) { |
| | | return $alert("è¯·éæ©æçç±»åï¼") |
| | | } |
| | | |
| | | if(param){ |
| | | this.valateType("ç»ç"); |
| | | return |
| | | } |
| | | let _isNeedAddContinerPlace=false; |
| | | if (param==2 && !this.form.placeNo) { |
| | | return $alert("请è¾å
¥åºä½å·ï¼"); |
| | | } |
| | | if (this.form.placeNo) { |
| | | _isNeedAddContinerPlace=true; |
| | | } |
| | | const data = { |
| | | containerNo: this.form.containterCode, |
| | | containerType: this.form.containerTypeCode, |
| | | materialContainerList: this.materialData, |
| | | stationNo:this.form.placeNo, |
| | | isNeedAddContinerPlace:_isNeedAddContinerPlace |
| | | } |
| | | try { |
| | | await bindMaterialContainer(data) |
| | | this.$modal('ç»çæå') |
| | | this.onClearContainter() |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | //æ¹æ³ æç¤º æçç±»å å ç©æç±»å ä¸ä¸è´ æ¯å¦ç¡®è®¤ç»ç |
| | | valateType(name){ |
| | | if(this.materialData.length<=0){ |
| | | return $alert("请æ«ç©æï¼") |
| | | } |
| | | var flag = false; |
| | | //ç©æç±»åï¼æºä½3 缸ç1; 容å¨ï¼èªå¶ä»¶æºä½æç4 èªå¶ä»¶ç¼¸çæç5 |
| | | if(this.materialData[0].materialType == 3 && this.form.containerTypeCode!=4){ //æºä½3 |
| | | flag = true; |
| | | } |
| | | |
| | | if(this.materialData[0].materialType == 1 && this.form.containerTypeCode!=5){ //缸ç1 |
| | | flag = true; |
| | | } |
| | | |
| | | if(flag){ |
| | | uni.showModal({ |
| | | title: '确认' + name, |
| | | content: 'æçç±»ååç©æç±»åä¸ä¸è´ï¼æ¯å¦ç¡®è®¤ç»§ç»ï¼', |
| | | showCancel: true, |
| | | confirmText: '确认', |
| | | cancelText: 'åæ¶', |
| | | success: async ({ confirm }) => { |
| | | if (confirm) { |
| | | if(name=="ç»ç"){ |
| | | this.onSubmit() |
| | | } |
| | | if(name=="å
¥åº"){ |
| | | this.addInBound() |
| | | } |
| | | if(name=="èªå¶ä»¶å
¥åº"){ |
| | | this.addVirtual() |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }else{ |
| | | if(name=="ç»ç"){ |
| | | this.onSubmit() |
| | | } |
| | | if(name=="å
¥åº"){ |
| | | this.addInBound() |
| | | } |
| | | if(name=="èªå¶ä»¶å
¥åº"){ |
| | | this.addVirtual() |
| | | } |
| | | } |
| | | }, |
| | | // å
¥åº |
| | | async addInBound(param) { |
| | | if (this.containerInfo.isExist == 2 && this.form.containerTypeCode == 0) { |
| | | return $alert("è¯·éæ©æçç±»åï¼") |
| | | } |
| | | // if (!this.form.site) { |
| | | // return $alert("è¯·éæ©å
¥åºå£ï¼"); |
| | | // } |
| | | if (!this.form.placeNo) { |
| | | return $alert("请è¾å
¥åºä½å·ï¼"); |
| | | } |
| | | if(param){ |
| | | this.valateType("å
¥åº"); |
| | | return |
| | | } |
| | | const data = { |
| | | type: 1, |
| | | //stationNo: this.form.site, |
| | | stationNo: this.form.placeNo, |
| | | containerNo: this.form.containterCode, |
| | | containerType: this.form.containerTypeCode, |
| | | materialContainerList: this.materialData |
| | | } |
| | | |
| | | try { |
| | | await addInBound(data) |
| | | this.$modal('å
¥åºä»»å¡çææå') |
| | | this.onClearContainter() |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | // èªå¶ä»¶å
¥åº |
| | | async addVirtual(param) { |
| | | if(param){ |
| | | this.valateType("èªå¶ä»¶å
¥åº"); |
| | | return |
| | | } |
| | | const data = { |
| | | containerNo: this.form.containterCode, |
| | | placeNo: this.form.placeNo, |
| | | containerType: this.form.containerTypeCode, |
| | | materialContainerList: this.materialData |
| | | } |
| | | try { |
| | | await addInVirtualPlace(data) |
| | | this.$modal('èªå¶ä»¶å
¥åºæå') |
| | | this.onClearContainter() |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | |
| | | |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | }, 200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | mixins: [palceList], |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | this.getPalceList({ |
| | | areaCode: 'LTK-SDCR' |
| | | }) |
| | | |
| | | this.ContainerType = getDicList(this.$store, 'container_type').sysDictDatas |
| | | }) |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | &>.label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-swipe-action v-if="materialData.length>0"> |
| | | <u-swipe-action-item :options="options" v-for="(item,index) in materialData" |
| | | :key="'material-list-item-'+index" style="margin-bottom: 20rpx;" |
| | | @click="deleteItem" :index="index" :name="item.materialId"> |
| | | <view class="material-item-group"> |
| | | <view class="material-list-item" > |
| | | <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> |
| | | <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æå¯ä¸ç ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialId}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æåç§°ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialName}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ä»¶å·ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialNo}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ä¾åºåï¼</view> |
| | | <view class="content auto-wrap">{{item.supplierCode}}</view> |
| | | </view> |
| | | |
| | | <view class="item-row"> |
| | | <view class="label">ç©æç±»åï¼</view> |
| | | <!-- æä¸¾ --> |
| | | <view class="content auto-wrap">{{parseDic($store,'material_type',item.materialType)}}</view> |
| | | |
| | | </view> |
| | | |
| | | <!-- <view class="item-row"> |
| | | <view class="label">è§æ ¼ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialSpec}}</view> |
| | | </view> --> |
| | | <view class="item-row"> |
| | | <view class="label">æºåï¼</view> |
| | | <view class="content auto-wrap">{{parseDic($store,'material_modal',item.materialModel)}}</view> |
| | | </view> |
| | | <!-- <view class="item-row"> |
| | | <view class="label">æ°éï¼</view> |
| | | <view class="content auto-wrap">{{item.stockNumber}}</view> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | materialData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style:{ |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }], |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic, |
| | | deleteItem({name}){ |
| | | this.$emit('delMaterialData',name) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .material-item-group { |
| | | /* background-color: transparent!impor; */ |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* text-align: right; */ |
| | | /* font-weight:5; */ |
| | | width: 180rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="å¤åä»¶ç»æ"> |
| | | <view class="page-frame with-action-user-row" :style="{ height: pageBodyHeight + 'px' }" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <scan-input-form-item |
| | | class="forma-item" |
| | | label="æçç¼ç " |
| | | v-model="form.containterCode" |
| | | :msg="msg.containter" |
| | | :msg-type="msgType.containter" |
| | | @search="onSearchContainter" |
| | | @clear="onClearContainter" |
| | | /> |
| | | <scan-input-form-item |
| | | class="forma-item" |
| | | label="空æç¼ç " |
| | | v-model="form.materialNo" |
| | | :msg="msg.material" |
| | | :msg-type="msgType.material" |
| | | @search="onSearchMaterial" |
| | | @clear="onClearMaterial" |
| | | |
| | | /> |
| | | <scan-input-form-item |
| | | placeholder="è¯·éæ©" |
| | | :clearable="false" |
| | | :hasScan="false" |
| | | :hasSearch="false" |
| | | @click.native="visible = true" |
| | | class="forma-item" |
| | | label="éæ©åºå£" |
| | | v-model="form.site" |
| | | /> |
| | | <EasyPicker :visible.sync="visible" :list="placeList.filter(item=>item.placeNo!='ZDCR')" labelField="placeNo" valueField="placeNo" @select="getSiteVal"/> |
| | | <!-- <EasyPicker :visible.sync="visible" :list="placeList" labelField="placeNo" valueField="placeNo" @select="getSiteVal" /> --> |
| | | <materialList :contaninerData="contaninerData" @delContainer="delContainer" /> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template> |
| | | <div class="btn-frame"><u-button type="primary" text="ç» æ" @click="onSubmit"></u-button></div> |
| | | <div class="btn-frame"><u-button type="primary" text="ç»æå
¥åº" @click="addInBound"></u-button></div> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue'; |
| | | import ActionUserRow from '@/components/ActionUserRow.vue'; |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue'; |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue'; |
| | | import EasyPicker from '@/components/EasyPicker.vue'; |
| | | import materialList from './modules/materialList.vue'; |
| | | import { parseDic, $alert, $successInfo } from '@/static/js/utils/index.js'; |
| | | import { palceList } from '@/service/mixins/mixins.js'; |
| | | import { getContainerInfo } from '@/api/common.js'; |
| | | import { getForEmptyContainerNo, getForMaterialNo, bindMaterialContainer, addInBound } from '@/api/bind.js'; |
| | | import {NFCInit,NFCReadUID } from '@/service/util/RfidMethod.js' |
| | | let initInterVal = null; |
| | | export default { |
| | | name: 'receiveInPage', |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | EasySelectFormItem, |
| | | materialList, |
| | | EasyPicker |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | form: { |
| | | containterCode: '', |
| | | materialNo: '', |
| | | site: '' |
| | | }, |
| | | msg: { |
| | | containter: '', |
| | | material: '', |
| | | site: '' |
| | | }, |
| | | msgType: { |
| | | containter: 'info', |
| | | material: 'error', |
| | | site: 'error' |
| | | }, |
| | | containerStatus: null, |
| | | contaninerData: [], |
| | | visible: false |
| | | }; |
| | | }, |
| | | computed: { |
| | | // disabledBind() { |
| | | // return !Boolean(this.containerStatus) || this.contaninerData.length < 1; |
| | | // }, |
| | | // disabledBound() { |
| | | // return !Boolean(this.containerStatus); |
| | | // } |
| | | }, |
| | | watch: { |
| | | 'form.containterCode': { |
| | | handler(val, oldVal) { |
| | | this.resetContainerNo(); |
| | | } |
| | | } |
| | | }, |
| | | onShow() { |
| | | console.log('onShow'); |
| | | var nfc = NFCInit(); |
| | | console.log(nfc); |
| | | }, |
| | | onHide() { |
| | | console.log('onHide'); |
| | | var rfid = NFCReadUID(); |
| | | if(rfid!=null){ |
| | | if(this.form.containterCode ==''){ |
| | | this.form.containterCode = rfid.UID |
| | | } else{ |
| | | this.form.materialNo = rfid.UID |
| | | } |
| | | } |
| | | console.log(rfid); |
| | | }, |
| | | methods: { |
| | | // éæ©ç«ç¹è¿åå¼ |
| | | getSiteVal(val, valObj, index) { |
| | | this.form.site = val; |
| | | }, |
| | | /* æçç¼ç æç´¢ */ |
| | | async onSearchContainter() { |
| | | if (!this.form.containterCode) { |
| | | this.msgType.containter = 'error'; |
| | | this.msg.containter = '请è¾å
¥æçå·ï¼'; |
| | | return false; |
| | | } |
| | | // è·å代ç |
| | | try { |
| | | let { result } = await getForEmptyContainerNo({ code: this.form.containterCode }); |
| | | this.containerStatus = result?.containerStatus; |
| | | // var notKT=result?.materialContainers.some(item=>item.materialNo!='KONGTUO') |
| | | // if(notKT) { |
| | | // this.$modal('å½åæçåå¨é空æç©æ') |
| | | // this.onClearContainter() |
| | | // } |
| | | // æç详æ
|
| | | let containerStatusName = parseDic(this.$store, 'container_status', result?.containerStatus); |
| | | containerStatusName = containerStatusName == 'æ æ¤åå
¸' ? '' : containerStatusName; |
| | | this.msg.containter = `ç¶æï¼${containerStatusName}, 尺寸ï¼${result?.specLength}*${result?.specWidth}*${result?.specHeight}`; |
| | | |
| | | result?.containerList.forEach((item) => { |
| | | let isExist = this.contaninerData.some((item1) => item1.containerNo == item.containerNo); |
| | | if (!isExist) { |
| | | this.contaninerData.push(item); |
| | | } |
| | | }); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* æ¸
餿çç¼ç */ |
| | | onClearContainter() { |
| | | this.form = { |
| | | containterCode: '', |
| | | materialNo: '', |
| | | site: '' |
| | | }; |
| | | this.resetContainerNo(); |
| | | }, |
| | | // éåæçç¼ç |
| | | resetContainerNo() { |
| | | this.msg = { |
| | | containter: '', |
| | | material: '', |
| | | site: '' |
| | | }; |
| | | this.msgType = { |
| | | containter: 'info', |
| | | material: 'error', |
| | | site: 'error' |
| | | }; |
| | | this.containerStatus = null; |
| | | this.contaninerData = []; |
| | | this.form.materialNo = ''; |
| | | this.form.site = ''; |
| | | }, |
| | | /* 空æç¼ç æç´¢ */ |
| | | async onSearchMaterial() { |
| | | if (!this.form.materialNo) { |
| | | this.msg.material = '请è¾å
¥ç©ºæç¼å·ï¼'; |
| | | return false; |
| | | } |
| | | this.msg.material = ''; |
| | | try { |
| | | let { result } = await getContainerInfo({ ContainerNo: this.form.materialNo }); |
| | | if (result.containerNo == this.form.containterCode) { |
| | | return this.$modal('å½å空æä¸æçéå¤'); |
| | | } |
| | | var isExit = this.contaninerData.some((item) => item.containerNo == result.containerNo); |
| | | isExit ? '' : this.contaninerData.push(result); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* ç©æç¼ç æ¸
é¤ */ |
| | | onClearMaterial() { |
| | | this.form.materialNo = ''; |
| | | }, |
| | | |
| | | //å é¤ç©ºæ |
| | | delContainer(containerNo) { |
| | | this.contaninerData = this.contaninerData.filter((item) => item.containerNo != containerNo); |
| | | }, |
| | | // ç»æ |
| | | async onSubmit() { |
| | | let { contaninerData, form } = this; |
| | | // if(contaninerData.length>3) { |
| | | // return $alert("ç»ææ°éä¸è½è¶
è¿4个ï¼") |
| | | // } |
| | | const data = { |
| | | type: 2, |
| | | containerNo: form.containterCode, |
| | | materialContainerList: [] |
| | | }; |
| | | |
| | | data.materialContainerList = contaninerData.map((item) => { |
| | | return { |
| | | materialNo: 'KONGTUO', |
| | | materialName: '空æ', |
| | | materialId: item.containerNo |
| | | }; |
| | | }); |
| | | try { |
| | | await bindMaterialContainer(data); |
| | | this.$modal('ç»ææå'); |
| | | this.onClearContainter(); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | // å
¥åº |
| | | async addInBound() { |
| | | // if(this.contaninerData.length>3) { |
| | | // return $alert("ç»ææ°éä¸è½è¶
è¿4个ï¼") |
| | | // } |
| | | const data = { |
| | | stationNo: this.form.site, |
| | | type: 2, |
| | | containerNo: this.form.containterCode, |
| | | materialContainerList: this.contaninerData.map((item) => { |
| | | return { |
| | | materialId: item.containerNo, |
| | | materialNo: 'KONGTUO', |
| | | materialName: '空æ', |
| | | materialType: 4 |
| | | }; |
| | | }) |
| | | }; |
| | | |
| | | try { |
| | | await addInBound(data); |
| | | this.$modal('å
¥åºæå'); |
| | | this.onClearContainter(); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval(); |
| | | callback && callback(); |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight(); |
| | | } |
| | | }, 200); |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal); |
| | | initInterVal = null; |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | mixins: [palceList], |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | this.getPalceList({ |
| | | areaCode: 'WXJSXL' |
| | | }); |
| | | }); |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval(); |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | & > .label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | & > .content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-swipe-action v-if="contaninerData.length>0" > |
| | | <u-swipe-action-item :options="options" v-for="(item,index) in contaninerData" |
| | | :key="'material-list-item-'+index" style="margin-bottom: 20rpx;" |
| | | @click="deleteItem" :index="index" :name="item.containerNo"> |
| | | <view class="material-item-group"> |
| | | <view class="material-list-item" > |
| | | <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> |
| | | <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> |
| | | <view class="item-row"> |
| | | <view class="label">æçç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{item.containerNo}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æçç¶æï¼</view> |
| | | <view class="content auto-wrap">{{parseDic($store,'container_status',item.containerStatus)}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æçè§æ ¼ï¼</view> |
| | | <view class="content auto-wrap">{{item.specLength}}*{{item.specWidth}}*{{item.specHeight}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | contaninerData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style:{ |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }], |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic, |
| | | deleteItem({name}){ |
| | | this.$emit('delContainer',name) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .material-item-group { |
| | | /* background-color: transparent!impor; */ |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* font-weight:5; */ |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="å¹³åºç»çå
¥åº"> |
| | | <view |
| | | class="page-frame with-action-user-row" |
| | | :style="{ height: pageBodyHeight + 'px' }" |
| | | v-if="pageBodyHeight" |
| | | > |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- step 1 start --> |
| | | <scan-input-form-item |
| | | class="forma-item" |
| | | label="æçç¼ç " |
| | | v-model="form.containterCode" |
| | | :msg="msg.containter" |
| | | :msg-type="msgType.containter" |
| | | @search="onSearchContainter" |
| | | @clear="onClearContainter" |
| | | /> |
| | | |
| | | <scan-input-form-item |
| | | placeholder="è¯·éæ©" |
| | | :disabled="disabledContainerType" |
| | | :clearable="false" |
| | | :hasScan="false" |
| | | :hasSearch="false" |
| | | @click.native="ctVisible = true" |
| | | class="forma-item" |
| | | label="æçç±»å" |
| | | v-model="form.containerType" |
| | | /> |
| | | <EasyPicker |
| | | :visible.sync="ctVisible" |
| | | :list="ContainerType" |
| | | labelField="value" |
| | | valueField="code" |
| | | @select="getTypeVal" |
| | | /> |
| | | |
| | | <selectItem |
| | | v-show="Boolean(containerInfo.containerNo)" |
| | | :selectData="areaData" |
| | | :value.sync="form.areaNo" |
| | | label="åºåºç¼ç " |
| | | labelField="areaName" |
| | | valueField="areaNo" |
| | | /> |
| | | |
| | | <!-- <selectItem |
| | | :selectData="placeList" |
| | | :value.sync="form.placeNo" |
| | | label="åºä½ç¼ç " |
| | | labelField="placeNo" |
| | | valueField="placeNo" |
| | | @getCurrentData="getCurrentData" |
| | | :isShowSearch="true" |
| | | /> --> |
| | | |
| | | <!-- @confirmHc="getStockPageHandle" --> |
| | | <selectItemWc2 |
| | | v-show="Boolean(containerInfo.containerNo)" |
| | | :selectData="placeList" |
| | | :value.sync="form.placeNo" |
| | | label="åºä½ç¼ç " |
| | | labelField="placeNo" |
| | | valueField="placeNo" |
| | | @getPropData="getCurrentData" |
| | | /> |
| | | |
| | | <scan-input-form-item |
| | | v-show="Boolean(containerInfo.containerNo)" |
| | | class="forma-item" |
| | | label="ç©æäºç»´ç " |
| | | v-model="form.materialNo" |
| | | :msg="msg.material" |
| | | :msg-type="msgType.material" |
| | | @search="onSearchMaterial" |
| | | @clear="onClearMaterial" |
| | | /> |
| | | <materialList |
| | | :materialData="materialData" |
| | | @delMaterialData="delMaterialData" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template v-if="abled && materialData.length > 0"> |
| | | <div class="btn-frame"> |
| | | <u-button |
| | | type="primary" |
| | | text="ç» ç" |
| | | @click="onSubmit(1)" |
| | | :disabled="!abled" |
| | | ></u-button> |
| | | </div> |
| | | <div class="btn-frame"> |
| | | <u-button |
| | | type="primary" |
| | | text="ç»çå
¥åº" |
| | | @click="AddInBoundForFlat(1)" |
| | | :disabled="!abled" |
| | | ></u-button> |
| | | </div> |
| | | <!-- <div class="btn-frame" style="margin-left:10rpx"><u-button type="primary" text="èªå¶ä»¶å
¥åº" |
| | | @click="addVirtual(1)" :disabled="!abled"></u-button></div> --> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from "@/components/DefaultHeaderPageLayout.vue"; |
| | | import ActionUserRow from "@/components/ActionUserRow.vue"; |
| | | import ScanInputFormItem from "@/components/ScanInputFormItem.vue"; |
| | | import EasySelectFormItem from "@/components/EasySelectFormItem.vue"; |
| | | import EasyPicker from "@/components/EasyPicker.vue"; |
| | | import materialList from "./modules/materialList.vue"; |
| | | import selectItem from "@/components/selectItem.vue"; |
| | | import { getAreaInfo } from "@/api/common.js"; |
| | | import selectItemWc2 from "@/components/selectItemWithSearchWc2.vue"; |
| | | |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | | $successInfo, |
| | | getDicList, |
| | | } from "@/static/js/utils/index.js"; |
| | | import { palceList } from "@/service/mixins/mixins.js"; |
| | | import { |
| | | getForContainerCode, |
| | | getForMaterialNo, |
| | | bindMaterialContainer, |
| | | AddInBoundForFlat, |
| | | addInVirtualPlace, |
| | | addAGVTask, |
| | | } from "@/api/bind.js"; |
| | | let initInterVal = null; |
| | | export default { |
| | | name: "receiveInPage", |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | EasySelectFormItem, |
| | | materialList, |
| | | EasyPicker, |
| | | selectItem, |
| | | selectItemWc2 |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | containter: null, |
| | | form: { |
| | | containterCode: "", |
| | | materialNo: "", |
| | | site: "", |
| | | containerTypeCode: 0, |
| | | containerType: "", |
| | | placeNo: "", |
| | | }, |
| | | msg: { |
| | | containter: "", |
| | | material: "", |
| | | site: "", |
| | | }, |
| | | msgType: { |
| | | containter: "info", |
| | | material: "error", |
| | | site: "error", |
| | | }, |
| | | containerInfo: {}, |
| | | materialData: [], |
| | | ContainerType: [], |
| | | visible: false, |
| | | ctVisible: false, |
| | | disabledContainerType: false, |
| | | areaData: [], |
| | | placeList: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | abled() { |
| | | let { containerStatus } = this.containerInfo; |
| | | return ( |
| | | containerStatus != 0 && |
| | | containerStatus != 3 && |
| | | this.materialData.length > 0 |
| | | ); |
| | | }, |
| | | }, |
| | | watch: { |
| | | //éæ©åº éæ°è·ååºä½ |
| | | "form.areaNo": { |
| | | handler(val, oldVal) { |
| | | if (val != "") { |
| | | this.form.placeNo = ""; |
| | | this.placeList = []; |
| | | // è·ååºå |
| | | this.getPalceList({ |
| | | areaCode: val, |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | methods: { |
| | | // éæ©ç«ç¹è¿åå¼ |
| | | getSiteVal(val, valObj, index) { |
| | | this.form.site = val; |
| | | }, |
| | | // éæ©æçç±»åè¿åå¼ |
| | | getTypeVal(val, valObj, index) { |
| | | this.form.containerTypeCode = valObj.code; |
| | | this.form.containerType = valObj.value; |
| | | }, |
| | | /* æçç¼ç æç´¢ */ |
| | | async onSearchContainter() { |
| | | |
| | | if (!this.form.containterCode) { |
| | | this.msgType.containter = "error"; |
| | | this.msg.containter = "请è¾å
¥æçç¼å·ï¼"; |
| | | return false; |
| | | } |
| | | // è·å代ç |
| | | try { |
| | | this.materialData =[]; |
| | | let { result } = await getForContainerCode({ |
| | | code: this.form.containterCode, |
| | | }); |
| | | this.containerInfo = result; |
| | | // æç详æ
|
| | | let containerStatusName = parseDic( |
| | | this.$store, |
| | | "container_status", |
| | | result?.containerStatus |
| | | ); |
| | | containerStatusName = |
| | | containerStatusName == "æ æ¤åå
¸" ? "" : containerStatusName; |
| | | this.msg.containter = `ç¶æï¼${containerStatusName}, 尺寸ï¼${result?.specLength}*${result?.specWidth}*${result?.specHeight}`; |
| | | |
| | | if (result.containerType) { |
| | | //妿æçåå¨ èµå¼æçç±»å |
| | | var arr = this.ContainerType.filter( |
| | | (v) => v.code == result.containerType |
| | | ); |
| | | this.form.containerType = arr[0]?.value || ""; |
| | | this.form.containerTypeCode = arr[0]?.code || ""; |
| | | this.disabledContainerType = true; |
| | | } else { |
| | | this.disabledContainerType = false; |
| | | this.form.containerType = ""; |
| | | this.form.containerTypeCode = ""; |
| | | } |
| | | |
| | | result?.materialContainers.forEach((item) => { |
| | | let isExist = this.materialData.some( |
| | | (item1) => item1.materialId == item.materialId |
| | | ); |
| | | if (!isExist) { |
| | | this.materialData.push(item); |
| | | } |
| | | }); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* æ¸
餿çç¼ç */ |
| | | onClearContainter() { |
| | | this.form = { |
| | | containterCode: "", |
| | | containerType: "", |
| | | areaNo: "", |
| | | materialNo: "", |
| | | site: "", |
| | | containerTypeCode: 0, |
| | | placeNo: "", |
| | | }; |
| | | this.disabledContainerType = false; |
| | | this.$set(this.form, "site", ""); |
| | | this.resetContainerNo(); |
| | | }, |
| | | resetContainerNo() { |
| | | this.msg = { |
| | | containter: "", |
| | | material: "", |
| | | site: "", |
| | | }; |
| | | this.msgType = { |
| | | containter: "info", |
| | | material: "error", |
| | | site: "error", |
| | | }; |
| | | this.containerStatus = null; |
| | | this.materialData = []; |
| | | this.form.materialNo = ""; |
| | | this.form.site = ""; |
| | | this.form.containerTypeCode = 0; |
| | | this.form.areaNo = ""; |
| | | this.form.placeNo = ""; |
| | | this.form.containerType = ""; |
| | | this.containerInfo = {}; |
| | | }, |
| | | /* ç©æç¼ç æç´¢ */ |
| | | async onSearchMaterial() { |
| | | if (!this.form.materialNo) { |
| | | this.msg.material = "请è¾å
¥ç©æç¼å·ï¼"; |
| | | return false; |
| | | } |
| | | this.msg.material = ""; |
| | | try { |
| | | let { result } = await getForMaterialNo({ |
| | | code: this.form.materialNo, |
| | | }); |
| | | const isExist = this.materialData.some( |
| | | (item) => item.materialId == result.materialId |
| | | ); |
| | | if (!isExist) { |
| | | this.materialData.push(result); |
| | | } else { |
| | | $alert(`ç©æå¯ä¸ç å·²åå¨,请å é¤ååè¾å
¥ï¼`); |
| | | } |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* ç©æç¼ç æ¸
é¤ */ |
| | | onClearMaterial() { |
| | | this.form.materialNo = ""; |
| | | }, |
| | | //å é¤ç©æ |
| | | delMaterialData(materialId) { |
| | | this.materialData = this.materialData.filter( |
| | | (item) => item.materialId != materialId |
| | | ); |
| | | }, |
| | | // ç»ç |
| | | async onSubmit(param) { |
| | | if (this.containerInfo.isExist == 2 && this.form.containerTypeCode == 0) { |
| | | return $alert("è¯·éæ©æçç±»åï¼"); |
| | | } |
| | | |
| | | if (param) { |
| | | this.valateType("ç»ç"); |
| | | return; |
| | | } |
| | | const data = { |
| | | containerNo: this.form.containterCode, |
| | | containerType: this.form.containerTypeCode, |
| | | materialContainerList: this.materialData, |
| | | }; |
| | | try { |
| | | await bindMaterialContainer(data); |
| | | this.$modal("ç»çæå"); |
| | | this.onClearContainter(); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | //æ¹æ³ æç¤º æçç±»å å ç©æç±»å ä¸ä¸è´ æ¯å¦ç¡®è®¤ç»ç |
| | | valateType(name) { |
| | | if (this.materialData.length <= 0) { |
| | | return $alert("请æ«ç©æï¼"); |
| | | } |
| | | var flag = false; |
| | | //ç©æç±»åï¼æºä½3 缸ç1; 容å¨ï¼èªå¶ä»¶æºä½æç4 èªå¶ä»¶ç¼¸çæç5 |
| | | if ( |
| | | this.materialData[0].materialType == 3 && |
| | | this.form.containerTypeCode != 4 |
| | | ) { |
| | | //æºä½3 |
| | | flag = true; |
| | | } |
| | | |
| | | if ( |
| | | this.materialData[0].materialType == 1 && |
| | | this.form.containerTypeCode != 5 |
| | | ) { |
| | | //缸ç1 |
| | | flag = true; |
| | | } |
| | | |
| | | if (flag) { |
| | | uni.showModal({ |
| | | title: "确认" + name, |
| | | content: "æçç±»ååç©æç±»åä¸ä¸è´ï¼æ¯å¦ç¡®è®¤ç»§ç»ï¼", |
| | | showCancel: true, |
| | | confirmText: "确认", |
| | | cancelText: "åæ¶", |
| | | success: async ({ confirm }) => { |
| | | if (confirm) { |
| | | if (name == "ç»ç") { |
| | | this.onSubmit(); |
| | | } |
| | | if (name == "å
¥åº") { |
| | | this.AddInBoundForFlat(); |
| | | } |
| | | if (name == "èªå¶ä»¶å
¥åº") { |
| | | this.addVirtual(); |
| | | } |
| | | } |
| | | }, |
| | | }); |
| | | } else { |
| | | if (name == "ç»ç") { |
| | | this.onSubmit(); |
| | | } |
| | | if (name == "å
¥åº") { |
| | | this.AddInBoundForFlat(); |
| | | } |
| | | if (name == "èªå¶ä»¶å
¥åº") { |
| | | this.addVirtual(); |
| | | } |
| | | } |
| | | }, |
| | | // å
¥åº |
| | | async AddInBoundForFlat(param) { |
| | | if (this.containerInfo.isExist == 2 && this.form.containerTypeCode == 0) { |
| | | return $alert("è¯·éæ©æçç±»åï¼"); |
| | | } |
| | | if (!this.form.placeNo) { |
| | | return $alert("è¯·éæ©åºä½ï¼"); |
| | | } |
| | | if (param) { |
| | | this.valateType("å
¥åº"); |
| | | return; |
| | | } |
| | | const data = { |
| | | type: 1, |
| | | stationNo: this.form.site, |
| | | placeNo: this.form.placeNo, |
| | | containerNo: this.form.containterCode, |
| | | containerType: this.form.containerTypeCode, |
| | | materialContainerList: this.materialData, |
| | | }; |
| | | |
| | | try { |
| | | await AddInBoundForFlat(data); |
| | | this.$modal("å
¥åºæå"); |
| | | this.onClearContainter(); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | // èªå¶ä»¶å
¥åº |
| | | async addVirtual(param) { |
| | | if (param) { |
| | | this.valateType("èªå¶ä»¶å
¥åº"); |
| | | return; |
| | | } |
| | | const data = { |
| | | containerNo: this.form.containterCode, |
| | | placeNo: this.form.placeNo, |
| | | containerType: this.form.containerTypeCode, |
| | | materialContainerList: this.materialData, |
| | | }; |
| | | try { |
| | | await addInVirtualPlace(data); |
| | | this.$modal("èªå¶ä»¶å
¥åºæå"); |
| | | this.onClearContainter(); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval(); |
| | | callback && callback(); |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight(); |
| | | } |
| | | }, 200); |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal); |
| | | initInterVal = null; |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | }, |
| | | // è·ååºåºæ°æ® |
| | | async getAreaList() { |
| | | try { |
| | | let { result } = await getAreaInfo(); |
| | | this.areaData = result.filter((item) => item.areaType == 3); |
| | | } catch (e) { |
| | | console.log(e); |
| | | } |
| | | }, |
| | | //åºä½æ¨¡ç³æ¥è¯¢ |
| | | async getCurrentData(PlaceNo) { |
| | | await this.getPalceList({ |
| | | areaCode: this.form.areaNo, |
| | | PlaceNo: PlaceNo, |
| | | }); |
| | | }, |
| | | }, |
| | | mixins: [palceList], |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | // this.getPalceList({ |
| | | // areaCode: 'LTK-SDCR' |
| | | // }) |
| | | this.getAreaList(); |
| | | this.ContainerType = getDicList( |
| | | this.$store, |
| | | "container_type" |
| | | ).sysDictDatas; |
| | | }); |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval(); |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | & > .label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | & > .content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-swipe-action v-if="materialData.length>0" > |
| | | <u-swipe-action-item :options="options" v-for="(item,index) in materialData" |
| | | :key="'material-list-item-'+index" style="margin-bottom: 20rpx;" |
| | | @click="deleteItem" :index="index" :name="item.materialId"> |
| | | <view class="material-item-group"> |
| | | <view class="material-list-item" > |
| | | <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> |
| | | <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æå¯ä¸ç ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialId}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æåç§°ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialName}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ä»¶å·ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialNo}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ä¾åºåï¼</view> |
| | | <view class="content auto-wrap">{{item.supplierCode}}</view> |
| | | </view> |
| | | |
| | | <view class="item-row"> |
| | | <view class="label">ç©æç±»åï¼</view> |
| | | <!-- æä¸¾ --> |
| | | <view class="content auto-wrap">{{parseDic($store,'material_type',item.materialType)}}</view> |
| | | |
| | | </view> |
| | | |
| | | <!-- <view class="item-row"> |
| | | <view class="label">è§æ ¼ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialSpec}}</view> |
| | | </view> --> |
| | | <view class="item-row"> |
| | | <view class="label">æºåï¼</view> |
| | | <view class="content auto-wrap">{{parseDic($store,'material_modal',item.materialModel)}}</view> |
| | | </view> |
| | | <!-- <view class="item-row"> |
| | | <view class="label">æ°éï¼</view> |
| | | <view class="content auto-wrap">{{item.stockNumber}}</view> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | materialData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style:{ |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }], |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic, |
| | | deleteItem({name}){ |
| | | this.$emit('delMaterialData',name) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .material-item-group { |
| | | /* background-color: transparent!impor; */ |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* text-align: right; */ |
| | | /* font-weight:5; */ |
| | | width: 180rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="å¤åä»¶ç»çå
¥åº"> |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- step 1 start --> |
| | | <scan-input-form-item class="forma-item" label="æçç¼ç " v-model="form.containterCode" |
| | | :msg="msg.containter" :msg-type="msgType.containter" @search="onSearchContainter" |
| | | @clear="onClearContainter" /> |
| | | |
| | | <!-- v-if="containerInfo.isExist==2" --> |
| | | <scan-input-form-item placeholder="è¯·éæ©" :clearable="false" |
| | | :hasScan="false" :hasSearch="false" @click.native="ctVisible=true" class="forma-item" label="æçç±»å" |
| | | v-model="form.containerType" /> |
| | | <EasyPicker :visible.sync="ctVisible" :list="ContainerType" labelField="value" valueField="code" |
| | | @select="getTypeVal" /> |
| | | |
| | | <scan-input-form-item placeholder="è¯·éæ©" :clearable="false" :hasScan="false" :hasSearch="false" |
| | | @click.native="visibleSort1=true" class="forma-item" label="æ¯å¦ç©ºæç" v-model="form.sorting" /> |
| | | <EasyPicker :visible.sync="visibleSort1" :list="isSorting" labelField="label" valueField="value" |
| | | @select="radioChange1" /> |
| | | |
| | | <scan-input-form-item v-show="Boolean(containerInfo.containerNo)" class="forma-item" label="ç©æäºç»´ç " v-model="form.materialNo" :msg="msg.material" |
| | | :msg-type="msgType.material" @search="onSearchMaterial" @clear="onClearMaterial" /> |
| | | |
| | | <scan-input-form-item v-show="Boolean(containerInfo.containerNo)" placeholder="è¯·éæ©" :clearable="false" :hasScan="false" :hasSearch="false" |
| | | @click.native="visible=true" class="forma-item" label="éæ©åºä½" v-model="form.site" /> |
| | | <EasyPicker :visible.sync="visible" :list="placeList" |
| | | labelField="placeNo" valueField="placeNo" @select="getSiteVal" /> |
| | | <!-- .filter(item=>item.placeNo!='storageTypeNo') --> |
| | | <!-- èªå¶ä»¶å
¥åºæµè¯ --> |
| | | <!-- <scan-input-form-item v-show="Boolean(containerInfo.containerNo)" class="forma-item" label="å¤å件䏿ç¹(æµè¯)" v-model="form.placeNo" :hasScan="false" |
| | | :hasSearch="false" /> --> |
| | | <materialList :materialData="materialData" @delMaterialData="delMaterialData" /> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template v-if="abled"> |
| | | <div class="btn-frame"><u-button type="primary" text="ç» ç" @click="onSubmit" |
| | | :disabled="!abled"></u-button></div> |
| | | <div class="btn-frame"><u-button type="primary" text="ç»çå
¥åº" @click="addInBound" |
| | | :disabled="!abled"></u-button></div> |
| | | <div class="btn-frame" style="margin-left:10rpx"><u-button type="primary" text="å¤åä»¶å
¥åº" |
| | | @click="addInVirtualWxjPlace" :disabled="!abled"></u-button></div> |
| | | <!-- <div class="btn-frame" style="margin-left:10rpx"><u-button type="primary" text="çæä»»å¡" |
| | | @click="addVirtualTask" :disabled="!abled"></u-button></div> --> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import materialList from './modules/materialList.vue' |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | | $successInfo, |
| | | getDicList |
| | | } from '@/static/js/utils/index.js' |
| | | import { |
| | | palceList |
| | | } from '@/service/mixins/mixins.js' |
| | | import { |
| | | getForContainerCode, |
| | | getForMaterialNo, |
| | | bindMaterialContainer, |
| | | addInBound, |
| | | addInVirtualWxjPlace, |
| | | addAGVTask |
| | | } from '@/api/bind.js' |
| | | let initInterVal = null; |
| | | export default { |
| | | name: 'receiveInPage', |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | EasySelectFormItem, |
| | | materialList, |
| | | EasyPicker |
| | | }, |
| | | data() { |
| | | return { |
| | | isSorting: [{ |
| | | label: 'æ¯', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: 'å¦', |
| | | value: '0' |
| | | } |
| | | ], |
| | | pageBodyHeight: 0, |
| | | containter: null, |
| | | form: { |
| | | containterCode: '', |
| | | materialNo: '', |
| | | site: '', |
| | | containerTypeCode: 0, |
| | | containerType: '' |
| | | }, |
| | | msg: { |
| | | containter: '', |
| | | material: '', |
| | | site: '', |
| | | }, |
| | | msgType: { |
| | | containter: 'info', |
| | | material: 'error', |
| | | site: 'error' |
| | | }, |
| | | containerInfo: {}, |
| | | materialData: [], |
| | | ContainerType: [], |
| | | visible: false, |
| | | ctVisible: false, |
| | | visibleSort1:false, |
| | | } |
| | | }, |
| | | computed: { |
| | | /* && this.materialData.length > 0 */ |
| | | abled() { |
| | | let { |
| | | containerStatus |
| | | } = this.containerInfo |
| | | return containerStatus != 0 && containerStatus != 3 |
| | | } |
| | | }, |
| | | watch: { |
| | | 'form.containterCode': { |
| | | handler(val, oldVal) { |
| | | this.resetContainerNo() |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | // æµè¯PLC触åçæå
¥åºä»»å¡ |
| | | async addVirtualTask() { |
| | | try { |
| | | await addAGVTask({ |
| | | containerNo: this.form.containterCode |
| | | }) |
| | | $alert("çæä»»å¡æå"); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | // éæ©ç«ç¹è¿åå¼ |
| | | getSiteVal(val, valObj, index) { |
| | | this.form.site = val |
| | | }, |
| | | // éæ©æçç±»åè¿åå¼ |
| | | getTypeVal(val, valObj, index) { |
| | | this.form.containerTypeCode = valObj.code |
| | | this.form.containerType = valObj.value |
| | | }, |
| | | /* æçç¼ç æç´¢ */ |
| | | async onSearchContainter() { |
| | | if (!this.form.containterCode) { |
| | | this.msgType.containter = 'error' |
| | | this.msg.containter = '请è¾å
¥æçç¼å·ï¼'; |
| | | return false; |
| | | } |
| | | // è·å代ç |
| | | try { |
| | | let { |
| | | result |
| | | } = await getForContainerCode({ |
| | | code: this.form.containterCode |
| | | }) |
| | | this.containerInfo = result |
| | | // æç详æ
|
| | | let containerStatusName = parseDic(this.$store, 'container_status', result?.containerStatus) |
| | | containerStatusName = containerStatusName == 'æ æ¤åå
¸' ? '' : containerStatusName |
| | | this.msg.containter = |
| | | `ç¶æï¼${containerStatusName}, 尺寸ï¼${result?.specLength}*${result?.specWidth}*${result?.specHeight}` |
| | | result?.materialContainers.forEach(item => { |
| | | |
| | | let isExist = this.materialData.some(item1 => item1.materialId == item.materialId) |
| | | if (!isExist) { |
| | | this.materialData.push(item) |
| | | } |
| | | }) |
| | | |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* æ¸
餿çç¼ç */ |
| | | onClearContainter() { |
| | | this.form = { |
| | | containterCode: '', |
| | | materialNo: '', |
| | | site: '', |
| | | containerTypeCode: 0, |
| | | containerType: '' |
| | | } |
| | | this.$set(this.form, 'site', '') |
| | | this.resetContainerNo() |
| | | }, |
| | | resetContainerNo() { |
| | | this.msg = { |
| | | containter: '', |
| | | material: '', |
| | | site: '', |
| | | } |
| | | this.msgType = { |
| | | containter: 'info', |
| | | material: 'error', |
| | | site: 'error' |
| | | } |
| | | this.containerStatus = null |
| | | this.materialData = [] |
| | | this.form.materialNo = '' |
| | | this.form.site = '' |
| | | this.form.containerTypeCode = 0 |
| | | this.form.containerType = '' |
| | | this.containerInfo = {} |
| | | }, |
| | | /* ç©æç¼ç æç´¢ */ |
| | | async onSearchMaterial() { |
| | | if (!this.form.materialNo) { |
| | | this.msg.material = '请è¾å
¥ç©æç¼å·ï¼'; |
| | | return false; |
| | | } |
| | | this.msg.material = '' |
| | | try { |
| | | let { |
| | | result |
| | | } = await getForMaterialNo({ |
| | | code: this.form.materialNo |
| | | }) |
| | | const isExist = this.materialData.some(item => item.materialId == result.materialId) |
| | | if (!isExist) { |
| | | this.materialData.push(result) |
| | | }else{ |
| | | $alert(`ç©æå¯ä¸ç å·²åå¨,请å é¤ååè¾å
¥ï¼`); |
| | | } |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* ç©æç¼ç æ¸
é¤ */ |
| | | onClearMaterial() { |
| | | this.form.materialNo = '' |
| | | }, |
| | | //å é¤ç©æ |
| | | delMaterialData(materialId) { |
| | | this.materialData = this.materialData.filter(item => item.materialId != materialId) |
| | | }, |
| | | // ç»ç |
| | | async onSubmit() { |
| | | if (this.containerInfo.isExist == 2 && this.form.containerTypeCode == 0) { |
| | | return $alert("è¯·éæ©æçç±»åï¼") |
| | | } |
| | | const data = { |
| | | containerNo: this.form.containterCode, |
| | | containerType: this.form.containerTypeCode, |
| | | materialContainerList: this.materialData |
| | | } |
| | | try { |
| | | await bindMaterialContainer(data) |
| | | this.$modal('ç»çæå') |
| | | this.onClearContainter() |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | // å
¥åº |
| | | async addInBound() { |
| | | if (this.containerInfo.isExist == 2 && this.form.containerTypeCode == 0) { |
| | | return $alert("è¯·éæ©æçç±»åï¼") |
| | | } |
| | | if (this.form.orderType != "1" && this.form.orderType != "0") |
| | | { |
| | | return $alert("鿩忝å¦ç©ºæç!") |
| | | } |
| | | if(this.form.orderType == "1" && this.materialData.length > 0) |
| | | { |
| | | return $alert("å½åéæ©çæ¯ç©ºæç,请å é¤ç©æä¿¡æ¯!"); |
| | | |
| | | } |
| | | |
| | | |
| | | const data = { |
| | | type: 4, |
| | | stationNo: this.form.site, |
| | | containerNo: this.form.containterCode, |
| | | containerType: this.form.containerTypeCode, |
| | | materialContainerList: this.materialData, |
| | | isEmptyContainer: this.form.orderType == "1" ? 1 : 0 |
| | | } |
| | | |
| | | try { |
| | | await addInBound(data) |
| | | this.$modal('å
¥åºä»»å¡çææå') |
| | | this.onClearContainter() |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | // å¤åä»¶å
¥åº |
| | | async addInVirtualWxjPlace() { |
| | | const data = { |
| | | containerNo: this.form.containterCode, |
| | | placeNo: this.form.placeNo, |
| | | containerType: this.form.containerTypeCode, |
| | | materialContainerList: this.materialData, |
| | | isEmptyContainer: this.form.orderType |
| | | } |
| | | try { |
| | | await addInVirtualWxjPlace(data) |
| | | this.$modal('å¤åä»¶å
¥åºæå') |
| | | this.onClearContainter() |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | |
| | | |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | }, 200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | }, |
| | | radioChange1(val, b) { |
| | | this.form.orderType = val |
| | | this.form.sorting=b.label |
| | | }, |
| | | }, |
| | | mixins: [palceList], |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | this.getPalceList({ |
| | | areaCode: 'LTK-SDCR' |
| | | }) |
| | | |
| | | this.ContainerType = getDicList(this.$store, 'container_type').sysDictDatas |
| | | }) |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval() |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | &>.label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-swipe-action v-if="materialData.length>0" > |
| | | <u-swipe-action-item :options="options" v-for="(item,index) in materialData" |
| | | :key="'material-list-item-'+index" style="margin-bottom: 20rpx;" |
| | | @click="deleteItem" :index="index" :name="item.materialId"> |
| | | <view class="material-item-group"> |
| | | <view class="material-list-item" > |
| | | <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> |
| | | <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æå¯ä¸ç ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialId}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æåç§°ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialName}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ä»¶å·ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialNo}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ä¾åºåï¼</view> |
| | | <view class="content auto-wrap">{{item.supplierCode}}</view> |
| | | </view> |
| | | <!-- <view class="item-row"> |
| | | <view class="label">è§æ ¼ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialSpec}}</view> |
| | | </view> --> |
| | | <view class="item-row"> |
| | | <view class="label">æºåï¼</view> |
| | | <view class="content auto-wrap">{{parseDic($store,'material_modal',item.materialModel)}}</view> |
| | | </view> |
| | | <!-- <view class="item-row"> |
| | | <view class="label">æ°éï¼</view> |
| | | <view class="content auto-wrap">{{item.stockNumber}}</view> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | materialData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style:{ |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }], |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic, |
| | | deleteItem({name}){ |
| | | this.$emit('delMaterialData',name) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .material-item-group { |
| | | /* background-color: transparent!impor; */ |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* text-align: right; */ |
| | | /* font-weight:5; */ |
| | | width: 180rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="ç§»åºä½ä¸" > |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <scan-input-form-item |
| | | class="forma-item" |
| | | label="æçç " |
| | | v-model="form.container" |
| | | :msg="msg.container" |
| | | @search="onSearchContainer" |
| | | @clear="onClearContainer" |
| | | /> |
| | | |
| | | <easy-select-form-item |
| | | class="forma-item" |
| | | label="ç®æ åºåº" |
| | | v-model="form.id" |
| | | :msg="msg.id" |
| | | :list="selectOptions.areas" |
| | | value-field="id" |
| | | label-field="areaName" |
| | | :clearable="false" |
| | | /> |
| | | |
| | | <easy-select-form-item |
| | | v-if="form.id" |
| | | class="forma-item" |
| | | label="ç®æ æ" |
| | | v-model="form.rowno" |
| | | :msg="msg.rowno" |
| | | :list="selectOptions.rows" |
| | | /> |
| | | |
| | | <easy-select-form-item |
| | | v-if="form.rowno" |
| | | label="ç®æ å" |
| | | v-model="form.column" |
| | | :msg="msg.column" |
| | | :list="selectOptions.columns" |
| | | /> |
| | | </view> |
| | | |
| | | <easy-picker :visible.sync="modelVisible" :list="selectOptions.models" value-field="code" label-field="name" @select="onChangeModel"></easy-picker> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <view class="btn-frame"><u-button text="é ç½®" @click="onReset"></u-button></view> |
| | | <view class="divider"></view> |
| | | <view class="btn-frame"><u-button type="primary" text="æ 交" @click="onConfirm"></u-button></view> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import { $successInfo, getDicList } from '@/static/js/utils/index.js' |
| | | let initInterVal = null; |
| | | const defaultForm = { |
| | | id:null, |
| | | container:'', |
| | | rowno:null, |
| | | column:null |
| | | } |
| | | export default { |
| | | name:'changeStorePage', |
| | | components:{DefaultHeaderPageLayout,ActionUserRow,ScanInputFormItem,EasySelectFormItem,EasyPicker}, |
| | | data(){ |
| | | return { |
| | | pageBodyHeight:0, |
| | | form:{...defaultForm}, |
| | | msg:{ |
| | | id:'', |
| | | container:'', |
| | | rowno:'', |
| | | column:'' |
| | | }, |
| | | checkContainer:'', |
| | | placeCode:'', |
| | | selectOptions:{ |
| | | areas:[], |
| | | rows:[], |
| | | columns:[], |
| | | models:[] |
| | | }, |
| | | modelVisible:false |
| | | } |
| | | }, |
| | | watch:{ |
| | | 'form.id'(newVal,oldVal) { |
| | | if (newVal!==oldVal) { |
| | | this.watchArea() |
| | | } |
| | | }, |
| | | 'form.rowno'(newVal,oldVal) { |
| | | if (newVal!==oldVal) { |
| | | this.watchRow() |
| | | } |
| | | }, |
| | | 'form.column'(newVal,oldVal) { |
| | | if (newVal!==oldVal) { |
| | | this.watchColumn() |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | onSearchContainer(){ |
| | | if (!this.form.container) { |
| | | this.msg.container = '请è¾å
¥æçç ï¼'; |
| | | return false; |
| | | } |
| | | this.msg.container = ''; |
| | | this.getContainerInfo() |
| | | }, |
| | | onClearContainer(){ |
| | | this.clearFullContainer() |
| | | }, |
| | | clearFullContainer(){ |
| | | this.clearContainer() |
| | | this.clearBackContainer() |
| | | }, |
| | | clearContainer(){ |
| | | this.form.container = '' |
| | | this.msg.container = '' |
| | | }, |
| | | clearBackContainer(){ |
| | | this.checkContainer = '' |
| | | this.placeCode = '' |
| | | }, |
| | | clearFullRow(){ |
| | | this.selectOptions.rows = [] |
| | | this.clearRow() |
| | | }, |
| | | clearRow(){ |
| | | this.form.rowno = '' |
| | | this.msg.rowno = '' |
| | | }, |
| | | clearFullCol(){ |
| | | this.selectOptions.columns = [] |
| | | this.clearCol() |
| | | }, |
| | | clearCol(){ |
| | | this.form.column = '' |
| | | this.msg.column = '' |
| | | }, |
| | | getContainerInfo(){ |
| | | let params = {ContainerCode :this.form.container} |
| | | this.$api.get('ContainerInformation',params,{block:'changeStore',warn:false}).then((d)=>{ |
| | | this.checkContainer = d.containerCode |
| | | this.placeCode = d.placeCode |
| | | }).catch(_errmsg=>{ |
| | | this.clearBackContainer() |
| | | this.msg.container = _errmsg; |
| | | }) |
| | | }, |
| | | getAreaSelectOptions(){ |
| | | this.$api.get('GetArea',{},{block:'changeStore'}).then((d)=>{ |
| | | this.selectOptions.areas = d || [] |
| | | }).catch(_errmsg=>{ |
| | | console.log(_errmsg) |
| | | }) |
| | | }, |
| | | getRowsByArea(){ |
| | | let params = {Areaid:this.form.id} |
| | | this.$api.get('GetPalceRowno',params,{block:'changeStore'}).then((d)=>{ |
| | | this.selectOptions.rows = d || [] |
| | | this.form.rowno = '' |
| | | }).catch(_errmsg=>{ |
| | | this.clearFullRow() |
| | | console.log(_errmsg) |
| | | }) |
| | | }, |
| | | getColumnsByAreaAndRow(){ |
| | | let params = {Areaid:this.form.id,Rowno:this.form.rowno} |
| | | this.$api.get('GetPalceColumn',params,{block:'changeStore'}).then((d)=>{ |
| | | this.selectOptions.columns = d || [] |
| | | this.form.column = '' |
| | | }).catch(_errmsg=>{ |
| | | this.clearFullCol() |
| | | console.log(_errmsg) |
| | | }) |
| | | }, |
| | | watchArea(){ |
| | | this.msg.id = '' |
| | | this.getRowsByArea() |
| | | }, |
| | | watchRow(){ |
| | | this.msg.rowno = '' |
| | | if (this.form.rowno) { |
| | | this.getColumnsByAreaAndRow() |
| | | } else { |
| | | this.clearFullCol() |
| | | } |
| | | }, |
| | | watchColumn(){ |
| | | this.msg.column = '' |
| | | }, |
| | | getSubmitParams(){ |
| | | return { |
| | | containerCode:this.checkContainer, |
| | | placeCode:this.placeCode, |
| | | id:this.form.id, |
| | | rowno:this.form.rowno, |
| | | column:this.form.column |
| | | } |
| | | }, |
| | | checkBeforeSubmit(){ |
| | | let res = {flag:true,data:{}} |
| | | res.data = this.getSubmitParams() |
| | | if (!res.data.containerCode) { |
| | | this.msg.container = '请å
å½å
¥æçä¿¡æ¯ï¼' |
| | | res.flag = false |
| | | } else { |
| | | if (res.data.containerCode.toUpperCase()!==this.form.container.toUpperCase()) { |
| | | this.msg.container = 'å½å
¥æçç ä¸éªè¯æçç ä¸å¹é
ï¼' |
| | | res.flag = false |
| | | } else { |
| | | this.msg.container = '' |
| | | } |
| | | } |
| | | if (res.flag && !res.data.id) { |
| | | this.msg.id = 'è¯·éæ©ç®æ åºåºï¼' |
| | | res.flag = false |
| | | } |
| | | if (res.flag && !res.data.rowno) { |
| | | this.msg.rowno = 'è¯·éæ©ç®æ æï¼' |
| | | res.flag = false |
| | | } |
| | | if (res.flag && !res.data.column) { |
| | | this.msg.column = 'è¯·éæ©ç®æ åï¼' |
| | | res.flag = false |
| | | } |
| | | return res; |
| | | }, |
| | | onChangeModel(val){ |
| | | this.dealSubmit(val) |
| | | }, |
| | | onReset(){ |
| | | this.reset() |
| | | }, |
| | | onConfirm(){ |
| | | this.modelVisible = true |
| | | }, |
| | | reset(){ |
| | | this.clearFullContainer() |
| | | this.msg.id = '' |
| | | this.clearFullRow() |
| | | }, |
| | | dealSubmit(val){ |
| | | let check = this.checkBeforeSubmit() |
| | | if (!check.flag) return false; |
| | | let params = check.data |
| | | params.assembleTask = val |
| | | this.confirmAjax(params,(f)=>{ |
| | | if (f) { |
| | | $successInfo('æäº¤æå') |
| | | this.reset() |
| | | } |
| | | }) |
| | | }, |
| | | confirmAjax(params,callback){ |
| | | this.$api.post('SubmitRelocationPda',params,{block:'changeStore'}).then(()=>{ |
| | | callback && callback(true) |
| | | }).catch(()=>{ |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback){ |
| | | initInterVal = setInterval(()=>{ |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | },200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval(){ |
| | | try{ |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady(){ |
| | | this.startInitInterval(()=>{ |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | this.getAreaSelectOptions() |
| | | this.selectOptions.models = getDicList(this.$store,'assemble_taskmodel') |
| | | }) |
| | | }, |
| | | onUnload(){ |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .forma-item{ |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .bottom-btns-row{ |
| | | display: flex; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | .btn-frame{ |
| | | width: 1%; |
| | | box-sizing: border-box; |
| | | flex-grow: 1; |
| | | } |
| | | .divider{ |
| | | width: 20rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="çç¹ä½ä¸" :back-custom="true" @back="onPageBack"> |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <page-main-list v-show="pageType==='mainlist'" :resetflag.sync="resetflag" ref="mainlist" @query="onListQuery" @action="onListAction" /> |
| | | <page-main-search v-show="pageType==='mainsearch'" :resetflag="resetflag" @callback="onSearchCallBack" /> |
| | | <page-detail-list v-show="pageType==='detaillist'" ref="detaillist" :main-obj="mainActionRow" @action="onDeatilAction" /> |
| | | <page-check-action v-show="pageType==='checkaction'" ref="checkaction" :main-obj="mainActionRow" /> |
| | | </view> |
| | | </view> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import PageMainList from './modules/MainList.vue' |
| | | import PageMainSearch from './modules/MainSearch.vue' |
| | | import PageDetailList from './modules/DetailList.vue' |
| | | import PageCheckAction from './modules/CheckAction.vue' |
| | | let initInterVal = null; |
| | | export default { |
| | | name:'demoPage', |
| | | components:{DefaultHeaderPageLayout,ActionUserRow,PageMainList,PageMainSearch,PageDetailList,PageCheckAction}, |
| | | data(){ |
| | | return { |
| | | pageBodyHeight:0, |
| | | pageType:'mainlist', |
| | | resetflag:0, |
| | | query:null, |
| | | mainActionRow:{} |
| | | } |
| | | }, |
| | | watch:{ |
| | | pageType(newVal, oldVal){ |
| | | if (newVal !== oldVal) { |
| | | if (newVal) { |
| | | this.switchPage(); |
| | | } |
| | | } |
| | | }, |
| | | resetflag(newVal, oldVal){ |
| | | if (newVal !== oldVal) { |
| | | this.query = null |
| | | this.$refs.list.newList(this.query) |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | onPageBack(){ |
| | | if (this.pageType==='mainlist') { |
| | | uni.redirectTo({url:this.$config.path.home}); |
| | | } else { |
| | | if (this.pageType === 'mainsearch' || this.pageType === 'detaillist') { |
| | | this.pageType = 'mainlist' |
| | | } else { |
| | | this.pageType = 'detaillist' |
| | | } |
| | | } |
| | | }, |
| | | onListQuery(){ |
| | | this.pageType = 'mainsearch' |
| | | }, |
| | | onListAction(obj){ |
| | | this.mainActionRow = obj |
| | | this.pageType = 'detaillist' |
| | | }, |
| | | onDeatilAction(){ |
| | | this.pageType = 'checkaction' |
| | | }, |
| | | onSearchCallBack(params){ |
| | | this.query = params; |
| | | this.pageType = 'mainlist' |
| | | }, |
| | | switchPage(){ |
| | | this.$nextTick(()=>{ |
| | | switch (this.pageType){ |
| | | case 'mainlist': |
| | | this.$refs.mainlist.newList(this.query) |
| | | break; |
| | | case 'detaillist': |
| | | this.$refs.detaillist.init() |
| | | this.$refs.checkaction.clear() |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | }) |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback){ |
| | | initInterVal = setInterval(()=>{ |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | },200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval(){ |
| | | try{ |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady(){ |
| | | this.startInitInterval(()=>{ |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | this.switchPage() |
| | | }) |
| | | }, |
| | | onUnload(){ |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="check-stock-check-action-component"> |
| | | <view class="form-view"> |
| | | <scan-input-form-item |
| | | label="åºä½ç /æçç " |
| | | v-model="scanCode" |
| | | @search="onSearchScanInput" |
| | | /> |
| | | </view> |
| | | <scroll-view class="list-scroll-view" :scroll-y="true"> |
| | | <view class="list-items-around"> |
| | | <!-- ################# --> |
| | | <view class="list-item" v-for="(item,index) in list" :key="'check-item-material-'+index"> |
| | | <view class="list-item-show"> |
| | | <view class="item-left"> |
| | | <uni-badge :text="index+1" type="primary" size="normal" /> |
| | | </view> |
| | | <view class="item-main"> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æ</view> |
| | | <view class="content auto-wrap">{{item.inventoryMateriaUnique}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">åºå</view> |
| | | <view class="content">{{item.stockNumber}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">å®ç</view> |
| | | <view class="content"> |
| | | <input class="easy-input" v-model="item.inventoryNumber" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- ################# --> |
| | | </view> |
| | | </scroll-view> |
| | | <view class="bottom-btns-row"> |
| | | <view class="btn-frame"><u-button type="primary" text="æ 交" @click="onSubmit"></u-button></view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import { $successInfo } from '@/static/js/utils/index.js' |
| | | export default { |
| | | name:'checkStockCheckActionComponent', |
| | | components:{ScanInputFormItem}, |
| | | props:{ |
| | | mainObj: { |
| | | type: Object, |
| | | default: function(){ |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | scanCode:'', |
| | | list:[] |
| | | } |
| | | }, |
| | | methods:{ |
| | | clear(){ |
| | | this.list = [] |
| | | this.scanCode = '' |
| | | }, |
| | | onSearchScanInput(){ |
| | | this.getContainerInfo() |
| | | }, |
| | | getContainerInfo(callback){ |
| | | let params = { |
| | | InventoryPlanId:this.mainObj.id, |
| | | ContainerVsLocation:this.scanCode |
| | | } |
| | | this.$api.get('ByContainerCodeGetInfo',params,{block:'checkStock'}).then(d=>{ |
| | | this.list = d || [] |
| | | callback && callback(true) |
| | | }).catch(()=>{ |
| | | this.list = [] |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | onSubmit(){ |
| | | this.dealConfirm((f)=>{ |
| | | if (f) { |
| | | $successInfo('æä½æå') |
| | | this.clear() |
| | | } |
| | | }) |
| | | }, |
| | | dealConfirm(callback ){ |
| | | let params = {inventoryPlanDetails:this.list} |
| | | this.$api.post('InventorySure',params,{block:'checkStock'}).then(d=>{ |
| | | callback && callback(true) |
| | | }).catch(()=>{ |
| | | callback && callback(false) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .check-stock-check-action-component{ |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .easy-input{ |
| | | font-size: inherit; |
| | | color: $uni-color-primary; |
| | | text-decoration: underline; |
| | | } |
| | | .form-view,.bottom-btns-row{ |
| | | flex-shrink: 0; |
| | | } |
| | | .list-scroll-view{ |
| | | flex-grow: 1; |
| | | height: 1px; |
| | | .list-items-around{ |
| | | padding-top:12rpx; |
| | | .list-item { |
| | | margin-bottom: 12rpx; |
| | | border-width: 2rpx 0; |
| | | border-style: solid; |
| | | border-color: $uni-border-color; |
| | | &:last-child{ |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | .list-item-show{ |
| | | background-color: $uni-bg-color; |
| | | font-size: 1.1em; |
| | | display: flex; |
| | | &>.item-left{ |
| | | flex-shrink: 0; |
| | | padding-left: 16rpx; |
| | | padding-top: 12rpx; |
| | | padding-right: 12rpx; |
| | | } |
| | | &>.item-main{ |
| | | flex-grow: 1; |
| | | width: 1px; |
| | | padding-right: 16rpx; |
| | | } |
| | | .item-row{ |
| | | border-bottom: 2rpx dashed $uni-text-color-grey; |
| | | display: flex; |
| | | &>.label{ |
| | | opacity: .7; |
| | | flex-shrink: 0; |
| | | width: 80rpx; |
| | | padding-top: 11rpx; |
| | | .first-label-inner{ |
| | | display: flex; |
| | | align-items: center; |
| | | .batch-no{ |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | &>.content{ |
| | | width: 1px; |
| | | flex-grow: 1; |
| | | line-height: 1.5em; |
| | | padding: 8rpx 0; |
| | | } |
| | | &:last-child{ |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .bottom-btns-row{ |
| | | display: flex; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | .btn-frame{ |
| | | width: 1%; |
| | | box-sizing: border-box; |
| | | flex-grow: 1; |
| | | } |
| | | .divider{ |
| | | width: 20rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="check-stock-detail-list-component"> |
| | | <view class="detail-top-view"> |
| | | <view class="top-container block-item"> |
| | | <view class="top-container-title block-item-title auto-wrap">{{mainObj.planNo}}</view> |
| | | <view class="block-item-container"> |
| | | <view class="item-desc"> |
| | | <view class="label">æ¶é´</view> |
| | | <view class="content auto-wrap">{{mainObj.startPlanTimeFormat}}~{{mainObj.endPlanTimeFormat}}</view> |
| | | </view> |
| | | <view class="item-desc"> |
| | | <view class="label">ä»åº</view> |
| | | <view class="content auto-wrap">{{mainObj.areaName}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <scroll-view class="list-scroll-view" :scroll-y="true"> |
| | | <view class="list-items-around"> |
| | | <view class="detail-item block-item" v-for="(item,index) in list" :key="'check-item-'+index" @tap.stop="onActiveItem(item,index)"> |
| | | <view class="active-view" v-if="item.actived"></view> |
| | | <view :class="['block-item-title',(!item.expanded?'not-expanded':'')]"> |
| | | <view class="title-content"> |
| | | <view class="item-desc no-border"> |
| | | <view class="label">åºä½</view> |
| | | <view class="content auto-wrap">{{item.placeCode}}</view> |
| | | </view> |
| | | <view class="item-desc no-border"> |
| | | <view class="label">æç</view> |
| | | <view class="content auto-wrap">{{item.containerCode}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="tag-view"> |
| | | <u-tag v-if="item.statusDetailEnum===1" :text="item.statusDetailEnumName" size="mini" bg-color="#808080" color="#ffffff" border-color="#808080" /> |
| | | <u-tag v-else-if="item.statusDetailEnum===2" :text="item.statusDetailEnumName" size="mini" bg-color="#FEF3E6" color="#F18201" border-color="#F18201" /> |
| | | <u-tag v-else-if="item.statusDetailEnum===3" :text="item.statusDetailEnumName" size="mini" bg-color="#EFFCF2" color="#5CDF7D" border-color="#5CDF7D" /> |
| | | <u-tag v-else :text="item.statusDetailEnumName" size="mini" bg-color="#ffc0cb" color="#ff0000" border-color="#ff0000" /> |
| | | </view> |
| | | <view class="arrow-view" @tap.stop="onChangeItemExpanded(item,index)"> |
| | | <u-icon v-if="!item.expanded" name="arrow-down" color="#909193" :size="24" /> |
| | | <u-icon v-else name="arrow-up" color="#909193" :size="24" /> |
| | | </view> |
| | | </view> |
| | | <view class="block-item-container" v-if="item.expanded"> |
| | | <view class="check-table-header table-row"> |
| | | <view class="cell1">åºå·</view> |
| | | <view class="cell2">ç©æ</view> |
| | | <view class="cell3">åºå</view> |
| | | <view class="cell4">å®ç</view> |
| | | </view> |
| | | <view class="check-table-body"> |
| | | <view class="table-row" v-for="(itemx,indexx) in item.materials" :key="'check-item-material-'+indexx"> |
| | | <view class="cell1">{{indexx+1}}</view> |
| | | <view class="cell2 auto-wrap">{{itemx.inventoryMateriaUnique}}</view> |
| | | <view class="cell3">{{itemx.stockNumber}}</view> |
| | | <view class="cell4 large">{{itemx.inventoryNumber}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="no-more-text-row">æ²¡ææ´å¤äº</view> |
| | | </scroll-view> |
| | | <view class="bottom-btns-row"> |
| | | <template v-if="checkType===1"> |
| | | <view class="btn-frame"><u-button type="primary" text="åº åº" @click="onOutAction"></u-button></view> |
| | | <view class="divider"></view> |
| | | </template> |
| | | <view class="btn-frame"><u-button type="primary" text="ç ç¹" @click="onGoCheck"></u-button></view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { parseDic, $alert, $successInfo } from '@/static/js/utils/index.js' |
| | | export default { |
| | | name:'checkStockDetailListComponent', |
| | | emits:['action'], |
| | | props:{ |
| | | mainObj: { |
| | | type: Object, |
| | | default: function(){ |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | list:[] |
| | | } |
| | | }, |
| | | computed:{ |
| | | checkType(){ |
| | | let res = 2 |
| | | if (this.mainObj.inventoryRuled && this.mainObj.inventoryRuled.ruleType===1) { |
| | | res = 1 |
| | | } |
| | | return res |
| | | }, |
| | | }, |
| | | methods:{ |
| | | init(){ |
| | | this.getList() |
| | | }, |
| | | getList(){ |
| | | this.$api.get('PageDetail',{id:this.mainObj.id},{block:'checkStock'}).then(d=>{ |
| | | this.list = (d || []).map((obj)=>{ |
| | | obj.statusDetailEnumName = parseDic(this.$store,'task_status',obj.statusDetailEnum) |
| | | return obj |
| | | }); |
| | | }).catch(err=>{ |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | onActiveItem(obj,index) { |
| | | if (this.checkType!==1) return false |
| | | obj.actived = !obj.actived |
| | | this.$set(this.list,index,obj) |
| | | }, |
| | | onChangeItemExpanded(obj,index){ |
| | | if (obj.expanded) { |
| | | obj.expanded = false |
| | | this.$set(this.list,index,obj) |
| | | } else { |
| | | if (!obj.materials) { |
| | | this.getContainerInfo(obj,index,(f,_arr)=>{ |
| | | if (f) { |
| | | obj.expanded = true |
| | | obj.materials = _arr |
| | | this.$set(this.list,index,obj) |
| | | } |
| | | }) |
| | | } else { |
| | | obj.expanded = true |
| | | this.$set(this.list,index,obj) |
| | | } |
| | | } |
| | | }, |
| | | getContainerInfo(obj,index,callback){ |
| | | let params = { |
| | | InventoryPlanId:this.mainObj.id, |
| | | ContainerVsLocation:obj.containerCode |
| | | } |
| | | this.$api.get('ByContainerCodeGetInfo',params,{block:'checkStock'}).then(d=>{ |
| | | let _arr = d || [] |
| | | callback && callback(true,_arr) |
| | | }).catch(()=>{ |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | onGoCheck(){ |
| | | this.$emit('action') |
| | | }, |
| | | onOutAction(){ |
| | | let params = {containerCodes:[]} |
| | | this.list.forEach((eachObj)=>{ |
| | | if (eachObj.actived) { |
| | | params.containerCodes.push(eachObj.containerCode) |
| | | } |
| | | }) |
| | | if (params.containerCodes.length===0) { |
| | | $alert('è¯·éæ©åºåºæç') |
| | | return false |
| | | } |
| | | this.outAjax(params,(f)=>{ |
| | | if (f) { |
| | | $successInfo('åºåºæäº¤æå') |
| | | this.getList() |
| | | } |
| | | }) |
| | | }, |
| | | outAjax(params,callback){ |
| | | this.$api.post('ByContainerCodeOut',params,{block:'checkStock'}).then(d=>{ |
| | | callback && callback(true) |
| | | }).catch(()=>{ |
| | | callback && callback(false) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .check-stock-detail-list-component{ |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .detail-top-view,.bottom-btns-row{ |
| | | flex-shrink: 0; |
| | | } |
| | | .detail-top-view{ |
| | | .top-container{ |
| | | .top-container-title{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | } |
| | | .block-item { |
| | | background-color: $uni-bg-color; |
| | | font-size: 38rpx; |
| | | border-width: 2rpx 0; |
| | | border-style: solid; |
| | | border-color: $uni-border-color; |
| | | .block-item-title{ |
| | | border-bottom:2rpx solid $uni-border-color; |
| | | font-size: 1.1em; |
| | | padding: 12rpx 16rpx; |
| | | } |
| | | .block-item-container{ |
| | | padding: 0 16rpx; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | } |
| | | .item-desc{ |
| | | flex-shrink: 0; |
| | | width: 100%; |
| | | font-size: .9em; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | padding: 10rpx 0; |
| | | border-bottom: 2rpx dashed $uni-border-color; |
| | | &.no-border{ |
| | | border-bottom: 0; |
| | | } |
| | | &>.label { |
| | | font-size: .9em; |
| | | flex-shrink: 0; |
| | | color:#989898; |
| | | width: 80rpx; |
| | | } |
| | | &>.content{ |
| | | width: 1px; |
| | | flex-grow: 1; |
| | | line-height: 1.2em; |
| | | padding: 0 4rpx; |
| | | } |
| | | &:last-child { |
| | | border-bottom:0; |
| | | } |
| | | } |
| | | .bottom-btns-row{ |
| | | display: flex; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | .btn-frame{ |
| | | width: 1%; |
| | | box-sizing: border-box; |
| | | flex-grow: 1; |
| | | } |
| | | .divider{ |
| | | width: 20rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | } |
| | | .list-scroll-view{ |
| | | flex-grow: 1; |
| | | height: 1px; |
| | | .list-items-around{ |
| | | padding-top: 12rpx; |
| | | } |
| | | .detail-item { |
| | | position: relative; |
| | | margin-bottom: 12rpx; |
| | | &:last-child{ |
| | | margin-bottom: 0; |
| | | } |
| | | .active-view{ |
| | | position: absolute; |
| | | top:0; |
| | | left:0; |
| | | width: 100%; |
| | | height: 100%; |
| | | box-sizing: border-box; |
| | | border:6rpx solid $u-primary; |
| | | } |
| | | .block-item-title{ |
| | | font-size: 1em; |
| | | display: flex; |
| | | &.not-expanded{ |
| | | border-bottom: 0; |
| | | } |
| | | .tag-view,.arrow-view{ |
| | | flex-shrink: 0; |
| | | } |
| | | .title-content{ |
| | | width: 1px; |
| | | flex-grow: 1; |
| | | } |
| | | .tag-view,.arrow-view{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .arrow-view{ |
| | | padding-left: 16rpx; |
| | | } |
| | | } |
| | | .block-item-container{ |
| | | .check-table-header{ |
| | | opacity: .8; |
| | | font-size: .9em; |
| | | } |
| | | .check-table-body{ |
| | | width: 100%; |
| | | .table-row:last-child{ |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | .table-row { |
| | | display: flex; |
| | | width: 100%; |
| | | border-bottom: 2rpx dashed $uni-border-color; |
| | | .cell1,.cell2,.cell3,.cell4{ |
| | | text-align: center; |
| | | padding: 16rpx 0; |
| | | } |
| | | .cell1,.cell3,.cell4{ |
| | | flex-shrink: 0; |
| | | } |
| | | .cell1{ |
| | | width: 80rpx; |
| | | } |
| | | .cell3{ |
| | | width: 90rpx; |
| | | } |
| | | .cell4{ |
| | | width: 90rpx; |
| | | &.large { |
| | | color: #0366AA; |
| | | } |
| | | &.small { |
| | | color: #ff0000; |
| | | } |
| | | } |
| | | .cell2{ |
| | | width: 1px; |
| | | flex-grow: 1; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="check-stock-main-list-component"> |
| | | <view class="top-row"> |
| | | <view class="top-btns"> |
| | | <view class="search-btn" @tap.stop="onQuery"><u-icon name="search" size="30" /></view> |
| | | <view class="reset-btn" @tap.stop="onReset">é ç½®</view> |
| | | </view> |
| | | </view> |
| | | <scroll-view class="list-scroll-view" :scroll-y="true" @scrolltolower="onMoreList"> |
| | | <view class="list-items-around"> |
| | | <!-- ########### --> |
| | | <view class="list-item" v-for="(item,index) in list" :key="'list-item-'+index"> |
| | | <view class="list-item-show" @tap.stop="onWatchDetail(item)"> |
| | | <view class="item-header"> |
| | | <view class="item-index"> |
| | | <uni-badge :text="index+1" type="primary" size="normal" /> |
| | | </view> |
| | | <view class="item-title-box"> |
| | | <text>{{item.planNo}}</text> |
| | | </view> |
| | | <view class="item-tag"> |
| | | <u-tag v-if="item.statusEnum===1" :text="item.statusEnumName" size="mini" bg-color="#808080" color="#ffffff" border-color="#808080" /> |
| | | <u-tag v-else-if="item.statusEnum===2" :text="item.statusEnumName" size="mini" bg-color="#FEF3E6" color="#F18201" border-color="#F18201" /> |
| | | <u-tag v-else-if="item.statusEnum===3" :text="item.statusEnumName" size="mini" bg-color="#EFFCF2" color="#5CDF7D" border-color="#5CDF7D" /> |
| | | <u-tag v-else :text="item.statusEnumName" size="mini" bg-color="#ffc0cb" color="#ff0000" border-color="#ff0000" /> |
| | | </view> |
| | | </view> |
| | | <view class="item-container"> |
| | | <view class="item-desc"> |
| | | <view class="label">æ¶é´</view> |
| | | <view class="content auto-wrap">{{item.startPlanTimeFormat}}~{{item.endPlanTimeFormat}}</view> |
| | | </view> |
| | | <view class="item-desc"> |
| | | <view class="label">ä»åº</view> |
| | | <view class="content auto-wrap">{{item.areaName}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- ########### --> |
| | | </view> |
| | | <view class="no-more-text-row" v-if="!hasMore">æ²¡ææ´å¤äº</view> |
| | | </scroll-view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { parseDic } from '@/static/js/utils/index.js' |
| | | // import dayjs from 'dayjs' |
| | | const pagination = { |
| | | PageNo:1, |
| | | PageSize:10 |
| | | } |
| | | export default { |
| | | name:'checkStockMainListComponent', |
| | | emits:['query','update:resetflag','action'], |
| | | data(){ |
| | | return { |
| | | hasMore:true, |
| | | queried:{}, |
| | | list:[] |
| | | } |
| | | }, |
| | | methods:{ |
| | | onQuery(){ |
| | | this.$emit('query') |
| | | }, |
| | | onReset(){ |
| | | this.resetQuery() |
| | | }, |
| | | resetQuery(){ |
| | | this.$emit('update:resetflag',new Date().getTime()) |
| | | }, |
| | | newList(params=null,callback){ |
| | | this.queried = {...pagination} |
| | | if (params) { |
| | | this.queried = {...this.queried,...params} |
| | | } |
| | | this.getList(callback) |
| | | }, |
| | | onMoreList(){ |
| | | if (this.hasMore) { |
| | | this.queried.PageNo++; |
| | | this.getList(); |
| | | } |
| | | }, |
| | | getList(callback){ |
| | | this.$api.get('page',this.queried,{block:'checkStock'}).then((res)=>{ |
| | | let arr = (res.rows || []).map((obj)=>{ |
| | | obj.statusEnumName = parseDic(this.$store,'task_status',obj.statusEnum) |
| | | obj.startPlanTimeFormat = obj.startPlanTime?dayjs(obj.startPlanTime).format('YYYY.MM.DD'):'' |
| | | obj.endPlanTimeFormat = obj.endPlanTime?dayjs(obj.endPlanTime).format('YYYY.MM.DD'):'' |
| | | return obj |
| | | }); |
| | | let len = arr.length; |
| | | if (this.queried.PageNo>=res.totalPage) { |
| | | this.hasMore = false |
| | | } else { |
| | | this.hasMore = true |
| | | } |
| | | if (this.queried.PageNo===1) { |
| | | this.list = arr; |
| | | } else { |
| | | this.list = [...this.list,...arr]; |
| | | } |
| | | callback && callback(true) |
| | | }).catch(err=>{ |
| | | console.log(err) |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | onWatchDetail(obj) { |
| | | this.$emit('action',obj) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .check-stock-main-list-component{ |
| | | $topSize:90rpx; |
| | | height: 100%; |
| | | position: relative; |
| | | box-sizing: border-box; |
| | | padding-top: $topSize; |
| | | .top-row{ |
| | | position: absolute; |
| | | z-index: 5; |
| | | top: 0; |
| | | left: 0; |
| | | height: $topSize; |
| | | width: 100%; |
| | | padding: 10rpx 12rpx; |
| | | box-sizing: border-box; |
| | | border-bottom:1px solid #F0F8FF; |
| | | background-color: $uni-bg-color; |
| | | } |
| | | .top-btns{ |
| | | width: 100%; |
| | | height: 100%; |
| | | box-sizing: border-box; |
| | | border: 1px solid $uni-border-color; |
| | | border-radius: 32rpx / 50%; |
| | | display: flex; |
| | | overflow: hidden; |
| | | color: $uni-text-color-grey; |
| | | } |
| | | .search-btn,.reset-btn{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | height: 100%; |
| | | } |
| | | .reset-btn{ |
| | | flex-shrink: 0; |
| | | width: 160rpx; |
| | | border-left: 1px solid $uni-border-color; |
| | | } |
| | | .search-btn{ |
| | | flex-grow: 1; |
| | | background-color: #DCDCDC; |
| | | } |
| | | .list-scroll-view{ |
| | | height: 100%; |
| | | } |
| | | .list-items-around{ |
| | | padding-top:12rpx; |
| | | .list-item { |
| | | margin-bottom: 12rpx; |
| | | border-width: 2rpx 0; |
| | | border-style: solid; |
| | | border-color: $uni-border-color; |
| | | &:last-child{ |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | .list-item-show { |
| | | background-color: $uni-bg-color; |
| | | font-size: 40rpx; |
| | | .item-header{ |
| | | display: flex; |
| | | border-bottom:2rpx solid $uni-border-color; |
| | | padding: 6rpx 0; |
| | | .item-index,.item-tag{ |
| | | flex-shrink: 0; |
| | | } |
| | | .item-index{ |
| | | width: 68rpx; |
| | | padding-left: 10rpx; |
| | | padding-top:11rpx; |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | } |
| | | .item-tag{ |
| | | display: flex; |
| | | padding:6rpx 16rpx; |
| | | } |
| | | .item-title-box{ |
| | | flex-grow: 1; |
| | | width: 1px; |
| | | padding-left: 4rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | .item-container{ |
| | | padding: 0 16rpx; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | .item-desc{ |
| | | flex-shrink: 0; |
| | | width: 100%; |
| | | font-size: .9em; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | padding: 10rpx 0; |
| | | border-bottom: 2rpx dashed $uni-border-color; |
| | | &>.label { |
| | | font-size: .9em; |
| | | flex-shrink: 0; |
| | | color:#989898; |
| | | width: 100rpx; |
| | | } |
| | | &>.content{ |
| | | width: 1px; |
| | | flex-grow: 1; |
| | | line-height: 1.2em; |
| | | padding: 0 4rpx; |
| | | } |
| | | &:last-child { |
| | | border-bottom:0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="check-stock-main-search-component"> |
| | | <view class="search-form-box"> |
| | | <u-form labelPosition="left" :labelWidth="84" :model="form" ref="form" :labelStyle="{color:'#787878'}"> |
| | | <u-form-item label="计ååå·ï¼" borderBottom> |
| | | <u-input v-model="form.PlanNo" placeholder="请è¾å
¥..." border="none" clearable /> |
| | | </u-form-item> |
| | | <u-form-item label="计åç¶æï¼" borderBottom> |
| | | <u-view-form-select-picker v-model="form.InspectionStatus" :list="selectList.checkPlan" value-field="code" label-field="name" /> |
| | | </u-form-item> |
| | | </u-form> |
| | | </view> |
| | | <view class="search-bottom"> |
| | | <u-button type="primary" text="æ¥ è¯¢" @click="onSearch" /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import UViewFormSelectPicker from '@/components/UViewFormSelectPicker.vue' |
| | | import { getDicList, $alert } from '@/static/js/utils/index.js' |
| | | const defaultQueryForm = { |
| | | PlanNo:'', |
| | | InspectionStatus:'' |
| | | } |
| | | export default { |
| | | name:'checkStockMainSearchComponent', |
| | | components:{UViewFormSelectPicker}, |
| | | emits:['callback'], |
| | | props:{ |
| | | resetflag: { |
| | | type: Number, |
| | | default: 0 |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | form:{...defaultQueryForm}, |
| | | selectList:{ |
| | | checkPlan:[] |
| | | } |
| | | } |
| | | }, |
| | | watch:{ |
| | | resetflag(newVal, oldVal){ |
| | | if (newVal !== oldVal) { |
| | | this.form = {...defaultQueryForm} |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | onSearch(){ |
| | | this.$emit('callback',this.form) |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.selectList.checkPlan = getDicList(this.$store,'task_status') |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .check-stock-main-search-component{ |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .search-form-box{ |
| | | flex-grow: 1; |
| | | background-color: $uni-bg-color; |
| | | overflow: auto; |
| | | padding: 10rpx 20rpx; |
| | | } |
| | | .search-bottom{ |
| | | flex-shrink: 0; |
| | | padding: 10rpx 0; |
| | | padding: 20rpx; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="long-width-height-form-item-compontent"> |
| | | <view class="p-form-label" v-if="label"><text v-if="required" class="required-tag">*</text>{{label}}ï¼</view> |
| | | <view class="input-row"> |
| | | <view class="input-view"> |
| | | <input v-model="innerLong" class="my-input" type="digit" :placeholder="longPlaceholder" /> |
| | | </view> |
| | | <view class="divider-text">*</view> |
| | | <view class="input-view"> |
| | | <input v-model="innerWidth" class="my-input" type="digit" :placeholder="widthPlaceholder" /> |
| | | </view> |
| | | <view class="divider-text">*</view> |
| | | <view class="input-view"> |
| | | <input v-model="innerHeight" class="my-input" type="digit" :placeholder="heightPlaceholder" /> |
| | | </view> |
| | | </view> |
| | | <view class="msg-row" v-if="msg">{{msg}}</view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name:'LongWidthHeightFormItemComponent', |
| | | emits:['update:long','update:width','update:height'], |
| | | props:{ |
| | | long:{ |
| | | type:[Number,String], |
| | | default:0 |
| | | }, |
| | | width:{ |
| | | type:[Number,String], |
| | | default:0 |
| | | }, |
| | | height:{ |
| | | type:[Number,String], |
| | | default:0 |
| | | }, |
| | | label:{ |
| | | type:String, |
| | | default:'é¿å®½é«' |
| | | }, |
| | | longPlaceholder:{ |
| | | type:String, |
| | | default:'é¿' |
| | | }, |
| | | widthPlaceholder:{ |
| | | type:String, |
| | | default:'宽' |
| | | }, |
| | | heightPlaceholder:{ |
| | | type:String, |
| | | default:'é«' |
| | | }, |
| | | msg:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | required:{ |
| | | type:Boolean, |
| | | default:false |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | innerLong:0, |
| | | innerWidth:0, |
| | | innerHeight:0 |
| | | } |
| | | }, |
| | | watch:{ |
| | | long(newVal,oldVal){ |
| | | if (newVal!==this.innerValue) { |
| | | this.innerLong = newVal |
| | | } |
| | | }, |
| | | innerLong(newVal,oldVal){ |
| | | if (newVal!==this.value) { |
| | | this.$emit('update:long',newVal) |
| | | } |
| | | }, |
| | | width(newVal,oldVal){ |
| | | if (newVal!==this.innerValue) { |
| | | this.innerWidth = newVal |
| | | } |
| | | }, |
| | | innerWidth(newVal,oldVal){ |
| | | if (newVal!==this.value) { |
| | | this.$emit('update:width',newVal) |
| | | } |
| | | }, |
| | | height(newVal,oldVal){ |
| | | if (newVal!==this.innerValue) { |
| | | this.innerHeight = newVal |
| | | } |
| | | }, |
| | | innerHeight(newVal,oldVal){ |
| | | if (newVal!==this.value) { |
| | | this.$emit('update:height',newVal) |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.innerLong = this.long |
| | | this.innerWidth = this.width |
| | | this.innerHeight = this.height |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .long-width-height-form-item-compontent{ |
| | | width: 100%; |
| | | .p-form-label{ |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag{ |
| | | color:#ff0000; |
| | | } |
| | | } |
| | | .input-row{ |
| | | width: 100%; |
| | | height: 90rpx; |
| | | overflow: hidden; |
| | | background-color: $uni-bg-color; |
| | | display: flex; |
| | | align-items: center; |
| | | .input-view{ |
| | | flex-grow: 1; |
| | | width: 1px; |
| | | } |
| | | .divider-text{ |
| | | flex-shrink: 0; |
| | | font-size: 1.5em; |
| | | height: 100%; |
| | | background-color: transparent; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 10rpx; |
| | | |
| | | } |
| | | } |
| | | .msg-row{ |
| | | padding: 6rpx 20rpx 0 20rpx; |
| | | line-height: 1.3; |
| | | font-size: 24rpx; |
| | | color: $u-error; |
| | | } |
| | | .my-input{ |
| | | text-align: center; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="station-select-form-item-compontent"> |
| | | <view class="p-form-label" v-if="label"><text v-if="required" class="required-tag">*</text>{{label}}ï¼</view> |
| | | <view class="form-row"> |
| | | <view class="mask" @tap.stop="" v-if="disabled || loading"> |
| | | <template v-if="loading"> |
| | | <u-loading-icon color="#f0f8ff" /> |
| | | <text style="margin-left:20rpx;color:#f0f8ff;">Loading...</text> |
| | | </template> |
| | | </view> |
| | | <view class="form-items-view"> |
| | | <view class="select-block" @tap.stop="onOpenPicker1"> |
| | | <view class="input-view"> |
| | | <text v-if="!value1" class="placeholder">{{placeholder1}}</text> |
| | | <text v-else>{{valueLabel1}}</text> |
| | | </view> |
| | | <view class="close-view" @tap.stop="onClear1" v-if="value1 && clearable"> |
| | | <view class="close-circle"> |
| | | <u-icon |
| | | name="close" |
| | | size="11" |
| | | color="#ffffff" |
| | | customStyle="line-height: 12px" |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="right-icon-view"><u-icon name="arrow-down" color="#909193" :size="24"></u-icon></view> |
| | | </view> |
| | | <view class="divider"></view> |
| | | <view class="select-block" @tap.stop="onOpenPicker2"> |
| | | <view class="input-view"> |
| | | <text v-if="!value2" class="placeholder">{{placeholder2}}</text> |
| | | <text v-else>{{valueLabel2}}</text> |
| | | </view> |
| | | <view class="close-view" @tap.stop="onClear2" v-if="value2 && clearable"> |
| | | <view class="close-circle"> |
| | | <u-icon |
| | | name="close" |
| | | size="11" |
| | | color="#ffffff" |
| | | customStyle="line-height: 12px" |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="right-icon-view"><u-icon name="arrow-down" color="#909193" :size="24"></u-icon></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="msg-row" v-if="msg" :class="[msgType==='info'?'info-type':'']">{{msg}}</view> |
| | | |
| | | <easy-picker :visible.sync="pickerVisible1" :list="list1" :value-field="valueField1" :label-field="labelField1" @select="onPickerSelect1" /> |
| | | <easy-picker :visible.sync="pickerVisible2" :list="list2" :value-field="valueField2" :label-field="labelField2" @select="onPickerSelect2" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | const LINE_VALUE_FIELD = 'productionlineId' |
| | | const LINE_LABEL_FIELD = 'productionlineName' |
| | | const STATION_VALUE_FIELD = 'takeMaterialsSiteId' |
| | | const STATION_LABEL_FIELD = 'takeMaterialsSite' |
| | | export default { |
| | | name:'stationSelectFormItemComponent', |
| | | components:{EasyPicker}, |
| | | emits:['input','select'], |
| | | props:{ |
| | | value:{ |
| | | type:Array, |
| | | default:function(){ |
| | | return [] |
| | | } |
| | | }, |
| | | label:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | placeholder1:{ |
| | | type:String, |
| | | default:'产线' |
| | | }, |
| | | placeholder2:{ |
| | | type:String, |
| | | default:'å·¥ä½' |
| | | }, |
| | | msg:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | msgType:{ |
| | | type:String, |
| | | default:'error' |
| | | }, |
| | | disabled:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | clearable:{ |
| | | type:Boolean, |
| | | default:true |
| | | }, |
| | | required:{ |
| | | type:Boolean, |
| | | default:false |
| | | } |
| | | }, |
| | | data(){ |
| | | return { |
| | | list1:[], |
| | | list2:[], |
| | | value1:undefined, |
| | | value2:undefined, |
| | | valueLabel1:undefined, |
| | | valueLabel2:undefined, |
| | | valueObj1:null, |
| | | valueObj2:null, |
| | | pickerVisible1:false, |
| | | valueField1:LINE_VALUE_FIELD, |
| | | labelField1:LINE_LABEL_FIELD, |
| | | pickerVisible2:false, |
| | | valueField2:STATION_VALUE_FIELD, |
| | | labelField2:STATION_LABEL_FIELD, |
| | | loading:false |
| | | } |
| | | }, |
| | | mounted(){ |
| | | this.init() |
| | | }, |
| | | methods:{ |
| | | init(){ |
| | | this.loading = true |
| | | this.getLines((f)=>{ |
| | | if (f) { |
| | | this.setChangeValues(()=>{ |
| | | this.loading = false |
| | | }) |
| | | } else { |
| | | this.loading = false |
| | | } |
| | | }) |
| | | }, |
| | | setChangeValues(callback){ |
| | | if (this.value) { |
| | | if (this.value[0]) { |
| | | this.value1 = this.value[0] |
| | | this.valueLabel1 = this.getLineLabelByValue(this.value1) |
| | | this.getStations((f)=>{ |
| | | if (f) { |
| | | if (this.value[1]) { |
| | | this.value2 = this.value[1] |
| | | this.valueLabel2 = this.getStationLabelByValue(this.value2) |
| | | this.backValue() |
| | | } |
| | | callback && callback(true) |
| | | } else { |
| | | callback && callback(false) |
| | | } |
| | | }) |
| | | } else { |
| | | callback && callback(true) |
| | | } |
| | | } else { |
| | | callback && callback(true) |
| | | } |
| | | }, |
| | | getLineLabelByValue(val) { |
| | | let res = val; |
| | | for (let i=0;i<this.list1.length;i++) { |
| | | if (this.list1[i][LINE_VALUE_FIELD]===val) { |
| | | this.valueObj1 = this.list1[i] |
| | | res = this.list1[i][LINE_LABEL_FIELD] |
| | | break |
| | | } |
| | | } |
| | | return res |
| | | }, |
| | | getStationLabelByValue(val) { |
| | | let res = val; |
| | | for (let i=0;i<this.list2.length;i++) { |
| | | if (this.list2[i][STATION_VALUE_FIELD]===val) { |
| | | this.valueObj2 = this.list2[i] |
| | | res = this.list2[i][STATION_LABEL_FIELD] |
| | | break |
| | | } |
| | | } |
| | | return res |
| | | }, |
| | | getLines(callback){ |
| | | this.$api.get('GetProductionlineList',{},{block:'station',loading:false}).then((d)=>{ |
| | | this.list1 = d || [] |
| | | if (this.list1.length===1) { |
| | | this.valueObj1 = this.list1[0] |
| | | this.value1 = this.list1[0][LINE_VALUE_FIELD] |
| | | this.valueLabel1 = this.list1[0][LINE_LABEL_FIELD] |
| | | this.backValue() |
| | | } |
| | | callback && callback(true) |
| | | }).catch((_errmsg)=>{ |
| | | this.clearAllValue() |
| | | this.backValue() |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | getStations(callback,isInit=false){ |
| | | this.$api.get('GetStationList',{id:this.value1},{block:'station',loading:false}).then((d)=>{ |
| | | this.list2 = d || [] |
| | | if (this.list2.length===1) { |
| | | this.valueObj2 = this.list2[0] |
| | | this.value2 = this.list2[0][STATION_VALUE_FIELD] |
| | | this.valueLabel2 = this.list2[0][STATION_LABEL_FIELD] |
| | | } else { |
| | | this.clearValue2() |
| | | } |
| | | this.backValue() |
| | | callback && callback(true) |
| | | }).catch((_errmsg)=>{ |
| | | this.list2 = [] |
| | | this.clearValue2() |
| | | this.backValue() |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | onOpenPicker1(){ |
| | | if (this.list1.length<=0) return false |
| | | this.pickerVisible1 = true |
| | | }, |
| | | onOpenPicker2(){ |
| | | if (this.list2.length<=0) return false |
| | | this.pickerVisible2 = true |
| | | }, |
| | | onPickerSelect1(value,selection){ |
| | | if (value===this.value1) return false |
| | | this.value1 = value |
| | | this.valueObj1 = selection |
| | | this.valueLabel1 = selection[LINE_LABEL_FIELD] |
| | | this.loading = true |
| | | this.getStations(()=>{ |
| | | this.backSelect() |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | onPickerSelect2(value,selection){ |
| | | if (value===this.value2) return false |
| | | this.value2 = value |
| | | this.valueObj2 = selection |
| | | this.valueLabel2 = selection[STATION_LABEL_FIELD] |
| | | this.backValue() |
| | | this.backSelect() |
| | | }, |
| | | onClear1(){ |
| | | this.clearAllValue() |
| | | this.list2 = [] |
| | | this.backValue() |
| | | }, |
| | | onClear2(){ |
| | | this.clearValue2() |
| | | this.backValue() |
| | | }, |
| | | clearAllValue(){ |
| | | this.clearValue1() |
| | | this.clearValue2() |
| | | }, |
| | | clearValue1(){ |
| | | this.value1 = undefined |
| | | this.valueObj1 = null |
| | | this.valueLabel1 = undefined |
| | | }, |
| | | clearValue2(){ |
| | | this.value2 = undefined |
| | | this.valueObj2 = null |
| | | this.valueLabel2 = undefined |
| | | }, |
| | | backValue(){ |
| | | this.$emit('input',[this.value1,this.value2]) |
| | | }, |
| | | backSelect(){ |
| | | this.$emit('select',[this.value1,this.value2],[{...this.valueObj1},{...this.valueObj2}]) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .station-select-form-item-compontent { |
| | | width: 100%; |
| | | .p-form-label{ |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag{ |
| | | color:#ff0000; |
| | | } |
| | | } |
| | | .form-row{ |
| | | width: 100%; |
| | | height: 90rpx; |
| | | overflow: hidden; |
| | | position: relative; |
| | | .form-items-view { |
| | | height: 100%; |
| | | width: 100%; |
| | | display: flex; |
| | | .divider{ |
| | | width: 20rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | .select-block{ |
| | | width: 1%; |
| | | flex-grow: 1; |
| | | background-color: $uni-bg-color; |
| | | display: flex; |
| | | align-items: center; |
| | | .close-view,.right-icon-view{ |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .right-icon-view{ |
| | | padding-right: 10rpx; |
| | | } |
| | | .close-view{ |
| | | .close-circle{ |
| | | width: 20px; |
| | | height: 20px; |
| | | border-radius: 50%; |
| | | background-color: #c6c7cb; |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | justify-content: center; |
| | | transform: scale(0.82); |
| | | margin-left: 4px; |
| | | } |
| | | } |
| | | .input-view{ |
| | | flex-grow: 1; |
| | | padding-left: 20rpx; |
| | | font-size: 30rpx; |
| | | white-space:nowrap; |
| | | overflow:hidden; |
| | | text-overflow:ellipsis; |
| | | color: rgb(48, 49, 51); |
| | | .placeholder{ |
| | | color: rgb(192, 196, 204); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | &>.mask{ |
| | | background-color: #000; |
| | | opacity: 0.25; |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | z-index: 100; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #f2f2f2; |
| | | } |
| | | } |
| | | .msg-row{ |
| | | padding: 6rpx 20rpx 0 20rpx; |
| | | line-height: 1.3; |
| | | font-size: 24rpx; |
| | | color: $u-error; |
| | | word-break:break-all; |
| | | word-wrap:break-word; |
| | | &.info-type{ |
| | | color:$color-blue; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="å°æ ç»å®"> |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- step 1 start --> |
| | | <scan-input-form-item class="forma-item" label="æçç¼ç " v-model="form.containerNo" :msg="msg.containter" |
| | | :msg-type="msgType.containter" @search="onSearchContainter" @clear="onClearContainter" /> |
| | | |
| | | <!-- åºåº --> |
| | | <!-- v-show="Boolean(containerInfo.containerNo)" --> |
| | | <selectItem :disabled="selectDisabled" |
| | | :selectData="areaData" :value.sync="form.areaNo" label="åºåºç¼å·" labelField="areaName" |
| | | valueField="areaNo" /> |
| | | |
| | | <!-- åºä½ --> |
| | | <!-- v-show="Boolean(containerInfo.containerNo)&&Boolean(form.areaNo)" --> |
| | | <selectItem :disabled="selectDisabled" |
| | | :selectData="placeList" :value.sync="form.placeNo" label="åºä½ç¼å·" labelField="placeNo" |
| | | valueField="placeNo" /> |
| | | |
| | | <div v-if="false"> |
| | | <scan-input-form-item class="forma-item" label="åºä½å·²ææçä¿¡æ¯" :content="false" /> |
| | | <containerInfo :containerInfo="containerPlaceInfo"/> |
| | | </div> |
| | | |
| | | <!-- <placeInfo v-show="selectDisabled" :placeInfo="containerInfo.placeInfo" /> --> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template> |
| | | <div class="btn-frame"><u-button type="primary" text="ç»å®" @click="onSubmit" |
| | | :disabled="!abled"></u-button></div> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import selectItem from './modules/selectItem.vue' |
| | | import placeInfo from './modules/placeInfo.vue' |
| | | import containerInfo from './modules/containerInfo.vue' |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | | $successInfo, |
| | | getDicList |
| | | } from '@/static/js/utils/index.js' |
| | | import { |
| | | palceList |
| | | } from '@/service/mixins/mixins.js' |
| | | import { |
| | | getContainerPlaceInfo, |
| | | containerHandle, |
| | | getContainerPlaceByPlace |
| | | } from '@/api/containerHandle.js' |
| | | import { |
| | | getAreaInfo, |
| | | getAreaListContaninerBind |
| | | } from '@/api/common.js' |
| | | |
| | | let initInterVal = null; |
| | | export default { |
| | | name: 'containerHandle', |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | placeInfo, |
| | | selectItem, |
| | | containerInfo |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | containter: null, |
| | | form: { |
| | | containerNo: '', |
| | | areaNo: '', |
| | | placeNo: '' |
| | | }, |
| | | msg: { |
| | | containter: '' |
| | | }, |
| | | msgType: { |
| | | containter: 'info' |
| | | }, |
| | | containerInfo: {}, |
| | | areaData: [], |
| | | containerPlaceInfo:{} |
| | | |
| | | } |
| | | }, |
| | | computed: { |
| | | selectDisabled() { |
| | | return Boolean(this.containerInfo?.placeInfo?.placeNo) |
| | | }, |
| | | abled() { |
| | | return Boolean(this.containerInfo.containerNo) && !Boolean(this.containerInfo?.placeInfo?.placeNo) |
| | | }, |
| | | placeInfoShow(){ |
| | | return Boolean(this.containerInfo.containerNo) && Boolean(this.form.placeNo)&&Boolean(this.containerPlaceInfo.containerNo)&&!Boolean(this.containerInfo?.placeInfo?.placeNo); |
| | | } |
| | | }, |
| | | watch: { |
| | | 'form.containerNo': { |
| | | handler(val, oldVal) { |
| | | this.containerInfo = {} |
| | | this.form.areaNo='' |
| | | this.form.placeNo='' |
| | | } |
| | | }, |
| | | 'form.areaNo': { |
| | | handler(val, oldVal) { |
| | | if(val!='') { |
| | | this.form.placeNo = '' |
| | | this.placeList = [] |
| | | this.getPalceList({ |
| | | areaCode: val |
| | | }) |
| | | if (Boolean(this.containerInfo?.placeInfo?.placeNo)) { |
| | | this.$set(this.form, 'placeNo', this.containerInfo.placeInfo.placeNo) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | 'form.placeNo':{ |
| | | async handler(val, oldVal) { |
| | | if(val!='') { |
| | | this.containerPlaceInfo={} |
| | | try{ |
| | | let { |
| | | result |
| | | } = await getContainerPlaceByPlace({ |
| | | placeNo: this.form.placeNo |
| | | }) |
| | | this.containerPlaceInfo=result==null?{}:result; |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | /* æçç¼ç æç´¢ */ |
| | | async onSearchContainter() { |
| | | const { |
| | | containerNo |
| | | } = this.form |
| | | if (!Boolean(containerNo)) { |
| | | this.msgType.containter = 'error' |
| | | this.msg.containter = '请è¾å
¥æçç¼å·ï¼'; |
| | | return false; |
| | | } |
| | | // è·å代ç |
| | | try { |
| | | let { |
| | | result |
| | | } = await getContainerPlaceInfo({ |
| | | containerNo |
| | | }) |
| | | this.containerInfo = result |
| | | if (Boolean(this.containerInfo?.placeInfo?.placeNo)) { |
| | | this.getAreaList() |
| | | this.$nextTick(() => { |
| | | this.$set(this.form, 'areaNo', this.containerInfo?.placeInfo?.areaCode) |
| | | }) |
| | | |
| | | } |
| | | |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* æ¸
餿çç¼ç */ |
| | | onClearContainter() { |
| | | this.form = { |
| | | containterNo: '', |
| | | areaNo: '', |
| | | placeNo: '' |
| | | } |
| | | }, |
| | | |
| | | // è·ååºåºæ°æ® |
| | | async getAreaList() { |
| | | try { |
| | | // let { |
| | | // result |
| | | // } = await getAreaListContaninerBind() |
| | | |
| | | |
| | | let { |
| | | result |
| | | } = await getAreaInfo() |
| | | |
| | | |
| | | console.log(result,222) |
| | | this.areaData = result |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | // æçå¤ç |
| | | async onSubmit() { |
| | | this.form.type = 1 |
| | | uni.showModal({ |
| | | title: 'ç»å®', |
| | | content : 'æ¯å¦ç¡®è®¤ç»å®ï¼', |
| | | showCancel: true, |
| | | confirmText: 'ç¡®å®', |
| | | cancelText: 'åæ¶', |
| | | success: async ({ |
| | | confirm, |
| | | cancel |
| | | }) => { |
| | | if (confirm) { |
| | | try { |
| | | await containerHandle(this.form) |
| | | $alert("æçç»å®æåï¼"); |
| | | this.onClearContainter() |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | return |
| | | try { |
| | | let { |
| | | result |
| | | } = await getContainerPlaceByPlace({ |
| | | placeNo: this.form.placeNo |
| | | }) |
| | | if (result!=null||Boolean(this.containerInfo?.placeInfos?.placeNo)) { |
| | | var content='' |
| | | if(result!=null&&Boolean(this.containerInfo?.placeInfos?.placeNo)) |
| | | { |
| | | content=`æçå½åç»å®åºä½${this.containerInfo?.placeInfos?.placeNo},éå®åºä½å·²ç»å®æç${this.containerPlaceInfo?.containerNo}ï¼ç¡®è®¤è¦çæ¤å
³ç³»è¿è¡ç»å®åï¼` |
| | | }else if(result!=null&&!Boolean(this.containerInfo?.placeInfos?.placeNo)) |
| | | { |
| | | content=`å½åæçæªç»å®åºä½ï¼ä½éå®åºä½å·²ç»å®æç${this.containerPlaceInfo?.containerNo}ï¼ç¡®è®¤è¦çæ¤å
³ç³»è¿è¡ç»å®åï¼` |
| | | } |
| | | else if(result==null&&Boolean(this.containerInfo?.placeInfos?.placeNo)) |
| | | { |
| | | content=`æçå½åç»å®åºä½${this.containerInfo?.placeInfos?.placeNo},ï¼ä½éå®åºä½æªç»å®æçï¼ç¡®è®¤è¦çæ¤å
³ç³»è¿è¡ç»å®åï¼` |
| | | } |
| | | uni.showModal({ |
| | | title: 'ç»å®ç¡®è®¤', |
| | | content , |
| | | showCancel: true, |
| | | confirmText: 'ç¡®å®', |
| | | cancelText: 'åæ¶', |
| | | success: async ({ |
| | | confirm, |
| | | cancel |
| | | }) => { |
| | | if (confirm) { |
| | | try { |
| | | await containerHandle(this.form) |
| | | $alert("æçç»å®æåï¼"); |
| | | this.onClearContainter() |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }else { |
| | | try { |
| | | await containerHandle(this.form) |
| | | $alert("æçç»å®æåï¼"); |
| | | this.onClearContainter() |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | } |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | }, 200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | mixins: [palceList], |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | this.getAreaList() |
| | | this.ContainerType = getDicList(this.$store, 'container_type').sysDictDatas |
| | | }) |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | &>.label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .label { |
| | | margin-left: 25rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="material-list-item" > |
| | | <!-- <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> --> |
| | | <!-- <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> --> |
| | | <view class="item-row"> |
| | | <view class="label">æçç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?containerInfo.containerNo:''}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">åºä½ç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?containerInfo.placeNo:''}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æçåºä½ç¶æï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?(parseDic($store,'common_status',containerInfo.containerPlaceStatus)):''}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | containerInfo: { |
| | | type: Object, |
| | | default: () => {} |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | margin:-20rpx auto; |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* text-align: right; */ |
| | | /* font-weight:5; */ |
| | | width: 200rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="scan-input-form-item-compontent"> |
| | | <view class="p-form-label">åºä½è¯¦æ
ï¼</view> |
| | | <view class="material-item-group" v-if="Boolean(placeInfo)"> |
| | | <view class="material-list-item"> |
| | | <view class="item-row"> |
| | | <view class="label">åºä½ç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{placeInfo.placeNo}}</view> |
| | | </view> |
| | | |
| | | <view class="item-row"> |
| | | <view class="label">æå±åºåºï¼</view> |
| | | <view class="content auto-wrap">{{placeInfo.areaCode}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | placeInfo: { |
| | | type: Object, |
| | | default: () => {placeNo:''} |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style:{ |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }], |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .scan-input-form-item-compontent{ |
| | | width: 100%; |
| | | |
| | | .p-form-label{ |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag{ |
| | | color:$u-error; |
| | | } |
| | | }} |
| | | .material-item-group { |
| | | /* background-color: transparent!impor; */ |
| | | padding-top: 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* font-weight:5; */ |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="forma-item"> |
| | | <scan-input-form-item placeholder="è¯·éæ©" :clearable="false" :hasScan="false" :hasSearch="false" |
| | | @click.native="visible=true" class="forma-item" :label="label" v-model="value" :disabled="disabled"/> |
| | | <EasyPicker :visible.sync="visible" :list="selectData" :labelField="labelField" :valueField="valueField" |
| | | @select="getSelectData" /> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import { |
| | | parseDic |
| | | } from '@/static/js/utils/index.js' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | export default { |
| | | props: { |
| | | selectData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | value:{ |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | label:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | labelField:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | valueField:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | disabled:{ |
| | | type:Boolean, |
| | | default:false |
| | | } |
| | | |
| | | }, |
| | | components: { |
| | | EasyPicker, |
| | | ScanInputFormItem |
| | | }, |
| | | data() { |
| | | return { |
| | | radiolist1: [], |
| | | radiovalue1: '', |
| | | visible:false, |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | getSelectData(val){ |
| | | this.$emit('update:value',val) |
| | | }, |
| | | parseDic |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- <style scoped> |
| | | .custom-radio { |
| | | font-size: 16px; |
| | | line-height: 24px; |
| | | } |
| | | |
| | | .material-item-group { |
| | | padding-top: 10rpx; |
| | | display: flex; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | position: relative; |
| | | flex: 1; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .radio-row { |
| | | background-color: rgb(255, 255, 255); |
| | | margin-bottom: 10px; |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .p-form-label { |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | |
| | | .required-tag { |
| | | color: $u-error; |
| | | } |
| | | } |
| | | |
| | | .radio-group u-radio { |
| | | width: 50%; |
| | | } |
| | | </style> --> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="å°æ è§£ç»"> |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- step 1 start --> |
| | | <scan-input-form-item class="forma-item" label="æçç¼ç " v-model="form.containerNo" :msg="msg.containter" |
| | | :msg-type="msgType.containter" @search="onSearchContainter" @clear="onClearContainter" /> |
| | | |
| | | <!-- åºåº --> |
| | | <!-- <selectItem :disabled="selectDisabled" v-show="Boolean(containerInfo.containerNo)" |
| | | :selectData="areaData" :value.sync="form.areaNo" label="åºåºç¼å·" labelField="areaName" |
| | | valueField="areaNo" /> --> |
| | | <!-- åºä½ --> |
| | | <!-- <selectItem :disabled="selectDisabled" v-show="Boolean(containerInfo.containerNo)&&Boolean(form.areaNo)" |
| | | :selectData="placeList" :value.sync="form.placeNo" label="åºä½ç¼å·" labelField="placeNo" |
| | | valueField="placeNo" /> --> |
| | | |
| | | |
| | | <div v-if="placeInfoShow"> |
| | | <scan-input-form-item class="forma-item" label="åºä½å·²ææçä¿¡æ¯" :content="false" /> |
| | | <containerInfo :containerInfo="containerInfo" /> |
| | | </div> |
| | | |
| | | <!-- <placeInfo v-show="selectDisabled" :placeInfo="containerInfo.placeInfo" /> --> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template> |
| | | <div class="btn-frame"><u-button type="primary" text="è§£ç»" @click="onSubmit" |
| | | :disabled="!abled"></u-button></div> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import selectItem from './modules/selectItem.vue' |
| | | import placeInfo from './modules/placeInfo.vue' |
| | | import containerInfo from './modules/containerInfo.vue' |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | | $successInfo, |
| | | getDicList |
| | | } from '@/static/js/utils/index.js' |
| | | import { |
| | | palceList |
| | | } from '@/service/mixins/mixins.js' |
| | | import { |
| | | getContainerPlaceInfo, |
| | | containerHandle, |
| | | getContainerPlaceByPlace |
| | | } from '@/api/containerHandle.js' |
| | | import { |
| | | getAreaInfo |
| | | } from '@/api/common.js' |
| | | let initInterVal = null; |
| | | export default { |
| | | name: 'containerUnBind', |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | placeInfo, |
| | | selectItem, |
| | | containerInfo |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | containter: null, |
| | | form: { |
| | | containerNo: '', |
| | | areaNo: '', |
| | | placeNo: '' |
| | | }, |
| | | msg: { |
| | | containter: '' |
| | | }, |
| | | msgType: { |
| | | containter: 'info' |
| | | }, |
| | | containerInfo: {}, |
| | | areaData: [], |
| | | containerPlaceInfo: {} |
| | | |
| | | } |
| | | }, |
| | | computed: { |
| | | selectDisabled() { |
| | | return Boolean(this.containerInfo?.placeInfos?.placeNo) |
| | | }, |
| | | abled() { |
| | | return Boolean(this.containerInfo.containerNo) && Boolean(this.containerInfo?.placeInfos?.placeNo); |
| | | }, |
| | | placeInfoShow() { |
| | | return Boolean(this.containerInfo.containerNo) && Boolean(this.containerInfo?.placeInfos?.placeNo); |
| | | } |
| | | }, |
| | | watch: { |
| | | 'form.containerNo': { |
| | | handler(val, oldVal) { |
| | | this.containerInfo = {} |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | /* æçç¼ç æç´¢ */ |
| | | async onSearchContainter() { |
| | | const { |
| | | containerNo |
| | | } = this.form |
| | | if (!Boolean(containerNo)) { |
| | | this.msgType.containter = 'error' |
| | | this.msg.containter = '请è¾å
¥æçç¼å·ï¼'; |
| | | return false; |
| | | } |
| | | // è·å代ç |
| | | try { |
| | | let { |
| | | result |
| | | } = await getContainerPlaceInfo({ |
| | | containerNo |
| | | }) |
| | | this.containerInfo = result |
| | | if (Boolean(this.containerInfo?.placeInfos?.placeNo)) { |
| | | this.$nextTick(() => { |
| | | this.$set(this.form, 'areaNo', this.containerInfo?.placeInfos?.areaCode) |
| | | this.$set(this.form, 'placeNo', this.containerInfo?.placeInfos?.placeNo) |
| | | }) |
| | | |
| | | } |
| | | |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* æ¸
餿çç¼ç */ |
| | | onClearContainter() { |
| | | this.form = { |
| | | containterNo: '' |
| | | } |
| | | }, |
| | | |
| | | // æçå¤ç |
| | | async onSubmit() { |
| | | this.form.type = 2 |
| | | uni.showModal({ |
| | | title: 'è§£ç»', |
| | | content : 'æ¯å¦ç¡®è®¤è§£ç»ï¼', |
| | | showCancel: true, |
| | | confirmText: 'ç¡®å®', |
| | | cancelText: 'åæ¶', |
| | | success: async ({ |
| | | confirm, |
| | | cancel |
| | | }) => { |
| | | if (confirm) { |
| | | try { |
| | | await containerHandle(this.form) |
| | | $alert("åºä½è§£ç»æåï¼"); |
| | | this.onClearContainter() |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | }, 200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | mixins: [palceList], |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | this.ContainerType = getDicList(this.$store, 'container_type').sysDictDatas |
| | | }) |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | &>.label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .label { |
| | | margin-left: 25rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="material-list-item" > |
| | | <!-- <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> --> |
| | | <!-- <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> --> |
| | | <view class="item-row"> |
| | | <view class="label">æçç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?containerInfo.containerNo:''}}</view> |
| | | </view> |
| | | |
| | | <view class="item-row"> |
| | | <view class="label">æå±åºåºï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?containerInfo.placeInfos.areaName:''}}</view> |
| | | </view> |
| | | |
| | | <view class="item-row"> |
| | | <view class="label">åºä½ç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?containerInfo.placeInfos.placeNo:''}}</view> |
| | | </view> |
| | | |
| | | |
| | | <!-- <view class="item-row"> |
| | | <view class="label">æçåºä½ç¶æï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?(parseDic($store,'common_status',containerInfo.placeInfo.containerPlaceStatus)):''}}</view> |
| | | </view> --> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | containerInfo: { |
| | | type: Object, |
| | | default: () => {} |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | margin:-20rpx auto; |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* text-align: right; */ |
| | | /* font-weight:5; */ |
| | | width: 200rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="scan-input-form-item-compontent"> |
| | | <view class="p-form-label">åºä½è¯¦æ
ï¼</view> |
| | | <view class="material-item-group" v-if="Boolean(placeInfo)"> |
| | | <view class="material-list-item"> |
| | | <view class="item-row"> |
| | | <view class="label">åºä½ç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{placeInfo.placeNo}}</view> |
| | | </view> |
| | | |
| | | <view class="item-row"> |
| | | <view class="label">æå±åºåºï¼</view> |
| | | <view class="content auto-wrap">{{placeInfo.areaCode}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | placeInfo: { |
| | | type: Object, |
| | | default: () => {placeNo:''} |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style:{ |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }], |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .scan-input-form-item-compontent{ |
| | | width: 100%; |
| | | |
| | | .p-form-label{ |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag{ |
| | | color:$u-error; |
| | | } |
| | | }} |
| | | .material-item-group { |
| | | /* background-color: transparent!impor; */ |
| | | padding-top: 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* font-weight:5; */ |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="forma-item"> |
| | | <scan-input-form-item placeholder="è¯·éæ©" :clearable="false" :hasScan="false" :hasSearch="false" |
| | | @click.native="visible=true" class="forma-item" :label="label" v-model="value" :disabled="disabled"/> |
| | | <EasyPicker :visible.sync="visible" :list="selectData" :labelField="labelField" :valueField="valueField" |
| | | @select="getSelectData" /> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import { |
| | | parseDic |
| | | } from '@/static/js/utils/index.js' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | export default { |
| | | props: { |
| | | selectData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | value:{ |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | label:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | labelField:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | valueField:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | disabled:{ |
| | | type:Boolean, |
| | | default:false |
| | | } |
| | | |
| | | }, |
| | | components: { |
| | | EasyPicker, |
| | | ScanInputFormItem |
| | | }, |
| | | data() { |
| | | return { |
| | | radiolist1: [], |
| | | radiovalue1: '', |
| | | visible:false, |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | getSelectData(val){ |
| | | this.$emit('update:value',val) |
| | | }, |
| | | parseDic |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- <style scoped> |
| | | .custom-radio { |
| | | font-size: 16px; |
| | | line-height: 24px; |
| | | } |
| | | |
| | | .material-item-group { |
| | | padding-top: 10rpx; |
| | | display: flex; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | position: relative; |
| | | flex: 1; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .radio-row { |
| | | background-color: rgb(255, 255, 255); |
| | | margin-bottom: 10px; |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .p-form-label { |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | |
| | | .required-tag { |
| | | color: $u-error; |
| | | } |
| | | } |
| | | |
| | | .radio-group u-radio { |
| | | width: 50%; |
| | | } |
| | | </style> --> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="èä¾é¡µé¢" > |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | </view> |
| | | </view> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | let initInterVal = null; |
| | | export default { |
| | | name:'demoPage', |
| | | components:{DefaultHeaderPageLayout,ActionUserRow}, |
| | | data(){ |
| | | return { |
| | | pageBodyHeight:0 |
| | | } |
| | | }, |
| | | methods:{ |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback){ |
| | | initInterVal = setInterval(()=>{ |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | },200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval(){ |
| | | try{ |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady(){ |
| | | this.startInitInterval(()=>{ |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | }) |
| | | }, |
| | | onUnload(){ |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="空æå
¥åº"> |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <scan-input-form-item class="forma-item" label="æçç¼ç " v-model="form.containterCode" |
| | | :msg="msg.containter" :msg-type="msgType.containter" @search="onSearchContainter" |
| | | @clear="onClearContainter" /> |
| | | |
| | | <scan-input-form-item placeholder="è¯·éæ©" :clearable="false" |
| | | :hasScan="false" :hasSearch="false" @click.native="ctVisible=true" class="forma-item" label="æçç±»å" |
| | | v-model="form.containerType" /> |
| | | <EasyPicker :visible.sync="ctVisible" :list="ContainerType" labelField="value" valueField="code" |
| | | @select="getTypeVal" /> |
| | | |
| | | |
| | | <scan-input-form-item placeholder="è¯·éæ©" :clearable="false" :hasScan="false" :hasSearch="false" @click.native="visible=true" class="forma-item" label="éæ©å
¥åºå£" v-model="form.site" /> |
| | | <EasyPicker :visible.sync="visible" :list="placeList" |
| | | labelField="placeName" valueField="placeName" @select="getSiteVal" /> |
| | | |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template> |
| | | <div class="btn-frame"><u-button type="primary" text="确认" @click="addInBound" :disabled="abled"></u-button></div> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | | $successInfo, |
| | | getDicList |
| | | } from '@/static/js/utils/index.js' |
| | | import { |
| | | palceList |
| | | } from '@/service/mixins/mixins.js' |
| | | import { |
| | | getForContainerCode, |
| | | addEmptyContainerReturn, |
| | | } from '@/api/bind.js' |
| | | let initInterVal = null; |
| | | export default { |
| | | name: 'receiveInPage', |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | EasySelectFormItem, |
| | | EasyPicker |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | containter: null, |
| | | form: { |
| | | containterCode: '', |
| | | materialNo: '', |
| | | site: '', |
| | | containerTypeCode: 0, |
| | | containerType: '' |
| | | }, |
| | | msg: { |
| | | containter: '', |
| | | material: '', |
| | | site: '', |
| | | }, |
| | | msgType: { |
| | | containter: 'info', |
| | | material: 'error', |
| | | site: 'error' |
| | | }, |
| | | containerInfo: {}, |
| | | materialData: [], |
| | | ContainerType: [], |
| | | visible: false, |
| | | ctVisible: false, |
| | | placeList: [ |
| | | { |
| | | placeNo: '1-2-1-1', |
| | | placeName: 'å
¥åºå£1' |
| | | }, |
| | | { |
| | | placeNo: '2-1-1-1', |
| | | placeName: 'å
¥åºå£2' |
| | | }, |
| | | ], |
| | | abled: false, |
| | | } |
| | | }, |
| | | watch: { |
| | | 'form.containterCode': { |
| | | handler(val, oldVal) { |
| | | this.resetContainerNo() |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | // éæ©ç«ç¹è¿åå¼ |
| | | getSiteVal(val, valObj, index) { |
| | | this.form.site = val |
| | | }, |
| | | // éæ©æçç±»åè¿åå¼ |
| | | getTypeVal(val, valObj, index) { |
| | | this.form.containerTypeCode = valObj.code |
| | | this.form.containerType = valObj.value |
| | | }, |
| | | /* æçç¼ç æç´¢ */ |
| | | async onSearchContainter() { |
| | | if (!this.form.containterCode) { |
| | | this.msgType.containter = 'error' |
| | | this.msg.containter = '请è¾å
¥æçç¼å·ï¼'; |
| | | return false; |
| | | } |
| | | // è·å代ç |
| | | try { |
| | | let { |
| | | result |
| | | } = await getForContainerCode({ |
| | | code: this.form.containterCode |
| | | }) |
| | | this.containerInfo = result |
| | | // æç详æ
|
| | | let containerStatusName = parseDic(this.$store, 'container_status', result?.containerStatus) |
| | | containerStatusName = containerStatusName == 'æ æ¤åå
¸' ? '' : containerStatusName |
| | | this.msg.containter = |
| | | `ç¶æï¼${containerStatusName}, 尺寸ï¼${result?.specLength}*${result?.specWidth}*${result?.specHeight}` |
| | | result?.materialContainers.forEach(item => { |
| | | |
| | | let isExist = this.materialData.some(item1 => item1.materialId == item.materialId) |
| | | if (!isExist) { |
| | | this.materialData.push(item) |
| | | } |
| | | }) |
| | | |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* æ¸
餿çç¼ç */ |
| | | onClearContainter() { |
| | | this.form = { |
| | | containterCode: '', |
| | | site: '', |
| | | containerTypeCode: 0, |
| | | containerType: '' |
| | | } |
| | | this.$set(this.form, 'site', '') |
| | | this.resetContainerNo() |
| | | }, |
| | | resetContainerNo() { |
| | | this.msg = { |
| | | containter: '', |
| | | material: '', |
| | | site: '', |
| | | } |
| | | this.msgType = { |
| | | containter: 'info', |
| | | material: 'error', |
| | | site: 'error' |
| | | } |
| | | this.containerStatus = null |
| | | this.materialData = [] |
| | | this.form.materialNo = '' |
| | | this.form.site = '' |
| | | this.form.containerTypeCode = 0 |
| | | this.form.containerType = '' |
| | | this.containerInfo = {} |
| | | }, |
| | | |
| | | // å
¥åº |
| | | async addInBound() { |
| | | if (!this.form.containterCode) { |
| | | return $alert("è¯·æ«æçç¼ç ï¼") |
| | | } |
| | | if (!this.form.containerType) { |
| | | return $alert("è¯·éæ©æçç±»åï¼") |
| | | } |
| | | if (!this.form.site) { |
| | | return $alert("è¯·éæ©å
¥åºå£ï¼"); |
| | | } |
| | | //è¿æ»¤placeList æ ¹æ®form.site è·åvalue |
| | | const placeValue = this.placeList.find(item => item.placeName == this.form.site).placeNo; |
| | | |
| | | const data = { |
| | | sourePlace: placeValue, //å
¥åºå£ |
| | | containerNo: this.form.containterCode, |
| | | containerType: this.form.containerTypeCode |
| | | } |
| | | try { |
| | | this.abled = true //鲿¢æé®å¤æ¬¡ç¹å» |
| | | await addEmptyContainerReturn(data) |
| | | this.$modal('空æå
¥åºæå') |
| | | this.onClearContainter() |
| | | this.abled = false //鲿¢æé®å¤æ¬¡ç¹å» |
| | | } catch (e) { |
| | | console.log(e); |
| | | this.abled = false //鲿¢æé®å¤æ¬¡ç¹å» |
| | | } |
| | | }, |
| | | |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | }, 200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | mixins: [palceList], |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | // this.getPalceList({ |
| | | // areaCode: 'LTK-SDCR' |
| | | // }) |
| | | this.ContainerType = getDicList(this.$store, 'container_type').sysDictDatas |
| | | }) |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | &>.label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="空æç»å®"> |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- æç --> |
| | | <scan-input-form-item :clearable="true" :hasScan="false" :hasSearch="false" class="forma-item" label="æçç¼å·" v-model="form.containerNo"/> |
| | | <!-- åºä½ --> |
| | | <selectItem |
| | | :selectData="placeList" :value.sync="form.placeNo" label="åºä½ç¼å·" labelField="placeNo" |
| | | valueField="placeNo" @update:value="getPlaceNo"/> |
| | | |
| | | <div v-if="materialInfoShow"> |
| | | <scan-input-form-item class="forma-item" label="åºåä¿¡æ¯" :content="false" /> |
| | | <materialInfo :materialData="materialData" /> |
| | | |
| | | </div> |
| | | |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <view class="btn-frame"> |
| | | <u-button v-if="btnAbled" type="primary" text="ç» å®" @click="onConfirm"> |
| | | </u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import selectItem from '@/components/selectItem.vue' |
| | | import materialInfo from './modules/materialInfo.vue' |
| | | import {emptyContainerBindKTHCPlace} from '@/api/emptyIn.js' |
| | | import { |
| | | getMaterialDetail |
| | | } from '@/api/common.js' |
| | | import { |
| | | palceList |
| | | } from '@/service/mixins/mixins.js' |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | | $successInfo, |
| | | getDicList |
| | | } from '@/static/js/utils/index.js' |
| | | let initInterVal=null; |
| | | export default { |
| | | name: 'emptyInPage', |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | EasySelectFormItem, |
| | | EasyPicker, |
| | | selectItem, |
| | | materialInfo |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | form: { |
| | | containerNo: '', |
| | | placeNo: '' |
| | | }, |
| | | materialData: [] |
| | | } |
| | | }, |
| | | computed: { |
| | | btnAbled() { |
| | | return Boolean(this.form.placeNo)&&Boolean(this.form.containerNo); |
| | | }, |
| | | materialInfoShow(){ |
| | | return Boolean(this.form.placeNo) ; |
| | | } |
| | | }, |
| | | mixins: [palceList], |
| | | methods: { |
| | | getPlaceNo(val,obj){ |
| | | console.log(val,obj,'111'); |
| | | this.getMaterialDetail(obj.id); |
| | | }, |
| | | //è·åç©æä¿¡æ¯ |
| | | async getMaterialDetail(id){ |
| | | try{ |
| | | let {result}=await getMaterialDetail({id}) |
| | | this.materialData=result.wmsMaterialStocks; |
| | | console.log(result,'data'); |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | // æ¸
餿çä¿¡æ¯ |
| | | onClearContainter() { |
| | | this.form.containerCode = '' |
| | | }, |
| | | // æ¸
é¤åæ®å· |
| | | onClearNO() { |
| | | |
| | | }, |
| | | |
| | | // å
¥åº |
| | | async onConfirm() { |
| | | uni.showModal({ |
| | | title: 'å
¥åºç¡®è®¤', |
| | | content: 'ç¡®å®æ§è¡å
¥åºæä½åï¼', |
| | | showCancel: true, |
| | | cancelText: 'åæ¶', |
| | | confirmText: 'ç¡®å®', |
| | | success: async (type) => { |
| | | let { |
| | | confirm, |
| | | cancel |
| | | } = type |
| | | if (confirm) { |
| | | console.log(this.form); |
| | | try{ |
| | | await emptyContainerBindKTHCPlace(this.form) |
| | | $alert("空æç»å®æå"); |
| | | this.form={} |
| | | this.materialData=[] |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | |
| | | // this.onClearContainter() |
| | | // this.onClearNO() |
| | | }, |
| | | // è·åæä¸¾ä¿¡æ¯ |
| | | async getSysEnumData() { |
| | | try { |
| | | let { |
| | | data |
| | | } = await getSysEnumData({ |
| | | enumName: 'ContainerStatus' |
| | | }) |
| | | this.ContainerStatus = data |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | checkChange(item) { |
| | | item.checked = !item.checked |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | }, 200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady() { |
| | | this.startInitInterval(() => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | // this.getLinesOptions() |
| | | // this.selectOptions.models = getDicList(this.$store,'assemble_taskmodel') |
| | | this.getPalceList({ |
| | | areaCode: 'KTHC', |
| | | aisle:3 |
| | | }) |
| | | console.log(this.placeList); |
| | | }) |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .only-watch-container { |
| | | background-color: #D0DDD8; |
| | | min-height: 90rpx; |
| | | display: flex; |
| | | |
| | | &>.label { |
| | | color: $u-tips-color; |
| | | font-size: 32rpx; |
| | | flex-shrink: 0; |
| | | padding-left: 20rpx; |
| | | padding-top: 22rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | width: 1px; |
| | | flex-grow: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 30rpx; |
| | | padding: 8rpx 0; |
| | | } |
| | | } |
| | | |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | width: 1%; |
| | | box-sizing: border-box; |
| | | flex-grow: 1; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- --> |
| | | <view class="content" > |
| | | <view class="detail"> |
| | | <view class="row1"> |
| | | <view style="display: flex;align-items: center"> |
| | | <text class="index">{{index+1}}</text> |
| | | <!-- materialcode --> |
| | | <text class="id-name">{{content.materialcode}}({{content.materialname}})</text> |
| | | </view> |
| | | <!-- <view class="tag"> |
| | | <u-tag plain size="mini" text="å
æ£" type="success"></u-tag> |
| | | </view> --> |
| | | </view> |
| | | <view class="row2"> |
| | | <u-row> |
| | | <u-col span="3">åæ ¹é¿åº¦:</u-col> |
| | | <u-col span="9">{{content.singleLength}}</u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row3"> |
| | | <view class="row-content"> |
| | | <view class="col-content"> |
| | | <view> |
| | | <view>åä½</view> |
| | | <view>{{content.unit}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="col-content"> |
| | | <view> |
| | | <view>å©ä½æ°é</view> |
| | | <view style="text-align: center;color:#F18202">{{content.qtyCount}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="col-content" style="align-items: center;"> |
| | | <view> |
| | | <view style="text-align: center;">ç»çæ°é</view> |
| | | <view :style="{ width: inputWid(content.qty) ,textAlign:'center',margin:'0 auto'}"> |
| | | <input :maxlength="10" @click.native.stop="stop" type="number" v-model="content.qty" |
| | | @blur="inputBlur" style="color:#F18202;border-bottom: 1rpx solid #F18202;" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- <view v-for="item in propArr" :key="item.code" class="item"> |
| | | <view class="item_title">{{item.title}}</view> |
| | | <view v-if="item.code=='qty'" class="item_content"> |
| | | <view style="width:100rpx"> |
| | | <input @click.native.stop="stop" type="number" v-model="content[item.code]" @blur="inputBlur" style="border-bottom: 1rpx solid #ccc;"/> |
| | | </view> |
| | | </view> |
| | | <view v-else class="item_content">{{content[item.code]}}</view> |
| | | </view> --> |
| | | </view> |
| | | <!-- <easy-picker :visible.sync="workingProcedureVisible" :list="workingProcedureList" value-field="value" label-field="label" @select="onChangeInputUser"></easy-picker> --> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import EasyPicker from '@/components/EasyPicker.vue' |
| | | export default { |
| | | // components:{EasyPicker}, |
| | | props: { |
| | | content: { |
| | | type: Array, |
| | | default:()=>[] |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .content { |
| | | background-color: #fff; |
| | | width: 96%; |
| | | margin: 18rpx auto; |
| | | border: 1rpx solid #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 5rpx 5rpx 8rpx; |
| | | font-size: 30ont30ize-common; |
| | | |
| | | .detail { |
| | | box-sizing: border-box; |
| | | flex: 1; |
| | | |
| | | .row1 { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin: 5rpx 0; |
| | | |
| | | .index { |
| | | display: inline-block; |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | border-radius: 20rpx; |
| | | background-color: $color-common; |
| | | text-align: center; |
| | | color: #fff; |
| | | margin-right: 10rpx; |
| | | line-height: 40rpx; |
| | | } |
| | | |
| | | .id-name { |
| | | font-weight: 700; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | |
| | | .row2, |
| | | .row3 { |
| | | color: #bbb; |
| | | font-size: 30rpx; |
| | | |
| | | .row-content { |
| | | display: flex; |
| | | align-items: flex-start; |
| | | |
| | | .col-content { |
| | | width: 25%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: flex-start; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .row2{ |
| | | margin:8rpx 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .content_active { |
| | | border: 1rpx solid #F18202 !important; |
| | | } |
| | | |
| | | ::v-deep uni-input { |
| | | font-size: $fontsize-common; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | < |
| | | |
| | | <template> |
| | | <view class="material-list-item" > |
| | | <!-- <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> --> |
| | | <!-- <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> --> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æä»¶å·ï¼</view> |
| | | <view class="content auto-wrap">KONGTUO</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æç±»åï¼</view> |
| | | <view class="content auto-wrap">{{parseDic($store,'material_type',2)}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©ææ°éï¼</view> |
| | | <view class="content auto-wrap">{{materialData.length}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | materialData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped > |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | margin:-20rpx auto; |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* text-align: right; */ |
| | | /* font-weight:5; */ |
| | | width: 200rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="空æç»å®"> |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- æç --> |
| | | <scan-input-form-item :clearable="true" :hasScan="false" :hasSearch="false" class="forma-item" label="æçç¼å·" v-model="form.containerNo"/> |
| | | <!-- åºä½ --> |
| | | <selectItem |
| | | :selectData="placeList" :value.sync="form.placeNo" label="åºä½ç¼å·" labelField="placeNo" |
| | | valueField="placeNo" @update:value="getPlaceNo"/> |
| | | |
| | | <div v-if="materialInfoShow"> |
| | | <scan-input-form-item class="forma-item" label="åºåä¿¡æ¯" :content="false" /> |
| | | <materialInfo :materialData="materialData" /> |
| | | |
| | | </div> |
| | | |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <view class="btn-frame"> |
| | | <u-button v-if="btnAbled" type="primary" text="ç» å®" @click="onConfirm"> |
| | | </u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import selectItem from '@/components/selectItem.vue' |
| | | import materialInfo from './modules/materialInfo.vue' |
| | | import {emptyContainerBindKTHCPlace} from '@/api/emptyIn.js' |
| | | import { |
| | | getMaterialDetail |
| | | } from '@/api/common.js' |
| | | import { |
| | | palceList |
| | | } from '@/service/mixins/mixins.js' |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | | $successInfo, |
| | | getDicList |
| | | } from '@/static/js/utils/index.js' |
| | | let initInterVal=null; |
| | | export default { |
| | | name: 'emptyInPage', |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | EasySelectFormItem, |
| | | EasyPicker, |
| | | selectItem, |
| | | materialInfo |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | form: { |
| | | containerNo: '', |
| | | placeNo: '' |
| | | }, |
| | | materialData: [] |
| | | } |
| | | }, |
| | | computed: { |
| | | btnAbled() { |
| | | return Boolean(this.form.placeNo)&&Boolean(this.form.containerNo); |
| | | }, |
| | | materialInfoShow(){ |
| | | return Boolean(this.form.placeNo) ; |
| | | } |
| | | }, |
| | | mixins: [palceList], |
| | | methods: { |
| | | getPlaceNo(val,obj){ |
| | | console.log(val,obj,'111'); |
| | | this.getMaterialDetail(obj.id); |
| | | }, |
| | | //è·åç©æä¿¡æ¯ |
| | | async getMaterialDetail(id){ |
| | | try{ |
| | | let {result}=await getMaterialDetail({id}) |
| | | this.materialData=result.wmsMaterialStocks; |
| | | console.log(result,'data'); |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | // æ¸
餿çä¿¡æ¯ |
| | | onClearContainter() { |
| | | this.form.containerCode = '' |
| | | }, |
| | | // æ¸
é¤åæ®å· |
| | | onClearNO() { |
| | | |
| | | }, |
| | | |
| | | // å
¥åº |
| | | async onConfirm() { |
| | | uni.showModal({ |
| | | title: 'å
¥åºç¡®è®¤', |
| | | content: 'ç¡®å®æ§è¡å
¥åºæä½åï¼', |
| | | showCancel: true, |
| | | cancelText: 'åæ¶', |
| | | confirmText: 'ç¡®å®', |
| | | success: async (type) => { |
| | | let { |
| | | confirm, |
| | | cancel |
| | | } = type |
| | | if (confirm) { |
| | | console.log(this.form); |
| | | try{ |
| | | await emptyContainerBindKTHCPlace(this.form) |
| | | $alert("空æç»å®æå"); |
| | | this.form={} |
| | | this.materialData=[] |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | |
| | | // this.onClearContainter() |
| | | // this.onClearNO() |
| | | }, |
| | | // è·åæä¸¾ä¿¡æ¯ |
| | | async getSysEnumData() { |
| | | try { |
| | | let { |
| | | data |
| | | } = await getSysEnumData({ |
| | | enumName: 'ContainerStatus' |
| | | }) |
| | | this.ContainerStatus = data |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | checkChange(item) { |
| | | item.checked = !item.checked |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | }, 200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady() { |
| | | this.startInitInterval(() => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | // this.getLinesOptions() |
| | | // this.selectOptions.models = getDicList(this.$store,'assemble_taskmodel') |
| | | this.getPalceList({ |
| | | areaCode: 'KTHC', |
| | | aisle:3 |
| | | }) |
| | | console.log(this.placeList); |
| | | }) |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .only-watch-container { |
| | | background-color: #D0DDD8; |
| | | min-height: 90rpx; |
| | | display: flex; |
| | | |
| | | &>.label { |
| | | color: $u-tips-color; |
| | | font-size: 32rpx; |
| | | flex-shrink: 0; |
| | | padding-left: 20rpx; |
| | | padding-top: 22rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | width: 1px; |
| | | flex-grow: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 30rpx; |
| | | padding: 8rpx 0; |
| | | } |
| | | } |
| | | |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | width: 1%; |
| | | box-sizing: border-box; |
| | | flex-grow: 1; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- --> |
| | | <view class="content" > |
| | | <view class="detail"> |
| | | <view class="row1"> |
| | | <view style="display: flex;align-items: center"> |
| | | <text class="index">{{index+1}}</text> |
| | | <!-- materialcode --> |
| | | <text class="id-name">{{content.materialcode}}({{content.materialname}})</text> |
| | | </view> |
| | | <!-- <view class="tag"> |
| | | <u-tag plain size="mini" text="å
æ£" type="success"></u-tag> |
| | | </view> --> |
| | | </view> |
| | | <view class="row2"> |
| | | <u-row> |
| | | <u-col span="3">åæ ¹é¿åº¦:</u-col> |
| | | <u-col span="9">{{content.singleLength}}</u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row3"> |
| | | <view class="row-content"> |
| | | <view class="col-content"> |
| | | <view> |
| | | <view>åä½</view> |
| | | <view>{{content.unit}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="col-content"> |
| | | <view> |
| | | <view>å©ä½æ°é</view> |
| | | <view style="text-align: center;color:#F18202">{{content.qtyCount}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="col-content" style="align-items: center;"> |
| | | <view> |
| | | <view style="text-align: center;">ç»çæ°é</view> |
| | | <view :style="{ width: inputWid(content.qty) ,textAlign:'center',margin:'0 auto'}"> |
| | | <input :maxlength="10" @click.native.stop="stop" type="number" v-model="content.qty" |
| | | @blur="inputBlur" style="color:#F18202;border-bottom: 1rpx solid #F18202;" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- <view v-for="item in propArr" :key="item.code" class="item"> |
| | | <view class="item_title">{{item.title}}</view> |
| | | <view v-if="item.code=='qty'" class="item_content"> |
| | | <view style="width:100rpx"> |
| | | <input @click.native.stop="stop" type="number" v-model="content[item.code]" @blur="inputBlur" style="border-bottom: 1rpx solid #ccc;"/> |
| | | </view> |
| | | </view> |
| | | <view v-else class="item_content">{{content[item.code]}}</view> |
| | | </view> --> |
| | | </view> |
| | | <!-- <easy-picker :visible.sync="workingProcedureVisible" :list="workingProcedureList" value-field="value" label-field="label" @select="onChangeInputUser"></easy-picker> --> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import EasyPicker from '@/components/EasyPicker.vue' |
| | | export default { |
| | | // components:{EasyPicker}, |
| | | props: { |
| | | content: { |
| | | type: Array, |
| | | default:()=>[] |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .content { |
| | | background-color: #fff; |
| | | width: 96%; |
| | | margin: 18rpx auto; |
| | | border: 1rpx solid #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 5rpx 5rpx 8rpx; |
| | | font-size: 30ont30ize-common; |
| | | |
| | | .detail { |
| | | box-sizing: border-box; |
| | | flex: 1; |
| | | |
| | | .row1 { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin: 5rpx 0; |
| | | |
| | | .index { |
| | | display: inline-block; |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | border-radius: 20rpx; |
| | | background-color: $color-common; |
| | | text-align: center; |
| | | color: #fff; |
| | | margin-right: 10rpx; |
| | | line-height: 40rpx; |
| | | } |
| | | |
| | | .id-name { |
| | | font-weight: 700; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | |
| | | .row2, |
| | | .row3 { |
| | | color: #bbb; |
| | | font-size: 30rpx; |
| | | |
| | | .row-content { |
| | | display: flex; |
| | | align-items: flex-start; |
| | | |
| | | .col-content { |
| | | width: 25%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: flex-start; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .row2{ |
| | | margin:8rpx 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .content_active { |
| | | border: 1rpx solid #F18202 !important; |
| | | } |
| | | |
| | | ::v-deep uni-input { |
| | | font-size: $fontsize-common; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | < |
| | | |
| | | <template> |
| | | <view class="material-list-item" > |
| | | <!-- <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> --> |
| | | <!-- <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> --> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æä»¶å·ï¼</view> |
| | | <view class="content auto-wrap">KONGTUO</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æç±»åï¼</view> |
| | | <view class="content auto-wrap">{{parseDic($store,'material_type',2)}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©ææ°éï¼</view> |
| | | <view class="content auto-wrap">{{materialData.length}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | materialData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped > |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | margin:-20rpx auto; |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* text-align: right; */ |
| | | /* font-weight:5; */ |
| | | width: 200rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="èªå¶ä»¶ç©ºæå¼å«"> |
| | | <view |
| | | class="page-frame with-action-user-row" |
| | | :style="{ height: pageBodyHeight + 'px' }" |
| | | v-if="pageBodyHeight" |
| | | > |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- åºåº --> |
| | | <selectItem |
| | | :selectData="areaData" |
| | | :value.sync="form.areaNo" |
| | | label="åºåºç¼ç " |
| | | labelField="areaName" |
| | | valueField="areaNo" |
| | | /> |
| | | |
| | | <selectItemWc2 |
| | | :selectData="placeList" |
| | | :value.sync="form.placeNo" |
| | | label="åºä½ç¼ç " |
| | | labelField="placeNo" |
| | | valueField="placeNo" |
| | | @getPropData="getCurrentData" |
| | | /> |
| | | |
| | | <scan-input-form-item |
| | | placeholder="è¯·éæ©" |
| | | :clearable="false" |
| | | :hasScan="false" |
| | | :hasSearch="false" |
| | | @click.native="ctVisible = true" |
| | | class="forma-item" |
| | | label="æçç±»å" |
| | | v-model="form.containerTypeCode" |
| | | /> |
| | | |
| | | <EasyPicker |
| | | :visible.sync="ctVisible" |
| | | :list="ContainerType" |
| | | labelField="value" |
| | | valueField="code" |
| | | @select="getTypeVal" |
| | | /> |
| | | |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <view class="btn-frame" |
| | | ><u-button |
| | | :disabled="!Boolean(form.placeNo)" |
| | | type="primary" |
| | | text="å¼å«æç" |
| | | @click="onConfirm" |
| | | ></u-button |
| | | ></view> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from "@/components/DefaultHeaderPageLayout.vue"; |
| | | import ActionUserRow from "@/components/ActionUserRow.vue"; |
| | | import ScanInputFormItem from "@/components/ScanInputFormItem.vue"; |
| | | import EasySelectFormItem from "@/components/EasySelectFormItem.vue"; |
| | | import EasyPicker from "@/components/EasyPicker.vue"; |
| | | import selectItem from "@/components/selectItem.vue"; |
| | | import selectItemWc2 from "@/components/selectItemWithSearchWc2.vue"; |
| | | import { |
| | | $alert, |
| | | getDicList, |
| | | } from "@/static/js/utils/index.js"; |
| | | import { palceList } from "@/service/mixins/mixins.js"; |
| | | import { getAreaInfo } from "@/api/common.js"; |
| | | import { callEmptyContainer } from "@/api/callEmptyContainer.js"; |
| | | let initInterVal = null; |
| | | export default { |
| | | name: "emptyOutPage", |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | EasySelectFormItem, |
| | | ScanInputFormItem, |
| | | selectItem, |
| | | EasyPicker, |
| | | selectItemWc2 |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | form: { |
| | | placeNo: "", |
| | | areaNo: "", |
| | | areaName: "", |
| | | containerTypeCode:"", |
| | | containerType: "" |
| | | }, |
| | | areaData: [], |
| | | ctVisible: false, |
| | | ContainerType: [], |
| | | }; |
| | | }, |
| | | watch: { |
| | | "form.areaNo": { |
| | | handler(val, oldVal) { |
| | | if (val != "") { |
| | | this.form.placeNo = ""; |
| | | this.form.containerNo = ""; |
| | | this.placeList = []; |
| | | this.getPalceList({ |
| | | areaCode: val, |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | methods: { |
| | | //åºä½æ¨¡ç³æ¥è¯¢ |
| | | async getCurrentData(PlaceNo) { |
| | | await this.getPalceList({ |
| | | areaCode: this.form.areaNo, |
| | | PlaceNo: PlaceNo |
| | | }); |
| | | }, |
| | | // éæ©æçç±»åè¿åå¼ |
| | | getTypeVal(val, valObj, index) { |
| | | this.form.containerTypeCode = valObj.value; |
| | | this.form.containerType = valObj.code; |
| | | }, |
| | | // éæ©åºä½è¿åå¼ |
| | | async selectPlace(val, item) { |
| | | this.form.areaNo = item.areaCode; |
| | | this.form.placeNo = val; |
| | | let res = this.areaList.filter((obj) => obj.areaNo == item.areaCode); |
| | | this.form.areaName = res.length > 0 ? res[0].areaName : ""; |
| | | }, |
| | | |
| | | // è·ååºåºæ°æ® |
| | | async getAreaList() { |
| | | try { |
| | | let { result } = await getAreaInfo(); |
| | | this.areaData = result; |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | async onConfirm() { |
| | | //夿åºåºæ¯å¦ä¸ºç©º |
| | | if(!this.form.areaNo){ |
| | | $alert("è¯·éæ©åºåº"); |
| | | return; |
| | | } |
| | | //夿åºä½æ¯å¦ä¸ºç©º |
| | | if(!this.form.placeNo){ |
| | | $alert("è¯·éæ©åºä½"); |
| | | return; |
| | | } |
| | | |
| | | //夿æçç±»åæ¯å¦ä¸ºç©º |
| | | if(!this.form.containerType){ |
| | | $alert("è¯·éæ©æçç±»å"); |
| | | return; |
| | | } |
| | | try { |
| | | await callEmptyContainer(this.form); |
| | | this.$modal('å¼å«ç©ºææå') |
| | | this.form = { |
| | | placeNo: "", |
| | | areaNo: "", |
| | | areaName: "", |
| | | containerTypeCode:"", |
| | | containerType: "" |
| | | }; |
| | | } catch (e) { |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval(); |
| | | callback && callback(); |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight(); |
| | | } |
| | | }, 200); |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal); |
| | | initInterVal = null; |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | }, |
| | | }, |
| | | mixins: [palceList], |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | // this.getPalceList({ |
| | | // areaCode: 'GGXX' |
| | | // }) |
| | | this.ContainerType = getDicList( |
| | | this.$store, |
| | | "container_type" |
| | | ).sysDictDatas; |
| | | this.getAreaList(); |
| | | }); |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval(); |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | width: 1%; |
| | | box-sizing: border-box; |
| | | flex-grow: 1; |
| | | } |
| | | |
| | | .divider { |
| | | width: 20rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .only-watch-container { |
| | | background-color: #d0ddd8; |
| | | min-height: 90rpx; |
| | | display: flex; |
| | | |
| | | & > .label { |
| | | color: $u-tips-color; |
| | | font-size: 32rpx; |
| | | flex-shrink: 0; |
| | | padding-left: 20rpx; |
| | | padding-top: 22rpx; |
| | | } |
| | | |
| | | & > .content { |
| | | width: 1px; |
| | | flex-grow: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 30rpx; |
| | | padding: 8rpx 0; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="forma-item"> |
| | | <scan-input-form-item placeholder="è¯·éæ©" :clearable="false" :hasScan="false" :hasSearch="false" |
| | | @click.native="visible=true" class="forma-item" :label="label" v-model="value" :disabled="disabled"/> |
| | | <EasyPicker :visible.sync="visible" :list="selectData" :labelField="labelField" :valueField="valueField" |
| | | @select="getSelectData" :isShowSearch="isShowSearch" @getCurrentData="getCurrentData"/> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import { |
| | | parseDic |
| | | } from '@/static/js/utils/index.js' |
| | | import EasyPicker from '@/components/EasyPickerWithSearch.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | export default { |
| | | emits:['getCurrentData'], |
| | | props: { |
| | | selectData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | value:{ |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | label:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | labelField:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | valueField:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | disabled:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | isShowSearch:{ |
| | | type:Boolean, |
| | | default:false |
| | | } |
| | | }, |
| | | components: { |
| | | EasyPicker, |
| | | ScanInputFormItem |
| | | }, |
| | | data() { |
| | | return { |
| | | radiolist1: [], |
| | | radiovalue1: '', |
| | | visible:false, |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | getSelectData(val){ |
| | | this.$emit('update:value',val) |
| | | }, |
| | | getCurrentData(val){ |
| | | //è°ç¨åºä½æ¥å£ï¼è·ååºä½å表 |
| | | this.$emit('getCurrentData',val) |
| | | }, |
| | | parseDic |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- <style scoped> |
| | | .custom-radio { |
| | | font-size: 16px; |
| | | line-height: 24px; |
| | | } |
| | | |
| | | .material-item-group { |
| | | padding-top: 10rpx; |
| | | display: flex; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | position: relative; |
| | | flex: 1; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .radio-row { |
| | | background-color: rgb(255, 255, 255); |
| | | margin-bottom: 10px; |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .p-form-label { |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | |
| | | .required-tag { |
| | | color: $u-error; |
| | | } |
| | | } |
| | | |
| | | .radio-group u-radio { |
| | | width: 50%; |
| | | } |
| | | </style> --> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="æåå
¥åº" > |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <page-main v-show="pageStyle==='main'" ref="main" @pageChange="onMainPageChange" /> |
| | | <page-edit v-show="pageStyle==='edit'" ref="edit" /> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template v-if="pageStyle==='main'"> |
| | | <view class="btn-frame"><u-button text="ç» ç" @click="onBind"></u-button></view> |
| | | <view class="divider"></view> |
| | | <view class="btn-frame"><u-button type="primary" text="å
¥ åº" @click="onSubmitConfirm"></u-button></view> |
| | | </template> |
| | | <template v-if="pageStyle==='edit'"> |
| | | <view class="btn-frame"><u-button text="è¿ å" @click="onEditBack"></u-button></view> |
| | | <view class="divider"></view> |
| | | <view class="btn-frame"><u-button type="primary" :text="editIndex===-1?'æ·» å ':'ä¿® æ¹'" @click="onEditConfirm"></u-button></view> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import PageMain from './modules/main.vue' |
| | | import PageEdit from './modules/edit.vue' |
| | | import { $successInfo } from '@/static/js/utils/index.js' |
| | | let initInterVal = null; |
| | | export default { |
| | | name:'endProductInstorePage', |
| | | components:{DefaultHeaderPageLayout,ActionUserRow,PageMain,PageEdit}, |
| | | data(){ |
| | | return { |
| | | pageBodyHeight:0, |
| | | pageStyle:'main', |
| | | editIndex:-1 |
| | | } |
| | | }, |
| | | methods:{ |
| | | onEditBack(){ |
| | | this.pageStyle = 'main' |
| | | }, |
| | | onEditConfirm(){ |
| | | let check = this.$refs.edit.checkConfirm() |
| | | if (check.flag) { |
| | | if (this.editIndex===-1) { |
| | | this.$refs.main.add(check.data) |
| | | } else { |
| | | this.$refs.main.modify(check.data,this.editIndex) |
| | | } |
| | | } |
| | | this.pageStyle = 'main' |
| | | }, |
| | | onMainPageChange(obj,index){ |
| | | if (obj) { |
| | | this.editIndex = index |
| | | } else { |
| | | this.editIndex = -1 |
| | | } |
| | | this.$refs.edit.init(obj) |
| | | this.pageStyle = 'edit' |
| | | }, |
| | | onMainReset(){ |
| | | this.$refs.main.clearMain() |
| | | }, |
| | | onBind(){ |
| | | let check = this.$refs.main.checkConfirm() |
| | | if (check.flag) { |
| | | this.dealBind(check.data,(f)=>{ |
| | | if (f) { |
| | | $successInfo('ç»çæå') |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onSubmitConfirm(){ |
| | | let check = this.$refs.main.checkConfirm() |
| | | if (check.flag) { |
| | | this.dealSubmitConfirm(check.data,(f)=>{ |
| | | if (f) { |
| | | $successInfo('æäº¤æå') |
| | | this.$refs.main.clearMain() |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | /* ç»çæ¥å£è°ç¨ */ |
| | | dealBind(obj,callback){ |
| | | let params = this.dealSubmitParams(obj,'bind') |
| | | this.$api.post('FinishProductBindEntrance',params,{block:'endProduct'}).then(()=>{ |
| | | callback && callback(true) |
| | | }).catch((e)=>{ |
| | | callback && callback(false,e) |
| | | }) |
| | | }, |
| | | /*å
¥åºæ¥å£è°ç¨ */ |
| | | dealSubmitConfirm(obj,callback){ |
| | | let params = this.dealSubmitParams(obj) |
| | | this.$api.post('FinishProductManualWare',params,{block:'endProduct'}).then(()=>{ |
| | | callback && callback(true) |
| | | }).catch((e)=>{ |
| | | callback && callback(false,e) |
| | | }) |
| | | }, |
| | | dealSubmitParams(obj,type='confirm'){ |
| | | let res = { |
| | | containercode:obj.containter.containerCode, |
| | | wmsMaterials:obj.list |
| | | } |
| | | if (type==='confirm') { |
| | | res.areaid = obj.areaid |
| | | } |
| | | return res |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback){ |
| | | initInterVal = setInterval(()=>{ |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | },200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval(){ |
| | | try{ |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady(){ |
| | | this.startInitInterval(()=>{ |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | }) |
| | | }, |
| | | onUnload(){ |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row{ |
| | | display: flex; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | .btn-frame{ |
| | | width: 1%; |
| | | box-sizing: border-box; |
| | | flex-grow: 1; |
| | | } |
| | | .divider{ |
| | | width: 20rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="plywood-instore-edit-page-content"> |
| | | <view class="form-view"> |
| | | <!-- ******************** --> |
| | | <long-width-height-form-item |
| | | class="forma-item" |
| | | label="尺寸" |
| | | :long.sync="form.materiallength" |
| | | :width.sync="form.materialwidth" |
| | | :height.sync="form.materialhigh" |
| | | :msg="msg.materialspec" |
| | | :required="true" |
| | | /> |
| | | <scan-input-form-item |
| | | type="digit" |
| | | label="æ°é" |
| | | v-model="form.bindquantity" |
| | | :msg="msg.bindquantity" |
| | | :has-scan="false" |
| | | :has-search="false" |
| | | :required="true" |
| | | /> |
| | | <!-- ******************** --> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import LongWidthHeightFormItem from '@/pages/components/LongWidthHeightFormItem.vue' |
| | | const defaultForm = { |
| | | bindquantity:null, |
| | | materiallength:null, |
| | | materialwidth:null, |
| | | materialhigh:null |
| | | } |
| | | export default { |
| | | name:'plywoodInstoreEditPageContent', |
| | | components:{ScanInputFormItem,LongWidthHeightFormItem}, |
| | | data(){ |
| | | return { |
| | | form:{...defaultForm}, |
| | | msg:{ |
| | | materialspec:'', |
| | | bindquantity:'' |
| | | } |
| | | } |
| | | }, |
| | | watch:{ |
| | | 'form.materiallength'(newVal,oldVal) { |
| | | if (newVal!==oldVal) { |
| | | this.watchSpec() |
| | | } |
| | | }, |
| | | 'form.materialwidth'(newVal,oldVal) { |
| | | if (newVal!==oldVal) { |
| | | this.watchSpec() |
| | | } |
| | | }, |
| | | 'form.materialhigh'(newVal,oldVal) { |
| | | if (newVal!==oldVal) { |
| | | this.watchSpec() |
| | | } |
| | | }, |
| | | 'form.bindquantity'(newVal,oldVal) { |
| | | if (newVal!==oldVal) { |
| | | this.watchBindquantity() |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | init(obj){ |
| | | if (obj) { |
| | | this.form = {...obj} |
| | | } else { |
| | | this.form = {...defaultForm} |
| | | } |
| | | }, |
| | | getFormValues(){ |
| | | return {...this.form} |
| | | }, |
| | | checkConfirm(){ |
| | | let res = {flag:true,data:{}} |
| | | res.data = this.getFormValues() |
| | | if (res.flag && (!res.data.materiallength || !res.data.materialwidth || !res.data.materialhigh)) { |
| | | this.msg.materialspec = '请å
å½å
¥å°ºå¯¸ï¼' |
| | | res.flag = false |
| | | } else { |
| | | this.msg.materialspec = '' |
| | | } |
| | | if (res.flag && !res.data.bindquantity) { |
| | | this.msg.bindquantity = '请å
å½å
¥æ°éï¼' |
| | | res.flag = false |
| | | } else { |
| | | this.msg.bindquantity = '' |
| | | } |
| | | return res; |
| | | }, |
| | | watchSpec(){ |
| | | if (this.form.materiallength && this.form.materialwidth && this.form.materialhigh) { |
| | | this.msg.materialspec = '' |
| | | } |
| | | }, |
| | | watchBindquantity(){ |
| | | if(this.form.bindquantity) { |
| | | this.msg.bindquantity = '' |
| | | } else { |
| | | this.msg.bindquantity = '请å
å½å
¥æ°éï¼' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .plywood-instore-edit-page-content{ |
| | | height: 100%; |
| | | box-sizing: border-box; |
| | | padding-bottom: 12rpx; |
| | | .form-view{ |
| | | height: 100%; |
| | | overflow: auto; |
| | | } |
| | | .forma-item{ |
| | | margin-bottom: 24rpx; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="end-product-instore-main-page-content"> |
| | | <view class="top-view"> |
| | | <scan-input-form-item |
| | | class="forma-item" |
| | | label="æçç " |
| | | v-model="form.container" |
| | | :msg="msg.container" |
| | | :msg-type="msgType.container" |
| | | @search="onSearchContainer" |
| | | @clear="onClearContainer" |
| | | /> |
| | | <view class="btns-row"> |
| | | <view class="btn primary-btn" @tap.stop="onAdd">æ·»å ç©æ</view> |
| | | <!-- <view class="divider"></view> |
| | | <view class="btn default-btn">æ¥çè®°å½</view> --> |
| | | </view> |
| | | </view> |
| | | <view class="list-view"> |
| | | <!-- ########### --> |
| | | <view class="list-items-group"> |
| | | |
| | | <view class="list-item" v-for="(item,index) in list" :key="'list-item-'+index"> |
| | | <uni-swipe-action-item :auto-close="false"> |
| | | <view class="list-item-show"> |
| | | <view class="item-left"> |
| | | <uni-badge :text="list.length-index" type="primary" size="normal" /> |
| | | </view> |
| | | <view class="item-main"> |
| | | <view class="item-row"> |
| | | <view class="label">尺寸</view> |
| | | <view class="content">{{item.materiallength}}*{{item.materialwidth}}*{{item.materialhigh}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æ°é</view> |
| | | <view class="content">{{item.bindquantity}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <template v-slot:right> |
| | | <view class="swipe-action-btns"> |
| | | <view class="swipe-action-btn" @tap.stop="onEdit(item,index)"><text>ç¼è¾</text></view> |
| | | <view class="swipe-action-btn danger" @tap.stop="onDel(index)"><text>å é¤</text></view> |
| | | </view> |
| | | </template> |
| | | </uni-swipe-action-item> |
| | | </view> |
| | | |
| | | </view> |
| | | <!-- ########### --> |
| | | </view> |
| | | <view class="end-view"> |
| | | <easy-select-form-item |
| | | label="å
¥åºåºåº" |
| | | v-model="form.areaid" |
| | | :list="selectOptions.areas" |
| | | value-field="areaId" |
| | | label-field="areaName" |
| | | :clearable="false" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import { $alert, parseDic } from '@/static/js/utils/index.js' |
| | | const defaultForm = { |
| | | container:'', |
| | | areaid:'' |
| | | } |
| | | export default { |
| | | name:'endProductInstoreMainPageContent', |
| | | emits:['pageChange'], |
| | | components:{ScanInputFormItem, EasySelectFormItem}, |
| | | data() { |
| | | return { |
| | | form: {...defaultForm}, |
| | | msg:{ |
| | | container:'' |
| | | }, |
| | | msgType:{ |
| | | container:'error' |
| | | }, |
| | | list:[], |
| | | containter:null, |
| | | selectOptions:{ |
| | | areas:[] |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | onSearchContainer(){ |
| | | if (!this.form.container) { |
| | | this.msgType.container = 'error' |
| | | this.msg.container = '请è¾å
¥æçç ï¼'; |
| | | return false; |
| | | } |
| | | this.msg.container = ''; |
| | | this.getContainterInfo() |
| | | }, |
| | | onClearContainer(){ |
| | | this.clearFullContainer() |
| | | }, |
| | | clearMain(){ |
| | | this.clearFullContainer() |
| | | this.clearArea() |
| | | }, |
| | | clearFullContainer(){ |
| | | this.clearContainter() |
| | | this.clearBackContainer() |
| | | }, |
| | | clearContainter(){ |
| | | this.form.container = '' |
| | | this.msg.container = '' |
| | | }, |
| | | clearBackContainer(){ |
| | | this.containter = null |
| | | this.list = [] |
| | | }, |
| | | clearArea(){ |
| | | if (this.selectOptions.areas.length!==1) { |
| | | this.form.areaid = '' |
| | | } |
| | | }, |
| | | getContainterInfo(callback){ |
| | | const __setErrMessage = function(__msg) { |
| | | if (!__msg) { |
| | | __msg = 'ç½ç»é误ï¼è¯·ç¨ååå°è¯ï¼' |
| | | } |
| | | this.msgType.container = 'error' |
| | | this.msg.container = __msg; |
| | | }.bind(this) |
| | | let params = {ContainerCode:this.form.container} |
| | | this.$api.get('FinishProductGetContainer',params,{block:'endProduct',warn:false,fullRes:true}).then((d)=>{ |
| | | if (d.data) { |
| | | if (d.data.wmsContainer) { |
| | | this.containter = d.data.wmsContainer |
| | | this.list = d.data.wmsMaterials || [] |
| | | let _temp1 = parseDic(this.$store,'container_status',this.containter.containerStatus) |
| | | this.msgType.container = 'info' |
| | | this.msg.container = `尺寸ï¼${this.containter.specLength}*${this.containter.specWidth}ï¼ç¶æï¼${_temp1}` |
| | | callback && callback(true) |
| | | } else { |
| | | this.clearBackContainer() |
| | | __setErrMessage(d.message) |
| | | callback && callback(false) |
| | | } |
| | | } else { |
| | | this.clearBackContainer() |
| | | __setErrMessage(d.message) |
| | | callback && callback(false) |
| | | } |
| | | }).catch((_errmsg)=>{ |
| | | this.clearBackContainer() |
| | | __setErrMessage() |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | onDel(index){ |
| | | this.list.splice(index,1) |
| | | }, |
| | | onAdd(){ |
| | | if (!this.form.container) { |
| | | $alert('请å
å½å
¥æçä¿¡æ¯ï¼') |
| | | return false; |
| | | } |
| | | this.$emit('pageChange',null) |
| | | }, |
| | | onEdit(obj,index){ |
| | | this.$emit('pageChange',obj,index) |
| | | }, |
| | | add(obj){ |
| | | this.list.unshift(obj) |
| | | }, |
| | | modify(obj,index) { |
| | | this.$set(this.list,index,obj) |
| | | }, |
| | | getSubmitParams(){ |
| | | return { |
| | | list:this.list, |
| | | containter:this.containter, |
| | | areaid:this.form.areaid |
| | | } |
| | | }, |
| | | checkConfirm(){ |
| | | let res = {flag:true,data:{}} |
| | | res.data = this.getSubmitParams() |
| | | if (!res.data.containter) { |
| | | this.msg.container = '请å
å½å
¥æçä¿¡æ¯ï¼' |
| | | this.msgType.container = 'error' |
| | | res.flag = false |
| | | } else { |
| | | this.msg.container = '' |
| | | } |
| | | if (res.flag && res.data.list.length<=0) { |
| | | $alert('请å½å
¥æåæ°æ®ï¼') |
| | | res.flag = false |
| | | } |
| | | return res; |
| | | }, |
| | | getAreaOptions(){ |
| | | this.$api.get('FinishProductGetAreaList',{},{block:'endProduct'}).then(d=>{ |
| | | this.selectOptions.areas = d || [] |
| | | if (this.selectOptions.areas.length===1) { |
| | | this.form.areaid = this.selectOptions.areas[0].areaId |
| | | } |
| | | }).catch(ex=>{ |
| | | console.log(ex) |
| | | }) |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getAreaOptions() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .end-product-instore-main-page-content{ |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | &>.top-view,&>.end-view{ |
| | | flex-shrink: 0; |
| | | } |
| | | &>.end-view{ |
| | | padding: 8rpx 0 16rpx 0; |
| | | } |
| | | &>.list-view{ |
| | | height: 1px; |
| | | overflow: auto; |
| | | flex-grow: 1; |
| | | .list-items-group{ |
| | | padding-top:12rpx; |
| | | .list-item { |
| | | margin-bottom: 12rpx; |
| | | border-width: 2rpx 0; |
| | | border-style: solid; |
| | | border-color: $uni-border-color; |
| | | &:last-child{ |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | .list-item-show{ |
| | | background-color: $uni-bg-color; |
| | | //padding: 0 16rpx; |
| | | font-size: 1.1em; |
| | | display: flex; |
| | | &>.item-left{ |
| | | flex-shrink: 0; |
| | | padding-left: 16rpx; |
| | | padding-top: 12rpx; |
| | | padding-right: 12rpx; |
| | | } |
| | | &>.item-main{ |
| | | flex-grow: 1; |
| | | width: 1px; |
| | | padding-right: 16rpx; |
| | | } |
| | | .item-row{ |
| | | border-bottom: 2rpx dashed $uni-text-color-grey; |
| | | display: flex; |
| | | &>.label{ |
| | | opacity: .7; |
| | | flex-shrink: 0; |
| | | width: 130rpx; |
| | | padding-top: 11rpx; |
| | | .first-label-inner{ |
| | | display: flex; |
| | | align-items: center; |
| | | .batch-no{ |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | &>.content{ |
| | | width: 1px; |
| | | flex-grow: 1; |
| | | line-height: 1.5em; |
| | | padding: 8rpx 0; |
| | | } |
| | | &:last-child{ |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .forma-item{ |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .btns-row{ |
| | | display: flex; |
| | | height: 90rpx; |
| | | box-sizing: border-box; |
| | | border-style: solid; |
| | | border-color: $uni-border-1; |
| | | border-width: 2rpx 0 2rpx 0; |
| | | .divider { |
| | | width: 2rpx; |
| | | height: 100%; |
| | | background-color: $uni-border-1; |
| | | } |
| | | .btn{ |
| | | flex-grow: 1; |
| | | width: 1px; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | &.primary-btn{ |
| | | background-color: $uni-color-primary; |
| | | color: $uni-bg-color; |
| | | } |
| | | &.default-btn{ |
| | | background-color: $uni-bg-color; |
| | | color: $uni-color-primary; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .swipe-action-btns{ |
| | | width: 100rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | .swipe-action-btn{ |
| | | display: flex; |
| | | color: $uni-bg-color; |
| | | background-color: $u-primary; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 50%; |
| | | width: 100rpx; |
| | | box-sizing: border-box; |
| | | &.danger{ |
| | | background-color: $u-error; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="å¼å¸¸ç©æå¤ç"> |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- step 1 start --> |
| | | <scan-input-form-item class="forma-item" label="ç©æäºç»´ç " v-model="form.materialId" |
| | | :msg="msg.materialId" :msg-type="msgType.materialId" @search="onSearchMaterial(form.materialId)" |
| | | @clear="onClearContainter"/> |
| | | |
| | | |
| | | |
| | | <!-- <view class="p-form-label"><text class="required-tag"></text>éæ©å¼å¸¸å·¥ä½ä½ç½®</view> --> |
| | | <exceptionPlace v-show="Boolean(materialData.materialType)" :station.sync="form.station" :exceptePlace="exceptePlace"/> |
| | | <materialInfo :materialData="this.materialData" /> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template> |
| | | <div class="btn-frame"><u-button :disabled="disabled" type="primary" text="èªå¨åºåº" @click="submint(1)" |
| | | ></u-button></div> |
| | | <div class="btn-frame"><u-button :disabled="disabled" type="primary" text="人工åºåº" @click="submint(2)" |
| | | ></u-button></div> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import exceptionPlace from './modules/exceptionPlace.vue' |
| | | import materialInfo from './modules/materialInfo.vue' |
| | | import { |
| | | lisNoPage,exceptionInfo,outBound |
| | | } from '@/api/exception.js' |
| | | import { $alert, $successInfo, regexValidate } from '@/static/js/utils/index.js' |
| | | let initInterVal = null; |
| | | |
| | | export default { |
| | | name: 'emptyInPage', |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | EasySelectFormItem, |
| | | EasyPicker, |
| | | exceptionPlace, |
| | | materialInfo |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | form: { |
| | | no: '', |
| | | station:'' |
| | | }, |
| | | exceptePlace: [], |
| | | materialData: {}, |
| | | msg: { |
| | | materialId:'' |
| | | }, |
| | | msgType: { |
| | | materialId:'info' |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | disabled() { |
| | | return !Boolean(this.materialData.materialId) |
| | | } |
| | | }, |
| | | methods: { |
| | | onClearContainter(){ |
| | | this.form.station='' |
| | | this.materialData={} |
| | | }, |
| | | // onReady() { |
| | | // this.startInitInterval(() => { |
| | | |
| | | // }) |
| | | // }, |
| | | // è·åå¼å¸¸å·¥ä½ç¹ |
| | | getExceptionPlace(materialType){ |
| | | var areaCode=materialType==1?'GGYC':'JTYC' |
| | | try{ |
| | | lisNoPage({areaCode}).then(res=>{ |
| | | |
| | | if(res.code == 200){ |
| | | this.exceptePlace=res?.result |
| | | console.log(this.exceptePlace,'11'); |
| | | } |
| | | }) |
| | | |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | $alert(e); |
| | | return; |
| | | } |
| | | }, |
| | | // è·åå¼å¸¸ä»¶ä¿¡æ¯ä¿¡æ¯ |
| | | async onSearchMaterial() { |
| | | if (!this.form.materialId) { |
| | | this.msgType.materialId = 'error' |
| | | this.msg.materialId = '请è¾å
¥æ«ç ï¼'; |
| | | return false; |
| | | } |
| | | const data = { |
| | | code: this.form.materialId |
| | | } |
| | | // è·å代ç |
| | | try{ |
| | | let {result}=await exceptionInfo(data) |
| | | this.materialData = result |
| | | this.getExceptionPlace(this.materialData.materialType); |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | $alert(e) |
| | | return; |
| | | } |
| | | }, |
| | | |
| | | // æ¸
餿°æ® |
| | | setData(){ |
| | | console.log('clear'); |
| | | this.form={ |
| | | no: '', |
| | | station:'' |
| | | } |
| | | |
| | | this.msg={ |
| | | materialId:'' |
| | | }, |
| | | this.msgType={ |
| | | materialId:'info' |
| | | } |
| | | this.exceptePlace= [] |
| | | this.materialData= {} |
| | | }, |
| | | // åºåº |
| | | async submint(type) { |
| | | const data={ |
| | | type, |
| | | materialId:this.materialData.materialId, |
| | | stationNo:this.form.station |
| | | } |
| | | console.log(data); |
| | | try{ |
| | | await outBound(data) |
| | | this.setData() |
| | | $successInfo("åºåºæåï¼") |
| | | |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | }, 200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady() { |
| | | this.startInitInterval(() => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | // this.getData() |
| | | // this.getLinesOptions() |
| | | // this.selectOptions.models = getDicList(this.$store,'assemble_taskmodel') |
| | | }) |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .p-form-label{ |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag{ |
| | | color:$u-error; |
| | | } |
| | | } |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex:1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1){ |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | &>.label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="forma-item"> |
| | | <scan-input-form-item placeholder="è¯·éæ©" :clearable="false" :hasScan="false" :hasSearch="false" |
| | | @click.native="visible=true" class="forma-item" label="éæ©ç¹ä½" v-model="station" /> |
| | | <EasyPicker :visible.sync="visible" :list="exceptePlace" labelField="placeNo" valueField="placeNo" |
| | | @select="getSiteVal" /> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import { |
| | | parseDic |
| | | } from '@/static/js/utils/index.js' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | export default { |
| | | props: { |
| | | exceptePlace: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | station:{ |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | components: { |
| | | EasyPicker, |
| | | ScanInputFormItem |
| | | }, |
| | | data() { |
| | | return { |
| | | radiolist1: [], |
| | | radiovalue1: '', |
| | | visible:false, |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style: { |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }] |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | getSiteVal(val){ |
| | | this.$emit('update:station',val) |
| | | }, |
| | | parseDic, |
| | | deleteItem() { |
| | | this.$emit('sortInfo', this.sortInfo.materialNo) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- <style scoped> |
| | | .custom-radio { |
| | | font-size: 16px; |
| | | line-height: 24px; |
| | | } |
| | | |
| | | .material-item-group { |
| | | padding-top: 10rpx; |
| | | display: flex; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | position: relative; |
| | | flex: 1; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .radio-row { |
| | | background-color: rgb(255, 255, 255); |
| | | margin-bottom: 10px; |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .p-form-label { |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | |
| | | .required-tag { |
| | | color: $u-error; |
| | | } |
| | | } |
| | | |
| | | .radio-group u-radio { |
| | | width: 50%; |
| | | } |
| | | </style> --> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="material-item-group" v-show="Boolean(materialData.materialNo)"> |
| | | <view class="material-list-item"> |
| | | <!-- <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> --> |
| | | <view class="item-row"> |
| | | <view class="label">ä¿¡æ¯æç¤º</view>ï¼ |
| | | <view class="content auto-wrap">{{materialData.alertInfomation}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æå¯ä¸ç </view>ï¼ |
| | | <view class="content auto-wrap">{{materialData.materialId}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æä»¶å·</view>ï¼ |
| | | <view class="content auto-wrap">{{materialData.materialNo}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æåç§°</view>ï¼ |
| | | <view class="content auto-wrap">{{materialData.materialName}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ä¾åºå</view>ï¼ |
| | | <view class="content auto-wrap">{{materialData.supplier}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ä»¶å·</view>ï¼ |
| | | <view class="content auto-wrap">{{materialData.materialNo}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">è§æ ¼</view>ï¼ |
| | | <view class="content auto-wrap">{{materialData.materialSpec}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æºå</view>ï¼ |
| | | <view class="content auto-wrap">{{parseDic($store,'material_modal',materialData.materialModel)}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æ¹æ¬¡</view>ï¼ |
| | | <view class="content auto-wrap">{{materialData.materialBatch}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | parseDic |
| | | } from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | materialData: { |
| | | type: Object, |
| | | default: () => ({}) |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | parseDic |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 50rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | padding: 10px 0; |
| | | border-bottom: 1px solid #ccc; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | width: 150rpx; |
| | | text-align-last: justify; |
| | | text-align: justify; |
| | | } |
| | | |
| | | .content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | } |
| | | |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | // .close-btn { |
| | | // $closeBtnSize: 70rpx; |
| | | // width: $closeBtnSize; |
| | | // height: $closeBtnSize; |
| | | // z-index: 1; |
| | | // position: absolute; |
| | | // top: 0rpx; |
| | | // right: 8rpx; |
| | | // background-color: $u-error; |
| | | // opacity: 0.6; |
| | | // border-radius: 25rpx; |
| | | |
| | | // .icon-layer { |
| | | // position: absolute; |
| | | // width: 100%; |
| | | // height: 100%; |
| | | // display: flex; |
| | | // align-items: center; |
| | | // justify-content: center; |
| | | // z-index: 2; |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="å
¥åºä½ä¸" > |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <scan-input-form-item |
| | | class="forma-item" |
| | | label="æ¹æ¬¡å·" |
| | | v-model="form.orderNo" |
| | | :msg="msg.orderNo" |
| | | :msg-type="msgType.orderNo" |
| | | @search="onSearchOrderNo" |
| | | @clear="onClearOrderNo" |
| | | /> |
| | | |
| | | <template v-if="materialObj.id"> |
| | | <view class="material-block"> |
| | | <view class="material-block-item"> |
| | | <view class="label">æ¹æ¬¡å·ï¼</view> |
| | | <view class="content auto-wrap">{{materialObj.batch}}</view> |
| | | </view> |
| | | <view class="material-block-item"> |
| | | <view class="label auto-wrap">æµæ°´å·ï¼</view> |
| | | <view class="content"> |
| | | <input class="easy-input" v-model="materialObj.serialNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="material-block-item"> |
| | | <view class="label">é¿ï¼</view> |
| | | <view class="content auto-wrap">{{materialObj.long}}</view> |
| | | </view> |
| | | <view class="material-block-item"> |
| | | <view class="label">宽ï¼</view> |
| | | <view class="content auto-wrap">{{materialObj.wide}}</view> |
| | | </view> |
| | | <view class="material-block-item"> |
| | | <view class="label">é«ï¼</view> |
| | | <view class="content auto-wrap">{{materialObj.high}}</view> |
| | | </view> |
| | | </view> |
| | | |
| | | <easy-select-form-item |
| | | label="å
¥åºå£" |
| | | v-model="form.entranceId" |
| | | :msg="msg.entranceId" |
| | | :msg-type="msgType.entranceId" |
| | | :list="selectList.entrances" |
| | | value-field="code" |
| | | label-field="name" |
| | | :clearable="false" |
| | | /> |
| | | </template> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <u-button type="primary" text="æäº¤å
¥åº" :disabled="confirmBtnDisabled" @click="onSubmit"></u-button> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import { $alert, $successInfo, regexValidate } from '@/static/js/utils/index.js' |
| | | let initInterVal = null; |
| | | const defaultForm = { |
| | | orderNo:'', |
| | | entranceId:'' |
| | | } |
| | | export default { |
| | | name:'fapaoInStorePage', |
| | | components:{DefaultHeaderPageLayout,ActionUserRow,ScanInputFormItem,EasySelectFormItem}, |
| | | data(){ |
| | | return { |
| | | pageBodyHeight:0, |
| | | step:1, |
| | | form:{...defaultForm}, |
| | | msg:{ |
| | | orderNo:'', |
| | | entranceId:'' |
| | | }, |
| | | msgType:{ |
| | | orderNo:'error', |
| | | entranceId:'error' |
| | | }, |
| | | materialObj:{}, |
| | | selectList:{ |
| | | entrances:[] |
| | | } |
| | | } |
| | | }, |
| | | computed:{ |
| | | confirmBtnDisabled(){ |
| | | let res = true; |
| | | if (this.materialObj.id && this.form.entranceId) { |
| | | res = false |
| | | } |
| | | return res; |
| | | } |
| | | }, |
| | | methods:{ |
| | | /* åæ®ç¼å·æç´¢ */ |
| | | onSearchOrderNo(){ |
| | | if (!this.form.orderNo) { |
| | | this.msg.orderNo = '请è¾å
¥æ¹æ¬¡å·ï¼'; |
| | | return false; |
| | | } |
| | | this.msg.orderNo = ''; |
| | | this.getSearchInfo() |
| | | }, |
| | | /* æ¸
é¤åæ®ç¼å· */ |
| | | onClearOrderNo(){ |
| | | this.resetOrderNo() |
| | | }, |
| | | /* æ¸
é¤åæ®ç¼å·ä¿¡æ¯ */ |
| | | resetOrderNo(){ |
| | | this.msg.orderNo = ''; |
| | | this.form.orderNo = '' |
| | | this.materialObj = {}; |
| | | this.form.entranceId = null |
| | | }, |
| | | getSelectOptions(callback){ |
| | | this.$api.get('PdaGetWarehouseEntrance',{Id:this.materialObj.id},{block:'fapaoIn',loading:false}).then(d=>{ |
| | | this.selectList.entrances = d.outEntranceListOutputList || [] |
| | | this.form.entranceId = d.defaultCode |
| | | callback && callback(true) |
| | | }).catch((errmsg)=>{ |
| | | callback && callback(false,errmsg) |
| | | }) |
| | | }, |
| | | getSearchInfo(callback,needloding=true){ |
| | | if (needloding) { |
| | | uni.showLoading({ |
| | | title: 'å è½½ä¸...', |
| | | mask:true |
| | | }); |
| | | } |
| | | this.getInMaterilaInfo((f,msg1)=>{ |
| | | if (f){ |
| | | this.getSelectOptions((fx,msg2)=>{ |
| | | if (needloding) { |
| | | uni.hideLoading(); |
| | | if (!fx) { |
| | | $alert(msg2) |
| | | } |
| | | } |
| | | callback && callback(fx,msg2) |
| | | }) |
| | | } else { |
| | | if (needloding) { |
| | | uni.hideLoading(); |
| | | $alert(msg1) |
| | | } |
| | | callback && callback(false,msg1) |
| | | } |
| | | }) |
| | | }, |
| | | /* è·åå
¥åºç©æä¿¡æ¯ */ |
| | | getInMaterilaInfo(callback){ |
| | | let params = {Batch:this.form.orderNo} |
| | | this.$api.get('GetDetail',params,{block:'fapaoIn',loading:false,warn:false}).then((d)=>{ |
| | | this.materialObj = d |
| | | callback && callback(true) |
| | | }).catch((_errmsg)=>{ |
| | | this.resetOrderNo() |
| | | callback && callback(false,_errmsg) |
| | | }) |
| | | }, |
| | | inputCheck(){ |
| | | let res = true, msg = ''; |
| | | if (!this.materialObj.serialNo) { |
| | | msg = '请è¾å
¥æµæ°´å·'; |
| | | res = false |
| | | } |
| | | |
| | | if (res && !regexValidate.positiveInteger(this.materialObj.serialNo)) { |
| | | msg = '请è¾å
¥åªè½æ¯æ£æ´æ°'; |
| | | res = false |
| | | } |
| | | |
| | | if (res && Number(this.materialObj.serialNo)<=0) { |
| | | msg = '请è¾å
¥åªè½æ¯æ£æ´æ°'; |
| | | res = false |
| | | } |
| | | |
| | | if (!res) { |
| | | $alert(msg) |
| | | } |
| | | |
| | | return res; |
| | | }, |
| | | /* ååºæäº¤æé® */ |
| | | onSubmit(){ |
| | | if (!this.inputCheck()) return false; |
| | | uni.showLoading({ |
| | | title: 'å è½½ä¸...', |
| | | mask:true |
| | | }); |
| | | this.dealConfirm((f,_errmsg1)=>{ |
| | | if (f) { |
| | | setTimeout(()=>{ |
| | | this.getSearchInfo((fx,_errmsg2)=>{ |
| | | uni.hideLoading(); |
| | | if (fx) { |
| | | $successInfo('å
¥åºæå') |
| | | } else { |
| | | $alert(`å
¥åºæåï¼ä½ï¼${_errmsg2}`) |
| | | } |
| | | },false) |
| | | },5000) |
| | | } else { |
| | | uni.hideLoading(); |
| | | $alert(_errmsg1) |
| | | } |
| | | }) |
| | | }, |
| | | /* æäº¤æ¥å£è°ç¨ */ |
| | | dealConfirm(callback){ |
| | | let params = { |
| | | batch:this.materialObj.batch, |
| | | serialNo:this.materialObj.serialNo, |
| | | entranceCode:this.form.entranceId |
| | | } |
| | | this.$api.post('FoamingPdaAutomaticWarehouse',params,{block:'fapaoIn',loading:false,warn:false}).then(()=>{ |
| | | callback && callback(true) |
| | | }).catch((e)=>{ |
| | | callback && callback(false,e) |
| | | }) |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback){ |
| | | initInterVal = setInterval(()=>{ |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | },200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval(){ |
| | | try{ |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady(){ |
| | | this.startInitInterval(()=>{ |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | }) |
| | | }, |
| | | onUnload(){ |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row{ |
| | | padding: 10rpx; |
| | | background-color: $uni-bg-color; |
| | | } |
| | | .forma-item{ |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .material-block{ |
| | | background-color: $uni-bg-color; |
| | | padding: 8rpx 16rpx; |
| | | font-size: 1.1em; |
| | | margin-bottom: 24rpx; |
| | | border-width: 2rpx 0; |
| | | border-style: solid; |
| | | border-color: $uni-border-color; |
| | | .material-block-item{ |
| | | border-bottom: 2rpx dashed $uni-text-color-grey; |
| | | display: flex; |
| | | &>.label{ |
| | | opacity: .7; |
| | | flex-shrink: 0; |
| | | width: 130rpx; |
| | | text-align: right; |
| | | padding-top: 11rpx; |
| | | } |
| | | &>.content{ |
| | | width: 1px; |
| | | flex-grow: 1; |
| | | line-height: 1.5em; |
| | | padding: 8rpx 0; |
| | | } |
| | | &:last-child{ |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | .easy-input{ |
| | | font-size: inherit; |
| | | color: $uni-color-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="åºåºä½ä¸" > |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <view class="fapao-out-page-content"> |
| | | <view class="entrance-row"> |
| | | <easy-select-form-item |
| | | label="åºåºå£" |
| | | v-model="form.OutputEntrance" |
| | | :msg="msg.OutputEntrance" |
| | | :msg-type="msgType.OutputEntrance" |
| | | :list="selectList.entrances" |
| | | value-field="code" |
| | | label-field="name" |
| | | :clearable="false" |
| | | @select="onEntranceSelect" |
| | | /> |
| | | </view> |
| | | <view class="info-action-box"> |
| | | <view v-if="hasInfo"> |
| | | <view class="info-block info-block-style1"> |
| | | <view class="style1-row"> |
| | | <view class="label">åºåºåç±»å«ï¼</view> |
| | | <view class="content auto-wrap">{{orderObj.orderNo}}</view> |
| | | </view> |
| | | <view class="style1-row"> |
| | | <view class="label">åºåºåç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{orderObj.orderSubclass}}</view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="info-block info-block-style2"> |
| | | <view class="list-head"> |
| | | <view class="list-row"> |
| | | <view class="list-cell list-cell1">å±</view> |
| | | <view class="list-cell list-cell2">ç©æç¼å·</view> |
| | | <view class="list-cell list-cell3">尺寸</view> |
| | | </view> |
| | | </view> |
| | | <view class="list-body"> |
| | | <view class="list-row" v-for="(item,index) in list" :key="index"> |
| | | <view class="list-cell list-cell1">{{list.length-index}}</view> |
| | | <view class="list-cell list-cell2">{{item.materialNo}}</view> |
| | | <view class="list-cell list-cell3">{{item.long}}*{{item.wide}}*{{item.high}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <scan-input-form-item |
| | | label="æ ç¾æ«æ" |
| | | v-model="form.packCode" |
| | | :msg="msg.packCode" |
| | | :msg-type="msgType.packCode" |
| | | :has-search="false" |
| | | @clear="onClearPackCode" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <view class="btn-frame left-btn-frame"><u-button text="å· æ°" :disabled="!form.OutputEntrance" @click="onResetPage"></u-button></view> |
| | | <view class="btn-frame right-btn-frame"><u-button type="primary" :disabled="list.length<=0 || !form.packCode" text="æ 交" @click="onSubmit"></u-button></view> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import { $alert, $successInfo } from '@/static/js/utils/index.js' |
| | | let initInterVal = null; |
| | | const defaultForm = { |
| | | packCode:'', |
| | | OutputEntrance:'' |
| | | } |
| | | export default { |
| | | name:'fapaoOutStorePage', |
| | | components:{DefaultHeaderPageLayout,ActionUserRow,ScanInputFormItem,EasySelectFormItem}, |
| | | data(){ |
| | | return { |
| | | pageBodyHeight:0, |
| | | step:1, |
| | | form:{...defaultForm}, |
| | | msg:{ |
| | | packCode:'', |
| | | OutputEntrance:'' |
| | | }, |
| | | msgType:{ |
| | | packCode:'error', |
| | | OutputEntrance:'error' |
| | | }, |
| | | orderObj:{}, |
| | | list:[], |
| | | hasInfo:false, |
| | | selectList:{ |
| | | entrances:[] |
| | | } |
| | | } |
| | | }, |
| | | computed:{ |
| | | confirmBtnDisabled(){ |
| | | let res = true; |
| | | if (this.materialObj.id && this.form.entranceId) { |
| | | res = false |
| | | } |
| | | return res; |
| | | } |
| | | }, |
| | | methods:{ |
| | | /* æ¸
餿 ç¾ */ |
| | | onClearPackCode(){ |
| | | this.resetPackCode() |
| | | }, |
| | | resetPackCode(){ |
| | | this.form.packCode = '' |
| | | }, |
| | | /* éç½®åºåºæ°æ® */ |
| | | resetOutInfo(){ |
| | | this.resetPackCode() |
| | | this.orderObj = {}; |
| | | this.list = [] |
| | | this.hasInfo = false |
| | | }, |
| | | onEntranceSelect(val){ |
| | | this.getOutInfo(val) |
| | | }, |
| | | onResetPage(){ |
| | | this.getOutInfo(null) |
| | | }, |
| | | getSelectOptions(){ |
| | | this.$api.get('listNonPage',{type:2},{block:'wentrance'}).then(d=>{ |
| | | this.selectList.entrances = d || [] |
| | | }).catch(()=>{}) |
| | | }, |
| | | /* è·ååºåºæ°æ® */ |
| | | getOutInfo(code,callback,needloding=true){ |
| | | let params = {} |
| | | if (code) { |
| | | params.OutputEntrance = code |
| | | } else { |
| | | params.OutputEntrance = this.form.OutputEntrance |
| | | } |
| | | if (needloding) { |
| | | uni.showLoading({ |
| | | title: 'å è½½ä¸...', |
| | | mask:true |
| | | }); |
| | | } |
| | | this.$api.get('GetPackInfomation',params,{block:'fapaoOut',loading:false}).then((d)=>{ |
| | | this.orderObj = { |
| | | orderNo:d.orderNo, |
| | | orderSubclass:d.orderSubclass |
| | | } |
| | | this.list = d.groupDiskOutWarehouseList || [] |
| | | this.hasInfo = true |
| | | if (needloding) { |
| | | uni.hideLoading(); |
| | | } |
| | | callback && callback(true) |
| | | }).catch((_errmsg)=>{ |
| | | this.resetOutInfo() |
| | | if (needloding) { |
| | | uni.hideLoading(); |
| | | } |
| | | callback && callback(false,_errmsg) |
| | | }) |
| | | }, |
| | | /* ååºæäº¤æé® */ |
| | | onSubmit(){ |
| | | this.dealConfirm((f)=>{ |
| | | if (f) { |
| | | $successInfo('åºåºæå') |
| | | this.resetOutInfo() |
| | | } |
| | | }) |
| | | }, |
| | | /* æäº¤æ¥å£è°ç¨ */ |
| | | dealConfirm(callback){ |
| | | let params = { |
| | | materialNoList:this.list, |
| | | packCode:this.form.packCode |
| | | } |
| | | this.$api.post('Pack',params,{block:'fapaoOut'}).then(()=>{ |
| | | callback && callback(true) |
| | | }).catch((e)=>{ |
| | | callback && callback(false,e) |
| | | }) |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback){ |
| | | initInterVal = setInterval(()=>{ |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | },200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval(){ |
| | | try{ |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady(){ |
| | | this.startInitInterval(()=>{ |
| | | this.getSelectOptions() |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | }) |
| | | }, |
| | | onUnload(){ |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row{ |
| | | display: flex; |
| | | padding: 10rpx 0; |
| | | background-color: $uni-bg-color; |
| | | .btn-frame{ |
| | | width: 50%; |
| | | box-sizing: border-box; |
| | | } |
| | | .left-btn-frame{ |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | .right-btn-frame{ |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | .fapao-out-page-content{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | height: 100%; |
| | | .entrance-row{ |
| | | flex-shrink: 0; |
| | | padding-bottom: 24rpx; |
| | | } |
| | | .info-action-box{ |
| | | flex-grow: 1; |
| | | height: 1px; |
| | | } |
| | | } |
| | | .info-block{ |
| | | background-color: $uni-bg-color; |
| | | box-shadow: 0px 2rpx 6rpx rgba(34, 25, 25, 0.2); |
| | | font-size: 1.1em; |
| | | } |
| | | .info-block-style1{ |
| | | padding: 8rpx 16rpx; |
| | | margin-bottom: 24rpx; |
| | | .style1-row{ |
| | | border-bottom: 2rpx dashed $uni-text-color-grey; |
| | | display: flex; |
| | | &>.label{ |
| | | opacity: .7; |
| | | flex-shrink: 0; |
| | | width: 190rpx; |
| | | text-align: right; |
| | | padding-top: 11rpx; |
| | | } |
| | | &>.content{ |
| | | width: 1px; |
| | | flex-grow: 1; |
| | | line-height: 1.5em; |
| | | padding: 8rpx 0; |
| | | } |
| | | &:last-child{ |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | .info-block-style2{ |
| | | $border-style:2rpx dashed $uni-border-color; |
| | | margin-bottom: 24rpx; |
| | | .list-head{ |
| | | border-bottom: $border-style; |
| | | font-weight: bold; |
| | | } |
| | | .list-row{ |
| | | display: flex; |
| | | border-bottom: $border-style; |
| | | &:last-child{ |
| | | border-bottom: 0; |
| | | } |
| | | .list-cell{ |
| | | word-break:break-all; |
| | | word-wrap:break-word; |
| | | align-items: center; |
| | | justify-content: center; |
| | | display: flex; |
| | | box-sizing: border-box; |
| | | padding: 8rpx 6rpx; |
| | | } |
| | | .list-cell1{ |
| | | flex-shrink: 0; |
| | | width: 70rpx; |
| | | } |
| | | .list-cell2,.list-cell3{ |
| | | width: 1px; |
| | | border-left: $border-style; |
| | | } |
| | | .list-cell2{ |
| | | flex-grow: 2; |
| | | } |
| | | .list-cell3{ |
| | | flex-grow: 3; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <full-page-layout :safety="false" background-color="#f0f8ff"> |
| | | <view class="home-bk-layer"></view> |
| | | <view class="home-float-layer"> |
| | | <header-page-layout :full="false" ref="page" title="é¦é¡µ" headerColor="#fff" @headerclick="onHeaderClick"> |
| | | <template v-slot:headerright><text class="iconfont icon-out-right"></text></template> |
| | | |
| | | <view class="home-page-containter" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <view class="user-view-box"> |
| | | <view class="user-card home-card"> |
| | | <view class="left-view"> |
| | | <view class="user-circle"><text class="iconfont icon-worker"></text></view> |
| | | </view> |
| | | <view class="right-view"> |
| | | <view class="text-row1 auto-wrap">{{userName}}</view> |
| | | <view class="text-row2 auto-wrap">{{userAcc}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="blocks-view-box"> |
| | | <view class="home-card pic-block" v-if="picList.length>0"> |
| | | <u-swiper :list="picList" circular indicator indicatorMode="line" circular></u-swiper> |
| | | </view> |
| | | <view class="home-card item-block-card" v-for="(itema,indexa) in blocks" |
| | | :key="'item-block-card-'+indexa"> |
| | | <view class="title" v-if="itema.workShopName">{{itema.workShopName}}</view> |
| | | <view class="items-view"> |
| | | <view class="block-item" v-for="(itemb,indexb) in (itema.wmsPdaPowerOutput || [])" |
| | | :key="'block-item-'+indexa+'-'+indexb" @tap="onClickBlockItem(itemb.code)"> |
| | | <view class="block-item-icon" :style="{color:itemb.color}"> |
| | | <text class="iconfont" :class="[itemb.icon]"></text> |
| | | <view class="opacity-layer"></view> |
| | | </view> |
| | | <view class="block-item-text no-wrap">{{itemb.name}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </header-page-layout> |
| | | </view> |
| | | </full-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import FullPageLayout from '@/components/FullPageLayout.vue' |
| | | import HeaderPageLayout from '@/components/HeaderPageLayout.vue' |
| | | let initInterVal = null; |
| | | export default { |
| | | name: 'homePage', |
| | | components: { |
| | | FullPageLayout, |
| | | HeaderPageLayout |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | userName: '', |
| | | userAcc: '', |
| | | picList: [], |
| | | blocks: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | onHeaderClick(type) { |
| | | if (type === 'right') { |
| | | uni.redirectTo({ |
| | | url: this.$config.path.login |
| | | }) |
| | | } |
| | | }, |
| | | onClickBlockItem(path) { |
| | | if (path) { |
| | | console.log(path) |
| | | uni.navigateTo({ |
| | | url: this.$config.path[path] |
| | | }); |
| | | } else { |
| | | uni.showToast({ |
| | | title: 'å¼åä¸...', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | callback && callback() |
| | | } |
| | | }, 200) |
| | | }, |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onLoad() { |
| | | let _user = this.$store.getters['user/getUserInfo']; |
| | | this.userName = _user.nickName; |
| | | this.userAcc = _user.account; |
| | | //ææ¶æ³¨é,ä¸ç¨èåæé ãEditby shaocx,2025-05-14ã |
| | | //this.blocks = _user.wmsPdaPowerOutputs?[..._user.wmsPdaPowerOutputs]:[] |
| | | this.blocks = [{ |
| | | workShopName: '忣', |
| | | wmsPdaPowerOutput:[ |
| | | // {icon:'icon-worker',code:'bind',name:'ç»ç',color:'#1e90ff'}, |
| | | {icon:'icon-worker',code:'pick',name:'忣',color:'#1e90ff'}, |
| | | // {icon:'icon-worker',code:'bindInForLocation',name:'忣',color:'#1e90ff'}, |
| | | // {icon:'icon-worker',code:'bindWXJ',name:'忣',color:'#1e90ff'}, |
| | | ] |
| | | }, |
| | | { |
| | | workShopName: 'å
¶ä»æä½', |
| | | wmsPdaPowerOutput:[{icon:'icon-worker',code:'PointHandling',name:'ç¹å°ç¹',color:'#1e90ff'}] |
| | | } |
| | | ] |
| | | }, |
| | | onReady() { |
| | | this.startInitInterval() |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .home-page { |
| | | height: 100%; |
| | | background-color: #f0f8ff; |
| | | position: relative; |
| | | } |
| | | |
| | | .home-bk-layer, |
| | | .home-float-layer { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | } |
| | | |
| | | .home-bk-layer { |
| | | height: 240rpx; |
| | | border-radius: 0 0 80rpx 80rpx; |
| | | background-image: linear-gradient(to right, $color-paimary-middle, $color-paimary-darken); |
| | | z-index: 1; |
| | | } |
| | | |
| | | .home-float-layer { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .home-page-containter { |
| | | display: flex; |
| | | flex-direction: column; |
| | | overflow: hidden; |
| | | |
| | | .user-view-box { |
| | | flex-shrink: 0; |
| | | padding-bottom: 30rpx; |
| | | } |
| | | |
| | | .blocks-view-box { |
| | | flex-grow: 1; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | |
| | | .home-card { |
| | | background-color: #fff; |
| | | width: 95%; |
| | | border-radius: 10rpx; |
| | | margin: 0 auto; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .pic-block { |
| | | margin-bottom: 30rpx; |
| | | } |
| | | |
| | | .user-card { |
| | | display: flex; |
| | | padding: 30rpx 0; |
| | | |
| | | .left-view { |
| | | width: 180rpx; |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .user-circle { |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border-radius: 50%; |
| | | background-image: linear-gradient(to right, $color-paimary-middle, $color-paimary-darken); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 90rpx; |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .right-view { |
| | | flex-grow: 1; |
| | | padding-right: 10rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | |
| | | .text-row1 { |
| | | font-size: 36rpx; |
| | | font-weight: bold; |
| | | line-height: 1.3; |
| | | } |
| | | |
| | | .text-row2 { |
| | | padding-top: 10rpx; |
| | | font-size: 28rpx; |
| | | line-height: 1.3; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .item-block-card { |
| | | margin-bottom: 30rpx; |
| | | |
| | | &>.title { |
| | | padding: 20rpx 20rpx 0 20rpx; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .items-view { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding-bottom: 12rpx; |
| | | } |
| | | |
| | | .block-item { |
| | | width: 25%; |
| | | box-sizing: border-box; |
| | | padding-top: 20rpx; |
| | | padding-bottom: 10rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | |
| | | .block-item-icon { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 70rpx; |
| | | position: relative; |
| | | |
| | | .opacity-layer { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-image: linear-gradient(120deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.1)); |
| | | } |
| | | } |
| | | |
| | | .block-item-text { |
| | | padding-top: 4rpx; |
| | | font-size: 30rpx; |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="åºåº"> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template> |
| | | <div class="btn-frame"><u-button type="primary" text="ç¡® å®" @click="onSubmit"></u-button></div> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | export default { |
| | | components: { |
| | | DefaultHeaderPageLayout |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="车é´å°¾æéåº" > |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <step1 v-show="step===1" ref="step1" /> |
| | | <step2 v-show="step===2" ref="step2" /> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template v-if="step===1"> |
| | | <view class="btn-frame"><u-button text="é ç½®" @click="onReset"></u-button></view> |
| | | <view class="divider"></view> |
| | | <view class="btn-frame"><u-button type="primary" text="ä¸ä¸æ¥" @click="onGoNext"></u-button></view> |
| | | </template> |
| | | <template v-if="step===2"> |
| | | <view class="btn-frame"><u-button text="ä¸ä¸æ¥" @click="onGoPrev"></u-button></view> |
| | | <view class="divider"></view> |
| | | <view class="btn-frame"><u-button type="primary" text="æ 交" @click="onSubmit"></u-button></view> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import Step1 from './modules/Step1.vue' |
| | | import Step2 from './modules/Step2.vue' |
| | | let initInterVal = null; |
| | | export default { |
| | | name:'innerTailBackPage', |
| | | components:{DefaultHeaderPageLayout,ActionUserRow,Step1,Step2}, |
| | | data(){ |
| | | return { |
| | | pageBodyHeight:0, |
| | | step:1 |
| | | } |
| | | }, |
| | | watch:{ |
| | | step(newVal, oldVal){ |
| | | if (newVal !== oldVal) { |
| | | if (newVal) { |
| | | this.switchPage(); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | onGoNext(){ |
| | | this.step++ |
| | | }, |
| | | onGoPrev(){ |
| | | this.step-- |
| | | }, |
| | | reset(){ |
| | | this.$refs.step1.clearFullContainer() |
| | | this.step = 1 |
| | | }, |
| | | onReset(){ |
| | | this.reset() |
| | | }, |
| | | onSubmit(){ |
| | | this.dealConfirm((f)=>{ |
| | | if (f) { |
| | | $successInfo('æäº¤æå') |
| | | this.reset() |
| | | } |
| | | }) |
| | | }, |
| | | /* æäº¤æ¥å£è°ç¨ */ |
| | | dealConfirm(callback){ |
| | | let params = this.getSubmitParams() |
| | | this.$api.post('TailAutoWare',params,{block:'innerTail'}).then(()=>{ |
| | | callback && callback(true) |
| | | }).catch((e)=>{ |
| | | callback && callback(false,e) |
| | | }) |
| | | }, |
| | | getSubmitParams(type='confirm'){ |
| | | let res = this.$refs.step1.get() |
| | | if (type==='confirm') { |
| | | res = {...res,...this.$refs.step2.get()} |
| | | } |
| | | return res |
| | | }, |
| | | switchPage(){ |
| | | this.$nextTick(()=>{ |
| | | switch (this.step){ |
| | | case 2: |
| | | this.$refs.step2.show() |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | }) |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback){ |
| | | initInterVal = setInterval(()=>{ |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | },200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval(){ |
| | | try{ |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady(){ |
| | | this.startInitInterval(()=>{ |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | this.switchPage() |
| | | }) |
| | | }, |
| | | onUnload(){ |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row{ |
| | | display: flex; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | .btn-frame{ |
| | | width: 1%; |
| | | box-sizing: border-box; |
| | | flex-grow: 1; |
| | | } |
| | | .divider{ |
| | | width: 20rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="inner-tail-back-step1-page-content"> |
| | | <view class="top-view"> |
| | | <scan-input-form-item |
| | | label="æçç " |
| | | v-model="form.container" |
| | | :msg="msg.container" |
| | | :msg-type="msgType.container" |
| | | @search="onSearchContainer" |
| | | @clear="onClearContainer" |
| | | /> |
| | | </view> |
| | | <view class="list-view"> |
| | | <!-- ########### --> |
| | | <view class="list-items-group"> |
| | | |
| | | <view class="list-item" v-for="(item,index) in list" :key="'list-item-'+index"> |
| | | <view class="list-item-show"> |
| | | <view class="item-left"> |
| | | <uni-badge :text="list.length-index" type="primary" size="normal" /> |
| | | </view> |
| | | <view class="item-main"> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æç¼å·</view> |
| | | <view class="content">{{item.materialno}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æåç§°</view> |
| | | <view class="content">{{item.materialname}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æ°é</text></view> |
| | | <view class="content"><input class="enable-input" v-model.number="item.bindquantity" type="number"/></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | <!-- ########### --> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import { parseDic } from '@/static/js/utils/index.js' |
| | | const defaultForm = { |
| | | container:'' |
| | | } |
| | | export default { |
| | | name:'innerTailBackStep1PageContent', |
| | | components:{ScanInputFormItem}, |
| | | data() { |
| | | return { |
| | | form: {...defaultForm}, |
| | | msg:{ |
| | | container:'' |
| | | }, |
| | | msgType:{ |
| | | container:'error' |
| | | }, |
| | | list:[], |
| | | container:null |
| | | } |
| | | }, |
| | | methods:{ |
| | | onSearchContainer(){ |
| | | if (!this.form.container) { |
| | | this.msgType.container = 'error' |
| | | this.msg.container = '请è¾å
¥æçç ï¼'; |
| | | return false; |
| | | } |
| | | this.msg.container = ''; |
| | | this.getContainerInfo() |
| | | }, |
| | | onClearContainer(){ |
| | | this.clearFullContainer() |
| | | }, |
| | | clearFullContainer(){ |
| | | this.clearContainer() |
| | | this.clearBackContainer() |
| | | }, |
| | | clearContainer(){ |
| | | this.form.container = '' |
| | | this.msg.container = '' |
| | | }, |
| | | clearBackContainer(){ |
| | | this.container = null |
| | | this.list = [] |
| | | }, |
| | | getContainerInfo(callback){ |
| | | const __setErrMessage = function(__msg) { |
| | | if (!__msg) { |
| | | __msg = 'ç½ç»é误ï¼è¯·ç¨ååå°è¯ï¼' |
| | | } |
| | | this.msgType.container = 'error' |
| | | this.msg.container = __msg; |
| | | }.bind(this) |
| | | let params = {ContainerCode:this.form.container} |
| | | this.$api.get('TailGetContainer',params,{block:'innerTail',warn:false,fullRes:true}).then((d)=>{ |
| | | if (d.data) { |
| | | if (d.data.wmsContainer) { |
| | | this.container = d.data.wmsContainer |
| | | this.list = d.data.wmsMaterials || [] |
| | | let _temp1 = parseDic(this.$store,'container_status',this.container.containerStatus) |
| | | this.msgType.container = 'info' |
| | | this.msg.container = `尺寸ï¼${this.container.specLength}*${this.container.specWidth}ï¼ç¶æï¼${_temp1}` |
| | | callback && callback(true) |
| | | } else { |
| | | this.clearBackContainer() |
| | | __setErrMessage(d.message) |
| | | callback && callback(false) |
| | | } |
| | | } else { |
| | | this.clearBackContainer() |
| | | __setErrMessage(d.message) |
| | | callback && callback(false) |
| | | } |
| | | }).catch((_errmsg)=>{ |
| | | this.clearBackContainer() |
| | | __setErrMessage(_errmsg) |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | get(){ |
| | | return { |
| | | containerCode:this.container?this.container.containerCode:null, |
| | | wmsMaterials:this.list |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .inner-tail-back-step1-page-content { |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | &>.top-view{ |
| | | flex-shrink: 0; |
| | | } |
| | | &>.list-view{ |
| | | height: 1px; |
| | | overflow: auto; |
| | | flex-grow: 1; |
| | | .list-items-group{ |
| | | padding-top:12rpx; |
| | | .list-item { |
| | | margin-bottom: 12rpx; |
| | | border-width: 2rpx 0; |
| | | border-style: solid; |
| | | border-color: $uni-border-color; |
| | | &:last-child{ |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | .list-item-show{ |
| | | background-color: $uni-bg-color; |
| | | font-size: 1.1em; |
| | | display: flex; |
| | | &>.item-left{ |
| | | flex-shrink: 0; |
| | | padding-left: 16rpx; |
| | | padding-top: 12rpx; |
| | | padding-right: 12rpx; |
| | | } |
| | | &>.item-main{ |
| | | flex-grow: 1; |
| | | width: 1px; |
| | | padding-right: 16rpx; |
| | | } |
| | | .item-row{ |
| | | border-bottom: 2rpx dashed $uni-text-color-grey; |
| | | display: flex; |
| | | &>.label{ |
| | | opacity: .7; |
| | | flex-shrink: 0; |
| | | width: 130rpx; |
| | | padding-top: 11rpx; |
| | | .first-label-inner{ |
| | | display: flex; |
| | | align-items: center; |
| | | .batch-no{ |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | &>.content{ |
| | | width: 1px; |
| | | flex-grow: 1; |
| | | line-height: 1.5em; |
| | | padding: 8rpx 0; |
| | | } |
| | | &:last-child{ |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="inner-tail-back-step2-page-content"> |
| | | <easy-select-form-item |
| | | class="forma-item" |
| | | label="èµ·å§ä½ç½®" |
| | | v-model="form.stationCode" |
| | | :list="selectOptions.startPlaces" |
| | | value-field="stationCode" |
| | | label-field="stationName" |
| | | /> |
| | | |
| | | <easy-select-form-item |
| | | class="forma-item" |
| | | label="ç®æ åº" |
| | | v-model="form.areaId" |
| | | :list="selectOptions.endAreas" |
| | | value-field="areaId" |
| | | label-field="areaName" |
| | | /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import { $alert } from '@/static/js/utils/index.js' |
| | | const defaultForm = { |
| | | stationCode:'', |
| | | areaId:'' |
| | | } |
| | | export default { |
| | | name:'innerTailBackStep2PageContent', |
| | | components:{EasySelectFormItem}, |
| | | data(){ |
| | | return { |
| | | form: {...defaultForm}, |
| | | selectOptions:{ |
| | | endAreas:[], |
| | | startPlaces:[] |
| | | }, |
| | | loaded:false |
| | | } |
| | | }, |
| | | methods:{ |
| | | show(){ |
| | | this.getSelectsOptions((f)=>{ |
| | | if (f) { |
| | | this.resetForm() |
| | | } |
| | | }) |
| | | }, |
| | | resetForm(){ |
| | | if (this.selectOptions.startPlaces.length===1) { |
| | | this.form.stationCode = this.selectOptions.startPlaces[0].stationCode |
| | | } else { |
| | | this.form.stationCode = '' |
| | | } |
| | | if (this.selectOptions.endAreas.length===1) { |
| | | this.form.areaId = this.selectOptions.endAreas[0].areaId |
| | | } else { |
| | | this.form.areaId = '' |
| | | } |
| | | }, |
| | | getSelectsOptions(callback){ |
| | | if (this.loaded) { |
| | | callback && callback(true) |
| | | } else { |
| | | uni.showLoading({ |
| | | title: 'å è½½ä¸...', |
| | | mask:true |
| | | }); |
| | | Promise.all([ |
| | | this.$api.get('TailGetStarPlaceList',{},{block:'innerTail',warn:false,loading:false}), |
| | | this.$api.get('TailGetAreaList',{},{block:'innerTail',warn:false,loading:false}) |
| | | ]).then(res=>{ |
| | | this.selectOptions.startPlaces = res[0] || [] |
| | | this.selectOptions.endAreas = res[1] || [] |
| | | this.loaded = true |
| | | uni.hideLoading(); |
| | | callback && callback(true) |
| | | }).catch(ex=>{ |
| | | uni.hideLoading(); |
| | | $alert(ex) |
| | | callback && callback(false) |
| | | }) |
| | | } |
| | | }, |
| | | get(){ |
| | | return this.form |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .inner-tail-back-step2-page-content{ |
| | | height: 100%; |
| | | overflow: auto; |
| | | .forma-item{ |
| | | margin-bottom: 24rpx; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="䏿é
é"> |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- step 1 start @search="onSearchContainter"--> |
| | | <scan-input-form-item class="forma-item" label="夿工ä½" v-model="form.startPlace" :hasSearch="false" /> |
| | | |
| | | <scan-input-form-item placeholder="è¯·éæ©" :clearable="false" |
| | | :hasScan="false" :hasSearch="false" @click.native="visible=true" class="forma-item" label="䏿æºå·¥ä½" |
| | | v-model="form.endPlace" /> |
| | | <EasyPicker :visible.sync="visible" :list="endPlaceList" labelField="label" valueField="code" |
| | | @select="getEndPlaceVal" /> |
| | | |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template> |
| | | <div class="btn-frame"><u-button text="éç½®" @click="reset" ></u-button></div> |
| | | <div class="btn-frame"><u-button type="primary" :text="actionText" @click="actionHandle" |
| | | :disabled="abled"></u-button></div> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import UViewFormSelectPicker from '@/components/UViewFormSelectPicker.vue' |
| | | import materialList from './modules/materialList.vue' |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | | $successInfo, |
| | | getDicList |
| | | } from '@/static/js/utils/index.js' |
| | | import { |
| | | palceList |
| | | } from '@/service/mixins/mixins.js' |
| | | import { |
| | | getForContainerCode, |
| | | getForMaterialNo, |
| | | bindMaterialContainer, |
| | | addInBound, |
| | | addInVirtualPlace, |
| | | addAGVTask |
| | | } from '@/api/bind.js' |
| | | |
| | | import { |
| | | getLoadingDeliveryEnd, |
| | | loadingDeliveryCreate, |
| | | loadingDeliveryContinueOne, |
| | | loadingDeliveryContinueTWo |
| | | } from '@/api/loadingDelivery.js' |
| | | let initInterVal = null; |
| | | export default { |
| | | name: 'receiveInPage', |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | EasySelectFormItem, |
| | | materialList, |
| | | EasyPicker |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | form: { |
| | | startPlace: '', |
| | | endPlace: '' |
| | | }, |
| | | paramsOne:{}, |
| | | paramsTwo:{}, |
| | | endPlaceList: [], |
| | | visible: false, |
| | | actionType: 1, // 1:å¼å«AGV 2ï¼è£
æå®æ 3ï¼åæå®æ |
| | | } |
| | | }, |
| | | computed: { |
| | | actionText() { |
| | | switch (this.actionType) { |
| | | case 1: |
| | | return 'å¼å«AGV' |
| | | case 2: |
| | | return 'è£
æå®æ' |
| | | case 3: |
| | | return 'åæå®æ' |
| | | } |
| | | }, |
| | | abled() { |
| | | let { |
| | | startPlace, |
| | | endPlace |
| | | } = this.form |
| | | let { |
| | | taskNo |
| | | } =this.paramsOne |
| | | if(this.actionType==1){ |
| | | return !Boolean(endPlace)||!Boolean(startPlace); |
| | | }else{ |
| | | return !Boolean(taskNo); |
| | | } |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | // è·å䏿æºå·¥ä½å表 |
| | | async gerEndPlaceList() { |
| | | try { |
| | | let { |
| | | result |
| | | } = await getLoadingDeliveryEnd(); |
| | | let endPlaceList = [] |
| | | result.forEach(item => { |
| | | endPlaceList.push({ |
| | | code: item, |
| | | label: item |
| | | }) |
| | | }) |
| | | this.endPlaceList = endPlaceList; |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | // 䏿æºå·¥ä½éæ©å¨è¿åå¼ |
| | | getEndPlaceVal(val, valObj, index) { |
| | | this.form.endPlace = valObj.code |
| | | }, |
| | | |
| | | // éç½® |
| | | reset(){ |
| | | this.form={ |
| | | startPlace: '', |
| | | endPlace: '' |
| | | } |
| | | |
| | | this.actionType=1 |
| | | }, |
| | | |
| | | // æä½æé® |
| | | async actionHandle(){ |
| | | if(this.actionType==1) |
| | | { |
| | | // å建AGVä»»å¡ |
| | | try{ |
| | | let {result}=await loadingDeliveryCreate(this.form) |
| | | this.paramsOne=result |
| | | this.$modal('å¼å«AGVæå') |
| | | this.actionType=2 |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }else if(this.actionType==2){ |
| | | if(!this.paramsOne.taskNo) this.$modal('ä»»å¡å·ä¸è½ä¸ºç©ºï¼') |
| | | try{ |
| | | await loadingDeliveryContinueOne(this.paramsOne) |
| | | this.$modal('è£
æå®æ') |
| | | this.actionType=3 |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }else if(this.actionType==3){ |
| | | if(!this.paramsOne.taskNo) this.$modal('ä»»å¡å·ä¸è½ä¸ºç©ºï¼') |
| | | try{ |
| | | await loadingDeliveryContinueTwo(this.paramsOne) |
| | | this.$modal('åæå®æ') |
| | | this.reset() |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | }, 200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | mixins: [palceList], |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | this.gerEndPlaceList() |
| | | }) |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | &>.label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-swipe-action v-if="materialData.length>0"> |
| | | <u-swipe-action-item :options="options" v-for="(item,index) in materialData" |
| | | :key="'material-list-item-'+index" style="margin-bottom: 20rpx;" |
| | | @click="deleteItem" :index="index" :name="item.materialId"> |
| | | <view class="material-item-group"> |
| | | <view class="material-list-item" > |
| | | <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> |
| | | <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æå¯ä¸ç ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialId}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æåç§°ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialName}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ä»¶å·ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialNo}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ä¾åºåï¼</view> |
| | | <view class="content auto-wrap">{{item.supplierCode}}</view> |
| | | </view> |
| | | |
| | | <view class="item-row"> |
| | | <view class="label">ç©æç±»åï¼</view> |
| | | <!-- æä¸¾ --> |
| | | <view class="content auto-wrap">{{parseDic($store,'material_type',item.materialType)}}</view> |
| | | |
| | | </view> |
| | | |
| | | <!-- <view class="item-row"> |
| | | <view class="label">è§æ ¼ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialSpec}}</view> |
| | | </view> --> |
| | | <view class="item-row"> |
| | | <view class="label">æºåï¼</view> |
| | | <view class="content auto-wrap">{{parseDic($store,'material_modal',item.materialModel)}}</view> |
| | | </view> |
| | | <!-- <view class="item-row"> |
| | | <view class="label">æ°éï¼</view> |
| | | <view class="content auto-wrap">{{item.stockNumber}}</view> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | materialData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style:{ |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }], |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic, |
| | | deleteItem({name}){ |
| | | this.$emit('delMaterialData',name) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .material-item-group { |
| | | /* background-color: transparent!impor; */ |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* text-align: right; */ |
| | | /* font-weight:5; */ |
| | | width: 180rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <full-page-layout :safety="false"> |
| | | <view class="login-page"> |
| | | <view class="login-content"> |
| | | <view class="content-row1"> |
| | | <image class="logo-img" mode="aspectFit" src="/static/img/logo.png"></image> |
| | | </view> |
| | | <view class="content-row2">管å线</view> |
| | | <view class="content-row3">-LMESDemo-</view> |
| | | <view class="form-view"> |
| | | <u-form ref="form" :model="form" :rules="rules" :labelWidth="0"> |
| | | <u-form-item prop="account"> |
| | | <u-input v-model.trim="form.account" prefix-icon="account" clearable> |
| | | <template v-slot:suffix v-if="userVisited.length>1"> |
| | | <view @tap.stop="onOpenUserPicker"> |
| | | <u-icon name="arrow-down"></u-icon> |
| | | </view> |
| | | </template> |
| | | </u-input> |
| | | </u-form-item> |
| | | <u-form-item prop="password"> |
| | | <input type="password" style="display:none;" /> |
| | | <u-input v-model.trim="form.password" :password="pwdVisible?false:true" prefix-icon="lock" clearable @confirm="onLogin" :key="pwdKey"> |
| | | <template v-slot:suffix> |
| | | <view @tap.stop="onChangePwdVisible"> |
| | | <u-icon :name="pwdVisible?'eye-fill':'eye-off'"></u-icon> |
| | | </view> |
| | | </template> |
| | | </u-input> |
| | | </u-form-item> |
| | | </u-form> |
| | | <view class="login-btn-view"> |
| | | <u-button type="primary" text="ç» å½" @click="onLogin"></u-button> |
| | | </view> |
| | | <!-- form-view end --> |
| | | </view> |
| | | </view> |
| | | <view class="login-footer" v-if="version">åºç¨çæ¬å· {{version}}</view> |
| | | </view> |
| | | |
| | | <view class="setting-target" :style="{top:safetyTop+'px'}" @tap.stop="onOpenSettingPicker"> |
| | | <u-icon name="setting-fill"></u-icon> |
| | | </view> |
| | | |
| | | <easy-picker :visible.sync="userPickerVisible" :list="userVisited" value-field="account" label-field="account" @select="onChangeInputUser"></easy-picker> |
| | | <easy-picker :visible.sync="settingPickerVisible" :list="settingList" @select="onGoSettingPage"></easy-picker> |
| | | </full-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import FullPageLayout from '@/components/FullPageLayout.vue' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import { downloadApk } from '@/static/js/utils/index.js' |
| | | export default { |
| | | name:'loginPage', |
| | | components:{FullPageLayout,EasyPicker}, |
| | | data(){ |
| | | return { |
| | | form:{ |
| | | account:'', |
| | | password:'' |
| | | }, |
| | | rules:{ |
| | | account:{ |
| | | trigger:['change'], |
| | | required: true, |
| | | message:'请è¾å
¥è´¦å·ï¼' |
| | | }, |
| | | password:{ |
| | | trigger:['change'], |
| | | required: true, |
| | | message:"请è¾å
¥å¯ç ï¼" |
| | | } |
| | | }, |
| | | version:'', |
| | | userVisited:[], |
| | | userPickerVisible:false, |
| | | settingList:['èçè¿æ¥','æ¥å£åå'], |
| | | settingPickerVisible:false, |
| | | pwdVisible:false, |
| | | safetyTop:0, |
| | | pwdKey:0 |
| | | } |
| | | }, |
| | | methods:{ |
| | | onChangePwdVisible(){ |
| | | this.pwdVisible = !this.pwdVisible |
| | | this.pwdKey = new Date().getTime() |
| | | }, |
| | | onLogin(){ |
| | | //ææ¶è·³è¿éªè¯ ãEditby shaocx,2025-05-14ã |
| | | uni.navigateTo({url:this.$config.path.home}); |
| | | /* |
| | | this.$refs.form.validate().then(res => { |
| | | uni.showLoading({ title: 'Loading...', mask:true }); |
| | | let account = this.$store.getters['user/getAccount']; |
| | | if (account && account===this.form.account){ |
| | | this.getLoginInfo(f=>{ |
| | | if (f) { |
| | | uni.navigateTo({url:this.$config.path.home}) |
| | | } |
| | | }) |
| | | } else { |
| | | this.doLogin((f1)=>{ |
| | | if (f1) { |
| | | this.getLoginInfo(f2=>{ |
| | | if (f2) { |
| | | uni.navigateTo({url:this.$config.path.home}) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }).catch(errors => { |
| | | |
| | | }) |
| | | //*/ |
| | | }, |
| | | doLogin(callback){ |
| | | let _params = {...this.form} |
| | | this.$api.post('sysAuth/login',_params,{needToken:false,loading:false}).then((d)=>{ |
| | | this.$store.commit('user/setAccount',this.form.account) |
| | | //console.log('login sercer token',d) |
| | | this.$store.commit('user/setToken',d) |
| | | this.$store.commit('user/addVisited',{...this.form}) |
| | | callback && callback(true) |
| | | }).catch(()=>{ |
| | | uni.hideLoading() |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | getLoginInfo(callback){ |
| | | Promise.all([ |
| | | this.$api.get('sysMenu/getPdaLoginUser',{},{loading:false}), |
| | | this.$api.get('sysDictType/allList',{},{loading:false}), |
| | | // this.$api.get('tree',{},{block:'sysDic',loading:false}) |
| | | ]).then((response)=>{ |
| | | let _user = {...response[0]} |
| | | //console.log('_user',_user) |
| | | delete _user.loginEmpInfo; |
| | | delete _user.apps; |
| | | delete _user.menus; |
| | | this.$store.commit('user/setUserInfo',_user) |
| | | this.$store.commit('system/setEnum',response[1]) |
| | | // this.$store.commit('system/setEnum',response[1]) |
| | | //console.log(response[1]) |
| | | uni.hideLoading() |
| | | callback && callback(true) |
| | | }).catch(()=>{ |
| | | uni.hideLoading() |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | onOpenUserPicker(){ |
| | | this.userPickerVisible = true |
| | | }, |
| | | onChangeInputUser(val,obj){ |
| | | this.form.account = obj.account |
| | | this.form.password = obj.password |
| | | }, |
| | | onOpenSettingPicker(){ |
| | | this.settingPickerVisible = true |
| | | }, |
| | | onGoSettingPage(val){ |
| | | if (val==='èçè¿æ¥') { |
| | | uni.navigateTo({url:this.$config.path.bluetooth}) |
| | | } else if (val==='æ¥å£åå') { |
| | | uni.navigateTo({url:this.$config.path.host}) |
| | | } else if (val==='æ°çä¸è½½') { |
| | | downloadApk(this.$config) |
| | | } |
| | | }, |
| | | getVersion(){ |
| | | this.version = this.$store.getters['system/getVersion'] |
| | | } |
| | | }, |
| | | onLoad(){ |
| | | this.getVersion() |
| | | this.safetyTop = this.$store.getters['system/getSafety'].top; |
| | | if (process.env.NODE_ENV!=='development') { |
| | | this.settingList.push('æ°çä¸è½½') |
| | | } |
| | | }, |
| | | onReady() { |
| | | //è¿å
¥ç»å½é¡µé¢å°±æ¸
æ¥ç»å½ä¿¡æ¯ |
| | | this.$store.commit('user/clear') |
| | | //è·åä¹åçç¨æ·ä¿¡æ¯ |
| | | this.userVisited = this.$store.getters['user/getVisited']; |
| | | if (this.userVisited.length===1) { |
| | | this.form.account = this.userVisited[0].account |
| | | this.form.password = this.userVisited[0].password |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .login-page{ |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .login-content{ |
| | | flex-grow: 1; |
| | | overflow: auto; |
| | | position: relative; |
| | | .content-row1{ |
| | | height: 400rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: flex-end; |
| | | .logo-img{ |
| | | height: 70%; |
| | | width: 50%; |
| | | } |
| | | } |
| | | .content-row2,.content-row3{ |
| | | text-align: center; |
| | | } |
| | | .content-row2{ |
| | | font-size: 56rpx; |
| | | font-weight: bold; |
| | | } |
| | | .content-row3{ |
| | | font-size: 40rpx; |
| | | padding-top: 20rpx; |
| | | color: $uni-text-color-grey; |
| | | } |
| | | .form-view{ |
| | | padding: 50rpx 40rpx 0 40rpx; |
| | | .login-form-item{ |
| | | margin-bottom: 32rpx; |
| | | } |
| | | .login-btn-view{ |
| | | padding-top: 20rpx; |
| | | } |
| | | } |
| | | } |
| | | .login-footer{ |
| | | flex-shrink: 0; |
| | | padding: 10rpx 10rpx 4rpx 10rpx; |
| | | font-size: 24rpx; |
| | | color: $uni-text-color-grey; |
| | | text-align: right; |
| | | } |
| | | .more-user-icon-btn{ |
| | | padding: 0 10rpx; |
| | | font-size: 1.2em; |
| | | } |
| | | } |
| | | .setting-target{ |
| | | $targetSize:80rpx; |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | width: $targetSize; |
| | | height: $targetSize; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 5; |
| | | font-size: 40rpx; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="人工åºåº" > |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content manual-out-page"> |
| | | <!-- page start --> |
| | | <view class="top-search"> |
| | | <scan-input-form-item |
| | | label="æçç¼ç " |
| | | v-model="form.containter" |
| | | :msg="msg.containter" |
| | | :msg-type="msgType.containter" |
| | | @search="onSearch" |
| | | @clear="onClearContainer" |
| | | /> |
| | | </view> |
| | | <template v-if="list.length>0"> |
| | | <view class="materials-header"> |
| | | <view class="header-row"> |
| | | <view class="line"></view> |
| | | <view class="title"> |
| | | <text class="text">ç©æè¯¦æ
</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="materials-block"> |
| | | <view class="materials-block-padding"> |
| | | <view class="materials-box"> |
| | | <view class="material-item-group"> |
| | | <view class="material-list-item" v-for="(item,index) in list" :key="'material-list-item-'+index"> |
| | | <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialno}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æåç§°ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialname}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æ¹æ¬¡å·ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialbatch}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">è§æ ¼ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialspec}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">å¯åº¦ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialDensity}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æ°éï¼</view> |
| | | <view class="content auto-wrap">{{item.bindquantity}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- page end --> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <div class="btn-frame left-btn-frame"><u-button text="é ç½®" @click="onReset"></u-button></div> |
| | | <div class="btn-frame right-btn-frame"><u-button type="primary" text="ç¡® å®" :disabled="(!containter || containter.containerstatus!==3)" @click="onConfirm"></u-button></div> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import { parseDic, $successInfo } from '@/static/js/utils/index.js' |
| | | let initInterVal = null; |
| | | const defaultForm = { |
| | | containter:'' |
| | | } |
| | | export default { |
| | | name:'manualOutPage', |
| | | components:{DefaultHeaderPageLayout,ActionUserRow,ScanInputFormItem}, |
| | | data(){ |
| | | return { |
| | | pageBodyHeight:0, |
| | | form:{...defaultForm}, |
| | | msg:{ |
| | | containter:'' |
| | | }, |
| | | msgType:{ |
| | | containter:'error' |
| | | }, |
| | | containter:null, |
| | | list:[] |
| | | } |
| | | }, |
| | | methods:{ |
| | | /* æçç¼ç æç´¢ */ |
| | | onSearch(){ |
| | | if (!this.form.containter) { |
| | | this.msgType.containter = 'error' |
| | | this.msg.containter = '请è¾å
¥æçç¼å·ï¼'; |
| | | return false; |
| | | } |
| | | this.msg.containter = ''; |
| | | this.getData() |
| | | }, |
| | | /* æ¸
餿çç¼ç */ |
| | | onClearContainer(){ |
| | | this.resetContainer() |
| | | }, |
| | | /* éç½®æçç¼ç */ |
| | | resetContainer(){ |
| | | this.form.containter = '' |
| | | this.msg.containter = '' |
| | | this.containter = null |
| | | this.list = [] |
| | | }, |
| | | /* è·åæçä¿¡æ¯ */ |
| | | getData(){ |
| | | let params = {Containercode:this.form.containter} |
| | | this.$api.get('PDAGetContainer',params,{block:'exware',fullRes:true}).then((d)=>{ |
| | | if (d.data) { |
| | | let _temp1 = parseDic(this.$store,'container_type',d.data.wmsContainer.containertype) |
| | | let _temp2 = parseDic(this.$store,'container_status',d.data.wmsContainer.containerstatus) |
| | | this.msgType.containter = 'info' |
| | | this.msg.containter = `æè´¨ï¼${_temp1}ï¼ç¶æï¼${_temp2}`; |
| | | this.containter = d.data.wmsContainer |
| | | if (d.data.wmsMaterials) { |
| | | this.list = d.data.wmsMaterials |
| | | } else { |
| | | this.list = [] |
| | | } |
| | | } else { |
| | | this.msgType.containter = 'error' |
| | | this.msg.containter = d.message || 'æ¥æ ä¿¡æ¯ï¼'; |
| | | this.containter = null; |
| | | this.list = [] |
| | | } |
| | | }).catch(()=>{ |
| | | this.containter = null; |
| | | }) |
| | | }, |
| | | /* ååºéç½®æé® */ |
| | | onReset(){ |
| | | this.resetContainer() |
| | | }, |
| | | /* ååºç¡®è®¤æé® */ |
| | | onConfirm(){ |
| | | this.dealSubmit((f)=>{ |
| | | if (f) { |
| | | this.resetContainer() |
| | | $successInfo('åºåºæåï¼'); |
| | | } |
| | | }) |
| | | }, |
| | | /* åºåºæ¥å£è°ç¨ */ |
| | | dealSubmit(callback){ |
| | | let params = { |
| | | containercode:this.containter.containercode |
| | | } |
| | | this.$api.post('PDAManualWare',params,{block:'exware'}).then(()=>{ |
| | | callback && callback(true) |
| | | }).catch(()=>{ |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback){ |
| | | initInterVal = setInterval(()=>{ |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | },200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval(){ |
| | | try{ |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady(){ |
| | | this.startInitInterval(()=>{ |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | }) |
| | | }, |
| | | onUnload(){ |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .manual-out-page{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | .materials-header,.top-search{ |
| | | flex-shrink: 0; |
| | | } |
| | | .materials-header{ |
| | | padding: 12rpx 16rpx 0 16rpx; |
| | | .header-row{ |
| | | position: relative; |
| | | top:0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 50rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | background-color: $uni-bg-color; |
| | | &>.line{ |
| | | width: 100%; |
| | | height: 2rpx; |
| | | background-color: $uni-border-color; |
| | | } |
| | | &>.title{ |
| | | position: absolute; |
| | | top:0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 1; |
| | | &>.text{ |
| | | font-size: 30rpx; |
| | | background-color: $uni-bg-color; |
| | | color: $uni-border-color; |
| | | padding: 4rpx 12rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .materials-block{ |
| | | flex-grow: 1; |
| | | overflow: auto; |
| | | .materials-block-padding{ |
| | | padding: 0 16rpx; |
| | | .materials-box{ |
| | | background-color: $uni-bg-color; |
| | | border-radius: 6rpx; |
| | | box-sizing: border-box; |
| | | position: relative; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .bottom-btns-row{ |
| | | display: flex; |
| | | padding: 10rpx 0; |
| | | background-color: #fff; |
| | | .btn-frame{ |
| | | width: 50%; |
| | | box-sizing: border-box; |
| | | } |
| | | .left-btn-frame{ |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | .right-btn-frame{ |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | .material-item-group{ |
| | | padding: 0 4rpx; |
| | | .material-list-item{ |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | &:last-child{ |
| | | border-bottom: 0; |
| | | } |
| | | .item-row{ |
| | | display: flex; |
| | | &>.label{ |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | &>.content{ |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | } |
| | | } |
| | | .badge-box{ |
| | | position: absolute; |
| | | top:8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="ç©æå
¥åº"> |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- step 1 start @search="onSearchContainter"--> |
| | | <view v-if="!addMaterialVisible"> |
| | | <scan-input-form-item class="forma-item" label="å¨ä½ç " v-model="form.startPlace" :hasSearch="false" /> |
| | | |
| | | <scan-input-form-item placeholder="è¯·éæ©" :clearable="false" :hasScan="false" :hasSearch="false" |
| | | @click.native="visible=true" class="forma-item" label="ä»»å¡ç±»å" v-model="form.endPlace" /> |
| | | <EasyPicker :visible.sync="visible" :list="taskTypeList" labelField="label" valueField="code" |
| | | @select="getEndPlaceVal" /> |
| | | </view> |
| | | <addMaterial v-if="addMaterialVisible" ref="addMaterial" :materialData="materialData" |
| | | @delMaterialData="delMaterialData" /> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template> |
| | | <div class="btn-frame" v-if="!addMaterialVisible"><u-button text="æ·»å ç©æ" |
| | | @click="addMaterial"></u-button></div> |
| | | <div class="btn-frame" v-if="addMaterialVisible"><u-button text="è¿å" @click="back"></u-button></div> |
| | | <div class="btn-frame"><u-button :disabled="abled" type="primary" text="æäº¤" @click="actionHandle"></u-button></div> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import EasyPicker from '@/components/EasyPicker.vue' |
| | | import UViewFormSelectPicker from '@/components/UViewFormSelectPicker.vue' |
| | | import addMaterial from './modules/addMaterial.vue' |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | | $successInfo, |
| | | getDicList |
| | | } from '@/static/js/utils/index.js' |
| | | |
| | | import { |
| | | getLoadingDeliveryEnd, |
| | | loadingDeliveryCreate, |
| | | loadingDeliveryContinueOne, |
| | | loadingDeliveryContinueTWo |
| | | } from '@/api/loadingDelivery.js' |
| | | let initInterVal = null; |
| | | export default { |
| | | name: 'receiveInPage', |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | EasySelectFormItem, |
| | | addMaterial, |
| | | EasyPicker |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | form: { |
| | | startPlace: '', |
| | | endPlace: '' |
| | | }, |
| | | paramsOne: {}, |
| | | paramsTwo: {}, |
| | | taskTypeList: [{ |
| | | code: 1, |
| | | label: '人工' |
| | | }, |
| | | { |
| | | code: 2, |
| | | label: 'AGV' |
| | | }, |
| | | |
| | | ], |
| | | materialData: [{ |
| | | materialId: 20241206, |
| | | materialName: 'ç©æåç§°2', |
| | | materialNo: '002', |
| | | }], |
| | | visible: false, |
| | | addMaterialVisible: false |
| | | } |
| | | }, |
| | | computed: { |
| | | abled() { |
| | | let { |
| | | startPlace, |
| | | endPlace |
| | | } = this.form |
| | | return !Boolean(endPlace) || !Boolean(startPlace)||this.materialData.length<=0; |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | // è·å䏿æºå·¥ä½å表 |
| | | async gerEndPlaceList() { |
| | | try { |
| | | let { |
| | | result |
| | | } = await getLoadingDeliveryEnd(); |
| | | let endPlaceList = [] |
| | | result.forEach(item => { |
| | | endPlaceList.push({ |
| | | code: item, |
| | | label: item |
| | | }) |
| | | }) |
| | | // this.taskTypeList = endPlaceList; |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | // 䏿æºå·¥ä½éæ©å¨è¿åå¼ |
| | | getEndPlaceVal(val, valObj, index) { |
| | | this.form.endPlace = valObj.code |
| | | }, |
| | | |
| | | // æ·»å ç©æ |
| | | addMaterial() { |
| | | this.addMaterialVisible = true |
| | | }, |
| | | |
| | | //å é¤ç©æ |
| | | delMaterialData(materialId) { |
| | | this.materialData = this.materialData.filter(item => item.materialId != materialId) |
| | | }, |
| | | |
| | | // è¿åæé® |
| | | back() { |
| | | this.addMaterialVisible = false |
| | | this.materialData = this.$refs.addMaterial.get() |
| | | console.log(this.materialData, 'this.materialData'); |
| | | }, |
| | | |
| | | // æä½æé® |
| | | async actionHandle() { |
| | | if (this.actionType == 1) { |
| | | // å建AGVä»»å¡ |
| | | try { |
| | | let { |
| | | result |
| | | } = await loadingDeliveryCreate(this.form) |
| | | this.paramsOne = result |
| | | this.$modal('å¼å«AGVæå') |
| | | this.actionType = 2 |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | } else if (this.actionType == 2) { |
| | | if (!this.paramsOne.taskNo) this.$modal('ä»»å¡å·ä¸è½ä¸ºç©ºï¼') |
| | | try { |
| | | await loadingDeliveryContinueOne(this.paramsOne) |
| | | this.$modal('è£
æå®æ') |
| | | this.actionType = 3 |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | } else if (this.actionType == 3) { |
| | | if (!this.paramsOne.taskNo) this.$modal('ä»»å¡å·ä¸è½ä¸ºç©ºï¼') |
| | | try { |
| | | await loadingDeliveryContinueTwo(this.paramsOne) |
| | | this.$modal('åæå®æ') |
| | | this.reset() |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | }, 200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | this.gerEndPlaceList() |
| | | }) |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | &>.label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <!-- @clear="onClearMaterial" --> |
| | | <scan-input-form-item class="forma-item" label="ç©æäºç»´ç " v-model="materialNo" @search="onSearchMaterial" /> |
| | | <materialList v-on="$listeners" ref="materialList" :materialData="materialData" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import materialList from './materialList.vue' |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | | $successInfo, |
| | | getDicList |
| | | } from '@/static/js/utils/index.js' |
| | | export default { |
| | | components: { |
| | | ScanInputFormItem, |
| | | materialList |
| | | }, |
| | | props:{ |
| | | materialData:{ |
| | | type:Array, |
| | | default:()=>[] |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | materialNo: '' |
| | | } |
| | | }, |
| | | methods: { |
| | | /* ç©æç¼ç æç´¢ */ |
| | | async onSearchMaterial() { |
| | | if (!this.materialNo) { |
| | | $alert('请è¾å
¥ç©æç¼å·ï¼'); |
| | | return false; |
| | | } |
| | | try { |
| | | // let { |
| | | // result |
| | | // } = await getForMaterialNo({ |
| | | // code: this.materialNo |
| | | // }) |
| | | let result={ |
| | | materialId:20241205, |
| | | materialName:'ç©æåç§°1', |
| | | materialNo:'001', |
| | | |
| | | } |
| | | const isExist = this.materialData.some(item => item.materialId == result.materialId) |
| | | if (!isExist) { |
| | | this.materialData.push(result) |
| | | } else { |
| | | $alert(`ç©æå¯ä¸ç å·²åå¨,请å é¤ååè¾å
¥ï¼`); |
| | | } |
| | | this.materialNo='' |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | |
| | | |
| | | // è¿åæ°æ® |
| | | get(){ |
| | | return this.materialData |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-swipe-action v-if="materialData.length>0"> |
| | | <u-swipe-action-item :options="options" v-for="(item,index) in materialData" |
| | | :key="'material-list-item-'+index" style="margin-bottom: 20rpx;" |
| | | @click="deleteItem" :index="index" :name="item.materialId"> |
| | | <view class="material-item-group"> |
| | | <view class="material-list-item" > |
| | | <!-- <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> --> |
| | | <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æå¯ä¸ç ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialId}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æåç§°ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialName}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ä»¶å·ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialNo}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ä¾åºåï¼</view> |
| | | <view class="content auto-wrap">{{item.supplierCode}}</view> |
| | | </view> |
| | | |
| | | <view class="item-row"> |
| | | <view class="label">ç©æç±»åï¼</view> |
| | | <!-- æä¸¾ --> |
| | | <view class="content auto-wrap">{{parseDic($store,'material_type',item.materialType)}}</view> |
| | | |
| | | </view> |
| | | |
| | | <!-- <view class="item-row"> |
| | | <view class="label">è§æ ¼ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialSpec}}</view> |
| | | </view> --> |
| | | <view class="item-row"> |
| | | <view class="label">æºåï¼</view> |
| | | <view class="content auto-wrap">{{parseDic($store,'material_modal',item.materialModel)}}</view> |
| | | </view> |
| | | <!-- <view class="item-row"> |
| | | <view class="label">æ°éï¼</view> |
| | | <view class="content auto-wrap">{{item.stockNumber}}</view> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | materialData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style:{ |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }], |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic, |
| | | deleteItem({name}){ |
| | | this.$emit('delMaterialData',name) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .material-item-group { |
| | | /* background-color: transparent!impor; */ |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* text-align: right; */ |
| | | /* font-weight:5; */ |
| | | width: 180rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="è®¾å¤æ¥è¦" > |
| | | <view class="page-frame notices-page-container" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <view class="container-top-tabs"> |
| | | <view v-for="(item,index) in tabs" :key="'tab-item-'+index" class="tab-item" :class="[item.value===activeTab?'active':'']" @tap.stop="onChangeActiveTab(item.value)">{{item.label}}</view> |
| | | </view> |
| | | <scroll-view class="notices-list" :scroll-y="true"> |
| | | <view class="notice-list-item"> |
| | | <view class="item-left"> |
| | | <view class="circle-no">1</view> |
| | | <u-tag text="å
³é" plain size="mini" type="info" /> |
| | | </view> |
| | | <view class="item-context"> |
| | | <view class="item-row"> |
| | | <view class="label">æ¥è¦è®¾å¤ï¼</view> |
| | | <view class="content auto-wrap">è¿æè¡¬å¥ç²¾æ´ä¸æº</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æ¥è¦æ¶é´ï¼</view> |
| | | <view class="content auto-wrap">2022.3.5 12:00:52</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">é误代ç ï¼</view> |
| | | <view class="content auto-wrap">xxx001</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">é误信æ¯ï¼</view> |
| | | <view class="content auto-wrap">æå¤§å¥å¤§ä½¿é¦çå£åèµÂ·ååæ²å²å¿½å°åçå¸åæ¹æ³è¿åç§æåæ¯è¦
uahfihfaiuhè¡è¡ä»½è§å</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="notice-list-item"> |
| | | <view class="item-left"> |
| | | <view class="circle-no">99</view> |
| | | <u-tag text="æèµ·" plain size="mini" type="error" /> |
| | | </view> |
| | | <view class="item-context"> |
| | | <view class="item-row"> |
| | | <view class="label">æ¥è¦è®¾å¤ï¼</view> |
| | | <view class="content auto-wrap">è¿æè¡¬å¥ç²¾æ´ä¸æº</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æ¥è¦æ¶é´ï¼</view> |
| | | <view class="content auto-wrap">2022.3.5 12:00:52</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">é误代ç ï¼</view> |
| | | <view class="content auto-wrap">xxx003</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">é误信æ¯ï¼</view> |
| | | <view class="content auto-wrap">æå¤§å¥å¤§ä½¿é¦çå£åèµÂ·ååæ²å²å¿½å°åçå¸åæ¹æ³è¿åç§æåæ¯è¦
uahfihfaiuhè¡è¡ä»½è§å</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="no-more-text-row">ä¸è½æ´å¤äº</view> |
| | | </scroll-view> |
| | | </view> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | let initInterVal = null; |
| | | export default { |
| | | name:'noticesPage', |
| | | components:{DefaultHeaderPageLayout}, |
| | | data(){ |
| | | return { |
| | | pageBodyHeight:0, |
| | | tabs:[ |
| | | {value:0,label:'å
¨é¨'}, |
| | | {value:1,label:'æèµ·'}, |
| | | {value:2,label:'å
³é'} |
| | | ], |
| | | activeTab:0, |
| | | maxListNumber:99 |
| | | } |
| | | }, |
| | | methods:{ |
| | | onChangeActiveTab(val){ |
| | | this.activeTab = val |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback){ |
| | | initInterVal = setInterval(()=>{ |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | },200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval(){ |
| | | try{ |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady(){ |
| | | this.startInitInterval(()=>{ |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | }) |
| | | }, |
| | | onUnload(){ |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .notices-page-container{ |
| | | $topSize:80rpx; |
| | | box-sizing: border-box; |
| | | padding-top: $topSize; |
| | | .container-top-tabs{ |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: $topSize; |
| | | box-sizing: border-box; |
| | | background-color: $uni-bg-color; |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | display: flex; |
| | | .tab-item{ |
| | | width: 33.3333%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-weight: bold; |
| | | font-size: 36rpx; |
| | | &.active{ |
| | | color: $u-primary; |
| | | } |
| | | } |
| | | } |
| | | .notices-list{ |
| | | height: 100%; |
| | | .notice-list-item{ |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | margin-bottom: 10rpx; |
| | | background-color: $uni-bg-color; |
| | | box-shadow: 0px 2rpx 6rpx rgba(34, 25, 25, 0.2); |
| | | display: flex; |
| | | &:last-child{ |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | .item-left{ |
| | | width: 100rpx; |
| | | flex-shrink: 0; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | padding-top: 10rpx; |
| | | .circle-no{ |
| | | $circleNoSize:50rpx; |
| | | min-width: $circleNoSize; |
| | | height: $circleNoSize; |
| | | background-color: $u-primary; |
| | | color: $uni-bg-color; |
| | | border-radius: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-bottom: 10rpx; |
| | | } |
| | | } |
| | | .item-context{ |
| | | flex-grow: 1; |
| | | .item-row{ |
| | | display: flex; |
| | | &>.label{ |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | &>.content{ |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="å¨ä½ç®¡ç"> |
| | | <view |
| | | class="page-frame with-action-user-row" |
| | | :style="{ height: pageBodyHeight + 'px' }" |
| | | v-if="pageBodyHeight" |
| | | > |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <selectItem |
| | | :selectData="areaData" |
| | | :value.sync="form.areaNo" |
| | | label="åºåºç¼ç " |
| | | labelField="areaName" |
| | | valueField="areaNo" |
| | | /> |
| | | |
| | | <selectItemWc2 |
| | | :selectData="placeList" |
| | | :value.sync="form.placeNo" |
| | | label="åºä½ç¼ç " |
| | | labelField="placeNo" |
| | | valueField="placeNo" |
| | | @getPropData="getPropData" |
| | | :msg="msg.placeNoInfo" |
| | | @confirmHc="getStockPageHandle" |
| | | /> |
| | | |
| | | <!-- æçç¼ç --> |
| | | <scan-input-form-item |
| | | class="forma-item" |
| | | label="æçç¼ç " |
| | | :disabled="true" |
| | | v-model="form.containterCode" |
| | | :msg="msg.containter" |
| | | :msg-type="msgType.containter" |
| | | @search="onSearchContainter" |
| | | @clear="onClearContainter" |
| | | :hasScan="false" |
| | | :hasSearch="false" |
| | | /> |
| | | <scan-input-form-item |
| | | placeholder="è¯·éæ©" |
| | | :clearable="false" |
| | | :hasScan="false" |
| | | :hasSearch="false" |
| | | @click.native="ctVisible = true" |
| | | class="forma-item" |
| | | label="æçç±»å" |
| | | v-model="form.containerType" |
| | | /> |
| | | <EasyPicker |
| | | :visible.sync="ctVisible" |
| | | :list="ContainerType" |
| | | labelField="value" |
| | | valueField="code" |
| | | @select="getTypeVal" |
| | | /> |
| | | |
| | | <view |
| | | class="scan-input-form-item-compontent" |
| | | style="background-color: white; display: flex" |
| | | > |
| | | <view class="p-form-label"> æ¯å¦éå®è§£éï¼</view> |
| | | <u-radio-group v-model="form.islock"> |
| | | <u-radio label="æ¯" name="1"></u-radio> |
| | | <u-radio style="margin-left: 10px" label="å¦" name="0"></u-radio> |
| | | </u-radio-group> |
| | | </view> |
| | | <br /> |
| | | <!-- å»ç»åå --> |
| | | <scan-input-form-item |
| | | v-if="form.islock" |
| | | class="forma-item" |
| | | label="éæºå¶åå " |
| | | v-model="form.lockReason" |
| | | :hasScan="false" |
| | | :hasSearch="false" |
| | | @clear="onClearContainter" |
| | | /> |
| | | |
| | | <view |
| | | class="scan-input-form-item-compontent" |
| | | style="background-color: white; display: flex" |
| | | > |
| | | <view class="p-form-label"> æ¯å¦ç©ºæï¼{{ titleContainer }}</view> |
| | | </view> |
| | | <br /> |
| | | <materialList |
| | | :materialData="materialData" |
| | | @delMaterialData="delMaterialData" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template> |
| | | <!-- <div class="btn-frame"> |
| | | <u-button text="éç½®" @click="onClearContainter"></u-button> |
| | | </div> --> |
| | | <div class="btn-frame"> |
| | | <u-button |
| | | text="置为空æ" |
| | | @click="oneTouchUnBindHandle(1)" |
| | | ></u-button> |
| | | </div> |
| | | <!-- åºä½è§£é --> |
| | | <div class="btn-frame"> |
| | | <u-button text="éå®" @click="placebatchUpdate(1)"></u-button> |
| | | </div> |
| | | <div class="btn-frame" style="margin:0 5px;"> |
| | | <u-button text="è§£é" @click="placebatchUpdate(2)"></u-button> |
| | | </div> |
| | | <div class="btn-frame"> |
| | | <u-button |
| | | type="primary" |
| | | text="æ¸
é¤åºå" |
| | | @click="oneTouchUnBindHandle(2)" |
| | | ></u-button> |
| | | </div> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from "@/components/DefaultHeaderPageLayout.vue"; |
| | | import ActionUserRow from "@/components/ActionUserRow.vue"; |
| | | import ScanInputFormItem from "@/components/ScanInputFormItem.vue"; |
| | | import selectItem from "@/components/selectItem.vue"; |
| | | import selectItemWc2 from "@/components/selectItemWithSearchWc2.vue"; |
| | | import placeInfo from "./modules/placeInfo.vue"; |
| | | import containerInfo from "./modules/containerInfo.vue"; |
| | | import { $alert, getDicList } from "@/static/js/utils/index.js"; |
| | | import { palceList } from "@/service/mixins/mixins.js"; |
| | | import { getForContainerCode } from "@/api/bind.js"; |
| | | import EasyPicker from "@/components/EasyPicker.vue"; |
| | | import { |
| | | oneTouchUnBindHandle, |
| | | StockPageForPdaCwgl, |
| | | placebatchUpdate, |
| | | } from "@/api/containerHandle.js"; |
| | | import { getAreaInfo } from "@/api/common.js"; |
| | | import materialList from "./modules/materialList.vue"; |
| | | import { parseDic } from "@/static/js/utils/index.js"; |
| | | let initInterVal = null; |
| | | export default { |
| | | name: "containerHandle", |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | placeInfo, |
| | | selectItem, |
| | | containerInfo, |
| | | materialList, |
| | | EasyPicker, |
| | | selectItemWc2, |
| | | }, |
| | | data() { |
| | | return { |
| | | ContainerType: [], |
| | | ctVisible: false, |
| | | pageBodyHeight: 0, |
| | | containter: null, |
| | | form: { |
| | | containterCode: "", |
| | | areaNo: "", |
| | | placeNo: "", |
| | | sorting: "", |
| | | containerTypeCode: 0, |
| | | containerType: "", |
| | | }, |
| | | msg: { |
| | | containter: "", |
| | | placeNoInfo: "", |
| | | }, |
| | | msgType: { |
| | | containter: "info", |
| | | }, |
| | | containerInfo: {}, |
| | | areaData: [], |
| | | containerPlaceInfo: {}, |
| | | materialData: [], |
| | | visibleSort1: false, |
| | | isSorting: [ |
| | | { |
| | | label: "æ¯", |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "å¦", |
| | | value: "0", |
| | | }, |
| | | ], |
| | | titleContainer: "", |
| | | }; |
| | | }, |
| | | |
| | | mixins: [palceList], |
| | | watch: { |
| | | "form.areaNo": { |
| | | handler(val, oldVal) { |
| | | if (val != "") { |
| | | this.form.placeNo = ""; |
| | | this.placeList = []; |
| | | // è·ååºå |
| | | this.getPalceList({ |
| | | areaCode: val, |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | parseDic, |
| | | // éæ©æçç±»åè¿åå¼ |
| | | getTypeVal(val, valObj, index) { |
| | | this.form.containerTypeCode = valObj.code; |
| | | this.form.containerType = valObj.value; |
| | | }, |
| | | radioChange1(val, b) { |
| | | this.form.islock = b.label; // æ´æ°å»ç»ç¶æ |
| | | this.visibleSort1 = false; // å
³ééæ©å¨ |
| | | }, |
| | | radioChange2(val, b) { |
| | | this.form.emptyContainer = b.label; |
| | | this.visibleSort1 = false; // å
³ééæ©å¨ |
| | | }, |
| | | /* 2æçç¼ç æç´¢åºå */ |
| | | async onSearchContainter() { |
| | | if (!this.form.containterCode) { |
| | | this.msgType.containter = "error"; |
| | | this.msg.containter = "请è¾å
¥æçç¼ç ï¼"; |
| | | return false; |
| | | } |
| | | try { |
| | | let { result } = await getForContainerCode({ |
| | | code: this.form.containterCode, |
| | | }); |
| | | this.materialData = []; |
| | | this.containerInfo = result; |
| | | if (result?.materialContainers.length == 0) { |
| | | uni.showToast({ |
| | | title: "æç䏿²¡æç©ææè
æçä¸åå¨ï¼", |
| | | icon: "none", |
| | | }); |
| | | return; |
| | | } |
| | | this.materialData = result?.materialContainers; |
| | | } catch (e) { |
| | | console.log(e); |
| | | } |
| | | }, |
| | | //1è·ååºå |
| | | async getStockPageHandle(val) { |
| | | this.form.containterCode = ""; |
| | | this.msg.placeNoInfo = ""; |
| | | this.materialData = []; |
| | | var placeNo = this.form.placeNo || val; |
| | | if (!placeNo) { |
| | | uni.showToast({ |
| | | title: "è¯·éæ©ææ«æåºä½ï¼", |
| | | icon: "none", |
| | | }); |
| | | return; |
| | | } |
| | | let { result } = await StockPageForPdaCwgl({ |
| | | placeNo: placeNo, |
| | | }); |
| | | this.$nextTick(() => { |
| | | var placeStatus2 = |
| | | parseDic( |
| | | this.$store, |
| | | "place_status", |
| | | result?.placeOutput.placeStatus |
| | | ) || ""; |
| | | this.msg.placeNoInfo = `${ |
| | | result?.placeOutput.islock == 1 ? "éå®" : "æªéå®" |
| | | }, åºä½ç¶æï¼${placeStatus2}`; |
| | | this.materialData = result?.materialStockOutput || []; |
| | | this.titleContainer = result?.placeOutput.emptyContainer==1?"æ¯": "å¦"; |
| | | }); |
| | | }, |
| | | |
| | | /* æ¸
餿çç¼ç */ |
| | | onClearContainter() { |
| | | this.form = { |
| | | containterCode: "", |
| | | areaNo: "", |
| | | placeNo: "", |
| | | }; |
| | | this.materialData = []; |
| | | this.msg.placeNoInfo = ""; |
| | | this.form.placeNo = ""; |
| | | this.titleContainer = ""; |
| | | }, |
| | | |
| | | // è·ååºåºæ°æ® |
| | | async getAreaList() { |
| | | try { |
| | | let { result } = await getAreaInfo(); |
| | | this.areaData = result; |
| | | } catch (e) { |
| | | console.log(e); |
| | | } |
| | | }, |
| | | //åºä½æ¨¡ç³æ¥è¯¢ |
| | | async getPropData(PlaceNo) { |
| | | await this.getPalceList({ |
| | | areaCode: this.form.areaNo, |
| | | PlaceNo: PlaceNo, |
| | | }); |
| | | }, |
| | | |
| | | // æçå¤ç |
| | | async oneTouchUnBindHandle(type) { |
| | | var content = `åºä½ç¼ç ï¼${this.form.placeNo},æ¯å¦ç¡®è®¤ä¸é®æ¸
é¤ï¼`; |
| | | // 置为空æ |
| | | if (type == 1) { |
| | | content = `åºä½ç¼ç ï¼${this.form.placeNo},æ¯å¦ç¡®è®¤ç½®ä¸ºç©ºæè´§ä½ï¼`; |
| | | } |
| | | uni.showModal({ |
| | | title: "æç¤º", |
| | | content: content, |
| | | showCancel: true, |
| | | confirmText: "ç¡®å®", |
| | | cancelText: "åæ¶", |
| | | success: async ({ confirm, cancel }) => { |
| | | if (confirm) { |
| | | try { |
| | | await oneTouchUnBindHandle({ |
| | | type: type, |
| | | containerTypeCode: this.form.containerTypeCode, |
| | | containerNo: this.form.containterCode, |
| | | placeNo: this.form.placeNo, |
| | | }); |
| | | $alert("æä½æåï¼"); |
| | | this.onClearContainter(); |
| | | } catch (e) { |
| | | console.log(e); |
| | | } |
| | | } |
| | | }, |
| | | }); |
| | | }, |
| | | |
| | | // éå®è§£é |
| | | async placebatchUpdate(islock) { |
| | | if (!this.form.lockReason) { |
| | | uni.showToast({ |
| | | title: "请è¾å
¥åå ï¼", |
| | | icon: "none", |
| | | }); |
| | | return; |
| | | } |
| | | var titleM = islock == 2 ? "è§£é" : "éå®"; |
| | | uni.showModal({ |
| | | title: titleM, |
| | | content: `åºä½ç¼ç ï¼${this.form.placeNo},æ¯å¦ç¡®è®¤ï¼`, |
| | | showCancel: true, |
| | | confirmText: "ç¡®å®", |
| | | cancelText: "åæ¶", |
| | | success: async ({ confirm, cancel }) => { |
| | | if (confirm) { |
| | | try { |
| | | await placebatchUpdate({ |
| | | placeNo: this.form.placeNo, |
| | | islock: islock, |
| | | LockReason: this.form.lockReason, |
| | | }); |
| | | $alert(`${titleM}æåï¼`); |
| | | this.onClearContainter(); |
| | | } catch (e) { |
| | | console.log(e); |
| | | } |
| | | } |
| | | }, |
| | | }); |
| | | }, |
| | | |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval(); |
| | | callback && callback(); |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight(); |
| | | } |
| | | }, 200); |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal); |
| | | initInterVal = null; |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | }, |
| | | //å é¤ç©æ |
| | | delMaterialData(materialId) { |
| | | this.materialData = this.materialData.filter( |
| | | (item) => item.materialId != materialId |
| | | ); |
| | | }, |
| | | }, |
| | | |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | this.getAreaList(); |
| | | this.ContainerType = getDicList( |
| | | this.$store, |
| | | "container_type" |
| | | ).sysDictDatas; |
| | | }); |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval(); |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | & > .label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | & > .content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .label { |
| | | margin-left: 25rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .scan-input-form-item-compontent { |
| | | width: 100%; |
| | | .p-form-label { |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag { |
| | | color: $u-error; |
| | | } |
| | | } |
| | | .input-row { |
| | | width: 100%; |
| | | height: 75rpx; |
| | | overflow: hidden; |
| | | background-color: $uni-bg-color; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | .scan-view, |
| | | .btn-view { |
| | | flex-shrink: 0; |
| | | } |
| | | .scan-view { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding-right: 10rpx; |
| | | } |
| | | .input-view { |
| | | flex-grow: 1; |
| | | padding-left: 20rpx; |
| | | } |
| | | .btn-view { |
| | | width: 70rpx; |
| | | height: 100%; |
| | | padding: 20rpx; |
| | | padding-left: 0rpx; |
| | | box-sizing: border-box; |
| | | .search-btn { |
| | | height: 100%; |
| | | width: 100%; |
| | | border-radius: 8rpx; |
| | | background: linear-gradient( |
| | | 157.342820970935deg, |
| | | rgba(194, 128, 255, 1) -20%, |
| | | rgba(194, 128, 255, 1) -19%, |
| | | rgba(132, 0, 255, 1) 119% |
| | | ); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: $uni-bg-color; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | & > .mask { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | z-index: 100; |
| | | background-color: #fff; |
| | | opacity: 0.25; |
| | | } |
| | | } |
| | | .msg-row { |
| | | padding: 6rpx 20rpx 0 20rpx; |
| | | line-height: 1.3; |
| | | font-size: 24rpx; |
| | | color: $u-error; |
| | | word-break: break-all; |
| | | word-wrap: break-word; |
| | | &.info-type { |
| | | color: $color-blue; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="material-list-item" > |
| | | <!-- <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> --> |
| | | <!-- <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> --> |
| | | <view class="item-row"> |
| | | <view class="label">æçç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?containerInfo.containerNo:''}}</view> |
| | | </view> |
| | | |
| | | <view class="item-row"> |
| | | <view class="label">æå±åºåºï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?containerInfo.placeInfos.areaName:''}}</view> |
| | | </view> |
| | | |
| | | <view class="item-row"> |
| | | <view class="label">åºä½ç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?containerInfo.placeInfos.placeNo:''}}</view> |
| | | </view> |
| | | |
| | | |
| | | <!-- <view class="item-row"> |
| | | <view class="label">æçåºä½ç¶æï¼</view> |
| | | <view class="content auto-wrap">{{Boolean(containerInfo)?(parseDic($store,'common_status',containerInfo.placeInfo.containerPlaceStatus)):''}}</view> |
| | | </view> --> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | containerInfo: { |
| | | type: Object, |
| | | default: () => {} |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped > |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | margin:-20rpx auto; |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* text-align: right; */ |
| | | /* font-weight:5; */ |
| | | width: 200rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-swipe-action v-if="materialData.length>0"> |
| | | <u-swipe-action-item :options="options" v-for="(item,index) in materialData" |
| | | :key="'material-list-item-'+index" style="margin-bottom: 20rpx;" |
| | | @click="deleteItem" :index="index" :name="item.materialId"> |
| | | <view class="material-item-group"> |
| | | <view class="material-list-item" > |
| | | <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> |
| | | <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> |
| | | <view class="item-row"> |
| | | <view class="label">æçç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{item.containerNo}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æçç±»åï¼</view> |
| | | <view class="content auto-wrap">{{item.containerTypeDesc}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">åºä½ç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{item.placeNo}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æå¯ä¸ç ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialId}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æåç§°ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialName}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">ç©æä»¶å·ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialNo}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æ¯å¦éå®ï¼</view> |
| | | <view class="content auto-wrap">{{item.materialIsLock==1? 'æ¯' : 'å¦'}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æä½äººï¼</view> |
| | | <view class="content auto-wrap">{{item.lockUser}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">éæºå¶åå ï¼</view> |
| | | <view class="content auto-wrap">{{item.lockReason}}</view> |
| | | </view> |
| | | <!-- <view class="item-row"> |
| | | <view class="label">æ°éï¼</view> |
| | | <view class="content auto-wrap">{{item.stockNumber}}</view> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | materialData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style:{ |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }], |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic, |
| | | deleteItem({name}){ |
| | | this.$emit('delMaterialData',name) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .material-item-group { |
| | | /* background-color: transparent!impor; */ |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* text-align: right; */ |
| | | /* font-weight:5; */ |
| | | width: 180rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="scan-input-form-item-compontent"> |
| | | <view class="p-form-label">åºä½è¯¦æ
ï¼</view> |
| | | <view class="material-item-group" v-if="Boolean(placeInfo)"> |
| | | <view class="material-list-item"> |
| | | <view class="item-row"> |
| | | <view class="label">åºä½ç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{placeInfo.placeNo}}</view> |
| | | </view> |
| | | |
| | | <view class="item-row"> |
| | | <view class="label">æå±åºåºï¼</view> |
| | | <view class="content auto-wrap">{{placeInfo.areaCode}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | placeInfo: { |
| | | type: Object, |
| | | default: () => {placeNo:''} |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style:{ |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }], |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .scan-input-form-item-compontent{ |
| | | width: 100%; |
| | | |
| | | .p-form-label{ |
| | | font-size: 32rpx; |
| | | color: $u-tips-color; |
| | | padding-bottom: 12rpx; |
| | | padding-left: 20rpx; |
| | | .required-tag{ |
| | | color:$u-error; |
| | | } |
| | | }} |
| | | .material-item-group { |
| | | /* background-color: transparent!impor; */ |
| | | padding-top: 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* font-weight:5; */ |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="åå²ä¸çº¿" > |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <!-- step 1 start --> |
| | | <template v-if="step===1"> |
| | | <scan-input-form-item |
| | | class="forma-item" |
| | | label="ç©æç¼ç " |
| | | v-model="forma.material" |
| | | :msg="msg.material" |
| | | :msg-type="msgType.material" |
| | | @search="onSearchMaterial" |
| | | @clear="onClearMaterial" |
| | | /> |
| | | <view class="material-item-group" v-if="list.length>0"> |
| | | <view class="material-list-item" v-for="(item,index) in list" :key="'material-list-item-'+index"> |
| | | <view class="close-btn" @tap.stop="onDelList(index)"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> |
| | | <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> |
| | | <view class="item-row"> |
| | | <view class="label">å¯åº¦ï¼</view> |
| | | <view class="content auto-wrap">{{item.density}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æ¹æ¬¡ï¼</view> |
| | | <view class="content auto-wrap">{{item.batch}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">段æ°ï¼</view> |
| | | <view class="content auto-wrap">{{item.quantity}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- step 1 end --> |
| | | <!-- step 2 start --> |
| | | <template v-if="step===2"> |
| | | <easy-select-form-item |
| | | v-if="stepTwoType==='select'" |
| | | class="forma-item" |
| | | label="产线/å·¥ä½" |
| | | :list="selectList.stations" |
| | | v-model="formb.stationCode" |
| | | :msg="msg.stationCode" |
| | | :msg-type="msgType.stationCode" |
| | | value-field="stationCode" |
| | | label-field="stationName" |
| | | @clear="onClearStation" |
| | | /> |
| | | <scan-input-form-item |
| | | v-else |
| | | class="forma-item" |
| | | label="产线/å·¥ä½" |
| | | v-model="formb.stationCode" |
| | | :msg="msg.stationCode" |
| | | :msg-type="msgType.stationCode" |
| | | :has-search="false" |
| | | @clear="onClearStation" |
| | | /> |
| | | <view style="padding:0 16rpx;"> |
| | | <u-button type="primary" v-if="stepTwoType==='select'" text="æ«ç è¾å
¥äº§çº¿" @click="onChangeStepTwoType('input')"></u-button> |
| | | <u-button type="primary" v-else text="æå¨éæ©äº§çº¿" @click="onChangeStepTwoType('select')"></u-button> |
| | | </view> |
| | | </template> |
| | | <!-- step 2 end --> |
| | | </view> |
| | | |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template v-if="step===1"> |
| | | <div class="btn-frame left-btn-frame"><u-button text="é ç½®" @click="onReset"></u-button></div> |
| | | <div class="btn-frame right-btn-frame"><u-button type="primary" text="ä¸ çº¿" :disabled="list.length<=0" @click="onNext"></u-button></div> |
| | | </template> |
| | | <template v-else> |
| | | <div class="btn-frame left-btn-frame"><u-button text="ä¸ä¸æ¥" @click="onPrevStep"></u-button></div> |
| | | <div class="btn-frame right-btn-frame"><u-button type="primary" text="æ 交" @click="onSubmit"></u-button></div> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue' |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue' |
| | | import { parseDic, $alert, $successInfo } from '@/static/js/utils/index.js' |
| | | let initInterVal = null; |
| | | const defaultFormA = { |
| | | material:'' |
| | | } |
| | | const defaultFormB = { |
| | | stationCode:'' |
| | | } |
| | | export default { |
| | | name:'toBeOnlinePage', |
| | | components:{DefaultHeaderPageLayout,ActionUserRow,ScanInputFormItem,EasySelectFormItem}, |
| | | data(){ |
| | | return { |
| | | pageBodyHeight:0, |
| | | step:1, |
| | | containter:null, |
| | | forma:{...defaultFormA}, |
| | | formb:{...defaultFormB}, |
| | | msg:{ |
| | | material:'', |
| | | stationCode:'' |
| | | }, |
| | | msgType:{ |
| | | material:'error', |
| | | stationCode:'error' |
| | | }, |
| | | list:[], |
| | | materialDisabled:false, |
| | | stepTwoType:'', |
| | | selectList:{ |
| | | stations:[] |
| | | } |
| | | } |
| | | }, |
| | | watch:{ |
| | | stepTwoType(newVal,oldVal){ |
| | | this.triggerStepTwoType() |
| | | } |
| | | }, |
| | | methods:{ |
| | | /* ç©æç¼ç æç´¢ */ |
| | | onSearchMaterial(){ |
| | | if (!this.forma.material) { |
| | | this.msg.material = '请è¾å
¥ç©æç¼å·ï¼'; |
| | | return false; |
| | | } |
| | | this.msg.material = '' |
| | | this.getMaterialInfo() |
| | | }, |
| | | /* æ¸
é¤ç©æç¼ç */ |
| | | onClearMaterial(){ |
| | | this.resetMaterial() |
| | | }, |
| | | /* æ¸
é¤äº§çº¿/å·¥ä½ */ |
| | | onClearStation(){ |
| | | this.resetStation() |
| | | }, |
| | | /* å é¤ç©æåè¡¨ææ¡æ°æ® */ |
| | | onDelList(index){ |
| | | this.list.splice(index,1) |
| | | }, |
| | | /* éç½®ç©æç¼ç */ |
| | | resetMaterial(){ |
| | | this.msg.material = ''; |
| | | this.forma.material = '' |
| | | }, |
| | | /* é置产线/å·¥ä½ */ |
| | | resetStation(){ |
| | | this.msg.stationCode = ''; |
| | | this.formb.stationCode = '' |
| | | }, |
| | | /* 页é¢éç½® */ |
| | | reset(){ |
| | | this.resetMaterial() |
| | | this.resetStation() |
| | | this.list = [] |
| | | this.stepTwoType='' |
| | | this.step = 1 |
| | | }, |
| | | /* è·åç©æä¿¡æ¯ */ |
| | | getMaterialInfo(callback){ |
| | | let params = {Code:this.forma.material} |
| | | this.$api.get('ParseCode',params,{block:'online',fullRes:true}).then((d)=>{ |
| | | if (d.data) { |
| | | let obj = {...d.data} |
| | | obj.materialBatch = obj.batch |
| | | obj.materialCode = this.forma.material |
| | | this.list.push(obj) |
| | | this.forma.material = '' |
| | | callback && callback(true) |
| | | } else { |
| | | this.msg.material = d.message || 'æ¥æ ä¿¡æ¯ï¼'; |
| | | callback && callback(false) |
| | | } |
| | | }).catch((err)=>{ |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | /* ååºéç½®æé® */ |
| | | onReset(){ |
| | | this.reset() |
| | | }, |
| | | /* ååºç¬¬ä¸æ¥æé® */ |
| | | onNext(){ |
| | | this.stepTwoType='select' |
| | | this.step=2 |
| | | }, |
| | | /* ååºä¸ä¸æ¥æé® */ |
| | | onPrevStep(){ |
| | | this.resetStation() |
| | | this.step=1 |
| | | }, |
| | | /* çè§ç¬¬äºæ¥æ¾ç¤ºæ¨¡å¼ */ |
| | | triggerStepTwoType(){ |
| | | if (this.stepTwoType==='select' && this.selectList.stations.length===0) { |
| | | this.$api.get('GetFoamBoardStation',{},{block:'online'}).then((d)=>{ |
| | | this.selectList.stations = d || [] |
| | | }).catch((err)=>{}) |
| | | } |
| | | }, |
| | | onChangeStepTwoType(type){ |
| | | this.formb.stationCode='' |
| | | this.stepTwoType=type |
| | | }, |
| | | /* ååºæäº¤æé® */ |
| | | onSubmit(){ |
| | | if (!this.formb.stationCode) { |
| | | this.msg.stationCode = '请确认产线ï¼'; |
| | | return false; |
| | | } |
| | | this.msg.stationCode = '' |
| | | |
| | | this.dealConfirm((f)=>{ |
| | | if (f) { |
| | | this.reset() |
| | | $successInfo('æä½æåï¼'); |
| | | } |
| | | }) |
| | | }, |
| | | /* æäº¤æ¥å£è°ç¨ */ |
| | | dealConfirm(callback){ |
| | | let params = { |
| | | stationCode:this.formb.stationCode, |
| | | foamBoardInformationList:this.list |
| | | } |
| | | this.$api.post('FoamBoardRecord',params,{block:'online'}).then(()=>{ |
| | | callback && callback(true) |
| | | }).catch(()=>{ |
| | | callback && callback(false) |
| | | }) |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback){ |
| | | initInterVal = setInterval(()=>{ |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | },200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval(){ |
| | | try{ |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onReady(){ |
| | | this.startInitInterval(()=>{ |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | }) |
| | | }, |
| | | onUnload(){ |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row{ |
| | | display: flex; |
| | | padding: 10rpx 0; |
| | | background-color: #fff; |
| | | .btn-frame{ |
| | | width: 50%; |
| | | box-sizing: border-box; |
| | | } |
| | | .left-btn-frame{ |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | .right-btn-frame{ |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | .forma-item{ |
| | | margin-bottom: 24rpx; |
| | | } |
| | | .material-item-group{ |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | .material-list-item{ |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | &:last-child{ |
| | | border-bottom: 0; |
| | | } |
| | | .item-row{ |
| | | display: flex; |
| | | &>.label{ |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 84rpx; |
| | | } |
| | | &>.content{ |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | uni-input{ |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | .badge-box{ |
| | | position: absolute; |
| | | top:8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | .close-btn{ |
| | | $closeBtnSize:70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top:0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | .icon-layer{ |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="忣"> |
| | | <view class="page-frame with-action-user-row" :style="{ height: pageBodyHeight + 'px' }" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <scan-input-form-item |
| | | class="forma-item" |
| | | label="æçç¼ç " |
| | | v-model="form.containterCode" |
| | | :msg="msg.containter" |
| | | :msg-type="msgType.containter" |
| | | @search="onSearchContainter" |
| | | @clear="onClearContainter" |
| | | /> |
| | | <scan-input-form-item |
| | | class="forma-item" |
| | | label="管段ç¼ç " |
| | | v-model="form.pipeSpecCode" |
| | | :msg="msg.material" |
| | | :msg-type="msgType.material" |
| | | @search="onSearchMaterial" |
| | | @clear="onClearMaterial" |
| | | |
| | | /> |
| | | <scan-input-form-item |
| | | placeholder="è¯·éæ©" |
| | | :clearable="false" |
| | | :hasScan="false" |
| | | :hasSearch="false" |
| | | @click.native="visible = true" |
| | | class="forma-item" |
| | | label="éæ©åºå£" |
| | | v-model="form.site" |
| | | /> |
| | | <EasyPicker :visible.sync="visible" :list="placeList.filter(item=>item.placeNo!='ZDCR')" labelField="placeNo" valueField="placeNo" @select="getSiteVal"/> |
| | | <!-- <EasyPicker :visible.sync="visible" :list="placeList" labelField="placeNo" valueField="placeNo" @select="getSiteVal" /> --> |
| | | <materialList :contaninerData="contaninerData" @delContainer="delContainer" /> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template> |
| | | <div class="btn-frame"><u-button type="primary" text="ç» æ" @click="onSubmit"></u-button></div> |
| | | <div class="btn-frame"><u-button type="primary" text="忣å
¥åº" @click="addInBound"></u-button></div> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue'; |
| | | import ActionUserRow from '@/components/ActionUserRow.vue'; |
| | | import ScanInputFormItem from '@/components/ScanInputFormItem.vue'; |
| | | import EasySelectFormItem from '@/components/EasySelectFormItem.vue'; |
| | | import EasyPicker from '@/components/EasyPicker.vue'; |
| | | import materialList from './modules/materialList.vue'; |
| | | import { parseDic, $alert, $successInfo } from '@/static/js/utils/index.js'; |
| | | import { palceList } from '@/service/mixins/mixins.js'; |
| | | import { getContainerInfo } from '@/api/common.js'; |
| | | import { getForEmptyContainerNo, getForMaterialNo, bindMaterialContainer, addInBound,pickPipeSpecCode } from '@/api/bind.js'; |
| | | import {NFCInit,NFCReadUID } from '@/service/util/RfidMethod.js' |
| | | let initInterVal = null; |
| | | export default { |
| | | name: 'receiveInPage', |
| | | components: { |
| | | DefaultHeaderPageLayout, |
| | | ActionUserRow, |
| | | ScanInputFormItem, |
| | | EasySelectFormItem, |
| | | materialList, |
| | | EasyPicker |
| | | }, |
| | | data() { |
| | | return { |
| | | pageBodyHeight: 0, |
| | | form: { |
| | | containterCode: '', |
| | | pipeSpecCode: '', |
| | | site: '' |
| | | }, |
| | | msg: { |
| | | containter: '', |
| | | material: '', |
| | | site: '' |
| | | }, |
| | | msgType: { |
| | | containter: 'info', |
| | | material: 'error', |
| | | site: 'error' |
| | | }, |
| | | containerStatus: null, |
| | | contaninerData: [], |
| | | visible: false |
| | | }; |
| | | }, |
| | | computed: { |
| | | // disabledBind() { |
| | | // return !Boolean(this.containerStatus) || this.contaninerData.length < 1; |
| | | // }, |
| | | // disabledBound() { |
| | | // return !Boolean(this.containerStatus); |
| | | // } |
| | | }, |
| | | watch: { |
| | | 'form.containterCode': { |
| | | handler(val, oldVal) { |
| | | this.resetContainerNo(); |
| | | } |
| | | } |
| | | }, |
| | | onShow() { |
| | | console.log('onShow'); |
| | | var nfc = NFCInit(); |
| | | console.log(nfc); |
| | | }, |
| | | onHide() { |
| | | console.log('onHide'); |
| | | var rfid = NFCReadUID(); |
| | | if(rfid!=null){ |
| | | if(this.form.containterCode ==''){ |
| | | this.form.containterCode = rfid.UID |
| | | } else{ |
| | | this.form.pipeSpecCode = rfid.UID |
| | | } |
| | | } |
| | | console.log(rfid); |
| | | }, |
| | | methods: { |
| | | // éæ©ç«ç¹è¿åå¼ |
| | | getSiteVal(val, valObj, index) { |
| | | this.form.site = val; |
| | | }, |
| | | /* æçç¼ç æç´¢ */ |
| | | async onSearchContainter() { |
| | | if (!this.form.containterCode) { |
| | | this.msgType.containter = 'error'; |
| | | this.msg.containter = '请è¾å
¥æçå·ï¼'; |
| | | return false; |
| | | } |
| | | return;//æä¸æç´¢ |
| | | // è·å代ç |
| | | try { |
| | | let { result } = await getForEmptyContainerNo({ code: this.form.containterCode }); |
| | | this.containerStatus = result?.containerStatus; |
| | | // var notKT=result?.materialContainers.some(item=>item.pipeSpecCode!='KONGTUO') |
| | | // if(notKT) { |
| | | // this.$modal('å½åæçåå¨é空æç©æ') |
| | | // this.onClearContainter() |
| | | // } |
| | | // æç详æ
|
| | | let containerStatusName = parseDic(this.$store, 'container_status', result?.containerStatus); |
| | | containerStatusName = containerStatusName == 'æ æ¤åå
¸' ? '' : containerStatusName; |
| | | this.msg.containter = `ç¶æï¼${containerStatusName}, 尺寸ï¼${result?.specLength}*${result?.specWidth}*${result?.specHeight}`; |
| | | |
| | | result?.containerList.forEach((item) => { |
| | | let isExist = this.contaninerData.some((item1) => item1.containerNo == item.containerNo); |
| | | if (!isExist) { |
| | | this.contaninerData.push(item); |
| | | } |
| | | }); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* æ¸
餿çç¼ç */ |
| | | onClearContainter() { |
| | | this.form = { |
| | | containterCode: '', |
| | | pipeSpecCode: '', |
| | | site: '' |
| | | }; |
| | | this.resetContainerNo(); |
| | | }, |
| | | // éåæçç¼ç |
| | | resetContainerNo() { |
| | | this.msg = { |
| | | containter: '', |
| | | material: '', |
| | | site: '' |
| | | }; |
| | | this.msgType = { |
| | | containter: 'info', |
| | | material: 'error', |
| | | site: 'error' |
| | | }; |
| | | this.containerStatus = null; |
| | | this.contaninerData = []; |
| | | this.form.pipeSpecCode = ''; |
| | | this.form.site = ''; |
| | | }, |
| | | /* 空æç¼ç æç´¢ */ |
| | | async onSearchMaterial() { |
| | | if (!this.form.pipeSpecCode) { |
| | | this.msg.material = '请è¾å
¥ç©ºæç¼å·ï¼'; |
| | | return false; |
| | | } |
| | | this.msg.material = ''; |
| | | try { |
| | | let { result } = await getContainerInfo({ ContainerNo: this.form.pipeSpecCode }); |
| | | if (result.containerNo == this.form.containterCode) { |
| | | return this.$modal('å½å空æä¸æçéå¤'); |
| | | } |
| | | var isExit = this.contaninerData.some((item) => item.containerNo == result.containerNo); |
| | | isExit ? '' : this.contaninerData.push(result); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | /* ç©æç¼ç æ¸
é¤ */ |
| | | onClearMaterial() { |
| | | this.form.pipeSpecCode = ''; |
| | | }, |
| | | |
| | | //å é¤ç©ºæ |
| | | delContainer(containerNo) { |
| | | this.contaninerData = this.contaninerData.filter((item) => item.containerNo != containerNo); |
| | | }, |
| | | // 忣 |
| | | async onSubmit() { |
| | | let { contaninerData, form } = this; |
| | | // if(contaninerData.length>3) { |
| | | // return $alert("忣æ°éä¸è½è¶
è¿4个ï¼") |
| | | // } |
| | | const data = { |
| | | type: 2, |
| | | containerNo: form.containterCode, |
| | | pipeSpecCode:form.pipeSpecCode, |
| | | materialContainerList: [] |
| | | }; |
| | | |
| | | data.materialContainerList = contaninerData.map((item) => { |
| | | return { |
| | | materialNo: 'KONGTUO', |
| | | materialName: '空æ', |
| | | materialId: item.containerNo |
| | | }; |
| | | }); |
| | | try { |
| | | await pickPipeSpecCode(data); |
| | | this.$modal('忣æå'); |
| | | this.onClearContainter(); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | // å
¥åº |
| | | async addInBound() { |
| | | // if(this.contaninerData.length>3) { |
| | | // return $alert("忣æ°éä¸è½è¶
è¿4个ï¼") |
| | | // } |
| | | const data = { |
| | | stationNo: this.form.site, |
| | | type: 2, |
| | | containerNo: this.form.containterCode, |
| | | materialContainerList: this.contaninerData.map((item) => { |
| | | return { |
| | | materialId: item.containerNo, |
| | | materialNo: 'KONGTUO', |
| | | materialName: '空æ', |
| | | materialType: 4 |
| | | }; |
| | | }) |
| | | }; |
| | | |
| | | try { |
| | | await addInBound(data); |
| | | this.$modal('å
¥åºæå'); |
| | | this.onClearContainter(); |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | }, |
| | | |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback) { |
| | | initInterVal = setInterval(() => { |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval(); |
| | | callback && callback(); |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight(); |
| | | } |
| | | }, 200); |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval() { |
| | | try { |
| | | clearInterval(initInterVal); |
| | | initInterVal = null; |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | mixins: [palceList], |
| | | onReady() { |
| | | this.startInitInterval(async () => { |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | // 注é |
| | | // this.getPalceList({ |
| | | // areaCode: 'WXJSXL' |
| | | // }); |
| | | }); |
| | | }, |
| | | onUnload() { |
| | | this.clearInitInterval(); |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 10rpx 10rpx; |
| | | background-color: #fff; |
| | | |
| | | .btn-frame { |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-frame:nth-child(1) { |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .left-btn-frame { |
| | | padding-left: 20rpx; |
| | | padding-right: 8rpx; |
| | | } |
| | | |
| | | .right-btn-frame { |
| | | padding-right: 20rpx; |
| | | padding-left: 8rpx; |
| | | } |
| | | } |
| | | |
| | | .forma-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .material-item-group { |
| | | background-color: $uni-bg-color; |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | margin-bottom: 10rpx; |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | & > .label { |
| | | flex-shrink: 0; |
| | | color: $u-tips-color; |
| | | width: 144rpx; |
| | | } |
| | | |
| | | & > .content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-swipe-action v-if="contaninerData.length>0" > |
| | | <u-swipe-action-item :options="options" v-for="(item,index) in contaninerData" |
| | | :key="'material-list-item-'+index" style="margin-bottom: 20rpx;" |
| | | @click="deleteItem" :index="index" :name="item.containerNo"> |
| | | <view class="material-item-group"> |
| | | <view class="material-list-item" > |
| | | <view class="close-btn"> |
| | | <view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view> |
| | | </view> |
| | | <view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view> |
| | | <view class="item-row"> |
| | | <view class="label">æçç¼å·ï¼</view> |
| | | <view class="content auto-wrap">{{item.containerNo}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æçç¶æï¼</view> |
| | | <view class="content auto-wrap">{{parseDic($store,'container_status',item.containerStatus)}}</view> |
| | | </view> |
| | | <view class="item-row"> |
| | | <view class="label">æçè§æ ¼ï¼</view> |
| | | <view class="content auto-wrap">{{item.specLength}}*{{item.specWidth}}*{{item.specHeight}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | </template> |
| | | |
| | | <script> |
| | | import {parseDic} from '@/static/js/utils/index.js' |
| | | export default { |
| | | props: { |
| | | contaninerData: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // materialModalData:{ |
| | | // type: Array, |
| | | // default: () => [] |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style:{ |
| | | backgroundColor: '#F18202' |
| | | } |
| | | }], |
| | | materialModalData:[] |
| | | } |
| | | }, |
| | | // created(){ |
| | | // this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas |
| | | // console.log(this.materialModalData); |
| | | // }, |
| | | methods:{ |
| | | parseDic, |
| | | deleteItem({name}){ |
| | | this.$emit('delContainer',name) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .material-item-group { |
| | | /* background-color: transparent!impor; */ |
| | | padding-top: 10rpx; |
| | | |
| | | .material-list-item { |
| | | border-bottom: 2rpx solid $uni-border-color; |
| | | padding-bottom: 10rpx; |
| | | padding-left: 60rpx; |
| | | /* margin-bottom: 10rpx; */ |
| | | position: relative; |
| | | |
| | | &:last-child { |
| | | border-bottom: 0; |
| | | } |
| | | |
| | | .item-row { |
| | | display: flex; |
| | | |
| | | .label { |
| | | flex-shrink: 0; |
| | | color: #000; |
| | | /* font-weight:5; */ |
| | | width: 144rpx; |
| | | } |
| | | |
| | | &>.content { |
| | | flex-grow: 1; |
| | | color: $u-content-color; |
| | | |
| | | uni-input { |
| | | font: inherit; |
| | | color: $u-primary; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .badge-box { |
| | | position: absolute; |
| | | top: 8rpx; |
| | | left: 8rpx; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .close-btn { |
| | | $closeBtnSize: 70rpx; |
| | | width: $closeBtnSize; |
| | | height: $closeBtnSize; |
| | | z-index: 1; |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 8rpx; |
| | | background-color: $u-error; |
| | | opacity: 0.6; |
| | | border-radius: 25rpx; |
| | | |
| | | .icon-layer { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | onLoad(){ |
| | | uni.redirectTo({ |
| | | url: this.$config.path.plywoodInstore + '?pageType=bind' |
| | | }); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" :title="pageTitle" > |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <page-main v-show="pageStyle==='main'" ref="main" @pageChange="onMainPageChange" /> |
| | | <page-edit v-show="pageStyle==='edit'" ref="edit" /> |
| | | </view> |
| | | </view> |
| | | <template v-slot:footer> |
| | | <view class="bottom-btns-row"> |
| | | <template v-if="pageStyle==='main'"> |
| | | <template v-if="pageType==='bind'"> |
| | | <view class="btn-frame"><u-button text="é ç½®" @click="onMainReset"></u-button></view> |
| | | <view class="divider"></view> |
| | | </template> |
| | | <view class="btn-frame"><u-button :type="pageType==='instore'?'':'primary'" text="ç» ç" @click="onBind"></u-button></view> |
| | | <template v-if="pageType==='instore'"> |
| | | <view class="divider"></view> |
| | | <view class="btn-frame"><u-button type="primary" text="å
¥ åº" @click="onManualInstore"></u-button></view> |
| | | </template> |
| | | </template> |
| | | <template v-if="pageStyle==='edit'"> |
| | | <view class="btn-frame"><u-button text="è¿ å" @click="onEditBack"></u-button></view> |
| | | <view class="divider"></view> |
| | | <view class="btn-frame"><u-button type="primary" :text="editIndex===-1?'æ·» å ':'ä¿® æ¹'" @click="onEditConfirm"></u-button></view> |
| | | </template> |
| | | </view> |
| | | </template> |
| | | </default-header-page-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import DefaultHeaderPageLayout from '@/components/DefaultHeaderPageLayout.vue' |
| | | import ActionUserRow from '@/components/ActionUserRow.vue' |
| | | import PageMain from './modules/main.vue' |
| | | import PageEdit from './modules/edit.vue' |
| | | import { $successInfo } from '@/static/js/utils/index.js' |
| | | let initInterVal = null; |
| | | export default { |
| | | name:'plywoodInstorePage', |
| | | components:{DefaultHeaderPageLayout,ActionUserRow,PageMain,PageEdit}, |
| | | data(){ |
| | | return { |
| | | pageBodyHeight:0, |
| | | pageType:'instore', |
| | | pageStyle:'main', |
| | | pageTitle:'', |
| | | editIndex:-1 |
| | | } |
| | | }, |
| | | methods:{ |
| | | onEditBack(){ |
| | | this.pageStyle = 'main' |
| | | }, |
| | | onEditConfirm(){ |
| | | let check = this.$refs.edit.checkConfirm() |
| | | if (check.flag) { |
| | | if (this.editIndex===-1) { |
| | | this.$refs.main.add(check.data) |
| | | } else { |
| | | this.$refs.main.modify(check.data,this.editIndex) |
| | | } |
| | | } |
| | | this.pageStyle = 'main' |
| | | }, |
| | | onMainPageChange(obj,index){ |
| | | if (obj) { |
| | | this.editIndex = index |
| | | } else { |
| | | this.editIndex = -1 |
| | | } |
| | | this.$refs.edit.init(obj) |
| | | this.pageStyle = 'edit' |
| | | }, |
| | | onMainReset(){ |
| | | this.$refs.main.clearMain() |
| | | }, |
| | | onBind(){ |
| | | let check = this.$refs.main.checkConfirm() |
| | | if (check.flag) { |
| | | this.dealBind(check.data,(f)=>{ |
| | | if (f) { |
| | | $successInfo('ç»çæå') |
| | | if (this.pageType==='bind'){ |
| | | this.$refs.main.clearMain() |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onManualInstore(){ |
| | | let check = this.$refs.main.checkConfirm() |
| | | if (check.flag) { |
| | | this.dealManualInstore(check.data,(f)=>{ |
| | | if (f) { |
| | | $successInfo('æäº¤æå') |
| | | this.$refs.main.clearMain() |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | /* ç»çæ¥å£è°ç¨ */ |
| | | dealBind(obj,callback){ |
| | | let params = this.dealSubmitParams(obj) |
| | | this.$api.post('PlywoodBindEntrance',params,{block:'plywood'}).then(()=>{ |
| | | callback && callback(true) |
| | | }).catch((e)=>{ |
| | | callback && callback(false,e) |
| | | }) |
| | | }, |
| | | /* æå¨å
¥åºæ¥å£è°ç¨ */ |
| | | dealManualInstore(obj,callback){ |
| | | let params = this.dealSubmitParams(obj) |
| | | this.$api.post('PlywoodManualWare',params,{block:'plywood'}).then(()=>{ |
| | | callback && callback(true) |
| | | }).catch((e)=>{ |
| | | callback && callback(false,e) |
| | | }) |
| | | }, |
| | | dealSubmitParams(obj){ |
| | | return { |
| | | containercode:obj.containter.containerCode, |
| | | wmsMaterials:obj.list |
| | | } |
| | | }, |
| | | /* 页é¢åå§åè·å页é¢bodyé«åº¦ç宿¶å¨ */ |
| | | startInitInterval(callback){ |
| | | initInterVal = setInterval(()=>{ |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | | } else { |
| | | this.pageBodyHeight = this.$refs.page.getBodyHeight() |
| | | } |
| | | },200) |
| | | }, |
| | | /* æ¸
é¤å®æ¶å¨ */ |
| | | clearInitInterval(){ |
| | | try{ |
| | | clearInterval(initInterVal) |
| | | initInterVal = null |
| | | }catch(e){ |
| | | //TODO handle the exception |
| | | } |
| | | } |
| | | }, |
| | | onLoad(option){ |
| | | if (option.pageType) { |
| | | this.pageType=option.pageType |
| | | this.pageTitle='è¶åæ¿ç»ç' |
| | | } else { |
| | | this.pageType='instore' |
| | | this.pageTitle='è¶åæ¿å
¥åº' |
| | | } |
| | | }, |
| | | onReady(){ |
| | | this.startInitInterval(()=>{ |
| | | /* 页é¢åå§ååéè¦æ§è¡ç代ç å¨è¿è¾¹è°ç¨ */ |
| | | }) |
| | | }, |
| | | onUnload(){ |
| | | this.clearInitInterval() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bottom-btns-row{ |
| | | display: flex; |
| | | padding: 10rpx 20rpx; |
| | | background-color: #fff; |
| | | .btn-frame{ |
| | | width: 1%; |
| | | box-sizing: border-box; |
| | | flex-grow: 1; |
| | | } |
| | | .divider{ |
| | | width: 20rpx; |
| | | flex-shrink: 0; |
| | | } |
| | | } |
| | | </style> |
PipeLineLems.PDA/pages/plywoodInstore/modules/edit.vue
PipeLineLems.PDA/pages/plywoodInstore/modules/main.vue
PipeLineLems.PDA/pages/plywoodOut/index.vue
PipeLineLems.PDA/pages/print/bluePrint.js
PipeLineLems.PDA/pages/print/bluetoothConnection.vue
PipeLineLems.PDA/pages/receiptExecution/index.vue
PipeLineLems.PDA/pages/receiptExecution/modules/barContent.vue
PipeLineLems.PDA/pages/receiveIn/index.vue
PipeLineLems.PDA/pages/replenishMent/index.vue
PipeLineLems.PDA/pages/sandingInstore/index.vue
PipeLineLems.PDA/pages/setting/host.vue
PipeLineLems.PDA/pages/slicingOff/index.vue
PipeLineLems.PDA/pages/slicingOff/modules/detail.vue
PipeLineLems.PDA/pages/slicingOff/modules/main.vue
PipeLineLems.PDA/pages/slicingOff/modules/step2.vue
PipeLineLems.PDA/pages/slicingOn/index.vue
PipeLineLems.PDA/pages/slicingOn/modules/barContent.vue
PipeLineLems.PDA/pages/sortingSearch/index.vue
PipeLineLems.PDA/pages/sortingSearch/modules/contentCard.vue
PipeLineLems.PDA/pages/sortingSearch/modules/sortingInfo.vue
PipeLineLems.PDA/pages/start/index.vue
PipeLineLems.PDA/pages/takeInStore/index.vue
PipeLineLems.PDA/pages/tasks/index.vue
PipeLineLems.PDA/pages/tasks/module/Detail.vue
PipeLineLems.PDA/pages/tasks/module/List.vue
PipeLineLems.PDA/pages/tasks/module/Search.vue
PipeLineLems.PDA/pages/temporaryInstore/index.vue
PipeLineLems.PDA/pages/temporaryInstore/modules/Step1.vue
PipeLineLems.PDA/pages/temporaryInstore/modules/Step2.vue
PipeLineLems.PDA/pages/transport/index.vue
PipeLineLems.PDA/pages/unbind/index.vue
PipeLineLems.PDA/pages/unstackingInstore/index.vue
PipeLineLems.PDA/pages/unstackingInstore/modules/edit.vue
PipeLineLems.PDA/pages/unstackingInstore/modules/main.vue
PipeLineLems.PDA/pages/unstackingInstore/modules/step2.vue
PipeLineLems.PDA/pages/writeRfid/index.vue
PipeLineLems.PDA/pages/writeRfid/modules/materialList.vue
PipeLineLems.PDA/service/mixins/mixins.js
PipeLineLems.PDA/service/request/index.js
PipeLineLems.PDA/service/request/modules/beforeSend.js
PipeLineLems.PDA/service/store/index.js
PipeLineLems.PDA/service/store/modules/print.js
PipeLineLems.PDA/service/store/modules/system.js
PipeLineLems.PDA/service/store/modules/user.js
PipeLineLems.PDA/service/util/RfidMethod.js
PipeLineLems.PDA/static/fonts/iconfont.css
PipeLineLems.PDA/static/fonts/iconfont.ttf
PipeLineLems.PDA/static/fonts/iconfont.woff
PipeLineLems.PDA/static/fonts/iconfont.woff2
PipeLineLems.PDA/static/img/logo - 副本.png
PipeLineLems.PDA/static/img/logo.png
PipeLineLems.PDA/static/js/print/gbk.js
PipeLineLems.PDA/static/js/print/printerjobs.js
PipeLineLems.PDA/static/js/utils/index.js
PipeLineLems.PDA/static/js/utils/modules/color.js
PipeLineLems.PDA/static/js/utils/modules/regexValidate.js
PipeLineLems.PDA/uni.scss
PipeLineLems.PDA/uni_modules/uni-badge/changelog.md
PipeLineLems.PDA/uni_modules/uni-badge/components/uni-badge/uni-badge.vue
PipeLineLems.PDA/uni_modules/uni-badge/package.json
PipeLineLems.PDA/uni_modules/uni-badge/readme.md
PipeLineLems.PDA/uni_modules/uni-icons/changelog.md
PipeLineLems.PDA/uni_modules/uni-icons/components/uni-icons/icons.js
PipeLineLems.PDA/uni_modules/uni-icons/components/uni-icons/uni-icons.vue
PipeLineLems.PDA/uni_modules/uni-icons/components/uni-icons/uniicons.css
PipeLineLems.PDA/uni_modules/uni-icons/components/uni-icons/uniicons.ttf
PipeLineLems.PDA/uni_modules/uni-icons/package.json
PipeLineLems.PDA/uni_modules/uni-icons/readme.md
PipeLineLems.PDA/uni_modules/uni-scss/changelog.md
PipeLineLems.PDA/uni_modules/uni-scss/index.scss
PipeLineLems.PDA/uni_modules/uni-scss/package.json
PipeLineLems.PDA/uni_modules/uni-scss/readme.md
PipeLineLems.PDA/uni_modules/uni-scss/styles/index.scss
PipeLineLems.PDA/uni_modules/uni-scss/styles/setting/_border.scss
PipeLineLems.PDA/uni_modules/uni-scss/styles/setting/_color.scss
PipeLineLems.PDA/uni_modules/uni-scss/styles/setting/_radius.scss
PipeLineLems.PDA/uni_modules/uni-scss/styles/setting/_space.scss
PipeLineLems.PDA/uni_modules/uni-scss/styles/setting/_styles.scss
PipeLineLems.PDA/uni_modules/uni-scss/styles/setting/_text.scss
PipeLineLems.PDA/uni_modules/uni-scss/styles/setting/_variables.scss
PipeLineLems.PDA/uni_modules/uni-scss/styles/tools/functions.scss
PipeLineLems.PDA/uni_modules/uni-scss/theme.scss
PipeLineLems.PDA/uni_modules/uni-scss/variables.scss
PipeLineLems.PDA/uni_modules/uni-swipe-action/changelog.md
PipeLineLems.PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/bindingx.js
PipeLineLems.PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/isPC.js
PipeLineLems.PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpalipay.js
PipeLineLems.PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpother.js
PipeLineLems.PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpwxs.js
PipeLineLems.PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/render.js
PipeLineLems.PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.vue
PipeLineLems.PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/wx.wxs
PipeLineLems.PDA/uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action.vue
PipeLineLems.PDA/uni_modules/uni-swipe-action/package.json
PipeLineLems.PDA/uni_modules/uni-swipe-action/readme.md
PipeLineLems.PDA/uni_modules/uview-ui/LICENSE
PipeLineLems.PDA/uni_modules/uview-ui/README.md
PipeLineLems.PDA/uni_modules/uview-ui/changelog.md
PipeLineLems.PDA/uni_modules/uview-ui/components/u--form/u--form.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u--image/u--image.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u--input/u--input.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u--text/u--text.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u--textarea/u--textarea.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-action-sheet/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-action-sheet/u-action-sheet.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-album/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-album/u-album.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-alert/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-alert/u-alert.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-avatar-group/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-avatar-group/u-avatar-group.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-avatar/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-avatar/u-avatar.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-back-top/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-back-top/u-back-top.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-badge/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-badge/u-badge.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-button/nvue.scss
PipeLineLems.PDA/uni_modules/uview-ui/components/u-button/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-button/u-button.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-button/vue.scss
PipeLineLems.PDA/uni_modules/uview-ui/components/u-calendar/header.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-calendar/month.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-calendar/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-calendar/u-calendar.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-calendar/util.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-car-keyboard/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-cell-group/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-cell-group/u-cell-group.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-cell/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-cell/u-cell.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-checkbox-group/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-checkbox-group/u-checkbox-group.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-checkbox/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-circle-progress/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-circle-progress/u-circle-progress.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-code-input/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-code-input/u-code-input.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-code/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-code/u-code.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-col/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-col/u-col.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-collapse-item/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-collapse/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-collapse/u-collapse.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-column-notice/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-column-notice/u-column-notice.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-count-down/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-count-down/u-count-down.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-count-down/utils.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-count-to/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-count-to/u-count-to.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-datetime-picker/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-datetime-picker/u-datetime-picker.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-divider/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-divider/u-divider.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-dropdown-item/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-dropdown-item/u-dropdown-item.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-dropdown/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-dropdown/u-dropdown.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-empty/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-empty/u-empty.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-form-item/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-form-item/u-form-item.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-form/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-form/u-form.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-gap/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-gap/u-gap.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-grid-item/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-grid-item/u-grid-item.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-grid/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-grid/u-grid.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-icon/iconfont.ttf
PipeLineLems.PDA/uni_modules/uview-ui/components/u-icon/icons.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-icon/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-icon/u-icon.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-image/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-image/u-image.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-index-anchor/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-index-anchor/u-index-anchor.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-index-item/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-index-item/u-index-item.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-index-list/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-index-list/u-index-list.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-input/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-input/u-input.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-keyboard/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-keyboard/u-keyboard.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-line-progress/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-line-progress/u-line-progress.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-line/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-line/u-line.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-link/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-link/u-link.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-list-item/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-list-item/u-list-item.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-list/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-list/u-list.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-loading-icon/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-loading-icon/u-loading-icon.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-loading-page/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-loading-page/u-loading-page.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-loadmore/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-loadmore/u-loadmore.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-modal/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-modal/u-modal.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-navbar/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-navbar/u-navbar.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-no-network/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-no-network/u-no-network.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-notice-bar/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-notice-bar/u-notice-bar.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-notify/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-notify/u-notify.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-number-box/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-number-box/u-number-box.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-number-keyboard/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-number-keyboard/u-number-keyboard.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-overlay/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-overlay/u-overlay.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-parse/node/node.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-parse/parser.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-parse/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-parse/u-parse.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-picker-column/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-picker-column/u-picker-column.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-picker/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-picker/u-picker.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-popup/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-popup/u-popup.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-radio-group/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-radio-group/u-radio-group.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-radio/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-radio/u-radio.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-rate/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-rate/u-rate.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-read-more/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-read-more/u-read-more.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-row-notice/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-row-notice/u-row-notice.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-row/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-row/u-row.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-safe-bottom/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-safe-bottom/u-safe-bottom.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-scroll-list/nvue.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-scroll-list/other.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-scroll-list/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-scroll-list/scrollWxs.wxs
PipeLineLems.PDA/uni_modules/uview-ui/components/u-scroll-list/u-scroll-list.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-search/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-search/u-search.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-skeleton/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-skeleton/u-skeleton.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-slider/mpother.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-slider/mpwxs.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-slider/mpwxs.wxs
PipeLineLems.PDA/uni_modules/uview-ui/components/u-slider/nvue - 副本.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-slider/nvue.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-slider/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-slider/u-slider.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-status-bar/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-status-bar/u-status-bar.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-steps-item/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-steps-item/u-steps-item.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-steps/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-steps/u-steps.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-sticky/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-sticky/u-sticky.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-subsection/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-subsection/u-subsection.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swipe-action-item/index - backup.wxs
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swipe-action-item/index.wxs
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swipe-action-item/nvue - backup.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swipe-action-item/nvue.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swipe-action-item/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swipe-action-item/u-swipe-action-item.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swipe-action-item/wxs.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swipe-action/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swipe-action/u-swipe-action.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swiper-indicator/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swiper-indicator/u-swiper-indicator.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swiper/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-swiper/u-swiper.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-switch/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-switch/u-switch.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tabbar-item/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tabbar-item/u-tabbar-item.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tabbar/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tabbar/u-tabbar.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-table/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-table/u-table.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tabs-item/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tabs-item/u-tabs-item.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tabs/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tabs/u-tabs.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tag/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tag/u-tag.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-td/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-td/u-td.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-text/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-text/u-text.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-text/value.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-textarea/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-textarea/u-textarea.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-toast/u-toast.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-toolbar/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-toolbar/u-toolbar.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tooltip/clipboard.min.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tooltip/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tooltip/u-tooltip.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tr/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-tr/u-tr.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-transition/nvue.ani-map.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-transition/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-transition/transition.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-transition/u-transition.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-transition/vue.ani-style.scss
PipeLineLems.PDA/uni_modules/uview-ui/components/u-upload/mixin.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-upload/props.js
PipeLineLems.PDA/uni_modules/uview-ui/components/u-upload/u-upload.vue
PipeLineLems.PDA/uni_modules/uview-ui/components/u-upload/utils.js
PipeLineLems.PDA/uni_modules/uview-ui/components/uview-ui/uview-ui.vue
PipeLineLems.PDA/uni_modules/uview-ui/index.js
PipeLineLems.PDA/uni_modules/uview-ui/index.scss
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/color.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/config.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/actionSheet.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/album.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/alert.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/avatar.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/avatarGroup.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/backtop.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/badge.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/button.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/calendar.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/carKeyboard.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/cell.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/cellGroup.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/checkbox.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/checkboxGroup.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/circleProgress.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/code.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/codeInput.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/col.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/collapse.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/collapseItem.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/columnNotice.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/countDown.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/countTo.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/datetimePicker.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/divider.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/empty.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/form.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/formItem.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/gap.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/grid.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/gridItem.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/icon.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/image.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/indexAnchor.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/indexList.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/input.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/keyboard.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/line.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/lineProgress.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/link.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/list.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/listItem.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/loadingIcon.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/loadingPage.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/loadmore.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/modal.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/navbar.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/noNetwork.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/noticeBar.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/notify.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/numberBox.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/numberKeyboard.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/overlay.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/parse.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/picker.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/popup.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/radio.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/radioGroup.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/rate.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/readMore.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/row.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/rowNotice.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/scrollList.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/search.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/section.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/skeleton.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/slider.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/statusBar.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/steps.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/stepsItem.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/sticky.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/subsection.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/swipeAction.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/swipeActionItem.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/swiper.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/swipterIndicator.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/switch.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/tabbar.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/tabbarItem.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/tabs.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/tag.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/text.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/textarea.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/toast.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/toolbar.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/tooltip.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/transition.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/props/upload.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/config/zIndex.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/css/color.scss
PipeLineLems.PDA/uni_modules/uview-ui/libs/css/common.scss
PipeLineLems.PDA/uni_modules/uview-ui/libs/css/components.scss
PipeLineLems.PDA/uni_modules/uview-ui/libs/css/flex.scss
PipeLineLems.PDA/uni_modules/uview-ui/libs/css/h5.scss
PipeLineLems.PDA/uni_modules/uview-ui/libs/css/mixin.scss
PipeLineLems.PDA/uni_modules/uview-ui/libs/css/mp.scss
PipeLineLems.PDA/uni_modules/uview-ui/libs/css/nvue.scss
PipeLineLems.PDA/uni_modules/uview-ui/libs/css/vue.scss
PipeLineLems.PDA/uni_modules/uview-ui/libs/function/colorGradient.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/function/debounce.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/function/digit.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/function/index.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/function/platform.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/function/test.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/function/throttle.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/adapters/index.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/core/InterceptorManager.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/core/Request.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/core/buildFullPath.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/core/defaults.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/core/dispatchRequest.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/core/mergeConfig.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/core/settle.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/helpers/buildURL.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/helpers/combineURLs.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/helpers/isAbsoluteURL.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/index.d.ts
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/index.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/utils.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/luch-request/utils/clone.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/mixin/button.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/mixin/mixin.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/mixin/mpMixin.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/mixin/mpShare.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/mixin/openType.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/mixin/style.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/mixin/touch.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/util/async-validator.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/util/calendar.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/util/dayjs.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/util/emitter.js
PipeLineLems.PDA/uni_modules/uview-ui/libs/util/route.js
PipeLineLems.PDA/uni_modules/uview-ui/package.json
PipeLineLems.PDA/uni_modules/uview-ui/theme.scss
PipeLineLems.PDA/unpackage/res/icons/1024x1024.png
PipeLineLems.PDA/unpackage/res/icons/120x120.png
PipeLineLems.PDA/unpackage/res/icons/144x144.png
PipeLineLems.PDA/unpackage/res/icons/152x152.png
PipeLineLems.PDA/unpackage/res/icons/167x167.png
PipeLineLems.PDA/unpackage/res/icons/180x180.png
PipeLineLems.PDA/unpackage/res/icons/192x192.png
PipeLineLems.PDA/unpackage/res/icons/20x20.png
PipeLineLems.PDA/unpackage/res/icons/29x29.png
PipeLineLems.PDA/unpackage/res/icons/40x40.png
PipeLineLems.PDA/unpackage/res/icons/58x58.png
PipeLineLems.PDA/unpackage/res/icons/60x60.png
PipeLineLems.PDA/unpackage/res/icons/72x72.png
PipeLineLems.PDA/unpackage/res/icons/76x76.png
PipeLineLems.PDA/unpackage/res/icons/80x80.png
PipeLineLems.PDA/unpackage/res/icons/87x87.png
PipeLineLems.PDA/unpackage/res/icons/96x96.png
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/__uniappchooselocation.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/__uniapperror.png
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/__uniappes6.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/__uniappopenlocation.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/__uniapppicker.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/__uniappquill.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/__uniappquillimageresize.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/__uniappscan.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/__uniappsuccess.png
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/__uniappview.html
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/app-config-service.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/app-config.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/app-service.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/app-view.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/manifest.json
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/static/fonts/iconfont.css
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/static/fonts/iconfont.ttf
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/static/fonts/iconfont.woff
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/static/fonts/iconfont.woff2
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/static/img/logo.png
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/static/js/print/gbk.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/static/js/print/printerjobs.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/static/js/utils/index.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/static/js/utils/modules/color.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/static/js/utils/modules/regexValidate.js
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/uni_modules/uview-ui/components/u-icon/iconfont.ttf
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/view.css
PipeLineLems.PDA/unpackage/resources/__UNI__417D0E6/www/view.umd.min.js
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/MesOrderResponse.cs
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Services/IWorkPlanAppService.cs
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/SharedService.cs
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/WorkPlan/IWorkPlanRepository.cs
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.EntityFrameworkCore/Repositories/EfCoreWorkPlanRepository.cs |