¶Ô±ÈÐÂÎļþ |
| | |
| | | /unpackage/dist/* |
| | | /unpackage/cache/* |
| | | /unpackage/release/* |
| | | /unpackage/res/* |
| | | /node_modules/* |
| | | /.hbuilderx/* |
| | | /.vscode/* |
| | | /.idea/* |
| | | deploy.sh |
| | | /package-lock.json |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <script> |
| | | import config from '@/common/config.js'; |
| | | export default { |
| | | onLaunch() { |
| | | // #ifdef APP-PLUS |
| | | // æ£æµå级 |
| | | // let appid = plus.runtime.appid; |
| | | // let version = plus.runtime.version; |
| | | // uni.showToast({ |
| | | // title:plus.runtime.version |
| | | // }) |
| | | /*uni.request({ |
| | | url: 'https://www.pgyer.com/apiv2/app/check', //æ£æ¥æ´æ°çæå¡å¨å°åï¼è²å
¬è±ï¼ |
| | | data: { |
| | | _api_key: config._api_key, |
| | | appKey: config.appKey, |
| | | buildVersion: plus.runtime.version |
| | | }, |
| | | success: (res) => { |
| | | // uni.showToast({ |
| | | // title: JSON.stringify(res.data.data.downloadURL) |
| | | // }) |
| | | if (res.data.code == 0 && res.data.data.buildHaveNewVersion) { |
| | | // let openUrl = plus.os.name === 'iOS' ? res.data.iOS : res.data.Android; |
| | | let openUrl = res.data.data.downloadURL; |
| | | // æéç¨æ·æ´æ° |
| | | uni.showModal({ |
| | | title: 'æ´æ°æç¤º', |
| | | confirmText:'æ´æ°', |
| | | content: res.data.buildUpdateDescription ? res.data.buildUpdateDescription : 'æ¯å¦éæ©æ´æ°?', |
| | | success: (showResult) => { |
| | | if (showResult.confirm) { |
| | | if (uni.getSystemInfoSync().platform == "android") { |
| | | uni.showToast({ |
| | | title: 'æ£å¨åå°è¿è¡ä¸è½½...', |
| | | icon:'none', |
| | | mask: false, |
| | | duration: 1500 |
| | | }); |
| | | var dtask = plus.downloader.createDownload( openUrl, {}, function ( d, status ) { |
| | | // ä¸è½½å®æ |
| | | if ( status == 200 ) { |
| | | plus.runtime.install(plus.io.convertLocalFileSystemURL(d.filename),{},{},function(error){ |
| | | uni.showToast({ |
| | | title: 'å®è£
失败', |
| | | icon:'none', |
| | | mask: false, |
| | | duration: 1500 |
| | | }); |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: 'æ´æ°å¤±è´¥', |
| | | icon:'none', |
| | | mask: false, |
| | | duration: 1500 |
| | | }); |
| | | } |
| | | }); |
| | | dtask.start(); |
| | | } else { |
| | | plus.runtime.openURL(openUrl); |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | })*/ |
| | | // #endif |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | @import url("@/static/iconfont/iconfont.css"); |
| | | </style> |
| | | <style lang="scss"> |
| | | @import "uview-ui/index.scss"; |
| | | @import "pages/common/common.scss"; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | (function (root, factory) { |
| | | if (typeof define === 'function' && define.amd) { |
| | | // AMD. Register as an anonymous module. |
| | | define([], function() {factory(root);}); |
| | | } else factory(root); |
| | | // node.js has always supported base64 conversions, while browsers that support |
| | | // web workers support base64 too, but you may never know. |
| | | })(typeof exports !== "undefined" ? exports : this, function(root) { |
| | | if (root.atob) { |
| | | // Some browsers' implementation of atob doesn't support whitespaces |
| | | // in the encoded string (notably, IE). This wraps the native atob |
| | | // in a function that strips the whitespaces. |
| | | // The original function can be retrieved in atob.original |
| | | try { |
| | | root.atob(" "); |
| | | } catch(e) { |
| | | root.atob = (function(atob) { |
| | | var func = function(string) { |
| | | return atob(String(string).replace(/[\t\n\f\r ]+/g, "")); |
| | | }; |
| | | func.original = atob; |
| | | return func; |
| | | })(root.atob); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | // base64 character set, plus padding character (=) |
| | | var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", |
| | | // Regular expression to check formal correctness of base64 encoded strings |
| | | b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/; |
| | | |
| | | root.btoa = function(string) { |
| | | string = String(string); |
| | | var bitmap, a, b, c, |
| | | result = "", i = 0, |
| | | rest = string.length % 3; // To determine the final padding |
| | | |
| | | for (; i < string.length;) { |
| | | if ((a = string.charCodeAt(i++)) > 255 |
| | | || (b = string.charCodeAt(i++)) > 255 |
| | | || (c = string.charCodeAt(i++)) > 255) |
| | | throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range."); |
| | | |
| | | bitmap = (a << 16) | (b << 8) | c; |
| | | result += b64.charAt(bitmap >> 18 & 63) + b64.charAt(bitmap >> 12 & 63) |
| | | + b64.charAt(bitmap >> 6 & 63) + b64.charAt(bitmap & 63); |
| | | } |
| | | |
| | | // If there's need of padding, replace the last 'A's with equal signs |
| | | return rest ? result.slice(0, rest - 3) + "===".substring(rest) : result; |
| | | }; |
| | | |
| | | root.atob = function(string) { |
| | | // atob can work with strings with whitespaces, even inside the encoded part, |
| | | // but only \t, \n, \f, \r and ' ', which can be stripped. |
| | | string = String(string).replace(/[\t\n\f\r ]+/g, ""); |
| | | if (!b64re.test(string)) |
| | | throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded."); |
| | | |
| | | // Adding the padding if missing, for semplicity |
| | | string += "==".slice(2 - (string.length & 3)); |
| | | var bitmap, result = "", r1, r2, i = 0; |
| | | for (; i < string.length;) { |
| | | bitmap = b64.indexOf(string.charAt(i++)) << 18 | b64.indexOf(string.charAt(i++)) << 12 |
| | | | (r1 = b64.indexOf(string.charAt(i++))) << 6 | (r2 = b64.indexOf(string.charAt(i++))); |
| | | |
| | | result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) |
| | | : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) |
| | | : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255); |
| | | } |
| | | return result; |
| | | }; |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const config = { |
| | | // 产ååç§° |
| | | productName: "Pig Mobile", |
| | | |
| | | // å
¬å¸åç§° |
| | | companyName: "Pig4cloud", |
| | | |
| | | // 产åçæ¬å· |
| | | productVersion: "V4.3.2", |
| | | |
| | | // çæ¬æ£æ¥æ è¯ |
| | | appCode: "android", |
| | | |
| | | // å
é¨çæ¬å·ç |
| | | appVersion: 1, |
| | | |
| | | // 管çåºç¡è·¯å¾ |
| | | adminPath: "/admin", |
| | | }; |
| | | |
| | | // 设置åå°æ¥å£æå¡çåºç¡å°å |
| | | config.env = "development"; |
| | | // config.baseUrl = 'https://mes-demo.asun.cloud'; |
| | | // config.baseUrl = "http://192.168.32.65:9999"; |
| | | config.baseUrl = ""; |
| | | config._api_key = "7a0e8d2d441f8233ef0f3683ca2fc848"; |
| | | config.appKey = "55e70d3b74c1c8a70481173bf233a5e1"; |
| | | config.downLoadEnv = "development"; |
| | | |
| | | config.appv = "4.0.2"; |
| | | |
| | | //config.env='production' |
| | | //config.baseUrl = 'http://192.168.20.116:9999' |
| | | //config._api_key='de69e16f6b5432792ad40e52892b251e' |
| | | //config.appKey='e710f4d0503c3ce0d5d20e060691f189' |
| | | //config.downLoadEnv='production' |
| | | |
| | | // å»ºè®®ï¼æå¼ä¸é¢æ³¨éï¼æ¹ä¾¿æ ¹æ®ç¯å¢ï¼èªå¨è®¾å®æå¡å°å |
| | | if (process.env.NODE_ENV === "development") { |
| | | } |
| | | |
| | | export default config; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | '000': 'æä½å¤ªé¢ç¹ï¼è¯·å¿éå¤è¯·æ±', |
| | | '401': 'å½åæä½æ²¡ææé', |
| | | '403': 'å½åæä½æ²¡ææé', |
| | | '404': 'èµæºä¸åå¨', |
| | | '417': 'æªç»å®ç»å½è´¦å·ï¼è¯·ä½¿ç¨å¯ç ç»å½åç»å®', |
| | | '423': 'æ¼ç¤ºç¯å¢ä¸è½æä½ï¼å¦éäºè§£èç³»æä»¬', |
| | | '426': 'ç¨æ·åä¸å卿å¯ç é误', |
| | | '428': 'éªè¯ç é误,è¯·éæ°è¾å
¥', |
| | | '429': '请æ±è¿é¢ç¹', |
| | | '479': 'æ¼ç¤ºç¯å¢ï¼æ²¡ææéæä½', |
| | | 'default': 'ç³»ç»æªç¥é误,请åé¦ç»ç®¡çå' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const install = (Vue, vm) => { |
| | | // å°å个å®ä¹çæ¥å£åç§°ï¼ç»ä¸æ¾è¿å¯¹è±¡æè½½å°vm.$u.api(å 为vmå°±æ¯thisï¼ä¹å³this.$u.api)ä¸ |
| | | vm.$u.api = { |
| | | // ç»å½è®¤è¯ç¸å
³æ¥å£ |
| | | login: (params = {}, formData = {}, header = {}) => vm.$u.post('/auth/oauth/token?randomStr=' + params |
| | | .randomStr + '&code=' + params.code + '&grant_type=' + params.grant_type, formData, header), |
| | | refreshToken: (params = {}, formData = {}, header = {}) => vm.$u.post('/auth/oauth/token?grant_type=' + |
| | | params.grant_type + '&refresh_token=' + params.refresh_token + '&client_id=' + params |
| | | .client_id + '&client_secret=' + params.client_secret, formData, header), |
| | | vxLogin: (params = {}, header = {}) => vm.$u.post('/auth/oauth/token?grant_type=mobile&mobile=MINI@' + |
| | | params.code + '&code=' + params.code, {}, header), |
| | | bingUser: (params = {}, header = {}) => vm.$u.post('/admin/social/bind?state=MINI&code=' + params |
| | | .code, {}, header), |
| | | smsLogin: (params = {}, header = {}) => vm.$u.post('/auth/oauth/token?mobile=SMS@' + params.mobile + |
| | | '&code=' + params.code + '&grant_type=mobile', {}, header), |
| | | sendCode: (params = {}, header = {}) => vm.$u.get('/admin/mobile/' + params.mobile, {}, header), |
| | | logout: (params = {}) => vm.$u.delete('/auth/token/logout', params), |
| | | |
| | | // åå
¸ |
| | | dictData: (params = {}) => vm.$u.get('/admin/dict/type/' + params.dictType), |
| | | |
| | | // ä¸ªäººä¿¡æ¯ |
| | | user: { |
| | | getUserInfo: () => vm.$u.get('/admin/user/info'), |
| | | updateUserInfo: (params = {}) => vm.$u.put('/admin/user/edit', params), |
| | | infoSaveBase: (params = {}) => vm.$u.post('/admin/sys/user/infoSaveBase', params), |
| | | infoSavePwd: (params = {}) => vm.$u.post('/admin/sys/user/infoSavePwd', params), |
| | | }, |
| | | |
| | | // åå
¸ |
| | | dict: { |
| | | type: (params = {}) => vm.$u.get('/admin/dict/type/' + params) |
| | | }, |
| | | |
| | | // pigxæä»¶ç®¡ç |
| | | pigxFile: { |
| | | upload: (params = {}) => vm.$u.post('/admin/sys-file/upload') |
| | | }, |
| | | |
| | | // pigx é¨é¨ç®¡ç |
| | | pigxDept: { |
| | | list: (params = {}) => vm.$u.get('/admin/dept/list', params) |
| | | }, |
| | | |
| | | // pigx å²ä½ç®¡ç |
| | | pigxPost: { |
| | | // ååºææ |
| | | list: (params = {}) => vm.$u.get('/admin/post/list', params), |
| | | |
| | | // å页 |
| | | fetchList: (params = {}) => vm.$u.get('/admin/post/page', params), |
| | | |
| | | // æ°å¢ |
| | | addObj: (obj = {}) => vm.$u.post('/admin/post', obj), |
| | | |
| | | // ä¿®æ¹ |
| | | putObj: (obj = {}) => vm.$u.put('/admin/post', obj), |
| | | |
| | | // å é¤ |
| | | delObj: (params) => vm.$u.delete('/admin/post/' + params.id), |
| | | |
| | | // æ¥è¯¢ |
| | | getObj: (params) => vm.$u.get('/admin/post/' + params.id) |
| | | }, |
| | | |
| | | // pigx è§è²ç®¡ç |
| | | pigxRole: { |
| | | // ååºææ |
| | | list: (params = {}) => vm.$u.get('/admin/role/list', params), |
| | | |
| | | // å页 |
| | | fetchList: (params = {}) => vm.$u.get('/admin/role/page', params), |
| | | |
| | | // æ°å¢ |
| | | addObj: (obj = {}) => vm.$u.post('/admin/role', obj), |
| | | |
| | | // ä¿®æ¹ |
| | | putObj: (obj = {}) => vm.$u.put('/admin/role', obj), |
| | | |
| | | // å é¤ |
| | | delObj: (params) => vm.$u.delete('/admin/role/' + params.id), |
| | | |
| | | // æ¥è¯¢ |
| | | getObj: (params) => vm.$u.get('/admin/role/' + params.id) |
| | | }, |
| | | |
| | | // pigx ç¨æ·ç®¡ç |
| | | pigxUser: { |
| | | page: (params = {}) => vm.$u.get('/admin/user/page', params), |
| | | delete: (params = {}) => vm.$u.delete('/admin/user/' + params.id), |
| | | getOne: (params = {}) => vm.$u.get('/admin/user/' + params.id), |
| | | putObj: (params = {}) => vm.$u.put('/admin/user', params) |
| | | }, |
| | | |
| | | //pigx 令ç管ç |
| | | pigxToken: { |
| | | page: (params = {}) => vm.$u.get('/admin/token/page', params), |
| | | delete: (params = {}) => vm.$u.delete('/admin/token/' + params.token), |
| | | }, |
| | | |
| | | //pigx æ¥å¿ç®¡ç |
| | | pigxLog: { |
| | | page: (params = {}) => vm.$u.get('/admin/log/page', params), |
| | | delete: (params = {}) => vm.$u.delete('/admin/log/' + params.id), |
| | | }, |
| | | |
| | | // pigx 工使µ |
| | | pigxOA: { |
| | | queryTodos: (params = {}) => vm.$u.get('/act/task/todo', params), |
| | | queryBill: (params = {}) => vm.$u.get('/act/leave-bill/' + params.leaveId), |
| | | delBill: (params = {}) => vm.$u.delete('/act/leave-bill/' + params.leaveId), |
| | | submitBill: (params = {}) => vm.$u.get('/act/leave-bill/submit/' + params.leaveId), |
| | | queryBillPage: (params = {}) => vm.$u.get('/act/leave-bill/page', params), |
| | | getTask: (params = {}) => vm.$u.get('/act/task/' + params.taskId), |
| | | addTask: (params = {}) => vm.$u.post('/act/leave-bill', params), |
| | | doTask: (params = {}) => vm.$u.post('/act/task', params), |
| | | }, |
| | | |
| | | // pigx ç§æ·ç®¡ç |
| | | pigxTenant: { |
| | | // å页 |
| | | fetchList: (params = {}) => vm.$u.get('/admin/tenant/page', params), |
| | | |
| | | // æ°å¢ |
| | | addObj: (obj = {}) => vm.$u.post('/admin/tenant', obj), |
| | | |
| | | // ä¿®æ¹ |
| | | putObj: (obj = {}) => vm.$u.put('/admin/tenant', obj), |
| | | |
| | | // å é¤ |
| | | delObj: (params) => vm.$u.delete('/admin/tenant/' + params.id), |
| | | |
| | | // æ¥è¯¢ |
| | | getObj: (params) => vm.$u.get('/admin/tenant/', params) |
| | | }, |
| | | |
| | | // pigx åæ°ç®¡ç |
| | | pigxParam: { |
| | | // å页 |
| | | fetchList: (params = {}) => vm.$u.get('/admin/param/page', params), |
| | | |
| | | // æ°å¢ |
| | | addObj: (obj = {}) => vm.$u.post('/admin/param', obj), |
| | | |
| | | // ä¿®æ¹ |
| | | putObj: (obj = {}) => vm.$u.put('/admin/param', obj), |
| | | |
| | | // å é¤ |
| | | delObj: (params) => vm.$u.delete('/admin/param/' + params.id), |
| | | |
| | | // æ¥è¯¢ |
| | | getObj: (params) => vm.$u.get('/admin/param/' + params.id) |
| | | }, |
| | | |
| | | // çäº§é¢æ--è´§çè¿è¾ä»»å¡ |
| | | palletTransports: { |
| | | page: (params = {}) => vm.$u.get('/mes/palletTransports/page', params), |
| | | executeMove: (params = {}) => vm.$u.post('/mes/palletTransportsDetail/executeMoveLocation', params) |
| | | }, |
| | | |
| | | // çäº§é¢æ--ç©æéæ± |
| | | palletTransportsMaterial: { |
| | | page: (params = {}) => vm.$u.get('/mes/palletTransportsMaterial/page', params) |
| | | }, |
| | | |
| | | // çäº§é¢æ--ç§»åºæç» |
| | | palletTransportsDetail: { |
| | | page: (params = {}) => vm.$u.get('/mes/palletTransportsDetail/page', params), |
| | | // æ°å¢ |
| | | addDetail: (params = {}) => vm.$u.post('/mes/palletTransportsDetail', params), |
| | | updateDetail: (params = {}) => vm.$u.put('/mes/palletTransportsDetail', params), |
| | | updateBatch: (params = {}) => vm.$u.put('/mes/palletTransportsDetail/updateBatch', params), |
| | | // å é¤ |
| | | delObj: (params) => vm.$u.delete('/mes/palletTransportsDetail/' + params.id) |
| | | }, |
| | | |
| | | // çäº§é¢æ--IFSåºä½ |
| | | ifsLocation: { |
| | | page: (params = {}) => vm.$u.get('/mes/location/getIfsLocation', params) |
| | | }, |
| | | |
| | | // çäº§é¢æ--IFSåºå |
| | | ifsStock: { |
| | | page: (params = {}) => vm.$u.get('/mes/palletTransportsDetail/checkScanPalletTransportsDetail', |
| | | params) |
| | | }, |
| | | |
| | | //产åºç»è®° |
| | | outputRegister: { |
| | | // æ¥è¯¢å·¥ä½ç« å页 |
| | | fetchWorkstationList: (params = {}) => vm.$u.get('/mes/workstation/page', params), |
| | | //æ¥è¯¢å·¥å |
| | | getOperationTask: (params = {}) => vm.$u.get('/mes/operationTask/getOperationTask', params), |
| | | //æ ¹æ®å·¥ä½ç«ï¼å è½½çæ¬¡ |
| | | getDutyRecordByWorkstationId: (params = {}) => vm.$u.get( |
| | | '/mes/dutyRecord/getDutyRecordByWorkstationId/' + params.id), |
| | | //æ ¹æ®ç次 è·åå½ç人å |
| | | getPersonByDutyRecordId: (params = {}) => vm.$u.get('/mes/dutyRecord/getPersonByDutyRecordId/' + |
| | | params.id), |
| | | // æ¹éäº§åº |
| | | batchSaveProductMain: (params = {}) => vm.$u.post('/mes/product/batchSaveProductMain', params), |
| | | //æ¥è¯¢äº¤æ¥ççäº§åº |
| | | getShiftProductOutByOpIdAndWsId: (params = {}) => vm.$u.get( |
| | | '/mes/product/getShiftProductOutByOpIdAndWsId/' + params.workstationId + '/' + params |
| | | .opeartionTaskId), |
| | | //æ¹éäº§åº |
| | | saveProductOutput: (params = {}) => vm.$u.post('/mes/product/saveProductOutput', params), |
| | | //ææå表 |
| | | getProductMainV1: (params = {}) => vm.$u.get('/mes/product/getProductMainV1', params), |
| | | //æ¹éç¼è¾ |
| | | batchUpdateProductMain: (params = {}) => vm.$u.put('/mes/product/batchUpdateProductMain', params), |
| | | //æ¹éæäº¤ãæ¤é |
| | | batchChange: (params = {}) => vm.$u.post('/mes/product/state/batchChange/' + params.event, params |
| | | .ids), |
| | | // å 餿å
¥ |
| | | deleteProductInputById: (params) => vm.$u.delete('/mes/product/deleteProductInputById/' + params |
| | | .id), |
| | | //æ¥è¯¢æ¥å·¥ç产æç» |
| | | queryProductMainDetail: (params = {}) => vm.$u.get('/mes/product/getProductMain/' + params.id), |
| | | //ä¿åæå
¥ |
| | | saveProductInput: (params = {}) => vm.$u.post('/mes/product/saveProductInput', params), |
| | | //ä¿®æ¹æå
¥ |
| | | updateProductInput: (params = {}) => vm.$u.post('/mes/product/updateProductInput', params), |
| | | //ä¿®æ¹ç¶æ |
| | | productOutPutStateByMainId: (params = {}) => vm.$u.post('/mes/product/productOutPutStateByMainId/' + |
| | | params.id + '/' + params.event), |
| | | // å 餿¥å·¥ |
| | | batchCancelProductMain: (params) => vm.$u.delete('/mes/product/batchCancelProductMain', params) |
| | | }, |
| | | |
| | | // pigx ç§»åº |
| | | pigxWareHouse: { |
| | | // æ¥è¯¢å表 ä¸å页 |
| | | fetchList: (params = {}) => vm.$u.get('/mes/stock/getEnableLocationObjList', params), |
| | | |
| | | // æ¥è¯¢ |
| | | list: (params = {}) => vm.$u.get('/mes/stock/getEnableStockObjList/' + params.sn), |
| | | |
| | | // æ°å¢ |
| | | addList: (params = {}) => vm.$u.post('/mes/stock/pdaMoveStockSubmit', params), |
| | | }, |
| | | // éåº |
| | | backWareHouse: { |
| | | // éè¿SNå·æ¥å°å
¶å
¥åºåçåºä½ |
| | | getTransactionBySn: (params) => vm.$u.get('/mes/stock/getTransactionBySn', params), |
| | | // pdaéåº |
| | | returnStockBySn: (params) => vm.$u.get('/mes/stock/returnStockBySn', params), |
| | | }, |
| | | // æåå
¥åº |
| | | finishProductIn: { |
| | | // è·åæååºä½ |
| | | fetchList: (params = {}) => vm.$u.get('/mes/stock/getFinishProductLocation', params), |
| | | |
| | | // è·ååºåæ°æ® |
| | | list: (params = {}) => vm.$u.get('/mes/stock/getFinishProductStock', params), |
| | | |
| | | // æäº¤ç§»åºè¯·æ± |
| | | addList: (params = {}) => vm.$u.post('/mes/stock/pdaMoveStockSubmit', params), |
| | | // æ ¹æ®ç®±ç å¾å°å
è£
主表信æ¯--跳线 |
| | | getPackagingAndSizeByPackagingNo: (params = {}) => vm.$u.get( |
| | | '/mes/packaging/getPackagingAndSizeByPackagingNo', params), |
| | | // æäº¤ç§»åºè¯·æ±--跳线 |
| | | addListJump: (params = {}) => vm.$u.get('/mes/packaging/updateInLocationByPda', params), |
| | | }, |
| | | // 跳线ä¸å
´é²å |
| | | finishZTE: { |
| | | // è·åæååºä½ |
| | | validateJump: (params = {}) => vm.$u.get('/mes/packaging/validatePackagingCodeRepeat', params), |
| | | |
| | | // è·ååºåæ°æ® |
| | | addJumpZTE: (params = {}) => vm.$u.get('/mes/packaging/updateZxInLocationByPda', params), |
| | | |
| | | }, |
| | | // pigx å
è£
|
| | | pigxPacking: { |
| | | // å页 |
| | | fetchList: (params = {}) => vm.$u.get('/mes/packaging/page', params), |
| | | |
| | | // æ¥è¯¢ |
| | | packHeadBasicInfoList: (params = {}) => vm.$u.get('/mes/packaging/getPackHeadBasicInfoList'), |
| | | |
| | | // æ°å¢å
è£
主表 |
| | | addObj: (obj = {}) => vm.$u.post('/mes/packaging', obj), |
| | | |
| | | //è·ååºä½ä¿¡æ¯ |
| | | getStockInfo: (params = {}) => vm.$u.get('/mes/stock/page?systemNo=' + params.systemNo), |
| | | |
| | | //è·ååºä½ä¿¡æ¯ |
| | | getStockInfoByBatchNo: (params = {}) => vm.$u.get('/mes/stock/page?partBatchNo=' + params |
| | | .partBatchNo), |
| | | |
| | | //æ°å¢å
è£
æç» |
| | | addPackagingItem: (obj = {}) => vm.$u.post('/mes/packaging/addPackagingStock', obj), |
| | | |
| | | // å é¤å
è£
æç» |
| | | delPackagingItem: (params) => vm.$u.delete('/mes/packaging/removePackagingItemById/' + params.id), |
| | | |
| | | //è·åå
è£
æç»å表 |
| | | getPackagingItemList: (params = {}) => vm.$u.get('/mes/packaging/getPackagingItemPage', params), |
| | | |
| | | //ç§°é |
| | | updWeight: (obj = {}) => vm.$u.post('/mes/packaging/getWeight', obj), |
| | | |
| | | //è·ååºç¡æ°æ® |
| | | getBasicLocation: (params = {}) => vm.$u.get('/mes/location/page', params), |
| | | |
| | | //è·åçæ¬¡ |
| | | getShiftList: (params = {}) => vm.$u.get('/mes/shift/page', params), |
| | | |
| | | // æ°å¢å
è£
主表 |
| | | addPackageRegister: (obj = {}) => vm.$u.post('/mes/packageRegister', obj), |
| | | |
| | | //è·åå
è£
人å表 |
| | | getStaff: (params = {}) => vm.$u.get('/mes/staff/staff', params), |
| | | |
| | | //è·åå½åç»å½äºº |
| | | getCurrUser: (params = {}) => vm.$u.get('/mes/packageRegister', params) |
| | | }, |
| | | // pigx ææ |
| | | pigxFeed: { |
| | | // æ¥è¯¢å·¥ä½ç« å页 |
| | | fetchWorkstationList: (params = {}) => vm.$u.get('/mes/workstation/page', params), |
| | | |
| | | // æ ¹æ®å·¥ä½ç«ç¼å·è·åè¿è¡ä¸çå·¥å&&对åºççº¿è¾¹ä» |
| | | getBasicInfoForPdaFeedByWorkstationNo: (params = {}) => vm.$u.get( |
| | | '/mes/operationTask/getBasicInfoForPdaFeedByWorkstationNo?workstationNo=' + params |
| | | .workstationNo), |
| | | |
| | | // å·²ææªæ¶è å页 |
| | | getFeedingStock: (params = {}) => vm.$u.get('/mes/stock/getFeedingStock/' + params.workstationId), |
| | | |
| | | // æ°å¢ææ |
| | | addFeedList: (params = {}) => vm.$u.post('/mes/feeding/pda/add', params), |
| | | |
| | | // æ°å¢ææ |
| | | addFeed: (params = {}) => vm.$u.post('/mes/feeding', params), |
| | | |
| | | // æ ¹æ®å·¥ä½ç«idæ¥è¯¢çº¿è¾¹ä» |
| | | getStockByWorkstationId: (params = {}) => vm.$u.get('/mes/stock/getStockByWorkstationId', params), |
| | | |
| | | //é
çææï¼è·åé
çç©æ |
| | | fetchJoinStockOrderList: (params = {}) => vm.$u.get('/mes/joinStockOrder/page', params), |
| | | }, |
| | | // å¤åæå |
| | | outsource: { |
| | | //æ¥è¯¢é¦é¡µæ°æ®ç»è®¡ |
| | | // queryIndexData: (params = {}) => vm.$u.get('/mes/workstation/page', params), |
| | | |
| | | // æ¥è¯¢æ¯å¦å卿¥æ£ |
| | | // queryReportExist: (params = {}) => vm.$u.get('/mes/workstation/page', params), |
| | | |
| | | // æäº¤ |
| | | submitReport: (params = {}, path) => vm.$u.post('/mes/outsource/insp/' + path, params), |
| | | |
| | | // æ¥è¯¢æ°æ® |
| | | queryData: (params = {}) => vm.$u.get('/mes/outsource/page', params), |
| | | }, |
| | | inventory: { |
| | | //è·åçç¹ä¸»è¡¨ |
| | | getMain: (params = {}) => vm.$u.get('/mes/inventoryMain/page', params), |
| | | goCheck: (params = {}) => vm.$u.post('/mes/inventoryMain/checkSavePda', params), |
| | | //æ°å¢çç¹æç» |
| | | addDetail: (params = {}) => vm.$u.post('/mes/inventoryMain/pda', params), |
| | | //æ ¹æ®åºåNoåSNå·è·ååºå |
| | | getStockByLocNoAndSn: (params = {}) => vm.$u.get('/mes/stock/getStockByLocNoAndSn', params), |
| | | //æ ¹æ®åºåNoåSNå·è·ååºå--èªå¨æäº¤ |
| | | getInventoryDetailByLocNoAndSn: (params = {}) => vm.$u.get( |
| | | '/mes/inventoryMain/getInventoryDetailByLocNoAndSn', params), |
| | | |
| | | //è·åé¶ä»¶å·å表 |
| | | getPart: (params = {}) => vm.$u.get('/mes/part/page', params), |
| | | getPartNo: (params = {}) => vm.$u.get('/mes/inventoryMain/getPartNo', params), |
| | | }, |
| | | // pigx å°¾æå¤ç |
| | | pigxTailHandle: { |
| | | // æ ¹æ®å·¥ä½ç«æ¥è¯¢å°¾æç©æ |
| | | getFeedingStock: (params = {}) => vm.$u.get('/mes/stock/getFeedingStock/' + params.workstationId), |
| | | |
| | | //å°¾æåæ¾ |
| | | tailStockIssue: (params = {}) => vm.$u.post('/mes/feeding/tailStockIssue', params), |
| | | |
| | | }, |
| | | //éæå¤ç |
| | | returnMaterial: { |
| | | //æ ¹æ®å·¥ä½ç«æ¥è¯¢éæç©æ |
| | | getFeedingStockByWorkstationNo: (params = {}) => vm.$u.get( |
| | | '/mes/stock/getFeedStockByWorkstationNo/', params), |
| | | //è·ååºä½ |
| | | getReturnLocations: (params = {}) => vm.$u.get('/mes/feeding/getReturnLocations/' + params |
| | | .workstationId), |
| | | //éæ |
| | | returnMaterial: (params = {}) => vm.$u.put('/mes/feeding', params), |
| | | }, |
| | | // å·¥å |
| | | operationTask: { |
| | | //å页æ¥è¯¢å·¥å |
| | | getOperationTaskPage: (params = {}) => vm.$u.get('/mes/operationTask/queryOperationTaskPage', params), |
| | | //æ ¹æ®idæ¥è¯¢å·¥å |
| | | getOperationTaskById: (params = {}) => vm.$u.get('/mes/operationTask/' + params.id), |
| | | //æ¥è¯¢ç次å表 |
| | | getShiftList: (params = {}) => vm.$u.get('/mes/shift/list', params), |
| | | //æ¥è¯¢çç»å表 |
| | | getCrewList: (params = {}) => vm.$u.get('/mes/crew/list', params), |
| | | //æ°å¢ä¸çè®°å½ |
| | | addDutyRecord: (params = {}) => vm.$u.post('/mes/dutyRecord', params), |
| | | //æ´æ¹ä¸çè®°å½ |
| | | updDutyRecord: (params = {}) => vm.$u.put('/mes/dutyRecord', params), |
| | | //æ´æ°å·¥ä½ç« |
| | | updWorkstation: (params = {}) => vm.$u.post('/mes/workstation/updateById', params), |
| | | //æ¥è¯¢å·¥ä½ç«å表 |
| | | getWorkstationList: (params = {}) => vm.$u.get('/mes/workstation/list', params), |
| | | //æ ¡éªæ¯å¦è¶
产 |
| | | validateOverProduction: (params = {}) => vm.$u.post('/mes/product/validateOverProduction', params), |
| | | //æ ¡éªæ¯å¦è¶
æ |
| | | validateOverFeed: (params = {}) => vm.$u.post('/mes/product/validateOverFeed', params), |
| | | //å页æ¥è¯¢ä¸çè®°å½ |
| | | getDutyRecordList: (params = {}) => vm.$u.get('/mes/dutyRecord/page', params), |
| | | //å é¤ä¸çè®°å½ |
| | | delDutyRecord: (params) => vm.$u.delete('/mes/dutyRecord/' + params.id), |
| | | //æ¥è¯¢æªæäº¤ä¸çè®°å½ |
| | | getUnsubmitDutyRecord: (params = {}) => vm.$u.get('/mes/dutyRecord/getUnsubmitWorkstation', params), |
| | | //æ¹éæäº¤ä¸çè®°å½ |
| | | batchSubmitDutyRecord: (params = {}) => vm.$u.post('/mes/dutyRecord/batchSubmit', params), |
| | | //æ ¹æ®å·¥ä½ä¸å¿è·åå·¥ä½ç« |
| | | getDutyRecordWorkstation: (params = {}) => vm.$u.get('/mes/dutyRecord/getWorkstation', params), |
| | | //æ¹éä¿åä¸çè®°å½ |
| | | batchSaveDutyRecord: (params = {}) => vm.$u.post('/mes/dutyRecord/batch', params), |
| | | }, |
| | | // æ¥æ¥ |
| | | dailyPaper: { |
| | | // è·åå·¥ä½ä¸å¿ |
| | | getWorkstation: (params = {}) => vm.$u.get('/mes/workstation/list', params), |
| | | // æ¥è¯¢å·¥åºå表 |
| | | getOperation: (params = {}) => vm.$u.get('/mes/operation/page', params), |
| | | // è·åæ¥å·¥å·¥åå表 |
| | | getOperationTask: (params = {}) => vm.$u.get('/mes/operationTask/getOperationTask', params), |
| | | // è·åå½åç»å½äººæå䏿¬¡æäº¤çæ¥æ¥ |
| | | getLastDutyRecord: (params = {}) => vm.$u.get('/mes/dutyRecord/getLastDutyRecord'), |
| | | // æ°å¢æ¥æ¥è®°å½ |
| | | addDailyPaper: (params = {}) => vm.$u.post('/mes/dutyRecord', params), |
| | | // ä¿®æ¹æ¥æ¥è®°å½ |
| | | editDailyPaper: (params = {}) => vm.$u.put('/mes/dutyRecord', params), |
| | | // åå²è®°å½å页æ¥è¯¢ |
| | | dutyRecordPage: (params = {}) => vm.$u.get('/mes/dutyRecord/page', params), |
| | | // è·åæ¥æ¥-人åå表 |
| | | getUserInfo: (params ={}) => vm.$u.get('/mes/staff/page', params), |
| | | // è·åæå·¥è´£ä»»äººå表 |
| | | principal: (params ={}) => vm.$u.get('mes/handymanRecord/principal/list'), |
| | | // æäº¤æå·¥è®°å½ |
| | | handymanRecord: (params ={}) => vm.$u.post('/mes/handymanRecord', params), |
| | | // è·ååºä½id |
| | | getLocationId: (params = {}) => vm.$u.get('/mes/workstation/' + params.workstationId), |
| | | // éè¿æ¹æ¬¡å·æ¥è¯¢ææ |
| | | getFeeding: (params = {}) => vm.$u.post('/mes/rwMatlBind/scanCode', params), |
| | | // æ¥å·¥æäº¤ |
| | | productReport: (params = {}) => vm.$u.post('/mes/productReport', params), |
| | | // 线å车é´-è¿å¸æ¥è¯¢ç¼ç |
| | | listReportXianQuanNonFirst: (params = {}) => vm.$u.get('/mes/productReport/listReportXianQuanNonFirst/' + params.id), |
| | | // éè¿æææ¹æ¬¡å·æ¥è¯¢æ¥ææ£ï¼è·åå
¶ä¸çæ£éªä¿¡æ¯ |
| | | siliconSteelCode: (params = {}) => vm.$u.get('/mes/supplierCheckoutMotherRoll/siliconSteelCode/', params), |
| | | // æ¥è¯¢å¥è£
è½¦é´æ ç¾ä¿¡æ¯ |
| | | listReportOther: (params = {}) => vm.$u.get('/mes/productReport/listReportOther/' + params.id), |
| | | // æ¥è¯¢æå¥è½¦é´(ç®±å)æ ç¾ä¿¡æ¯ |
| | | listReportChengtao: (params = {}) => vm.$u.get('/mes/productReport/listReportChengtao/' + params.id), |
| | | // æ¥è¯¢éè¯è½¦é´-å è£
æ ç¾ä¿¡æ¯ |
| | | listReportDieZhuang: (params = {}) => vm.$u.get('/mes/productReport/listReportDieZhuang/' + params.id), |
| | | // æ¥è¯¢éè¯è½¦é´-çºµåªæ ç¾ä¿¡æ¯ |
| | | listReportZongjian: (params = {}) => vm.$u.get('/mes/productReport/listReportZongjian/' + params.id), |
| | | // æ¥è¯¢å¤å£³è½¦é´-æåä¸éå·¥åºæ ç¾ä¿¡æ¯ |
| | | listReportWaike: (params = {}) => vm.$u.get('/mes/productReport/listReportWaike/' + params.id), |
| | | // çææ ç¾ |
| | | generateLabel: (params = {}) => vm.$u.post('/mes/productReport/generateLabel', params), |
| | | // æ»è£
车é´è·ålistç¼ç |
| | | listReportZongzhuang: (params = {}) => vm.$u.get('/mes/productReport/listReportZongzhuang/' + params.id), |
| | | // éè¯è½¦é´-å
¶ä»å·¥åºè·ålistç¼ç |
| | | listReportOtherOperation: ( params = {}) => vm.$u.get('/mes/productReport/listReportOtherOperation/' + params.id), |
| | | // è·åæåæ»è£
(å
¶ä»è½¦é´) listç¼ç |
| | | listReportFprodZongzhuang: (params = {}) => vm.$u.get('/mes/productReport/listReportFprodZongzhuang/' + params.id), |
| | | // è·åæå°æ ç¾çæ ç¾ä¿¡æ¯ å¤å£³è½¦é´-æåä¸éå·¥åº |
| | | labelInfo: (params = {}) => vm.$u.get('/mes/productReport/labelInfo', params), |
| | | // 纵åªè·åæ ç¾ä¿¡æ¯ |
| | | zongjianLabelInfo: (params = {}) => vm.$u.get('/mes/productReport/zongjian/labelInfo', params), |
| | | // è·åå¥è£
æå°ä¿¡æ¯ |
| | | taozhuangLabelInfo: (params = {}) => vm.$u.get('/mes/productReport/taozhuang/labelInfo', params), |
| | | //æ¥å·¥è¯¦æ
|
| | | productReportDetail: (params = {}) => vm.$u.get('/mes/productReport', params), |
| | | //è·åå¾å· |
| | | findByNo: (params = {}) => vm.$u.get('/mes/part/pda/findByNo' , params), |
| | | //è·åä»»å¡ç±»å |
| | | getAssemblyProcessType:(params = {}) => vm.$u.get('/admin/dict/type/assembly_process_type') |
| | | } |
| | | }; |
| | | |
| | | } |
| | | |
| | | export default { |
| | | install |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * Copyright (c) 2013-Now http://jeesite.com All rights reserved. |
| | | */ |
| | | |
| | | import errorCode from "./errorCode"; |
| | | import config from "./config"; |
| | | |
| | | // æ¤å¤ç¬¬äºä¸ªåæ°vmï¼å°±æ¯æä»¬å¨é¡µé¢ä½¿ç¨çthisï¼ä½ å¯ä»¥éè¿vmè·åvuexçæä½ |
| | | const install = (Vue, vm) => { |
| | | |
| | | // éç¨è¯·æ±å¤´è®¾å® |
| | | const ajaxHeader = 'x-ajax'; |
| | | const sessionIdHeader = 'Authorization'; |
| | | const rememberMeHeader = 'x-remember'; |
| | | |
| | | // 请æ±åæ°é»è®¤é
ç½® |
| | | Vue.prototype.$u.http.setConfig({ |
| | | baseUrl: vm.vuex_config.baseUrl, |
| | | originalData: true, |
| | | // é»è®¤å¤´é¨ï¼http2约å®headeråç§°ç»ä¸å°å ThinkGem |
| | | header: { |
| | | 'x-requested-with': 'XMLHttpRequest' |
| | | } |
| | | }); |
| | | |
| | | // è¯·æ±æ¦æªï¼é
ç½®Tokençåæ° |
| | | Vue.prototype.$u.http.interceptor.request = (req) => { |
| | | |
| | | if (!req.header) { |
| | | req.header = []; |
| | | } |
| | | |
| | | // é»è®¤æå®è¿å JSON æ°æ® |
| | | if (!req.header[ajaxHeader]) { |
| | | req.header[ajaxHeader] = 'json'; |
| | | } |
| | | |
| | | // 设å®ä¼ é Token 认è¯åæ° ThinkGem |
| | | if (!req.header[sessionIdHeader] && vm.vuex_token) { |
| | | req.header[sessionIdHeader] = 'Bearer ' + vm.vuex_token; |
| | | } |
| | | |
| | | // 为èçæµéï¼è®°ä½ææ°æ®ä¸æ¯æ¯æ¬¡é½åéçï¼å½ä¼è¯å¤±æåï¼å°è¯éè¯ç»å½ ThinkGem |
| | | if (!req.header[rememberMeHeader] && vm.vuex_remember && req.remember) { |
| | | req.header[rememberMeHeader] = vm.vuex_remember; |
| | | req.remember = false; |
| | | } |
| | | |
| | | //ä¼ éAPPçæ¬å· |
| | | //req.header['APP-VERSION'] = config.appv; |
| | | |
| | | // console.log('request', req); |
| | | return req; |
| | | } |
| | | |
| | | // ååºæ¦æªï¼å¤æç¶æç æ¯å¦éè¿ |
| | | Vue.prototype.$u.http.interceptor.response = async (res, req) => { |
| | | const status = Number(res.statusCode) || 200 |
| | | const message = res.data.msg || errorCode[status] || errorCode['default'] |
| | | |
| | | //å¤æçæ¬ |
| | | if ((status == 200 || res.data.code === 1) && message.split("@")[0]=='APP-VERSION') { |
| | | vm.$u.toast(message.split("@")[1]); |
| | | return Promise.reject(new Error(message.split("@")[1])) |
| | | } |
| | | //è¿åç¨æ·åè¯å·²è¿ææ¶ï¼å·æ°token跳转è³åºç¨é¦é¡µ |
| | | if(message=='ç¨æ·åè¯å·²è¿æ'){ |
| | | let currRefreshToken=vm.vuex_refresh_token |
| | | let refreshTokenParam={ |
| | | grant_type:'refresh_token', |
| | | refresh_token:currRefreshToken, |
| | | client_id:'pig', |
| | | client_secret:'pig' |
| | | } |
| | | //æ¸
空åå¨ä¿¡æ¯ |
| | | vm.$u.vuex('vuex_token', '') |
| | | vm.$u.vuex('vuex_refresh_token', '') |
| | | vm.$u.vuex('vuex_username', '') |
| | | vm.$u.vuex('vuex_userId', '') |
| | | vm.$u.vuex('vuex_client_id', '') |
| | | vm.$u.vuex('vuex_user', {}) |
| | | |
| | | vm.$u.api.refreshToken(refreshTokenParam).then((resAgain) => { |
| | | //åå¨ç¸å
³ä¿¡æ¯ |
| | | vm.$u.vuex("vuex_token", resAgain.access_token); |
| | | vm.$u.vuex("vuex_refresh_token", resAgain.refresh_token); |
| | | vm.$u.vuex("vuex_username", resAgain.user_info.username); |
| | | vm.$u.vuex("vuex_userId", resAgain.user_info.id); |
| | | //vm.$u.vuex("vuex_client_id", resAgain.client_id); |
| | | vm.$u.vuex("vuex_user", resAgain.user_info); |
| | | |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '/pages/sys/home/index' |
| | | }); |
| | | }, 500); |
| | | |
| | | }).catch(()=>{ |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '/pages/sys/login/index' |
| | | }); |
| | | }, 500); |
| | | }); |
| | | return |
| | | } |
| | | // åå°å®ä¹ 424 é对令çè¿å»çç¹æ®ååºç |
| | | if (status === 424) { |
| | | vm.$u.toast('令çè¿æï¼è¯·éæ°ç»å½'); |
| | | vm.$u.api.logout().then(res => { |
| | | //æ¸
空åå¨ä¿¡æ¯ |
| | | vm.$u.vuex('vuex_token', '') |
| | | vm.$u.vuex('vuex_refresh_token', '') |
| | | vm.$u.vuex('vuex_username', '') |
| | | vm.$u.vuex('vuex_userId', '') |
| | | vm.$u.vuex('vuex_client_id', '') |
| | | vm.$u.vuex('vuex_user', {}) |
| | | |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '/pages/sys/login/index' |
| | | }); |
| | | }, 500); |
| | | |
| | | }); |
| | | return |
| | | } |
| | | |
| | | if (status !== 200 || res.data.code === 1) { |
| | | vm.$u.toast(message,3500); |
| | | return Promise.reject(new Error(message)) |
| | | } |
| | | |
| | | return res.data; |
| | | } |
| | | |
| | | // å°è£
get text è¯·æ± |
| | | vm.$u.getText = (url, data = {}, header = {}) => { |
| | | return vm.$u.http.request({ |
| | | dataType: 'text', |
| | | method: 'GET', |
| | | url, |
| | | header, |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // å°è£
post json è¯·æ± |
| | | vm.$u.postJson = (url, data = {}, header = {}) => { |
| | | header['content-type'] = 'application/json'; |
| | | return vm.$u.http.request({ |
| | | url, |
| | | method: 'POST', |
| | | header, |
| | | data |
| | | }) |
| | | } |
| | | |
| | | } |
| | | |
| | | export default { |
| | | install |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * Copyright (c) 2013-Now http://Asun-MES.com All rights reserved. |
| | | */ |
| | | export default { |
| | | common: { |
| | | title: 'Asun-MES', |
| | | }, |
| | | nav: { |
| | | home: 'Home', |
| | | user: 'User', |
| | | log: 'Log' |
| | | }, |
| | | login: { |
| | | title: 'Login', |
| | | placeholderAccount: 'Enter Account', |
| | | placeholderMobile: 'Enter Mobile', |
| | | placeholderPassword: 'Enter Password', |
| | | autoLogin: 'Auto Login', |
| | | loginButton: 'Login', |
| | | vxLoginButton: 'Login', |
| | | logoutButton: 'Logout', |
| | | forget: 'Forget Password', |
| | | reg: 'Resister Account', |
| | | noLogin: 'No Login' |
| | | }, |
| | | home: { |
| | | title: 'Home' |
| | | }, |
| | | user: { |
| | | title: 'User' |
| | | }, |
| | | log: { |
| | | title: 'Log' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * Copyright (c) 2013-Now http://jeesite.com All rights reserved. |
| | | */ |
| | | export default { |
| | | common: { |
| | | title: 'pigx-app', |
| | | }, |
| | | nav: { |
| | | home: 'å·¥ä½å°', |
| | | user: 'ç¨æ·', |
| | | log: 'æ¥å¿', |
| | | chat: 'è天', |
| | | }, |
| | | login: { |
| | | title: 'ç»å½', |
| | | placeholderAccount: '请è¾å
¥è´¦å·', |
| | | placeholderMobile: '请è¾å
¥ææºå·', |
| | | placeholderPassword: '请è¾å
¥å¯ç ', |
| | | autoLogin: 'èªå¨ç»å½', |
| | | loginButton: 'ç» å½', |
| | | vxLoginButton: '微信ä¸é®ç»å½', |
| | | logoutButton: 'éåºç»å½', |
| | | forget: 'å¿è®°å¯ç ', |
| | | reg: '注åè´¦å·', |
| | | noLogin: 'æªç»å½' |
| | | }, |
| | | home: { |
| | | title: 'å·¥ä½å°' |
| | | }, |
| | | user: { |
| | | title: 'ç¨æ·ä¸å¿' |
| | | }, |
| | | log: { |
| | | title: 'æ¥å¿' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | ! function(e, t) { |
| | | 'object' === typeof exports && 'undefined' !== typeof module ? module.exports = t() : 'function' === |
| | | typeof define && define.amd ? define(t) : e.moment = t() |
| | | }(this, function() { |
| | | 'use strict'; |
| | | let e, i; |
| | | |
| | | function c() { |
| | | return e.apply(null, arguments) |
| | | } |
| | | |
| | | function o(e) { |
| | | return e instanceof Array || '[object Array]' === Object.prototype.toString.call(e) |
| | | } |
| | | |
| | | function u(e) { |
| | | return null != e && '[object Object]' === Object.prototype.toString.call(e) |
| | | } |
| | | |
| | | function l(e) { |
| | | return void 0 === e |
| | | } |
| | | |
| | | function h(e) { |
| | | return 'number' === typeof e || '[object Number]' === Object.prototype.toString.call(e) |
| | | } |
| | | |
| | | function d(e) { |
| | | return e instanceof Date || '[object Date]' === Object.prototype.toString.call(e) |
| | | } |
| | | |
| | | function f(e, t) { |
| | | let n, s = []; |
| | | for (n = 0; n < e.length; ++n) s.push(t(e[n], n)); |
| | | return s |
| | | } |
| | | |
| | | function m(e, t) { |
| | | return Object.prototype.hasOwnProperty.call(e, t) |
| | | } |
| | | |
| | | function _(e, t) { |
| | | for (let n in t) m(t, n) && (e[n] = t[n]); |
| | | return m(t, 'toString') && (e.toString = t.toString), m(t, 'valueOf') && (e.valueOf = t.valueOf), e |
| | | } |
| | | |
| | | function y(e, t, n, s) { |
| | | return Tt(e, t, n, s, !0).utc() |
| | | } |
| | | |
| | | function g(e) { |
| | | return null == e._pf && (e._pf = { |
| | | empty: !1, |
| | | unusedTokens: [], |
| | | unusedInput: [], |
| | | overflow: -2, |
| | | charsLeftOver: 0, |
| | | nullInput: !1, |
| | | invalidMonth: null, |
| | | invalidFormat: !1, |
| | | userInvalidated: !1, |
| | | iso: !1, |
| | | parsedDateParts: [], |
| | | meridiem: null, |
| | | rfc2822: !1, |
| | | weekdayMismatch: !1 |
| | | }), e._pf |
| | | } |
| | | |
| | | function v(e) { |
| | | if (null == e._isValid) { |
| | | let t = g(e), |
| | | n = i.call(t.parsedDateParts, function(e) { |
| | | return null != e |
| | | }), |
| | | s = !isNaN(e._d.getTime()) && t.overflow < 0 && !t.empty && !t.invalidMonth && !t.invalidWeekday && |
| | | !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t |
| | | .meridiem && n); |
| | | if (e._strict && (s = s && 0 === t.charsLeftOver && 0 === t.unusedTokens.length && void 0 === t |
| | | .bigHour), null != Object.isFrozen && Object.isFrozen(e)) return s; |
| | | e._isValid = s |
| | | } |
| | | return e._isValid |
| | | } |
| | | |
| | | function p(e) { |
| | | let t = y(NaN); |
| | | return null != e ? _(g(t), e) : g(t).userInvalidated = !0, t |
| | | } |
| | | i = Array.prototype.some ? Array.prototype.some : function(e) { |
| | | for (let t = Object(this), n = t.length >>> 0, s = 0; s < n; s++) |
| | | if (s in t && e.call(this, t[s], s, t)) return !0; |
| | | return !1 |
| | | }; |
| | | let r = c.momentProperties = []; |
| | | |
| | | function w(e, t) { |
| | | let n, s, i; |
| | | if (l(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), l(t._i) || (e._i = t._i), l(t._f) || |
| | | (e._f = t._f), l(t._l) || (e._l = t._l), l(t._strict) || (e._strict = t._strict), l(t._tzm) || (e._tzm = |
| | | t._tzm), l(t._isUTC) || (e._isUTC = t._isUTC), l(t._offset) || (e._offset = t._offset), l(t._pf) || |
| | | (e._pf = g(t)), l(t._locale) || (e._locale = t._locale), 0 < r.length) |
| | | for (n = 0; n < r.length; n++) l(i = t[s = r[n]]) || (e[s] = i); |
| | | return e |
| | | } |
| | | let t = !1; |
| | | |
| | | function M(e) { |
| | | w(this, e), this._d = new Date(null != e._d ? e._d.getTime() : NaN), this.isValid() || (this._d = new Date( |
| | | NaN)), !1 === t && (t = !0, c.updateOffset(this), t = !1) |
| | | } |
| | | |
| | | function k(e) { |
| | | return e instanceof M || null != e && null != e._isAMomentObject |
| | | } |
| | | |
| | | function S(e) { |
| | | return e < 0 ? Math.ceil(e) || 0 : Math.floor(e) |
| | | } |
| | | |
| | | function D(e) { |
| | | let t = +e, |
| | | n = 0; |
| | | return 0 !== t && isFinite(t) && (n = S(t)), n |
| | | } |
| | | |
| | | function a(e, t, n) { |
| | | let s, i = Math.min(e.length, t.length), |
| | | r = Math.abs(e.length - t.length), |
| | | a = 0; |
| | | for (s = 0; s < i; s++)(n && e[s] !== t[s] || !n && D(e[s]) !== D(t[s])) && a++; |
| | | return a + r |
| | | } |
| | | |
| | | function Y(e) { |
| | | !1 === c.suppressDeprecationWarnings && 'undefined' !== typeof console && console.warn && console.warn( |
| | | 'Deprecation warning: ' + e) |
| | | } |
| | | |
| | | function n(i, r) { |
| | | let a = !0; |
| | | return _(function() { |
| | | if (null != c.deprecationHandler && c.deprecationHandler(null, i), a) { |
| | | for (var e, t = [], n = 0; n < arguments.length; n++) { |
| | | if (e = '', 'object' === typeof arguments[n]) { |
| | | for (let s in e += '\n[' + n + '] ', arguments[0]) e += s + ': ' + arguments[0][s] + |
| | | ', '; |
| | | e = e.slice(0, -2) |
| | | } else e = arguments[n]; |
| | | t.push(e) |
| | | } |
| | | Y(i + '\nArguments: ' + Array.prototype.slice.call(t).join('') + '\n' + (new Error).stack), |
| | | a = !1 |
| | | } |
| | | return r.apply(this, arguments) |
| | | }, r) |
| | | } |
| | | let s, O = {}; |
| | | |
| | | function T(e, t) { |
| | | null != c.deprecationHandler && c.deprecationHandler(e, t), O[e] || (Y(t), O[e] = !0) |
| | | } |
| | | |
| | | function b(e) { |
| | | return e instanceof Function || '[object Function]' === Object.prototype.toString.call(e) |
| | | } |
| | | |
| | | function x(e, t) { |
| | | let n, s = _({}, e); |
| | | for (n in t) m(t, n) && (u(e[n]) && u(t[n]) ? (s[n] = {}, _(s[n], e[n]), _(s[n], t[n])) : null != t[n] ? s[ |
| | | n] = t[n] : delete s[n]); |
| | | for (n in e) m(e, n) && !m(t, n) && u(e[n]) && (s[n] = _({}, s[n])); |
| | | return s |
| | | } |
| | | |
| | | function P(e) { |
| | | null != e && this.set(e) |
| | | } |
| | | c.suppressDeprecationWarnings = !1, c.deprecationHandler = null, s = Object.keys ? Object.keys : function(e) { |
| | | let t, n = []; |
| | | for (t in e) m(e, t) && n.push(t); |
| | | return n |
| | | }; |
| | | let W = {}; |
| | | |
| | | function C(e, t) { |
| | | let n = e.toLowerCase(); |
| | | W[n] = W[n + 's'] = W[t] = e |
| | | } |
| | | |
| | | function H(e) { |
| | | return 'string' === typeof e ? W[e] || W[e.toLowerCase()] : void 0 |
| | | } |
| | | |
| | | function R(e) { |
| | | let t, n, s = {}; |
| | | for (n in e) m(e, n) && (t = H(n)) && (s[t] = e[n]); |
| | | return s |
| | | } |
| | | let U = {}; |
| | | |
| | | function F(e, t) { |
| | | U[e] = t |
| | | } |
| | | |
| | | function L(e, t, n) { |
| | | let s = '' + Math.abs(e), |
| | | i = t - s.length; |
| | | return (0 <= e ? n ? '+' : '' : '-') + Math.pow(10, Math.max(0, i)).toString().substr(1) + s |
| | | } |
| | | let N = |
| | | /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, |
| | | G = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, |
| | | V = {}, |
| | | E = {}; |
| | | |
| | | function I(e, t, n, s) { |
| | | let i = s; |
| | | 'string' === typeof s && (i = function() { |
| | | return this[s]() |
| | | }), e && (E[e] = i), t && (E[t[0]] = function() { |
| | | return L(i.apply(this, arguments), t[1], t[2]) |
| | | }), n && (E[n] = function() { |
| | | return this.localeData().ordinal(i.apply(this, arguments), e) |
| | | }) |
| | | } |
| | | |
| | | function A(e, t) { |
| | | return e.isValid() ? (t = j(t, e.localeData()), V[t] = V[t] || function(s) { |
| | | let e, i, t, r = s.match(N); |
| | | for (e = 0, i = r.length; e < i; e++) E[r[e]] ? r[e] = E[r[e]] : r[e] = (t = r[e]).match( |
| | | /\[[\s\S]/) ? t.replace(/^\[|\]$/g, '') : t.replace(/\\/g, ''); |
| | | return function(e) { |
| | | let t, n = ''; |
| | | for (t = 0; t < i; t++) n += b(r[t]) ? r[t].call(e, s) : r[t]; |
| | | return n |
| | | } |
| | | }(t), V[t](e)) : e.localeData().invalidDate() |
| | | } |
| | | |
| | | function j(e, t) { |
| | | let n = 5; |
| | | |
| | | function s(e) { |
| | | return t.longDateFormat(e) || e |
| | | } |
| | | for (G.lastIndex = 0; 0 <= n && G.test(e);) e = e.replace(G, s), G.lastIndex = 0, n -= 1; |
| | | return e |
| | | } |
| | | let Z = /\d/, |
| | | z = /\d\d/, |
| | | $ = /\d{3}/, |
| | | q = /\d{4}/, |
| | | J = /[+-]?\d{6}/, |
| | | B = /\d\d?/, |
| | | Q = /\d\d\d\d?/, |
| | | X = /\d\d\d\d\d\d?/, |
| | | K = /\d{1,3}/, |
| | | ee = /\d{1,4}/, |
| | | te = /[+-]?\d{1,6}/, |
| | | ne = /\d+/, |
| | | se = /[+-]?\d+/, |
| | | ie = /Z|[+-]\d\d:?\d\d/gi, |
| | | re = /Z|[+-]\d\d(?::?\d\d)?/gi, |
| | | ae = |
| | | /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, |
| | | oe = {}; |
| | | |
| | | function ue(e, n, s) { |
| | | oe[e] = b(n) ? n : function(e, t) { |
| | | return e && s ? s : n |
| | | } |
| | | } |
| | | |
| | | function le(e, t) { |
| | | return m(oe, e) ? oe[e](t._strict, t._locale) : new RegExp(he(e.replace('\\', '').replace( |
| | | /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, |
| | | function(e, t, n, s, i) { |
| | | return t || n || s || i |
| | | }))) |
| | | } |
| | | |
| | | function he(e) { |
| | | return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') |
| | | } |
| | | let de = {}; |
| | | |
| | | function ce(e, n) { |
| | | let t, s = n; |
| | | for ('string' === typeof e && (e = [e]), h(n) && (s = function(e, t) { |
| | | t[n] = D(e) |
| | | }), t = 0; t < e.length; t++) de[e[t]] = s |
| | | } |
| | | |
| | | function fe(e, i) { |
| | | ce(e, function(e, t, n, s) { |
| | | n._w = n._w || {}, i(e, n._w, n, s) |
| | | }) |
| | | } |
| | | let me = 0, |
| | | _e = 1, |
| | | ye = 2, |
| | | ge = 3, |
| | | ve = 4, |
| | | pe = 5, |
| | | we = 6, |
| | | Me = 7, |
| | | ke = 8; |
| | | |
| | | function Se(e) { |
| | | return De(e) ? 366 : 365 |
| | | } |
| | | |
| | | function De(e) { |
| | | return e % 4 == 0 && e % 100 != 0 || e % 400 == 0 |
| | | } |
| | | I('Y', 0, 0, function() { |
| | | let e = this.year(); |
| | | return e <= 9999 ? '' + e : '+' + e |
| | | }), I(0, ['YY', 2], 0, function() { |
| | | return this.year() % 100 |
| | | }), I(0, ['YYYY', 4], 0, 'year'), I(0, ['YYYYY', 5], 0, 'year'), I(0, ['YYYYYY', 6, !0], 0, 'year'), C( |
| | | 'year', 'y'), F('year', 1), ue('Y', se), ue('YY', B, z), ue('YYYY', ee, q), ue('YYYYY', te, J), ue( |
| | | 'YYYYYY', te, J), ce(['YYYYY', 'YYYYYY'], me), ce('YYYY', function(e, t) { |
| | | t[me] = 2 === e.length ? c.parseTwoDigitYear(e) : D(e) |
| | | }), ce('YY', function(e, t) { |
| | | t[me] = c.parseTwoDigitYear(e) |
| | | }), ce('Y', function(e, t) { |
| | | t[me] = parseInt(e, 10) |
| | | }), c.parseTwoDigitYear = function(e) { |
| | | return D(e) + (68 < D(e) ? 1900 : 2e3) |
| | | }; |
| | | let Ye, Oe = Te('FullYear', !0); |
| | | |
| | | function Te(t, n) { |
| | | return function(e) { |
| | | return null != e ? (xe(this, t, e), c.updateOffset(this, n), this) : be(this, t) |
| | | } |
| | | } |
| | | |
| | | function be(e, t) { |
| | | return e.isValid() ? e._d['get' + (e._isUTC ? 'UTC' : '') + t]() : NaN |
| | | } |
| | | |
| | | function xe(e, t, n) { |
| | | e.isValid() && !isNaN(n) && ('FullYear' === t && De(e.year()) && 1 === e.month() && 29 === e.date() ? e._d[ |
| | | 'set' + (e._isUTC ? 'UTC' : '') + t](n, e.month(), Pe(n, e.month())) : e._d['set' + (e._isUTC ? |
| | | 'UTC' : '') + t](n)) |
| | | } |
| | | |
| | | function Pe(e, t) { |
| | | if (isNaN(e) || isNaN(t)) return NaN; |
| | | let n, s = (t % (n = 12) + n) % n; |
| | | return e += (t - s) / 12, 1 === s ? De(e) ? 29 : 28 : 31 - s % 7 % 2 |
| | | } |
| | | Ye = Array.prototype.indexOf ? Array.prototype.indexOf : function(e) { |
| | | let t; |
| | | for (t = 0; t < this.length; ++t) |
| | | if (this[t] === e) return t; |
| | | return -1 |
| | | }, I('M', ['MM', 2], 'Mo', function() { |
| | | return this.month() + 1 |
| | | }), I('MMM', 0, 0, function(e) { |
| | | return this.localeData().monthsShort(this, e) |
| | | }), I('MMMM', 0, 0, function(e) { |
| | | return this.localeData().months(this, e) |
| | | }), C('month', 'M'), F('month', 8), ue('M', B), ue('MM', B, z), ue('MMM', function(e, t) { |
| | | return t.monthsShortRegex(e) |
| | | }), ue('MMMM', function(e, t) { |
| | | return t.monthsRegex(e) |
| | | }), ce(['M', 'MM'], function(e, t) { |
| | | t[_e] = D(e) - 1 |
| | | }), ce(['MMM', 'MMMM'], function(e, t, n, s) { |
| | | let i = n._locale.monthsParse(e, s, n._strict); |
| | | null != i ? t[_e] = i : g(n).invalidMonth = e |
| | | }); |
| | | let We = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, |
| | | Ce = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); |
| | | let He = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); |
| | | |
| | | function Re(e, t) { |
| | | let n; |
| | | if (!e.isValid()) return e; |
| | | if ('string' === typeof t) |
| | | if (/^\d+$/.test(t)) t = D(t); |
| | | else if (!h(t = e.localeData().monthsParse(t))) return e; |
| | | return n = Math.min(e.date(), Pe(e.year(), t)), e._d['set' + (e._isUTC ? 'UTC' : '') + 'Month'](t, n), e |
| | | } |
| | | |
| | | function Ue(e) { |
| | | return null != e ? (Re(this, e), c.updateOffset(this, !0), this) : be(this, 'Month') |
| | | } |
| | | let Fe = ae; |
| | | let Le = ae; |
| | | |
| | | function Ne() { |
| | | function e(e, t) { |
| | | return t.length - e.length |
| | | } |
| | | let t, n, s = [], |
| | | i = [], |
| | | r = []; |
| | | for (t = 0; t < 12; t++) n = y([2e3, t]), s.push(this.monthsShort(n, '')), i.push(this.months(n, '')), r |
| | | .push(this.months(n, '')), r.push(this.monthsShort(n, '')); |
| | | for (s.sort(e), i.sort(e), r.sort(e), t = 0; t < 12; t++) s[t] = he(s[t]), i[t] = he(i[t]); |
| | | for (t = 0; t < 24; t++) r[t] = he(r[t]); |
| | | this._monthsRegex = new RegExp('^(' + r.join('|') + ')', 'i'), this._monthsShortRegex = this._monthsRegex, |
| | | this._monthsStrictRegex = new RegExp('^(' + i.join('|') + ')', 'i'), this._monthsShortStrictRegex = |
| | | new RegExp('^(' + s.join('|') + ')', 'i') |
| | | } |
| | | |
| | | function Ge(e) { |
| | | let t; |
| | | if (e < 100 && 0 <= e) { |
| | | let n = Array.prototype.slice.call(arguments); |
| | | n[0] = e + 400, t = new Date(Date.UTC.apply(null, n)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear( |
| | | e) |
| | | } else t = new Date(Date.UTC.apply(null, arguments)); |
| | | return t |
| | | } |
| | | |
| | | function Ve(e, t, n) { |
| | | let s = 7 + t - n; |
| | | return -((7 + Ge(e, 0, s).getUTCDay() - t) % 7) + s - 1 |
| | | } |
| | | |
| | | function Ee(e, t, n, s, i) { |
| | | let r, a, o = 1 + 7 * (t - 1) + (7 + n - s) % 7 + Ve(e, s, i); |
| | | return a = o <= 0 ? Se(r = e - 1) + o : o > Se(e) ? (r = e + 1, o - Se(e)) : (r = e, o), { |
| | | year: r, |
| | | dayOfYear: a |
| | | } |
| | | } |
| | | |
| | | function Ie(e, t, n) { |
| | | let s, i, r = Ve(e.year(), t, n), |
| | | a = Math.floor((e.dayOfYear() - r - 1) / 7) + 1; |
| | | return a < 1 ? s = a + Ae(i = e.year() - 1, t, n) : a > Ae(e.year(), t, n) ? (s = a - Ae(e.year(), t, n), |
| | | i = e.year() + 1) : (i = e.year(), s = a), { |
| | | week: s, |
| | | year: i |
| | | } |
| | | } |
| | | |
| | | function Ae(e, t, n) { |
| | | let s = Ve(e, t, n), |
| | | i = Ve(e + 1, t, n); |
| | | return (Se(e) - s + i) / 7 |
| | | } |
| | | I('w', ['ww', 2], 'wo', 'week'), I('W', ['WW', 2], 'Wo', 'isoWeek'), C('week', 'w'), C('isoWeek', 'W'), F( |
| | | 'week', 5), F('isoWeek', 5), ue('w', B), ue('ww', B, z), ue('W', B), ue('WW', B, z), fe(['w', 'ww', 'W', |
| | | 'WW' |
| | | ], function(e, t, n, s) { |
| | | t[s.substr(0, 1)] = D(e) |
| | | }); |
| | | |
| | | function je(e, t) { |
| | | return e.slice(t, 7).concat(e.slice(0, t)) |
| | | } |
| | | I('d', 0, 'do', 'day'), I('dd', 0, 0, function(e) { |
| | | return this.localeData().weekdaysMin(this, e) |
| | | }), I('ddd', 0, 0, function(e) { |
| | | return this.localeData().weekdaysShort(this, e) |
| | | }), I('dddd', 0, 0, function(e) { |
| | | return this.localeData().weekdays(this, e) |
| | | }), I('e', 0, 0, 'weekday'), I('E', 0, 0, 'isoWeekday'), C('day', 'd'), C('weekday', 'e'), C('isoWeekday', |
| | | 'E'), F('day', 11), F('weekday', 11), F('isoWeekday', 11), ue('d', B), ue('e', B), ue('E', B), ue('dd', |
| | | function(e, t) { |
| | | return t.weekdaysMinRegex(e) |
| | | }), ue('ddd', function(e, t) { |
| | | return t.weekdaysShortRegex(e) |
| | | }), ue('dddd', function(e, t) { |
| | | return t.weekdaysRegex(e) |
| | | }), fe(['dd', 'ddd', 'dddd'], function(e, t, n, s) { |
| | | let i = n._locale.weekdaysParse(e, s, n._strict); |
| | | null != i ? t.d = i : g(n).invalidWeekday = e |
| | | }), fe(['d', 'e', 'E'], function(e, t, n, s) { |
| | | t[s] = D(e) |
| | | }); |
| | | let Ze = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); |
| | | let ze = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); |
| | | let $e = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); |
| | | let qe = ae; |
| | | let Je = ae; |
| | | let Be = ae; |
| | | |
| | | function Qe() { |
| | | function e(e, t) { |
| | | return t.length - e.length |
| | | } |
| | | let t, n, s, i, r, a = [], |
| | | o = [], |
| | | u = [], |
| | | l = []; |
| | | for (t = 0; t < 7; t++) n = y([2e3, 1]).day(t), s = this.weekdaysMin(n, ''), i = this.weekdaysShort(n, ''), |
| | | r = this.weekdays(n, ''), a.push(s), o.push(i), u.push(r), l.push(s), l.push(i), l.push(r); |
| | | for (a.sort(e), o.sort(e), u.sort(e), l.sort(e), t = 0; t < 7; t++) o[t] = he(o[t]), u[t] = he(u[t]), l[t] = |
| | | he(l[t]); |
| | | this._weekdaysRegex = new RegExp('^(' + l.join('|') + ')', 'i'), this._weekdaysShortRegex = this |
| | | ._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp( |
| | | '^(' + u.join('|') + ')', 'i'), this._weekdaysShortStrictRegex = new RegExp('^(' + o.join('|') + |
| | | ')', 'i'), this._weekdaysMinStrictRegex = new RegExp('^(' + a.join('|') + ')', 'i') |
| | | } |
| | | |
| | | function Xe() { |
| | | return this.hours() % 12 || 12 |
| | | } |
| | | |
| | | function Ke(e, t) { |
| | | I(e, 0, 0, function() { |
| | | return this.localeData().meridiem(this.hours(), this.minutes(), t) |
| | | }) |
| | | } |
| | | |
| | | function et(e, t) { |
| | | return t._meridiemParse |
| | | } |
| | | I('H', ['HH', 2], 0, 'hour'), I('h', ['hh', 2], 0, Xe), I('k', ['kk', 2], 0, function() { |
| | | return this.hours() || 24 |
| | | }), I('hmm', 0, 0, function() { |
| | | return '' + Xe.apply(this) + L(this.minutes(), 2) |
| | | }), I('hmmss', 0, 0, function() { |
| | | return '' + Xe.apply(this) + L(this.minutes(), 2) + L(this.seconds(), 2) |
| | | }), I('Hmm', 0, 0, function() { |
| | | return '' + this.hours() + L(this.minutes(), 2) |
| | | }), I('Hmmss', 0, 0, function() { |
| | | return '' + this.hours() + L(this.minutes(), 2) + L(this.seconds(), 2) |
| | | }), Ke('a', !0), Ke('A', !1), C('hour', 'h'), F('hour', 13), ue('a', et), ue('A', et), ue('H', B), ue('h', |
| | | B), ue('k', B), ue('HH', B, z), ue('hh', B, z), ue('kk', B, z), ue('hmm', Q), ue('hmmss', X), ue('Hmm', |
| | | Q), ue('Hmmss', X), ce(['H', 'HH'], ge), ce(['k', 'kk'], function(e, t, n) { |
| | | let s = D(e); |
| | | t[ge] = 24 === s ? 0 : s |
| | | }), ce(['a', 'A'], function(e, t, n) { |
| | | n._isPm = n._locale.isPM(e), n._meridiem = e |
| | | }), ce(['h', 'hh'], function(e, t, n) { |
| | | t[ge] = D(e), g(n).bigHour = !0 |
| | | }), ce('hmm', function(e, t, n) { |
| | | let s = e.length - 2; |
| | | t[ge] = D(e.substr(0, s)), t[ve] = D(e.substr(s)), g(n).bigHour = !0 |
| | | }), ce('hmmss', function(e, t, n) { |
| | | let s = e.length - 4, |
| | | i = e.length - 2; |
| | | t[ge] = D(e.substr(0, s)), t[ve] = D(e.substr(s, 2)), t[pe] = D(e.substr(i)), g(n).bigHour = !0 |
| | | }), ce('Hmm', function(e, t, n) { |
| | | let s = e.length - 2; |
| | | t[ge] = D(e.substr(0, s)), t[ve] = D(e.substr(s)) |
| | | }), ce('Hmmss', function(e, t, n) { |
| | | let s = e.length - 4, |
| | | i = e.length - 2; |
| | | t[ge] = D(e.substr(0, s)), t[ve] = D(e.substr(s, 2)), t[pe] = D(e.substr(i)) |
| | | }); |
| | | let tt, nt = Te('Hours', !0), |
| | | st = { |
| | | calendar: { |
| | | sameDay: '[Today at] LT', |
| | | nextDay: '[Tomorrow at] LT', |
| | | nextWeek: 'dddd [at] LT', |
| | | lastDay: '[Yesterday at] LT', |
| | | lastWeek: '[Last] dddd [at] LT', |
| | | sameElse: 'L' |
| | | }, |
| | | longDateFormat: { |
| | | LTS: 'h:mm:ss A', |
| | | LT: 'h:mm A', |
| | | L: 'MM/DD/YYYY', |
| | | LL: 'MMMM D, YYYY', |
| | | LLL: 'MMMM D, YYYY h:mm A', |
| | | LLLL: 'dddd, MMMM D, YYYY h:mm A' |
| | | }, |
| | | invalidDate: 'Invalid date', |
| | | ordinal: '%d', |
| | | dayOfMonthOrdinalParse: /\d{1,2}/, |
| | | relativeTime: { |
| | | future: 'in %s', |
| | | past: '%s ago', |
| | | s: 'a few seconds', |
| | | ss: '%d seconds', |
| | | m: 'a minute', |
| | | mm: '%d minutes', |
| | | h: 'an hour', |
| | | hh: '%d hours', |
| | | d: 'a day', |
| | | dd: '%d days', |
| | | M: 'a month', |
| | | MM: '%d months', |
| | | y: 'a year', |
| | | yy: '%d years' |
| | | }, |
| | | months: Ce, |
| | | monthsShort: He, |
| | | week: { |
| | | dow: 0, |
| | | doy: 6 |
| | | }, |
| | | weekdays: Ze, |
| | | weekdaysMin: $e, |
| | | weekdaysShort: ze, |
| | | meridiemParse: /[ap]\.?m?\.?/i |
| | | }, |
| | | it = {}, |
| | | rt = {}; |
| | | |
| | | function at(e) { |
| | | return e ? e.toLowerCase().replace('_', '-') : e |
| | | } |
| | | |
| | | function ot(e) { |
| | | let t = null; |
| | | if (!it[e] && 'undefined' !== typeof module && module && module.exports) try { |
| | | t = tt._abbr, ut(t) |
| | | } catch (e) {} |
| | | return it[e] |
| | | } |
| | | |
| | | function ut(e, t) { |
| | | let n; |
| | | return e && ((n = l(t) ? ht(e) : lt(e, t)) ? tt = n : 'undefined' !== typeof console && console.warn && |
| | | console.warn('Locale ' + e + ' not found. Did you forget to load it?')), tt._abbr |
| | | } |
| | | |
| | | function lt(e, t) { |
| | | if (null === t) return delete it[e], null; |
| | | let n, s = st; |
| | | if (t.abbr = e, null != it[e]) T('defineLocaleOverride', |
| | | 'use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' |
| | | ), s = it[e]._config; |
| | | else if (null != t.parentLocale) |
| | | if (null != it[t.parentLocale]) s = it[t.parentLocale]._config; |
| | | else { |
| | | if (null == (n = ot(t.parentLocale))) return rt[t.parentLocale] || (rt[t.parentLocale] = []), rt[t |
| | | .parentLocale].push({ |
| | | name: e, |
| | | config: t |
| | | }), null; |
| | | s = n._config |
| | | } return it[e] = new P(x(s, t)), rt[e] && rt[e].forEach(function(e) { |
| | | lt(e.name, e.config) |
| | | }), ut(e), it[e] |
| | | } |
| | | |
| | | function ht(e) { |
| | | let t; |
| | | if (e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e) return tt; |
| | | if (!o(e)) { |
| | | if (t = ot(e)) return t; |
| | | e = [e] |
| | | } |
| | | return function(e) { |
| | | for (var t, n, s, i, r = 0; r < e.length;) { |
| | | for (t = (i = at(e[r]).split('-')).length, n = (n = at(e[r + 1])) ? n.split('-') : null; 0 < |
| | | t;) { |
| | | if (s = ot(i.slice(0, t).join('-'))) return s; |
| | | if (n && n.length >= t && a(i, n, !0) >= t - 1) break; |
| | | t-- |
| | | } |
| | | r++ |
| | | } |
| | | return tt |
| | | }(e) |
| | | } |
| | | |
| | | function dt(e) { |
| | | let t, n = e._a; |
| | | return n && -2 === g(e).overflow && (t = n[_e] < 0 || 11 < n[_e] ? _e : n[ye] < 1 || n[ye] > Pe(n[me], n[ |
| | | _e]) ? ye : n[ge] < 0 || 24 < n[ge] || 24 === n[ge] && (0 !== n[ve] || 0 !== n[pe] || 0 !== n[ |
| | | we]) ? ge : n[ve] < 0 || 59 < n[ve] ? ve : n[pe] < 0 || 59 < n[pe] ? pe : n[we] < 0 || 999 < n[ |
| | | we] ? we : -1, g(e)._overflowDayOfYear && (t < me || ye < t) && (t = ye), g(e)._overflowWeeks && |
| | | -1 === t && (t = Me), g(e)._overflowWeekday && -1 === t && (t = ke), g(e).overflow = t), e |
| | | } |
| | | |
| | | function ct(e, t, n) { |
| | | return null != e ? e : null != t ? t : n |
| | | } |
| | | |
| | | function ft(e) { |
| | | let t, n, s, i, r, a = []; |
| | | if (!e._d) { |
| | | let o, u; |
| | | for (o = e, u = new Date(c.now()), s = o._useUTC ? [u.getUTCFullYear(), u.getUTCMonth(), u |
| | | .getUTCDate()] : [u.getFullYear(), u.getMonth(), u.getDate()], e._w && null == e._a[ye] && null == e._a[ |
| | | _e] && function(e) { |
| | | let t, n, s, i, r, a, o, u; |
| | | if (null != (t = e._w).GG || null != t.W || null != t.E) r = 1, a = 4, n = ct(t.GG, e._a[me], |
| | | Ie(bt(), 1, 4).year), s = ct(t.W, 1), ((i = ct(t.E, 1)) < 1 || 7 < i) && (u = !0); |
| | | else { |
| | | r = e._locale._week.dow, a = e._locale._week.doy; |
| | | let l = Ie(bt(), r, a); |
| | | n = ct(t.gg, e._a[me], l.year), s = ct(t.w, l.week), null != t.d ? ((i = t.d) < 0 || 6 < |
| | | i) && (u = !0) : null != t.e ? (i = t.e + r, (t.e < 0 || 6 < t.e) && (u = !0)) : i = r |
| | | } |
| | | s < 1 || s > Ae(n, r, a) ? g(e)._overflowWeeks = !0 : null != u ? g(e)._overflowWeekday = !0 : ( |
| | | o = Ee(n, s, i, r, a), e._a[me] = o.year, e._dayOfYear = o.dayOfYear) |
| | | }(e), null != e._dayOfYear && (r = ct(e._a[me], s[me]), (e._dayOfYear > Se(r) || 0 === e |
| | | ._dayOfYear) && (g(e)._overflowDayOfYear = !0), n = Ge(r, 0, e._dayOfYear), e._a[_e] = n |
| | | .getUTCMonth(), e._a[ye] = n.getUTCDate()), t = 0; t < 3 && null == e._a[t]; ++t) e._a[t] = a[ |
| | | t] = s[t]; |
| | | for (; t < 7; t++) e._a[t] = a[t] = null == e._a[t] ? 2 === t ? 1 : 0 : e._a[t]; |
| | | 24 === e._a[ge] && 0 === e._a[ve] && 0 === e._a[pe] && 0 === e._a[we] && (e._nextDay = !0, e._a[ge] = |
| | | 0), e._d = (e._useUTC ? Ge : function(e, t, n, s, i, r, a) { |
| | | let o; |
| | | return e < 100 && 0 <= e ? (o = new Date(e + 400, t, n, s, i, r, a), isFinite(o |
| | | .getFullYear()) && o.setFullYear(e)) : o = new Date(e, t, n, s, i, r, a), o |
| | | }).apply(null, a), i = e._useUTC ? e._d.getUTCDay() : e._d.getDay(), null != e._tzm && e._d |
| | | .setUTCMinutes(e._d.getUTCMinutes() - e._tzm), e._nextDay && (e._a[ge] = 24), e._w && void 0 !== e |
| | | ._w.d && e._w.d !== i && (g(e).weekdayMismatch = !0) |
| | | } |
| | | } |
| | | let mt = |
| | | /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/, |
| | | _t = |
| | | /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/, |
| | | yt = /Z|[+-]\d\d(?::?\d\d)?/, |
| | | gt = [ |
| | | ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], |
| | | ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], |
| | | ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], |
| | | ['GGGG-[W]WW', /\d{4}-W\d\d/, !1], |
| | | ['YYYY-DDD', /\d{4}-\d{3}/], |
| | | ['YYYY-MM', /\d{4}-\d\d/, !1], |
| | | ['YYYYYYMMDD', /[+-]\d{10}/], |
| | | ['YYYYMMDD', /\d{8}/], |
| | | ['GGGG[W]WWE', /\d{4}W\d{3}/], |
| | | ['GGGG[W]WW', /\d{4}W\d{2}/, !1], |
| | | ['YYYYDDD', /\d{7}/] |
| | | ], |
| | | vt = [ |
| | | ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], |
| | | ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], |
| | | ['HH:mm:ss', /\d\d:\d\d:\d\d/], |
| | | ['HH:mm', /\d\d:\d\d/], |
| | | ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], |
| | | ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], |
| | | ['HHmmss', /\d\d\d\d\d\d/], |
| | | ['HHmm', /\d\d\d\d/], |
| | | ['HH', /\d\d/] |
| | | ], |
| | | pt = /^\/?Date\((\-?\d+)/i; |
| | | |
| | | function wt(e) { |
| | | let t, n, s, i, r, a, o = e._i, |
| | | u = mt.exec(o) || _t.exec(o); |
| | | if (u) { |
| | | for (g(e).iso = !0, t = 0, n = gt.length; t < n; t++) |
| | | if (gt[t][1].exec(u[1])) { |
| | | i = gt[t][0], s = !1 !== gt[t][2]; |
| | | break |
| | | } if (null == i) return void(e._isValid = !1); |
| | | if (u[3]) { |
| | | for (t = 0, n = vt.length; t < n; t++) |
| | | if (vt[t][1].exec(u[3])) { |
| | | r = (u[2] || ' ') + vt[t][0]; |
| | | break |
| | | } if (null == r) return void(e._isValid = !1) |
| | | } |
| | | if (!s && null != r) return void(e._isValid = !1); |
| | | if (u[4]) { |
| | | if (!yt.exec(u[4])) return void(e._isValid = !1); |
| | | a = 'Z' |
| | | } |
| | | e._f = i + (r || '') + (a || ''), Yt(e) |
| | | } else e._isValid = !1 |
| | | } |
| | | let Mt = |
| | | /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; |
| | | |
| | | function kt(e, t, n, s, i, r) { |
| | | let a = [function(e) { |
| | | let t = parseInt(e, 10); { |
| | | if (t <= 49) return 2e3 + t; |
| | | if (t <= 999) return 1900 + t |
| | | } |
| | | return t |
| | | }(e), He.indexOf(t), parseInt(n, 10), parseInt(s, 10), parseInt(i, 10)]; |
| | | return r && a.push(parseInt(r, 10)), a |
| | | } |
| | | let St = { |
| | | UT: 0, |
| | | GMT: 0, |
| | | EDT: -240, |
| | | EST: -300, |
| | | CDT: -300, |
| | | CST: -360, |
| | | MDT: -360, |
| | | MST: -420, |
| | | PDT: -420, |
| | | PST: -480 |
| | | }; |
| | | |
| | | function Dt(e) { |
| | | let t, n, s, i = Mt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, |
| | | '').replace(/\s\s*$/, '')); |
| | | if (i) { |
| | | let r = kt(i[4], i[3], i[2], i[5], i[6], i[7]); |
| | | if (t = i[1], n = r, s = e, t && ze.indexOf(t) !== new Date(n[0], n[1], n[2]).getDay() && (g(s) |
| | | .weekdayMismatch = !0, !(s._isValid = !1))) return; |
| | | e._a = r, e._tzm = function(e, t, n) { |
| | | if (e) return St[e]; |
| | | if (t) return 0; |
| | | let s = parseInt(n, 10), |
| | | i = s % 100; |
| | | return (s - i) / 100 * 60 + i |
| | | }(i[8], i[9], i[10]), e._d = Ge.apply(null, e._a), e._d.setUTCMinutes(e._d.getUTCMinutes() - e |
| | | ._tzm), g(e).rfc2822 = !0 |
| | | } else e._isValid = !1 |
| | | } |
| | | |
| | | function Yt(e) { |
| | | if (e._f !== c.ISO_8601) |
| | | if (e._f !== c.RFC_2822) { |
| | | e._a = [], g(e).empty = !0; |
| | | let t, n, s, i, r, a, o, u, l = '' + e._i, |
| | | h = l.length, |
| | | d = 0; |
| | | for (s = j(e._f, e._locale).match(N) || [], t = 0; t < s.length; t++) i = s[t], (n = (l.match(le(i, |
| | | e)) || [])[0]) && (0 < (r = l.substr(0, l.indexOf(n))).length && g(e).unusedInput.push(r), |
| | | l = l.slice(l.indexOf(n) + n.length), d += n.length), E[i] ? (n ? g(e).empty = !1 : g(e) |
| | | .unusedTokens.push(i), a = i, u = e, null != (o = n) && m(de, a) && de[a](o, u._a, u, a)) : |
| | | e._strict && !n && g(e).unusedTokens.push(i); |
| | | g(e).charsLeftOver = h - d, 0 < l.length && g(e).unusedInput.push(l), e._a[ge] <= 12 && !0 === g(e) |
| | | .bigHour && 0 < e._a[ge] && (g(e).bigHour = void 0), g(e).parsedDateParts = e._a.slice(0), g(e) |
| | | .meridiem = e._meridiem, e._a[ge] = function(e, t, n) { |
| | | let s; |
| | | if (null == n) return t; |
| | | return null != e.meridiemHour ? e.meridiemHour(t, n) : (null != e.isPM && ((s = e.isPM( |
| | | n)) && t < 12 && (t += 12), s || 12 !== t || (t = 0)), t) |
| | | }(e._locale, e._a[ge], e._meridiem), ft(e), dt(e) |
| | | } else Dt(e); |
| | | else wt(e) |
| | | } |
| | | |
| | | function Ot(e) { |
| | | let t, n, s, i, r = e._i, |
| | | a = e._f; |
| | | return e._locale = e._locale || ht(e._l), null === r || void 0 === a && '' === r ? p({ |
| | | nullInput: !0 |
| | | }) : ('string' === typeof r && (e._i = r = e._locale.preparse(r)), k(r) ? new M(dt(r)) : (d(r) ? e._d = |
| | | r : o(a) ? function(e) { |
| | | let t, n, s, i, r; |
| | | if (0 === e._f.length) return g(e).invalidFormat = !0, e._d = new Date(NaN); |
| | | for (i = 0; i < e._f.length; i++) r = 0, t = w({}, e), null != e._useUTC && (t._useUTC = e |
| | | ._useUTC), t._f = e._f[i], Yt(t), v(t) && (r += g(t).charsLeftOver, r += 10 * g(t) |
| | | .unusedTokens.length, g(t).score = r, (null == s || r < s) && (s = r, n = t)); |
| | | _(e, n || t) |
| | | }(e) : a ? Yt(e) : l(n = (t = e)._i) ? t._d = new Date(c.now()) : d(n) ? t._d = new Date(n |
| | | .valueOf()) : 'string' === typeof n ? (s = t, null === (i = pt.exec(s._i)) ? (wt(s), !1 === |
| | | s._isValid && (delete s._isValid, Dt(s), !1 === s._isValid && (delete s._isValid, c |
| | | .createFromInputFallback(s)))) : s._d = new Date(+i[1])) : o(n) ? (t._a = f(n.slice(0), |
| | | function(e) { |
| | | return parseInt(e, 10) |
| | | }), ft(t)) : u(n) ? function(e) { |
| | | if (!e._d) { |
| | | let t = R(e._i); |
| | | e._a = f([t.year, t.month, t.day || t.date, t.hour, t.minute, t.second, t.millisecond], |
| | | function(e) { |
| | | return e && parseInt(e, 10) |
| | | }), ft(e) |
| | | } |
| | | }(t) : h(n) ? t._d = new Date(n) : c.createFromInputFallback(t), v(e) || (e._d = null), e)) |
| | | } |
| | | |
| | | function Tt(e, t, n, s, i) { |
| | | let r, a = {}; |
| | | return !0 !== n && !1 !== n || (s = n, n = void 0), (u(e) && function(e) { |
| | | if (Object.getOwnPropertyNames) return 0 === Object.getOwnPropertyNames(e).length; |
| | | let t; |
| | | for (t in e) |
| | | if (e.hasOwnProperty(t)) return !1; |
| | | return !0 |
| | | }(e) || o(e) && 0 === e.length) && (e = void 0), a._isAMomentObject = !0, a._useUTC = a._isUTC = i, a |
| | | ._l = n, a._i = e, a._f = t, a._strict = s, (r = new M(dt(Ot(a))))._nextDay && (r.add(1, 'd'), r |
| | | ._nextDay = void 0), r |
| | | } |
| | | |
| | | function bt(e, t, n, s) { |
| | | return Tt(e, t, n, s, !1) |
| | | } |
| | | c.createFromInputFallback = n( |
| | | 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.', |
| | | function(e) { |
| | | e._d = new Date(e._i + (e._useUTC ? ' UTC' : '')) |
| | | }), c.ISO_8601 = function() {}, c.RFC_2822 = function() {}; |
| | | let xt = n('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', |
| | | function() { |
| | | let e = bt.apply(null, arguments); |
| | | return this.isValid() && e.isValid() ? e < this ? this : e : p() |
| | | }), |
| | | Pt = n('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', |
| | | function() { |
| | | let e = bt.apply(null, arguments); |
| | | return this.isValid() && e.isValid() ? this < e ? this : e : p() |
| | | }); |
| | | |
| | | function Wt(e, t) { |
| | | let n, s; |
| | | if (1 === t.length && o(t[0]) && (t = t[0]), !t.length) return bt(); |
| | | for (n = t[0], s = 1; s < t.length; ++s) t[s].isValid() && !t[s][e](n) || (n = t[s]); |
| | | return n |
| | | } |
| | | let Ct = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; |
| | | |
| | | function Ht(e) { |
| | | let t = R(e), |
| | | n = t.year || 0, |
| | | s = t.quarter || 0, |
| | | i = t.month || 0, |
| | | r = t.week || t.isoWeek || 0, |
| | | a = t.day || 0, |
| | | o = t.hour || 0, |
| | | u = t.minute || 0, |
| | | l = t.second || 0, |
| | | h = t.millisecond || 0; |
| | | this._isValid = function(e) { |
| | | for (let t in e) |
| | | if (-1 === Ye.call(Ct, t) || null != e[t] && isNaN(e[t])) return !1; |
| | | for (let n = !1, s = 0; s < Ct.length; ++s) |
| | | if (e[Ct[s]]) { |
| | | if (n) return !1; |
| | | parseFloat(e[Ct[s]]) !== D(e[Ct[s]]) && (n = !0) |
| | | } return !0 |
| | | }(t), this._milliseconds = +h + 1e3 * l + 6e4 * u + 1e3 * o * 60 * 60, this._days = +a + 7 * r, this |
| | | ._months = +i + 3 * s + 12 * n, this._data = {}, this._locale = ht(), this._bubble() |
| | | } |
| | | |
| | | function Rt(e) { |
| | | return e instanceof Ht |
| | | } |
| | | |
| | | function Ut(e) { |
| | | return e < 0 ? -1 * Math.round(-1 * e) : Math.round(e) |
| | | } |
| | | |
| | | function Ft(e, n) { |
| | | I(e, 0, 0, function() { |
| | | let e = this.utcOffset(), |
| | | t = '+'; |
| | | return e < 0 && (e = -e, t = '-'), t + L(~~(e / 60), 2) + n + L(~~e % 60, 2) |
| | | }) |
| | | } |
| | | Ft('Z', ':'), Ft('ZZ', ''), ue('Z', re), ue('ZZ', re), ce(['Z', 'ZZ'], function(e, t, n) { |
| | | n._useUTC = !0, n._tzm = Nt(re, e) |
| | | }); |
| | | let Lt = /([\+\-]|\d\d)/gi; |
| | | |
| | | function Nt(e, t) { |
| | | let n = (t || '').match(e); |
| | | if (null === n) return null; |
| | | let s = ((n[n.length - 1] || []) + '').match(Lt) || ['-', 0, 0], |
| | | i = 60 * s[1] + D(s[2]); |
| | | return 0 === i ? 0 : '+' === s[0] ? i : -i |
| | | } |
| | | |
| | | function Gt(e, t) { |
| | | let n, s; |
| | | return t._isUTC ? (n = t.clone(), s = (k(e) || d(e) ? e.valueOf() : bt(e).valueOf()) - n.valueOf(), n._d |
| | | .setTime(n._d.valueOf() + s), c.updateOffset(n, !1), n) : bt(e).local() |
| | | } |
| | | |
| | | function Vt(e) { |
| | | return 15 * -Math.round(e._d.getTimezoneOffset() / 15) |
| | | } |
| | | |
| | | function Et() { |
| | | return !!this.isValid() && (this._isUTC && 0 === this._offset) |
| | | } |
| | | c.updateOffset = function() {}; |
| | | let It = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/, |
| | | At = |
| | | /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; |
| | | |
| | | function jt(e, t) { |
| | | let n, s, i, r = e, |
| | | a = null; |
| | | return Rt(e) ? r = { |
| | | ms: e._milliseconds, |
| | | d: e._days, |
| | | M: e._months |
| | | } : h(e) ? (r = {}, t ? r[t] = e : r.milliseconds = e) : (a = It.exec(e)) ? (n = '-' === a[1] ? -1 : 1, |
| | | r = { |
| | | y: 0, |
| | | d: D(a[ye]) * n, |
| | | h: D(a[ge]) * n, |
| | | m: D(a[ve]) * n, |
| | | s: D(a[pe]) * n, |
| | | ms: D(Ut(1e3 * a[we])) * n |
| | | }) : (a = At.exec(e)) ? (n = '-' === a[1] ? -1 : 1, r = { |
| | | y: Zt(a[2], n), |
| | | M: Zt(a[3], n), |
| | | w: Zt(a[4], n), |
| | | d: Zt(a[5], n), |
| | | h: Zt(a[6], n), |
| | | m: Zt(a[7], n), |
| | | s: Zt(a[8], n) |
| | | }) : null == r ? r = {} : 'object' === typeof r && ('from' in r || 'to' in r) && (i = function(e, t) { |
| | | let n; |
| | | if (!e.isValid() || !t.isValid()) return { |
| | | milliseconds: 0, |
| | | months: 0 |
| | | }; |
| | | t = Gt(t, e), e.isBefore(t) ? n = zt(e, t) : ((n = zt(t, e)).milliseconds = -n.milliseconds, n |
| | | .months = -n.months); |
| | | return n |
| | | }(bt(r.from), bt(r.to)), (r = {}).ms = i.milliseconds, r.M = i.months), s = new Ht(r), Rt(e) && m(e, |
| | | '_locale') && (s._locale = e._locale), s |
| | | } |
| | | |
| | | function Zt(e, t) { |
| | | let n = e && parseFloat(e.replace(',', '.')); |
| | | return (isNaN(n) ? 0 : n) * t |
| | | } |
| | | |
| | | function zt(e, t) { |
| | | let n = {}; |
| | | return n.months = t.month() - e.month() + 12 * (t.year() - e.year()), e.clone().add(n.months, 'M').isAfter( |
| | | t) && --n.months, n.milliseconds = +t - +e.clone().add(n.months, 'M'), n |
| | | } |
| | | |
| | | function $t(s, i) { |
| | | return function(e, t) { |
| | | let n; |
| | | return null === t || isNaN(+t) || (T(i, 'moment().' + i + |
| | | '(period, number) is deprecated. Please use moment().' + i + |
| | | '(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.' |
| | | ), n = e, e = t, t = n), qt(this, jt(e = 'string' === typeof e ? +e : e, t), s), this |
| | | } |
| | | } |
| | | |
| | | function qt(e, t, n, s) { |
| | | let i = t._milliseconds, |
| | | r = Ut(t._days), |
| | | a = Ut(t._months); |
| | | e.isValid() && (s = null == s || s, a && Re(e, be(e, 'Month') + a * n), r && xe(e, 'Date', be(e, 'Date') + |
| | | r * n), i && e._d.setTime(e._d.valueOf() + i * n), s && c.updateOffset(e, r || a)) |
| | | } |
| | | jt.fn = Ht.prototype, jt.invalid = function() { |
| | | return jt(NaN) |
| | | }; |
| | | let Jt = $t(1, 'add'), |
| | | Bt = $t(-1, 'subtract'); |
| | | |
| | | function Qt(e, t) { |
| | | let n = 12 * (t.year() - e.year()) + (t.month() - e.month()), |
| | | s = e.clone().add(n, 'months'); |
| | | return -(n + (t - s < 0 ? (t - s) / (s - e.clone().add(n - 1, 'months')) : (t - s) / (e.clone().add(n + 1, |
| | | 'months') - s))) || 0 |
| | | } |
| | | |
| | | function Xt(e) { |
| | | let t; |
| | | return void 0 === e ? this._locale._abbr : (null != (t = ht(e)) && (this._locale = t), this) |
| | | } |
| | | c.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ', c.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; |
| | | let Kt = n( |
| | | 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', |
| | | function(e) { |
| | | return void 0 === e ? this.localeData() : this.locale(e) |
| | | }); |
| | | |
| | | function en() { |
| | | return this._locale |
| | | } |
| | | let tn = 126227808e5; |
| | | |
| | | function nn(e, t) { |
| | | return (e % t + t) % t |
| | | } |
| | | |
| | | function sn(e, t, n) { |
| | | return e < 100 && 0 <= e ? new Date(e + 400, t, n) - tn : new Date(e, t, n).valueOf() |
| | | } |
| | | |
| | | function rn(e, t, n) { |
| | | return e < 100 && 0 <= e ? Date.UTC(e + 400, t, n) - tn : Date.UTC(e, t, n) |
| | | } |
| | | |
| | | function an(e, t) { |
| | | I(0, [e, e.length], 0, t) |
| | | } |
| | | |
| | | function on(e, t, n, s, i) { |
| | | let r; |
| | | return null == e ? Ie(this, s, i).year : ((r = Ae(e, s, i)) < t && (t = r), function(e, t, n, s, i) { |
| | | let r = Ee(e, t, n, s, i), |
| | | a = Ge(r.year, 0, r.dayOfYear); |
| | | return this.year(a.getUTCFullYear()), this.month(a.getUTCMonth()), this.date(a.getUTCDate()), |
| | | this |
| | | }.call(this, e, t, n, s, i)) |
| | | } |
| | | I(0, ['gg', 2], 0, function() { |
| | | return this.weekYear() % 100 |
| | | }), I(0, ['GG', 2], 0, function() { |
| | | return this.isoWeekYear() % 100 |
| | | }), an('gggg', 'weekYear'), an('ggggg', 'weekYear'), an('GGGG', 'isoWeekYear'), an('GGGGG', 'isoWeekYear'), |
| | | C('weekYear', 'gg'), C('isoWeekYear', 'GG'), F('weekYear', 1), F('isoWeekYear', 1), ue('G', se), ue('g', |
| | | se), ue('GG', B, z), ue('gg', B, z), ue('GGGG', ee, q), ue('gggg', ee, q), ue('GGGGG', te, J), ue('ggggg', |
| | | te, J), fe(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function(e, t, n, s) { |
| | | t[s.substr(0, 2)] = D(e) |
| | | }), fe(['gg', 'GG'], function(e, t, n, s) { |
| | | t[s] = c.parseTwoDigitYear(e) |
| | | }), I('Q', 0, 'Qo', 'quarter'), C('quarter', 'Q'), F('quarter', 7), ue('Q', Z), ce('Q', function(e, t) { |
| | | t[_e] = 3 * (D(e) - 1) |
| | | }), I('D', ['DD', 2], 'Do', 'date'), C('date', 'D'), F('date', 9), ue('D', B), ue('DD', B, z), ue('Do', |
| | | function(e, t) { |
| | | return e ? t._dayOfMonthOrdinalParse || t._ordinalParse : t._dayOfMonthOrdinalParseLenient |
| | | }), ce(['D', 'DD'], ye), ce('Do', function(e, t) { |
| | | t[ye] = D(e.match(B)[0]) |
| | | }); |
| | | let un = Te('Date', !0); |
| | | I('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'), C('dayOfYear', 'DDD'), F('dayOfYear', 4), ue('DDD', K), ue('DDDD', |
| | | $), ce(['DDD', 'DDDD'], function(e, t, n) { |
| | | n._dayOfYear = D(e) |
| | | }), I('m', ['mm', 2], 0, 'minute'), C('minute', 'm'), F('minute', 14), ue('m', B), ue('mm', B, z), ce(['m', |
| | | 'mm' |
| | | ], ve); |
| | | let ln = Te('Minutes', !1); |
| | | I('s', ['ss', 2], 0, 'second'), C('second', 's'), F('second', 15), ue('s', B), ue('ss', B, z), ce(['s', 'ss'], |
| | | pe); |
| | | let hn, dn = Te('Seconds', !1); |
| | | for (I('S', 0, 0, function() { |
| | | return ~~(this.millisecond() / 100) |
| | | }), I(0, ['SS', 2], 0, function() { |
| | | return ~~(this.millisecond() / 10) |
| | | }), I(0, ['SSS', 3], 0, 'millisecond'), I(0, ['SSSS', 4], 0, function() { |
| | | return 10 * this.millisecond() |
| | | }), I(0, ['SSSSS', 5], 0, function() { |
| | | return 100 * this.millisecond() |
| | | }), I(0, ['SSSSSS', 6], 0, function() { |
| | | return 1e3 * this.millisecond() |
| | | }), I(0, ['SSSSSSS', 7], 0, function() { |
| | | return 1e4 * this.millisecond() |
| | | }), I(0, ['SSSSSSSS', 8], 0, function() { |
| | | return 1e5 * this.millisecond() |
| | | }), I(0, ['SSSSSSSSS', 9], 0, function() { |
| | | return 1e6 * this.millisecond() |
| | | }), C('millisecond', 'ms'), F('millisecond', 16), ue('S', K, Z), ue('SS', K, z), ue('SSS', K, $), hn = |
| | | 'SSSS'; hn.length <= 9; hn += 'S') ue(hn, ne); |
| | | |
| | | function cn(e, t) { |
| | | t[we] = D(1e3 * ('0.' + e)) |
| | | } |
| | | for (hn = 'S'; hn.length <= 9; hn += 'S') ce(hn, cn); |
| | | let fn = Te('Milliseconds', !1); |
| | | I('z', 0, 0, 'zoneAbbr'), I('zz', 0, 0, 'zoneName'); |
| | | let mn = M.prototype; |
| | | |
| | | function _n(e) { |
| | | return e |
| | | } |
| | | mn.add = Jt, mn.calendar = function(e, t) { |
| | | let n = e || bt(), |
| | | s = Gt(n, this).startOf('day'), |
| | | i = c.calendarFormat(this, s) || 'sameElse', |
| | | r = t && (b(t[i]) ? t[i].call(this, n) : t[i]); |
| | | return this.format(r || this.localeData().calendar(i, this, bt(n))) |
| | | }, mn.clone = function() { |
| | | return new M(this) |
| | | }, mn.diff = function(e, t, n) { |
| | | let s, i, r; |
| | | if (!this.isValid()) return NaN; |
| | | if (!(s = Gt(e, this)).isValid()) return NaN; |
| | | switch (i = 6e4 * (s.utcOffset() - this.utcOffset()), t = H(t)) { |
| | | case 'year': |
| | | r = Qt(this, s) / 12; |
| | | break; |
| | | case 'month': |
| | | r = Qt(this, s); |
| | | break; |
| | | case 'quarter': |
| | | r = Qt(this, s) / 3; |
| | | break; |
| | | case 'second': |
| | | r = (this - s) / 1e3; |
| | | break; |
| | | case 'minute': |
| | | r = (this - s) / 6e4; |
| | | break; |
| | | case 'hour': |
| | | r = (this - s) / 36e5; |
| | | break; |
| | | case 'day': |
| | | r = (this - s - i) / 864e5; |
| | | break; |
| | | case 'week': |
| | | r = (this - s - i) / 6048e5; |
| | | break; |
| | | default: |
| | | r = this - s |
| | | } |
| | | return n ? r : S(r) |
| | | }, mn.endOf = function(e) { |
| | | let t; |
| | | if (void 0 === (e = H(e)) || 'millisecond' === e || !this.isValid()) return this; |
| | | let n = this._isUTC ? rn : sn; |
| | | switch (e) { |
| | | case 'year': |
| | | t = n(this.year() + 1, 0, 1) - 1; |
| | | break; |
| | | case 'quarter': |
| | | t = n(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; |
| | | break; |
| | | case 'month': |
| | | t = n(this.year(), this.month() + 1, 1) - 1; |
| | | break; |
| | | case 'week': |
| | | t = n(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; |
| | | break; |
| | | case 'isoWeek': |
| | | t = n(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; |
| | | break; |
| | | case 'day': |
| | | case 'date': |
| | | t = n(this.year(), this.month(), this.date() + 1) - 1; |
| | | break; |
| | | case 'hour': |
| | | t = this._d.valueOf(), t += 36e5 - nn(t + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5) - 1; |
| | | break; |
| | | case 'minute': |
| | | t = this._d.valueOf(), t += 6e4 - nn(t, 6e4) - 1; |
| | | break; |
| | | case 'second': |
| | | t = this._d.valueOf(), t += 1e3 - nn(t, 1e3) - 1; |
| | | break |
| | | } |
| | | return this._d.setTime(t), c.updateOffset(this, !0), this |
| | | }, mn.format = function(e) { |
| | | e || (e = this.isUtc() ? c.defaultFormatUtc : c.defaultFormat); |
| | | let t = A(this, e); |
| | | return this.localeData().postformat(t) |
| | | }, mn.from = function(e, t) { |
| | | return this.isValid() && (k(e) && e.isValid() || bt(e).isValid()) ? jt({ |
| | | to: this, |
| | | from: e |
| | | }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate() |
| | | }, mn.fromNow = function(e) { |
| | | return this.from(bt(), e) |
| | | }, mn.to = function(e, t) { |
| | | return this.isValid() && (k(e) && e.isValid() || bt(e).isValid()) ? jt({ |
| | | from: this, |
| | | to: e |
| | | }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate() |
| | | }, mn.toNow = function(e) { |
| | | return this.to(bt(), e) |
| | | }, mn.get = function(e) { |
| | | return b(this[e = H(e)]) ? this[e]() : this |
| | | }, mn.invalidAt = function() { |
| | | return g(this).overflow |
| | | }, mn.isAfter = function(e, t) { |
| | | let n = k(e) ? e : bt(e); |
| | | return !(!this.isValid() || !n.isValid()) && ('millisecond' === (t = H(t) || 'millisecond') ? this |
| | | .valueOf() > n.valueOf() : n.valueOf() < this.clone().startOf(t).valueOf()) |
| | | }, mn.isBefore = function(e, t) { |
| | | let n = k(e) ? e : bt(e); |
| | | return !(!this.isValid() || !n.isValid()) && ('millisecond' === (t = H(t) || 'millisecond') ? this |
| | | .valueOf() < n.valueOf() : this.clone().endOf(t).valueOf() < n.valueOf()) |
| | | }, mn.isBetween = function(e, t, n, s) { |
| | | let i = k(e) ? e : bt(e), |
| | | r = k(t) ? t : bt(t); |
| | | return !!(this.isValid() && i.isValid() && r.isValid()) && ('(' === (s = s || '()')[0] ? this.isAfter(i, |
| | | n) : !this.isBefore(i, n)) && (')' === s[1] ? this.isBefore(r, n) : !this.isAfter(r, n)) |
| | | }, mn.isSame = function(e, t) { |
| | | let n, s = k(e) ? e : bt(e); |
| | | return !(!this.isValid() || !s.isValid()) && ('millisecond' === (t = H(t) || 'millisecond') ? this |
| | | .valueOf() === s.valueOf() : (n = s.valueOf(), this.clone().startOf(t).valueOf() <= n && n <= |
| | | this.clone().endOf(t).valueOf())) |
| | | }, mn.isSameOrAfter = function(e, t) { |
| | | return this.isSame(e, t) || this.isAfter(e, t) |
| | | }, mn.isSameOrBefore = function(e, t) { |
| | | return this.isSame(e, t) || this.isBefore(e, t) |
| | | }, mn.isValid = function() { |
| | | return v(this) |
| | | }, mn.lang = Kt, mn.locale = Xt, mn.localeData = en, mn.max = Pt, mn.min = xt, mn.parsingFlags = |
| | | function() { |
| | | return _({}, g(this)) |
| | | }, mn.set = function(e, t) { |
| | | if ('object' === typeof e) |
| | | for (let n = function(e) { |
| | | let t = []; |
| | | for (let n in e) t.push({ |
| | | unit: n, |
| | | priority: U[n] |
| | | }); |
| | | return t.sort(function(e, t) { |
| | | return e.priority - t.priority |
| | | }), t |
| | | }(e = R(e)), s = 0; s < n.length; s++) this[n[s].unit](e[n[s].unit]); |
| | | else if (b(this[e = H(e)])) return this[e](t); |
| | | return this |
| | | }, mn.startOf = function(e) { |
| | | let t; |
| | | if (void 0 === (e = H(e)) || 'millisecond' === e || !this.isValid()) return this; |
| | | let n = this._isUTC ? rn : sn; |
| | | switch (e) { |
| | | case 'year': |
| | | t = n(this.year(), 0, 1); |
| | | break; |
| | | case 'quarter': |
| | | t = n(this.year(), this.month() - this.month() % 3, 1); |
| | | break; |
| | | case 'month': |
| | | t = n(this.year(), this.month(), 1); |
| | | break; |
| | | case 'week': |
| | | t = n(this.year(), this.month(), this.date() - this.weekday()); |
| | | break; |
| | | case 'isoWeek': |
| | | t = n(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); |
| | | break; |
| | | case 'day': |
| | | case 'date': |
| | | t = n(this.year(), this.month(), this.date()); |
| | | break; |
| | | case 'hour': |
| | | t = this._d.valueOf(), t -= nn(t + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5); |
| | | break; |
| | | case 'minute': |
| | | t = this._d.valueOf(), t -= nn(t, 6e4); |
| | | break; |
| | | case 'second': |
| | | t = this._d.valueOf(), t -= nn(t, 1e3); |
| | | break |
| | | } |
| | | return this._d.setTime(t), c.updateOffset(this, !0), this |
| | | }, mn.subtract = Bt, mn.toArray = function() { |
| | | let e = this; |
| | | return [e.year(), e.month(), e.date(), e.hour(), e.minute(), e.second(), e.millisecond()] |
| | | }, mn.toObject = function() { |
| | | let e = this; |
| | | return { |
| | | years: e.year(), |
| | | months: e.month(), |
| | | date: e.date(), |
| | | hours: e.hours(), |
| | | minutes: e.minutes(), |
| | | seconds: e.seconds(), |
| | | milliseconds: e.milliseconds() |
| | | } |
| | | }, mn.toDate = function() { |
| | | return new Date(this.valueOf()) |
| | | }, mn.toISOString = function(e) { |
| | | if (!this.isValid()) return null; |
| | | let t = !0 !== e, |
| | | n = t ? this.clone().utc() : this; |
| | | return n.year() < 0 || 9999 < n.year() ? A(n, t ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : |
| | | 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ') : b(Date.prototype.toISOString) ? t ? this.toDate() |
| | | .toISOString() : new Date(this.valueOf() + 60 * this.utcOffset() * 1e3).toISOString().replace('Z', |
| | | A(n, 'Z')) : A(n, t ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ') |
| | | }, mn.inspect = function() { |
| | | if (!this.isValid()) return 'moment.invalid(/* ' + this._i + ' */)'; |
| | | let e = 'moment', |
| | | t = ''; |
| | | this.isLocal() || (e = 0 === this.utcOffset() ? 'moment.utc' : 'moment.parseZone', t = 'Z'); |
| | | let n = '[' + e + '("]', |
| | | s = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY', |
| | | i = t + '[")]'; |
| | | return this.format(n + s + '-MM-DD[T]HH:mm:ss.SSS' + i) |
| | | }, mn.toJSON = function() { |
| | | return this.isValid() ? this.toISOString() : null |
| | | }, mn.toString = function() { |
| | | return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ') |
| | | }, mn.unix = function() { |
| | | return Math.floor(this.valueOf() / 1e3) |
| | | }, mn.valueOf = function() { |
| | | return this._d.valueOf() - 6e4 * (this._offset || 0) |
| | | }, mn.creationData = function() { |
| | | return { |
| | | input: this._i, |
| | | format: this._f, |
| | | locale: this._locale, |
| | | isUTC: this._isUTC, |
| | | strict: this._strict |
| | | } |
| | | }, mn.year = Oe, mn.isLeapYear = function() { |
| | | return De(this.year()) |
| | | }, mn.weekYear = function(e) { |
| | | return on.call(this, e, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData() |
| | | ._week.doy) |
| | | }, mn.isoWeekYear = function(e) { |
| | | return on.call(this, e, this.isoWeek(), this.isoWeekday(), 1, 4) |
| | | }, mn.quarter = mn.quarters = function(e) { |
| | | return null == e ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (e - 1) + this.month() % 3) |
| | | }, mn.month = Ue, mn.daysInMonth = function() { |
| | | return Pe(this.year(), this.month()) |
| | | }, mn.week = mn.weeks = function(e) { |
| | | let t = this.localeData().week(this); |
| | | return null == e ? t : this.add(7 * (e - t), 'd') |
| | | }, mn.isoWeek = mn.isoWeeks = function(e) { |
| | | let t = Ie(this, 1, 4).week; |
| | | return null == e ? t : this.add(7 * (e - t), 'd') |
| | | }, mn.weeksInYear = function() { |
| | | let e = this.localeData()._week; |
| | | return Ae(this.year(), e.dow, e.doy) |
| | | }, mn.isoWeeksInYear = function() { |
| | | return Ae(this.year(), 1, 4) |
| | | }, mn.date = un, mn.day = mn.days = function(e) { |
| | | if (!this.isValid()) return null != e ? this : NaN; |
| | | let t, n, s = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); |
| | | return null != e ? (t = e, n = this.localeData(), e = 'string' !== typeof t ? t : isNaN(t) ? |
| | | 'number' === typeof(t = n.weekdaysParse(t)) ? t : null : parseInt(t, 10), this.add(e - s, 'd') |
| | | ) : s |
| | | }, mn.weekday = function(e) { |
| | | if (!this.isValid()) return null != e ? this : NaN; |
| | | let t = (this.day() + 7 - this.localeData()._week.dow) % 7; |
| | | return null == e ? t : this.add(e - t, 'd') |
| | | }, mn.isoWeekday = function(e) { |
| | | if (!this.isValid()) return null != e ? this : NaN; |
| | | if (null == e) return this.day() || 7; |
| | | let t, n, s = (t = e, n = this.localeData(), 'string' === typeof t ? n.weekdaysParse(t) % 7 || 7 : |
| | | isNaN(t) ? null : t); |
| | | return this.day(this.day() % 7 ? s : s - 7) |
| | | }, mn.dayOfYear = function(e) { |
| | | let t = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; |
| | | return null == e ? t : this.add(e - t, 'd') |
| | | }, mn.hour = mn.hours = nt, mn.minute = mn.minutes = ln, mn.second = mn.seconds = dn, mn.millisecond = mn |
| | | .milliseconds = fn, mn.utcOffset = function(e, t, n) { |
| | | let s, i = this._offset || 0; |
| | | if (!this.isValid()) return null != e ? this : NaN; |
| | | if (null == e) return this._isUTC ? i : Vt(this); |
| | | if ('string' === typeof e) { |
| | | if (null === (e = Nt(re, e))) return this |
| | | } else Math.abs(e) < 16 && !n && (e *= 60); |
| | | return !this._isUTC && t && (s = Vt(this)), this._offset = e, this._isUTC = !0, null != s && this.add(s, |
| | | 'm'), i !== e && (!t || this._changeInProgress ? qt(this, jt(e - i, 'm'), 1, !1) : this |
| | | ._changeInProgress || (this._changeInProgress = !0, c.updateOffset(this, !0), this |
| | | ._changeInProgress = null)), this |
| | | }, mn.utc = function(e) { |
| | | return this.utcOffset(0, e) |
| | | }, mn.local = function(e) { |
| | | return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(Vt(this), 'm')), this |
| | | }, mn.parseZone = function() { |
| | | if (null != this._tzm) this.utcOffset(this._tzm, !1, !0); |
| | | else if ('string' === typeof this._i) { |
| | | let e = Nt(ie, this._i); |
| | | null != e ? this.utcOffset(e) : this.utcOffset(0, !0) |
| | | } |
| | | return this |
| | | }, mn.hasAlignedHourOffset = function(e) { |
| | | return !!this.isValid() && (e = e ? bt(e).utcOffset() : 0, (this.utcOffset() - e) % 60 == 0) |
| | | }, mn.isDST = function() { |
| | | return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5) |
| | | .utcOffset() |
| | | }, mn.isLocal = function() { |
| | | return !!this.isValid() && !this._isUTC |
| | | }, mn.isUtcOffset = function() { |
| | | return !!this.isValid() && this._isUTC |
| | | }, mn.isUtc = Et, mn.isUTC = Et, mn.zoneAbbr = function() { |
| | | return this._isUTC ? 'UTC' : '' |
| | | }, mn.zoneName = function() { |
| | | return this._isUTC ? 'Coordinated Universal Time' : '' |
| | | }, mn.dates = n('dates accessor is deprecated. Use date instead.', un), mn.months = n( |
| | | 'months accessor is deprecated. Use month instead', Ue), mn.years = n( |
| | | 'years accessor is deprecated. Use year instead', Oe), mn.zone = n( |
| | | 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', |
| | | function(e, t) { |
| | | return null != e ? ('string' !== typeof e && (e = -e), this.utcOffset(e, t), this) : -this |
| | | .utcOffset() |
| | | }), mn.isDSTShifted = n( |
| | | 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', |
| | | function() { |
| | | if (!l(this._isDSTShifted)) return this._isDSTShifted; |
| | | let e = {}; |
| | | if (w(e, this), (e = Ot(e))._a) { |
| | | let t = e._isUTC ? y(e._a) : bt(e._a); |
| | | this._isDSTShifted = this.isValid() && 0 < a(e._a, t.toArray()) |
| | | } else this._isDSTShifted = !1; |
| | | return this._isDSTShifted |
| | | }); |
| | | let yn = P.prototype; |
| | | |
| | | function gn(e, t, n, s) { |
| | | let i = ht(), |
| | | r = y().set(s, t); |
| | | return i[n](r, e) |
| | | } |
| | | |
| | | function vn(e, t, n) { |
| | | if (h(e) && (t = e, e = void 0), e = e || '', null != t) return gn(e, t, n, 'month'); |
| | | let s, i = []; |
| | | for (s = 0; s < 12; s++) i[s] = gn(e, s, n, 'month'); |
| | | return i |
| | | } |
| | | |
| | | function pn(e, t, n, s) { |
| | | t = ('boolean' === typeof e ? h(t) && (n = t, t = void 0) : (t = e, e = !1, h(n = t) && (n = t, t = |
| | | void 0)), t || ''); |
| | | let i, r = ht(), |
| | | a = e ? r._week.dow : 0; |
| | | if (null != n) return gn(t, (n + a) % 7, s, 'day'); |
| | | let o = []; |
| | | for (i = 0; i < 7; i++) o[i] = gn(t, (i + a) % 7, s, 'day'); |
| | | return o |
| | | } |
| | | yn.calendar = function(e, t, n) { |
| | | let s = this._calendar[e] || this._calendar.sameElse; |
| | | return b(s) ? s.call(t, n) : s |
| | | }, yn.longDateFormat = function(e) { |
| | | let t = this._longDateFormat[e], |
| | | n = this._longDateFormat[e.toUpperCase()]; |
| | | return t || !n ? t : (this._longDateFormat[e] = n.replace(/MMMM|MM|DD|dddd/g, function(e) { |
| | | return e.slice(1) |
| | | }), this._longDateFormat[e]) |
| | | }, yn.invalidDate = function() { |
| | | return this._invalidDate |
| | | }, yn.ordinal = function(e) { |
| | | return this._ordinal.replace('%d', e) |
| | | }, yn.preparse = _n, yn.postformat = _n, yn.relativeTime = function(e, t, n, s) { |
| | | let i = this._relativeTime[n]; |
| | | return b(i) ? i(e, t, n, s) : i.replace(/%d/i, e) |
| | | }, yn.pastFuture = function(e, t) { |
| | | let n = this._relativeTime[0 < e ? 'future' : 'past']; |
| | | return b(n) ? n(t) : n.replace(/%s/i, t) |
| | | }, yn.set = function(e) { |
| | | let t, n; |
| | | for (n in e) b(t = e[n]) ? this[n] = t : this['_' + n] = t; |
| | | this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse |
| | | .source || this._ordinalParse.source) + '|' + /\d{1,2}/.source) |
| | | }, yn.months = function(e, t) { |
| | | return e ? o(this._months) ? this._months[e.month()] : this._months[(this._months.isFormat || We).test( |
| | | t) ? 'format' : 'standalone'][e.month()] : o(this._months) ? this._months : this._months |
| | | .standalone |
| | | }, yn.monthsShort = function(e, t) { |
| | | return e ? o(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[We.test(t) ? |
| | | 'format' : 'standalone'][e.month()] : o(this._monthsShort) ? this._monthsShort : this |
| | | ._monthsShort.standalone |
| | | }, yn.monthsParse = function(e, t, n) { |
| | | let s, i, r; |
| | | if (this._monthsParseExact) return function(e, t, n) { |
| | | let s, i, r, a = e.toLocaleLowerCase(); |
| | | if (!this._monthsParse) |
| | | for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], |
| | | s = 0; s < 12; ++s) r = y([2e3, s]), this._shortMonthsParse[s] = this.monthsShort(r, |
| | | '').toLocaleLowerCase(), this._longMonthsParse[s] = this.months(r, '') |
| | | .toLocaleLowerCase(); |
| | | return n ? 'MMM' === t ? -1 !== (i = Ye.call(this._shortMonthsParse, a)) ? i : null : -1 !== |
| | | (i = Ye.call(this._longMonthsParse, a)) ? i : null : 'MMM' === t ? -1 !== (i = Ye.call( |
| | | this._shortMonthsParse, a)) ? i : -1 !== (i = Ye.call(this._longMonthsParse, a)) ? |
| | | i : null : -1 !== (i = Ye.call(this._longMonthsParse, a)) ? i : -1 !== (i = Ye.call(this |
| | | ._shortMonthsParse, a)) ? i : null |
| | | }.call(this, e, t, n); |
| | | for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this |
| | | ._shortMonthsParse = []), s = 0; s < 12; s++) { |
| | | if (i = y([2e3, s]), n && !this._longMonthsParse[s] && (this._longMonthsParse[s] = new RegExp('^' + |
| | | this.months(i, '').replace('.', '') + '$', 'i'), this._shortMonthsParse[s] = new RegExp( |
| | | '^' + this.monthsShort(i, '').replace('.', '') + '$', 'i')), n || this._monthsParse[s] || ( |
| | | r = '^' + this.months(i, '') + '|^' + this.monthsShort(i, ''), this._monthsParse[s] = |
| | | new RegExp(r.replace('.', ''), 'i')), n && 'MMMM' === t && this._longMonthsParse[s].test(e)) |
| | | return s; |
| | | if (n && 'MMM' === t && this._shortMonthsParse[s].test(e)) return s; |
| | | if (!n && this._monthsParse[s].test(e)) return s |
| | | } |
| | | }, yn.monthsRegex = function(e) { |
| | | return this._monthsParseExact ? (m(this, '_monthsRegex') || Ne.call(this), e ? this._monthsStrictRegex : |
| | | this._monthsRegex) : (m(this, '_monthsRegex') || (this._monthsRegex = Le), this |
| | | ._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex) |
| | | }, yn.monthsShortRegex = function(e) { |
| | | return this._monthsParseExact ? (m(this, '_monthsRegex') || Ne.call(this), e ? this |
| | | ._monthsShortStrictRegex : this._monthsShortRegex) : (m(this, '_monthsShortRegex') || (this |
| | | ._monthsShortRegex = Fe), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : |
| | | this._monthsShortRegex) |
| | | }, yn.week = function(e) { |
| | | return Ie(e, this._week.dow, this._week.doy).week |
| | | }, yn.firstDayOfYear = function() { |
| | | return this._week.doy |
| | | }, yn.firstDayOfWeek = function() { |
| | | return this._week.dow |
| | | }, yn.weekdays = function(e, t) { |
| | | let n = o(this._weekdays) ? this._weekdays : this._weekdays[e && !0 !== e && this._weekdays.isFormat |
| | | .test(t) ? 'format' : 'standalone']; |
| | | return !0 === e ? je(n, this._week.dow) : e ? n[e.day()] : n |
| | | }, yn.weekdaysMin = function(e) { |
| | | return !0 === e ? je(this._weekdaysMin, this._week.dow) : e ? this._weekdaysMin[e.day()] : this |
| | | ._weekdaysMin |
| | | }, yn.weekdaysShort = function(e) { |
| | | return !0 === e ? je(this._weekdaysShort, this._week.dow) : e ? this._weekdaysShort[e.day()] : this |
| | | ._weekdaysShort |
| | | }, yn.weekdaysParse = function(e, t, n) { |
| | | let s, i, r; |
| | | if (this._weekdaysParseExact) return function(e, t, n) { |
| | | let s, i, r, a = e.toLocaleLowerCase(); |
| | | if (!this._weekdaysParse) |
| | | for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this |
| | | ._minWeekdaysParse = [], s = 0; s < 7; ++s) r = y([2e3, 1]).day(s), this |
| | | ._minWeekdaysParse[s] = this.weekdaysMin(r, '').toLocaleLowerCase(), this |
| | | ._shortWeekdaysParse[s] = this.weekdaysShort(r, '').toLocaleLowerCase(), this |
| | | ._weekdaysParse[s] = this.weekdays(r, '').toLocaleLowerCase(); |
| | | return n ? 'dddd' === t ? -1 !== (i = Ye.call(this._weekdaysParse, a)) ? i : null : |
| | | 'ddd' === t ? -1 !== (i = Ye.call(this._shortWeekdaysParse, a)) ? i : null : -1 !== (i = |
| | | Ye.call(this._minWeekdaysParse, a)) ? i : null : 'dddd' === t ? -1 !== (i = Ye.call( |
| | | this._weekdaysParse, a)) ? i : -1 !== (i = Ye.call(this._shortWeekdaysParse, a)) ? |
| | | i : -1 !== (i = Ye.call(this._minWeekdaysParse, a)) ? i : null : 'ddd' === t ? -1 !== ( |
| | | i = Ye.call(this._shortWeekdaysParse, a)) ? i : -1 !== (i = Ye.call(this |
| | | ._weekdaysParse, a)) ? i : -1 !== (i = Ye.call(this._minWeekdaysParse, a)) ? i : |
| | | null : -1 !== (i = Ye.call(this._minWeekdaysParse, a)) ? i : -1 !== (i = Ye.call(this |
| | | ._weekdaysParse, a)) ? i : -1 !== (i = Ye.call(this._shortWeekdaysParse, a)) ? i : |
| | | null |
| | | }.call(this, e, t, n); |
| | | for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this |
| | | ._shortWeekdaysParse = [], this._fullWeekdaysParse = []), s = 0; s < 7; s++) { |
| | | if (i = y([2e3, 1]).day(s), n && !this._fullWeekdaysParse[s] && (this._fullWeekdaysParse[s] = |
| | | new RegExp('^' + this.weekdays(i, '').replace('.', '\\.?') + '$', 'i'), this |
| | | ._shortWeekdaysParse[s] = new RegExp('^' + this.weekdaysShort(i, '').replace('.', '\\.?') + |
| | | '$', 'i'), this._minWeekdaysParse[s] = new RegExp('^' + this.weekdaysMin(i, '').replace( |
| | | '.', '\\.?') + '$', 'i')), this._weekdaysParse[s] || (r = '^' + this.weekdays(i, '') + |
| | | '|^' + this.weekdaysShort(i, '') + '|^' + this.weekdaysMin(i, ''), this._weekdaysParse[s] = |
| | | new RegExp(r.replace('.', ''), 'i')), n && 'dddd' === t && this._fullWeekdaysParse[s].test( |
| | | e)) return s; |
| | | if (n && 'ddd' === t && this._shortWeekdaysParse[s].test(e)) return s; |
| | | if (n && 'dd' === t && this._minWeekdaysParse[s].test(e)) return s; |
| | | if (!n && this._weekdaysParse[s].test(e)) return s |
| | | } |
| | | }, yn.weekdaysRegex = function(e) { |
| | | return this._weekdaysParseExact ? (m(this, '_weekdaysRegex') || Qe.call(this), e ? this |
| | | ._weekdaysStrictRegex : this._weekdaysRegex) : (m(this, '_weekdaysRegex') || (this |
| | | ._weekdaysRegex = qe), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this |
| | | ._weekdaysRegex) |
| | | }, yn.weekdaysShortRegex = function(e) { |
| | | return this._weekdaysParseExact ? (m(this, '_weekdaysRegex') || Qe.call(this), e ? this |
| | | ._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (m(this, '_weekdaysShortRegex') || ( |
| | | this._weekdaysShortRegex = Je), this._weekdaysShortStrictRegex && e ? this |
| | | ._weekdaysShortStrictRegex : this._weekdaysShortRegex) |
| | | }, yn.weekdaysMinRegex = function(e) { |
| | | return this._weekdaysParseExact ? (m(this, '_weekdaysRegex') || Qe.call(this), e ? this |
| | | ._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (m(this, '_weekdaysMinRegex') || (this |
| | | ._weekdaysMinRegex = Be), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : |
| | | this._weekdaysMinRegex) |
| | | }, yn.isPM = function(e) { |
| | | return 'p' === (e + '').toLowerCase().charAt(0) |
| | | }, yn.meridiem = function(e, t, n) { |
| | | return 11 < e ? n ? 'pm' : 'PM' : n ? 'am' : 'AM' |
| | | }, ut('en', { |
| | | dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, |
| | | ordinal: function(e) { |
| | | let t = e % 10; |
| | | return e + (1 === D(e % 100 / 10) ? 'th' : 1 === t ? 'st' : 2 === t ? 'nd' : 3 === t ? |
| | | 'rd' : 'th') |
| | | } |
| | | }), c.lang = n('moment.lang is deprecated. Use moment.locale instead.', ut), c.langData = n( |
| | | 'moment.langData is deprecated. Use moment.localeData instead.', ht); |
| | | let wn = Math.abs; |
| | | |
| | | function Mn(e, t, n, s) { |
| | | let i = jt(t, n); |
| | | return e._milliseconds += s * i._milliseconds, e._days += s * i._days, e._months += s * i._months, e |
| | | ._bubble() |
| | | } |
| | | |
| | | function kn(e) { |
| | | return e < 0 ? Math.floor(e) : Math.ceil(e) |
| | | } |
| | | |
| | | function Sn(e) { |
| | | return 4800 * e / 146097 |
| | | } |
| | | |
| | | function Dn(e) { |
| | | return 146097 * e / 4800 |
| | | } |
| | | |
| | | function Yn(e) { |
| | | return function() { |
| | | return this.as(e) |
| | | } |
| | | } |
| | | let On = Yn('ms'), |
| | | Tn = Yn('s'), |
| | | bn = Yn('m'), |
| | | xn = Yn('h'), |
| | | Pn = Yn('d'), |
| | | Wn = Yn('w'), |
| | | Cn = Yn('M'), |
| | | Hn = Yn('Q'), |
| | | Rn = Yn('y'); |
| | | |
| | | function Un(e) { |
| | | return function() { |
| | | return this.isValid() ? this._data[e] : NaN |
| | | } |
| | | } |
| | | let Fn = Un('milliseconds'), |
| | | Ln = Un('seconds'), |
| | | Nn = Un('minutes'), |
| | | Gn = Un('hours'), |
| | | Vn = Un('days'), |
| | | En = Un('months'), |
| | | In = Un('years'); |
| | | let An = Math.round, |
| | | jn = { |
| | | ss: 44, |
| | | s: 45, |
| | | m: 45, |
| | | h: 22, |
| | | d: 26, |
| | | M: 11 |
| | | }; |
| | | let Zn = Math.abs; |
| | | |
| | | function zn(e) { |
| | | return (0 < e) - (e < 0) || +e |
| | | } |
| | | |
| | | function $n() { |
| | | if (!this.isValid()) return this.localeData().invalidDate(); |
| | | let e, t, n = Zn(this._milliseconds) / 1e3, |
| | | s = Zn(this._days), |
| | | i = Zn(this._months); |
| | | t = S((e = S(n / 60)) / 60), n %= 60, e %= 60; |
| | | let r = S(i / 12), |
| | | a = i %= 12, |
| | | o = s, |
| | | u = t, |
| | | l = e, |
| | | h = n ? n.toFixed(3).replace(/\.?0+$/, '') : '', |
| | | d = this.asSeconds(); |
| | | if (!d) return 'P0D'; |
| | | let c = d < 0 ? '-' : '', |
| | | f = zn(this._months) !== zn(d) ? '-' : '', |
| | | m = zn(this._days) !== zn(d) ? '-' : '', |
| | | _ = zn(this._milliseconds) !== zn(d) ? '-' : ''; |
| | | return c + 'P' + (r ? f + r + 'Y' : '') + (a ? f + a + 'M' : '') + (o ? m + o + 'D' : '') + (u || l || h ? |
| | | 'T' : '') + (u ? _ + u + 'H' : '') + (l ? _ + l + 'M' : '') + (h ? _ + h + 'S' : '') |
| | | } |
| | | let qn = Ht.prototype; |
| | | return qn.isValid = function() { |
| | | return this._isValid |
| | | }, qn.abs = function() { |
| | | let e = this._data; |
| | | return this._milliseconds = wn(this._milliseconds), this._days = wn(this._days), this._months = wn(this |
| | | ._months), e.milliseconds = wn(e.milliseconds), e.seconds = wn(e.seconds), e.minutes = wn(e |
| | | .minutes), e.hours = wn(e.hours), e.months = wn(e.months), e.years = wn(e.years), this |
| | | }, qn.add = function(e, t) { |
| | | return Mn(this, e, t, 1) |
| | | }, qn.subtract = function(e, t) { |
| | | return Mn(this, e, t, -1) |
| | | }, qn.as = function(e) { |
| | | if (!this.isValid()) return NaN; |
| | | let t, n, s = this._milliseconds; |
| | | if ('month' === (e = H(e)) || 'quarter' === e || 'year' === e) switch (t = this._days + s / 864e5, n = |
| | | this._months + Sn(t), e) { |
| | | case 'month': |
| | | return n; |
| | | case 'quarter': |
| | | return n / 3; |
| | | case 'year': |
| | | return n / 12 |
| | | } else switch (t = this._days + Math.round(Dn(this._months)), e) { |
| | | case 'week': |
| | | return t / 7 + s / 6048e5; |
| | | case 'day': |
| | | return t + s / 864e5; |
| | | case 'hour': |
| | | return 24 * t + s / 36e5; |
| | | case 'minute': |
| | | return 1440 * t + s / 6e4; |
| | | case 'second': |
| | | return 86400 * t + s / 1e3; |
| | | case 'millisecond': |
| | | return Math.floor(864e5 * t) + s; |
| | | default: |
| | | throw new Error('Unknown unit ' + e) |
| | | } |
| | | }, qn.asMilliseconds = On, qn.asSeconds = Tn, qn.asMinutes = bn, qn.asHours = xn, qn.asDays = Pn, qn |
| | | .asWeeks = Wn, qn.asMonths = Cn, qn.asQuarters = Hn, qn.asYears = Rn, qn.valueOf = function() { |
| | | return this.isValid() ? this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * |
| | | D(this._months / 12) : NaN |
| | | }, qn._bubble = function() { |
| | | let e, t, n, s, i, r = this._milliseconds, |
| | | a = this._days, |
| | | o = this._months, |
| | | u = this._data; |
| | | return 0 <= r && 0 <= a && 0 <= o || r <= 0 && a <= 0 && o <= 0 || (r += 864e5 * kn(Dn(o) + a), o = a = |
| | | 0), u.milliseconds = r % 1e3, e = S(r / 1e3), u.seconds = e % 60, t = S(e / 60), u.minutes = t % |
| | | 60, n = S(t / 60), u.hours = n % 24, o += i = S(Sn(a += S(n / 24))), a -= kn(Dn(i)), s = S(o / 12), |
| | | o %= 12, u.days = a, u.months = o, u.years = s, this |
| | | }, qn.clone = function() { |
| | | return jt(this) |
| | | }, qn.get = function(e) { |
| | | return e = H(e), this.isValid() ? this[e + 's']() : NaN |
| | | }, qn.milliseconds = Fn, qn.seconds = Ln, qn.minutes = Nn, qn.hours = Gn, qn.days = Vn, qn.weeks = |
| | | function() { |
| | | return S(this.days() / 7) |
| | | }, qn.months = En, qn.years = In, qn.humanize = function(e) { |
| | | if (!this.isValid()) return this.localeData().invalidDate(); |
| | | let t, n, s, i, r, a, o, u, l, h, d, c = this.localeData(), |
| | | f = (n = !e, s = c, i = jt(t = this).abs(), r = An(i.as('s')), a = An(i.as('m')), o = An(i.as('h')), |
| | | u = An(i.as('d')), l = An(i.as('M')), h = An(i.as('y')), (d = r <= jn.ss && ['s', r] || r < jn |
| | | .s && ['ss', r] || a <= 1 && ['m'] || a < jn.m && ['mm', a] || o <= 1 && ['h'] || o < jn |
| | | .h && ['hh', o] || u <= 1 && ['d'] || u < jn.d && ['dd', u] || l <= 1 && ['M'] || l < jn |
| | | .M && ['MM', l] || h <= 1 && ['y'] || ['yy', h])[2] = n, d[3] = 0 < +t, d[4] = s, |
| | | function(e, t, n, s, i) { |
| | | return i.relativeTime(t || 1, !!n, e, s) |
| | | }.apply(null, d)); |
| | | return e && (f = c.pastFuture(+this, f)), c.postformat(f) |
| | | }, qn.toISOString = $n, qn.toString = $n, qn.toJSON = $n, qn.locale = Xt, qn.localeData = en, qn |
| | | .toIsoString = n('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', $n), |
| | | qn.lang = Kt, I('X', 0, 0, 'unix'), I('x', 0, 0, 'valueOf'), ue('x', se), ue('X', /[+-]?\d+(\.\d{1,3})?/), |
| | | ce('X', function(e, t, n) { |
| | | n._d = new Date(1e3 * parseFloat(e, 10)) |
| | | }), ce('x', function(e, t, n) { |
| | | n._d = new Date(D(e)) |
| | | }), c.version = '2.24.0', e = bt, c.fn = mn, c.min = function() { |
| | | return Wt('isBefore', [].slice.call(arguments, 0)) |
| | | }, c.max = function() { |
| | | return Wt('isAfter', [].slice.call(arguments, 0)) |
| | | }, c.now = function() { |
| | | return Date.now ? Date.now() : +new Date |
| | | }, c.utc = y, c.unix = function(e) { |
| | | return bt(1e3 * e) |
| | | }, c.months = function(e, t) { |
| | | return vn(e, t, 'months') |
| | | }, c.isDate = d, c.locale = ut, c.invalid = p, c.duration = jt, c.isMoment = k, c.weekdays = function(e, t, |
| | | n) { |
| | | return pn(e, t, n, 'weekdays') |
| | | }, c.parseZone = function() { |
| | | return bt.apply(null, arguments).parseZone() |
| | | }, c.localeData = ht, c.isDuration = Rt, c.monthsShort = function(e, t) { |
| | | return vn(e, t, 'monthsShort') |
| | | }, c.weekdaysMin = function(e, t, n) { |
| | | return pn(e, t, n, 'weekdaysMin') |
| | | }, c.defineLocale = lt, c.updateLocale = function(e, t) { |
| | | if (null != t) { |
| | | let n, s, i = st; |
| | | null != (s = ot(e)) && (i = s._config), (n = new P(t = x(i, t))).parentLocale = it[e], it[e] = n, |
| | | ut(e) |
| | | } else null != it[e] && (null != it[e].parentLocale ? it[e] = it[e].parentLocale : null != it[e] && |
| | | delete it[e]); |
| | | return it[e] |
| | | }, c.locales = function() { |
| | | return s(it) |
| | | }, c.weekdaysShort = function(e, t, n) { |
| | | return pn(e, t, n, 'weekdaysShort') |
| | | }, c.normalizeUnits = H, c.relativeTimeRounding = function(e) { |
| | | return void 0 === e ? An : 'function' === typeof e && (An = e, !0) |
| | | }, c.relativeTimeThreshold = function(e, t) { |
| | | return void 0 !== jn[e] && (void 0 === t ? jn[e] : (jn[e] = t, 's' === e && (jn.ss = t - 1), !0)) |
| | | }, c.calendarFormat = function(e, t) { |
| | | let n = e.diff(t, 'days', !0); |
| | | return n < -6 ? 'sameElse' : n < -1 ? 'lastWeek' : n < 0 ? 'lastDay' : n < 1 ? 'sameDay' : n < 2 ? |
| | | 'nextDay' : n < 7 ? 'nextWeek' : 'sameElse' |
| | | }, c.prototype = mn, c.HTML5_FMT = { |
| | | DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', |
| | | DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', |
| | | DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', |
| | | DATE: 'YYYY-MM-DD', |
| | | TIME: 'HH:mm', |
| | | TIME_SECONDS: 'HH:mm:ss', |
| | | TIME_MS: 'HH:mm:ss.SSS', |
| | | WEEK: 'GGGG-[W]WW', |
| | | MONTH: 'YYYY-MM' |
| | | }, c |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | (function (factory) { |
| | | if (typeof exports === 'object') { |
| | | // Node/CommonJS |
| | | module.exports = factory(); |
| | | } else if (typeof define === 'function' && define.amd) { |
| | | // AMD |
| | | define(factory); |
| | | } else { |
| | | // Browser globals (with support for web workers) |
| | | var glob; |
| | | |
| | | try { |
| | | glob = window; |
| | | } catch (e) { |
| | | glob = self; |
| | | } |
| | | |
| | | glob.SparkMD5 = factory(); |
| | | } |
| | | }(function (undefined) { |
| | | |
| | | 'use strict'; |
| | | |
| | | /* |
| | | * Fastest md5 implementation around (JKM md5). |
| | | * Credits: Joseph Myers |
| | | * |
| | | * @see http://www.myersdaily.org/joseph/javascript/md5-text.html |
| | | * @see http://jsperf.com/md5-shootout/7 |
| | | */ |
| | | |
| | | /* this function is much faster, |
| | | so if possible we use it. Some IEs |
| | | are the only ones I know of that |
| | | need the idiotic second function, |
| | | generated by an if clause. */ |
| | | var add32 = function (a, b) { |
| | | return (a + b) & 0xFFFFFFFF; |
| | | }, |
| | | hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']; |
| | | |
| | | |
| | | function cmn(q, a, b, x, s, t) { |
| | | a = add32(add32(a, q), add32(x, t)); |
| | | return add32((a << s) | (a >>> (32 - s)), b); |
| | | } |
| | | |
| | | function md5cycle(x, k) { |
| | | var a = x[0], |
| | | b = x[1], |
| | | c = x[2], |
| | | d = x[3]; |
| | | |
| | | a += (b & c | ~b & d) + k[0] - 680876936 | 0; |
| | | a = (a << 7 | a >>> 25) + b | 0; |
| | | d += (a & b | ~a & c) + k[1] - 389564586 | 0; |
| | | d = (d << 12 | d >>> 20) + a | 0; |
| | | c += (d & a | ~d & b) + k[2] + 606105819 | 0; |
| | | c = (c << 17 | c >>> 15) + d | 0; |
| | | b += (c & d | ~c & a) + k[3] - 1044525330 | 0; |
| | | b = (b << 22 | b >>> 10) + c | 0; |
| | | a += (b & c | ~b & d) + k[4] - 176418897 | 0; |
| | | a = (a << 7 | a >>> 25) + b | 0; |
| | | d += (a & b | ~a & c) + k[5] + 1200080426 | 0; |
| | | d = (d << 12 | d >>> 20) + a | 0; |
| | | c += (d & a | ~d & b) + k[6] - 1473231341 | 0; |
| | | c = (c << 17 | c >>> 15) + d | 0; |
| | | b += (c & d | ~c & a) + k[7] - 45705983 | 0; |
| | | b = (b << 22 | b >>> 10) + c | 0; |
| | | a += (b & c | ~b & d) + k[8] + 1770035416 | 0; |
| | | a = (a << 7 | a >>> 25) + b | 0; |
| | | d += (a & b | ~a & c) + k[9] - 1958414417 | 0; |
| | | d = (d << 12 | d >>> 20) + a | 0; |
| | | c += (d & a | ~d & b) + k[10] - 42063 | 0; |
| | | c = (c << 17 | c >>> 15) + d | 0; |
| | | b += (c & d | ~c & a) + k[11] - 1990404162 | 0; |
| | | b = (b << 22 | b >>> 10) + c | 0; |
| | | a += (b & c | ~b & d) + k[12] + 1804603682 | 0; |
| | | a = (a << 7 | a >>> 25) + b | 0; |
| | | d += (a & b | ~a & c) + k[13] - 40341101 | 0; |
| | | d = (d << 12 | d >>> 20) + a | 0; |
| | | c += (d & a | ~d & b) + k[14] - 1502002290 | 0; |
| | | c = (c << 17 | c >>> 15) + d | 0; |
| | | b += (c & d | ~c & a) + k[15] + 1236535329 | 0; |
| | | b = (b << 22 | b >>> 10) + c | 0; |
| | | |
| | | a += (b & d | c & ~d) + k[1] - 165796510 | 0; |
| | | a = (a << 5 | a >>> 27) + b | 0; |
| | | d += (a & c | b & ~c) + k[6] - 1069501632 | 0; |
| | | d = (d << 9 | d >>> 23) + a | 0; |
| | | c += (d & b | a & ~b) + k[11] + 643717713 | 0; |
| | | c = (c << 14 | c >>> 18) + d | 0; |
| | | b += (c & a | d & ~a) + k[0] - 373897302 | 0; |
| | | b = (b << 20 | b >>> 12) + c | 0; |
| | | a += (b & d | c & ~d) + k[5] - 701558691 | 0; |
| | | a = (a << 5 | a >>> 27) + b | 0; |
| | | d += (a & c | b & ~c) + k[10] + 38016083 | 0; |
| | | d = (d << 9 | d >>> 23) + a | 0; |
| | | c += (d & b | a & ~b) + k[15] - 660478335 | 0; |
| | | c = (c << 14 | c >>> 18) + d | 0; |
| | | b += (c & a | d & ~a) + k[4] - 405537848 | 0; |
| | | b = (b << 20 | b >>> 12) + c | 0; |
| | | a += (b & d | c & ~d) + k[9] + 568446438 | 0; |
| | | a = (a << 5 | a >>> 27) + b | 0; |
| | | d += (a & c | b & ~c) + k[14] - 1019803690 | 0; |
| | | d = (d << 9 | d >>> 23) + a | 0; |
| | | c += (d & b | a & ~b) + k[3] - 187363961 | 0; |
| | | c = (c << 14 | c >>> 18) + d | 0; |
| | | b += (c & a | d & ~a) + k[8] + 1163531501 | 0; |
| | | b = (b << 20 | b >>> 12) + c | 0; |
| | | a += (b & d | c & ~d) + k[13] - 1444681467 | 0; |
| | | a = (a << 5 | a >>> 27) + b | 0; |
| | | d += (a & c | b & ~c) + k[2] - 51403784 | 0; |
| | | d = (d << 9 | d >>> 23) + a | 0; |
| | | c += (d & b | a & ~b) + k[7] + 1735328473 | 0; |
| | | c = (c << 14 | c >>> 18) + d | 0; |
| | | b += (c & a | d & ~a) + k[12] - 1926607734 | 0; |
| | | b = (b << 20 | b >>> 12) + c | 0; |
| | | |
| | | a += (b ^ c ^ d) + k[5] - 378558 | 0; |
| | | a = (a << 4 | a >>> 28) + b | 0; |
| | | d += (a ^ b ^ c) + k[8] - 2022574463 | 0; |
| | | d = (d << 11 | d >>> 21) + a | 0; |
| | | c += (d ^ a ^ b) + k[11] + 1839030562 | 0; |
| | | c = (c << 16 | c >>> 16) + d | 0; |
| | | b += (c ^ d ^ a) + k[14] - 35309556 | 0; |
| | | b = (b << 23 | b >>> 9) + c | 0; |
| | | a += (b ^ c ^ d) + k[1] - 1530992060 | 0; |
| | | a = (a << 4 | a >>> 28) + b | 0; |
| | | d += (a ^ b ^ c) + k[4] + 1272893353 | 0; |
| | | d = (d << 11 | d >>> 21) + a | 0; |
| | | c += (d ^ a ^ b) + k[7] - 155497632 | 0; |
| | | c = (c << 16 | c >>> 16) + d | 0; |
| | | b += (c ^ d ^ a) + k[10] - 1094730640 | 0; |
| | | b = (b << 23 | b >>> 9) + c | 0; |
| | | a += (b ^ c ^ d) + k[13] + 681279174 | 0; |
| | | a = (a << 4 | a >>> 28) + b | 0; |
| | | d += (a ^ b ^ c) + k[0] - 358537222 | 0; |
| | | d = (d << 11 | d >>> 21) + a | 0; |
| | | c += (d ^ a ^ b) + k[3] - 722521979 | 0; |
| | | c = (c << 16 | c >>> 16) + d | 0; |
| | | b += (c ^ d ^ a) + k[6] + 76029189 | 0; |
| | | b = (b << 23 | b >>> 9) + c | 0; |
| | | a += (b ^ c ^ d) + k[9] - 640364487 | 0; |
| | | a = (a << 4 | a >>> 28) + b | 0; |
| | | d += (a ^ b ^ c) + k[12] - 421815835 | 0; |
| | | d = (d << 11 | d >>> 21) + a | 0; |
| | | c += (d ^ a ^ b) + k[15] + 530742520 | 0; |
| | | c = (c << 16 | c >>> 16) + d | 0; |
| | | b += (c ^ d ^ a) + k[2] - 995338651 | 0; |
| | | b = (b << 23 | b >>> 9) + c | 0; |
| | | |
| | | a += (c ^ (b | ~d)) + k[0] - 198630844 | 0; |
| | | a = (a << 6 | a >>> 26) + b | 0; |
| | | d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0; |
| | | d = (d << 10 | d >>> 22) + a | 0; |
| | | c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0; |
| | | c = (c << 15 | c >>> 17) + d | 0; |
| | | b += (d ^ (c | ~a)) + k[5] - 57434055 | 0; |
| | | b = (b << 21 |b >>> 11) + c | 0; |
| | | a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0; |
| | | a = (a << 6 | a >>> 26) + b | 0; |
| | | d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0; |
| | | d = (d << 10 | d >>> 22) + a | 0; |
| | | c += (a ^ (d | ~b)) + k[10] - 1051523 | 0; |
| | | c = (c << 15 | c >>> 17) + d | 0; |
| | | b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0; |
| | | b = (b << 21 |b >>> 11) + c | 0; |
| | | a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0; |
| | | a = (a << 6 | a >>> 26) + b | 0; |
| | | d += (b ^ (a | ~c)) + k[15] - 30611744 | 0; |
| | | d = (d << 10 | d >>> 22) + a | 0; |
| | | c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0; |
| | | c = (c << 15 | c >>> 17) + d | 0; |
| | | b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0; |
| | | b = (b << 21 |b >>> 11) + c | 0; |
| | | a += (c ^ (b | ~d)) + k[4] - 145523070 | 0; |
| | | a = (a << 6 | a >>> 26) + b | 0; |
| | | d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0; |
| | | d = (d << 10 | d >>> 22) + a | 0; |
| | | c += (a ^ (d | ~b)) + k[2] + 718787259 | 0; |
| | | c = (c << 15 | c >>> 17) + d | 0; |
| | | b += (d ^ (c | ~a)) + k[9] - 343485551 | 0; |
| | | b = (b << 21 | b >>> 11) + c | 0; |
| | | |
| | | x[0] = a + x[0] | 0; |
| | | x[1] = b + x[1] | 0; |
| | | x[2] = c + x[2] | 0; |
| | | x[3] = d + x[3] | 0; |
| | | } |
| | | |
| | | function md5blk(s) { |
| | | var md5blks = [], |
| | | i; /* Andy King said do it this way. */ |
| | | |
| | | for (i = 0; i < 64; i += 4) { |
| | | md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24); |
| | | } |
| | | return md5blks; |
| | | } |
| | | |
| | | function md5blk_array(a) { |
| | | var md5blks = [], |
| | | i; /* Andy King said do it this way. */ |
| | | |
| | | for (i = 0; i < 64; i += 4) { |
| | | md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24); |
| | | } |
| | | return md5blks; |
| | | } |
| | | |
| | | function md51(s) { |
| | | var n = s.length, |
| | | state = [1732584193, -271733879, -1732584194, 271733878], |
| | | i, |
| | | length, |
| | | tail, |
| | | tmp, |
| | | lo, |
| | | hi; |
| | | |
| | | for (i = 64; i <= n; i += 64) { |
| | | md5cycle(state, md5blk(s.substring(i - 64, i))); |
| | | } |
| | | s = s.substring(i - 64); |
| | | length = s.length; |
| | | tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; |
| | | for (i = 0; i < length; i += 1) { |
| | | tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3); |
| | | } |
| | | tail[i >> 2] |= 0x80 << ((i % 4) << 3); |
| | | if (i > 55) { |
| | | md5cycle(state, tail); |
| | | for (i = 0; i < 16; i += 1) { |
| | | tail[i] = 0; |
| | | } |
| | | } |
| | | |
| | | // Beware that the final length might not fit in 32 bits so we take care of that |
| | | tmp = n * 8; |
| | | tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/); |
| | | lo = parseInt(tmp[2], 16); |
| | | hi = parseInt(tmp[1], 16) || 0; |
| | | |
| | | tail[14] = lo; |
| | | tail[15] = hi; |
| | | |
| | | md5cycle(state, tail); |
| | | return state; |
| | | } |
| | | |
| | | function md51_array(a) { |
| | | var n = a.length, |
| | | state = [1732584193, -271733879, -1732584194, 271733878], |
| | | i, |
| | | length, |
| | | tail, |
| | | tmp, |
| | | lo, |
| | | hi; |
| | | |
| | | for (i = 64; i <= n; i += 64) { |
| | | md5cycle(state, md5blk_array(a.subarray(i - 64, i))); |
| | | } |
| | | |
| | | // Not sure if it is a bug, however IE10 will always produce a sub array of length 1 |
| | | // containing the last element of the parent array if the sub array specified starts |
| | | // beyond the length of the parent array - weird. |
| | | // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue |
| | | a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0); |
| | | |
| | | length = a.length; |
| | | tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; |
| | | for (i = 0; i < length; i += 1) { |
| | | tail[i >> 2] |= a[i] << ((i % 4) << 3); |
| | | } |
| | | |
| | | tail[i >> 2] |= 0x80 << ((i % 4) << 3); |
| | | if (i > 55) { |
| | | md5cycle(state, tail); |
| | | for (i = 0; i < 16; i += 1) { |
| | | tail[i] = 0; |
| | | } |
| | | } |
| | | |
| | | // Beware that the final length might not fit in 32 bits so we take care of that |
| | | tmp = n * 8; |
| | | tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/); |
| | | lo = parseInt(tmp[2], 16); |
| | | hi = parseInt(tmp[1], 16) || 0; |
| | | |
| | | tail[14] = lo; |
| | | tail[15] = hi; |
| | | |
| | | md5cycle(state, tail); |
| | | |
| | | return state; |
| | | } |
| | | |
| | | function rhex(n) { |
| | | var s = '', |
| | | j; |
| | | for (j = 0; j < 4; j += 1) { |
| | | s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F]; |
| | | } |
| | | return s; |
| | | } |
| | | |
| | | function hex(x) { |
| | | var i; |
| | | for (i = 0; i < x.length; i += 1) { |
| | | x[i] = rhex(x[i]); |
| | | } |
| | | return x.join(''); |
| | | } |
| | | |
| | | // In some cases the fast add32 function cannot be used.. |
| | | if (hex(md51('hello')) !== '5d41402abc4b2a76b9719d911017c592') { |
| | | add32 = function (x, y) { |
| | | var lsw = (x & 0xFFFF) + (y & 0xFFFF), |
| | | msw = (x >> 16) + (y >> 16) + (lsw >> 16); |
| | | return (msw << 16) | (lsw & 0xFFFF); |
| | | }; |
| | | } |
| | | |
| | | // --------------------------------------------------- |
| | | |
| | | /** |
| | | * ArrayBuffer slice polyfill. |
| | | * |
| | | * @see https://github.com/ttaubert/node-arraybuffer-slice |
| | | */ |
| | | |
| | | if (typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) { |
| | | (function () { |
| | | function clamp(val, length) { |
| | | val = (val | 0) || 0; |
| | | |
| | | if (val < 0) { |
| | | return Math.max(val + length, 0); |
| | | } |
| | | |
| | | return Math.min(val, length); |
| | | } |
| | | |
| | | ArrayBuffer.prototype.slice = function (from, to) { |
| | | var length = this.byteLength, |
| | | begin = clamp(from, length), |
| | | end = length, |
| | | num, |
| | | target, |
| | | targetArray, |
| | | sourceArray; |
| | | |
| | | if (to !== undefined) { |
| | | end = clamp(to, length); |
| | | } |
| | | |
| | | if (begin > end) { |
| | | return new ArrayBuffer(0); |
| | | } |
| | | |
| | | num = end - begin; |
| | | target = new ArrayBuffer(num); |
| | | targetArray = new Uint8Array(target); |
| | | |
| | | sourceArray = new Uint8Array(this, begin, num); |
| | | targetArray.set(sourceArray); |
| | | |
| | | return target; |
| | | }; |
| | | })(); |
| | | } |
| | | |
| | | // --------------------------------------------------- |
| | | |
| | | /** |
| | | * Helpers. |
| | | */ |
| | | |
| | | function toUtf8(str) { |
| | | if (/[\u0080-\uFFFF]/.test(str)) { |
| | | str = unescape(encodeURIComponent(str)); |
| | | } |
| | | |
| | | return str; |
| | | } |
| | | |
| | | function utf8Str2ArrayBuffer(str, returnUInt8Array) { |
| | | var length = str.length, |
| | | buff = new ArrayBuffer(length), |
| | | arr = new Uint8Array(buff), |
| | | i; |
| | | |
| | | for (i = 0; i < length; i += 1) { |
| | | arr[i] = str.charCodeAt(i); |
| | | } |
| | | |
| | | return returnUInt8Array ? arr : buff; |
| | | } |
| | | |
| | | function arrayBuffer2Utf8Str(buff) { |
| | | return String.fromCharCode.apply(null, new Uint8Array(buff)); |
| | | } |
| | | |
| | | function concatenateArrayBuffers(first, second, returnUInt8Array) { |
| | | var result = new Uint8Array(first.byteLength + second.byteLength); |
| | | |
| | | result.set(new Uint8Array(first)); |
| | | result.set(new Uint8Array(second), first.byteLength); |
| | | |
| | | return returnUInt8Array ? result : result.buffer; |
| | | } |
| | | |
| | | function hexToBinaryString(hex) { |
| | | var bytes = [], |
| | | length = hex.length, |
| | | x; |
| | | |
| | | for (x = 0; x < length - 1; x += 2) { |
| | | bytes.push(parseInt(hex.substr(x, 2), 16)); |
| | | } |
| | | |
| | | return String.fromCharCode.apply(String, bytes); |
| | | } |
| | | |
| | | // --------------------------------------------------- |
| | | |
| | | /** |
| | | * SparkMD5 OOP implementation. |
| | | * |
| | | * Use this class to perform an incremental md5, otherwise use the |
| | | * static methods instead. |
| | | */ |
| | | |
| | | function SparkMD5() { |
| | | // call reset to init the instance |
| | | this.reset(); |
| | | } |
| | | |
| | | /** |
| | | * Appends a string. |
| | | * A conversion will be applied if an utf8 string is detected. |
| | | * |
| | | * @param {String} str The string to be appended |
| | | * |
| | | * @return {SparkMD5} The instance itself |
| | | */ |
| | | SparkMD5.prototype.append = function (str) { |
| | | // Converts the string to utf8 bytes if necessary |
| | | // Then append as binary |
| | | this.appendBinary(toUtf8(str)); |
| | | |
| | | return this; |
| | | }; |
| | | |
| | | /** |
| | | * Appends a binary string. |
| | | * |
| | | * @param {String} contents The binary string to be appended |
| | | * |
| | | * @return {SparkMD5} The instance itself |
| | | */ |
| | | SparkMD5.prototype.appendBinary = function (contents) { |
| | | this._buff += contents; |
| | | this._length += contents.length; |
| | | |
| | | var length = this._buff.length, |
| | | i; |
| | | |
| | | for (i = 64; i <= length; i += 64) { |
| | | md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i))); |
| | | } |
| | | |
| | | this._buff = this._buff.substring(i - 64); |
| | | |
| | | return this; |
| | | }; |
| | | |
| | | /** |
| | | * Finishes the incremental computation, reseting the internal state and |
| | | * returning the result. |
| | | * |
| | | * @param {Boolean} raw True to get the raw string, false to get the hex string |
| | | * |
| | | * @return {String} The result |
| | | */ |
| | | SparkMD5.prototype.end = function (raw) { |
| | | var buff = this._buff, |
| | | length = buff.length, |
| | | i, |
| | | tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
| | | ret; |
| | | |
| | | for (i = 0; i < length; i += 1) { |
| | | tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3); |
| | | } |
| | | |
| | | this._finish(tail, length); |
| | | ret = hex(this._hash); |
| | | |
| | | if (raw) { |
| | | ret = hexToBinaryString(ret); |
| | | } |
| | | |
| | | this.reset(); |
| | | |
| | | return ret; |
| | | }; |
| | | |
| | | /** |
| | | * Resets the internal state of the computation. |
| | | * |
| | | * @return {SparkMD5} The instance itself |
| | | */ |
| | | SparkMD5.prototype.reset = function () { |
| | | this._buff = ''; |
| | | this._length = 0; |
| | | this._hash = [1732584193, -271733879, -1732584194, 271733878]; |
| | | |
| | | return this; |
| | | }; |
| | | |
| | | /** |
| | | * Gets the internal state of the computation. |
| | | * |
| | | * @return {Object} The state |
| | | */ |
| | | SparkMD5.prototype.getState = function () { |
| | | return { |
| | | buff: this._buff, |
| | | length: this._length, |
| | | hash: this._hash.slice() |
| | | }; |
| | | }; |
| | | |
| | | /** |
| | | * Gets the internal state of the computation. |
| | | * |
| | | * @param {Object} state The state |
| | | * |
| | | * @return {SparkMD5} The instance itself |
| | | */ |
| | | SparkMD5.prototype.setState = function (state) { |
| | | this._buff = state.buff; |
| | | this._length = state.length; |
| | | this._hash = state.hash; |
| | | |
| | | return this; |
| | | }; |
| | | |
| | | /** |
| | | * Releases memory used by the incremental buffer and other additional |
| | | * resources. If you plan to use the instance again, use reset instead. |
| | | */ |
| | | SparkMD5.prototype.destroy = function () { |
| | | delete this._hash; |
| | | delete this._buff; |
| | | delete this._length; |
| | | }; |
| | | |
| | | /** |
| | | * Finish the final calculation based on the tail. |
| | | * |
| | | * @param {Array} tail The tail (will be modified) |
| | | * @param {Number} length The length of the remaining buffer |
| | | */ |
| | | SparkMD5.prototype._finish = function (tail, length) { |
| | | var i = length, |
| | | tmp, |
| | | lo, |
| | | hi; |
| | | |
| | | tail[i >> 2] |= 0x80 << ((i % 4) << 3); |
| | | if (i > 55) { |
| | | md5cycle(this._hash, tail); |
| | | for (i = 0; i < 16; i += 1) { |
| | | tail[i] = 0; |
| | | } |
| | | } |
| | | |
| | | // Do the final computation based on the tail and length |
| | | // Beware that the final length may not fit in 32 bits so we take care of that |
| | | tmp = this._length * 8; |
| | | tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/); |
| | | lo = parseInt(tmp[2], 16); |
| | | hi = parseInt(tmp[1], 16) || 0; |
| | | |
| | | tail[14] = lo; |
| | | tail[15] = hi; |
| | | md5cycle(this._hash, tail); |
| | | }; |
| | | |
| | | /** |
| | | * Performs the md5 hash on a string. |
| | | * A conversion will be applied if utf8 string is detected. |
| | | * |
| | | * @param {String} str The string |
| | | * @param {Boolean} [raw] True to get the raw string, false to get the hex string |
| | | * |
| | | * @return {String} The result |
| | | */ |
| | | SparkMD5.hash = function (str, raw) { |
| | | // Converts the string to utf8 bytes if necessary |
| | | // Then compute it using the binary function |
| | | return SparkMD5.hashBinary(toUtf8(str), raw); |
| | | }; |
| | | |
| | | /** |
| | | * Performs the md5 hash on a binary string. |
| | | * |
| | | * @param {String} content The binary string |
| | | * @param {Boolean} [raw] True to get the raw string, false to get the hex string |
| | | * |
| | | * @return {String} The result |
| | | */ |
| | | SparkMD5.hashBinary = function (content, raw) { |
| | | var hash = md51(content), |
| | | ret = hex(hash); |
| | | |
| | | return raw ? hexToBinaryString(ret) : ret; |
| | | }; |
| | | |
| | | // --------------------------------------------------- |
| | | |
| | | /** |
| | | * SparkMD5 OOP implementation for array buffers. |
| | | * |
| | | * Use this class to perform an incremental md5 ONLY for array buffers. |
| | | */ |
| | | SparkMD5.ArrayBuffer = function () { |
| | | // call reset to init the instance |
| | | this.reset(); |
| | | }; |
| | | |
| | | /** |
| | | * Appends an array buffer. |
| | | * |
| | | * @param {ArrayBuffer} arr The array to be appended |
| | | * |
| | | * @return {SparkMD5.ArrayBuffer} The instance itself |
| | | */ |
| | | SparkMD5.ArrayBuffer.prototype.append = function (arr) { |
| | | var buff = concatenateArrayBuffers(this._buff.buffer, arr, true), |
| | | length = buff.length, |
| | | i; |
| | | |
| | | this._length += arr.byteLength; |
| | | |
| | | for (i = 64; i <= length; i += 64) { |
| | | md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i))); |
| | | } |
| | | |
| | | this._buff = (i - 64) < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0); |
| | | |
| | | return this; |
| | | }; |
| | | |
| | | /** |
| | | * Finishes the incremental computation, reseting the internal state and |
| | | * returning the result. |
| | | * |
| | | * @param {Boolean} raw True to get the raw string, false to get the hex string |
| | | * |
| | | * @return {String} The result |
| | | */ |
| | | SparkMD5.ArrayBuffer.prototype.end = function (raw) { |
| | | var buff = this._buff, |
| | | length = buff.length, |
| | | tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
| | | i, |
| | | ret; |
| | | |
| | | for (i = 0; i < length; i += 1) { |
| | | tail[i >> 2] |= buff[i] << ((i % 4) << 3); |
| | | } |
| | | |
| | | this._finish(tail, length); |
| | | ret = hex(this._hash); |
| | | |
| | | if (raw) { |
| | | ret = hexToBinaryString(ret); |
| | | } |
| | | |
| | | this.reset(); |
| | | |
| | | return ret; |
| | | }; |
| | | |
| | | /** |
| | | * Resets the internal state of the computation. |
| | | * |
| | | * @return {SparkMD5.ArrayBuffer} The instance itself |
| | | */ |
| | | SparkMD5.ArrayBuffer.prototype.reset = function () { |
| | | this._buff = new Uint8Array(0); |
| | | this._length = 0; |
| | | this._hash = [1732584193, -271733879, -1732584194, 271733878]; |
| | | |
| | | return this; |
| | | }; |
| | | |
| | | /** |
| | | * Gets the internal state of the computation. |
| | | * |
| | | * @return {Object} The state |
| | | */ |
| | | SparkMD5.ArrayBuffer.prototype.getState = function () { |
| | | var state = SparkMD5.prototype.getState.call(this); |
| | | |
| | | // Convert buffer to a string |
| | | state.buff = arrayBuffer2Utf8Str(state.buff); |
| | | |
| | | return state; |
| | | }; |
| | | |
| | | /** |
| | | * Gets the internal state of the computation. |
| | | * |
| | | * @param {Object} state The state |
| | | * |
| | | * @return {SparkMD5.ArrayBuffer} The instance itself |
| | | */ |
| | | SparkMD5.ArrayBuffer.prototype.setState = function (state) { |
| | | // Convert string to buffer |
| | | state.buff = utf8Str2ArrayBuffer(state.buff, true); |
| | | |
| | | return SparkMD5.prototype.setState.call(this, state); |
| | | }; |
| | | |
| | | SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy; |
| | | |
| | | SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish; |
| | | |
| | | /** |
| | | * Performs the md5 hash on an array buffer. |
| | | * |
| | | * @param {ArrayBuffer} arr The array buffer |
| | | * @param {Boolean} [raw] True to get the raw string, false to get the hex one |
| | | * |
| | | * @return {String} The result |
| | | */ |
| | | SparkMD5.ArrayBuffer.hash = function (arr, raw) { |
| | | var hash = md51_array(new Uint8Array(arr)), |
| | | ret = hex(hash); |
| | | |
| | | return raw ? hexToBinaryString(ret) : ret; |
| | | }; |
| | | |
| | | return SparkMD5; |
| | | })); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /*! |
| | | * vue-i18n v8.20.0 |
| | | * (c) 2020 kazuya kawaguchi |
| | | * Released under the MIT License. |
| | | */ |
| | | var t,e;t=this,e=function(){"use strict";var t=["style","currency","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","localeMatcher","formatMatcher","unit"];function e(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}var n=Array.isArray;function r(t){return null!==t&&"object"==typeof t}function a(t){return"string"==typeof t}var i=Object.prototype.toString,o="[object Object]";function s(t){return i.call(t)===o}function l(t){return null==t}function c(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=null,a=null;return 1===t.length?r(t[0])||Array.isArray(t[0])?a=t[0]:"string"==typeof t[0]&&(n=t[0]):2===t.length&&("string"==typeof t[0]&&(n=t[0]),(r(t[1])||Array.isArray(t[1]))&&(a=t[1])),{locale:n,params:a}}function u(t){return JSON.parse(JSON.stringify(t))}function h(t,e){return!!~t.indexOf(e)}var f=Object.prototype.hasOwnProperty;function p(t,e){return f.call(t,e)}function m(t){for(var e=arguments,n=Object(t),a=1;a<arguments.length;a++){var i=e[a];if(null!=i){var o=void 0;for(o in i)p(i,o)&&(r(i[o])?n[o]=m(n[o],i[o]):n[o]=i[o])}}return n}function _(t,e){if(t===e)return!0;var n=r(t),a=r(e);if(!n||!a)return!n&&!a&&String(t)===String(e);try{var i=Array.isArray(t),o=Array.isArray(e);if(i&&o)return t.length===e.length&&t.every(function(t,n){return _(t,e[n])});if(i||o)return!1;var s=Object.keys(t),l=Object.keys(e);return s.length===l.length&&s.every(function(n){return _(t[n],e[n])})}catch(t){return!1}}var g={beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n){if(t.i18n instanceof et){if(t.__i18n)try{var e={};t.__i18n.forEach(function(t){e=m(e,JSON.parse(t))}),Object.keys(e).forEach(function(n){t.i18n.mergeLocaleMessage(n,e[n])})}catch(t){}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(s(t.i18n)){var n=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof et?this.$root.$i18n:null;if(n&&(t.i18n.root=this.$root,t.i18n.formatter=n.formatter,t.i18n.fallbackLocale=n.fallbackLocale,t.i18n.formatFallbackMessages=n.formatFallbackMessages,t.i18n.silentTranslationWarn=n.silentTranslationWarn,t.i18n.silentFallbackWarn=n.silentFallbackWarn,t.i18n.pluralizationRules=n.pluralizationRules,t.i18n.preserveDirectiveContent=n.preserveDirectiveContent),t.__i18n)try{var r={};t.__i18n.forEach(function(t){r=m(r,JSON.parse(t))}),t.i18n.messages=r}catch(t){}var a=t.i18n.sharedMessages;a&&s(a)&&(t.i18n.messages=m(t.i18n.messages,a)),this._i18n=new et(t.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===t.i18n.sync||t.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),n&&n.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof et?this._i18n=this.$root.$i18n:t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof et&&(this._i18n=t.parent.$i18n)},beforeMount:function(){var t=this.$options;t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n?t.i18n instanceof et?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):s(t.i18n)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof et?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof et&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},beforeDestroy:function(){if(this._i18n){var t=this;this.$nextTick(function(){t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)})}}},v={name:"i18n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render:function(t,e){var n=e.data,r=e.parent,a=e.props,i=e.slots,o=r.$i18n;if(o){var s=a.path,l=a.locale,c=a.places,u=i(),h=o.i(s,l,function(t){var e;for(e in t)if("default"!==e)return!1;return Boolean(e)}(u)||c?function(t,e){var n=e?function(t){return Array.isArray(t)?t.reduce(d,{}):Object.assign({},t)}(e):{};if(!t)return n;var r=(t=t.filter(function(t){return t.tag||""!==t.text.trim()})).every(y);return t.reduce(r?b:d,n)}(u.default,c):u),f=a.tag&&!0!==a.tag||!1===a.tag?a.tag:"span";return f?t(f,n,h):h}}};function b(t,e){return e.data&&e.data.attrs&&e.data.attrs.place&&(t[e.data.attrs.place]=e),t}function d(t,e,n){return t[n]=e,t}function y(t){return Boolean(t.data&&t.data.attrs&&t.data.attrs.place)}var F,k={name:"i18n-n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},value:{type:Number,required:!0},format:{type:[String,Object]},locale:{type:String}},render:function(e,n){var i=n.props,o=n.parent,s=n.data,l=o.$i18n;if(!l)return null;var c=null,u=null;a(i.format)?c=i.format:r(i.format)&&(i.format.key&&(c=i.format.key),u=Object.keys(i.format).reduce(function(e,n){var r;return h(t,n)?Object.assign({},e,((r={})[n]=i.format[n],r)):e},null));var f=i.locale||l.locale,p=l._ntp(i.value,f,c,u),m=p.map(function(t,e){var n,r=s.scopedSlots&&s.scopedSlots[t.type];return r?r(((n={})[t.type]=t.value,n.index=e,n.parts=p,n)):t.value}),_=i.tag&&!0!==i.tag||!1===i.tag?i.tag:"span";return _?e(_,{attrs:s.attrs,class:s.class,staticClass:s.staticClass},m):m}};function w(t,e,n){C(t,n)&&T(t,e,n)}function $(t,e,n,r){if(C(t,n)){var a=n.context.$i18n;(function(t,e){var n=e.context;return t._locale===n.$i18n.locale})(t,n)&&_(e.value,e.oldValue)&&_(t._localeMessage,a.getLocaleMessage(a.locale))||T(t,e,n)}}function M(t,n,r,a){if(r.context){var i=r.context.$i18n||{};n.modifiers.preserve||i.preserveDirectiveContent||(t.textContent=""),t._vt=void 0,delete t._vt,t._locale=void 0,delete t._locale,t._localeMessage=void 0,delete t._localeMessage}else e("Vue instance does not exists in VNode context")}function C(t,n){var r=n.context;return r?!!r.$i18n||(e("VueI18n instance does not exists in Vue instance"),!1):(e("Vue instance does not exists in VNode context"),!1)}function T(t,n,r){var i,o,l=function(t){var e,n,r,i;a(t)?e=t:s(t)&&(e=t.path,n=t.locale,r=t.args,i=t.choice);return{path:e,locale:n,args:r,choice:i}}(n.value),c=l.path,u=l.locale,h=l.args,f=l.choice;if(c||u||h)if(c){var p=r.context;t._vt=t.textContent=null!=f?(i=p.$i18n).tc.apply(i,[c,f].concat(L(u,h))):(o=p.$i18n).t.apply(o,[c].concat(L(u,h))),t._locale=p.$i18n.locale,t._localeMessage=p.$i18n.getLocaleMessage(p.$i18n.locale)}else e("`path` is required in v-t directive");else e("value type not supported")}function L(t,e){var n=[];return t&&n.push(t),e&&(Array.isArray(e)||s(e))&&n.push(e),n}function I(t){I.installed=!0;(F=t).version&&Number(F.version.split(".")[0]);!function(t){t.prototype.hasOwnProperty("$i18n")||Object.defineProperty(t.prototype,"$i18n",{get:function(){return this._i18n}}),t.prototype.$t=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=this.$i18n;return r._t.apply(r,[t,r.locale,r._getMessages(),this].concat(e))},t.prototype.$tc=function(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];var a=this.$i18n;return a._tc.apply(a,[t,a.locale,a._getMessages(),this,e].concat(n))},t.prototype.$te=function(t,e){var n=this.$i18n;return n._te(t,n.locale,n._getMessages(),e)},t.prototype.$d=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this.$i18n).d.apply(e,[t].concat(n))},t.prototype.$n=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this.$i18n).n.apply(e,[t].concat(n))}}(F),F.mixin(g),F.directive("t",{bind:w,update:$,unbind:M}),F.component(v.name,v),F.component(k.name,k),F.config.optionMergeStrategies.i18n=function(t,e){return void 0===e?t:e}}var D=function(){this._caches=Object.create(null)};D.prototype.interpolate=function(t,e){if(!e)return[t];var n=this._caches[t];return n||(n=function(t){var e=[],n=0,r="";for(;n<t.length;){var a=t[n++];if("{"===a){r&&e.push({type:"text",value:r}),r="";var i="";for(a=t[n++];void 0!==a&&"}"!==a;)i+=a,a=t[n++];var o="}"===a,s=O.test(i)?"list":o&&x.test(i)?"named":"unknown";e.push({value:i,type:s})}else"%"===a?"{"!==t[n]&&(r+=a):r+=a}return r&&e.push({type:"text",value:r}),e}(t),this._caches[t]=n),function(t,e){var n=[],a=0,i=Array.isArray(e)?"list":r(e)?"named":"unknown";if("unknown"===i)return n;for(;a<t.length;){var o=t[a];switch(o.type){case"text":n.push(o.value);break;case"list":n.push(e[parseInt(o.value,10)]);break;case"named":"named"===i&&n.push(e[o.value])}a++}return n}(n,e)};var O=/^(?:\d)+/,x=/^(?:\w)+/,W=0,j=1,N=2,A=3,S=0,R=4,H=5,P=6,V=7,E=8,z=[];z[S]={ws:[S],ident:[3,W],"[":[R],eof:[V]},z[1]={ws:[1],".":[2],"[":[R],eof:[V]},z[2]={ws:[2],ident:[3,W],0:[3,W],number:[3,W]},z[3]={ident:[3,W],0:[3,W],number:[3,W],ws:[1,j],".":[2,j],"[":[R,j],eof:[V,j]},z[R]={"'":[H,W],'"':[P,W],"[":[R,N],"]":[1,A],eof:E,else:[R,W]},z[H]={"'":[R,W],eof:E,else:[H,W]},z[P]={'"':[R,W],eof:E,else:[P,W]};var B=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function U(t){if(null==t)return"eof";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"ident";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return"ident"}function J(t){var e,n,r,a=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(r=a,B.test(r)?(n=(e=a).charCodeAt(0))!==e.charCodeAt(e.length-1)||34!==n&&39!==n?e:e.slice(1,-1):"*"+a)}var q=function(){this._cache=Object.create(null)};q.prototype.parsePath=function(t){var e=this._cache[t];return e||(e=function(t){var e,n,r,a,i,o,s,l=[],c=-1,u=S,h=0,f=[];function p(){var e=t[c+1];if(u===H&&"'"===e||u===P&&'"'===e)return c++,r="\\"+e,f[W](),!0}for(f[j]=function(){void 0!==n&&(l.push(n),n=void 0)},f[W]=function(){void 0===n?n=r:n+=r},f[N]=function(){f[W](),h++},f[A]=function(){if(h>0)h--,u=R,f[W]();else{if(h=0,void 0===n)return!1;if(!1===(n=J(n)))return!1;f[j]()}};null!==u;)if("\\"!==(e=t[++c])||!p()){if(a=U(e),(i=(s=z[u])[a]||s.else||E)===E)return;if(u=i[0],(o=f[i[1]])&&(r=void 0===(r=i[2])?e:r,!1===o()))return;if(u===V)return l}}(t))&&(this._cache[t]=e),e||[]},q.prototype.getPathValue=function(t,e){if(!r(t))return null;var n=this.parsePath(e);if(0===n.length)return null;for(var a=n.length,i=t,o=0;o<a;){var s=i[n[o]];if(void 0===s)return null;i=s,o++}return i};var G,X=/<\/?[\w\s="/.':;#-\/]+>/,Z=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,K=/^@(?:\.([a-z]+))?:/,Q=/[()]/g,Y={upper:function(t){return t.toLocaleUpperCase()},lower:function(t){return t.toLocaleLowerCase()},capitalize:function(t){return""+t.charAt(0).toLocaleUpperCase()+t.substr(1)}},tt=new D,et=function(t){var e=this;void 0===t&&(t={}),!F&&"undefined"!=typeof window&&window.Vue&&I(window.Vue);var n=t.locale||"en-US",r=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),a=t.messages||{},i=t.dateTimeFormats||{},o=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||tt,this._modifiers=t.modifiers||{},this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._formatFallbackMessages=void 0!==t.formatFallbackMessages&&!!t.formatFallbackMessages,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new q,this._dataListeners=[],this._componentInstanceCreatedListener=t.componentInstanceCreatedListener||null,this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._postTranslation=t.postTranslation||null,this.getChoiceIndex=function(t,n){var r=Object.getPrototypeOf(e);if(r&&r.getChoiceIndex)return r.getChoiceIndex.call(e,t,n);var a,i;return e.locale in e.pluralizationRules?e.pluralizationRules[e.locale].apply(e,[t,n]):(a=t,i=n,a=Math.abs(a),2===i?a?a>1?1:0:1:a?Math.min(a,2):0)},this._exist=function(t,n){return!(!t||!n)&&(!l(e._path.getPathValue(t,n))||!!t[n])},"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(a).forEach(function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,a[t])}),this._initVM({locale:n,fallbackLocale:r,messages:a,dateTimeFormats:i,numberFormats:o})},nt={vm:{configurable:!0},messages:{configurable:!0},dateTimeFormats:{configurable:!0},numberFormats:{configurable:!0},availableLocales:{configurable:!0},locale:{configurable:!0},fallbackLocale:{configurable:!0},formatFallbackMessages:{configurable:!0},missing:{configurable:!0},formatter:{configurable:!0},silentTranslationWarn:{configurable:!0},silentFallbackWarn:{configurable:!0},preserveDirectiveContent:{configurable:!0},warnHtmlInMessage:{configurable:!0},postTranslation:{configurable:!0}};return et.prototype._checkLocaleMessage=function(t,n,r){var i=function(t,n,r,o){if(s(r))Object.keys(r).forEach(function(e){var a=r[e];s(a)?(o.push(e),o.push("."),i(t,n,a,o),o.pop(),o.pop()):(o.push(e),i(t,n,a,o),o.pop())});else if(Array.isArray(r))r.forEach(function(e,r){s(e)?(o.push("["+r+"]"),o.push("."),i(t,n,e,o),o.pop(),o.pop()):(o.push("["+r+"]"),i(t,n,e,o),o.pop())});else if(a(r)){if(X.test(r)){var l="Detected HTML in message '"+r+"' of keypath '"+o.join("")+"' at '"+n+"'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===t?e(l):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(l)}}};i(n,t,r,[])},et.prototype._initVM=function(t){var e=F.config.silent;F.config.silent=!0,this._vm=new F({data:t}),F.config.silent=e},et.prototype.destroyVM=function(){this._vm.$destroy()},et.prototype.subscribeDataChanging=function(t){this._dataListeners.push(t)},et.prototype.unsubscribeDataChanging=function(t){!function(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)t.splice(n,1)}}(this._dataListeners,t)},et.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",function(){for(var e=t._dataListeners.length;e--;)F.nextTick(function(){t._dataListeners[e]&&t._dataListeners[e].$forceUpdate()})},{deep:!0})},et.prototype.watchLocale=function(){if(!this._sync||!this._root)return null;var t=this._vm;return this._root.$i18n.vm.$watch("locale",function(e){t.$set(t,"locale",e),t.$forceUpdate()},{immediate:!0})},et.prototype.onComponentInstanceCreated=function(t){this._componentInstanceCreatedListener&&this._componentInstanceCreatedListener(t,this)},nt.vm.get=function(){return this._vm},nt.messages.get=function(){return u(this._getMessages())},nt.dateTimeFormats.get=function(){return u(this._getDateTimeFormats())},nt.numberFormats.get=function(){return u(this._getNumberFormats())},nt.availableLocales.get=function(){return Object.keys(this.messages).sort()},nt.locale.get=function(){return this._vm.locale},nt.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},nt.fallbackLocale.get=function(){return this._vm.fallbackLocale},nt.fallbackLocale.set=function(t){this._localeChainCache={},this._vm.$set(this._vm,"fallbackLocale",t)},nt.formatFallbackMessages.get=function(){return this._formatFallbackMessages},nt.formatFallbackMessages.set=function(t){this._formatFallbackMessages=t},nt.missing.get=function(){return this._missing},nt.missing.set=function(t){this._missing=t},nt.formatter.get=function(){return this._formatter},nt.formatter.set=function(t){this._formatter=t},nt.silentTranslationWarn.get=function(){return this._silentTranslationWarn},nt.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},nt.silentFallbackWarn.get=function(){return this._silentFallbackWarn},nt.silentFallbackWarn.set=function(t){this._silentFallbackWarn=t},nt.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},nt.preserveDirectiveContent.set=function(t){this._preserveDirectiveContent=t},nt.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},nt.warnHtmlInMessage.set=function(t){var e=this,n=this._warnHtmlInMessage;if(this._warnHtmlInMessage=t,n!==t&&("warn"===t||"error"===t)){var r=this._getMessages();Object.keys(r).forEach(function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,r[t])})}},nt.postTranslation.get=function(){return this._postTranslation},nt.postTranslation.set=function(t){this._postTranslation=t},et.prototype._getMessages=function(){return this._vm.messages},et.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},et.prototype._getNumberFormats=function(){return this._vm.numberFormats},et.prototype._warnDefault=function(t,e,n,r,i,o){if(!l(n))return n;if(this._missing){var s=this._missing.apply(null,[t,e,r,i]);if(a(s))return s}if(this._formatFallbackMessages){var u=c.apply(void 0,i);return this._render(e,o,u.params,e)}return e},et.prototype._isFallbackRoot=function(t){return!t&&!l(this._root)&&this._fallbackRoot},et.prototype._isSilentFallbackWarn=function(t){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(t):this._silentFallbackWarn},et.prototype._isSilentFallback=function(t,e){return this._isSilentFallbackWarn(e)&&(this._isFallbackRoot()||t!==this.fallbackLocale)},et.prototype._isSilentTranslationWarn=function(t){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(t):this._silentTranslationWarn},et.prototype._interpolate=function(t,e,n,r,i,o,c){if(!e)return null;var u,h=this._path.getPathValue(e,n);if(Array.isArray(h)||s(h))return h;if(l(h)){if(!s(e))return null;if(!a(u=e[n]))return null}else{if(!a(h))return null;u=h}return(u.indexOf("@:")>=0||u.indexOf("@.")>=0)&&(u=this._link(t,e,u,r,"raw",o,c)),this._render(u,i,o,n)},et.prototype._link=function(t,e,n,r,a,i,o){var s=n,l=s.match(Z);for(var c in l)if(l.hasOwnProperty(c)){var u=l[c],f=u.match(K),p=f[0],m=f[1],_=u.replace(p,"").replace(Q,"");if(h(o,_))return s;o.push(_);var g=this._interpolate(t,e,_,r,"raw"===a?"string":a,"raw"===a?void 0:i,o);if(this._isFallbackRoot(g)){if(!this._root)throw Error("unexpected error");var v=this._root.$i18n;g=v._translate(v._getMessages(),v.locale,v.fallbackLocale,_,r,a,i)}g=this._warnDefault(t,_,g,r,Array.isArray(i)?i:[i],a),this._modifiers.hasOwnProperty(m)?g=this._modifiers[m](g):Y.hasOwnProperty(m)&&(g=Y[m](g)),o.pop(),s=g?s.replace(u,g):s}return s},et.prototype._render=function(t,e,n,r){var i=this._formatter.interpolate(t,n,r);return i||(i=tt.interpolate(t,n,r)),"string"!==e||a(i)?i:i.join("")},et.prototype._appendItemToChain=function(t,e,n){var r=!1;return h(t,e)||(r=!0,e&&(r="!"!==e[e.length-1],e=e.replace(/!/g,""),t.push(e),n&&n[e]&&(r=n[e]))),r},et.prototype._appendLocaleToChain=function(t,e,n){var r,a=e.split("-");do{var i=a.join("-");r=this._appendItemToChain(t,i,n),a.splice(-1,1)}while(a.length&&!0===r);return r},et.prototype._appendBlockToChain=function(t,e,n){for(var r=!0,i=0;i<e.length&&"boolean"==typeof r;i++){var o=e[i];a(o)&&(r=this._appendLocaleToChain(t,o,n))}return r},et.prototype._getLocaleChain=function(t,e){if(""===t)return[];this._localeChainCache||(this._localeChainCache={});var i=this._localeChainCache[t];if(!i){e||(e=this.fallbackLocale),i=[];for(var o,s=[t];n(s);)s=this._appendBlockToChain(i,s,e);(s=a(o=n(e)?e:r(e)?e.default?e.default:null:e)?[o]:o)&&this._appendBlockToChain(i,s,null),this._localeChainCache[t]=i}return i},et.prototype._translate=function(t,e,n,r,a,i,o){for(var s,c=this._getLocaleChain(e,n),u=0;u<c.length;u++){var h=c[u];if(!l(s=this._interpolate(h,t[h],r,a,i,o,[r])))return s}return null},et.prototype._t=function(t,e,n,r){for(var a,i=[],o=arguments.length-4;o-- >0;)i[o]=arguments[o+4];if(!t)return"";var s=c.apply(void 0,i),l=s.locale||e,u=this._translate(n,l,this.fallbackLocale,t,r,"string",s.params);if(this._isFallbackRoot(u)){if(!this._root)throw Error("unexpected error");return(a=this._root).$t.apply(a,[t].concat(i))}return u=this._warnDefault(l,t,u,r,i,"string"),this._postTranslation&&null!=u&&(u=this._postTranslation(u,t)),u},et.prototype.t=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this)._t.apply(e,[t,this.locale,this._getMessages(),null].concat(n))},et.prototype._i=function(t,e,n,r,a){var i=this._translate(n,e,this.fallbackLocale,t,r,"raw",a);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,a)}return this._warnDefault(e,t,i,r,[a],"raw")},et.prototype.i=function(t,e,n){return t?(a(e)||(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""},et.prototype._tc=function(t,e,n,r,a){for(var i,o=[],s=arguments.length-5;s-- >0;)o[s]=arguments[s+5];if(!t)return"";void 0===a&&(a=1);var l={count:a,n:a},u=c.apply(void 0,o);return u.params=Object.assign(l,u.params),o=null===u.locale?[u.params]:[u.locale,u.params],this.fetchChoice((i=this)._t.apply(i,[t,e,n,r].concat(o)),a)},et.prototype.fetchChoice=function(t,e){if(!t&&!a(t))return null;var n=t.split("|");return n[e=this.getChoiceIndex(e,n.length)]?n[e].trim():t},et.prototype.tc=function(t,e){for(var n,r=[],a=arguments.length-2;a-- >0;)r[a]=arguments[a+2];return(n=this)._tc.apply(n,[t,this.locale,this._getMessages(),null,e].concat(r))},et.prototype._te=function(t,e,n){for(var r=[],a=arguments.length-3;a-- >0;)r[a]=arguments[a+3];var i=c.apply(void 0,r).locale||e;return this._exist(n[i],t)},et.prototype.te=function(t,e){return this._te(t,this.locale,this._getMessages(),e)},et.prototype.getLocaleMessage=function(t){return u(this._vm.messages[t]||{})},et.prototype.setLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,e)},et.prototype.mergeLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,m({},this._vm.messages[t]||{},e))},et.prototype.getDateTimeFormat=function(t){return u(this._vm.dateTimeFormats[t]||{})},et.prototype.setDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,e),this._clearDateTimeFormat(t,e)},et.prototype.mergeDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,m(this._vm.dateTimeFormats[t]||{},e)),this._clearDateTimeFormat(t,e)},et.prototype._clearDateTimeFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._dateTimeFormatters.hasOwnProperty(r)&&delete this._dateTimeFormatters[r]}},et.prototype._localizeDateTime=function(t,e,n,r,a){for(var i=e,o=r[i],s=this._getLocaleChain(e,n),c=0;c<s.length;c++){var u=s[c];if(i=u,!l(o=r[u])&&!l(o[a]))break}if(l(o)||l(o[a]))return null;var h=o[a],f=i+"__"+a,p=this._dateTimeFormatters[f];return p||(p=this._dateTimeFormatters[f]=new Intl.DateTimeFormat(i,h)),p.format(t)},et.prototype._d=function(t,e,n){if(!n)return new Intl.DateTimeFormat(e).format(t);var r=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(t,n,e)}return r||""},et.prototype.d=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var i=this.locale,o=null;return 1===e.length?a(e[0])?o=e[0]:r(e[0])&&(e[0].locale&&(i=e[0].locale),e[0].key&&(o=e[0].key)):2===e.length&&(a(e[0])&&(o=e[0]),a(e[1])&&(i=e[1])),this._d(t,i,o)},et.prototype.getNumberFormat=function(t){return u(this._vm.numberFormats[t]||{})},et.prototype.setNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,e),this._clearNumberFormat(t,e)},et.prototype.mergeNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,m(this._vm.numberFormats[t]||{},e)),this._clearNumberFormat(t,e)},et.prototype._clearNumberFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._numberFormatters.hasOwnProperty(r)&&delete this._numberFormatters[r]}},et.prototype._getNumberFormatter=function(t,e,n,r,a,i){for(var o=e,s=r[o],c=this._getLocaleChain(e,n),u=0;u<c.length;u++){var h=c[u];if(o=h,!l(s=r[h])&&!l(s[a]))break}if(l(s)||l(s[a]))return null;var f,p=s[a];if(i)f=new Intl.NumberFormat(o,Object.assign({},p,i));else{var m=o+"__"+a;(f=this._numberFormatters[m])||(f=this._numberFormatters[m]=new Intl.NumberFormat(o,p))}return f},et.prototype._n=function(t,e,n,r){if(!et.availabilities.numberFormat)return"";if(!n)return(r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e)).format(t);var a=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),i=a&&a.format(t);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.n(t,Object.assign({},{key:n,locale:e},r))}return i||""},et.prototype.n=function(e){for(var n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];var o=this.locale,s=null,l=null;return 1===n.length?a(n[0])?s=n[0]:r(n[0])&&(n[0].locale&&(o=n[0].locale),n[0].key&&(s=n[0].key),l=Object.keys(n[0]).reduce(function(e,r){var a;return h(t,r)?Object.assign({},e,((a={})[r]=n[0][r],a)):e},null)):2===n.length&&(a(n[0])&&(s=n[0]),a(n[1])&&(o=n[1])),this._n(e,o,s,l)},et.prototype._ntp=function(t,e,n,r){if(!et.availabilities.numberFormat)return[];if(!n)return(r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e)).formatToParts(t);var a=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),i=a&&a.formatToParts(t);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,r)}return i||[]},Object.defineProperties(et.prototype,nt),Object.defineProperty(et,"availabilities",{get:function(){if(!G){var t="undefined"!=typeof Intl;G={dateTimeFormat:t&&void 0!==Intl.DateTimeFormat,numberFormat:t&&void 0!==Intl.NumberFormat}}return G}}),et.install=I,et.version="8.20.0",et},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueI18n=e(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <span> |
| | | <u-tag :text="item.label" mode="plain" v-for="(item, idx) in options.items" :key="idx" |
| | | v-if="item.value === value"/> |
| | | </span> |
| | | </template> |
| | | <script> |
| | | |
| | | export default { |
| | | props: { |
| | | value: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | dictType: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | items: { |
| | | type: Array, |
| | | default() { |
| | | return []; |
| | | } |
| | | }, |
| | | itemLabel: { |
| | | type: String, |
| | | default: 'name' |
| | | }, |
| | | itemValue: { |
| | | type: String, |
| | | default: 'value' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: { |
| | | value: this.value, |
| | | items: this.items |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | value(val, oldVal) { |
| | | this.options.value = val; |
| | | }, |
| | | items(val, oldVal) { |
| | | this.options.items = val; |
| | | } |
| | | }, |
| | | created() { |
| | | this.loadData(); |
| | | }, |
| | | methods: { |
| | | loadData() { |
| | | console.log("==", this.value) |
| | | if (this.dictType != '') { |
| | | this.$u.api.dictData({dictType: this.dictType}).then(res => { |
| | | if (typeof res === 'object' && res.result === 'login') { |
| | | return; |
| | | } |
| | | this.options.items = res.data; |
| | | }); |
| | | } else { |
| | | this.options.items = this.items; |
| | | } |
| | | }, |
| | | change(val) { |
| | | this.$emit('input', val); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-flex-1"> |
| | | <u-checkbox-group :disabled="disabled" @change="change"> |
| | | <u-checkbox v-model="item.checked" v-for="(item, index) in options.items" :key="index" |
| | | :name="item[itemValue]">{{item[itemLabel]}}</u-checkbox> |
| | | </u-checkbox-group> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | /** |
| | | * å¤éæ¡ç»ä»¶ {{item[itemLabel]}} |
| | | * @property {Object} value ç¨äºååç»å®éæ©æ¡çå¼ï¼è¿åéæ©æ¡ç Value |
| | | * @property {Boolean} disabled æ¯å¦ç¦ç¨æ¨¡å¼ï¼æ¯å¦åªè¯»æ¨¡å¼ |
| | | * @property {String} dictType åå
¸ç±»åï¼ä»åå
¸éè·åï¼èªå¨è®¾ç½® itemsãitemLabelãitemValue |
| | | * @property {String} items åè¡¨æ°æ®ï¼å¯æ¥å对象éåï¼å¦ï¼[{name: 'æ¯', value: 'å¦'}] |
| | | * @property {String} itemLabel æå®åè¡¨æ°æ®ä¸çä»ä¹å±æ§åä½ä¸º option çæ ç¾åï¼å¦ name |
| | | * @property {String} itemValue æå®åè¡¨æ°æ®ä¸çä»ä¹å±æ§åä½ä¸º option ç value å¼ï¼å¦ value |
| | | * @example <js-select v-model="model.type" dict-type="sys_yes_no"></js-select> |
| | | * @description Copyright (c) 2013-Now http://jeesite.com All rights reserved. |
| | | * @author ThinkGem |
| | | * @version 2021-3-11 |
| | | */ |
| | | export default { |
| | | props: { |
| | | value: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | dictType: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | items: { |
| | | type: Array, |
| | | default() { |
| | | return []; |
| | | } |
| | | }, |
| | | itemLabel: { |
| | | type: String, |
| | | default: 'label' |
| | | }, |
| | | itemValue: { |
| | | type: String, |
| | | default: 'value' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: { |
| | | value: (this.value && this.value.split(',')) || [], |
| | | items: this.items |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | value(val, oldVal) { |
| | | this.options.value = (val && val.split(',')) || []; |
| | | this.loadData(); |
| | | }, |
| | | items(val, oldVal){ |
| | | this.options.items = val; |
| | | this.loadData(); |
| | | } |
| | | }, |
| | | methods: { |
| | | loadData(){ |
| | | if (this.dictType != ''){ |
| | | this.$u.api.dictData({dictType: this.dictType}).then(res => { |
| | | // this.options.items = res; |
| | | this.selectValue(res.data); |
| | | }); |
| | | }else{ |
| | | // this.options.items = this.items; |
| | | this.selectValue(this.items); |
| | | } |
| | | }, |
| | | selectValue(items){ |
| | | // 微信å°ç¨åºï¼éè¦å»¶è¿ä¸ï¼å¦åè·åä¸ value å¯¼è´æ æ³åæ¾æ°æ® |
| | | this.$nextTick(() => { |
| | | let vals = this.options.value; |
| | | for (let i in items){ |
| | | this.$set(items[i],'checked',vals.includes(items[i][this.itemValue])) |
| | | } |
| | | this.options.items = items; |
| | | }); |
| | | }, |
| | | change(val, name){ |
| | | this.$emit('input', (val && val.join(',')) || ''); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view v-if="showBtn" class="js-lang" @tap="switchLang"> |
| | | <u-icon size="46" color="warning" :name="lang"></u-icon> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | /** |
| | | * è¯è¨åæ¢ç»ä»¶ |
| | | * @property {String} title é¡¶é¨å¯¼èªçæ é¢ i18n ç¼ç |
| | | * @property {Boolean} showBtn æ¯å¦æ¾ç¤ºè¯è¨åæ¢æé® |
| | | * @example <js-lang title="login.title" :showBtn="true"></js-lang> |
| | | * @description Copyright (c) 2013-Now http://jeesite.com All rights reserved. |
| | | * @author ThinkGem |
| | | * @version 2021-3-11 |
| | | */ |
| | | export default { |
| | | props: { |
| | | title: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | showBtn: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | computed: { |
| | | lang() { |
| | | return this.$i18n.locale == 'zh_CN' ? 'zh' : 'en'; |
| | | } |
| | | }, |
| | | created(){ |
| | | this.setBarTitle(); |
| | | }, |
| | | methods: { |
| | | switchLang() { |
| | | this.$i18n.locale = this.$i18n.locale == 'zh_CN' ? 'en' : 'zh_CN'; |
| | | this.$u.vuex('vuex_locale', this.$i18n.locale); |
| | | this.$u.api.lang({lang: this.vuex_locale}); |
| | | this.setBarTitle(); |
| | | }, |
| | | setBarTitle (){ |
| | | uni.setNavigationBarTitle({ |
| | | title: this.$t(this.title) |
| | | }); |
| | | uni.setTabBarItem({ |
| | | index: 0, |
| | | text: this.$t('nav.log') |
| | | }); |
| | | uni.setTabBarItem({ |
| | | index: 1, |
| | | text: this.$t('nav.home') |
| | | }); |
| | | uni.setTabBarItem({ |
| | | index: 2, |
| | | text: this.$t('nav.user') |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .js-lang { |
| | | position: absolute; |
| | | z-index: 10000; |
| | | top: 15px; |
| | | right: 15px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-flex-1"> |
| | | <u-radio-group v-model="options.value" :disabled="disabled" @change="change"> |
| | | <u-radio v-for="(item, index) in options.items" :key="index" |
| | | :name="item[itemValue]">{{item[itemLabel]}}</u-radio> |
| | | </u-radio-group> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | /** |
| | | * åéæ¡ç»ä»¶ |
| | | * @property {Object} value ç¨äºååç»å®éæ©æ¡çå¼ï¼è¿åéæ©æ¡ç Value |
| | | * @property {Boolean} disabled æ¯å¦ç¦ç¨æ¨¡å¼ï¼æ¯å¦åªè¯»æ¨¡å¼ |
| | | * @property {String} dictType åå
¸ç±»åï¼ä»åå
¸éè·åï¼èªå¨è®¾ç½® itemsãitemLabelãitemValue |
| | | * @property {String} items åè¡¨æ°æ®ï¼å¯æ¥å对象éåï¼å¦ï¼[{name: 'æ¯', value: 'å¦'}] |
| | | * @property {String} itemLabel æå®åè¡¨æ°æ®ä¸çä»ä¹å±æ§åä½ä¸º option çæ ç¾åï¼å¦ name |
| | | * @property {String} itemValue æå®åè¡¨æ°æ®ä¸çä»ä¹å±æ§åä½ä¸º option ç value å¼ï¼å¦ value |
| | | * @example <js-radio v-model="model.type" dict-type="sys_yes_no"></js-radio> |
| | | * @description Copyright (c) 2013-Now http://jeesite.com All rights reserved. |
| | | * @author ThinkGem |
| | | * @version 2021-3-11 |
| | | */ |
| | | export default { |
| | | props: { |
| | | value: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | dictType: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | items: { |
| | | type: Array, |
| | | default() { |
| | | return []; |
| | | } |
| | | }, |
| | | itemLabel: { |
| | | type: String, |
| | | default: 'label' |
| | | }, |
| | | itemValue: { |
| | | type: String, |
| | | default: 'value' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: { |
| | | value: this.value, |
| | | items: this.items |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | value(val, oldVal) { |
| | | this.options.value = val; |
| | | }, |
| | | items(val, oldVal){ |
| | | this.options.items = val; |
| | | } |
| | | }, |
| | | created() { |
| | | this.loadData(); |
| | | }, |
| | | methods: { |
| | | loadData(){ |
| | | if (this.dictType != ''){ |
| | | this.$u.api.dictData({dictType: this.dictType}).then(res => { |
| | | if (typeof res === 'object' && res.result === 'login'){ |
| | | return; |
| | | } |
| | | this.options.items = res.data; |
| | | }); |
| | | }else{ |
| | | this.options.items = this.items; |
| | | } |
| | | }, |
| | | change(val){ |
| | | // console.log(val); |
| | | this.$emit('input', val); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-flex-1"> |
| | | <u-radio-group v-model="options.value" :disabled="disabled" @change="change"> |
| | | <u-radio v-for="(item, index) in options.items" :key="index" |
| | | :name="item[itemValue]">{{item[itemLabel]}}</u-radio> |
| | | </u-radio-group> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | /** |
| | | * åéæ¡ç»ä»¶ |
| | | * @property {Object} value ç¨äºååç»å®éæ©æ¡çå¼ï¼è¿åéæ©æ¡ç Value |
| | | * @property {Boolean} disabled æ¯å¦ç¦ç¨æ¨¡å¼ï¼æ¯å¦åªè¯»æ¨¡å¼ |
| | | * @property {String} dictType åå
¸ç±»åï¼ä»åå
¸éè·åï¼èªå¨è®¾ç½® itemsãitemLabelãitemValue |
| | | * @property {String} items åè¡¨æ°æ®ï¼å¯æ¥å对象éåï¼å¦ï¼[{name: 'æ¯', value: 'å¦'}] |
| | | * @property {String} itemLabel æå®åè¡¨æ°æ®ä¸çä»ä¹å±æ§åä½ä¸º option çæ ç¾åï¼å¦ name |
| | | * @property {String} itemValue æå®åè¡¨æ°æ®ä¸çä»ä¹å±æ§åä½ä¸º option ç value å¼ï¼å¦ value |
| | | * @example <js-radio v-model="model.type" dict-type="sys_yes_no"></js-radio> |
| | | * @description Copyright (c) 2013-Now http://jeesite.com All rights reserved. |
| | | * @author ThinkGem |
| | | * @version 2021-3-11 |
| | | */ |
| | | export default { |
| | | props: { |
| | | value: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | dictType: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | items: { |
| | | type: Array, |
| | | default() { |
| | | return []; |
| | | } |
| | | }, |
| | | itemLabel: { |
| | | type: String, |
| | | default: 'label' |
| | | }, |
| | | itemValue: { |
| | | type: String, |
| | | default: 'value' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: { |
| | | value: this.value, |
| | | items: this.items |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | value(val, oldVal) { |
| | | this.options.value = val; |
| | | }, |
| | | items(val, oldVal){ |
| | | this.options.items = val; |
| | | } |
| | | }, |
| | | created() { |
| | | this.loadData(); |
| | | }, |
| | | methods: { |
| | | loadData(){ |
| | | if (this.dictType != ''){ |
| | | this.$u.api.dictData({dictType: this.dictType}).then(res => { |
| | | if (typeof res === 'object' && res.result === 'login'){ |
| | | return; |
| | | } |
| | | this.options.items = res.data; |
| | | }); |
| | | }else{ |
| | | this.options.items = this.items; |
| | | } |
| | | }, |
| | | change(val){ |
| | | // console.log(val); |
| | | this.$emit('input', val); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="u-flex-1"> |
| | | <u-upload width="160" height="160" ref="uUpload" |
| | | :action="options.action" |
| | | :header="options.header" |
| | | :form-data="options.formData" |
| | | :name="options.name" |
| | | :max-count="maxCount" |
| | | :auto-upload="true" |
| | | :deletable="deletable" |
| | | :before-upload="beforeUpload" |
| | | @on-success="uploadSuccess" |
| | | @on-uploaded="uploadUploaded" |
| | | :before-remove="beforeRemove" |
| | | @on-remove="uploadRemove" |
| | | ></u-upload> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import SparkMD5 from '@/common/spark-md5.js'; |
| | | /** |
| | | * æä»¶ä¸ä¼ ç»ä»¶ç»ä»¶ |
| | | * @property {Object} value ä½¿ç¨ v-model="this.model" æå®è¡¨åç model 对象ï¼åæ¾æä»¶ä¸ä¼ ç¼å·ä¿¡æ¯ï¼ |
| | | * @property {String} bizKey ä¸å¡è¡¨ç主é®å¼ï¼ä¸éä»¶å
³èçä¸å¡æ°æ®ï¼ãå¯éã妿ä¸è®¾ç½®ï¼åè·å value.id ä½ä¸ºä¸»é® |
| | | * @property {String} bizType ä¸å¡è¡¨çä¸ä¼ ç±»åï¼å
¨ç½å¯ä¸ï¼æ¨èæ ¼å¼ï¼å®ä½å_ä¸ä¼ ç±»åï¼ä¾å¦ï¼æè§åé¦å¾çï¼appComment_imageï¼ |
| | | * @property {String} uploadType ä¸ä¼ æä»¶ç±»åï¼imageï¼ç®åç§»å¨ç«¯ä»
æ¯æä¸ä¼ å¾ç |
| | | * @property {String} imageMaxWidth å¾çåç¼©ï¼æå¤§å®½åº¦ï¼uploadType为imageçæï¼ï¼è®¾ç½®-1代表ä¸åä»»ä½å¤ç |
| | | * @property {String} imageMaxHeight å¾çåç¼©ï¼æå¤§å®½åº¦ï¼uploadType为imageçæï¼ï¼è®¾ç½®-1代表ä¸åä»»ä½å¤ç |
| | | * @property {String} maxCount æå¤§ä¸ä¼ 个æ°ï¼é»è®¤ 52 个ï¼å¦æè®¾ç½®ä¸º 0 å¯ä»¥å½åãåªè¯»æ¨¡å¼ãä½¿ç¨ |
| | | * @example <js-uploadfile v-model="model.otherData" :biz-key="model.id" biz-type="testData_image"></js-uploadfile> |
| | | * @description Copyright (c) 2013-Now http://jeesite.com All rights reserved. |
| | | * @author ThinkGem |
| | | * @version 2021-3-11 |
| | | */ |
| | | export default { |
| | | props: { |
| | | value: { |
| | | type: Object, |
| | | default() { |
| | | return {} |
| | | } |
| | | }, |
| | | bizKey: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | bizType: { |
| | | type: String, |
| | | default: 'images' |
| | | }, |
| | | uploadType: { |
| | | type: String, |
| | | default: 'image' |
| | | }, |
| | | imageMaxWidth: { |
| | | type: [String, Number], |
| | | default: 1024 |
| | | }, |
| | | imageMaxHeight: { |
| | | type: [String, Number], |
| | | default: 768 |
| | | }, |
| | | maxCount: { |
| | | type: [String, Number], |
| | | default: 52 |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | options: { |
| | | value: {}, |
| | | action: '', |
| | | header: {}, |
| | | formData: { |
| | | fileMd5: '', |
| | | fileName: '', |
| | | bizKey: this.bizKey || (this.value && this.value.id) || '', |
| | | bizType: this.bizType, |
| | | uploadType: this.uploadType, |
| | | imageMaxWidth: this.imageMaxWidth, |
| | | imageMaxHeight: this.imageMaxHeight |
| | | }, |
| | | name: 'file', |
| | | // æä»¶ä¸ä¼ ç id æ°ç» |
| | | fileUploadIds: [], |
| | | // æä»¶å é¤ç id æ°ç» |
| | | fileUploadDelIds: [] |
| | | }, |
| | | deletable: true |
| | | }; |
| | | }, |
| | | watch: { |
| | | value(val, oldVal) { |
| | | this.options.value = val; |
| | | }, |
| | | maxCount(val, oldVal) { |
| | | this.refreshStatus(); |
| | | }, |
| | | bizKey(val, oldVal) { |
| | | this.options.formData.bizKey = val; |
| | | this.loadData(); |
| | | } |
| | | }, |
| | | created() { |
| | | this.refreshStatus(); |
| | | this.options.action = this.vuex_config.baseUrl + this.vuex_config.adminPath + '/file/upload'; |
| | | this.options.formData = Object.assign(this.options.formData, this.formData); |
| | | this.loadData(); |
| | | }, |
| | | methods: { |
| | | // å·æ°æ¯å¦åªè¯»ç¶æ |
| | | refreshStatus(){ |
| | | if (this.maxCount <= 0){ |
| | | this.deletable = false; |
| | | } |
| | | }, |
| | | // å·²ä¸ä¼ çæä»¶åæ¾å°ä¸ä¼ ç»ä»¶ |
| | | loadData(){ |
| | | if (this.options.formData.bizKey != ''){ |
| | | let baseUrl = this.vuex_config.baseUrl; |
| | | let adminPath = this.vuex_config.adminPath; |
| | | this.$u.post(adminPath + '/file/fileList', { |
| | | bizKey: this.options.formData.bizKey, |
| | | bizType: this.options.formData.bizType, |
| | | }).then(res => { |
| | | let lists = []; |
| | | if (!(typeof res === 'object' && (res.result === 'login' || res.result === 'false'))){ |
| | | for (let i in res){ |
| | | let f = res[i]; |
| | | lists.push({ |
| | | url: baseUrl + f.fileUrl, |
| | | fileUploadId: f.id, |
| | | progress: 100, |
| | | error: false |
| | | }); |
| | | } |
| | | } |
| | | // console.log(lists) |
| | | this.$refs.uUpload.lists = lists; |
| | | this.uploadRefreshIds(lists); |
| | | }); |
| | | } |
| | | }, |
| | | // ä¸ä¼ ä¹åï¼éªè¯ç§ä¼ ãæ¯å¦ç»§ç»ä¸ä¼ ç |
| | | beforeUpload(index, lists) { |
| | | let self = this; |
| | | let item = lists[index]; |
| | | let upload = this.upload; |
| | | let formData = this.options.formData; |
| | | let baseUrl = this.vuex_config.baseUrl; |
| | | let adminPath = this.vuex_config.adminPath; |
| | | self.$u.http.interceptor.request(this.options); |
| | | return new Promise((resolve, reject) => { |
| | | try{ |
| | | function uploadFile(arrayBuffer){ |
| | | let buffer = arrayBuffer; |
| | | let size = 10 * 1024 * 1024; |
| | | let spark = new SparkMD5.ArrayBuffer(); |
| | | if (buffer.byteLength > size){ |
| | | spark.append(buffer.slice(0, size));; |
| | | }else{ |
| | | spark.append(buffer); |
| | | } |
| | | formData.fileEntityId = ''; |
| | | formData.fileUploadId = ''; |
| | | formData.fileMd5 = spark.end(); |
| | | if (!item.file.name) { |
| | | item.file.name = item.url.split('/').pop(); |
| | | } |
| | | formData.fileName = item.file.name; |
| | | // console.log('formData' + JSON.stringify(formData)); |
| | | self.$u.post(adminPath + '/file/upload', formData).then(res => { |
| | | // console.log(res) |
| | | // æä»¶å·²ç»ä¸ä¼ ï¼å¯ç¨ç§ä¼ |
| | | if (res.result == 'true' && res.fileUpload){ |
| | | item.fileUploadId = res.fileUpload.id; |
| | | item.progress = 100; |
| | | item.error = false; |
| | | reject(res); |
| | | } |
| | | // æä»¶æªä¸ä¼ è¿ï¼ç»§ç»ä¸ä¼ æä»¶ |
| | | else if (res.fileUploadId && res.fileEntityId){ |
| | | formData.fileUploadId = res.fileUploadId; |
| | | formData.fileEntityId = res.fileEntityId; |
| | | item.fileUploadId = res.fileUploadId; |
| | | resolve(); |
| | | } |
| | | // æªç¥éè¯¯ï¼æç¤ºæå¡ç«¯è¿åçä¿¡æ¯ |
| | | else { |
| | | uni.showModal({title: 'æç¤º', content: res.message }); |
| | | reject(res); |
| | | } |
| | | }).catch(err => { |
| | | console.error(err); |
| | | reject(err); |
| | | }) |
| | | } |
| | | // #ifdef APP-PLUS |
| | | plus.io.requestFileSystem(plus.io.PRIVATE_WWW, function(fs){ |
| | | fs.root.getFile(item.url, {create: false}, function(fileEntry){ |
| | | fileEntry.file(function(file){ |
| | | // console.log("getFile:" + JSON.stringify(file)) |
| | | item.file.name = file.name; |
| | | var fileReader = new plus.io.FileReader(); |
| | | fileReader.readAsText(file, 'utf-8'); |
| | | fileReader.onloadend = function(evt) { |
| | | uploadFile(evt.target.result); |
| | | } |
| | | fileReader.onerror = function(error) { |
| | | reject(error); |
| | | } |
| | | }, reject); |
| | | }, reject); |
| | | } ); |
| | | // #endif |
| | | // #ifdef MP |
| | | uni.getFileSystemManager().readFile({ |
| | | filePath: item.url, |
| | | success(res) { |
| | | // console.log(res) |
| | | uploadFile(res.data); |
| | | }, |
| | | fail(res) { |
| | | reject(res); |
| | | } |
| | | }) |
| | | // #endif |
| | | // #ifdef H5 |
| | | uni.request({ |
| | | url: item.url, |
| | | responseType: 'arraybuffer', |
| | | complete: res => { |
| | | // console.log(res) |
| | | if (res.statusCode == 200) { |
| | | uploadFile(res.data); |
| | | }else{ |
| | | reject(res); |
| | | } |
| | | } |
| | | }) |
| | | // #endif |
| | | }catch(err){ |
| | | console.error(err); |
| | | reject(err); |
| | | } |
| | | }) |
| | | }, |
| | | // ä¸ä¼ æåä¸ä¸ªï¼å°±åè¿ fileUploadIds |
| | | uploadSuccess(data, index, lists, name){ |
| | | let item = lists[index]; |
| | | if (item.response && item.response.fileUpload) { |
| | | item.fileUploadId = item.response.fileUpload.id; |
| | | } |
| | | this.options.fileUploadIds.push(item.fileUploadId); |
| | | }, |
| | | // å
¨é¨ä¸ä¼ åï¼å·æ° fileUploadIdsãfileUploadDelIds |
| | | uploadUploaded(lists, name) { |
| | | this.uploadRefreshIds(lists); |
| | | }, |
| | | // ç§»é¤ä¹åè·åå é¤ç fileUploadIdï¼åè¿ fileUploadDelIds |
| | | beforeRemove(index, lists){ |
| | | let item = lists[index]; |
| | | if (item.fileUploadId){ |
| | | this.options.fileUploadDelIds.push(item.fileUploadId); |
| | | } |
| | | return true; |
| | | }, |
| | | // ç§»é¤ä¹åï¼å·æ° fileUploadIdsãfileUploadDelIds |
| | | uploadRemove(index, lists){ |
| | | this.uploadRefreshIds(lists); |
| | | }, |
| | | // å·æ° fileUploadIdsãfileUploadDelIds |
| | | uploadRefreshIds(lists, name) { |
| | | let fileUploadIds = []; |
| | | lists.forEach(item => { |
| | | if (item.fileUploadId && item.progress == 100){ |
| | | fileUploadIds.push(item.fileUploadId); |
| | | } |
| | | }); |
| | | this.options.fileUploadIds = fileUploadIds; |
| | | // console.log('fileUploadIds', this.options.fileUploadIds) |
| | | // console.log('fileUploadDelIds', this.options.fileUploadDelIds) |
| | | // å°ä¸ä¼ åå é¤ç id åä¼ ç» model |
| | | let formData = this.options.formData; |
| | | let fileParams = this.options.value || {}; |
| | | fileParams[formData.bizType] = this.options.fileUploadIds.join(','); |
| | | fileParams[formData.bizType+'__del'] = this.options.fileUploadDelIds.join(','); |
| | | this.options.value = fileParams; |
| | | this.$emit('input', Object.assign(this.options.value, this.value)); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <view class="content"> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | var main, receiver, filter; |
| | | var action, extraKey; |
| | | var _codeQueryTag = false; |
| | | export default { |
| | | data() { |
| | | return { |
| | | scanCode: '' |
| | | } |
| | | }, |
| | | created: function(option) { |
| | | uni.getSystemInfo({ |
| | | success: (res) => { |
| | | var brand = res.brand.toUpperCase(); |
| | | var model = res.model.toUpperCase(); |
| | | if (brand.indexOf("ZEBRA")!=-1 && model.indexOf("TC2")!=-1) { |
| | | action = "com.zebra.scan"; |
| | | extraKey = "com.motorolasolutions.emdk.datawedge.data_string"; |
| | | } else if (brand.indexOf("SEUIC")!=-1||brand.indexOf("AUTOID")!=-1) { |
| | | action = "com.android.server.scannerservice.broadcast"; |
| | | extraKey = "scannerdata"; |
| | | }else{ |
| | | return; |
| | | } |
| | | console.log(action); |
| | | console.log(extraKey); |
| | | this.initScan() |
| | | this.startScan(); |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | }, |
| | | onHide: function() { |
| | | this.stopScan(); |
| | | }, |
| | | destroyed: function() { |
| | | this.stopScan(); |
| | | }, |
| | | methods: { |
| | | initScan() { |
| | | console.log('initScan'); |
| | | let _this = this; |
| | | main = plus.android.runtimeMainActivity(); //è·åactivity |
| | | var IntentFilter = plus.android.importClass('android.content.IntentFilter'); |
| | | filter = new IntentFilter(); |
| | | //ä¸é¢çaddActionå
æ¹ä¸ºèªå·±ç广æå¨ä½ |
| | | filter.addAction(action); |
| | | receiver = plus.android.implements('io.dcloud.feature.internal.reflect.BroadcastReceiver', { |
| | | onReceive: function(context, intent) { |
| | | console.log('onReceive'); |
| | | plus.android.importClass(intent); |
| | | //ä¸é¢çgetStringExtraå
æ¹ä¸ºèªå·±çå¹¿ææ ç¾--æè¯¯ |
| | | let code = intent.getStringExtra(extraKey); |
| | | _this.queryCode(code); |
| | | } |
| | | }); |
| | | }, |
| | | startScan() { |
| | | console.log('startScan'); |
| | | main.registerReceiver(receiver, filter); |
| | | }, |
| | | stopScan() { |
| | | console.log('stopScan'); |
| | | main.unregisterReceiver(receiver); |
| | | }, |
| | | queryCode: function(code) { |
| | | console.log('queryCode'); |
| | | if (_codeQueryTag) return false; |
| | | _codeQueryTag = true; |
| | | setTimeout(function() { |
| | | _codeQueryTag = false; |
| | | }, 150); |
| | | var id = code |
| | | uni.$emit('scan', { |
| | | code: id |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | let QRCode = {}; |
| | | (function () { |
| | | /** |
| | | * è·åå个å符çutf8ç¼ç |
| | | * unicode BMPå¹³é¢çº¦65535个å符 |
| | | * @param {num} code |
| | | * return {array} |
| | | */ |
| | | function unicodeFormat8(code) { |
| | | // 1 byte |
| | | var c0, c1, c2; |
| | | if (code < 128) { |
| | | return [code]; |
| | | // 2 bytes |
| | | } else if (code < 2048) { |
| | | c0 = 192 + (code >> 6); |
| | | c1 = 128 + (code & 63); |
| | | return [c0, c1]; |
| | | // 3 bytes |
| | | } else { |
| | | c0 = 224 + (code >> 12); |
| | | c1 = 128 + (code >> 6 & 63); |
| | | c2 = 128 + (code & 63); |
| | | return [c0, c1, c2]; |
| | | } |
| | | } |
| | | /** |
| | | * è·åå符串çutf8ç¼ç åè串 |
| | | * @param {string} string |
| | | * @return {array} |
| | | */ |
| | | function getUTF8Bytes(string) { |
| | | var utf8codes = []; |
| | | for (var i = 0; i < string.length; i++) { |
| | | var code = string.charCodeAt(i); |
| | | var utf8 = unicodeFormat8(code); |
| | | for (var j = 0; j < utf8.length; j++) { |
| | | utf8codes.push(utf8[j]); |
| | | } |
| | | } |
| | | return utf8codes; |
| | | } |
| | | /** |
| | | * äºç»´ç ç®æ³å®ç° |
| | | * @param {string} data è¦ç¼ç çä¿¡æ¯å符串 |
| | | * @param {num} errorCorrectLevel çº éç级 |
| | | */ |
| | | function QRCodeAlg(data, errorCorrectLevel) { |
| | | this.typeNumber = -1; //çæ¬ |
| | | this.errorCorrectLevel = errorCorrectLevel; |
| | | this.modules = null; //äºç»´ç©éµï¼åæ¾æç»ç»æ |
| | | this.moduleCount = 0; //ç©éµå¤§å° |
| | | this.dataCache = null; //æ°æ®ç¼å |
| | | this.rsBlocks = null; //çæ¬æ°æ®ä¿¡æ¯ |
| | | this.totalDataCount = -1; //å¯ä½¿ç¨çæ°æ®é |
| | | this.data = data; |
| | | this.utf8bytes = getUTF8Bytes(data); |
| | | this.make(); |
| | | } |
| | | QRCodeAlg.prototype = { |
| | | constructor: QRCodeAlg, |
| | | /** |
| | | * è·åäºç»´ç ç©éµå¤§å° |
| | | * @return {num} ç©éµå¤§å° |
| | | */ |
| | | getModuleCount: function () { |
| | | return this.moduleCount; |
| | | }, |
| | | /** |
| | | * ç¼ç |
| | | */ |
| | | make: function () { |
| | | this.getRightType(); |
| | | this.dataCache = this.createData(); |
| | | this.createQrcode(); |
| | | }, |
| | | /** |
| | | * 设置äºä½ç©éµåè½å¾å½¢ |
| | | * @param {bool} test 表示æ¯å¦å¨å¯»æ¾æå¥½æ©èé¶æ®µ |
| | | * @param {num} maskPattern æ©èççæ¬ |
| | | */ |
| | | makeImpl: function (maskPattern) { |
| | | this.moduleCount = this.typeNumber * 4 + 17; |
| | | this.modules = new Array(this.moduleCount); |
| | | for (var row = 0; row < this.moduleCount; row++) { |
| | | this.modules[row] = new Array(this.moduleCount); |
| | | } |
| | | this.setupPositionProbePattern(0, 0); |
| | | this.setupPositionProbePattern(this.moduleCount - 7, 0); |
| | | this.setupPositionProbePattern(0, this.moduleCount - 7); |
| | | this.setupPositionAdjustPattern(); |
| | | this.setupTimingPattern(); |
| | | this.setupTypeInfo(true, maskPattern); |
| | | if (this.typeNumber >= 7) { |
| | | this.setupTypeNumber(true); |
| | | } |
| | | this.mapData(this.dataCache, maskPattern); |
| | | }, |
| | | /** |
| | | * 设置äºç»´ç çä½ç½®æ¢æµå¾å½¢ |
| | | * @param {num} row æ¢æµå¾å½¢çä¸å¿æ¨ªåæ |
| | | * @param {num} col æ¢æµå¾å½¢çä¸å¿çºµåæ |
| | | */ |
| | | setupPositionProbePattern: function (row, col) { |
| | | for (var r = -1; r <= 7; r++) { |
| | | if (row + r <= -1 || this.moduleCount <= row + r) continue; |
| | | for (var c = -1; c <= 7; c++) { |
| | | if (col + c <= -1 || this.moduleCount <= col + c) continue; |
| | | if ((0 <= r && r <= 6 && (c == 0 || c == 6)) || (0 <= c && c <= 6 && (r == 0 || r == 6)) || (2 <= r && r <= 4 && 2 <= c && c <= 4)) { |
| | | this.modules[row + r][col + c] = true; |
| | | } else { |
| | | this.modules[row + r][col + c] = false; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | /** |
| | | * å建äºç»´ç |
| | | * @return {[type]} [description] |
| | | */ |
| | | createQrcode: function () { |
| | | var minLostPoint = 0; |
| | | var pattern = 0; |
| | | var bestModules = null; |
| | | for (var i = 0; i < 8; i++) { |
| | | this.makeImpl(i); |
| | | var lostPoint = QRUtil.getLostPoint(this); |
| | | if (i == 0 || minLostPoint > lostPoint) { |
| | | minLostPoint = lostPoint; |
| | | pattern = i; |
| | | bestModules = this.modules; |
| | | } |
| | | } |
| | | this.modules = bestModules; |
| | | this.setupTypeInfo(false, pattern); |
| | | if (this.typeNumber >= 7) { |
| | | this.setupTypeNumber(false); |
| | | } |
| | | }, |
| | | /** |
| | | * 设置å®ä½å¾å½¢ |
| | | * @return {[type]} [description] |
| | | */ |
| | | setupTimingPattern: function () { |
| | | for (var r = 8; r < this.moduleCount - 8; r++) { |
| | | if (this.modules[r][6] != null) { |
| | | continue; |
| | | } |
| | | this.modules[r][6] = (r % 2 == 0); |
| | | if (this.modules[6][r] != null) { |
| | | continue; |
| | | } |
| | | this.modules[6][r] = (r % 2 == 0); |
| | | } |
| | | }, |
| | | /** |
| | | * è®¾ç½®ç«æ£å¾å½¢ |
| | | * @return {[type]} [description] |
| | | */ |
| | | setupPositionAdjustPattern: function () { |
| | | var pos = QRUtil.getPatternPosition(this.typeNumber); |
| | | for (var i = 0; i < pos.length; i++) { |
| | | for (var j = 0; j < pos.length; j++) { |
| | | var row = pos[i]; |
| | | var col = pos[j]; |
| | | if (this.modules[row][col] != null) { |
| | | continue; |
| | | } |
| | | for (var r = -2; r <= 2; r++) { |
| | | for (var c = -2; c <= 2; c++) { |
| | | if (r == -2 || r == 2 || c == -2 || c == 2 || (r == 0 && c == 0)) { |
| | | this.modules[row + r][col + c] = true; |
| | | } else { |
| | | this.modules[row + r][col + c] = false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | /** |
| | | * è®¾ç½®çæ¬ä¿¡æ¯ï¼7以ä¸çæ¬ææï¼ |
| | | * @param {bool} test æ¯å¦å¤äºå¤ææä½³æ©èé¶æ®µ |
| | | * @return {[type]} [description] |
| | | */ |
| | | setupTypeNumber: function (test) { |
| | | var bits = QRUtil.getBCHTypeNumber(this.typeNumber); |
| | | for (var i = 0; i < 18; i++) { |
| | | var mod = (!test && ((bits >> i) & 1) == 1); |
| | | this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod; |
| | | this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod; |
| | | } |
| | | }, |
| | | /** |
| | | * è®¾ç½®æ ¼å¼ä¿¡æ¯ï¼çº éççº§åæ©èçæ¬ï¼ |
| | | * @param {bool} test |
| | | * @param {num} maskPattern æ©èçæ¬ |
| | | * @return {} |
| | | */ |
| | | setupTypeInfo: function (test, maskPattern) { |
| | | var data = (QRErrorCorrectLevel[this.errorCorrectLevel] << 3) | maskPattern; |
| | | var bits = QRUtil.getBCHTypeInfo(data); |
| | | // vertical |
| | | for (var i = 0; i < 15; i++) { |
| | | var mod = (!test && ((bits >> i) & 1) == 1); |
| | | if (i < 6) { |
| | | this.modules[i][8] = mod; |
| | | } else if (i < 8) { |
| | | this.modules[i + 1][8] = mod; |
| | | } else { |
| | | this.modules[this.moduleCount - 15 + i][8] = mod; |
| | | } |
| | | // horizontal |
| | | var mod = (!test && ((bits >> i) & 1) == 1); |
| | | if (i < 8) { |
| | | this.modules[8][this.moduleCount - i - 1] = mod; |
| | | } else if (i < 9) { |
| | | this.modules[8][15 - i - 1 + 1] = mod; |
| | | } else { |
| | | this.modules[8][15 - i - 1] = mod; |
| | | } |
| | | } |
| | | // fixed module |
| | | this.modules[this.moduleCount - 8][8] = (!test); |
| | | }, |
| | | /** |
| | | * æ°æ®ç¼ç |
| | | * @return {[type]} [description] |
| | | */ |
| | | createData: function () { |
| | | var buffer = new QRBitBuffer(); |
| | | var lengthBits = this.typeNumber > 9 ? 16 : 8; |
| | | buffer.put(4, 4); //æ·»å æ¨¡å¼ |
| | | buffer.put(this.utf8bytes.length, lengthBits); |
| | | for (var i = 0, l = this.utf8bytes.length; i < l; i++) { |
| | | buffer.put(this.utf8bytes[i], 8); |
| | | } |
| | | if (buffer.length + 4 <= this.totalDataCount * 8) { |
| | | buffer.put(0, 4); |
| | | } |
| | | // padding |
| | | while (buffer.length % 8 != 0) { |
| | | buffer.putBit(false); |
| | | } |
| | | // padding |
| | | while (true) { |
| | | if (buffer.length >= this.totalDataCount * 8) { |
| | | break; |
| | | } |
| | | buffer.put(QRCodeAlg.PAD0, 8); |
| | | if (buffer.length >= this.totalDataCount * 8) { |
| | | break; |
| | | } |
| | | buffer.put(QRCodeAlg.PAD1, 8); |
| | | } |
| | | return this.createBytes(buffer); |
| | | }, |
| | | /** |
| | | * çº éç ç¼ç |
| | | * @param {buffer} buffer æ°æ®ç¼ç |
| | | * @return {[type]} |
| | | */ |
| | | createBytes: function (buffer) { |
| | | var offset = 0; |
| | | var maxDcCount = 0; |
| | | var maxEcCount = 0; |
| | | var length = this.rsBlock.length / 3; |
| | | var rsBlocks = new Array(); |
| | | for (var i = 0; i < length; i++) { |
| | | var count = this.rsBlock[i * 3 + 0]; |
| | | var totalCount = this.rsBlock[i * 3 + 1]; |
| | | var dataCount = this.rsBlock[i * 3 + 2]; |
| | | for (var j = 0; j < count; j++) { |
| | | rsBlocks.push([dataCount, totalCount]); |
| | | } |
| | | } |
| | | var dcdata = new Array(rsBlocks.length); |
| | | var ecdata = new Array(rsBlocks.length); |
| | | for (var r = 0; r < rsBlocks.length; r++) { |
| | | var dcCount = rsBlocks[r][0]; |
| | | var ecCount = rsBlocks[r][1] - dcCount; |
| | | maxDcCount = Math.max(maxDcCount, dcCount); |
| | | maxEcCount = Math.max(maxEcCount, ecCount); |
| | | dcdata[r] = new Array(dcCount); |
| | | for (var i = 0; i < dcdata[r].length; i++) { |
| | | dcdata[r][i] = 0xff & buffer.buffer[i + offset]; |
| | | } |
| | | offset += dcCount; |
| | | var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount); |
| | | var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1); |
| | | var modPoly = rawPoly.mod(rsPoly); |
| | | ecdata[r] = new Array(rsPoly.getLength() - 1); |
| | | for (var i = 0; i < ecdata[r].length; i++) { |
| | | var modIndex = i + modPoly.getLength() - ecdata[r].length; |
| | | ecdata[r][i] = (modIndex >= 0) ? modPoly.get(modIndex) : 0; |
| | | } |
| | | } |
| | | var data = new Array(this.totalDataCount); |
| | | var index = 0; |
| | | for (var i = 0; i < maxDcCount; i++) { |
| | | for (var r = 0; r < rsBlocks.length; r++) { |
| | | if (i < dcdata[r].length) { |
| | | data[index++] = dcdata[r][i]; |
| | | } |
| | | } |
| | | } |
| | | for (var i = 0; i < maxEcCount; i++) { |
| | | for (var r = 0; r < rsBlocks.length; r++) { |
| | | if (i < ecdata[r].length) { |
| | | data[index++] = ecdata[r][i]; |
| | | } |
| | | } |
| | | } |
| | | return data; |
| | | |
| | | }, |
| | | /** |
| | | * å¸ç½®æ¨¡åï¼æå»ºæç»ä¿¡æ¯ |
| | | * @param {} data |
| | | * @param {} maskPattern |
| | | * @return {} |
| | | */ |
| | | mapData: function (data, maskPattern) { |
| | | var inc = -1; |
| | | var row = this.moduleCount - 1; |
| | | var bitIndex = 7; |
| | | var byteIndex = 0; |
| | | for (var col = this.moduleCount - 1; col > 0; col -= 2) { |
| | | if (col == 6) col--; |
| | | while (true) { |
| | | for (var c = 0; c < 2; c++) { |
| | | if (this.modules[row][col - c] == null) { |
| | | var dark = false; |
| | | if (byteIndex < data.length) { |
| | | dark = (((data[byteIndex] >>> bitIndex) & 1) == 1); |
| | | } |
| | | var mask = QRUtil.getMask(maskPattern, row, col - c); |
| | | if (mask) { |
| | | dark = !dark; |
| | | } |
| | | this.modules[row][col - c] = dark; |
| | | bitIndex--; |
| | | if (bitIndex == -1) { |
| | | byteIndex++; |
| | | bitIndex = 7; |
| | | } |
| | | } |
| | | } |
| | | row += inc; |
| | | if (row < 0 || this.moduleCount <= row) { |
| | | row -= inc; |
| | | inc = -inc; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | /** |
| | | * å¡«å
åæ®µ |
| | | */ |
| | | QRCodeAlg.PAD0 = 0xEC; |
| | | QRCodeAlg.PAD1 = 0x11; |
| | | //--------------------------------------------------------------------- |
| | | // çº éç级对åºçç¼ç |
| | | //--------------------------------------------------------------------- |
| | | var QRErrorCorrectLevel = [1, 0, 3, 2]; |
| | | //--------------------------------------------------------------------- |
| | | // æ©èçæ¬ |
| | | //--------------------------------------------------------------------- |
| | | var QRMaskPattern = { |
| | | PATTERN000: 0, |
| | | PATTERN001: 1, |
| | | PATTERN010: 2, |
| | | PATTERN011: 3, |
| | | PATTERN100: 4, |
| | | PATTERN101: 5, |
| | | PATTERN110: 6, |
| | | PATTERN111: 7 |
| | | }; |
| | | //--------------------------------------------------------------------- |
| | | // å·¥å
·ç±» |
| | | //--------------------------------------------------------------------- |
| | | var QRUtil = { |
| | | /* |
| | | æ¯ä¸ªçæ¬ç«æ£å¾å½¢çä½ç½® |
| | | */ |
| | | PATTERN_POSITION_TABLE: [ |
| | | [], |
| | | [6, 18], |
| | | [6, 22], |
| | | [6, 26], |
| | | [6, 30], |
| | | [6, 34], |
| | | [6, 22, 38], |
| | | [6, 24, 42], |
| | | [6, 26, 46], |
| | | [6, 28, 50], |
| | | [6, 30, 54], |
| | | [6, 32, 58], |
| | | [6, 34, 62], |
| | | [6, 26, 46, 66], |
| | | [6, 26, 48, 70], |
| | | [6, 26, 50, 74], |
| | | [6, 30, 54, 78], |
| | | [6, 30, 56, 82], |
| | | [6, 30, 58, 86], |
| | | [6, 34, 62, 90], |
| | | [6, 28, 50, 72, 94], |
| | | [6, 26, 50, 74, 98], |
| | | [6, 30, 54, 78, 102], |
| | | [6, 28, 54, 80, 106], |
| | | [6, 32, 58, 84, 110], |
| | | [6, 30, 58, 86, 114], |
| | | [6, 34, 62, 90, 118], |
| | | [6, 26, 50, 74, 98, 122], |
| | | [6, 30, 54, 78, 102, 126], |
| | | [6, 26, 52, 78, 104, 130], |
| | | [6, 30, 56, 82, 108, 134], |
| | | [6, 34, 60, 86, 112, 138], |
| | | [6, 30, 58, 86, 114, 142], |
| | | [6, 34, 62, 90, 118, 146], |
| | | [6, 30, 54, 78, 102, 126, 150], |
| | | [6, 24, 50, 76, 102, 128, 154], |
| | | [6, 28, 54, 80, 106, 132, 158], |
| | | [6, 32, 58, 84, 110, 136, 162], |
| | | [6, 26, 54, 82, 110, 138, 166], |
| | | [6, 30, 58, 86, 114, 142, 170] |
| | | ], |
| | | G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0), |
| | | G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0), |
| | | G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1), |
| | | /* |
| | | BCHç¼ç æ ¼å¼ä¿¡æ¯ |
| | | */ |
| | | getBCHTypeInfo: function (data) { |
| | | var d = data << 10; |
| | | while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) { |
| | | d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15))); |
| | | } |
| | | return ((data << 10) | d) ^ QRUtil.G15_MASK; |
| | | }, |
| | | /* |
| | | BCHç¼ç çæ¬ä¿¡æ¯ |
| | | */ |
| | | getBCHTypeNumber: function (data) { |
| | | var d = data << 12; |
| | | while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) { |
| | | d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18))); |
| | | } |
| | | return (data << 12) | d; |
| | | }, |
| | | /* |
| | | è·åBCHä½ä¿¡æ¯ |
| | | */ |
| | | getBCHDigit: function (data) { |
| | | var digit = 0; |
| | | while (data != 0) { |
| | | digit++; |
| | | data >>>= 1; |
| | | } |
| | | return digit; |
| | | }, |
| | | /* |
| | | è·åçæ¬å¯¹åºçç«æ£å¾å½¢ä½ç½® |
| | | */ |
| | | getPatternPosition: function (typeNumber) { |
| | | return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1]; |
| | | }, |
| | | /* |
| | | æ©èç®æ³ |
| | | */ |
| | | getMask: function (maskPattern, i, j) { |
| | | switch (maskPattern) { |
| | | case QRMaskPattern.PATTERN000: |
| | | return (i + j) % 2 == 0; |
| | | case QRMaskPattern.PATTERN001: |
| | | return i % 2 == 0; |
| | | case QRMaskPattern.PATTERN010: |
| | | return j % 3 == 0; |
| | | case QRMaskPattern.PATTERN011: |
| | | return (i + j) % 3 == 0; |
| | | case QRMaskPattern.PATTERN100: |
| | | return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0; |
| | | case QRMaskPattern.PATTERN101: |
| | | return (i * j) % 2 + (i * j) % 3 == 0; |
| | | case QRMaskPattern.PATTERN110: |
| | | return ((i * j) % 2 + (i * j) % 3) % 2 == 0; |
| | | case QRMaskPattern.PATTERN111: |
| | | return ((i * j) % 3 + (i + j) % 2) % 2 == 0; |
| | | default: |
| | | throw new Error("bad maskPattern:" + maskPattern); |
| | | } |
| | | }, |
| | | /* |
| | | è·åRSççº éå¤é¡¹å¼ |
| | | */ |
| | | getErrorCorrectPolynomial: function (errorCorrectLength) { |
| | | var a = new QRPolynomial([1], 0); |
| | | for (var i = 0; i < errorCorrectLength; i++) { |
| | | a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0)); |
| | | } |
| | | return a; |
| | | }, |
| | | /* |
| | | è·åè¯ä»· |
| | | */ |
| | | getLostPoint: function (qrCode) { |
| | | var moduleCount = qrCode.getModuleCount(), |
| | | lostPoint = 0, |
| | | darkCount = 0; |
| | | for (var row = 0; row < moduleCount; row++) { |
| | | var sameCount = 0; |
| | | var head = qrCode.modules[row][0]; |
| | | for (var col = 0; col < moduleCount; col++) { |
| | | var current = qrCode.modules[row][col]; |
| | | //level 3 è¯ä»· |
| | | if (col < moduleCount - 6) { |
| | | if (current && !qrCode.modules[row][col + 1] && qrCode.modules[row][col + 2] && qrCode.modules[row][col + 3] && qrCode.modules[row][col + 4] && !qrCode.modules[row][col + 5] && qrCode.modules[row][col + 6]) { |
| | | if (col < moduleCount - 10) { |
| | | if (qrCode.modules[row][col + 7] && qrCode.modules[row][col + 8] && qrCode.modules[row][col + 9] && qrCode.modules[row][col + 10]) { |
| | | lostPoint += 40; |
| | | } |
| | | } else if (col > 3) { |
| | | if (qrCode.modules[row][col - 1] && qrCode.modules[row][col - 2] && qrCode.modules[row][col - 3] && qrCode.modules[row][col - 4]) { |
| | | lostPoint += 40; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //level 2 è¯ä»· |
| | | if ((row < moduleCount - 1) && (col < moduleCount - 1)) { |
| | | var count = 0; |
| | | if (current) count++; |
| | | if (qrCode.modules[row + 1][col]) count++; |
| | | if (qrCode.modules[row][col + 1]) count++; |
| | | if (qrCode.modules[row + 1][col + 1]) count++; |
| | | if (count == 0 || count == 4) { |
| | | lostPoint += 3; |
| | | } |
| | | } |
| | | //level 1 è¯ä»· |
| | | if (head ^ current) { |
| | | sameCount++; |
| | | } else { |
| | | head = current; |
| | | if (sameCount >= 5) { |
| | | lostPoint += (3 + sameCount - 5); |
| | | } |
| | | sameCount = 1; |
| | | } |
| | | //level 4 è¯ä»· |
| | | if (current) { |
| | | darkCount++; |
| | | } |
| | | } |
| | | } |
| | | for (var col = 0; col < moduleCount; col++) { |
| | | var sameCount = 0; |
| | | var head = qrCode.modules[0][col]; |
| | | for (var row = 0; row < moduleCount; row++) { |
| | | var current = qrCode.modules[row][col]; |
| | | //level 3 è¯ä»· |
| | | if (row < moduleCount - 6) { |
| | | if (current && !qrCode.modules[row + 1][col] && qrCode.modules[row + 2][col] && qrCode.modules[row + 3][col] && qrCode.modules[row + 4][col] && !qrCode.modules[row + 5][col] && qrCode.modules[row + 6][col]) { |
| | | if (row < moduleCount - 10) { |
| | | if (qrCode.modules[row + 7][col] && qrCode.modules[row + 8][col] && qrCode.modules[row + 9][col] && qrCode.modules[row + 10][col]) { |
| | | lostPoint += 40; |
| | | } |
| | | } else if (row > 3) { |
| | | if (qrCode.modules[row - 1][col] && qrCode.modules[row - 2][col] && qrCode.modules[row - 3][col] && qrCode.modules[row - 4][col]) { |
| | | lostPoint += 40; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //level 1 è¯ä»· |
| | | if (head ^ current) { |
| | | sameCount++; |
| | | } else { |
| | | head = current; |
| | | if (sameCount >= 5) { |
| | | lostPoint += (3 + sameCount - 5); |
| | | } |
| | | sameCount = 1; |
| | | } |
| | | } |
| | | } |
| | | // LEVEL4 |
| | | var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5; |
| | | lostPoint += ratio * 10; |
| | | return lostPoint; |
| | | } |
| | | |
| | | }; |
| | | //--------------------------------------------------------------------- |
| | | // QRMath使ç¨çæ°å¦å·¥å
· |
| | | //--------------------------------------------------------------------- |
| | | var QRMath = { |
| | | /* |
| | | å°n转å为a^m |
| | | */ |
| | | glog: function (n) { |
| | | if (n < 1) { |
| | | throw new Error("glog(" + n + ")"); |
| | | } |
| | | return QRMath.LOG_TABLE[n]; |
| | | }, |
| | | /* |
| | | å°a^m转å为n |
| | | */ |
| | | gexp: function (n) { |
| | | while (n < 0) { |
| | | n += 255; |
| | | } |
| | | while (n >= 256) { |
| | | n -= 255; |
| | | } |
| | | return QRMath.EXP_TABLE[n]; |
| | | }, |
| | | EXP_TABLE: new Array(256), |
| | | LOG_TABLE: new Array(256) |
| | | |
| | | }; |
| | | for (var i = 0; i < 8; i++) { |
| | | QRMath.EXP_TABLE[i] = 1 << i; |
| | | } |
| | | for (var i = 8; i < 256; i++) { |
| | | QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8]; |
| | | } |
| | | for (var i = 0; i < 255; i++) { |
| | | QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i; |
| | | } |
| | | //--------------------------------------------------------------------- |
| | | // QRPolynomial å¤é¡¹å¼ |
| | | //--------------------------------------------------------------------- |
| | | /** |
| | | * å¤é¡¹å¼ç±» |
| | | * @param {Array} num ç³»æ° |
| | | * @param {num} shift a^shift |
| | | */ |
| | | function QRPolynomial(num, shift) { |
| | | if (num.length == undefined) { |
| | | throw new Error(num.length + "/" + shift); |
| | | } |
| | | var offset = 0; |
| | | while (offset < num.length && num[offset] == 0) { |
| | | offset++; |
| | | } |
| | | this.num = new Array(num.length - offset + shift); |
| | | for (var i = 0; i < num.length - offset; i++) { |
| | | this.num[i] = num[i + offset]; |
| | | } |
| | | } |
| | | QRPolynomial.prototype = { |
| | | get: function (index) { |
| | | return this.num[index]; |
| | | }, |
| | | getLength: function () { |
| | | return this.num.length; |
| | | }, |
| | | /** |
| | | * å¤é¡¹å¼ä¹æ³ |
| | | * @param {QRPolynomial} e 被ä¹å¤é¡¹å¼ |
| | | * @return {[type]} [description] |
| | | */ |
| | | multiply: function (e) { |
| | | var num = new Array(this.getLength() + e.getLength() - 1); |
| | | for (var i = 0; i < this.getLength(); i++) { |
| | | for (var j = 0; j < e.getLength(); j++) { |
| | | num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j))); |
| | | } |
| | | } |
| | | return new QRPolynomial(num, 0); |
| | | }, |
| | | /** |
| | | * å¤é¡¹å¼æ¨¡è¿ç® |
| | | * @param {QRPolynomial} e 模å¤é¡¹å¼ |
| | | * @return {} |
| | | */ |
| | | mod: function (e) { |
| | | var tl = this.getLength(), |
| | | el = e.getLength(); |
| | | if (tl - el < 0) { |
| | | return this; |
| | | } |
| | | var num = new Array(tl); |
| | | for (var i = 0; i < tl; i++) { |
| | | num[i] = this.get(i); |
| | | } |
| | | while (num.length >= el) { |
| | | var ratio = QRMath.glog(num[0]) - QRMath.glog(e.get(0)); |
| | | |
| | | for (var i = 0; i < e.getLength(); i++) { |
| | | num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio); |
| | | } |
| | | while (num[0] == 0) { |
| | | num.shift(); |
| | | } |
| | | } |
| | | return new QRPolynomial(num, 0); |
| | | } |
| | | }; |
| | | |
| | | //--------------------------------------------------------------------- |
| | | // RS_BLOCK_TABLE |
| | | //--------------------------------------------------------------------- |
| | | /* |
| | | äºç»´ç åä¸ªçæ¬ä¿¡æ¯[åæ°, æ¯åä¸çæ°æ®åæ°, æ¯åä¸çä¿¡æ¯åæ°] |
| | | */ |
| | | var RS_BLOCK_TABLE = [ |
| | | // L |
| | | // M |
| | | // Q |
| | | // H |
| | | // 1 |
| | | [1, 26, 19], |
| | | [1, 26, 16], |
| | | [1, 26, 13], |
| | | [1, 26, 9], |
| | | |
| | | // 2 |
| | | [1, 44, 34], |
| | | [1, 44, 28], |
| | | [1, 44, 22], |
| | | [1, 44, 16], |
| | | |
| | | // 3 |
| | | [1, 70, 55], |
| | | [1, 70, 44], |
| | | [2, 35, 17], |
| | | [2, 35, 13], |
| | | |
| | | // 4 |
| | | [1, 100, 80], |
| | | [2, 50, 32], |
| | | [2, 50, 24], |
| | | [4, 25, 9], |
| | | |
| | | // 5 |
| | | [1, 134, 108], |
| | | [2, 67, 43], |
| | | [2, 33, 15, 2, 34, 16], |
| | | [2, 33, 11, 2, 34, 12], |
| | | |
| | | // 6 |
| | | [2, 86, 68], |
| | | [4, 43, 27], |
| | | [4, 43, 19], |
| | | [4, 43, 15], |
| | | |
| | | // 7 |
| | | [2, 98, 78], |
| | | [4, 49, 31], |
| | | [2, 32, 14, 4, 33, 15], |
| | | [4, 39, 13, 1, 40, 14], |
| | | |
| | | // 8 |
| | | [2, 121, 97], |
| | | [2, 60, 38, 2, 61, 39], |
| | | [4, 40, 18, 2, 41, 19], |
| | | [4, 40, 14, 2, 41, 15], |
| | | |
| | | // 9 |
| | | [2, 146, 116], |
| | | [3, 58, 36, 2, 59, 37], |
| | | [4, 36, 16, 4, 37, 17], |
| | | [4, 36, 12, 4, 37, 13], |
| | | |
| | | // 10 |
| | | [2, 86, 68, 2, 87, 69], |
| | | [4, 69, 43, 1, 70, 44], |
| | | [6, 43, 19, 2, 44, 20], |
| | | [6, 43, 15, 2, 44, 16], |
| | | |
| | | // 11 |
| | | [4, 101, 81], |
| | | [1, 80, 50, 4, 81, 51], |
| | | [4, 50, 22, 4, 51, 23], |
| | | [3, 36, 12, 8, 37, 13], |
| | | |
| | | // 12 |
| | | [2, 116, 92, 2, 117, 93], |
| | | [6, 58, 36, 2, 59, 37], |
| | | [4, 46, 20, 6, 47, 21], |
| | | [7, 42, 14, 4, 43, 15], |
| | | |
| | | // 13 |
| | | [4, 133, 107], |
| | | [8, 59, 37, 1, 60, 38], |
| | | [8, 44, 20, 4, 45, 21], |
| | | [12, 33, 11, 4, 34, 12], |
| | | |
| | | // 14 |
| | | [3, 145, 115, 1, 146, 116], |
| | | [4, 64, 40, 5, 65, 41], |
| | | [11, 36, 16, 5, 37, 17], |
| | | [11, 36, 12, 5, 37, 13], |
| | | |
| | | // 15 |
| | | [5, 109, 87, 1, 110, 88], |
| | | [5, 65, 41, 5, 66, 42], |
| | | [5, 54, 24, 7, 55, 25], |
| | | [11, 36, 12], |
| | | |
| | | // 16 |
| | | [5, 122, 98, 1, 123, 99], |
| | | [7, 73, 45, 3, 74, 46], |
| | | [15, 43, 19, 2, 44, 20], |
| | | [3, 45, 15, 13, 46, 16], |
| | | |
| | | // 17 |
| | | [1, 135, 107, 5, 136, 108], |
| | | [10, 74, 46, 1, 75, 47], |
| | | [1, 50, 22, 15, 51, 23], |
| | | [2, 42, 14, 17, 43, 15], |
| | | |
| | | // 18 |
| | | [5, 150, 120, 1, 151, 121], |
| | | [9, 69, 43, 4, 70, 44], |
| | | [17, 50, 22, 1, 51, 23], |
| | | [2, 42, 14, 19, 43, 15], |
| | | |
| | | // 19 |
| | | [3, 141, 113, 4, 142, 114], |
| | | [3, 70, 44, 11, 71, 45], |
| | | [17, 47, 21, 4, 48, 22], |
| | | [9, 39, 13, 16, 40, 14], |
| | | |
| | | // 20 |
| | | [3, 135, 107, 5, 136, 108], |
| | | [3, 67, 41, 13, 68, 42], |
| | | [15, 54, 24, 5, 55, 25], |
| | | [15, 43, 15, 10, 44, 16], |
| | | |
| | | // 21 |
| | | [4, 144, 116, 4, 145, 117], |
| | | [17, 68, 42], |
| | | [17, 50, 22, 6, 51, 23], |
| | | [19, 46, 16, 6, 47, 17], |
| | | |
| | | // 22 |
| | | [2, 139, 111, 7, 140, 112], |
| | | [17, 74, 46], |
| | | [7, 54, 24, 16, 55, 25], |
| | | [34, 37, 13], |
| | | |
| | | // 23 |
| | | [4, 151, 121, 5, 152, 122], |
| | | [4, 75, 47, 14, 76, 48], |
| | | [11, 54, 24, 14, 55, 25], |
| | | [16, 45, 15, 14, 46, 16], |
| | | |
| | | // 24 |
| | | [6, 147, 117, 4, 148, 118], |
| | | [6, 73, 45, 14, 74, 46], |
| | | [11, 54, 24, 16, 55, 25], |
| | | [30, 46, 16, 2, 47, 17], |
| | | |
| | | // 25 |
| | | [8, 132, 106, 4, 133, 107], |
| | | [8, 75, 47, 13, 76, 48], |
| | | [7, 54, 24, 22, 55, 25], |
| | | [22, 45, 15, 13, 46, 16], |
| | | |
| | | // 26 |
| | | [10, 142, 114, 2, 143, 115], |
| | | [19, 74, 46, 4, 75, 47], |
| | | [28, 50, 22, 6, 51, 23], |
| | | [33, 46, 16, 4, 47, 17], |
| | | |
| | | // 27 |
| | | [8, 152, 122, 4, 153, 123], |
| | | [22, 73, 45, 3, 74, 46], |
| | | [8, 53, 23, 26, 54, 24], |
| | | [12, 45, 15, 28, 46, 16], |
| | | |
| | | // 28 |
| | | [3, 147, 117, 10, 148, 118], |
| | | [3, 73, 45, 23, 74, 46], |
| | | [4, 54, 24, 31, 55, 25], |
| | | [11, 45, 15, 31, 46, 16], |
| | | |
| | | // 29 |
| | | [7, 146, 116, 7, 147, 117], |
| | | [21, 73, 45, 7, 74, 46], |
| | | [1, 53, 23, 37, 54, 24], |
| | | [19, 45, 15, 26, 46, 16], |
| | | |
| | | // 30 |
| | | [5, 145, 115, 10, 146, 116], |
| | | [19, 75, 47, 10, 76, 48], |
| | | [15, 54, 24, 25, 55, 25], |
| | | [23, 45, 15, 25, 46, 16], |
| | | |
| | | // 31 |
| | | [13, 145, 115, 3, 146, 116], |
| | | [2, 74, 46, 29, 75, 47], |
| | | [42, 54, 24, 1, 55, 25], |
| | | [23, 45, 15, 28, 46, 16], |
| | | |
| | | // 32 |
| | | [17, 145, 115], |
| | | [10, 74, 46, 23, 75, 47], |
| | | [10, 54, 24, 35, 55, 25], |
| | | [19, 45, 15, 35, 46, 16], |
| | | |
| | | // 33 |
| | | [17, 145, 115, 1, 146, 116], |
| | | [14, 74, 46, 21, 75, 47], |
| | | [29, 54, 24, 19, 55, 25], |
| | | [11, 45, 15, 46, 46, 16], |
| | | |
| | | // 34 |
| | | [13, 145, 115, 6, 146, 116], |
| | | [14, 74, 46, 23, 75, 47], |
| | | [44, 54, 24, 7, 55, 25], |
| | | [59, 46, 16, 1, 47, 17], |
| | | |
| | | // 35 |
| | | [12, 151, 121, 7, 152, 122], |
| | | [12, 75, 47, 26, 76, 48], |
| | | [39, 54, 24, 14, 55, 25], |
| | | [22, 45, 15, 41, 46, 16], |
| | | |
| | | // 36 |
| | | [6, 151, 121, 14, 152, 122], |
| | | [6, 75, 47, 34, 76, 48], |
| | | [46, 54, 24, 10, 55, 25], |
| | | [2, 45, 15, 64, 46, 16], |
| | | |
| | | // 37 |
| | | [17, 152, 122, 4, 153, 123], |
| | | [29, 74, 46, 14, 75, 47], |
| | | [49, 54, 24, 10, 55, 25], |
| | | [24, 45, 15, 46, 46, 16], |
| | | |
| | | // 38 |
| | | [4, 152, 122, 18, 153, 123], |
| | | [13, 74, 46, 32, 75, 47], |
| | | [48, 54, 24, 14, 55, 25], |
| | | [42, 45, 15, 32, 46, 16], |
| | | |
| | | // 39 |
| | | [20, 147, 117, 4, 148, 118], |
| | | [40, 75, 47, 7, 76, 48], |
| | | [43, 54, 24, 22, 55, 25], |
| | | [10, 45, 15, 67, 46, 16], |
| | | |
| | | // 40 |
| | | [19, 148, 118, 6, 149, 119], |
| | | [18, 75, 47, 31, 76, 48], |
| | | [34, 54, 24, 34, 55, 25], |
| | | [20, 45, 15, 61, 46, 16] |
| | | ]; |
| | | |
| | | /** |
| | | * æ ¹æ®æ°æ®è·å对åºçæ¬ |
| | | * @return {[type]} [description] |
| | | */ |
| | | QRCodeAlg.prototype.getRightType = function () { |
| | | for (var typeNumber = 1; typeNumber < 41; typeNumber++) { |
| | | var rsBlock = RS_BLOCK_TABLE[(typeNumber - 1) * 4 + this.errorCorrectLevel]; |
| | | if (rsBlock == undefined) { |
| | | throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + this.errorCorrectLevel); |
| | | } |
| | | var length = rsBlock.length / 3; |
| | | var totalDataCount = 0; |
| | | for (var i = 0; i < length; i++) { |
| | | var count = rsBlock[i * 3 + 0]; |
| | | var dataCount = rsBlock[i * 3 + 2]; |
| | | totalDataCount += dataCount * count; |
| | | } |
| | | var lengthBytes = typeNumber > 9 ? 2 : 1; |
| | | if (this.utf8bytes.length + lengthBytes < totalDataCount || typeNumber == 40) { |
| | | this.typeNumber = typeNumber; |
| | | this.rsBlock = rsBlock; |
| | | this.totalDataCount = totalDataCount; |
| | | break; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | //--------------------------------------------------------------------- |
| | | // QRBitBuffer |
| | | //--------------------------------------------------------------------- |
| | | function QRBitBuffer() { |
| | | this.buffer = new Array(); |
| | | this.length = 0; |
| | | } |
| | | QRBitBuffer.prototype = { |
| | | get: function (index) { |
| | | var bufIndex = Math.floor(index / 8); |
| | | return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1); |
| | | }, |
| | | put: function (num, length) { |
| | | for (var i = 0; i < length; i++) { |
| | | this.putBit(((num >>> (length - i - 1)) & 1)); |
| | | } |
| | | }, |
| | | putBit: function (bit) { |
| | | var bufIndex = Math.floor(this.length / 8); |
| | | if (this.buffer.length <= bufIndex) { |
| | | this.buffer.push(0); |
| | | } |
| | | if (bit) { |
| | | this.buffer[bufIndex] |= (0x80 >>> (this.length % 8)); |
| | | } |
| | | this.length++; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | // xzedit |
| | | let qrcodeAlgObjCache = []; |
| | | /** |
| | | * äºç»´ç æé 彿°ï¼ä¸»è¦ç¨äºç»å¶ |
| | | * @param {åæ°å表} opt ä¼ éåæ° |
| | | * @return {} |
| | | */ |
| | | QRCode = function (opt) { |
| | | //设置é»è®¤åæ° |
| | | this.options = { |
| | | text: '', |
| | | size: 256, |
| | | correctLevel: 3, |
| | | background: '#ffffff', |
| | | foreground: '#000000', |
| | | pdground: '#000000', |
| | | image: '', |
| | | imageSize: 30, |
| | | canvasId: opt.canvasId, |
| | | context: opt.context, |
| | | usingComponents: opt.usingComponents, |
| | | showLoading: opt.showLoading, |
| | | loadingText: opt.loadingText, |
| | | }; |
| | | if (typeof opt === 'string') { // åªç¼ç ASCIIå符串 |
| | | opt = { |
| | | text: opt |
| | | }; |
| | | } |
| | | if (opt) { |
| | | for (var i in opt) { |
| | | this.options[i] = opt[i]; |
| | | } |
| | | } |
| | | //使ç¨QRCodeAlgå建äºç»´ç ç»æ |
| | | var qrCodeAlg = null; |
| | | for (var i = 0, l = qrcodeAlgObjCache.length; i < l; i++) { |
| | | if (qrcodeAlgObjCache[i].text == this.options.text && qrcodeAlgObjCache[i].text.correctLevel == this.options.correctLevel) { |
| | | qrCodeAlg = qrcodeAlgObjCache[i].obj; |
| | | break; |
| | | } |
| | | } |
| | | if (i == l) { |
| | | qrCodeAlg = new QRCodeAlg(this.options.text, this.options.correctLevel); |
| | | qrcodeAlgObjCache.push({ |
| | | text: this.options.text, |
| | | correctLevel: this.options.correctLevel, |
| | | obj: qrCodeAlg |
| | | }); |
| | | } |
| | | /** |
| | | * 计ç®ç©éµç¹çåæ¯è² |
| | | * @param {Obj} config |
| | | * @param {Number} config.row ç¹xåæ |
| | | * @param {Number} config.col ç¹yåæ |
| | | * @param {Number} config.count ç©éµå¤§å° |
| | | * @param {Number} config.options ç»ä»¶çoptions |
| | | * @return {String} |
| | | */ |
| | | let getForeGround = function (config) { |
| | | var options = config.options; |
| | | if (options.pdground && ( |
| | | (config.row > 1 && config.row < 5 && config.col > 1 && config.col < 5) || |
| | | (config.row > (config.count - 6) && config.row < (config.count - 2) && config.col > 1 && config.col < 5) || |
| | | (config.row > 1 && config.row < 5 && config.col > (config.count - 6) && config.col < (config.count - 2)) |
| | | )) { |
| | | return options.pdground; |
| | | } |
| | | return options.foreground; |
| | | } |
| | | // å建canvas |
| | | let createCanvas = function (options) { |
| | | if (options.showLoading) { |
| | | uni.showLoading({ |
| | | title: options.loadingText, |
| | | mask: true |
| | | }); |
| | | } |
| | | var ctx = uni.createCanvasContext(options.canvasId, options.context); |
| | | var count = qrCodeAlg.getModuleCount(); |
| | | var ratioSize = options.size; |
| | | var ratioImgSize = options.imageSize; |
| | | //è®¡ç®æ¯ä¸ªç¹çé¿å®½ |
| | | var tileW = (ratioSize / count).toPrecision(4); |
| | | var tileH = (ratioSize / count).toPrecision(4); |
| | | //ç»å¶ |
| | | for (var row = 0; row < count; row++) { |
| | | for (var col = 0; col < count; col++) { |
| | | var w = (Math.ceil((col + 1) * tileW) - Math.floor(col * tileW)); |
| | | var h = (Math.ceil((row + 1) * tileW) - Math.floor(row * tileW)); |
| | | var foreground = getForeGround({ |
| | | row: row, |
| | | col: col, |
| | | count: count, |
| | | options: options |
| | | }); |
| | | ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options.background); |
| | | ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w, h); |
| | | } |
| | | } |
| | | if (options.image) { |
| | | var x = Number(((ratioSize - ratioImgSize) / 2).toFixed(2)); |
| | | var y = Number(((ratioSize - ratioImgSize) / 2).toFixed(2)); |
| | | drawRoundedRect(ctx, x, y, ratioImgSize, ratioImgSize, 2, 6, true, true) |
| | | ctx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize); |
| | | // ç»åè§ç©å½¢ |
| | | function drawRoundedRect(ctxi, x, y, width, height, r, lineWidth, fill, stroke) { |
| | | ctxi.setLineWidth(lineWidth); |
| | | ctxi.setFillStyle(options.background); |
| | | ctxi.setStrokeStyle(options.background); |
| | | ctxi.beginPath(); // draw top and top right corner |
| | | ctxi.moveTo(x + r, y); |
| | | ctxi.arcTo(x + width, y, x + width, y + r, r); // draw right side and bottom right corner |
| | | ctxi.arcTo(x + width, y + height, x + width - r, y + height, r); // draw bottom and bottom left corner |
| | | ctxi.arcTo(x, y + height, x, y + height - r, r); // draw left and top left corner |
| | | ctxi.arcTo(x, y, x + r, y, r); |
| | | ctxi.closePath(); |
| | | if (fill) { |
| | | ctxi.fill(); |
| | | } |
| | | if (stroke) { |
| | | ctxi.stroke(); |
| | | } |
| | | } |
| | | } |
| | | setTimeout(() => { |
| | | ctx.draw(true, () => { |
| | | // ä¿åå°ä¸´æ¶åºå |
| | | setTimeout(() => { |
| | | uni.canvasToTempFilePath({ |
| | | width: options.width, |
| | | height: options.height, |
| | | destWidth: options.width, |
| | | destHeight: options.height, |
| | | canvasId: options.canvasId, |
| | | quality: Number(1), |
| | | success: function (res) { |
| | | if (options.cbResult) { |
| | | options.cbResult(res.tempFilePath) |
| | | } |
| | | }, |
| | | fail: function (res) { |
| | | if (options.cbResult) { |
| | | options.cbResult(res) |
| | | } |
| | | }, |
| | | complete: function () { |
| | | if (options.showLoading){ |
| | | uni.hideLoading(); |
| | | } |
| | | }, |
| | | }, options.context); |
| | | }, options.text.length + 100); |
| | | }); |
| | | }, options.usingComponents ? 0 : 150); |
| | | } |
| | | createCanvas(this.options); |
| | | // 空å¤å® |
| | | let empty = function (v) { |
| | | let tp = typeof v, |
| | | rt = false; |
| | | if (tp == "number" && String(v) == "") { |
| | | rt = true |
| | | } else if (tp == "undefined") { |
| | | rt = true |
| | | } else if (tp == "object") { |
| | | if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true |
| | | } else if (tp == "string") { |
| | | if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true |
| | | } else if (tp == "function") { |
| | | rt = false |
| | | } |
| | | return rt |
| | | } |
| | | }; |
| | | QRCode.prototype.clear = function (fn) { |
| | | var ctx = uni.createCanvasContext(this.options.canvasId, this.options.context) |
| | | ctx.clearRect(0, 0, this.options.size, this.options.size) |
| | | ctx.draw(false, () => { |
| | | if (fn) { |
| | | fn() |
| | | } |
| | | }) |
| | | }; |
| | | })() |
| | | |
| | | export default QRCode |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template xlang="wxml" minapp="mpvue"> |
| | | <view class="tki-qrcode"> |
| | | <!-- #ifndef MP-ALIPAY --> |
| | | <canvas class="tki-qrcode-canvas" :canvas-id="cid" :style="{width:cpSize+'px',height:cpSize+'px'}" /> |
| | | <!-- #endif --> |
| | | <!-- #ifdef MP-ALIPAY --> |
| | | <canvas :id="cid" :width="cpSize" :height="cpSize" class="tki-qrcode-canvas" /> |
| | | <!-- #endif --> |
| | | <image v-show="show" :src="result" :style="{width:cpSize+'px',height:cpSize+'px'}" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import QRCode from "./qrcode.js" |
| | | let qrcode |
| | | export default { |
| | | name: "tki-qrcode", |
| | | props: { |
| | | cid: { |
| | | type: String, |
| | | default: 'tki-qrcode-canvas' |
| | | }, |
| | | size: { |
| | | type: Number, |
| | | default: 200 |
| | | }, |
| | | unit: { |
| | | type: String, |
| | | default: 'upx' |
| | | }, |
| | | show: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | val: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | background: { |
| | | type: String, |
| | | default: '#ffffff' |
| | | }, |
| | | foreground: { |
| | | type: String, |
| | | default: '#000000' |
| | | }, |
| | | pdground: { |
| | | type: String, |
| | | default: '#000000' |
| | | }, |
| | | icon: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | iconSize: { |
| | | type: Number, |
| | | default: 40 |
| | | }, |
| | | lv: { |
| | | type: Number, |
| | | default: 3 |
| | | }, |
| | | onval: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | loadMake: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | usingComponents: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | showLoading: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | loadingText: { |
| | | type: String, |
| | | default: 'äºç»´ç çæä¸' |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | result: '', |
| | | } |
| | | }, |
| | | methods: { |
| | | _makeCode() { |
| | | let that = this |
| | | if (!this._empty(this.val)) { |
| | | qrcode = new QRCode({ |
| | | context: that, // ä¸ä¸æç¯å¢ |
| | | canvasId:that.cid, // canvas-id |
| | | usingComponents: that.usingComponents, // æ¯å¦æ¯èªå®ä¹ç»ä»¶ |
| | | showLoading: that.showLoading, // æ¯å¦æ¾ç¤ºloading |
| | | loadingText: that.loadingText, // loadingæå |
| | | text: that.val, // çæå
容 |
| | | size: that.cpSize, // äºç»´ç å¤§å° |
| | | background: that.background, // èæ¯è² |
| | | foreground: that.foreground, // åæ¯è² |
| | | pdground: that.pdground, // å®ä½è§ç¹é¢è² |
| | | correctLevel: that.lv, // 容éçº§å« |
| | | image: that.icon, // äºç»´ç 徿 |
| | | imageSize: that.iconSize,// äºç»´ç 徿 å¤§å° |
| | | cbResult: function (res) { // çæäºç»´ç çåè° |
| | | that._result(res) |
| | | }, |
| | | }); |
| | | } else { |
| | | uni.showToast({ |
| | | title: 'äºç»´ç å
容ä¸è½ä¸ºç©º', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | }, |
| | | _clearCode() { |
| | | this._result('') |
| | | qrcode.clear() |
| | | }, |
| | | _saveCode() { |
| | | let that = this; |
| | | if (this.result != "") { |
| | | uni.saveImageToPhotosAlbum({ |
| | | filePath: that.result, |
| | | success: function () { |
| | | uni.showToast({ |
| | | title: 'äºç»´ç ä¿åæå', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | _result(res) { |
| | | this.result = res; |
| | | this.$emit('result', res) |
| | | }, |
| | | _empty(v) { |
| | | let tp = typeof v, |
| | | rt = false; |
| | | if (tp == "number" && String(v) == "") { |
| | | rt = true |
| | | } else if (tp == "undefined") { |
| | | rt = true |
| | | } else if (tp == "object") { |
| | | if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true |
| | | } else if (tp == "string") { |
| | | if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true |
| | | } else if (tp == "function") { |
| | | rt = false |
| | | } |
| | | return rt |
| | | } |
| | | }, |
| | | watch: { |
| | | size: function (n, o) { |
| | | if (n != o && !this._empty(n)) { |
| | | this.cSize = n |
| | | if (!this._empty(this.val)) { |
| | | setTimeout(() => { |
| | | this._makeCode() |
| | | }, 100); |
| | | } |
| | | } |
| | | }, |
| | | val: function (n, o) { |
| | | if (this.onval) { |
| | | if (n != o && !this._empty(n)) { |
| | | setTimeout(() => { |
| | | this._makeCode() |
| | | }, 0); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | cpSize() { |
| | | if(this.unit == "upx"){ |
| | | return uni.upx2px(this.size) |
| | | }else{ |
| | | return this.size |
| | | } |
| | | } |
| | | }, |
| | | mounted: function () { |
| | | if (this.loadMake) { |
| | | if (!this._empty(this.val)) { |
| | | setTimeout(() => { |
| | | this._makeCode() |
| | | }, 0); |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | <style> |
| | | .tki-qrcode { |
| | | position: relative; |
| | | } |
| | | .tki-qrcode-canvas { |
| | | position: fixed; |
| | | top: -99999upx; |
| | | left: -99999upx; |
| | | z-index: -99999; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh-CN"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta name="keywords" content="PoweredByJeeSiteV4.0"/> |
| | | <meta name="description" content="PoweredByJeeSiteV4.0"/> |
| | | <link rel="shortcut icon" type="image/x-icon" href="<%= BASE_URL %>static/custom/favicon.png"> |
| | | <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> |
| | | <title><%= htmlWebpackPlugin.options.title %></title> |
| | | <script> |
| | | window.onresize = function () { |
| | | if (document.documentElement.clientWidth >= 768) { |
| | | window.location.href = '<%= BASE_URL %>static/#/'; |
| | | } |
| | | }; |
| | | window.onresize(); |
| | | </script> |
| | | <!-- æ£å¼åå¸çæ¶å使ç¨ï¼å¼åæé´ä¸å¯ç¨ãâ --> |
| | | <script src="<%= BASE_URL %>static/common/js/touch-emulator.js"></script> |
| | | <script> |
| | | TouchEmulator(); |
| | | </script> |
| | | <style> |
| | | ::-webkit-scrollbar{ |
| | | display: none; |
| | | } |
| | | </style> |
| | | <!-- æ£å¼åå¸çæ¶å使ç¨ï¼å¼åæé´ä¸å¯ç¨ãâ --> |
| | | <script> |
| | | document.addEventListener('DOMContentLoaded', function() { |
| | | document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px' |
| | | }) |
| | | </script> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>static/index.css" /> |
| | | </head> |
| | | <body> |
| | | <!-- 该æä»¶ä¸º H5 å¹³å°çæ¨¡æ¿ HTMLï¼å¹¶éåºç¨å
¥å£ã --> |
| | | <!-- 请å¿å¨æ¤æä»¶ç¼å页é¢ä»£ç æç´æ¥è¿è¡æ¤æä»¶ã --> |
| | | <!-- è¯¦è§ææ¡£ï¼https://uniapp.dcloud.io/collocation/manifest?id=h5-template --> |
| | | <noscript> |
| | | <strong>æ¬ç«ç¹å¿
é¡»è¦å¼å¯JavaScriptæè½è¿è¡</strong> |
| | | </noscript> |
| | | <div id="app"></div> |
| | | <!-- built files will be auto injected --> |
| | | <script> |
| | | /*BAIDU_STAT*/ |
| | | </script> |
| | | </body> |
| | | </html> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * Copyright (c) 2013-Now http://jeesite.com All rights reserved. |
| | | */ |
| | | import Vue from 'vue'; |
| | | import App from './App'; |
| | | |
| | | Vue.config.productionTip = false; |
| | | |
| | | App.mpType = 'app'; |
| | | |
| | | // å¼å
¥å
¨å± uView æ¡æ¶ |
| | | import uView from 'uview-ui'; |
| | | Vue.use(uView); |
| | | |
| | | // å
¨å±åå¨ vuex çå°è£
|
| | | import store from '@/store'; |
| | | |
| | | // å¼å
¥ uView æä¾ç对 vuex çç®åæ³æä»¶ |
| | | let vuexStore = require('@/store/$u.mixin.js'); |
| | | Vue.mixin(vuexStore); |
| | | |
| | | // å¼å
¥ uView 对å°ç¨åºå享ç mixin å°è£
|
| | | let mpShare = require('uview-ui/libs/mixin/mpShare.js'); |
| | | Vue.mixin(mpShare); |
| | | |
| | | // Vue i18n å½é
å |
| | | import VueI18n from '@/common/vue-i18n.min.js'; |
| | | Vue.use(VueI18n); |
| | | |
| | | // i18n é¨åçé
ç½®ï¼å¼å
¥è¯è¨å
ï¼æ³¨æè·¯å¾ |
| | | import lang_zh_CN from '@/common/locales/zh_CN.js'; |
| | | import lang_en from '@/common/locales/en.js'; |
| | | |
| | | const i18n = new VueI18n({ |
| | | // é»è®¤è¯è¨ |
| | | locale: 'zh_CN', |
| | | // å¼å
¥è¯è¨æä»¶ |
| | | messages: { |
| | | 'zh_CN': lang_zh_CN, |
| | | 'en': lang_en, |
| | | } |
| | | }); |
| | | |
| | | // ç±äºå¾®ä¿¡å°ç¨åºçè¿è¡æºå¶é®é¢ï¼é声æå¦ä¸ä¸è¡ï¼H5åAPPéå¿
å¡« |
| | | Vue.prototype._i18n = i18n; |
| | | const app = new Vue({ |
| | | i18n, |
| | | store, |
| | | ...App |
| | | }); |
| | | |
| | | // http æ¦æªå¨ï¼å°æ¤é¨åæ¾å¨ new Vue() å app.$mount() ä¹é´ï¼æè½ App.vue 䏿£å¸¸ä½¿ç¨ |
| | | import httpInterceptor from '@/common/http.interceptor.js'; |
| | | Vue.use(httpInterceptor, app); |
| | | |
| | | // http æ¥å£ API æ½ç¦»ï¼å
äºå url æè
ä¸äºåºå®çåæ° |
| | | import httpApi from '@/common/http.api.js'; |
| | | Vue.use(httpApi, app); |
| | | |
| | | app.$mount(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name" : "æ±ä¸åéMES", |
| | | "appid" : "__UNI__2E031D3", |
| | | "description" : "pigcloud", |
| | | "versionName" : "4.0.2", |
| | | "versionCode" : 2, |
| | | "transformPx" : false, |
| | | "app-plus" : { |
| | | "compilerVersion" : 3, |
| | | "optimization" : { |
| | | "subPackages" : true |
| | | }, |
| | | "safearea" : { |
| | | "bottom" : { |
| | | "offset" : "none" |
| | | } |
| | | }, |
| | | "splashscreen" : { |
| | | "alwaysShowBeforeRender" : true, |
| | | "waiting" : true, |
| | | "autoclose" : true, |
| | | "delay" : 0 |
| | | }, |
| | | "compatible" : { |
| | | "ignoreVersion" : true |
| | | }, |
| | | "usingComponents" : true, |
| | | "nvueCompiler" : "uni-app", |
| | | "modules" : { |
| | | "Bluetooth" : {} |
| | | }, |
| | | "distribute" : { |
| | | "android" : { |
| | | "permissions" : [ |
| | | "<uses-feature android:name=\"android.hardware.camera\"/>", |
| | | "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", |
| | | "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", |
| | | "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", |
| | | "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", |
| | | "<uses-permission android:name=\"android.permission.CAMERA\"/>", |
| | | "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", |
| | | "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", |
| | | "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", |
| | | "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", |
| | | "<uses-permission android:name=\"android.permission.READ_LOGS\"/>", |
| | | "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", |
| | | "<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
| | | "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
| | | "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>", |
| | | "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>", |
| | | "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>", |
| | | "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>", |
| | | "<uses-permission android:name=\"android.permission.BLUETOOTH_CONNECT\"/> ", |
| | | "<uses-permission android:name=\"android.permission.BLUETOOTH_SCAN\"/>" |
| | | ], |
| | | "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ] |
| | | }, |
| | | "ios" : { |
| | | "dSYMs" : false |
| | | }, |
| | | "sdkConfigs" : { |
| | | "ad" : {}, |
| | | "oauth" : {} |
| | | }, |
| | | "icons" : { |
| | | "android" : { |
| | | "hdpi" : "C:/Users/MLL/Desktop/03ae6e42ca681ffd98737b6a20f94d0.png", |
| | | "xhdpi" : "C:/Users/MLL/Desktop/03ae6e42ca681ffd98737b6a20f94d0.png", |
| | | "xxhdpi" : "C:/Users/MLL/Desktop/03ae6e42ca681ffd98737b6a20f94d0.png", |
| | | "xxxhdpi" : "C:/Users/MLL/Desktop/03ae6e42ca681ffd98737b6a20f94d0.png" |
| | | }, |
| | | "ios" : { |
| | | "appstore" : "", |
| | | "ipad" : { |
| | | "app" : "", |
| | | "app@2x" : "", |
| | | "notification" : "", |
| | | "notification@2x" : "", |
| | | "proapp@2x" : "", |
| | | "settings" : "", |
| | | "settings@2x" : "", |
| | | "spotlight" : "", |
| | | "spotlight@2x" : "" |
| | | }, |
| | | "iphone" : { |
| | | "app@2x" : "", |
| | | "app@3x" : "", |
| | | "notification@2x" : "", |
| | | "notification@3x" : "", |
| | | "settings@2x" : "", |
| | | "settings@3x" : "", |
| | | "spotlight@2x" : "", |
| | | "spotlight@3x" : "" |
| | | } |
| | | } |
| | | }, |
| | | "splashscreen" : { |
| | | "androidStyle" : "common" |
| | | } |
| | | }, |
| | | "nativePlugins" : { |
| | | "JCSDK-JCApiModule" : { |
| | | "__plugin_info__" : { |
| | | "name" : "ç²¾è£æå°æºæ¥å
¥æä»¶", |
| | | "description" : "ç²¾è£ç³»åæå°æºæå°æä»¶", |
| | | "platforms" : "Android,iOS", |
| | | "url" : "https://ext.dcloud.net.cn/plugin?id=10011", |
| | | "android_package_name" : "uni.UNI2E031D3", |
| | | "ios_bundle_id" : "", |
| | | "isCloud" : true, |
| | | "bought" : 1, |
| | | "pid" : "10011", |
| | | "parameters" : {} |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "quickapp" : {}, |
| | | "mp-weixin" : { |
| | | "appid" : "wxf3e5cc7116d23b18", |
| | | "setting" : { |
| | | "urlCheck" : false, |
| | | "es6" : false, |
| | | "minified" : true, |
| | | "postcss" : true |
| | | }, |
| | | "optimization" : { |
| | | "subPackages" : true |
| | | }, |
| | | "usingComponents" : true |
| | | }, |
| | | "mp-alipay" : { |
| | | "usingComponents" : true, |
| | | "component2" : true |
| | | }, |
| | | "mp-qq" : { |
| | | "optimization" : { |
| | | "subPackages" : true |
| | | }, |
| | | "appid" : "" |
| | | }, |
| | | "mp-baidu" : { |
| | | "usingComponents" : true, |
| | | "appid" : "" |
| | | }, |
| | | "mp-toutiao" : { |
| | | "usingComponents" : true, |
| | | "appid" : "" |
| | | }, |
| | | "h5" : { |
| | | "template" : "h5.html", |
| | | "router" : { |
| | | "mode" : "hash", |
| | | "base" : "./" |
| | | }, |
| | | "optimization" : { |
| | | "treeShaking" : { |
| | | "enable" : false |
| | | } |
| | | }, |
| | | "devServer" : { |
| | | "port" : 8080, //æµè§å¨è¿è¡ç«¯å£ |
| | | "disableHostCheck" : true, |
| | | "proxy" : { |
| | | "/auth" : { |
| | | "target" : "http://192.168.32.65:9999", |
| | | "changeOrigin" : true, |
| | | "secure" : false |
| | | }, |
| | | "/mes" : { |
| | | "target" : "http://192.168.32.65:9999", |
| | | "changeOrigin" : true, |
| | | "secure" : false |
| | | }, |
| | | "/admin" : { |
| | | "target" : "http://192.168.32.65:9999", |
| | | "changeOrigin" : true, |
| | | "secure" : false |
| | | } |
| | | } |
| | | }, |
| | | "title" : "Asun-Mes", |
| | | "domain" : "/app" |
| | | }, |
| | | "locale" : "zh-Hans", |
| | | "fallbackLocale" : "zh-Hans" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "pigx-app", |
| | | "version": "4.4.0", |
| | | "description": "pigx ç§»å¨ç«¯è§£å³æ¹æ¡", |
| | | "main": "main.js", |
| | | "scripts": { |
| | | "test": "echo \"Error: no test specified\" && exit 1" |
| | | }, |
| | | "repository": { |
| | | "type": "git", |
| | | "url": "https://pig4cloud.com" |
| | | }, |
| | | "dependencies": { |
| | | "crypto-js": "^3.3.0", |
| | | "qs": "^6.9.7", |
| | | "vue-i18n": "^8.20.0" |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "easycom": { |
| | | "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" |
| | | }, |
| | | "pages": [ |
| | | /* ç»å½ */ |
| | | { |
| | | "path": "pages/sys/login/index", |
| | | "style": { |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | /*ç»å®ç¨æ·*/ |
| | | { |
| | | "path": "pages/sys/login/bindUser", |
| | | "style": { |
| | | "navigationBarTitleText": "ç»å®ç¨æ·" |
| | | } |
| | | }, |
| | | /*ç¨æ·ç®¡ç*/ |
| | | { |
| | | "path": "pages/sys/pigxUser/index", |
| | | "style": { |
| | | "navigationBarTitleText": "ç¨æ·ç®¡ç" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/sys/pigxUser/form", |
| | | "style": { |
| | | "navigationBarTitleText": "ç¨æ·ä¿¡æ¯" |
| | | } |
| | | }, |
| | | /*令ç管ç*/ |
| | | { |
| | | "path": "pages/sys/token/index", |
| | | "style": { |
| | | "navigationBarTitleText": "令ç管ç" |
| | | } |
| | | }, |
| | | /*æ¥å¿ç®¡ç*/ |
| | | { |
| | | "path": "pages/sys/logs/index", |
| | | "style": { |
| | | "navigationBarTitleText": "æ¥å¿ç®¡ç" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/sys/logs/form", |
| | | "style": { |
| | | "navigationBarTitleText": "æ¥å¿ä¿¡æ¯" |
| | | } |
| | | }, |
| | | /**å²ä½ç®¡ç**/ |
| | | { |
| | | "path": "pages/sys/pigxPost/index", |
| | | "style": { |
| | | "navigationBarTitleText": "å²ä½ç®¡ç" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/sys/pigxPost/form", |
| | | "style": { |
| | | "navigationBarTitleText": "å²ä½è¯¦æ
" |
| | | } |
| | | }, |
| | | /**ç§æ·ç®¡ç**/ |
| | | { |
| | | "path": "pages/sys/pigxTenant/index", |
| | | "style": { |
| | | "navigationBarTitleText": "ç§æ·ç®¡ç" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/sys/pigxTenant/form", |
| | | "style": { |
| | | "navigationBarTitleText": "ç§æ·è¯¦æ
" |
| | | } |
| | | }, |
| | | /**è§è²ç®¡ç**/ |
| | | { |
| | | "path": "pages/sys/pigxRole/index", |
| | | "style": { |
| | | "navigationBarTitleText": "è§è²ç®¡ç" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/sys/pigxRole/form", |
| | | "style": { |
| | | "navigationBarTitleText": "è§è²è¯¦æ
" |
| | | } |
| | | }, |
| | | /**åæ°ç®¡ç**/ |
| | | { |
| | | "path": "pages/sys/pigxParam/index", |
| | | "style": { |
| | | "navigationBarTitleText": "åæ°é
ç½®" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/sys/pigxParam/form", |
| | | "style": { |
| | | "navigationBarTitleText": "åæ°è¯¦æ
" |
| | | } |
| | | }, |
| | | /* 主页 */ |
| | | { |
| | | "path": "pages/sys/home/index", |
| | | "style": { |
| | | "navigationBarTitleText": "é¦é¡µ", |
| | | "navigationBarBackgroundColor": "#0052d9" |
| | | // "app-plus": { |
| | | // "titleNView": { |
| | | // "buttons": [ |
| | | // { |
| | | // "text": "æ¸
空", |
| | | // "type": "none", |
| | | // "color": "#ffffff", |
| | | // "fontSize": "14px" |
| | | // } |
| | | // ] |
| | | // } |
| | | // } |
| | | } |
| | | }, |
| | | /* ç¨æ· */ |
| | | { |
| | | "path": "pages/sys/user/index", |
| | | "style": { |
| | | "navigationBarTitleText": "ç¨æ·ä¸å¿", |
| | | "backgroundColor": "#f8f8f8", |
| | | "navigationBarBackgroundColor": "#0052d9", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/sys/user/info", |
| | | "style": { |
| | | "navigationBarTitleText": "个人信æ¯" |
| | | } |
| | | }, |
| | | { |
| | | "path": "uview-ui/components/u-avatar-cropper/u-avatar-cropper", |
| | | "style": { |
| | | "navigationBarTitleText": "头åè£åª", |
| | | "navigationBarBackgroundColor": "#000000" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/sys/user/pwd", |
| | | "style": { |
| | | "navigationBarTitleText": "ä¿®æ¹å¯ç " |
| | | } |
| | | }, |
| | | /* Common */ |
| | | { |
| | | "path": "pages/common/webview", |
| | | "style": { |
| | | "navigationBarTitleText": "æµè§ç½é¡µ" |
| | | } |
| | | }, |
| | | /** 工使µ **/ |
| | | { |
| | | "path": "pages/oa/form", |
| | | "style": { |
| | | "navigationBarTitleText": "åèµ·ä»»å¡" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/oa/history", |
| | | "style": { |
| | | "navigationBarTitleText": "请åå表" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/oa/todos", |
| | | "style": { |
| | | "navigationBarTitleText": "å¾
åä»»å¡" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/oa/task", |
| | | "style": { |
| | | "navigationBarTitleText": "ä»»å¡å¤ç" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/moveWareHouse/index", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/moveWareHouse/locNoList", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/finishProductIn/index", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/materialReturn/index", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/finishProductIn/locNoList", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/packing/personnelList", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/jumpFinishProductIn/index", |
| | | "style": { |
| | | "navigationBarTitleText": "跳线æåå
¥åº", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/pick/index", |
| | | "style": { |
| | | "navigationBarTitleText": "è´§çè¿è¾ä»»å¡å表", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/pick/materialTransfer", |
| | | "style": { |
| | | "navigationBarTitleText": "åææç§»åº", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/feed/index", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/feed/workstationList", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/feed/optaskList", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/feed/locationList", |
| | | "style": { |
| | | "navigationBarTitleText": "åºä½", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/feed/feedRecordList", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/outputRegister/index", |
| | | "style": { |
| | | "navigationBarTitleText": "产åºç»è®°", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/outputRegister/workstationList", |
| | | "style": { |
| | | "navigationBarTitleText": "å·¥ä½ç«", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/outputRegister/optaskList", |
| | | "style": { |
| | | "navigationBarTitleText": "å·¥å", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/outputRegister/addProductOut", |
| | | "style": { |
| | | "navigationBarTitleText": "æ°å¢äº§åº", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/outputRegister/shiftProductOut", |
| | | "style": { |
| | | "navigationBarTitleText": "交ç产åº", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/outputRegister/editProductOut", |
| | | "style": { |
| | | "navigationBarTitleText": "ç¼è¾äº§åº", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/outputRegister/dutyPersonList", |
| | | "style": { |
| | | "navigationBarTitleText": "å½ç人å", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/outputRegister/productInList", |
| | | "style": { |
| | | "navigationBarTitleText": "æå
¥å表", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/outputRegister/workstationFeedList", |
| | | "style": { |
| | | "navigationBarTitleText": "æºæ", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/util/bleConnect", |
| | | "style": { |
| | | "navigationBarTitleText": "èçè¿æ¥" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/outputRegister/printProductOutLabel", |
| | | "style": { |
| | | "navigationBarTitleText": "åæåæ ç¾æå°" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/pick/requirePartRecordList", |
| | | "style": { |
| | | "navigationBarTitleText": "ç©æéæ±", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/pick/moveDetailRecordList", |
| | | "style": { |
| | | "navigationBarTitleText": "ç§»åºæç»", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/pick/ifsLocationList", |
| | | "style": { |
| | | "navigationBarTitleText": "IFSåºä½", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/pick/ifsStock", |
| | | "style": { |
| | | "navigationBarTitleText": "å½åé¶ä»¶IFSåºå", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/pick/materialNeed", |
| | | "style": { |
| | | "navigationBarTitleText": "对åºç©æéæ±", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/packing/index", |
| | | "style": { |
| | | "navigationBarTitleText": "å
è£
", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/packing/form", |
| | | "style": { |
| | | "navigationBarTitleText": "æ°å¢å
è£
", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/packing/detail", |
| | | "style": { |
| | | "navigationBarTitleText": "å
è£
ç§»åº", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/outsource/index", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/outsource/report", |
| | | "style": { |
| | | "navigationBarTitleText": "æ¥æ£", |
| | | "enablePullDownRefresh": false, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/outsource/sampling", |
| | | "style": { |
| | | "navigationBarTitleText": "æ½æ£æå", |
| | | "enablePullDownRefresh": false, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/outsource/check", |
| | | "style": { |
| | | "navigationBarTitleText": "æ£æµ", |
| | | "enablePullDownRefresh": false, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/outsource/packing", |
| | | "style": { |
| | | "navigationBarTitleText": "å
è£
", |
| | | "enablePullDownRefresh": false, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/outsource/instock", |
| | | "style": { |
| | | "navigationBarTitleText": "å
¥åº", |
| | | "enablePullDownRefresh": false, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/inventory/index", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/inventory/detail", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/inventory/partchoose", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/inventory/locNoList", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/productBack/index", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/jumpZTE/jumpZTE", |
| | | "style": { |
| | | "navigationBarTitleText": "跳线ä¸å
´é²å", |
| | | "enablePullDownRefresh": false, |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wareHouse/packing/registration", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/tailHandle/index", |
| | | "style": { |
| | | "navigationBarTitleText": "å°¾æå¤ç", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/tailHandle/workstationList", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/produce/index", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/produce/operationTaskInfo", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/produce/workstationList/index", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#CEE3FE", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/produce/workstationList/workstationList", |
| | | "style": { |
| | | "navigationBarTitleText": "å·¥ä½ç«", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/produce/reportWork", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#3281FF" |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/produce/createReportWork", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#3281FF" |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/produce/editReportWork", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#3281FF" |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/produce/workstationList/dutyRecordHistory", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#3281FF" |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/produce/workstationList/unSubmitDutyRecord", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#3281FF" |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/produce/workstationList/dutyRecordWorkstation", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "", |
| | | // "navigationBarBackgroundColor": "#3281FF" |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/product/labelPrint/labelPrint", |
| | | "style": { |
| | | "navigationBarTitleText": "æ ç¾å表", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#3281FF" |
| | | } |
| | | }, |
| | | // ç产ç¸å
³ |
| | | { |
| | | "path": "pages/product/report/index", |
| | | "style": { |
| | | "navigationBarTitleText": "æ¥å·¥", |
| | | "navigationBarBackgroundColor": "#0052d9", |
| | | "app-plus": { |
| | | "titleNView": { |
| | | "buttons": [ |
| | | { |
| | | "text": "æ¸
空", |
| | | "type": "none", |
| | | "color": "#ffffff", |
| | | "fontSize": "14px" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | // æ¥æ¥ç¸å
³ |
| | | { |
| | | "path": "pages/daily/common/work-order-list", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "å·¥åå表", |
| | | "navigationBarTextStyle": "black", |
| | | "navigationBarBackgroundColor": "#DAE6FB" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/daily/production-person/production-person", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "人åå表", |
| | | "navigationBarTextStyle": "black", |
| | | "navigationBarBackgroundColor": "#DAE6FB" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/daily/handyman/handyman", |
| | | "style": { |
| | | "navigationBarTitleText": "æå·¥", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#214DED" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/daily/daily/daily-list", |
| | | "style": { |
| | | "navigationBarTitleText": "æ¥æ¥è®°å½", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#214DED" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/daily/workstation/index", |
| | | "style": { |
| | | "navigationBarTitleText": "å·¥ä½ç«", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#214DED" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/daily/tag-list/index", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/daily/tag-list/add", |
| | | "style": { |
| | | "navigationBarTitleText": "çææ°é", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#214DED" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/daily/common/work-reporting", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/daily/common/work-reporting-detail", |
| | | "style": { |
| | | "navigationStyle": "custom", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | } |
| | | ], |
| | | "subPackages": [], |
| | | "preloadRule": {}, |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarTitleText": "PIGCLOUD", |
| | | "navigationBarBackgroundColor": "#f8f8f8" |
| | | }, |
| | | "tabBar": { |
| | | "color": "#909399", |
| | | "selectedColor": "#303133", |
| | | "backgroundColor": "#ffffff", |
| | | "borderStyle": "white", |
| | | "list": [ |
| | | { |
| | | "pagePath": "pages/sys/home/index", |
| | | "iconPath": "static/custom/tabbar/home_1.png", |
| | | "selectedIconPath": "static/custom/tabbar/home_2.png", |
| | | "text": "主页" |
| | | }, |
| | | { |
| | | "pagePath": "pages/sys/user/index", |
| | | "iconPath": "static/custom/tabbar/my_1.png", |
| | | "selectedIconPath": "static/custom/tabbar/my_2.png", |
| | | "text": "æç" |
| | | } |
| | | ] |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .wrap { |
| | | |
| | | .search{ |
| | | padding: 20rpx 20rpx 0; |
| | | background: #f8f8f8; |
| | | height: 105rpx; |
| | | } |
| | | |
| | | .scroll-list { |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 105rpx); // 105rpx 为 .search çé«åº¦ |
| | | width: 100%; |
| | | |
| | | .loadmore { |
| | | padding: 30rpx; |
| | | } |
| | | } |
| | | |
| | | .box { |
| | | padding-bottom: 10rpx; |
| | | |
| | | .item { |
| | | margin: 0 20rpx 20rpx; |
| | | padding: 8rpx 20rpx; |
| | | border-radius: 20rpx; |
| | | box-sizing: border-box; |
| | | background-color: #fff; |
| | | font-size: 28rpx; |
| | | |
| | | .title { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | background-color: #fff; |
| | | padding-left: 15rpx; |
| | | align-items: center; |
| | | |
| | | .text { |
| | | margin: 0 20rpx; |
| | | font-size: 35rpx; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | .list { |
| | | |
| | | .u-cell-item-box { |
| | | |
| | | .u-swipe-content { |
| | | width: 750rpx; |
| | | } |
| | | |
| | | .u-cell_title { |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | min-width: 655rpx; |
| | | } |
| | | |
| | | .u-border-bottom:last-child:after { |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .form { |
| | | display: flex; |
| | | flex-direction: column; |
| | | padding: 20rpx 30rpx; |
| | | |
| | | .u-cell-item-box { |
| | | border-radius: 20rpx; |
| | | } |
| | | } |
| | | |
| | | .form-footer { |
| | | display: flex; |
| | | margin: 10rpx; |
| | | padding-bottom: 30rpx; |
| | | |
| | | .btn { |
| | | flex: 1; |
| | | margin: 10rpx; |
| | | } |
| | | } |
| | | |
| | | .u-cell-box { |
| | | |
| | | .u-cell { |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .u-cell_title { |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .u-cell__left-icon-wrap { |
| | | margin-right: 18rpx; |
| | | } |
| | | } |
| | | |
| | | .span-lable { |
| | | padding-right: 20rpx; |
| | | color: #909399; |
| | | } |
| | | |
| | | .row-list { |
| | | padding-top: 10rpx; |
| | | } |
| | | |
| | | .card-foot { |
| | | text-align: center; |
| | | button { |
| | | margin: 20rpx; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | .btn-plus { |
| | | position: fixed; |
| | | bottom: 2rem; |
| | | right: 0.5rem; |
| | | z-index: 9999; |
| | | } |
| | | |
| | | .btn-plus:hover { |
| | | opacity: 1; |
| | | } |
| | | |
| | | .u-icon { |
| | | position: relative; |
| | | color: #9E9E9E; |
| | | } |
| | | |
| | | .view-fixed-one { |
| | | position: fixed; |
| | | bottom: 4.5rem; |
| | | right: 0.5rem; |
| | | z-index: 9999; |
| | | } |
| | | |
| | | .view-fixed-two { |
| | | position: fixed; |
| | | bottom: 0rem; |
| | | right: 0rem; |
| | | z-index: 9999; |
| | | } |
| | | |
| | | .mask-content{ |
| | | height: 100%; |
| | | background-color: #fff; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <web-view :webview-styles="webviewStyles" :src="webviewUrl"></web-view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | /** |
| | | * Copyright (c) 2013-Now http://jeesite.com All rights reserved. |
| | | */ |
| | | export default { |
| | | data() { |
| | | return { |
| | | webviewUrl: '', |
| | | webviewStyles: { |
| | | progress: { |
| | | color: '#FF7200' |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | this.webviewUrl = decodeURIComponent(params.url); |
| | | if (params.title != ''){ |
| | | uni.setNavigationBarTitle({ |
| | | title: params.title |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="work-order-list"> |
| | | <view class="page-head"> |
| | | <u-navbar title="å·¥åå表" :border-bottom="false" |
| | | :background="background" |
| | | :title-bold="true" title-color="#000" |
| | | back-icon-color="#000" /> |
| | | <view class="search"> |
| | | <u-search placeholder="请è¾å
¥éå®è®¢åå·æç´¢" v-model="query.keyWord" bgColor="#fff" |
| | | placeholderColor="#999999" :showAction="false" style="margin: 35rpx;" |
| | | searchIconColor="#6A6A6A" height="74" @search="search" @change="search"></u-search> |
| | | <u-icon name="scan" color="#2979ff" size="40" class="icon" @click="scanCode"></u-icon> |
| | | </view> |
| | | <view class="tab"> |
| | | <span v-for="(item,index) in tabs" :key="index" @click="changeTab(item)" :class="{active:currentTab===item.value}">{{ item.label }}</span> |
| | | </view> |
| | | </view> |
| | | <scroll-view class="scroll-list" scroll-y="true"> |
| | | <view v-for="(item,index) in list" :key="'item'+index" class="list-item"> |
| | | <view class="work" @click="goWorkReporting(item)"> |
| | | <span>æ¥å·¥</span> |
| | | <u-icon class="icon_right" size="24rpx"/> |
| | | </view> |
| | | <h4> |
| | | <u-icon class="icon_5" size="24rpx"/> |
| | | <text selectable="true">{{ item.optaskNo }}</text> |
| | | </h4> |
| | | <view class="item-box"> |
| | | <p> |
| | | <u-icon class="icon_7" size="24rpx"/> |
| | | <text selectable="true">å¾å·ï¼{{item.drawNo}}</text> |
| | | </p> |
| | | <p> |
| | | <u-icon class="icon_6" size="24rpx"/> |
| | | <text selectable="true">é¶ä»¶åç§°ï¼{{item.partName}}</text> |
| | | </p> |
| | | <p> |
| | | <u-icon class="icon_8" size="24rpx"/> |
| | | <text selectable>计å宿æ¶é´ï¼{{item.plannedFinishDate}}</text> |
| | | </p> |
| | | <view class="progress"> |
| | | <u-line-progress :percent="(item.completedQuantity/item.plannedQuantity)*100" :show-percent="false" :round="false" |
| | | active-color="#214DED" height="23" style="margin-left: 30rpx;"></u-line-progress> |
| | | <span style="font-weight: 500;font-size: 26rpx;color: #999999;margin-left: 18rpx;"><span style="color: #333333;">{{ item.completedQuantity }}</span>/{{ item.plannedQuantity }}</span> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <p v-if="list.length === 0" style="text-align: center;margin-top: 100rpx;color: rgb(96, 98, 102); |
| | | font-size: 28rpx;">ææ æ°æ®</p> |
| | | </scroll-view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import content_bg from '@/static/custom/daily/img8.png' |
| | | import UIcon from "../../../uview-ui/components/u-icon/u-icon.vue"; |
| | | |
| | | export default { |
| | | components: {UIcon}, |
| | | data() { |
| | | return { |
| | | background: { |
| | | // background:'transparent' |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: 'fixed', |
| | | backgroundSize: '100% auto', |
| | | backgroundRepeat: 'no-repeat', |
| | | }, |
| | | tabs:[ |
| | | { |
| | | label: 'å
¨é¨', |
| | | value: '' |
| | | }, |
| | | { |
| | | label: 'å¾
å¼å§', |
| | | value: '01pending' |
| | | }, |
| | | { |
| | | label: 'è¿è¡ä¸', |
| | | value: '02inProgress' |
| | | }, |
| | | ], |
| | | currentTab: '', |
| | | loadStatus: 'loadmore', |
| | | total:0, |
| | | query:{ |
| | | workstationId: '', |
| | | toId: '', |
| | | clazzType: '', |
| | | state: '', |
| | | keyWord: '' |
| | | }, |
| | | list:[], |
| | | toId: '', |
| | | workstationId: '', |
| | | dutyNo: '', |
| | | clazzType: '', |
| | | userStaffNo: [], |
| | | workstationName: '', |
| | | staffNameJoin: '' |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | this.workstationId = e.workstationId |
| | | this.toId = e.toId |
| | | this.clazzType = e.clazzType |
| | | this.dutyNo = e.dutyNo |
| | | this.userStaffNo = e.userStaffNo |
| | | this.workstationName = e.workstationName |
| | | this.staffNameJoin = e.staffNameJoin |
| | | |
| | | this.query = { |
| | | workstationId: this.workstationId, |
| | | toId: this.toId, |
| | | clazzType: this.clazzType |
| | | } |
| | | this.loadList(); |
| | | }, |
| | | onShow () { |
| | | this.loadList(); |
| | | }, |
| | | methods: { |
| | | changeTab(item){ |
| | | this.currentTab = item.value; |
| | | this.search() |
| | | }, |
| | | // 卿¤å è½½å表 |
| | | loadList(){ |
| | | this.$u.api.dailyPaper.getOperationTask(this.query).then(res => { |
| | | console.log(res) |
| | | if (res.code === 0) { |
| | | this.list = res.data |
| | | this.list.forEach(item => { |
| | | item.plannedFinishDate = item.plannedFinishDate.slice(0,10) |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | // æç´¢ |
| | | search(e){ |
| | | if (e) { |
| | | this.query.keyWord = e |
| | | } else { |
| | | this.query = { |
| | | workstationId: this.workstationId, |
| | | toId: this.toId, |
| | | clazzType: this.clazzType, |
| | | state: this.currentTab |
| | | } |
| | | } |
| | | this.loadList() |
| | | }, |
| | | scanCode() { |
| | | uni.scanCode({ |
| | | success: async (res) => { |
| | | // æ«æç»æå¤çé»è¾ |
| | | uni.showToast({ |
| | | title: 'æ«ç æå', |
| | | icon: 'success' |
| | | }) |
| | | // å°æ«ç ç»æä¿åå°scanResultåéä¸ |
| | | var jsonObject = JSON.parse(res.result); |
| | | this.query.keyWord = jsonObject.order_no |
| | | this.search(jsonObject.order_no) |
| | | }, |
| | | fail: (err) => { |
| | | console.error('æ«æå¤±è´¥ï¼' + err); |
| | | } |
| | | }); |
| | | }, |
| | | goWorkReporting (item) { |
| | | item.workstationId = this.workstationId |
| | | item.clazzType = this.clazzType |
| | | item.dutyNo = this.dutyNo |
| | | item.userStaffNo = this.userStaffNo |
| | | item.workstationName = this.workstationName |
| | | item.staffNameJoin = this.staffNameJoin |
| | | uni.navigateTo({ |
| | | url: '/pages/daily/common/work-reporting?info=' + encodeURIComponent(JSON.stringify(item)) |
| | | }) |
| | | }, |
| | | goWorkReportingDetail (item) { |
| | | if(item.workCenter == 'TX-01'&&item.operationName=="横åª"){ |
| | | item.workstationId = this.workstationId |
| | | item.clazzType = this.clazzType |
| | | item.dutyNo = this.dutyNo |
| | | item.userStaffNo = this.userStaffNo |
| | | item.workstationName = this.workstationName |
| | | item.staffNameJoin = this.staffNameJoin |
| | | uni.navigateTo({ |
| | | url: '/pages/daily/common/work-reporting-detail?info=' + encodeURIComponent(JSON.stringify(item)) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .work-order-list{ |
| | | width: 100%; |
| | | height: 100vh; |
| | | background: #E6EFFF; |
| | | overflow-y: auto; |
| | | box-sizing: border-box; |
| | | padding-bottom: 24rpx; |
| | | position: relative; |
| | | .page-head{ |
| | | height: 376rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | //justify-content: flex-start; |
| | | background-image: url('~@/static/custom/daily/img8.png'); |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | position: fixed; |
| | | width: 100%; |
| | | z-index: 99; |
| | | .search{ |
| | | position: relative; |
| | | .icon{ |
| | | position: absolute; |
| | | right: 60rpx; |
| | | top: 50%; |
| | | transform: translate(0,-50%); |
| | | } |
| | | } |
| | | .tab{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | box-sizing: border-box; |
| | | padding: 0 32rpx; |
| | | font-weight: 500; |
| | | font-size: 36rpx; |
| | | color: #333333; |
| | | span.active{ |
| | | color: #214DED; |
| | | } |
| | | } |
| | | } |
| | | .scroll-list{ |
| | | box-sizing: border-box; |
| | | padding: 0 32rpx; |
| | | top: 376rpx; |
| | | overflow-y: auto; |
| | | position: absolute; |
| | | .list-item{ |
| | | background: #FFFFFF; |
| | | border-radius: 10rpx; |
| | | box-sizing: border-box; |
| | | padding: 32rpx 16rpx; |
| | | margin-bottom: 20rpx; |
| | | position: relative; |
| | | h4{ |
| | | display: flex; |
| | | align-items: center; |
| | | font-weight: bold; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | margin-bottom: 25rpx; |
| | | .icon_5 { |
| | | background-image: url('~@/static/custom/daily/icon_5.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 6rpx; |
| | | position: relative; |
| | | } |
| | | } |
| | | .item-box{ |
| | | background: #F5F9FF; |
| | | border-radius: 10rpx; |
| | | box-sizing: border-box; |
| | | padding: 30rpx 24rpx; |
| | | p{ |
| | | font-weight: 500; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | margin-bottom: 24rpx; |
| | | .icon_7 { |
| | | background-image: url('~@/static/custom/daily/icon_7.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 6rpx; |
| | | margin-bottom: 6rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | .icon_6 { |
| | | background-image: url('~@/static/custom/daily/icon_6.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 6rpx; |
| | | margin-bottom: 6rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | .icon_8 { |
| | | background-image: url('~@/static/custom/daily/icon_8.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 6rpx; |
| | | margin-bottom: 6rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | } |
| | | .progress{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | } |
| | | .work{ |
| | | position: absolute; |
| | | right: 0; |
| | | top: 0; |
| | | width: 136rpx; |
| | | height: 56rpx; |
| | | background-image: url('~@/static/custom/daily/icon_bt_bg.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #FFFFFF; |
| | | font-weight: 500; |
| | | font-size: 30rpx; |
| | | .icon_right { |
| | | background-image: url('~@/static/custom/daily/icon_right.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-left: 10rpx; |
| | | margin-top: 4rpx; |
| | | position: relative; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ::v-deep.u-close-wrap { |
| | | position: absolute; |
| | | right: 110rpx; |
| | | } |
| | | ::v-deep.uni-input-input { |
| | | width: 82%; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="work-reporting"> |
| | | <u-navbar title="æ¥å·¥è¯¦æ
" :border-bottom="false" :background="background" :title-size="40" :title-bold="true" |
| | | title-color="#FFFFFF" back-icon-color="#fff"> |
| | | <view class="navbar-right" slot="right" @click="searchDevice"> |
| | | æç´¢è®¾å¤ |
| | | </view> |
| | | </u-navbar> |
| | | <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y"> |
| | | <view class="form"> |
| | | <h3 class="form-title">æ¥å·¥ä¿¡æ¯</h3> |
| | | <u-icon class="icon_report" size="170rpx" /> |
| | | <u-form :model="form" ref="uForm"> |
| | | <!--å°æ°--> |
| | | <u-form-item label="å°æ°" prop="qty" required :label-width="180"> |
| | | <u-input v-model="form.qty" placeholder="请è¾å
¥" /> |
| | | </u-form-item> |
| | | <!--产åºç±»å«--> |
| | | <u-form-item label="产åºç±»å«" prop="outputCategoryLabel" required :label-width="180"> |
| | | <u-input v-model="form.outputCategoryLabel" placeholder="è¯·éæ©" /> |
| | | </u-form-item> |
| | | <!--ç宽--> |
| | | <u-form-item label="ç宽" prop="sliceWidth" required |
| | | :label-width="180"> |
| | | <u-input v-model="form.sliceWidth" placeholder="è¯·éæ©" /> |
| | | </u-form-item> |
| | | <!--çææ°é--> |
| | | <u-form-item label="çææ°é" prop="sliceQty" required :label-width="180"> |
| | | <u-input v-model="form.sliceQty" placeholder="请è¾å
¥" /> |
| | | </u-form-item> |
| | | </u-form> |
| | | </view> |
| | | <view class="scan-code-feeding"> |
| | | <h3 class="form-title">æ«ç ææ</h3> |
| | | <view class="infoform" v-for="(item,index) in infoFormList" :key="'item'+index"> |
| | | <p> |
| | | <u-icon class="icon_zl" size="24rpx" /> |
| | | <span style="margin-right: 18rpx">å©ä½éé:</span> |
| | | <u-input :border="true" v-model="item.qtyRequired" label="å©ä½éé" |
| | | style="width: 450rpx;height: 56rpx;display: inline-flex;background: #F6FAFF;border-radius: 8rpx;border: 1px solid #214DED;align-items: center;"></u-input> |
| | | </p> |
| | | <p> |
| | | <u-icon class="icon_7" size="24rpx" /> |
| | | <span>æ¹æ¬¡å·:{{item.lotBatchNo}}</span> |
| | | </p> |
| | | <p> |
| | | <u-icon class="icon_6" size="24rpx" /> |
| | | <span>é¶ä»¶åç§°ï¼{{item.partName}}</span> |
| | | </p> |
| | | <u-divider :use-slot="false" half-width="640"></u-divider> |
| | | <view class="buttonFlex"> |
| | | <button class="primary-button" type="primary" |
| | | plain="true" @click="printQrCode(item)"> |
| | | <u-icon class="icon_dy" size="32rpx" /> |
| | | æ ç¾æå° |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | <u-toast ref="uToast" /> |
| | | <view v-if="maskShow" class="uni-mask" @touchmove.stop.prevent="moveHandle" @click="maskclose"> |
| | | <scroll-view class="uni-scroll_box" scroll-y @touchmove.stop.prevent="moveHandle" @click.stop="moveHandle"> |
| | | <view class="uni-list-box" v-for="(item, index) in listDevice" :key="index" @click="tapQuery(item)"> |
| | | <view> |
| | | <view class="uni-list_name">åç§°ï¼{{ item.name }}</view> |
| | | <view class="uni-list_item">UUID:{{ item.address }}</view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import UIcon from "../../../uview-ui/components/u-icon/u-icon.vue"; |
| | | import { |
| | | dateFormat |
| | | } from "../../../utils/date" |
| | | |
| | | const jcapi = uni.requireNativePlugin("JCSDK-JCApiModule"); |
| | | |
| | | // äºç»´ç ç±»å |
| | | const QrCodeType = { |
| | | QrCode: 31, |
| | | PDF417: 32, |
| | | DataMatrix: 33, |
| | | AZTEC: 34 |
| | | } |
| | | // 线æ¡ç±»å |
| | | const LineType = { |
| | | Solid: 1, // å®çº¿ |
| | | Dotted: 2, // è线ï¼é»è®¤èå®1:1ç¸é´ï¼ |
| | | } |
| | | // æ¢è¡æ¹å¼ |
| | | const LineModeType = { |
| | | Justified: 1, // 宽é«åºå®ï¼å
容èªéåºï¼åå·/åé´è·/è¡é´è·ææ¯ä¾ç¼©æ¾ï¼ |
| | | AutoHeight: 2, // 宽度åºå®ï¼é«åº¦èªéåº |
| | | Fixed: 4, // 宽é«åºå®ï¼è¶
åºé¨åè£åª |
| | | Adapt: 6, // 宽é«åºå®ï¼å
容è¶
è¿æ¶é¢è®¾å®½é«èªå¨ç¼©å° |
| | | } |
| | | |
| | | export default { |
| | | name: "work-reporting", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { |
| | | UIcon |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | background: { |
| | | backgroundColor: '#214DED', |
| | | }, |
| | | scrollTop: 0, |
| | | form: { |
| | | clazzType: '', // çæ¬¡ |
| | | dutyNo: '', // çæ¬¡ç¼å· |
| | | locationId: '', // åºä½id |
| | | operationTaskId: '', // å·¥åid |
| | | reportTime: '', // æäº¤æ¶é´ |
| | | labelNo: '', // æ¡ç ç¼å· |
| | | qty: '', // å°æ° |
| | | drawNo: '', // å¾å· |
| | | finishQty: '', // 宿æ°é |
| | | identifyingQr: '', // 线å车é´-è¿è´¦-æ«ç ç»æ |
| | | type: '', // ç±»åéæ©å¨ï¼value |
| | | typeLabel: '', // ç±»åéæ©å¨ï¼label |
| | | operationType: '', // å·¥åºç±»åéæ©å¨ï¼value |
| | | operationTypeLabel: '', // å·¥åºç±»åéæ©å¨ï¼label |
| | | outputCategory: '', // 产åºç±»å«ï¼value |
| | | outputCategoryLabel: '', // 产åºç±»å«ï¼label |
| | | length: '', // é¿åº¦, |
| | | siliconSteelCode: '', // æ«ç è·ååå®¶ä¿¡æ¯æ¥ææ£ä¿¡æ¯ |
| | | sliceWidth: '', // ç宽 |
| | | sliceQty: '', // çææ°é |
| | | clampOtherWeight: '', // 夹件åå
¶ä»éé |
| | | }, |
| | | num: '', |
| | | rules: { |
| | | labelNo: [{ |
| | | required: true, |
| | | message: 'è¯·éæ©æ«ç æè¾å
¥ç¼å·', |
| | | trigger: ['blur'], |
| | | }], |
| | | typeLabel: [ // ç±»å |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©ç±»å', |
| | | trigger: ['change'], |
| | | } |
| | | ], |
| | | qty: [ // å°æ° |
| | | { |
| | | required: true, |
| | | message: '请填åå°æ°', |
| | | trigger: ['blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.number(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å¼', |
| | | trigger: ['blur'], |
| | | }, |
| | | ], |
| | | operationTypeLabel: [ // å·¥åºç±»å |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©å·¥åºç±»å', |
| | | trigger: ['change'], |
| | | } |
| | | ], |
| | | finishQty: [ // 宿æ°é |
| | | { |
| | | required: true, |
| | | message: '请填å宿æ°é', |
| | | trigger: ['blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.number(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å¼', |
| | | trigger: ['blur'], |
| | | }, |
| | | ], |
| | | length: [ // é¿åº¦, |
| | | { |
| | | required: true, |
| | | message: '请填åé¿åº¦', |
| | | trigger: ['blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.number(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å¼', |
| | | trigger: ['blur'], |
| | | }, |
| | | ], |
| | | outputCategoryLabel: [ // ç宽 |
| | | { |
| | | required: true, |
| | | message: '请填åç宽', |
| | | trigger: ['change'], |
| | | } |
| | | ], |
| | | sliceQty: [ // çææ°é |
| | | { |
| | | required: true, |
| | | message: '请填åçææ°é', |
| | | trigger: ['blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.number(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å¼', |
| | | trigger: ['blur'], |
| | | }, |
| | | ], |
| | | clampOtherWeight: [ // 夹件åå
¶ä»éé |
| | | { |
| | | required: true, |
| | | message: '请填å夹件åå
¶ä»éé', |
| | | trigger: ['blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.number(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å¼', |
| | | trigger: ['blur'], |
| | | }, |
| | | ], |
| | | prodWeight: [ // æåéé |
| | | { |
| | | required: true, |
| | | message: '请填åæåéé', |
| | | trigger: ['blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.number(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å¼', |
| | | trigger: ['blur'], |
| | | }, |
| | | ] |
| | | }, |
| | | showTypeSelect: false, |
| | | workTypeSelect: false, |
| | | operationTypeSelect: false, |
| | | showOutputCategory: false, |
| | | infoFormList: [], |
| | | hvCoilFormList: [], //ç®±ä½é«å |
| | | lvCoilFormList: [], //ç®±ä½ä½å |
| | | workOrder: '', |
| | | id: '', |
| | | isSubmit: false, |
| | | show: false, |
| | | deleteIndex: '', |
| | | workTypeList: [], // ç±»ålist |
| | | operationTypeList: [], // å·¥åºç±»ålist |
| | | outputCategoryList: [], // 产åºç±»å« |
| | | maskShow: false, |
| | | listDevice: [], //èçè®¾å¤æ°æ® |
| | | isFanAssembly: false, // æ¯å¦ä¸ºé£æºè£
é
|
| | | isOilChange: false, // é¶ä»¶åç§°å
嫿²¹å |
| | | } |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | moveHandle() { |
| | | |
| | | }, |
| | | maskclose() { |
| | | |
| | | }, |
| | | //æå°äºç»´ç |
| | | async printQrCode(item) { |
| | | const params = { |
| | | rwMatlBindId: item.id |
| | | } |
| | | let res = await this.$u.api.dailyPaper.zongjianLabelInfo(params) |
| | | if (!res.data) { |
| | | this.$refs.uToast.show({ |
| | | title: 'æªæ¥è¯¢å°è¯¥æ ç¾ä¿¡æ¯ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | return |
| | | } |
| | | // åå§åç»æ¿ |
| | | jcapi.initDrawingBoard({ |
| | | width: 50, |
| | | height: 100, |
| | | rotate: 0 |
| | | }); |
| | | |
| | | // // ç»å¶äºç»´ç |
| | | jcapi.drawLabelQrCode({ |
| | | x: 14.5, |
| | | y: 74, |
| | | width: 20, |
| | | height: 20, |
| | | value: jsonString, |
| | | rotate: 0, |
| | | codeType: QrCodeType.QrCode, |
| | | }); |
| | | // ç»å¶æ¨ªçº¿ å®çº¿8æ¡ |
| | | let sum = 4; |
| | | for (let i = 1; i < 13; i++) { |
| | | this.getDrawLabelLine(4, sum, 46, 0.5, 0, LineType.Solid) // å®çº¿ |
| | | sum = (i * 6) + 4 |
| | | } |
| | | // äºç»´ç å¤§æ¡ |
| | | this.getDrawLabelLine(4, 97, 46, 0.5, 0, LineType.Solid) // å®çº¿9 |
| | | |
| | | //ç»å¶ç«çº¿ |
| | | this.getDrawLabelLine(4, 4, 0.5, 97, 0, LineType.Solid) // ç«çº¿1 |
| | | this.getDrawLabelLine(20, 4, 0.5, 66, 0, LineType.Solid) // ç«çº¿2 |
| | | this.getDrawLabelLine(44.5, 4, 0.5, 97, 0, LineType.Solid) // ç«çº¿2 |
| | | |
| | | // å¡«å²æåæ é¢ |
| | | this.getDrawLabelText(5, 5, 20, 20, 'ç¼ å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 11, 20, 20, 'å·¥åå·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 17, 20, 20, 'ç å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 23, 20, 20, 'ç宽ï¼mmï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 29, 20, 20, 'å度ï¼mmï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 35, 20, 20, 'ééï¼KGï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 41, 20, 20, 'é¿åº¦ï¼mï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 47, 20, 20, 'ç产人:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 53, 20, 20, 'ç产æ¶é´:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 59, 20, 20, 'åå®¶:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 65, 20, 20, 'éæ:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | |
| | | // // å¡«å²åæ°å¼ |
| | | this.getDrawLabelText(22, 5, 35, 12, labelNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 11, 35, 12, optaskNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 17, 35, 12, grade, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 23, 35, 12, sliceWidth, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 29, 35, 12, thickness, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 35, 35, 12, wweight, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 41, 35, 12, llength, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 47, 35, 12, reportName, 2, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 53, 35, 12, reportTime, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 59, 35, 12, supplierVenderName, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 65, 35, 12, ironLoss, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | |
| | | // çææå°æ°æ® |
| | | let imageJsonObj = jcapi.generateLabelJson() |
| | | // 设置æå°ä»»å¡ |
| | | jcapi.startJob({ |
| | | totalCount: 1, |
| | | density: this.printDensity, |
| | | labelType: this.labelType, |
| | | printMode: this.printMode, |
| | | }, function(r) { |
| | | if (r.code == 0) { |
| | | // æå°æ°æ® |
| | | jcapi.printData(imageJsonObj, { |
| | | "printQuantity": 1, |
| | | }, function(r) { |
| | | if (r.code == 0) { |
| | | console.log("æå°æå") |
| | | } else { |
| | | console.log("æå°å¤±è´¥") |
| | | } |
| | | }) |
| | | } else { |
| | | console.log("设置æå°ä»»å¡å¤±è´¥") |
| | | } |
| | | }) |
| | | }, |
| | | tapQuery(item) { |
| | | this.maskShow = false |
| | | // è¿æ¥æå°æº |
| | | let _this = this; |
| | | console.log(item) |
| | | jcapi.openPrinterByDevice({ |
| | | address: item.address, |
| | | name: item.name, |
| | | deviceType: item.deviceType // 设å¤ç±»åï¼0-èçï¼1-ç½ç» |
| | | }, function(r) { |
| | | uni.showToast({ |
| | | title: (r.code == 0) ? "è¿æ¥æå" : "è¿æ¥å¤±è´¥", |
| | | duration: 2 * 1000 |
| | | }) |
| | | if (r.code == 0) { |
| | | _this.connectedDevice = item |
| | | } |
| | | }) |
| | | }, |
| | | //æå°ç¸å
³ |
| | | searchDevice() { |
| | | let _this = this |
| | | uni.openBluetoothAdapter({ // 确认èçæ¯å¦æå¼ |
| | | success(r) { |
| | | uni.showLoading({ |
| | | title: "æç´¢ä¸..." |
| | | }) |
| | | // æªæäºèçç¸å
³æéåæªæå¼ææºå®ä½ä¼æç´¢ä¸å°è®¾å¤ |
| | | jcapi.getBluetoothDevices(function(r) { |
| | | console.log("device:" + JSON.stringify(r)) |
| | | // æç´¢å°è®¾å¤åè° |
| | | uni.hideLoading() |
| | | _this.listDevice = r; |
| | | _this.maskShow = true |
| | | }) |
| | | }, |
| | | fail(e) { |
| | | uni.showModal({ |
| | | confirmText: "æå¼èç失败" |
| | | }) |
| | | console.log("å¼å¯èç设å¤å¤±è´¥" + e) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | // åå§åSDK |
| | | jcapi.initSDK() |
| | | // çå¬é¡µç åè° |
| | | jcapi.didReadPrintCountInfo(function(r) { |
| | | console.log(r) |
| | | }) |
| | | |
| | | // çå¬é误åè° |
| | | jcapi.didReadPrintErrorInfo(function(r) { |
| | | console.log(r) |
| | | if (r.code == 23) { |
| | | // æå°æºæå¼è¿æ¥ |
| | | _this.connectedDevice = null |
| | | } |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: JSON.stringify(r), |
| | | duration: 2 * 1000 |
| | | }) |
| | | }) |
| | | this.workOrder = JSON.parse(decodeURIComponent(options.info)) |
| | | console.log(this.workOrder) |
| | | this.$u.api.dailyPaper.productReportDetail({ |
| | | id: this.workOrder.id, |
| | | type:"" |
| | | }).then((res) => { |
| | | console.log(res) |
| | | }) |
| | | |
| | | }, |
| | | onReady() { |
| | | this.$refs.uForm.setRules(this.rules); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .uni-list_name { |
| | | font-size: 30rpx; |
| | | color: #333; |
| | | } |
| | | |
| | | .uni-list_item { |
| | | font-size: 24rpx; |
| | | color: #555; |
| | | line-height: 1.5; |
| | | } |
| | | |
| | | .uni-list-box { |
| | | margin: 0 20rpx; |
| | | padding: 15rpx 0; |
| | | border-bottom: 1px #f5f5f5 solid; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .uni-scroll_box { |
| | | height: 70%; |
| | | background: #fff; |
| | | border-radius: 20rpx; |
| | | } |
| | | |
| | | .uni-mask { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | bottom: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | width: 100%; |
| | | background: rgba(0, 0, 0, 0.6); |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .work-reporting { |
| | | background-color: #e6f0ff; |
| | | width: 100%; |
| | | height: 100vh; |
| | | box-sizing: border-box; |
| | | |
| | | ::v-deep.navbar-right { |
| | | font-weight: 500; |
| | | font-size: 28rpx; |
| | | color: #FFFFFF; |
| | | line-height: 36rpx; |
| | | margin-right: 32rpx; |
| | | } |
| | | |
| | | .scroll-Y { |
| | | width: 100%; |
| | | height: calc(100vh - 270rpx); |
| | | |
| | | .form { |
| | | background: linear-gradient(180deg, #D8E8FF 0%, #FFFFFF 100%); |
| | | border-radius: 10rpx; |
| | | margin: 68rpx 30rpx 0; |
| | | padding: 36rpx 26rpx 0; |
| | | position: relative; |
| | | |
| | | .form-title { |
| | | font-weight: 800; |
| | | font-size: 34rpx; |
| | | color: #1D2541; |
| | | margin-bottom: 30rpx; |
| | | } |
| | | |
| | | .icon_report { |
| | | background-image: url('~@/static/custom/daily/icon_report.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 170rpx; |
| | | width: 170rpx; |
| | | position: absolute; |
| | | top: -64rpx; |
| | | right: -30rpx; |
| | | } |
| | | } |
| | | |
| | | .scan-code-feeding { |
| | | background: linear-gradient(180deg, #D8E8FF 0%, #F3F8FF 100%); |
| | | border-radius: 10rpx; |
| | | margin: 20rpx 30rpx 68rpx; |
| | | padding: 36rpx 16rpx 58rpx; |
| | | position: relative; |
| | | |
| | | .form-title { |
| | | font-weight: 800; |
| | | font-size: 34rpx; |
| | | color: #1D2541; |
| | | padding-left: 10rpx; |
| | | margin-bottom: 30rpx; |
| | | } |
| | | |
| | | .icon_camera { |
| | | background-image: url('~@/static/custom/daily/icon_camera.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 82rpx; |
| | | width: 82rpx; |
| | | position: absolute; |
| | | top: 18rpx; |
| | | right: 28rpx; |
| | | } |
| | | |
| | | .infoform { |
| | | background: #FFFFFF; |
| | | border-radius: 10rpx; |
| | | border: 1px solid #EAF2FF; |
| | | box-sizing: border-box; |
| | | padding: 30rpx 24rpx; |
| | | margin-top: 20rpx; |
| | | |
| | | p { |
| | | font-weight: 500; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | margin-bottom: 24rpx; |
| | | |
| | | .icon_zl { |
| | | background-image: url('~@/static/custom/daily/icon_zl.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 6rpx; |
| | | margin-bottom: 6rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | |
| | | .icon_7 { |
| | | background-image: url('~@/static/custom/daily/icon_7.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 6rpx; |
| | | margin-bottom: 6rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | |
| | | .icon_6 { |
| | | background-image: url('~@/static/custom/daily/icon_6.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 6rpx; |
| | | margin-bottom: 6rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | } |
| | | |
| | | .buttonFlex { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | flex-direction: row; |
| | | |
| | | .delete-button { |
| | | height: 66rpx; |
| | | background: #FFFFFF; |
| | | border-radius: 8rpx; |
| | | border: 1px solid #D6655C; |
| | | font-weight: 500; |
| | | font-size: 28rpx; |
| | | color: #D6655C; |
| | | margin: 24rpx 24rpx 0 206rpx; |
| | | line-height: 66rpx; |
| | | |
| | | .icon_del { |
| | | background-image: url('~@/static/custom/daily/icon_del.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 32rpx; |
| | | width: 32rpx; |
| | | margin-right: 8rpx; |
| | | margin-bottom: 8rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | } |
| | | |
| | | .primary-button { |
| | | height: 66rpx; |
| | | background: #FFFFFF; |
| | | border-radius: 8rpx; |
| | | border: 1px solid #214DED; |
| | | font-weight: 500; |
| | | font-size: 28rpx; |
| | | color: #214DED; |
| | | line-height: 66rpx; |
| | | margin: 24rpx 0 0 0; |
| | | |
| | | .icon_dy { |
| | | background-image: url('~@/static/custom/daily/icon_dy.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 32rpx; |
| | | width: 32rpx; |
| | | margin-right: 8rpx; |
| | | margin-bottom: 8rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .bottom { |
| | | width: 100vw; |
| | | position: fixed; |
| | | bottom: 60rpx; |
| | | |
| | | .u-button { |
| | | width: 690rpx; |
| | | height: 80rpx; |
| | | background: #214DED; |
| | | border-radius: 8rpx; |
| | | font-weight: 500; |
| | | font-size: 34rpx; |
| | | color: #FFFFFF; |
| | | z-index: 99; |
| | | } |
| | | } |
| | | } |
| | | |
| | | ::v-deep.u-form-item--left__content__label { |
| | | padding-left: 26rpx; |
| | | font-weight: 500; |
| | | font-size: 30rpx; |
| | | color: #4F4F4F; |
| | | line-height: 80rpx; |
| | | } |
| | | |
| | | ::v-deep.u-form-item--left__content--required { |
| | | left: 8rpx; |
| | | top: 0; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="work-reporting"> |
| | | <u-navbar title="æ¥å·¥" :border-bottom="false" :background="background" :title-size="40" :title-bold="true" |
| | | title-color="#FFFFFF" back-icon-color="#fff"> |
| | | <view v-if=" |
| | | (isShowWorkCenter('WK-01') && workOrder.operationId === workOrder.lastOperationId) || |
| | | isOperationName('TX-01', '纵åª') || |
| | | isOperationName('TX-02', 'å è£
') || |
| | | isShowWorkCenter('ZZ-03') || |
| | | isNotOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油') |
| | | " class="navbar-right" slot="right" @click="goTagList"> |
| | | æ ç¾è®°å½ |
| | | </view> |
| | | <view v-if="isSubmit" class="navbar-right" slot="right" @click="searchDevice"> |
| | | æç´¢è®¾å¤ |
| | | </view> |
| | | </u-navbar> |
| | | <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y"> |
| | | <view class="form"> |
| | | <h3 class="form-title">æ¥å·¥ä¿¡æ¯</h3> |
| | | <u-icon class="icon_report" size="170rpx" /> |
| | | <u-form :model="form" ref="uForm"> |
| | | <!--ç±»å--> |
| | | <u-form-item v-if="isShowWorkCenter('BJ-01')" label="ç±»å" prop="typeLabel" required |
| | | :label-width="180"> |
| | | <u-input v-model="form.typeLabel" placeholder="è¯·éæ©" /> |
| | | <u-icon name="arrow-right" color="#687792" size="28" @click="workTypeSelect = true"></u-icon> |
| | | </u-form-item> |
| | | <!--å°æ°--> |
| | | <u-form-item v-if=" |
| | | isShowWorkCenter('BJ-01') || |
| | | isOperationName('TX-01', '横åª')" label="å°æ°" prop="qty" required :label-width="180"> |
| | | <u-input v-model="form.qty" placeholder="请è¾å
¥" /> |
| | | </u-form-item> |
| | | <!--æ¡ç ç¼å·--> |
| | | <u-form-item v-if=" |
| | | isShowWorkCenter('TM-01,JG-01,ZZ-03,BZ-01,YB-04') || |
| | | isFirstOperationId('DY-01,GY-01,YB-01,YB-02,ZM-01') || |
| | | (workOrder.operationId === workOrder.lastOperationId && isShowWorkCenter('WK-01')) || |
| | | isOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油') || |
| | | isOperationName('TX-02', 'å è£
') || |
| | | (isShowWorkCenter('TX-02') && workOrder.operationName !== 'å è£
') || |
| | | isNotOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油')" label="æ¡ç ç¼å·" prop="labelNo" required :label-width="180"> |
| | | <u-input v-if ="isShowWorkCenter('TM-01,JG-01,YB-04') || isFirstOperationId( |
| | | 'DY-01,GY-01,YB-01,YB-02,ZM-01')|| |
| | | (isShowWorkCenter('TX-02') && workOrder.operationName !== 'å è£
')" v-model="form.labelNo" placeholder="请æ«ç " disabled /> |
| | | <u-input v-else v-model="form.labelNo" placeholder="请è¾å
¥" @blur="identifyingQrCodesBlur"/> |
| | | <u-icon name="scan" color="#2c4ce4" size="40" @click="identifyingQrCodes"></u-icon> |
| | | </u-form-item> |
| | | <!--å·¥åºç±»å--> |
| | | <u-form-item v-if=" |
| | | isShowWorkCenter('ZZ-03') || |
| | | (isOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油') && isOilChange)" label="å·¥åºç±»å" prop="operationTypeLabel" required |
| | | :label-width="180" @click="operationTypeSelect = true"> |
| | | <u-input v-model="form.operationTypeLabel" placeholder="è¯·éæ©" /> |
| | | <u-icon name="arrow-right" color="#687792" size="28" |
| | | @click="operationTypeSelect = true"></u-icon> |
| | | </u-form-item> |
| | | <!--宿æ°é--> |
| | | <u-form-item v-if=" |
| | | isShowWorkCenter('WK-01,ZZ-03,BZ-01') || |
| | | isOperationName('TX-02', 'å è£
') || |
| | | (isOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油') && isFanAssembly) || |
| | | isNotOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油')" label="宿æ°é" prop="finishQty" required :label-width="180"> |
| | | <u-input v-model="form.finishQty" placeholder="请è¾å
¥" /> |
| | | </u-form-item> |
| | | <!--é¿åº¦--> |
| | | <u-form-item v-if="isShowWorkCenter('') || isOperationName('TX-01', '纵åª')" label="é¿åº¦" prop="length" |
| | | required :label-width="180"> |
| | | <u-input v-model="form.length" placeholder="请è¾å
¥" @blur="calculateWeight" /> |
| | | </u-form-item> |
| | | <!--éé--> |
| | | <u-form-item v-if="isShowWorkCenter('') || isOperationName('TX-01', '纵åª')" label="éé" prop="weight" |
| | | required :label-width="180"> |
| | | <u-input v-model="form.weight" placeholder="åæ¾" disabled /> |
| | | </u-form-item> |
| | | <!--产åºç±»å«--> |
| | | <u-form-item v-if=" |
| | | isShowWorkCenter('') || |
| | | isOperationName('TX-01', '横åª')" label="产åºç±»å«" prop="outputCategoryLabel" required :label-width="180"> |
| | | <u-input v-model="form.outputCategoryLabel" placeholder="è¯·éæ©" /> |
| | | <u-icon name="arrow-right" color="#687792" size="28" |
| | | @click="showOutputCategory = true"></u-icon> |
| | | <u-select v-model="showOutputCategory" :list="outputCategoryList" |
| | | @confirm="outputCategoryFirm"></u-select> |
| | | </u-form-item> |
| | | <!--ç宽--> |
| | | <u-form-item v-if=" |
| | | isShowWorkCenter('') || |
| | | (isOperationName('TX-01', '横åª') && form.outputCategoryLabel !== '䏿±')" label="ç宽" prop="sliceWidth" required |
| | | :label-width="180"> |
| | | <u-input v-model="form.sliceWidth" placeholder="è¯·éæ©" /> |
| | | </u-form-item> |
| | | <!--çææ°é--> |
| | | <u-form-item v-if=" |
| | | isShowWorkCenter('') || |
| | | isOperationName('TX-01', '横åª')" label="çææ°é" prop="sliceQty" required :label-width="180"> |
| | | <u-input v-model="form.sliceQty" placeholder="请è¾å
¥" /> |
| | | </u-form-item> |
| | | <!--线åç±»å--> |
| | | <u-form-item v-if=" |
| | | isShowWorkCenter('TM-01,JG-01,YB-04') || |
| | | isFirstOperationId('DY-01,GY-01,YB-01,YB-02,ZM-01')" label="线åç±»å" prop="weight" required :label-width="180"> |
| | | <u-input v-model="form.weightTwo" placeholder="åæ¾" disabled /> |
| | | </u-form-item> |
| | | <!--å¾å·--> |
| | | <u-form-item v-if=" |
| | | isShowWorkCenter('TM-01,JG-01,YB-04') || |
| | | isFirstOperationId('DY-01,GY-01,YB-01,YB-02,ZM-01') || |
| | | (isShowWorkCenter('TX-02') && workOrder.operationName !== 'å è£
')" label="å¾å·" prop="drawNo" required |
| | | :label-width="180"> |
| | | <u-input v-model="form.drawNo" placeholder="åæ¾" disabled /> |
| | | </u-form-item> |
| | | <!--è§æ ¼åå·--> |
| | | <u-form-item v-if=" |
| | | isShowWorkCenter('TM-01,JG-01,YB-04') || |
| | | isFirstOperationId('DY-01,GY-01,YB-01,YB-02,ZM-01') || |
| | | (isShowWorkCenter('TX-02') && workOrder.operationName !== 'å è£
')" label="è§æ ¼åå·" prop="weight" required |
| | | :label-width="180"> |
| | | <u-input v-model="form.weight" placeholder="åæ¾" disabled /> |
| | | </u-form-item> |
| | | <!--夹件åå
¶ä»éé--> |
| | | <u-form-item v-if="isOperationName('TX-02', 'å è£
')" label="夹件åå
¶ä»éé" prop="clampOtherWeight" required |
| | | :label-width="180"> |
| | | <u-input v-model="form.clampOtherWeight" placeholder="请è¾å
¥" /> |
| | | </u-form-item> |
| | | <!--æåéé--> |
| | | <u-form-item v-if="isOperationName('TX-02', 'å è£
')" label="æåéé" prop="prodWeight" required |
| | | :label-width="180"> |
| | | <u-input v-model="form.prodWeight" placeholder="请è¾å
¥" /> |
| | | </u-form-item> |
| | | </u-form> |
| | | </view> |
| | | <view class="scan-code-feeding" v-if=" |
| | | isShowWorkCenter('BZ-01') || |
| | | isOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油') || |
| | | isOperationName('TX-01', '纵åª') || |
| | | isOperationName('TX-01', '横åª') || |
| | | isOperationName('TX-02', 'å è£
') || |
| | | isNotOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油')"> |
| | | <h3 class="form-title">æ«ç ææ</h3> |
| | | <u-icon class="icon_camera" size="82rpx" @click="qrCode" /> |
| | | <u-input v-model="partID" placeholder="请è¾å
¥ç©æ" @blur="getPart"/> |
| | | <view class="infoform" v-for="(item,index) in infoFormList" :key="'item'+index"> |
| | | <p> |
| | | <u-icon class="icon_zl" size="24rpx" /> |
| | | <span style="margin-right: 18rpx">å©ä½éé:</span> |
| | | <u-input :border="true" v-model="item.qtyRequired" label="å©ä½éé" |
| | | style="width: 450rpx;height: 56rpx;display: inline-flex;background: #F6FAFF;border-radius: 8rpx;border: 1px solid #214DED;align-items: center;"></u-input> |
| | | </p> |
| | | <p> |
| | | <u-icon class="icon_7" size="24rpx" /> |
| | | <span>æ¹æ¬¡å·:{{item.lotBatchNo}}</span> |
| | | </p> |
| | | <p> |
| | | <u-icon class="icon_6" size="24rpx" /> |
| | | <span>é¶ä»¶åç§°ï¼{{item.partName}}</span> |
| | | </p> |
| | | <u-divider :use-slot="false" half-width="640"></u-divider> |
| | | <view class="buttonFlex"> |
| | | <button class="delete-button" type="warn" @click="deleteInfo(index)"> |
| | | <u-icon class="icon_del" size="32rpx" /> |
| | | å é¤ |
| | | </button> |
| | | <button class="primary-button" v-if="isOperationName('TX-01', '横åª') && isSubmit" type="primary" |
| | | plain="true" @click="printQrCode(item)"> |
| | | <u-icon class="icon_dy" size="32rpx" /> |
| | | æ ç¾æå° |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="scan-code-feeding" v-if=" |
| | | isShowWorkCenter('ZZ-03')&& isWorkStationName('ZZ-03','ç®±ä½ç»è£
')"> |
| | | <h3 class="form-title">æ«ç ææ</h3> |
| | | <u-icon class="icon_camera" size="82rpx" @click="qrCode" /> |
| | | <u-input v-model="partID" placeholder="请è¾å
¥ç©æ" @blur="getPart"/> |
| | | <view class="infoform" v-for="(item,index) in infoFormList" :key="'item'+index"> |
| | | <p> |
| | | <u-icon class="icon_zl" size="24rpx" /> |
| | | <span style="margin-right: 18rpx">å©ä½éé:</span> |
| | | <u-input :border="true" v-model="item.qtyRequired" label="å©ä½éé" |
| | | style="width: 450rpx;height: 56rpx;display: inline-flex;background: #F6FAFF;border-radius: 8rpx;border: 1px solid #214DED;align-items: center;"></u-input> |
| | | </p> |
| | | <p> |
| | | <u-icon class="icon_7" size="24rpx" /> |
| | | <span>æ¹æ¬¡å·:{{item.lotBatchNo}}</span> |
| | | </p> |
| | | <p> |
| | | <u-icon class="icon_6" size="24rpx" /> |
| | | <span>é¶ä»¶åç§°ï¼{{item.partName}}</span> |
| | | </p> |
| | | <u-divider :use-slot="false" half-width="640"></u-divider> |
| | | <view class="buttonFlex"> |
| | | <button class="delete-button" type="warn" @click="deleteInfo(index)"> |
| | | <u-icon class="icon_del" size="32rpx" /> |
| | | å é¤ |
| | | </button> |
| | | <button class="primary-button" v-if="isOperationName('TX-01', '横åª') && isSubmit" type="primary" |
| | | plain="true" @click="printQrCode(item)"> |
| | | <u-icon class="icon_dy" size="32rpx" /> |
| | | æ ç¾æå° |
| | | </button> |
| | | </view> |
| | | </view> |
| | | |
| | | <h3 class="form-title">é«åæç»å®</h3> |
| | | <view class="infoform" v-for="(item,index) in hvCoilFormList" :key="'item'+index"> |
| | | <!-- <p> --> |
| | | <!-- <u-icon class="icon_zl" size="24rpx" /> --> |
| | | <!-- <span style="margin-right: 18rpx">å©ä½éé:</span> --> |
| | | <!-- <u-input :border="true" v-model="item.qtyRequired" label="å©ä½éé" --> |
| | | <!-- style="width: 450rpx;height: 56rpx;display: inline-flex;background: #F6FAFF;border-radius: 8rpx;border: 1px solid #214DED;align-items: center;"></u-input> --> |
| | | <!-- </p> --> |
| | | <p> |
| | | <u-icon class="icon_7" size="24rpx" /> |
| | | <span>便ç¾ç¼ç :{{item}}</span> |
| | | </p> |
| | | <!-- <p> |
| | | <u-icon class="icon_7" size="24rpx" /> |
| | | <span>æ¹æ¬¡å·:{{item.lotBatchNo}}</span> |
| | | </p> |
| | | <p> |
| | | <u-icon class="icon_6" size="24rpx" /> |
| | | <span>é¶ä»¶åç§°ï¼{{item.partName}}</span> |
| | | </p> --> |
| | | <u-divider :use-slot="false" half-width="640"></u-divider> |
| | | <view class="buttonFlex"> |
| | | <button class="delete-button" type="warn" @click="deleteInfoGy(index)"> |
| | | <u-icon class="icon_del" size="32rpx" /> |
| | | å é¤ |
| | | </button> |
| | | <!-- <button class="primary-button" |
| | | v-if="isOperationName('TX-02', 'å è£
')||isOperationName('TX-01', '横åª') && isSubmit" |
| | | type="primary" plain="true" @click="printQrCode(item)"> |
| | | <u-icon class="icon_dy" size="32rpx" /> |
| | | æ ç¾æå° |
| | | </button> --> |
| | | </view> |
| | | </view> |
| | | |
| | | <h3 class="form-title">ä½åæç»å®</h3> |
| | | <view class="infoform" v-for="(item,index) in lvCoilFormList" :key="'item'+index"> |
| | | <!-- <p> |
| | | <u-icon class="icon_zl" size="24rpx" /> |
| | | <span style="margin-right: 18rpx">å©ä½éé:</span> |
| | | <u-input :border="true" v-model="item.qtyRequired" label="å©ä½éé" |
| | | style="width: 450rpx;height: 56rpx;display: inline-flex;background: #F6FAFF;border-radius: 8rpx;border: 1px solid #214DED;align-items: center;"></u-input> |
| | | </p> --> |
| | | <p> |
| | | <u-icon class="icon_7" size="24rpx" /> |
| | | <span>便ç¾ç¼ç :{{item}}</span> |
| | | </p> |
| | | <!-- <p> |
| | | <u-icon class="icon_7" size="24rpx" /> |
| | | <span>æ¹æ¬¡å·:{{item.lotBatchNo}}</span> |
| | | </p> |
| | | <p> |
| | | <u-icon class="icon_6" size="24rpx" /> |
| | | <span>é¶ä»¶åç§°ï¼{{item.partName}}</span> |
| | | </p> --> |
| | | <u-divider :use-slot="false" half-width="640"></u-divider> |
| | | <view class="buttonFlex"> |
| | | <button class="delete-button" type="warn" @click="deleteInfoDy(index)"> |
| | | <u-icon class="icon_del" size="32rpx" /> |
| | | å é¤ |
| | | </button> |
| | | <!-- <button class="primary-button" v-if="isOperationName('TX-01', '横åª') && isSubmit" type="primary" |
| | | plain="true" @click="printQrCode(item)"> |
| | | <u-icon class="icon_dy" size="32rpx" /> |
| | | æ ç¾æå° |
| | | </button> --> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </scroll-view> |
| | | <view class="bottom" v-if=" |
| | | !(isShowWorkCenter('TM-01,JG-01,YB-04') || |
| | | isFirstOperationId('DY-01,GY-01,YB-01,YB-02,ZM-01') || |
| | | (isShowWorkCenter('TX-02') && workOrder.operationName !== 'å è£
'))"> |
| | | <u-button class="u-button" type="primary" @click="submit">æäº¤</u-button> |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | <u-modal v-model="show" @confirm="confirm" content="æ¯å¦ç¡®è®¤å é¤" show-cancel-button></u-modal> |
| | | <!-- ä¸ææ¡ --> |
| | | <!-- ç±»å --> |
| | | <u-select v-model="workTypeSelect" :list="workTypeList" @confirm="workTypeTypeFirm"></u-select> |
| | | <!-- å·¥åºç±»å --> |
| | | <u-select v-model="operationTypeSelect" :list="operationTypeList" @confirm="operationTypeFirm"></u-select> |
| | | <view v-if="maskShow" class="uni-mask" @touchmove.stop.prevent="moveHandle" @click="maskclose"> |
| | | <scroll-view class="uni-scroll_box" scroll-y @touchmove.stop.prevent="moveHandle" @click.stop="moveHandle"> |
| | | <view class="uni-list-box" v-for="(item, index) in listDevice" :key="index" @click="tapQuery(item)"> |
| | | <view> |
| | | <view class="uni-list_name">åç§°ï¼{{ item.name }}</view> |
| | | <view class="uni-list_item">UUID:{{ item.address }}</view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import UIcon from "../../../uview-ui/components/u-icon/u-icon.vue"; |
| | | import { |
| | | dateFormat |
| | | } from "../../../utils/date" |
| | | |
| | | const jcapi = uni.requireNativePlugin("JCSDK-JCApiModule"); |
| | | |
| | | // äºç»´ç ç±»å |
| | | const QrCodeType = { |
| | | QrCode: 31, |
| | | PDF417: 32, |
| | | DataMatrix: 33, |
| | | AZTEC: 34 |
| | | } |
| | | // 线æ¡ç±»å |
| | | const LineType = { |
| | | Solid: 1, // å®çº¿ |
| | | Dotted: 2, // è线ï¼é»è®¤èå®1:1ç¸é´ï¼ |
| | | } |
| | | // æ¢è¡æ¹å¼ |
| | | const LineModeType = { |
| | | Justified: 1, // 宽é«åºå®ï¼å
容èªéåºï¼åå·/åé´è·/è¡é´è·ææ¯ä¾ç¼©æ¾ï¼ |
| | | AutoHeight: 2, // 宽度åºå®ï¼é«åº¦èªéåº |
| | | Fixed: 4, // 宽é«åºå®ï¼è¶
åºé¨åè£åª |
| | | Adapt: 6, // 宽é«åºå®ï¼å
容è¶
è¿æ¶é¢è®¾å®½é«èªå¨ç¼©å° |
| | | } |
| | | |
| | | export default { |
| | | name: "work-reporting", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { |
| | | UIcon |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | partID:'',//ç©æID |
| | | background: { |
| | | backgroundColor: '#214DED', |
| | | }, |
| | | scrollTop: 0, |
| | | form: { |
| | | clazzType: '', // çæ¬¡ |
| | | dutyNo: '', // çæ¬¡ç¼å· |
| | | locationId: '', // åºä½id |
| | | operationTaskId: '', // å·¥åid |
| | | reportTime: '', // æäº¤æ¶é´ |
| | | labelNo: '', // æ¡ç ç¼å· |
| | | qty: '', // å°æ° |
| | | drawNo: '', // å¾å· |
| | | finishQty: '', // 宿æ°é |
| | | identifyingQr: '', // 线å车é´-è¿è´¦-æ«ç ç»æ |
| | | type: '', // ç±»åéæ©å¨ï¼value |
| | | typeLabel: '', // ç±»åéæ©å¨ï¼label |
| | | operationType: '', // å·¥åºç±»åéæ©å¨ï¼value |
| | | operationTypeLabel: '', // å·¥åºç±»åéæ©å¨ï¼label |
| | | outputCategory: '', // 产åºç±»å«ï¼value |
| | | outputCategoryLabel: '', // 产åºç±»å«ï¼label |
| | | length: '', // é¿åº¦, |
| | | siliconSteelCode: '', // æ«ç è·ååå®¶ä¿¡æ¯æ¥ææ£ä¿¡æ¯ |
| | | sliceWidth: '', // ç宽 |
| | | sliceQty: '', // çææ°é |
| | | clampOtherWeight: '', // 夹件åå
¶ä»éé |
| | | weightTwo: '' |
| | | }, |
| | | num: '', |
| | | rules: { |
| | | labelNo: [{ |
| | | required: true, |
| | | message: 'è¯·éæ©æ«ç æè¾å
¥ç¼å·', |
| | | trigger: ['blur'], |
| | | }], |
| | | typeLabel: [ // ç±»å |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©ç±»å', |
| | | trigger: ['change'], |
| | | } |
| | | ], |
| | | qty: [ // å°æ° |
| | | { |
| | | required: true, |
| | | message: '请填åå°æ°', |
| | | trigger: ['blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.number(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å¼', |
| | | trigger: ['blur'], |
| | | }, |
| | | ], |
| | | operationTypeLabel: [ // å·¥åºç±»å |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©å·¥åºç±»å', |
| | | trigger: ['change'], |
| | | } |
| | | ], |
| | | finishQty: [ // 宿æ°é |
| | | { |
| | | required: true, |
| | | message: '请填å宿æ°é', |
| | | trigger: ['blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.number(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å¼', |
| | | trigger: ['blur'], |
| | | }, |
| | | ], |
| | | length: [ // é¿åº¦, |
| | | { |
| | | required: true, |
| | | message: '请填åé¿åº¦', |
| | | trigger: ['blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.number(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å¼', |
| | | trigger: ['blur'], |
| | | }, |
| | | ], |
| | | outputCategoryLabel: [ // ç宽 |
| | | { |
| | | required: true, |
| | | message: '请填åç宽', |
| | | trigger: ['change'], |
| | | } |
| | | ], |
| | | sliceQty: [ // çææ°é |
| | | { |
| | | required: true, |
| | | message: '请填åçææ°é', |
| | | trigger: ['blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.number(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å¼', |
| | | trigger: ['blur'], |
| | | }, |
| | | ], |
| | | clampOtherWeight: [ // 夹件åå
¶ä»éé |
| | | { |
| | | required: true, |
| | | message: '请填å夹件åå
¶ä»éé', |
| | | trigger: ['blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.number(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å¼', |
| | | trigger: ['blur'], |
| | | }, |
| | | ], |
| | | prodWeight: [ // æåéé |
| | | { |
| | | required: true, |
| | | message: '请填åæåéé', |
| | | trigger: ['blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.number(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å¼', |
| | | trigger: ['blur'], |
| | | }, |
| | | ] |
| | | }, |
| | | showTypeSelect: false, |
| | | workTypeSelect: false, |
| | | operationTypeSelect: false, |
| | | showOutputCategory: false, |
| | | infoFormList: [], |
| | | hvCoilFormList: [], //ç®±ä½é«å |
| | | lvCoilFormList: [], //ç®±ä½ä½å |
| | | workOrder: '', |
| | | id: '', |
| | | isSubmit: false, |
| | | show: false, |
| | | deleteIndex: '', |
| | | workTypeList: [], // ç±»ålist |
| | | operationTypeList: [], // å·¥åºç±»ålist |
| | | outputCategoryList: [], // 产åºç±»å« |
| | | maskShow: false, |
| | | listDevice: [], //èçè®¾å¤æ°æ® |
| | | isFanAssembly: false, // æ¯å¦ä¸ºé£æºè£
é
|
| | | isOilChange: false, // é¶ä»¶åç§°å
嫿²¹å |
| | | } |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | moveHandle() { |
| | | |
| | | }, |
| | | maskclose() { |
| | | |
| | | }, |
| | | //æå°äºç»´ç |
| | | async printQrCode(item) { |
| | | const params = { |
| | | rwMatlBindId: item.id |
| | | } |
| | | let res = await this.$u.api.dailyPaper.zongjianLabelInfo(params) |
| | | if (!res.data) { |
| | | this.$refs.uToast.show({ |
| | | title: 'æªæ¥è¯¢å°è¯¥æ ç¾ä¿¡æ¯ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | return |
| | | } |
| | | // åå§åç»æ¿ |
| | | jcapi.initDrawingBoard({ |
| | | width: 50, |
| | | height: 100, |
| | | rotate: 0 |
| | | }); |
| | | let printData = res.data.ParamList[0] |
| | | // // ç»å¶äºç»´ç |
| | | jcapi.drawLabelQrCode({ |
| | | x: 14.5, |
| | | y: 74, |
| | | width: 20, |
| | | height: 20, |
| | | value: jsonString, |
| | | rotate: 0, |
| | | codeType: QrCodeType.QrCode, |
| | | }); |
| | | // ç»å¶æ¨ªçº¿ å®çº¿8æ¡ |
| | | let sum = 4; |
| | | for (let i = 1; i < 13; i++) { |
| | | this.getDrawLabelLine(4, sum, 46, 0.5, 0, LineType.Solid) // å®çº¿ |
| | | sum = (i * 6) + 4 |
| | | } |
| | | // äºç»´ç å¤§æ¡ |
| | | this.getDrawLabelLine(4, 97, 46, 0.5, 0, LineType.Solid) // å®çº¿9 |
| | | |
| | | //ç»å¶ç«çº¿ |
| | | this.getDrawLabelLine(4, 4, 0.5, 97, 0, LineType.Solid) // ç«çº¿1 |
| | | this.getDrawLabelLine(20, 4, 0.5, 66, 0, LineType.Solid) // ç«çº¿2 |
| | | this.getDrawLabelLine(44.5, 4, 0.5, 97, 0, LineType.Solid) // ç«çº¿2 |
| | | |
| | | // å¡«å²æåæ é¢ |
| | | this.getDrawLabelText(5, 5, 20, 20, 'ç¼ å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 11, 20, 20, 'å·¥åå·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 17, 20, 20, 'ç å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 23, 20, 20, 'ç宽ï¼mmï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 29, 20, 20, 'å度ï¼mmï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 35, 20, 20, 'ééï¼KGï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 41, 20, 20, 'é¿åº¦ï¼mï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 47, 20, 20, 'ç产人:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 53, 20, 20, 'ç产æ¶é´:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 59, 20, 20, 'åå®¶:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 65, 20, 20, 'éæ:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | |
| | | let labelNo = JSON.stringify(printData.labelNo).replace(/"/g, "") |
| | | let optaskNo = JSON.stringify(printData.optaskNo).replace(/"/g, "") |
| | | let sliceWidth = JSON.stringify(printData.sliceWidth ? printData.sliceWidth : '').replace(/"/g, "") |
| | | let thickness = JSON.stringify(printData.thickness ? printData.thickness : '').replace(/"/g, "") |
| | | let wweight = JSON.stringify(printData.wweight ? printData.wweight : '').replace(/"/g, "") |
| | | let llength = JSON.stringify(printData.llength ? printData.llength : '').replace(/"/g, "") |
| | | let reportTime = JSON.stringify(item.reportTime).replace(/"/g, "") |
| | | let reportName = JSON.stringify(item.reportName).replace(/"/g, "") |
| | | let grade = JSON.stringify(printData.grade ? printData.grade : '').replace(/"/g, "") |
| | | let ironLoss = JSON.stringify(printData.ironLoss ? printData.ironLoss : '').replace(/"/g, "") |
| | | let supplierVenderName = JSON.stringify(printData.supplierVenderName ? printData.supplierVenderName : |
| | | '').replace(/"/g, "") |
| | | |
| | | // // å¡«å²åæ°å¼ |
| | | this.getDrawLabelText(22, 5, 35, 12, labelNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 11, 35, 12, optaskNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 17, 35, 12, grade, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 23, 35, 12, sliceWidth, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 29, 35, 12, thickness, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 35, 35, 12, wweight, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 41, 35, 12, llength, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 47, 35, 12, reportName, 2, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 53, 35, 12, reportTime, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 59, 35, 12, supplierVenderName, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 65, 35, 12, ironLoss, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | |
| | | // çææå°æ°æ® |
| | | let imageJsonObj = jcapi.generateLabelJson() |
| | | // 设置æå°ä»»å¡ |
| | | jcapi.startJob({ |
| | | totalCount: 1, |
| | | density: this.printDensity, |
| | | labelType: this.labelType, |
| | | printMode: this.printMode, |
| | | }, function(r) { |
| | | if (r.code == 0) { |
| | | // æå°æ°æ® |
| | | jcapi.printData(imageJsonObj, { |
| | | "printQuantity": 1, |
| | | }, function(r) { |
| | | if (r.code == 0) { |
| | | console.log("æå°æå") |
| | | } else { |
| | | console.log("æå°å¤±è´¥") |
| | | } |
| | | }) |
| | | } else { |
| | | console.log("设置æå°ä»»å¡å¤±è´¥") |
| | | } |
| | | }) |
| | | }, |
| | | tapQuery(item) { |
| | | this.maskShow = false |
| | | // è¿æ¥æå°æº |
| | | let _this = this; |
| | | console.log(item) |
| | | jcapi.openPrinterByDevice({ |
| | | address: item.address, |
| | | name: item.name, |
| | | deviceType: item.deviceType // 设å¤ç±»åï¼0-èçï¼1-ç½ç» |
| | | }, function(r) { |
| | | uni.showToast({ |
| | | title: (r.code == 0) ? "è¿æ¥æå" : "è¿æ¥å¤±è´¥", |
| | | duration: 2 * 1000 |
| | | }) |
| | | if (r.code == 0) { |
| | | _this.connectedDevice = item |
| | | } |
| | | }) |
| | | }, |
| | | //æå°ç¸å
³ |
| | | searchDevice() { |
| | | let _this = this |
| | | uni.openBluetoothAdapter({ // 确认èçæ¯å¦æå¼ |
| | | success(r) { |
| | | uni.showLoading({ |
| | | title: "æç´¢ä¸..." |
| | | }) |
| | | // æªæäºèçç¸å
³æéåæªæå¼ææºå®ä½ä¼æç´¢ä¸å°è®¾å¤ |
| | | jcapi.getBluetoothDevices(function(r) { |
| | | console.log("device:" + JSON.stringify(r)) |
| | | // æç´¢å°è®¾å¤åè° |
| | | uni.hideLoading() |
| | | _this.listDevice = r; |
| | | _this.maskShow = true |
| | | }) |
| | | }, |
| | | fail(e) { |
| | | uni.showModal({ |
| | | confirmText: "æå¼èç失败" |
| | | }) |
| | | console.log("å¼å¯èç设å¤å¤±è´¥" + e) |
| | | } |
| | | }) |
| | | }, |
| | | // 夿工忝å¦çäº |
| | | isShowWorkCenter(workCenter) { |
| | | if (workCenter.includes(this.workOrder.workCenter)) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | // 夿工忝å¦çäº,忶夿æ¯å¦ä¸ºç¬¬ä¸éå·¥åº |
| | | isFirstOperationId(workCenter) { |
| | | if (workCenter.includes(this.workOrder.workCenter)) { |
| | | // 夿æ¯å¦ä¸ä¸ºç¬¬ä¸éå·¥åº |
| | | if (this.workOrder.operationId !== this.workOrder.firstOperationId) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | isOperationName(workCenter, operationName) { |
| | | // 夿æ¯å¦ä¸ºè¯¥å·¥ä½ç« |
| | | if (workCenter.includes(this.workOrder.workCenter)) { |
| | | // 夿æ¯å¦å
å«å·¥åºåç§° |
| | | if (operationName.includes(this.workOrder.operationName)) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | isNotOperationName(workCenter, operationName) { |
| | | // 夿æ¯å¦ä¸ºè¯¥å·¥ä½ç« |
| | | if (workCenter.includes(this.workOrder.workCenter)) { |
| | | // 夿æ¯å¦å
å«å·¥åºåç§° |
| | | if (!operationName.includes(this.workOrder.operationName)) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | isWorkStationName(workCenter,workStationName){ |
| | | // 夿æ¯å¦ä¸ºè¯¥å·¥ä½ç« |
| | | if (workCenter.includes(this.workOrder.workCenter)) { |
| | | // å¤æè½¦é´åç§° |
| | | if (workStationName.includes(this.workOrder.workstationName.split(')')[1])) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | goTagList() { |
| | | uni.navigateTo({ |
| | | url: '/pages/daily/tag-list/index?info=' + encodeURIComponent(JSON.stringify(this.workOrder)) |
| | | }) |
| | | }, |
| | | submit() { |
| | | this.$refs.uForm.validate(async valid => { |
| | | if (valid) { |
| | | // æ¥å·¥å
Œ
±æ°æ® |
| | | let obj = this.getProductReportData() |
| | | // é£éè½¦é´ |
| | | if (this.isShowWorkCenter('BJ-01')) { |
| | | obj.productReport = { |
| | | qty: this.form.qty, |
| | | type: this.form.type |
| | | }, |
| | | obj.reportType = "BANJIN_PRODUCT_REPORT" |
| | | } |
| | | // 线å车é´-è¿å¸ |
| | | if (this.isShowWorkCenter('TM-01,JG-01,YB-04') || this.isFirstOperationId( |
| | | 'DY-01,GY-01,YB-01,YB-02,ZM-01')) { |
| | | let op = { |
| | | labelNo: this.form.labelNo |
| | | } |
| | | obj.operationId = this.workOrder.operationId |
| | | obj.productReportXianquanNonFirst = op |
| | | obj.reportType = "XIANQUAN_NON_FIRST_PRODUCT_REPORT" |
| | | } |
| | | // å¤å£³è½¦é´-éæåä¸éå·¥åº |
| | | if (this.isShowWorkCenter('WK-01') && this.workOrder.operationId !== this.workOrder |
| | | .lastOperationId) { |
| | | obj.productReportWaikePrev = { |
| | | labelNo: '', |
| | | qty: this.form.finishQty |
| | | }, |
| | | obj.reportType = "WAIKE_PRODUCT_REPORT_PREV" |
| | | } |
| | | // å¤å£³è½¦é´-æåä¸éå·¥åº |
| | | if (this.isShowWorkCenter('WK-01') && this.workOrder.operationId === this.workOrder |
| | | .lastOperationId) { |
| | | obj.productReportWaike = { |
| | | labelNo: this.form.labelNo, |
| | | qty: this.form.finishQty |
| | | }, |
| | | obj.reportType = "WAIKE_PRODUCT_REPORT" |
| | | } |
| | | // ç®±å车é´(æå¥è½¦é´) |
| | | if (this.isShowWorkCenter('ZZ-03')) { |
| | | obj.productReportChengtao = { |
| | | id: null, |
| | | labelNo: this.form.labelNo, |
| | | operationType: this.form.operationType, |
| | | qty: this.form.finishQty, |
| | | rwMatlBindDTOList: this.infoFormList, |
| | | gyLabelNoList:this.hvCoilFormList, |
| | | dyLabelNoList:this.lvCoilFormList |
| | | |
| | | } |
| | | obj.reportType = "CHENGTAO_PRODUCT_REPORT" |
| | | } |
| | | // æ»è£
è½¦é´ |
| | | if (this.isOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油')) { |
| | | obj.productReportZongzhuang = { |
| | | id: null, |
| | | labelNo: this.form.labelNo, |
| | | operationType: this.form.operationType, |
| | | qty: this.form.finishQty, |
| | | workstationId: this.workOrder.workstationId, |
| | | rwMatlBindDTOList: this.infoFormList, |
| | | } |
| | | obj.reportType = "ZONGZHUANG_PRODUCT_REPORT" |
| | | } |
| | | // éè¯è½¦é´-çºµåª |
| | | if (this.isOperationName('TX-01', '纵åª')) { |
| | | obj.productReportZongjian = { |
| | | finishQty: '1', |
| | | labelNo: this.form.labelNo, |
| | | llength: this.form.length, |
| | | qty: '1', |
| | | rwMatlBindDTOList: this.infoFormList, |
| | | sliceWidth: this.form.siliconSteelCode.width, |
| | | workstationId: this.workOrder.workstationId, |
| | | wweight: this.form.weight |
| | | } |
| | | obj.reportType = "ZONGJIAN_PRODUCT_REPORT" |
| | | } |
| | | // éè¯è½¦é´-æ¨ªåª |
| | | if (this.isOperationName('TX-01', '横åª')) { |
| | | obj.productReportHengjian = { |
| | | finishQty: '1', |
| | | qty: '1', |
| | | rwMatlBindDTOList: this.infoFormList, |
| | | sliceQty: this.form.sliceQty, |
| | | workstationId: this.workOrder.workstationId, |
| | | wweight: '', |
| | | prodClass: this.form.outputCategory |
| | | } |
| | | // æ·»å ç宽 |
| | | if (this.isOperationName('TX-01', '横åª') && this.form.outputCategoryLabel !== |
| | | '䏿±') { |
| | | obj.productReportHengjian.sliceWidth = this.form.sliceWidth |
| | | } |
| | | obj.reportType = "HENGJIAN_PRODUCT_REPORT" |
| | | } |
| | | // éè¯è½¦é´-å è£
|
| | | if (this.isOperationName('TX-02', 'å è£
')) { |
| | | obj.productReportDiezhuang = { |
| | | clampOtherWeight: this.form.clampOtherWeight, |
| | | finishQty: this.form.finishQty, |
| | | labelNo: this.form.labelNo, |
| | | llength: '', |
| | | prodWeight: this.form.prodWeight, |
| | | qty: "1", |
| | | rwMatlBindDTOList: this.infoFormList, |
| | | workstationId: this.workOrder.workstationId, |
| | | wweight: '0.00' |
| | | } |
| | | obj.reportType = "DIEZHUANG_PRODUCT_REPORT" |
| | | } |
| | | // éè¯è½¦é´-å
¶ä»å·¥åº |
| | | if ((this.isShowWorkCenter('TX-02') && this.workOrder.operationName !== 'å è£
')) { |
| | | obj.operationId = this.workOrder.operationId |
| | | obj.productReportOtherOperation = { |
| | | labelNo: this.form.labelNo, |
| | | workstationId: this.workOrder.workstationId |
| | | } |
| | | obj.reportType = "OTHER_OPERATION_PRODUCT_REPORT" |
| | | } |
| | | // æåæ»è£
(å
¶ä»è½¦é´) |
| | | if (this.isShowWorkCenter('BZ-01')) { |
| | | obj.productReportFprodZongzhuang = { |
| | | id: null, |
| | | labelNo: this.form.labelNo, |
| | | operationType: null, |
| | | qty: this.form.finishQty, |
| | | rwMatlBindDTOList: this.infoFormList, |
| | | workstationId: this.workOrder.workstationId, |
| | | } |
| | | obj.reportType = "F_PROD_ZONGZHUANG_PRODUCT_REPORT" |
| | | } |
| | | // å¥è£
è½¦é´ |
| | | if (this.isNotOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油')) { |
| | | obj.productReportOther = { |
| | | finishQty: this.form.finishQty, |
| | | labelNo: this.form.labelNo, |
| | | llength: '', |
| | | qty: this.form.finishQty, |
| | | rwMatlBindDTOList: this.infoFormList, |
| | | workstationId: this.workOrder.workstationId, |
| | | wweight: '' |
| | | } |
| | | obj.reportType = "OTHER_PRODUCT_REPORT" |
| | | } |
| | | // æ¥å·¥æäº¤ |
| | | console.log("æ¥å·¥æäº¤", obj) |
| | | let productReportRes = await this.$u.api.dailyPaper.productReport(obj) |
| | | console.log("æ¥å·¥æäº¤", productReportRes) |
| | | if (productReportRes.code === 0) { |
| | | this.$refs.uToast.show({ |
| | | title: 'æ¥å·¥æå', |
| | | type: 'success ' |
| | | }) |
| | | // éè¯è½¦é´-æ¨ªåª æ¾ç¤ºæ ç¾æå° |
| | | if (this.isOperationName('TX-01', '横åª')) { |
| | | this.isSubmit = true |
| | | } |
| | | //声é³åæ¯å¨ |
| | | uni.playVoice({ |
| | | filePath: '/static/y1253.mp3', // æç¤ºé³æä»¶è·¯å¾ |
| | | complete: () => { |
| | | console.log('æç¤ºé³ææ¾å®æ'); |
| | | } |
| | | }); |
| | | uni.vibrateShort(); // çææ¯å¨ |
| | | } |
| | | console.log('éªè¯éè¿'); |
| | | } else { |
| | | console.log('éªè¯å¤±è´¥'); |
| | | } |
| | | }); |
| | | }, |
| | | // æ´çæ¥å·¥å
Œ
±æ°æ® |
| | | getProductReportData() { |
| | | console.log("æ¥å·¥æäº¤", this.workOrder, this.form) |
| | | this.form.clazzType = this.workOrder.clazzType |
| | | this.form.dutyNo = this.workOrder.dutyNo |
| | | // this.form.operationTaskId = this.workOrder.id |
| | | this.form.reportTime = dateFormat(new Date(), 'yyyy-MM-dd') + ' 00:00:00' |
| | | this.form.reportUserList = this.workOrder.userStaffNo |
| | | this.form.workstationName = this.workOrder.workstationName |
| | | let obj |
| | | if ((this.isShowWorkCenter('TX-02') && this.workOrder.operationName !== 'å è£
') || this.isFirstOperationId( |
| | | 'DY-01,GY-01,YB-01,YB-02') || this.isShowWorkCenter('TM-01,JG-01ï¼YB-04') ||this.isNotOperationName('ZZ-02', 'äºè£
,注油')) { |
| | | obj = Object.assign({ |
| | | clazzType: this.workOrder.clazzType, |
| | | dutyNo: this.workOrder.dutyNo, |
| | | operationTaskId: 12, //é便填 |
| | | locationId: this.form.locationId, |
| | | reportTime: dateFormat(new Date(), 'yyyy-MM-dd') + ' 00:00:00', |
| | | reportUserList: this.workOrder.userStaffNo, |
| | | workstationName: this.workOrder.workstationName, |
| | | }) |
| | | } else { |
| | | obj = Object.assign({ |
| | | clazzType: this.workOrder.clazzType, |
| | | dutyNo: this.workOrder.dutyNo, |
| | | operationTaskId: this.workOrder.id, |
| | | locationId: this.form.locationId, |
| | | reportTime: dateFormat(new Date(), 'yyyy-MM-dd') + ' 00:00:00', |
| | | reportUserList: this.workOrder.userStaffNo.split(','), |
| | | workstationName: this.workOrder.workstationName, |
| | | }) |
| | | } |
| | | return obj |
| | | }, |
| | | identifyingQrCodes() { |
| | | uni.scanCode({ |
| | | success: (res) => { |
| | | this.identifyingQrCodesBlur(res.result) |
| | | }, |
| | | fail: (err) => {} |
| | | }) |
| | | }, |
| | | async identifyingQrCodesBlur(result) { |
| | | let labelNo = "" |
| | | let json ={} |
| | | if(this.isJSON(result)){ |
| | | json = JSON.parse(result) |
| | | labelNo = json.ID |
| | | }else{ |
| | | labelNo = result |
| | | } |
| | | console.log(labelNo) |
| | | // å¦æä¸ºçº¿å车é´-è¿å¸éè¦æ¥è¯¢ |
| | | if (this.isShowWorkCenter('TM-01,JG-01,YB-04') || this.isFirstOperationId( |
| | | 'DY-01,GY-01,YB-01,YB-02,ZM-01')) { |
| | | this.form.labelNo = labelNo |
| | | let params = { |
| | | partNo: json.part_no |
| | | } |
| | | await this.$u.api.dailyPaper.findByNo(params).then(r => { |
| | | console.log(r) |
| | | this.form.drawNo = r.data.drawNo |
| | | this.form.weight = r.data.specificationModel |
| | | this.form.weightTwo = r.data.partName |
| | | this.submit() |
| | | }) |
| | | // await this.scanCodeData(json.ID, 'listReportOtherOperation') |
| | | this.$set(this.form, 'finishQty', this.form.identifyingQr.finishQty) |
| | | // this.scanCodeData(result, 'listReportXianQuanNonFirst') |
| | | } |
| | | // å¤å£³è½¦é´-æåä¸éå·¥åº |
| | | if (this.isShowWorkCenter('WK-01') && this.workOrder.operationId === this.workOrder.lastOperationId) { |
| | | this.scanCodeData(labelNo, 'listReportWaike') |
| | | } |
| | | // ç®±å车é´(æå¥è½¦é´) |
| | | if (this.isShowWorkCenter('ZZ-03')) { |
| | | console.log(this.workOrder.workCenter) |
| | | this.scanCodeData(labelNo, 'listReportChengtao') |
| | | } |
| | | // æ»è£
è½¦é´ |
| | | if (this.isOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油')) { |
| | | this.scanCodeData(labelNo, 'listReportZongzhuang') |
| | | } |
| | | // éè¯è½¦é´-çºµåª |
| | | if (this.isOperationName('TX-01', '纵åª')) { |
| | | // æ¡ç ç¼å·æ«æåçæ°æ®å¤ç |
| | | this.scanCodeData(labelNo, 'listReportZongjian') |
| | | } |
| | | // éè¯è½¦é´-å è£
|
| | | if (this.isOperationName('TX-02', 'å è£
')) { |
| | | // é»è®¤ä¸ |
| | | this.$set(this.form, 'finishQty', 1) |
| | | await this.scanCodeData(labelNo, 'listReportDieZhuang') |
| | | } |
| | | // éè¯è½¦é´-å
¶ä»å·¥åº |
| | | if ((this.isShowWorkCenter('TX-02') && this.workOrder.operationName !== 'å è£
')) { |
| | | this.form.labelNo = labelNo |
| | | let params = { |
| | | partNo: json.part_no |
| | | } |
| | | console.log(params) |
| | | await this.$u.api.dailyPaper.findByNo(params).then(r => { |
| | | console.log(r) |
| | | this.form.drawNo = r.data.drawNo |
| | | this.form.weight = r.data.specificationModel |
| | | this.submit() |
| | | }) |
| | | // await this.scanCodeData(result, 'listReportOtherOperation') |
| | | this.$set(this.form, 'finishQty', this.form.identifyingQr.finishQty) |
| | | } |
| | | // æåæ»è£
(å
¶ä»è½¦é´) |
| | | if (this.isShowWorkCenter('BZ-01')) { |
| | | this.form.labelNo = labelNo |
| | | // await this.scanCodeData(result, 'listReportFprodZongzhuang') |
| | | } |
| | | // å¥è£
è½¦é´ |
| | | if (this.isNotOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油')) { |
| | | await this.scanCodeData(labelNo, 'listReportOther') |
| | | this.$set(this.form, 'finishQty', 1) |
| | | |
| | | //å¢å å°æå
¥ç©æ |
| | | // // è·ååæååºåç±»å |
| | | const obj = { |
| | | lotBatchNo: labelNo, |
| | | optaskId: this.workOrder.id, |
| | | locationId: this.form.locationId |
| | | } |
| | | // æ ¹æ®æ¹æ¬¡å·æ¡ä»¶æ¥è¯¢ |
| | | let feeding = await this.$u.api.dailyPaper.getFeeding(obj) |
| | | let isExist = false |
| | | this.infoFormList.forEach(i => { |
| | | if (i.lotBatchNo === feeding.data.lotBatchNo) { |
| | | isExist = true |
| | | } |
| | | }) |
| | | // æ·»å ç»é¡µé¢ |
| | | if (!isExist) { |
| | | this.infoFormList.push(feeding.data) |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: '请å¿é夿æï¼', |
| | | type: 'warning ' |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | // è½¦é´æ¥å·¥æ«ç ææä½¿ç¨çåæååºåç±»å |
| | | judgmentWorkshop() { |
| | | // æå¥ -> æ¬ä½ï¼SELF_BODY |
| | | if (this.isShowWorkCenter('ZZ-03')&& this.isWorkStationName('ZZ-03','ç®±ä½ç»è£
')) { |
| | | return 'SELF_BODY' |
| | | } |
| | | // å¥è£
-> éè¯ï¼IRON_CORE |
| | | if (this.isNotOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油')) { |
| | | return 'IRON_CORE' |
| | | } |
| | | // æ»è£
-> å¨èº«ï¼MAIN_BODY |
| | | if (this.isOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油')) { |
| | | return 'MAIN_BODY' |
| | | } |
| | | // æåæ»è£
-> æ¬ä½ï¼SELF_BODY |
| | | if (this.isShowWorkCenter('BZ-01')) { |
| | | return 'SELF_BODY' |
| | | } |
| | | }, |
| | | qrCode() { |
| | | uni.scanCode({ |
| | | success: async (res) => { |
| | | let json = JSON.parse(res.result) |
| | | console.log(json) |
| | | if (this.isShowWorkCenter('ZZ-03')&& this.isWorkStationName('ZZ-03','ç®±ä½ç»è£
') && (json.ID.startsWith("GY") || json.ID.startsWith( |
| | | "DY"))) { |
| | | if (json.ID.startsWith("GY")) { |
| | | if (this.hvCoilFormList.includes(json.ID)) { |
| | | this.$refs.uToast.show({ |
| | | title: '请å¿é夿«ç ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | return |
| | | } |
| | | this.hvCoilFormList.push(json.ID) |
| | | } else { |
| | | if (this.lvCoilFormList.includes(json.ID)) { |
| | | this.$refs.uToast.show({ |
| | | title: '请å¿é夿«ç ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | return |
| | | } |
| | | this.lvCoilFormList.push(json.ID) |
| | | } |
| | | } else { |
| | | // // è·ååæååºåç±»å |
| | | let sfpInvType = await this.judgmentWorkshop() |
| | | const obj = { |
| | | lotBatchNo: json.lot_batch_no, |
| | | optaskId: this.workOrder.id, |
| | | locationId: this.form.locationId |
| | | } |
| | | if (sfpInvType) { |
| | | obj.sfpInvType = sfpInvType |
| | | } |
| | | // æ ¹æ®æ¹æ¬¡å·æ¡ä»¶æ¥è¯¢ |
| | | let feeding = await this.$u.api.dailyPaper.getFeeding(obj) |
| | | // éè¯è½¦é´-åªå |
| | | if (this.isOperationName('TX-01', '纵åª')) { |
| | | if (this.infoFormList.length >= 1) { |
| | | this.$refs.uToast.show({ |
| | | title: 'åªè½æ·»å 䏿¡æ°æ®è¿è¡æ¥å·¥', |
| | | type: 'warning ' |
| | | }) |
| | | return |
| | | } |
| | | // æ¥è¯¢æ¥ææ£æµï¼æ¥è¯¢ééä¿¡æ¯ |
| | | await this.getSiliconSteelCode(json.lot_batch_no) |
| | | // 计ç®éé |
| | | await this.calculateWeight() |
| | | } |
| | | let isExist = false |
| | | this.infoFormList.forEach(i => { |
| | | if (i.lotBatchNo === feeding.data.lotBatchNo) { |
| | | isExist = true |
| | | } |
| | | }) |
| | | // æ·»å ç»é¡µé¢ |
| | | if (!isExist) { |
| | | this.infoFormList.push(feeding.data) |
| | | // } |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: '请å¿é夿æï¼', |
| | | type: 'warning ' |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | fail: (err) => {} |
| | | }) |
| | | }, |
| | | // å¼¹åºæ¯å¦å é¤æææ¡æ¡ |
| | | deleteInfo(index) { |
| | | this.show = true |
| | | this.deleteIndex = index |
| | | }, |
| | | deleteInfoDy(index) { |
| | | this.lvCoilFormList.splice(index, 1) |
| | | }, |
| | | deleteInfoGy(index) { |
| | | this.hvCoilFormList.splice(index, 1) |
| | | }, |
| | | // å 餿æ |
| | | confirm() { |
| | | this.infoFormList.splice(this.deleteIndex, 1) |
| | | }, |
| | | // ç±»åselectç¡®å® |
| | | workTypeTypeFirm(e) { |
| | | this.form.type = e[0].value |
| | | this.form.typeLabel = e[0].label |
| | | }, |
| | | // å·¥åºç±»åselectç¡®å® |
| | | operationTypeFirm(e) { |
| | | this.form.operationType = e[0].value |
| | | this.form.operationTypeLabel = e[0].label |
| | | if (this.isOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油')) { |
| | | if (e[0].label === '飿ºè£
é
') { |
| | | this.$set(this.form, 'finishQty', '') |
| | | this.isFanAssembly = true |
| | | } else { |
| | | this.$set(this.form, 'finishQty', 1) |
| | | } |
| | | } |
| | | }, |
| | | // 产åºç±»å« selectéæ© |
| | | outputCategoryFirm(e) { |
| | | this.form.outputCategory = e[0].value |
| | | this.form.outputCategoryLabel = e[0].label |
| | | }, |
| | | // æ¡ç ç¼å·æ«æåçæ°æ®å¤ç |
| | | async scanCodeData(result, apiName) { |
| | | console.log(result) |
| | | if (!result) { |
| | | return |
| | | } |
| | | const params = { |
| | | id: this.workOrder.id |
| | | } |
| | | await this.$u.api.dailyPaper[apiName](params).then(r => { |
| | | console.log(r) |
| | | r.data.forEach(i => { |
| | | if (i.labelNo === result) { |
| | | i.reportTime = null |
| | | this.form.labelNo = i.labelNo |
| | | this.form.identifyingQr = i |
| | | this.$refs.uToast.show({ |
| | | title: 'æ«ç æåï¼', |
| | | type: 'success ' |
| | | }) |
| | | } |
| | | }) |
| | | if (!this.form.identifyingQr.labelNo) { |
| | | this.$refs.uToast.show({ |
| | | title: 'æªæ¥è¯¢å°è¯¥ç¼å·ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // æ¥è¯¢æ¥ææ£ä¿¡æ¯ |
| | | async getSiliconSteelCode(lotBatchNo) { |
| | | const params = { |
| | | siliconSteelCode: lotBatchNo |
| | | } |
| | | await this.$u.api.dailyPaper.siliconSteelCode(params).then(res => { |
| | | this.form.siliconSteelCode = res.data |
| | | }) |
| | | }, |
| | | // 计ç®éé |
| | | calculateWeight() { |
| | | if (this.form.siliconSteelCode) { |
| | | let sum = this.form.siliconSteelCode.width * this.form.siliconSteelCode.thickness * 7.65 |
| | | if (this.form.length) { |
| | | sum = sum * this.form.length / 1000 |
| | | let result = Number(sum).toFixed(2) |
| | | this.$set(this.form, 'weight', result) |
| | | } |
| | | } |
| | | }, |
| | | isJSON(str) { |
| | | try { |
| | | const result = JSON.parse(str); |
| | | return typeof result === 'object' && result !== null; |
| | | } catch (e) { |
| | | return false; |
| | | } |
| | | }, |
| | | //è¾å
¥è·åææä¿¡æ¯ |
| | | async getPart(){ |
| | | console.log(this.partID) |
| | | if (this.isShowWorkCenter('ZZ-03')&& this.isWorkStationName('ZZ-03','ç®±ä½ç»è£
') && (this.partID.startsWith("GY") || this.partID.startsWith( |
| | | "DY"))) { |
| | | if (this.partID.startsWith("GY")) { |
| | | if (this.hvCoilFormList.includes(this.partID)) { |
| | | this.$refs.uToast.show({ |
| | | title: '请å¿é夿«ç ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | return |
| | | } |
| | | this.hvCoilFormList.push(this.partID) |
| | | } else { |
| | | if (this.lvCoilFormList.includes(this.partID)) { |
| | | this.$refs.uToast.show({ |
| | | title: '请å¿é夿«ç ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | return |
| | | } |
| | | this.lvCoilFormList.push(this.partID) |
| | | } |
| | | } else { |
| | | // // è·ååæååºåç±»å |
| | | let sfpInvType = await this.judgmentWorkshop() |
| | | const obj = { |
| | | lotBatchNo: "*", |
| | | optaskId: this.workOrder.id, |
| | | locationId: this.form.locationId |
| | | } |
| | | if (sfpInvType) { |
| | | obj.sfpInvType = sfpInvType |
| | | } |
| | | // æ ¹æ®æ¹æ¬¡å·æ¡ä»¶æ¥è¯¢ |
| | | let feeding = await this.$u.api.dailyPaper.getFeeding(obj) |
| | | // éè¯è½¦é´-åªå |
| | | if (this.isOperationName('TX-01', '纵åª')) { |
| | | if (this.infoFormList.length >= 1) { |
| | | this.$refs.uToast.show({ |
| | | title: 'åªè½æ·»å 䏿¡æ°æ®è¿è¡æ¥å·¥', |
| | | type: 'warning ' |
| | | }) |
| | | return |
| | | } |
| | | // æ¥è¯¢æ¥ææ£æµï¼æ¥è¯¢ééä¿¡æ¯ |
| | | await this.getSiliconSteelCode('*') |
| | | // 计ç®éé |
| | | await this.calculateWeight() |
| | | } |
| | | let isExist = false |
| | | this.infoFormList.forEach(i => { |
| | | if (i.lotBatchNo === feeding.data.lotBatchNo) { |
| | | isExist = true |
| | | } |
| | | }) |
| | | // æ·»å ç»é¡µé¢ |
| | | if (!isExist) { |
| | | this.infoFormList.push(feeding.data) |
| | | // } |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: '请å¿é夿æï¼', |
| | | type: 'warning ' |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | // åå§åSDK |
| | | jcapi.initSDK() |
| | | // çå¬é¡µç åè° |
| | | jcapi.didReadPrintCountInfo(function(r) { |
| | | console.log(r) |
| | | }) |
| | | |
| | | // çå¬é误åè° |
| | | jcapi.didReadPrintErrorInfo(function(r) { |
| | | console.log(r) |
| | | if (r.code == 23) { |
| | | // æå°æºæå¼è¿æ¥ |
| | | _this.connectedDevice = null |
| | | } |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: JSON.stringify(r), |
| | | duration: 2 * 1000 |
| | | }) |
| | | }) |
| | | this.workOrder = JSON.parse(decodeURIComponent(options.info)) |
| | | console.log(this.workOrder) |
| | | this.form.drawNo = this.workOrder.drawNo |
| | | this.id = this.workOrder.id |
| | | // å¦æä¸ºé£éè½¦é´æ¥è¯¢ç±»å |
| | | if (this.isShowWorkCenter('BJ-01')) { |
| | | this.$u.api.dictData({ |
| | | dictType: 'work_type' |
| | | }).then((res) => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | this.workTypeList = res.data |
| | | } |
| | | }) |
| | | } |
| | | // å¦æä¸ºç®±å车é´(æå¥è½¦é´) æ¥è¯¢å·¥åºç±»å |
| | | if (this.isShowWorkCenter('ZZ-03')) { |
| | | this.$u.api.dictData({ |
| | | dictType: 'suit_process_type' |
| | | }).then((res) => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | this.operationTypeList = res.data |
| | | } |
| | | }) |
| | | } |
| | | // æ»è£
è½¦é´ |
| | | if (this.isOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油')) { |
| | | if (this.workOrder.partName.includes('æ²¹å')) { |
| | | this.isOilChange = true |
| | | } |
| | | this.$u.api.dictData({ |
| | | dictType: 'assembly_process_type' |
| | | }).then((res) => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | this.operationTypeList = res.data |
| | | } |
| | | }) |
| | | } |
| | | // éè¯è½¦é´-æ¨ªåª |
| | | if (this.isOperationName('TX-01', '横åª')) { |
| | | this.$u.api.dictData({ |
| | | dictType: 'hj_prod_class' |
| | | }).then((res) => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | this.outputCategoryList = res.data |
| | | } |
| | | }) |
| | | } |
| | | const params = { |
| | | workstationId: this.workOrder.workstationId |
| | | } |
| | | // è·ålocationIdåºä½id |
| | | this.$u.api.dailyPaper.getLocationId(params).then(res => { |
| | | this.form.locationId = res.data.qualifiedLocationIds[0] |
| | | }) |
| | | }, |
| | | onReady() { |
| | | this.$refs.uForm.setRules(this.rules); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .uni-list_name { |
| | | font-size: 30rpx; |
| | | color: #333; |
| | | } |
| | | |
| | | .uni-list_item { |
| | | font-size: 24rpx; |
| | | color: #555; |
| | | line-height: 1.5; |
| | | } |
| | | |
| | | .uni-list-box { |
| | | margin: 0 20rpx; |
| | | padding: 15rpx 0; |
| | | border-bottom: 1px #f5f5f5 solid; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .uni-scroll_box { |
| | | height: 70%; |
| | | background: #fff; |
| | | border-radius: 20rpx; |
| | | } |
| | | |
| | | .uni-mask { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | bottom: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | width: 100%; |
| | | background: rgba(0, 0, 0, 0.6); |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .work-reporting { |
| | | background-color: #e6f0ff; |
| | | width: 100%; |
| | | height: 100vh; |
| | | box-sizing: border-box; |
| | | |
| | | ::v-deep.navbar-right { |
| | | font-weight: 500; |
| | | font-size: 28rpx; |
| | | color: #FFFFFF; |
| | | line-height: 36rpx; |
| | | margin-right: 32rpx; |
| | | } |
| | | |
| | | .scroll-Y { |
| | | width: 100%; |
| | | height: calc(100vh - 270rpx); |
| | | |
| | | .form { |
| | | background: linear-gradient(180deg, #D8E8FF 0%, #FFFFFF 100%); |
| | | border-radius: 10rpx; |
| | | margin: 68rpx 30rpx 0; |
| | | padding: 36rpx 26rpx 0; |
| | | position: relative; |
| | | |
| | | .form-title { |
| | | font-weight: 800; |
| | | font-size: 34rpx; |
| | | color: #1D2541; |
| | | margin-bottom: 30rpx; |
| | | } |
| | | |
| | | .icon_report { |
| | | background-image: url('~@/static/custom/daily/icon_report.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 170rpx; |
| | | width: 170rpx; |
| | | position: absolute; |
| | | top: -64rpx; |
| | | right: -30rpx; |
| | | } |
| | | } |
| | | |
| | | .scan-code-feeding { |
| | | background: linear-gradient(180deg, #D8E8FF 0%, #F3F8FF 100%); |
| | | border-radius: 10rpx; |
| | | margin: 20rpx 30rpx 68rpx; |
| | | padding: 36rpx 16rpx 58rpx; |
| | | position: relative; |
| | | |
| | | .form-title { |
| | | font-weight: 800; |
| | | font-size: 34rpx; |
| | | color: #1D2541; |
| | | padding-left: 10rpx; |
| | | margin-bottom: 30rpx; |
| | | } |
| | | |
| | | .icon_camera { |
| | | background-image: url('~@/static/custom/daily/icon_camera.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 82rpx; |
| | | width: 82rpx; |
| | | position: absolute; |
| | | top: 18rpx; |
| | | right: 28rpx; |
| | | } |
| | | |
| | | .infoform { |
| | | background: #FFFFFF; |
| | | border-radius: 10rpx; |
| | | border: 1px solid #EAF2FF; |
| | | box-sizing: border-box; |
| | | padding: 30rpx 24rpx; |
| | | margin-top: 20rpx; |
| | | |
| | | p { |
| | | font-weight: 500; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | margin-bottom: 24rpx; |
| | | |
| | | .icon_zl { |
| | | background-image: url('~@/static/custom/daily/icon_zl.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 6rpx; |
| | | margin-bottom: 6rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | |
| | | .icon_7 { |
| | | background-image: url('~@/static/custom/daily/icon_7.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 6rpx; |
| | | margin-bottom: 6rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | |
| | | .icon_6 { |
| | | background-image: url('~@/static/custom/daily/icon_6.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 6rpx; |
| | | margin-bottom: 6rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | } |
| | | |
| | | .buttonFlex { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | flex-direction: row; |
| | | |
| | | .delete-button { |
| | | height: 66rpx; |
| | | background: #FFFFFF; |
| | | border-radius: 8rpx; |
| | | border: 1px solid #D6655C; |
| | | font-weight: 500; |
| | | font-size: 28rpx; |
| | | color: #D6655C; |
| | | margin: 24rpx 24rpx 0 206rpx; |
| | | line-height: 66rpx; |
| | | |
| | | .icon_del { |
| | | background-image: url('~@/static/custom/daily/icon_del.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 32rpx; |
| | | width: 32rpx; |
| | | margin-right: 8rpx; |
| | | margin-bottom: 8rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | } |
| | | |
| | | .primary-button { |
| | | height: 66rpx; |
| | | background: #FFFFFF; |
| | | border-radius: 8rpx; |
| | | border: 1px solid #214DED; |
| | | font-weight: 500; |
| | | font-size: 28rpx; |
| | | color: #214DED; |
| | | line-height: 66rpx; |
| | | margin: 24rpx 0 0 0; |
| | | |
| | | .icon_dy { |
| | | background-image: url('~@/static/custom/daily/icon_dy.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 32rpx; |
| | | width: 32rpx; |
| | | margin-right: 8rpx; |
| | | margin-bottom: 8rpx; |
| | | vertical-align: middle; |
| | | position: relative; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .bottom { |
| | | width: 100vw; |
| | | position: fixed; |
| | | bottom: 60rpx; |
| | | |
| | | .u-button { |
| | | width: 690rpx; |
| | | height: 80rpx; |
| | | background: #214DED; |
| | | border-radius: 8rpx; |
| | | font-weight: 500; |
| | | font-size: 34rpx; |
| | | color: #FFFFFF; |
| | | z-index: 99; |
| | | } |
| | | } |
| | | } |
| | | |
| | | ::v-deep.u-form-item--left__content__label { |
| | | padding-left: 26rpx; |
| | | font-weight: 500; |
| | | font-size: 30rpx; |
| | | color: #4F4F4F; |
| | | line-height: 80rpx; |
| | | } |
| | | |
| | | ::v-deep.u-form-item--left__content--required { |
| | | left: 8rpx; |
| | | top: 0; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="daily-list"> |
| | | <view class="search"> |
| | | <u-search placeholder="请è¾å
¥å·¥ä½ç«åç§°æç´¢" v-model="keyword" bgColor="#fff" |
| | | placeholderColor="#999999" :showAction="false" style="margin: 35rpx;" |
| | | searchIconColor="#6A6A6A" height="74" @search="search" @change="search"></u-search> |
| | | </view> |
| | | <scroll-view class="scroll-list" scroll-y="true" @scrolltolower="loadMore"> |
| | | <view v-for="(item,index) in list" :key="'item'+index" class="list-item"> |
| | | <h4> |
| | | <u-icon class="icon_1" size="24rpx"/> |
| | | <text selectable class="list-item-num">{{ item.dutyNo }}</text> |
| | | </h4> |
| | | <view class="item-box" @click="goHome(item)"> |
| | | <p> |
| | | <u-icon class="icon_2" size="24rpx"/> |
| | | <span class="item-box-title">å·¥ä½ç«:</span> |
| | | <span class="item-box-info">{{item.workstationName}}</span> |
| | | </p> |
| | | <p> |
| | | <u-icon class="icon_3" size="24rpx"/> |
| | | <span class="item-box-title">ç产人å:</span> |
| | | <span class="item-box-info">{{item.productionUser}}</span> |
| | | </p> |
| | | <p style="margin-bottom: 0;"> |
| | | <u-icon class="icon_4" size="24rpx"/> |
| | | <span class="item-box-title">æ¥æ:</span> |
| | | <span class="item-box-info">{{item.createTime}}</span> |
| | | </p> |
| | | </view> |
| | | </view> |
| | | <view class="loadmore" @click="loadMore"> |
| | | <u-loadmore :status="loadStatus"></u-loadmore> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import UIcon from "../../../uview-ui/components/u-icon/u-icon.vue"; |
| | | |
| | | export default { |
| | | components: {UIcon}, |
| | | data() { |
| | | return { |
| | | keyword:'', |
| | | loadStatus: 'loadmore', |
| | | total:0, |
| | | query:{ |
| | | current:1, |
| | | size:10, |
| | | workstationName: '' |
| | | |
| | | }, |
| | | list:[] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.loadList(); |
| | | }, |
| | | methods: { |
| | | loadMore() { |
| | | this.loadStatus = "loading"; |
| | | setTimeout(() => { |
| | | this.query.current += 1; |
| | | this.loadList(); |
| | | }, 100); |
| | | }, |
| | | // 卿¤å è½½å表 |
| | | loadList(){ |
| | | this.$u.api.dailyPaper.dutyRecordPage(this.query).then(res => { |
| | | if (res.code === 0) { |
| | | if (!res.data.records || res.data.records.length === 0) { |
| | | this.loadStatus = "nomore"; |
| | | return; |
| | | } |
| | | if (this.query.current === 1) { |
| | | this.list = res.data.records |
| | | } else { |
| | | this.list = this.list.concat(res.data.records); |
| | | } |
| | | this.list.forEach(item => { |
| | | item.createTime = item.createTime.slice(0,10) |
| | | }) |
| | | this.total = res.data.total; |
| | | this.query.current = res.data.current; |
| | | this.query.size = res.data.size; |
| | | this.loadStatus = "loadmore"; |
| | | } |
| | | }); |
| | | }, |
| | | // æç´¢ |
| | | search(e){ |
| | | this.query = { |
| | | current:1, |
| | | size:10, |
| | | workstationName: e |
| | | } |
| | | this.loadList() |
| | | }, |
| | | // è·³è½¬å°æ¥æ¥é¦é¡µ |
| | | goHome (info) { |
| | | uni.$emit('dailyListInfo',info) |
| | | uni.switchTab({ |
| | | url: '/pages/sys/home/index?info=' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .daily-list{ |
| | | width: 100%; |
| | | height: calc(100vh - 88rpx); |
| | | background: #E6EFFF; |
| | | overflow-y: auto; |
| | | box-sizing: border-box; |
| | | padding-bottom: 24rpx; |
| | | position: relative; |
| | | .search{ |
| | | position: fixed; |
| | | width: 100%; |
| | | z-index: 99; |
| | | height: 120rpx; |
| | | background: #E6EFFF; |
| | | } |
| | | .scroll-list{ |
| | | top: 120rpx; |
| | | overflow-y: auto; |
| | | position: absolute; |
| | | box-sizing: border-box; |
| | | padding: 0 32rpx; |
| | | .list-item{ |
| | | background: #FFFFFF; |
| | | border-radius: 10rpx; |
| | | box-sizing: border-box; |
| | | padding: 32rpx 16rpx; |
| | | margin-bottom: 20rpx; |
| | | position: relative; |
| | | h4{ |
| | | display: flex; |
| | | align-items: center; |
| | | font-weight: bold; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | margin-bottom: 25rpx; |
| | | .icon_1 { |
| | | background-image: url('~@/static/custom/daily/icon_1.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 8rpx; |
| | | position: relative; |
| | | } |
| | | .list-item-num { |
| | | font-weight: bold; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | } |
| | | } |
| | | .item-box{ |
| | | background: #F5F9FF; |
| | | border-radius: 10rpx; |
| | | box-sizing: border-box; |
| | | padding: 30rpx 24rpx; |
| | | p{ |
| | | font-weight: 500; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | margin-bottom: 24rpx; |
| | | .icon_2 { |
| | | background-image: url('~@/static/custom/daily/icon_2.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 12rpx; |
| | | position: relative; |
| | | margin-bottom: 6rpx; |
| | | vertical-align: middle; |
| | | } |
| | | .icon_3 { |
| | | background-image: url('~@/static/custom/daily/icon_3.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 12rpx; |
| | | position: relative; |
| | | margin-bottom: 6rpx; |
| | | vertical-align: middle; |
| | | } |
| | | .icon_4 { |
| | | background-image: url('~@/static/custom/daily/icon_4.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 24rpx; |
| | | width: 24rpx; |
| | | margin-right: 12rpx; |
| | | position: relative; |
| | | margin-bottom: 6rpx; |
| | | vertical-align: middle; |
| | | } |
| | | .item-box-title { |
| | | margin-right: 20rpx; |
| | | display: inline-block; |
| | | text-align-last: justify; |
| | | width: 120rpx; |
| | | font-weight: 500; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | } |
| | | .item-box-info { |
| | | font-weight: 500; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .loadmore { |
| | | height: 60rpx; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="body"> |
| | | <view class="main_view"> |
| | | <u-form :model="query" ref="query"> |
| | | <u-form-item label="æå·¥äºé¡¹" required :label-width="180" prop="handymanItemName"> |
| | | <u-input v-model="query.handymanItemName" placeholder="请è¾å
¥"/> |
| | | <!-- <u-icon name="arrow-right" @click="goPage(0)"></u-icon> --> |
| | | </u-form-item> |
| | | <u-form-item label="æ¶é¿" required :label-width="180" prop="duration"> |
| | | <u-input v-model="query.duration" placeholder="请è¾å
¥"/> |
| | | </u-form-item> |
| | | <u-form-item label="ç产人å" required :label-width="180" prop="prodUser"> |
| | | <u-input v-model="query.prodUser" type="select" placeholder="è¯·éæ©"/> |
| | | <u-icon name="arrow-right" @click="goPage(1)"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="责任人" required :label-width="180" prop="principalName"> |
| | | <u-input v-model="query.principalName" type="select" placeholder="è¯·éæ©"/> |
| | | <u-icon name="arrow-right" @click="goPage(2)"></u-icon> |
| | | </u-form-item> |
| | | </u-form> |
| | | </view> |
| | | <view class="bottom"> |
| | | <u-button class="u-button" type="primary" @click="submit" :loading="loading">æäº¤</u-button> |
| | | </view> |
| | | <u-select v-model="handymanItemListShow" :list="handymanItemList" @confirm="confirmOperation"></u-select> |
| | | <u-select v-model="handymanRecordListShow" :list="handymanRecordList" @confirm="confirmHandymanRecord"></u-select> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import UIcon from "../../../uview-ui/components/u-icon/u-icon.vue"; |
| | | |
| | | export default { |
| | | name: "handyman", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {UIcon}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | query: { |
| | | duration: '', // æ¶é¿ |
| | | dutyNo: '', // æ¥æ¥ç¼å· |
| | | dutyTime: '', // æ¥æ¥æ¶é´ |
| | | handymanItem: '', // æå·¥äºé¡¹ |
| | | principalId: '', // è´è´£äººid |
| | | prodStaffNoList: '', // å
³èçç产人åid[list] |
| | | prodUser: '', // ç产人å |
| | | principalName: '', // è´è´£äººåç§° |
| | | handymanRecordApprover:'', |
| | | handymanRecordApproverName:'', |
| | | handymanRecordId:0, |
| | | handymanItemName: '', // æå·¥äºé¡¹åç§° |
| | | }, |
| | | rules: { |
| | | handymanItemName: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©æå·¥äºé¡¹', |
| | | // å¯ä»¥å个æè
åæ¶å两个触åéªè¯æ¹å¼ |
| | | trigger: ['change'], |
| | | } |
| | | ], |
| | | duration: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥', |
| | | trigger: ['change','blur'], |
| | | }, |
| | | // æ£å夿æ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.amount(value); |
| | | }, |
| | | message: '请è¾å
¥æ£ç¡®', |
| | | // 触åå¨å¯ä»¥åæ¶ç¨bluråchange |
| | | trigger: ['change','blur'], |
| | | } |
| | | ], |
| | | prodUser: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©ç产人å', |
| | | // å¯ä»¥å个æè
åæ¶å两个触åéªè¯æ¹å¼ |
| | | trigger: ['change'], |
| | | } |
| | | ], |
| | | principalName: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©è´£ä»»äºº', |
| | | // å¯ä»¥å个æè
åæ¶å两个触åéªè¯æ¹å¼ |
| | | trigger: ['change'], |
| | | } |
| | | ], |
| | | }, |
| | | handymanItemList: [], |
| | | handymanItemListShow: false, |
| | | handymanRecordList: [], |
| | | handymanRecordListShow: false, |
| | | loading: false |
| | | } |
| | | }, |
| | | onReady() { |
| | | this.$refs.query.setRules(this.rules); // å¤å¶æ ¡éª |
| | | // è¿å
¥é¡µé¢æ¥è¯¢æå·¥äºé¡¹å表 |
| | | this.handymanItemList = [] |
| | | this.getHandymanItem() |
| | | // è¿å
¥é¡µé¢æ¥è¯¢è´£ä»»äººå表 |
| | | this.getHandymanRecord() |
| | | }, |
| | | onLoad(e) { |
| | | let s = [] |
| | | e.staffList.split(',').forEach(i => { |
| | | s.push(i) |
| | | }) |
| | | console.log(s) |
| | | this.query.prodStaffNoList =s |
| | | this.query.prodUser =e.userList |
| | | this.query.dutyNo = e.dutyNo |
| | | this.query.dutyTime = e.updateTime |
| | | uni.$on('checkedList', (data) => { |
| | | let staffNameList = [] |
| | | let staffNoList = [] |
| | | data.forEach(i => { |
| | | staffNameList.push(i.staffName) |
| | | staffNoList.push(i.staffNo) |
| | | }) |
| | | this.query.prodUser = staffNameList.join(',') |
| | | this.query.prodStaffNoList = staffNoList |
| | | }); |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | goPage (index) { |
| | | switch (index) { |
| | | case 0: |
| | | this.handymanItemListShow = true |
| | | break |
| | | case 1: |
| | | const list = [] |
| | | if(this.query.prodStaffNoList.length > 0) { |
| | | let staffList = this.query.prodUser.split(',') |
| | | let staffNoList = this.query.prodStaffNoList |
| | | for (const i in staffList) { |
| | | const obj = { |
| | | staffName: staffList[i], |
| | | staffNo: staffNoList[i] |
| | | } |
| | | list.push(obj) |
| | | } |
| | | } |
| | | uni.navigateTo({ |
| | | url: '/pages/daily/production-person/production-person?list=' + encodeURIComponent(JSON.stringify(list)) |
| | | }) |
| | | break |
| | | case 2: |
| | | this.handymanRecordListShow = true |
| | | break |
| | | } |
| | | }, |
| | | submit () { |
| | | this.$refs.query.validate(valid => { |
| | | if (valid) { |
| | | let params = JSON.parse(JSON.stringify(this.query)) |
| | | params.dutyTime = params.dutyTime + ' 00:00:00' |
| | | console.log(params) |
| | | this.$u.api.dailyPaper.handymanRecord(params).then((res) => { |
| | | if (res.code === 0) { |
| | | this.loading = true; |
| | | uni.navigateBack({ |
| | | //å
³éå½å页é¢ï¼è¿åä¸ä¸é¡µé¢æå¤çº§é¡µé¢ã |
| | | delta:1 |
| | | }); |
| | | this.loading = false; |
| | | } |
| | | }) |
| | | } else { |
| | | this.$u.toast('请填å宿´æ°æ®') |
| | | } |
| | | }); |
| | | }, |
| | | getHandymanItem () { |
| | | this.$u.api.dictData({dictType: 'handyman_item'}).then((res) => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | res.data.forEach(item => { |
| | | const obj = Object.assign({ |
| | | label: item.label, |
| | | value: item.value, |
| | | }) |
| | | this.handymanItemList.push(obj) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getHandymanRecord () { |
| | | this.$u.api.dailyPaper.principal().then((res) => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | res.data.forEach(item => { |
| | | const obj = Object.assign({ |
| | | label: item.fullName, |
| | | value: item.id, |
| | | }) |
| | | this.handymanRecordList.push(obj) |
| | | }) |
| | | console.log(res) |
| | | this.query.principalId = this.handymanRecordList[0].value |
| | | this.query.principalName = this.handymanRecordList[0].label |
| | | this.handymanRecordApprover = this.handymanRecordList[0].value |
| | | } |
| | | }) |
| | | }, |
| | | confirmOperation (e) { |
| | | this.query.handymanItem = e[0].value |
| | | this.query.handymanItemName = e[0].label |
| | | }, |
| | | confirmHandymanRecord (e) { |
| | | this.query.principalId = e[0].value |
| | | this.query.principalName = e[0].label |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .body { |
| | | background: linear-gradient(to bottom, #E5F0FF, #F6F9FF); |
| | | box-sizing: border-box; |
| | | padding-top: 26rpx; |
| | | height: 100vh; |
| | | .main_view { |
| | | margin-top: 5rpx; |
| | | background: linear-gradient(180deg, #D8E8FF 0%, #FFFFFF 100%); |
| | | border-radius: 15rpx; |
| | | margin: 0 30rpx; |
| | | box-sizing: border-box; |
| | | padding: 37rpx 25rpx; |
| | | } |
| | | .bottom { |
| | | width: 100vw; |
| | | position:fixed; |
| | | bottom:60rpx; |
| | | .u-button { |
| | | width: 690rpx; |
| | | height: 80rpx; |
| | | background: #214DED; |
| | | border-radius: 8rpx; |
| | | font-weight: 500; |
| | | font-size: 34rpx; |
| | | color: #FFFFFF; |
| | | z-index: 99; |
| | | } |
| | | } |
| | | } |
| | | ::v-deep.uicon-arrow-down-fill:before { |
| | | display: none; |
| | | } |
| | | ::v-deep.u-form-item--left__content__label { |
| | | padding-left: 26rpx; |
| | | font-weight: 500; |
| | | font-size: 30rpx; |
| | | color: #4F4F4F; |
| | | line-height: 80rpx; |
| | | } |
| | | ::v-deep.u-form-item--left__content--required { |
| | | left: 8rpx; |
| | | top: 0; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="work-order-list"> |
| | | <view class="page-head"> |
| | | <u-navbar title="人åå表" :border-bottom="false" |
| | | :background="background" |
| | | :title-bold="true" title-color="#000" |
| | | back-icon-color="#000" /> |
| | | <view class="search"> |
| | | <u-search placeholder="请è¾å
¥äººååç§°" v-model="staffName" |
| | | border-color="#ADC8E4" shape="square" bg-color="rgba(250,252,255,0.36)" |
| | | placeholderColor="#8992A3" :showAction="false" style="margin: 35rpx;" |
| | | searchIconColor="#333333" height="74" @search="search" @change="search"></u-search> |
| | | </view> |
| | | <span class="title">æ£æ¥ç»æéæ©</span> |
| | | <view class="list"> |
| | | <view v-for="(item, index) in personList" :key="index" class="person-card"> |
| | | <view class="card-info"> |
| | | <span> |
| | | <u-icon class="icon_num" size="26rpx"/> |
| | | <span class="h5-title">人åç¼å·:</span> |
| | | <span class="h5-info">{{item.staffNo}}</span> |
| | | </span> |
| | | <span> |
| | | <u-icon class="icon_person" size="26rpx"/> |
| | | <span class="h5-title">人ååç§°:</span> |
| | | <span class="h5-info">{{item.staffName}}</span> |
| | | </span> |
| | | </view> |
| | | <u-checkbox active-color="#428BF7" icon-size="24rpx" class="checkbox" v-model="item.checked" @change="checkboxChange(item)"></u-checkbox> |
| | | </view> |
| | | <view class="loadmore" @click="loadMore"> |
| | | <u-loadmore :status="loadStatus"></u-loadmore> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="bottom"> |
| | | <u-button class="u-button" :loading="loading" type="primary" @click="submit">æäº¤</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import content_bg from '@/static/custom/daily/background.png' |
| | | import UIcon from "../../../uview-ui/components/u-icon/u-icon.vue"; |
| | | |
| | | export default { |
| | | name: "production-person", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {UIcon}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | background: { |
| | | // background:'transparent' |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: 'fixed', |
| | | backgroundSize: '100% auto', |
| | | backgroundRepeat: 'no-repeat', |
| | | }, |
| | | loading:false, |
| | | staffName:'', |
| | | personCheckedList : [], |
| | | personList: [], |
| | | query: { |
| | | current: 1, |
| | | size: 20, |
| | | staffName: '', |
| | | divisionName:"ç产é¨" |
| | | }, |
| | | loadStatus: 'loadmore', |
| | | } |
| | | }, |
| | | async onLoad(options) { |
| | | this.personCheckedList = [] |
| | | this.personCheckedList = JSON.parse(decodeURIComponent(options.list)) |
| | | await this.loadList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | checkboxChange (item) { |
| | | if(!item.checked) { |
| | | const obj = { |
| | | staffName: item.staffName, |
| | | staffNo: item.staffNo |
| | | } |
| | | this.personCheckedList.push(obj) |
| | | } else { |
| | | var index = this.personCheckedList.findIndex((i) => { |
| | | return i.staffNo==item.staffNo; |
| | | }) |
| | | this.personCheckedList.splice(index,1); |
| | | } |
| | | this.$set(item, 'checked', !item.checked) |
| | | }, |
| | | submit () { |
| | | console.log(`output->this.personCheckedList`,this.personCheckedList) |
| | | this.loading = true; |
| | | uni.$emit('checkedList',this.personCheckedList) |
| | | uni.navigateBack({ |
| | | //å
³éå½å页é¢ï¼è¿åä¸ä¸é¡µé¢æå¤çº§é¡µé¢ã |
| | | delta:1 |
| | | }); |
| | | this.loading = false; |
| | | }, |
| | | // async getUserInfoFun() { |
| | | // const params = { |
| | | // current: this.page.current, |
| | | // size: this.page.size, |
| | | // staffName: this.staffName |
| | | // } |
| | | // await this.$u.api.dailyPaper.getUserInfo(params).then(res => { |
| | | // this.personList = res.data.records |
| | | // this.choosingFUn(this.personList, this.personCheckedList) |
| | | // }) |
| | | // }, |
| | | search (e) { |
| | | this.query = { |
| | | current:1, |
| | | size:20, |
| | | staffName: e, |
| | | divisionName:"ç产é¨" |
| | | } |
| | | this.loadList() |
| | | }, |
| | | // 卿¤å è½½å表 |
| | | loadList(){ |
| | | this.$u.api.dailyPaper.getUserInfo(this.query).then(res => { |
| | | console.log(res) |
| | | if (res.code === 0) { |
| | | if (!res.data.records || res.data.records.length === 0) { |
| | | this.loadStatus = "nomore"; |
| | | return; |
| | | } |
| | | if (this.query.current === 1) { |
| | | this.personList = res.data.records |
| | | } else { |
| | | this.personList = this.personList.concat(res.data.records); |
| | | } |
| | | this.choosingFUn(this.personList, this.personCheckedList) |
| | | this.total = res.data.total; |
| | | this.query.current = res.data.current; |
| | | this.query.size = res.data.size; |
| | | this.loadStatus = "loadmore"; |
| | | } |
| | | }); |
| | | }, |
| | | // æç´¢ä¸ä¼ä½¿é䏿¶å¤± |
| | | /** |
| | | * |
| | | * @param {ä¸»æ°æ®å表} mainList |
| | | * @param {éä¸çæ°æ®å表} selectList |
| | | */ |
| | | choosingFUn(mainList, selectList) { |
| | | for (const i in mainList) { |
| | | let isExit = false |
| | | for (const j in selectList) { |
| | | if(mainList[i].staffNo === selectList[j].staffNo) { |
| | | isExit = true |
| | | this.$set(mainList[i], 'checked', true) |
| | | } |
| | | } |
| | | if(!isExit) { |
| | | this.$set(mainList[i], 'checked', false) |
| | | } |
| | | } |
| | | }, |
| | | loadMore() { |
| | | this.loadStatus = "loading"; |
| | | setTimeout(() => { |
| | | this.query.current += 1; |
| | | this.loadList(); |
| | | }, 100); |
| | | }, |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .work-order-list{ |
| | | width: 100%; |
| | | height: 100vh; |
| | | background: #F6F9FF; |
| | | box-sizing: border-box; |
| | | padding-bottom: 24rpx; |
| | | .page-head{ |
| | | height: 750rpx; |
| | | background-image: url('~@/static/custom/daily/background.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | .title { |
| | | font-weight: 500; |
| | | font-size: 28rpx; |
| | | color: #6D82A1; |
| | | margin-left: 30rpx; |
| | | } |
| | | .list { |
| | | overflow-y: auto; |
| | | padding: 0 30rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | align-content: flex-start; |
| | | margin-top: 20rpx; |
| | | height: calc(100vh - 450rpx); |
| | | .person-card { |
| | | margin-top: 30rpx; |
| | | width: 336rpx; |
| | | height: 138rpx; |
| | | background: linear-gradient(180deg, #DFEDFF 0%, #F7F7F8 100%); |
| | | border-radius: 10rpx; |
| | | border: 1px solid #FFFFFF; |
| | | position: relative; |
| | | display:table-cell; vertical-align:middle; |
| | | .card-info { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | height: 100%; |
| | | padding: 0 16rpx; |
| | | .icon_num { |
| | | background-image: url('~@/static/custom/daily/icon_num.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | position: relative; |
| | | vertical-align: middle |
| | | } |
| | | .icon_person { |
| | | background-image: url('~@/static/custom/daily/icon_person.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | position: relative; |
| | | vertical-align: middle |
| | | } |
| | | .h5-title { |
| | | font-weight: 500; |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | margin: 0 6rpx; |
| | | line-height: 48rpx; |
| | | } |
| | | .h5-info { |
| | | font-weight: 500; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | line-height: 48rpx; |
| | | } |
| | | } |
| | | .checkbox { |
| | | position: absolute; |
| | | bottom: 12rpx; |
| | | right: 16rpx; |
| | | } |
| | | } |
| | | .loadmore { |
| | | margin: 20rpx auto; |
| | | width: 100%; |
| | | height: 60rpx; |
| | | } |
| | | } |
| | | } |
| | | .bottom { |
| | | width: 100vw; |
| | | position:fixed; |
| | | bottom:60rpx; |
| | | .u-button { |
| | | width: 690rpx; |
| | | height: 80rpx; |
| | | background: #214DED; |
| | | border-radius: 8rpx; |
| | | font-weight: 500; |
| | | font-size: 34rpx; |
| | | color: #FFFFFF; |
| | | z-index: 99; |
| | | } |
| | | } |
| | | } |
| | | ::v-deep.uni-input-placeholder { |
| | | font-weight: 400; |
| | | font-size: 30rpx; |
| | | color: #8992A3; |
| | | line-height: 80rpx; |
| | | } |
| | | ::v-deep.u-checkbox { |
| | | display: inline; |
| | | } |
| | | ::v-deep.u-checkbox__icon-wrap { |
| | | background: #F5F9FF; |
| | | border-radius: 2rpx; |
| | | border: 1px solid #428BF7; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="tag-add"> |
| | | <u-form :model="form" ref="uForm" :error-type="['toast']"> |
| | | <u-form-item label="ç±»å" prop="type" required v-if="info.workCenter === 'ZZ-03'"> |
| | | <u-input v-model="form.type" type="select" input-align="right" placeholder="è¯·éæ©"/> |
| | | <u-icon name="arrow-right" @click="show = true"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="æ°é" :border-bottom="false" style="width: calc(100% - 40rpx);" prop="num" required> |
| | | <u-input v-model="form.num" input-align="right" placeholder="请è¾å
¥"/> |
| | | </u-form-item> |
| | | </u-form> |
| | | <u-button type="primary" style="margin: 30rpx;" :loading="loading" @click="submit" :custom-style="{ |
| | | backgroundColor: '#214DED', |
| | | height:'80rpx'}" class="btn">æäº¤</u-button> |
| | | <u-select :list="actionSheetList" v-model="show" @confirm="actionSheetCallback"></u-select> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import UIcon from "../../../uview-ui/components/u-icon/u-icon.vue"; |
| | | |
| | | export default { |
| | | components: {UIcon}, |
| | | data(){ |
| | | return{ |
| | | form:{ |
| | | type: '', |
| | | num: '', |
| | | value: '', |
| | | reportType: '' |
| | | }, |
| | | show:false, |
| | | actionSheetList:[], |
| | | rules: { |
| | | type: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©ç±»å', |
| | | trigger: ['change'], |
| | | } |
| | | ], |
| | | num: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥æ°é', |
| | | trigger: ['change','blur'], |
| | | }, |
| | | // æ£å夿åªè½ä¸ºæ°å |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return this.$u.test.digits(value); |
| | | }, |
| | | message: 'åªè½ä¸ºæ°å', |
| | | trigger: ['change','blur'], |
| | | }, |
| | | ] |
| | | }, |
| | | loading:false, |
| | | info: {} |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | this.info = JSON.parse(decodeURIComponent(options.info)) |
| | | }, |
| | | methods:{ |
| | | actionSheetCallback(item){ |
| | | this.form.type = item[0].label |
| | | this.form.value = item[0].value |
| | | }, |
| | | submit(){ |
| | | this.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | this.form.operationTaskId = this.info.id |
| | | this.form.workstationId = this.info.workstationId |
| | | this.form.reportType = this.info.workCenter === 'ZZ-03' ? 'CHENGTAO_PRODUCT_REPORT' : 'WAIKE_PRODUCT_REPORT' |
| | | let type ="" |
| | | |
| | | if(this.form.type ==="é«åæ" ){ |
| | | type ="GY" |
| | | }else if(this.form.type ==="ä½åæ"){ |
| | | type ="DY" |
| | | }else{ |
| | | type ="XT" |
| | | } |
| | | |
| | | let param ={ |
| | | type: type, |
| | | num: this.form.num, |
| | | value: this.form.value, |
| | | reportType: this.form.reportType, |
| | | operationTaskId:this.form.operationTaskId, |
| | | workstationId:this.form.workstationId, |
| | | reportType:this.form.reportType |
| | | } |
| | | this.$u.api.dailyPaper.generateLabel(param).then(res => { |
| | | console.log(res) |
| | | if (res.code === 0) { |
| | | this.$u.toast('æä½æå') |
| | | this.loading = true; |
| | | uni.navigateBack({ |
| | | //å
³éå½å页é¢ï¼è¿åä¸ä¸é¡µé¢æå¤çº§é¡µé¢ã |
| | | delta:1 |
| | | }); |
| | | this.loading = false; |
| | | } |
| | | }) |
| | | } else { |
| | | console.log('éªè¯å¤±è´¥'); |
| | | } |
| | | }); |
| | | }, |
| | | getCabinetType () { |
| | | this.$u.api.dictData({dictType: 'cabinet_type'}).then(res => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | res.data.forEach(i => { |
| | | const obj = Object.assign({ |
| | | label: i.label, |
| | | value: i.value, |
| | | }) |
| | | this.actionSheetList.push(obj) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onReady() { |
| | | this.$refs.uForm.setRules(this.rules); |
| | | this.actionSheetList = [] |
| | | // è¿å
¥é¡µé¢æ¥è¯¢ç±»åå表 |
| | | this.getCabinetType() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .tag-add{ |
| | | height: calc(100vh - 88rpx); |
| | | background: linear-gradient(to bottom, #E5F0FF, #FFF); |
| | | box-sizing: border-box; |
| | | padding-top: 32rpx; |
| | | .u-form{ |
| | | margin: 0 30rpx; |
| | | background: #FFFFFF; |
| | | border-radius: 10rpx; |
| | | padding: 20rpx 26rpx; |
| | | } |
| | | .btn{ |
| | | position: fixed; |
| | | bottom: 40rpx; |
| | | width: calc(100% - 60rpx); |
| | | } |
| | | } |
| | | ::v-deep.uicon-arrow-down-fill:before { |
| | | display: none; |
| | | } |
| | | ::v-deep.u-form-item--left__content__label { |
| | | width: 100rpx; |
| | | padding-left: 26rpx; |
| | | font-weight: 500; |
| | | font-size: 30rpx; |
| | | color: #4F4F4F; |
| | | line-height: 80rpx; |
| | | } |
| | | ::v-deep.u-form-item--left__content--required { |
| | | left: 8rpx; |
| | | top: 0; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="tag-list"> |
| | | <u-navbar title="æ ç¾å表" :border-bottom="false" |
| | | :background="background" |
| | | :title-size="40" |
| | | :title-bold="true" title-color="#FFFFFF" |
| | | back-icon-color="#fff"> |
| | | <view class="navbar-right" slot="right" @click="goTagListAdd" v-if="this.info.workCenter === 'ZZ-03' || this.info.workCenter === 'WK-01' && 'æå
'.includes(this.info.operationName)"> |
| | | çææ ç¾ |
| | | </view> |
| | | </u-navbar> |
| | | <!-- <view class="search">--> |
| | | <!-- <u-search placeholder="请è¾å
¥æ ç¾ç¼ç æç´¢" v-model="keyword" bgColor="#fff" placeholderColor="#999999"--> |
| | | <!-- :showAction="false" style="margin: 35rpx;" searchIconColor="#6A6A6A" height="74"--> |
| | | <!-- @search="search"></u-search>--> |
| | | <!-- </view>--> |
| | | <scroll-view class="list" scroll-y="true" :scroll-top="20"> |
| | | <view v-for="(item,index) in list" :key="'item'+index" class="list-item" @click="choose(item,index)" |
| | | :class="{active:current==index && item.state!==1,print:item.state==1 }"><span> |
| | | {{ item.labelNo }} |
| | | </span> |
| | | <span v-if="item.state==1">å·²æå°</span> |
| | | <u-icon class="icon_choose" size="20rpx" v-if="current==index && item.state!==1"/> |
| | | </view> |
| | | <u-loading mode="circle" :show="loadingList" class="loading"></u-loading> |
| | | <p v-if="list.length===0" style="text-align: center;margin-top: 100rpx;color: rgb(96, 98, 102);font-size: 28rpx;">ææ æ°æ®</p> |
| | | </scroll-view> |
| | | <view class="bottom"> |
| | | <u-button type="primary" style="margin: 30rpx;" :loading="loading" @click="weighPrintHandle" class="u-button">æ ç¾æå°</u-button> |
| | | </view> |
| | | |
| | | <view v-if="maskShow" class="uni-mask" @touchmove.stop.prevent="moveHandle" @click="maskclose"> |
| | | <scroll-view class="uni-scroll_box" scroll-y @touchmove.stop.prevent="moveHandle" @click.stop="moveHandle"> |
| | | <view |
| | | class="uni-list-box" |
| | | v-for="(item, index) in listDevice" |
| | | :key="index" |
| | | @click="tapQuery(item)" |
| | | > |
| | | <view> |
| | | <view class="uni-list_name">åç§°ï¼{{ item.name }}</view> |
| | | <view class="uni-list_item">UUID:{{ item.address }}</view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | <uni-fab :pattern="pattern" horizontal="right" vertical="bottom" :popMenu="false" @fabClick="searchDevice" :doc="doc"> |
| | | </uni-fab> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import UIcon from "../../../uview-ui/components/u-icon/u-icon.vue"; |
| | | |
| | | const jcapi = uni.requireNativePlugin("JCSDK-JCApiModule"); |
| | | // äºç»´ç ç±»å |
| | | const QrCodeType = { |
| | | QrCode: 31, |
| | | PDF417: 32, |
| | | DataMatrix: 33, |
| | | AZTEC: 34 |
| | | } |
| | | // 线æ¡ç±»å |
| | | const LineType = { |
| | | Solid: 1, // å®çº¿ |
| | | Dotted: 2, // è线ï¼é»è®¤èå®1:1ç¸é´ï¼ |
| | | } |
| | | // æ¢è¡æ¹å¼ |
| | | const LineModeType = { |
| | | Justified: 1, // 宽é«åºå®ï¼å
容èªéåºï¼åå·/åé´è·/è¡é´è·ææ¯ä¾ç¼©æ¾ï¼ |
| | | AutoHeight: 2, // 宽度åºå®ï¼é«åº¦èªéåº |
| | | Fixed: 4, // 宽é«åºå®ï¼è¶
åºé¨åè£åª |
| | | Adapt: 6, // 宽é«åºå®ï¼å
容è¶
è¿æ¶é¢è®¾å®½é«èªå¨ç¼©å° |
| | | } |
| | | export default { |
| | | components: {UIcon}, |
| | | onLoad(options) { |
| | | this.info = JSON.parse(decodeURIComponent(options.info)) |
| | | this.loadList(); |
| | | |
| | | let _this = this; |
| | | // åå§åSDK |
| | | jcapi.initSDK() |
| | | // çå¬é¡µç åè° |
| | | jcapi.didReadPrintCountInfo(function(r) { |
| | | console.log(r) |
| | | }) |
| | | |
| | | // çå¬é误åè° |
| | | jcapi.didReadPrintErrorInfo(function(r) { |
| | | console.log(r) |
| | | if(r.code == 23) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: 'è¯·éæ°è¿æ¥æå°æºï¼', |
| | | duration: 2 * 1000 |
| | | }) |
| | | // æå°æºæå¼è¿æ¥ |
| | | _this.connectedDevice = null |
| | | } |
| | | }) |
| | | }, |
| | | onShow () { |
| | | this.loadList(); |
| | | }, |
| | | data() { |
| | | return { |
| | | background: { |
| | | backgroundColor: '#214DED', |
| | | }, |
| | | keyword: '', |
| | | list: [{ |
| | | name: '123' |
| | | }], |
| | | current: 0, |
| | | currentItem: {}, |
| | | loadingList: false, |
| | | loading: false, |
| | | //èçç¸å
³ |
| | | doc:"èç", |
| | | pattern: { |
| | | color: '#7A7E83', |
| | | backgroundColor: '#fff', |
| | | selectedColor: '#007AFF', |
| | | buttonColor: '#007AFF', |
| | | iconColor: '#fff' |
| | | }, |
| | | maskShow: false, |
| | | listDevice:[],//èçè®¾å¤æ°æ® |
| | | printDensity: 5, |
| | | labelType: 1, |
| | | printMode: 2,//printModeData: [{name : 'çæ', value: 1}, {name: 'ç转å°', value: 2}], |
| | | info: {} |
| | | } |
| | | }, |
| | | methods: { |
| | | moveHandle() { |
| | | |
| | | }, |
| | | maskclose() { |
| | | |
| | | }, |
| | | // 夿工忝å¦çäº |
| | | isShowWorkCenter(workCenter) { |
| | | if(workCenter.includes(this.info.workCenter)) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | isOperationName(workCenter, operationName) { |
| | | // 夿æ¯å¦ä¸ºè¯¥å·¥ä½ç« |
| | | if(workCenter.includes(this.info.workCenter)) { |
| | | // 夿æ¯å¦å
å«å·¥åºåç§° |
| | | if(operationName.includes(this.info.operationName)) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | isNotOperationName(workCenter, operationName) { |
| | | // 夿æ¯å¦ä¸ºè¯¥å·¥ä½ç« |
| | | if(workCenter.includes(this.info.workCenter)) { |
| | | // 夿æ¯å¦å
å«å·¥åºåç§° |
| | | if(!operationName.includes(this.info.operationName)) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | // 卿¤å è½½å表 |
| | | loadList() { |
| | | this.loadingList = true; |
| | | let url = '' |
| | | // æ ¹æ®ä¸å车é´è°åæ¥å£ |
| | | if (this.info.workCenter === 'ZZ-03') { // æå¥è½¦é´(ç®±å) |
| | | url = 'listReportChengtao' |
| | | } else if ((this.info.workCenter === 'ZZ-01' && !'ç»è£
'.includes(this.info.operationName)) || (this.info.workCenter === 'ZZ-02' && !'äºè£
,注油'.includes(this.info.operationName))) { |
| | | url = 'listReportOther' |
| | | } else if (this.info.workCenter === 'TX-02' && 'å è£
'.includes(this.info.operationName)) { |
| | | url = 'listReportDieZhuang' |
| | | } else if (this.info.workCenter === 'TX-01' && '纵åª'.includes(this.info.operationName)) { |
| | | url = 'listReportZongjian' |
| | | } else if (this.info.workCenter === 'WK-01' && 'æå
'.includes(this.info.operationName)) { |
| | | url = 'listReportWaike' |
| | | } |
| | | this.getlistReport(url) |
| | | this.loadingList = false |
| | | }, |
| | | getlistReport (url) { |
| | | this.$u.api.dailyPaper[url]({id: this.info.id}).then(res => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | this.list = res.data |
| | | this.choose(this.list[0], 0) |
| | | } |
| | | }); |
| | | }, |
| | | // æç´¢ |
| | | search(e) {}, |
| | | choose(item, index) { |
| | | this.current = index; |
| | | this.currentItem = item |
| | | }, |
| | | submit() { |
| | | this.loading = true; |
| | | }, |
| | | goTagListAdd(e) { |
| | | uni.navigateTo({ |
| | | url: '/pages/daily/tag-list/add?info='+ encodeURIComponent(JSON.stringify(this.info)) |
| | | }) |
| | | }, |
| | | //æå°ç¸å
³ |
| | | searchDevice(){ |
| | | let _this = this |
| | | uni.openBluetoothAdapter({ // 确认èçæ¯å¦æå¼ |
| | | success(r) { |
| | | uni.showLoading({ |
| | | title: "æç´¢ä¸..." |
| | | }) |
| | | // æªæäºèçç¸å
³æéåæªæå¼ææºå®ä½ä¼æç´¢ä¸å°è®¾å¤ |
| | | jcapi.getBluetoothDevices(function(r){ |
| | | // æç´¢å°è®¾å¤åè° |
| | | uni.hideLoading() |
| | | _this.listDevice = r; |
| | | _this.maskShow = true |
| | | }) |
| | | }, |
| | | fail(e) { |
| | | uni.showModal({ |
| | | confirmText: "æå¼èç失败" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | tapQuery(item) { |
| | | this.maskShow = false |
| | | // è¿æ¥æå°æº |
| | | let _this = this; |
| | | console.log(item) |
| | | jcapi.openPrinterByDevice({ |
| | | address: item.address, |
| | | name: item.name, |
| | | deviceType: item.deviceType // 设å¤ç±»åï¼0-èçï¼1-ç½ç» |
| | | }, function(r) { |
| | | uni.showToast({ |
| | | title: (r.code == 0) ? "è¿æ¥æå" : "è¿æ¥å¤±è´¥", |
| | | duration: 2 * 1000 |
| | | }) |
| | | if(r.code == 0) { |
| | | _this.connectedDevice = item |
| | | } |
| | | }) |
| | | }, |
| | | weighPrintHandle() { |
| | | let _this = this |
| | | if (this.currentItem.state == 1) { |
| | | this.$u.toast('è¯·éæ©éè¦æå°çæ ç¾') |
| | | } else { |
| | | const params = { |
| | | operationTaskId: this.info.id + '', |
| | | workstationId: this.info.workstationId, |
| | | labelNo: this.currentItem.labelNo |
| | | } |
| | | // å¤å£³è½¦é´-æåä¸éå·¥åº |
| | | if(this.isShowWorkCenter('WK-01') && this.info.operationId === this.info.lastOperationId) { |
| | | params.type = 'WAIKE_PRODUCT_REPORT' |
| | | this.$u.api.dailyPaper.labelInfo(params).then(res => { |
| | | let print = res.data |
| | | if(print) { |
| | | this.WKLastOperation(print.ParamList[0]) |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: 'æªæ¥è¯¢å°è¯¥æ ç¾ä¿¡æ¯ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | } |
| | | _this.printQrCode() |
| | | }) |
| | | } |
| | | // éè¯è½¦é´-çºµåª |
| | | if(this.isOperationName('TX-01', '纵åª')) { |
| | | params.type = 'ZONGJIAN_PRODUCT_REPORT' |
| | | this.$u.api.dailyPaper.labelInfo(params).then(res => { |
| | | let print = res.data |
| | | if(print) { |
| | | this.TXOperationName(print.ParamList[0], this.currentItem) |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: 'æªæ¥è¯¢å°è¯¥æ ç¾ä¿¡æ¯ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | } |
| | | _this.printQrCode() |
| | | }) |
| | | } |
| | | // éè¯è½¦é´-å è£
|
| | | if(this.isOperationName('TX-02', 'å è£
')) { |
| | | params.type = "DIEZHUANG_PRODUCT_REPORT" |
| | | console.log(`output->params`,params) |
| | | this.$u.api.dailyPaper.labelInfo(params).then(res => { |
| | | let print = res.data |
| | | if(print) { |
| | | this.TXClosedAssembly(print.ParamList[0]) |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: 'æªæ¥è¯¢å°è¯¥æ ç¾ä¿¡æ¯ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | } |
| | | _this.printQrCode() |
| | | }) |
| | | } |
| | | // ç®±å车é´(æå¥è½¦é´) éè¦åºåç®±ä½è¿æ¯æä½ |
| | | if(this.isShowWorkCenter('ZZ-03')) { |
| | | params.type = "CHENGTAO_PRODUCT_REPORT" |
| | | this.$u.api.dailyPaper.labelInfo(params).then(res => { |
| | | let print = res.data |
| | | if(print) { |
| | | if(this.currentItem.labelType === 'XT' || this.currentItem.labelType === 'ç®±ä½') { |
| | | this.XTZZPrintQrCode(print.ParamList[0]) |
| | | } else { // å¦å为æä½ |
| | | this.GYZZPrintQrCode(print.ParamList[0]) |
| | | } |
| | | _this.printQrCode() |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: 'æªæ¥è¯¢å°è¯¥æ ç¾ä¿¡æ¯ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | // å¥è£
è½¦é´ |
| | | if(this.isNotOperationName('ZZ-01,ZZ-02', 'ç»è£
,äºè£
,注油')) { |
| | | this.$u.api.dailyPaper.taozhuangLabelInfo(params).then(res => { |
| | | let print = res.data |
| | | if(print) { |
| | | this.suitWorkshop(print.ParamList[0], this.currentItem) |
| | | _this.printQrCode() |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: 'æªæ¥è¯¢å°è¯¥æ ç¾ä¿¡æ¯ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | // ç»å¶æ¨ªçº¿ å®çº¿ |
| | | getDrawLabelLine(x, y, width, height, rotate, lineType) { |
| | | jcapi.drawLabelLine({ |
| | | x: x, |
| | | y: y, |
| | | width: width, |
| | | height: height, |
| | | rotate: rotate, |
| | | lineType: lineType |
| | | }); |
| | | }, |
| | | // å¡«å²æåæ é¢ |
| | | getDrawLabelText(x, y, width, height, value, fontSize, rotate, lineMode, lineSpace, letterSpace, textAlignHorizontal, textAlignVertical) { |
| | | jcapi.drawLabelText({ |
| | | x: x, |
| | | y: y, |
| | | width: width, |
| | | height: height, |
| | | value: value, |
| | | fontSize: fontSize, |
| | | rotate: rotate, |
| | | lineMode: lineMode, |
| | | lineSpace: lineSpace, |
| | | letterSpace: letterSpace, |
| | | textAlignHorizontal: textAlignHorizontal, |
| | | textAlignVertical: textAlignVertical |
| | | }) |
| | | }, |
| | | // å¤å£³è½¦é´-æåä¸éå·¥åº |
| | | WKLastOperation(printData) { |
| | | // åID |
| | | let json = JSON.parse(printData.body) |
| | | // // ç»å¶äºç»´ç |
| | | // var jsonString = JSON.stringify(json.ID); |
| | | jcapi.drawLabelQrCode({ |
| | | x: 14.5, |
| | | y: 68, |
| | | width: 20, |
| | | height: 20, |
| | | value: json, |
| | | rotate: 0, |
| | | codeType: QrCodeType.QrCode, |
| | | }); |
| | | // ç»å¶æ¨ªçº¿ å®çº¿8æ¡ |
| | | let sum = 4; |
| | | for(let i = 1; i < 8; i++) { |
| | | this.getDrawLabelLine(4, sum, 46, 0.5, 0, LineType.Solid) // å®çº¿ |
| | | sum = (i * 10) + 4 |
| | | } |
| | | // äºç»´ç å¤§æ¡ |
| | | this.getDrawLabelLine(4, 92, 46, 0.5, 0, LineType.Solid) // å®çº¿9 |
| | | |
| | | //ç»å¶ç«çº¿ |
| | | this.getDrawLabelLine(4, 4, 0.5, 88.5, 0, LineType.Solid) // ç«çº¿1 |
| | | this.getDrawLabelLine(20, 4, 0.5, 60.5, 0, LineType.Solid) // ç«çº¿2 |
| | | this.getDrawLabelLine(44.5, 4, 0.5, 88.5, 0, LineType.Solid) // ç«çº¿3 |
| | | |
| | | // å¡«å²æåæ é¢ |
| | | this.getDrawLabelText(5, 8, 20, 20, 'ç¼ å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 18, 20, 20, 'é¿å®½é«:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 28, 20, 20, 'å·¥åå·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 38, 20, 20, 'å¾ å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 48, 20, 20, 'è§æ ¼åå·:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 58, 20, 20, 'çäº§æ¥æ:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | |
| | | let labelNo = JSON.stringify(printData.labelNo).replace(/"/g, "") |
| | | let operationTaskNo = JSON.stringify(printData.operationTaskNo).replace(/"/g, "") |
| | | let lwh = JSON.stringify(printData.lwh ? printData.lwh : '').replace(/"/g, "") |
| | | let specificationModel = JSON.stringify(printData.specificationModel ? printData.specificationModel : '').replace(/"/g, "") |
| | | let drawNo = JSON.stringify(printData.drawNo ? printData.drawNo : '').replace(/"/g, "") |
| | | let createTime = JSON.stringify(printData.createTime).replace(/"/g, "") |
| | | |
| | | // å¡«å²åæ°å¼ |
| | | this.getDrawLabelText(22, 8, 35, 12, labelNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 18, 35, 12, lwh, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 28, 35, 12, operationTaskNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 38, 35, 12, drawNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 48, 35, 12, specificationModel, 3, 1, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 58, 35, 12, createTime, 2, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | }, |
| | | // éè¯è½¦é´-çºµåª |
| | | TXOperationName(printData, currentItem) { |
| | | // ç»å¶äºç»´ç |
| | | let json = JSON.parse(printData.body) |
| | | // åID |
| | | // var jsonString = JSON.stringify(json.ID); |
| | | jcapi.drawLabelQrCode({ |
| | | x: 14.5, |
| | | y: 74, |
| | | width: 20, |
| | | height: 20, |
| | | value: json, |
| | | rotate: 0, |
| | | codeType: QrCodeType.QrCode, |
| | | }); |
| | | // ç»å¶æ¨ªçº¿ å®çº¿8æ¡ |
| | | let sum = 4; |
| | | for(let i = 1; i < 13; i++) { |
| | | this.getDrawLabelLine(4, sum, 46, 0.5, 0, LineType.Solid) // å®çº¿ |
| | | sum = (i * 6) + 4 |
| | | } |
| | | // äºç»´ç å¤§æ¡ |
| | | this.getDrawLabelLine(4, 97, 46, 0.5, 0, LineType.Solid) // å®çº¿9 |
| | | |
| | | //ç»å¶ç«çº¿ |
| | | this.getDrawLabelLine(4, 4, 0.5, 97, 0, LineType.Solid) // ç«çº¿1 |
| | | this.getDrawLabelLine(20, 4, 0.5, 66, 0, LineType.Solid) // ç«çº¿2 |
| | | this.getDrawLabelLine(44.5, 4, 0.5, 97, 0, LineType.Solid) // ç«çº¿2 |
| | | |
| | | // å¡«å²æåæ é¢ |
| | | this.getDrawLabelText(5, 5, 20, 20, 'ç¼ å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 11, 20, 20, 'å·¥åå·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 17, 20, 20, 'ç å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 23, 20, 20, 'ç宽ï¼mmï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 29, 20, 20, 'å度ï¼mmï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 35, 20, 20, 'ééï¼KGï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 41, 20, 20, 'é¿åº¦ï¼mï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 47, 20, 20, 'ç产人:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 53, 20, 20, 'ç产æ¶é´:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 59, 20, 20, 'åå®¶:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 65, 20, 20, 'éæ:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | |
| | | let labelNo = JSON.stringify(printData.labelNo).replace(/"/g, "") |
| | | let optaskNo = JSON.stringify(printData.optaskNo).replace(/"/g, "") |
| | | let sliceWidth = JSON.stringify(printData.sliceWidth ? printData.sliceWidth : '').replace(/"/g, "") |
| | | let thickness = JSON.stringify(printData.thickness ? printData.thickness : '').replace(/"/g, "") |
| | | let wweight = JSON.stringify(printData.wweight ? printData.wweight : '').replace(/"/g, "") |
| | | let llength = JSON.stringify(printData.llength ? printData.llength : '').replace(/"/g, "") |
| | | let reportTime = JSON.stringify(currentItem.reportTime).replace(/"/g, "") |
| | | let reportName = JSON.stringify(currentItem.reportName).replace(/"/g, "") |
| | | let grade = JSON.stringify(printData.grade ? printData.grade : '').replace(/"/g, "") |
| | | let ironLoss = JSON.stringify(printData.ironLoss ? printData.ironLoss : '').replace(/"/g, "") |
| | | let supplierVenderName = JSON.stringify(printData.supplierVenderName ? printData.supplierVenderName : '').replace(/"/g, "") |
| | | |
| | | // // å¡«å²åæ°å¼ |
| | | this.getDrawLabelText(22, 5, 35, 12, labelNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 11, 35, 12, optaskNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 17, 35, 12, grade, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 23, 35, 12, sliceWidth, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 29, 35, 12, thickness, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 35, 35, 12, wweight, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 41, 35, 12, llength, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 47, 35, 12, reportName, 2, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 53, 35, 12, reportTime, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 59, 35, 12, supplierVenderName, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 65, 35, 12, ironLoss, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | }, |
| | | // éè¯è½¦é´-å è£
|
| | | TXClosedAssembly(printData) { |
| | | // åID |
| | | let json = JSON.parse(printData.body) |
| | | // ç»å¶äºç»´ç |
| | | // var jsonString = JSON.stringify(json.ID); |
| | | jcapi.drawLabelQrCode({ |
| | | x: 14.5, |
| | | y: 68, |
| | | width: 20, |
| | | height: 20, |
| | | value: json, |
| | | rotate: 0, |
| | | codeType: QrCodeType.QrCode, |
| | | }); |
| | | // ç»å¶æ¨ªçº¿ å®çº¿8æ¡ |
| | | let sum = 4; |
| | | for(let i = 1; i < 8; i++) { |
| | | this.getDrawLabelLine(4, sum, 46, 0.5, 0, LineType.Solid) // å®çº¿ |
| | | sum = (i * 10) + 4 |
| | | } |
| | | // äºç»´ç å¤§æ¡ |
| | | this.getDrawLabelLine(4, 92, 46, 0.5, 0, LineType.Solid) // å®çº¿9 |
| | | |
| | | //ç»å¶ç«çº¿ |
| | | this.getDrawLabelLine(4, 4, 0.5, 88.5, 0, LineType.Solid) // ç«çº¿1 |
| | | this.getDrawLabelLine(20, 4, 0.5, 60.5, 0, LineType.Solid) // ç«çº¿2 |
| | | this.getDrawLabelLine(44.5, 4, 0.5, 88.5, 0, LineType.Solid) // ç«çº¿2 |
| | | |
| | | // å¡«å²æåæ é¢ |
| | | this.getDrawLabelText(5, 8, 20, 20, 'ç¼ å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 18, 20, 20, 'å·¥åå·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 28, 20, 20, 'å¾ å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 38, 20, 20, 'è§æ ¼åå·:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 48, 20, 20, 'ç产人:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 58, 20, 20, 'çäº§æ¥æ:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | |
| | | let labelNo = JSON.stringify(printData.labelNo).replace(/"/g, "") |
| | | let operationTaskNo = JSON.stringify(printData.operationTaskNo).replace(/"/g, "") |
| | | let drawNo = JSON.stringify(printData.drawNo).replace(/"/g, "") |
| | | let specificationModel = JSON.stringify(printData.specificationModel).replace(/"/g, "") |
| | | let staffNameJoin = JSON.stringify(this.info.staffNameJoin).replace(/"/g, "") |
| | | let createTime = JSON.stringify(printData.createTime ? printData.createTime : '').replace(/"/g, "") |
| | | |
| | | // å¡«å²åæ°å¼ |
| | | this.getDrawLabelText(22, 8, 35, 12, labelNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 18, 35, 12, operationTaskNo, 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 28, 35, 12, drawNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 38, 35, 12, specificationModel, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 48, 35, 12, staffNameJoin, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 58, 35, 12, createTime, 2, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | }, |
| | | // ç®±å车é´(æå¥è½¦é´) é«å |
| | | GYZZPrintQrCode(printData) { |
| | | // ç»å¶äºç»´ç |
| | | let json = JSON.parse(printData.body) |
| | | // åID |
| | | // var jsonString = JSON.stringify(json.ID); |
| | | jcapi.drawLabelQrCode({ |
| | | x: 14.5, |
| | | y: 58, |
| | | width: 20, |
| | | height: 20, |
| | | value: json, |
| | | rotate: 0, |
| | | codeType: QrCodeType.QrCode, |
| | | }); |
| | | // ç»å¶æ¨ªçº¿ å®çº¿8æ¡ |
| | | let sum = 4; |
| | | for(let i = 1; i < 7; i++) { |
| | | this.getDrawLabelLine(4, sum, 46, 0.5, 0, LineType.Solid) // å®çº¿ |
| | | sum = (i * 10) + 4 |
| | | } |
| | | // äºç»´ç å¤§æ¡ |
| | | this.getDrawLabelLine(4, 82, 46, 0.5, 0, LineType.Solid) // å®çº¿9 |
| | | |
| | | //ç»å¶ç«çº¿ |
| | | this.getDrawLabelLine(4, 4, 0.5, 78.5, 0, LineType.Solid) // ç«çº¿1 |
| | | this.getDrawLabelLine(20, 4, 0.5, 50.5, 0, LineType.Solid) // ç«çº¿2 |
| | | this.getDrawLabelLine(44.5, 4, 0.5, 78.5, 0, LineType.Solid) // ç«çº¿2 |
| | | |
| | | // å¡«å²æåæ é¢ |
| | | this.getDrawLabelText(5, 8, 20, 22, 'ç¼ å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 18, 20, 22, 'å·¥åå·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 28, 20, 20, 'ç±» å:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 38, 20, 20, 'è§æ ¼åå·:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 48, 20, 20, 'çäº§æ¥æ:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | |
| | | let labelNo = JSON.stringify(printData.labelNo).replace(/"/g, "") |
| | | let operationTaskNo = JSON.stringify(printData.operationTaskNo ? printData.operationTaskNo : '').replace(/"/g, "") |
| | | let specificationModel = JSON.stringify(printData.specificationModel ? printData.specificationModel : '').replace(/"/g, "") |
| | | let type = JSON.stringify(printData.type ? printData.type : '').replace(/"/g, "") |
| | | let reportTime = JSON.stringify(printData.reportTime).replace(/"/g, "") |
| | | // å¡«å²åæ°å¼ |
| | | this.getDrawLabelText(22, 8, 35, 12, labelNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 18, 35, 12, operationTaskNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 28, 35, 12, type, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 38, 35, 12, specificationModel, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 48, 35, 12, reportTime, 2, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | }, |
| | | // ç®±å车é´(æå¥è½¦é´) ç®±ä½ |
| | | XTZZPrintQrCode(printData) { |
| | | // ç»å¶äºç»´ç |
| | | let json = JSON.parse(printData.body) |
| | | // åID |
| | | // var jsonString = JSON.stringify(json.ID); |
| | | jcapi.drawLabelQrCode({ |
| | | x: 14.5, |
| | | y: 65, |
| | | width: 20, |
| | | height: 20, |
| | | value: json, |
| | | rotate: 0, |
| | | codeType: QrCodeType.QrCode, |
| | | }); |
| | | // ç»å¶æ¨ªçº¿ å®çº¿8æ¡ |
| | | let sum = 4; |
| | | for(let i = 1; i < 9; i++) { |
| | | this.getDrawLabelLine(4, sum, 46, 0.5, 0, LineType.Solid) // å®çº¿ |
| | | sum = (i * 8) + 4 |
| | | } |
| | | // äºç»´ç å¤§æ¡ |
| | | this.getDrawLabelLine(4, 90.5, 46, 0.5, 0, LineType.Solid) // å®çº¿9 |
| | | |
| | | //ç»å¶ç«çº¿ |
| | | this.getDrawLabelLine(4, 4, 0.5, 86.5, 0, LineType.Solid) // ç«çº¿1 |
| | | this.getDrawLabelLine(20, 4, 0.5, 56, 0, LineType.Solid) // ç«çº¿2 |
| | | this.getDrawLabelLine(44.5, 4, 0.5, 86.5, 0, LineType.Solid) // ç«çº¿2 |
| | | |
| | | // å¡«å²æåæ é¢ |
| | | this.getDrawLabelText(5, 6, 20, 20, 'ç¼ å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 14, 20, 20, 'å·¥åå·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 22, 20, 20, 'è§æ ¼åå·:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 30, 20, 20, 'é«åæä½:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 38, 20, 20, 'ä½åæä½:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 46, 20, 20, 'æ¬ä½:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 54, 20, 20, 'çäº§æ¥æ:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | |
| | | let labelNo = JSON.stringify(printData.labelNo).replace(/"/g, "") |
| | | let operationTaskNo = JSON.stringify(printData.operationTaskNo).replace(/"/g, "") |
| | | let specificationModel = JSON.stringify(printData.specificationModel ? printData.specificationModel : '').replace(/"/g, "") |
| | | let gy = JSON.stringify(printData.gy ? printData.gy : '').replace(/"/g, "") |
| | | let dy = JSON.stringify(printData.dy ? printData.dy : '').replace(/"/g, "") |
| | | let bt = JSON.stringify(printData.bt ? printData.bt : '').replace(/"/g, "") |
| | | let reportTime = JSON.stringify(printData.reportTime).replace(/"/g, "") |
| | | // // å¡«å²åæ°å¼ |
| | | this.getDrawLabelText(22, 6, 35, 12, labelNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 14, 35, 12, operationTaskNo, 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 22, 35, 12, specificationModel, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 30, 35, 12, gy, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 38, 35, 12, dy, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 46, 35, 12, bt, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 54, 35, 12, reportTime, 2, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | }, |
| | | // å¥è£
è½¦é´ |
| | | suitWorkshop(printData, currentItem) { |
| | | // ç»å¶äºç»´ç |
| | | let json = JSON.parse(printData.body) |
| | | // åID |
| | | // var jsonString = JSON.stringify(json.ID); |
| | | jcapi.drawLabelQrCode({ |
| | | x: 17, |
| | | y: 50, |
| | | width: 20, |
| | | height: 20, |
| | | value: json, |
| | | rotate: 0, |
| | | codeType: QrCodeType.QrCode, |
| | | }); |
| | | // ç»å¶æ¨ªçº¿ å®çº¿8æ¡ |
| | | let sum = 4; |
| | | for(let i = 1; i < 6; i++) { |
| | | this.getDrawLabelLine(4, sum, 46, 0.5, 0, LineType.Solid) // å®çº¿ |
| | | sum = (i * 10) + 4 |
| | | } |
| | | // äºç»´ç å¤§æ¡ |
| | | this.getDrawLabelLine(4, 72, 46, 0.5, 0, LineType.Solid) // å®çº¿9 |
| | | |
| | | //ç»å¶ç«çº¿ |
| | | this.getDrawLabelLine(4, 4, 0.5, 68.5, 0, LineType.Solid) // ç«çº¿1 |
| | | this.getDrawLabelLine(20, 4, 0.5, 40.5, 0, LineType.Solid) // ç«çº¿2 |
| | | this.getDrawLabelLine(44.5, 4, 0.5, 68.5, 0, LineType.Solid) // ç«çº¿2 |
| | | |
| | | // å¡«å²æåæ é¢ |
| | | this.getDrawLabelText(5, 8, 24, 22, 'éè¯ç¼å·:', 3, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 18, 12, 22, '线åç¼å·:', 3, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 28, 24, 20, 'çäº§æ¥æ:', 3, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 38, 24, 20, 'ç产人å:', 3, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | |
| | | let labelNo = JSON.stringify(printData.labelNo).replace(/"/g, "") |
| | | let coilNo = JSON.stringify(printData.coilNo).replace(/"/g, "") |
| | | let reportTime = JSON.stringify(currentItem.reportTime).replace(/"/g, "") |
| | | let reportName = JSON.stringify(currentItem.reportName).replace(/"/g, "") |
| | | |
| | | // å¡«å²åæ°å¼ |
| | | this.getDrawLabelText(22, 8, 40, 12, labelNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 18, 40, 12, coilNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 28, 40, 12, reportTime, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 38, 40, 12, reportName, 2, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | }, |
| | | //æå°äºç»´ç |
| | | printQrCode() { |
| | | // åå§åç»æ¿ |
| | | jcapi.initDrawingBoard({ |
| | | width: 45, |
| | | height: 100, |
| | | rotate: 0 |
| | | }); |
| | | |
| | | // çææå°æ°æ® |
| | | let imageJsonObj = jcapi.generateLabelJson() |
| | | // 设置æå°ä»»å¡ |
| | | jcapi.startJob({ |
| | | totalCount: 1, |
| | | density: this.printDensity, |
| | | labelType: this.labelType, |
| | | printMode: this.printMode, |
| | | },function(r){ |
| | | if(r.code == 0) { |
| | | // æå°æ°æ® |
| | | jcapi.printData(imageJsonObj, { |
| | | "printQuantity": 1, |
| | | }, function(r) { |
| | | if (r.code == 0) { |
| | | console.log("æå°æå") |
| | | } else { |
| | | console.log("æå°å¤±è´¥") |
| | | } |
| | | }) |
| | | } else { |
| | | console.log("设置æå°ä»»å¡å¤±è´¥") |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .uni-fab__circle{ |
| | | position:fixed; |
| | | bottom: 140rpx; |
| | | } |
| | | .tag-list { |
| | | width: 100%; |
| | | height: 100vh; |
| | | background: #E6EFFF; |
| | | overflow-y: auto; |
| | | box-sizing: border-box; |
| | | padding-bottom: 24rpx; |
| | | position: relative; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | ::v-deep.navbar-right { |
| | | font-weight: 500; |
| | | font-size: 28rpx; |
| | | color: #FFFFFF; |
| | | line-height: 36rpx; |
| | | margin-right: 32rpx; |
| | | } |
| | | //.search { |
| | | // //position: fixed; |
| | | // width: 100%; |
| | | // z-index: 99; |
| | | // height: 140rpx; |
| | | // background: #E6EFFF; |
| | | //} |
| | | |
| | | .list { |
| | | padding: 40rpx 32rpx 120rpx; |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | box-sizing: border-box; |
| | | |
| | | .list-item { |
| | | background: #FFFFFF; |
| | | border-radius: 10rpx; |
| | | box-sizing: border-box; |
| | | padding: 22rpx 43rpx; |
| | | margin-bottom: 20rpx; |
| | | font-weight: 500; |
| | | font-size: 30rpx; |
| | | color: #333333; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .icon_choose { |
| | | background-image: url('~@/static/custom/daily/icon_choose.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 20rpx; |
| | | width: 20rpx; |
| | | position: relative; |
| | | } |
| | | |
| | | &.print { |
| | | background: #F3FFF8; |
| | | border: 1px solid #ABE3C4; |
| | | color: #0AA04D; |
| | | } |
| | | |
| | | &.active { |
| | | background: #F4F9FF; |
| | | border: 1px solid #ACBDF8; |
| | | color: #214DED; |
| | | } |
| | | } |
| | | |
| | | .loading { |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | } |
| | | } |
| | | .bottom { |
| | | width: 100vw; |
| | | position:fixed; |
| | | bottom: 0; |
| | | background: #E6EFFF; |
| | | .u-button { |
| | | width: 690rpx; |
| | | height: 80rpx; |
| | | background: #214DED; |
| | | border-radius: 8rpx; |
| | | font-weight: 500; |
| | | font-size: 34rpx; |
| | | color: #FFFFFF; |
| | | z-index: 99; |
| | | } |
| | | } |
| | | |
| | | .uni-mask { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | bottom: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | width: 100%; |
| | | background: rgba(0, 0, 0, 0.6); |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | |
| | | .uni-scroll_box { |
| | | height: 70%; |
| | | background: #fff; |
| | | border-radius: 20rpx; |
| | | } |
| | | .uni-list-box { |
| | | margin: 0 20rpx; |
| | | padding: 15rpx 0; |
| | | border-bottom: 1px #f5f5f5 solid; |
| | | box-sizing: border-box; |
| | | } |
| | | .uni-list:last-child { |
| | | border: none; |
| | | } |
| | | .uni-list_name { |
| | | font-size: 30rpx; |
| | | color: #333; |
| | | } |
| | | .uni-list_item { |
| | | font-size: 24rpx; |
| | | color: #555; |
| | | line-height: 1.5; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="body"> |
| | | <view class="main_view"> |
| | | <view class="main_item" @click="goPage(0)"> |
| | | <span style="color:#4F4F4F">ç±»å«</span> |
| | | <view> |
| | | <span style="color:#333333;margin-right: 20rpx;">{{ query.type }}</span> |
| | | <u-icon name="arrow-right" color="#687792" size="28"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="main_item" @click="goPage(1)"> |
| | | <span style="color:#4F4F4F">è§æ ¼åå·</span> |
| | | <view> |
| | | <span style="color:#333333;margin-right: 20rpx;">{{ query.model }}</span> |
| | | <u-icon name="arrow-right" color="#687792" size="28"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="main_item" @click="goPage(2)"> |
| | | <span style="color:#4F4F4F">å¾å·</span> |
| | | <view> |
| | | <span style="color:#333333;margin-right: 20rpx;">{{ query.num }}</span> |
| | | <u-icon name="arrow-right" color="#687792" size="28"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="main_item" @click="goPage(3)"> |
| | | <span style="color:#4F4F4F">æ¬ä½ç¹å¾ç»æ</span> |
| | | <view> |
| | | <span style="color:#333333;margin-right: 20rpx;">{{ query.structure }}</span> |
| | | <u-icon name="arrow-right" color="#687792" size="28"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="main_item" @click="goPage(4)"> |
| | | <span style="color:#4F4F4F">第ä¸ä½</span> |
| | | <view> |
| | | <span style="color:#333333;margin-right: 20rpx;">{{ query.first }}</span> |
| | | <u-icon name="arrow-right" color="#687792" size="28"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="main_item" @click="goPage(5)"> |
| | | <span style="color:#4F4F4F">第äºä½</span> |
| | | <view> |
| | | <span style="color:#333333;margin-right: 20rpx;">{{ query.second }}</span> |
| | | <u-icon name="arrow-right" color="#687792" size="28"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-select v-model="selectShowType" :list="TypeList" @confirm="confirm($event, 'type')"></u-select> |
| | | <u-select v-model="selectShowModels" :list="modelsList" @confirm="confirm($event, 'model')"></u-select> |
| | | <u-select v-model="selectShowNum" :list="numList" @confirm="confirm($event, 'num')"></u-select> |
| | | <u-select v-model="selectShowStructure" :list="structureList" @confirm="confirm($event, 'structure')"></u-select> |
| | | <u-select v-model="selectShowFirst" :list="firstList" @confirm="confirm($event, 'first')"></u-select> |
| | | <u-select v-model="selectShowSecond" :list="secondList" @confirm="confirm($event, 'second')"></u-select> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "tool", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | query: { |
| | | type: '', |
| | | model: '', |
| | | num: '', |
| | | structure: '', |
| | | first: '', |
| | | second: '', |
| | | }, |
| | | selectShowType: false, |
| | | selectShowModels: false, |
| | | selectShowNum: false, |
| | | selectShowStructure: false, |
| | | selectShowFirst: false, |
| | | selectShowSecond: false, |
| | | TypeList: [ |
| | | { |
| | | value: '1', |
| | | label: 'å¹²å¼åå卿å' |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: 'å¹²å¼åå卿å' |
| | | }, |
| | | ], |
| | | modelsList: [ |
| | | { |
| | | value: '1', |
| | | label: 'SCB18-1600/10' |
| | | }, |
| | | ], |
| | | numList: [ |
| | | { |
| | | value: '1', |
| | | label: 'G2023.1' |
| | | }, |
| | | ], |
| | | structureList: [ |
| | | { |
| | | value: '1', |
| | | label: '00' |
| | | }, |
| | | ], |
| | | firstList: [ |
| | | { |
| | | value: '0', |
| | | label: 'åå¾å¸¸è§æ¸©æ§ä»ª' |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: 'åå¾å¸¸è§æ¸©æ§ç®±' |
| | | }, |
| | | ], |
| | | secondList: [ |
| | | { |
| | | value: '0', |
| | | label: '1.5mm颿¿å¤å£³RAL7035ï¼çµç£éï¼è¡ç¨å¼å
³ï¼ä¸è¿ä¸åºãä¸è¿ä¾§åºï¼æ£è£
ãè½å°å®è£
+常è§å°ºå¯¸' |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '0.7m201ä¸éé¢å¤å£³æ¬è²ï¼çµç£é+è¡ç¨å¼å
³ï¼ä¸è¿ä¸åºãä¸è¿ä¾§åºï¼æ£è£
ãè½å°å®è£
ï¼å¸¸è§å°ºå¯¸' |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | goPage (index) { |
| | | switch(index){ |
| | | case 0: |
| | | this.selectShowType = true; |
| | | break; |
| | | case 1: |
| | | this.selectShowModels = true; |
| | | break; |
| | | case 2: |
| | | this.selectShowNum = true; |
| | | break; |
| | | case 3: |
| | | this.selectShowStructure = true; |
| | | break; |
| | | case 4: |
| | | this.selectShowFirst = true; |
| | | break; |
| | | case 5: |
| | | this.selectShowSecond = true; |
| | | break; |
| | | } |
| | | }, |
| | | confirm (e, item) { |
| | | console.log('e--', e) |
| | | console.log('item--', item) |
| | | switch(item){ |
| | | case 'type': |
| | | this.query.type = e[0].label; |
| | | break; |
| | | case 'model': |
| | | this.query.model = e[0].label; |
| | | break; |
| | | case 'num': |
| | | this.query.num = e[0].label; |
| | | break; |
| | | case 'structure': |
| | | this.query.structure = e[0].label; |
| | | break; |
| | | case 'first': |
| | | this.query.first = e[0].label; |
| | | break; |
| | | case 'second': |
| | | this.query.second = e[0].label; |
| | | break; |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .body { |
| | | background: linear-gradient(to bottom, #E5F0FF, #F6F9FF); |
| | | box-sizing: border-box; |
| | | padding-top: 26rpx; |
| | | height: calc(100vh - 188rpx); |
| | | .main_view { |
| | | //background-image: url('~@/static/custom/home/home_img_bg.png'); |
| | | //background-repeat: no-repeat; |
| | | //background-size: 100% auto; |
| | | background: linear-gradient(180deg, #DFEDFF 0%, #F7F7F8 100%); |
| | | border-radius: 15rpx; |
| | | height: 936rpx; |
| | | margin: 6rpx 30rpx 0; |
| | | box-sizing: border-box; |
| | | padding: 38rpx 26rpx; |
| | | .main_item{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | font-size: 30rpx; |
| | | line-height: 112rpx; |
| | | border-bottom: 1rpx solid rgba(213,213,213, 0.67); |
| | | box-sizing: border-box; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="workstation"> |
| | | <view class="search"> |
| | | <u-search placeholder="请è¾å
¥å·¥ä½ç«åç§°æç´¢" v-model="keyword" bgColor="#fff" |
| | | placeholderColor="#999999" :showAction="false" |
| | | searchIconColor="#6A6A6A" height="74" @search="search" @change="search"></u-search> |
| | | </view> |
| | | <scroll-view :scroll-top="20" scroll-y="true" class="scroll-Y"> |
| | | <view v-for="(item,index) in list" :key="'item'+index" class="list-item" @click="choose(item,index)" :class="{active:current==index}"> |
| | | <span> |
| | | {{ '(' + item.workCenter + ')' + item.name }} |
| | | </span><u-icon class="icon_choose" size="20rpx" v-if="current==index"/> |
| | | </view> |
| | | <u-loading mode="circle" :show="loadingList" class="loading"></u-loading> |
| | | <p v-if="list.length==0" style="text-align: center;margin-top: 100rpx;color: rgb(96, 98, 102);font-size: 28rpx;">ææ æ°æ®</p> |
| | | </scroll-view> |
| | | <view class="bottom"> |
| | | <u-button type="primary" :loading="loading" @click="submit" class="btn">ç¡®å®</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import UIcon from "../../../uview-ui/components/u-icon/u-icon.vue"; |
| | | |
| | | export default { |
| | | components: {UIcon}, |
| | | data() { |
| | | return { |
| | | scrollTop: 200, |
| | | keyword:'', |
| | | list:[], |
| | | current:0, |
| | | currentChoose: {}, |
| | | loadingList:false, |
| | | loading:false, |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.loadList(); |
| | | }, |
| | | methods: { |
| | | // 卿¤å è½½å表 |
| | | loadList(){ |
| | | // this.loadingList = true; |
| | | this.$u.api.dailyPaper.getWorkstation().then(res => { |
| | | if (res.code === 0) { |
| | | this.list = res.data |
| | | this.currentChoose = this.list[0] |
| | | } else { |
| | | this.$u.toast(res.msg) |
| | | } |
| | | }) |
| | | }, |
| | | // æç´¢ |
| | | search(e){ |
| | | let params =null |
| | | if(this.isEnglish(e)){ |
| | | params = { |
| | | workstationNo: e |
| | | } |
| | | |
| | | }else{ |
| | | params = { |
| | | name: e |
| | | } |
| | | } |
| | | |
| | | this.$u.api.dailyPaper.getWorkstation(params).then(res => { |
| | | if (res.code === 0) { |
| | | this.list = res.data |
| | | this.currentChoose = this.list[0] |
| | | } else { |
| | | this.$u.toast(res.msg) |
| | | } |
| | | }) |
| | | }, |
| | | choose(item,index){ |
| | | this.current = index; |
| | | this.currentChoose = item |
| | | }, |
| | | submit(){ |
| | | this.loading = true; |
| | | uni.$emit('returnData',this.currentChoose) |
| | | uni.navigateBack({ |
| | | //å
³éå½å页é¢ï¼è¿åä¸ä¸é¡µé¢æå¤çº§é¡µé¢ã |
| | | delta:1 |
| | | }); |
| | | this.loading = false; |
| | | }, |
| | | isEnglish(str) { |
| | | // è±æå符æ£åè¡¨è¾¾å¼ |
| | | const englishPattern = /^[A-Za-z ]*$/; |
| | | return englishPattern.test(str); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .workstation{ |
| | | width: 100%; |
| | | height: 100vh; |
| | | background: #E6EFFF; |
| | | padding: 0 30rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | position: fixed; |
| | | .search{ |
| | | width: 100%; |
| | | margin: 24rpx 0; |
| | | } |
| | | .scroll-Y { |
| | | width: 100%; |
| | | height: calc(100vh - 340rpx); |
| | | overflow-y: auto; |
| | | box-sizing: border-box; |
| | | .loading{ |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%,-50%); |
| | | } |
| | | .list-item{ |
| | | background: #FFFFFF; |
| | | border-radius: 10rpx; |
| | | box-sizing: border-box; |
| | | padding: 22rpx 43rpx; |
| | | margin-bottom: 20rpx; |
| | | font-weight: 500; |
| | | font-size: 30rpx; |
| | | color: #333333; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | &.active{ |
| | | background: #F4F9FF; |
| | | border: 1px solid #ACBDF8; |
| | | color: #214DED; |
| | | } |
| | | } |
| | | .icon_choose { |
| | | background-image: url('~@/static/custom/daily/icon_choose.png'); |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | height: 20rpx; |
| | | width: 20rpx; |
| | | position: relative; |
| | | } |
| | | } |
| | | .bottom { |
| | | box-sizing: border-box; |
| | | margin-top: 40rpx; |
| | | //height: 100rpx; |
| | | .btn { |
| | | height: 80rpx; |
| | | background: #214DED; |
| | | border-radius: 8rpx; |
| | | font-weight: 500; |
| | | font-size: 34rpx; |
| | | color: #FFFFFF; |
| | | z-index: 99; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <u-form class="form" :model="model" :rules="rules" ref="uForm" label-position="left"> |
| | | <u-calendar v-model="show" mode="date" @change="change" max-date="2099-12-31"></u-calendar> |
| | | <u-form-item label="æäº¤äºº" prop="leaveTime" label-width="180" v-if="model.leaveId"> |
| | | <u-input v-model="model.username" type="text" disabled="true" @click="show=true"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="å¼å§æ¶é´" prop="leaveTime" label-width="180"> |
| | | <u-input v-model="model.leaveTime" type="text" disabled="true" @click="show=true"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="天æ°" prop="days" label-width="180"> |
| | | <u-input v-model="model.days" type="number"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="夿³¨" prop="content" label-width="180"> |
| | | <u-input v-model="model.content" type="textarea"></u-input> |
| | | </u-form-item> |
| | | </u-form> |
| | | <view class="form-footer"> |
| | | <u-button class="btn" type="primary" @click="create" v-if="!model.leaveId">å建</u-button> |
| | | <u-button class="btn" type="primary" @click="submit" v-if="model.state === '0'">æäº¤</u-button> |
| | | <u-button class="btn" type="default" @click="cancel">å
³é</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | show: false, |
| | | isAdd: false, |
| | | model: { |
| | | leaveId: '', |
| | | days: 1, |
| | | content: '', |
| | | leaveTime: '', |
| | | }, |
| | | rules: { |
| | | leaveTime: [{ |
| | | required: true, |
| | | message: '请è¾å
¥å¼å§æ¶é´', |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | days: [{ |
| | | required: true, |
| | | message: '请è¾å
¥å¤©æ°', |
| | | trigger: ['change', 'blur'], |
| | | }] |
| | | } |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | if (!params.leaveId) { |
| | | return false; |
| | | } |
| | | this.$u.api.pigxOA.queryBill(params).then(res => { |
| | | Object.assign(this.model, res.data); |
| | | }); |
| | | }, |
| | | onReady() { |
| | | |
| | | }, |
| | | methods: { |
| | | change(e) { |
| | | this.model.leaveTime = e.result + " 00:00:00" |
| | | }, |
| | | create() { |
| | | this.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | this.$u.api.pigxOA.addTask(this.model).then(res => { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æäº¤æå', |
| | | showCancel: false, |
| | | success: function() { |
| | | uni.navigateTo({ |
| | | url: '/pages/oa/history' |
| | | }) |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | } else { |
| | | this.$u.toast('æ¨å¡«åçä¿¡æ¯æè¯¯ï¼è¯·æ ¹æ®æç¤ºä¿®æ£ã'); |
| | | } |
| | | }); |
| | | }, |
| | | submit() { |
| | | this.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | this.$u.api.pigxOA.submitBill(this.model).then(res => { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æäº¤æå', |
| | | showCancel: false, |
| | | success: function() { |
| | | uni.navigateTo({ |
| | | url: '/pages/oa/history' |
| | | }) |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | } else { |
| | | this.$u.toast('æ¨å¡«åçä¿¡æ¯æè¯¯ï¼è¯·æ ¹æ®æç¤ºä¿®æ£ã'); |
| | | } |
| | | }); |
| | | }, |
| | | cancel() { |
| | | uni.navigateBack(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <scroll-view class="scroll-list" scroll-y="true" @scrolltolower="loadMore"> |
| | | <u-cell-group class="list" :border="false"> |
| | | <u-card :title="item.leaveId" :sub-title="item.leaveTime" v-for="(item, index) in list" |
| | | :key="item.leaveId" :index="item.leaveId" @click="cardClick(item.leaveId)"> |
| | | <view class="" slot="body"> |
| | | <view> |
| | | <span class="span-lable">ç³è¯·äºº:</span> |
| | | {{item.username}} |
| | | </view> |
| | | <view> |
| | | <span class="span-lable">ç³è¯·äºº:</span> |
| | | {{item.content}} |
| | | </view> |
| | | <view> |
| | | <span class="span-lable">è¿åº¦:</span> |
| | | <span v-if="item.state === '0'">æªæäº¤</span> |
| | | <span v-if="item.state === '1'">审æ¹ä¸</span> |
| | | <span v-if="item.state === '2'">已宿</span> |
| | | <span v-if="item.state === '9'">驳å</span> |
| | | </view> |
| | | </view> |
| | | <view class="card-foot" slot="foot"> |
| | | <u-button size="medium" @click="del(item.leaveId)">å é¤</u-button> |
| | | </view> |
| | | </u-card> |
| | | </u-cell-group> |
| | | <view class="loadmore" @click="loadMore"> |
| | | <u-loadmore :status="loadStatus"></u-loadmore> |
| | | </view> |
| | | </scroll-view> |
| | | <view class="btn-plus" @click="navTo('form')"> |
| | | <u-icon name="plus-circle-fill" size="90" color="#3d87ff"></u-icon> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | keywords: '', |
| | | query: { |
| | | current: 1, |
| | | size: 20 |
| | | }, |
| | | list: [], |
| | | count: 0, |
| | | loadStatus: 'loadmore', |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style: { |
| | | background: '#dd524d' |
| | | } |
| | | }] |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.loadList(); |
| | | }, |
| | | onShow() { |
| | | if (uni.getStorageSync('refreshList') === true) { |
| | | uni.removeStorageSync('refreshList'); |
| | | this.search(''); |
| | | } |
| | | }, |
| | | methods: { |
| | | cardClick(e) { |
| | | uni.navigateTo({ |
| | | url: '/pages/oa/form?leaveId=' + e |
| | | }) |
| | | }, |
| | | loadMore() { |
| | | this.loadStatus = "loading"; |
| | | setTimeout(() => { |
| | | this.query.current += 1; |
| | | this.loadList(); |
| | | }, 100); |
| | | }, |
| | | loadList() { |
| | | this.$u.api.pigxOA.queryBillPage(this.query).then(res => { |
| | | console.log('res:', res) |
| | | if (!res.data.records || res.data.records.length == 0) { |
| | | this.loadStatus = "nomore"; |
| | | return; |
| | | } |
| | | this.list = this.list.concat(res.data.records); |
| | | this.total = res.data.total; |
| | | this.query.current = res.data.current; |
| | | this.query.size = res.data.size; |
| | | this.loadStatus = "loadmore"; |
| | | }); |
| | | }, |
| | | del(leaveId) { |
| | | let self = this; |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: '确认è¦å é¤è¯¥æ°æ®åï¼', |
| | | showCancel: true, |
| | | success: function(res2) { |
| | | if (res2.confirm) { |
| | | self.$u.api.pigxOA.delBill({ |
| | | leaveId: leaveId |
| | | }).then(res => { |
| | | self.$u.toast('å 餿å'); |
| | | self.query.current = 1 |
| | | self.list = [] |
| | | self.loadList() |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | search(value) { |
| | | this.list = []; |
| | | this.query.current = 1; |
| | | this.query.username = value; |
| | | this.loadList(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | page { |
| | | background-color: #f8f8f8; |
| | | } |
| | | |
| | | .btn-plus { |
| | | position: absolute; |
| | | bottom: 50rpx; |
| | | right: 50rpx; |
| | | z-index: 1; |
| | | opacity: 0.6; |
| | | } |
| | | |
| | | .btn-plus:hover { |
| | | opacity: 1; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <u-form class="form" :model="model" :rules="rules" ref="uForm" label-position="left"> |
| | | <u-calendar v-model="show" mode="date" @change="change" max-date="2099-12-31"></u-calendar> |
| | | <u-form-item label="æäº¤äºº" prop="leaveTime" label-width="180" v-if="model.leaveId"> |
| | | <u-input v-model="model.username" type="text" disabled="true" @click="show=true"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="å¼å§æ¶é´" prop="leaveTime" label-width="180"> |
| | | <u-input v-model="model.leaveTime" type="text" disabled="true" @click="show=true"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="天æ°" prop="days" label-width="180"> |
| | | <u-input v-model="model.days" type="number"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="æäº¤äººå¤æ³¨" prop="content" label-width="180"> |
| | | <u-input v-model="model.content" type="textarea"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="审æ¹äººæ¹æ³¨" prop="content" label-width="180"> |
| | | <u-input v-model="model.comment" type="textarea"></u-input> |
| | | </u-form-item> |
| | | <u-image width="100%" height="300rpx" mode="aspectFit" :src="viewSrc"> |
| | | </u-image> |
| | | </u-form> |
| | | <view class="form-footer" v-for="(item, index) in model.flagList" :key="index" :index="index"> |
| | | <u-button class="btn" type="primary" @click="doTask(item)">{{item}}</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | show: false, |
| | | isAdd: false, |
| | | viewSrc: '', |
| | | model: { |
| | | leaveId: '', |
| | | days: 1, |
| | | content: '', |
| | | leaveTime: '', |
| | | } |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | this.viewSrc = this.vuex_config.baseUrl + '/act/task/view/' + params.taskId |
| | | this.$u.api.pigxOA.getTask(params).then(res => { |
| | | console.log(res.data) |
| | | Object.assign(this.model, res.data); |
| | | }); |
| | | }, |
| | | onReady() { |
| | | |
| | | }, |
| | | methods: { |
| | | doTask(flag) { |
| | | this.$u.api.pigxOA.doTask(this.model).then(res => { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: flag + 'æå', |
| | | showCancel: false, |
| | | success: function() { |
| | | uni.navigateTo({ |
| | | url: '/pages/oa/todos' |
| | | }) |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <view class="search"> |
| | | <u-search v-model="keywords" @custom="search" @search="search"></u-search> |
| | | </view> |
| | | <scroll-view class="scroll-list" scroll-y="true" @scrolltolower="loadMore"> |
| | | <u-cell-group class="list" :border="false"> |
| | | <u-swipe-action :options="options" v-for="(item, index) in list" :key="item.taskId" :index="index" |
| | | @click="optionsClick"> |
| | | <u-cell-item :arrow="true" @click="navTo('/pages/oa/task?taskId='+item.taskId)"> |
| | | <text slot="title">{{item.taskId}} {{ item.taskName }}</text> |
| | | <text slot="label">å建æ¶é´ï¼{{ item.time }}</text> |
| | | </u-cell-item> |
| | | </u-swipe-action> |
| | | </u-cell-group> |
| | | <view class="loadmore" @click="loadMore"> |
| | | <u-loadmore :status="loadStatus"></u-loadmore> |
| | | </view> |
| | | </scroll-view> |
| | | <view class="btn-plus" @click="navTo('form')"> |
| | | <u-icon name="plus-circle-fill" size="90" color="#3d87ff"></u-icon> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | keywords: '', |
| | | query: { |
| | | current: 1, |
| | | size: 20 |
| | | }, |
| | | list: [], |
| | | count: 0, |
| | | loadStatus: 'loadmore', |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style: { |
| | | background: '#dd524d' |
| | | } |
| | | }] |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.loadList(); |
| | | }, |
| | | onShow() { |
| | | if (uni.getStorageSync('refreshList') === true) { |
| | | uni.removeStorageSync('refreshList'); |
| | | this.search(''); |
| | | } |
| | | }, |
| | | methods: { |
| | | loadMore() { |
| | | this.loadStatus = "loading"; |
| | | setTimeout(() => { |
| | | this.query.current += 1; |
| | | this.loadList(); |
| | | }, 100); |
| | | }, |
| | | loadList() { |
| | | this.$u.api.pigxOA.queryTodos(this.query).then(res => { |
| | | if (!res.data.records || res.data.records.length == 0) { |
| | | this.loadStatus = "nomore"; |
| | | return; |
| | | } |
| | | this.list = this.list.concat(res.data.records); |
| | | this.total = res.data.total; |
| | | this.query.current = res.data.current; |
| | | this.query.size = res.data.size; |
| | | this.loadStatus = "loadmore"; |
| | | }); |
| | | }, |
| | | optionsClick(rowIndex, btnIndex) { |
| | | if (btnIndex == 0) { |
| | | let self = this; |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: '确认è¦å é¤è¯¥æ°æ®åï¼', |
| | | showCancel: true, |
| | | success: function(res2) { |
| | | if (res2.confirm) { |
| | | let row = self.list[rowIndex]; |
| | | self.$u.api.pigxUser.delete({ |
| | | id: row.userId |
| | | }).then(res => { |
| | | self.$u.toast('å 餿å'); |
| | | self.query.current = 1 |
| | | self.list = [] |
| | | self.loadList() |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | search(value) { |
| | | this.list = []; |
| | | this.query.current = 1; |
| | | this.query.username = value; |
| | | this.loadList(); |
| | | }, |
| | | navTo(url) { |
| | | uni.navigateTo({ |
| | | url: url |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | page { |
| | | background-color: #f8f8f8; |
| | | } |
| | | |
| | | .btn-plus { |
| | | position: absolute; |
| | | bottom: 50rpx; |
| | | right: 50rpx; |
| | | z-index: 1; |
| | | opacity: 0.6; |
| | | } |
| | | |
| | | .btn-plus:hover { |
| | | opacity: 1; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="page"> |
| | | <view class="productfeed-feedrecordlist-bg"/> |
| | | <u-navbar title="ææè®°å½" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" back-icon-color="#000"/> |
| | | <view class="wrap"> |
| | | <scroll-view class="productfeed-feedrecordlist-scroll-list" scroll-y="true"> |
| | | <u-cell-group class="productfeed-feedrecordlist-scroll-list-group" :border="false"> |
| | | <view class="content" v-for="(item, index) in feedList" :key="item.id" :index="index"> |
| | | <view class="row-list task-row"> |
| | | <view class="_label"> |
| | | é¶ä»¶ç¼å·: |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.partNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list task-row"> |
| | | <view class="_label"> |
| | | é¶ä»¶: |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.partName }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list task-row"> |
| | | <view class="_label"> |
| | | SNå·: |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.partBatchNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list task-row"> |
| | | <view class="_label"> |
| | | è½½å
·ç¼å·: |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.reelNumber }} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="row-list task-row"> |
| | | <view class="_label"> |
| | | å¯ç¨æ°é: |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.availableStockQuantity }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list task-row"> |
| | | <view class="_label"> |
| | | åºåæ°é: |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.stockQuantity }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list task-row"> |
| | | <view class="_label"> |
| | | åä½: |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.unit }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list task-row"> |
| | | <view class="_label"> |
| | | ææäºº: |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.createUser }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import content_bg from '@/static/custom/product/productBg.png' |
| | | export default { |
| | | data() { |
| | | return { |
| | | background:{ |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: 'fixed', |
| | | backgroundSize: '100% auto', |
| | | backgroundRepeat: 'no-repeat', |
| | | }, |
| | | feedList:[], |
| | | originList: [], |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | if (params && params.workstationId !== "undefined") { |
| | | this.loadList(params.workstationId); |
| | | } |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | loadList(workstationId) { |
| | | |
| | | //å·²ææªæ¶è |
| | | let params={ |
| | | workstationId:workstationId |
| | | } |
| | | |
| | | this.$u.api.pigxFeed.getFeedingStock(params).then(res => { |
| | | console.log(res) |
| | | this.originList = res.data |
| | | this.feedList = this.originList |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .productfeed-feedrecordlist-bg{ |
| | | background-color: #F6F9FF; |
| | | background-image: url('~@/static/custom/product/productBg.png'); |
| | | // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0)); |
| | | padding: 0 20rpx; |
| | | background-attachment: fixed; |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .productfeed-feedrecordlist-scroll-list-group{ |
| | | padding:0rpx 30rpx ; |
| | | ::v-deep .u-cell-item-box { |
| | | border-radius: 10rpx; |
| | | padding: 25rpx 23rpx; |
| | | } |
| | | .content{ |
| | | height:400rpx; |
| | | background: #F5F9FF; |
| | | padding: 0rpx 14rpx; |
| | | .row-list { |
| | | height: 50rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | padding: 0px; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | .row-list ._label { |
| | | display: flex; |
| | | color: #666666; |
| | | font-size:26rpx; |
| | | align-items: center; |
| | | width: 170rpx; |
| | | } |
| | | |
| | | .row-list ._content { |
| | | text-align: right; |
| | | color: #909399; |
| | | font-size: 24rpx; |
| | | ._content-text{ |
| | | color:#214ded; |
| | | } |
| | | } |
| | | .row-list ._input { |
| | | ::v-deep .uni-input-input{ |
| | | color:#D35651; |
| | | border-bottom: 1px solid #ADC8E4; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="page"> |
| | | <view class="productfeed-index-bg"/> |
| | | <u-navbar title="ç产ææ" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" back-icon-color="#000"/> |
| | | <view class="productfeed-index-param"> |
| | | <view class="productfeed-index-param-title"> |
| | | <view> |
| | | <u-line style="border:5rpx solid #264DE9" length="33rpx" direction="col" color="#264DE9" :hair-line="false"></u-line> |
| | | </view> |
| | | <view class="title-label">ææä¿¡æ¯</view> |
| | | </view> |
| | | <view class="productfeed-index-param-view"> |
| | | <view class="productfeed-index-param-item param-extra"> |
| | | <view class="productfeed-index-param-item-left"> |
| | | <text class="item-one">å·¥ä½ç«</text> |
| | | </view> |
| | | <view class="productfeed-index-param-item-right" @click="toWorkstation()"> |
| | | <text v-if="feedMainInfo.workstationName" class="item-one">{{feedMainInfo.workstationName}}</text> |
| | | <text v-if="!feedMainInfo.workstationName" class="item-one item-two">è¯·éæ©</text> |
| | | <u-icon name="arrow-right" color="#2979ff" size="28"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="productfeed-index-param-item param-extra"> |
| | | <view class="productfeed-index-param-item-left"> |
| | | <text class="item-one">å·¥åå·</text> |
| | | </view> |
| | | <view class="productfeed-index-param-item-right" @click="toOptask()"> |
| | | <text v-if="feedMainInfo.optaskNo" class="item-one">{{feedMainInfo.optaskNo}}</text> |
| | | <text v-if="!feedMainInfo.optaskNo" class="item-one item-two">è¯·éæ©</text> |
| | | <u-icon name="arrow-right" color="#2979ff" size="28"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="productfeed-index-param-item"> |
| | | <view class="productfeed-index-param-item-left"> |
| | | <text class="item-one">ææè®°å½</text> |
| | | </view> |
| | | <view class="productfeed-index-param-item-right" @click="toFeedRecord()"> |
| | | <text class="item-three">廿¥ç</text> |
| | | <u-icon name="arrow-right" color="#2979ff" size="28"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="productfeed-index-body-title"> |
| | | <view> |
| | | <u-line style="border:5rpx solid #264DE9" length="33rpx" direction="col" color="#264DE9" :hair-line="false"></u-line> |
| | | </view> |
| | | <view class="title-label">æ«æè®°å½</view> |
| | | </view> |
| | | <view class="wrap"> |
| | | <scroll-view class="productfeed-index-scroll-list" scroll-y="true" > |
| | | <u-cell-group class="productfeed-index-scroll-list-group" :border="false"> |
| | | <view class="content" v-for="(item, index) in list" :key="item.erpPartNo" :index="index"> |
| | | <view class="content-header"> |
| | | <view class="header-item"> |
| | | <view class="content-header-icon-one"></view> |
| | | <view class="content-header-title">{{ item.partBatchNo }}</view> |
| | | </view> |
| | | <view class="header-item"> |
| | | <view class="content-header-icon-two"></view> |
| | | <view class="content-header-title-ne">{{ item.partName }}</view> |
| | | </view> |
| | | <view class="header-item-toolbar" @click="deleteHandle(item)"> |
| | | <view class="header-item-toolbar-del-icon"> |
| | | |
| | | </view> |
| | | <view class="header-item-toolbar-del-text"> |
| | | å é¤ |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="content-body"> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | é¶ä»¶ç¼å·ï¼ |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.partNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | å¯ç¨æ°éï¼ |
| | | </view> |
| | | <view class="_content"> |
| | | <text class="_content-text">{{ item.reservedQuantity }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | æææ°éï¼ |
| | | </view> |
| | | <view class="_content _input"> |
| | | <u-input placeholder="请è¾å
¥æææ°é" v-model="item.suppliedQuantity" type="digit"></u-input> |
| | | <view class="edit_icon"></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | <scan></scan> |
| | | <view class="productfeed-footer"> |
| | | <u-button class="btn-left" text="æ¸
空" size="medium" @click="clearData()">æ¸
空</u-button> |
| | | <u-button class="btn-right" text="ææ" size="medium" @click="feedMaterialClick()">ææ</u-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import scan from "@/components/scan/scan.vue"; |
| | | import content_bg from '@/static/custom/product/productBg.png' |
| | | export default { |
| | | components: { |
| | | scan |
| | | }, |
| | | data() { |
| | | return { |
| | | background:{ |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: 'fixed', |
| | | backgroundSize: '100% auto', |
| | | backgroundRepeat: 'no-repeat', |
| | | }, |
| | | showCardHead: false, |
| | | feedMainInfo: { |
| | | workstationId: null, |
| | | workstationNo: null, |
| | | workstationName: null, |
| | | optaskId: null, |
| | | optaskNo: null, |
| | | feedLocId: null, |
| | | feedLocNo: null, |
| | | feedLocName: null, |
| | | partId: null, |
| | | partNo: null, |
| | | partName: null, |
| | | quality: null, |
| | | ifsBatchNo:null, |
| | | customerOrderNo:null |
| | | }, |
| | | query: { |
| | | current: 1, |
| | | size: 20 |
| | | }, |
| | | list:[], |
| | | options: [{ |
| | | text: 'å é¤', |
| | | style: { |
| | | backgroundColor: '#dd524d' |
| | | } |
| | | }], |
| | | count: 0, |
| | | loadStatus: 'loadmore', |
| | | idIndex:1 |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | |
| | | }, |
| | | onShow() { |
| | | |
| | | let that = this |
| | | |
| | | uni.$off('scan') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scan', function(data) { |
| | | console.log('onscan'); |
| | | //æ«ç æååçåè°ï¼ä½ å¯ä»¥åèªå·±çé»è¾ä»£ç å¨è¿é |
| | | console.log('æ«ç ç»æï¼', data.code); |
| | | // console.log(data.code.replace(/\n/g,'').replace(/\s*/g,'')) |
| | | // console.log('æ«ç ç»æ1ï¼', JSON.parse(data.code.replace(/\n/g,"").replace(/\s*/g,''))); |
| | | // that.search(data.code); |
| | | |
| | | if (data.code != "" && |
| | | (that.feedMainInfo.workstationId == "" |
| | | || that.feedMainInfo.workstationId==null |
| | | || that.feedMainInfo.workstationId==undefined |
| | | || that.feedMainInfo.workstationId=="undefined" |
| | | )) { |
| | | uni.showToast({ |
| | | title: '请å
鿩工ä½ç«ï¼åæ«ç ', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | |
| | | that.loadList(data.code); |
| | | }) |
| | | }, |
| | | onNavigationBarButtonTap(e) { |
| | | this.goScan() |
| | | }, |
| | | methods: { |
| | | goScan(){ |
| | | //let scanresult={"part_no":"88.118.1/A0044193","package_code":"TP092022101200001","unit_meas":"è·¦","wdr":"*","lot_batch_no":"*","qty_arrived":12} |
| | | //this.scanHandle(JSON.stringify(scanresult)) |
| | | |
| | | uni.scanCode({ |
| | | scanType: ['qrCode'], |
| | | success: res => { |
| | | try { |
| | | console.log('æ«ç ç»æï¼', res); |
| | | this.scanHandle(res.result) |
| | | } catch (e) {} |
| | | } |
| | | }); |
| | | }, |
| | | scanHandle(workstationNo){ |
| | | if(workstationNo!=''){ |
| | | this.$u.api.pigxFeed.fetchWorkstationList({workstationNo:workstationNo}).then(resp => { |
| | | |
| | | if (!resp.data.records || resp.data.records.length == 0) { |
| | | this.$u.toast('ã'+workstationNo+'ã,æªæ¥è¯¢å°æºå°ä¿¡æ¯') |
| | | }else{ |
| | | let workstationList=resp.data.records |
| | | let scanWorkstationInfo=workstationList[0] |
| | | this.feedMainInfo.workstationId = scanWorkstationInfo.id |
| | | this.feedMainInfo.workstationNo = scanWorkstationInfo.workstationNo |
| | | this.feedMainInfo.workstationName = scanWorkstationInfo.name |
| | | |
| | | } |
| | | }) |
| | | }else{ |
| | | this.$u.toast('æªæ«æå°æºå°å·') |
| | | } |
| | | }, |
| | | clearData(){ |
| | | this.list = [] |
| | | this.feedMainInfo={ |
| | | workstationId: null, |
| | | workstationNo: null, |
| | | workstationName: null, |
| | | optaskId: null, |
| | | optaskNo: null, |
| | | feedLocId: null, |
| | | feedLocNo: null, |
| | | feedLocName: null, |
| | | partId: null, |
| | | partNo: null, |
| | | partName: null, |
| | | quality: null, |
| | | customerOrderNo:null |
| | | } |
| | | }, |
| | | feedMaterialClick(){ |
| | | |
| | | let that = this; |
| | | |
| | | if(that.feedMainInfo.workstationNo==""||that.feedMainInfo.workstationNo==undefined||that.feedMainInfo.workstationNo=="undefined") |
| | | { |
| | | that.$u.toast('请å
鿩工ä½ç«') |
| | | return |
| | | } |
| | | |
| | | if(that.list.length==0) |
| | | { |
| | | that.$u.toast('请æ«ç è·åææä¿¡æ¯') |
| | | return |
| | | } |
| | | |
| | | for(let i=0;i<that.list.length;i++) |
| | | { |
| | | if(that.list[i].suppliedQuantity>that.list[i].reservedQuantity) |
| | | { |
| | | |
| | | that.$u.toast('å¯ç¨åºåæ°éåªæ:'+that.list[i].reservedQuantity + 'ï¼æææ°éè¶
è¿åºåæ°æ®ï¼è¯·éæ°è¾å
¥æææ°é') |
| | | return |
| | | } |
| | | } |
| | | |
| | | let feedList=[] |
| | | that.list.map((item) => { |
| | | |
| | | let suppliedQuantity =0; |
| | | suppliedQuantity = item.suppliedQuantity!=""?parseFloat(item.suppliedQuantity):0 |
| | | |
| | | let data ={ |
| | | workstationId: that.feedMainInfo.workstationId, |
| | | //workstationNo : that.feedMainInfo.workstationNo, |
| | | stockId: item.stockId, |
| | | joinStockOrderId: item.id, |
| | | suppliedQuantity: suppliedQuantity, |
| | | partId: item.partId, |
| | | partNo: item.partNo, |
| | | partBatchNo: item.partBatchNo, |
| | | systemNo: item.systemNo, |
| | | partName: item.partName, |
| | | unit: item.partUnit ? item.partUnit : '', |
| | | //ifsBatchNo:item.ifsBatchNo ,//ifsæ¹æ¬¡å· |
| | | |
| | | } |
| | | feedList.push(data) |
| | | |
| | | }); |
| | | const feedIn = { |
| | | feeds: feedList, |
| | | customOrderNo: that.feedMainInfo.customOrderNo, |
| | | feedingFrom: 'joinStocker', |
| | | operationTaskId: that.feedMainInfo.optaskId, |
| | | source: undefined |
| | | } |
| | | that.$u.api.pigxFeed.addFeed(feedIn).then(res => { |
| | | |
| | | if (res.code == 0) { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æäº¤æå', |
| | | showCancel: false, |
| | | success: function() { |
| | | that.list = [] |
| | | |
| | | } |
| | | }) |
| | | } else { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æäº¤å¤±è´¥', |
| | | showCancel: false, |
| | | success: function() { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | toFeedRecord() { |
| | | |
| | | if(this.feedMainInfo.workstationNo==""||this.feedMainInfo.workstationNo==undefined||this.feedMainInfo.workstationNo=="undefined") |
| | | { |
| | | this.$u.toast('请å
鿩工ä½ç«') |
| | | return |
| | | } |
| | | |
| | | uni.navigateTo({ |
| | | url: '/pages/product/feed/feedRecordList?workstationId='+this.feedMainInfo.workstationId |
| | | }) |
| | | }, |
| | | setLocation(location) { |
| | | this.feedMainInfo.feedLocId = location.id |
| | | this.feedMainInfo.feedLocNo = location.locNo |
| | | this.feedMainInfo.feedLocName = location.locName |
| | | }, |
| | | setWorkstation(workstation) { |
| | | this.feedMainInfo.workstationId = workstation.id |
| | | this.feedMainInfo.workstationNo = workstation.workstationNo |
| | | this.feedMainInfo.workstationName = workstation.name |
| | | }, |
| | | setOptask(task) { |
| | | this.feedMainInfo.optaskId = task.id |
| | | this.feedMainInfo.optaskNo = task.optaskNo |
| | | this.feedMainInfo.partId = task.partId |
| | | this.feedMainInfo.partNo = task.partNo |
| | | this.feedMainInfo.partName = task.partName |
| | | this.feedMainInfo.quality = task.plannedQuantity |
| | | this.feedMainInfo.customerOrderNo=task.customerOrderNo |
| | | }, |
| | | toLocation() { |
| | | |
| | | if(this.feedMainInfo.workstationNo==""||this.feedMainInfo.workstationNo==undefined||this.feedMainInfo.workstationNo=="undefined") |
| | | { |
| | | this.$u.toast('请å
鿩工ä½ç«') |
| | | return |
| | | } |
| | | |
| | | uni.navigateTo({ |
| | | url: '/pages/product/feed/locationList?workstationNo='+this.feedMainInfo.workstationNo |
| | | }) |
| | | }, |
| | | toOptask() { |
| | | |
| | | |
| | | if(this.feedMainInfo.workstationNo==""||this.feedMainInfo.workstationNo==undefined||this.feedMainInfo.workstationNo=="undefined") |
| | | { |
| | | this.$u.toast('请å
鿩工ä½ç«') |
| | | return |
| | | } |
| | | |
| | | |
| | | uni.navigateTo({ |
| | | url: '/pages/product/feed/optaskList?workstationNo='+this.feedMainInfo.workstationNo |
| | | }) |
| | | }, |
| | | toWorkstation() { |
| | | uni.navigateTo({ |
| | | url: '/pages/product/feed/workstationList' |
| | | }) |
| | | }, |
| | | loadList(sanCode) { |
| | | let that = this |
| | | if(sanCode!="") |
| | | { |
| | | //æ ¹æ®æ«å
¥çå符串信æ¯ï¼å¤ææ«çæ¯æ¡å½¢ç ï¼è¿æ¯äºç»´ç |
| | | let batchNo='' |
| | | if (sanCode.indexOf('lot_batch_no') != -1) { |
| | | // äºç»´ç |
| | | const scanContentJson = JSON.parse( |
| | | sanCode.replace(/\n/g, '').replace(/\s*/g, '') |
| | | ) |
| | | const partNo= scanContentJson.part_no |
| | | const ifsBatchNo = scanContentJson.lot_batch_no |
| | | batchNo=scanContentJson.sn_no |
| | | if(!(batchNo && batchNo!=null && batchNo!='' && batchNo!='null')){ |
| | | batchNo='' |
| | | } |
| | | |
| | | } else { |
| | | // æ¡å½¢ç |
| | | batchNo = sanCode |
| | | |
| | | } |
| | | |
| | | let params=Object.assign( |
| | | { current: 1, size: 50 }, |
| | | {operationTaskId:this.feedMainInfo.optaskId}, |
| | | {partBatchNo:batchNo} |
| | | ) |
| | | |
| | | //è·åé
çç©æ |
| | | this.$u.api.pigxFeed.fetchJoinStockOrderList(params).then(res => { |
| | | let reList = [] |
| | | reList = res.data.records; |
| | | if(reList.length==0) |
| | | { |
| | | uni.showToast({ |
| | | title: "æªæ«å°é
çç©æä¿¡æ¯", |
| | | icon: "none" |
| | | }); |
| | | return |
| | | } |
| | | let flag = true |
| | | for (let i = 0; i < reList.length; i++) { |
| | | const exist = that.list.find( |
| | | (el) => el.partBatchNo == reList[i].partBatchNo |
| | | ) |
| | | if (exist) { |
| | | flag = false |
| | | } |
| | | } |
| | | if(!flag){ |
| | | uni.showToast({ |
| | | title: "é¶ä»¶æ¹æ¬¡å·²åå¨", |
| | | icon: "none" |
| | | }); |
| | | return |
| | | }else{ |
| | | reList.map((item) => { |
| | | item.suppliedQuantity = item.reservedQuantity |
| | | that.list.push(item) |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | //æ ¹æ®å·¥ä½ç«idæ¥è¯¢çº¿è¾¹ä» |
| | | /*this.$u.api.pigxFeed.getStockByWorkstationId(params).then(res => { |
| | | let reList = [] |
| | | reList = res.data.records; |
| | | if(reList.length==0) |
| | | { |
| | | uni.showToast({ |
| | | title: "æªæ«å°ç¸åºææä¿¡æ¯", |
| | | icon: "none" |
| | | }); |
| | | return |
| | | } |
| | | |
| | | reList.map((item) => { |
| | | item.suppliedQuantity = item.reservedQuantity |
| | | that.list.push(item) |
| | | }); |
| | | });*/ |
| | | } |
| | | |
| | | this.$forceUpdate(); |
| | | |
| | | }, |
| | | deleteHandle(obj) { |
| | | let that = this |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æ¤æä½å°å é¤è¯¥æ«ç ä¿¡æ¯, æ¯å¦ç»§ç»?', |
| | | success: function(res) { |
| | | if (res.confirm) { |
| | | |
| | | that.list.map((item, index) => { |
| | | if (obj.id == item.id) { |
| | | that.list.splice(index, 1) |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | search(value) { |
| | | this.list = []; |
| | | this.query.current = 1; |
| | | this.query.username = value; |
| | | this.loadList(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .productfeed-index-bg{ |
| | | background-color: #F6F9FF; |
| | | background-image: url('~@/static/custom/product/productBg.png'); |
| | | // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0)); |
| | | padding: 0 20rpx; |
| | | background-attachment: fixed; |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .productfeed-index-param{ |
| | | padding: 40rpx 30rpx 20rpx 30rpx; |
| | | .productfeed-index-param-title{ |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | margin-bottom: 30rpx; |
| | | .title-label{ |
| | | margin-left: 14rpx; |
| | | font-size: 34rpx; |
| | | font-weight: bold; |
| | | color: #283E65; |
| | | } |
| | | } |
| | | .productfeed-index-param-view{ |
| | | height: 300rpx; |
| | | background-color: #fff; |
| | | border-radius: 10rpx; |
| | | padding:0rpx 23rpx; |
| | | margin-bottom: 30rpx; |
| | | .productfeed-index-param-item{ |
| | | height: 100rpx; |
| | | border: 1px solid #ADC8E4; |
| | | line-height: 100rpx; |
| | | display:flex; |
| | | justify-content: space-between; |
| | | border: none; |
| | | .productfeed-index-param-item-left{ |
| | | .item-one{ |
| | | font-size: 30rpx; |
| | | color: #4F4F4F; |
| | | } |
| | | } |
| | | .productfeed-index-param-item-right{ |
| | | .item-one{ |
| | | font-size: 30rpx; |
| | | color: #333333; |
| | | margin-right: 6rpx; |
| | | } |
| | | .item-two{ |
| | | font-size: 30rpx; |
| | | color: #A6B4CC; |
| | | margin-right: 6rpx; |
| | | } |
| | | .item-three{ |
| | | font-size: 30rpx; |
| | | color: #214DED; |
| | | margin-right: 6rpx; |
| | | } |
| | | } |
| | | } |
| | | .param-extra{ |
| | | border-bottom: 1px solid #EDEDED; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .productfeed-index-body-title{ |
| | | padding: 0rpx 30rpx 0rpx 30rpx; |
| | | margin-bottom: 32rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | .title-label{ |
| | | margin-left: 14rpx; |
| | | font-size: 34rpx; |
| | | font-weight: bold; |
| | | color: #283E65; |
| | | } |
| | | } |
| | | |
| | | .wrap .productfeed-index-scroll-list{ |
| | | height:calc(100vh - var(--window-top) - var(--window-bottom) - 756rpx); |
| | | width:100%; |
| | | } |
| | | .productfeed-index-scroll-list-group{ |
| | | ::v-deep .u-cell-item-box { |
| | | background-color:rgba(250,252,255,0.36) !important; |
| | | padding:0rpx 30rpx ; |
| | | } |
| | | .content { |
| | | font-size: 12px; |
| | | background-color: #FFFFFF; |
| | | box-sizing: border-box; |
| | | border-radius: 10rpx; |
| | | margin: 0rpx 0rpx 24rpx; |
| | | height: 332rpx; |
| | | padding: 10rpx 20rpx; |
| | | box-shadow:0rpx 6rpx 12rpx 2rpx rgba(127, 127, 127, 0.1) !important; |
| | | position:relative; |
| | | .content-header{ |
| | | .header-item{ |
| | | height: 50rpx; |
| | | display: flex; |
| | | align-items:center; |
| | | .content-header-icon-one{ |
| | | background-image: url('~@/static/custom/product/label-icon-1.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:28rpx; |
| | | width:28rpx; |
| | | } |
| | | .content-header-icon-two{ |
| | | background-image: url('~@/static/custom/product/label-icon-2.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:28rpx; |
| | | width:28rpx; |
| | | } |
| | | .content-header-title{ |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: bold; |
| | | color: #333333; |
| | | } |
| | | .content-header-title-ne{ |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | color: #333333; |
| | | } |
| | | } |
| | | .header-item-toolbar{ |
| | | position: absolute; |
| | | background-image: url('~@/static/custom/product/del-icon.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:60rpx; |
| | | width:140rpx; |
| | | right:0; |
| | | top:0; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | padding-top: 10rpx; |
| | | padding-right: 18rpx; |
| | | .header-item-toolbar-del-icon{ |
| | | background-image: url('~@/static/custom/product/icon_dele.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:25rpx; |
| | | width:22rpx; |
| | | margin-top: 5rpx; |
| | | } |
| | | .header-item-toolbar-del-text{ |
| | | margin-left:7rpx; |
| | | height: 23rpx; |
| | | font-size: 24rpx; |
| | | color: #FFFFFF; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .content-body{ |
| | | height:200rpx; |
| | | background: #F5F9FF; |
| | | border-radius: 10rpx; |
| | | padding: 25rpx 23rpx; |
| | | .row-list { |
| | | height: 50rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | padding: 0px; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | .row-list ._label { |
| | | display: flex; |
| | | color: #666666; |
| | | font-size:26rpx; |
| | | align-items: center; |
| | | width: 170rpx; |
| | | } |
| | | |
| | | .row-list ._content { |
| | | text-align: right; |
| | | color: #909399; |
| | | font-size: 24rpx; |
| | | ._content-text{ |
| | | color:#214ded; |
| | | } |
| | | } |
| | | .row-list ._input { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-bottom: 1px solid #4FA0FF; |
| | | height: 56rpx; |
| | | .edit_icon{ |
| | | background-image: url('~@/static/custom/finishProductIn/icon_edit.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:26rpx; |
| | | width:26rpx; |
| | | } |
| | | ::v-deep .uni-input-input{ |
| | | color:#D35651; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .productfeed-footer{ |
| | | padding: 0rpx 30rpx 0rpx 30rpx; |
| | | margin-bottom: 20rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .btn-left{ |
| | | width: 310rpx; |
| | | height: 90rpx; |
| | | background: #DBE5F3; |
| | | border: 1px solid #BFCFE4 !important; |
| | | box-shadow: 0rpx 6rpx 8rpx 0rpx rgba(110,120,135,0.3); |
| | | border-radius: 16rpx; |
| | | font-size: 40rpx; |
| | | font-weight: bold; |
| | | color: #404761; |
| | | } |
| | | .btn-left:after{ |
| | | border:none !important; |
| | | } |
| | | .btn-right{ |
| | | width: 310rpx; |
| | | height: 90rpx; |
| | | background: #214DED; |
| | | box-shadow: 0rpx 6rpx 8rpx 0rpx rgba(4,49,212,0.3); |
| | | border-radius: 16rpx; |
| | | font-size: 40rpx; |
| | | font-weight: bold; |
| | | color: #FEFEFE; |
| | | } |
| | | } |
| | | .scan{ |
| | | width: 60rpx; |
| | | height: 60rpx; |
| | | font-size: 60rpx; |
| | | color: #3281ff; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <view class="search"> |
| | | <u-search v-model="keywords" placeholder="请è¾å
¥åºä½åç§°" @clear="search" @custom="search" @search="search"> |
| | | </u-search> |
| | | </view> |
| | | <scroll-view class="scroll-list" scroll-y="true" > |
| | | <u-cell-group class="list" :border="false"> |
| | | <view v-if="locationList==0" class="nodata"> |
| | | <view>æªæ¥å°æ°æ®</view> |
| | | </view> |
| | | <view v-else class="content" v-for="(item, index) in locationList" :key="item.locNo" :index="index" |
| | | @click="selectLocation(item)"> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | åºä½ç¼å·: |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.locNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | åºä½åç§°: |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.locName }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | åºä½ç±»å: |
| | | </view> |
| | | <view class="_content"> |
| | | {{ getLocTypeName(item.locType)}} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | åºä½ç¶æ: |
| | | </view> |
| | | <view class="_content"> |
| | | {{getLocStatus(item.locStatus)}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | <scan></scan> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import scan from "@/components/scan/scan.vue"; |
| | | export default { |
| | | components: { |
| | | scan |
| | | }, |
| | | data() { |
| | | return { |
| | | originList: [], |
| | | locationList: [], |
| | | keywords: "", |
| | | dictType: "warehouse_type", |
| | | listLocType: [] |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | |
| | | //è·åæ° åºä½ç¶æ |
| | | this.$u.api.dictData({ |
| | | dictType: this.dictType |
| | | }).then(res => { |
| | | this.listLocType = res.data; |
| | | |
| | | }); |
| | | |
| | | if (params && params.workstationNo !== "undefined") { |
| | | this.loadList(params.workstationNo); |
| | | } |
| | | |
| | | }, |
| | | onShow() { |
| | | |
| | | let that = this |
| | | |
| | | uni.$off('scan') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scan', function(data) { |
| | | console.log('onscan'); |
| | | //æ«ç æååçåè°ï¼ä½ å¯ä»¥åèªå·±çé»è¾ä»£ç å¨è¿é |
| | | console.log('æ«ç ç»æï¼', data.code); |
| | | that.search(data.code); |
| | | }) |
| | | }, |
| | | onNavigationBarButtonTap(e) { |
| | | uni.scanCode({ |
| | | success: res => { |
| | | try { |
| | | const result = JSON.parse(res.result) |
| | | |
| | | } catch (e) {} |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | | getLocTypeName(locType) { |
| | | let reDate = "" |
| | | let that = this |
| | | //夿æ°ç»ä¸æ¯å¦åå¨ |
| | | let list = that.listLocType.filter(item => item.value == locType) |
| | | if (list.length > 0) { |
| | | reDate = list[0].label |
| | | } |
| | | return reDate |
| | | }, |
| | | getLocStatus(locStatus) { |
| | | let reDate = "" |
| | | switch (locStatus) { |
| | | case 1: |
| | | reDate = "使ç¨"; |
| | | break; |
| | | case 0: |
| | | reDate = "åç¨"; |
| | | break; |
| | | } |
| | | |
| | | return reDate; |
| | | }, |
| | | selectLocation(location) { |
| | | this.refreshLastPage(location) |
| | | }, |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(location) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.setLocation(location) |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }, |
| | | search(value) { |
| | | let that = this |
| | | if (value) { |
| | | that.locationList = that.originList.filter(item => item.locName.includes(value)) |
| | | } else { |
| | | that.locationList = that.originList |
| | | } |
| | | }, |
| | | loadList(workstationNo) { |
| | | let params = { |
| | | workstationNo: workstationNo |
| | | } |
| | | //æ ¹æ®å·¥ä½ç«ç¼å·è·åè¿è¡ä¸çå·¥å&&对åºççº¿è¾¹ä» |
| | | this.$u.api.pigxFeed.getBasicInfoForPdaFeedByWorkstationNo(params).then(res => { |
| | | this.originList = res.data.locationList |
| | | this.locationList = this.originList |
| | | }); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .list .content { |
| | | font-size: 12px; |
| | | background-color: #efefef; |
| | | box-sizing: border-box; |
| | | border-radius: 14rpx; |
| | | margin: 8px; |
| | | padding: 5px 10px; |
| | | box-shadow: none; |
| | | } |
| | | |
| | | .row-list { |
| | | display: flex; |
| | | flex-direction: row; |
| | | } |
| | | |
| | | .row-list ._label { |
| | | flex: 0.8; |
| | | color: #909399; |
| | | } |
| | | |
| | | .row-list ._content { |
| | | flex: 1.5; |
| | | text-align: right; |
| | | } |
| | | |
| | | .nodata{width: 20%;margin: auto;} |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="page"> |
| | | <view class="productfeed-optasklist-bg"/> |
| | | <u-navbar title="å·¥å" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" back-icon-color="#000"/> |
| | | <view class="productfeed-optasklist-search"> |
| | | <u-search v-model="keywords" shape="square" bg-color="rgba(250,252,255,0.36)" :show-action="false" placeholder="请è¾å
¥å·¥åå·" @clear="search" @custom="search" @search="search"> |
| | | </u-search> |
| | | </view> |
| | | <view class="wrap"> |
| | | <scroll-view class="productfeed-optasklist-scroll-list" scroll-y="true"> |
| | | <u-cell-group class="productfeed-optasklist-scroll-list-group" :border="false"> |
| | | <view class="content" v-for="(item, index) in optaskList" :key="item.optaskNo" :index="index" |
| | | @click="selectTask(item)"> |
| | | <view class="content-header"> |
| | | <view class="content-header-left"> |
| | | <view class="content-header-icon"></view> |
| | | <view class="content-header-title">{{ item.optaskNo }}</view> |
| | | </view> |
| | | <view class="content-header-right"> |
| | | {{getStateName(item.state)}} |
| | | </view> |
| | | </view> |
| | | <view class="content-body"> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> |
| | | </view> |
| | | <view class="_label-name">é¶ä»¶ç¼å·ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.partNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> |
| | | </view> |
| | | <view class="_label-name">é¶ä»¶åç§°ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.partName }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-3"> |
| | | </view> |
| | | <view class="_label-name">è®¡åæ°éï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.plannedQuantity }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import content_bg from '@/static/custom/product/productBg.png' |
| | | export default { |
| | | data() { |
| | | return { |
| | | background:{ |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: 'fixed', |
| | | backgroundSize: '100% auto', |
| | | backgroundRepeat: 'no-repeat', |
| | | }, |
| | | optaskList:[], |
| | | originList: [], |
| | | keywords:"", |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | if (params && params.workstationNo !== "undefined") { |
| | | this.loadList(params.workstationNo); |
| | | } |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | getStateName(state) { |
| | | let reDate = "" |
| | | switch (state) { |
| | | case "01pending": |
| | | reDate = "çå¾
"; |
| | | break; |
| | | case "02inProgress": |
| | | reDate = "è¿è¡ä¸"; |
| | | break; |
| | | } |
| | | |
| | | return reDate; |
| | | }, |
| | | search(value) { |
| | | let that = this |
| | | if (value) { |
| | | that.optaskList = that.originList.filter(item => item.optaskNo.includes(value)) |
| | | } else { |
| | | that.optaskList = that.originList |
| | | } |
| | | }, |
| | | loadList(workstationNo) { |
| | | |
| | | |
| | | let params= |
| | | { |
| | | workstationNo:workstationNo |
| | | } |
| | | //æ ¹æ®å·¥ä½ç«ç¼å·è·åè¿è¡ä¸çå·¥å&&对åºççº¿è¾¹ä» |
| | | this.$u.api.pigxFeed.getBasicInfoForPdaFeedByWorkstationNo(params).then(res => { |
| | | this.originList = res.data.operationTaskList |
| | | this.optaskList = this.originList |
| | | }); |
| | | |
| | | }, |
| | | selectTask(task) { |
| | | this.refreshLastPage(task) |
| | | }, |
| | | |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(task) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.setOptask(task) |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .productfeed-optasklist-bg{ |
| | | background-color: #F6F9FF; |
| | | background-image: url('~@/static/custom/product/productBg.png'); |
| | | // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0)); |
| | | padding: 0 20rpx; |
| | | background-attachment: fixed; |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .productfeed-optasklist-search{ |
| | | padding: 40rpx 30rpx 20rpx 30rpx; |
| | | } |
| | | |
| | | .wrap .productfeed-optasklist-scroll-list{ |
| | | height:calc(100vh - var(--window-top) - var(--window-bottom) - 242rpx); |
| | | width:100%; |
| | | } |
| | | .productfeed-optasklist-scroll-list-group{ |
| | | ::v-deep .u-cell-item-box { |
| | | background-color:rgba(250,252,255,0.36) !important; |
| | | padding:0rpx 30rpx ; |
| | | } |
| | | .content { |
| | | font-size: 12px; |
| | | background-color: #FFFFFF; |
| | | box-sizing: border-box; |
| | | border-radius: 10rpx; |
| | | margin: 0rpx 0rpx 16rpx; |
| | | height: 298rpx; |
| | | padding: 10rpx 20rpx; |
| | | box-shadow: none; |
| | | .content-header{ |
| | | height: 90rpx; |
| | | display: flex; |
| | | align-items:center; |
| | | justify-content: space-between; |
| | | .content-header-left{ |
| | | display: flex; |
| | | align-items:center; |
| | | .content-header-icon{ |
| | | background-image: url('~@/static/custom/moveWareHouse/header_icon.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:28rpx; |
| | | width:28rpx; |
| | | } |
| | | .content-header-title{ |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: bold; |
| | | color: #333333; |
| | | } |
| | | } |
| | | .content-header-right{ |
| | | text-align: right; |
| | | font-weight: bold; |
| | | color: #FB5B25; |
| | | } |
| | | } |
| | | .content-body{ |
| | | height:184rpx; |
| | | background: #F5F9FF; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | .row-list { |
| | | height: 60rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | padding: 0px; |
| | | align-items: center; |
| | | } |
| | | .row-list ._label { |
| | | display: flex; |
| | | flex: 0.8; |
| | | color: #909399; |
| | | align-items: center; |
| | | ._label-icon-1{ |
| | | background-image: url('~@/static/custom/moveWareHouse/label-icon-1.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:26rpx; |
| | | width:26rpx; |
| | | } |
| | | ._label-icon-2{ |
| | | background-image: url('~@/static/custom/moveWareHouse/label-icon-2.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:26rpx; |
| | | width:26rpx; |
| | | } |
| | | ._label-icon-3{ |
| | | background-image: url('~@/static/custom/moveWareHouse/label-icon-3.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:26rpx; |
| | | width:26rpx; |
| | | } |
| | | ._label-name{ |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 500; |
| | | color: #666666; |
| | | } |
| | | } |
| | | |
| | | .row-list ._content { |
| | | flex: 1.5; |
| | | text-align: right; |
| | | color: #909399; |
| | | font-size: 24rpx; |
| | | } |
| | | .row-list .s1 { |
| | | color:#D35651; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="page"> |
| | | <view class="productfeed-workstation-bg"/> |
| | | <u-navbar title="å·¥ä½ç«" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" back-icon-color="#000"/> |
| | | <view class="productfeed-workstation-search"> |
| | | <u-search v-model="keywords" shape="square" bg-color="rgba(250,252,255,0.36)" :show-action="false" placeholder="请è¾å
¥å·¥ä½ç«ç¼å·" @clear="search" @custom="search" @search="search"> |
| | | </u-search> |
| | | </view> |
| | | <view class="wrap"> |
| | | <scroll-view class="productfeed-workstation-scroll-list" scroll-y="true" @scrolltolower="loadMore"> |
| | | <u-cell-group class="productfeed-workstation-scroll-list-group" :border="false"> |
| | | <view class="content" v-for="(item, index) in list" :key="item.workstationNo" :index="index" |
| | | @click="selectWorkstation(item)"> |
| | | <view class="content-header"> |
| | | <view class="content-header-icon"></view> |
| | | <view class="content-header-title">{{ item.workstationNo }}</view> |
| | | </view> |
| | | <view class="content-body"> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> |
| | | </view> |
| | | <view class="_label-name">ç¼å·ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.workstationNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> |
| | | </view> |
| | | <view class="_label-name">åç§°ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.name }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-3"> |
| | | </view> |
| | | <view class="_label-name">夿³¨ï¼</view> |
| | | </view> |
| | | <view class="_content s1"> |
| | | {{ item.remark }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | <view class="loadmore" @click="loadMore"> |
| | | <u-loadmore :status="loadStatus"></u-loadmore> |
| | | </view> |
| | | </scroll-view> |
| | | <scan></scan> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import content_bg from '@/static/custom/product/productBg.png' |
| | | import scan from "@/components/scan/scan.vue"; |
| | | export default { |
| | | components: { |
| | | scan |
| | | }, |
| | | data() { |
| | | return { |
| | | background:{ |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: 'fixed', |
| | | backgroundSize: '100% auto', |
| | | backgroundRepeat: 'no-repeat', |
| | | }, |
| | | keywords: '', |
| | | workStationList:[], |
| | | originList: [], |
| | | list: [], |
| | | count: 0, |
| | | loadStatus: 'loadmore', |
| | | query: { |
| | | current: 1, |
| | | size: 10, |
| | | workstationNo:"" |
| | | }, |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.loadList(); |
| | | }, |
| | | onShow() { |
| | | |
| | | let that = this |
| | | |
| | | uni.$off('scan') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scan', function(data) { |
| | | console.log('onscan'); |
| | | //æ«ç æååçåè°ï¼ä½ å¯ä»¥åèªå·±çé»è¾ä»£ç å¨è¿é |
| | | console.log('æ«ç ç»æï¼', data.code); |
| | | that.search(data.code); |
| | | }) |
| | | }, |
| | | onNavigationBarButtonTap(e) { |
| | | uni.scanCode({ |
| | | success: res => { |
| | | try { |
| | | const result = JSON.parse(res.result) |
| | | |
| | | } catch (e) {} |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | | loadMore() { |
| | | this.loadStatus = "loading"; |
| | | setTimeout(() => { |
| | | this.query.current += 1; |
| | | this.loadList(); |
| | | }, 100); |
| | | }, |
| | | loadList() { |
| | | |
| | | // æ¥è¯¢å·¥ä½ç«å表 |
| | | this.$u.api.pigxFeed.fetchWorkstationList(this.query).then(res => { |
| | | |
| | | if (!res.data.records || res.data.records.length == 0) { |
| | | this.loadStatus = "nomore"; |
| | | return; |
| | | } |
| | | this.list = this.list.concat(res.data.records); |
| | | this.total = res.data.total; |
| | | this.query.current = res.data.current; |
| | | this.query.size = res.data.size; |
| | | this.loadStatus = "loadmore"; |
| | | }); |
| | | }, |
| | | search(value) { |
| | | |
| | | let that = this |
| | | that.list = []; |
| | | that.total = 0; |
| | | |
| | | that.query= { |
| | | current: 1, |
| | | size: 20, |
| | | workstationNo:value |
| | | } |
| | | that.loadList() |
| | | }, |
| | | selectWorkstation(workstation) { |
| | | this.refreshLastPage(workstation) |
| | | }, |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(workstation) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.setWorkstation(workstation) |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .productfeed-workstation-bg{ |
| | | background-color: #F6F9FF; |
| | | background-image: url('~@/static/custom/product/productBg.png'); |
| | | // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0)); |
| | | padding: 0 20rpx; |
| | | background-attachment: fixed; |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | .productfeed-workstation-search{ |
| | | padding: 40rpx 30rpx 20rpx 30rpx; |
| | | } |
| | | .wrap .productfeed-workstation-scroll-list{ |
| | | height:calc(100vh - var(--window-top) - var(--window-bottom) - 242rpx); |
| | | width:100%; |
| | | } |
| | | .productfeed-workstation-scroll-list-group{ |
| | | ::v-deep .u-cell-item-box { |
| | | background-color:rgba(250,252,255,0.36) !important; |
| | | padding:0rpx 30rpx ; |
| | | } |
| | | .content { |
| | | font-size: 12px; |
| | | background-color: #FFFFFF; |
| | | box-sizing: border-box; |
| | | border-radius: 10rpx; |
| | | margin: 0rpx 0rpx 16rpx; |
| | | height: 298rpx; |
| | | padding: 10rpx 20rpx; |
| | | box-shadow: none; |
| | | .content-header{ |
| | | height: 90rpx; |
| | | display: flex; |
| | | align-items:center; |
| | | .content-header-icon{ |
| | | background-image: url('~@/static/custom/moveWareHouse/header_icon.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:28rpx; |
| | | width:28rpx; |
| | | } |
| | | .content-header-title{ |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: bold; |
| | | color: #333333; |
| | | } |
| | | } |
| | | .content-body{ |
| | | height:184rpx; |
| | | background: #F5F9FF; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | .row-list { |
| | | height: 60rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | padding: 0px; |
| | | align-items: center; |
| | | } |
| | | .row-list ._label { |
| | | display: flex; |
| | | flex: 0.8; |
| | | color: #909399; |
| | | align-items: center; |
| | | ._label-icon-1{ |
| | | background-image: url('~@/static/custom/moveWareHouse/label-icon-1.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:26rpx; |
| | | width:26rpx; |
| | | } |
| | | ._label-icon-2{ |
| | | background-image: url('~@/static/custom/moveWareHouse/label-icon-2.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:26rpx; |
| | | width:26rpx; |
| | | } |
| | | ._label-icon-3{ |
| | | background-image: url('~@/static/custom/moveWareHouse/label-icon-3.png'); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height:26rpx; |
| | | width:26rpx; |
| | | } |
| | | ._label-name{ |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 500; |
| | | color: #666666; |
| | | } |
| | | } |
| | | |
| | | .row-list ._content { |
| | | flex: 1.5; |
| | | text-align: right; |
| | | color: #909399; |
| | | font-size: 24rpx; |
| | | } |
| | | .row-list .s1 { |
| | | color:#D35651; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="app"> |
| | | <view class="main"> |
| | | <view class="cu-card list"> |
| | | <block v-for="(item,index) in listss" v-bind:key="index"> |
| | | <view class="cu-item du-item shadow u-rela" style="overflow:hidden;"> |
| | | <!-- <view class="content"> |
| | | <text class="text-grey margin-left-sm text-df">åæç¼å·</text> |
| | | <text |
| | | class="text-black margin-left text-df">{{item.materialCode}}</text> |
| | | </view> --> |
| | | <view class="content"> |
| | | <text class="text-grey margin-left-sm text-df">åæä»£ç </text> |
| | | <text |
| | | class="text-black margin-left text-df">{{item.sn}}</text> |
| | | </view> |
| | | <view class="content"> |
| | | <text class="text-grey margin-left-sm text-df">åæåç§°</text> |
| | | <text |
| | | class="text-black margin-left text-df">{{item.type}}</text> |
| | | </view> |
| | | <view class="content"> |
| | | <text class="text-grey margin-left-sm text-df">åææ¹å·</text> |
| | | <text class="text-black margin-left text-df">{{item.code}}</text> |
| | | </view> |
| | | <view class="content"> |
| | | <text class="text-grey margin-left-sm text-df">ç¸ä½</text> |
| | | <text class="text-black margin-left text-df">{{item.img}}</text> |
| | | </view> |
| | | <view class="content"> |
| | | <text class="text-grey margin-left-sm text-df"></text> |
| | | |
| | | <text class="text-black margin-left text-df" style="flex:0.5"> |
| | | <button class="_btn" @click="weighPrintHandle(item)" >ç§°éæå°</button> |
| | | </text> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </block> |
| | | </view> |
| | | <view v-if="maskShow" class="uni-mask" @touchmove.stop.prevent="moveHandle" @click="maskclose"> |
| | | <scroll-view class="uni-scroll_box" scroll-y @touchmove.stop.prevent="moveHandle" @click.stop="moveHandle"> |
| | | <view |
| | | class="uni-list-box" |
| | | v-for="(item, index) in list" |
| | | :key="index" |
| | | @click="tapQuery(item)" |
| | | > |
| | | <view> |
| | | <view class="uni-list_name">åç§°ï¼{{ item.name }}</view> |
| | | <view class="uni-list_item">UUID:{{ item.address }}</view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <uni-fab :pattern="pattern" horizontal="right" vertical="bottom" :popMenu="false" @fabClick="searchDevice" :doc="doc"> |
| | | </uni-fab> |
| | | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | const jcapi = uni.requireNativePlugin("JCSDK-JCApiModule"); |
| | | // äºç»´ç ç±»å |
| | | const QrCodeType = { |
| | | QrCode: 31, |
| | | PDF417: 32, |
| | | DataMatrix: 33, |
| | | AZTEC: 34 |
| | | } |
| | | |
| | | // 线æ¡ç±»å |
| | | const LineType = { |
| | | Solid: 1, // å®çº¿ |
| | | Dotted: 2, // è线ï¼é»è®¤èå®1:1ç¸é´ï¼ |
| | | } |
| | | |
| | | // æ¢è¡æ¹å¼ |
| | | const LineModeType = { |
| | | Justified: 1, // 宽é«åºå®ï¼å
容èªéåºï¼åå·/åé´è·/è¡é´è·ææ¯ä¾ç¼©æ¾ï¼ |
| | | AutoHeight: 2, // 宽度åºå®ï¼é«åº¦èªéåº |
| | | Fixed: 4, // 宽é«åºå®ï¼è¶
åºé¨åè£åª |
| | | Adapt: 6, // 宽é«åºå®ï¼å
容è¶
è¿æ¶é¢è®¾å®½é«èªå¨ç¼©å° |
| | | } |
| | | |
| | | export default { |
| | | onLoad() { |
| | | let _this = this; |
| | | // åå§åSDK |
| | | jcapi.initSDK() |
| | | // çå¬é¡µç åè° |
| | | jcapi.didReadPrintCountInfo(function(r) { |
| | | console.log(r) |
| | | }) |
| | | |
| | | // çå¬é误åè° |
| | | jcapi.didReadPrintErrorInfo(function(r) { |
| | | console.log(r) |
| | | if(r.code == 23) { |
| | | // æå°æºæå¼è¿æ¥ |
| | | _this.connectedDevice = null |
| | | } |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: JSON.stringify(r), |
| | | duration: 2 * 1000 |
| | | }) |
| | | }) |
| | | }, |
| | | onShow() { |
| | | }, |
| | | onNavigationBarButtonTap(e) { |
| | | uni.scanCode({ |
| | | success: res => { |
| | | try { |
| | | const result = JSON.parse(res.result) |
| | | |
| | | } catch (e) {} |
| | | } |
| | | }); |
| | | }, |
| | | data() { |
| | | |
| | | return { |
| | | //æå°æ°æ® |
| | | listss:[ |
| | | { |
| | | sn:"2024GY-010070", |
| | | type:"å¹²åé«å线å", |
| | | orderNo:"2024061200010", |
| | | img:"CS03", |
| | | typeTwo:"CS03", |
| | | ptodect:"å妿 ¹,æ´å
æµ·,è£è¿èµ", |
| | | date:"2024-06-10" |
| | | } |
| | | ], |
| | | //æå°ç¸å
³ |
| | | doc:"èç", |
| | | pattern: { |
| | | color: '#7A7E83', |
| | | backgroundColor: '#fff', |
| | | selectedColor: '#007AFF', |
| | | buttonColor: '#007AFF', |
| | | iconColor: '#fff' |
| | | }, |
| | | maskShow: false, |
| | | list:[],//èçè®¾å¤æ°æ® |
| | | printDensity: 5, |
| | | labelType: 1, |
| | | printMode: 2,//printModeData: [{name : 'çæ', value: 1}, {name: 'ç转å°', value: 2}], |
| | | } |
| | | }, |
| | | computed:{ |
| | | }, |
| | | methods: { |
| | | moveHandle() {}, |
| | | maskclose() { |
| | | this.maskShow = false; |
| | | }, |
| | | searchDevice(){ |
| | | let _this = this |
| | | uni.openBluetoothAdapter({ // 确认èçæ¯å¦æå¼ |
| | | success(r) { |
| | | uni.showLoading({ |
| | | title: "æç´¢ä¸..." |
| | | }) |
| | | // æªæäºèçç¸å
³æéåæªæå¼ææºå®ä½ä¼æç´¢ä¸å°è®¾å¤ |
| | | jcapi.getBluetoothDevices(function(r){ |
| | | console.log("device:" + JSON.stringify(r)) |
| | | // æç´¢å°è®¾å¤åè° |
| | | uni.hideLoading() |
| | | _this.list = r; |
| | | _this.maskShow = true |
| | | }) |
| | | }, |
| | | fail(e) { |
| | | uni.showModal({ |
| | | confirmText: "æå¼èç失败" |
| | | }) |
| | | console.log("å¼å¯èç设å¤å¤±è´¥" + e) |
| | | } |
| | | }) |
| | | }, |
| | | tapQuery(item) { |
| | | this.maskShow = false |
| | | // è¿æ¥æå°æº |
| | | let _this = this; |
| | | jcapi.openPrinterByDevice({ |
| | | address: item.address, |
| | | name: item.name, |
| | | deviceType: item.deviceType // 设å¤ç±»åï¼0-èçï¼1-ç½ç» |
| | | }, function(r) { |
| | | uni.showToast({ |
| | | title: (r.code == 0) ? "è¿æ¥æå" : "è¿æ¥å¤±è´¥", |
| | | duration: 2 * 1000 |
| | | }) |
| | | if(r.code == 0) { |
| | | _this.connectedDevice = item |
| | | } |
| | | }) |
| | | }, |
| | | weighPrintHandle(item) |
| | | { |
| | | this.printQrCode() |
| | | }, |
| | | //æå°äºç»´ç |
| | | printQrCode() { |
| | | // åå§åç»æ¿ |
| | | jcapi.initDrawingBoard({ |
| | | width: 50, |
| | | height: 100, |
| | | rotate: 0 |
| | | }); |
| | | // // ç»å¶äºç»´ç |
| | | var jsonString = JSON.stringify(this.listss[0]); |
| | | jcapi.drawLabelQrCode({ |
| | | x: 17, |
| | | y: 74, |
| | | width: 20, |
| | | height: 20, |
| | | value: jsonString, |
| | | rotate: 0, |
| | | codeType: QrCodeType.QrCode, |
| | | }); |
| | | //ç»å¶æ¨ªçº¿ |
| | | jcapi.drawLabelLine({ |
| | | x: 4, |
| | | y: 1, |
| | | width: 46, |
| | | height: 0.5, |
| | | rotate: 0, |
| | | lineType: LineType.Solid // å®çº¿1 |
| | | }); |
| | | |
| | | jcapi.drawLabelLine({ |
| | | x:4, |
| | | y: 11, |
| | | width: 46, |
| | | height: 0.5, |
| | | rotate: 0, |
| | | lineType: LineType.Solid // å®çº¿2 |
| | | }); |
| | | |
| | | jcapi.drawLabelLine({ |
| | | x: 4, |
| | | y: 21, |
| | | width: 46, |
| | | height: 0.5, |
| | | rotate: 0, |
| | | lineType: LineType.Solid // å®çº¿3 |
| | | }); |
| | | |
| | | jcapi.drawLabelLine({ |
| | | x: 4, |
| | | y: 31, |
| | | width: 46, |
| | | height: 0.5, |
| | | rotate: 0, |
| | | lineType: LineType.Solid // å®çº¿4 |
| | | }); |
| | | |
| | | jcapi.drawLabelLine({ |
| | | x: 4, |
| | | y: 41, |
| | | width: 46, |
| | | height: 0.5, |
| | | rotate: 0, |
| | | lineType: LineType.Solid // å®çº¿5 |
| | | }); |
| | | |
| | | jcapi.drawLabelLine({ |
| | | x: 4, |
| | | y: 51, |
| | | width: 46, |
| | | height:0.5, |
| | | rotate: 0, |
| | | lineType: LineType.Solid // å®çº¿6 |
| | | }); |
| | | |
| | | jcapi.drawLabelLine({ |
| | | x:4, |
| | | y: 61, |
| | | width: 46, |
| | | height: 0.5, |
| | | rotate: 0, |
| | | lineType: LineType.Solid // å®çº¿7 |
| | | }); |
| | | |
| | | jcapi.drawLabelLine({ |
| | | x: 4, |
| | | y: 71, |
| | | width: 46, |
| | | height: 0.5, |
| | | rotate: 0, |
| | | lineType: LineType.Solid // å®çº¿8 |
| | | }); |
| | | |
| | | jcapi.drawLabelLine({ |
| | | x: 4, |
| | | y: 98, |
| | | width: 46, |
| | | height: 0.5, |
| | | rotate: 0, |
| | | lineType: LineType.Solid // å®çº¿9 |
| | | }); |
| | | |
| | | //ç»å¶ç«çº¿ |
| | | jcapi.drawLabelLine({ |
| | | x: 4, |
| | | y: 1, |
| | | width: 0.5, |
| | | height: 97, |
| | | rotate: 0, |
| | | lineType: LineType.Solid // å®çº¿ |
| | | }); |
| | | |
| | | |
| | | jcapi.drawLabelLine({ |
| | | x: 20, |
| | | y: 1, |
| | | width: 0.5, |
| | | height: 70, |
| | | rotate: 0, |
| | | lineType: LineType.Solid // å®çº¿9 |
| | | }); |
| | | |
| | | |
| | | jcapi.drawLabelLine({ |
| | | x: 48.5, |
| | | y: 1, |
| | | width: 0.5, |
| | | height: 97, |
| | | rotate: 0, |
| | | lineType: LineType.Solid // å®çº¿9 |
| | | }); |
| | | |
| | | // //ç»å¶æå |
| | | jcapi.drawLabelText({ |
| | | x:1, |
| | | y:4, |
| | | width:20, |
| | | height: 12, |
| | | value: "ç¼ å·:", |
| | | fontSize: 3.6, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 1, |
| | | textAlignVertical: 1, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:5, |
| | | y:14, |
| | | width:12, |
| | | height: 20, |
| | | value: "ç±» å:", |
| | | fontSize:3.6, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 1, |
| | | textAlignVertical: 1, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:5, |
| | | y:24, |
| | | width:12, |
| | | height: 22, |
| | | value: "å·¥åå·:", |
| | | fontSize: 3.6, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 1, |
| | | textAlignVertical: 1, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:5, |
| | | y:34, |
| | | width:12, |
| | | height: 20, |
| | | value: "å¾ å·:", |
| | | fontSize: 3.6, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 1, |
| | | textAlignVertical: 1, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:5, |
| | | y:44, |
| | | width:24, |
| | | height: 20, |
| | | value: "è§æ ¼åå·:", |
| | | fontSize: 3.4, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 0, |
| | | textAlignVertical: 1, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:5, |
| | | y:54, |
| | | width:12, |
| | | height: 22, |
| | | value: "ç产人:", |
| | | fontSize: 3.6, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 1, |
| | | textAlignVertical: 1, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:5, |
| | | y:64, |
| | | width:24, |
| | | height: 20, |
| | | value: "çäº§æ¥æ:", |
| | | fontSize: 3.4, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 0, |
| | | textAlignVertical: 1, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:22, |
| | | y:4, |
| | | width:40, |
| | | height: 12, |
| | | value: this.listss[0].sn, |
| | | fontSize: 3, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 0, |
| | | textAlignVertical: 0, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:22, |
| | | y:14, |
| | | width:40, |
| | | height: 12, |
| | | value: this.listss[0].type, |
| | | fontSize: 3, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 0, |
| | | textAlignVertical: 0, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:22, |
| | | y:24, |
| | | width:40, |
| | | height: 12, |
| | | value: this.listss[0].orderNo, |
| | | fontSize: 3, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 0, |
| | | textAlignVertical: 0, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:22, |
| | | y:34, |
| | | width:40, |
| | | height: 12, |
| | | value: this.listss[0].img, |
| | | fontSize: 3, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 0, |
| | | textAlignVertical: 0, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:22, |
| | | y:44, |
| | | width:40, |
| | | height: 12, |
| | | value: this.listss[0].typeTwo, |
| | | fontSize: 3, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 0, |
| | | textAlignVertical: 0, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:22, |
| | | y:53, |
| | | width:28, |
| | | height: 12, |
| | | value: this.listss[0].ptodect, |
| | | fontSize: 3, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 0, |
| | | textAlignVertical: 0, |
| | | }) |
| | | |
| | | jcapi.drawLabelText({ |
| | | x:22, |
| | | y:64, |
| | | width:40, |
| | | height: 12, |
| | | value: this.listss[0].date, |
| | | fontSize: 3, |
| | | rotate: 0, |
| | | lineMode: LineModeType.AutoHeight, |
| | | lineSpace: 0, |
| | | letterSpace: 0, |
| | | textAlignHorizontal: 0, |
| | | textAlignVertical: 0, |
| | | }) |
| | | |
| | | |
| | | // çææå°æ°æ® |
| | | let imageJsonObj = jcapi.generateLabelJson() |
| | | // 设置æå°ä»»å¡ |
| | | jcapi.startJob({ |
| | | totalCount: 1, |
| | | density: this.printDensity, |
| | | labelType: this.labelType, |
| | | printMode: this.printMode, |
| | | },function(r){ |
| | | if(r.code == 0) { |
| | | // æå°æ°æ® |
| | | jcapi.printData(imageJsonObj, { |
| | | "printQuantity": 1, |
| | | }, function(r) { |
| | | if (r.code == 0) { |
| | | console.log("æå°æå") |
| | | } else { |
| | | console.log("æå°å¤±è´¥") |
| | | } |
| | | }) |
| | | } else { |
| | | console.log("设置æå°ä»»å¡å¤±è´¥") |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | |
| | | >>>.cu-custom .cu-bar |
| | | { |
| | | background: #3281FF !important; |
| | | height: 44px; |
| | | height: calc(44px + constant(safe-area-inset-top)); |
| | | height: calc(44px + env(safe-area-inset-top)); |
| | | padding: 7px 3px; |
| | | padding-top: calc(7px + constant(safe-area-inset-top)); |
| | | padding-top: calc(7px + env(safe-area-inset-top)); |
| | | } |
| | | |
| | | .content |
| | | { display: flex; |
| | | flex-direction: row; |
| | | padding: 0 10rpx;} |
| | | |
| | | .content .text-grey |
| | | { |
| | | flex:0.8 |
| | | } |
| | | |
| | | .content .text-black |
| | | { |
| | | flex:2; |
| | | text-align: right; |
| | | } |
| | | |
| | | .filter-content { |
| | | overflow-y: auto; |
| | | /* #ifdef H5 */ |
| | | height: calc(100vh - 95px); |
| | | /* #endif */ |
| | | /* #ifdef MP-WEIXIN */ |
| | | height: calc(100vh - 125px); |
| | | /* #endif */ |
| | | /* #ifdef APP-VUE */ |
| | | height: calc(100vh - 145px); |
| | | /* #endif */ |
| | | /* #ifdef APP-PLUS */ |
| | | height: calc(100vh - 55px); |
| | | /* #endif */ |
| | | } |
| | | |
| | | uni-checkbox::before { |
| | | content: '' |
| | | } |
| | | |
| | | .list>.cu-item .info { |
| | | border-top: 1px solid #f7f7f7; |
| | | padding-top: 10px; |
| | | margin-left: 10px; |
| | | margin-right: 5px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | .list>.cu-item .title { |
| | | margin-top: 15px; |
| | | margin-left: 10px; |
| | | margin-right: 10px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .cu-card>.du-item { |
| | | display: block; |
| | | background-color: #FFFFFF; |
| | | overflow: hidden; |
| | | border-radius: 10upx; |
| | | margin: 20upx 24upx; |
| | | } |
| | | |
| | | .cu-card>.du-item:first-child{margin-top: 10px;} |
| | | |
| | | /* .main |
| | | { |
| | | color:#000; |
| | | padding:0 2%; |
| | | } */ |
| | | |
| | | .bottom-btn |
| | | { |
| | | overflow:hidden; |
| | | margin:20px 0; |
| | | padding:0 2%; |
| | | } |
| | | |
| | | ._btn |
| | | { |
| | | background:#3A80F4; |
| | | color:#FFF; |
| | | margin-bottom:20px; |
| | | } |
| | | |
| | | .uni-mask { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | bottom: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | width: 100%; |
| | | background: rgba(0, 0, 0, 0.6); |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | |
| | | .uni-scroll_box { |
| | | height: 70%; |
| | | background: #fff; |
| | | border-radius: 20rpx; |
| | | } |
| | | .uni-list-box { |
| | | margin: 0 20rpx; |
| | | padding: 15rpx 0; |
| | | border-bottom: 1px #f5f5f5 solid; |
| | | box-sizing: border-box; |
| | | } |
| | | .uni-list:last-child { |
| | | border: none; |
| | | } |
| | | .uni-list_name { |
| | | font-size: 30rpx; |
| | | color: #333; |
| | | } |
| | | .uni-list_item { |
| | | font-size: 24rpx; |
| | | color: #555; |
| | | line-height: 1.5; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <view class="row-list" v-if="info.type!='shift'"> |
| | | <u-row justify="space-between" class="product-out-main-row"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">人å</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="product-out-main-info"> |
| | | <view> |
| | | <u-button size="mini" @click="toDutyPerson">ç¹å»éæ©</u-button> |
| | | </view> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-form class="product-out-form" :model="productOutForm" ref="productOutForm" label-width="180" |
| | | :label-style="{paddingLeft:'10rpx'}"> |
| | | <u-form-item label="é¶ä»¶ç¼å·"> |
| | | <u-input v-model="productOutForm.partNo" disabled placeholder="" /> |
| | | </u-form-item> |
| | | <u-form-item label="é¶ä»¶åç§°"> |
| | | <u-input v-model="productOutForm.partName" disabled placeholder="" /> |
| | | </u-form-item> |
| | | <u-form-item label="çæ°"> |
| | | <input v-model="productOutForm.disNumber" placeholder="请è¾å
¥çæ°" type="digit" /> |
| | | </u-form-item> |
| | | <u-form-item label="èµ·å§ç±³æ "> |
| | | <input v-model="productOutForm.startMeterMark" placeholder="请è¾å
¥èµ·å§ç±³æ " @blur="startMeterBlur" |
| | | type="digit" /> |
| | | </u-form-item> |
| | | <u-form-item label="æªæ¢ç±³æ "> |
| | | <input v-model="productOutForm.endMeterMark" placeholder="请è¾å
¥æªæ¢ç±³æ " @blur="endMeterBlur" |
| | | type="digit" /> |
| | | </u-form-item> |
| | | <u-form-item label="æ¯ç产é"> |
| | | <u-input v-model="productOutForm.productQty" placeholder="请è¾å
¥æ¯ç产é" disabled type="digit" /> |
| | | </u-form-item> |
| | | <u-form-item label="æ¥åºæ°é"> |
| | | <input v-model="productOutForm.scrapQty" placeholder="请è¾å
¥æ¥åºæ°é" type="digit" /> |
| | | </u-form-item> |
| | | <u-form-item label="è½½å
·ç¼å·"> |
| | | <input v-model="productOutForm.reelNumber" placeholder="请è¾å
¥è½½å
·ç¼å·" /> |
| | | </u-form-item> |
| | | <u-form-item label="åä½"> |
| | | <u-input v-model="productOutForm.unit" disabled placeholder="" /> |
| | | </u-form-item> |
| | | <u-form-item label="åæ®µæè¿°"> |
| | | <input v-model="productOutForm.segmentDesc" /> |
| | | </u-form-item> |
| | | <u-form-item label="ç产人å">{{productOutForm.staffName}}</u-form-item> |
| | | <u-form-item label="äº§åºæ¥æ"> |
| | | <u-input v-model="productOutForm.date" disabled /> |
| | | </u-form-item> |
| | | </u-form> |
| | | </view> |
| | | <view class="product-out-bottom-view" style="margin-top: 15px;"> |
| | | <u-button text="ç¡®å®" type="success" size="medium" @click="addProudctOut"> |
| | | ç¡®å®</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | |
| | | data() { |
| | | |
| | | const currentDateTime = this.getDateTime(); |
| | | return { |
| | | productOutForm: { |
| | | partNo: null, |
| | | partName: null, |
| | | intro: null, |
| | | date: currentDateTime, |
| | | staffName:"" |
| | | }, |
| | | info: {}, |
| | | personInitList: [], |
| | | personBoardList: [], |
| | | products: [] |
| | | |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | //type:shift æçç» person æäººå |
| | | this.info.type = option.type |
| | | this.info.dutyId = option.dutyId |
| | | this.info.workstationId = option.workstationId |
| | | |
| | | |
| | | this.productOutForm.workstationId = option.workstationId |
| | | this.productOutForm.operationTaskId = option.operationTaskId |
| | | this.productOutForm.partId = option.partId |
| | | this.productOutForm.partName = option.partName == "null" ? "" : option.partName |
| | | this.productOutForm.partNo = option.partNo == "null" ? "" : option.partNo |
| | | this.productOutForm.unit = option.unit == "null" ? "" : option.unit |
| | | //è·åå½ç人å |
| | | this.getPerson() |
| | | }, |
| | | onShow() { |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | getDateTime() { |
| | | let year = new Date().getFullYear(); //å¹´ |
| | | let month = new Date().getMonth() + 1; //注æï¼æä»½æ¯ä»0æå¼å§è·åçï¼æä»¥è¦+1; |
| | | let day = new Date().getDate(); //æ¥ |
| | | let hour = new Date().getHours(); //æ¶ |
| | | let minute = new Date().getMinutes(); //å |
| | | let second = new Date().getSeconds(); //ç§ |
| | | //æ¼æ¥æ¥æ YYYY/MM/DD HH:mm |
| | | let currentDate = |
| | | year + |
| | | '/' + |
| | | (month >= 10 ? month : '0' + month) + |
| | | '/' + |
| | | (day >= 10 ? day : '0' + day); |
| | | let currentTime = |
| | | (hour >= 10 ? hour : '0' + hour) + |
| | | ':' + |
| | | (minute >= 10 ? minute : '0' + minute) + |
| | | ':' + |
| | | (second >= 10 ? second : '0' + second); |
| | | |
| | | return currentDate + " " + currentTime |
| | | }, |
| | | async getPerson() { |
| | | let queryParam = { |
| | | id: this.info.workstationId |
| | | } |
| | | |
| | | let res = await this.$u.api.outputRegister.getDutyRecordByWorkstationId(queryParam) |
| | | |
| | | this.dutyForm = res.data |
| | | if (this.dutyForm && this.dutyForm.id) { |
| | | |
| | | let queryUserParam = { |
| | | id: this.dutyForm.id |
| | | } |
| | | |
| | | let resUser = await this.$u.api.outputRegister.getPersonByDutyRecordId(queryUserParam) |
| | | |
| | | let userList = resUser.data |
| | | if (userList.length > 0) { |
| | | this.personInitList = [] |
| | | this.$set(this.productOutForm, 'staffName', ""); |
| | | let staffName = "" |
| | | userList.map((item, index) => { |
| | | |
| | | if (index == userList.length - 1) { |
| | | staffName = staffName + item.staffName |
| | | } else { |
| | | staffName = staffName + item.staffName + "," |
| | | } |
| | | |
| | | let data = { |
| | | staffId: item.staffId, |
| | | staffName: item.staffName, |
| | | staffNo: item.staffNo, |
| | | checked: false |
| | | } |
| | | |
| | | this.personInitList.push(data) |
| | | }); |
| | | |
| | | //type:shift æçç» person æäººå |
| | | if (this.info.type == "shift") { |
| | | this.personBoardList = this.personInitList |
| | | this.$set(this.productOutForm, 'staffName', staffName); |
| | | } else { |
| | | this.personBoardList = [] |
| | | this.$set(this.productOutForm, 'staffName', ""); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | }, |
| | | setProducts() { |
| | | let productStaffs = [] |
| | | let productStaffIds = [] |
| | | let newProduct = {} |
| | | this.products = [] |
| | | //type:shift æçç» person æäººå |
| | | if (this.info.type == "shift") { |
| | | // æçç»æ¥å·¥ï¼ä¸æ¡è®°å½ |
| | | let staffName = '' |
| | | let staffNo = '' |
| | | for (let i = 0; i < this.personBoardList.length; i++) { |
| | | staffName += this.personBoardList[i].staffName + ',' |
| | | staffNo += this.personBoardList[i].staffNo + ',' |
| | | productStaffs.push(this.personBoardList[i].staffNo) |
| | | productStaffIds.push(this.personBoardList[i].staffId) |
| | | } |
| | | |
| | | staffName = staffName.substring(0, staffName.length - 1) |
| | | staffNo = staffNo.substring(0, staffNo.length - 1) |
| | | |
| | | newProduct = {} |
| | | newProduct.staffName = staffName |
| | | newProduct.staffNo = staffNo |
| | | newProduct.productNo = null |
| | | newProduct.partId = this.productOutForm.partId |
| | | newProduct.partNo = this.productOutForm.partNo |
| | | newProduct.partName = this.productOutForm.partName |
| | | newProduct.outBatchNo = null |
| | | newProduct.disNumber = this.productOutForm.disNumber |
| | | newProduct.productQty = 0 |
| | | newProduct.sproductQty = 0 |
| | | newProduct.ifsBatchNo = null |
| | | newProduct.unit = this.productOutForm.unit |
| | | newProduct.productStaffs = productStaffs |
| | | newProduct.productStaffIds = productStaffIds |
| | | newProduct.status = false |
| | | newProduct.systemNo = null |
| | | newProduct.date = this.productOutForm.date |
| | | newProduct.dutyRecordId = this.info.dutyId |
| | | newProduct.startMeterMark = this.productOutForm.startMeterMark |
| | | newProduct.endMeterMark = this.productOutForm.endMeterMark |
| | | newProduct.scrapQty = this.productOutForm.scrapQty |
| | | newProduct.segmentDesc = this.productOutForm.segmentDesc |
| | | newProduct.remark = null |
| | | newProduct.outBatchNo = null |
| | | newProduct.reelNumber = this.productOutForm.reelNumber |
| | | this.products.push(newProduct) |
| | | |
| | | } else { |
| | | let newProduct |
| | | for (let i = 0; i < this.personBoardList.length; i++) { |
| | | newProduct = {} |
| | | productStaffs = [] |
| | | productStaffIds = [] |
| | | productStaffIds.push(this.personBoardList[i].staffId) |
| | | productStaffs.push(this.personBoardList[i].staffNo) |
| | | newProduct.staffName = this.personBoardList[i].staffName |
| | | newProduct.staffNo = this.personBoardList[i].staffNo |
| | | newProduct.productNo = null |
| | | newProduct.partId = this.productOutForm.partId |
| | | newProduct.partNo = this.productOutForm.partNo |
| | | newProduct.partName = this.productOutForm.partName |
| | | newProduct.outBatchNo = null |
| | | newProduct.disNumber = this.productOutForm.disNumber |
| | | newProduct.productQty = 0 |
| | | newProduct.sproductQty = 0 |
| | | newProduct.unit = this.productOutForm.unit |
| | | newProduct.productStaffs = productStaffs |
| | | newProduct.productStaffIds = productStaffIds |
| | | newProduct.status = true |
| | | newProduct.systemNo = null |
| | | newProduct.date = this.productOutForm.date |
| | | newProduct.dutyRecordId = this.info.dutyId |
| | | newProduct.startMeterMark = this.productOutForm.startMeterMark |
| | | newProduct.endMeterMark = this.productOutForm.endMeterMark |
| | | newProduct.reelNumber = this.productOutForm.reelNumber |
| | | newProduct.ifsBatchNo = null |
| | | newProduct.scrapQty = this.productOutForm.scrapQty |
| | | newProduct.segmentDesc = this.productOutForm.segmentDesc |
| | | newProduct.remark = null |
| | | this.products.push(newProduct) |
| | | } |
| | | } |
| | | |
| | | }, |
| | | toDutyPerson() { |
| | | |
| | | if (this.personInitList.length > 0) { |
| | | uni.navigateTo({ |
| | | url: '/pages/product/outputRegister/dutyPersonList?item=' + encodeURIComponent(JSON |
| | | .stringify(this.personInitList)) |
| | | }) |
| | | } |
| | | }, |
| | | setProductPerson(userList) { |
| | | //type:shift æçç» person æäººå |
| | | if (this.info.type == "person") { |
| | | //è¿æ»¤æéä¸ç人åä¿¡æ¯ |
| | | userList = userList.filter(item => item.checked == true) |
| | | this.personBoardList = [] |
| | | this.$set(this.productOutForm, 'staffName', ""); |
| | | // this.personBoardList = userList |
| | | if (userList.length > 0) { |
| | | let staffName = "" |
| | | userList.map((item, index) => { |
| | | |
| | | if (index == userList.length - 1) { |
| | | staffName = staffName + item.staffName |
| | | } else { |
| | | staffName = staffName + item.staffName + "," |
| | | } |
| | | |
| | | let data = { |
| | | staffId: item.staffId, |
| | | staffName: item.staffName, |
| | | staffNo: item.staffNo, |
| | | checked: item.checked |
| | | } |
| | | |
| | | this.personBoardList.push(data) |
| | | }); |
| | | this.$set(this.productOutForm, 'staffName', staffName); |
| | | } |
| | | } |
| | | }, |
| | | startMeterBlur(obj) { |
| | | if ((this.productOutForm.startMeterMark != "" ) && (this.productOutForm.endMeterMark!= "")) { |
| | | let qty = parseFloat(this.productOutForm.endMeterMark) - parseFloat(this.productOutForm.startMeterMark) |
| | | qty = parseFloat(qty.toFixed(4)) |
| | | this.$set(this.productOutForm, 'productQty', qty); |
| | | } |
| | | }, |
| | | endMeterBlur(obj) { |
| | | |
| | | if ((this.productOutForm.startMeterMark != "" ) && (this.productOutForm.endMeterMark!= "")) { |
| | | let qty = parseFloat(this.productOutForm.endMeterMark) - parseFloat(this.productOutForm.startMeterMark) |
| | | qty = parseFloat(qty.toFixed(4)) |
| | | this.$set(this.productOutForm, 'productQty', qty); |
| | | } |
| | | }, |
| | | async addProudctOut() { |
| | | |
| | | // ç产人å |
| | | if (this.productOutForm.staffName==""||this.productOutForm.staffName==undefined||this.productOutForm.staffName==null) { |
| | | |
| | | this.$u.toast('ç产人åä¸è½ä¸ºç©º') |
| | | return |
| | | } |
| | | |
| | | //设置工åä¿¡æ¯ |
| | | this.setProducts(); |
| | | |
| | | for (let i = 0; i < this.products.length; i++) { |
| | | |
| | | // çæ°æ ¡éª |
| | | if (!this.isPositiveIntegerNumber(this.products[i].disNumber)) { |
| | | |
| | | this.$u.toast('第' + (i + 1) + 'è¡ï¼ãçæ°ã请è¾å
¥æ£æ´æ°ï¼') |
| | | return |
| | | } |
| | | // èµ·å§ç±³æ æ ¡éª |
| | | if (!this.isNumber(this.products[i].startMeterMark)) { |
| | | this.$u.toast('第' + (i + 1) + 'è¡ï¼ãèµ·å§ç±³æ ã请è¾å
¥éè´æ°ï¼å°æ°ä½æå¤4ä½ï¼') |
| | | return |
| | | } |
| | | // æªæ¢ç±³æ æ ¡éª |
| | | if (!this.isNumber(this.products[i].endMeterMark)) { |
| | | this.$u.toast('第' + (i + 1) + 'è¡ï¼ãæªæ¢ç±³æ ã请è¾å
¥éè´æ°ï¼å°æ°ä½æå¤4ä½ï¼') |
| | | return |
| | | } |
| | | // æªæ¢ç±³æ é大äºå¼å§ç±³æ |
| | | if ( |
| | | Number(this.products[i].endMeterMark) < |
| | | Number(this.products[i].startMeterMark) |
| | | ) { |
| | | this.$u.toast('第' + (i + 1) + 'è¡ï¼ãæªæ¢ç±³æ ãé大äºãèµ·å§ç±³æ ã') |
| | | return |
| | | } |
| | | } |
| | | |
| | | // å½åæ¯äº§åºçæ°å¢ |
| | | const list = [] |
| | | for (let i = 0; i < this.products.length; i++) { |
| | | let productVo = {} |
| | | productVo.isChangeShift = false |
| | | productVo.id = null |
| | | productVo.workstationId = this.productOutForm.workstationId |
| | | productVo.operationTaskId = this.productOutForm.operationTaskId |
| | | productVo.discsNumber = this.products[i].disNumber |
| | | let productOuts = [] |
| | | let productOut = {} |
| | | productOut.workstationId = this.productOutForm.workstationId |
| | | productOut.operationTaskId = this.productOutForm.operationTaskId |
| | | productOut.partId = this.products[i].partId |
| | | productOut.disNumber = this.products[i].disNumber |
| | | productOut.productQty = this.products[i].productQty |
| | | productOut.sproductQty = this.products[i].sproductQty |
| | | productOut.productStaffs = this.products[i].productStaffs |
| | | productOut.productStaffIds = this.products[i].productStaffIds |
| | | productOut.outBatchNo = this.products[i].outBatchNo |
| | | productOut.status = this.products[i].status |
| | | productOut.dutyRecordId = this.products[i].dutyRecordId |
| | | productOut.startMeterMark = this.products[i].startMeterMark |
| | | productOut.endMeterMark = this.products[i].endMeterMark |
| | | |
| | | productOut.outBatchNo = this.products[i].outBatchNo |
| | | productOut.reelNumber = this.products[i].reelNumber |
| | | productOut.ifsBatchNo = this.products[i].ifsBatchNo |
| | | productOut.scrapQty = this.products[i].scrapQty |
| | | productOut.segmentDesc = this.products[i].segmentDesc |
| | | productOut.remark = this.products[i].remark |
| | | |
| | | productOuts.push(productOut) |
| | | productVo.productOutputList = productOuts |
| | | list.push(productVo) |
| | | } |
| | | |
| | | let res = await this.$u.api.outputRegister.batchSaveProductMain(list) |
| | | let that = this |
| | | |
| | | if (res.code == 0) { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æäº¤æå', |
| | | showCancel: false, |
| | | success: function() { |
| | | that.refreshLastPage() |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æäº¤å¤±è´¥', |
| | | showCancel: false, |
| | | success: function() {} |
| | | }) |
| | | } |
| | | }, |
| | | isNumber(value) { |
| | | var reg = /^[0-9]+(.[0-9]{1,4})?$/ |
| | | if ( |
| | | value == undefined || |
| | | value == null || |
| | | value === '' || |
| | | value.trim === '' |
| | | ) { |
| | | return false |
| | | } else { |
| | | if (!reg.test(value)) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | } |
| | | }, |
| | | isPositiveIntegerNumber(value) { |
| | | var reg = /^[1-9]\d*$/ |
| | | if ( |
| | | value == undefined || |
| | | value == null || |
| | | value === '' || |
| | | value.trim === '' |
| | | ) { |
| | | return false |
| | | } else { |
| | | if (!reg.test(value)) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | } |
| | | }, |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage() { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.refreshTrackingRecord() |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .product-out-main-info { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .product-out-main-row { |
| | | padding-bottom: 2px; |
| | | padding-top: 2px; |
| | | } |
| | | |
| | | .product-out-form { |
| | | .u-form-item { |
| | | padding: 7rpx; |
| | | } |
| | | } |
| | | |
| | | .product-out-bottom-view { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 1062rpx); |
| | | } |
| | | </style> |
| | | |
| | | |
| | | <style scoped> |
| | | |
| | | .uni-input-placeholder{font-size: 12px;color: rgb(192, 196, 204);} |
| | | |
| | | >>>.uni-input-input{font-size: 12px;} |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <view> |
| | | <scroll-view class="scroll-list duty-person-scroll" scroll-y="true"> |
| | | <u-cell-group class="list" :border="false"> |
| | | <view> |
| | | <view class="row-list person-row" v-for="(item, index) in personList" :key="item.staffId" > |
| | | <view style="width: 100%;padding-left: 20rpx;"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="1"> |
| | | <u-checkbox |
| | | v-model="item.checked" |
| | | :name="item.staffName" |
| | | ></u-checkbox> |
| | | </u-col> |
| | | <u-col span="11"> |
| | | <view @click="clickPerson(item)"> |
| | | <span>{{item.staffName}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | </view> |
| | | <view class="person-btn-view"> |
| | | <u-button text="ç¡®å®" type="success" size="medium" :customStyle="{width:'150rpx'}" @click="confirmPerson"> |
| | | ç¡®å®</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | personList:[{staffId:1,staffName:'å°æ',checked:false}, |
| | | {staffId:2,staffName:'å°è¾¾',checked:false}, |
| | | {staffId:3,staffName:'å°ç®¡',checked:false}, |
| | | {staffId:4,staffName:'å°å®',checked:false}, |
| | | {staffId:5,staffName:'å°å®',checked:false}, |
| | | {staffId:6,staffName:'å°å®',checked:false}, |
| | | {staffId:7,staffName:'å°å®',checked:false}, |
| | | {staffId:8,staffName:'å°å®',checked:false}, |
| | | {staffId:9,staffName:'å°å®',checked:false}, |
| | | {staffId:10,staffName:'å°å®',checked:false}, |
| | | {staffId:11,staffName:'å°å®',checked:false}, |
| | | {staffId:12,staffName:'å°å®',checked:false}, |
| | | {staffId:13,staffName:'å°å®',checked:false}, |
| | | {staffId:14,staffName:'å°å®',checked:false}, |
| | | {staffId:15,staffName:'å°å®',checked:false}, |
| | | {staffId:16,staffName:'å°å®',checked:false}, |
| | | {staffId:17,staffName:'å°å®',checked:false}, |
| | | {staffId:18,staffName:'å°è¾¾',checked:false}], |
| | | originList: [] |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | if (option.item) { |
| | | let obj = JSON.parse(decodeURIComponent(option.item)); |
| | | console.log(obj) |
| | | this.personList = obj |
| | | // this.getInfo(obj.id) |
| | | } |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | loadList() { |
| | | |
| | | // uni.showLoading({ |
| | | // title: 'æ£å¨è¯·æ±...', |
| | | // mask: true |
| | | // }); |
| | | |
| | | // æ¥è¯¢å·¥åå表 |
| | | /*this.$u.api.pigxWareHouse.fetchList().then(res => { |
| | | |
| | | // uni.hideLoading(); |
| | | this.originList = res.data |
| | | this.optaskList = this.originList |
| | | })*/ |
| | | }, |
| | | //确认éä¸ |
| | | confirmPerson(){ |
| | | //çéåº personListä¸checked==trueç人 |
| | | this.refreshLastPage() |
| | | }, |
| | | clickPerson(person){ |
| | | person.checked=!person.checked |
| | | }, |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage() { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.setProductPerson(this.personList) |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .duty-person-scroll{ |
| | | background-color: #f8f8f8; |
| | | } |
| | | .duty-person-scroll{ |
| | | ::v-deep .u-cell-item-box{ |
| | | background-color: #f8f8f8; |
| | | } |
| | | } |
| | | .person-row{ |
| | | height: 70rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .person-btn-view{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin-top: 20rpx; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <view> |
| | | <scroll-view class="scroll-list edit-product-out-scroll" scroll-y="true"> |
| | | <u-cell-group class="list" :border="false"> |
| | | <u-card :title="item.username" :sub-title="item.phone" v-for="(item, index) in editProductOutList" |
| | | :key="item.id" :index="item.id" :showHead="showEditCardHead"> |
| | | <view slot="body"> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">SNå·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.outBatchNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">IFSæ¹æ¬¡å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <u-input class="custom-edit-input" v-model="item.ifsBatchNo" type="text" |
| | | :clearable=false height="50"></u-input> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">èµ·å§ç±³æ </span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <u-input class="custom-edit-input" v-model="item.startMeterMark" type="digit" |
| | | :clearable=false height="50" @blur="startMeterBlur(item)"></u-input> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">æªæ¢ç±³æ </span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <u-input class="custom-edit-input" v-model="item.endMeterMark" |
| | | :clearable=false height="50" type="digit" @blur="endMeterBlur(item)"></u-input> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">ç产æ°é</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.productQty}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">æ¥åºæ°é</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <u-input class="custom-edit-input" v-model="item.scrapQty" |
| | | :clearable=false height="50" type="digit"></u-input> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">åæ®µæè¿°</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <u-input class="custom-edit-input" v-model="item.segmentDesc" type="text" |
| | | :clearable=false height="50"></u-input> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </view> |
| | | </u-card> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | </view> |
| | | <view class="edit-product-out-btn-view"> |
| | | <u-button text="ç¡®å®" type="success" size="medium" :customStyle="{width:'150rpx'}" @click="updateProductOut"> |
| | | ç¡®å®</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | editProductOutList:[], |
| | | showEditCardHead: false |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | if (params.item) { |
| | | let list = JSON.parse(decodeURIComponent(params.item)); |
| | | this.editProductOutList =list |
| | | } |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | startMeterBlur(item) |
| | | { |
| | | if(item.endMeterMark!="") |
| | | { |
| | | let qty= parseFloat(item.endMeterMark) - parseFloat(item.startMeterMark) |
| | | qty = parseFloat(qty.toFixed(4)) |
| | | this.$set(item, 'productQty', qty); |
| | | } |
| | | }, |
| | | endMeterBlur(item ) |
| | | { |
| | | if(item.startMeterMark!="") |
| | | { |
| | | let qty= parseFloat(item.endMeterMark) - parseFloat(item.startMeterMark) |
| | | qty = parseFloat(qty.toFixed(4)) |
| | | this.$set(item, 'productQty', qty); |
| | | } |
| | | }, |
| | | async updateProductOut() { |
| | | |
| | | for (let i = 0; i < this.editProductOutList.length; i++) { |
| | | |
| | | // èµ·å§ç±³æ æ ¡éª |
| | | if (!this.isNumber(this.editProductOutList[i].startMeterMark)) { |
| | | this.$u.toast('第' + (i + 1) + 'è¡ï¼ãèµ·å§ç±³æ ã请è¾å
¥éè´æ°ï¼å°æ°ä½æå¤4ä½ï¼') |
| | | return |
| | | } |
| | | // æªæ¢ç±³æ æ ¡éª |
| | | if (!this.isNumber(this.editProductOutList[i].endMeterMark)) { |
| | | this.$u.toast('第' + (i + 1) + 'è¡ï¼ãæªæ¢ç±³æ ã请è¾å
¥éè´æ°ï¼å°æ°ä½æå¤4ä½ï¼') |
| | | return |
| | | } |
| | | // æªæ¢ç±³æ é大äºå¼å§ç±³æ |
| | | if ( |
| | | Number(this.editProductOutList[i].endMeterMark) < |
| | | Number(this.editProductOutList[i].startMeterMark) |
| | | ) { |
| | | this.$u.toast('第' + (i + 1) + 'è¡ï¼ãæªæ¢ç±³æ ãé大äºãèµ·å§ç±³æ ã') |
| | | return |
| | | } |
| | | } |
| | | |
| | | let data=[] |
| | | this.editProductOutList.forEach((el) => { |
| | | let productVo = {} |
| | | productVo.id = el.id |
| | | let productOuts = [] |
| | | let productOut = {} |
| | | productOut.startMeterMark = parseFloat(el.startMeterMark) |
| | | productOut.endMeterMark = parseFloat(el.endMeterMark) |
| | | productOut.productQty = el.productQty |
| | | productOut.segmentDesc = el.segmentDesc |
| | | productOut.scrapQty = el.scrapQty |
| | | productOut.ifsBatchNo = el.ifsBatchNo |
| | | productOut.reelNumber = el.reelNumber |
| | | productOut.remark = el.remark |
| | | productOuts.push(productOut) |
| | | productVo.productOutputList = productOuts |
| | | data.push(productVo) |
| | | }) |
| | | |
| | | let res= await this.$u.api.outputRegister.batchUpdateProductMain(data) |
| | | let that = this |
| | | if(res.code==0) |
| | | { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'ç¼è¾æå', |
| | | showCancel: false, |
| | | success: function() { |
| | | that.refreshLastPage() |
| | | // setTimeout(()=> { |
| | | // that.refreshLastPage() |
| | | // }, 5500); |
| | | } |
| | | }) |
| | | |
| | | }else |
| | | { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'ç¼è¾å¤±è´¥', |
| | | showCancel: false, |
| | | success: function() { |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | isNumber(value) { |
| | | var reg = /^[0-9]+(.[0-9]{1,4})?$/ |
| | | if ( |
| | | value == undefined || |
| | | value == null || |
| | | value === '' || |
| | | value.trim === '' |
| | | ) { |
| | | return false |
| | | } else { |
| | | if (!reg.test(value)) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | } |
| | | }, |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage() { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.refreshTrackingRecord() |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .edit-product-out-scroll{ |
| | | background-color: #f8f8f8; |
| | | } |
| | | .edit-product-out-scroll{ |
| | | ::v-deep .u-cell-item-box{ |
| | | background-color: #f8f8f8; |
| | | } |
| | | } |
| | | .edit-product-out-btn-view{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin-top: 20rpx; |
| | | } |
| | | .custom-edit-input{ |
| | | border-bottom: 2rpx solid #F8F8F8; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between" class="outputregister-main-row"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">å·¥ä½ç«</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="outputregister-main-info"> |
| | | <view> |
| | | <span>{{outputregisterMainInfo.workstationName}}</span> |
| | | </view> |
| | | <view> |
| | | <u-button size="mini" @click="toWorkstation">ç¹å»éæ©</u-button> |
| | | </view> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | <u-row justify="space-between" class="outputregister-main-row last-main-row"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">å·¥åå·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="outputregister-main-info"> |
| | | <view> |
| | | <span>{{outputregisterMainInfo.optaskNo}}</span> |
| | | </view> |
| | | <view> |
| | | <u-button size="mini" @click="toOptask">ç¹å»éæ©</u-button> |
| | | </view> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | <u-row justify="space-between" class="outputregister-main-row outputregister-main-operate-view"> |
| | | <u-col span="6"> |
| | | <u-radio-group v-model="reportStyle"> |
| | | <u-radio v-for="(item, index) in reportStyleList" :key="index" :name="item.value"> |
| | | {{item.name}} |
| | | </u-radio> |
| | | </u-radio-group> |
| | | </u-col> |
| | | <u-col span="6"> |
| | | <view class="outputregister-main-out-view"> |
| | | <view> |
| | | <u-button type="warning" size="mini" @click="openShiftProductOut">交ç产åº</u-button> |
| | | </view> |
| | | <view style="margin-left: 20rpx;"> |
| | | <u-button type="success" size="mini" @click="openProductOut">æ°å¢äº§åº</u-button> |
| | | </view> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <scroll-view class="scroll-list tracking-scan-record" scroll-y="true"> |
| | | <u-cell-group class="list tracking-scan-record-cell" :border="false"> |
| | | <view class="item u-border-bottom tracking-scan-record-view" v-for="(item, index) in trackingList" :key="item.id" @click="trackingCardClick(item)" |
| | | :style="{backgroundColor: item.selected?backgroundColor.selectedColor:backgroundColor.unSelectedColor}"> |
| | | |
| | | |
| | | <view class="tracking-record-operate-btn-view"> |
| | | <view style="text-align: right;"> |
| | | <u-button type="success" text="æå
¥" size="mini" |
| | | @click.stop="toProductIn(item)">æå
¥ |
| | | </u-button> |
| | | </view> |
| | | <view style="text-align: right;margin-left: 16rpx;"> |
| | | <u-button v-show="item.state == '01draft' && item.shiftState == '01draft'" |
| | | type="warning" text="交ç" size="mini" |
| | | @click.stop="translate(item,'DRAFTTOCHANGESHIFT','交ç')">交ç</u-button> |
| | | <u-button v-show="item.state == '01draft' && item.shiftState == '03changeshift'" |
| | | type="warning" text="åæ¶äº¤ç" size="mini" |
| | | @click.stop="translate(item,'CHANGESHIFTTODRAFT','åæ¶äº¤ç')">åæ¶äº¤ç</u-button> |
| | | </view> |
| | | <view style="text-align: right;margin-left: 16rpx;"> |
| | | <u-button type="error" text="å é¤" size="mini" @click.stop="deleteTracking(item)"> |
| | | å é¤</u-button> |
| | | </view> |
| | | </view> |
| | | <view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">æ¥å·¥åå·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="tracking-val-col"> |
| | | <span>{{item.productNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶ç¼å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="tracking-val-col"> |
| | | <span>{{item.partNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶åç§°</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="tracking-val-col"> |
| | | <span>{{item.partName}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">SNå·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="tracking-val-col"> |
| | | <span>{{item.outBatchNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">IFSæ¹æ¬¡å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="tracking-val-col"> |
| | | <span>{{item.ifsBatchNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">ç产æ°é</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="tracking-val-col"> |
| | | <span>{{item.productQty}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">æ¥åºæ°é</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="tracking-val-col"> |
| | | <span>{{item.scrapQty}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">è½½å
·ç¼å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="tracking-val-col"> |
| | | <span>{{item.reelNumber}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">åæ®µæè¿°</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="tracking-val-col"> |
| | | <span>{{item.segmentDesc}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">ç¶æ</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="tracking-val-col"> |
| | | <span>{{formatState(item.state)}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">交çç¶æ</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="tracking-val-col"> |
| | | <span>{{formatShiftState(item.shiftState)}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | |
| | | </scroll-view> |
| | | <!--<view class="view-fixed-one"> |
| | | <u-button type="success" text="æ«ç " size="medium" :customStyle="{width:'160rpx'}" |
| | | @click="scanMaterialCodeClick()">æ«ç </u-button> |
| | | </view>--> |
| | | <view class="view-fixed-two tracking-bottom-btns"> |
| | | <u-button text="ç¼è¾" size="medium" |
| | | :customStyle="{height:'60rpx',paddingLeft:'35rpx',paddingRight:'35rpx',color:'#41A2F9'}" |
| | | @click="toEditProductOut"> |
| | | ç¼è¾</u-button> |
| | | <u-button text="æå°" size="medium" |
| | | :customStyle="{height:'60rpx',paddingLeft:'35rpx',paddingRight:'35rpx',color:'#41A2F9'}" |
| | | @click="printTrackingLabel"> |
| | | æå°</u-button> |
| | | <u-button text="æ¥æ£" size="medium" |
| | | :customStyle="{height:'60rpx',paddingLeft:'35rpx',paddingRight:'35rpx',color:'#41A2F9'}" |
| | | @click="openInspectionApplication"> |
| | | æ¥æ£</u-button> |
| | | <u-button text="æäº¤" size="medium" |
| | | :customStyle="{height:'60rpx',paddingLeft:'35rpx',paddingRight:'35rpx',color:'#41A2F9'}" |
| | | @click="submitTracking"> |
| | | æäº¤</u-button> |
| | | <u-button text="æ¤é" size="medium" |
| | | :customStyle="{height:'60rpx',paddingLeft:'35rpx',paddingRight:'35rpx',color:'#41A2F9'}" |
| | | @click="revokeTracking"> |
| | | æ¤é</u-button> |
| | | </view> |
| | | <u-mask :show="inspectionApplicationShow"> |
| | | <view class="inspection-application-mask"> |
| | | <view class="inspection-application-mask-view"> |
| | | <view> |
| | | <view style="height: 60rpx;line-height:60rpx;text-align:right;margin-right: 20rpx;"> |
| | | <u-icon name="close" @click="inspectionApplicationShow = false"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view> |
| | | <view style="height: 60rpx;line-height:60rpx;"> |
| | | <span style="font-weight: bold;margin-left:30rpx;font-size: 32rpx;">æ¥æ£</span> |
| | | </view> |
| | | </view> |
| | | <view class="inspection-application-reporttype-view"> |
| | | <view class="inspection-application-reporttype-row"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="3"> |
| | | <view> |
| | | <span style="margin-left: 16rpx;">æ¥æ£ç±»å</span> |
| | | </view> |
| | | </u-col> |
| | | <u-col span="9"> |
| | | <view style="border: 1px solid #d6d4d4;border-radius: 10rpx;"> |
| | | <u-select v-model="reportTypeListShow" :list="reportTypeList" |
| | | @confirm="confirmReportType"></u-select> |
| | | <view |
| | | style="height: 60rpx;display: flex;justify-content:space-between;align-items: center;" |
| | | @click="reportTypeListShow = true"> |
| | | <span |
| | | style="margin-left: 10rpx;">{{reportTypeValue!=null?reportTypeLabel:'è¯·éæ©'}}</span> |
| | | <u-icon style="margin-right: 6rpx;" name="arrow-down-fill"></u-icon> |
| | | </view> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </view> |
| | | <view class="edit-product-out-btn-view"> |
| | | <u-button text="ç¡®å®" type="success" size="medium" :customStyle="{width:'150rpx'}" |
| | | @click="saveReportType"> |
| | | ç¡®å®</u-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-mask> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | showCardHead: false, |
| | | outputregisterMainInfo: { |
| | | workstationId: null, |
| | | workstationNo: null, |
| | | workstationName: null, |
| | | optaskId: null, |
| | | optaskNo: null, |
| | | partId: null, |
| | | partName: null, |
| | | partNo: null, |
| | | unit: null |
| | | }, |
| | | trackingList: [], |
| | | reportStyle: 'shift', |
| | | reportStyleList: [{ |
| | | value: 'shift', |
| | | name: 'æçç»' |
| | | }, { |
| | | value: 'person', |
| | | name: 'æäººå' |
| | | }], |
| | | inspectionApplicationShow: false, |
| | | reportTypeList: [{ |
| | | value: '1', |
| | | label: 'æ±' |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: 'æ¹' |
| | | } |
| | | ], |
| | | reportTypeListShow: false, |
| | | reportTypeValue: null, |
| | | reportTypeLabel: null, |
| | | bodyStyle: { |
| | | background: '#bbf59c' |
| | | }, |
| | | dutyForm: { |
| | | workstationId: null, |
| | | dutyNo: null, |
| | | crewId: null, |
| | | dutyDate: null, |
| | | startTime: null, |
| | | endTime: null, |
| | | dutyTime: null, |
| | | shiftId: null, |
| | | id: null, |
| | | isSubmit: null |
| | | }, |
| | | stateTagArr: [ |
| | | { value: '01draft', label: 'è稿' }, |
| | | { value: '02submitted', label: 'å·²æäº¤' }, |
| | | { value: '03changeshift', label: '交ç' } |
| | | ], |
| | | stateShiftTagArr: [{ value: '03changeshift', label: '交ç' }], |
| | | backgroundColor:{ |
| | | selectedColor:'#bbf59c', |
| | | unSelectedColor:'#ffffff' |
| | | } |
| | | }; |
| | | }, |
| | | onLoad() {}, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | formatState(state){ |
| | | for (let i = 0, len = this.stateTagArr.length; i < len; i++) { |
| | | if (state === this.stateTagArr[i].value) { |
| | | return this.stateTagArr[i].label |
| | | } |
| | | } |
| | | return '' |
| | | }, |
| | | formatShiftState(shiftState){ |
| | | for (let i = 0, len = this.stateShiftTagArr.length; i < len; i++) { |
| | | if (shiftState === this.stateShiftTagArr[i].value) { |
| | | return this.stateShiftTagArr[i].label |
| | | } |
| | | } |
| | | return '' |
| | | }, |
| | | printTrackingLabel() { |
| | | let initList = this.trackingList.filter(item => item.selected == true) |
| | | if (initList.length == 0) { |
| | | this.$u.toast('è¯·éæ©éè¦ãæå°ãçæ°æ®') |
| | | return |
| | | } |
| | | uni.navigateTo({ |
| | | url: '/pages/util/bleConnect?data='+ JSON.stringify(initList[0]), |
| | | }) |
| | | }, |
| | | //æäº¤ |
| | | submitTracking() { |
| | | |
| | | let initList = this.trackingList.filter(item => item.selected == true) |
| | | if (initList.length == 0) { |
| | | this.$u.toast('è¯·éæ©éè¦ãæäº¤ãçæ°æ®') |
| | | return |
| | | } |
| | | |
| | | const l_index = initList.findIndex((el) => el.state == '02submitted') |
| | | if (l_index > -1) { |
| | | this.$u.toast('æ¨éæ©ç对象ä¸åå¨å·²æäº¤çæ°æ®ï¼è¯·éæ°éæ©ï¼') |
| | | return |
| | | } |
| | | |
| | | let outIds = initList.map((item) => { |
| | | return item.id |
| | | }) |
| | | |
| | | let queryParam = { |
| | | event: 'SUBMIT', |
| | | ids: outIds |
| | | } |
| | | this.batchChange(queryParam, "æäº¤") |
| | | }, |
| | | //æ¤é |
| | | revokeTracking() { |
| | | |
| | | let initList = this.trackingList.filter(item => item.selected == true) |
| | | if (initList.length == 0) { |
| | | this.$u.toast('è¯·éæ©éè¦ãæ¤éãçæ°æ®') |
| | | return |
| | | } |
| | | |
| | | let l_index = initList.findIndex( |
| | | (el) => el.state == null || el.state == '01draft' |
| | | ) |
| | | if (l_index > -1) { |
| | | this.$u.toast('æ¨éæ©ç对象ä¸å卿ªæäº¤çæ°æ®ï¼è¯·éæ°éæ©ï¼') |
| | | return |
| | | } |
| | | |
| | | let outIds = initList.map((item) => { |
| | | return item.id |
| | | }) |
| | | |
| | | let queryParam = { |
| | | event: 'REVOKE', |
| | | ids: outIds |
| | | } |
| | | this.batchChange(queryParam, "æ¤é") |
| | | }, |
| | | //æäº¤ãæ¤éæä½ |
| | | batchChange(queryParam, title) { |
| | | let that = this |
| | | that.$u.api.outputRegister.batchChange(queryParam).then(res => { |
| | | if (res.code == 0) { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: title + 'æå', |
| | | showCancel: false, |
| | | success: function() { |
| | | that.loadList() |
| | | } |
| | | }) |
| | | } else { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: title + '失败', |
| | | showCancel: false, |
| | | success: function() {} |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | trackingCardClick(item) { |
| | | item.selected = !item.selected |
| | | }, |
| | | saveReportType() { |
| | | this.inspectionApplicationShow = false |
| | | console.log('reportTypeValue', this.reportTypeValue) |
| | | }, |
| | | confirmReportType(item) { |
| | | console.log('item', item) |
| | | this.reportTypeValue = item[0].value |
| | | this.reportTypeLabel = item[0].label |
| | | }, |
| | | openInspectionApplication() { |
| | | this.inspectionApplicationShow = true |
| | | }, |
| | | toEditProductOut() { |
| | | let initList = this.trackingList.filter(item => item.selected == true) |
| | | if (initList.length == 0) { |
| | | this.$u.toast('è¯·éæ©éè¦ãç¼è¾ãçæ°æ®') |
| | | return |
| | | } |
| | | //TODOæ ¡éªæ¥å·¥ç¶æ |
| | | let l_index = initList.findIndex((el) => el.state == '02submitted') |
| | | if (l_index > -1) { |
| | | this.$u.toast('æ¨éæ©ç对象ä¸åå¨å·²æäº¤çæ°æ®ï¼è¯·éæ°éæ©ï¼') |
| | | return |
| | | } |
| | | |
| | | uni.navigateTo({ |
| | | url: '/pages/product/outputRegister/editProductOut?item=' + encodeURIComponent(JSON.stringify(initList)) |
| | | }) |
| | | }, |
| | | refreshTrackingRecord() { |
| | | this.loadList(); |
| | | }, |
| | | setWorkstation(workstation) { |
| | | this.outputregisterMainInfo.workstationId = workstation.id |
| | | this.outputregisterMainInfo.workstationNo = workstation.workstationNo |
| | | this.outputregisterMainInfo.workstationName = workstation.name |
| | | |
| | | //è·åå½çè®°å½ |
| | | this.dutyForm.workstationId = this.outputregisterMainInfo.workstationId |
| | | if (this.dutyForm.workstationId != "" || this.dutyForm.workstationId != undefined) { |
| | | let queryParam = { |
| | | id: this.dutyForm.workstationId |
| | | } |
| | | //æ ¹æ®å·¥ä½ç«ï¼å è½½çæ¬¡ |
| | | this.$u.api.outputRegister.getDutyRecordByWorkstationId(queryParam).then(res => { |
| | | if (res.data != null) { |
| | | this.dutyForm = res.data |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | setOptask(task) { |
| | | this.outputregisterMainInfo.optaskId = task.id |
| | | this.outputregisterMainInfo.optaskNo = task.optaskNo |
| | | this.outputregisterMainInfo.partId = task.partId |
| | | this.outputregisterMainInfo.partName = task.partName |
| | | this.outputregisterMainInfo.partNo = task.partNo |
| | | this.outputregisterMainInfo.unit = task.unit |
| | | this.loadList() |
| | | }, |
| | | openShiftProductOut() { |
| | | //æ¥æ¾åºé交æ¥ç产åºè®°å½ |
| | | if (this.dutyForm.workstationId == null) { |
| | | this.$u.toast('è¯·éæ©å·¥ä½ç«'); |
| | | return |
| | | } |
| | | if (this.outputregisterMainInfo.optaskId == null) { |
| | | this.$u.toast('è¯·éæ©å·¥å'); |
| | | return |
| | | } |
| | | let queryParam = { |
| | | workstationId: this.dutyForm.workstationId, |
| | | opeartionTaskId: this.outputregisterMainInfo.optaskId |
| | | } |
| | | this.$u.api.outputRegister.getShiftProductOutByOpIdAndWsId(queryParam).then(res => { |
| | | let resCode = res.code |
| | | let resData = res.data |
| | | if (resCode === 0) { |
| | | if (resData != null) { |
| | | if (this.dutyForm.id !== resData.dutyRecordId) { |
| | | uni.navigateTo({ |
| | | url: '/pages/product/outputRegister/shiftProductOut?' + |
| | | "type=" + this.reportStyle + "&dutyId=" + this.dutyForm.id + |
| | | "&workstationId=" + this.dutyForm.workstationId + |
| | | "&operationTaskId=" + this.outputregisterMainInfo.optaskId + |
| | | "&partId=" + this.outputregisterMainInfo.partId + |
| | | "&partName=" + this.outputregisterMainInfo.partName + |
| | | "&partNo=" + this.outputregisterMainInfo.partNo + |
| | | "&unit=" + this.outputregisterMainInfo.unit + |
| | | "&outBatchNo=" + resData.outBatchNo + |
| | | "&endMeterMark=" + resData.endMeterMark |
| | | }) |
| | | } else { |
| | | this.$u.toast('å·¥åä¸åå¨äº¤çæ¥åï¼å¾
ä¸ä¸ä¸ªçç»è¿è¡ã交ç产åºã'); |
| | | } |
| | | } else { |
| | | this.$u.toast('å·¥åä¸çæ¥åï¼æ éã交ç产åºã'); |
| | | } |
| | | } else { |
| | | this.$u.toast('æ¥æ¾å·¥å交çè®°å½å¤±è´¥'); |
| | | } |
| | | }) |
| | | }, |
| | | openProductOut() { |
| | | if (this.outputregisterMainInfo.optaskId != null) { |
| | | let queryParam = { |
| | | workstationId: this.dutyForm.workstationId, |
| | | opeartionTaskId: this.outputregisterMainInfo.optaskId |
| | | } |
| | | this.$u.api.outputRegister.getShiftProductOutByOpIdAndWsId(queryParam).then(res => { |
| | | let resCode = res.code |
| | | let resData = res.data |
| | | if (resCode === 0) { |
| | | if (resData != null) { |
| | | if (this.dutyForm.id !== resData.dutyRecordId) { |
| | | this.$u.toast('å·¥åä¸åå¨å¾
äº¤çæ¥åï¼ä¸å¯è¿è¡ãæ°å¢äº§åºã'); |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: '/pages/product/outputRegister/addProductOut?' + |
| | | "type=" + this.reportStyle + "&dutyId=" + this.dutyForm.id + |
| | | "&workstationId=" + this.dutyForm.workstationId + |
| | | "&operationTaskId=" + this.outputregisterMainInfo.optaskId + |
| | | "&partId=" + this.outputregisterMainInfo.partId + |
| | | "&partName=" + this.outputregisterMainInfo.partName + |
| | | "&partNo=" + this.outputregisterMainInfo.partNo + |
| | | "&unit=" + this.outputregisterMainInfo.unit |
| | | }) |
| | | } |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: '/pages/product/outputRegister/addProductOut?' + |
| | | "type=" + this.reportStyle + "&dutyId=" + this.dutyForm.id + |
| | | "&workstationId=" + this.dutyForm.workstationId + |
| | | "&operationTaskId=" + this.outputregisterMainInfo.optaskId + |
| | | "&partId=" + this.outputregisterMainInfo.partId + |
| | | "&partName=" + this.outputregisterMainInfo.partName + |
| | | "&partNo=" + this.outputregisterMainInfo.partNo + |
| | | "&unit=" + this.outputregisterMainInfo.unit |
| | | }) |
| | | } |
| | | } else { |
| | | this.$u.toast('æ¥æ¾å·¥å交çè®°å½å¤±è´¥'); |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | this.$u.toast('è¯·éæ©å·¥å'); |
| | | } |
| | | }, |
| | | toOptask() { |
| | | if (this.outputregisterMainInfo.workstationName != null || this.outputregisterMainInfo.workstationName != |
| | | "") { |
| | | uni.navigateTo({ |
| | | url: '/pages/product/outputRegister/optaskList?workstationId=' + this |
| | | .outputregisterMainInfo.workstationId |
| | | }) |
| | | } else { |
| | | this.$u.toast('è¯·éæ©å·¥ä½ç«'); |
| | | } |
| | | }, |
| | | toWorkstation() { |
| | | uni.navigateTo({ |
| | | url: '/pages/product/outputRegister/workstationList' |
| | | }) |
| | | }, |
| | | toProductIn(item) { |
| | | if(item.state == '02submitted'){ |
| | | this.$u.toast('å·²æäº¤ï¼ä¸å¯è¿è¡ãæå
¥ã'); |
| | | return |
| | | } |
| | | let id=item.id |
| | | let productMainId=item.productMainId |
| | | let productNo=item.productNo |
| | | uni.navigateTo({ |
| | | url: '/pages/product/outputRegister/productInList?workstationId=' + this.dutyForm |
| | | .workstationId + '&id=' + id + '&productMainId=' + productMainId + '&productNo=' + |
| | | productNo |
| | | }) |
| | | }, |
| | | translate(item, event, btnName) { |
| | | let changeStateParam = { |
| | | id: item.id, |
| | | event: event |
| | | } |
| | | this.$u.api.outputRegister.productOutPutStateByMainId(changeStateParam).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | if (_code === 0) { |
| | | this.$u.toast(btnName + 'æå'); |
| | | this.search('') |
| | | } else { |
| | | this.$u.toast(btnName + '失败'); |
| | | } |
| | | }); |
| | | }, |
| | | deleteTracking(item) { |
| | | if(item.state == '02submitted'){ |
| | | this.$u.toast('å·²æäº¤ï¼ä¸å¯è¿è¡ãå é¤ã'); |
| | | return |
| | | } |
| | | this.$u.api.outputRegister.batchCancelProductMain([item.id]).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | if (_code === 0) { |
| | | this.$u.toast('å 餿å'); |
| | | this.search('') |
| | | } else { |
| | | this.$u.toast('å é¤å¤±è´¥'); |
| | | } |
| | | }); |
| | | }, |
| | | loadList() { |
| | | let that=this |
| | | that.trackingList = [] |
| | | let queryParam = { |
| | | workstationId: that.dutyForm.workstationId, |
| | | operationTaskId: that.outputregisterMainInfo.optaskId |
| | | } |
| | | that.$u.api.outputRegister.getProductMainV1(queryParam).then(res => { |
| | | let resList = res.data.records |
| | | resList.map((item) => { |
| | | }); |
| | | that.trackingList=resList |
| | | }); |
| | | }, |
| | | search(value) { |
| | | this.loadList(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .outputregister-main-info { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .outputregister-main-operate-view { |
| | | height: 80rpx; |
| | | } |
| | | |
| | | .outputregister-main-out-view { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | } |
| | | |
| | | .outputregister-main-row { |
| | | padding-bottom: 2px; |
| | | padding-top: 2px; |
| | | } |
| | | |
| | | .last-main-row { |
| | | border-bottom: 1px solid #F3F3F6; |
| | | } |
| | | |
| | | .tracking-val-col { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .tracking-scan-record { |
| | | background-color: #F8F8F8; |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 308rpx); |
| | | } |
| | | |
| | | .tracking-scan-record-cell { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: #F8F8F8; |
| | | } |
| | | } |
| | | |
| | | .tracking-record-operate-btn-view { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | } |
| | | |
| | | .edit-product-out-view { |
| | | background-color: #F8F8F8; |
| | | height: calc(100vh - 220rpx); |
| | | overflow-x: hidden; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .edit-product-out-view-cell { |
| | | padding-top: 2rpx; |
| | | } |
| | | |
| | | .edit-product-out-view-cell { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: #F8F8F8; |
| | | } |
| | | } |
| | | |
| | | .edit-product-out-btn-view { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | .tracking-bottom-btns { |
| | | width: 750rpx; |
| | | height: 100rpx; |
| | | background-color: #3281FF; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | align-items: center; |
| | | } |
| | | |
| | | .inspection-application-mask { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | height: 100%; |
| | | } |
| | | |
| | | .inspection-application-mask-view { |
| | | width: 600rpx; |
| | | height: 450rpx; |
| | | background-color: #fff; |
| | | border-radius: 10rpx; |
| | | } |
| | | |
| | | .inspection-application-reporttype-view { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 220rpx; |
| | | } |
| | | |
| | | .inspection-application-reporttype-row { |
| | | width: 100%; |
| | | } |
| | | |
| | | .custom-edit-input { |
| | | border-bottom: 2rpx solid #F8F8F8; |
| | | } |
| | | |
| | | .tracking-scan-record-view{ |
| | | margin-left: 30rpx; |
| | | margin-right: 30rpx; |
| | | margin-top: 30rpx; |
| | | margin-bottom: 30rpx; |
| | | border-radius: 20rpx; |
| | | padding-left: 10rpx; |
| | | padding-right: 10rpx; |
| | | padding-bottom: 10rpx; |
| | | padding-top: 10rpx; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <scroll-view class="scroll-list" scroll-y="true"> |
| | | <u-cell-group class="list" :border="false"> |
| | | <view class="content" v-for="(item, index) in optaskList" :key="item.optaskNo" :index="index" |
| | | @click="selectTask(item)"> |
| | | <view class="row-list task-row"> |
| | | <span class="span-lable">å·¥åç¼å·: </span>{{ item.optaskNo }} |
| | | </view> |
| | | <view class="row-list task-row"> |
| | | <span class="span-lable">é¶ä»¶ç¼å·: </span>{{ item.partNo }} |
| | | </view> |
| | | <view class="row-list task-row"> |
| | | <span class="span-lable">é¶ä»¶æè¿°: </span>{{ item.partName }} |
| | | </view> |
| | | <view class="row-list task-row"> |
| | | <span class="span-lable">è®¡åæ°é: </span>{{ item.plannedQuantity }} |
| | | </view> |
| | | <view class="row-list task-row"> |
| | | <span class="span-lable">å·¥åº: </span>{{ item.operationName }} |
| | | </view> |
| | | <view class="row-list task-row"> |
| | | <span class="span-lable">å·¥ä½ç«: </span>{{ item.workstationName }} |
| | | </view> |
| | | <view class="row-list task-row"> |
| | | <span class="span-lable">ç¶æ: </span>{{ item.state }} |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | optaskList: [] |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | if (params && params.workstationId !== "undefined") { |
| | | this.loadList(params.workstationId); |
| | | } |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | loadList(workstationId) { |
| | | let queryParam={ |
| | | workstationId:workstationId |
| | | } |
| | | // æ¥è¯¢å·¥åå表 |
| | | this.$u.api.outputRegister.getOperationTask(queryParam).then(res => { |
| | | this.optaskList = res.data |
| | | }) |
| | | }, |
| | | selectTask(task) { |
| | | this.refreshLastPage(task) |
| | | }, |
| | | |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(task) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.setOptask(task) |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .list .content { |
| | | font-size: 12px; |
| | | background-color: #efefef; |
| | | box-sizing: border-box; |
| | | border-radius: 14rpx; |
| | | margin: 8px; |
| | | padding: 5px 10px; |
| | | box-shadow: none; |
| | | } |
| | | .task-row{ |
| | | display: flex; |
| | | justify-content:space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <view class="body"> |
| | | <view> |
| | | <textarea class="result" v-model="returnResult"></textarea> |
| | | </view> |
| | | <textarea class="input" @input="inputEvent" /> |
| | | <button type="primary" @tap="sendData">åé(票æ®å¯ä½¿ç¨)</button> |
| | | |
| | | <view style='margin-top:4%;display: flex;flex-direction: row;'> |
| | | <button type='primary' @tap='receiptTest' :loading='isReceiptSend' :disabled='isReceiptSend'>ç¥¨æ®æµè¯</button> |
| | | <button type='primary' @tap='labelTest' :loading='isLabelSend' :disabled='isLabelSend'>æ ç¾æµè¯</button> |
| | | </view> |
| | | |
| | | <view style='margin-top:4%;display: flex;flex-direction: row;'> |
| | | <!-- hidden='true' --> |
| | | <canvas canvas-id='edit_area_canvas' :style="{width:canvasWidth+'px',height:canvasHeight+'px'}"></canvas> |
| | | </view> |
| | | |
| | | <picker style='margin:20px' mode='selector' :range='buffSize' :value='buffIndex' @change='buffBindChange'> |
| | | å½åæ¯æ¬¡åéåèæ°ä¸º(ç¹å»å¯æ´æ¢)ï¼{{buffSize[buffIndex]}} |
| | | </picker> |
| | | |
| | | <picker style='margin:20px' mode='selector' :range='printNum' :value='printNumIndex' @change='printNumBindChange'> |
| | | å½åæå°ä»½æ°(ç¹å»å¯æ´æ¢)ï¼{{printNum[printNumIndex]}} |
| | | </picker> |
| | | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | var tsc = require("../../../util/ble/tsc.js"); |
| | | var esc = require("../../../util/ble/esc.js"); |
| | | var encode = require("../../../util/ble/encoding.js"); |
| | | import { |
| | | mapState |
| | | } from 'vuex'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | sendContent: "", |
| | | looptime: 0, |
| | | currentTime: 1, |
| | | lastData: 0, |
| | | oneTimeData: 0, |
| | | returnResult: "", |
| | | canvasWidth: 180, |
| | | canvasHeight: 180, |
| | | imageSrc: '../../static/img/abc_ic_star_black_16dp.png', |
| | | buffSize: [], |
| | | buffIndex: 0, |
| | | printNum: [], |
| | | printNumIndex: 0, |
| | | printerNum: 1, |
| | | currentPrint: 1, |
| | | isReceiptSend: false, |
| | | isLabelSend: false, |
| | | printData:null |
| | | }; |
| | | }, |
| | | computed: mapState(['sysinfo', 'Bluetooth']), |
| | | onLoad(params) { |
| | | let that = this; |
| | | let { |
| | | BLEInformation |
| | | } = that.Bluetooth; |
| | | if (params.data) { |
| | | that.printData =JSON.parse(params.data); |
| | | } |
| | | // uni.notifyBLECharacteristicValueChange({ |
| | | // deviceId: BLEInformation.deviceId, |
| | | // serviceId: BLEInformation.notifyServiceId, |
| | | // characteristicId: BLEInformation.notifyCharaterId, |
| | | // state: true, |
| | | // success(res) { |
| | | // uni.onBLECharacteristicValueChange(function(r) { |
| | | // console.log(`characteristic ${r.characteristicId} has changed, now is ${r}`) |
| | | // }) |
| | | // }, |
| | | // fail: function(e) { |
| | | // console.log(e) |
| | | // }, |
| | | // complete: function(e) { |
| | | // console.log(e) |
| | | // } |
| | | // }) |
| | | }, |
| | | onReady(){ |
| | | let list = [] |
| | | let numList = [] |
| | | let j = 0 |
| | | for (let i = 20; i < 200; i += 10) { |
| | | list[j] = i; |
| | | j++ |
| | | } |
| | | for (let i = 1; i < 10; i++) { |
| | | numList[i - 1] = i |
| | | } |
| | | this.buffSize = list; |
| | | this.oneTimeData = list[0]; |
| | | this.printNum = numList; |
| | | this.printerNum = numList[0]; |
| | | }, |
| | | onShow(){ |
| | | let that = this; |
| | | let width; |
| | | let height; |
| | | uni.getImageInfo({ |
| | | src: that.imageSrc, |
| | | success(res) { |
| | | console.log(res.width) |
| | | console.log(res.height) |
| | | width = res.width |
| | | height = res.height |
| | | that.canvasWidth = res.width; |
| | | that.canvasHeight = res.height; |
| | | } |
| | | }) |
| | | const ctx = uni.createCanvasContext("edit_area_canvas", this); |
| | | // if (app.globalData.platform == "android") { |
| | | // ctx.translate(width, height) |
| | | // ctx.rotate(180 * Math.PI / 180) |
| | | // } |
| | | ctx.drawImage(this.imageSrc, 0, 0, width, height); |
| | | ctx.draw(); |
| | | }, |
| | | onUnload() { |
| | | let that = this; |
| | | let { |
| | | BLEInformation |
| | | } = that.Bluetooth; |
| | | // uni.closeBLEConnection({ |
| | | // deviceId: BLEInformation.deviceId, |
| | | // success: function(res) { |
| | | // console.log("å
³éèçæå") |
| | | // }, |
| | | // }) |
| | | }, |
| | | methods:{ |
| | | //è·åè¾å
¥å
容 |
| | | inputEvent(e){ |
| | | this.sendContent = e.detail.value; |
| | | }, |
| | | //è¾å
¥æ¡ç¹å»åé |
| | | sendData(){ |
| | | let data = this.sendContent + "\n" |
| | | this.looptime = 0; |
| | | var content = new encode.TextEncoder( |
| | | 'gb18030', { |
| | | NONSTANDARD_allowLegacyEncoding: true |
| | | }).encode(data); |
| | | |
| | | this.prepareSend(content); |
| | | }, |
| | | //æ ç¾æµè¯ |
| | | labelTest(){ |
| | | let that = this; |
| | | let canvasWidth = that.canvasWidth |
| | | let canvasHeight = that.canvasHeight |
| | | let command = tsc.jpPrinter.createNew() |
| | | command.setSize(48, 48) |
| | | command.setGap(0) |
| | | command.setCls() |
| | | command.setQR(0, 32, "L", 5, "A", "www.smarnet.ccä½³åæºæ±") |
| | | command.setText(0, 64, "TSS24.BF2", 1, 1, "客æ·è®¢åå·") |
| | | command.setText(64, 64, "TSS24.BF2", 1, 1, "xxxxxx") |
| | | command.setText(128, 64, "TSS24.BF2", 1, 1, "客æ·åç§°") |
| | | command.setText(192, 64, "TSS24.BF2", 1, 1, "xxxxxx") |
| | | command.setText(128, 104, "TSS24.BF2", 1, 1, "å·¥åºï¼") |
| | | command.setText(192, 104, "TSS24.BF2", 1, 1, "xxxxxx") |
| | | command.setText(256, 104, "TSS24.BF2", 1, 1, "å·¥ä½ç«ï¼") |
| | | command.setText(320, 104, "TSS24.BF2", 1, 1, "xxxxxx") |
| | | command.setText(128, 144, "TSS24.BF2", 1, 1, "é¶ä»¶æè¿°ï¼") |
| | | command.setText(192, 144, "TSS24.BF2", 1, 1, "xxxxxx") |
| | | command.setText(256, 144, "TSS24.BF2", 1, 1, "SNå·ï¼") |
| | | command.setText(320, 144, "TSS24.BF2", 1, 1, "xxxxxx") |
| | | command.setText(128, 184, "TSS24.BF2", 1, 1, "ç产æ°éï¼") |
| | | command.setText(192, 184, "TSS24.BF2", 1, 1, "xxxxxx") |
| | | command.setText(256, 184, "TSS24.BF2", 1, 1, "è½½å
·ç¼å·ï¼") |
| | | command.setText(320, 184, "TSS24.BF2", 1, 1, "xxxxxx") |
| | | command.setText(128, 224, "TSS24.BF2", 1, 1, "çäº§æ¥æï¼") |
| | | command.setText(192, 224, "TSS24.BF2", 1, 1, "xxxxxx") |
| | | command.setText(256, 224, "TSS24.BF2", 1, 1, "ç产人åï¼") |
| | | command.setText(320, 224, "TSS24.BF2", 1, 1, "xxxxxx") |
| | | command.setText(0, 264, "TSS24.BF2", 1, 1, "æ£éªç»è®ºï¼") |
| | | command.setText(64, 264, "TSS24.BF2", 1, 1, "xxxxxx") |
| | | command.setText(128, 264, "TSS24.BF2", 1, 1, "æ£æµäººåï¼") |
| | | command.setText(192, 264, "TSS24.BF2", 1, 1, "xxxxxxx") |
| | | command.setText(256, 264, "TSS24.BF2", 1, 1, "æ£æµæ¶é´ï¼") |
| | | command.setText(320, 264, "TSS24.BF2", 1, 1, "xxxxxxx") |
| | | command.setText(0, 304, "TSS24.BF2", 1, 1, "æå°æ¶é´ï¼") |
| | | command.setText(64, 304, "TSS24.BF2", 1, 1, "xxxxxx") |
| | | command.setText(0, 344, "TSS24.BF2", 1, 1, "夿³¨ï¼") |
| | | command.setText(64, 344, "TSS24.BF2", 1, 1, "") |
| | | command.setBarCode(0, 104, "EAN8", 64, 1, 3, 3, "1234567") |
| | | uni.canvasGetImageData({ |
| | | canvasId: 'edit_area_canvas', |
| | | x: 0, |
| | | y: 0, |
| | | width: canvasWidth, |
| | | height: canvasHeight, |
| | | success: function(res) { |
| | | command.setBitmap(60, 0, 1, res) |
| | | }, |
| | | complete: function() { |
| | | command.setPagePrint() |
| | | that.isLabelSend = true; |
| | | that.prepareSend(command.getData()) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //ç¥¨æ®æµè¯ |
| | | receiptTest(){ |
| | | var that = this; |
| | | var canvasWidth = that.canvasWidth |
| | | var canvasHeight = that.canvasHeight |
| | | var command = esc.jpPrinter.createNew() |
| | | command.init() |
| | | // æ é¢ |
| | | command.bold(1);//å ç² |
| | | command.setFontSize(16);//åä½å¤§å° |
| | | command.setSelectJustification(1)//å±
ä¸ |
| | | command.rowSpace(100); |
| | | command.setText("æå·æ»åº"); |
| | | command.setPrint(); |
| | | command.rowSpace(60); |
| | | |
| | | command.bold(0);//åæ¶å ç² |
| | | command.setFontSize(0);//æ£å¸¸åä½ |
| | | //æ¶é´ |
| | | command.setSelectJustification(0);//å±
å·¦ |
| | | command.setText("æ¶é´ï¼2019-11-11 12:10:30"); |
| | | command.setPrint(); |
| | | //ç¼å· |
| | | command.setSelectJustification(0);//å±
å·¦ |
| | | command.setText("ç¼å·ï¼SD10000000000000000"); |
| | | command.setPrintAndFeed(80);//æå°å¹¶èµ°çº¸feed个åä½ |
| | | //å表 |
| | | command.rowSpace(80);//é´è· |
| | | command.bold(5);//å ç² |
| | | command.setText("è´§å·"); |
| | | command.setAbsolutePrintPosition(100); |
| | | command.setText("é¢è²"); |
| | | command.setAbsolutePrintPosition(180); |
| | | command.setText("å°ºç "); |
| | | command.setAbsolutePrintPosition(270); |
| | | command.setText("åä»·"); |
| | | command.setAbsolutePrintPosition(380); |
| | | command.setText("æ°é"); |
| | | command.setAbsolutePrintPosition(480); |
| | | command.setText("éé¢"); |
| | | command.setPrint() |
| | | command.bold(0);//å ç² |
| | | // -------1 |
| | | command.setText("86001W"); |
| | | command.setAbsolutePrintPosition(100); |
| | | command.setText("é»è²"); |
| | | command.setAbsolutePrintPosition(180); |
| | | command.setText("åç "); |
| | | command.setAbsolutePrintPosition(270); |
| | | command.setText("16947.92"); |
| | | command.setAbsolutePrintPosition(390); |
| | | command.setText("1"); |
| | | command.setAbsolutePrintPosition(480); |
| | | command.setText("19647.92"); |
| | | command.setPrint() |
| | | // ------2 |
| | | command.setText("86001W"); |
| | | command.setAbsolutePrintPosition(100); |
| | | command.setText("é»è²"); |
| | | command.setAbsolutePrintPosition(180); |
| | | command.setText("åç "); |
| | | command.setAbsolutePrintPosition(270); |
| | | command.setText("16947.92"); |
| | | command.setAbsolutePrintPosition(390); |
| | | command.setText("1"); |
| | | command.setAbsolutePrintPosition(480); |
| | | command.setText("19647.92"); |
| | | command.setPrint() |
| | | // -------3 |
| | | command.setText("86001W"); |
| | | command.setAbsolutePrintPosition(100); |
| | | command.setText("é»è²"); |
| | | command.setAbsolutePrintPosition(180); |
| | | command.setText("åç "); |
| | | command.setAbsolutePrintPosition(270); |
| | | command.setText("16947.92"); |
| | | command.setAbsolutePrintPosition(390); |
| | | command.setText("1"); |
| | | command.setAbsolutePrintPosition(480); |
| | | command.setText("19647.92"); |
| | | command.setPrint(); |
| | | |
| | | |
| | | //å计 |
| | | command.bold(5);//å ç² |
| | | command.setAbsolutePrintPosition(120); |
| | | command.setText("æ»æ°ï¼10"); |
| | | command.setAbsolutePrintPosition(320); |
| | | command.setText("å计ï¼10000"); |
| | | command.setPrint(); |
| | | command.setAbsolutePrintPosition(120); |
| | | command.setText("宿¶ï¼10000"); |
| | | command.setAbsolutePrintPosition(320); |
| | | command.setText("æ¾é¶ï¼0"); |
| | | command.setPrint(); |
| | | // æ¶é¶å |
| | | command.rowSpace(120);//é´è· |
| | | command.setAbsolutePrintPosition(120); |
| | | command.setText("åºåï¼ä½ä¸¹"); |
| | | command.setAbsolutePrintPosition(320); |
| | | command.setText("ä¼åï¼1000000000"); |
| | | command.setPrint() |
| | | |
| | | //æç¤º |
| | | command.rowSpace(80);//é´è· |
| | | command.bold(2);//å ç² |
| | | command.setSelectJustification(1);//å±
ä¸ |
| | | command.setText("å®åºååè´ä¹°å7天å
,å¯åå°ç¥¨éæ¢"); |
| | | command.setPrint(); |
| | | command.setText("(注ï¼åçæªæåª,ååæªæ´æ¶¤)"); |
| | | command.setPrint(); |
| | | |
| | | //çµè¯ |
| | | command.setSelectJustification(0);//å±
å·¦ |
| | | command.setText("客æçµè¯:(0571)86011123"); |
| | | command.setPrint(); |
| | | command.setText("èç³»å°å:æµæ±ç诸æ¨å¸æ¨é³è¡éå¥åº·è·¯1-1å·"); |
| | | command.setPrint(); |
| | | |
| | | command.setPrintAndFeedRow(3); |
| | | |
| | | that.isReceiptSend = true; |
| | | that.prepareSend(command.getData()); |
| | | |
| | | |
| | | }, |
| | | |
| | | //åå¤åéï¼æ ¹æ®æ¯æ¬¡åéåèæ°æ¥å¤çåå
æ°é |
| | | prepareSend(buff){ |
| | | console.log(buff); |
| | | let that = this |
| | | let time = that.oneTimeData |
| | | let looptime = parseInt(buff.length / time); |
| | | let lastData = parseInt(buff.length % time); |
| | | console.log(looptime + "---" + lastData) |
| | | this.looptime = looptime + 1; |
| | | this.lastData = lastData; |
| | | this.currentTime = 1; |
| | | that.Send(buff) |
| | | }, |
| | | //æ¥è¯¢æå°æºç¶æ |
| | | queryStatus(){ |
| | | let command = esc.jpPrinter.Query(); |
| | | command.getRealtimeStatusTransmission(1); |
| | | }, |
| | | //åå
åé |
| | | Send(buff){ |
| | | let that = this |
| | | let {currentTime,looptime:loopTime,lastData,oneTimeData:onTimeData,printerNum:printNum,currentPrint}=that; |
| | | let buf; |
| | | let dataView; |
| | | if (currentTime < loopTime) { |
| | | buf = new ArrayBuffer(onTimeData) |
| | | dataView = new DataView(buf) |
| | | for (var i = 0; i < onTimeData; ++i) { |
| | | dataView.setUint8(i, buff[(currentTime - 1) * onTimeData + i]) |
| | | } |
| | | } else { |
| | | buf = new ArrayBuffer(lastData) |
| | | dataView = new DataView(buf) |
| | | for (var i = 0; i < lastData; ++i) { |
| | | dataView.setUint8(i, buff[(currentTime - 1) * onTimeData + i]) |
| | | } |
| | | } |
| | | console.log("第" + currentTime + "次åéæ°æ®å¤§å°ä¸ºï¼" + buf.byteLength) |
| | | let { |
| | | BLEInformation |
| | | } = that.Bluetooth; |
| | | |
| | | plus.bluetooth.writeBLECharacteristicValue({ |
| | | deviceId: BLEInformation.deviceId, |
| | | serviceId: BLEInformation.writeServiceId, |
| | | characteristicId: BLEInformation.writeCharaterId, |
| | | value: buf, |
| | | success: function(res) { |
| | | console.log(res) |
| | | }, |
| | | fail: function(e) { |
| | | console.log(e) |
| | | }, |
| | | complete: function() { |
| | | currentTime++ |
| | | if (currentTime <= loopTime) { |
| | | that.currentTime = currentTime; |
| | | that.Send(buff) |
| | | } else { |
| | | uni.showToast({ |
| | | title: 'å·²æå°ç¬¬' + currentPrint + 'å¼ ', |
| | | }) |
| | | if (currentPrint == printNum) { |
| | | that.looptime = 0; |
| | | that.lastData = 0; |
| | | that.currentTime = 1; |
| | | that.isReceiptSend = false; |
| | | that.isLabelSend = false; |
| | | that.currentPrint = 1; |
| | | } else { |
| | | currentPrint++; |
| | | that.currentPrint = currentPrint; |
| | | that.currentTime = 1; |
| | | that.Send(buff) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | buffBindChange: function(res) { //æ´æ¹æå°åèæ° |
| | | let index = res.detail.value |
| | | let time = this.buffSize[index] |
| | | this.buffIndex = index; |
| | | this.oneTimeData = time; |
| | | }, |
| | | printNumBindChange: function(res) { //æ´æ¹æå°ä»½æ° |
| | | let index = res.detail.value |
| | | let num = this.printNum[index] |
| | | this.printNumIndex = index; |
| | | this.printerNum = num; |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less"> |
| | | .input{ |
| | | text-align: top; |
| | | width: 90%; |
| | | height: 150px; |
| | | margin-left: 4%; |
| | | margin-right: 4%; |
| | | margin-top: 10px; |
| | | margin-bottom: 12px; |
| | | border: 1px solid slategray; |
| | | } |
| | | .receiver_info_scroll_view{ |
| | | width: 90%; |
| | | height: 200px; |
| | | margin-left: 4%; |
| | | margin-right: 4%; |
| | | margin-top: 10px; |
| | | margin-bottom: 25px; |
| | | border: 1px solid black; |
| | | } |
| | | .result{ |
| | | width: 90%; |
| | | height: 150px; |
| | | border: 1px solid black; |
| | | margin-left: 4%; |
| | | margin-bottom: 4%; |
| | | margin-top: 5%; |
| | | } |
| | | button{ |
| | | width: 90%; |
| | | margin-left: 5%; |
| | | margin-right: 5%; |
| | | } |
| | | .switch{ |
| | | float: right; |
| | | margin-right: 20px; |
| | | margin-bottom: 16px; |
| | | } |
| | | text{ |
| | | color: #fff; |
| | | display: block; |
| | | } |
| | | input{ |
| | | color: gainsboro; |
| | | float: left; |
| | | } |
| | | .v_net_ssid{ |
| | | width: 100%; |
| | | background: #fff; |
| | | } |
| | | .v_net_passw{ |
| | | width: 100%; |
| | | background: antiquewhite; |
| | | } |
| | | .swiper{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <scroll-view class="scroll-list proudct-in-list" scroll-y="true"> |
| | | <u-cell-group class="list proudct-in-list-cell" :border="false"> |
| | | <u-card :title="item.partNo" :sub-title="item.partNo" v-for="(item, index) in list" :key="item.id" |
| | | :index="item.id" :showHead="showCardHead"> |
| | | <view slot="body"> |
| | | <view class="item u-border-bottom"> |
| | | <view> |
| | | <view style="text-align: right;"> |
| | | <u-button v-show="item.id==null" type="success" text="ä¿å" size="mini" |
| | | @click.stop="saveProductIn(item)">ä¿å</u-button> |
| | | <u-button v-show="item.id!=null" type="primary" text="æ´æ°" size="mini" |
| | | @click.stop="updateProductIn(item)">æ´æ°</u-button> |
| | | <u-button type="error" text="å é¤" size="mini" :customStyle="{marginLeft:'20rpx'}" |
| | | @click.stop="deleteProductIn(index,item)">å é¤</u-button> |
| | | </view> |
| | | </view> |
| | | <view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">æ¥å·¥åå·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.productNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">SNå·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.partBatchNo}}</span> |
| | | |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶ç¼å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.partNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶åç§°</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.partName}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">IFSæ¹æ¬¡å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.ifsBatchNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">æå
¥æ°é</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <u-input class="custom-edit-input" v-model="item.inputQuantity" |
| | | type="text" :clearable=false height="50"> |
| | | </u-input> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">åä½</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | |
| | | <span>{{item.unit}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </u-card> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | <view class="view-fixed-two" style="width: 750rpx;text-align: center;"> |
| | | <u-button type="success" text="æå
¥" size="medium" :customStyle="{borderRadius:'0rpx'}" @click="openFeed()">æå
¥ |
| | | </u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | showCardHead: false, |
| | | list: [], |
| | | currId: null, |
| | | workstationId: null, |
| | | productMainId: null, |
| | | productNo: null |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | if (params && params.id !== "undefined") { |
| | | this.currId = params.id |
| | | this.workstationId = params.workstationId |
| | | this.productMainId = params.productMainId |
| | | this.productNo = params.productNo |
| | | this.loadList(); |
| | | } |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | updateProductIn(item) { |
| | | if (item.inputQuantity != null && item.inputQuantity.trim != '') { |
| | | let updateParam = { |
| | | id: item.id, |
| | | inputQuantity: item.inputQuantity |
| | | } |
| | | |
| | | this.$u.api.outputRegister.updateProductInput(updateParam).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | if (_code === 0) { |
| | | this.$u.toast(`æ´æ°æå
¥æå`); |
| | | this.search('') |
| | | } else { |
| | | this.$u.toast('æ´æ°æå
¥å¤±è´¥'); |
| | | } |
| | | |
| | | }); |
| | | } else { |
| | | this.$u.toast('æå
¥ä¸è½ä¸ºç©º'); |
| | | } |
| | | }, |
| | | deleteProductIn(index, item) { |
| | | if (item.id != null) { |
| | | // åéè°ç¨åå°å é¤å¹¶å é¤å端æå
¥ |
| | | let delParam = { |
| | | id: item.id |
| | | } |
| | | this.$u.api.outputRegister.deleteProductInputById(delParam).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | if (_code === 0) { |
| | | this.list.splice(index, 1) |
| | | this.$u.toast('å 餿å
¥æå'); |
| | | this.search('') |
| | | } else { |
| | | this.$u.toast('å 餿å
¥å¤±è´¥'); |
| | | } |
| | | }); |
| | | } else { |
| | | // å é¤å端æå
¥ |
| | | this.list.splice(index, 1) |
| | | this.$message.success('å 餿å
¥æå') |
| | | } |
| | | }, |
| | | openFeed() { |
| | | uni.navigateTo({ |
| | | url: '/pages/product/outputRegister/workstationFeedList?workstationId=' + this.workstationId, |
| | | }) |
| | | }, |
| | | selectWorkstationFeed(selectedFeedList) { |
| | | if (selectedFeedList != null && selectedFeedList.length > 0) { |
| | | for (let i = 0; i < selectedFeedList.length; i++) { |
| | | this.addProductIn(selectedFeedList[i]) |
| | | } |
| | | } |
| | | }, |
| | | addProductIn(inPartInfo) { |
| | | let productInput = {} |
| | | productInput.id = null |
| | | productInput.stockId = inPartInfo.id |
| | | productInput.inputQuantity = null |
| | | productInput.productMainId = this.productMainId |
| | | productInput.productNo = this.productNo |
| | | productInput.partNo = inPartInfo.partNo |
| | | productInput.partName = inPartInfo.partName |
| | | productInput.partDescription = null |
| | | productInput.unit = inPartInfo.unit |
| | | productInput.partBatchNo = inPartInfo.partBatchNo |
| | | productInput.ifsBatchNo = inPartInfo.ifsBatchNo |
| | | this.list.push(productInput) |
| | | }, |
| | | saveProductIn(item) { |
| | | if (item.inputQuantity != null && item.inputQuantity.trim != '') { |
| | | let saveParam = { |
| | | stockId: item.stockId, |
| | | productMainId: item.productMainId, |
| | | inputQuantity: item.inputQuantity |
| | | } |
| | | this.$u.api.outputRegister.saveProductInput(saveParam).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | //ä¿åæç»æåæ¶ |
| | | if (_code === 0) { |
| | | this.$u.toast('æ·»å æå
¥æå'); |
| | | item.id = _data |
| | | this.search('') |
| | | } else { |
| | | this.$u.toast('æ·»å æå
¥å¤±è´¥'); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$u.toast('æå
¥ä¸è½ä¸ºç©º'); |
| | | } |
| | | }, |
| | | loadList() { |
| | | let queryParam = { |
| | | id: this.currId |
| | | } |
| | | this.$u.api.outputRegister.queryProductMainDetail(queryParam).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | if (_code === 0) { |
| | | this.list = _data.productInputList |
| | | } else { |
| | | this.list = [] |
| | | } |
| | | }); |
| | | }, |
| | | search(value) { |
| | | this.list = []; |
| | | this.$nextTick(() => { |
| | | this.loadList(); |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .custom-edit-input { |
| | | border-bottom: 2rpx solid #F8F8F8; |
| | | } |
| | | |
| | | .list .content { |
| | | font-size: 12px; |
| | | background-color: #efefef; |
| | | box-sizing: border-box; |
| | | border-radius: 14rpx; |
| | | margin: 8px; |
| | | padding: 5px 10px; |
| | | box-shadow: none; |
| | | } |
| | | |
| | | .proudct-in-list { |
| | | background-color: #F8F8F8; |
| | | } |
| | | |
| | | .proudct-in-list-cell { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: #F8F8F8; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <view class="row-list" v-if="info.type!='shift'"> |
| | | <u-row justify="space-between" class="shift-product-out-main-row"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">人å</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="shift-product-out-main-info"> |
| | | <view> |
| | | <u-button size="mini" @click="toDutyPerson">ç¹å»éæ©</u-button> |
| | | </view> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-form class="shift-product-out-form" :model="productOutForm" ref="productOutForm" label-width="180" |
| | | :label-style="{paddingLeft:'10rpx'}"> |
| | | <u-form-item label="é¶ä»¶ç¼å·"> |
| | | <u-input v-model="productOutForm.partNo" disabled placeholder="" /> |
| | | </u-form-item> |
| | | <u-form-item label="é¶ä»¶åç§°"> |
| | | <u-input v-model="productOutForm.partName" disabled placeholder="" /> |
| | | </u-form-item> |
| | | <u-form-item label="èµ·å§ç±³æ "> |
| | | <u-input v-model="productOutForm.startMeterMark" placeholder="请è¾å
¥èµ·å§ç±³æ " type="digit" /> |
| | | </u-form-item> |
| | | <u-form-item label="æªæ¢ç±³æ "> |
| | | <u-input v-model="productOutForm.endMeterMark" placeholder="请è¾å
¥æªæ¢ç±³æ " type="digit" /> |
| | | </u-form-item> |
| | | <u-form-item label="æ¯ç产é"> |
| | | <u-input v-model="productOutForm.productQty" placeholder="请è¾å
¥æ¯ç产é" type="digit" /> |
| | | </u-form-item> |
| | | <u-form-item label="æ¥åºæ°é"> |
| | | <u-input v-model="productOutForm.scrapQty" placeholder="请è¾å
¥æ¥åºæ°é" type="digit" /> |
| | | </u-form-item> |
| | | <u-form-item label="è½½å
·ç¼å·"> |
| | | <u-input v-model="productOutForm.reelNumber" placeholder="请è¾å
¥è½½å
·ç¼å·" /> |
| | | </u-form-item> |
| | | <u-form-item label="åä½"> |
| | | <u-input v-model="productOutForm.unit" disabled placeholder="" /> |
| | | </u-form-item> |
| | | <u-form-item label="åæ®µæè¿°"> |
| | | <u-input v-model="productOutForm.segmentDesc" /> |
| | | </u-form-item> |
| | | <u-form-item label="ç产人å">{{productOutForm.staffName}}</u-form-item> |
| | | <u-form-item label="äº§åºæ¥æ"> |
| | | <u-input v-model="productOutForm.date" disabled/> |
| | | </u-form-item> |
| | | </u-form> |
| | | </view> |
| | | <view class="shift-product-out-bottom-view"> |
| | | <u-button text="ç¡®å®" type="success" size="medium" :customStyle="{width:'150rpx'}" @click="addShiftProudctOut"> |
| | | ç¡®å®</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | const currentDateTime = this.getDateTime(); |
| | | return { |
| | | productOutForm: { |
| | | workstationId: null, |
| | | operationTaskId: null, |
| | | partId: null, |
| | | partNo: null, |
| | | partName: null, |
| | | unit: null, |
| | | outBatchNo: null, |
| | | reelNumber: null, |
| | | ifsBatchNo: null, |
| | | startMeterMark: null, |
| | | endMeterMark: null, |
| | | productQty: null, |
| | | segmentDesc: null, |
| | | scrapQty: null, |
| | | remark: null, |
| | | staffName: null, |
| | | date: currentDateTime, |
| | | status: null, |
| | | disNumber: null |
| | | }, |
| | | info: {}, |
| | | personInitList: [], |
| | | personBoardList: [], |
| | | products: [] |
| | | |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | //type:shift æçç» person æäººå |
| | | this.info.type = option.type |
| | | this.info.dutyId = option.dutyId |
| | | this.info.workstationId = option.workstationId |
| | | |
| | | this.productOutForm.workstationId = option.workstationId |
| | | this.productOutForm.operationTaskId = option.operationTaskId |
| | | this.productOutForm.partId = option.partId |
| | | this.productOutForm.partName = option.partName == "null" ? "" : option.partName |
| | | this.productOutForm.partNo = option.partNo == "null" ? "" : option.partNo |
| | | this.productOutForm.unit = option.unit == "null" ? "" : option.unit |
| | | this.productOutForm.outBatchNo = option.outBatchNo |
| | | this.productOutForm.startMeterMark = option.endMeterMark |
| | | this.productOutForm.endMeterMark = option.endMeterMark |
| | | this.getPerson() |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | getDateTime() { |
| | | let year = new Date().getFullYear(); //å¹´ |
| | | let month = new Date().getMonth() + 1; //注æï¼æä»½æ¯ä»0æå¼å§è·åçï¼æä»¥è¦+1; |
| | | let day = new Date().getDate(); //æ¥ |
| | | let hour = new Date().getHours(); //æ¶ |
| | | let minute = new Date().getMinutes(); //å |
| | | let second = new Date().getSeconds(); //ç§ |
| | | //æ¼æ¥æ¥æ YYYY/MM/DD HH:mm |
| | | let currentDate = |
| | | year + |
| | | '/' + |
| | | (month >= 10 ? month : '0' + month) + |
| | | '/' + |
| | | (day >= 10 ? day : '0' + day); |
| | | let currentTime = |
| | | (hour >= 10 ? hour : '0' + hour) + |
| | | ':' + |
| | | (minute >= 10 ? minute : '0' + minute) + |
| | | ':' + |
| | | (second >= 10 ? second : '0' + second); |
| | | |
| | | return currentDate + " " + currentTime |
| | | }, |
| | | async getPerson() { |
| | | let queryUserParam = { |
| | | id: this.info.dutyId |
| | | } |
| | | console.log(queryUserParam) |
| | | let resUser = await this.$u.api.outputRegister.getPersonByDutyRecordId(queryUserParam) |
| | | |
| | | let userList = resUser.data |
| | | if (userList.length > 0) { |
| | | this.personInitList = [] |
| | | let staffName = "" |
| | | userList.map((item, index) => { |
| | | |
| | | if (index == userList.length - 1) { |
| | | staffName = staffName + item.staffName |
| | | } else { |
| | | staffName = staffName + item.staffName + "," |
| | | } |
| | | |
| | | let data = { |
| | | staffId: item.staffId, |
| | | staffName: item.staffName, |
| | | staffNo: item.staffNo, |
| | | checked: false |
| | | } |
| | | |
| | | this.personInitList.push(data) |
| | | }); |
| | | |
| | | //type:shift æçç» person æäººå |
| | | if (this.info.type == "shift") { |
| | | this.personBoardList = this.personInitList |
| | | this.productOutForm.staffName = staffName |
| | | } else { |
| | | this.personBoardList = [] |
| | | this.productOutForm.staffName = '' |
| | | } |
| | | |
| | | } |
| | | |
| | | }, |
| | | toDutyPerson() { |
| | | if (this.personInitList.length > 0) { |
| | | uni.navigateTo({ |
| | | url: '/pages/product/outputRegister/dutyPersonList?item=' + encodeURIComponent(JSON |
| | | .stringify(this.personInitList)) |
| | | }) |
| | | } |
| | | }, |
| | | setProductPerson(userList) { |
| | | //type:shift æçç» person æäººå |
| | | if (this.info.type == "person") { |
| | | //è¿æ»¤æéä¸ç人åä¿¡æ¯ |
| | | userList = userList.filter(item => item.checked == true) |
| | | this.personBoardList = [] |
| | | |
| | | if (userList.length > 0) { |
| | | let staffName = "" |
| | | userList.map((item, index) => { |
| | | |
| | | if (index == userList.length - 1) { |
| | | staffName = staffName + item.staffName |
| | | } else { |
| | | staffName = staffName + item.staffName + "," |
| | | } |
| | | |
| | | let data = { |
| | | staffId: item.staffId, |
| | | staffName: item.staffName, |
| | | staffNo: item.staffNo, |
| | | checked: item.checked |
| | | } |
| | | |
| | | this.personBoardList.push(data) |
| | | }); |
| | | this.productOutForm.staffName = staffName |
| | | } |
| | | } |
| | | }, |
| | | async addShiftProudctOut() { |
| | | // èµ·å§ç±³æ æ ¡éª |
| | | if (!this.isNumber(this.productOutForm.startMeterMark)) { |
| | | this.$u.toast('ãèµ·å§ç±³æ ã请è¾å
¥éè´æ°ï¼å°æ°ä½æå¤4ä½ï¼') |
| | | return |
| | | } |
| | | // æªæ¢ç±³æ æ ¡éª |
| | | if (!this.isNumber(this.productOutForm.endMeterMark)) { |
| | | this.$u.toast('ãæªæ¢ç±³æ ã请è¾å
¥éè´æ°ï¼å°æ°ä½æå¤4ä½ï¼') |
| | | return |
| | | } |
| | | // æªæ¢ç±³æ é大äºå¼å§ç±³æ |
| | | if ( |
| | | Number(this.productOutForm.endMeterMark) < |
| | | Number(this.productOutForm.startMeterMark) |
| | | ) { |
| | | this.$u.toast('ãæªæ¢ç±³æ ãé大äºãèµ·å§ç±³æ ã') |
| | | return |
| | | } |
| | | let productStaffs = [] |
| | | let productStaffIds = [] |
| | | this.personBoardList.forEach((item) => { |
| | | productStaffs.push(item.staffNo) |
| | | productStaffIds.push(item.staffId) |
| | | }) |
| | | let productOuts = [] |
| | | let productVo = { |
| | | isChangeShift: true, |
| | | id: null, |
| | | workstationId: this.productOutForm.workstationId, |
| | | operationTaskId: this.productOutForm.operationTaskId, |
| | | productOutputList: productOuts |
| | | } |
| | | if (this.info.type == "person") { |
| | | let productOut = null |
| | | this.personBoardList.forEach((item) => { |
| | | productOut = { |
| | | workstationId: this.productOutForm.workstationId, |
| | | operationTaskId: this.productOutForm.operationTaskId, |
| | | partId: this.productOutForm.partId, |
| | | startMeterMark: this.productOutForm.startMeterMark, |
| | | endMeterMark: this.productOutForm.endMeterMark, |
| | | productQty: null, |
| | | productStaffs: [item.staffNo], |
| | | productStaffIds: [item.staffId], |
| | | outBatchNo: this.productOutForm.outBatchNo, |
| | | reelNumber: this.productOutForm.reelNumber, |
| | | status: true, |
| | | dutyRecordId: this.info.dutyId, |
| | | ifsBatchNo: this.productOutForm.ifsBatchNo, |
| | | scrapQty: this.productOutForm.scrapQty, |
| | | segmentDesc: this.productOutForm.segmentDesc, |
| | | remark: this.productOutForm.remark |
| | | } |
| | | productOuts.push(productOut) |
| | | }) |
| | | } else { |
| | | let productOut = { |
| | | workstationId: this.productOutForm.workstationId, |
| | | operationTaskId: this.productOutForm.operationTaskId, |
| | | partId: this.productOutForm.partId, |
| | | startMeterMark: this.productOutForm.startMeterMark, |
| | | endMeterMark: this.productOutForm.endMeterMark, |
| | | productQty: null, |
| | | productStaffs: productStaffs, |
| | | productStaffIds: productStaffIds, |
| | | outBatchNo: this.productOutForm.outBatchNo, |
| | | reelNumber: this.productOutForm.reelNumber, |
| | | status: false, |
| | | dutyRecordId: this.info.dutyId, |
| | | ifsBatchNo: this.productOutForm.ifsBatchNo, |
| | | scrapQty: this.productOutForm.scrapQty, |
| | | segmentDesc: this.productOutForm.segmentDesc, |
| | | remark: this.productOutForm.remark |
| | | } |
| | | productOuts.push(productOut) |
| | | } |
| | | let res = await this.$u.api.outputRegister.saveProductOutput(productVo) |
| | | let that = this |
| | | if (res.code == 0) { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'ä¿åæå', |
| | | showCancel: false, |
| | | success: function() { |
| | | that.refreshLastPage() |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'ä¿å失败', |
| | | showCancel: false, |
| | | success: function() {} |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | isNumber(value) { |
| | | var reg = /^[0-9]+(.[0-9]{1,4})?$/ |
| | | if ( |
| | | value == undefined || |
| | | value == null || |
| | | value === '' || |
| | | value.trim === '' |
| | | ) { |
| | | return false |
| | | } else { |
| | | if (!reg.test(value)) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | } |
| | | }, |
| | | isPositiveIntegerNumber(value) { |
| | | var reg = /^[1-9]\d*$/ |
| | | if ( |
| | | value == undefined || |
| | | value == null || |
| | | value === '' || |
| | | value.trim === '' |
| | | ) { |
| | | return false |
| | | } else { |
| | | if (!reg.test(value)) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | } |
| | | }, |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage() { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.refreshTrackingRecord() |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .shift-product-out-main-info { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .shift-product-out-main-row { |
| | | padding-bottom: 2px; |
| | | padding-top: 2px; |
| | | } |
| | | |
| | | .shift-product-out-form { |
| | | .u-form-item { |
| | | padding: 7rpx; |
| | | } |
| | | } |
| | | |
| | | .shift-product-out-bottom-view { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 1062rpx); |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <scroll-view class="scroll-list workstation-feed-list" scroll-y="true"> |
| | | <u-cell-group class="list workstation-feed-list-cell" :border="false"> |
| | | <view class="item u-border-bottom workstation-feed-view" :style="{backgroundColor: item.selected?backgroundColor.selectedColor:backgroundColor.unSelectedColor}" v-for="(item, index) in list" :key="item.id" @click="materialCardClick(item)" |
| | | > |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.partNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.partName}}</span> |
| | | |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">IFSæ¹æ¬¡å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.ifsBatchNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶æ¹å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.partBatchNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">è§æ ¼åå·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.specs}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">å¯ç¨æ°é</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | |
| | | <span>{{item.availableStockQuantity}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">åºåæ°é</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | |
| | | <span>{{item.stockQuantity}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">åä½</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.unit}}</span> |
| | | |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | <view class="view-fixed-two" style="width: 750rpx;text-align: center;"> |
| | | <u-button type="success" text="ç¡®å®" size="medium" :customStyle="{borderRadius:'0rpx'}" |
| | | @click="addFeed()">ç¡®å®</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | queryParams: { |
| | | workstationId: null |
| | | }, |
| | | list: [], |
| | | backgroundColor:{ |
| | | selectedColor:'#bbf59c', |
| | | unSelectedColor:'#ffffff' |
| | | } |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | if (params && params.workstationId !== "undefined") { |
| | | this.queryParams.workstationId=params.workstationId |
| | | this.loadList(); |
| | | } |
| | | }, |
| | | onShow() { |
| | | }, |
| | | methods: { |
| | | materialCardClick(item) { |
| | | item.selected = !item.selected |
| | | }, |
| | | addFeed(){ |
| | | let selectedFeedList=[] |
| | | this.list.forEach((item) => { |
| | | if(item.selected){ |
| | | selectedFeedList.push(item) |
| | | } |
| | | }) |
| | | this.refreshLastPage(selectedFeedList) |
| | | }, |
| | | loadList() { |
| | | let that=this |
| | | that.$u.api.pigxFeed.getFeedingStock(that.queryParams).then(res => { |
| | | that.list = res.data |
| | | that.list.forEach((item) => { |
| | | that.$set(item, 'selected', false) |
| | | }) |
| | | }); |
| | | }, |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(selectedFeedList) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.selectWorkstationFeed(selectedFeedList) |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .custom-edit-input { |
| | | border-bottom: 2rpx solid #F8F8F8; |
| | | } |
| | | |
| | | .list .content { |
| | | font-size: 12px; |
| | | background-color: #efefef; |
| | | box-sizing: border-box; |
| | | border-radius: 14rpx; |
| | | margin: 8px; |
| | | padding: 5px 10px; |
| | | box-shadow: none; |
| | | } |
| | | .workstation-feed-list{ |
| | | background-color: #F8F8F8; |
| | | } |
| | | .workstation-feed-list-cell { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: #F8F8F8; |
| | | } |
| | | } |
| | | .workstation-feed-view{ |
| | | margin-left: 30rpx; |
| | | margin-right: 30rpx; |
| | | margin-top: 30rpx; |
| | | border-radius: 20rpx; |
| | | padding-left: 10rpx; |
| | | padding-right: 10rpx; |
| | | padding-bottom: 10rpx; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <view class="search"> |
| | | <u-search v-model="query.workstationNo" placeholder="请è¾å
¥å·¥ä½ç«ç¼å·" @clear="search" @custom="search" @search="search"> |
| | | </u-search> |
| | | </view> |
| | | <scroll-view class="scroll-list" scroll-y="true" @scrolltolower="loadMore"> |
| | | |
| | | <u-cell-group class="list" :border="false"> |
| | | <view class="content" v-for="(item, index) in workStationList" :key="item.workstationNo" :index="index" |
| | | @click="selectWorkstation(item)"> |
| | | <view class="row-list"> |
| | | <span class="span-lable">å·¥ä½ç«ç¼å·: </span>{{ item.workstationNo }} |
| | | </view> |
| | | <view class="row-list"> |
| | | <span class="span-lable">å·¥ä½ç«åç§°: </span>{{ item.name }} |
| | | </view> |
| | | <view class="row-list"> |
| | | <span class="span-lable">夿³¨: </span>{{ item.remark }} |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | <view class="loadmore" @click="loadMore"> |
| | | <u-loadmore :status="loadStatus"></u-loadmore> |
| | | </view> |
| | | </scroll-view> |
| | | <scan></scan> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import scan from "@/components/scan/scan.vue"; |
| | | export default { |
| | | components: { |
| | | scan |
| | | }, |
| | | data() { |
| | | return { |
| | | query: { |
| | | current: 1, |
| | | size: 20 |
| | | }, |
| | | workStationList: [], |
| | | loadStatus: 'loadmore', |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.loadList(); |
| | | }, |
| | | onShow() { |
| | | let that = this |
| | | |
| | | uni.$off('scan') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scan', function(data) { |
| | | console.log('onscan'); |
| | | //æ«ç æååçåè°ï¼ä½ å¯ä»¥åèªå·±çé»è¾ä»£ç å¨è¿é |
| | | console.log('æ«ç ç»æï¼', data.code); |
| | | let sanCode=data.code |
| | | let formatData = JSON.parse(sanCode.replace(/\n/g,"").replace(/\s*/g,'')); |
| | | // console.log('formatDataï¼', formatData); |
| | | // console.log('formatData.lot_batch_noï¼', formatData.workstation); |
| | | |
| | | if(formatData.workstation!=""||formatData.workstation!=undefined) |
| | | { |
| | | that.findWorkstation(formatData.workstation) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | onNavigationBarButtonTap(e) { |
| | | uni.scanCode({ |
| | | success: res => { |
| | | try { |
| | | const result = JSON.parse(res.result) |
| | | |
| | | } catch (e) {} |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | | findWorkstation(workstationNo){ |
| | | let queryParam={ |
| | | current:1, |
| | | size:20, |
| | | workstationNo:workstationNo |
| | | } |
| | | this.$u.api.outputRegister.fetchWorkstationList(queryParam).then(res => { |
| | | if (!res.data.records || res.data.records.length == 0) { |
| | | this.$u.toast('æªæ¾å°å¯¹åºå·¥ä½ç«'); |
| | | }else{ |
| | | this.selectWorkstation(res.data.records[0]) |
| | | } |
| | | }); |
| | | }, |
| | | loadMore() { |
| | | this.loadStatus = "loading"; |
| | | setTimeout(() => { |
| | | this.query.current += 1; |
| | | this.loadList(); |
| | | }, 100); |
| | | }, |
| | | loadList() { |
| | | // æ¥è¯¢å·¥ä½ç«å表 |
| | | this.$u.api.outputRegister.fetchWorkstationList(this.query).then(res => { |
| | | if (!res.data.records || res.data.records.length == 0) { |
| | | this.loadStatus = "nomore"; |
| | | return; |
| | | } |
| | | |
| | | this.workStationList = this.workStationList.concat(res.data.records); |
| | | this.total = res.data.total; |
| | | this.query.current = res.data.current; |
| | | this.query.size = res.data.size; |
| | | this.loadStatus = "loadmore"; |
| | | }); |
| | | }, |
| | | search(value) { |
| | | this.workStationList = []; |
| | | this.query.current = 1; |
| | | this.query.workstationNo = value; |
| | | this.loadList(); |
| | | }, |
| | | selectWorkstation(workstation) { |
| | | this.refreshLastPage(workstation) |
| | | }, |
| | | |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(workstation) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.setWorkstation(workstation) |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .list .content { |
| | | font-size: 12px; |
| | | background-color: #efefef; |
| | | box-sizing: border-box; |
| | | border-radius: 14rpx; |
| | | margin: 8px; |
| | | padding: 5px 10px; |
| | | box-shadow: none; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <view> |
| | | <view class="search"> |
| | | <u-search v-model="query.locationDesc" @custom="search" @search="search" placeholder="åºä½æè¿°"></u-search> |
| | | </view> |
| | | <scroll-view class="scroll-list" scroll-y="true"> |
| | | <u-cell-group class="list" :border="false"> |
| | | <view class="content" v-for="(item, index) in locationList" :key="item.id" :index="index" @click="locationCardClick(item)"> |
| | | <view class="row-list location-row"> |
| | | <span class="span-lable">åºä½å·: </span>{{ item.locationNo }} |
| | | </view> |
| | | <view class="row-list location-row"> |
| | | <span class="span-lable">ä»åº: </span>{{ item.warehouseDesc }} |
| | | </view> |
| | | <view class="row-list location-row"> |
| | | <span class="span-lable">åºä½æè¿°: </span>{{ item.locationDesc }} |
| | | </view> |
| | | <view class="row-list location-row"> |
| | | <span class="span-lable">åºä½ç±»å: </span>{{ item.locationTypeDesc }} |
| | | </view> |
| | | </view> |
| | | <view v-if="locationList.length===0"> |
| | | <view style="text-align: center;"> |
| | | <span>æªæ¥è¯¢å°IFSåºä½è®°å½</span> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | </view> |
| | | <!--<view style="position: absolute;bottom: 0"> |
| | | <view style="height: 50rpx;display: flex;align-items: flex-end;"> |
| | | <u-button type="success" text="åºä½æ«ç " size="medium" |
| | | :customStyle="{width:'750rpx',borderRadius:'0rpx'}" @click="scanLocationCodeClick()">åºä½æ«ç |
| | | </u-button> |
| | | </view> |
| | | </view>--> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | locationList: [], |
| | | originList: [], |
| | | query:{locationDesc:''} |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.loadList(); |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | loadList() { |
| | | // æ¥è¯¢åºä½å表 |
| | | this.$u.api.ifsLocation.page(this.query).then(res => { |
| | | let _code =res.code |
| | | let _data =res.data |
| | | if(_code===0){ |
| | | this.locationList = _data.map((item, index) => { |
| | | return { |
| | | id: index + 1, |
| | | locationNo: item.LOCATION_NO, |
| | | locationDesc: item.LOCATION_DESC, |
| | | locationGroupDesc: item.LOCATION_GROUP_DESC, |
| | | locationTypeDesc: item.LOCATION_TYPE_DESC, |
| | | warehouseDesc: item.WAREHOUSE_DESC |
| | | } |
| | | }) |
| | | }else{ |
| | | this.locationList=[] |
| | | } |
| | | }) |
| | | }, |
| | | search(value){ |
| | | this.locationList = []; |
| | | this.query.locationDesc = value; |
| | | this.loadList(); |
| | | }, |
| | | scanLocationCodeClick() { |
| | | uni.scanCode({ |
| | | scanType: ['qrCode'], |
| | | success: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | }, |
| | | fail: function() { |
| | | console.log('æ«ç 失败'); |
| | | } |
| | | }); |
| | | }, |
| | | locationCardClick(task) { |
| | | this.refreshLastPage(task) |
| | | }, |
| | | |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(task) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.setMaterialLocation(task) |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .list .content { |
| | | font-size: 12px; |
| | | background-color: #efefef; |
| | | box-sizing: border-box; |
| | | border-radius: 14rpx; |
| | | margin: 8px; |
| | | padding: 5px 10px; |
| | | box-shadow: none; |
| | | } |
| | | .location-row{ |
| | | display: flex; |
| | | justify-content:space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <scroll-view class="scroll-list ifs-stock-scan-record" scroll-y="true"> |
| | | <u-cell-group class="list ifs-stock-scan-record-cell" :border="false"> |
| | | <u-card :title="item.partName" :sub-title="item.partNo" v-for="(item, index) in stockList" :key="item.id" |
| | | :index="item.id" :showHead="showCardHead" @click="stockCardClick(item)" :bodyStyle="item.selected?bodyStyle:{}"> |
| | | <view slot="body"> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="stock-val-col"> |
| | | <span>{{item.partNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶æè¿°</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="stock-val-col"> |
| | | <span>{{item.partDesc}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">åºä½</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="stock-val-col"> |
| | | <span>{{item.locationDesc}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">æ¹æ¬¡å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="stock-val-col"> |
| | | <span>{{item.batchNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">WDR</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="stock-val-col"> |
| | | <span>{{item.wdr}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">å¯ç¨åºå</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="stock-val-col"> |
| | | <span>{{item.available}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </view> |
| | | </u-card> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | <view class="view-fixed-two ifs-stock-bottom-btns"> |
| | | <u-button type="success" text="ç¡®å®" size="medium" |
| | | @click="toFindMaterialNeed()">ç¡®å®</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | showCardHead: false, |
| | | stockList: [], |
| | | bodyStyle: { |
| | | background: '#bbf59c' |
| | | } |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.loadList(); |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | loadList(){ |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | this.stockList=prevPage.$vm.getIsfStockList() |
| | | |
| | | }, |
| | | stockCardClick(item){ |
| | | item.selected=!item.selected |
| | | this.stockList.forEach((el)=>{ |
| | | if(el!==item){ |
| | | el.selected=false |
| | | } |
| | | }) |
| | | }, |
| | | toFindMaterialNeed() { |
| | | let selectStock=this.stockList.find((item)=>{ |
| | | return item.selected |
| | | }) |
| | | if(selectStock){ |
| | | this.refreshLastPage(selectStock) |
| | | }else{ |
| | | this.$u.toast('è¯·éæ©IFSåºå'); |
| | | } |
| | | }, |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(item) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.findMaterial(item) |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .stock-val-col{ |
| | | display: flex; |
| | | justify-content:flex-end; |
| | | } |
| | | .ifs-stock-scan-record { |
| | | background-color: #F8F8F8; |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 100rpx); |
| | | } |
| | | |
| | | .ifs-stock-scan-record-cell { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: #F8F8F8; |
| | | } |
| | | } |
| | | |
| | | .ifs-stock-bottom-btns{ |
| | | width: 750rpx; |
| | | height: 100rpx; |
| | | background-color: #fff; |
| | | display: flex; |
| | | justify-content:center; |
| | | align-items: center; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <view class="search"> |
| | | <u-search v-model="query.transportsNo" @custom="search" @search="search" placeholder="è´§çè¿è¾ä»»å¡æ è¯å·"></u-search> |
| | | </view> |
| | | <scroll-view class="scroll-list" scroll-y="true" @scrolltolower="loadMore"> |
| | | <u-cell-group class="list" :border="false"> |
| | | <u-card :title="item.transportsNo" :sub-title="item.transportsNo" v-for="(item, index) in list" :key="item.id" |
| | | :index="item.id" @click="cardClick(item.id)" > |
| | | <view slot="head"> |
| | | <view class="row-list"> |
| | | <span class="span-lable">ã任塿 è¯å·ã{{item.transportsNo}}</span> |
| | | </view> |
| | | </view> |
| | | <view slot="body"> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">ç©æéæ±: </span> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <u-button type="primary" size="mini" style="height: 80rpx;line-height: 80rpx;width: 100rpx;" @click="requirePartClick(item.id)">æ¥ç</u-button> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">ç§»åºæç»: </span> |
| | | </u-col> |
| | | <u-col span="4"> |
| | | <u-button type="primary" size="mini" style="height: 80rpx;line-height: 80rpx;width: 100rpx;" @click="moveDetailClick(item.id)">æ¥ç</u-button> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">å建æ¶é´: </span> |
| | | </u-col> |
| | | <u-col span="7"> |
| | | <view><span class="span-lable">{{item.createTime}}</span></view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </view> |
| | | |
| | | </u-card> |
| | | </u-cell-group> |
| | | <view class="loadmore" @click="loadMore"> |
| | | <u-loadmore :status="loadStatus"></u-loadmore> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | keywords: '', |
| | | query: { |
| | | current: 1, |
| | | size: 20 |
| | | }, |
| | | list: [], |
| | | count: 0, |
| | | loadStatus: 'loadmore' |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.loadList(); |
| | | }, |
| | | onShow() { |
| | | /*if (uni.getStorageSync('refreshList') === true) { |
| | | uni.removeStorageSync('refreshList'); |
| | | this.search(''); |
| | | }*/ |
| | | }, |
| | | methods: { |
| | | moveDetailClick(id){ |
| | | uni.navigateTo({ |
| | | url: '/pages/product/pick/moveDetailRecordList?id='+id |
| | | }) |
| | | }, |
| | | requirePartClick(id) { |
| | | uni.navigateTo({ |
| | | url: '/pages/product/pick/requirePartRecordList?id='+id |
| | | }) |
| | | }, |
| | | cardClick(id) { |
| | | console.log('adasdad') |
| | | uni.navigateTo({ |
| | | url: '/pages/product/pick/materialTransfer?id=' + id |
| | | }) |
| | | }, |
| | | loadMore() { |
| | | this.loadStatus = "loading"; |
| | | setTimeout(() => { |
| | | this.query.current += 1; |
| | | this.loadList(); |
| | | }, 100); |
| | | }, |
| | | loadList() { |
| | | this.$u.api.palletTransports.page(this.query).then(res => { |
| | | if (!res.data.records || res.data.records.length == 0) { |
| | | this.loadStatus = "nomore"; |
| | | return; |
| | | } |
| | | this.list = this.list.concat(res.data.records); |
| | | //this.total = res.data.total; |
| | | this.query.current = res.data.current; |
| | | this.query.size = res.data.size; |
| | | this.loadStatus = "loadmore"; |
| | | }); |
| | | }, |
| | | search(value) { |
| | | this.list = []; |
| | | this.query.current = 1; |
| | | this.query.transportsNo = value; |
| | | this.loadList(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <scroll-view class="scroll-list material-need-scan-record" scroll-y="true"> |
| | | <u-cell-group class="list material-need-scan-record-cell" :border="false"> |
| | | <u-card :title="item.partName" :sub-title="item.partNo" v-for="(item, index) in materialNeedList" :key="item.id" |
| | | :index="item.id" :showHead="showCardHead" @click="materialNeedCardClick(item)" :bodyStyle="item.selected?bodyStyle:{}"> |
| | | <view slot="body"> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="material-need-val-col"> |
| | | <span>{{item.partNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶æè¿°</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="material-need-val-col"> |
| | | <span>{{item.partDesc}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">éæ±æ°é</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="material-need-val-col"> |
| | | <span>{{item.demandQuantity}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">ç§»åºæ°é</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="material-need-val-col"> |
| | | <span>{{item.transferQuantity}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">å©ä½æ°é</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="material-need-val-col"> |
| | | <span>{{item.surplusQuantity}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">IFSè³åºä½</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view class="material-need-val-col"> |
| | | <span>{{item.toIfsLocationNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </view> |
| | | </u-card> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | <view class="view-fixed-two material-need-bottom-btns"> |
| | | <u-button type="success" text="ç¡®å®" size="medium" |
| | | @click="toSaveDetail()">ç¡®å®</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | showCardHead: false, |
| | | materialNeedList: [], |
| | | bodyStyle: { |
| | | background: '#bbf59c' |
| | | } |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.loadList(); |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | loadList(){ |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | this.materialNeedList=prevPage.$vm.getMaterialNeedList() |
| | | }, |
| | | materialNeedCardClick(item){ |
| | | item.selected=!item.selected |
| | | this.materialNeedList.forEach((el)=>{ |
| | | if(el!==item){ |
| | | el.selected=false |
| | | } |
| | | }) |
| | | }, |
| | | toSaveDetail() { |
| | | let materialNeed=this.materialNeedList.find((item)=>{ |
| | | return item.selected |
| | | }) |
| | | if(materialNeed){ |
| | | this.refreshLastPage(materialNeed) |
| | | }else{ |
| | | this.$u.toast('è¯·éæ©ç©æéæ±'); |
| | | } |
| | | }, |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(materialNeed) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.saveDetail(materialNeed) |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .material-need-val-col{ |
| | | display: flex; |
| | | justify-content:flex-end; |
| | | } |
| | | .material-need-scan-record { |
| | | background-color: #F8F8F8; |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 100rpx); |
| | | } |
| | | |
| | | .material-need-scan-record-cell { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: #F8F8F8; |
| | | } |
| | | } |
| | | |
| | | .material-need-bottom-btns{ |
| | | width: 750rpx; |
| | | height: 100rpx; |
| | | background-color: #fff; |
| | | display: flex; |
| | | justify-content:center; |
| | | align-items: center; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <scroll-view class="scroll-list material-transfer-detail" scroll-y="true" @scrolltolower="loadMore"> |
| | | <u-cell-group class="list material-transfer-detail-cell" :border="false"> |
| | | <u-card :title="item.partNo" :sub-title="item.partNo" v-for="(item, index) in list" :key="item.id" |
| | | :index="item.id" @click="materialCardClick(item)" :showHead="showCardHead" |
| | | :bodyStyle="item.selected?bodyStyle:{}"> |
| | | <view slot="body"> |
| | | <view class="item u-border-bottom" |
| | | > |
| | | <view> |
| | | <view style="text-align: right;"> |
| | | <u-button type="primary" style="height: 80rpx;line-height: 80rpx;width: 100rpx;" text="æ´æ°" size="mini" |
| | | @click.stop="updateDetail(item.id)">æ´æ°</u-button> |
| | | <u-button type="error" style="height: 80rpx;line-height: 80rpx;width: 100rpx;" text="å é¤" size="mini" :customStyle="{marginLeft:'20rpx'}" |
| | | @click.stop="deleteDetail(item.id)">å é¤</u-button> |
| | | </view> |
| | | </view> |
| | | <view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.partNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">é¶ä»¶æè¿°</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.partDesc}}</span> |
| | | |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">æ¹æ¬¡å·</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.batchNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">ç§»åºæ°é</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <u-input class="custom-edit-input" v-model="item.transferQuantity" |
| | | type="text" :clearable=false height="50"> |
| | | </u-input> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">IFSä»åºä½</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | |
| | | <span>{{item.fromIfsLocationNo}}</span> |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | <view class="row-list"> |
| | | <u-row justify="space-between"> |
| | | <u-col span="4"> |
| | | <span class="span-lable">IFSè³åºä½</span> |
| | | </u-col> |
| | | <u-col span="8"> |
| | | <view> |
| | | <span>{{item.toIfsLocationNo}}</span> |
| | | |
| | | </view> |
| | | </u-col> |
| | | </u-row> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </u-card> |
| | | </u-cell-group> |
| | | <view class="loadmore" @click="loadMore"> |
| | | <u-loadmore :status="loadStatus"></u-loadmore> |
| | | </view> |
| | | </scroll-view> |
| | | <!--<view class="view-fixed-one"> |
| | | <u-button type="success" text="æ«ç " size="medium" |
| | | @click="scanMaterialCodeClick()">æ«ç </u-button> |
| | | </view>--> |
| | | <view class="view-fixed-two"> |
| | | <u-button type="success" text="åºä½" style="height: 80rpx;line-height: 80rpx;" size="medium" :customStyle="{borderRadius:'0rpx'}" |
| | | @click="toLocations()">åºä½</u-button> |
| | | <u-button type="success" text="æ§è¡" style="height: 80rpx;line-height: 80rpx;" size="medium" |
| | | :customStyle="{width:'320rpx',marginLeft:'30rpx',borderRadius:'0rpx'}" @click="executeMove()">æ§è¡</u-button> |
| | | </view> |
| | | <scan></scan> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import scan from "@/components/scan/scan.vue"; |
| | | export default { |
| | | components: { |
| | | scan |
| | | }, |
| | | data() { |
| | | return { |
| | | showCardHead: false, |
| | | query: { |
| | | current: 1, |
| | | size: 20 |
| | | }, |
| | | list: [], |
| | | options: [{ |
| | | text: 'æ´æ°', |
| | | style: { |
| | | backgroundColor: '#007aff' |
| | | } |
| | | }, |
| | | { |
| | | text: 'å é¤', |
| | | style: { |
| | | backgroundColor: '#dd524d' |
| | | } |
| | | } |
| | | ], |
| | | loadStatus: 'loadmore', |
| | | bodyStyle: { |
| | | background: '#bbf59c' |
| | | }, |
| | | isfStockList: [], |
| | | materialNeedList: [], |
| | | transportsId: null, |
| | | currStock: null |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | if (params && params.id !== "undefined") { |
| | | this.transportsId = params.id |
| | | this.query.transportsId = params.id |
| | | this.loadList(); |
| | | } |
| | | }, |
| | | onShow() { |
| | | |
| | | let that = this |
| | | |
| | | uni.$off('scan') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scan', function(data) { |
| | | console.log('onscan'); |
| | | //æ«ç æååçåè°ï¼ä½ å¯ä»¥åèªå·±çé»è¾ä»£ç å¨è¿é |
| | | console.log('æ«ç ç»æï¼', data.code); |
| | | let sanCode=data.code |
| | | let formatData = JSON.parse(sanCode.replace(/\n/g,"").replace(/\s*/g,'')); |
| | | console.log('formatDataï¼', formatData); |
| | | console.log('formatData.BatchNumberï¼', formatData.BatchNumber); |
| | | |
| | | let materialInfo={ |
| | | batchNo: formatData.BatchNumber, |
| | | partNo: formatData.erpPartNo, |
| | | wdr: formatData.wdr |
| | | } |
| | | that.scanMaterialCodeClick(materialInfo) |
| | | }) |
| | | }, |
| | | onNavigationBarButtonTap(e) { |
| | | uni.scanCode({ |
| | | success: res => { |
| | | try { |
| | | const result = JSON.parse(res.result) |
| | | |
| | | } catch (e) {} |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | | updateDetail(id){ |
| | | let k = this.list.findIndex( |
| | | (item) => item.id === id |
| | | ) |
| | | let material = this.list.find((item) => { |
| | | return item.id === id |
| | | }) |
| | | let transportsDetail = { |
| | | id: id, |
| | | transferQuantity: material.transferQuantity |
| | | } |
| | | |
| | | this.$u.api.palletTransportsDetail.updateDetail(transportsDetail).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | if (_code === 0) { |
| | | this.list[k].show = false; |
| | | this.$u.toast(`æ´æ°æå`); |
| | | this.search('') |
| | | } else { |
| | | this.$u.toast('æ´æ°å¤±è´¥'); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | deleteDetail(id){ |
| | | let k = this.list.findIndex( |
| | | (item) => item.id === id |
| | | ) |
| | | let transportsDetail = { |
| | | id: id |
| | | } |
| | | |
| | | this.$u.api.palletTransportsDetail.delObj(transportsDetail).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | if (_code === 0) { |
| | | this.list.splice(k, 1); |
| | | this.$u.toast('å 餿å'); |
| | | this.search('') |
| | | } else { |
| | | this.$u.toast('å é¤å¤±è´¥'); |
| | | } |
| | | }); |
| | | }, |
| | | clickOperateBtn(id, index1) { |
| | | let k = this.list.findIndex( |
| | | (item) => item.id === id |
| | | ) |
| | | if (index1 == 1) { |
| | | let transportsDetail = { |
| | | id: id |
| | | } |
| | | |
| | | this.$u.api.palletTransportsDetail.delObj(transportsDetail).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | if (_code === 0) { |
| | | this.list.splice(k, 1); |
| | | this.$u.toast('å 餿å'); |
| | | this.search('') |
| | | } else { |
| | | this.$u.toast('å é¤å¤±è´¥'); |
| | | } |
| | | }); |
| | | |
| | | } else { |
| | | let material = this.list.find((item) => { |
| | | return item.id === id |
| | | }) |
| | | let transportsDetail = { |
| | | id: id, |
| | | transferQuantity: material.transferQuantity |
| | | } |
| | | |
| | | this.$u.api.palletTransportsDetail.updateDetail(transportsDetail).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | if (_code === 0) { |
| | | this.list[k].show = false; |
| | | this.$u.toast(`æ´æ°æå`); |
| | | this.search('') |
| | | } else { |
| | | this.$u.toast('æ´æ°å¤±è´¥'); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | }, |
| | | // 妿æå¼ä¸ä¸ªçæ¶åï¼ä¸éè¦å
³éå
¶ä»ï¼åæ éå®ç°æ¬æ¹æ³ |
| | | openOperateBtn(id) { |
| | | // å
å°æ£å¨è¢«æä½çswipeActionæ 记为æå¼ç¶æï¼å¦åç±äºpropsçç¹æ§éå¶ï¼ |
| | | // åæ¬ä¸º'false'ï¼å次设置为'false'伿 æ |
| | | let k = this.list.findIndex( |
| | | (item) => item.id === id |
| | | ) |
| | | this.list[k].show = true; |
| | | this.list.map((val, idx) => { |
| | | if (k != idx) this.list[idx].show = false; |
| | | }) |
| | | }, |
| | | setMaterialLocation(loc) { |
| | | let transportsDetails = [] |
| | | this.list.forEach((item) => { |
| | | if (item.selected) { |
| | | transportsDetails.push({ |
| | | id: item.id, |
| | | toIfsLocationNo: loc.locationNo |
| | | }) |
| | | } |
| | | }) |
| | | this.$u.api.palletTransportsDetail.updateBatch(transportsDetails).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | if (_code === 0) { |
| | | this.$u.toast('æ´æ°IFSä»åºä½æå'); |
| | | this.search('') |
| | | } else { |
| | | this.$u.toast('æ´æ°IFSä»åºä½å¤±è´¥'); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | toLocations() { |
| | | let selectFlag = false |
| | | this.list.forEach((item) => { |
| | | if (item.selected) { |
| | | selectFlag = true |
| | | } |
| | | }) |
| | | if (selectFlag) { |
| | | uni.navigateTo({ |
| | | url: '/pages/product/pick/ifsLocationList', |
| | | }) |
| | | } else { |
| | | this.$u.toast('è¯·éæ©ç§»åºæç»'); |
| | | } |
| | | }, |
| | | scanMaterialCodeClick(materialInfo) { |
| | | //æ«ç è¿åpart_noãlot_batch_noãwdr |
| | | //è°ç¨IFSåºåæ¥è¯¢æ¥å£ï¼è¥è¿å夿¡åºåï¼é跳转è³IFSåºååè¡¨éæ©ææ¡åºå |
| | | //é䏿æ¡åºååï¼è°ç¨ç©æéæ±æ¥è¯¢æ¥å£ï¼è¥åå¨å¤æ¡ç©æéæ±ï¼å跳转è³ç©æéæ±åè¡¨éæ©ææ¡ç©æéæ± |
| | | //ä¿åå½åç§»åºæç»ï¼å¹¶å°è¯¥æ¡ç§»åºæç»æ¸²æå°é¡µé¢ |
| | | let queryParam = { |
| | | batchNo: materialInfo.batchNo, |
| | | partNo: materialInfo.partNo, |
| | | transportsId: this.transportsId, |
| | | wdr: materialInfo.wdr |
| | | } |
| | | this.$u.api.ifsStock.page(queryParam).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | this.isfStockList = [] |
| | | if (_code === 0) { |
| | | if (_data != null && _data.length > 0) { |
| | | if (_data.length > 1) { |
| | | _data.forEach((item, index) => { |
| | | this.isfStockList.push({ |
| | | id: index + 1, |
| | | partNo: item.PART_NO, |
| | | partDesc: item.PART_DESC, |
| | | locationDesc: item.LOCATION_DESC, |
| | | locationNo: item.LOCATION_NO, |
| | | batchNo: item.LOT_BATCH_NO, |
| | | wdr: item.WAIV_DEV_REJ_NO, |
| | | available: item.QTY_AVAILABLE, |
| | | unit: item.UNIT_MEAS_DESC, |
| | | engChgLevel: item.ENG_CHG_LEVEL, |
| | | planMoveQuality: item.QTY_AVAILABLE, |
| | | selected: false |
| | | }) |
| | | }) |
| | | uni.navigateTo({ |
| | | url: '/pages/product/pick/ifsStock', |
| | | }) |
| | | } else { |
| | | this.currStock = { |
| | | id: 1, |
| | | partNo: _data[0].PART_NO, |
| | | partDesc: _data[0].PART_DESC, |
| | | locationDesc: _data[0].LOCATION_DESC, |
| | | locationNo: _data[0].LOCATION_NO, |
| | | batchNo: _data[0].LOT_BATCH_NO, |
| | | wdr: _data[0].WAIV_DEV_REJ_NO, |
| | | available: _data[0].QTY_AVAILABLE, |
| | | unit: _data[0].UNIT_MEAS_DESC, |
| | | engChgLevel: _data[0].ENG_CHG_LEVEL, |
| | | planMoveQuality: _data[0].QTY_AVAILABLE |
| | | } |
| | | this.queryMaterialNeedList(queryParam.partNo) |
| | | } |
| | | } else { |
| | | this.$u.toast('æªæ¾å°IFSåºå'); |
| | | } |
| | | |
| | | } else { |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | getIsfStockList() { |
| | | return this.isfStockList |
| | | }, |
| | | getMaterialNeedList() { |
| | | return this.materialNeedList |
| | | }, |
| | | findMaterial(ifsStock) { |
| | | this.currStock = ifsStock |
| | | this.queryMaterialNeedList(ifsStock.partNo) |
| | | }, |
| | | //æ ¹æ®é¶ä»¶å·å»æ¥è¯¢ç©æéæ± |
| | | queryMaterialNeedList(partNo) { |
| | | let queryParam = { |
| | | current: 1, |
| | | size: 100, |
| | | transportsId: this.transportsId, |
| | | partNo: partNo |
| | | } |
| | | this.$u.api.palletTransportsMaterial.page(queryParam).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | this.materialNeedList = [] |
| | | if (_code === 0) { |
| | | if (_data.records != null && _data.records.length > 0) { |
| | | if (_data.records.length > 1) { |
| | | _data.records.forEach((item, index) => { |
| | | this.materialNeedList.push({ |
| | | id: item.id, |
| | | partDesc: item.partDesc, |
| | | demandQuantity: item.demandQuantity, |
| | | partId: item.partId, |
| | | partNo: item.partNo, |
| | | surplusQuantity: item.surplusQuantity, |
| | | toIfsLocationName: item.toIfsLocationName, |
| | | toIfsLocationNo: item.toIfsLocationNo, |
| | | transferQuantity: item.transferQuantity, |
| | | unit: item.unit, |
| | | transportsId: item.transportsId, |
| | | detailExistState: item.detailExistState, |
| | | selected: false |
| | | }) |
| | | }) |
| | | uni.navigateTo({ |
| | | url: '/pages/product/pick/materialNeed', |
| | | }) |
| | | } else { |
| | | let materialNeed = { |
| | | id: _data.records[0].id |
| | | } |
| | | this.saveDetail(materialNeed) |
| | | } |
| | | } else { |
| | | this.$u.toast('æªæ¾å°å¯¹åºçç©æéæ±'); |
| | | } |
| | | } else { |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | saveDetail(materialNeed) { |
| | | let postDetailParam = { |
| | | partNo: this.currStock.partNo, |
| | | partDesc: this.currStock.partDesc, |
| | | batchNo: this.currStock.batchNo, |
| | | wdr: this.currStock.wdr, |
| | | transferQuantity: this.currStock.planMoveQuality, |
| | | fromIfsLocationNo: this.currStock.locationNo, |
| | | transportsMaterialId: materialNeed.id, |
| | | transportsId: this.transportsId |
| | | } |
| | | this.$u.api.palletTransportsDetail.addDetail(postDetailParam).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | //ä¿åæç»æåæ¶ |
| | | if (_code === 0) { |
| | | this.$u.toast('æ·»å ç§»åºæç»æå'); |
| | | this.search('') |
| | | } else { |
| | | this.$u.toast('æ·»å ç§»åºæç»å¤±è´¥'); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | executeMove(){ |
| | | let moveFlag = true |
| | | let detailIds = [] |
| | | this.list.forEach((item) => { |
| | | if (item.selected) { |
| | | detailIds.push(item.id) |
| | | if (item.state === '02submitted') { |
| | | moveFlag = false |
| | | } |
| | | } |
| | | }) |
| | | if(moveFlag){ |
| | | if(detailIds.length>0){ |
| | | this.$u.api.palletTransports.executeMove(detailIds).then(res => { |
| | | let _code = res.code |
| | | let _data = res.data |
| | | let _msg = res.msg |
| | | //ä¿åæç»æåæ¶ |
| | | if (_code === 0) { |
| | | this.$u.toast('æ§è¡æå'); |
| | | this.search('') |
| | | } else { |
| | | this.$u.toast('æ§è¡å¤±è´¥'); |
| | | } |
| | | |
| | | }); |
| | | }else{ |
| | | this.$u.toast('è¯·éæ©å·²åå»ºç¶æçæç»'); |
| | | } |
| | | }else{ |
| | | this.$u.toast('åªæå·²åå»ºç¶æçæç»ï¼æè½è¢«æ§è¡'); |
| | | } |
| | | }, |
| | | materialCardClick(item) { |
| | | item.selected = !item.selected |
| | | }, |
| | | loadMore() { |
| | | this.loadStatus = "loading"; |
| | | setTimeout(() => { |
| | | this.query.current += 1; |
| | | this.loadList(); |
| | | }, 100); |
| | | }, |
| | | loadList() { |
| | | let that=this |
| | | that.$u.api.palletTransportsDetail.page(that.query).then(res => { |
| | | if (!res.data.records || res.data.records.length == 0) { |
| | | that.loadStatus = "nomore"; |
| | | return; |
| | | } |
| | | that.list = that.list.concat(res.data.records); |
| | | that.list.forEach((item) => { |
| | | that.$set(item, 'selected', false) |
| | | that.$set(item, 'show', false) |
| | | }) |
| | | //this.total = res.data.total; |
| | | that.query.current = res.data.current; |
| | | that.query.size = res.data.size; |
| | | that.loadStatus = "loadmore"; |
| | | }); |
| | | }, |
| | | search(value) { |
| | | this.list = []; |
| | | this.query.current = 1; |
| | | this.$nextTick(() => { |
| | | this.loadList(); |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .custom-edit-input { |
| | | border-bottom: 2rpx solid #F8F8F8; |
| | | } |
| | | |
| | | .list .content { |
| | | font-size: 12px; |
| | | background-color: #efefef; |
| | | box-sizing: border-box; |
| | | border-radius: 14rpx; |
| | | margin: 8px; |
| | | padding: 5px 10px; |
| | | box-shadow: none; |
| | | } |
| | | .material-transfer-detail{ |
| | | background-color: #F8F8F8; |
| | | } |
| | | .material-transfer-detail-cell { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: #F8F8F8; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <scroll-view class="scroll-list" scroll-y="true" @scrolltolower="loadMore"> |
| | | <u-cell-group class="list" :border="false"> |
| | | <view class="content" v-for="(item, index) in moveDetailList" :key="item.id" :index="index"> |
| | | <view class="row-list detail-row"> |
| | | <span class="span-lable">é¶ä»¶ç¼å·: </span>{{ item.partNo }} |
| | | </view> |
| | | <view class="row-list detail-row"> |
| | | <span class="span-lable">é¶ä»¶æè¿°: </span>{{ item.partDesc }} |
| | | </view> |
| | | <view class="row-list detail-row"> |
| | | <span class="span-lable">æ¹æ¬¡å·: </span>{{ item.batchNo }} |
| | | </view> |
| | | <view class="row-list detail-row"> |
| | | <span class="span-lable">WDR: </span>{{ item.wdr }} |
| | | </view> |
| | | <view class="row-list detail-row"> |
| | | <span class="span-lable">ç§»åºæ°é: </span>{{ item.transferQuantity }} |
| | | </view> |
| | | <view class="row-list detail-row"> |
| | | <span class="span-lable">IFSä»åºä½: </span>{{ item.fromIfsLocationNo }} |
| | | </view> |
| | | <view class="row-list detail-row"> |
| | | <span class="span-lable">IFSè³åºä½: </span>{{ item.toIfsLocationNo }} |
| | | </view> |
| | | <view class="row-list detail-row"> |
| | | <span class="span-lable">ç¶æ: </span>{{ item.state }} |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | <view class="loadmore" @click="loadMore"> |
| | | <u-loadmore :status="loadStatus"></u-loadmore> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | moveDetailList: [], |
| | | query: { |
| | | current: 1, |
| | | size: 20 |
| | | }, |
| | | originList: [], |
| | | loadStatus: 'loadmore' |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | if (params && params.id !== "undefined") { |
| | | this.query.transportsId=params.id |
| | | this.loadList(); |
| | | } |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | loadMore() { |
| | | this.loadStatus = "loading"; |
| | | setTimeout(() => { |
| | | this.query.current += 1; |
| | | this.loadList(); |
| | | }, 100); |
| | | }, |
| | | loadList() { |
| | | this.$u.api.palletTransportsDetail.page(this.query).then(res => { |
| | | if (!res.data.records || res.data.records.length == 0) { |
| | | this.loadStatus = "nomore"; |
| | | return; |
| | | } |
| | | this.moveDetailList = this.moveDetailList.concat(res.data.records); |
| | | //this.total = res.data.total; |
| | | this.query.current = res.data.current; |
| | | this.query.size = res.data.size; |
| | | this.loadStatus = "loadmore"; |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .list .content { |
| | | font-size: 12px; |
| | | background-color: #efefef; |
| | | box-sizing: border-box; |
| | | border-radius: 14rpx; |
| | | margin: 8px; |
| | | padding: 5px 10px; |
| | | box-shadow: none; |
| | | } |
| | | .detail-row{ |
| | | display: flex; |
| | | justify-content:space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | <scroll-view class="scroll-list" scroll-y="true" @scrolltolower="loadMore"> |
| | | <u-cell-group class="list" :border="false"> |
| | | <view class="content" v-for="(item, index) in requirePartList" :key="item.id" :index="index"> |
| | | <view class="row-list part-row"> |
| | | <span class="span-lable">é¶ä»¶ç¼å·: </span>{{ item.partNo }} |
| | | </view> |
| | | <view class="row-list part-row"> |
| | | <span class="span-lable">é¶ä»¶æè¿°: </span>{{ item.partDesc }} |
| | | </view> |
| | | <view class="row-list part-row"> |
| | | <span class="span-lable">éæ±æ°é: </span>{{ item.demandQuantity }} |
| | | </view> |
| | | <view class="row-list part-row"> |
| | | <span class="span-lable">ç§»åºæ°é: </span>{{ item.transferQuantity }} |
| | | </view> |
| | | <view class="row-list part-row"> |
| | | <span class="span-lable">å©ä½æ°é: </span>{{ item.surplusQuantity }} |
| | | </view> |
| | | <view class="row-list part-row"> |
| | | <span class="span-lable">计éåä½: </span>{{ item.unit }} |
| | | </view> |
| | | <view class="row-list part-row"> |
| | | <span class="span-lable">IFSè³åºä½: </span>{{ item.toIfsLocationNo }} |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | <view class="loadmore" @click="loadMore"> |
| | | <u-loadmore :status="loadStatus"></u-loadmore> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | requirePartList: [], |
| | | query: { |
| | | current: 1, |
| | | size: 20 |
| | | }, |
| | | originList: [], |
| | | loadStatus: 'loadmore' |
| | | }; |
| | | }, |
| | | onLoad(params) { |
| | | if (params && params.id !== "undefined") { |
| | | this.query.transportsId=params.id |
| | | this.loadList(); |
| | | } |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | loadMore() { |
| | | this.loadStatus = "loading"; |
| | | setTimeout(() => { |
| | | this.query.current += 1; |
| | | this.loadList(); |
| | | }, 100); |
| | | }, |
| | | loadList() { |
| | | this.$u.api.palletTransportsMaterial.page(this.query).then(res => { |
| | | if (!res.data.records || res.data.records.length == 0) { |
| | | this.loadStatus = "nomore"; |
| | | return; |
| | | } |
| | | this.requirePartList = this.requirePartList.concat(res.data.records); |
| | | //this.total = res.data.total; |
| | | this.query.current = res.data.current; |
| | | this.query.size = res.data.size; |
| | | this.loadStatus = "loadmore"; |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .list .content { |
| | | font-size: 12px; |
| | | background-color: #efefef; |
| | | box-sizing: border-box; |
| | | border-radius: 14rpx; |
| | | margin: 8px; |
| | | padding: 5px 10px; |
| | | box-shadow: none; |
| | | } |
| | | .part-row{ |
| | | display: flex; |
| | | justify-content:space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="page"> |
| | | <view class="production-index-bg" /> |
| | | <u-navbar title="产åº" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" |
| | | back-icon-color="#000" /> |
| | | <view class="wrap"> |
| | | <view class="content"> |
| | | <view class="content-body"> |
| | | <view class="content-body-item param-extra" v-if="info.type!='group'"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">ç产人åï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <wu-button shape="circle" size="small" type="primary" @click="toDutyPerson"> |
| | | ç¹å»éæ© |
| | | </wu-button> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">é¶ä»¶ç¼å·ï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <text class="_text">{{ info.partNo }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">é¶ä»¶åç§°ï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <text class="_text">{{ info.partName }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">SNå·ï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <text class="_text">{{ info.outBatchNo }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">è½½å
·ç¼å·ï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <input class="_text u-input" v-model="info.reelNumber" placeholder="请填å" /> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">产åºå¥æ°ï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <input class="_text" type="number" v-model="info.disNumber" placeholder-style="color:#F76260" placeholder="请填å(å¿
å¡«)" /> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">æ¯å¥äº§éï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <text class="_text">{{ info.productQty }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">èµ·å§æ°éï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <input class="_text" type="number" v-model="info.startMeterMark" placeholder-style="color:#F76260" placeholder="请填å(å¿
å¡«)" @blur="startMeterBlur" /> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">æªæ¢æ°éï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <input class="_text" type="number" v-model="info.endMeterMark" placeholder-style="color:#F76260" placeholder="请填å(å¿
å¡«)" @blur="endMeterBlur" /> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">计éåä½ï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <text class="_text">{{info.unit}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">ç产说æï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <input class="_text" v-model="info.segmentDesc" placeholder="请填å" /> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">æ¥åºæ°éï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <input class="_text" v-model="info.scrapQty" placeholder="请填å" /> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">è½½å
·ééï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <input class="_text" v-model="info.reelWeight" placeholder="请填å" /> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">äº§åºæ¯éï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <input class="_text" v-model="info.grossWeight" placeholder="请填å" /> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item param-extra"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">ç产人åï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <text class="_text">{{ info.staffName }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="content-body-item"> |
| | | <view class="content-body-item-left"> |
| | | <text class="slot-box slot-text">夿³¨è¯´æï¼</text> |
| | | </view> |
| | | <view class="content-body-item-right"> |
| | | <input class="_text" v-model="info.mainRemark" placeholder="请填å" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="bottom"> |
| | | <view class="bottom-btn"> |
| | | <wu-button :custom-style="customStyleOne" size="normal" @click="onCancel"> |
| | | åæ¶ |
| | | </wu-button> |
| | | </view> |
| | | <view class="bottom-btn"> |
| | | <wu-button :custom-style="customStyleTwo" size="normal" @click="onSubmit"> |
| | | ç¡®å® |
| | | </wu-button> |
| | | </view> |
| | | </view> |
| | | <!-- </form> --> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import content_bg from '@/static/custom/product/productBg.png' |
| | | |
| | | export default { |
| | | components: {}, |
| | | computed: { |
| | | customStyleOne() { |
| | | return { |
| | | color: '#666666', |
| | | background: '#FFFFFF', |
| | | width: '350rpx' |
| | | } |
| | | }, |
| | | customStyleTwo() { |
| | | return { |
| | | color: '#FFFFFF', |
| | | background: '#234EED', |
| | | width: '350rpx' |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | background: { |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: 'fixed', |
| | | backgroundSize: '100% auto', |
| | | backgroundRepeat: 'no-repeat', |
| | | }, |
| | | info: { |
| | | partId: null, |
| | | partNo: null, |
| | | partName: null, |
| | | outBatchNo: null, |
| | | reelNumber: null, |
| | | disNumber: 1, |
| | | productQty: null, |
| | | startMeterMark: 0, |
| | | endMeterMark: null, |
| | | unit: null, |
| | | segmentDesc: null, |
| | | scrapQty: null, |
| | | reelWeight: null, |
| | | grossWeight: null, |
| | | staffName: null, |
| | | mainRemark: null, |
| | | productStaffIds: [], |
| | | productStaffs: [], |
| | | workstationId: null, |
| | | operationTaskId: null, |
| | | dutyRecordId: null, |
| | | }, |
| | | dutyForm: [], |
| | | personInitList: [], |
| | | personBoardList: [], |
| | | products: [], |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | if (option.params) { |
| | | const params = JSON.parse(decodeURIComponent(option.params)); |
| | | this.info.partId = params.partId; |
| | | this.info.partNo = params.partNo; |
| | | this.info.partName = params.partName; |
| | | this.info.unit = params.unit; |
| | | this.info.workstationId = params.workstationId; |
| | | this.info.operationTaskId = params.operationTaskId; |
| | | this.info.dutyRecordId = params.dutyRecordId; |
| | | this.info.type = params.type; |
| | | |
| | | //è·åå½ç人å |
| | | this.getPerson() |
| | | } |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | onCancel() { |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }, |
| | | async getPerson() { |
| | | let queryParam = { |
| | | id: this.info.workstationId |
| | | } |
| | | |
| | | let queryUserParam = { |
| | | id: this.info.dutyRecordId |
| | | } |
| | | |
| | | let resUser = await this.$u.api.outputRegister.getPersonByDutyRecordId(queryUserParam) |
| | | |
| | | let userList = resUser.data |
| | | if (userList.length > 0) { |
| | | this.personInitList = [] |
| | | this.$set(this.info, 'staffName', ""); |
| | | let staffName = "" |
| | | userList.map((item, index) => { |
| | | |
| | | if (index == userList.length - 1) { |
| | | staffName = staffName + item.staffName |
| | | } else { |
| | | staffName = staffName + item.staffName + "," |
| | | } |
| | | |
| | | let data = { |
| | | staffId: item.staffId, |
| | | staffName: item.staffName, |
| | | staffNo: item.staffNo, |
| | | checked: false |
| | | } |
| | | |
| | | this.personInitList.push(data) |
| | | }); |
| | | |
| | | //type:shift æçç» person æäººå |
| | | if (this.info.type == "group") { |
| | | this.personBoardList = this.personInitList |
| | | this.$set(this.info, 'staffName', staffName); |
| | | } else { |
| | | this.personBoardList = [] |
| | | this.$set(this.info, 'staffName', ""); |
| | | } |
| | | } |
| | | }, |
| | | setProducts() { |
| | | let productStaffs = [] |
| | | let productStaffIds = [] |
| | | let newProduct = {} |
| | | this.products = [] |
| | | //type:group æçç» person æäººå |
| | | if (this.info.type == "group") { |
| | | // æçç»æ¥å·¥ï¼ä¸æ¡è®°å½ |
| | | let staffName = '' |
| | | let staffNo = '' |
| | | for (let i = 0; i < this.personBoardList.length; i++) { |
| | | staffName += this.personBoardList[i].staffName + ',' |
| | | staffNo += this.personBoardList[i].staffNo + ',' |
| | | productStaffs.push(this.personBoardList[i].staffNo) |
| | | productStaffIds.push(this.personBoardList[i].staffId) |
| | | } |
| | | |
| | | staffName = staffName.substring(0, staffName.length - 1) |
| | | staffNo = staffNo.substring(0, staffNo.length - 1) |
| | | |
| | | newProduct = {} |
| | | newProduct.staffName = staffName |
| | | newProduct.staffNo = staffNo |
| | | newProduct.productNo = null |
| | | newProduct.partId = this.info.partId |
| | | newProduct.partNo = this.info.partNo |
| | | newProduct.partName = this.info.partName |
| | | newProduct.outBatchNo = null |
| | | newProduct.disNumber = this.info.disNumber |
| | | newProduct.productQty = 0 |
| | | newProduct.sproductQty = 0 |
| | | newProduct.ifsBatchNo = null |
| | | newProduct.unit = this.info.unit |
| | | newProduct.productStaffs = productStaffs |
| | | newProduct.productStaffIds = productStaffIds |
| | | newProduct.status = false |
| | | newProduct.systemNo = null |
| | | newProduct.date = this.info.date |
| | | newProduct.dutyRecordId = this.info.dutyRecordId |
| | | newProduct.startMeterMark = this.info.startMeterMark |
| | | newProduct.endMeterMark = this.info.endMeterMark |
| | | newProduct.scrapQty = this.info.scrapQty |
| | | newProduct.segmentDesc = this.info.segmentDesc |
| | | newProduct.remark = null |
| | | newProduct.outBatchNo = null |
| | | newProduct.reelNumber = this.info.reelNumber |
| | | this.products.push(newProduct) |
| | | |
| | | } else { |
| | | let newProduct |
| | | for (let i = 0; i < this.personBoardList.length; i++) { |
| | | newProduct = {} |
| | | productStaffs = [] |
| | | productStaffIds = [] |
| | | productStaffIds.push(this.personBoardList[i].staffId) |
| | | productStaffs.push(this.personBoardList[i].staffNo) |
| | | newProduct.staffName = this.personBoardList[i].staffName |
| | | newProduct.staffNo = this.personBoardList[i].staffNo |
| | | newProduct.productNo = null |
| | | newProduct.partId = this.info.partId |
| | | newProduct.partNo = this.info.partNo |
| | | newProduct.partName = this.info.partName |
| | | newProduct.outBatchNo = null |
| | | newProduct.disNumber = this.info.disNumber |
| | | newProduct.productQty = 0 |
| | | newProduct.sproductQty = 0 |
| | | newProduct.unit = this.info.unit |
| | | newProduct.productStaffs = productStaffs |
| | | newProduct.productStaffIds = productStaffIds |
| | | newProduct.status = true |
| | | newProduct.systemNo = null |
| | | newProduct.date = this.info.date |
| | | newProduct.dutyRecordId = this.info.dutyRecordId |
| | | newProduct.startMeterMark = this.info.startMeterMark |
| | | newProduct.endMeterMark = this.info.endMeterMark |
| | | newProduct.reelNumber = this.info.reelNumber |
| | | newProduct.ifsBatchNo = null |
| | | newProduct.scrapQty = this.info.scrapQty |
| | | newProduct.segmentDesc = this.info.segmentDesc |
| | | newProduct.remark = null |
| | | this.products.push(newProduct) |
| | | } |
| | | } |
| | | }, |
| | | async onSubmit() { |
| | | |
| | | // ç产人å |
| | | if (this.info.staffName==""||this.info.staffName==undefined||this.info.staffName==null) { |
| | | |
| | | this.$u.toast('ç产人åä¸è½ä¸ºç©º') |
| | | return |
| | | } |
| | | |
| | | //设置工åä¿¡æ¯ |
| | | this.setProducts(); |
| | | |
| | | for (let i = 0; i < this.products.length; i++) { |
| | | |
| | | // çæ°æ ¡éª |
| | | if (!this.isPositiveIntegerNumber(this.products[i].disNumber)) { |
| | | |
| | | this.$u.toast('第' + (i + 1) + 'è¡ï¼ãçæ°ã请è¾å
¥æ£æ´æ°ï¼') |
| | | return |
| | | } |
| | | // èµ·å§ç±³æ æ ¡éª |
| | | if (!this.isNumber(this.products[i].startMeterMark)) { |
| | | this.$u.toast('第' + (i + 1) + 'è¡ï¼ãèµ·å§ç±³æ ã请è¾å
¥éè´æ°ï¼å°æ°ä½æå¤4ä½ï¼') |
| | | return |
| | | } |
| | | // æªæ¢ç±³æ æ ¡éª |
| | | if (!this.isNumber(this.products[i].endMeterMark)) { |
| | | this.$u.toast('第' + (i + 1) + 'è¡ï¼ãæªæ¢ç±³æ ã请è¾å
¥éè´æ°ï¼å°æ°ä½æå¤4ä½ï¼') |
| | | return |
| | | } |
| | | // æªæ¢ç±³æ é大äºå¼å§ç±³æ |
| | | if ( |
| | | Number(this.products[i].endMeterMark) < |
| | | Number(this.products[i].startMeterMark) |
| | | ) { |
| | | this.$u.toast('第' + (i + 1) + 'è¡ï¼ãæªæ¢ç±³æ ãé大äºãèµ·å§ç±³æ ã') |
| | | return |
| | | } |
| | | } |
| | | |
| | | // å½åæ¯äº§åºçæ°å¢ |
| | | const list = [] |
| | | for (let i = 0; i < this.products.length; i++) { |
| | | let productVo = {} |
| | | productVo.isChangeShift = false |
| | | productVo.id = null |
| | | productVo.workstationId = this.info.workstationId |
| | | productVo.operationTaskId = this.info.operationTaskId |
| | | productVo.discsNumber = this.products[i].disNumber |
| | | let productOuts = [] |
| | | let productOut = {} |
| | | productOut.workstationId = this.info.workstationId |
| | | productOut.operationTaskId = this.info.operationTaskId |
| | | productOut.partId = this.products[i].partId |
| | | productOut.disNumber = this.products[i].disNumber |
| | | productOut.productQty = this.products[i].productQty |
| | | productOut.sproductQty = this.products[i].sproductQty |
| | | productOut.productStaffs = this.products[i].productStaffs |
| | | productOut.productStaffIds = this.products[i].productStaffIds |
| | | productOut.outBatchNo = this.products[i].outBatchNo |
| | | productOut.status = this.products[i].status |
| | | productOut.dutyRecordId = this.products[i].dutyRecordId |
| | | productOut.startMeterMark = this.products[i].startMeterMark |
| | | productOut.endMeterMark = this.products[i].endMeterMark |
| | | |
| | | productOut.outBatchNo = this.products[i].outBatchNo |
| | | productOut.reelNumber = this.products[i].reelNumber |
| | | productOut.ifsBatchNo = this.products[i].ifsBatchNo |
| | | productOut.scrapQty = this.products[i].scrapQty |
| | | productOut.segmentDesc = this.products[i].segmentDesc |
| | | productOut.remark = this.products[i].remark |
| | | |
| | | productOuts.push(productOut) |
| | | productVo.productOutputList = productOuts |
| | | list.push(productVo) |
| | | } |
| | | |
| | | let res = await this.$u.api.outputRegister.batchSaveProductMain(list) |
| | | let that = this |
| | | |
| | | if (res.code == 0) { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æäº¤æå', |
| | | showCancel: false, |
| | | success: function() { |
| | | that.refreshLastPage() |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æäº¤å¤±è´¥', |
| | | showCancel: false, |
| | | success: function() {} |
| | | }) |
| | | } |
| | | }, |
| | | isNumber(value) { |
| | | var reg = /^[0-9]+(.[0-9]{1,4})?$/ |
| | | if ( |
| | | value == undefined || |
| | | value == null || |
| | | value === '' || |
| | | value.trim === '' |
| | | ) { |
| | | return false |
| | | } else { |
| | | if (!reg.test(value)) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | } |
| | | }, |
| | | isPositiveIntegerNumber(value) { |
| | | var reg = /^[1-9]\d*$/ |
| | | if ( |
| | | value == undefined || |
| | | value == null || |
| | | value === '' || |
| | | value.trim === '' |
| | | ) { |
| | | return false |
| | | } else { |
| | | if (!reg.test(value)) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | } |
| | | }, |
| | | startMeterBlur(obj) { |
| | | if ((this.info.startMeterMark != "" ) && (this.info.endMeterMark!= "")) { |
| | | let qty = parseFloat(this.info.endMeterMark) - parseFloat(this.info.startMeterMark) |
| | | qty = parseFloat(qty.toFixed(4)) |
| | | this.$set(this.info, 'productQty', qty); |
| | | } |
| | | }, |
| | | endMeterBlur(obj) { |
| | | if ((this.info.startMeterMark != "" ) && (this.info.endMeterMark!= "")) { |
| | | let qty = parseFloat(this.info.endMeterMark) - parseFloat(this.info.startMeterMark) |
| | | qty = parseFloat(qty.toFixed(4)) |
| | | this.$set(this.info, 'productQty', qty); |
| | | } |
| | | }, |
| | | toDutyPerson() { |
| | | if (this.personInitList.length > 0) { |
| | | uni.navigateTo({ |
| | | url: '/pages/product/outputRegister/dutyPersonList?item=' + encodeURIComponent(JSON |
| | | .stringify(this.personInitList)) |
| | | }) |
| | | } |
| | | }, |
| | | setProductPerson(userList) { |
| | | //type:group æçç» person æäººå |
| | | if (this.info.type == "person") { |
| | | //è¿æ»¤æéä¸ç人åä¿¡æ¯ |
| | | userList = userList.filter(item => item.checked == true) |
| | | this.personBoardList = [] |
| | | this.$set(this.info, 'staffName', ""); |
| | | // this.personBoardList = userList |
| | | if (userList.length > 0) { |
| | | let staffName = "" |
| | | userList.map((item, index) => { |
| | | |
| | | if (index == userList.length - 1) { |
| | | staffName = staffName + item.staffName |
| | | } else { |
| | | staffName = staffName + item.staffName + "," |
| | | } |
| | | |
| | | let data = { |
| | | staffId: item.staffId, |
| | | staffName: item.staffName, |
| | | staffNo: item.staffNo, |
| | | checked: item.checked |
| | | } |
| | | |
| | | this.personBoardList.push(data) |
| | | }); |
| | | this.$set(this.info, 'staffName', staffName); |
| | | } |
| | | } |
| | | }, |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage() { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.refreshTrackingRecord() |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .production-index-bg { |
| | | background-color: #F6F9FF; |
| | | background-image: url('~@/static/custom/product/productBg.png'); |
| | | // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0)); |
| | | padding: 0 20rpx; |
| | | background-attachment: fixed; |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .content { |
| | | font-size: 12px; |
| | | background-color: rgba(250, 252, 255, 0.36); |
| | | box-sizing: border-box; |
| | | border-radius: 10rpx; |
| | | margin: 0rpx 0rpx 24rpx; |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 334rpx); |
| | | padding: 10rpx 20rpx; |
| | | box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(127, 127, 127, 0.1) !important; |
| | | position: relative; |
| | | |
| | | .content-body { |
| | | margin-top: 20rpx; |
| | | background-color: white; |
| | | // height: 1030rpx; |
| | | |
| | | .content-body-title { |
| | | font-size: 35rpx; |
| | | font-weight: bolder; |
| | | color: #1D2541; |
| | | } |
| | | |
| | | .content-body-item { |
| | | // height: 90rpx; |
| | | border: 1px solid #ADC8E4; |
| | | line-height: 100rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border: none; |
| | | margin: 0rpx 40rpx; |
| | | align-items: center; |
| | | |
| | | .content-body-item-left { |
| | | line-height: 100rpx; |
| | | |
| | | |
| | | .slot-box { |
| | | font-size: 32rpx; |
| | | } |
| | | } |
| | | |
| | | .content-body-item-right { |
| | | width: 400rpx; |
| | | line-height: 30rpx; |
| | | text-align: right; |
| | | ._text { |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .param-extra { |
| | | border-bottom: 1px solid #D5D5D5; |
| | | } |
| | | } |
| | | |
| | | .content-footer { |
| | | margin-top: 30rpx; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | |
| | | .footer-button { |
| | | margin-right: 35rpx; |
| | | } |
| | | } |
| | | |
| | | .bottom { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | height: 100rpx; |
| | | margin-top: 30rpx; |
| | | } |
| | | } |
| | | </style> |
pages/product/produce/editReportWork.vue
pages/product/produce/index.vue
pages/product/produce/operationTaskInfo.vue
pages/product/produce/reportWork.vue
pages/product/produce/workstationList/dutyRecordHistory.vue
pages/product/produce/workstationList/dutyRecordWorkstation.vue
pages/product/produce/workstationList/index.vue
pages/product/produce/workstationList/unSubmitDutyRecord.vue
pages/product/produce/workstationList/workstationList.vue
pages/product/report/index.scss
pages/product/report/index.vue
pages/product/tailHandle/index.vue
pages/product/tailHandle/workstationList.vue
pages/sys/home/index.vue
pages/sys/login/bindUser.vue
pages/sys/login/index.scss
pages/sys/login/index.vue
pages/sys/login/smsCode.vue
pages/sys/login/userPassword.vue
pages/sys/logs/form.vue
pages/sys/logs/index.vue
pages/sys/pigxParam/form.vue
pages/sys/pigxParam/index.vue
pages/sys/pigxPost/form.vue
pages/sys/pigxPost/index.vue
pages/sys/pigxRole/form.vue
pages/sys/pigxRole/index.vue
pages/sys/pigxTenant/form.vue
pages/sys/pigxTenant/index.vue
pages/sys/pigxUser/form.vue
pages/sys/pigxUser/index.vue
pages/sys/token/index.vue
pages/sys/user/index-old.scss
pages/sys/user/index-old.vue
pages/sys/user/index.vue
pages/sys/user/info.vue
pages/sys/user/pwd.vue
pages/util/bleConnect.vue
pages/wareHouse/finishProductIn/index.vue
pages/wareHouse/finishProductIn/locNoList.vue
pages/wareHouse/inventory/detail.vue
pages/wareHouse/inventory/index.vue
pages/wareHouse/inventory/locNoList.vue
pages/wareHouse/inventory/partchoose.vue
pages/wareHouse/jumpFinishProductIn/index.vue
pages/wareHouse/jumpZTE/jumpZTE.vue
pages/wareHouse/materialReturn/index.vue
pages/wareHouse/moveWareHouse/index.vue
pages/wareHouse/moveWareHouse/locNoList.vue
pages/wareHouse/outsource/check.vue
pages/wareHouse/outsource/index.vue
pages/wareHouse/outsource/instock.vue
pages/wareHouse/outsource/layout.vue
pages/wareHouse/outsource/packing.vue
pages/wareHouse/outsource/report.vue
pages/wareHouse/outsource/sampling.vue
pages/wareHouse/packing/detail.vue
pages/wareHouse/packing/form.vue
pages/wareHouse/packing/index.vue
pages/wareHouse/packing/personnelList.vue
pages/wareHouse/packing/registration.vue
pages/wareHouse/productBack/index.vue
project.config.json
static/common/img/iPhoneX.png
static/common/js/touch-emulator.js
static/custom/banner/1.svg
static/custom/banner/2.svg
static/custom/banner/3.svg
static/custom/banner/4.png
static/custom/daily/background.png
static/custom/daily/icon_1.png
static/custom/daily/icon_2.png
static/custom/daily/icon_3.png
static/custom/daily/icon_4.png
static/custom/daily/icon_5.png
static/custom/daily/icon_6.png
static/custom/daily/icon_7.png
static/custom/daily/icon_8.png
static/custom/daily/icon_bt_bg.png
static/custom/daily/icon_camera.png
static/custom/daily/icon_choose.png
static/custom/daily/icon_del.png
static/custom/daily/icon_dy.png
static/custom/daily/icon_edit.png
static/custom/daily/icon_history.png
static/custom/daily/icon_num.png
static/custom/daily/icon_number.png
static/custom/daily/icon_person.png
static/custom/daily/icon_report.png
static/custom/daily/icon_right.png
static/custom/daily/icon_save.png
static/custom/daily/icon_zl.png
static/custom/daily/img8.png
static/custom/delete.png
static/custom/favicon.png
static/custom/finishProductIn/del-icon.png
static/custom/finishProductIn/header_icon.png
static/custom/finishProductIn/icon_dele.png
static/custom/finishProductIn/icon_edit.png
static/custom/finishProductIn/info-bg.png
static/custom/finishProductIn/label-icon-1.png
static/custom/finishProductIn/label-icon-2.png
static/custom/finishProductIn/label-icon-3.png
static/custom/finishProductIn/locNoBg.png
static/custom/home/banner.png
static/custom/home/feed.png
static/custom/home/feeding.png
static/custom/home/finishProductIn.png
static/custom/home/home_img_bg.png
static/custom/home/icon_edit.png
static/custom/home/icon_number.png
static/custom/home/inventory.png
static/custom/home/materialReturn.png
static/custom/home/moveWareHouse.png
static/custom/home/packing.png
static/custom/home/productBack.png
static/custom/inventory/carmera.png
static/custom/inventory/header_icon.png
static/custom/inventory/icon3.png
static/custom/inventory/icon4.png
static/custom/inventory/icon_5.png
static/custom/inventory/label-icon-1.png
static/custom/inventory/label-icon-2.png
static/custom/inventory/label-icon-3.png
static/custom/inventory/locNoBg.png
static/custom/login/blue.png
static/custom/login/eye_close.png
static/custom/login/eye_open.png
static/custom/login/img_bg.png
static/custom/login/login-bg.png
static/custom/materialReturn/backBg.png
static/custom/materialReturn/icon_edit.png
static/custom/materialReturn/label-icon-1.png
static/custom/materialReturn/label-icon-2.png
static/custom/materialReturn/scan.png
static/custom/materialReturn/selected-btn-1.png
static/custom/materialReturn/selected-btn.png
static/custom/materialReturn/unselected-btn-1.png
static/custom/materialReturn/unselected-btn.png
static/custom/moveWareHouse/del-icon.png
static/custom/moveWareHouse/header_icon.png
static/custom/moveWareHouse/icon_dele.png
static/custom/moveWareHouse/label-icon-1.png
static/custom/moveWareHouse/label-icon-2.png
static/custom/moveWareHouse/label-icon-3.png
static/custom/moveWareHouse/locNoBg.png
static/custom/operationTask/black-del-icon.png
static/custom/operationTask/black-edit-icon.png
static/custom/operationTask/black-revoke-icon.png
static/custom/operationTask/blue-submit-icon.png
static/custom/operationTask/book-icon.png
static/custom/operationTask/edit-icon.png
static/custom/operationTask/enter-icon.png
static/custom/operationTask/in-progress-state-icon.png
static/custom/operationTask/label-icon-1.png
static/custom/operationTask/red-delete-icon.png
static/custom/operationTask/revoke-icon.png
static/custom/operationTask/submit-state-icon.png
static/custom/operationTask/time-icon.png
static/custom/operationTask/unsubmit-state-icon.png
static/custom/operationTask/workstation/icon_batch_save.png
static/custom/operationTask/workstation/icon_batch_submit.png
static/custom/operationTask/workstation/icon_clear.png
static/custom/operationTask/workstation/icon_delete.png
static/custom/operationTask/workstation/icon_history.png
static/custom/outsource/bg1.png
static/custom/outsource/bg2.png
static/custom/outsource/bg3.png
static/custom/outsource/bg4.png
static/custom/outsource/content_bg.png
static/custom/outsource/icon_delete.png
static/custom/outsource/index_bg.png
static/custom/outsource/scan.png
static/custom/packing/backBg.png
static/custom/packing/click-selected.png
static/custom/packing/click-unselected.png
static/custom/packing/icon_1.png
static/custom/packing/icon_2.png
static/custom/packing/icon_dele.png
static/custom/packing/num-bg.png
static/custom/packing/person_row_bg.png
static/custom/packing/row_bg.png
static/custom/product/del-icon.png
static/custom/product/icon_dele.png
static/custom/product/label-icon-1.png
static/custom/product/label-icon-2.png
static/custom/product/productBg.png
static/custom/productBack/backBg.png
static/custom/productBack/icon_edit.png
static/custom/productBack/label-icon-1.png
static/custom/productBack/label-icon-2.png
static/custom/tabbar/home_1.png
static/custom/tabbar/home_2.png
static/custom/tabbar/kefu_1.png
static/custom/tabbar/kefu_2.png
static/custom/tabbar/msg_1.png
static/custom/tabbar/msg_2.png
static/custom/tabbar/my_1.png
static/custom/tabbar/my_2.png
static/custom/tailHandle/header_icon.png
static/custom/tailHandle/label-icon-1.png
static/custom/tailHandle/label-icon-2.png
static/custom/tailHandle/label-icon-3.png
static/custom/tailHandle/locNoBg.png
static/custom/user/bg2.png
static/custom/user/img_tx.png
static/iconfont/iconfont.css
static/iconfont/iconfont.ttf
static/iconfont/iconfont.woff
static/iconfont/iconfont.woff2
static/index.html
static/uview/common/favicon.ico
static/uview/common/logo.png
static/uview/example/component.png
static/uview/example/component_select.png
static/uview/example/js.png
static/uview/example/js_bak.png
static/uview/example/js_select.png
static/uview/example/js_select_bak.png
static/uview/example/min_button.png
static/uview/example/min_button_select.png
static/uview/example/template.png
static/uview/example/template_select.png
static/y1253.mp3
store/$u.mixin.js
store/bluetooth/index.js
store/index.js
uni.scss
uni_modules/uni-badge/changelog.md
uni_modules/uni-badge/components/uni-badge/uni-badge.vue
uni_modules/uni-badge/package.json
uni_modules/uni-badge/readme.md
uni_modules/uni-collapse/changelog.md
uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue
uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue
uni_modules/uni-collapse/package.json
uni_modules/uni-collapse/readme.md
uni_modules/uni-data-select/changelog.md
uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue
uni_modules/uni-data-select/package.json
uni_modules/uni-data-select/readme.md
uni_modules/uni-datetime-picker/changelog.md
uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue
uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue
uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json
uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js
uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json
uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json
uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue
uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js
uni_modules/uni-datetime-picker/package.json
uni_modules/uni-datetime-picker/readme.md
uni_modules/uni-fab/changelog.md
uni_modules/uni-fab/components/uni-fab/uni-fab.vue
uni_modules/uni-fab/package.json
uni_modules/uni-fab/readme.md
uni_modules/uni-icons/changelog.md
uni_modules/uni-icons/components/uni-icons/uni-icons.uvue
uni_modules/uni-icons/components/uni-icons/uni-icons.vue
uni_modules/uni-icons/components/uni-icons/uniicons.css
uni_modules/uni-icons/components/uni-icons/uniicons.ttf
uni_modules/uni-icons/components/uni-icons/uniicons_file.ts
uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js
uni_modules/uni-icons/package.json
uni_modules/uni-icons/readme.md
uni_modules/uni-list/changelog.md
uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue
uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss
uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue
uni_modules/uni-list/components/uni-list-item/uni-list-item.vue
uni_modules/uni-list/components/uni-list/uni-list.vue
uni_modules/uni-list/components/uni-list/uni-refresh.vue
uni_modules/uni-list/components/uni-list/uni-refresh.wxs
uni_modules/uni-list/package.json
uni_modules/uni-list/readme.md
uni_modules/uni-load-more/changelog.md
uni_modules/uni-load-more/components/uni-load-more/i18n/en.json
uni_modules/uni-load-more/components/uni-load-more/i18n/index.js
uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json
uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json
uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue
uni_modules/uni-load-more/package.json
uni_modules/uni-load-more/readme.md
uni_modules/uni-notice-bar/changelog.md
uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.vue
uni_modules/uni-notice-bar/package.json
uni_modules/uni-notice-bar/readme.md
uni_modules/uni-scss/changelog.md
uni_modules/uni-scss/index.scss
uni_modules/uni-scss/package.json
uni_modules/uni-scss/readme.md
uni_modules/uni-scss/styles/index.scss
uni_modules/uni-scss/styles/setting/_border.scss
uni_modules/uni-scss/styles/setting/_color.scss
uni_modules/uni-scss/styles/setting/_radius.scss
uni_modules/uni-scss/styles/setting/_space.scss
uni_modules/uni-scss/styles/setting/_styles.scss
uni_modules/uni-scss/styles/setting/_text.scss
uni_modules/uni-scss/styles/setting/_variables.scss
uni_modules/uni-scss/styles/tools/functions.scss
uni_modules/uni-scss/theme.scss
uni_modules/uni-scss/variables.scss
uni_modules/uni-section/changelog.md
uni_modules/uni-section/components/uni-section/uni-section.vue
uni_modules/uni-section/package.json
uni_modules/uni-section/readme.md
uni_modules/uni-segmented-control/changelog.md
uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue
uni_modules/uni-segmented-control/package.json
uni_modules/uni-segmented-control/readme.md
uni_modules/wu-button/changelog.md
uni_modules/wu-button/components/wu-button/nvue.scss
uni_modules/wu-button/components/wu-button/props.js
uni_modules/wu-button/components/wu-button/vue.scss
uni_modules/wu-button/components/wu-button/wu-button.vue
uni_modules/wu-button/package.json
uni_modules/wu-button/readme.md
uni_modules/wu-icon/changelog.md
uni_modules/wu-icon/components/wu-icon/icons.js
uni_modules/wu-icon/components/wu-icon/props.js
uni_modules/wu-icon/components/wu-icon/wu-icon.vue
uni_modules/wu-icon/components/wu-icon/wuicons.ttf
uni_modules/wu-icon/package.json
uni_modules/wu-icon/readme.md
uni_modules/wu-loading-icon/changelog.md
uni_modules/wu-loading-icon/components/wu-loading-icon/props.js
uni_modules/wu-loading-icon/components/wu-loading-icon/wu-loading-icon.vue
uni_modules/wu-loading-icon/package.json
uni_modules/wu-loading-icon/readme.md
uni_modules/wu-ui-tools/changelog.md
uni_modules/wu-ui-tools/components/wu-ui-tools/wu-ui-tools.vue
uni_modules/wu-ui-tools/index.js
uni_modules/wu-ui-tools/index.scss
uni_modules/wu-ui-tools/libs/config/config.js
uni_modules/wu-ui-tools/libs/css/color.scss
uni_modules/wu-ui-tools/libs/css/common.scss
uni_modules/wu-ui-tools/libs/css/components.scss
uni_modules/wu-ui-tools/libs/css/variable.scss
uni_modules/wu-ui-tools/libs/css/vue.scss
uni_modules/wu-ui-tools/libs/function/color/color-convert/CHANGELOG.md
uni_modules/wu-ui-tools/libs/function/color/color-convert/LICENSE
uni_modules/wu-ui-tools/libs/function/color/color-convert/README.md
uni_modules/wu-ui-tools/libs/function/color/color-convert/conversions.js
uni_modules/wu-ui-tools/libs/function/color/color-convert/index.js
uni_modules/wu-ui-tools/libs/function/color/color-convert/package.json
uni_modules/wu-ui-tools/libs/function/color/color-convert/route.js
uni_modules/wu-ui-tools/libs/function/color/color-name/LICENSE
uni_modules/wu-ui-tools/libs/function/color/color-name/README.md
uni_modules/wu-ui-tools/libs/function/color/color-name/index.js
uni_modules/wu-ui-tools/libs/function/color/color-name/package.json
uni_modules/wu-ui-tools/libs/function/color/color-string/LICENSE
uni_modules/wu-ui-tools/libs/function/color/color-string/README.md
uni_modules/wu-ui-tools/libs/function/color/color-string/index.js
uni_modules/wu-ui-tools/libs/function/color/color-string/package.json
uni_modules/wu-ui-tools/libs/function/color/color.js
uni_modules/wu-ui-tools/libs/function/color/index.js
uni_modules/wu-ui-tools/libs/function/color/is-arrayish/LICENSE
uni_modules/wu-ui-tools/libs/function/color/is-arrayish/README.md
uni_modules/wu-ui-tools/libs/function/color/is-arrayish/index.js
uni_modules/wu-ui-tools/libs/function/color/is-arrayish/package.json
uni_modules/wu-ui-tools/libs/function/color/is-arrayish/yarn-error.log
uni_modules/wu-ui-tools/libs/function/color/simple-swizzle/LICENSE
uni_modules/wu-ui-tools/libs/function/color/simple-swizzle/README.md
uni_modules/wu-ui-tools/libs/function/color/simple-swizzle/index.js
uni_modules/wu-ui-tools/libs/function/color/simple-swizzle/package.json
uni_modules/wu-ui-tools/libs/function/debounce.js
uni_modules/wu-ui-tools/libs/function/digit.js
uni_modules/wu-ui-tools/libs/function/index.js
uni_modules/wu-ui-tools/libs/function/platform.js
uni_modules/wu-ui-tools/libs/function/test.js
uni_modules/wu-ui-tools/libs/function/throttle.js
uni_modules/wu-ui-tools/libs/luch-request/adapters/index.js
uni_modules/wu-ui-tools/libs/luch-request/core/InterceptorManager.js
uni_modules/wu-ui-tools/libs/luch-request/core/Request.js
uni_modules/wu-ui-tools/libs/luch-request/core/buildFullPath.js
uni_modules/wu-ui-tools/libs/luch-request/core/defaults.js
uni_modules/wu-ui-tools/libs/luch-request/core/dispatchRequest.js
uni_modules/wu-ui-tools/libs/luch-request/core/mergeConfig.js
uni_modules/wu-ui-tools/libs/luch-request/core/settle.js
uni_modules/wu-ui-tools/libs/luch-request/helpers/buildURL.js
uni_modules/wu-ui-tools/libs/luch-request/helpers/combineURLs.js
uni_modules/wu-ui-tools/libs/luch-request/helpers/isAbsoluteURL.js
uni_modules/wu-ui-tools/libs/luch-request/index.d.ts
uni_modules/wu-ui-tools/libs/luch-request/index.js
uni_modules/wu-ui-tools/libs/luch-request/utils.js
uni_modules/wu-ui-tools/libs/luch-request/utils/clone.js
uni_modules/wu-ui-tools/libs/mixin/button.js
uni_modules/wu-ui-tools/libs/mixin/mixin.js
uni_modules/wu-ui-tools/libs/mixin/mpMixin.js
uni_modules/wu-ui-tools/libs/mixin/mpShare.js
uni_modules/wu-ui-tools/libs/mixin/openType.js
uni_modules/wu-ui-tools/libs/mixin/touch.js
uni_modules/wu-ui-tools/libs/util/async-validator.js
uni_modules/wu-ui-tools/libs/util/dayjs.js
uni_modules/wu-ui-tools/libs/util/route.js
uni_modules/wu-ui-tools/package.json
uni_modules/wu-ui-tools/readme.md
uni_modules/wu-ui-tools/theme.scss
unpackage/debug/android_debug.apk
util/ble/encoding-indexes.js
util/ble/encoding.js
util/ble/esc.js
util/ble/tsc.js
util/ble/util.js
utils/date.js
utils/index.js
uview-ui/LICENSE
uview-ui/README.md
uview-ui/components/u-action-sheet/u-action-sheet.vue
uview-ui/components/u-alert-tips/u-alert-tips.vue
uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue
uview-ui/components/u-avatar-cropper/weCropper.js
uview-ui/components/u-avatar/u-avatar.vue
uview-ui/components/u-back-top/u-back-top.vue
uview-ui/components/u-badge/u-badge.vue
uview-ui/components/u-button/u-button.vue
uview-ui/components/u-calendar/u-calendar.vue
uview-ui/components/u-car-keyboard/u-car-keyboard.vue
uview-ui/components/u-card/u-card.vue
uview-ui/components/u-cell-group/u-cell-group.vue
uview-ui/components/u-cell-item/u-cell-item.vue
uview-ui/components/u-checkbox-group/u-checkbox-group.vue
uview-ui/components/u-checkbox/u-checkbox.vue
uview-ui/components/u-circle-progress/u-circle-progress.vue
uview-ui/components/u-circle-progress/u-line-progress/u-line-progress.vue
uview-ui/components/u-col/u-col.vue
uview-ui/components/u-collapse-item/u-collapse-item.vue
uview-ui/components/u-collapse/u-collapse.vue
uview-ui/components/u-column-notice/u-column-notice.vue
uview-ui/components/u-count-down/u-count-down.vue
uview-ui/components/u-count-to/u-count-to.vue
uview-ui/components/u-divider/u-divider.vue
uview-ui/components/u-dropdown-item/u-dropdown-item.vue
uview-ui/components/u-dropdown/u-dropdown.vue
uview-ui/components/u-empty/u-empty.vue
uview-ui/components/u-field/u-field.vue
uview-ui/components/u-form-item/u-form-item.vue
uview-ui/components/u-form/u-form.vue
uview-ui/components/u-full-screen/u-full-screen.vue
uview-ui/components/u-gap/u-gap.vue
uview-ui/components/u-grid-item/u-grid-item.vue
uview-ui/components/u-grid/u-grid.vue
uview-ui/components/u-icon/u-icon.vue
uview-ui/components/u-image/u-image.vue
uview-ui/components/u-index-anchor/u-index-anchor.vue
uview-ui/components/u-index-list/u-index-list.vue
uview-ui/components/u-input/u-input.vue
uview-ui/components/u-keyboard/u-keyboard.vue
uview-ui/components/u-lazy-load/u-lazy-load.vue
uview-ui/components/u-line-progress/u-line-progress.vue
uview-ui/components/u-line/u-line.vue
uview-ui/components/u-link/u-link.vue
uview-ui/components/u-loading-page/u-loading-page.vue
uview-ui/components/u-loading/u-loading.vue
uview-ui/components/u-loadmore/u-loadmore.vue
uview-ui/components/u-mask/u-mask.vue
uview-ui/components/u-message-input/u-message-input.vue
uview-ui/components/u-modal/u-modal.vue
uview-ui/components/u-navbar/u-navbar.vue
uview-ui/components/u-no-network/u-no-network.vue
uview-ui/components/u-notice-bar/u-notice-bar.vue
uview-ui/components/u-number-box/u-number-box.vue
uview-ui/components/u-number-keyboard/u-number-keyboard.vue
uview-ui/components/u-parse/libs/CssHandler.js
uview-ui/components/u-parse/libs/MpHtmlParser.js
uview-ui/components/u-parse/libs/config.js
uview-ui/components/u-parse/libs/handler.wxs
uview-ui/components/u-parse/libs/trees.vue
uview-ui/components/u-parse/u-parse.vue
uview-ui/components/u-picker/u-picker.vue
uview-ui/components/u-popup/u-popup.vue
uview-ui/components/u-radio-group/u-radio-group.vue
uview-ui/components/u-radio/u-radio.vue
uview-ui/components/u-rate/u-rate.vue
uview-ui/components/u-read-more/u-read-more.vue
uview-ui/components/u-row-notice/u-row-notice.vue
uview-ui/components/u-row/u-row.vue
uview-ui/components/u-search/u-search.vue
uview-ui/components/u-section/u-section.vue
uview-ui/components/u-select/u-select.vue
uview-ui/components/u-skeleton/u-skeleton.vue
uview-ui/components/u-slider/u-slider.vue
uview-ui/components/u-steps/u-steps.vue
uview-ui/components/u-sticky/u-sticky.vue
uview-ui/components/u-subsection/u-subsection.vue
uview-ui/components/u-swipe-action/u-swipe-action.vue
uview-ui/components/u-swiper/u-swiper.vue
uview-ui/components/u-switch/u-switch.vue
uview-ui/components/u-tabbar/u-tabbar.vue
uview-ui/components/u-table/u-table.vue
uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue
uview-ui/components/u-tabs/u-tabs.vue
uview-ui/components/u-tag/u-tag.vue
uview-ui/components/u-td/u-td.vue
uview-ui/components/u-th/u-th.vue
uview-ui/components/u-time-line-item/u-time-line-item.vue
uview-ui/components/u-time-line/u-time-line.vue
uview-ui/components/u-toast/u-toast.vue
uview-ui/components/u-top-tips/u-top-tips.vue
uview-ui/components/u-tr/u-tr.vue
uview-ui/components/u-upload/u-upload.vue
uview-ui/components/u-verification-code/u-verification-code.vue
uview-ui/components/u-waterfall/u-waterfall.vue
uview-ui/iconfont.css
uview-ui/index.js
uview-ui/index.scss
uview-ui/libs/config/config.js
uview-ui/libs/config/zIndex.js
uview-ui/libs/css/color.scss
uview-ui/libs/css/common.scss
uview-ui/libs/css/style.components.scss
uview-ui/libs/css/style.h5.scss
uview-ui/libs/css/style.mp.scss
uview-ui/libs/css/style.nvue.scss
uview-ui/libs/css/style.vue.scss
uview-ui/libs/function/$parent.js
uview-ui/libs/function/addUnit.js
uview-ui/libs/function/bem.js
uview-ui/libs/function/color.js
uview-ui/libs/function/colorGradient.js
uview-ui/libs/function/debounce.js
uview-ui/libs/function/deepClone.js
uview-ui/libs/function/deepMerge.js
uview-ui/libs/function/getParent.js
uview-ui/libs/function/guid.js
uview-ui/libs/function/md5.js
uview-ui/libs/function/queryParams.js
uview-ui/libs/function/random.js
uview-ui/libs/function/randomArray.js
uview-ui/libs/function/route.js
uview-ui/libs/function/sys.js
uview-ui/libs/function/test.js
uview-ui/libs/function/throttle.js
uview-ui/libs/function/timeFormat.js
uview-ui/libs/function/timeFrom.js
uview-ui/libs/function/toast.js
uview-ui/libs/function/trim.js
uview-ui/libs/function/type2icon.js
uview-ui/libs/mixin/mixin.js
uview-ui/libs/mixin/mpShare.js
uview-ui/libs/request/index.js
uview-ui/libs/store/index.js
uview-ui/libs/util/area.js
uview-ui/libs/util/async-validator.js
uview-ui/libs/util/city.js
uview-ui/libs/util/emitter.js
uview-ui/libs/util/province.js
uview-ui/package.json
uview-ui/theme.scss
yarn.lock |