Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sweep :I need you to analyze the code and write a document that explains the business logic of the app. This document should be structured with clear points, each detailing what a specific aspect of the code is doing and how it relates to the overall functionality of the application. Additionally, please include a list of app features for comprehensive understanding #1

Open
1 task
Nabil-Nader opened this issue Apr 17, 2024 · 2 comments
Labels
enhancement New feature or request sweep

Comments

@Nabil-Nader
Copy link
Owner

Nabil-Nader commented Apr 17, 2024

Checklist
  • docs/BusinessLogicAnalysis.md
@Nabil-Nader Nabil-Nader added enhancement New feature or request sweep labels Apr 17, 2024
Copy link

sweep-ai bot commented Apr 17, 2024

Sweeping

✨ Track Sweep's progress on our progress dashboard!


50%

💎 Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID: 403948873b)

Tip

I can email you when I complete this pull request if you set up your email here!

Install Sweep Configs: Pull Request

Actions (click)

  • ↻ Restart Sweep

Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description.

<script>
import {ref, computed, watch, defineComponent, onMounted, onBeforeUnmount} from 'vue'
import { useStore } from "vuex";
import { useRouter, useRoute } from 'vue-router'
import { useQuasar } from "quasar";
import axios from 'axios'
import { useI18n } from "vue-i18n"
var sendCommandResults = 'false'
var scanner = {
initialize: function () {
this.bindEvents()
},
bindEvents: function () {
document.addEventListener('deviceready', this.onDeviceReady, false)
},
onDeviceReady: function () {
scanner.receivedEvent('deviceready')
console.log(0, window.Media)
registerBroadcastReceiver()
determineVersion()
},
onPause: function () {
console.log('Paused')
unregisterBroadcastReceiver()
},
onResume: function () {
console.log('Resumed')
registerBroadcastReceiver()
},
receivedEvent: function (id) {
console.log('Received Event: ' + id)
}
}
function startSoftTrigger () {
sendCommand('com.symbol.datawedge.api.SOFT_SCAN_TRIGGER', 'START_SCANNING')
}
function stopSoftTrigger () {
sendCommand('com.symbol.datawedge.api.SOFT_SCAN_TRIGGER', 'STOP_SCANNING')
}
function determineVersion () {
sendCommand('com.symbol.datawedge.api.GET_VERSION_INFO', '')
}
function setDecoders () {
// Set the new configuration
var profileConfig = {
PROFILE_NAME: 'wms',
PROFILE_ENABLED: 'true',
CONFIG_MODE: 'UPDATE',
PLUGIN_CONFIG: {
PLUGIN_NAME: 'BARCODE',
PARAM_LIST: {
// "current-device-id": this.selectedScannerId,
scanner_selection: 'auto'
}
}
}
sendCommand('com.symbol.datawedge.api.SET_CONFIG', profileConfig)
}
function sendCommand (extraName, extraValue) {
console.log('Sending Command: ' + extraName + ', ' + JSON.stringify(extraValue))
var broadcastExtras = {}
broadcastExtras[extraName] = extraValue
broadcastExtras.SEND_RESULT = sendCommandResults
window.plugins.intentShim.sendBroadcast({
action: 'com.symbol.datawedge.api.ACTION',
extras: broadcastExtras
},
function () { },
function () { }
)
}
function registerBroadcastReceiver () {
window.plugins.intentShim.registerBroadcastReceiver({
filterActions: [
'com.zebra.cordovademo.ACTION',
'com.symbol.datawedge.api.RESULT_ACTION'
],
filterCategories: [
'android.intent.category.DEFAULT'
]
},
function (intent) {
// Broadcast received
console.log('Received Intent: ' + JSON.stringify(intent.extras))
if (intent.extras.hasOwnProperty('RESULT_INFO')) {
var commandResult = intent.extras.RESULT + ' (' +
intent.extras.COMMAND.substring(intent.extras.COMMAND.lastIndexOf('.') + 1, intent.extras.COMMAND.length) + ')'// + JSON.stringify(intent.extras.RESULT_INFO);
commandReceived(commandResult.toLowerCase())
}
if (intent.extras.hasOwnProperty('com.symbol.datawedge.api.RESULT_GET_VERSION_INFO')) {
// The version has been returned (DW 6.3 or higher). Includes the DW version along with other subsystem versions e.g MX
var versionInfo = intent.extras['com.symbol.datawedge.api.RESULT_GET_VERSION_INFO']
console.log('Version Info: ' + JSON.stringify(versionInfo))
var datawedgeVersion = versionInfo.DATAWEDGE
datawedgeVersion = datawedgeVersion.padStart(5, '0')
console.log('Datawedge version: ' + datawedgeVersion)
// Fire events sequentially so the application can gracefully degrade the functionality available on earlier DW versions
if (datawedgeVersion >= '006.3') { datawedge63() }
if (datawedgeVersion >= '006.4') { datawedge64() }
if (datawedgeVersion >= '006.5') { datawedge65() }
} else if (intent.extras.hasOwnProperty('com.symbol.datawedge.api.RESULT_ENUMERATE_SCANNERS')) {
// Return from our request to enumerate the available scanners
var enumeratedScannersObj = intent.extras['com.symbol.datawedge.api.RESULT_ENUMERATE_SCANNERS']
enumerateScanners(enumeratedScannersObj)
} else if (intent.extras.hasOwnProperty('com.symbol.datawedge.api.RESULT_GET_ACTIVE_PROFILE')) {
// Return from our request to obtain the active profile
var activeProfileObj = intent.extras['com.symbol.datawedge.api.RESULT_GET_ACTIVE_PROFILE']
activeProfile(activeProfileObj)
} else if (!intent.extras.hasOwnProperty('RESULT_INFO')) {
// A barcode has been scanned
barcodeScanned(intent, new Date().toLocaleString())
}
}
)
}
function unregisterBroadcastReceiver () {
window.plugins.intentShim.unregisterBroadcastReceiver()
}
function datawedge63 () {
console.log('Datawedge 6.3 APIs are available')
sendCommand('com.symbol.datawedge.api.CREATE_PROFILE', 'ZebraCordovaDemo')
sendCommand('com.symbol.datawedge.api.GET_ACTIVE_PROFILE', '')
sendCommand('com.symbol.datawedge.api.ENUMERATE_SCANNERS', '')
}
function datawedge64 () {
console.log('Datawedge 6.4 APIs are available')
var profileConfig = {
PROFILE_NAME: 'wms',
PROFILE_ENABLED: 'true',
CONFIG_MODE: 'UPDATE',
PLUGIN_CONFIG: {
PLUGIN_NAME: 'BARCODE',
RESET_CONFIG: 'true',
PARAM_LIST: {}
},
APP_LIST: [{
PACKAGE_NAME: 'org.greaterwms.scanner.app',
ACTIVITY_LIST: ['*']
}]
}
sendCommand('com.symbol.datawedge.api.SET_CONFIG', profileConfig)
var profileConfig2 = {
PROFILE_NAME: 'wms',
PROFILE_ENABLED: 'true',
CONFIG_MODE: 'UPDATE',
PLUGIN_CONFIG: {
PLUGIN_NAME: 'INTENT',
RESET_CONFIG: 'true',
PARAM_LIST: {
intent_output_enabled: 'true',
intent_action: 'com.zebra.cordovademo.ACTION',
intent_delivery: '2'
}
}
}
sendCommand('com.symbol.datawedge.api.SET_CONFIG', profileConfig2)
// Give some time for the profile to settle then query its value
setTimeout(function () {
sendCommand('com.symbol.datawedge.api.GET_ACTIVE_PROFILE', '')
}, 1000)
}
function datawedge65 () {
console.log('Datawedge 6.5 APIs are available')
sendCommandResults = 'true'
}
function commandReceived (commandText) {
console.log('commandReceived:', commandText)
}
function enumerateScanners (enumeratedScanners) {
var humanReadableScannerList = ''
for (var i = 0; i < enumeratedScanners.length; i++) {
console.log('Scanner found: name= ' + enumeratedScanners[i].SCANNER_NAME + ', id=' + enumeratedScanners[i].SCANNER_INDEX + ', connected=' + enumeratedScanners[i].SCANNER_CONNECTION_STATE)
humanReadableScannerList += enumeratedScanners[i].SCANNER_NAME
if (i < enumeratedScanners.length - 1) { humanReadableScannerList += ', ' }
}
console.log('enumerateScanners:', humanReadableScannerList)
}
function activeProfile (theActiveProfile) {
console.log('activeProfile:', theActiveProfile)
}
function barcodeScanned (scanData, timeOfScan) {
var scannedData = scanData.extras['com.symbol.datawedge.data_string']
console.log('scaned Data:' + scannedData)
document.getElementById('scannedBarcodes').value = ''
document.getElementById('scannedBarcodes').value = scannedData
document.getElementById('scannedBarcodes').dispatchEvent(new Event('input'))
}
function seuicDevice () {
document.addEventListener('deviceready', seuicOndeviceReady, false)
}
function seuicOndeviceReady () {
window.addEventListener('getcodedata', getData, false)
}
function getData (data) {
document.getElementById('scannedBarcodes').value = ''
document.getElementById('scannedBarcodes').value = data.data
document.getElementById('scannedBarcodes').dispatchEvent(new Event('input'))
}
function iDataDevice () {
document.addEventListener('deviceready', iDataOndeviceReady, false)
}
function iDataOndeviceReady () {
window.addEventListener('idatadata', getiData, false)
}
function getiData (data) {
document.getElementById('scannedBarcodes').value = ''
document.getElementById('scannedBarcodes').value = data.data
document.getElementById('scannedBarcodes').dispatchEvent(new Event('input'))
}
function playSuccAudio () {
navigator.notification.beep(1)
}
export default defineComponent({
name: 'ScanAPP',
data () {
return {
wholewidth: (this.screenwidth - 20) + '' + 'px',
wholeheight: (this.screenheight - 165) + '' + 'px',
handlewidth: (this.screenwidth - 22) + '' + 'px',
handleheight: (this.screenheight - 225) + '' + 'px'
}
},
setup () {
const $store = useStore()
const $router = useRouter()
const $route = useRoute()
const $q = useQuasar()
const bar_check = ref('')
const { t } = useI18n()
const fab1 = computed({
get: () => $store.state.fabchange.fab1,
})
const fab2 = computed({
get: () => $store.state.fabchange.fab2,
})
const fab3 = computed({
get: () => $store.state.fabchange.fab3,
})
const fab4 = computed({
get: () => $store.state.fabchange.fab4,
})
const oldlink = computed({
get: () => $store.state.linkchange.oldlink,
set: val => {
$store.commit('linkchange/OldLinkChanged', val)
}
})
const newlink = computed({
get: () => $store.state.linkchange.newlink,
set: val => {
$store.commit('linkchange/NewLinkChanged', val)
}
})
const screenwidth = computed({
get: () => $store.state.screenchange.screenwidth,
set: val => {
$store.commit('screenchange/screenwidthChanged', val)
}
})
const screenheight = computed({
get: () => $store.state.screenchange.screenheight,
set: val => {
$store.commit('screenchange/screenheightChanged', val)
}
})
const screenscroll = computed({
get: () => $store.state.screenchange.screenscroll,
set: val => {
$store.commit('screenchange/screenScrollChanged', val)
}
})
const authin = computed({
get: () => $store.state.loginauth.authin,
})
const login_name = computed({
get: () => $store.state.loginauth.login_name,
})
const operator = computed({
get: () => $store.state.loginauth.operator,
})
const openid = computed({
get: () => $store.state.settings.openid,
})
const lang = computed({
get: () => $store.state.langchange.lang,
})
const baseurl = computed({
get: () => $store.state.settings.server,
})
const scandata = computed({
get: () => $store.state.scanchanged.scandata,
set: val => {
$store.commit('scanchanged/ScanChanged', val)
}
})
const datadetail = computed({
get: () => $store.state.scanchanged.datadetail,
set: val => {
$store.commit('scanchanged/ScanDataChanged', val)
}
})
const asndata = computed({
get: () => $store.state.scanchanged.asndata,
set: val => {
$store.commit('scanchanged/ASNDataChanged', val)
}
})
const dndata = computed({
get: () => $store.state.scanchanged.dndata,
set: val => {
$store.commit('scanchanged/DNDataChanged', val)
}
})
const bindata = computed({
get: () => $store.state.scanchanged.bindata,
set: val => {
$store.commit('scanchanged/BinDataChanged', val)
}
})
const tablelist = computed({
get: () => $store.state.scanchanged.tablelist,
set: val => {
$store.commit('scanchanged/TableDataChanged', val)
}
})
const scanmode = computed({
get: () => $store.state.scanchanged.scanmode,
set: val => {
$store.commit('scanchanged/ScanModeChanged', val)
}
})
const bar_scanned = computed({
get: () => $store.state.scanchanged.bar_scanned,
set: val => {
$store.commit('scanchanged/BarScannedChanged', val)
}
})
const apiurl = computed({
get: () => $store.state.scanchanged.apiurl,
set: val => {
$store.commit('scanchanged/ApiUrlChanged', val)
}
})
const apiurlnext = computed({
get: () => $store.state.scanchanged.apiurlnext,
set: val => {
$store.commit('scanchanged/ApiUrlNextChanged', val)
}
})
const apiurlprevious = computed({
get: () => $store.state.scanchanged.apiurlprevious,
set: val => {
$store.commit('scanchanged/ApiUrlPreviousChanged', val)
}
})
const device_auth = computed({
get: () => $store.state.appversion.device_auth,
set: val => {
$store.commit('appversion/DeviceAuthChanged', val)
}
})
function onScroll (position) {
screenscroll.value = position.verticalPercentage
}
function getMobileData (e) {
axios.get(baseurl.value + '/scanner/list/' + e + '/',
{
headers: {
"Content-Type": 'application/json, charset="utf-8"',
"token" : openid.value,
"language" : lang.value,
"operator" : operator.value
}
}).then(res => {
if (!res.data.detail) {
scandata.value = ''
datadetail.value = ''
scanmode.value = ''
asndata.value = ''
dndata.value = ''
bindata.value = ''
scandata.value = res.data.code
scanmode.value = res.data.mode
bar_scanned.value = res.data.request_time
if (scanmode.value === 'ASN') {
asndata.value = res.data.code
} else if (scanmode.value === 'DN') {
dndata.value = res.data.code
} else if (scanmode.value === 'GOODS') {
scandata.value = res.data.code
} else if (scanmode.value === 'BINSET') {
bindata.value = res.data.code
}
} else {
$q.notify({
type: 'negative',
message: t('notice.mobile_scan.notice2')
})
}
}).catch(err => {
$q.notify({
type: 'negative',
message: t('notice.mobile_scan.notice3')
})
})
}
function MobileScan () {
cordova.plugins.barcodeScanner.scan(
function (result) {
bar_check.value = result.text
navigator.vibrate(100)
},
function (error) {
navigator.vibrate(100)
},
{
preferFrontCamera : false,
showFlipCameraButton : true,
showTorchButton : true,
disableSuccessBeep: false
}
);
}
function screanresize () {
let screensizewidth = $q.screen.width
let screensizeheight = $q.screen.height
screenwidth.value = screensizewidth
screenheight.value = screensizeheight
}
watch (bar_check,(newValue,oldValue)=>{
if (newValue !== oldValue) {
if (authin.value === '0') {
$q.notify({
type: 'negative',
message: t('notice.mobile_userlogin.notice9')
})
} else {
getMobileData(newValue)
}
}
})
onMounted(() => {
screanresize()
if (window.device) {
if (window.device.manufacturer === "Zebra Technologies") {
scanner.initialize()
} else if (window.device.manufacturer === "SEUIC") {
seuicDevice()
} else if (window.device.manufacturer === "iData") {
iDataDevice()
}
}
})
onBeforeUnmount(() => {
if (window.device) {
if (window.device.manufacturer === "Zebra Technologies") {
window.removeEventListener('deviceready', scanner.onDeviceReady, false)
} else if (window.device.manufacturer === "SEUIC") {
window.removeEventListener('deviceready', seuicOndeviceReady, false)
} else if (window.device.manufacturer === "iData") {
window.removeEventListener('deviceready', iDataOndeviceReady, false)
}
}
})
return {
t,
fab1,
fab2,
fab3,
fab4,
oldlink,
newlink,
screenwidth,
screenheight,
screenscroll,
onScroll,
authin,
login_name,
openid,
operator,
lang,
baseurl,
apiurl,
apiurlnext,
apiurlprevious,
scandata,
datadetail,
tablelist,
asndata,
dndata,
bindata,
scanmode,
bar_scanned,
bar_check,
device_auth,
thumbStyle: {
right: '4px',
borderRadius: '5px',
backgroundColor: '#027be3',
width: '5px',
opacity: 0.75
},
barStyle: {
right: '2px',
borderRadius: '9px',
backgroundColor: '#027be3',
width: '9px',
opacity: 0.2
},
StartScan () {
if (window.device) {
MobileScan()
} else {
$q.notify({
type: 'negative',
message: t('notice.mobile_scan.notice4')
})
}
},
BackButton () {
$router.push({ name: oldlink.value })
}
}
}
})

// This is just an example,
// so you can safely delete all default props below
export default {
failed: 'Action failed',
success: 'Action was successful',
index: {
only_id: 'Software Code',
only_title: 'Need to verify the software code',
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>',
app_title: 'APP Title',
slogan: 'Slogan',
server: 'Request Baseurl',
index_title: 'Open Source Inventory System',
webtitle: 'GreaterWMS--Open Source Warehouse Management System',
home: 'Home',
title: 'GreaterWMS',
title_tip: 'GreaterWMS Home',
hide_menu: 'Hide Menu',
api: 'API DOCS',
translate: 'Choose Language',
unread: 'Unread Message',
login: 'Login',
register: 'Register',
login_tip: 'Enter Your OPENID & Login Name',
register_tip: 'Register An Admin',
logout: 'Logout',
user_login: 'User Login',
admin_login: 'Admin Login',
return_to_login: 'Return To Login Page',
user_center: 'User Center',
change_user: 'Change User',
view_my_openid: 'View My OPENID',
your_openid: 'Your OPENID',
contact_list: 'Recent Contact',
chat_more: 'Load More',
chat_no_more: 'No More Message',
chat_send: 'Send',
previous: 'Previous',
next: 'Next',
admin_name: 'Admin',
password: 'Password',
confirm_password: 'Confirm Password',
staff_name: 'User Name',
cancel: 'Cancel',
close: 'Close',
submit: 'Submit',
download: 'Download',
updatetitle: 'Update Ready',
updatedesc: 'Version Can Update Now',
update: 'Update Now',
chart: ' Chart',
current_user: 'Current User'
},
Settings: {
index: 'Settings',
server: 'Server',
equipment: 'Equipment Support',
only_id: 'Device Label',
},
menuItem: {
dashboard: 'Dashboard',
inbound: 'Inbound',
outbound: 'Outbound',
stock: 'Inventory',
finance: 'Finance',
goods: 'GoodsList',
baseinfo: 'Base Info',
warehouse: 'Warehouse',
staff: 'Staff',
driver: 'Driver',
customerdn: 'Customer DN',
supplierasn: 'Supplieer ASN',
uploadcenter: 'Upload Center',
downloadcenter: 'Download Center'
},
contact: 'Contact',
sendmessage: 'Send A Message',
send: 'Send',
nomoremessage: 'No More Message',
loadmore: 'Load More',
new: 'new',
newtip: 'New A Data',
refresh: 'Refresh',
refreshtip: 'Refresh All Data',
edit: 'Edit This Data',
confirmedit: 'Confirm Edit Data',
canceledit: 'Cancel Edit Data',
delete: 'Delete This Data',
deletetip: 'This is an irreversible process.',
confirmdelete: 'Confirm Delete Data',
canceldelete: 'Cancel Delete Data',
download: 'Download',
downloadtip: 'Download All Data',
frombin: 'From Bin',
movetobin: 'Move to Bin',
putaway: 'PutAway',
cyclecount: 'Cycle Count',
cyclecountrecorder: 'Count Recorder',
search: 'Search Word',
creater: 'Creater',
createtime: 'Cteate Time',
updatetime: 'Update Time',
action: 'Action',
previous: 'Previous',
next: 'Next',
no_data: 'No More Data',
submit: 'Submit',
cancel: 'Cancel',
estimate: 'Estimate Freight',
downloadasnlist: 'Download List',
downloadasndetail: 'Download Detail',
downloadasnlisttip: 'Download All ASN List',
downloadasndetailtip: 'Download All ASN Detail',
printthisasn: 'Print this ASN',
confirmdelivery: 'Confirm Delivery',
finishloading: 'Finish Loading',
confirmsorted: 'Confirm Sorted',
downloaddnlist: 'Download List',
downloaddndetail: 'Download Detail',
downloaddnlisttip: 'Download All DN List',
downloaddndetailtip: 'Download All DN Detail',
release: 'Order Release',
releaseallorder: 'Release All Order',
releaseorder: 'Release Order',
print: 'Print Picking List',
printthisdn: 'Print this DN',
confirmorder: 'Confirm Order',
confirmpicked: 'Confirm Picked',
dispatch: 'Dispatch & Shipping',
deletebackorder: 'Delete Back Order',
confirminventoryresults: 'Confirm Inventory Results',
baseinfo: {
company_info: 'Company Info',
supplier: 'Supplier',
customer: 'Customer',
view_company: {
company_name: 'Company Name',
company_city: 'Company City',
company_address: 'Company Address',
company_contact: 'Company Contact',
company_manager: 'Company Manager',
error1: 'Please Enter The Company Name',
error2: 'Please Enter The Company City',
error3: 'Please Enter The Company Address',
error4: 'Please Enter The Company Contact',
error5: 'Please Enter The Company Manager'
},
view_supplier: {
supplier_name: 'Supplier Name',
supplier_city: 'Supplier City',
supplier_address: 'Supplier Address',
supplier_contact: 'Supplier Contact',
supplier_manager: 'Supplier Manager',
supplier_level: 'Supplier Level',
error1: 'Please Enter the Supplier Name',
error2: 'Please Enter the Supplier City',
error3: 'Please Enter the Supplier Address',
error4: 'Please Enter the Supplier Contact',
error5: 'Please Enter the Supplier Manager',
error6: 'Please Enter the Supplier Level'
},
view_customer: {
customer_name: 'Customer Name',
customer_city: 'Customer City',
customer_address: 'Customer Address',
customer_contact: 'Customer Contact',
customer_manager: 'Customer Manager',
customer_level: 'Customer Level',
error1: 'Please Enter the Customer Name',
error2: 'Please Enter the Customer City',
error3: 'Please Enter the Customer Address',
error4: 'Please Enter the Customer Contact',
error5: 'Please Enter the Customer Manager',
error6: 'Please Enter the Customer Level'
}
},
dashboards: {
outbound_statements: 'Outbound',
inbound_statements: 'Inbound',
inbound_and_outbound_statements: 'Inbound And Outbound',
total_sales: 'Total Sales',
sales_volume_ranking: 'Sales Volume Ranking',
sales_volumes_ranking: 'Sales Volumes Ranking',
total_receipts: 'Total Receipts',
receiving_quantity_ranking: 'Receiving Quantity Ranking',
Receiving_amount_ranking: 'Receiving Amount Ranking',
view_tradelist: {
mode_code: 'Mode Of Doing Business',
bin_name: 'Location Name',
goods_code: 'Goods Code',
goods_qty: 'Quantity On Hand',
creater: 'Creater',
update_time: 'Update Time',
create_time: 'Create Time',
inbound: 'Inbound',
outbound: 'Outbound'
}
},
finance: {
capital: 'Capital',
freight: 'Freight',
view_capital: {
capital_name: 'Cpaital Name',
capital_qty: 'Capital Qty',
capital_cost: 'Capital Cost',
error1: 'Please Enter the Capital Name',
error2: 'Capital Qty width must greater than 0',
error3: 'Capital Cost depth must greater than 0'
},
view_freight: {
transportation_supplier: 'Transportation Supplier',
send_city: 'Send City',
receiver_city: 'Receiver City',
weight_fee: 'Weight Fee',
volume_fee: 'Volume Fee',
min_payment: 'Min Payment',
error1: 'Please Enter the Transportation Supplier',
error2: 'Please Enter the Send City',
error3: 'Please Enter the Receiver City',
error4: 'Weight Fee must greater than 0',
error5: 'Volume Fee must greater than 0',
error6: 'Min Payment must greater than 0'
}
},
driver: {
driver: 'Driver',
dispatchlist: 'Dispatch List',
error1: 'Please Enter the Driver Name',
error2: 'Please Enter the License Plate',
error3: 'Please Enter The Contact',
view_driver: {
driver_name: 'Driver Name',
license_plate: 'License Plate',
contact: 'Contact'
},
view_dispatch: {
driver_name: 'Driver Name',
dn_code: 'DN Code',
contact: 'Contact'
}
},
upload_center: {
initializeupload: 'Initialize upload',
uploadfiles: 'Upload',
upload: 'Upload',
uploadcustomerfile: 'Upload Customerfile',
uploadgoodslistfile: 'Upload GoodslistFile',
uploadsupplierfile: 'Upload SupplierFile',
downloadgoodstemplate: 'Goods Example',
downloadcustomertemplate: 'Customer Example',
downloadsuppliertemplate: 'Supplier Example',
addupload: 'Add Upload'
},
download_center: {
createTime: 'Create Time',
reset: 'Reset',
start: 'Start',
end: 'End'
},
community_mall: {
communitymall: 'Community Mall'
},
goods: {
goods_list: 'Goods List',
unit: 'Unit',
class: 'Class',
color: 'Color',
brand: 'Brand',
shape: 'Shape',
specs: 'Specs',
origin: 'Origin',
view_goodslist: {
goods_code: 'Goods Code',
goods_desc: 'Goods Desc',
goods_name: 'Goods Name',
goods_supplier: 'Goods Supplier',
goods_weight: 'Goods Weight(Unit:g)',
goods_w: 'Goods Width(Unit:mm)',
goods_d: 'Goods Depth(Unit:mm)',
goods_h: 'Goods Height(Unit:mm)',
unit_volume: 'Unit Volume',
goods_unit: 'Goods Unit',
goods_class: 'Goods Class',
goods_brand: 'Goods Brand',
goods_color: 'Goods Color',
goods_shape: 'Goods Shape',
goods_specs: 'Goods Specs',
goods_origin: 'Goods Origin',
goods_cost: 'Goods Cost',
goods_price: 'Goods Price',
print_goods_label: 'Print Goods Label',
error1: 'Please Enter the Goods Code',
error2: 'Please Enter the Goods Description',
error3: 'Please Enter the Supplier',
error4: 'Goods Weight Must Greater Than 0',
error5: 'Goods Width Must Greater Than 0',
error6: 'Goods Depth Must Greater Than 0',
error7: 'Goods Height Must Greater Than 0',
error8: 'Please Enter the Goods Cost',
error9: 'Please Enter the Goods Price'
},
view_unit: {
goods_unit: 'Goods Unit',
error1: 'Please Enter Goods Unit'
},
view_class: {
goods_class: 'Goods Class',
error1: 'Please Enter Goods Class'
},
view_color: {
goods_color: 'Goods Color',
error1: 'Please Enter Goods Color'
},
view_brand: {
goods_brand: 'Goods Brand',
error1: 'Please Enter Goods Brand'
},
view_shape: {
goods_shape: 'Goods Shape',
error1: 'Please Enter Goods Shape'
},
view_specs: {
goods_specs: 'Goods Specs',
error1: 'Please Enter Goods Specs'
},
view_origin: {
goods_origin: 'Goods Origin',
error1: 'Please Enter Goods Origin'
}
},
inbound: {
asn: 'ASN',
predeliverystock: 'Pre Delivery',
preloadstock: 'Pre Load',
presortstock: 'Sorting',
sortstock: 'Sorted',
shortage: 'Shortage',
more: 'More QTY',
asnfinish: 'Receiving List',
asndone: 'Finish Receiving',
view_sortstock: {
error1: 'Please Enter The Quantity Must Be Greater Than 0'
},
view_asn: {
asn_code: 'ASN Code',
asn_status: 'ASN Status',
goods_qty: 'ASN QTY',
goods_actual_qty: 'Actual Arrive Qty',
goods_shortage_qty: 'Arrive Shortage Qty',
goods_more_qty: 'Arrive More Qty',
goods_damage_qty: 'Arrive Damage Qty',
presortstock: 'Pre Sort Qty',
sorted_qty: 'Sorted Qty',
total_weight: 'Total Weight(Unit:KG)',
total_volume: 'Total Volume(Unit:Cubic Metres)'
}
},

outbound: {
dn: 'DN',
freshorder: 'Pre Order',
neworder: 'New Order',
backorder: 'Back Order',
pickstock: 'Pre Pick',
pickedstock: 'Picked',
pickinglist: 'Picking List',
shippedstock: 'Shipping List',
received: 'Received',
pod: 'Proof Of Delivery',
view_dn: {
dn_code: 'DN Code',
dn_status: 'DN Status',
goods_qty: 'Order QTY',
intransit_qty: 'Shipping QTY',
delivery_actual_qty: 'Delivery Actual QTY',
delivery_shortage_qty: 'Delivery Shortage QTY',
delivery_more_qty: 'Delivery More QTY',
delivery_damage_qty: 'Delivery Damage QTY',
total_weight: 'Total Weight(Unit:KG)',
total_volume: 'Total Volume(Unit:Cubic Metres)',
customer: 'Customer'
}
},
staff: {
staff: 'Staff',
check_code: 'Check Code',
view_staff: {
staff_name: 'Staff Name',
staff_type: 'Staff Type',
error1: 'Please Enter The Staff Name',
error2: 'Please Enter The Staff Type',
lock: 'lock',
unlock: 'unlock'
}
},
stock: {
stocklist: 'Stock List',
stockbinlist: 'Bin List',
emptybin: 'Empty Bin',
occupiedbin: 'Occupied Bin',
view_stocklist: {
goods_code: 'Goods Code',
goods_desc: 'Goods Desc',
goods_name: 'Goods Name',
goods_qty: 'Total Qty',
onhand_stock: 'On hand',
can_order_stock: 'Can Order',
ordered_stock: 'Ordered Stock',
inspect_stock: 'Inspect',
hold_stock: 'Holding',
damage_stock: 'Damage',
asn_stock: 'ASN Stock',
dn_stock: 'DN Stock',
pre_load_stock: 'Pre Load',
pre_sort_stock: 'Pre Sort',
sorted_stock: 'Sorted Stock',
pick_stock: 'Pick Stock',
picked_stock: 'Picked Stock',
back_order_stock: 'Back Order',
on_hand_inventory: 'On-Hand Inventory',
history_inventory: 'History Inventory',
physical_inventory: 'Physical Inventory',
difference: ' Difference',
cyclecount: 'Cycle Count',
recyclecount: 'Recycle',
downloadcyclecount: 'Counting table',
cyclecountresult: 'Confirm result',
cyclecounttip: 'Generate A Dynamic Cycle Count Table',
recyclecounttip: 'Generate A Recycle Count Table',
downloadcyclecounttip: 'Download Cycle Count Table',
cyclecountresulttip: 'Confirm The Cycle Count Result',
daychoice: 'Date Selection',
daychoicetip: 'Select The Cycle Count Table Corresponding To The Date',
error1: 'Count Quantity Must Be Greater Than 0',
dateerror: 'Incorrect Date Selected'
}
},
warehouse: {
warehouse: 'Warehouse',
binset: 'Bin Set',
binsize: 'Bin Size',
property: 'Bin Property',
printbin: 'Print Bin Label',
view_warehouseset: {
error1: 'Please Enter the Warehouse Name',
error2: 'Please Enter The Warehouse City',
error3: 'Please Enter The Warehouse Address',
error4: 'Please Enter the Warehouse Contact',
error5: 'Please Enter The Warehouse Manager'
},
view_warehouse: {
warehouse_name: 'Warehouse Name',
warehouse_city: 'Warehouse City',
warehouse_address: 'Warehouse Address',
warehouse_contact: 'Warehouse Contact',
warehouse_manager: 'Warehouse Manager'
},
view_binset: {
bin_name: 'Bin Name',
bin_size: 'Bin Size',
bin_property: 'Bin Property',
empty_label: 'Empty Label',
error1: 'Please Enter the Bin Name',
error2: 'Please Enter the Bin Size',
error3: 'Please Enter the Bin Property'
},
view_binsize: {
bin_size: 'Bin Size',
bin_size_w: 'Bin Size Wide(Unit:mm)',
bin_size_d: 'Bin Size Depth(Unit:mm)',
bin_size_h: 'Bin Size Height(Unit:mm)',
error1: 'Please Enter the Bin_size',
error2: 'Bin Size width must greater than 0',
error3: 'Bin Size depth must greater than 0',
error4: 'Bin Size height must greater than 0'
},
view_property: {
bin_property: 'Bin Property'
}
},
scan: {
scan: 'Scan',
scan_asn: 'ASN query',
scan_dn: 'DN query',
scan_sorting: 'Sorting',
scan_uptobin: 'Up To Bin',
scan_picking: 'Picking',
scan_shipping: 'Shipping',
scan_movetobin: 'Move To Bin',
scan_inventory: 'Inventory',
scan_goodsquery: 'Goods query',
scan_locationquery: 'Location query',
scan_goods_code: 'Goods Code',
scan_bin_name: 'Bin Name',
scan_goods_label: 'Goods label',
scan_goods_label_error: 'The Goods Label Does Not Exist',
view_binmove: {
old_bin_name: 'Original Bin name',
new_bin_name: 'New Bin Name',
qty: 'Number of Goods Moved',
qty_error: 'The Quantity To Be Moved Cannot Be Greater Than The Existing quantity'
},
view_upToBin: {
goods_actual_qty: 'Actual Arrival Quantity',
scan_qty: 'Scanned Qty',
scan_qty_error: 'The Scan Quantity Cannot Be Greater Than The Arrival Quantity'
},
view_picking: {
order_qty: 'Order Quantity',
picking_qty: 'Pick quantity',
picking_qty_error: 'The Picking Quantity Cannot Be Greater Than The Order Quantity'
},
view_shipping: {
shipping_code: 'Shipment Number',
driver_info: 'Driver Information',
license_plate_number: 'License Plate Number',
name: 'Name',
contact_info: 'Contact Information'
}
},
handcount: {
handcount: 'Single Count',
handcountrecorder: 'Single Count Recorder',
update_time: 'Count Time'
},
notice: {
valerror: 'Please Enter The Correct Value',
unknow_error: 'Unknown Error',
network_error: 'Network Exception',
cyclecounterror: 'No data',
userererror: 'Username already Exists',
capitalerror: 'Fixed Asset Name Already Exists',
valuenullerror: 'Please Fill In The Complete Data',
loginerror: 'Please Login First',
detail: 'Detail',
goodserror: {
goods_listerror: 'The product code already exists',
goods_uniterror: 'Goods unit already exists',
goods_classerror: 'Goods category already exists',
goods_colorerror: 'Goods color already exists',
goods_branderror: 'The product brand already exists',
goods_shapeerror: 'Goods shape already exists',
goods_specserror: 'Goods specification already exists',
goods_originerror: 'The origin of goods already exists'
},
baseinfoerror: {
companyerror: 'Company name already exists',
customererror: 'Customer name already exists',
suppliererror: 'Supplier name already exists'
},
warehouseerror: {
binseterror: 'The bin name already exists',
binsizeerror: 'bin size already exists'
},
mobile_userlogin: {
notice1: 'Please enter your administrator name',
notice2: 'Please enter your administrator password',
notice3: 'Please enter your staff name',
notice4: 'Please enter your staff verification code',
notice5: 'Please enter your Openid in the settings server',
notice6: 'Successful login',
notice7: 'User or password mismatch',
notice8: 'Employee or inspection code mismatch',
notice9: 'Please login first'
},
mobile_scan: {
notice1: 'QR code does not exist',
notice2: 'Code does not exist',
notice3: 'Server Error',
notice4: 'Only mobile can scan'
},
mobile_asn: {
notice1: 'ASN List',
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',
notice3: 'Supplier:',
notice4: 'Total amount:',
notice5: 'Status:',
notice6: 'Details of the arrival notice',
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',
notice8: 'Details',
notice9: 'Total amount:',
notice10: 'Number to be listed:',
notice11: 'The number of listings must be greater than 0',
notice12: 'Successful listing',
notice13: 'Please enter the location code'
},
mobile_dn: {
notice1: 'DN List',
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',
notice3: 'Customer:',
notice4: 'Total amount:',
notice5: 'Status:',
notice6: 'DN details',
notice7: 'The details of the DN are all invoices. Scan the DN Number to view the details of the specific DN',
notice8: 'Details',
notice9: 'Total amount:',
notice10: 'Invoice quantity:',
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',
notice12: 'Please enter the specific picking quantity',
notice13: 'Successful Picking',
notice14: 'Bin name:',
notice15: 'Quantity to be picked:',
notice16: 'Picked Quantity Must More Than 0'
},
mobile_goodsstock: {
notice1: 'Stock List',
notice2: 'Here you can see all the inventory information, click to view the inventory information directly',
notice3: 'On-Hand Stock:',
notice4: 'Can Ordered Stock:'
},
mobile_binstock: {
notice1: 'Bin Stock List',
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',
notice3: 'Bin Name:',
notice4: 'Storage quantity:',
notice5: 'Please enter the Bin Name',
notice6: 'Repository moved successfully'
},
mobile_emptybin: {
notice1: 'Empty Bin list',
notice2: 'Here you can see all the empty location',
notice3: 'Stock Bin Property:'
},
equipment: {
notice1: 'Equipment Support List',
notice2: 'All device brands and systems supported by the APP are listed here'
},
handcount: {
notice1: 'Details',
notice2: 'Manual Count',
notice3: 'On-Hand Stock',
notice4: 'Count Quantity',
notice5: 'Confirm Result',
notice6: 'Confirm The Count Result',
notice7: 'Successful Confirmed Count Result',
notice8: 'Here shows the details of the goods that need to be counted'
},
version: {
new: 'New Version Update',
detail: 'Please go to the GreaterWMS official website, https://www.56yhz.com/, to download the latest version of the APP'
},
400: 'Bad request (400)',
401: 'Authorization not obtained (401)',
403: 'Access denied (403)',
404: 'Resource does not exist (404)',
405: 'The function is disabled (405)',
408: 'Request timed out (408)',
409: 'Data conflict (409)',
410: 'Data has been deleted (410)',
500: 'Server error (500)',
501: 'Service not implemented (501)',
502: 'Network error (502)',
503: 'Service unavailable (503)',
504: 'Network timeout (504)',
505: 'HTTP version is not supported (505)'
}

staff: {
staff: 'Staff',
check_code: 'Check Code',
view_staff: {
staff_name: 'Staff Name',
staff_type: 'Staff Type',
error1: 'Please Enter The Staff Name',
error2: 'Please Enter The Staff Type',
lock: 'lock',
unlock: 'unlock'
}
},
stock: {
stocklist: 'Stock List',
stockbinlist: 'Bin List',
emptybin: 'Empty Bin',
occupiedbin: 'Occupied Bin',
view_stocklist: {
goods_code: 'Goods Code',
goods_desc: 'Goods Desc',
goods_name: 'Goods Name',
goods_qty: 'Total Qty',
onhand_stock: 'On hand',
can_order_stock: 'Can Order',
ordered_stock: 'Ordered Stock',
inspect_stock: 'Inspect',
hold_stock: 'Holding',
damage_stock: 'Damage',
asn_stock: 'ASN Stock',
dn_stock: 'DN Stock',
pre_load_stock: 'Pre Load',
pre_sort_stock: 'Pre Sort',
sorted_stock: 'Sorted Stock',
pick_stock: 'Pick Stock',
picked_stock: 'Picked Stock',
back_order_stock: 'Back Order',
on_hand_inventory: 'On-Hand Inventory',
history_inventory: 'History Inventory',
physical_inventory: 'Physical Inventory',
difference: ' Difference',
cyclecount: 'Cycle Count',
recyclecount: 'Recycle',
downloadcyclecount: 'Counting table',
cyclecountresult: 'Confirm result',
cyclecounttip: 'Generate A Dynamic Cycle Count Table',
recyclecounttip: 'Generate A Recycle Count Table',
downloadcyclecounttip: 'Download Cycle Count Table',
cyclecountresulttip: 'Confirm The Cycle Count Result',
daychoice: 'Date Selection',
daychoicetip: 'Select The Cycle Count Table Corresponding To The Date',
error1: 'Count Quantity Must Be Greater Than 0',
dateerror: 'Incorrect Date Selected'
}
},
warehouse: {
warehouse: 'Warehouse',
binset: 'Bin Set',
binsize: 'Bin Size',
property: 'Bin Property',
printbin: 'Print Bin Label',
view_warehouseset: {
error1: 'Please Enter the Warehouse Name',
error2: 'Please Enter The Warehouse City',
error3: 'Please Enter The Warehouse Address',
error4: 'Please Enter the Warehouse Contact',
error5: 'Please Enter The Warehouse Manager'
},
view_warehouse: {
warehouse_name: 'Warehouse Name',
warehouse_city: 'Warehouse City',
warehouse_address: 'Warehouse Address',
warehouse_contact: 'Warehouse Contact',
warehouse_manager: 'Warehouse Manager',
square_measure: 'Usable Area',
city_search: 'City Search',
publish_warehouse: 'Publish Warehouse',
Nopublish_warehouse: 'Recall Warehouse'
},
view_binset: {
bin_name: 'Bin Name',
bin_size: 'Bin Size',
bin_property: 'Bin Property',
empty_label: 'Empty Label',
error1: 'Please Enter the Bin Name',
error2: 'Please Enter the Bin Size',
error3: 'Please Enter the Bin Property'
},
view_binsize: {
bin_size: 'Bin Size',
bin_size_w: 'Bin Size Wide(Unit:mm)',
bin_size_d: 'Bin Size Depth(Unit:mm)',
bin_size_h: 'Bin Size Height(Unit:mm)',
error1: 'Please Enter the Bin_size',
error2: 'Bin Size width must greater than 0',
error3: 'Bin Size depth must greater than 0',
error4: 'Bin Size height must greater than 0'
},
view_property: {
bin_property: 'Bin Property'
}
},
scan: {
scan: 'Scan',
scan_asn: 'ASN query',
scan_dn: 'DN query',
scan_sorting: 'Sorting',
scan_uptobin: 'Up To Bin',
scan_picking: 'Picking',
scan_shipping: 'Shipping',
scan_movetobin: 'Move To Bin',
scan_inventory: 'Inventory',
scan_goodsquery: 'Goods query',
scan_locationquery: 'Location query',
scan_goods_code: 'Goods Code',
scan_bin_name: 'Bin Name',
scan_goods_label: 'Goods label',
scan_goods_label_error: 'The Goods Label Does Not Exist',
view_binmove: {
old_bin_name: 'Original Bin name',
new_bin_name: 'New Bin Name',
qty: 'Number of Goods Moved',
qty_error: 'The Quantity To Be Moved Cannot Be Greater Than The Existing quantity'
},
view_upToBin: {
goods_actual_qty: 'Actual Arrival Quantity',
scan_qty: 'Scanned Qty',
scan_qty_error: 'The Scan Quantity Cannot Be Greater Than The Arrival Quantity'
},
view_picking: {
order_qty: 'Order Quantity',
picking_qty: 'Pick quantity',
picking_qty_error: 'The Picking Quantity Cannot Be Greater Than The Order Quantity'
},
view_shipping: {
shipping_code: 'Shipment Number',
driver_info: 'Driver Information',
license_plate_number: 'License Plate Number',
name: 'Name',
contact_info: 'Contact Information'
}
},
handcount: {
handcount: 'Single Count',
handcountrecorder: 'Single Count Recorder',
update_time: 'Count Time'
},
notice: {
valerror: 'Please Enter The Correct Value',
unknow_error: 'Unknown Error',
network_error: 'Network Exception',
cyclecounterror: 'No data',
userererror: 'Username already Exists',
capitalerror: 'Fixed Asset Name Already Exists',
valuenullerror: 'Please Fill In The Complete Data',
loginerror: 'Please Login First',
detail: 'Detail',
goodserror: {
goods_listerror: 'The product code already exists',
goods_uniterror: 'Goods unit already exists',
goods_classerror: 'Goods category already exists',
goods_colorerror: 'Goods color already exists',
goods_branderror: 'The product brand already exists',
goods_shapeerror: 'Goods shape already exists',
goods_specserror: 'Goods specification already exists',
goods_originerror: 'The origin of goods already exists'
},
baseinfoerror: {
companyerror: 'Company name already exists',
customererror: 'Customer name already exists',
suppliererror: 'Supplier name already exists'
},
warehouseerror: {
binseterror: 'The bin name already exists',
binsizeerror: 'bin size already exists'
},
mobile_userlogin: {
notice1: 'Please enter your administrator name',
notice2: 'Please enter your administrator password',
notice3: 'Please enter your staff name',
notice4: 'Please enter your staff verification code',
notice5: 'Please enter your Openid in the settings server',
notice6: 'Successful login',
notice7: 'User or password mismatch',
notice8: 'Employee or inspection code mismatch',
notice9: 'Please login first'
},
mobile_scan: {
notice1: 'QR code does not exist',
notice2: 'Code does not exist',
notice3: 'Server Error',
notice4: 'Only mobile can scan'
},
mobile_asn: {
notice1: 'ASN List',
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',
notice3: 'Supplier:',
notice4: 'Total amount:',
notice5: 'Status:',
notice6: 'Details of the arrival notice',
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',
notice8: 'Details',
notice9: 'Total amount:',
notice10: 'Number to be listed:',
notice11: 'The number of listings must be greater than 0',
notice12: 'Successful listing',
notice13: 'Please enter the location code'
},
mobile_dn: {
notice1: 'DN List',
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',
notice3: 'Customer:',
notice4: 'Total amount:',
notice5: 'Status:',
notice6: 'DN details',
notice7: 'The details of the DN are all invoices. Scan the DN Number to view the details of the specific DN',
notice8: 'Details',
notice9: 'Total amount:',
notice10: 'Invoice quantity:',
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',
notice12: 'Please enter the specific picking quantity',
notice13: 'Successful Picking',
notice14: 'Bin name:',
notice15: 'Quantity to be picked:'
},
mobile_goodsstock: {
notice1: 'Stock List',
notice2: 'Here you can see all the inventory information, click to view the inventory information directly',
notice3: 'On-Hand Stock:',
notice4: 'Can Ordered Stock:'
},
mobile_binstock: {
notice1: 'Bin Stock List',
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',
notice3: 'Bin Name:',
notice4: 'Storage quantity:',
notice5: 'Please enter the Bin Name',
notice6: 'Repository moved successfully'
},
mobile_emptybin: {
notice1: 'Empty Bin list',
notice2: 'Here you can see all the empty location',
notice3: 'Stock Bin Property:'
},
equipment: {
notice1: 'Equipment Support List',
notice2: 'All device brands and systems supported by the APP are listed here'
},
handcount: {
notice1: 'Details',
notice2: 'Manual Count',
notice3: 'On-Hand Stock',
notice4: 'Count Quantity',
notice5: 'Confirm Result',
notice6: 'Confirm The Count Result',
notice7: 'Successful Confirmed Count Result',
notice8: 'Here shows the details of the goods that need to be counted'
},
400: 'Bad request (400)',
401: 'Authorization not obtained (401)',
403: 'Access denied (403)',
404: 'Resource does not exist (404)',
405: 'The function is disabled (405)',
408: 'Request timed out (408)',
409: 'Data conflict (409)',
410: 'Data has been deleted (410)',
500: 'Server error (500)',
501: 'Service not implemented (501)',
502: 'Network error (502)',
503: 'Service unavailable (503)',
504: 'Network timeout (504)',
505: 'HTTP version is not supported (505)'
}

/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/* global Windows, createUUID */
var ROOT_CONTAINER = '{00000000-0000-0000-FFFF-FFFFFFFFFFFF}';
var DEVICE_CLASS_KEY = '{A45C254E-DF1C-4EFD-8020-67D146A850E0},10';
var DEVICE_CLASS_KEY_NO_SEMICOLON = '{A45C254E-DF1C-4EFD-8020-67D146A850E0}10';
var ROOT_CONTAINER_QUERY = 'System.Devices.ContainerId:="' + ROOT_CONTAINER + '"';
var HAL_DEVICE_CLASS = '4d36e966-e325-11ce-bfc1-08002be10318';
var DEVICE_DRIVER_VERSION_KEY = '{A8B865DD-2E3D-4094-AD97-E593A70C75D6},3';
module.exports = {
getDeviceInfo: function (win, fail, args) {
// deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId
var deviceId;
// get deviceId, or create and store one
var localSettings = Windows.Storage.ApplicationData.current.localSettings;
if (localSettings.values.deviceId) {
deviceId = localSettings.values.deviceId;
} else {
// App-specific hardware id could be used as uuid, but it changes if the hardware changes...
try {
var ASHWID = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null).id;
deviceId = Windows.Storage.Streams.DataReader.fromBuffer(ASHWID).readGuid();
} catch (e) {
// Couldn't get the hardware UUID
deviceId = createUUID();
}
// ...so cache it per-install
localSettings.values.deviceId = deviceId;
}
var userAgent = window.clientInformation.userAgent;
// this will report "windows" in windows8.1 and windows phone 8.1 apps
// and "windows8" in windows 8.0 apps similar to cordova.js
// See https://github.com/apache/cordova-js/blob/master/src/windows/platform.js#L25
var devicePlatform = userAgent.indexOf('MSAppHost/1.0') === -1 ? 'windows' : 'windows8';
var versionString = userAgent.match(/Windows (?:Phone |NT )?([0-9.]+)/)[1];
var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
// Running in the Windows Simulator is a remote session.
// Running in the Windows Phone Emulator has the systemProductName set to "Virtual"
var isVirtual = Windows.System.RemoteDesktop.InteractiveSession.isRemote || deviceInfo.systemProductName === 'Virtual';
var manufacturer = deviceInfo.systemManufacturer;
var model = deviceInfo.systemProductName;
var Pnp = Windows.Devices.Enumeration.Pnp;
Pnp.PnpObject.findAllAsync(Pnp.PnpObjectType.device, [DEVICE_DRIVER_VERSION_KEY, DEVICE_CLASS_KEY], ROOT_CONTAINER_QUERY).then(
function (rootDevices) {
for (var i = 0; i < rootDevices.length; i++) {
var rootDevice = rootDevices[i];
if (!rootDevice.properties) continue;
if (rootDevice.properties[DEVICE_CLASS_KEY_NO_SEMICOLON] === HAL_DEVICE_CLASS) {
versionString = rootDevice.properties[DEVICE_DRIVER_VERSION_KEY];
break;
}
}
setTimeout(function () {
win({
platform: devicePlatform,
version: versionString,
uuid: deviceId,
isVirtual: isVirtual,
model: model,
manufacturer: manufacturer
});
}, 0);
}
);
}
}; // exports

public class BarcodeScanner extends CordovaPlugin {
public static final int REQUEST_CODE = 0x0ba7c;
private static final String SCAN = "scan";
private static final String ENCODE = "encode";
private static final String CANCELLED = "cancelled";
private static final String FORMAT = "format";
private static final String TEXT = "text";
private static final String DATA = "data";
private static final String TYPE = "type";
private static final String PREFER_FRONTCAMERA = "preferFrontCamera";
private static final String ORIENTATION = "orientation";
private static final String SHOW_FLIP_CAMERA_BUTTON = "showFlipCameraButton";
private static final String RESULTDISPLAY_DURATION = "resultDisplayDuration";
private static final String SHOW_TORCH_BUTTON = "showTorchButton";
private static final String TORCH_ON = "torchOn";
private static final String SAVE_HISTORY = "saveHistory";
private static final String DISABLE_BEEP = "disableSuccessBeep";
private static final String FORMATS = "formats";
private static final String PROMPT = "prompt";
private static final String TEXT_TYPE = "TEXT_TYPE";
private static final String EMAIL_TYPE = "EMAIL_TYPE";
private static final String PHONE_TYPE = "PHONE_TYPE";
private static final String SMS_TYPE = "SMS_TYPE";
private static final String LOG_TAG = "BarcodeScanner";
private String [] permissions = { Manifest.permission.CAMERA };
private JSONArray requestArgs;
private CallbackContext callbackContext;
/**
* Constructor.
*/
public BarcodeScanner() {
}
/**
* Executes the request.
*
* This method is called from the WebView thread. To do a non-trivial amount of work, use:
* cordova.getThreadPool().execute(runnable);
*
* To run on the UI thread, use:
* cordova.getActivity().runOnUiThread(runnable);
*
* @param action The action to execute.
* @param args The exec() arguments.
* @param callbackContext The callback context used when calling back into JavaScript.
* @return Whether the action was valid.
*
* @sa https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaPlugin.java
*/
@Override
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
this.callbackContext = callbackContext;
this.requestArgs = args;
if (action.equals(ENCODE)) {
JSONObject obj = args.optJSONObject(0);
if (obj != null) {
String type = obj.optString(TYPE);
String data = obj.optString(DATA);
// If the type is null then force the type to text
if (type == null) {
type = TEXT_TYPE;
}
if (data == null) {
callbackContext.error("User did not specify data to encode");
return true;
}
encode(type, data);
} else {
callbackContext.error("User did not specify data to encode");
return true;
}
} else if (action.equals(SCAN)) {
//android permission auto add
if(!hasPermisssion()) {
requestPermissions(0);
} else {
scan(args);
}
} else {
return false;
}
return true;
}
/**
* Starts an intent to scan and decode a barcode.
*/
public void scan(final JSONArray args) {
final CordovaPlugin that = this;
cordova.getThreadPool().execute(new Runnable() {
public void run() {
Intent intentScan = new Intent(that.cordova.getActivity().getBaseContext(), CaptureActivity.class);
intentScan.setAction(Intents.Scan.ACTION);
intentScan.addCategory(Intent.CATEGORY_DEFAULT);
// add config as intent extras
if (args.length() > 0) {
JSONObject obj;
JSONArray names;
String key;
Object value;
for (int i = 0; i < args.length(); i++) {
try {
obj = args.getJSONObject(i);
} catch (JSONException e) {
Log.i("CordovaLog", e.getLocalizedMessage());
continue;
}
names = obj.names();
for (int j = 0; j < names.length(); j++) {
try {
key = names.getString(j);
value = obj.get(key);
if (value instanceof Integer) {
intentScan.putExtra(key, (Integer) value);
} else if (value instanceof String) {
intentScan.putExtra(key, (String) value);
}
} catch (JSONException e) {
Log.i("CordovaLog", e.getLocalizedMessage());
}
}
intentScan.putExtra(Intents.Scan.CAMERA_ID, obj.optBoolean(PREFER_FRONTCAMERA, false) ? 1 : 0);
intentScan.putExtra(Intents.Scan.SHOW_FLIP_CAMERA_BUTTON, obj.optBoolean(SHOW_FLIP_CAMERA_BUTTON, false));
intentScan.putExtra(Intents.Scan.SHOW_TORCH_BUTTON, obj.optBoolean(SHOW_TORCH_BUTTON, false));
intentScan.putExtra(Intents.Scan.TORCH_ON, obj.optBoolean(TORCH_ON, false));
intentScan.putExtra(Intents.Scan.SAVE_HISTORY, obj.optBoolean(SAVE_HISTORY, false));
boolean beep = obj.optBoolean(DISABLE_BEEP, false);
intentScan.putExtra(Intents.Scan.BEEP_ON_SCAN, !beep);
if (obj.has(RESULTDISPLAY_DURATION)) {
intentScan.putExtra(Intents.Scan.RESULT_DISPLAY_DURATION_MS, "" + obj.optLong(RESULTDISPLAY_DURATION));
}
if (obj.has(FORMATS)) {
intentScan.putExtra(Intents.Scan.FORMATS, obj.optString(FORMATS));
}
if (obj.has(PROMPT)) {
intentScan.putExtra(Intents.Scan.PROMPT_MESSAGE, obj.optString(PROMPT));
}
if (obj.has(ORIENTATION)) {
intentScan.putExtra(Intents.Scan.ORIENTATION_LOCK, obj.optString(ORIENTATION));
}
}
}
// avoid calling other phonegap apps
intentScan.setPackage(that.cordova.getActivity().getApplicationContext().getPackageName());
that.cordova.startActivityForResult(that, intentScan, REQUEST_CODE);
}
});
}
/**
* Called when the barcode scanner intent completes.
*
* @param requestCode The request code originally supplied to startActivityForResult(),
* allowing you to identify who this result came from.
* @param resultCode The integer result code returned by the child activity through its setResult().
* @param intent An Intent, which can return result data to the caller (various data can be attached to Intent "extras").
*/
@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
if (requestCode == REQUEST_CODE && this.callbackContext != null) {
if (resultCode == Activity.RESULT_OK) {
JSONObject obj = new JSONObject();
try {
obj.put(TEXT, intent.getStringExtra("SCAN_RESULT"));
obj.put(FORMAT, intent.getStringExtra("SCAN_RESULT_FORMAT"));
obj.put(CANCELLED, false);
} catch (JSONException e) {
Log.d(LOG_TAG, "This should never happen");
}
//this.success(new PluginResult(PluginResult.Status.OK, obj), this.callback);
this.callbackContext.success(obj);
} else if (resultCode == Activity.RESULT_CANCELED) {
JSONObject obj = new JSONObject();
try {
obj.put(TEXT, "");
obj.put(FORMAT, "");
obj.put(CANCELLED, true);
} catch (JSONException e) {
Log.d(LOG_TAG, "This should never happen");
}
//this.success(new PluginResult(PluginResult.Status.OK, obj), this.callback);
this.callbackContext.success(obj);
} else {
//this.error(new PluginResult(PluginResult.Status.ERROR), this.callback);
this.callbackContext.error("Unexpected error");
}
}
}
/**
* Initiates a barcode encode.
*
* @param type Endoiding type.
* @param data The data to encode in the bar code.
*/
public void encode(String type, String data) {
Intent intentEncode = new Intent(this.cordova.getActivity().getBaseContext(), EncodeActivity.class);
intentEncode.setAction(Intents.Encode.ACTION);
intentEncode.putExtra(Intents.Encode.TYPE, type);
intentEncode.putExtra(Intents.Encode.DATA, data);
// avoid calling other phonegap apps
intentEncode.setPackage(this.cordova.getActivity().getApplicationContext().getPackageName());
this.cordova.getActivity().startActivity(intentEncode);
}
/**
* check application's permissions
*/
public boolean hasPermisssion() {
for(String p : permissions)
{
if(!PermissionHelper.hasPermission(this, p))
{
return false;
}
}
return true;
}
/**
* We override this so that we can access the permissions variable, which no longer exists in
* the parent class, since we can't initialize it reliably in the constructor!
*
* @param requestCode The code to get request action
*/
public void requestPermissions(int requestCode)
{
PermissionHelper.requestPermissions(this, requestCode, permissions);
}
/**
* processes the result of permission request
*
* @param requestCode The code to get request action
* @param permissions The collection of permissions
* @param grantResults The result of grant
*/
public void onRequestPermissionResult(int requestCode, String[] permissions,
int[] grantResults) throws JSONException
{
PluginResult result;
for (int r : grantResults) {
if (r == PackageManager.PERMISSION_DENIED) {
Log.d(LOG_TAG, "Permission Denied!");
result = new PluginResult(PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION);
this.callbackContext.sendPluginResult(result);
return;
}
}
switch(requestCode)
{
case 0:
scan(this.requestArgs);
break;
}
}
/**
* This plugin launches an external Activity when the camera is opened, so we
* need to implement the save/restore API in case the Activity gets killed
* by the OS while it's in the background.
*/
public void onRestoreStateForActivityResult(Bundle state, CallbackContext callbackContext) {
this.callbackContext = callbackContext;
}

/* eslint-env node */
/*
* This file runs in a Node context (it's NOT transpiled by Babel), so use only
* the ES6 features that are supported by your Node version. https://node.green/
*/
// Configuration for your app
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
const { configure } = require('quasar/wrappers');
const path = require('path');
module.exports = configure(function (/* ctx */) {
return {
eslint: {
// fix: true,
// include = [],
// exclude = [],
// rawOptions = {},
warnings: true,
errors: true
},
// https://v2.quasar.dev/quasar-cli/prefetch-feature
// preFetch: true,
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli/boot-files
boot: [
'i18n',
'axios',
'notify-defaults',
'vueMain'
],
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
css: [
'app.scss'
],
// https://github.com/quasarframework/quasar/tree/dev/extras
extras: [
// 'ionicons-v4',
// 'mdi-v5',
// 'fontawesome-v6',
// 'eva-icons',
// 'themify',
// 'line-awesome',
// 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
'roboto-font', // optional, you are not bound to it
'material-icons', // optional, you are not bound to it
],
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
build: {
target: {
browser: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
node: 'node16'
},
vueRouterMode: 'hash', // available values: 'hash', 'history'
gzip: true,
// vueRouterBase,
// vueDevtools,
// vueOptionsAPI: false,
// rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
publicPath: '/',
// analyze: true,
// env: {},
// rawDefine: {}
// ignorePublicFolder: true,
// minify: false,
// polyfillModulePreload: true,
// distDir,
// extendViteConf (viteConf) {},
// viteVuePluginOptions: {},
vitePlugins: [
['@intlify/vite-plugin-vue-i18n', {
// if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
// compositionOnly: false,
// you need to set i18n resource including paths !
include: path.resolve(__dirname, './src/i18n/**')
}]
]
},
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
devServer: {
// https: true
open: true // opens browser window automatically
},
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
framework: {
config: {
notify: {}
},
// iconSet: 'material-icons', // Quasar icon set
// lang: 'en-US', // Quasar language pack
// For special cases outside of where the auto-import strategy can have an impact
// (like functional components as one of the examples),
// you can manually specify Quasar components/directives to be available everywhere:
//
// components: [],
// directives: [],
// Quasar plugins
plugins: [
'LocalStorage',
'Notify',
'Dialog'
]
},
// animations: 'all', // --- includes all animations
// https://v2.quasar.dev/options/animations
animations: [],
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
// sourceFiles: {
// rootComponent: 'src/App.vue',
// router: 'src/router/index',
// store: 'src/store/index',
// registerServiceWorker: 'src-pwa/register-service-worker',
// serviceWorker: 'src-pwa/custom-service-worker',
// pwaManifestFile: 'src-pwa/manifest.json',
// electronMain: 'src-electron/electron-main',
// electronPreload: 'src-electron/electron-preload'
// },
// https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
ssr: {
// ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
// will mess up SSR
// extendSSRWebserverConf (esbuildConf) {},
// extendPackageJson (json) {},
pwa: false,
// manualStoreHydration: true,
// manualPostHydrationTrigger: true,
prodPort: 3000, // The default port that the production server should use
// (gets superseded if process.env.PORT is specified at runtime)
middlewares: [
'render' // keep this as last one
]
},
// https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
pwa: {
workboxMode: 'generateSW', // or 'injectManifest'
injectPwaMetaTags: true,
swFilename: 'sw.js',
manifestFilename: 'manifest.json',
useCredentialsForManifestTag: false,
// useFilenameHashes: true,
// extendGenerateSWOptions (cfg) {}
// extendInjectManifestOptions (cfg) {},
// extendManifestJson (json) {}
// extendPWACustomSWConf (esbuildConf) {}
},
// Full list of options: https://v2.quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
cordova: {
backButtonExit: true,
backButton: true
// noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
},
// Full list of options: https://v2.quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
capacitor: {
hideSplashscreen: true
},
// Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
electron: {
// extendElectronMainConf (esbuildConf)
// extendElectronPreloadConf (esbuildConf)
inspectPort: 5858,
bundler: 'packager', // 'packager' or 'builder'
packager: {
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
// OS X / Mac App Store
// appBundleId: '',
// appCategoryType: '',
// osxSign: '',
// protocol: 'myapp://path',
// Windows only
// win32metadata: { ... }
},
builder: {
// https://www.electron.build/configuration/configuration
appId: 'mobilescanner'
}
},
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
bex: {
contentScripts: [
'my-content-script'
],
// extendBexScriptsConf (esbuildConf) {}
// extendBexManifestJson (json) {}
}
}

/*
* This file runs in a Node context (it's NOT transpiled by Babel), so use only
* the ES6 features that are supported by your Node version. https://node.green/
*/
// Configuration for your app
// https://quasar.dev/quasar-cli/quasar-conf-js
/* eslint-env node */
module.exports = function (/* ctx */) {
return {
// https://quasar.dev/quasar-cli/supporting-ts
supportTS: false,
// https://quasar.dev/quasar-cli/prefetch-feature
// preFetch: true,
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://quasar.dev/quasar-cli/boot-files
boot: [
'vueMain',
'axios_request',
'notify_default',
'i18n'
],
// https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
css: [
'app.sass'
],
// https://github.com/quasarframework/quasar/tree/dev/extras
extras: [
// 'ionicons-v4',
// 'mdi-v5',
// 'fontawesome-v5',
// 'eva-icons',
// 'themify',
// 'line-awesome',
// 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
'roboto-font', // optional, you are not bound to it
'material-icons' // optional, you are not bound to it
],
// Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
build: {
vueRouterMode: 'hash', // available values: 'hash', 'history'
// transpile: false,
// Add dependencies for transpiling with Babel (Array of string/regex)
// (from node_modules, which are by default not transpiled).
// Applies only if "transpile" is set to true.
// transpileDependencies: [],
// rtl: false, // https://quasar.dev/options/rtl-support
// preloadChunks: true,
// showProgress: false,
gzip: true,
// analyze: true,
// Options below are automatically set depending on the env, set them if you want to override
// extractCSS: false,
// https://quasar.dev/quasar-cli/handling-webpack
extendWebpack (cfg) {
cfg.module.rules.push({
resourceQuery: /blockType=i18n/,
type: 'javascript/auto',
use: [
{ loader: '@kazupon/vue-i18n-loader' },
{ loader: 'yaml-loader' }
]
})
}
},
// Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-devServer
devServer: {
https: false,
port: 8080,
open: true // opens browser window automatically
},
// https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework
framework: {
iconSet: 'material-icons', // Quasar icon set
lang: 'en-us', // Quasar language pack
config: {},
// Possible values for "importStrategy":
// * 'auto' - (DEFAULT) Auto-import needed Quasar components & directives
// * 'all' - Manually specify what to import
importStrategy: 'auto',
// For special cases outside of where "auto" importStrategy can have an impact
// (like functional components as one of the examples),
// you can manually specify Quasar components/directives to be available everywhere:
//
components: [
'QFab',
'QFabAction',
'QIcon',
'QLayout',
'QPageContainer',
'QPage',
'QHeader',
'QPageSticky',
'QPageScroller',
'QToolbar',
'QToolbarTitle',
'QForm',
'QInput',
'QDialog',
'QTooltip',
'QBar',
'QBtnToggle',
'QImg',
'QCard',
'QCardSection',
'QCardActions',
'QAvatar',
'QTabs',
'QTab',
'QRouteTab',
'QCheckbox',
'QInfiniteScroll',
'QVideo',
'QChatMessage'
],
directives: [
'ClosePopup'
],
// Quasar plugins
plugins: [
'Cookies',
'LocalStorage',
'SessionStorage',
'Dialog',
'Notify',
'Meta'
]
},
// animations: 'all', // --- includes all animations
// https://quasar.dev/options/animations
animations: [
'fadeIn',
'rubberBand',
'zoomIn'
],
// https://quasar.dev/quasar-cli/developing-ssr/configuring-ssr
ssr: {
pwa: false
},
// https://quasar.dev/quasar-cli/developing-pwa/configuring-pwa
pwa: {
workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
workboxOptions: {}, // only for GenerateSW
manifest: {
name: 'wms templates',
short_name: 'GreaterWMS--Open Source Warehouse Management System',
description: 'GreaterWMS--Open Source Warehouse Management System',
display: 'standalone',
orientation: 'portrait',
background_color: '#ffffff',
theme_color: '#027be3',
icons: [
{
src: 'icons/icon-128x128.png',
sizes: '128x128',
type: 'image/png'
},
{
src: 'icons/icon-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'icons/icon-256x256.png',
sizes: '256x256',
type: 'image/png'
},
{
src: 'icons/icon-384x384.png',
sizes: '384x384',
type: 'image/png'
},
{
src: 'icons/icon-512x512.png',
sizes: '512x512',
type: 'image/png'
}
]
}
},
// Full list of options: https://quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
cordova: {
// noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
},
// Full list of options: https://quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
capacitor: {
hideSplashscreen: true
},
// Full list of options: https://quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
electron: {
bundler: 'builder', // 'packager' or 'builder'
packager: {
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
// OS X / Mac App Store
// appBundleId: '',
// appCategoryType: '',
// osxSign: '',
// protocol: 'myapp://path',
// Windows only
// win32metadata: { ... }
},
builder: {
// https://www.electron.build/configuration/configuration
appId: 'com.electron.greaterwms',
productName: 'GreaterWMS',
copyright: '2022SR0153577',
publish: [
{
provider: 'generic',
url: 'https://production.56yhz.com/media/'
}
],
mac: {
target: 'dmg'
},
linux: {
target: [
{
target: 'deb'
}
]
},
win: {
target: [
{
target: 'nsis',
arch: [
'x64',
'ia32'
]
}
]
},
nsis: {
uninstallDisplayName: 'GreaterWMS',
oneClick: false,
allowToChangeInstallationDirectory: true,
createDesktopShortcut: true,
createStartMenuShortcut: true,
shortcutName: 'GreaterWMS',
runAfterFinish: true
},
compression: 'maximum'
},
// More info: https://quasar.dev/quasar-cli/developing-electron-apps/node-integration
nodeIntegration: true,
extendWebpack (/* cfg */) {
// do something with Electron main process Webpack cfg
// chainWebpack also available besides this extendWebpack
}
}
}

/*global gettext, interpolate, ngettext*/
'use strict';
{
function show(selector) {
document.querySelectorAll(selector).forEach(function(el) {
el.classList.remove('hidden');
});
}
function hide(selector) {
document.querySelectorAll(selector).forEach(function(el) {
el.classList.add('hidden');
});
}
function showQuestion(options) {
hide(options.acrossClears);
show(options.acrossQuestions);
hide(options.allContainer);
}
function showClear(options) {
show(options.acrossClears);
hide(options.acrossQuestions);
document.querySelector(options.actionContainer).classList.remove(options.selectedClass);
show(options.allContainer);
hide(options.counterContainer);
}
function reset(options) {
hide(options.acrossClears);
hide(options.acrossQuestions);
hide(options.allContainer);
show(options.counterContainer);
}
function clearAcross(options) {
reset(options);
const acrossInputs = document.querySelectorAll(options.acrossInput);
acrossInputs.forEach(function(acrossInput) {
acrossInput.value = 0;
});
document.querySelector(options.actionContainer).classList.remove(options.selectedClass);
}
function checker(actionCheckboxes, options, checked) {
if (checked) {
showQuestion(options);
} else {
reset(options);
}
actionCheckboxes.forEach(function(el) {
el.checked = checked;
el.closest('tr').classList.toggle(options.selectedClass, checked);
});
}
function updateCounter(actionCheckboxes, options) {
const sel = Array.from(actionCheckboxes).filter(function(el) {
return el.checked;
}).length;
const counter = document.querySelector(options.counterContainer);
// data-actions-icnt is defined in the generated HTML
// and contains the total amount of objects in the queryset
const actions_icnt = Number(counter.dataset.actionsIcnt);
counter.textContent = interpolate(
ngettext('%(sel)s of %(cnt)s selected', '%(sel)s of %(cnt)s selected', sel), {
sel: sel,
cnt: actions_icnt
}, true);
const allToggle = document.getElementById(options.allToggleId);
allToggle.checked = sel === actionCheckboxes.length;
if (allToggle.checked) {
showQuestion(options);
} else {
clearAcross(options);
}
}
const defaults = {
actionContainer: "div.actions",
counterContainer: "span.action-counter",
allContainer: "div.actions span.all",
acrossInput: "div.actions input.select-across",
acrossQuestions: "div.actions span.question",
acrossClears: "div.actions span.clear",
allToggleId: "action-toggle",
selectedClass: "selected"
};
window.Actions = function(actionCheckboxes, options) {
options = Object.assign({}, defaults, options);
let list_editable_changed = false;
let lastChecked = null;
let shiftPressed = false;
document.addEventListener('keydown', (event) => {
shiftPressed = event.shiftKey;
});
document.addEventListener('keyup', (event) => {
shiftPressed = event.shiftKey;
});
document.getElementById(options.allToggleId).addEventListener('click', function(event) {
checker(actionCheckboxes, options, this.checked);
updateCounter(actionCheckboxes, options);
});
document.querySelectorAll(options.acrossQuestions + " a").forEach(function(el) {
el.addEventListener('click', function(event) {
event.preventDefault();
const acrossInputs = document.querySelectorAll(options.acrossInput);
acrossInputs.forEach(function(acrossInput) {
acrossInput.value = 1;
});
showClear(options);
});
});
document.querySelectorAll(options.acrossClears + " a").forEach(function(el) {
el.addEventListener('click', function(event) {
event.preventDefault();
document.getElementById(options.allToggleId).checked = false;
clearAcross(options);
checker(actionCheckboxes, options, false);
updateCounter(actionCheckboxes, options);
});
});
function affectedCheckboxes(target, withModifier) {
const multiSelect = (lastChecked && withModifier && lastChecked !== target);
if (!multiSelect) {
return [target];
}
const checkboxes = Array.from(actionCheckboxes);
const targetIndex = checkboxes.findIndex(el => el === target);
const lastCheckedIndex = checkboxes.findIndex(el => el === lastChecked);
const startIndex = Math.min(targetIndex, lastCheckedIndex);
const endIndex = Math.max(targetIndex, lastCheckedIndex);
const filtered = checkboxes.filter((el, index) => (startIndex <= index) && (index <= endIndex));
return filtered;
};
Array.from(document.getElementById('result_list').tBodies).forEach(function(el) {
el.addEventListener('change', function(event) {
const target = event.target;
if (target.classList.contains('action-select')) {
const checkboxes = affectedCheckboxes(target, shiftPressed);
checker(checkboxes, options, target.checked);
updateCounter(actionCheckboxes, options);
lastChecked = target;
} else {
list_editable_changed = true;
}
});
});
document.querySelector('#changelist-form button[name=index]').addEventListener('click', function(event) {
if (list_editable_changed) {
const confirmed = confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."));
if (!confirmed) {
event.preventDefault();
}
}
});
const el = document.querySelector('#changelist-form input[name=_save]');
// The button does not exist if no fields are editable.
if (el) {
el.addEventListener('click', function(event) {
if (document.querySelector('[name=action]').value) {
const text = list_editable_changed
? 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.")
: 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.");
if (!confirm(text)) {
event.preventDefault();
}
}
});
}
};
// Call function fn when the DOM is loaded and ready. If it is already
// loaded, call the function now.
// http://youmightnotneedjquery.com/#ready
function ready(fn) {
if (document.readyState !== 'loading') {
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
ready(function() {
const actionsEls = document.querySelectorAll('tr input.action-select');
if (actionsEls.length > 0) {
Actions(actionsEls);
}
});

},{}],3:[function(require,module,exports){
/*!
* XRegExp Unicode Base 3.2.0
* <xregexp.com>
* Steven Levithan (c) 2008-2017 MIT License
*/
module.exports = function(XRegExp) {
'use strict';
/**
* Adds base support for Unicode matching:
* - Adds syntax `\p{..}` for matching Unicode tokens. Tokens can be inverted using `\P{..}` or
* `\p{^..}`. Token names ignore case, spaces, hyphens, and underscores. You can omit the
* braces for token names that are a single letter (e.g. `\pL` or `PL`).
* - Adds flag A (astral), which enables 21-bit Unicode support.
* - Adds the `XRegExp.addUnicodeData` method used by other addons to provide character data.
*
* Unicode Base relies on externally provided Unicode character data. Official addons are
* available to provide data for Unicode categories, scripts, blocks, and properties.
*
* @requires XRegExp
*/
// ==--------------------------==
// Private stuff
// ==--------------------------==
// Storage for Unicode data
var unicode = {};
// Reuse utils
var dec = XRegExp._dec;
var hex = XRegExp._hex;
var pad4 = XRegExp._pad4;
// Generates a token lookup name: lowercase, with hyphens, spaces, and underscores removed
function normalize(name) {
return name.replace(/[- _]+/g, '').toLowerCase();
}
// Gets the decimal code of a literal code unit, \xHH, \uHHHH, or a backslash-escaped literal
function charCode(chr) {
var esc = /^\\[xu](.+)/.exec(chr);
return esc ?
dec(esc[1]) :
chr.charCodeAt(chr.charAt(0) === '\\' ? 1 : 0);
}
// Inverts a list of ordered BMP characters and ranges
function invertBmp(range) {
var output = '';
var lastEnd = -1;
XRegExp.forEach(
range,
/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,
function(m) {
var start = charCode(m[1]);
if (start > (lastEnd + 1)) {
output += '\\u' + pad4(hex(lastEnd + 1));
if (start > (lastEnd + 2)) {
output += '-\\u' + pad4(hex(start - 1));
}
}
lastEnd = charCode(m[2] || m[1]);
}
);
if (lastEnd < 0xFFFF) {
output += '\\u' + pad4(hex(lastEnd + 1));
if (lastEnd < 0xFFFE) {
output += '-\\uFFFF';
}
}
return output;
}
// Generates an inverted BMP range on first use
function cacheInvertedBmp(slug) {
var prop = 'b!';
return (
unicode[slug][prop] ||
(unicode[slug][prop] = invertBmp(unicode[slug].bmp))
);
}
// Combines and optionally negates BMP and astral data
function buildAstral(slug, isNegated) {
var item = unicode[slug];
var combined = '';
if (item.bmp && !item.isBmpLast) {
combined = '[' + item.bmp + ']' + (item.astral ? '|' : '');
}
if (item.astral) {
combined += item.astral;
}
if (item.isBmpLast && item.bmp) {
combined += (item.astral ? '|' : '') + '[' + item.bmp + ']';
}
// Astral Unicode tokens always match a code point, never a code unit
return isNegated ?
'(?:(?!' + combined + ')(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))' :
'(?:' + combined + ')';
}
// Builds a complete astral pattern on first use
function cacheAstral(slug, isNegated) {
var prop = isNegated ? 'a!' : 'a=';
return (
unicode[slug][prop] ||
(unicode[slug][prop] = buildAstral(slug, isNegated))
);
}
// ==--------------------------==
// Core functionality
// ==--------------------------==
/*
* Add astral mode (flag A) and Unicode token syntax: `\p{..}`, `\P{..}`, `\p{^..}`, `\pC`.
*/
XRegExp.addToken(
// Use `*` instead of `+` to avoid capturing `^` as the token name in `\p{^}`
/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,
function(match, scope, flags) {
var ERR_DOUBLE_NEG = 'Invalid double negation ';
var ERR_UNKNOWN_NAME = 'Unknown Unicode token ';
var ERR_UNKNOWN_REF = 'Unicode token missing data ';
var ERR_ASTRAL_ONLY = 'Astral mode required for Unicode token ';
var ERR_ASTRAL_IN_CLASS = 'Astral mode does not support Unicode tokens within character classes';
// Negated via \P{..} or \p{^..}
var isNegated = match[1] === 'P' || !!match[2];
// Switch from BMP (0-FFFF) to astral (0-10FFFF) mode via flag A
var isAstralMode = flags.indexOf('A') > -1;
// Token lookup name. Check `[4]` first to avoid passing `undefined` via `\p{}`
var slug = normalize(match[4] || match[3]);
// Token data object
var item = unicode[slug];
if (match[1] === 'P' && match[2]) {
throw new SyntaxError(ERR_DOUBLE_NEG + match[0]);
}
if (!unicode.hasOwnProperty(slug)) {
throw new SyntaxError(ERR_UNKNOWN_NAME + match[0]);
}
// Switch to the negated form of the referenced Unicode token
if (item.inverseOf) {
slug = normalize(item.inverseOf);
if (!unicode.hasOwnProperty(slug)) {
throw new ReferenceError(ERR_UNKNOWN_REF + match[0] + ' -> ' + item.inverseOf);
}
item = unicode[slug];
isNegated = !isNegated;
}
if (!(item.bmp || isAstralMode)) {
throw new SyntaxError(ERR_ASTRAL_ONLY + match[0]);
}
if (isAstralMode) {
if (scope === 'class') {
throw new SyntaxError(ERR_ASTRAL_IN_CLASS);
}
return cacheAstral(slug, isNegated);
}
return scope === 'class' ?
(isNegated ? cacheInvertedBmp(slug) : item.bmp) :
(isNegated ? '[^' : '[') + item.bmp + ']';
},
{
scope: 'all',
optionalFlags: 'A',
leadChar: '\\'
}
);
/**
* Adds to the list of Unicode tokens that XRegExp regexes can match via `\p` or `\P`.
*
* @memberOf XRegExp
* @param {Array} data Objects with named character ranges. Each object may have properties
* `name`, `alias`, `isBmpLast`, `inverseOf`, `bmp`, and `astral`. All but `name` are
* optional, although one of `bmp` or `astral` is required (unless `inverseOf` is set). If
* `astral` is absent, the `bmp` data is used for BMP and astral modes. If `bmp` is absent,
* the name errors in BMP mode but works in astral mode. If both `bmp` and `astral` are
* provided, the `bmp` data only is used in BMP mode, and the combination of `bmp` and
* `astral` data is used in astral mode. `isBmpLast` is needed when a token matches orphan
* high surrogates *and* uses surrogate pairs to match astral code points. The `bmp` and
* `astral` data should be a combination of literal characters and `\xHH` or `\uHHHH` escape
* sequences, with hyphens to create ranges. Any regex metacharacters in the data should be
* escaped, apart from range-creating hyphens. The `astral` data can additionally use
* character classes and alternation, and should use surrogate pairs to represent astral code
* points. `inverseOf` can be used to avoid duplicating character data if a Unicode token is
* defined as the exact inverse of another token.
* @example
*
* // Basic use
* XRegExp.addUnicodeData([{
* name: 'XDigit',
* alias: 'Hexadecimal',
* bmp: '0-9A-Fa-f'
* }]);
* XRegExp('\\p{XDigit}:\\p{Hexadecimal}+').test('0:3D'); // -> true
*/
XRegExp.addUnicodeData = function(data) {
var ERR_NO_NAME = 'Unicode token requires name';
var ERR_NO_DATA = 'Unicode token has no character data ';
var item;
for (var i = 0; i < data.length; ++i) {
item = data[i];
if (!item.name) {
throw new Error(ERR_NO_NAME);
}
if (!(item.inverseOf || item.bmp || item.astral)) {
throw new Error(ERR_NO_DATA + item.name);
}
unicode[normalize(item.name)] = item;
if (item.alias) {
unicode[normalize(item.alias)] = item;
}
}
// Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and
// flags might now produce different results
XRegExp.cache.flush('patterns');
};
/**
* @ignore
*
* Return a reference to the internal Unicode definition structure for the given Unicode
* Property if the given name is a legal Unicode Property for use in XRegExp `\p` or `\P` regex
* constructs.
*
* @memberOf XRegExp
* @param {String} name Name by which the Unicode Property may be recognized (case-insensitive),
* e.g. `'N'` or `'Number'`. The given name is matched against all registered Unicode
* Properties and Property Aliases.
* @returns {Object} Reference to definition structure when the name matches a Unicode Property.
*
* @note
* For more info on Unicode Properties, see also http://unicode.org/reports/tr18/#Categories.
*
* @note
* This method is *not* part of the officially documented API and may change or be removed in
* the future. It is meant for userland code that wishes to reuse the (large) internal Unicode
* structures set up by XRegExp.
*/
XRegExp._getUnicodeProperty = function(name) {
var slug = normalize(name);
return unicode[slug];
};
};

// This is just an example,
// so you can safely delete all default props below
export default {
failed: 'Action failed',
success: 'Action was successful',
index: {
operation: 'Operation Docs',
app_store: 'Commercial License',
signin: 'Access address:',
app_title: 'APP Title',
slogan: 'Slogan',
server: 'Request Baseurl',
index_title: 'Open Source Inventory System',
webtitle: 'GreaterWMS--Open Source Warehouse Management System',
home: 'Home',
title: 'GreaterWMS',
title_tip: 'GreaterWMS Home',
hide_menu: 'Hide Menu',
api: 'API DOCS',
translate: 'Choose Language',
unread: 'Unread Message',
login: 'Login',
register: 'Register',
login_tip: 'Enter Your OPENID & Login Name',
register_tip: 'Register An Admin',
logout: 'Logout',
user_login: 'User Login',
admin_login: 'Admin Login',
return_to_login: 'Return To Login Page',
user_center: 'User Center',
change_user: 'Change User',
view_my_openid: 'View My OPENID',
your_openid: 'Your OPENID',
contact_list: 'Recent Contact',
chat_more: 'Load More',
chat_no_more: 'No More Message',
chat_send: 'Send',
previous: 'Previous',
next: 'Next',
admin_name: 'Admin',
password: 'Password',
confirm_password: 'Confirm Password',
staff_name: 'User Name',
cancel: 'Cancel',
close: 'Close',
submit: 'Submit',
download: 'Download',
updatetitle: 'Update Ready',
updatedesc: 'Version Can Update Now',
update: 'Update Now',
chart: ' Chart',
current_user: 'Current User'
},
Settings: {
index: 'Settings',
server: 'Server',
equipment: 'Equipment Support'
},
menuItem: {
dashboard: 'Dashboard',
inbound: 'Inbound',
outbound: 'Outbound',
stock: 'Inventory',
finance: 'Finance',
goods: 'GoodsList',
baseinfo: 'Base Info',
warehouse: 'Warehouse',
staff: 'Staff',
driver: 'Driver',
customerdn: 'Customer DN',
supplierasn: 'Supplieer ASN',
uploadcenter: 'Upload Center',
downloadcenter: 'Download Center',
cloudwarehouse: 'Warehouse Interconnection'
},
contact: 'Contact',
sendmessage: 'Send A Message',
send: 'Send',
nomoremessage: 'No More Message',
loadmore: 'Load More',
new: 'new',
newtip: 'New A Data',
refresh: 'Refresh',
refreshtip: 'Refresh All Data',
edit: 'Edit This Data',
confirmedit: 'Confirm Edit Data',
canceledit: 'Cancel Edit Data',
delete: 'Delete This Data',
deletetip: 'This is an irreversible process.',
confirmdelete: 'Confirm Delete Data',
canceldelete: 'Cancel Delete Data',
download: 'Download',
downloadtip: 'Download All Data',
frombin: 'From Bin',
movetobin: 'Move to Bin',
putaway: 'PutAway',
cyclecount: 'Cycle Count',
cyclecountrecorder: 'Count Recorder',
search: 'Search Word',
creater: 'Creater',
createtime: 'Cteate Time',
updatetime: 'Update Time',
action: 'Action',
previous: 'Previous',
next: 'Next',
no_data: 'No More Data',
submit: 'Submit',
cancel: 'Cancel',
estimate: 'Estimate Freight',
downloadasnlist: 'Download List',
downloadasndetail: 'Download Detail',
downloadasnlisttip: 'Download All ASN List',
downloadasndetailtip: 'Download All ASN Detail',
printthisasn: 'Print this ASN',
confirmdelivery: 'Confirm Delivery',
finishloading: 'Finish Loading',
confirmsorted: 'Confirm Sorted',
downloaddnlist: 'Download List',
downloaddndetail: 'Download Detail',
downloaddnlisttip: 'Download All DN List',
downloaddndetailtip: 'Download All DN Detail',
release: 'Order Release',
releaseallorder: 'Release All Order',
releaseorder: 'Release Order',
print: 'Print Picking List',
printthisdn: 'Print this DN',
confirmorder: 'Confirm Order',
confirmpicked: 'Confirm Picked',
dispatch: 'Dispatch & Shipping',
deletebackorder: 'Delete Back Order',
confirminventoryresults: 'Confirm Inventory Results',
baseinfo: {
company_info: 'Company Info',
supplier: 'Supplier',
customer: 'Customer',
view_company: {
company_name: 'Company Name',
company_city: 'Company City',
company_address: 'Company Address',
company_contact: 'Company Contact',
company_manager: 'Company Manager',
error1: 'Please Enter The Company Name',
error2: 'Please Enter The Company City',
error3: 'Please Enter The Company Address',
error4: 'Please Enter The Company Contact',
error5: 'Please Enter The Company Manager'
},
view_supplier: {
supplier_name: 'Supplier Name',
supplier_city: 'Supplier City',
supplier_address: 'Supplier Address',
supplier_contact: 'Supplier Contact',
supplier_manager: 'Supplier Manager',
supplier_level: 'Supplier Level',
error1: 'Please Enter the Supplier Name',
error2: 'Please Enter the Supplier City',
error3: 'Please Enter the Supplier Address',
error4: 'Please Enter the Supplier Contact',
error5: 'Please Enter the Supplier Manager',
error6: 'Please Enter the Supplier Level'
},
view_customer: {
customer_name: 'Customer Name',
customer_city: 'Customer City',
customer_address: 'Customer Address',
customer_contact: 'Customer Contact',
customer_manager: 'Customer Manager',
customer_level: 'Customer Level',
error1: 'Please Enter the Customer Name',
error2: 'Please Enter the Customer City',
error3: 'Please Enter the Customer Address',
error4: 'Please Enter the Customer Contact',
error5: 'Please Enter the Customer Manager',
error6: 'Please Enter the Customer Level'
}
},
dashboards: {
outbound_statements: 'Outbound',
inbound_statements: 'Inbound',
inbound_and_outbound_statements: 'Inbound And Outbound',
total_sales: 'Total Sales',
sales_volume_ranking: 'Sales Volume Ranking',
sales_volumes_ranking: 'Sales Volumes Ranking',
total_receipts: 'Total Receipts',
receiving_quantity_ranking: 'Receiving Quantity Ranking',
Receiving_amount_ranking: 'Receiving Amount Ranking',
view_tradelist: {
mode_code: 'Mode Of Doing Business',
bin_name: 'Location Name',
goods_code: 'Goods Code',
goods_qty: 'Quantity On Hand',
creater: 'Creater',
update_time: 'Update Time',
create_time: 'Create Time',
inbound: 'Inbound',
outbound: 'Outbound'
}
},
finance: {
capital: 'Capital',
freight: 'Freight',
view_capital: {
capital_name: 'Cpaital Name',
capital_qty: 'Capital Qty',
capital_cost: 'Capital Cost',
error1: 'Please Enter the Capital Name',
error2: 'Capital Qty width must greater than 0',
error3: 'Capital Cost depth must greater than 0'
},
view_freight: {
transportation_supplier: 'Transportation Supplier',
send_city: 'Send City',
receiver_city: 'Receiver City',
weight_fee: 'Weight Fee',
volume_fee: 'Volume Fee',
min_payment: 'Min Payment',
error1: 'Please Enter the Transportation Supplier',
error2: 'Please Enter the Send City',
error3: 'Please Enter the Receiver City',
error4: 'Weight Fee must greater than 0',
error5: 'Volume Fee must greater than 0',
error6: 'Min Payment must greater than 0'
}
},
driver: {
driver: 'Driver',
dispatchlist: 'Dispatch List',
error1: 'Please Enter the Driver Name',
error2: 'Please Enter the License Plate',
error3: 'Please Enter The Contact',
view_driver: {
driver_name: 'Driver Name',
license_plate: 'License Plate',
contact: 'Contact'
},
view_dispatch: {
driver_name: 'Driver Name',
dn_code: 'DN Code',
contact: 'Contact'
}
},
upload_center: {
initializeupload: 'Initialize upload',
uploadfiles: 'Upload',
upload: 'Upload',
uploadcustomerfile: 'Upload Customerfile',
uploadgoodslistfile: 'Upload GoodslistFile',
uploadsupplierfile: 'Upload SupplierFile',
downloadgoodstemplate: 'Goods Example',
downloadcustomertemplate: 'Customer Example',
downloadsuppliertemplate: 'Supplier Example',
addupload: 'Add Upload'
},
download_center: {
createTime: 'Create Time',
reset: 'Reset',
start: 'Start',
end: 'End'
},
community_mall: {
communitymall: 'Community Mall'
},
goods: {
goods_list: 'Goods List',
unit: 'Unit',
class: 'Class',
color: 'Color',
brand: 'Brand',
shape: 'Shape',
specs: 'Specs',
origin: 'Origin',
view_goodslist: {
goods_code: 'Goods Code',
goods_desc: 'Goods Desc',
goods_name: 'Goods Name',
goods_supplier: 'Goods Supplier',
goods_weight: 'Goods Weight(Unit:g)',
goods_w: 'Goods Width(Unit:mm)',
goods_d: 'Goods Depth(Unit:mm)',
goods_h: 'Goods Height(Unit:mm)',
unit_volume: 'Unit Volume',
goods_unit: 'Goods Unit',
goods_class: 'Goods Class',
goods_brand: 'Goods Brand',
goods_color: 'Goods Color',
goods_shape: 'Goods Shape',
goods_specs: 'Goods Specs',
goods_origin: 'Goods Origin',
goods_cost: 'Goods Cost',
goods_price: 'Goods Price',
print_goods_label: 'Print Goods Label',
error1: 'Please Enter the Goods Code',
error2: 'Please Enter the Goods Description',
error3: 'Please Enter the Supplier',
error4: 'Goods Weight Must Greater Than 0',
error5: 'Goods Width Must Greater Than 0',
error6: 'Goods Depth Must Greater Than 0',
error7: 'Goods Height Must Greater Than 0',
error8: 'Please Enter the Goods Cost',
error9: 'Please Enter the Goods Price'
},
view_unit: {
goods_unit: 'Goods Unit',
error1: 'Please Enter Goods Unit'
},
view_class: {
goods_class: 'Goods Class',
error1: 'Please Enter Goods Class'
},
view_color: {
goods_color: 'Goods Color',
error1: 'Please Enter Goods Color'
},
view_brand: {
goods_brand: 'Goods Brand',
error1: 'Please Enter Goods Brand'
},
view_shape: {
goods_shape: 'Goods Shape',
error1: 'Please Enter Goods Shape'
},
view_specs: {
goods_specs: 'Goods Specs',
error1: 'Please Enter Goods Specs'
},
view_origin: {
goods_origin: 'Goods Origin',
error1: 'Please Enter Goods Origin'
}
},
inbound: {
asn: 'ASN',
predeliverystock: 'Pre Delivery',
preloadstock: 'Pre Load',
presortstock: 'Sorting',
sortstock: 'Sorted',
shortage: 'Shortage',
more: 'More QTY',
asnfinish: 'Receiving List',
asndone: 'Finish Receiving',
view_sortstock: {
error1: 'Please Enter The Quantity Must Be Greater Than 0'
},
view_asn: {
asn_code: 'ASN Code',
asn_status: 'ASN Status',
goods_qty: 'ASN QTY',
goods_actual_qty: 'Actual Arrive Qty',
goods_shortage_qty: 'Arrive Shortage Qty',
goods_more_qty: 'Arrive More Qty',
goods_damage_qty: 'Arrive Damage Qty',
presortstock: 'Pre Sort Qty',
sorted_qty: 'Sorted Qty',
total_weight: 'Total Weight(Unit:KG)',
total_volume: 'Total Volume(Unit:Cubic Metres)'
}
},
outbound: {
dn: 'DN',
freshorder: 'Pre Order',
neworder: 'New Order',
backorder: 'Back Order',
pickstock: 'Pre Pick',
pickedstock: 'Picked',
pickinglist: 'Picking List',
shippedstock: 'Shipping List',
received: 'Received',
pod: 'Proof Of Delivery',
view_dn: {
dn_code: 'DN Code',
dn_status: 'DN Status',
goods_qty: 'Order QTY',
intransit_qty: 'Shipping QTY',
delivery_actual_qty: 'Delivery Actual QTY',
delivery_shortage_qty: 'Delivery Shortage QTY',
delivery_more_qty: 'Delivery More QTY',
delivery_damage_qty: 'Delivery Damage QTY',
total_weight: 'Total Weight(Unit:KG)',
total_volume: 'Total Volume(Unit:Cubic Metres)',
customer: 'Customer'
}
},

/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/* global Windows, WinJS, Vibration */
function checkReqs (actionName, fail) {
if (!(Windows.Phone && Windows.Phone.Devices && Windows.Phone.Devices.Notification && Windows.Phone.Devices.Notification.VibrationDevice) && WinJS.Utilities.isPhone !== true) {
fail(actionName + ' is unsupported by this platform.');
return false;
}
return true;
}
function tryDoAction (actionName, success, fail, args, action) {
try {
if (checkReqs(actionName, fail) !== true) {
return;
}
action(args);
success();
} catch (e) {
fail('Error occured while trying to ' + actionName + ': ' + e);
}
}
/**
* @typedef patternParsingResult
* @type {Object}
* @property {Array} result.parsed - Array with parsed integers
* @property {Boolean} result.passed - false in case of parsing error
* @property {*} result.failedItem - The item, which could not be parsed
*/
/**
* Tries to convert pattern values to int
* @param {Array} pattern Array of delays
* @returns {patternParsingResult} result
*/
function tryParsePatternValues (pattern) {
var passed = true;
var failedItem;
pattern = pattern.map(function (item) {
var num = parseInt(item, 10);
if (isNaN(num)) {
failedItem = item;
passed = false;
}
return num;
});
return {
parsed: pattern,
passed: passed,
failedItem: failedItem
};
}
/**
* @typedef checkPatternReqsResult
* @type {Object}
* @property {Array} result.patternParsingResult - Array with parsed integers
* @property {Boolean} result.passed - true if all params are OK
*/
/**
* Checks params for vibrateWithPattern function
* @return {checkPatternReqsResult}
*/
function checkPatternReqs (args, fail) {
var patternParsingResult = tryParsePatternValues(args[0]);
var repeat = args[1];
var passed = true;
var errMsg = '';
if (!patternParsingResult.passed) {
errMsg += 'Could not parse ' + patternParsingResult.failedItem + ' in the vibration pattern';
passed = false;
}
if (repeat !== -1 && (repeat < 0 || repeat > args[0].length - 1)) {
errMsg += '\nrepeat parameter is out of range: ' + repeat;
passed = false;
}
if (!passed) {
console.error(errMsg);
if (fail) {
fail(errMsg);
}
}
return {
passed: passed,
patternParsingResult: patternParsingResult
};
}
/**
* vibrateWithPattern with `repeat` support
* @param {Array} patternArr Full pattern array
* @param {Boolean} shouldRepeat Indication on whether the vibration should be cycled
* @param {Function} fail Fail callback
* @param {Array} patternCycle Cycled part of the pattern array
* @return {Promise} Promise chaining single vibrate/pause actions
*/
function vibratePattern (patternArr, shouldRepeat, fail, patternCycle) {
return patternArr.reduce(function (previousValue, currentValue, index) {
if (index % 2 === 0) {
return previousValue.then(function () {
module.exports.vibrate(function () { }, function (err) {
console.error(err);
if (fail) {
fail(err);
}
}, [currentValue]);
if (index === patternArr.length - 1 && shouldRepeat) {
return WinJS.Promise.timeout(currentValue).then(function () {
return vibratePattern(patternCycle, true, fail, patternCycle);
});
} else {
return WinJS.Promise.timeout(currentValue);
}
});
} else {
return previousValue.then(function () {
if (index === patternArr.length - 1 && shouldRepeat) {
return WinJS.Promise.timeout(currentValue).then(function () {
return vibratePattern(patternCycle, true, fail, patternCycle);
});
} else {
return WinJS.Promise.timeout(currentValue);
}
});
}
}, WinJS.Promise.as());
}
var DEFAULT_DURATION = 200;
var patternChainPromise;
var VibrationDevice = (Windows.Phone && Windows.Phone.Devices && Windows.Phone.Devices.Notification && Windows.Phone.Devices.Notification.VibrationDevice && Windows.Phone.Devices.Notification.VibrationDevice);
if (VibrationDevice) {
// Windows Phone 10 code paths
module.exports = {
vibrate: function (success, fail, args) {
try {
var duration = parseInt(args[0]);
if (isNaN(duration)) {
duration = DEFAULT_DURATION;
}
VibrationDevice.getDefault().vibrate(duration);
success();
} catch (e) {
fail(e);
}
},
vibrateWithPattern: function (success, fail, args) {
// Cancel current vibrations first
module.exports.cancelVibration(function () {
var checkReqsResult = checkPatternReqs(args, fail);
if (!checkReqsResult.passed) {
return;
}
var pattern = checkReqsResult.patternParsingResult.parsed;
var repeatFromIndex = args[1];
var shouldRepeat = (repeatFromIndex !== -1);
var patternCycle;
if (shouldRepeat) {
patternCycle = pattern.slice(repeatFromIndex);
}
patternChainPromise = vibratePattern(pattern, shouldRepeat, fail, patternCycle);
}, fail);
},
cancelVibration: function (success, fail, args) {
try {
if (patternChainPromise) {
patternChainPromise.cancel();
}
VibrationDevice.getDefault().cancel();
if (success) {
success();
}
} catch (e) {
if (fail) {
fail(e);
}
}
}
};
} else if (typeof Vibration !== 'undefined' && Vibration.Vibration) {
// Windows Phone 8.1 code paths
module.exports = {
vibrate: function (success, fail, args) {
tryDoAction('vibrate', success, fail, args, Vibration.Vibration.vibrate);
},
vibrateWithPattern: function (success, fail, args) {
tryDoAction('vibrate', success, fail, [DEFAULT_DURATION], Vibration.Vibration.vibrate);
},
cancelVibration: function (success, fail, args) {
tryDoAction('cancelVibration', success, fail, args, Vibration.Vibration.cancelVibration);
}
};
} else {
// code paths where no vibration mechanism is present
module.exports = {
vibrate: function (success, fail) {
if (fail) {
fail('"vibrate" is unsupported by this device.');
}
},
vibrateWithPattern: function (success, fail, args) {
if (fail) {
fail('"vibrateWithPattern" is unsupported by this device.');
}
},
cancelVibration: function (success, fail, args) {
if (success) {
success();
}
}
};
}

/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
package org.apache.cordova.device;
import java.util.TimeZone;
import org.apache.cordova.CordovaWebView;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CordovaInterface;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.provider.Settings;
public class Device extends CordovaPlugin {
public static final String TAG = "Device";
public static String platform; // Device OS
public static String uuid; // Device UUID
private static final String ANDROID_PLATFORM = "Android";
private static final String AMAZON_PLATFORM = "amazon-fireos";
private static final String AMAZON_DEVICE = "Amazon";
/**
* Constructor.
*/
public Device() {
}
/**
* Sets the context of the Command. This can then be used to do things like
* get file paths associated with the Activity.
*
* @param cordova The context of the main Activity.
* @param webView The CordovaWebView Cordova is running in.
*/
public void initialize(CordovaInterface cordova, CordovaWebView webView) {
super.initialize(cordova, webView);
Device.uuid = getUuid();
}
/**
* Executes the request and returns PluginResult.
*
* @param action The action to execute.
* @param args JSONArry of arguments for the plugin.
* @param callbackContext The callback id used when calling back into JavaScript.
* @return True if the action was valid, false if not.
*/
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
if ("getDeviceInfo".equals(action)) {
JSONObject r = new JSONObject();
r.put("uuid", Device.uuid);
r.put("version", this.getOSVersion());
r.put("platform", this.getPlatform());
r.put("model", this.getModel());
r.put("manufacturer", this.getManufacturer());
r.put("isVirtual", this.isVirtual());
r.put("serial", this.getSerialNumber());
r.put("sdkVersion", this.getSDKVersion());
callbackContext.success(r);
}
else {
return false;
}
return true;
}
//--------------------------------------------------------------------------
// LOCAL METHODS
//--------------------------------------------------------------------------
/**
* Get the OS name.
*
* @return
*/
public String getPlatform() {
String platform;
if (isAmazonDevice()) {
platform = AMAZON_PLATFORM;
} else {
platform = ANDROID_PLATFORM;
}
return platform;
}
/**
* Get the device's Universally Unique Identifier (UUID).
*
* @return
*/
public String getUuid() {
String uuid = Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
return uuid;
}
public String getModel() {
String model = android.os.Build.MODEL;
return model;
}
public String getProductName() {
String productname = android.os.Build.PRODUCT;
return productname;
}
public String getManufacturer() {
String manufacturer = android.os.Build.MANUFACTURER;
return manufacturer;
}
public String getSerialNumber() {
String serial = android.os.Build.SERIAL;
return serial;
}
/**
* Get the OS version.
*
* @return
*/
public String getOSVersion() {
String osversion = android.os.Build.VERSION.RELEASE;
return osversion;
}
public String getSDKVersion() {
return String.valueOf(android.os.Build.VERSION.SDK_INT);
}
public String getTimeZoneID() {
TimeZone tz = TimeZone.getDefault();
return (tz.getID());
}
/**
* Function to check if the device is manufactured by Amazon
*
* @return
*/
public boolean isAmazonDevice() {
if (android.os.Build.MANUFACTURER.equals(AMAZON_DEVICE)) {
return true;
}
return false;
}
public boolean isVirtual() {
return android.os.Build.FINGERPRINT.contains("generic") ||
android.os.Build.PRODUCT.contains("sdk");
}

/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var argscheck = require('cordova/argscheck');
var channel = require('cordova/channel');
var exec = require('cordova/exec');
var cordova = require('cordova');
channel.createSticky('onCordovaInfoReady');
// Tell cordova channel to wait on the CordovaInfoReady event
channel.waitForInitialization('onCordovaInfoReady');
/**
* This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
* phone, etc.
* @constructor
*/
function Device () {
this.available = false;
this.platform = null;
this.version = null;
this.uuid = null;
this.cordova = null;
this.model = null;
this.manufacturer = null;
this.isVirtual = null;
this.serial = null;
this.isiOSAppOnMac = null;
var me = this;
channel.onCordovaReady.subscribe(function () {
me.getInfo(
function (info) {
// ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js
// TODO: CB-5105 native implementations should not return info.cordova
var buildLabel = cordova.version;
me.available = true;
me.platform = info.platform;
me.version = info.version;
me.uuid = info.uuid;
me.cordova = buildLabel;
me.model = info.model;
me.isVirtual = info.isVirtual;
// isiOSAppOnMac is iOS specific. If defined, it will be appended.
if (info.isiOSAppOnMac !== undefined) {
me.isiOSAppOnMac = info.isiOSAppOnMac;
}
me.manufacturer = info.manufacturer || 'unknown';
me.serial = info.serial || 'unknown';
// SDK Version is Android specific. If defined, it will be appended.
if (info.sdkVersion !== undefined) {
me.sdkVersion = info.sdkVersion;
}
channel.onCordovaInfoReady.fire();
},
function (e) {
me.available = false;
console.error('[ERROR] Error initializing cordova-plugin-device: ' + e);
}
);
});
}
/**
* Get device info
*
* @param {Function} successCallback The function to call when the heading data is available
* @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
*/
Device.prototype.getInfo = function (successCallback, errorCallback) {
argscheck.checkArgs('fF', 'Device.getInfo', arguments);
exec(successCallback, errorCallback, 'Device', 'getDeviceInfo', []);
};

/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
#include <sys/types.h>
#include <sys/sysctl.h>
#include "TargetConditionals.h"
#import <Availability.h>
#import <Cordova/CDV.h>
#import "CDVDevice.h"
@implementation UIDevice (ModelVersion)
- (NSString*)modelVersion
{
#if TARGET_IPHONE_SIMULATOR
NSString* platform = NSProcessInfo.processInfo.environment[@"SIMULATOR_MODEL_IDENTIFIER"];
#else
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char* machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString* platform = [NSString stringWithUTF8String:machine];
free(machine);
#endif
return platform;
}
@end
@interface CDVDevice () {}
@end


Step 2: ⌨️ Coding

  • docs/BusinessLogicAnalysis.md
Create docs/BusinessLogicAnalysis.md with contents:
• 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.

Step 3: 🔁 Code Review

Working on it...


🎉 Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 To recreate the pull request edit the issue title or description.
Something wrong? Let us know.

This is an automated message generated by Sweep AI.

Copy link

sweep-ai bot commented Apr 18, 2024

Sweeping

50%


Actions (click)

  • ↻ Restart Sweep

❌ Unable to Complete PR

I'm sorry, but it looks like an error has occurred due to a planning failure. Feel free to add more details to the issue description so Sweep can better address it. Alternatively, reach out to Kevin or William for help at https://discord.gg/sweep.

For bonus GPT-4 tickets, please report this bug on Discord (tracking ID: 403948873b).


Please look at the generated plan. If something looks wrong, please add more details to your issue.

File Path Proposed Changes
docs/BusinessLogicAnalysis.md Create docs/BusinessLogicAnalysis.md with contents:
• 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.

🎉 Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 To recreate the pull request edit the issue title or description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sweep
Projects
None yet
Development

No branches or pull requests

1 participant