Logo of Sweep
I need you to analyze the code and write a document that explains the business l...Nabil-Nader/wsm-demo#1

> >

  Started 1 months ago (probably frozen) using GPT-4  •   Book a call  •   Report a bug


Progress

  Createdocs/BusinessLogicAnalysis.md
  • Create a new markdown file named BusinessLogicAnalysis.md within a docs directory at the root of the repository. This file will contain the analysis of the application's business logic and a list of features.
  • Begin the document by introducing the purpose of the analysis, which is to provide a clear understanding of the application's functionality and features.
  • Analyze the ScanAPP.vue component to outline its role within the application, focusing on how it interacts with other components, its main responsibilities, and any unique business logic it implements. Include pseudocode or flow diagrams if necessary to illustrate complex logic.
  • Review the i18n files, particularly app/src/i18n/en-US/index.js and templates/src/i18n/en-US/index.js, to extract and list the features they reveal. This includes any user-facing functionality described within these files.
  • Summarize the application's features based on the analysis, categorizing them into logical groups such as "Scanning Features", "User Interface Localization", etc.
  • Conclude the document with any recommendations for improving the understanding of the application's business logic, such as adding comments to the code or refactoring for clarity.
  Run GitHub Actions fordocs/BusinessLogicAnalysis.md 

Plan

This is based on the results of the Planning step. The plan may expand from failed GitHub Actions runs.

  Createdocs/BusinessLogicAnalysis.md
  Run GitHub Actions fordocs/BusinessLogicAnalysis.md 

Code Snippets Found

This is based on the results of the Searching step.

app/src/pages/ScanAPP.vue:51-609 
51<script>
52import {ref, computed, watch, defineComponent, onMounted, onBeforeUnmount} from 'vue'
53import { useStore } from "vuex";
54import { useRouter, useRoute } from 'vue-router'
55import { useQuasar } from "quasar";
56import axios from 'axios'
57import { useI18n } from "vue-i18n"
58
59var sendCommandResults = 'false'
60
61var scanner = {
62  initialize: function () {
63    this.bindEvents()
64  },
65  bindEvents: function () {
66    document.addEventListener('deviceready', this.onDeviceReady, false)
67  },
68  onDeviceReady: function () {
69    scanner.receivedEvent('deviceready')
70    console.log(0, window.Media)
71    registerBroadcastReceiver()
72    determineVersion()
73  },
74  onPause: function () {
75    console.log('Paused')
76    unregisterBroadcastReceiver()
77  },
78  onResume: function () {
79    console.log('Resumed')
80    registerBroadcastReceiver()
81  },
82  receivedEvent: function (id) {
83    console.log('Received Event: ' + id)
84  }
85}
86
87function startSoftTrigger () {
88  sendCommand('com.symbol.datawedge.api.SOFT_SCAN_TRIGGER', 'START_SCANNING')
89}
90
91function stopSoftTrigger () {
92  sendCommand('com.symbol.datawedge.api.SOFT_SCAN_TRIGGER', 'STOP_SCANNING')
93}
94
95function determineVersion () {
96  sendCommand('com.symbol.datawedge.api.GET_VERSION_INFO', '')
97}
98
99function setDecoders () {
100  //  Set the new configuration
101  var profileConfig = {
102    PROFILE_NAME: 'wms',
103    PROFILE_ENABLED: 'true',
104    CONFIG_MODE: 'UPDATE',
105    PLUGIN_CONFIG: {
106      PLUGIN_NAME: 'BARCODE',
107      PARAM_LIST: {
108        // "current-device-id": this.selectedScannerId,
109        scanner_selection: 'auto'
110      }
111    }
112  }
113  sendCommand('com.symbol.datawedge.api.SET_CONFIG', profileConfig)
114}
115
116function sendCommand (extraName, extraValue) {
117  console.log('Sending Command: ' + extraName + ', ' + JSON.stringify(extraValue))
118  var broadcastExtras = {}
119  broadcastExtras[extraName] = extraValue
120  broadcastExtras.SEND_RESULT = sendCommandResults
121  window.plugins.intentShim.sendBroadcast({
122    action: 'com.symbol.datawedge.api.ACTION',
123    extras: broadcastExtras
124  },
125  function () { },
126  function () { }
127  )
128}
129
130function registerBroadcastReceiver () {
131  window.plugins.intentShim.registerBroadcastReceiver({
132    filterActions: [
133      'com.zebra.cordovademo.ACTION',
134      'com.symbol.datawedge.api.RESULT_ACTION'
135    ],
136    filterCategories: [
137      'android.intent.category.DEFAULT'
138    ]
139  },
140  function (intent) {
141    //  Broadcast received
142    console.log('Received Intent: ' + JSON.stringify(intent.extras))
143    if (intent.extras.hasOwnProperty('RESULT_INFO')) {
144      var commandResult = intent.extras.RESULT + ' (' +
145                    intent.extras.COMMAND.substring(intent.extras.COMMAND.lastIndexOf('.') + 1, intent.extras.COMMAND.length) + ')'// + JSON.stringify(intent.extras.RESULT_INFO);
146      commandReceived(commandResult.toLowerCase())
147    }
148
149    if (intent.extras.hasOwnProperty('com.symbol.datawedge.api.RESULT_GET_VERSION_INFO')) {
150      //  The version has been returned (DW 6.3 or higher).  Includes the DW version along with other subsystem versions e.g MX
151      var versionInfo = intent.extras['com.symbol.datawedge.api.RESULT_GET_VERSION_INFO']
152      console.log('Version Info: ' + JSON.stringify(versionInfo))
153      var datawedgeVersion = versionInfo.DATAWEDGE
154      datawedgeVersion = datawedgeVersion.padStart(5, '0')
155      console.log('Datawedge version: ' + datawedgeVersion)
156
157      //  Fire events sequentially so the application can gracefully degrade the functionality available on earlier DW versions
158      if (datawedgeVersion >= '006.3') { datawedge63() }
159      if (datawedgeVersion >= '006.4') { datawedge64() }
160      if (datawedgeVersion >= '006.5') { datawedge65() }
161    } else if (intent.extras.hasOwnProperty('com.symbol.datawedge.api.RESULT_ENUMERATE_SCANNERS')) {
162      //  Return from our request to enumerate the available scanners
163      var enumeratedScannersObj = intent.extras['com.symbol.datawedge.api.RESULT_ENUMERATE_SCANNERS']
164      enumerateScanners(enumeratedScannersObj)
165    } else if (intent.extras.hasOwnProperty('com.symbol.datawedge.api.RESULT_GET_ACTIVE_PROFILE')) {
166      //  Return from our request to obtain the active profile
167      var activeProfileObj = intent.extras['com.symbol.datawedge.api.RESULT_GET_ACTIVE_PROFILE']
168      activeProfile(activeProfileObj)
169    } else if (!intent.extras.hasOwnProperty('RESULT_INFO')) {
170      //  A barcode has been scanned
171      barcodeScanned(intent, new Date().toLocaleString())
172    }
173  }
174  )
175}
176
177function unregisterBroadcastReceiver () {
178  window.plugins.intentShim.unregisterBroadcastReceiver()
179}
180
181function datawedge63 () {
182  console.log('Datawedge 6.3 APIs are available')
183  sendCommand('com.symbol.datawedge.api.CREATE_PROFILE', 'ZebraCordovaDemo')
184  sendCommand('com.symbol.datawedge.api.GET_ACTIVE_PROFILE', '')
185  sendCommand('com.symbol.datawedge.api.ENUMERATE_SCANNERS', '')
186}
187
188function datawedge64 () {
189  console.log('Datawedge 6.4 APIs are available')
190  var profileConfig = {
191    PROFILE_NAME: 'wms',
192    PROFILE_ENABLED: 'true',
193    CONFIG_MODE: 'UPDATE',
194    PLUGIN_CONFIG: {
195      PLUGIN_NAME: 'BARCODE',
196      RESET_CONFIG: 'true',
197      PARAM_LIST: {}
198    },
199    APP_LIST: [{
200      PACKAGE_NAME: 'org.greaterwms.scanner.app',
201      ACTIVITY_LIST: ['*']
202    }]
203  }
204  sendCommand('com.symbol.datawedge.api.SET_CONFIG', profileConfig)
205  var profileConfig2 = {
206    PROFILE_NAME: 'wms',
207    PROFILE_ENABLED: 'true',
208    CONFIG_MODE: 'UPDATE',
209    PLUGIN_CONFIG: {
210      PLUGIN_NAME: 'INTENT',
211      RESET_CONFIG: 'true',
212      PARAM_LIST: {
213        intent_output_enabled: 'true',
214        intent_action: 'com.zebra.cordovademo.ACTION',
215        intent_delivery: '2'
216      }
217    }
218  }
219  sendCommand('com.symbol.datawedge.api.SET_CONFIG', profileConfig2)
220  //  Give some time for the profile to settle then query its value
221  setTimeout(function () {
222    sendCommand('com.symbol.datawedge.api.GET_ACTIVE_PROFILE', '')
223  }, 1000)
224}
225
226function datawedge65 () {
227  console.log('Datawedge 6.5 APIs are available')
228  sendCommandResults = 'true'
229}
230
231function commandReceived (commandText) {
232  console.log('commandReceived:', commandText)
233}
234
235function enumerateScanners (enumeratedScanners) {
236  var humanReadableScannerList = ''
237  for (var i = 0; i < enumeratedScanners.length; i++) {
238    console.log('Scanner found: name= ' + enumeratedScanners[i].SCANNER_NAME + ', id=' + enumeratedScanners[i].SCANNER_INDEX + ', connected=' + enumeratedScanners[i].SCANNER_CONNECTION_STATE)
239    humanReadableScannerList += enumeratedScanners[i].SCANNER_NAME
240    if (i < enumeratedScanners.length - 1) { humanReadableScannerList += ', ' }
241  }
242  console.log('enumerateScanners:', humanReadableScannerList)
243}
244
245function activeProfile (theActiveProfile) {
246  console.log('activeProfile:', theActiveProfile)
247}
248
249function barcodeScanned (scanData, timeOfScan) {
250  var scannedData = scanData.extras['com.symbol.datawedge.data_string']
251  console.log('scaned Data:' + scannedData)
252  document.getElementById('scannedBarcodes').value = ''
253  document.getElementById('scannedBarcodes').value = scannedData
254  document.getElementById('scannedBarcodes').dispatchEvent(new Event('input'))
255}
256
257function seuicDevice () {
258  document.addEventListener('deviceready', seuicOndeviceReady, false)
259}
260
261function seuicOndeviceReady () {
262  window.addEventListener('getcodedata', getData, false)
263}
264
265function getData (data) {
266  document.getElementById('scannedBarcodes').value = ''
267  document.getElementById('scannedBarcodes').value = data.data
268  document.getElementById('scannedBarcodes').dispatchEvent(new Event('input'))
269}
270
271function iDataDevice () {
272  document.addEventListener('deviceready', iDataOndeviceReady, false)
273}
274
275function iDataOndeviceReady () {
276  window.addEventListener('idatadata', getiData, false)
277}
278
279function getiData (data) {
280  document.getElementById('scannedBarcodes').value = ''
281  document.getElementById('scannedBarcodes').value = data.data
282  document.getElementById('scannedBarcodes').dispatchEvent(new Event('input'))
283}
284
285function playSuccAudio () {
286  navigator.notification.beep(1)
287}
288
289export default defineComponent({
290  name: 'ScanAPP',
291  data () {
292    return {
293      wholewidth: (this.screenwidth - 20) + '' + 'px',
294      wholeheight: (this.screenheight - 165) + '' + 'px',
295      handlewidth: (this.screenwidth - 22) + '' + 'px',
296      handleheight: (this.screenheight - 225) + '' + 'px'
297    }
298  },
299  setup () {
300    const $store = useStore()
301    const $router = useRouter()
302    const $route = useRoute()
303    const $q = useQuasar()
304    const bar_check = ref('')
305    const { t } = useI18n()
306    const fab1 = computed({
307      get: () => $store.state.fabchange.fab1,
308    })
309    const fab2 = computed({
310      get: () => $store.state.fabchange.fab2,
311    })
312    const fab3 = computed({
313      get: () => $store.state.fabchange.fab3,
314    })
315    const fab4 = computed({
316      get: () => $store.state.fabchange.fab4,
317    })
318    const oldlink = computed({
319      get: () => $store.state.linkchange.oldlink,
320      set: val => {
321        $store.commit('linkchange/OldLinkChanged', val)
322      }
323    })
324    const newlink = computed({
325      get: () => $store.state.linkchange.newlink,
326      set: val => {
327        $store.commit('linkchange/NewLinkChanged', val)
328      }
329    })
330    const screenwidth = computed({
331      get: () => $store.state.screenchange.screenwidth,
332      set: val => {
333        $store.commit('screenchange/screenwidthChanged', val)
334      }
335    })
336    const screenheight = computed({
337      get: () => $store.state.screenchange.screenheight,
338      set: val => {
339        $store.commit('screenchange/screenheightChanged', val)
340      }
341    })
342    const screenscroll = computed({
343      get: () => $store.state.screenchange.screenscroll,
344      set: val => {
345        $store.commit('screenchange/screenScrollChanged', val)
346      }
347    })
348    const authin = computed({
349      get: () => $store.state.loginauth.authin,
350    })
351    const login_name = computed({
352      get: () => $store.state.loginauth.login_name,
353    })
354    const operator = computed({
355      get: () => $store.state.loginauth.operator,
356    })
357    const openid = computed({
358      get: () => $store.state.settings.openid,
359    })
360    const lang = computed({
361      get: () => $store.state.langchange.lang,
362    })
363    const baseurl = computed({
364      get: () => $store.state.settings.server,
365    })
366    const scandata = computed({
367      get: () => $store.state.scanchanged.scandata,
368      set: val => {
369        $store.commit('scanchanged/ScanChanged', val)
370      }
371    })
372    const datadetail = computed({
373      get: () => $store.state.scanchanged.datadetail,
374      set: val => {
375        $store.commit('scanchanged/ScanDataChanged', val)
376      }
377    })
378    const asndata = computed({
379      get: () => $store.state.scanchanged.asndata,
380      set: val => {
381        $store.commit('scanchanged/ASNDataChanged', val)
382      }
383    })
384    const dndata = computed({
385      get: () => $store.state.scanchanged.dndata,
386      set: val => {
387        $store.commit('scanchanged/DNDataChanged', val)
388      }
389    })
390    const bindata = computed({
391      get: () => $store.state.scanchanged.bindata,
392      set: val => {
393        $store.commit('scanchanged/BinDataChanged', val)
394      }
395    })
396    const tablelist = computed({
397      get: () => $store.state.scanchanged.tablelist,
398      set: val => {
399        $store.commit('scanchanged/TableDataChanged', val)
400      }
401    })
402    const scanmode = computed({
403      get: () => $store.state.scanchanged.scanmode,
404      set: val => {
405        $store.commit('scanchanged/ScanModeChanged', val)
406      }
407    })
408    const bar_scanned = computed({
409      get: () => $store.state.scanchanged.bar_scanned,
410      set: val => {
411        $store.commit('scanchanged/BarScannedChanged', val)
412      }
413    })
414    const apiurl = computed({
415      get: () => $store.state.scanchanged.apiurl,
416      set: val => {
417        $store.commit('scanchanged/ApiUrlChanged', val)
418      }
419    })
420    const apiurlnext = computed({
421      get: () => $store.state.scanchanged.apiurlnext,
422      set: val => {
423        $store.commit('scanchanged/ApiUrlNextChanged', val)
424      }
425    })
426    const apiurlprevious = computed({
427      get: () => $store.state.scanchanged.apiurlprevious,
428      set: val => {
429        $store.commit('scanchanged/ApiUrlPreviousChanged', val)
430      }
431    })
432    const device_auth = computed({
433      get: () => $store.state.appversion.device_auth,
434      set: val => {
435        $store.commit('appversion/DeviceAuthChanged', val)
436      }
437    })
438
439    function onScroll (position) {
440      screenscroll.value = position.verticalPercentage
441    }
442
443    function getMobileData (e) {
444      axios.get(baseurl.value + '/scanner/list/' + e + '/',
445        {
446          headers: {
447            "Content-Type": 'application/json, charset="utf-8"',
448            "token" : openid.value,
449            "language" : lang.value,
450            "operator" : operator.value
451          }
452        }).then(res => {
453          if (!res.data.detail) {
454            scandata.value = ''
455            datadetail.value = ''
456            scanmode.value = ''
457            asndata.value = ''
458            dndata.value = ''
459            bindata.value = ''
460            scandata.value = res.data.code
461            scanmode.value = res.data.mode
462            bar_scanned.value = res.data.request_time
463            if (scanmode.value === 'ASN') {
464              asndata.value = res.data.code
465            } else if (scanmode.value === 'DN') {
466              dndata.value = res.data.code
467            } else if (scanmode.value === 'GOODS') {
468              scandata.value = res.data.code
469            } else if (scanmode.value === 'BINSET') {
470              bindata.value = res.data.code
471            }
472          } else {
473            $q.notify({
474              type: 'negative',
475              message: t('notice.mobile_scan.notice2')
476            })
477          }
478        }).catch(err => {
479          $q.notify({
480            type: 'negative',
481            message: t('notice.mobile_scan.notice3')
482          })
483        })
484    }
485
486    function MobileScan () {
487      cordova.plugins.barcodeScanner.scan(
488        function (result) {
489          bar_check.value = result.text
490          navigator.vibrate(100)
491        },
492        function (error) {
493          navigator.vibrate(100)
494        },
495        {
496          preferFrontCamera : false,
497          showFlipCameraButton : true,
498          showTorchButton : true,
499          disableSuccessBeep: false
500        }
501      );
502    }
503
504    function screanresize () {
505      let screensizewidth = $q.screen.width
506      let screensizeheight = $q.screen.height
507      screenwidth.value = screensizewidth
508      screenheight.value = screensizeheight
509    }
510
511    watch (bar_check,(newValue,oldValue)=>{
512      if (newValue !== oldValue) {
513        if (authin.value === '0') {
514          $q.notify({
515            type: 'negative',
516            message: t('notice.mobile_userlogin.notice9')
517          })
518        } else {
519          getMobileData(newValue)
520        }
521      }
522    })
523
524    onMounted(() => {
525      screanresize()
526      if (window.device) {
527        if (window.device.manufacturer === "Zebra Technologies") {
528            scanner.initialize()
529        } else if (window.device.manufacturer === "SEUIC") {
530          seuicDevice()
531        } else if (window.device.manufacturer === "iData") {
532          iDataDevice()
533        }
534      }
535    })
536
537    onBeforeUnmount(() => {
538      if (window.device) {
539        if  (window.device.manufacturer === "Zebra Technologies") {
540          window.removeEventListener('deviceready', scanner.onDeviceReady, false)
541        } else if (window.device.manufacturer === "SEUIC") {
542          window.removeEventListener('deviceready', seuicOndeviceReady, false)
543        } else if (window.device.manufacturer === "iData") {
544          window.removeEventListener('deviceready', iDataOndeviceReady, false)
545        }
546      }
547    })
548
549    return {
550      t,
551      fab1,
552      fab2,
553      fab3,
554      fab4,
555      oldlink,
556      newlink,
557      screenwidth,
558      screenheight,
559      screenscroll,
560      onScroll,
561      authin,
562      login_name,
563      openid,
564      operator,
565      lang,
566      baseurl,
567      apiurl,
568      apiurlnext,
569      apiurlprevious,
570      scandata,
571      datadetail,
572      tablelist,
573      asndata,
574      dndata,
575      bindata,
576      scanmode,
577      bar_scanned,
578      bar_check,
579      device_auth,
580      thumbStyle: {
581        right: '4px',
582        borderRadius: '5px',
583        backgroundColor: '#027be3',
584        width: '5px',
585        opacity: 0.75
586      },
587      barStyle: {
588        right: '2px',
589        borderRadius: '9px',
590        backgroundColor: '#027be3',
591        width: '9px',
592        opacity: 0.2
593      },
594      StartScan () {
595        if (window.device) {
596          MobileScan()
597        } else {
598          $q.notify({
599            type: 'negative',
600            message: t('notice.mobile_scan.notice4')
601          })
602        }
603      },
604      BackButton () {
605        $router.push({ name: oldlink.value })
606      }
607    }
608  }
609})
app/src/i18n/en-US/index.js:0-358 
1// This is just an example,
2// so you can safely delete all default props below
3
4export default {
5  failed: 'Action failed',
6  success: 'Action was successful',
7  index: {
8    only_id: 'Software Code',
9    only_title: 'Need to verify the software code',
10    only_message: '<p><span class="text-red">Go to: https://po.56yhz.com</span></p> <p><em>Verify what you found in the software settings The software code</em></p>',
11    app_title: 'APP Title',
12    slogan: 'Slogan',
13    server: 'Request Baseurl',
14    index_title: 'Open Source Inventory System',
15    webtitle: 'GreaterWMS--Open Source Warehouse Management System',
16    home: 'Home',
17    title: 'GreaterWMS',
18    title_tip: 'GreaterWMS Home',
19    hide_menu: 'Hide Menu',
20    api: 'API DOCS',
21    translate: 'Choose Language',
22    unread: 'Unread Message',
23    login: 'Login',
24    register: 'Register',
25    login_tip: 'Enter Your OPENID & Login Name',
26    register_tip: 'Register An Admin',
27    logout: 'Logout',
28    user_login: 'User Login',
29    admin_login: 'Admin Login',
30    return_to_login: 'Return To Login Page',
31    user_center: 'User Center',
32    change_user: 'Change User',
33    view_my_openid: 'View My OPENID',
34    your_openid: 'Your OPENID',
35    contact_list: 'Recent Contact',
36    chat_more: 'Load More',
37    chat_no_more: 'No More Message',
38    chat_send: 'Send',
39    previous: 'Previous',
40    next: 'Next',
41    admin_name: 'Admin',
42    password: 'Password',
43    confirm_password: 'Confirm Password',
44    staff_name: 'User Name',
45    cancel: 'Cancel',
46    close: 'Close',
47    submit: 'Submit',
48    download: 'Download',
49    updatetitle: 'Update Ready',
50    updatedesc: 'Version Can Update Now',
51    update: 'Update Now',
52    chart: ' Chart',
53    current_user: 'Current User'
54  },
55  Settings: {
56    index: 'Settings',
57    server: 'Server',
58    equipment: 'Equipment Support',
59    only_id: 'Device Label',
60  },
61  menuItem: {
62    dashboard: 'Dashboard',
63    inbound: 'Inbound',
64    outbound: 'Outbound',
65    stock: 'Inventory',
66    finance: 'Finance',
67    goods: 'GoodsList',
68    baseinfo: 'Base Info',
69    warehouse: 'Warehouse',
70    staff: 'Staff',
71    driver: 'Driver',
72    customerdn: 'Customer DN',
73    supplierasn: 'Supplieer ASN',
74    uploadcenter: 'Upload Center',
75    downloadcenter: 'Download Center'
76  },
77  contact: 'Contact',
78  sendmessage: 'Send A Message',
79  send: 'Send',
80  nomoremessage: 'No More Message',
81  loadmore: 'Load More',
82  new: 'new',
83  newtip: 'New A Data',
84  refresh: 'Refresh',
85  refreshtip: 'Refresh All Data',
86  edit: 'Edit This Data',
87  confirmedit: 'Confirm Edit Data',
88  canceledit: 'Cancel Edit Data',
89  delete: 'Delete This Data',
90  deletetip: 'This is an irreversible process.',
91  confirmdelete: 'Confirm Delete Data',
92  canceldelete: 'Cancel Delete Data',
93  download: 'Download',
94  downloadtip: 'Download All Data',
95  frombin: 'From Bin',
96  movetobin: 'Move to Bin',
97  putaway: 'PutAway',
98  cyclecount: 'Cycle Count',
99  cyclecountrecorder: 'Count Recorder',
100  search: 'Search Word',
101  creater: 'Creater',
102  createtime: 'Cteate Time',
103  updatetime: 'Update Time',
104  action: 'Action',
105  previous: 'Previous',
106  next: 'Next',
107  no_data: 'No More Data',
108  submit: 'Submit',
109  cancel: 'Cancel',
110  estimate: 'Estimate Freight',
111  downloadasnlist: 'Download List',
112  downloadasndetail: 'Download Detail',
113  downloadasnlisttip: 'Download All ASN List',
114  downloadasndetailtip: 'Download All ASN Detail',
115  printthisasn: 'Print this ASN',
116  confirmdelivery: 'Confirm Delivery',
117  finishloading: 'Finish Loading',
118  confirmsorted: 'Confirm Sorted',
119  downloaddnlist: 'Download List',
120  downloaddndetail: 'Download Detail',
121  downloaddnlisttip: 'Download All DN List',
122  downloaddndetailtip: 'Download All DN Detail',
123  release: 'Order Release',
124  releaseallorder: 'Release All Order',
125  releaseorder: 'Release Order',
126  print: 'Print Picking List',
127  printthisdn: 'Print this DN',
128  confirmorder: 'Confirm Order',
129  confirmpicked: 'Confirm Picked',
130  dispatch: 'Dispatch & Shipping',
131  deletebackorder: 'Delete Back Order',
132  confirminventoryresults: 'Confirm Inventory Results',
133  baseinfo: {
134    company_info: 'Company Info',
135    supplier: 'Supplier',
136    customer: 'Customer',
137    view_company: {
138      company_name: 'Company Name',
139      company_city: 'Company City',
140      company_address: 'Company Address',
141      company_contact: 'Company Contact',
142      company_manager: 'Company Manager',
143      error1: 'Please Enter The Company Name',
144      error2: 'Please Enter The Company City',
145      error3: 'Please Enter The Company Address',
146      error4: 'Please Enter The Company Contact',
147      error5: 'Please Enter The Company Manager'
148    },
149    view_supplier: {
150      supplier_name: 'Supplier Name',
151      supplier_city: 'Supplier City',
152      supplier_address: 'Supplier Address',
153      supplier_contact: 'Supplier Contact',
154      supplier_manager: 'Supplier Manager',
155      supplier_level: 'Supplier Level',
156      error1: 'Please Enter the Supplier Name',
157      error2: 'Please Enter the Supplier City',
158      error3: 'Please Enter the Supplier Address',
159      error4: 'Please Enter the Supplier Contact',
160      error5: 'Please Enter the Supplier Manager',
161      error6: 'Please Enter the Supplier Level'
162    },
163    view_customer: {
164      customer_name: 'Customer Name',
165      customer_city: 'Customer City',
166      customer_address: 'Customer Address',
167      customer_contact: 'Customer Contact',
168      customer_manager: 'Customer Manager',
169      customer_level: 'Customer Level',
170      error1: 'Please Enter the Customer Name',
171      error2: 'Please Enter the Customer City',
172      error3: 'Please Enter the Customer Address',
173      error4: 'Please Enter the Customer Contact',
174      error5: 'Please Enter the Customer Manager',
175      error6: 'Please Enter the Customer Level'
176    }
177  },
178  dashboards: {
179    outbound_statements: 'Outbound',
180    inbound_statements: 'Inbound',
181    inbound_and_outbound_statements: 'Inbound And Outbound',
182    total_sales: 'Total Sales',
183    sales_volume_ranking: 'Sales Volume Ranking',
184    sales_volumes_ranking: 'Sales Volumes Ranking',
185    total_receipts: 'Total Receipts',
186    receiving_quantity_ranking: 'Receiving Quantity Ranking',
187    Receiving_amount_ranking: 'Receiving Amount Ranking',
188    view_tradelist: {
189      mode_code: 'Mode Of Doing Business',
190      bin_name: 'Location Name',
191      goods_code: 'Goods Code',
192      goods_qty: 'Quantity On Hand',
193      creater: 'Creater',
194      update_time: 'Update Time',
195      create_time: 'Create Time',
196      inbound: 'Inbound',
197      outbound: 'Outbound'
198    }
199  },
200  finance: {
201    capital: 'Capital',
202    freight: 'Freight',
203    view_capital: {
204      capital_name: 'Cpaital Name',
205      capital_qty: 'Capital Qty',
206      capital_cost: 'Capital Cost',
207      error1: 'Please Enter the Capital Name',
208      error2: 'Capital Qty width must greater than 0',
209      error3: 'Capital Cost depth must greater than 0'
210    },
211    view_freight: {
212      transportation_supplier: 'Transportation Supplier',
213      send_city: 'Send City',
214      receiver_city: 'Receiver City',
215      weight_fee: 'Weight Fee',
216      volume_fee: 'Volume Fee',
217      min_payment: 'Min Payment',
218      error1: 'Please Enter the Transportation Supplier',
219      error2: 'Please Enter the Send City',
220      error3: 'Please Enter the Receiver City',
221      error4: 'Weight Fee must greater than 0',
222      error5: 'Volume Fee must greater than 0',
223      error6: 'Min Payment must greater than 0'
224    }
225  },
226  driver: {
227    driver: 'Driver',
228    dispatchlist: 'Dispatch List',
229    error1: 'Please Enter the Driver Name',
230    error2: 'Please Enter the License Plate',
231    error3: 'Please Enter The Contact',
232    view_driver: {
233      driver_name: 'Driver Name',
234      license_plate: 'License Plate',
235      contact: 'Contact'
236    },
237    view_dispatch: {
238      driver_name: 'Driver Name',
239      dn_code: 'DN Code',
240      contact: 'Contact'
241    }
242  },
243  upload_center: {
244    initializeupload: 'Initialize upload',
245    uploadfiles: 'Upload',
246    upload: 'Upload',
247    uploadcustomerfile: 'Upload Customerfile',
248    uploadgoodslistfile: 'Upload GoodslistFile',
249    uploadsupplierfile: 'Upload SupplierFile',
250    downloadgoodstemplate: 'Goods Example',
251    downloadcustomertemplate: 'Customer Example',
252    downloadsuppliertemplate: 'Supplier Example',
253    addupload: 'Add Upload'
254  },
255  download_center: {
256    createTime: 'Create Time',
257    reset: 'Reset',
258    start: 'Start',
259    end: 'End'
260  },
261  community_mall: {
262    communitymall: 'Community Mall'
263  },
264  goods: {
265    goods_list: 'Goods List',
266    unit: 'Unit',
267    class: 'Class',
268    color: 'Color',
269    brand: 'Brand',
270    shape: 'Shape',
271    specs: 'Specs',
272    origin: 'Origin',
273    view_goodslist: {
274      goods_code: 'Goods Code',
275      goods_desc: 'Goods Desc',
276      goods_name: 'Goods Name',
277      goods_supplier: 'Goods Supplier',
278      goods_weight: 'Goods Weight(Unit:g)',
279      goods_w: 'Goods Width(Unit:mm)',
280      goods_d: 'Goods Depth(Unit:mm)',
281      goods_h: 'Goods Height(Unit:mm)',
282      unit_volume: 'Unit Volume',
283      goods_unit: 'Goods Unit',
284      goods_class: 'Goods Class',
285      goods_brand: 'Goods Brand',
286      goods_color: 'Goods Color',
287      goods_shape: 'Goods Shape',
288      goods_specs: 'Goods Specs',
289      goods_origin: 'Goods Origin',
290      goods_cost: 'Goods Cost',
291      goods_price: 'Goods Price',
292      print_goods_label: 'Print Goods Label',
293      error1: 'Please Enter the Goods Code',
294      error2: 'Please Enter the Goods Description',
295      error3: 'Please Enter the Supplier',
296      error4: 'Goods Weight Must Greater Than 0',
297      error5: 'Goods Width Must Greater Than 0',
298      error6: 'Goods Depth Must Greater Than 0',
299      error7: 'Goods Height Must Greater Than 0',
300      error8: 'Please Enter the Goods Cost',
301      error9: 'Please Enter the Goods Price'
302    },
303    view_unit: {
304      goods_unit: 'Goods Unit',
305      error1: 'Please Enter Goods Unit'
306    },
307    view_class: {
308      goods_class: 'Goods Class',
309      error1: 'Please Enter Goods Class'
310    },
311    view_color: {
312      goods_color: 'Goods Color',
313      error1: 'Please Enter Goods Color'
314    },
315    view_brand: {
316      goods_brand: 'Goods Brand',
317      error1: 'Please Enter Goods Brand'
318    },
319    view_shape: {
320      goods_shape: 'Goods Shape',
321      error1: 'Please Enter Goods Shape'
322    },
323    view_specs: {
324      goods_specs: 'Goods Specs',
325      error1: 'Please Enter Goods Specs'
326    },
327    view_origin: {
328      goods_origin: 'Goods Origin',
329      error1: 'Please Enter Goods Origin'
330    }
331  },
332  inbound: {
333    asn: 'ASN',
334    predeliverystock: 'Pre Delivery',
335    preloadstock: 'Pre Load',
336    presortstock: 'Sorting',
337    sortstock: 'Sorted',
338    shortage: 'Shortage',
339    more: 'More QTY',
340    asnfinish: 'Receiving List',
341    asndone: 'Finish Receiving',
342    view_sortstock: {
343      error1: 'Please Enter The Quantity Must Be Greater Than 0'
344    },
345    view_asn: {
346      asn_code: 'ASN Code',
347      asn_status: 'ASN Status',
348      goods_qty: 'ASN QTY',
349      goods_actual_qty: 'Actual Arrive Qty',
350      goods_shortage_qty: 'Arrive Shortage Qty',
351      goods_more_qty: 'Arrive More Qty',
352      goods_damage_qty: 'Arrive Damage Qty',
353      presortstock: 'Pre Sort Qty',
354      sorted_qty: 'Sorted Qty',
355      total_weight: 'Total Weight(Unit:KG)',
356      total_volume: 'Total Volume(Unit:Cubic Metres)'
357    }
358  },
app/src/i18n/en-US/index.js:359-656 
359  outbound: {
360    dn: 'DN',
361    freshorder: 'Pre Order',
362    neworder: 'New Order',
363    backorder: 'Back Order',
364    pickstock: 'Pre Pick',
365    pickedstock: 'Picked',
366    pickinglist: 'Picking List',
367    shippedstock: 'Shipping List',
368    received: 'Received',
369    pod: 'Proof Of Delivery',
370    view_dn: {
371      dn_code: 'DN Code',
372      dn_status: 'DN Status',
373      goods_qty: 'Order QTY',
374      intransit_qty: 'Shipping QTY',
375      delivery_actual_qty: 'Delivery Actual QTY',
376      delivery_shortage_qty: 'Delivery Shortage QTY',
377      delivery_more_qty: 'Delivery More QTY',
378      delivery_damage_qty: 'Delivery Damage QTY',
379      total_weight: 'Total Weight(Unit:KG)',
380      total_volume: 'Total Volume(Unit:Cubic Metres)',
381      customer: 'Customer'
382    }
383  },
384  staff: {
385    staff: 'Staff',
386    check_code: 'Check Code',
387    view_staff: {
388      staff_name: 'Staff Name',
389      staff_type: 'Staff Type',
390      error1: 'Please Enter The Staff Name',
391      error2: 'Please Enter The Staff Type',
392      lock: 'lock',
393      unlock: 'unlock'
394    }
395  },
396  stock: {
397    stocklist: 'Stock List',
398    stockbinlist: 'Bin List',
399    emptybin: 'Empty Bin',
400    occupiedbin: 'Occupied Bin',
401    view_stocklist: {
402      goods_code: 'Goods Code',
403      goods_desc: 'Goods Desc',
404      goods_name: 'Goods Name',
405      goods_qty: 'Total Qty',
406      onhand_stock: 'On hand',
407      can_order_stock: 'Can Order',
408      ordered_stock: 'Ordered Stock',
409      inspect_stock: 'Inspect',
410      hold_stock: 'Holding',
411      damage_stock: 'Damage',
412      asn_stock: 'ASN Stock',
413      dn_stock: 'DN Stock',
414      pre_load_stock: 'Pre Load',
415      pre_sort_stock: 'Pre Sort',
416      sorted_stock: 'Sorted Stock',
417      pick_stock: 'Pick Stock',
418      picked_stock: 'Picked Stock',
419      back_order_stock: 'Back Order',
420      on_hand_inventory: 'On-Hand Inventory',
421      history_inventory: 'History Inventory',
422      physical_inventory: 'Physical Inventory',
423      difference: ' Difference',
424      cyclecount: 'Cycle Count',
425      recyclecount: 'Recycle',
426      downloadcyclecount: 'Counting table',
427      cyclecountresult: 'Confirm result',
428      cyclecounttip: 'Generate A Dynamic Cycle Count Table',
429      recyclecounttip: 'Generate A Recycle Count Table',
430      downloadcyclecounttip: 'Download Cycle Count Table',
431      cyclecountresulttip: 'Confirm The Cycle Count Result',
432      daychoice: 'Date Selection',
433      daychoicetip: 'Select The Cycle Count Table Corresponding To The Date',
434      error1: 'Count Quantity Must Be Greater Than 0',
435      dateerror: 'Incorrect Date Selected'
436    }
437  },
438  warehouse: {
439    warehouse: 'Warehouse',
440    binset: 'Bin Set',
441    binsize: 'Bin Size',
442    property: 'Bin Property',
443    printbin: 'Print Bin Label',
444    view_warehouseset: {
445      error1: 'Please Enter the Warehouse Name',
446      error2: 'Please Enter The Warehouse City',
447      error3: 'Please Enter The Warehouse Address',
448      error4: 'Please Enter the Warehouse Contact',
449      error5: 'Please Enter The Warehouse Manager'
450    },
451    view_warehouse: {
452      warehouse_name: 'Warehouse Name',
453      warehouse_city: 'Warehouse City',
454      warehouse_address: 'Warehouse Address',
455      warehouse_contact: 'Warehouse Contact',
456      warehouse_manager: 'Warehouse Manager'
457    },
458    view_binset: {
459      bin_name: 'Bin Name',
460      bin_size: 'Bin Size',
461      bin_property: 'Bin Property',
462      empty_label: 'Empty Label',
463      error1: 'Please Enter the Bin Name',
464      error2: 'Please Enter the Bin Size',
465      error3: 'Please Enter the Bin Property'
466    },
467    view_binsize: {
468      bin_size: 'Bin Size',
469      bin_size_w: 'Bin Size Wide(Unit:mm)',
470      bin_size_d: 'Bin Size Depth(Unit:mm)',
471      bin_size_h: 'Bin Size Height(Unit:mm)',
472      error1: 'Please Enter the Bin_size',
473      error2: 'Bin Size width must greater than 0',
474      error3: 'Bin Size depth must greater than 0',
475      error4: 'Bin Size height must greater than 0'
476    },
477    view_property: {
478      bin_property: 'Bin Property'
479    }
480  },
481  scan: {
482    scan: 'Scan',
483    scan_asn: 'ASN query',
484    scan_dn: 'DN query',
485    scan_sorting: 'Sorting',
486    scan_uptobin: 'Up To Bin',
487    scan_picking: 'Picking',
488    scan_shipping: 'Shipping',
489    scan_movetobin: 'Move To Bin',
490    scan_inventory: 'Inventory',
491    scan_goodsquery: 'Goods query',
492    scan_locationquery: 'Location query',
493    scan_goods_code: 'Goods Code',
494    scan_bin_name: 'Bin Name',
495    scan_goods_label: 'Goods label',
496    scan_goods_label_error: 'The Goods Label Does Not Exist',
497    view_binmove: {
498      old_bin_name: 'Original Bin name',
499      new_bin_name: 'New Bin Name',
500      qty: 'Number of Goods Moved',
501      qty_error: 'The Quantity To Be Moved Cannot Be Greater Than The Existing quantity'
502    },
503    view_upToBin: {
504      goods_actual_qty: 'Actual Arrival Quantity',
505      scan_qty: 'Scanned Qty',
506      scan_qty_error: 'The Scan Quantity Cannot Be Greater Than The Arrival Quantity'
507    },
508    view_picking: {
509      order_qty: 'Order Quantity',
510      picking_qty: 'Pick quantity',
511      picking_qty_error: 'The Picking Quantity Cannot Be Greater Than The Order Quantity'
512    },
513    view_shipping: {
514      shipping_code: 'Shipment Number',
515      driver_info: 'Driver Information',
516      license_plate_number: 'License Plate Number',
517      name: 'Name',
518      contact_info: 'Contact Information'
519    }
520  },
521  handcount: {
522    handcount: 'Single Count',
523    handcountrecorder: 'Single Count Recorder',
524    update_time: 'Count Time'
525  },
526  notice: {
527    valerror: 'Please Enter The Correct Value',
528    unknow_error: 'Unknown Error',
529    network_error: 'Network Exception',
530    cyclecounterror: 'No data',
531    userererror: 'Username already Exists',
532    capitalerror: 'Fixed Asset Name Already Exists',
533    valuenullerror: 'Please Fill In The Complete Data',
534    loginerror: 'Please Login First',
535    detail: 'Detail',
536    goodserror: {
537      goods_listerror: 'The product code already exists',
538      goods_uniterror: 'Goods unit already exists',
539      goods_classerror: 'Goods category already exists',
540      goods_colorerror: 'Goods color already exists',
541      goods_branderror: 'The product brand already exists',
542      goods_shapeerror: 'Goods shape already exists',
543      goods_specserror: 'Goods specification already exists',
544      goods_originerror: 'The origin of goods already exists'
545    },
546    baseinfoerror: {
547      companyerror: 'Company name already exists',
548      customererror: 'Customer name already exists',
549      suppliererror: 'Supplier name already exists'
550    },
551    warehouseerror: {
552      binseterror: 'The bin name already exists',
553      binsizeerror: 'bin size already exists'
554    },
555    mobile_userlogin: {
556      notice1: 'Please enter your administrator name',
557      notice2: 'Please enter your administrator password',
558      notice3: 'Please enter your staff name',
559      notice4: 'Please enter your staff verification code',
560      notice5: 'Please enter your Openid in the settings server',
561      notice6: 'Successful login',
562      notice7: 'User or password mismatch',
563      notice8: 'Employee or inspection code mismatch',
564      notice9: 'Please login first'
565    },
566    mobile_scan: {
567      notice1: 'QR code does not exist',
568      notice2: 'Code does not exist',
569      notice3: 'Server Error',
570      notice4: 'Only mobile can scan'
571    },
572    mobile_asn: {
573      notice1: 'ASN List',
574      notice2: 'You can scan the QR code of the arrival notice, or click the arrival notice to view the details of the arrival notice and operate',
575      notice3: 'Supplier:',
576      notice4: 'Total amount:',
577      notice5: 'Status:',
578      notice6: 'Details of the arrival notice',
579      notice7: 'You need to scan the arrival notice to get the details of the arrival notice. You can scan the cargo code or click on the goods you want to put on the shelves to complete the operation of the goods on the shelves',
580      notice8: 'Details',
581      notice9: 'Total amount:',
582      notice10: 'Number to be listed:',
583      notice11: 'The number of listings must be greater than 0',
584      notice12: 'Successful listing',
585      notice13: 'Please enter the location code'
586    },
587    mobile_dn: {
588      notice1: 'DN List',
589      notice2: 'You can scan the QR code of the DN Order, or click on the DN order to view the details of the DN and perform operations',
590      notice3: 'Customer:',
591      notice4: 'Total amount:',
592      notice5: 'Status:',
593      notice6: 'DN details',
594      notice7: 'The details of the DN are all invoices. Scan the DN Number to view the details of the specific DN',
595      notice8: 'Details',
596      notice9: 'Total amount:',
597      notice10: 'Invoice quantity:',
598      notice11: 'All the details of the picking list are here, you can also scan the specific goods, or the DN to get the picking list to be operated',
599      notice12: 'Please enter the specific picking quantity',
600      notice13: 'Successful Picking',
601      notice14: 'Bin name:',
602      notice15: 'Quantity to be picked:',
603      notice16: 'Picked Quantity Must More Than 0'
604    },
605    mobile_goodsstock: {
606      notice1: 'Stock List',
607      notice2: 'Here you can see all the inventory information, click to view the inventory information directly',
608      notice3: 'On-Hand Stock:',
609      notice4: 'Can Ordered Stock:'
610    },
611    mobile_binstock: {
612      notice1: 'Bin Stock List',
613      notice2: 'Here you can see the inventory information of all the warehouse locations, click to directly access the inventory of the warehouse location, carry out the warehouse transfer operation, or scan the goods to check the storage status of all the goods',
614      notice3: 'Bin Name:',
615      notice4: 'Storage quantity:',
616      notice5: 'Please enter the Bin Name',
617      notice6: 'Repository moved successfully'
618    },
619    mobile_emptybin: {
620      notice1: 'Empty Bin list',
621      notice2: 'Here you can see all the empty location',
622      notice3: 'Stock Bin Property:'
623    },
624    equipment: {
625      notice1: 'Equipment Support List',
626      notice2: 'All device brands and systems supported by the APP are listed here'
627    },
628    handcount: {
629      notice1: 'Details',
630      notice2: 'Manual Count',
631      notice3: 'On-Hand Stock',
632      notice4: 'Count Quantity',
633      notice5: 'Confirm Result',
634      notice6: 'Confirm The Count Result',
635      notice7: 'Successful Confirmed Count Result',
636      notice8: 'Here shows the details of the goods that need to be counted'
637    },
638    version: {
639       new: 'New Version Update',
640       detail: 'Please go to the GreaterWMS official website, https://www.56yhz.com/, to download the latest version of the APP'
641     },
642    400: 'Bad request (400)',
643    401: 'Authorization not obtained (401)',
644    403: 'Access denied (403)',
645    404: 'Resource does not exist (404)',
646    405: 'The function is disabled (405)',
647    408: 'Request timed out (408)',
648    409: 'Data conflict (409)',
649    410: 'Data has been deleted (410)',
650    500: 'Server error (500)',
651    501: 'Service not implemented (501)',
652    502: 'Network error (502)',
653    503: 'Service unavailable (503)',
654    504: 'Network timeout (504)',
655    505: 'HTTP version is not supported (505)'
656  }
templates/src/i18n/en-US/index.js:384-655 
384  staff: {
385    staff: 'Staff',
386    check_code: 'Check Code',
387    view_staff: {
388      staff_name: 'Staff Name',
389      staff_type: 'Staff Type',
390      error1: 'Please Enter The Staff Name',
391      error2: 'Please Enter The Staff Type',
392      lock: 'lock',
393      unlock: 'unlock'
394    }
395  },
396  stock: {
397    stocklist: 'Stock List',
398    stockbinlist: 'Bin List',
399    emptybin: 'Empty Bin',
400    occupiedbin: 'Occupied Bin',
401    view_stocklist: {
402      goods_code: 'Goods Code',
403      goods_desc: 'Goods Desc',
404      goods_name: 'Goods Name',
405      goods_qty: 'Total Qty',
406      onhand_stock: 'On hand',
407      can_order_stock: 'Can Order',
408      ordered_stock: 'Ordered Stock',
409      inspect_stock: 'Inspect',
410      hold_stock: 'Holding',
411      damage_stock: 'Damage',
412      asn_stock: 'ASN Stock',
413      dn_stock: 'DN Stock',
414      pre_load_stock: 'Pre Load',
415      pre_sort_stock: 'Pre Sort',
416      sorted_stock: 'Sorted Stock',
417      pick_stock: 'Pick Stock',
418      picked_stock: 'Picked Stock',
419      back_order_stock: 'Back Order',
420      on_hand_inventory: 'On-Hand Inventory',
421      history_inventory: 'History Inventory',
422      physical_inventory: 'Physical Inventory',
423      difference: ' Difference',
424      cyclecount: 'Cycle Count',
425      recyclecount: 'Recycle',
426      downloadcyclecount: 'Counting table',
427      cyclecountresult: 'Confirm result',
428      cyclecounttip: 'Generate A Dynamic Cycle Count Table',
429      recyclecounttip: 'Generate A Recycle Count Table',
430      downloadcyclecounttip: 'Download Cycle Count Table',
431      cyclecountresulttip: 'Confirm The Cycle Count Result',
432      daychoice: 'Date Selection',
433      daychoicetip: 'Select The Cycle Count Table Corresponding To The Date',
434      error1: 'Count Quantity Must Be Greater Than 0',
435      dateerror: 'Incorrect Date Selected'
436    }
437  },
438  warehouse: {
439    warehouse: 'Warehouse',
440    binset: 'Bin Set',
441    binsize: 'Bin Size',
442    property: 'Bin Property',
443    printbin: 'Print Bin Label',
444    view_warehouseset: {
445      error1: 'Please Enter the Warehouse Name',
446      error2: 'Please Enter The Warehouse City',
447      error3: 'Please Enter The Warehouse Address',
448      error4: 'Please Enter the Warehouse Contact',
449      error5: 'Please Enter The Warehouse Manager'
450    },
451    view_warehouse: {
452      warehouse_name: 'Warehouse Name',
453      warehouse_city: 'Warehouse City',
454      warehouse_address: 'Warehouse Address',
455      warehouse_contact: 'Warehouse Contact',
456      warehouse_manager: 'Warehouse Manager',
457      square_measure: 'Usable Area',
458      city_search: 'City Search',
459      publish_warehouse: 'Publish Warehouse',
460      Nopublish_warehouse: 'Recall Warehouse'
461    },
462    view_binset: {
463      bin_name: 'Bin Name',
464      bin_size: 'Bin Size',
465      bin_property: 'Bin Property',
466      empty_label: 'Empty Label',
467      error1: 'Please Enter the Bin Name',
468      error2: 'Please Enter the Bin Size',
469      error3: 'Please Enter the Bin Property'
470    },
471    view_binsize: {
472      bin_size: 'Bin Size',
473      bin_size_w: 'Bin Size Wide(Unit:mm)',
474      bin_size_d: 'Bin Size Depth(Unit:mm)',
475      bin_size_h: 'Bin Size Height(Unit:mm)',
476      error1: 'Please Enter the Bin_size',
477      error2: 'Bin Size width must greater than 0',
478      error3: 'Bin Size depth must greater than 0',
479      error4: 'Bin Size height must greater than 0'
480    },
481    view_property: {
482      bin_property: 'Bin Property'
483    }
484  },
485  scan: {
486    scan: 'Scan',
487    scan_asn: 'ASN query',
488    scan_dn: 'DN query',
489    scan_sorting: 'Sorting',
490    scan_uptobin: 'Up To Bin',
491    scan_picking: 'Picking',
492    scan_shipping: 'Shipping',
493    scan_movetobin: 'Move To Bin',
494    scan_inventory: 'Inventory',
495    scan_goodsquery: 'Goods query',
496    scan_locationquery: 'Location query',
497    scan_goods_code: 'Goods Code',
498    scan_bin_name: 'Bin Name',
499    scan_goods_label: 'Goods label',
500    scan_goods_label_error: 'The Goods Label Does Not Exist',
501    view_binmove: {
502      old_bin_name: 'Original Bin name',
503      new_bin_name: 'New Bin Name',
504      qty: 'Number of Goods Moved',
505      qty_error: 'The Quantity To Be Moved Cannot Be Greater Than The Existing quantity'
506    },
507    view_upToBin: {
508      goods_actual_qty: 'Actual Arrival Quantity',
509      scan_qty: 'Scanned Qty',
510      scan_qty_error: 'The Scan Quantity Cannot Be Greater Than The Arrival Quantity'
511    },
512    view_picking: {
513      order_qty: 'Order Quantity',
514      picking_qty: 'Pick quantity',
515      picking_qty_error: 'The Picking Quantity Cannot Be Greater Than The Order Quantity'
516    },
517    view_shipping: {
518      shipping_code: 'Shipment Number',
519      driver_info: 'Driver Information',
520      license_plate_number: 'License Plate Number',
521      name: 'Name',
522      contact_info: 'Contact Information'
523    }
524  },
525  handcount: {
526    handcount: 'Single Count',
527    handcountrecorder: 'Single Count Recorder',
528    update_time: 'Count Time'
529  },
530  notice: {
531    valerror: 'Please Enter The Correct Value',
532    unknow_error: 'Unknown Error',
533    network_error: 'Network Exception',
534    cyclecounterror: 'No data',
535    userererror: 'Username already Exists',
536    capitalerror: 'Fixed Asset Name Already Exists',
537    valuenullerror: 'Please Fill In The Complete Data',
538    loginerror: 'Please Login First',
539    detail: 'Detail',
540    goodserror: {
541      goods_listerror: 'The product code already exists',
542      goods_uniterror: 'Goods unit already exists',
543      goods_classerror: 'Goods category already exists',
544      goods_colorerror: 'Goods color already exists',
545      goods_branderror: 'The product brand already exists',
546      goods_shapeerror: 'Goods shape already exists',
547      goods_specserror: 'Goods specification already exists',
548      goods_originerror: 'The origin of goods already exists'
549    },
550    baseinfoerror: {
551      companyerror: 'Company name already exists',
552      customererror: 'Customer name already exists',
553      suppliererror: 'Supplier name already exists'
554    },
555    warehouseerror: {
556      binseterror: 'The bin name already exists',
557      binsizeerror: 'bin size already exists'
558    },
559    mobile_userlogin: {
560      notice1: 'Please enter your administrator name',
561      notice2: 'Please enter your administrator password',
562      notice3: 'Please enter your staff name',
563      notice4: 'Please enter your staff verification code',
564      notice5: 'Please enter your Openid in the settings server',
565      notice6: 'Successful login',
566      notice7: 'User or password mismatch',
567      notice8: 'Employee or inspection code mismatch',
568      notice9: 'Please login first'
569    },
570    mobile_scan: {
571      notice1: 'QR code does not exist',
572      notice2: 'Code does not exist',
573      notice3: 'Server Error',
574      notice4: 'Only mobile can scan'
575    },
576    mobile_asn: {
577      notice1: 'ASN List',
578      notice2: 'You can scan the QR code of the arrival notice, or click the arrival notice to view the details of the arrival notice and operate',
579      notice3: 'Supplier:',
580      notice4: 'Total amount:',
581      notice5: 'Status:',
582      notice6: 'Details of the arrival notice',
583      notice7: 'You need to scan the arrival notice to get the details of the arrival notice. You can scan the cargo code or click on the goods you want to put on the shelves to complete the operation of the goods on the shelves',
584      notice8: 'Details',
585      notice9: 'Total amount:',
586      notice10: 'Number to be listed:',
587      notice11: 'The number of listings must be greater than 0',
588      notice12: 'Successful listing',
589      notice13: 'Please enter the location code'
590    },
591    mobile_dn: {
592      notice1: 'DN List',
593      notice2: 'You can scan the QR code of the DN Order, or click on the DN order to view the details of the DN and perform operations',
594      notice3: 'Customer:',
595      notice4: 'Total amount:',
596      notice5: 'Status:',
597      notice6: 'DN details',
598      notice7: 'The details of the DN are all invoices. Scan the DN Number to view the details of the specific DN',
599      notice8: 'Details',
600      notice9: 'Total amount:',
601      notice10: 'Invoice quantity:',
602      notice11: 'All the details of the picking list are here, you can also scan the specific goods, or the DN to get the picking list to be operated',
603      notice12: 'Please enter the specific picking quantity',
604      notice13: 'Successful Picking',
605      notice14: 'Bin name:',
606      notice15: 'Quantity to be picked:'
607    },
608    mobile_goodsstock: {
609      notice1: 'Stock List',
610      notice2: 'Here you can see all the inventory information, click to view the inventory information directly',
611      notice3: 'On-Hand Stock:',
612      notice4: 'Can Ordered Stock:'
613    },
614    mobile_binstock: {
615      notice1: 'Bin Stock List',
616      notice2: 'Here you can see the inventory information of all the warehouse locations, click to directly access the inventory of the warehouse location, carry out the warehouse transfer operation, or scan the goods to check the storage status of all the goods',
617      notice3: 'Bin Name:',
618      notice4: 'Storage quantity:',
619      notice5: 'Please enter the Bin Name',
620      notice6: 'Repository moved successfully'
621    },
622    mobile_emptybin: {
623      notice1: 'Empty Bin list',
624      notice2: 'Here you can see all the empty location',
625      notice3: 'Stock Bin Property:'
626    },
627    equipment: {
628      notice1: 'Equipment Support List',
629      notice2: 'All device brands and systems supported by the APP are listed here'
630    },
631    handcount: {
632      notice1: 'Details',
633      notice2: 'Manual Count',
634      notice3: 'On-Hand Stock',
635      notice4: 'Count Quantity',
636      notice5: 'Confirm Result',
637      notice6: 'Confirm The Count Result',
638      notice7: 'Successful Confirmed Count Result',
639      notice8: 'Here shows the details of the goods that need to be counted'
640    },
641    400: 'Bad request (400)',
642    401: 'Authorization not obtained (401)',
643    403: 'Access denied (403)',
644    404: 'Resource does not exist (404)',
645    405: 'The function is disabled (405)',
646    408: 'Request timed out (408)',
647    409: 'Data conflict (409)',
648    410: 'Data has been deleted (410)',
649    500: 'Server error (500)',
650    501: 'Service not implemented (501)',
651    502: 'Network error (502)',
652    503: 'Service unavailable (503)',
653    504: 'Network timeout (504)',
654    505: 'HTTP version is not supported (505)'
655  }
app/src-cordova/plugins/cordova-plugin-device/src/windows/DeviceProxy.js:0-93 
1/*
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 */
21
22/* global Windows, createUUID */
23
24var ROOT_CONTAINER = '{00000000-0000-0000-FFFF-FFFFFFFFFFFF}';
25var DEVICE_CLASS_KEY = '{A45C254E-DF1C-4EFD-8020-67D146A850E0},10';
26var DEVICE_CLASS_KEY_NO_SEMICOLON = '{A45C254E-DF1C-4EFD-8020-67D146A850E0}10';
27var ROOT_CONTAINER_QUERY = 'System.Devices.ContainerId:="' + ROOT_CONTAINER + '"';
28var HAL_DEVICE_CLASS = '4d36e966-e325-11ce-bfc1-08002be10318';
29var DEVICE_DRIVER_VERSION_KEY = '{A8B865DD-2E3D-4094-AD97-E593A70C75D6},3';
30
31module.exports = {
32    getDeviceInfo: function (win, fail, args) {
33        // deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId
34        var deviceId;
35        // get deviceId, or create and store one
36        var localSettings = Windows.Storage.ApplicationData.current.localSettings;
37        if (localSettings.values.deviceId) {
38            deviceId = localSettings.values.deviceId;
39        } else {
40            // App-specific hardware id could be used as uuid, but it changes if the hardware changes...
41            try {
42                var ASHWID = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null).id;
43                deviceId = Windows.Storage.Streams.DataReader.fromBuffer(ASHWID).readGuid();
44            } catch (e) {
45                // Couldn't get the hardware UUID
46                deviceId = createUUID();
47            }
48            // ...so cache it per-install
49            localSettings.values.deviceId = deviceId;
50        }
51
52        var userAgent = window.clientInformation.userAgent;
53        // this will report "windows" in windows8.1 and windows phone 8.1 apps
54        // and "windows8" in windows 8.0 apps similar to cordova.js
55        // See https://github.com/apache/cordova-js/blob/master/src/windows/platform.js#L25
56        var devicePlatform = userAgent.indexOf('MSAppHost/1.0') === -1 ? 'windows' : 'windows8';
57        var versionString = userAgent.match(/Windows (?:Phone |NT )?([0-9.]+)/)[1];
58
59        var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
60        // Running in the Windows Simulator is a remote session.
61        // Running in the Windows Phone Emulator has the systemProductName set to "Virtual"
62        var isVirtual = Windows.System.RemoteDesktop.InteractiveSession.isRemote || deviceInfo.systemProductName === 'Virtual';
63        var manufacturer = deviceInfo.systemManufacturer;
64        var model = deviceInfo.systemProductName;
65
66        var Pnp = Windows.Devices.Enumeration.Pnp;
67
68        Pnp.PnpObject.findAllAsync(Pnp.PnpObjectType.device, [DEVICE_DRIVER_VERSION_KEY, DEVICE_CLASS_KEY], ROOT_CONTAINER_QUERY).then(
69            function (rootDevices) {
70                for (var i = 0; i < rootDevices.length; i++) {
71                    var rootDevice = rootDevices[i];
72                    if (!rootDevice.properties) continue;
73                    if (rootDevice.properties[DEVICE_CLASS_KEY_NO_SEMICOLON] === HAL_DEVICE_CLASS) {
74                        versionString = rootDevice.properties[DEVICE_DRIVER_VERSION_KEY];
75                        break;
76                    }
77                }
78
79                setTimeout(function () {
80                    win({
81                        platform: devicePlatform,
82                        version: versionString,
83                        uuid: deviceId,
84                        isVirtual: isVirtual,
85                        model: model,
86                        manufacturer: manufacturer
87                    });
88                }, 0);
89            }
90        );
91    }
92}; // exports
93
app/src-cordova/plugins/phonegap-plugin-barcodescanner/src/android/com/phonegap/plugins/barcodescanner/BarcodeScanner.java:36-328 
36public class BarcodeScanner extends CordovaPlugin {
37    public static final int REQUEST_CODE = 0x0ba7c;
38
39    private static final String SCAN = "scan";
40    private static final String ENCODE = "encode";
41    private static final String CANCELLED = "cancelled";
42    private static final String FORMAT = "format";
43    private static final String TEXT = "text";
44    private static final String DATA = "data";
45    private static final String TYPE = "type";
46    private static final String PREFER_FRONTCAMERA = "preferFrontCamera";
47    private static final String ORIENTATION = "orientation";
48    private static final String SHOW_FLIP_CAMERA_BUTTON = "showFlipCameraButton";
49    private static final String RESULTDISPLAY_DURATION = "resultDisplayDuration";
50    private static final String SHOW_TORCH_BUTTON = "showTorchButton";
51    private static final String TORCH_ON = "torchOn";
52    private static final String SAVE_HISTORY = "saveHistory";
53    private static final String DISABLE_BEEP = "disableSuccessBeep";
54    private static final String FORMATS = "formats";
55    private static final String PROMPT = "prompt";
56    private static final String TEXT_TYPE = "TEXT_TYPE";
57    private static final String EMAIL_TYPE = "EMAIL_TYPE";
58    private static final String PHONE_TYPE = "PHONE_TYPE";
59    private static final String SMS_TYPE = "SMS_TYPE";
60
61    private static final String LOG_TAG = "BarcodeScanner";
62
63    private String [] permissions = { Manifest.permission.CAMERA };
64
65    private JSONArray requestArgs;
66    private CallbackContext callbackContext;
67
68    /**
69     * Constructor.
70     */
71    public BarcodeScanner() {
72    }
73
74    /**
75     * Executes the request.
76     *
77     * This method is called from the WebView thread. To do a non-trivial amount of work, use:
78     *     cordova.getThreadPool().execute(runnable);
79     *
80     * To run on the UI thread, use:
81     *     cordova.getActivity().runOnUiThread(runnable);
82     *
83     * @param action          The action to execute.
84     * @param args            The exec() arguments.
85     * @param callbackContext The callback context used when calling back into JavaScript.
86     * @return                Whether the action was valid.
87     *
88     * @sa https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaPlugin.java
89     */
90    @Override
91    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
92        this.callbackContext = callbackContext;
93        this.requestArgs = args;
94
95        if (action.equals(ENCODE)) {
96            JSONObject obj = args.optJSONObject(0);
97            if (obj != null) {
98                String type = obj.optString(TYPE);
99                String data = obj.optString(DATA);
100
101                // If the type is null then force the type to text
102                if (type == null) {
103                    type = TEXT_TYPE;
104                }
105
106                if (data == null) {
107                    callbackContext.error("User did not specify data to encode");
108                    return true;
109                }
110
111                encode(type, data);
112            } else {
113                callbackContext.error("User did not specify data to encode");
114                return true;
115            }
116        } else if (action.equals(SCAN)) {
117
118            //android permission auto add
119            if(!hasPermisssion()) {
120              requestPermissions(0);
121            } else {
122              scan(args);
123            }
124        } else {
125            return false;
126        }
127        return true;
128    }
129
130    /**
131     * Starts an intent to scan and decode a barcode.
132     */
133    public void scan(final JSONArray args) {
134
135        final CordovaPlugin that = this;
136
137        cordova.getThreadPool().execute(new Runnable() {
138            public void run() {
139
140                Intent intentScan = new Intent(that.cordova.getActivity().getBaseContext(), CaptureActivity.class);
141                intentScan.setAction(Intents.Scan.ACTION);
142                intentScan.addCategory(Intent.CATEGORY_DEFAULT);
143
144                // add config as intent extras
145                if (args.length() > 0) {
146
147                    JSONObject obj;
148                    JSONArray names;
149                    String key;
150                    Object value;
151
152                    for (int i = 0; i < args.length(); i++) {
153
154                        try {
155                            obj = args.getJSONObject(i);
156                        } catch (JSONException e) {
157                            Log.i("CordovaLog", e.getLocalizedMessage());
158                            continue;
159                        }
160
161                        names = obj.names();
162                        for (int j = 0; j < names.length(); j++) {
163                            try {
164                                key = names.getString(j);
165                                value = obj.get(key);
166
167                                if (value instanceof Integer) {
168                                    intentScan.putExtra(key, (Integer) value);
169                                } else if (value instanceof String) {
170                                    intentScan.putExtra(key, (String) value);
171                                }
172
173                            } catch (JSONException e) {
174                                Log.i("CordovaLog", e.getLocalizedMessage());
175                            }
176                        }
177
178                        intentScan.putExtra(Intents.Scan.CAMERA_ID, obj.optBoolean(PREFER_FRONTCAMERA, false) ? 1 : 0);
179                        intentScan.putExtra(Intents.Scan.SHOW_FLIP_CAMERA_BUTTON, obj.optBoolean(SHOW_FLIP_CAMERA_BUTTON, false));
180                        intentScan.putExtra(Intents.Scan.SHOW_TORCH_BUTTON, obj.optBoolean(SHOW_TORCH_BUTTON, false));
181                        intentScan.putExtra(Intents.Scan.TORCH_ON, obj.optBoolean(TORCH_ON, false));
182                        intentScan.putExtra(Intents.Scan.SAVE_HISTORY, obj.optBoolean(SAVE_HISTORY, false));
183                        boolean beep = obj.optBoolean(DISABLE_BEEP, false);
184                        intentScan.putExtra(Intents.Scan.BEEP_ON_SCAN, !beep);
185                        if (obj.has(RESULTDISPLAY_DURATION)) {
186                            intentScan.putExtra(Intents.Scan.RESULT_DISPLAY_DURATION_MS, "" + obj.optLong(RESULTDISPLAY_DURATION));
187                        }
188                        if (obj.has(FORMATS)) {
189                            intentScan.putExtra(Intents.Scan.FORMATS, obj.optString(FORMATS));
190                        }
191                        if (obj.has(PROMPT)) {
192                            intentScan.putExtra(Intents.Scan.PROMPT_MESSAGE, obj.optString(PROMPT));
193                        }
194                        if (obj.has(ORIENTATION)) {
195                            intentScan.putExtra(Intents.Scan.ORIENTATION_LOCK, obj.optString(ORIENTATION));
196                        }
197                    }
198
199                }
200
201                // avoid calling other phonegap apps
202                intentScan.setPackage(that.cordova.getActivity().getApplicationContext().getPackageName());
203
204                that.cordova.startActivityForResult(that, intentScan, REQUEST_CODE);
205            }
206        });
207    }
208
209    /**
210     * Called when the barcode scanner intent completes.
211     *
212     * @param requestCode The request code originally supplied to startActivityForResult(),
213     *                       allowing you to identify who this result came from.
214     * @param resultCode  The integer result code returned by the child activity through its setResult().
215     * @param intent      An Intent, which can return result data to the caller (various data can be attached to Intent "extras").
216     */
217    @Override
218    public void onActivityResult(int requestCode, int resultCode, Intent intent) {
219        if (requestCode == REQUEST_CODE && this.callbackContext != null) {
220            if (resultCode == Activity.RESULT_OK) {
221                JSONObject obj = new JSONObject();
222                try {
223                    obj.put(TEXT, intent.getStringExtra("SCAN_RESULT"));
224                    obj.put(FORMAT, intent.getStringExtra("SCAN_RESULT_FORMAT"));
225                    obj.put(CANCELLED, false);
226                } catch (JSONException e) {
227                    Log.d(LOG_TAG, "This should never happen");
228                }
229                //this.success(new PluginResult(PluginResult.Status.OK, obj), this.callback);
230                this.callbackContext.success(obj);
231            } else if (resultCode == Activity.RESULT_CANCELED) {
232                JSONObject obj = new JSONObject();
233                try {
234                    obj.put(TEXT, "");
235                    obj.put(FORMAT, "");
236                    obj.put(CANCELLED, true);
237                } catch (JSONException e) {
238                    Log.d(LOG_TAG, "This should never happen");
239                }
240                //this.success(new PluginResult(PluginResult.Status.OK, obj), this.callback);
241                this.callbackContext.success(obj);
242            } else {
243                //this.error(new PluginResult(PluginResult.Status.ERROR), this.callback);
244                this.callbackContext.error("Unexpected error");
245            }
246        }
247    }
248
249    /**
250     * Initiates a barcode encode.
251     *
252     * @param type Endoiding type.
253     * @param data The data to encode in the bar code.
254     */
255    public void encode(String type, String data) {
256        Intent intentEncode = new Intent(this.cordova.getActivity().getBaseContext(), EncodeActivity.class);
257        intentEncode.setAction(Intents.Encode.ACTION);
258        intentEncode.putExtra(Intents.Encode.TYPE, type);
259        intentEncode.putExtra(Intents.Encode.DATA, data);
260        // avoid calling other phonegap apps
261        intentEncode.setPackage(this.cordova.getActivity().getApplicationContext().getPackageName());
262
263        this.cordova.getActivity().startActivity(intentEncode);
264    }
265
266    /**
267     * check application's permissions
268     */
269   public boolean hasPermisssion() {
270       for(String p : permissions)
271       {
272           if(!PermissionHelper.hasPermission(this, p))
273           {
274               return false;
275           }
276       }
277       return true;
278   }
279
280    /**
281     * We override this so that we can access the permissions variable, which no longer exists in
282     * the parent class, since we can't initialize it reliably in the constructor!
283     *
284     * @param requestCode The code to get request action
285     */
286   public void requestPermissions(int requestCode)
287   {
288       PermissionHelper.requestPermissions(this, requestCode, permissions);
289   }
290
291   /**
292   * processes the result of permission request
293   *
294   * @param requestCode The code to get request action
295   * @param permissions The collection of permissions
296   * @param grantResults The result of grant
297   */
298  public void onRequestPermissionResult(int requestCode, String[] permissions,
299                                         int[] grantResults) throws JSONException
300   {
301       PluginResult result;
302       for (int r : grantResults) {
303           if (r == PackageManager.PERMISSION_DENIED) {
304               Log.d(LOG_TAG, "Permission Denied!");
305               result = new PluginResult(PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION);
306               this.callbackContext.sendPluginResult(result);
307               return;
308           }
309       }
310
311       switch(requestCode)
312       {
313           case 0:
314               scan(this.requestArgs);
315               break;
316       }
317   }
318
319    /**
320     * This plugin launches an external Activity when the camera is opened, so we
321     * need to implement the save/restore API in case the Activity gets killed
322     * by the OS while it's in the background.
323     */
324    public void onRestoreStateForActivityResult(Bundle state, CallbackContext callbackContext) {
325        this.callbackContext = callbackContext;
326    }
327
328}
app/quasar.config.js:0-227 
1/* eslint-env node */
2
3/*
4 * This file runs in a Node context (it's NOT transpiled by Babel), so use only
5 * the ES6 features that are supported by your Node version. https://node.green/
6 */
7
8// Configuration for your app
9// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
10
11
12const { configure } = require('quasar/wrappers');
13const path = require('path');
14
15module.exports = configure(function (/* ctx */) {
16  return {
17    eslint: {
18      // fix: true,
19      // include = [],
20      // exclude = [],
21      // rawOptions = {},
22      warnings: true,
23      errors: true
24    },
25
26    // https://v2.quasar.dev/quasar-cli/prefetch-feature
27    // preFetch: true,
28
29    // app boot file (/src/boot)
30    // --> boot files are part of "main.js"
31    // https://v2.quasar.dev/quasar-cli/boot-files
32    boot: [
33      'i18n',
34      'axios',
35      'notify-defaults',
36      'vueMain'
37    ],
38
39    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
40    css: [
41      'app.scss'
42    ],
43
44    // https://github.com/quasarframework/quasar/tree/dev/extras
45    extras: [
46      // 'ionicons-v4',
47      // 'mdi-v5',
48      // 'fontawesome-v6',
49      // 'eva-icons',
50      // 'themify',
51      // 'line-awesome',
52      // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
53
54      'roboto-font', // optional, you are not bound to it
55      'material-icons', // optional, you are not bound to it
56    ],
57
58    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
59    build: {
60      target: {
61        browser: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
62        node: 'node16'
63      },
64
65      vueRouterMode: 'hash', // available values: 'hash', 'history'
66      gzip: true,
67      // vueRouterBase,
68      // vueDevtools,
69      // vueOptionsAPI: false,
70
71      // rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
72
73      publicPath: '/',
74      // analyze: true,
75      // env: {},
76      // rawDefine: {}
77      // ignorePublicFolder: true,
78      // minify: false,
79      // polyfillModulePreload: true,
80      // distDir,
81
82      // extendViteConf (viteConf) {},
83      // viteVuePluginOptions: {},
84
85      vitePlugins: [
86        ['@intlify/vite-plugin-vue-i18n', {
87          // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
88          // compositionOnly: false,
89
90          // you need to set i18n resource including paths !
91          include: path.resolve(__dirname, './src/i18n/**')
92        }]
93      ]
94    },
95
96    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
97    devServer: {
98      // https: true
99      open: true // opens browser window automatically
100    },
101
102    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
103    framework: {
104      config: {
105        notify: {}
106      },
107
108      // iconSet: 'material-icons', // Quasar icon set
109      // lang: 'en-US', // Quasar language pack
110
111      // For special cases outside of where the auto-import strategy can have an impact
112      // (like functional components as one of the examples),
113      // you can manually specify Quasar components/directives to be available everywhere:
114      //
115      // components: [],
116      // directives: [],
117
118      // Quasar plugins
119      plugins: [
120        'LocalStorage',
121        'Notify',
122        'Dialog'
123      ]
124    },
125
126    // animations: 'all', // --- includes all animations
127    // https://v2.quasar.dev/options/animations
128    animations: [],
129
130    // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
131    // sourceFiles: {
132    //   rootComponent: 'src/App.vue',
133    //   router: 'src/router/index',
134    //   store: 'src/store/index',
135    //   registerServiceWorker: 'src-pwa/register-service-worker',
136    //   serviceWorker: 'src-pwa/custom-service-worker',
137    //   pwaManifestFile: 'src-pwa/manifest.json',
138    //   electronMain: 'src-electron/electron-main',
139    //   electronPreload: 'src-electron/electron-preload'
140    // },
141
142    // https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
143    ssr: {
144      // ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
145                                          // will mess up SSR
146
147      // extendSSRWebserverConf (esbuildConf) {},
148      // extendPackageJson (json) {},
149
150      pwa: false,
151
152      // manualStoreHydration: true,
153      // manualPostHydrationTrigger: true,
154
155      prodPort: 3000, // The default port that the production server should use
156                      // (gets superseded if process.env.PORT is specified at runtime)
157
158      middlewares: [
159        'render' // keep this as last one
160      ]
161    },
162
163    // https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
164    pwa: {
165      workboxMode: 'generateSW', // or 'injectManifest'
166      injectPwaMetaTags: true,
167      swFilename: 'sw.js',
168      manifestFilename: 'manifest.json',
169      useCredentialsForManifestTag: false,
170      // useFilenameHashes: true,
171      // extendGenerateSWOptions (cfg) {}
172      // extendInjectManifestOptions (cfg) {},
173      // extendManifestJson (json) {}
174      // extendPWACustomSWConf (esbuildConf) {}
175    },
176
177    // Full list of options: https://v2.quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
178    cordova: {
179      backButtonExit: true,
180      backButton: true
181      // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
182    },
183
184    // Full list of options: https://v2.quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
185    capacitor: {
186      hideSplashscreen: true
187    },
188
189    // Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
190    electron: {
191      // extendElectronMainConf (esbuildConf)
192      // extendElectronPreloadConf (esbuildConf)
193
194      inspectPort: 5858,
195
196      bundler: 'packager', // 'packager' or 'builder'
197
198      packager: {
199        // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
200
201        // OS X / Mac App Store
202        // appBundleId: '',
203        // appCategoryType: '',
204        // osxSign: '',
205        // protocol: 'myapp://path',
206
207        // Windows only
208        // win32metadata: { ... }
209      },
210
211      builder: {
212        // https://www.electron.build/configuration/configuration
213
214        appId: 'mobilescanner'
215      }
216    },
217
218    // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
219    bex: {
220      contentScripts: [
221        'my-content-script'
222      ],
223
224      // extendBexScriptsConf (esbuildConf) {}
225      // extendBexManifestJson (json) {}
226    }
227  }
templates/quasar.conf.js:0-281 
1/*
2 * This file runs in a Node context (it's NOT transpiled by Babel), so use only
3 * the ES6 features that are supported by your Node version. https://node.green/
4 */
5
6// Configuration for your app
7// https://quasar.dev/quasar-cli/quasar-conf-js
8/* eslint-env node */
9
10module.exports = function (/* ctx */) {
11  return {
12    // https://quasar.dev/quasar-cli/supporting-ts
13    supportTS: false,
14
15    // https://quasar.dev/quasar-cli/prefetch-feature
16    // preFetch: true,
17
18    // app boot file (/src/boot)
19    // --> boot files are part of "main.js"
20    // https://quasar.dev/quasar-cli/boot-files
21    boot: [
22      'vueMain',
23      'axios_request',
24      'notify_default',
25      'i18n'
26    ],
27
28    // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
29    css: [
30      'app.sass'
31    ],
32
33    // https://github.com/quasarframework/quasar/tree/dev/extras
34    extras: [
35      // 'ionicons-v4',
36      // 'mdi-v5',
37      // 'fontawesome-v5',
38      // 'eva-icons',
39      // 'themify',
40      // 'line-awesome',
41      // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
42
43      'roboto-font', // optional, you are not bound to it
44      'material-icons' // optional, you are not bound to it
45    ],
46
47    // Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
48    build: {
49      vueRouterMode: 'hash', // available values: 'hash', 'history'
50      // transpile: false,
51
52      // Add dependencies for transpiling with Babel (Array of string/regex)
53      // (from node_modules, which are by default not transpiled).
54      // Applies only if "transpile" is set to true.
55      // transpileDependencies: [],
56
57      // rtl: false, // https://quasar.dev/options/rtl-support
58      // preloadChunks: true,
59      // showProgress: false,
60      gzip: true,
61      // analyze: true,
62
63      // Options below are automatically set depending on the env, set them if you want to override
64      // extractCSS: false,
65
66      // https://quasar.dev/quasar-cli/handling-webpack
67      extendWebpack (cfg) {
68        cfg.module.rules.push({
69          resourceQuery: /blockType=i18n/,
70          type: 'javascript/auto',
71          use: [
72            { loader: '@kazupon/vue-i18n-loader' },
73            { loader: 'yaml-loader' }
74          ]
75        })
76      }
77    },
78
79    // Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-devServer
80    devServer: {
81      https: false,
82      port: 8080,
83      open: true // opens browser window automatically
84    },
85
86    // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework
87    framework: {
88      iconSet: 'material-icons', // Quasar icon set
89      lang: 'en-us', // Quasar language pack
90      config: {},
91
92      // Possible values for "importStrategy":
93      // * 'auto' - (DEFAULT) Auto-import needed Quasar components & directives
94      // * 'all'  - Manually specify what to import
95      importStrategy: 'auto',
96
97      // For special cases outside of where "auto" importStrategy can have an impact
98      // (like functional components as one of the examples),
99      // you can manually specify Quasar components/directives to be available everywhere:
100      //
101      components: [
102        'QFab',
103        'QFabAction',
104        'QIcon',
105        'QLayout',
106        'QPageContainer',
107        'QPage',
108        'QHeader',
109        'QPageSticky',
110        'QPageScroller',
111        'QToolbar',
112        'QToolbarTitle',
113        'QForm',
114        'QInput',
115        'QDialog',
116        'QTooltip',
117        'QBar',
118        'QBtnToggle',
119        'QImg',
120        'QCard',
121        'QCardSection',
122        'QCardActions',
123        'QAvatar',
124        'QTabs',
125        'QTab',
126        'QRouteTab',
127        'QCheckbox',
128        'QInfiniteScroll',
129        'QVideo',
130        'QChatMessage'
131      ],
132      directives: [
133        'ClosePopup'
134      ],
135
136      // Quasar plugins
137      plugins: [
138        'Cookies',
139        'LocalStorage',
140        'SessionStorage',
141        'Dialog',
142        'Notify',
143        'Meta'
144      ]
145    },
146    // animations: 'all', // --- includes all animations
147    // https://quasar.dev/options/animations
148    animations: [
149      'fadeIn',
150      'rubberBand',
151      'zoomIn'
152    ],
153
154    // https://quasar.dev/quasar-cli/developing-ssr/configuring-ssr
155    ssr: {
156      pwa: false
157    },
158
159    // https://quasar.dev/quasar-cli/developing-pwa/configuring-pwa
160    pwa: {
161      workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
162      workboxOptions: {}, // only for GenerateSW
163      manifest: {
164        name: 'wms templates',
165        short_name: 'GreaterWMS--Open Source Warehouse Management System',
166        description: 'GreaterWMS--Open Source Warehouse Management System',
167        display: 'standalone',
168        orientation: 'portrait',
169        background_color: '#ffffff',
170        theme_color: '#027be3',
171        icons: [
172          {
173            src: 'icons/icon-128x128.png',
174            sizes: '128x128',
175            type: 'image/png'
176          },
177          {
178            src: 'icons/icon-192x192.png',
179            sizes: '192x192',
180            type: 'image/png'
181          },
182          {
183            src: 'icons/icon-256x256.png',
184            sizes: '256x256',
185            type: 'image/png'
186          },
187          {
188            src: 'icons/icon-384x384.png',
189            sizes: '384x384',
190            type: 'image/png'
191          },
192          {
193            src: 'icons/icon-512x512.png',
194            sizes: '512x512',
195            type: 'image/png'
196          }
197        ]
198      }
199    },
200
201    // Full list of options: https://quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
202    cordova: {
203      // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
204    },
205
206    // Full list of options: https://quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
207    capacitor: {
208      hideSplashscreen: true
209    },
210
211    // Full list of options: https://quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
212    electron: {
213      bundler: 'builder', // 'packager' or 'builder'
214
215      packager: {
216        // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
217
218        // OS X / Mac App Store
219        // appBundleId: '',
220        // appCategoryType: '',
221        // osxSign: '',
222        // protocol: 'myapp://path',
223
224        // Windows only
225        // win32metadata: { ... }
226      },
227
228      builder: {
229        // https://www.electron.build/configuration/configuration
230
231        appId: 'com.electron.greaterwms',
232        productName: 'GreaterWMS',
233        copyright: '2022SR0153577',
234        publish: [
235          {
236            provider: 'generic',
237            url: 'https://production.56yhz.com/media/'
238          }
239        ],
240        mac: {
241          target: 'dmg'
242        },
243        linux: {
244          target: [
245            {
246              target: 'deb'
247            }
248          ]
249        },
250        win: {
251          target: [
252            {
253              target: 'nsis',
254              arch: [
255                'x64',
256                'ia32'
257              ]
258            }
259          ]
260        },
261        nsis: {
262          uninstallDisplayName: 'GreaterWMS',
263          oneClick: false,
264          allowToChangeInstallationDirectory: true,
265          createDesktopShortcut: true,
266          createStartMenuShortcut: true,
267          shortcutName: 'GreaterWMS',
268          runAfterFinish: true
269        },
270        compression: 'maximum'
271      },
272
273      // More info: https://quasar.dev/quasar-cli/developing-electron-apps/node-integration
274      nodeIntegration: true,
275
276      extendWebpack (/* cfg */) {
277        // do something with Electron main process Webpack cfg
278        // chainWebpack also available besides this extendWebpack
279      }
280    }
281  }
static_new/admin/js/actions.js:0-200 
1/*global gettext, interpolate, ngettext*/
2'use strict';
3{
4    function show(selector) {
5        document.querySelectorAll(selector).forEach(function(el) {
6            el.classList.remove('hidden');
7        });
8    }
9
10    function hide(selector) {
11        document.querySelectorAll(selector).forEach(function(el) {
12            el.classList.add('hidden');
13        });
14    }
15
16    function showQuestion(options) {
17        hide(options.acrossClears);
18        show(options.acrossQuestions);
19        hide(options.allContainer);
20    }
21
22    function showClear(options) {
23        show(options.acrossClears);
24        hide(options.acrossQuestions);
25        document.querySelector(options.actionContainer).classList.remove(options.selectedClass);
26        show(options.allContainer);
27        hide(options.counterContainer);
28    }
29
30    function reset(options) {
31        hide(options.acrossClears);
32        hide(options.acrossQuestions);
33        hide(options.allContainer);
34        show(options.counterContainer);
35    }
36
37    function clearAcross(options) {
38        reset(options);
39        const acrossInputs = document.querySelectorAll(options.acrossInput);
40        acrossInputs.forEach(function(acrossInput) {
41            acrossInput.value = 0;
42        });
43        document.querySelector(options.actionContainer).classList.remove(options.selectedClass);
44    }
45
46    function checker(actionCheckboxes, options, checked) {
47        if (checked) {
48            showQuestion(options);
49        } else {
50            reset(options);
51        }
52        actionCheckboxes.forEach(function(el) {
53            el.checked = checked;
54            el.closest('tr').classList.toggle(options.selectedClass, checked);
55        });
56    }
57
58    function updateCounter(actionCheckboxes, options) {
59        const sel = Array.from(actionCheckboxes).filter(function(el) {
60            return el.checked;
61        }).length;
62        const counter = document.querySelector(options.counterContainer);
63        // data-actions-icnt is defined in the generated HTML
64        // and contains the total amount of objects in the queryset
65        const actions_icnt = Number(counter.dataset.actionsIcnt);
66        counter.textContent = interpolate(
67            ngettext('%(sel)s of %(cnt)s selected', '%(sel)s of %(cnt)s selected', sel), {
68                sel: sel,
69                cnt: actions_icnt
70            }, true);
71        const allToggle = document.getElementById(options.allToggleId);
72        allToggle.checked = sel === actionCheckboxes.length;
73        if (allToggle.checked) {
74            showQuestion(options);
75        } else {
76            clearAcross(options);
77        }
78    }
79
80    const defaults = {
81        actionContainer: "div.actions",
82        counterContainer: "span.action-counter",
83        allContainer: "div.actions span.all",
84        acrossInput: "div.actions input.select-across",
85        acrossQuestions: "div.actions span.question",
86        acrossClears: "div.actions span.clear",
87        allToggleId: "action-toggle",
88        selectedClass: "selected"
89    };
90
91    window.Actions = function(actionCheckboxes, options) {
92        options = Object.assign({}, defaults, options);
93        let list_editable_changed = false;
94        let lastChecked = null;
95        let shiftPressed = false;
96
97        document.addEventListener('keydown', (event) => {
98            shiftPressed = event.shiftKey;
99        });
100
101        document.addEventListener('keyup', (event) => {
102            shiftPressed = event.shiftKey;
103        });
104
105        document.getElementById(options.allToggleId).addEventListener('click', function(event) {
106            checker(actionCheckboxes, options, this.checked);
107            updateCounter(actionCheckboxes, options);
108        });
109
110        document.querySelectorAll(options.acrossQuestions + " a").forEach(function(el) {
111            el.addEventListener('click', function(event) {
112                event.preventDefault();
113                const acrossInputs = document.querySelectorAll(options.acrossInput);
114                acrossInputs.forEach(function(acrossInput) {
115                    acrossInput.value = 1;
116                });
117                showClear(options);
118            });
119        });
120
121        document.querySelectorAll(options.acrossClears + " a").forEach(function(el) {
122            el.addEventListener('click', function(event) {
123                event.preventDefault();
124                document.getElementById(options.allToggleId).checked = false;
125                clearAcross(options);
126                checker(actionCheckboxes, options, false);
127                updateCounter(actionCheckboxes, options);
128            });
129        });
130
131        function affectedCheckboxes(target, withModifier) {
132            const multiSelect = (lastChecked && withModifier && lastChecked !== target);
133            if (!multiSelect) {
134                return [target];
135            }
136            const checkboxes = Array.from(actionCheckboxes);
137            const targetIndex = checkboxes.findIndex(el => el === target);
138            const lastCheckedIndex = checkboxes.findIndex(el => el === lastChecked);
139            const startIndex = Math.min(targetIndex, lastCheckedIndex);
140            const endIndex = Math.max(targetIndex, lastCheckedIndex);
141            const filtered = checkboxes.filter((el, index) => (startIndex <= index) && (index <= endIndex));
142            return filtered;
143        };
144
145        Array.from(document.getElementById('result_list').tBodies).forEach(function(el) {
146            el.addEventListener('change', function(event) {
147                const target = event.target;
148                if (target.classList.contains('action-select')) {
149                    const checkboxes = affectedCheckboxes(target, shiftPressed);
150                    checker(checkboxes, options, target.checked);
151                    updateCounter(actionCheckboxes, options);
152                    lastChecked = target;
153                } else {
154                    list_editable_changed = true;
155                }
156            });
157        });
158
159        document.querySelector('#changelist-form button[name=index]').addEventListener('click', function(event) {
160            if (list_editable_changed) {
161                const confirmed = confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."));
162                if (!confirmed) {
163                    event.preventDefault();
164                }
165            }
166        });
167
168        const el = document.querySelector('#changelist-form input[name=_save]');
169        // The button does not exist if no fields are editable.
170        if (el) {
171            el.addEventListener('click', function(event) {
172                if (document.querySelector('[name=action]').value) {
173                    const text = list_editable_changed
174                        ? gettext("You have selected an action, but you haven’t saved your changes to individual fields yet. Please click OK to save. You’ll need to re-run the action.")
175                        : gettext("You have selected an action, and you haven’t made any changes on individual fields. You’re probably looking for the Go button rather than the Save button.");
176                    if (!confirm(text)) {
177                        event.preventDefault();
178                    }
179                }
180            });
181        }
182    };
183
184    // Call function fn when the DOM is loaded and ready. If it is already
185    // loaded, call the function now.
186    // http://youmightnotneedjquery.com/#ready
187    function ready(fn) {
188        if (document.readyState !== 'loading') {
189            fn();
190        } else {
191            document.addEventListener('DOMContentLoaded', fn);
192        }
193    }
194
195    ready(function() {
196        const actionsEls = document.querySelectorAll('tr input.action-select');
197        if (actionsEls.length > 0) {
198            Actions(actionsEls);
199        }
200    });
static_new/admin/js/vendor/xregexp/xregexp.js:397-658 
397},{}],3:[function(require,module,exports){
398/*!
399 * XRegExp Unicode Base 3.2.0
400 * <xregexp.com>
401 * Steven Levithan (c) 2008-2017 MIT License
402 */
403
404module.exports = function(XRegExp) {
405    'use strict';
406
407    /**
408     * Adds base support for Unicode matching:
409     * - Adds syntax `\p{..}` for matching Unicode tokens. Tokens can be inverted using `\P{..}` or
410     *   `\p{^..}`. Token names ignore case, spaces, hyphens, and underscores. You can omit the
411     *   braces for token names that are a single letter (e.g. `\pL` or `PL`).
412     * - Adds flag A (astral), which enables 21-bit Unicode support.
413     * - Adds the `XRegExp.addUnicodeData` method used by other addons to provide character data.
414     *
415     * Unicode Base relies on externally provided Unicode character data. Official addons are
416     * available to provide data for Unicode categories, scripts, blocks, and properties.
417     *
418     * @requires XRegExp
419     */
420
421    // ==--------------------------==
422    // Private stuff
423    // ==--------------------------==
424
425    // Storage for Unicode data
426    var unicode = {};
427
428    // Reuse utils
429    var dec = XRegExp._dec;
430    var hex = XRegExp._hex;
431    var pad4 = XRegExp._pad4;
432
433    // Generates a token lookup name: lowercase, with hyphens, spaces, and underscores removed
434    function normalize(name) {
435        return name.replace(/[- _]+/g, '').toLowerCase();
436    }
437
438    // Gets the decimal code of a literal code unit, \xHH, \uHHHH, or a backslash-escaped literal
439    function charCode(chr) {
440        var esc = /^\\[xu](.+)/.exec(chr);
441        return esc ?
442            dec(esc[1]) :
443            chr.charCodeAt(chr.charAt(0) === '\\' ? 1 : 0);
444    }
445
446    // Inverts a list of ordered BMP characters and ranges
447    function invertBmp(range) {
448        var output = '';
449        var lastEnd = -1;
450
451        XRegExp.forEach(
452            range,
453            /(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,
454            function(m) {
455                var start = charCode(m[1]);
456                if (start > (lastEnd + 1)) {
457                    output += '\\u' + pad4(hex(lastEnd + 1));
458                    if (start > (lastEnd + 2)) {
459                        output += '-\\u' + pad4(hex(start - 1));
460                    }
461                }
462                lastEnd = charCode(m[2] || m[1]);
463            }
464        );
465
466        if (lastEnd < 0xFFFF) {
467            output += '\\u' + pad4(hex(lastEnd + 1));
468            if (lastEnd < 0xFFFE) {
469                output += '-\\uFFFF';
470            }
471        }
472
473        return output;
474    }
475
476    // Generates an inverted BMP range on first use
477    function cacheInvertedBmp(slug) {
478        var prop = 'b!';
479        return (
480            unicode[slug][prop] ||
481            (unicode[slug][prop] = invertBmp(unicode[slug].bmp))
482        );
483    }
484
485    // Combines and optionally negates BMP and astral data
486    function buildAstral(slug, isNegated) {
487        var item = unicode[slug];
488        var combined = '';
489
490        if (item.bmp && !item.isBmpLast) {
491            combined = '[' + item.bmp + ']' + (item.astral ? '|' : '');
492        }
493        if (item.astral) {
494            combined += item.astral;
495        }
496        if (item.isBmpLast && item.bmp) {
497            combined += (item.astral ? '|' : '') + '[' + item.bmp + ']';
498        }
499
500        // Astral Unicode tokens always match a code point, never a code unit
501        return isNegated ?
502            '(?:(?!' + combined + ')(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))' :
503            '(?:' + combined + ')';
504    }
505
506    // Builds a complete astral pattern on first use
507    function cacheAstral(slug, isNegated) {
508        var prop = isNegated ? 'a!' : 'a=';
509        return (
510            unicode[slug][prop] ||
511            (unicode[slug][prop] = buildAstral(slug, isNegated))
512        );
513    }
514
515    // ==--------------------------==
516    // Core functionality
517    // ==--------------------------==
518
519    /*
520     * Add astral mode (flag A) and Unicode token syntax: `\p{..}`, `\P{..}`, `\p{^..}`, `\pC`.
521     */
522    XRegExp.addToken(
523        // Use `*` instead of `+` to avoid capturing `^` as the token name in `\p{^}`
524        /\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,
525        function(match, scope, flags) {
526            var ERR_DOUBLE_NEG = 'Invalid double negation ';
527            var ERR_UNKNOWN_NAME = 'Unknown Unicode token ';
528            var ERR_UNKNOWN_REF = 'Unicode token missing data ';
529            var ERR_ASTRAL_ONLY = 'Astral mode required for Unicode token ';
530            var ERR_ASTRAL_IN_CLASS = 'Astral mode does not support Unicode tokens within character classes';
531            // Negated via \P{..} or \p{^..}
532            var isNegated = match[1] === 'P' || !!match[2];
533            // Switch from BMP (0-FFFF) to astral (0-10FFFF) mode via flag A
534            var isAstralMode = flags.indexOf('A') > -1;
535            // Token lookup name. Check `[4]` first to avoid passing `undefined` via `\p{}`
536            var slug = normalize(match[4] || match[3]);
537            // Token data object
538            var item = unicode[slug];
539
540            if (match[1] === 'P' && match[2]) {
541                throw new SyntaxError(ERR_DOUBLE_NEG + match[0]);
542            }
543            if (!unicode.hasOwnProperty(slug)) {
544                throw new SyntaxError(ERR_UNKNOWN_NAME + match[0]);
545            }
546
547            // Switch to the negated form of the referenced Unicode token
548            if (item.inverseOf) {
549                slug = normalize(item.inverseOf);
550                if (!unicode.hasOwnProperty(slug)) {
551                    throw new ReferenceError(ERR_UNKNOWN_REF + match[0] + ' -> ' + item.inverseOf);
552                }
553                item = unicode[slug];
554                isNegated = !isNegated;
555            }
556
557            if (!(item.bmp || isAstralMode)) {
558                throw new SyntaxError(ERR_ASTRAL_ONLY + match[0]);
559            }
560            if (isAstralMode) {
561                if (scope === 'class') {
562                    throw new SyntaxError(ERR_ASTRAL_IN_CLASS);
563                }
564
565                return cacheAstral(slug, isNegated);
566            }
567
568            return scope === 'class' ?
569                (isNegated ? cacheInvertedBmp(slug) : item.bmp) :
570                (isNegated ? '[^' : '[') + item.bmp + ']';
571        },
572        {
573            scope: 'all',
574            optionalFlags: 'A',
575            leadChar: '\\'
576        }
577    );
578
579    /**
580     * Adds to the list of Unicode tokens that XRegExp regexes can match via `\p` or `\P`.
581     *
582     * @memberOf XRegExp
583     * @param {Array} data Objects with named character ranges. Each object may have properties
584     *   `name`, `alias`, `isBmpLast`, `inverseOf`, `bmp`, and `astral`. All but `name` are
585     *   optional, although one of `bmp` or `astral` is required (unless `inverseOf` is set). If
586     *   `astral` is absent, the `bmp` data is used for BMP and astral modes. If `bmp` is absent,
587     *   the name errors in BMP mode but works in astral mode. If both `bmp` and `astral` are
588     *   provided, the `bmp` data only is used in BMP mode, and the combination of `bmp` and
589     *   `astral` data is used in astral mode. `isBmpLast` is needed when a token matches orphan
590     *   high surrogates *and* uses surrogate pairs to match astral code points. The `bmp` and
591     *   `astral` data should be a combination of literal characters and `\xHH` or `\uHHHH` escape
592     *   sequences, with hyphens to create ranges. Any regex metacharacters in the data should be
593     *   escaped, apart from range-creating hyphens. The `astral` data can additionally use
594     *   character classes and alternation, and should use surrogate pairs to represent astral code
595     *   points. `inverseOf` can be used to avoid duplicating character data if a Unicode token is
596     *   defined as the exact inverse of another token.
597     * @example
598     *
599     * // Basic use
600     * XRegExp.addUnicodeData([{
601     *   name: 'XDigit',
602     *   alias: 'Hexadecimal',
603     *   bmp: '0-9A-Fa-f'
604     * }]);
605     * XRegExp('\\p{XDigit}:\\p{Hexadecimal}+').test('0:3D'); // -> true
606     */
607    XRegExp.addUnicodeData = function(data) {
608        var ERR_NO_NAME = 'Unicode token requires name';
609        var ERR_NO_DATA = 'Unicode token has no character data ';
610        var item;
611
612        for (var i = 0; i < data.length; ++i) {
613            item = data[i];
614            if (!item.name) {
615                throw new Error(ERR_NO_NAME);
616            }
617            if (!(item.inverseOf || item.bmp || item.astral)) {
618                throw new Error(ERR_NO_DATA + item.name);
619            }
620            unicode[normalize(item.name)] = item;
621            if (item.alias) {
622                unicode[normalize(item.alias)] = item;
623            }
624        }
625
626        // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and
627        // flags might now produce different results
628        XRegExp.cache.flush('patterns');
629    };
630
631    /**
632     * @ignore
633     *
634     * Return a reference to the internal Unicode definition structure for the given Unicode
635     * Property if the given name is a legal Unicode Property for use in XRegExp `\p` or `\P` regex
636     * constructs.
637     *
638     * @memberOf XRegExp
639     * @param {String} name Name by which the Unicode Property may be recognized (case-insensitive),
640     *   e.g. `'N'` or `'Number'`. The given name is matched against all registered Unicode
641     *   Properties and Property Aliases.
642     * @returns {Object} Reference to definition structure when the name matches a Unicode Property.
643     *
644     * @note
645     * For more info on Unicode Properties, see also http://unicode.org/reports/tr18/#Categories.
646     *
647     * @note
648     * This method is *not* part of the officially documented API and may change or be removed in
649     * the future. It is meant for userland code that wishes to reuse the (large) internal Unicode
650     * structures set up by XRegExp.
651     */
652    XRegExp._getUnicodeProperty = function(name) {
653        var slug = normalize(name);
654        return unicode[slug];
655    };
656
657};
658
templates/src/i18n/en-US/index.js:0-383 
1// This is just an example,
2// so you can safely delete all default props below
3
4export default {
5  failed: 'Action failed',
6  success: 'Action was successful',
7  index: {
8    operation: 'Operation Docs',
9    app_store: 'Commercial License',
10    signin: 'Access address:',
11    app_title: 'APP Title',
12    slogan: 'Slogan',
13    server: 'Request Baseurl',
14    index_title: 'Open Source Inventory System',
15    webtitle: 'GreaterWMS--Open Source Warehouse Management System',
16    home: 'Home',
17    title: 'GreaterWMS',
18    title_tip: 'GreaterWMS Home',
19    hide_menu: 'Hide Menu',
20    api: 'API DOCS',
21    translate: 'Choose Language',
22    unread: 'Unread Message',
23    login: 'Login',
24    register: 'Register',
25    login_tip: 'Enter Your OPENID & Login Name',
26    register_tip: 'Register An Admin',
27    logout: 'Logout',
28    user_login: 'User Login',
29    admin_login: 'Admin Login',
30    return_to_login: 'Return To Login Page',
31    user_center: 'User Center',
32    change_user: 'Change User',
33    view_my_openid: 'View My OPENID',
34    your_openid: 'Your OPENID',
35    contact_list: 'Recent Contact',
36    chat_more: 'Load More',
37    chat_no_more: 'No More Message',
38    chat_send: 'Send',
39    previous: 'Previous',
40    next: 'Next',
41    admin_name: 'Admin',
42    password: 'Password',
43    confirm_password: 'Confirm Password',
44    staff_name: 'User Name',
45    cancel: 'Cancel',
46    close: 'Close',
47    submit: 'Submit',
48    download: 'Download',
49    updatetitle: 'Update Ready',
50    updatedesc: 'Version Can Update Now',
51    update: 'Update Now',
52    chart: ' Chart',
53    current_user: 'Current User'
54  },
55  Settings: {
56    index: 'Settings',
57    server: 'Server',
58    equipment: 'Equipment Support'
59  },
60  menuItem: {
61    dashboard: 'Dashboard',
62    inbound: 'Inbound',
63    outbound: 'Outbound',
64    stock: 'Inventory',
65    finance: 'Finance',
66    goods: 'GoodsList',
67    baseinfo: 'Base Info',
68    warehouse: 'Warehouse',
69    staff: 'Staff',
70    driver: 'Driver',
71    customerdn: 'Customer DN',
72    supplierasn: 'Supplieer ASN',
73    uploadcenter: 'Upload Center',
74    downloadcenter: 'Download Center',
75    cloudwarehouse: 'Warehouse Interconnection'
76  },
77  contact: 'Contact',
78  sendmessage: 'Send A Message',
79  send: 'Send',
80  nomoremessage: 'No More Message',
81  loadmore: 'Load More',
82  new: 'new',
83  newtip: 'New A Data',
84  refresh: 'Refresh',
85  refreshtip: 'Refresh All Data',
86  edit: 'Edit This Data',
87  confirmedit: 'Confirm Edit Data',
88  canceledit: 'Cancel Edit Data',
89  delete: 'Delete This Data',
90  deletetip: 'This is an irreversible process.',
91  confirmdelete: 'Confirm Delete Data',
92  canceldelete: 'Cancel Delete Data',
93  download: 'Download',
94  downloadtip: 'Download All Data',
95  frombin: 'From Bin',
96  movetobin: 'Move to Bin',
97  putaway: 'PutAway',
98  cyclecount: 'Cycle Count',
99  cyclecountrecorder: 'Count Recorder',
100  search: 'Search Word',
101  creater: 'Creater',
102  createtime: 'Cteate Time',
103  updatetime: 'Update Time',
104  action: 'Action',
105  previous: 'Previous',
106  next: 'Next',
107  no_data: 'No More Data',
108  submit: 'Submit',
109  cancel: 'Cancel',
110  estimate: 'Estimate Freight',
111  downloadasnlist: 'Download List',
112  downloadasndetail: 'Download Detail',
113  downloadasnlisttip: 'Download All ASN List',
114  downloadasndetailtip: 'Download All ASN Detail',
115  printthisasn: 'Print this ASN',
116  confirmdelivery: 'Confirm Delivery',
117  finishloading: 'Finish Loading',
118  confirmsorted: 'Confirm Sorted',
119  downloaddnlist: 'Download List',
120  downloaddndetail: 'Download Detail',
121  downloaddnlisttip: 'Download All DN List',
122  downloaddndetailtip: 'Download All DN Detail',
123  release: 'Order Release',
124  releaseallorder: 'Release All Order',
125  releaseorder: 'Release Order',
126  print: 'Print Picking List',
127  printthisdn: 'Print this DN',
128  confirmorder: 'Confirm Order',
129  confirmpicked: 'Confirm Picked',
130  dispatch: 'Dispatch & Shipping',
131  deletebackorder: 'Delete Back Order',
132  confirminventoryresults: 'Confirm Inventory Results',
133  baseinfo: {
134    company_info: 'Company Info',
135    supplier: 'Supplier',
136    customer: 'Customer',
137    view_company: {
138      company_name: 'Company Name',
139      company_city: 'Company City',
140      company_address: 'Company Address',
141      company_contact: 'Company Contact',
142      company_manager: 'Company Manager',
143      error1: 'Please Enter The Company Name',
144      error2: 'Please Enter The Company City',
145      error3: 'Please Enter The Company Address',
146      error4: 'Please Enter The Company Contact',
147      error5: 'Please Enter The Company Manager'
148    },
149    view_supplier: {
150      supplier_name: 'Supplier Name',
151      supplier_city: 'Supplier City',
152      supplier_address: 'Supplier Address',
153      supplier_contact: 'Supplier Contact',
154      supplier_manager: 'Supplier Manager',
155      supplier_level: 'Supplier Level',
156      error1: 'Please Enter the Supplier Name',
157      error2: 'Please Enter the Supplier City',
158      error3: 'Please Enter the Supplier Address',
159      error4: 'Please Enter the Supplier Contact',
160      error5: 'Please Enter the Supplier Manager',
161      error6: 'Please Enter the Supplier Level'
162    },
163    view_customer: {
164      customer_name: 'Customer Name',
165      customer_city: 'Customer City',
166      customer_address: 'Customer Address',
167      customer_contact: 'Customer Contact',
168      customer_manager: 'Customer Manager',
169      customer_level: 'Customer Level',
170      error1: 'Please Enter the Customer Name',
171      error2: 'Please Enter the Customer City',
172      error3: 'Please Enter the Customer Address',
173      error4: 'Please Enter the Customer Contact',
174      error5: 'Please Enter the Customer Manager',
175      error6: 'Please Enter the Customer Level'
176    }
177  },
178  dashboards: {
179    outbound_statements: 'Outbound',
180    inbound_statements: 'Inbound',
181    inbound_and_outbound_statements: 'Inbound And Outbound',
182    total_sales: 'Total Sales',
183    sales_volume_ranking: 'Sales Volume Ranking',
184    sales_volumes_ranking: 'Sales Volumes Ranking',
185    total_receipts: 'Total Receipts',
186    receiving_quantity_ranking: 'Receiving Quantity Ranking',
187    Receiving_amount_ranking: 'Receiving Amount Ranking',
188    view_tradelist: {
189      mode_code: 'Mode Of Doing Business',
190      bin_name: 'Location Name',
191      goods_code: 'Goods Code',
192      goods_qty: 'Quantity On Hand',
193      creater: 'Creater',
194      update_time: 'Update Time',
195      create_time: 'Create Time',
196      inbound: 'Inbound',
197      outbound: 'Outbound'
198    }
199  },
200  finance: {
201    capital: 'Capital',
202    freight: 'Freight',
203    view_capital: {
204      capital_name: 'Cpaital Name',
205      capital_qty: 'Capital Qty',
206      capital_cost: 'Capital Cost',
207      error1: 'Please Enter the Capital Name',
208      error2: 'Capital Qty width must greater than 0',
209      error3: 'Capital Cost depth must greater than 0'
210    },
211    view_freight: {
212      transportation_supplier: 'Transportation Supplier',
213      send_city: 'Send City',
214      receiver_city: 'Receiver City',
215      weight_fee: 'Weight Fee',
216      volume_fee: 'Volume Fee',
217      min_payment: 'Min Payment',
218      error1: 'Please Enter the Transportation Supplier',
219      error2: 'Please Enter the Send City',
220      error3: 'Please Enter the Receiver City',
221      error4: 'Weight Fee must greater than 0',
222      error5: 'Volume Fee must greater than 0',
223      error6: 'Min Payment must greater than 0'
224    }
225  },
226  driver: {
227    driver: 'Driver',
228    dispatchlist: 'Dispatch List',
229    error1: 'Please Enter the Driver Name',
230    error2: 'Please Enter the License Plate',
231    error3: 'Please Enter The Contact',
232    view_driver: {
233      driver_name: 'Driver Name',
234      license_plate: 'License Plate',
235      contact: 'Contact'
236    },
237    view_dispatch: {
238      driver_name: 'Driver Name',
239      dn_code: 'DN Code',
240      contact: 'Contact'
241    }
242  },
243  upload_center: {
244    initializeupload: 'Initialize upload',
245    uploadfiles: 'Upload',
246    upload: 'Upload',
247    uploadcustomerfile: 'Upload Customerfile',
248    uploadgoodslistfile: 'Upload GoodslistFile',
249    uploadsupplierfile: 'Upload SupplierFile',
250    downloadgoodstemplate: 'Goods Example',
251    downloadcustomertemplate: 'Customer Example',
252    downloadsuppliertemplate: 'Supplier Example',
253    addupload: 'Add Upload'
254  },
255  download_center: {
256    createTime: 'Create Time',
257    reset: 'Reset',
258    start: 'Start',
259    end: 'End'
260  },
261  community_mall: {
262    communitymall: 'Community Mall'
263  },
264  goods: {
265    goods_list: 'Goods List',
266    unit: 'Unit',
267    class: 'Class',
268    color: 'Color',
269    brand: 'Brand',
270    shape: 'Shape',
271    specs: 'Specs',
272    origin: 'Origin',
273    view_goodslist: {
274      goods_code: 'Goods Code',
275      goods_desc: 'Goods Desc',
276      goods_name: 'Goods Name',
277      goods_supplier: 'Goods Supplier',
278      goods_weight: 'Goods Weight(Unit:g)',
279      goods_w: 'Goods Width(Unit:mm)',
280      goods_d: 'Goods Depth(Unit:mm)',
281      goods_h: 'Goods Height(Unit:mm)',
282      unit_volume: 'Unit Volume',
283      goods_unit: 'Goods Unit',
284      goods_class: 'Goods Class',
285      goods_brand: 'Goods Brand',
286      goods_color: 'Goods Color',
287      goods_shape: 'Goods Shape',
288      goods_specs: 'Goods Specs',
289      goods_origin: 'Goods Origin',
290      goods_cost: 'Goods Cost',
291      goods_price: 'Goods Price',
292      print_goods_label: 'Print Goods Label',
293      error1: 'Please Enter the Goods Code',
294      error2: 'Please Enter the Goods Description',
295      error3: 'Please Enter the Supplier',
296      error4: 'Goods Weight Must Greater Than 0',
297      error5: 'Goods Width Must Greater Than 0',
298      error6: 'Goods Depth Must Greater Than 0',
299      error7: 'Goods Height Must Greater Than 0',
300      error8: 'Please Enter the Goods Cost',
301      error9: 'Please Enter the Goods Price'
302    },
303    view_unit: {
304      goods_unit: 'Goods Unit',
305      error1: 'Please Enter Goods Unit'
306    },
307    view_class: {
308      goods_class: 'Goods Class',
309      error1: 'Please Enter Goods Class'
310    },
311    view_color: {
312      goods_color: 'Goods Color',
313      error1: 'Please Enter Goods Color'
314    },
315    view_brand: {
316      goods_brand: 'Goods Brand',
317      error1: 'Please Enter Goods Brand'
318    },
319    view_shape: {
320      goods_shape: 'Goods Shape',
321      error1: 'Please Enter Goods Shape'
322    },
323    view_specs: {
324      goods_specs: 'Goods Specs',
325      error1: 'Please Enter Goods Specs'
326    },
327    view_origin: {
328      goods_origin: 'Goods Origin',
329      error1: 'Please Enter Goods Origin'
330    }
331  },
332  inbound: {
333    asn: 'ASN',
334    predeliverystock: 'Pre Delivery',
335    preloadstock: 'Pre Load',
336    presortstock: 'Sorting',
337    sortstock: 'Sorted',
338    shortage: 'Shortage',
339    more: 'More QTY',
340    asnfinish: 'Receiving List',
341    asndone: 'Finish Receiving',
342    view_sortstock: {
343      error1: 'Please Enter The Quantity Must Be Greater Than 0'
344    },
345    view_asn: {
346      asn_code: 'ASN Code',
347      asn_status: 'ASN Status',
348      goods_qty: 'ASN QTY',
349      goods_actual_qty: 'Actual Arrive Qty',
350      goods_shortage_qty: 'Arrive Shortage Qty',
351      goods_more_qty: 'Arrive More Qty',
352      goods_damage_qty: 'Arrive Damage Qty',
353      presortstock: 'Pre Sort Qty',
354      sorted_qty: 'Sorted Qty',
355      total_weight: 'Total Weight(Unit:KG)',
356      total_volume: 'Total Volume(Unit:Cubic Metres)'
357    }
358  },
359  outbound: {
360    dn: 'DN',
361    freshorder: 'Pre Order',
362    neworder: 'New Order',
363    backorder: 'Back Order',
364    pickstock: 'Pre Pick',
365    pickedstock: 'Picked',
366    pickinglist: 'Picking List',
367    shippedstock: 'Shipping List',
368    received: 'Received',
369    pod: 'Proof Of Delivery',
370    view_dn: {
371      dn_code: 'DN Code',
372      dn_status: 'DN Status',
373      goods_qty: 'Order QTY',
374      intransit_qty: 'Shipping QTY',
375      delivery_actual_qty: 'Delivery Actual QTY',
376      delivery_shortage_qty: 'Delivery Shortage QTY',
377      delivery_more_qty: 'Delivery More QTY',
378      delivery_damage_qty: 'Delivery Damage QTY',
379      total_weight: 'Total Weight(Unit:KG)',
380      total_volume: 'Total Volume(Unit:Cubic Metres)',
381      customer: 'Customer'
382    }
383  },
app/src-cordova/plugins/cordova-plugin-vibration/src/windows/VibrationProxy.js:0-252 
1/*
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 */
21
22/* global Windows, WinJS, Vibration */
23
24function checkReqs (actionName, fail) {
25    if (!(Windows.Phone && Windows.Phone.Devices && Windows.Phone.Devices.Notification && Windows.Phone.Devices.Notification.VibrationDevice) && WinJS.Utilities.isPhone !== true) {
26        fail(actionName + ' is unsupported by this platform.');
27        return false;
28    }
29
30    return true;
31}
32
33function tryDoAction (actionName, success, fail, args, action) {
34    try {
35        if (checkReqs(actionName, fail) !== true) {
36            return;
37        }
38
39        action(args);
40        success();
41    } catch (e) {
42        fail('Error occured while trying to ' + actionName + ': ' + e);
43    }
44}
45
46/**
47 * @typedef patternParsingResult
48 * @type {Object}
49 * @property {Array} result.parsed - Array with parsed integers
50 * @property {Boolean} result.passed - false in case of parsing error
51 * @property {*} result.failedItem - The item, which could not be parsed
52 */
53
54/**
55 * Tries to convert pattern values to int
56 * @param  {Array} pattern Array of delays
57 * @returns {patternParsingResult} result
58 */
59function tryParsePatternValues (pattern) {
60    var passed = true;
61    var failedItem;
62
63    pattern = pattern.map(function (item) {
64        var num = parseInt(item, 10);
65        if (isNaN(num)) {
66            failedItem = item;
67            passed = false;
68        }
69
70        return num;
71    });
72
73    return {
74        parsed: pattern,
75        passed: passed,
76        failedItem: failedItem
77    };
78}
79
80/**
81 * @typedef checkPatternReqsResult
82 * @type {Object}
83 * @property {Array} result.patternParsingResult - Array with parsed integers
84 * @property {Boolean} result.passed - true if all params are OK
85 */
86
87/**
88 * Checks params for vibrateWithPattern function
89 * @return {checkPatternReqsResult}
90 */
91function checkPatternReqs (args, fail) {
92    var patternParsingResult = tryParsePatternValues(args[0]);
93    var repeat = args[1];
94    var passed = true;
95    var errMsg = '';
96
97    if (!patternParsingResult.passed) {
98        errMsg += 'Could not parse ' + patternParsingResult.failedItem + ' in the vibration pattern';
99        passed = false;
100    }
101
102    if (repeat !== -1 && (repeat < 0 || repeat > args[0].length - 1)) {
103        errMsg += '\nrepeat parameter is out of range: ' + repeat;
104        passed = false;
105    }
106
107    if (!passed) {
108        console.error(errMsg);
109        if (fail) {
110            fail(errMsg);
111        }
112    }
113
114    return {
115        passed: passed,
116        patternParsingResult: patternParsingResult
117    };
118}
119
120/**
121 * vibrateWithPattern with `repeat` support
122 * @param  {Array} patternArr Full pattern array
123 * @param  {Boolean} shouldRepeat Indication on whether the vibration should be cycled
124 * @param  {Function} fail Fail callback
125 * @param  {Array} patternCycle Cycled part of the pattern array
126 * @return {Promise} Promise chaining single vibrate/pause actions
127 */
128function vibratePattern (patternArr, shouldRepeat, fail, patternCycle) {
129    return patternArr.reduce(function (previousValue, currentValue, index) {
130        if (index % 2 === 0) {
131            return previousValue.then(function () {
132                module.exports.vibrate(function () { }, function (err) {
133                    console.error(err);
134                    if (fail) {
135                        fail(err);
136                    }
137                }, [currentValue]);
138
139                if (index === patternArr.length - 1 && shouldRepeat) {
140                    return WinJS.Promise.timeout(currentValue).then(function () {
141                        return vibratePattern(patternCycle, true, fail, patternCycle);
142                    });
143                } else {
144                    return WinJS.Promise.timeout(currentValue);
145                }
146            });
147        } else {
148            return previousValue.then(function () {
149                if (index === patternArr.length - 1 && shouldRepeat) {
150                    return WinJS.Promise.timeout(currentValue).then(function () {
151                        return vibratePattern(patternCycle, true, fail, patternCycle);
152                    });
153                } else {
154                    return WinJS.Promise.timeout(currentValue);
155                }
156            });
157        }
158    }, WinJS.Promise.as());
159}
160
161var DEFAULT_DURATION = 200;
162var patternChainPromise;
163
164var VibrationDevice = (Windows.Phone && Windows.Phone.Devices && Windows.Phone.Devices.Notification && Windows.Phone.Devices.Notification.VibrationDevice && Windows.Phone.Devices.Notification.VibrationDevice);
165if (VibrationDevice) {
166    // Windows Phone 10 code paths
167    module.exports = {
168        vibrate: function (success, fail, args) {
169            try {
170                var duration = parseInt(args[0]);
171                if (isNaN(duration)) {
172                    duration = DEFAULT_DURATION;
173                }
174                VibrationDevice.getDefault().vibrate(duration);
175                success();
176            } catch (e) {
177                fail(e);
178            }
179        },
180        vibrateWithPattern: function (success, fail, args) {
181            // Cancel current vibrations first
182            module.exports.cancelVibration(function () {
183                var checkReqsResult = checkPatternReqs(args, fail);
184                if (!checkReqsResult.passed) {
185                    return;
186                }
187
188                var pattern = checkReqsResult.patternParsingResult.parsed;
189                var repeatFromIndex = args[1];
190                var shouldRepeat = (repeatFromIndex !== -1);
191                var patternCycle;
192
193                if (shouldRepeat) {
194                    patternCycle = pattern.slice(repeatFromIndex);
195                }
196
197                patternChainPromise = vibratePattern(pattern, shouldRepeat, fail, patternCycle);
198            }, fail);
199        },
200        cancelVibration: function (success, fail, args) {
201            try {
202                if (patternChainPromise) {
203                    patternChainPromise.cancel();
204                }
205                VibrationDevice.getDefault().cancel();
206                if (success) {
207                    success();
208                }
209            } catch (e) {
210                if (fail) {
211                    fail(e);
212                }
213            }
214        }
215    };
216} else if (typeof Vibration !== 'undefined' && Vibration.Vibration) {
217    // Windows Phone 8.1 code paths
218    module.exports = {
219        vibrate: function (success, fail, args) {
220            tryDoAction('vibrate', success, fail, args, Vibration.Vibration.vibrate);
221        },
222
223        vibrateWithPattern: function (success, fail, args) {
224            tryDoAction('vibrate', success, fail, [DEFAULT_DURATION], Vibration.Vibration.vibrate);
225        },
226
227        cancelVibration: function (success, fail, args) {
228            tryDoAction('cancelVibration', success, fail, args, Vibration.Vibration.cancelVibration);
229        }
230    };
231} else {
232    // code paths where no vibration mechanism is present
233    module.exports = {
234        vibrate: function (success, fail) {
235            if (fail) {
236                fail('"vibrate" is unsupported by this device.');
237            }
238        },
239        vibrateWithPattern: function (success, fail, args) {
240            if (fail) {
241                fail('"vibrateWithPattern" is unsupported by this device.');
242            }
243        },
244
245        cancelVibration: function (success, fail, args) {
246            if (success) {
247                success();
248            }
249        }
250    };
251}
252
app/src-cordova/plugins/cordova-plugin-device/src/android/Device.java:0-172 
1/*
2       Licensed to the Apache Software Foundation (ASF) under one
3       or more contributor license agreements.  See the NOTICE file
4       distributed with this work for additional information
5       regarding copyright ownership.  The ASF licenses this file
6       to you under the Apache License, Version 2.0 (the
7       "License"); you may not use this file except in compliance
8       with the License.  You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12       Unless required by applicable law or agreed to in writing,
13       software distributed under the License is distributed on an
14       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15       KIND, either express or implied.  See the License for the
16       specific language governing permissions and limitations
17       under the License.
18*/
19package org.apache.cordova.device;
20
21import java.util.TimeZone;
22
23import org.apache.cordova.CordovaWebView;
24import org.apache.cordova.CallbackContext;
25import org.apache.cordova.CordovaPlugin;
26import org.apache.cordova.CordovaInterface;
27import org.json.JSONArray;
28import org.json.JSONException;
29import org.json.JSONObject;
30
31import android.provider.Settings;
32
33public class Device extends CordovaPlugin {
34    public static final String TAG = "Device";
35
36    public static String platform;                            // Device OS
37    public static String uuid;                                // Device UUID
38
39    private static final String ANDROID_PLATFORM = "Android";
40    private static final String AMAZON_PLATFORM = "amazon-fireos";
41    private static final String AMAZON_DEVICE = "Amazon";
42
43    /**
44     * Constructor.
45     */
46    public Device() {
47    }
48
49    /**
50     * Sets the context of the Command. This can then be used to do things like
51     * get file paths associated with the Activity.
52     *
53     * @param cordova The context of the main Activity.
54     * @param webView The CordovaWebView Cordova is running in.
55     */
56    public void initialize(CordovaInterface cordova, CordovaWebView webView) {
57        super.initialize(cordova, webView);
58        Device.uuid = getUuid();
59    }
60
61    /**
62     * Executes the request and returns PluginResult.
63     *
64     * @param action            The action to execute.
65     * @param args              JSONArry of arguments for the plugin.
66     * @param callbackContext   The callback id used when calling back into JavaScript.
67     * @return                  True if the action was valid, false if not.
68     */
69    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
70        if ("getDeviceInfo".equals(action)) {
71            JSONObject r = new JSONObject();
72            r.put("uuid", Device.uuid);
73            r.put("version", this.getOSVersion());
74            r.put("platform", this.getPlatform());
75            r.put("model", this.getModel());
76            r.put("manufacturer", this.getManufacturer());
77	        r.put("isVirtual", this.isVirtual());
78            r.put("serial", this.getSerialNumber());
79            r.put("sdkVersion", this.getSDKVersion());
80            callbackContext.success(r);
81        }
82        else {
83            return false;
84        }
85        return true;
86    }
87
88    //--------------------------------------------------------------------------
89    // LOCAL METHODS
90    //--------------------------------------------------------------------------
91
92    /**
93     * Get the OS name.
94     *
95     * @return
96     */
97    public String getPlatform() {
98        String platform;
99        if (isAmazonDevice()) {
100            platform = AMAZON_PLATFORM;
101        } else {
102            platform = ANDROID_PLATFORM;
103        }
104        return platform;
105    }
106
107    /**
108     * Get the device's Universally Unique Identifier (UUID).
109     *
110     * @return
111     */
112    public String getUuid() {
113        String uuid = Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
114        return uuid;
115    }
116
117    public String getModel() {
118        String model = android.os.Build.MODEL;
119        return model;
120    }
121
122    public String getProductName() {
123        String productname = android.os.Build.PRODUCT;
124        return productname;
125    }
126
127    public String getManufacturer() {
128        String manufacturer = android.os.Build.MANUFACTURER;
129        return manufacturer;
130    }
131
132    public String getSerialNumber() {
133        String serial = android.os.Build.SERIAL;
134        return serial;
135    }
136
137    /**
138     * Get the OS version.
139     *
140     * @return
141     */
142    public String getOSVersion() {
143        String osversion = android.os.Build.VERSION.RELEASE;
144        return osversion;
145    }
146
147    public String getSDKVersion() {
148        return String.valueOf(android.os.Build.VERSION.SDK_INT);
149    }
150
151    public String getTimeZoneID() {
152        TimeZone tz = TimeZone.getDefault();
153        return (tz.getID());
154    }
155
156    /**
157     * Function to check if the device is manufactured by Amazon
158     *
159     * @return
160     */
161    public boolean isAmazonDevice() {
162        if (android.os.Build.MANUFACTURER.equals(AMAZON_DEVICE)) {
163            return true;
164        }
165        return false;
166    }
167
168    public boolean isVirtual() {
169	return android.os.Build.FINGERPRINT.contains("generic") ||
170	    android.os.Build.PRODUCT.contains("sdk");
171    }
172
app/src-cordova/plugins/cordova-plugin-device/www/device.js:0-95 
1/*
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 */
21
22var argscheck = require('cordova/argscheck');
23var channel = require('cordova/channel');
24var exec = require('cordova/exec');
25var cordova = require('cordova');
26
27channel.createSticky('onCordovaInfoReady');
28// Tell cordova channel to wait on the CordovaInfoReady event
29channel.waitForInitialization('onCordovaInfoReady');
30
31/**
32 * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
33 * phone, etc.
34 * @constructor
35 */
36function Device () {
37    this.available = false;
38    this.platform = null;
39    this.version = null;
40    this.uuid = null;
41    this.cordova = null;
42    this.model = null;
43    this.manufacturer = null;
44    this.isVirtual = null;
45    this.serial = null;
46    this.isiOSAppOnMac = null;
47
48    var me = this;
49
50    channel.onCordovaReady.subscribe(function () {
51        me.getInfo(
52            function (info) {
53                // ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js
54                // TODO: CB-5105 native implementations should not return info.cordova
55                var buildLabel = cordova.version;
56                me.available = true;
57                me.platform = info.platform;
58                me.version = info.version;
59                me.uuid = info.uuid;
60                me.cordova = buildLabel;
61                me.model = info.model;
62                me.isVirtual = info.isVirtual;
63                // isiOSAppOnMac is iOS specific. If defined, it will be appended.
64                if (info.isiOSAppOnMac !== undefined) {
65                    me.isiOSAppOnMac = info.isiOSAppOnMac;
66                }
67                me.manufacturer = info.manufacturer || 'unknown';
68                me.serial = info.serial || 'unknown';
69
70                // SDK Version is Android specific. If defined, it will be appended.
71                if (info.sdkVersion !== undefined) {
72                    me.sdkVersion = info.sdkVersion;
73                }
74
75                channel.onCordovaInfoReady.fire();
76            },
77            function (e) {
78                me.available = false;
79                console.error('[ERROR] Error initializing cordova-plugin-device: ' + e);
80            }
81        );
82    });
83}
84
85/**
86 * Get device info
87 *
88 * @param {Function} successCallback The function to call when the heading data is available
89 * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
90 */
91Device.prototype.getInfo = function (successCallback, errorCallback) {
92    argscheck.checkArgs('fF', 'Device.getInfo', arguments);
93    exec(successCallback, errorCallback, 'Device', 'getDeviceInfo', []);
94};
95
app/src-cordova/plugins/cordova-plugin-device/src/ios/CDVDevice.m:0-50 
1/*
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements.  See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership.  The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"); you may not use this file except in compliance
8 with the License.  You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied.  See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 */
19
20#include <sys/types.h>
21#include <sys/sysctl.h>
22#include "TargetConditionals.h"
23
24#import <Availability.h>
25
26#import <Cordova/CDV.h>
27#import "CDVDevice.h"
28
29@implementation UIDevice (ModelVersion)
30
31- (NSString*)modelVersion
32{
33#if TARGET_IPHONE_SIMULATOR
34    NSString* platform = NSProcessInfo.processInfo.environment[@"SIMULATOR_MODEL_IDENTIFIER"];
35#else
36    size_t size;
37
38    sysctlbyname("hw.machine", NULL, &size, NULL, 0);
39    char* machine = malloc(size);
40    sysctlbyname("hw.machine", machine, &size, NULL, 0);
41    NSString* platform = [NSString stringWithUTF8String:machine];
42    free(machine);
43#endif
44    return platform;
45}
46
47@end
48
49@interface CDVDevice () {}
50@end