Compare commits
9
Commits
216d7c6ab4
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc6e2ece54 | ||
|
|
e0b00cc62b | ||
|
|
9272ed0e23 | ||
|
|
9e4be6db92 | ||
|
|
03024c395a | ||
|
|
7043a49206 | ||
|
|
8a9bb09c18 | ||
|
|
f63d202327 | ||
|
|
aa186a3f82 |
@@ -0,0 +1,5 @@
|
|||||||
|
NODE_ENV = development
|
||||||
|
VUE_APP_ENV_NAME = zhisheng环境
|
||||||
|
VUE_APP_UPGRADE_NAME = erp_pda_pre
|
||||||
|
VUE_APP_PRODUCTION_API_URL = https://hcscmpre.zzfzyc.com/hcscm/pda/v1
|
||||||
|
VUE_APP_DEV_API_URL = https://hcscmpre.zzfzyc.com/hcscm/pda/v1
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
NODE_ENV = development
|
||||||
|
VUE_APP_ENV_NAME = mes环境
|
||||||
|
VUE_APP_UPGRADE_NAME = erp_pda
|
||||||
|
VUE_APP_PRODUCTION_API_URL = https://www.haotopai.com/hcscm/mes/server/pda/v1
|
||||||
|
VUE_APP_DEV_API_URL = https://www.haotopai.com/hcscm/mes/server/pda/v1
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
NODE_ENV = development
|
||||||
|
VUE_APP_ENV_NAME = zhisheng环境
|
||||||
|
VUE_APP_UPGRADE_NAME = erp_pda_pre
|
||||||
|
VUE_APP_PRODUCTION_API_URL = https://hcscmpre.zzfzyc.com/hcscm/pda/v1
|
||||||
|
VUE_APP_DEV_API_URL = https://hcscmpre.zzfzyc.com/hcscm/pda/v1
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# 不使用 pda项目,以后的新需求或者修改 使用 本项目
|
||||||
|
|
||||||
# pda-cli
|
# pda-cli
|
||||||
|
|
||||||
## Project setup
|
## Project setup
|
||||||
|
|||||||
+50
-45
@@ -7,6 +7,8 @@
|
|||||||
"serve": "npm run dev:h5",
|
"serve": "npm run dev:h5",
|
||||||
"build": "npm run build:h5",
|
"build": "npm run build:h5",
|
||||||
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
|
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
|
||||||
|
"build:app-plus:zhisheng": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build --mode zhisheng",
|
||||||
|
"build:app-plus:mes": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build --mode mes",
|
||||||
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
|
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
|
||||||
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
|
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
|
||||||
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
|
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
|
||||||
@@ -25,6 +27,8 @@
|
|||||||
"build:quickapp-webview-huawei": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build",
|
"build:quickapp-webview-huawei": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build",
|
||||||
"build:quickapp-webview-union": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build",
|
"build:quickapp-webview-union": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build",
|
||||||
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
|
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
|
||||||
|
"dev:app-plus:zhisheng": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch --mode zhisheng",
|
||||||
|
"dev:app-plus:mes": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch --mode mes",
|
||||||
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
|
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
|
||||||
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
|
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
|
||||||
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
|
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
|
||||||
@@ -55,58 +59,59 @@
|
|||||||
"浩拓移动端"
|
"浩拓移动端"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dcloudio/uni-app": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-app": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-app-plus": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-app-plus": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-h5": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-h5": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-i18n": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-i18n": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-mp-360": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-mp-360": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-mp-alipay": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-mp-alipay": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-mp-baidu": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-mp-baidu": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-mp-harmony": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-mp-harmony": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-mp-jd": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-mp-jd": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-mp-kuaishou": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-mp-kuaishou": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-mp-lark": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-mp-lark": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-mp-qq": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-mp-qq": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-mp-toutiao": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-mp-toutiao": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-mp-vue": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-mp-vue": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-mp-weixin": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-mp-weixin": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-mp-xhs": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-mp-xhs": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-quickapp-native": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-quickapp-native": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-quickapp-webview": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-quickapp-webview": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-stacktracey": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-stacktracey": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-stat": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-stat": "2.0.2-4070520250711001",
|
||||||
"@icon-park/vue": "^1.3.5",
|
"@icon-park/vue": "^1.4.2",
|
||||||
"@vue/shared": "^3.0.0",
|
"@vue/shared": "^3.5.18",
|
||||||
"core-js": "^3.8.3",
|
"core-js": "^3.45.0",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"flyio": "^0.6.2",
|
"dotenv": "^17.2.1",
|
||||||
|
"flyio": "^0.6.14",
|
||||||
"uview-ui": "1.8.8",
|
"uview-ui": "1.8.8",
|
||||||
"vue": ">= 2.6.14 < 2.7",
|
"vue": "^2.6.14",
|
||||||
"vue-i18n": "^8.20.0",
|
"vue-i18n": "^8.28.2",
|
||||||
"vuex": "^3.2.0"
|
"vuex": "^3.6.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@dcloudio/types": "^3.3.2",
|
"@dcloudio/types": "^3.4.19",
|
||||||
"@dcloudio/uni-automator": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-automator": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-cli-i18n": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-cli-i18n": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-cli-shared": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-cli-shared": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-helper-json": "*",
|
"@dcloudio/uni-helper-json": "^1.0.13",
|
||||||
"@dcloudio/uni-migration": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-migration": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/uni-template-compiler": "^2.0.2-4070520250711001",
|
"@dcloudio/uni-template-compiler": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.2-4070520250711001",
|
"@dcloudio/vue-cli-plugin-hbuilderx": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/vue-cli-plugin-uni": "^2.0.2-4070520250711001",
|
"@dcloudio/vue-cli-plugin-uni": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.2-4070520250711001",
|
"@dcloudio/vue-cli-plugin-uni-optimize": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/webpack-uni-mp-loader": "^2.0.2-4070520250711001",
|
"@dcloudio/webpack-uni-mp-loader": "2.0.2-4070520250711001",
|
||||||
"@dcloudio/webpack-uni-pages-loader": "^2.0.2-4070520250711001",
|
"@dcloudio/webpack-uni-pages-loader": "2.0.2-4070520250711001",
|
||||||
"@vue/cli-plugin-babel": "~5.0.0",
|
"@vue/cli-plugin-babel": "~5.0.8",
|
||||||
"@vue/cli-service": "~5.0.0",
|
"@vue/cli-service": "~5.0.8",
|
||||||
"babel-plugin-import": "^1.11.0",
|
"babel-plugin-import": "^1.13.8",
|
||||||
"cross-env": "^7.0.2",
|
"cross-env": "^7.0.3",
|
||||||
"jest": "^25.4.0",
|
"jest": "^25.5.4",
|
||||||
"postcss-comment": "^2.0.0",
|
"postcss-comment": "^2.0.0",
|
||||||
"sass": "1.26.2",
|
"sass": "1.26.2",
|
||||||
"sass-loader": "8.0.2",
|
"sass-loader": "8.0.2",
|
||||||
"vue-template-compiler": ">= 2.6.14 < 2.7"
|
"vue-template-compiler": "^2.6.14"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"Android >= 4.4",
|
"Android >= 4.4",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<topDropdown :isSxShow="true" :dropdown1="dropdown1" dropdown2="上架中" :options1="options1" :options2="isSjList" :optionsSx="sxList" searchUrl="./searchAdmin" @dropDownFun1="dropDownFun1" @dropDownFun2="dropDownFun2" @optionSxFun="optionSxFun">
|
<topDropdown :isSxShow="true" :dropdown1="dropdown1" dropdown2="上架中" :options1="options1" :options2="isSjList" :optionsSx="sxList" searchUrl="./searchAdmin" @dropDownFun1="dropDownFun1" @dropDownFun2="dropDownFun2" @optionSxFun="optionSxFun">
|
||||||
</topDropdown>
|
</topDropdown>
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/dataNullXz.png" title="暂无相关产品"
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/dataNullXz.png" title="暂无相关产品"
|
||||||
title1="请添加或者更换查询条件"></dataNull>
|
title1="请添加或者更换查询条件"></dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="getChanPinFun"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="getChanPinFun"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/dataNullXz.png" title="暂无相关分类"
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/dataNullXz.png" title="暂无相关分类"
|
||||||
title1="点击添加按钮添加相关分类"></dataNull>
|
title1="点击添加按钮添加相关分类"></dataNull>
|
||||||
<view v-else class="content">
|
<view v-else class="content">
|
||||||
<view class="row" v-for="(row, index) in list" :key="index">
|
<view class="row" v-for="(row, index) in list" :key="index">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<searchView placeholderStr="请输入产品名称" @searchViewClickFun="searchEventsFun($event)"></searchView>
|
<searchView placeholderStr="请输入产品名称" @searchViewClickFun="searchEventsFun($event)"></searchView>
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/dataNullXz.png" title="暂无相关产品"
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/dataNullXz.png" title="暂无相关产品"
|
||||||
title1="请更换查询条件"></dataNull>
|
title1="请更换查询条件"></dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="getChanPinFun"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="getChanPinFun"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<searchView placeholderStr="请输入产品名称" @searchViewClickFun="searchEventsFun($event)"></searchView>
|
<searchView placeholderStr="请输入产品名称" @searchViewClickFun="searchEventsFun($event)"></searchView>
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/dataNullXz.png" title="暂无相关产品"
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/dataNullXz.png" title="暂无相关产品"
|
||||||
title1="请添加或者更换查询条件"></dataNull>
|
title1="请添加或者更换查询条件"></dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="getChanPinFun"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="getChanPinFun"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
||||||
|
|||||||
@@ -81,12 +81,12 @@
|
|||||||
<getMore :isMore="tabBars[tabCurrentIndex].isMore" style="margin-bottom: 16px;"></getMore>
|
<getMore :isMore="tabBars[tabCurrentIndex].isMore" style="margin-bottom: 16px;"></getMore>
|
||||||
<view style="height: 36rpx;"></view>
|
<view style="height: 36rpx;"></view>
|
||||||
</view>
|
</view>
|
||||||
<dataNull v-else src="/static/img/chahua/dataNullXz.png" title="暂无相关产品" title1="请先添加">
|
<dataNull v-else src="/src/static/img/chahua/dataNullXz.png" title="暂无相关产品" title1="请先添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<dataNull v-else src="/static/img/chahua/dataNullXz.png" title="暂无相关产品">
|
<dataNull v-else src="/src/static/img/chahua/dataNullXz.png" title="暂无相关产品">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
export const isDevelopment = process.env.NODE_ENV === 'development'
|
export const isDevelopment = process.env.NODE_ENV === 'development'
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
upgradeName: 'erp_pda_pre',
|
upgradeName: process.env.VUE_APP_UPGRADE_NAME || 'erp_pda',
|
||||||
|
|
||||||
// 产品名称
|
// 产品名称
|
||||||
productName: '浩拓技术',
|
productName: '浩拓技术',
|
||||||
@@ -17,22 +17,16 @@ const config = {
|
|||||||
// 版本检查标识
|
// 版本检查标识
|
||||||
appCode: 'android',
|
appCode: 'android',
|
||||||
|
|
||||||
// 内部版本号码
|
|
||||||
appVersion: 1,
|
|
||||||
|
|
||||||
// 管理基础路径
|
|
||||||
adminPath: 'https://hcscmpre.zzfzyc.com/hcscm/pda/v1',
|
|
||||||
|
|
||||||
// 环境判断
|
// 环境判断
|
||||||
isDevelopment: isDevelopment,
|
isDevelopment: isDevelopment,
|
||||||
|
|
||||||
// 生产环境API URL
|
// 生产环境API URL
|
||||||
productionApiUrl: 'https://hcscmpre.zzfzyc.com/hcscm/pda/v1',
|
productionApiUrl: process.env.VUE_APP_PRODUCTION_API_URL || 'https://www.haotopai.com/hcscm/mes/server/pda/v1',
|
||||||
|
|
||||||
// 开发环境API URL选项
|
// 开发环境API URL选项
|
||||||
devApiUrlOptions: [
|
devApiUrlOptions: [
|
||||||
{ label: '测试环境', value: 'https://hcscmtest.zzfzyc.com/hcscm/pda/v1' },
|
{ label: '测试环境', value: 'https://hcscmtest.zzfzyc.com/hcscm/pda/v1' },
|
||||||
{ label: '正式环境', value: 'https://hcscmpre.zzfzyc.com/hcscm/pda/v1' },
|
{ label: '正式环境', value: process.env.VUE_APP_DEV_API_URL || 'https://www.haotopai.com/hcscm/mes/server/pda/v1' },
|
||||||
{ label: '自定义', value: 'custom' }
|
{ label: '自定义', value: 'custom' }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
+25
-27
@@ -12,9 +12,9 @@ const install = (Vue, vm) => {
|
|||||||
|
|
||||||
// 基础服务:登录登出、身份信息、菜单授权、切换系统、字典数据等
|
// 基础服务:登录登出、身份信息、菜单授权、切换系统、字典数据等
|
||||||
lang: (params = {}) => vm.$u.get('/lang/'+params.lang),
|
lang: (params = {}) => vm.$u.get('/lang/'+params.lang),
|
||||||
index: (params = {}) => vm.$u.get(config.adminPath+'/mobile/index', params),
|
index: (params = {}) => vm.$u.get(config.productionApiUrl+'/mobile/index', params),
|
||||||
getUserInfo: (params = {}) => vm.$u.get(config.adminPath+'/mobile/user/getUserInfo', params),
|
getUserInfo: (params = {}) => vm.$u.get(config.productionApiUrl+'/mobile/user/getUserInfo', params),
|
||||||
login: (params = {}) => vm.$u.post(config.adminPath+'/mobile/login/loginByPassword', params),
|
login: (params = {}) => vm.$u.post(config.productionApiUrl+'/mobile/login/loginByPassword', params),
|
||||||
// PDA登录接口
|
// PDA登录接口
|
||||||
pdaLogin: (params = {}) => vm.$u.postJson('/login', params),
|
pdaLogin: (params = {}) => vm.$u.postJson('/login', params),
|
||||||
pdaLogout: (params = {}) => vm.$u.postJson('/logout', params),
|
pdaLogout: (params = {}) => vm.$u.postJson('/logout', params),
|
||||||
@@ -23,19 +23,19 @@ const install = (Vue, vm) => {
|
|||||||
// 获取成品配布单详情
|
// 获取成品配布单详情
|
||||||
getFpmArrangeOrder: (params = {}) => vm.$u.get('/product/fpmArrangeOrder/getFpmArrangeOrder', params),
|
getFpmArrangeOrder: (params = {}) => vm.$u.get('/product/fpmArrangeOrder/getFpmArrangeOrder', params),
|
||||||
// 生成出仓单
|
// 生成出仓单
|
||||||
outFpmArrangeOrder: (params = {}) => vm.$u.put('/product/fpmArrangeOrder/outFpmArrangeOrder', params),
|
outFpmArrangeOrder: (params = {}) => vm.$u.putJson('/product/fpmArrangeOrder/outFpmArrangeOrder', params),
|
||||||
sendCode: (params = {}) => vm.$u.post(config.adminPath+'/mobile/login/sendCode', params),
|
sendCode: (params = {}) => vm.$u.post(config.productionApiUrl+'/mobile/login/sendCode', params),
|
||||||
registerUser: (params = {}) => vm.$u.post(config.adminPath+'/mobile/user/registerUser', params),
|
registerUser: (params = {}) => vm.$u.post(config.productionApiUrl+'/mobile/user/registerUser', params),
|
||||||
//首页相关api
|
//首页相关api
|
||||||
getIndexCardInfo: (params = {}) => vm.$u.get(config.adminPath+'/mobile/index/getIndexCardInfo', params),
|
getIndexCardInfo: (params = {}) => vm.$u.get(config.productionApiUrl+'/mobile/index/getIndexCardInfo', params),
|
||||||
getM2mOrderFlowList: (params = {}) => vm.$u.get(config.adminPath+'/mobile/index/getM2mOrderFlowList', params),
|
getM2mOrderFlowList: (params = {}) => vm.$u.get(config.productionApiUrl+'/mobile/index/getM2mOrderFlowList', params),
|
||||||
//获取卡可购买套餐包
|
//获取卡可购买套餐包
|
||||||
getM2mOrderPackageList: (params = {}) => vm.$u.get(config.adminPath+'/mobile/index/getM2mOrderPackageList', params),
|
getM2mOrderPackageList: (params = {}) => vm.$u.get(config.productionApiUrl+'/mobile/index/getM2mOrderPackageList', params),
|
||||||
|
|
||||||
logout: (params = {}) => vm.$u.get(config.adminPath+'/mobile/login/logout', params),
|
logout: (params = {}) => vm.$u.get(config.productionApiUrl+'/mobile/login/logout', params),
|
||||||
authInfo: (params = {}) => vm.$u.get(config.adminPath+'/authInfo', params),
|
authInfo: (params = {}) => vm.$u.get(config.productionApiUrl+'/authInfo', params),
|
||||||
menuTree: (params = {}) => vm.$u.get(config.adminPath+'/menuTree', params),
|
menuTree: (params = {}) => vm.$u.get(config.productionApiUrl+'/menuTree', params),
|
||||||
switchSys: (params = {}) => vm.$u.get(config.adminPath+'/switch/'+params.sysCode),
|
switchSys: (params = {}) => vm.$u.get(config.productionApiUrl+'/switch/'+params.sysCode),
|
||||||
dictData: (params = {}) => vm.$u.get(config.a取dminPath+'/system/dict/data/type/'+params.dictType),
|
dictData: (params = {}) => vm.$u.get(config.a取dminPath+'/system/dict/data/type/'+params.dictType),
|
||||||
|
|
||||||
// 账号服务:验证码接口、忘记密码接口、注册账号接口等
|
// 账号服务:验证码接口、忘记密码接口、注册账号接口等
|
||||||
@@ -46,36 +46,34 @@ const install = (Vue, vm) => {
|
|||||||
saveRegByValidCode: (params = {}) => vm.$u.post('/account/saveRegByValidCode', params),
|
saveRegByValidCode: (params = {}) => vm.$u.post('/account/saveRegByValidCode', params),
|
||||||
|
|
||||||
// APP公共服务
|
// APP公共服务
|
||||||
upgradeCheck: (params = {}) => vm.$u.put(vm.$u.http.config.baseUrl.replace('/pda/v1', '') + '/version/check', params, {
|
upgradeCheck: (params = {}) => vm.$u.putJson('/version/check', params),
|
||||||
'content-type': 'application/json'
|
|
||||||
}),
|
|
||||||
commentSave: (params = {}) => vm.$u.post('/app/comment/save', params),
|
commentSave: (params = {}) => vm.$u.post('/app/comment/save', params),
|
||||||
|
|
||||||
// 个人信息修改
|
// 个人信息修改
|
||||||
user: {
|
user: {
|
||||||
saveUserInfo: (params = {}) => vm.$u.post(config.adminPath+'/mobile/user/saveUserInfo', params),
|
saveUserInfo: (params = {}) => vm.$u.post(config.productionApiUrl+'/mobile/user/saveUserInfo', params),
|
||||||
infoSavePwd: (params = {}) => vm.$u.put(config.adminPath+'/system/user/profile/updatePwd', params),
|
infoSavePwd: (params = {}) => vm.$u.put(config.productionApiUrl+'/system/user/profile/updatePwd', params),
|
||||||
infoSavePqa: (params = {}) => vm.$u.post(config.adminPath+'/sys/user/infoSavePqa', params),
|
infoSavePqa: (params = {}) => vm.$u.post(config.productionApiUrl+'/sys/user/infoSavePqa', params),
|
||||||
},
|
},
|
||||||
|
|
||||||
// 员工用户查询
|
// 员工用户查询
|
||||||
empUser: {
|
empUser: {
|
||||||
listData: (params = {}) => vm.$u.get(config.adminPath+'/sys/empUser/listData', params),
|
listData: (params = {}) => vm.$u.get(config.productionApiUrl+'/sys/empUser/listData', params),
|
||||||
},
|
},
|
||||||
|
|
||||||
// 组织机构查询
|
// 组织机构查询
|
||||||
office: {
|
office: {
|
||||||
treeData: (params = {}) => vm.$u.get(config.adminPath+'/sys/office/treeData', params),
|
treeData: (params = {}) => vm.$u.get(config.productionApiUrl+'/sys/office/treeData', params),
|
||||||
},
|
},
|
||||||
|
|
||||||
// 增删改查例子
|
// 增删改查例子
|
||||||
testData: {
|
testData: {
|
||||||
form: (params = {}) => vm.$u.post(config.adminPath+'/test/testData/form', params),
|
form: (params = {}) => vm.$u.post(config.productionApiUrl+'/test/testData/form', params),
|
||||||
list: (params = {}) => vm.$u.post(config.adminPath+'/test/testData/listData', params),
|
list: (params = {}) => vm.$u.post(config.productionApiUrl+'/test/testData/listData', params),
|
||||||
save: (params = {}) => vm.$u.postJson(config.adminPath+'/test/testData/save', params),
|
save: (params = {}) => vm.$u.postJson(config.productionApiUrl+'/test/testData/save', params),
|
||||||
disable: (params = {}) => vm.$u.post(config.adminPath+'/test/testData/disable', params),
|
disable: (params = {}) => vm.$u.post(config.productionApiUrl+'/test/testData/disable', params),
|
||||||
enable: (params = {}) => vm.$u.post(config.adminPath+'/test/testData/enable', params),
|
enable: (params = {}) => vm.$u.post(config.productionApiUrl+'/test/testData/enable', params),
|
||||||
delete: (params = {}) => vm.$u.post(config.adminPath+'/test/testData/delete', params),
|
delete: (params = {}) => vm.$u.post(config.productionApiUrl+'/test/testData/delete', params),
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ const install = (Vue, vm) => {
|
|||||||
|
|
||||||
// 请求拦截,配置Token等参数
|
// 请求拦截,配置Token等参数
|
||||||
Vue.prototype.$u.http.interceptor.request = (req) => {
|
Vue.prototype.$u.http.interceptor.request = (req) => {
|
||||||
|
console.log('request', req);
|
||||||
|
console.log('baseUrl', vm.$store.state.apiurl);
|
||||||
|
console.log('完整URL', vm.$store.state.apiurl + req.url);
|
||||||
if (!req.header){
|
if (!req.header){
|
||||||
req.header = [];
|
req.header = [];
|
||||||
}
|
}
|
||||||
@@ -42,13 +45,15 @@ const install = (Vue, vm) => {
|
|||||||
req.header[rememberMeHeader] = vm.vuex_remember;
|
req.header[rememberMeHeader] = vm.vuex_remember;
|
||||||
req.remember = false;
|
req.remember = false;
|
||||||
}
|
}
|
||||||
console.log('request', req);
|
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 响应拦截,判断状态码是否通过
|
// 响应拦截,判断状态码是否通过
|
||||||
Vue.prototype.$u.http.interceptor.response = async (res, req) => {
|
Vue.prototype.$u.http.interceptor.response = async (res, req) => {
|
||||||
console.log('response', res);
|
console.log('response', res);
|
||||||
|
console.log('response statusCode', res?.statusCode);
|
||||||
|
console.log('response data', res?.data);
|
||||||
|
console.log('response errMsg', res?.errMsg);
|
||||||
|
|
||||||
// 处理401未授权状态码
|
// 处理401未授权状态码
|
||||||
if (res.statusCode === 401) {
|
if (res.statusCode === 401) {
|
||||||
@@ -63,6 +68,7 @@ const install = (Vue, vm) => {
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
console.log('res',res)
|
||||||
if (!(res.data)){
|
if (!(res.data)){
|
||||||
vm.$u.toast('未连接到服务器')
|
vm.$u.toast('未连接到服务器')
|
||||||
return Promise.reject(new Error('未连接到服务器'));
|
return Promise.reject(new Error('未连接到服务器'));
|
||||||
@@ -125,7 +131,7 @@ const install = (Vue, vm) => {
|
|||||||
|
|
||||||
// 封装 post json 请求
|
// 封装 post json 请求
|
||||||
vm.$u.postJson = (url, data = {}, header = {}) => {
|
vm.$u.postJson = (url, data = {}, header = {}) => {
|
||||||
console.log('header', header, url, vm.$u)
|
console.log('header', header, url, vm.$store.state.apiurl)
|
||||||
header['content-type'] = 'application/json';
|
header['content-type'] = 'application/json';
|
||||||
return vm.$u.http.request({
|
return vm.$u.http.request({
|
||||||
url,
|
url,
|
||||||
@@ -134,7 +140,46 @@ const install = (Vue, vm) => {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 封装 post json 请求
|
||||||
|
vm.$u.putJson = (url, data = {}, header = {}) => {
|
||||||
|
console.log('header', header, url, vm.$u)
|
||||||
|
header['content-type'] = 'application/json';
|
||||||
|
return vm.$u.http.request({
|
||||||
|
url,
|
||||||
|
method: 'PUT',
|
||||||
|
header,
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 封装不使用 baseUrl 的请求(用于完整URL)
|
||||||
|
vm.$u.putJsonFullUrl = (url, data = {}, header = {}) => {
|
||||||
|
header['content-type'] = 'application/json';
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
uni.request({
|
||||||
|
url,
|
||||||
|
method: 'PUT',
|
||||||
|
header: {
|
||||||
|
...header,
|
||||||
|
'Platform': 2,
|
||||||
|
'x-requested-with': 'XMLHttpRequest',
|
||||||
|
'Authorization': vm.vuex_token || ''
|
||||||
|
},
|
||||||
|
data,
|
||||||
|
success: (res) => {
|
||||||
|
console.log('res',res)
|
||||||
|
if (res.data && res.data.code === 0) {
|
||||||
|
resolve(res.data.data);
|
||||||
|
} else {
|
||||||
|
reject(res.data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
reject(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
+146
-102
@@ -1,143 +1,175 @@
|
|||||||
// common/scanMixin.js
|
// common/scanMixin.js
|
||||||
|
// 多厂商PDA扫码器兼容方案 - 策略模式 + 配置表驱动
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
scanReceiver: null,
|
scanReceivers: [], // 支持多个接收器
|
||||||
isPageActive: false
|
isPageActive: false,
|
||||||
|
registeredBrands: [] // 已注册的品牌
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
// 注册扫码广播(兼容多种设备)
|
// 扫码器配置表 - 方便扩展新厂商
|
||||||
|
getScannerConfigs() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
brand: 'newland', // 东集
|
||||||
|
name: '东集',
|
||||||
|
action: 'com.android.server.scannerservice.broadcast',
|
||||||
|
dataKey: 'scannerdata',
|
||||||
|
needSetup: true,
|
||||||
|
setupAction: 'com.android.scanner.service_settings',
|
||||||
|
setupParams: {
|
||||||
|
action_barcode_broadcast: 'com.android.server.scannerservice.broadcast',
|
||||||
|
key_barcode_broadcast: 'scannerdata',
|
||||||
|
endchar: 'ENTER'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
brand: 'sunmi', // 商米
|
||||||
|
name: '商米',
|
||||||
|
action: 'com.sunmi.scanner.ACTION_DATA_CODE_RECEIVED',
|
||||||
|
dataKey: 'data',
|
||||||
|
needSetup: false
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// brand: 'honeywell', // 霍尼韦尔
|
||||||
|
// name: '霍尼韦尔',
|
||||||
|
// action: 'com.honeywell.decode.intent.action.EDIT_DATA',
|
||||||
|
// dataKey: 'data',
|
||||||
|
// needSetup: false
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// brand: 'zebra', // 斑马
|
||||||
|
// name: '斑马',
|
||||||
|
// action: 'com.symbol.datawedge.api.RESULT_ACTION',
|
||||||
|
// dataKey: 'com.symbol.datawedge.data_string',
|
||||||
|
// needSetup: false
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// brand: 'idata', // 盈达聚力
|
||||||
|
// name: '盈达聚力',
|
||||||
|
// action: 'android.intent.action.SCANRESULT',
|
||||||
|
// dataKey: 'value',
|
||||||
|
// needSetup: false
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// brand: 'urovo', // 优博讯
|
||||||
|
// name: '优博讯',
|
||||||
|
// action: 'android.intent.ACTION_DECODE_DATA',
|
||||||
|
// dataKey: 'barcode_string',
|
||||||
|
// needSetup: false
|
||||||
|
// }
|
||||||
|
];
|
||||||
|
},
|
||||||
|
|
||||||
|
// 注册所有扫码广播(推荐方式:同时注册所有厂商)
|
||||||
registerScanBroadcast(scanCallback) {
|
registerScanBroadcast(scanCallback) {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
const configs = this.getScannerConfigs();
|
||||||
|
|
||||||
|
configs.forEach(config => {
|
||||||
try {
|
try {
|
||||||
// 先尝试注册商米扫码头
|
this.registerSingleBroadcast(config, scanCallback);
|
||||||
this.registerSunmiBroadcast(scanCallback)
|
this.registeredBrands.push(config.brand);
|
||||||
.then(() => {
|
console.log(`${config.name}扫码广播注册成功`);
|
||||||
console.log('商米扫码头注册成功');
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.log('商米扫码头注册失败,尝试新大陆扫码头:', error);
|
|
||||||
// 如果商米扫码头注册失败,尝试新大陆扫码头
|
|
||||||
this.registerNewlandBroadcast(scanCallback);
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("注册扫码广播失败:", error);
|
console.log(`${config.name}扫码广播注册失败:`, error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (this.registeredBrands.length > 0) {
|
||||||
|
console.log('扫码广播注册完成,已注册厂商:', this.registeredBrands.join(', '));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.error('所有扫码广播注册均失败');
|
||||||
|
return false;
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
|
||||||
|
// 注册指定厂商的扫码广播
|
||||||
|
registerScanBroadcastByBrand(brand, scanCallback) {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
const configs = this.getScannerConfigs();
|
||||||
|
const config = configs.find(c => c.brand === brand);
|
||||||
|
|
||||||
|
if (!config) {
|
||||||
|
console.error(`未找到厂商配置: ${brand}`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.registerSingleBroadcast(config, scanCallback);
|
||||||
|
this.registeredBrands.push(config.brand);
|
||||||
|
console.log(`${config.name}扫码广播注册成功`);
|
||||||
|
return true;
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`${config.name}扫码广播注册失败:`, error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
|
|
||||||
// 注册商米扫码头广播接收器
|
// 单个广播注册的核心方法
|
||||||
registerSunmiBroadcast(scanCallback) {
|
registerSingleBroadcast(config, scanCallback) {
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
try {
|
|
||||||
const main = plus.android.runtimeMainActivity();
|
const main = plus.android.runtimeMainActivity();
|
||||||
const IntentFilter = plus.android.importClass("android.content.IntentFilter");
|
|
||||||
|
|
||||||
const filter = new IntentFilter();
|
|
||||||
filter.addAction("com.sunmi.scanner.ACTION_DATA_CODE_RECEIVED");
|
|
||||||
|
|
||||||
const self = this;
|
|
||||||
const receiver = plus.android.implements(
|
|
||||||
"io.dcloud.feature.internal.reflect.BroadcastReceiver",
|
|
||||||
{
|
|
||||||
onReceive: (context, intent) => {
|
|
||||||
console.log('商米扫码广播接收,isPageActive:', self.isPageActive);
|
|
||||||
// 只有当页面活动时才处理广播
|
|
||||||
if (!self.isPageActive) return;
|
|
||||||
|
|
||||||
|
// 如果需要预配置(如东集)
|
||||||
|
if (config.needSetup && config.setupAction) {
|
||||||
try {
|
try {
|
||||||
// 导入 Intent 类以使用其方法
|
const Intent = plus.android.importClass('android.content.Intent');
|
||||||
const Intent = plus.android.importClass("android.content.Intent");
|
const setupIntent = new Intent(config.setupAction);
|
||||||
|
|
||||||
const scanResult = intent.getStringExtra("data");
|
Object.keys(config.setupParams || {}).forEach(key => {
|
||||||
const sourceBytes = intent.getByteArrayExtra("source_byte");
|
setupIntent.putExtra(key, config.setupParams[key]);
|
||||||
|
|
||||||
console.log('商米扫码结果:', scanResult, sourceBytes);
|
|
||||||
|
|
||||||
if (scanResult) {
|
|
||||||
self.handleScanResult(scanResult, scanCallback);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('处理商米广播数据时出错:', error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// 注册广播接收器
|
|
||||||
main.registerReceiver(receiver, filter);
|
|
||||||
this.scanReceiver = receiver;
|
|
||||||
console.log('商米扫码广播接收器注册成功');
|
|
||||||
resolve();
|
|
||||||
} catch (error) {
|
|
||||||
console.error('注册商米广播接收器失败:', error);
|
|
||||||
reject(error);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
|
||||||
|
|
||||||
// 注册新大陆扫码头广播接收器
|
main.sendBroadcast(setupIntent);
|
||||||
registerNewlandBroadcast(scanCallback) {
|
console.log(`${config.name}扫码配置完成`);
|
||||||
try {
|
|
||||||
const main = plus.android.runtimeMainActivity();
|
|
||||||
|
|
||||||
// 先配置扫码枪广播设置
|
|
||||||
try {
|
|
||||||
const Intent = plus.android.importClass("android.content.Intent");
|
|
||||||
const intent = new Intent("com.android.scanner.service_settings");
|
|
||||||
intent.putExtra(
|
|
||||||
"action_barcode_broadcast",
|
|
||||||
"com.android.server.scannerservice.broadcast"
|
|
||||||
);
|
|
||||||
intent.putExtra("key_barcode_broadcast", "scannerdata");
|
|
||||||
main.sendBroadcast(intent);
|
|
||||||
console.log('新大陆扫码枪广播配置完成');
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("配置新大陆扫码枪广播失败:", error);
|
console.error(`${config.name}扫码配置失败:`, error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 注册广播接收器
|
// 注册广播接收器
|
||||||
const IntentFilter = plus.android.importClass(
|
const IntentFilter = plus.android.importClass('android.content.IntentFilter');
|
||||||
"android.content.IntentFilter"
|
|
||||||
);
|
|
||||||
const filter = new IntentFilter();
|
const filter = new IntentFilter();
|
||||||
filter.addAction("com.android.server.scannerservice.broadcast");
|
filter.addAction(config.action);
|
||||||
console.log("添加新大陆广播action完成");
|
|
||||||
|
|
||||||
const self = this;
|
const self = this;
|
||||||
const receiver = plus.android.implements(
|
const receiver = plus.android.implements(
|
||||||
"io.dcloud.feature.internal.reflect.BroadcastReceiver",
|
'io.dcloud.feature.internal.reflect.BroadcastReceiver',
|
||||||
{
|
{
|
||||||
onReceive: (context, intent) => {
|
onReceive: (context, intent) => {
|
||||||
console.log('新大陆扫码广播接收,isPageActive:', self.isPageActive);
|
console.log(`${config.name}扫码广播接收,isPageActive:`, self.isPageActive);
|
||||||
// 只有当页面活动时才处理广播
|
|
||||||
if (!self.isPageActive) return;
|
if (!self.isPageActive) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 导入 Intent 类以使用其方法
|
plus.android.importClass('android.content.Intent');
|
||||||
const Intent = plus.android.importClass("android.content.Intent");
|
const scanResult = intent.getStringExtra(config.dataKey);
|
||||||
|
|
||||||
|
console.log(`${config.name}扫码结果:`, scanResult);
|
||||||
|
|
||||||
const scanResult = intent.getStringExtra("scannerdata");
|
|
||||||
console.log("新大陆扫码结果:", scanResult);
|
|
||||||
if (scanResult) {
|
if (scanResult) {
|
||||||
self.handleScanResult(scanResult, scanCallback);
|
self.handleScanResult(scanResult, scanCallback);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("处理新大陆广播数据时出错:", error);
|
console.error(`处理${config.name}广播数据出错:`, error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// 注册广播接收器
|
|
||||||
main.registerReceiver(receiver, filter);
|
main.registerReceiver(receiver, filter);
|
||||||
this.scanReceiver = receiver;
|
|
||||||
console.log("新大陆扫码广播注册成功,等待扫码...");
|
// 保存接收器引用,用于后续注销
|
||||||
} catch (error) {
|
this.scanReceivers.push({
|
||||||
console.error("注册新大陆扫码广播失败:", error);
|
brand: config.brand,
|
||||||
throw error;
|
receiver: receiver
|
||||||
}
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 处理扫码结果的统一方法
|
// 处理扫码结果的统一方法
|
||||||
@@ -156,18 +188,30 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 取消扫码广播监听
|
// 取消所有扫码广播监听
|
||||||
unregisterScanBroadcast() {
|
unregisterScanBroadcast() {
|
||||||
if (this.scanReceiver) {
|
// #ifdef APP-PLUS
|
||||||
|
if (this.scanReceivers.length === 0) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const main = plus.android.runtimeMainActivity();
|
const main = plus.android.runtimeMainActivity();
|
||||||
main.unregisterReceiver(this.scanReceiver);
|
|
||||||
this.scanReceiver = null;
|
this.scanReceivers.forEach(item => {
|
||||||
console.log("扫码广播注销成功");
|
try {
|
||||||
|
main.unregisterReceiver(item.receiver);
|
||||||
|
console.log(`${item.brand}扫码广播注销成功`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("注销扫码广播失败:", err);
|
console.error(`${item.brand}扫码广播注销失败:`, err);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.scanReceivers = [];
|
||||||
|
this.registeredBrands = [];
|
||||||
|
console.log('所有扫码广播注销完成');
|
||||||
|
} catch (err) {
|
||||||
|
console.error('注销扫码广播失败:', err);
|
||||||
}
|
}
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
|
|
||||||
// 通用的商品扫描处理方法
|
// 通用的商品扫描处理方法
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
props: {
|
props: {
|
||||||
src: {
|
src: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '/static/img/dataNull.png'
|
default: '/src/static/img/dataNull.png'
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
+10
-10
@@ -2,12 +2,12 @@
|
|||||||
"name" : "浩拓技术",
|
"name" : "浩拓技术",
|
||||||
"appid" : "__UNI__F79F300",
|
"appid" : "__UNI__F79F300",
|
||||||
"description" : "浩拓纺织平台",
|
"description" : "浩拓纺织平台",
|
||||||
"versionName" : "1.1.1",
|
"versionName" : "1.1.4",
|
||||||
"versionCode" : 101,
|
"versionCode" : 104,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"optimization" : {
|
"optimization" : {
|
||||||
"subPackages" : true
|
"subPackages" : false
|
||||||
},
|
},
|
||||||
"safearea" : {
|
"safearea" : {
|
||||||
"bottom" : {
|
"bottom" : {
|
||||||
@@ -76,10 +76,10 @@
|
|||||||
},
|
},
|
||||||
"icons" : {
|
"icons" : {
|
||||||
"android" : {
|
"android" : {
|
||||||
"hdpi" : "dist/dev/app-plus/static/haotop/image/logo/72.png",
|
"hdpi" : "src/static/haotop/image/logo/72.png",
|
||||||
"xhdpi" : "dist/dev/app-plus/static/haotop/image/logo/96.png",
|
"xhdpi" : "src/static/haotop/image/logo/96.png",
|
||||||
"xxhdpi" : "dist/dev/app-plus/static/haotop/image/logo/144.png",
|
"xxhdpi" : "src/static/haotop/image/logo/144.png",
|
||||||
"xxxhdpi" : "dist/dev/app-plus/static/haotop/image/logo/1024.png"
|
"xxxhdpi" : "src/static/haotop/image/logo/192.png"
|
||||||
},
|
},
|
||||||
"ios" : {
|
"ios" : {
|
||||||
"appstore" : "",
|
"appstore" : "",
|
||||||
@@ -109,9 +109,9 @@
|
|||||||
"splashscreen" : {
|
"splashscreen" : {
|
||||||
"androidStyle" : "default",
|
"androidStyle" : "default",
|
||||||
"android" : {
|
"android" : {
|
||||||
"hdpi" : "dist/dev/app-plus/static/haotop/image/logo/Start.png",
|
"hdpi" : "src/static/haotop/image/logo/Start.png",
|
||||||
"xhdpi" : "dist/dev/app-plus/static/haotop/image/logo/Start.png",
|
"xhdpi" : "src/static/haotop/image/logo/Start.png",
|
||||||
"xxhdpi" : "dist/dev/app-plus/static/haotop/image/logo/Start.png"
|
"xxhdpi" : "src/static/haotop/image/logo/Start.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<topDropdown :isSxShow="true" :dropdown1="dropdown1" dropdown2="上架中" :options1="options1" :options2="isSjList" :optionsSx="sxList" searchUrl="./searchAdmin" @dropDownFun1="dropDownFun1" @dropDownFun2="dropDownFun2" @optionSxFun="optionSxFun">
|
<topDropdown :isSxShow="true" :dropdown1="dropdown1" dropdown2="上架中" :options1="options1" :options2="isSjList" :optionsSx="sxList" searchUrl="./searchAdmin" @dropDownFun1="dropDownFun1" @dropDownFun2="dropDownFun2" @optionSxFun="optionSxFun">
|
||||||
</topDropdown>
|
</topDropdown>
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/dataNullXz.png" title="暂无相关产品"
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/dataNullXz.png" title="暂无相关产品"
|
||||||
title1="请添加或者更换查询条件"></dataNull>
|
title1="请添加或者更换查询条件"></dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="getChanPinFun"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="getChanPinFun"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/dataNullXz.png" title="暂无相关分类"
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/dataNullXz.png" title="暂无相关分类"
|
||||||
title1="点击添加按钮添加相关分类"></dataNull>
|
title1="点击添加按钮添加相关分类"></dataNull>
|
||||||
<view v-else class="content">
|
<view v-else class="content">
|
||||||
<view class="row" v-for="(row, index) in list" :key="index">
|
<view class="row" v-for="(row, index) in list" :key="index">
|
||||||
|
|||||||
@@ -44,13 +44,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<dataNull v-else src="/static/img/chahua/dataNullXz.png" title="暂无产品参数说明"></dataNull>
|
<dataNull v-else src="/src/static/img/chahua/dataNullXz.png" title="暂无产品参数说明"></dataNull>
|
||||||
<view class="xqTitle">产品详情图</view>
|
<view class="xqTitle">产品详情图</view>
|
||||||
<view class="imgXQ" v-if="detail.cpXqtList && detail.cpXqtList.length > 0">
|
<view class="imgXQ" v-if="detail.cpXqtList && detail.cpXqtList.length > 0">
|
||||||
<u-image width="100%" mode="widthFix" v-for="(item, index) in detail.cpXqtList" :key="index" :src="item.url"
|
<u-image width="100%" mode="widthFix" v-for="(item, index) in detail.cpXqtList" :key="index" :src="item.url"
|
||||||
:lazy-load="true" @click="xqtClickFun(item.url, detail.cpXqtList)"></u-image>
|
:lazy-load="true" @click="xqtClickFun(item.url, detail.cpXqtList)"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<dataNull v-else src="/static/img/chahua/dataNullXz.png" title="暂无产品详情图"></dataNull>
|
<dataNull v-else src="/src/static/img/chahua/dataNullXz.png" title="暂无产品详情图"></dataNull>
|
||||||
<!--提交按钮-->
|
<!--提交按钮-->
|
||||||
<view v-if="!pageType" class="submitView">
|
<view v-if="!pageType" class="submitView">
|
||||||
<u-button type="primary" class="submitBtn" :ripple="true" ripple-bg-color="#909399" @click="updateCpFun">修改产品</u-button>
|
<u-button type="primary" class="submitBtn" :ripple="true" ripple-bg-color="#909399" @click="updateCpFun">修改产品</u-button>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<searchView placeholderStr="请输入产品名称" @searchViewClickFun="searchEventsFun($event)"></searchView>
|
<searchView placeholderStr="请输入产品名称" @searchViewClickFun="searchEventsFun($event)"></searchView>
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/dataNullXz.png" title="暂无相关产品"
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/dataNullXz.png" title="暂无相关产品"
|
||||||
title1="请更换查询条件"></dataNull>
|
title1="请更换查询条件"></dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="getChanPinFun"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="getChanPinFun"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<searchView placeholderStr="请输入产品名称" @searchViewClickFun="searchEventsFun($event)"></searchView>
|
<searchView placeholderStr="请输入产品名称" @searchViewClickFun="searchEventsFun($event)"></searchView>
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/dataNullXz.png" title="暂无相关产品"
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/dataNullXz.png" title="暂无相关产品"
|
||||||
title1="请添加或者更换查询条件"></dataNull>
|
title1="请添加或者更换查询条件"></dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="getChanPinFun"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="getChanPinFun"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
||||||
|
|||||||
@@ -57,12 +57,12 @@
|
|||||||
<getMore :isMore="tabBars[tabCurrentIndex].isMore" style="margin-bottom: 16px;"></getMore>
|
<getMore :isMore="tabBars[tabCurrentIndex].isMore" style="margin-bottom: 16px;"></getMore>
|
||||||
<view style="height: 36rpx;"></view>
|
<view style="height: 36rpx;"></view>
|
||||||
</view>
|
</view>
|
||||||
<dataNull v-else src="/static/img/chahua/dataNullXz.png" title="暂无相关产品" title1="请先添加">
|
<dataNull v-else src="/src/static/img/chahua/dataNullXz.png" title="暂无相关产品" title1="请先添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<dataNull v-else src="/static/img/chahua/dataNullXz.png" title="暂无相关产品">
|
<dataNull v-else src="/src/static/img/chahua/dataNullXz.png" title="暂无相关产品">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<getMore :isMore="isMore" nullMsg="已加载全部~"></getMore>
|
<getMore :isMore="isMore" nullMsg="已加载全部~"></getMore>
|
||||||
<view class="h200"></view>
|
<view class="h200"></view>
|
||||||
</view>
|
</view>
|
||||||
<dataNull v-else src="/static/img/dataNull.png" title="暂无相关客户哦~"></dataNull>
|
<dataNull v-else src="/src/static/img/dataNull.png" title="暂无相关客户哦~"></dataNull>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<u-action-sheet :list="sheetList" v-model="moreShow"></u-action-sheet>
|
<u-action-sheet :list="sheetList" v-model="moreShow"></u-action-sheet>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<getMore :isMore="isMore" nullMsg="已加载全部~"></getMore>
|
<getMore :isMore="isMore" nullMsg="已加载全部~"></getMore>
|
||||||
<view class="h200"></view>
|
<view class="h200"></view>
|
||||||
</view>
|
</view>
|
||||||
<dataNull v-else src="/static/img/dataNull.png" title="暂无相关客户哦~"></dataNull>
|
<dataNull v-else src="/src/static/img/dataNull.png" title="暂无相关客户哦~"></dataNull>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<u-action-sheet :list="sheetList" v-model="moreShow"></u-action-sheet>
|
<u-action-sheet :list="sheetList" v-model="moreShow"></u-action-sheet>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<getMore :isMore="isMore" nullMsg="已加载全部~"></getMore>
|
<getMore :isMore="isMore" nullMsg="已加载全部~"></getMore>
|
||||||
<view class="h200"></view>
|
<view class="h200"></view>
|
||||||
</view>
|
</view>
|
||||||
<dataNull v-else src="/static/img/dataNull.png" title="暂无相关营销部门哦~"></dataNull>
|
<dataNull v-else src="/src/static/img/dataNull.png" title="暂无相关营销部门哦~"></dataNull>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<u-action-sheet :list="sheetList" v-model="moreShow"></u-action-sheet>
|
<u-action-sheet :list="sheetList" v-model="moreShow"></u-action-sheet>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关排产单" title1="请添加或者更换搜索添加">
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关排产单" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="selectDataFun"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="selectDataFun"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<topDropdown :isSxShow="true" :isPaiXu="true" :dropdown1="dropdown1" :options1="options1" :optionsSx="sxList" :optionsPx="optionsPx" :isDuoXuan="true" searchLabel1="报价名称" searchPh1="请输入报价单名称" @searchBoxEmitFun="searchBoxEmitFun" @dropDownFun1="dropDownFun1" @optionSxFun="optionSxFun" @optionPxFun="optionPxFun" :isKhShow="true"></topDropdown>
|
<topDropdown :isSxShow="true" :isPaiXu="true" :dropdown1="dropdown1" :options1="options1" :optionsSx="sxList" :optionsPx="optionsPx" :isDuoXuan="true" searchLabel1="报价名称" searchPh1="请输入报价单名称" @searchBoxEmitFun="searchBoxEmitFun" @dropDownFun1="dropDownFun1" @optionSxFun="optionSxFun" @optionPxFun="optionPxFun" :isKhShow="true"></topDropdown>
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关合同" title1="请添加或者更换搜索添加"></dataNull>
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关合同" title1="请添加或者更换搜索添加"></dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="selectDataFun"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="selectDataFun"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray" @refresherrefresh="onRefresh" @refresherrestore="onRestore">
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray" @refresherrefresh="onRefresh" @refresherrestore="onRestore">
|
||||||
<view v-for="(item, index) in list" :key="index" @click="cardClickFun(item, index)">
|
<view v-for="(item, index) in list" :key="index" @click="cardClickFun(item, index)">
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
||||||
</div>
|
</div>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关销售付运资料" title1="请添加或者更换搜索添加">
|
<dataNull v-if="ItemDataList.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关销售付运资料" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
||||||
</div>
|
</div>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关销售预约单" title1="请添加或者更换搜索添加">
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关销售预约单" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="selectDataFun"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="selectDataFun"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
<!-- 空状态展示 -->
|
<!-- 空状态展示 -->
|
||||||
<view v-if="showEmpty" class="empty-state">
|
<view v-if="showEmpty" class="empty-state">
|
||||||
<dataNull
|
<dataNull
|
||||||
src="/static/img/chahua/gjNull.png"
|
src="/src/static/img/chahua/gjNull.png"
|
||||||
title="暂无相关配布单"
|
title="暂无相关配布单"
|
||||||
title1="请添加或者更换搜索添加"
|
title1="请添加或者更换搜索添加"
|
||||||
></dataNull>
|
></dataNull>
|
||||||
|
|||||||
@@ -6,31 +6,17 @@
|
|||||||
<text class="title" style="width: 200px">日期:{{ BillDate }}</text>
|
<text class="title" style="width: 200px">日期:{{ BillDate }}</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width: 200px"
|
<text class="title" style="width: 200px">客户名称:{{ CustomerName }}</text>
|
||||||
>客户名称:{{ CustomerName }}</text
|
<text class="title" style="width: 200px">销 售 员:{{ SaleUserName }}</text>
|
||||||
>
|
|
||||||
<text class="title" style="width: 200px"
|
|
||||||
>销 售 员:{{ SaleUserName }}</text
|
|
||||||
>
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width: 200px"
|
<text class="title" style="width: 200px">仓库名称:{{ StoreName }}{{ ToStoreName }}</text>
|
||||||
>仓库名称:{{ StoreName }}{{ ToStoreName }}</text
|
|
||||||
>
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width: 200px"
|
<text class="title" style="width: 200px">备注内容:{{ BillRemark }}</text>
|
||||||
>备注内容:{{ BillRemark }}</text
|
|
||||||
>
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label-width="130" label="条码资料:">
|
<u-form-item label-width="130" label="条码资料:">
|
||||||
<input
|
<input type="text" v-model="QRBarCode" maxlength="-1" style="width: 170px" @confirm="SalePickBillDetailScan" />
|
||||||
type="text"
|
|
||||||
v-model="QRBarCode"
|
|
||||||
maxlength="-1"
|
|
||||||
style="width: 170px"
|
|
||||||
@confirm="SalePickBillDetailScan"
|
|
||||||
/>
|
|
||||||
<checkbox-group @change="handleAllCrockNoChange">
|
<checkbox-group @change="handleAllCrockNoChange">
|
||||||
<checkbox :checked="AllCrockNoScanStatus">整缸</checkbox>
|
<checkbox :checked="AllCrockNoScanStatus">整缸</checkbox>
|
||||||
</checkbox-group>
|
</checkbox-group>
|
||||||
@@ -41,58 +27,38 @@
|
|||||||
</u-form>
|
</u-form>
|
||||||
<u-form ref="uForm">
|
<u-form ref="uForm">
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width: 400px"
|
<text class="title" style="width: 400px">成品名称:{{ FabricGoodsNo }}{{ FabricGoodsName }}</text>
|
||||||
>成品名称:{{ FabricGoodsNo }}{{ FabricGoodsName }}</text
|
|
||||||
>
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width: 400px"
|
<text class="title" style="width: 400px">色号颜色:{{ GoodsCodeNo }}{{ GoodsCodeName }}</text>
|
||||||
>色号颜色:{{ GoodsCodeNo }}{{ GoodsCodeName }}</text
|
|
||||||
>
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width: 200px">成品缸号:{{ CrockNo }}</text>
|
<text class="title" style="width: 200px">成品缸号:{{ CrockNo }}</text>
|
||||||
<text class="title" style="width: 200px"
|
<text class="title" style="width: 200px">成品卷号:{{ GoodsBillNo }}</text>
|
||||||
>成品卷号:{{ GoodsBillNo }}</text
|
|
||||||
>
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title">{{ BillDataMessage }}</text>
|
<text class="title">{{ BillDataMessage }}</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width: 130px"
|
<text class="title" style="width: 130px">配布条数:{{ BillSumRoll }}</text>
|
||||||
>配布条数:{{ BillSumRoll }}</text
|
|
||||||
>
|
|
||||||
<text class="title" style="width: 130px">数量:{{ BillSumQty }}</text>
|
<text class="title" style="width: 130px">数量:{{ BillSumQty }}</text>
|
||||||
<text class="title" style="width: 120px">米数:{{ BillSumMQty }}</text>
|
<text class="title" style="width: 120px">米数:{{ BillSumMQty }}</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width: 130px"
|
<text class="title" style="width: 130px">已配条数:{{ BillScanRoll }}</text>
|
||||||
>已配条数:{{ BillScanRoll }}</text
|
|
||||||
>
|
|
||||||
<text class="title" style="width: 130px">数量:{{ BillScanQty }}</text>
|
<text class="title" style="width: 130px">数量:{{ BillScanQty }}</text>
|
||||||
<text class="title" style="width: 120px">米数:{{ BillScanMQty }}</text>
|
<text class="title" style="width: 120px">米数:{{ BillScanMQty }}</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view class="submitView">
|
<view class="submitView">
|
||||||
<u-button
|
<u-button type="primary" class="submitBtn" :ripple="true" :loading="submitLoading" ripple-bg-color="#909399"
|
||||||
type="primary"
|
@click="submitBtnFun">
|
||||||
class="submitBtn"
|
|
||||||
:ripple="true"
|
|
||||||
:loading="submitLoading"
|
|
||||||
ripple-bg-color="#909399"
|
|
||||||
@click="submitBtnFun"
|
|
||||||
>
|
|
||||||
{{ pageType ? "保存" : "提交" }}
|
{{ pageType ? "保存" : "提交" }}
|
||||||
</u-button>
|
</u-button>
|
||||||
</view>
|
</view>
|
||||||
</u-form>
|
</u-form>
|
||||||
<view class="u-demo-area">
|
<view class="u-demo-area">
|
||||||
<u-toast ref="uToast"></u-toast>
|
<u-toast ref="uToast"></u-toast>
|
||||||
<wyb-table
|
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDetailList" />
|
||||||
ref="table"
|
|
||||||
:headers="headersMaster"
|
|
||||||
:contents="GoodsDetailList"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -105,8 +71,10 @@ import util, {
|
|||||||
playErrorAudio,
|
playErrorAudio,
|
||||||
} from "../../common/util";
|
} from "../../common/util";
|
||||||
import wybTable from "@/components/wyb-table/wyb-table.vue";
|
import wybTable from "@/components/wyb-table/wyb-table.vue";
|
||||||
|
import scanMixin from "@/common/scanMixin.js";
|
||||||
let that = "";
|
let that = "";
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [scanMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
SaleBillNo: "", // 单号
|
SaleBillNo: "", // 单号
|
||||||
@@ -192,8 +160,7 @@ export default {
|
|||||||
],
|
],
|
||||||
scanningInput: "", // 用于累积扫码输入
|
scanningInput: "", // 用于累积扫码输入
|
||||||
lastKeyTime: 0, // 用于判断扫码速度
|
lastKeyTime: 0, // 用于判断扫码速度
|
||||||
scanReceiver: null,
|
// scanReceiver 和 isPageActive 由 scanMixin 提供
|
||||||
isPageActive: false, // 添加页面活动状态标志
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -214,14 +181,13 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onUnload() {
|
onUnload() {
|
||||||
// #ifdef APP-PLUS
|
|
||||||
this.isPageActive = false;
|
this.isPageActive = false;
|
||||||
|
// #ifdef APP-PLUS
|
||||||
this.unregisterScanBroadcast();
|
this.unregisterScanBroadcast();
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
|
||||||
onHide() {
|
onHide() {
|
||||||
// 页面隐藏时
|
|
||||||
this.isPageActive = false;
|
this.isPageActive = false;
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
this.unregisterScanBroadcast();
|
this.unregisterScanBroadcast();
|
||||||
@@ -229,10 +195,15 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
// 页面显示时
|
|
||||||
this.isPageActive = true;
|
this.isPageActive = true;
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
this.registerScanBroadcast();
|
this.registerScanBroadcast((scanResult) => {
|
||||||
|
console.log("配布单详情-扫码结果:", scanResult);
|
||||||
|
this.QRBarCode = scanResult;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.handleScans();
|
||||||
|
});
|
||||||
|
});
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -412,160 +383,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 注册扫码广播接收器(支持商米和新大陆扫码头)
|
|
||||||
registerScanBroadcast() {
|
|
||||||
try {
|
|
||||||
// 先尝试注册商米扫码头
|
|
||||||
this.registerSunmiBroadcast()
|
|
||||||
.then(() => {
|
|
||||||
console.log('商米扫码头注册成功');
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.log('商米扫码头注册失败,尝试新大陆扫码头:', error);
|
|
||||||
// 如果商米扫码头注册失败,尝试新大陆扫码头
|
|
||||||
this.registerNewlandBroadcast();
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
console.error("注册扫码广播失败:", error);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 注册商米扫码头广播接收器
|
|
||||||
registerSunmiBroadcast() {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
try {
|
|
||||||
const main = plus.android.runtimeMainActivity();
|
|
||||||
const IntentFilter = plus.android.importClass("android.content.IntentFilter");
|
|
||||||
|
|
||||||
const filter = new IntentFilter();
|
|
||||||
filter.addAction("com.sunmi.scanner.ACTION_DATA_CODE_RECEIVED");
|
|
||||||
|
|
||||||
const receiver = plus.android.implements(
|
|
||||||
"io.dcloud.feature.internal.reflect.BroadcastReceiver",
|
|
||||||
{
|
|
||||||
onReceive: (context, intent) => {
|
|
||||||
console.log('商米扫码广播接收,isPageActive:', this.isPageActive);
|
|
||||||
// 只有当页面活动时才处理广播
|
|
||||||
if (!this.isPageActive) return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
const scanResult = intent.getStringExtra("data");
|
|
||||||
const sourceBytes = intent.getByteArrayExtra("source_byte");
|
|
||||||
|
|
||||||
console.log('商米扫码结果:', scanResult, sourceBytes);
|
|
||||||
|
|
||||||
if (scanResult) {
|
|
||||||
this.handleScanResult(scanResult);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('处理商米广播数据时出错:', error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// 注册广播接收器
|
|
||||||
main.registerReceiver(receiver, filter);
|
|
||||||
this.scanReceiver = receiver;
|
|
||||||
console.log('商米扫码广播接收器注册成功');
|
|
||||||
resolve();
|
|
||||||
} catch (error) {
|
|
||||||
console.error('注册商米广播接收器失败:', error);
|
|
||||||
reject(error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 注册新大陆扫码头广播接收器
|
|
||||||
registerNewlandBroadcast() {
|
|
||||||
try {
|
|
||||||
const main = plus.android.runtimeMainActivity();
|
|
||||||
|
|
||||||
// 先配置扫码枪广播设置
|
|
||||||
try {
|
|
||||||
const Intent = plus.android.importClass("android.content.Intent");
|
|
||||||
const intent = new Intent("com.android.scanner.service_settings");
|
|
||||||
intent.putExtra(
|
|
||||||
"action_barcode_broadcast",
|
|
||||||
"com.android.server.scannerservice.broadcast"
|
|
||||||
);
|
|
||||||
intent.putExtra("key_barcode_broadcast", "scannerdata");
|
|
||||||
main.sendBroadcast(intent);
|
|
||||||
console.log('新大陆扫码枪广播配置完成');
|
|
||||||
} catch (error) {
|
|
||||||
console.error("配置新大陆扫码枪广播失败:", error);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 注册广播接收器
|
|
||||||
const IntentFilter = plus.android.importClass(
|
|
||||||
"android.content.IntentFilter"
|
|
||||||
);
|
|
||||||
const filter = new IntentFilter();
|
|
||||||
filter.addAction("com.android.server.scannerservice.broadcast");
|
|
||||||
console.log("添加新大陆广播action完成");
|
|
||||||
|
|
||||||
const receiver = plus.android.implements(
|
|
||||||
"io.dcloud.feature.internal.reflect.BroadcastReceiver",
|
|
||||||
{
|
|
||||||
onReceive: (context, intent) => {
|
|
||||||
console.log('新大陆扫码广播接收,isPageActive:', this.isPageActive);
|
|
||||||
// 只有当页面活动时才处理广播
|
|
||||||
if (!this.isPageActive) return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
const scanResult = intent.getStringExtra("scannerdata");
|
|
||||||
console.log("新大陆扫码结果:", scanResult);
|
|
||||||
if (scanResult) {
|
|
||||||
this.handleScanResult(scanResult);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error("处理新大陆广播数据时出错:", error);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// 注册广播接收器
|
|
||||||
main.registerReceiver(receiver, filter);
|
|
||||||
this.scanReceiver = receiver;
|
|
||||||
console.log("新大陆扫码广播注册成功,等待扫码...");
|
|
||||||
} catch (error) {
|
|
||||||
console.error("注册新大陆扫码广播失败:", error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 处理扫码结果的统一方法
|
|
||||||
handleScanResult(scanResult) {
|
|
||||||
try {
|
|
||||||
// 数据清理:去除空格、换行符等
|
|
||||||
let cleanCode = scanResult.replace(/\s+/g, '').replace(/[\r\n]/g, '');
|
|
||||||
|
|
||||||
console.log("配布单详情-扫码结果:", cleanCode);
|
|
||||||
|
|
||||||
this.QRBarCode = cleanCode;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.handleScans();
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
console.error("处理扫码结果时出错:", error);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 注销扫码广播接收器
|
|
||||||
unregisterScanBroadcast() {
|
|
||||||
if (this.scanReceiver) {
|
|
||||||
try {
|
|
||||||
const main = plus.android.runtimeMainActivity();
|
|
||||||
main.unregisterReceiver(this.scanReceiver);
|
|
||||||
this.scanReceiver = null;
|
|
||||||
console.log("扫码广播注销成功");
|
|
||||||
} catch (error) {
|
|
||||||
console.error("注销扫码广播失败:", error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
SalePickBillDetailScan() {
|
SalePickBillDetailScan() {
|
||||||
// 聚焦输入框触发的方法
|
// 聚焦输入框触发的方法
|
||||||
this.handleScans();
|
this.handleScans();
|
||||||
@@ -601,13 +418,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 新增提交订单的方法
|
// 新增提交订单的方法
|
||||||
submitOrder: function() {
|
submitOrder: function () {
|
||||||
this.submitLoading = true
|
this.submitLoading = true
|
||||||
this.$u.api.outFpmArrangeOrder({
|
this.$u.api.outFpmArrangeOrder({
|
||||||
id: parseInt(this.BillMasterID)
|
id: parseInt(this.BillMasterID)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.submitLoading = false
|
this.submitLoading = false
|
||||||
console.log('outFpmArrangeOrder res',res)
|
console.log('outFpmArrangeOrder res', res)
|
||||||
if (res) {
|
if (res) {
|
||||||
this.BillDataMessage = "成功生成出仓单!";
|
this.BillDataMessage = "成功生成出仓单!";
|
||||||
this.playSuccess();
|
this.playSuccess();
|
||||||
@@ -676,7 +493,7 @@ page {
|
|||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpInput > input {
|
.cpInput>input {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1rpx solid #dddddd;
|
border: 1rpx solid #dddddd;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -690,7 +507,7 @@ page {
|
|||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpInput1 > input {
|
.cpInput1>input {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1rpx solid #dddddd;
|
border: 1rpx solid #dddddd;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
||||||
</div>
|
</div>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
<dataNull v-if="ItemDataList.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
||||||
</div>
|
</div>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关胚布进仓单" title1="请添加或者更换搜索添加">
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关胚布进仓单" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered"
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
@change="onTabChange"></u-tabs>
|
@change="onTabChange"></u-tabs>
|
||||||
</div>
|
</div>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关出仓资料"
|
<dataNull v-if="ItemDataList.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关出仓资料"
|
||||||
title1="请添加或者更换搜索添加">
|
title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" refresher-enabled :refresher-threshold="200"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" refresher-enabled :refresher-threshold="200"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
@change="onTabChange"></u-tabs>
|
@change="onTabChange"></u-tabs>
|
||||||
</div>
|
</div>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<!-- <scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
<!-- <scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
<view class="wrap">
|
<view class="wrap">
|
||||||
<u-form ref="uForm">
|
<u-form ref="uForm">
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">单号:{{GoodsCheckBillNo}}</text>
|
<text class="title" style="width:200px;">单号:{{ GoodsCheckBillNo }}</text>
|
||||||
<text class="title" style="width:200px;">日期:{{GoodsCheckBillDate}}</text>
|
<text class="title" style="width:200px;">日期:{{ GoodsCheckBillDate }}</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">仓库名称:{{StoreName}}</text>
|
<text class="title" style="width:200px;">仓库名称:{{ StoreName }}</text>
|
||||||
<text class="title" style="width:200px;">仓位名称:{{StoreStationName}}</text>
|
<text class="title" style="width:200px;">仓位名称:{{ StoreStationName }}</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label-width="150" label="条码资料:">
|
<u-form-item label-width="150" label="条码资料:">
|
||||||
<input type="text" v-model="QRBarCode" maxlength="-1" style="width:200px;"
|
<input type="text" v-model="QRBarCode" maxlength="-1" style="width:200px;"
|
||||||
@@ -17,32 +17,32 @@
|
|||||||
</checkbox-group>
|
</checkbox-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title">{{BillDataMessage}}</text>
|
<text class="title">{{ BillDataMessage }}</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">成品编号:{{FabricGoodsNo}}</text>
|
<text class="title" style="width:200px;">成品编号:{{ FabricGoodsNo }}</text>
|
||||||
<text class="title" style="width:200px;">成品重量:{{GoodsQty}}KG</text>
|
<text class="title" style="width:200px;">成品重量:{{ GoodsQty }}KG</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">成品色号:{{GoodsCodeNo}}</text>
|
<text class="title" style="width:200px;">成品色号:{{ GoodsCodeNo }}</text>
|
||||||
<text class="title" style="width:200px;">成品颜色:{{GoodsCodeName}}</text>
|
<text class="title" style="width:200px;">成品颜色:{{ GoodsCodeName }}</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">成品缸号:{{CrockNo}}</text>
|
<text class="title" style="width:200px;">成品缸号:{{ CrockNo }}</text>
|
||||||
<text class="title" style="width:200px;">缸号卷号:{{GoodsBillNo}}</text>
|
<text class="title" style="width:200px;">缸号卷号:{{ GoodsBillNo }}</text>
|
||||||
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">本架盘前:{{BillSumOldRoll}}条</text>
|
<text class="title" style="width:200px;">本架盘前:{{ BillSumOldRoll }}条</text>
|
||||||
<text class="title" style="width:200px;">本架实盘:{{BillSumNewRoll}}条</text>
|
<text class="title" style="width:200px;">本架实盘:{{ BillSumNewRoll }}条</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">本色盘前:{{GoodsCodeNoSumOldRoll}}条</text>
|
<text class="title" style="width:200px;">本色盘前:{{ GoodsCodeNoSumOldRoll }}条</text>
|
||||||
<text class="title" style="width:200px;">本色实盘:{{GoodsCodeNoSumNewRoll}}条</text>
|
<text class="title" style="width:200px;">本色实盘:{{ GoodsCodeNoSumNewRoll }}条</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">本缸盘前:{{CrockNoSumOldRoll}}条</text>
|
<text class="title" style="width:200px;">本缸盘前:{{ CrockNoSumOldRoll }}条</text>
|
||||||
<text class="title" style="width:200px;">本缸实盘:{{CrockNoSumNewRoll}}条</text>
|
<text class="title" style="width:200px;">本缸实盘:{{ CrockNoSumNewRoll }}条</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
<view class="u-demo-area">
|
<view class="u-demo-area">
|
||||||
@@ -55,23 +55,23 @@
|
|||||||
<view class="submitView">
|
<view class="submitView">
|
||||||
<u-button type="primary" style="width:100px;" class="commitBtn" :ripple="true" ripple-bg-color="#909399"
|
<u-button type="primary" style="width:100px;" class="commitBtn" :ripple="true" ripple-bg-color="#909399"
|
||||||
@click="commitBtnFun">
|
@click="commitBtnFun">
|
||||||
{{CommitType ? '消审' : '审核'}}
|
{{ CommitType ? '消审' : '审核' }}
|
||||||
</u-button>
|
</u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import util, {
|
import util, {
|
||||||
parFabricGoodsBarCode2D,
|
parFabricGoodsBarCode2D,
|
||||||
parYarnGoodsBarCode2D,
|
parYarnGoodsBarCode2D,
|
||||||
playSuccessAudio,
|
playSuccessAudio,
|
||||||
playErrorAudio
|
playErrorAudio
|
||||||
} from '../../common/util';
|
} from '../../common/util';
|
||||||
import scanMixin from '@/common/scanMixin.js';
|
import scanMixin from '@/common/scanMixin.js';
|
||||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||||
//let that = '';
|
//let that = '';
|
||||||
export default {
|
export default {
|
||||||
mixins: [scanMixin],
|
mixins: [scanMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -147,27 +147,35 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
// 调用 mixin 中的 onShow 方法
|
// 设置页面激活状态
|
||||||
if (this.$options.mixins && this.$options.mixins[0] && this.$options.mixins[0].onShow) {
|
this.isPageActive = true;
|
||||||
this.$options.mixins[0].onShow.call(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
this.registerScanBroadcast((scanResult) => {
|
this.registerScanBroadcast((scanResult) => {
|
||||||
console.log("扫码结果:", scanResult);
|
console.log("扫码结果:", scanResult);
|
||||||
|
|
||||||
// 处理扫描结果,按照原有逻辑
|
// 处理扫描结果
|
||||||
if(!this.QRBarCode){
|
|
||||||
console.log("请先扫描资料!", scanResult);
|
|
||||||
this.QRBarCode = scanResult;
|
this.QRBarCode = scanResult;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.GoodsCheckBillDetailScan();
|
this.GoodsCheckBillDetailScan();
|
||||||
});
|
});
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onHide() {
|
||||||
|
this.isPageActive = false;
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
this.unregisterScanBroadcast();
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
|
||||||
|
onUnload() {
|
||||||
|
this.isPageActive = false;
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
this.unregisterScanBroadcast();
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 添加通用错误提示方法
|
// 添加通用错误提示方法
|
||||||
showError(message) {
|
showError(message) {
|
||||||
@@ -186,7 +194,7 @@
|
|||||||
util.playErrorAudio();
|
util.playErrorAudio();
|
||||||
},
|
},
|
||||||
|
|
||||||
BarCodeDelChange: function() {
|
BarCodeDelChange: function () {
|
||||||
this.BarCodeDelStatus = !this.BarCodeDelStatus;
|
this.BarCodeDelStatus = !this.BarCodeDelStatus;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -204,13 +212,13 @@
|
|||||||
|
|
||||||
var aQRBarCode = '';
|
var aQRBarCode = '';
|
||||||
var aBarCode = '';
|
var aBarCode = '';
|
||||||
if (cleanCode.startsWith('66^')>0 || cleanCode.startsWith('99^')>0 || /[\u4E00-\u9FA5]/.test(cleanCode)){
|
if (cleanCode.startsWith('66^') > 0 || cleanCode.startsWith('99^') > 0 || /[\u4E00-\u9FA5]/.test(cleanCode)) {
|
||||||
aQRBarCode = cleanCode
|
aQRBarCode = cleanCode
|
||||||
}else {
|
} else {
|
||||||
aBarCode = cleanCode;
|
aBarCode = cleanCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aQRBarCode == '' && aBarCode == ''){
|
if (aQRBarCode == '' && aBarCode == '') {
|
||||||
this.QRBarCode = '';
|
this.QRBarCode = '';
|
||||||
this.aBarCode = ''
|
this.aBarCode = ''
|
||||||
this.showError('请扫描二维码或者条码');
|
this.showError('请扫描二维码或者条码');
|
||||||
@@ -233,7 +241,7 @@
|
|||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log("-->>--" + JSON.stringify(res.data));
|
console.log("-->>--" + JSON.stringify(res.data));
|
||||||
if (res.data.code == '0'){
|
if (res.data.code == '0') {
|
||||||
let aResultData = res.data.data;
|
let aResultData = res.data.data;
|
||||||
this.FabricGoodsNo = aResultData.product_code;
|
this.FabricGoodsNo = aResultData.product_code;
|
||||||
this.FabricGoodsName = aResultData.product_name;
|
this.FabricGoodsName = aResultData.product_name;
|
||||||
@@ -242,12 +250,12 @@
|
|||||||
this.CrockNo = aResultData.dyelot_number;
|
this.CrockNo = aResultData.dyelot_number;
|
||||||
this.GoodsBillNo = aResultData.volume_number;
|
this.GoodsBillNo = aResultData.volume_number;
|
||||||
this.GoodsQty = aResultData.weight / 10000;
|
this.GoodsQty = aResultData.weight / 10000;
|
||||||
this.BillSumOldRoll = aResultData.warehouse_bin_check_before_roll/100;
|
this.BillSumOldRoll = aResultData.warehouse_bin_check_before_roll / 100;
|
||||||
this.BillSumNewRoll = aResultData.warehouse_bin_check_roll/100;
|
this.BillSumNewRoll = aResultData.warehouse_bin_check_roll / 100;
|
||||||
this.GoodsCodeNoSumOldRoll = aResultData.color_check_before_roll/100;
|
this.GoodsCodeNoSumOldRoll = aResultData.color_check_before_roll / 100;
|
||||||
this.GoodsCodeNoSumNewRoll = aResultData.color_check_roll/100;
|
this.GoodsCodeNoSumNewRoll = aResultData.color_check_roll / 100;
|
||||||
this.CrockNoSumOldRoll = aResultData.dye_check_before_roll/100;
|
this.CrockNoSumOldRoll = aResultData.dye_check_before_roll / 100;
|
||||||
this.CrockNoSumNewRoll = aResultData.dye_check_roll/100;
|
this.CrockNoSumNewRoll = aResultData.dye_check_roll / 100;
|
||||||
|
|
||||||
this.playSuccess();
|
this.playSuccess();
|
||||||
this.GoodsCheckBillDetailData();
|
this.GoodsCheckBillDetailData();
|
||||||
@@ -261,12 +269,12 @@
|
|||||||
},
|
},
|
||||||
fail: (error) => {
|
fail: (error) => {
|
||||||
this.showError('连接服务器出错,请检查后台服务是否启动!');
|
this.showError('连接服务器出错,请检查后台服务是否启动!');
|
||||||
console.log('error',error)
|
console.log('error', error)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
GoodsCheckBillDetailData: function() {
|
GoodsCheckBillDetailData: function () {
|
||||||
console.log("--aaa->>" + this.GoodsCheckBillID);
|
console.log("--aaa->>" + this.GoodsCheckBillID);
|
||||||
console.log("--aaa->>" + this.GoodsCheckBillID);
|
console.log("--aaa->>" + this.GoodsCheckBillID);
|
||||||
util.request({
|
util.request({
|
||||||
@@ -302,7 +310,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 审核按钮方法
|
// 审核按钮方法
|
||||||
commitBtnFun: function() {
|
commitBtnFun: function () {
|
||||||
if (this.BillMasterID <= 0) {
|
if (this.BillMasterID <= 0) {
|
||||||
this.showError('当前单据未提交,不能审核或消审!');
|
this.showError('当前单据未提交,不能审核或消审!');
|
||||||
return;
|
return;
|
||||||
@@ -320,7 +328,7 @@
|
|||||||
// this.BillDataMessage = '当前' + aCommitRecallName + '操作配置有误,不能审核!';
|
// this.BillDataMessage = '当前' + aCommitRecallName + '操作配置有误,不能审核!';
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
console.log('GoodsCheckBillID',this.GoodsCheckBillID)
|
console.log('GoodsCheckBillID', this.GoodsCheckBillID)
|
||||||
util.request({
|
util.request({
|
||||||
url: '/product/productCheckOrder/updateProductCheckOrderAuditStatusPass',
|
url: '/product/productCheckOrder/updateProductCheckOrderAuditStatusPass',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
@@ -328,10 +336,10 @@
|
|||||||
'id': parseInt(this.GoodsCheckBillID),
|
'id': parseInt(this.GoodsCheckBillID),
|
||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log('审核',res)
|
console.log('审核', res)
|
||||||
if (res.data.code == '0') {
|
if (res.data.code == '0') {
|
||||||
var aResultData = JSON.parse(res.data.data);
|
var aResultData = JSON.parse(res.data.data);
|
||||||
console.log('aResultData',aResultData)
|
console.log('aResultData', aResultData)
|
||||||
if (aResultData.code == '0' && aResultData.msg ==
|
if (aResultData.code == '0' && aResultData.msg ==
|
||||||
'success') {
|
'success') {
|
||||||
this.playSuccess();
|
this.playSuccess();
|
||||||
@@ -358,20 +366,20 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
page {
|
page {
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
padding-bottom: 260rpx;
|
padding-bottom: 260rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-radio {
|
.u-radio {
|
||||||
width: 200rpx !important;
|
width: 200rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.submitView {
|
.submitView {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 16rpx 0 26rpx;
|
padding: 16rpx 0 26rpx;
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
@@ -383,19 +391,19 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
.submitBtn {
|
.submitBtn {
|
||||||
width: 666rpx;
|
width: 666rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.productBox {
|
.productBox {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
margin-top: 32rpx;
|
margin-top: 32rpx;
|
||||||
padding: 26rpx 0;
|
padding: 26rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tjcpName {
|
.tjcpName {
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@@ -404,60 +412,60 @@
|
|||||||
padding-left: 12rpx;
|
padding-left: 12rpx;
|
||||||
margin-left: 26rpx;
|
margin-left: 26rpx;
|
||||||
margin-top: 26rpx;
|
margin-top: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpInput {
|
.cpInput {
|
||||||
width: 150rpx !important;
|
width: 150rpx !important;
|
||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpInput>input {
|
.cpInput>input {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1rpx solid #DDDDDD;
|
border: 1rpx solid #DDDDDD;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpInput1 {
|
.cpInput1 {
|
||||||
width: 200rpx !important;
|
width: 200rpx !important;
|
||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpInput1>input {
|
.cpInput1>input {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1rpx solid #DDDDDD;
|
border: 1rpx solid #DDDDDD;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clearIcon {
|
.clearIcon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 6rpx;
|
right: 6rpx;
|
||||||
top: 6rpx;
|
top: 6rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.greenPrice {
|
.greenPrice {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #19BE6B !important;
|
color: #19BE6B !important;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disFlex {
|
.disFlex {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 8rpx;
|
margin-bottom: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputName {
|
.inputName {
|
||||||
color: #ADADAD;
|
color: #ADADAD;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.addHKQS {
|
.addHKQS {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 16rpx 26rpx;
|
padding: 16rpx 26rpx;
|
||||||
@@ -467,5 +475,5 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
|
|
||||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
<dataNull v-if="ItemDataList.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
|
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
||||||
</div>
|
</div>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
<dataNull v-if="ItemDataList.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
||||||
</div>
|
</div>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关移仓资料" title1="请添加或者更换搜索添加">
|
<dataNull v-if="ItemDataList.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关移仓资料" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
||||||
|
|||||||
@@ -3,94 +3,79 @@
|
|||||||
<u-form ref="uForm">
|
<u-form ref="uForm">
|
||||||
<view @click="pickerSelectFun('仓库名称')" class="flex-white-plr26 ptb20 bdb_f5 first">
|
<view @click="pickerSelectFun('仓库名称')" class="flex-white-plr26 ptb20 bdb_f5 first">
|
||||||
<text class="mr26">仓库名称<text class="redXingh">*</text></text>
|
<text class="mr26">仓库名称<text class="redXingh">*</text></text>
|
||||||
<view :class="StoreName ? '' : 'cBlack'"> {{StoreName ? StoreName : '请选择'}}
|
<view :class="StoreName ? '' : 'cBlack'"> {{ StoreName ? StoreName : '请选择' }}
|
||||||
<u-icon class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
|
<u-icon class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-form-item label-width="150" label="调出仓位:"
|
<u-form-item label-width="150" label="调出仓位:" :class="{ 'input-highlight': shouldHighlightFrom }">
|
||||||
:class="{'input-highlight': shouldHighlightFrom}"
|
<input type="text" v-model="FromStoreStationNo" maxlength="-1" style="width:100px;"
|
||||||
>
|
|
||||||
<input type="text"
|
|
||||||
v-model="FromStoreStationNo"
|
|
||||||
maxlength="-1"
|
|
||||||
style="width:100px;"
|
|
||||||
@confirm="GetFromStoreStationName" />
|
@confirm="GetFromStoreStationName" />
|
||||||
<text style="width:100px;">{{FromStoreStationName}}</text>
|
<text style="width:100px;">{{ FromStoreStationName }}</text>
|
||||||
<checkbox-group @change="AllCrockNoCheckChange">
|
<checkbox-group @change="AllCrockNoCheckChange">
|
||||||
<checkbox ref="checkBoxRef" :checked="AllCrockNoScanStatus">整缸</checkbox>
|
<checkbox ref="checkBoxRef" :checked="AllCrockNoScanStatus">整缸</checkbox>
|
||||||
</checkbox-group>
|
</checkbox-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label-width="150" label="调至仓位:"
|
<u-form-item label-width="150" label="调至仓位:" :class="{ 'input-highlight': shouldHighlightTo }">
|
||||||
:class="{'input-highlight': shouldHighlightTo}"
|
<input type="text" v-model="ToStoreStationNo" maxlength="-1" style="width:100px;"
|
||||||
|
|
||||||
>
|
|
||||||
<input type="text"
|
|
||||||
v-model="ToStoreStationNo"
|
|
||||||
maxlength="-1"
|
|
||||||
style="width:100px;"
|
|
||||||
@confirm="GetToStoreStationName" />
|
@confirm="GetToStoreStationName" />
|
||||||
<text style="width:100px;">{{ToStoreStationName}}</text>
|
<text style="width:100px;">{{ ToStoreStationName }}</text>
|
||||||
<checkbox-group @change="AllStoreStationChange">
|
<checkbox-group @change="AllStoreStationChange">
|
||||||
<checkbox ref="checkBoxRef" :checked="AllStoreStationScanStatus">整架</checkbox>
|
<checkbox ref="checkBoxRef" :checked="AllStoreStationScanStatus">整架</checkbox>
|
||||||
</checkbox-group>
|
</checkbox-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label-width="150" label="条码资料:"
|
<u-form-item label-width="150" label="条码资料:" :class="{ 'input-highlight': shouldHighlightQR }">
|
||||||
:class="{'input-highlight': shouldHighlightQR}"
|
<input type="text" v-model="QRBarCode" maxlength="-1" style="width:150px;"
|
||||||
|
|
||||||
>
|
|
||||||
<input type="text"
|
|
||||||
v-model="QRBarCode"
|
|
||||||
maxlength="-1"
|
|
||||||
style="width:150px;"
|
|
||||||
@confirm="GoodsStoreStationMoveScan" />
|
@confirm="GoodsStoreStationMoveScan" />
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title">{{BillDataMessage}}</text>
|
<text class="title">{{ BillDataMessage }}</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">成品编号:{{FabricGoodsNo}}</text>
|
<text class="title" style="width:200px;">成品编号:{{ FabricGoodsNo }}</text>
|
||||||
<text class="title" style="width:200px;">成品重量:{{GoodsQty}}KG</text>
|
<text class="title" style="width:200px;">成品重量:{{ GoodsQty }}KG</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">成品色号:{{GoodsCodeNo}}</text>
|
<text class="title" style="width:200px;">成品色号:{{ GoodsCodeNo }}</text>
|
||||||
<text class="title" style="width:200px;">成品颜色:{{GoodsCodeName}}</text>
|
<text class="title" style="width:200px;">成品颜色:{{ GoodsCodeName }}</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">成品缸号:{{CrockNo}}</text>
|
<text class="title" style="width:200px;">成品缸号:{{ CrockNo }}</text>
|
||||||
<text class="title" style="width:200px;">缸号卷号:{{GoodsBillNo}}</text>
|
<text class="title" style="width:200px;">缸号卷号:{{ GoodsBillNo }}</text>
|
||||||
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">本架条数:{{StoreStationSumRoll}}条</text>
|
<text class="title" style="width:200px;">本架条数:{{ StoreStationSumRoll }}条</text>
|
||||||
<text class="title" style="width:200px;">本架数量:{{StoreStationSumQty}}KG</text>
|
<text class="title" style="width:200px;">本架数量:{{ StoreStationSumQty }}KG</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">本色条数:{{GoodsCodeSumRoll}}条</text>
|
<text class="title" style="width:200px;">本色条数:{{ GoodsCodeSumRoll }}条</text>
|
||||||
<text class="title" style="width:200px;">本色数量:{{GoodsCodeSumQty}}KG</text>
|
<text class="title" style="width:200px;">本色数量:{{ GoodsCodeSumQty }}KG</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width:200px;">本缸条数:{{CrockNoSumRoll}}条</text>
|
<text class="title" style="width:200px;">本缸条数:{{ CrockNoSumRoll }}条</text>
|
||||||
<text class="title" style="width:200px;">本缸数量:{{CrockNoSumQty}}KG</text>
|
<text class="title" style="width:200px;">本缸数量:{{ CrockNoSumQty }}KG</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
<view class="u-demo-area">
|
<view class="u-demo-area">
|
||||||
<u-toast ref="uToast"></u-toast>
|
<u-toast ref="uToast"></u-toast>
|
||||||
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDetailList"/>
|
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDetailList" />
|
||||||
</view>
|
</view>
|
||||||
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
|
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let that = '';
|
let that = '';
|
||||||
import util, {
|
import util, {
|
||||||
parFabricGoodsBarCode2D,
|
parFabricGoodsBarCode2D,
|
||||||
parYarnGoodsBarCode2D,
|
parYarnGoodsBarCode2D,
|
||||||
playSuccessAudio,
|
playSuccessAudio,
|
||||||
playErrorAudio
|
playErrorAudio
|
||||||
} from '../../common/util';
|
} from '../../common/util';
|
||||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||||
export default {
|
import scanMixin from '@/common/scanMixin.js';
|
||||||
|
export default {
|
||||||
|
mixins: [scanMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
borderColor: '#e4e7ed',
|
borderColor: '#e4e7ed',
|
||||||
@@ -130,13 +115,14 @@
|
|||||||
StoreNameDataList: [],
|
StoreNameDataList: [],
|
||||||
GoodsDetailList: [],
|
GoodsDetailList: [],
|
||||||
BillDataMessage: '',
|
BillDataMessage: '',
|
||||||
|
// scanReceiver 和 isPageActive 已由 scanMixin 提供
|
||||||
headersMaster: [{
|
headersMaster: [{
|
||||||
label: '成品编号',
|
label: '成品编号',
|
||||||
key: 'product_code'
|
key: 'product_code'
|
||||||
}, {
|
}, {
|
||||||
label: '成品名称',
|
label: '成品名称',
|
||||||
key: 'product_name'
|
key: 'product_name'
|
||||||
},{
|
}, {
|
||||||
label: '成品色号',
|
label: '成品色号',
|
||||||
key: 'product_color_code'
|
key: 'product_color_code'
|
||||||
}, {
|
}, {
|
||||||
@@ -151,9 +137,7 @@
|
|||||||
}, {
|
}, {
|
||||||
label: '数量',
|
label: '数量',
|
||||||
key: 'weight'
|
key: 'weight'
|
||||||
}],
|
}]
|
||||||
scanReceiver: null,
|
|
||||||
isPageActive: false, // 添加页面活动状态标志
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
@@ -167,30 +151,11 @@
|
|||||||
this.StoreName = getApp().globalData.StoreName;
|
this.StoreName = getApp().globalData.StoreName;
|
||||||
};
|
};
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
this.isPageActive = true;
|
// 使用 scanMixin 的方法注册扫码广播,传入自定义回调
|
||||||
this.registerScanBroadcast();
|
this.registerScanBroadcast(this.handleScanCode);
|
||||||
// #endif
|
|
||||||
/* uni.$on('bjdKehuBindFun', that.bjdKehuBindFun)
|
|
||||||
uni.$on('chanpinBindFun', that.chanpinBindFun)
|
|
||||||
uni.$on('bjdLxrBindFun', that.bjdLxrBindFun)
|
|
||||||
uni.$on('shangjiBindFun', that.shangjiBindFun) */
|
|
||||||
},
|
|
||||||
onUnload() {
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
this.isPageActive = false;
|
|
||||||
// this.unregisterBroadcast();
|
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
// onUnload, onHide, onShow 已由 scanMixin 自动处理
|
||||||
onHide() {
|
|
||||||
// 页面隐藏时
|
|
||||||
this.isPageActive = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
onShow() {
|
|
||||||
// 页面显示时
|
|
||||||
this.isPageActive = true;
|
|
||||||
},
|
|
||||||
/* onBackPress() {
|
/* onBackPress() {
|
||||||
uni.$off('bjdKehuBindFun', that.bjdKehuBindFun)
|
uni.$off('bjdKehuBindFun', that.bjdKehuBindFun)
|
||||||
uni.$off('chanpinBindFun', that.chanpinBindFun)
|
uni.$off('chanpinBindFun', that.chanpinBindFun)
|
||||||
@@ -216,18 +181,48 @@
|
|||||||
util.playErrorAudio();
|
util.playErrorAudio();
|
||||||
},
|
},
|
||||||
|
|
||||||
AllCrockNoCheckChange:function () {
|
// 自定义扫码处理回调 - 处理本页面特有的扫码逻辑
|
||||||
|
handleScanCode(scanResult) {
|
||||||
|
console.log("扫码结果:", scanResult);
|
||||||
|
|
||||||
|
if (!this.StoreName) {
|
||||||
|
this.showError("请先选择仓库名称");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.FromStoreStationNo) {
|
||||||
|
this.FromStoreStationNo = scanResult;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.GetFromStoreStationName();
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
} else if (!this.ToStoreStationNo) {
|
||||||
|
this.ToStoreStationNo = scanResult;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.GetToStoreStationName();
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
this.QRBarCode = scanResult;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.GoodsStoreStationMoveScan();
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
AllCrockNoCheckChange: function () {
|
||||||
this.AllCrockNoScanStatus = !this.AllCrockNoScanStatus;
|
this.AllCrockNoScanStatus = !this.AllCrockNoScanStatus;
|
||||||
this.AllStoreStationScanStatus = false;
|
this.AllStoreStationScanStatus = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
AllStoreStationChange:function () {
|
AllStoreStationChange: function () {
|
||||||
this.AllStoreStationScanStatus = !this.AllStoreStationScanStatus;
|
this.AllStoreStationScanStatus = !this.AllStoreStationScanStatus;
|
||||||
this.AllCrockNoScanStatus = false;
|
this.AllCrockNoScanStatus = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 展示相应数据选择框
|
// 展示相应数据选择框
|
||||||
pickerSelectFun: function(str) {
|
pickerSelectFun: function (str) {
|
||||||
that.selectList = [];
|
that.selectList = [];
|
||||||
if (str == '仓库名称') {
|
if (str == '仓库名称') {
|
||||||
that.selectList = this.StoreNameDataList;
|
that.selectList = this.StoreNameDataList;
|
||||||
@@ -237,7 +232,7 @@
|
|||||||
that.selectType = str;
|
that.selectType = str;
|
||||||
},
|
},
|
||||||
|
|
||||||
scanFun: function() {
|
scanFun: function () {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success(res) {
|
success(res) {
|
||||||
that.code = res.result;
|
that.code = res.result;
|
||||||
@@ -246,7 +241,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 选择框选中事件
|
// 选择框选中事件
|
||||||
selectConfirmFun: function(e) {
|
selectConfirmFun: function (e) {
|
||||||
if (that.selectType == '仓库名称') {
|
if (that.selectType == '仓库名称') {
|
||||||
that.StoreNameID = e[0].value;
|
that.StoreNameID = e[0].value;
|
||||||
that.StoreName = e[0].label;
|
that.StoreName = e[0].label;
|
||||||
@@ -257,102 +252,8 @@
|
|||||||
/* that.selectType = str; */
|
/* that.selectType = str; */
|
||||||
},
|
},
|
||||||
|
|
||||||
// 注册扫码广播接收器
|
// registerScanBroadcast 和 unregisterScanBroadcast 已由 scanMixin 提供
|
||||||
registerScanBroadcast() {
|
|
||||||
try {
|
|
||||||
const main = plus.android.runtimeMainActivity();
|
|
||||||
|
|
||||||
// 先配置扫码枪广播设置
|
|
||||||
try {
|
|
||||||
const Intent = plus.android.importClass("android.content.Intent");
|
|
||||||
const intent = new Intent("com.android.scanner.service_settings");
|
|
||||||
intent.putExtra(
|
|
||||||
"action_barcode_broadcast",
|
|
||||||
"com.android.server.scannerservice.broadcast"
|
|
||||||
);
|
|
||||||
intent.putExtra("key_barcode_broadcast", "scannerdata");
|
|
||||||
main.sendBroadcast(intent);
|
|
||||||
} catch (error) {
|
|
||||||
console.error("配置扫码枪广播失败:", error);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 注册广播接收器
|
|
||||||
const IntentFilter = plus.android.importClass(
|
|
||||||
"android.content.IntentFilter"
|
|
||||||
);
|
|
||||||
const filter = new IntentFilter();
|
|
||||||
filter.addAction("com.android.server.scannerservice.broadcast");
|
|
||||||
console.log("添加广播action完成");
|
|
||||||
|
|
||||||
const receiver = plus.android.implements(
|
|
||||||
"io.dcloud.feature.internal.reflect.BroadcastReceiver",
|
|
||||||
{
|
|
||||||
onReceive: (context, intent) => {
|
|
||||||
// 只有当页面活动时才处理广播
|
|
||||||
if (!this.isPageActive) return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
console.log("Newland intent:", intent);
|
|
||||||
const scanResult = intent.getStringExtra("scannerdata");
|
|
||||||
console.log("配布单详情-扫码结果:", scanResult);
|
|
||||||
if(!this.StoreName){
|
|
||||||
this.showError("请先选择仓库名称");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (scanResult) {
|
|
||||||
if(!this.FromStoreStationNo){
|
|
||||||
this.FromStoreStationNo = scanResult
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.GetFromStoreStationName();
|
|
||||||
});
|
|
||||||
return
|
|
||||||
}else if(!this.ToStoreStationNo){
|
|
||||||
this.ToStoreStationNo = scanResult;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.GetToStoreStationName();
|
|
||||||
});
|
|
||||||
return
|
|
||||||
|
|
||||||
}else if(!this.QRBarCode) {
|
|
||||||
this.QRBarCode = scanResult;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.GoodsStoreStationMoveScan();
|
|
||||||
});
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
this.showError("处理扫码数据时出错");
|
|
||||||
console.error("处理广播数据时出错:", error, error.stack);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// 注册广播接收器
|
|
||||||
main.registerReceiver(receiver, filter);
|
|
||||||
this.scanReceiver = receiver;
|
|
||||||
console.log("扫码广播注册成功,等待扫码...");
|
|
||||||
} catch (error) {
|
|
||||||
console.error("注册扫码广播失败:", error);
|
|
||||||
console.error("错误详情:", error.message);
|
|
||||||
console.error("错误堆栈:", error.stack);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 注销扫码广播接收器
|
|
||||||
unregisterScanBroadcast() {
|
|
||||||
if (this.scanReceiver) {
|
|
||||||
try {
|
|
||||||
const main = plus.android.runtimeMainActivity();
|
|
||||||
main.unregisterReceiver(this.scanReceiver);
|
|
||||||
this.scanReceiver = null;
|
|
||||||
console.log("扫码广播注销成功");
|
|
||||||
} catch (error) {
|
|
||||||
console.error("注销扫码广播失败:", error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 添加一个通用的错误提示方法
|
// 添加一个通用的错误提示方法
|
||||||
showError(message) {
|
showError(message) {
|
||||||
this.playError();
|
this.playError();
|
||||||
@@ -371,7 +272,7 @@
|
|||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log("getStoreNameData" + res);
|
console.log("getStoreNameData" + res);
|
||||||
if (res.data.code == '0' && res.data.msg == 'success'){
|
if (res.data.code == '0' && res.data.msg == 'success') {
|
||||||
var aResultData = res.data.data.list;
|
var aResultData = res.data.data.list;
|
||||||
for (var i = 0; i < aResultData.length; i++) {
|
for (var i = 0; i < aResultData.length; i++) {
|
||||||
this.StoreNameDataList.push({
|
this.StoreNameDataList.push({
|
||||||
@@ -380,20 +281,20 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.StoreNameDataList = []
|
this.StoreNameDataList = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: (error) => {
|
fail: (error) => {
|
||||||
this.showError('连接服务器出错,请检查后台服务是否启动!' + error.errMsg);
|
this.showError('连接服务器出错,请检查后台服务是否启动!' + error.errMsg);
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
GetFromStoreStationName: function() {
|
GetFromStoreStationName: function () {
|
||||||
console.log("<<<>>>>>" + this.FromStoreStationNo + '<<<<>>>>');
|
console.log("<<<>>>>>" + this.FromStoreStationNo + '<<<<>>>>');
|
||||||
util.request({
|
util.request({
|
||||||
url: '/warehouse/warehouseBin/getWarehouseBin',
|
url: '/warehouse/warehouseBin/getWarehouseBin',
|
||||||
@@ -402,9 +303,9 @@
|
|||||||
'qr_code': this.FromStoreStationNo,
|
'qr_code': this.FromStoreStationNo,
|
||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log('GetFromStoreStationName',res)
|
console.log('GetFromStoreStationName', res)
|
||||||
if (res.data.msg == 'success'){
|
if (res.data.msg == 'success') {
|
||||||
if(res.data.data.physical_warehouse_id !== this.StoreNameID) {
|
if (res.data.data.physical_warehouse_id !== this.StoreNameID) {
|
||||||
this.showError('该仓位不属于当前仓库')
|
this.showError('该仓位不属于当前仓库')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -420,14 +321,14 @@
|
|||||||
},
|
},
|
||||||
fail: (error) => {
|
fail: (error) => {
|
||||||
this.showError('连接服务器出错,请检查后台服务是否启动!' + error.errMsg);
|
this.showError('连接服务器出错,请检查后台服务是否启动!' + error.errMsg);
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
GetToStoreStationName: function() {
|
GetToStoreStationName: function () {
|
||||||
console.log("<<<>>>>>" + this.ToStoreStationNo + '<<<<>>>>');
|
console.log("<<<>>>>>" + this.ToStoreStationNo + '<<<<>>>>');
|
||||||
util.request({
|
util.request({
|
||||||
url: '/warehouse/warehouseBin/getWarehouseBin',
|
url: '/warehouse/warehouseBin/getWarehouseBin',
|
||||||
@@ -436,8 +337,8 @@
|
|||||||
'qr_code': this.ToStoreStationNo,
|
'qr_code': this.ToStoreStationNo,
|
||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.data.msg == 'success'){
|
if (res.data.msg == 'success') {
|
||||||
if(res.data.data.physical_warehouse_id !== this.StoreNameID) {
|
if (res.data.data.physical_warehouse_id !== this.StoreNameID) {
|
||||||
this.showError('该仓位不属于当前仓库')
|
this.showError('该仓位不属于当前仓库')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -453,7 +354,7 @@
|
|||||||
},
|
},
|
||||||
fail: (error) => {
|
fail: (error) => {
|
||||||
this.showError('连接服务器出错,请检查后台服务是否启动!' + error.errMsg);
|
this.showError('连接服务器出错,请检查后台服务是否启动!' + error.errMsg);
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
},
|
},
|
||||||
@@ -472,41 +373,41 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let aAllStoreStationScanStatus = 0;
|
let aAllStoreStationScanStatus = 0;
|
||||||
if (this.AllStoreStationScanStatus){
|
if (this.AllStoreStationScanStatus) {
|
||||||
aAllStoreStationScanStatus = '1';
|
aAllStoreStationScanStatus = '1';
|
||||||
};
|
};
|
||||||
|
|
||||||
let aAllCrockNoScanStatus = 0;
|
let aAllCrockNoScanStatus = 0;
|
||||||
if (this.AllCrockNoScanStatus){
|
if (this.AllCrockNoScanStatus) {
|
||||||
aAllCrockNoScanStatus = '1';
|
aAllCrockNoScanStatus = '1';
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.AllStoreStationScanStatus && this.FromStoreStationName == ''){
|
if (this.AllStoreStationScanStatus && this.FromStoreStationName == '') {
|
||||||
this.showError('选择整架调仓位,必须要先输入调出仓位');
|
this.showError('选择整架调仓位,必须要先输入调出仓位');
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.aAllCrockNoScanStatus && this.FromStoreStationName == ''){
|
if (this.aAllCrockNoScanStatus && this.FromStoreStationName == '') {
|
||||||
this.showError('选择整缸调仓位,必须要先输入调出仓位');
|
this.showError('选择整缸调仓位,必须要先输入调出仓位');
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
let aTypeID = 1;
|
let aTypeID = 1;
|
||||||
if (this.aAllCrockNoScanStatus){
|
if (this.aAllCrockNoScanStatus) {
|
||||||
aTypeID = 2
|
aTypeID = 2
|
||||||
} else if (this.AllStoreStationScanStatus){
|
} else if (this.AllStoreStationScanStatus) {
|
||||||
aTypeID = 3
|
aTypeID = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
var aQRBarCode = '';
|
var aQRBarCode = '';
|
||||||
var aBarCode = '';
|
var aBarCode = '';
|
||||||
if (this.QRBarCode.startsWith('66^')>0){
|
if (this.QRBarCode.startsWith('66^') > 0) {
|
||||||
aQRBarCode = this.QRBarCode
|
aQRBarCode = this.QRBarCode
|
||||||
}else {
|
} else {
|
||||||
aBarCode = this.QRBarCode;
|
aBarCode = this.QRBarCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aQRBarCode == ''){
|
if (aQRBarCode == '') {
|
||||||
this.QRBarCode = '';
|
this.QRBarCode = '';
|
||||||
this.QRBarCodeFocus = false;
|
this.QRBarCodeFocus = false;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -527,7 +428,7 @@
|
|||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log("-->>--" + JSON.stringify(res.data.data));
|
console.log("-->>--" + JSON.stringify(res.data.data));
|
||||||
if (res.data.code == '0'){
|
if (res.data.code == '0') {
|
||||||
let aResultData = res.data.data;
|
let aResultData = res.data.data;
|
||||||
this.FabricGoodsNo = aResultData.product_code;
|
this.FabricGoodsNo = aResultData.product_code;
|
||||||
this.FabricGoodsName = aResultData.product_name;
|
this.FabricGoodsName = aResultData.product_name;
|
||||||
@@ -536,12 +437,12 @@
|
|||||||
this.CrockNo = aResultData.dyelot_number;
|
this.CrockNo = aResultData.dyelot_number;
|
||||||
this.GoodsBillNo = aResultData.volume_number;
|
this.GoodsBillNo = aResultData.volume_number;
|
||||||
this.GoodsQty = aResultData.weight / 10000;
|
this.GoodsQty = aResultData.weight / 10000;
|
||||||
this.StoreStationSumRoll = aResultData.warehouse_bin_roll/100;
|
this.StoreStationSumRoll = aResultData.warehouse_bin_roll / 100;
|
||||||
this.StoreStationSumQty = aResultData.warehouse_bin_weight/10000;
|
this.StoreStationSumQty = aResultData.warehouse_bin_weight / 10000;
|
||||||
this.GoodsCodeSumRoll = aResultData.color_roll/100;
|
this.GoodsCodeSumRoll = aResultData.color_roll / 100;
|
||||||
this.GoodsCodeSumQty = aResultData.color_weight/10000;
|
this.GoodsCodeSumQty = aResultData.color_weight / 10000;
|
||||||
this.CrockNoSumRoll = aResultData.dye_roll/100;
|
this.CrockNoSumRoll = aResultData.dye_roll / 100;
|
||||||
this.CrockNoSumQty = aResultData.dye_weight/10000;
|
this.CrockNoSumQty = aResultData.dye_weight / 10000;
|
||||||
|
|
||||||
this.playSuccess();
|
this.playSuccess();
|
||||||
this.GoodsStoreStationMoveData();
|
this.GoodsStoreStationMoveData();
|
||||||
@@ -565,7 +466,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
GoodsStoreStationMoveData: function() {
|
GoodsStoreStationMoveData: function () {
|
||||||
util.request({
|
util.request({
|
||||||
url: '/product/stockProduct/getStockProductDyelotNumberList',
|
url: '/product/stockProduct/getStockProductDyelotNumberList',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@@ -593,30 +494,33 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.first{
|
.first {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.wrap{
|
|
||||||
|
.wrap {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-highlight {
|
.input-highlight {
|
||||||
border: 1px solid #ff0000 !important;
|
border: 1px solid #ff0000 !important;
|
||||||
}
|
}
|
||||||
page {
|
|
||||||
|
page {
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
padding-bottom: 260rpx;
|
padding-bottom: 260rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-radio {
|
.u-radio {
|
||||||
width: 200rpx !important;
|
width: 200rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.submitView {
|
.submitView {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 16rpx 0 26rpx;
|
padding: 16rpx 0 26rpx;
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
@@ -628,19 +532,19 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
.submitBtn {
|
.submitBtn {
|
||||||
width: 666rpx;
|
width: 666rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.productBox {
|
.productBox {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
margin-top: 32rpx;
|
margin-top: 32rpx;
|
||||||
padding: 26rpx 0;
|
padding: 26rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tjcpName {
|
.tjcpName {
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@@ -649,60 +553,60 @@
|
|||||||
padding-left: 12rpx;
|
padding-left: 12rpx;
|
||||||
margin-left: 26rpx;
|
margin-left: 26rpx;
|
||||||
margin-top: 26rpx;
|
margin-top: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpInput {
|
.cpInput {
|
||||||
width: 150rpx !important;
|
width: 150rpx !important;
|
||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpInput>input {
|
.cpInput>input {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1rpx solid #DDDDDD;
|
border: 1rpx solid #DDDDDD;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpInput1 {
|
.cpInput1 {
|
||||||
width: 200rpx !important;
|
width: 200rpx !important;
|
||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpInput1>input {
|
.cpInput1>input {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1rpx solid #DDDDDD;
|
border: 1rpx solid #DDDDDD;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clearIcon {
|
.clearIcon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 6rpx;
|
right: 6rpx;
|
||||||
top: 6rpx;
|
top: 6rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.greenPrice {
|
.greenPrice {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #19BE6B !important;
|
color: #19BE6B !important;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disFlex {
|
.disFlex {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 8rpx;
|
margin-bottom: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputName {
|
.inputName {
|
||||||
color: #ADADAD;
|
color: #ADADAD;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.addHKQS {
|
.addHKQS {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 16rpx 26rpx;
|
padding: 16rpx 26rpx;
|
||||||
@@ -712,5 +616,5 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关排产单" title1="请添加或者更换搜索添加">
|
<dataNull v-if="list.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关排产单" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="selectDataFun"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="selectDataFun"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
||||||
</div>
|
</div>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
<dataNull v-if="ItemDataList.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
||||||
</div>
|
</div>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关进仓资料" title1="请添加或者更换搜索添加">
|
<dataNull v-if="ItemDataList.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关进仓资料" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
||||||
</div>
|
</div>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
<dataNull v-if="ItemDataList.length == 0" src="/src/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
||||||
</dataNull>
|
</dataNull>
|
||||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
||||||
|
|||||||
+132
-86
@@ -4,7 +4,7 @@
|
|||||||
<view class="haotoplogo">
|
<view class="haotoplogo">
|
||||||
<image src="/static/haotop/image/logo/Start.jpg" mode="aspectFit" class="logoimg"></image>
|
<image src="/static/haotop/image/logo/Start.jpg" mode="aspectFit" class="logoimg"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- <div v-if="loginType === 'currentPhone'">-->
|
<!-- <div v-if="loginType === 'currentPhone'">-->
|
||||||
<!-- <u-tabs :list="list" :is-scroll="false" :current="current" @change="onClickItem"></u-tabs> -->
|
<!-- <u-tabs :list="list" :is-scroll="false" :current="current" @change="onClickItem"></u-tabs> -->
|
||||||
<!-- <view v-if="current === 0"> -->
|
<!-- <view v-if="current === 0"> -->
|
||||||
<view class="list">
|
<view class="list">
|
||||||
@@ -20,28 +20,22 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="list-call" v-if="selectedApiUrl === 'custom'">
|
<view class="list-call" v-if="selectedApiUrl === 'custom'">
|
||||||
<!-- 当选择自定义时显示输入框 -->
|
<!-- 当选择自定义时显示输入框 -->
|
||||||
<input
|
<input class="u-input" type="text" v-model="customApiUrl" maxlength="100" placeholder="请输入服务器地址"
|
||||||
class="u-input"
|
@blur="handleBlurInputUrl" />
|
||||||
type="text"
|
|
||||||
v-model="customApiUrl"
|
|
||||||
maxlength="100"
|
|
||||||
placeholder="请输入服务器地址"
|
|
||||||
@blur="handleBlurInputUrl"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<view class="list-call">
|
<view class="list-call">
|
||||||
<view class="iconfont icon-avatar" style="font-size: 22px;color:#5473e8;"></view>
|
<view class="iconfont icon-avatar" style="font-size: 22px;color:#5473e8;"></view>
|
||||||
<input class="u-input" type="text" v-model="login.username" maxlength="32"
|
<input class="u-input" type="text" v-model="login.username" maxlength="32"
|
||||||
:placeholder="$t('login.placeholderAccount')" value="admin" @input="clearInput"/>
|
:placeholder="$t('login.placeholderAccount')" value="admin" @input="clearInput" />
|
||||||
<u-icon :size="50" v-if="showClearIcon" name="close-circle-fill" color="#c0c4cc" class="u-clear-icon" @click="clearIcon"/>
|
<u-icon :size="50" v-if="showClearIcon" name="close-circle-fill" color="#c0c4cc" class="u-clear-icon"
|
||||||
|
@click="clearIcon" />
|
||||||
</view>
|
</view>
|
||||||
<view class="list-call">
|
<view class="list-call">
|
||||||
<view class="iconfont icon-key" style="font-size: 22px;color:#5473e8;"></view>
|
<view class="iconfont icon-key" style="font-size: 22px;color:#5473e8;"></view>
|
||||||
<input class="u-input" type="text" v-model="login.password" maxlength="32"
|
<input class="u-input" type="text" v-model="login.password" maxlength="32"
|
||||||
:placeholder="$t('login.placeholderPassword')" :password="!showPassword" value="admin123" />
|
:placeholder="$t('login.placeholderPassword')" :password="!showPassword" value="admin123" />
|
||||||
<image class="u-icon-right"
|
<image class="u-icon-right" :src="'/static/aidex/login/eye_' + (showPassword ? 'open' : 'close') + '.png'"
|
||||||
:src="'/static/aidex/login/eye_' + (showPassword ? 'open' : 'close') + '.png'"
|
|
||||||
@click="showPass()"></image>
|
@click="showPass()"></image>
|
||||||
</view>
|
</view>
|
||||||
<div style="padding:15rpx 0 0;">
|
<div style="padding:15rpx 0 0;">
|
||||||
@@ -50,10 +44,11 @@
|
|||||||
</navigator>
|
</navigator>
|
||||||
<navigator class="register-link" url="reg" open-type="navigate">{{$t('login.reg')}}</navigator>
|
<navigator class="register-link" url="reg" open-type="navigate">{{$t('login.reg')}}</navigator>
|
||||||
</view> -->
|
</view> -->
|
||||||
<u-checkbox v-model="remember" active-color="#5473e8">{{$t('login.autoLogin')}}</u-checkbox>
|
<u-checkbox v-model="remember" active-color="#5473e8">{{ $t('login.autoLogin') }}</u-checkbox>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
<button class="button" :disabled="login.loading" @click="submit('1')" :loading="login.loading"><text>登录</text></button>
|
<button class="button" :disabled="login.loading" @click="submit('1')"
|
||||||
|
:loading="login.loading"><text>登录</text></button>
|
||||||
<!-- <view class="login-bottom-box">
|
<!-- <view class="login-bottom-box">
|
||||||
<u-divider> 更多登录方式 </u-divider>
|
<u-divider> 更多登录方式 </u-divider>
|
||||||
<view class="oauth2">
|
<view class="oauth2">
|
||||||
@@ -95,46 +90,42 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
<!-- <div v-if="loginType !== 'currentPhone'">-->
|
<!-- <div v-if="loginType !== 'currentPhone'">-->
|
||||||
<!-- <view class="currentPhone-box">-->
|
<!-- <view class="currentPhone-box">-->
|
||||||
<!-- <view class="number-text">183****1005</view>-->
|
<!-- <view class="number-text">183****1005</view>-->
|
||||||
<!-- <view class="other-text">认证服务由中国移动提供。</view>-->
|
<!-- <view class="other-text">认证服务由中国移动提供。</view>-->
|
||||||
<!-- <u-button type="primary" @click="submit('3')">本机号码一键登录</u-button>-->
|
<!-- <u-button type="primary" @click="submit('3')">本机号码一键登录</u-button>-->
|
||||||
<!-- <u-button @click="qiehuanLogin()">其他登录方式</u-button>-->
|
<!-- <u-button @click="qiehuanLogin()">其他登录方式</u-button>-->
|
||||||
<!-- </view>-->
|
<!-- </view>-->
|
||||||
<!-- <view class="login-bottom-box">-->
|
<!-- <view class="login-bottom-box">-->
|
||||||
<!-- <view class="copyright">-->
|
<!-- <view class="copyright">-->
|
||||||
<!-- 登录即代表您已阅读并同意<u-link href="#">用户协议</u-link> 与 <u-link href="#">隐私政策</u-link>-->
|
<!-- 登录即代表您已阅读并同意<u-link href="#">用户协议</u-link> 与 <u-link href="#">隐私政策</u-link>-->
|
||||||
<!-- </view>-->
|
<!-- </view>-->
|
||||||
<!-- </view>-->
|
<!-- </view>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<u-picker
|
<u-picker v-model="showApiUrlPicker" mode="selector" :range="apiUrlList" range-key="label"
|
||||||
v-model="showApiUrlPicker"
|
@confirm="onApiUrlConfirm" @cancel="showApiUrlPicker = false"></u-picker>
|
||||||
mode="selector"
|
|
||||||
:range="apiUrlList"
|
|
||||||
range-key="label"
|
|
||||||
@confirm="onApiUrlConfirm"
|
|
||||||
@cancel="showApiUrlPicker = false"
|
|
||||||
></u-picker>
|
|
||||||
<!-- 版本信息显示 -->
|
<!-- 版本信息显示 -->
|
||||||
<view class="version-info">
|
<view class="version-info">
|
||||||
<text class="version-text">版本: {{ appVersion }}</text>
|
<text class="version-text">版本: {{ appVersion }}</text>
|
||||||
|
<text class="env-text" v-if="envName">({{ envName }})</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
||||||
*/
|
*/
|
||||||
import config from '@/common/config.js';
|
import config from '@/common/config.js';
|
||||||
import base64 from '@/common/base64.js';
|
import base64 from '@/common/base64.js';
|
||||||
import util from '@/common/util.js';
|
import util from '@/common/util.js';
|
||||||
import md5 from '@/common/md5.js';
|
import md5 from '@/common/md5.js';
|
||||||
import manifest from '@/manifest.json';
|
import manifest from '@/manifest.json';
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
export default {
|
import app_upgrade from '@/uni_modules/app-upgrade/js_sdk/index.js'
|
||||||
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isDevelopment: config.isDevelopment,
|
isDevelopment: config.isDevelopment,
|
||||||
@@ -170,6 +161,9 @@
|
|||||||
computed: {
|
computed: {
|
||||||
appVersion() {
|
appVersion() {
|
||||||
return manifest.versionName;
|
return manifest.versionName;
|
||||||
|
},
|
||||||
|
envName() {
|
||||||
|
return process.env.VUE_APP_ENV_NAME || '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -184,35 +178,31 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
key: 'UserInfo',
|
key: 'UserInfo',
|
||||||
success: (e) => {
|
success: (e) => {
|
||||||
console.log("---->>>" + e.data.username + '--->>' + e.data.password);
|
console.log("---->>>" + e.data.username + '--->>>' + e.data.password);
|
||||||
this.login.username = e.data.username;
|
this.login.username = e.data.username;
|
||||||
this.login.password = e.data.password;
|
this.login.password = e.data.password;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
/*
|
// #ifdef APP-PLUS
|
||||||
this.$u.api.index({loginCheck: true}).then(res => {
|
// 打开APP后自动检查版本更新
|
||||||
if (res.code == '200'){
|
this.autoCheckUpgrade();
|
||||||
uni.reLaunch({
|
// #endif
|
||||||
url: '/pages/sys/msg/index'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clearInput: function(event) {
|
clearInput: function (event) {
|
||||||
if (event.detail.value.length > 0) {
|
if (event.detail.value.length > 0) {
|
||||||
this.showClearIcon = true;
|
this.showClearIcon = true;
|
||||||
} else {
|
} else {
|
||||||
this.showClearIcon = false;
|
this.showClearIcon = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clearIcon: function() {
|
clearIcon: function () {
|
||||||
this.login.username = ''
|
this.login.username = ''
|
||||||
this.showClearIcon = false;
|
this.showClearIcon = false;
|
||||||
},
|
},
|
||||||
@@ -228,9 +218,9 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onApiUrlConfirm(e) {
|
onApiUrlConfirm(e) {
|
||||||
console.log('e',JSON.stringify(e));
|
console.log('e', JSON.stringify(e));
|
||||||
const selectedValue = this.apiUrlList[e[0]].value;
|
const selectedValue = this.apiUrlList[e[0]].value;
|
||||||
console.log('selectedValue',selectedValue)
|
console.log('selectedValue', selectedValue)
|
||||||
this.selectedApiUrl = selectedValue;
|
this.selectedApiUrl = selectedValue;
|
||||||
this.showApiUrlPicker = false;
|
this.showApiUrlPicker = false;
|
||||||
|
|
||||||
@@ -345,7 +335,7 @@
|
|||||||
'phone': this.login.username,
|
'phone': this.login.username,
|
||||||
'password': this.login.password,
|
'password': this.login.password,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log('login res',res)
|
console.log('login res', res)
|
||||||
var aLoginUserData = res;
|
var aLoginUserData = res;
|
||||||
|
|
||||||
//console.log('--aLoginUserData->>' + JSON.stringify(aLoginUserData));
|
//console.log('--aLoginUserData->>' + JSON.stringify(aLoginUserData));
|
||||||
@@ -361,7 +351,7 @@
|
|||||||
uni.setStorageSync('RemoteTokenData', aLoginUserData);
|
uni.setStorageSync('RemoteTokenData', aLoginUserData);
|
||||||
|
|
||||||
uni.setStorage({
|
uni.setStorage({
|
||||||
key:'userToken',
|
key: 'userToken',
|
||||||
data: {
|
data: {
|
||||||
Token: aLoginUserData.token,
|
Token: aLoginUserData.token,
|
||||||
}
|
}
|
||||||
@@ -400,7 +390,7 @@
|
|||||||
title: '登录成功!'
|
title: '登录成功!'
|
||||||
});
|
});
|
||||||
this.$store.dispatch('initNotification');
|
this.$store.dispatch('initNotification');
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
@@ -409,7 +399,7 @@
|
|||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '' + (error.msg || error.message || '')
|
title: '' + (error.msg || error.message || '')
|
||||||
});
|
});
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
// 恢复原始baseUrl
|
// 恢复原始baseUrl
|
||||||
@@ -424,6 +414,47 @@
|
|||||||
qqLogin() {
|
qqLogin() {
|
||||||
this.$u.toast('QQ 登录');
|
this.$u.toast('QQ 登录');
|
||||||
},
|
},
|
||||||
|
// 自动检查版本更新
|
||||||
|
autoCheckUpgrade() {
|
||||||
|
console.log('autoCheckUpgrade 开始执行');
|
||||||
|
const self = this;
|
||||||
|
|
||||||
|
app_upgrade(async (versionCode) => {
|
||||||
|
console.log('app_upgrade 回调被执行, versionCode:', versionCode);
|
||||||
|
try {
|
||||||
|
// 获取应用信息
|
||||||
|
const appInfo = await new Promise((resolve) => {
|
||||||
|
plus.runtime.getProperty(plus.runtime.appid, (inf) => {
|
||||||
|
resolve(inf);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
console.log('appInfo:', appInfo);
|
||||||
|
|
||||||
|
const res = await self.$u.api.upgradeCheck({
|
||||||
|
app_name: config.upgradeName,
|
||||||
|
current_version: appInfo.version
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('自动检查版本更新结果:', res);
|
||||||
|
|
||||||
|
if (!res || !res.download_url) {
|
||||||
|
// 当前已是最新版本,不提示
|
||||||
|
console.log('当前已是最新版本');
|
||||||
|
return { status: 0 };
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
changelog: res.message + ',最新版本:' + res.latest_version,
|
||||||
|
status: res.need_update ? 1 : 0, // 0 无新版本 | 1 有新版本
|
||||||
|
path: res.download_url // 新apk地址
|
||||||
|
};
|
||||||
|
} catch (error) {
|
||||||
|
console.log('检查版本更新失败:', error);
|
||||||
|
return { status: 0 };
|
||||||
|
}
|
||||||
|
}, 1); // 使用 type=1 强制检查,跳过时间戳检查
|
||||||
|
},
|
||||||
|
|
||||||
handleBlurInputUrl(e) {
|
handleBlurInputUrl(e) {
|
||||||
// 只在开发环境处理自定义URL
|
// 只在开发环境处理自定义URL
|
||||||
if (config.isDevelopment) {
|
if (config.isDevelopment) {
|
||||||
@@ -440,49 +471,54 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import 'index.scss';
|
@import 'index.scss';
|
||||||
.server-selector {
|
|
||||||
|
.server-selector {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 10rpx 0;
|
padding: 10rpx 0;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-call {
|
.list-call {
|
||||||
.u-select {
|
.u-select {
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-input {
|
.u-input {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.haotoplogo {
|
|
||||||
|
.haotoplogo {
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 150rpx;
|
height: 150rpx;
|
||||||
// max-width: 5%;
|
// max-width: 5%;
|
||||||
// max-height: 5%;
|
// max-height: 5%;
|
||||||
margin: 10rpx auto 10rpx auto;
|
margin: 10rpx auto 10rpx auto;
|
||||||
}
|
}
|
||||||
.logoimg{
|
|
||||||
|
.logoimg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
font-size: 64rpx;
|
font-size: 64rpx;
|
||||||
color: #5473e8;
|
color: #5473e8;
|
||||||
margin: 80rpx auto 80rpx auto;
|
margin: 80rpx auto 80rpx auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-call-icon {
|
.list-call-icon {
|
||||||
color: #ff0000;
|
color: #ff0000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.currentPhone-box {
|
.currentPhone-box {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40rpx 80rpx;
|
padding: 40rpx 80rpx;
|
||||||
|
|
||||||
@@ -504,9 +540,9 @@
|
|||||||
.u-hairline-border {
|
.u-hairline-border {
|
||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.register {
|
.register {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #5473e8;
|
color: #5473e8;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
@@ -514,19 +550,19 @@
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: 6rpx;
|
margin-top: 6rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.register-link {
|
.register-link {
|
||||||
float: right;
|
float: right;
|
||||||
padding: 0 16rpx;
|
padding: 0 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reg-link {
|
.reg-link {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #5473e8;
|
color: #5473e8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.oauth2 {
|
.oauth2 {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
@@ -536,7 +572,8 @@
|
|||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-tabs {
|
.u-tabs {
|
||||||
padding: 0 70rpx;
|
padding: 0 70rpx;
|
||||||
}
|
}
|
||||||
@@ -544,11 +581,20 @@
|
|||||||
.version-info {
|
.version-info {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.version-text {
|
.version-text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
|
||||||
|
.env-text {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #5473e8;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ export default {
|
|||||||
app_name: config.upgradeName,
|
app_name: config.upgradeName,
|
||||||
current_version: appInfo.version
|
current_version: appInfo.version
|
||||||
})
|
})
|
||||||
|
console.log('res',res)
|
||||||
if(!res.download_url){
|
if(!res.download_url){
|
||||||
this.$u.toast('当前版本已是最新版');
|
this.$u.toast('当前版本已是最新版');
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -3,12 +3,7 @@
|
|||||||
<common-navbar title="工作台" :showBack="false">
|
<common-navbar title="工作台" :showBack="false">
|
||||||
<template #right>
|
<template #right>
|
||||||
<view class="scan_box">
|
<view class="scan_box">
|
||||||
<u-icon
|
<u-icon name="scan" color="#333333" size="46" @click="handleScan"></u-icon>
|
||||||
name="scan"
|
|
||||||
color="#333333"
|
|
||||||
size="46"
|
|
||||||
@click="handleScan"
|
|
||||||
></u-icon>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</common-navbar>
|
</common-navbar>
|
||||||
@@ -21,10 +16,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="grid-text">成品配布</view>
|
<view class="grid-text">成品配布</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
<u-grid-item
|
<u-grid-item :index="1" @click="navTo('/pages/storegoods/QRBarCodeReview')">
|
||||||
:index="1"
|
|
||||||
@click="navTo('/pages/storegoods/QRBarCodeReview')"
|
|
||||||
>
|
|
||||||
<view class="home-icon icon-color02">
|
<view class="home-icon icon-color02">
|
||||||
<i class="iconfont icon-mall-bag"></i>
|
<i class="iconfont icon-mall-bag"></i>
|
||||||
</view>
|
</view>
|
||||||
@@ -35,44 +27,31 @@
|
|||||||
<view class="workbench-title">成品管理</view>
|
<view class="workbench-title">成品管理</view>
|
||||||
<view class="toolbar">
|
<view class="toolbar">
|
||||||
<u-grid class="grid" :col="4" :border="false">
|
<u-grid class="grid" :col="4" :border="false">
|
||||||
<u-grid-item
|
<u-grid-item :index="0" @click="navTo('/pages/storegoods/dyeworksDyeback')">
|
||||||
:index="0"
|
|
||||||
@click="navTo('/pages/storegoods/dyeworksDyeback')"
|
|
||||||
>
|
|
||||||
<view class="home-icon icon-color04">
|
<view class="home-icon icon-color04">
|
||||||
<i class="iconfont icon-finance"></i>
|
<i class="iconfont icon-finance"></i>
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-text">染整进仓</view>
|
<view class="grid-text">染整进仓</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
<u-grid-item
|
<u-grid-item :index="1" @click="navTo('/pages/storegoods/storeGoodsBusinessIn')">
|
||||||
:index="1"
|
|
||||||
@click="navTo('/pages/storegoods/storeGoodsBusinessIn')"
|
|
||||||
>
|
|
||||||
<view class="home-icon icon-color03">
|
<view class="home-icon icon-color03">
|
||||||
<i class="iconfont icon-mall-bag"></i>
|
<i class="iconfont icon-mall-bag"></i>
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-text">成品进仓</view>
|
<view class="grid-text">成品进仓</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
<u-grid-item
|
<u-grid-item :index="2" @click="navTo('/pages/storegoods/storeGoodsBusinessOut')">
|
||||||
:index="2"
|
|
||||||
@click="navTo('/pages/storegoods/storeGoodsBusinessOut')"
|
|
||||||
>
|
|
||||||
<view class="home-icon icon-color12">
|
<view class="home-icon icon-color12">
|
||||||
<i class="iconfont icon-baoxiaodan"></i>
|
<i class="iconfont icon-baoxiaodan"></i>
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-text">成品出仓</view>
|
<view class="grid-text">成品出仓</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
<u-grid-item
|
<u-grid-item @click="navTo('/pages/storegoods/storeGoodsBusinessCheck')">
|
||||||
@click="navTo('/pages/storegoods/storeGoodsBusinessCheck')"
|
|
||||||
>
|
|
||||||
<view class="home-icon icon-color04">
|
<view class="home-icon icon-color04">
|
||||||
<i class="iconfont icon-shenpi"></i>
|
<i class="iconfont icon-shenpi"></i>
|
||||||
</view>
|
</view>
|
||||||
<view class="grid-text">成品盘点</view>
|
<view class="grid-text">成品盘点</view>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
<u-grid-item
|
<u-grid-item @click="navTo('/pages/storegoods/storeGoodsBusinessStationMoveOnly')">
|
||||||
@click="navTo('/pages/storegoods/storeGoodsBusinessStationMoveOnly')"
|
|
||||||
>
|
|
||||||
<view class="home-icon icon-color04">
|
<view class="home-icon icon-color04">
|
||||||
<i class="iconfont icon-shenpi"></i>
|
<i class="iconfont icon-shenpi"></i>
|
||||||
</view>
|
</view>
|
||||||
@@ -151,6 +130,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import CommonNavbar from "@/components/common-navbar/index";
|
import CommonNavbar from "@/components/common-navbar/index";
|
||||||
|
import scanMixin from '@/common/scanMixin.js';
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
||||||
*/
|
*/
|
||||||
@@ -158,6 +138,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
CommonNavbar,
|
CommonNavbar,
|
||||||
},
|
},
|
||||||
|
mixins: [scanMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
@@ -168,34 +149,17 @@ export default {
|
|||||||
//{image: '/static/aidex/banner/banner03.png'}
|
//{image: '/static/aidex/banner/banner03.png'}
|
||||||
],
|
],
|
||||||
todoCount: 3,
|
todoCount: 3,
|
||||||
scanReceiver: null,
|
// scanReceiver 和 isPageActive 已由 scanMixin 提供
|
||||||
isPageActive: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
this.isPageActive = true;
|
// 使用 scanMixin 的方法注册扫码广播,传入自定义回调
|
||||||
this.registerScanBroadcast();
|
this.registerScanBroadcast(this.handleScanCode);
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
// onUnload, onHide, onShow 已由 scanMixin 自动处理
|
||||||
onUnload() {
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
this.isPageActive = false;
|
|
||||||
this.unregisterBroadcast();
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
|
|
||||||
onHide() {
|
|
||||||
// 页面隐藏时
|
|
||||||
this.isPageActive = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
onShow() {
|
|
||||||
// 页面显示时
|
|
||||||
this.isPageActive = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
contentStyle() {
|
contentStyle() {
|
||||||
@@ -206,6 +170,15 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 自定义扫码处理回调 - 处理本页面特有的扫码逻辑
|
||||||
|
handleScanCode(scanResult) {
|
||||||
|
console.log('工作台-扫码结果:', scanResult);
|
||||||
|
const cleanResult = scanResult.trim().replace(/[\r\n]/g, '');
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/saleship/salepickscandetail?order_no=' + cleanResult
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
navTo(url) {
|
navTo(url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url,
|
url: url,
|
||||||
@@ -217,7 +190,7 @@ export default {
|
|||||||
itemClick(index) {
|
itemClick(index) {
|
||||||
console.log(index);
|
console.log(index);
|
||||||
},
|
},
|
||||||
// 处理扫码
|
// 处理扫码(手动点击扫码按钮)
|
||||||
handleScan() {
|
handleScan() {
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: '/pages/saleship/salepickscandetail?order_no=FPD-PB-202412270196'
|
// url: '/pages/saleship/salepickscandetail?order_no=FPD-PB-202412270196'
|
||||||
@@ -275,99 +248,32 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 注册扫码广播
|
// registerScanBroadcast 和 unregisterScanBroadcast 已由 scanMixin 提供
|
||||||
registerScanBroadcast() {
|
|
||||||
try {
|
|
||||||
console.log('开始注册扫码广播');
|
|
||||||
const main = plus.android.runtimeMainActivity();
|
|
||||||
|
|
||||||
// 配置扫码枪广播
|
|
||||||
try {
|
|
||||||
const Intent = plus.android.importClass('android.content.Intent');
|
|
||||||
const intent = new Intent('com.android.scanner.service_settings');
|
|
||||||
intent.putExtra('action_barcode_broadcast', 'com.android.server.scannerservice.broadcast');
|
|
||||||
intent.putExtra('key_barcode_broadcast', 'scannerdata');
|
|
||||||
main.sendBroadcast(intent);
|
|
||||||
console.log('扫码枪广播配置已发送');
|
|
||||||
} catch (error) {
|
|
||||||
console.error('配置扫码枪广播失败:', error);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 注册广播接收器
|
|
||||||
const IntentFilter = plus.android.importClass('android.content.IntentFilter');
|
|
||||||
const filter = new IntentFilter();
|
|
||||||
filter.addAction('com.android.server.scannerservice.broadcast');
|
|
||||||
|
|
||||||
const receiver = plus.android.implements('io.dcloud.feature.internal.reflect.BroadcastReceiver', {
|
|
||||||
onReceive: (context, intent) => {
|
|
||||||
// 只有当页面活动时才处理广播
|
|
||||||
if (!this.isPageActive) return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
console.log("Workbench intent:", intent);
|
|
||||||
const scanResult = intent.getStringExtra('scannerdata');
|
|
||||||
console.log('工作台-扫码结果:', scanResult);
|
|
||||||
|
|
||||||
if (scanResult) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
const cleanResult = scanResult.trim().replace(/[\r\n]/g, '');
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/saleship/salepickscandetail?order_no=' + cleanResult
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('处理广播数据时出错:', error, error.stack);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 注册广播接收器
|
|
||||||
main.registerReceiver(receiver, filter);
|
|
||||||
this.scanReceiver = receiver;
|
|
||||||
console.log('扫码广播注册成功,等待扫码...');
|
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
console.error('注册扫码广播失败:', error);
|
|
||||||
console.error('错误详情:', error.message);
|
|
||||||
console.error('错误堆栈:', error.stack);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 注销广播接收器
|
|
||||||
unregisterBroadcast() {
|
|
||||||
if (this.scanReceiver) {
|
|
||||||
try {
|
|
||||||
const main = plus.android.runtimeMainActivity();
|
|
||||||
main.unregisterReceiver(this.scanReceiver);
|
|
||||||
this.scanReceiver = null;
|
|
||||||
console.log('扫码广播注销成功');
|
|
||||||
} catch (error) {
|
|
||||||
console.error('注销扫码广播失败:', error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "index.scss";
|
@import "index.scss";
|
||||||
|
|
||||||
.scan_box {
|
.scan_box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.scan_text {
|
.scan_text {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #2979ff;
|
color: #2979ff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-box {
|
.banner-box {
|
||||||
padding: 0 2%;
|
padding: 0 2%;
|
||||||
width: 96%;
|
width: 96%;
|
||||||
height: 170rpx;
|
height: 170rpx;
|
||||||
margin: 30rpx 0 30rpx;
|
margin: 30rpx 0 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-swiper-wrap {
|
.u-swiper-wrap {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
@@ -378,6 +284,7 @@ export default {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 1.5%;
|
margin: 0 1.5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-pic image {
|
.banner-pic image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 170rpx;
|
height: 170rpx;
|
||||||
@@ -394,12 +301,14 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
top: -3px;
|
top: -3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.workbench-title {
|
.workbench-title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
padding: 15px 30rpx;
|
padding: 15px 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-icon i.icon-tongzhi {
|
.home-icon i.icon-tongzhi {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-3
@@ -1,10 +1,23 @@
|
|||||||
|
const dotenv = require('dotenv');
|
||||||
|
|
||||||
|
// // Load environment variables from .env file
|
||||||
|
dotenv.config();
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
chainWebpack: (config) => {
|
chainWebpack: (config) => {
|
||||||
config.plugin('define').tap((definitions) => {
|
config.plugin('define').tap((definitions) => {
|
||||||
|
console.log('VUE_APP_UPGRADE_NAME',JSON.stringify(process.env.VUE_APP_UPGRADE_NAME))
|
||||||
|
console.log('VUE_APP_PRODUCTION_API_URL',JSON.stringify(process.env.VUE_APP_PRODUCTION_API_URL))
|
||||||
|
console.log('VUE_APP_DEV_API_URL',JSON.stringify(process.env.VUE_APP_DEV_API_URL))
|
||||||
|
console.log('VUE_APP_ENV_NAME',JSON.stringify(process.env.VUE_APP_ENV_NAME))
|
||||||
Object.assign(definitions[0], {
|
Object.assign(definitions[0], {
|
||||||
__VUE_OPTIONS_API__: 'true',
|
'process.env': {
|
||||||
__VUE_PROD_DEVTOOLS__: 'false',
|
...definitions[0]['process.env'],
|
||||||
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false'
|
VUE_APP_UPGRADE_NAME: JSON.stringify(process.env.VUE_APP_UPGRADE_NAME),
|
||||||
|
VUE_APP_PRODUCTION_API_URL: JSON.stringify(process.env.VUE_APP_PRODUCTION_API_URL),
|
||||||
|
VUE_APP_DEV_API_URL: JSON.stringify(process.env.VUE_APP_DEV_API_URL),
|
||||||
|
VUE_APP_ENV_NAME: JSON.stringify(process.env.VUE_APP_ENV_NAME),
|
||||||
|
}
|
||||||
})
|
})
|
||||||
return definitions
|
return definitions
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user