Compare commits

49 Commits
Author SHA1 Message Date
xuan b1648bcb30 feat: 优化手动进仓流程并修复N5S扫码识别升至1.1.26 2026-11-10 18:43:55 +08:00
xuan c0067e3b89 feat: 半屏连续扫与修改密码报错并升至1.1.25 2026-11-10 08:27:17 +08:00
xuan 706fcda5b9 feat: 手机连续扫与出仓汇总表改用t-table并升至1.1.24 2026-11-09 21:53:32 +08:00
xuan fdbd06f5f5 fix: 详情页消审状态判断并升至1.1.23 2026-11-09 12:42:58 +08:00
xuan 0e630d0fb0 fix: 版本更新下载地址改用周尚CDN前缀 2026-11-09 10:07:57 +08:00
xuan 4d3f767e16 feat: 优化手动进仓扫码流程并升至1.1.22 2026-11-08 22:38:49 +08:00
xuan 5b6690b4d8 fix: 修复坯布库存表格在东集上列错位 2026-11-08 18:54:20 +08:00
xuan db12e1a249 fix: 织厂安装包改传到周尚CDN并升至1.1.21 2026-11-06 21:19:34 +08:00
xuan 870f857be8 merge: 合并 origin/zhoushang,保留远程 1.1.20 及相关改动 2026-11-06 15:31:10 +08:00
xuan c390b9f72b feat: 无扫码配置时自动匹配并升至1.1.20 2026-11-04 16:15:52 +08:00
xuan 8315222788 feat: 进仓等级可多选并提示改密,升至1.1.19 2026-11-04 14:50:44 +08:00
xuan 59e699b4f6 feat: 登录默认密码提示改密并可取消,版本升至1.1.19 2026-11-03 16:01:56 +08:00
xuan fdacdfbda0 feat: 无扫码配置时自动匹配,并修复我的页列表样式 2026-11-03 15:39:03 +08:00
xuan 569b671b7b feat: 上传版本包后同步发布latest.apk 2026-11-02 14:27:56 +08:00
xuan 804e1a8f2b feat: 更新出仓扫码页并升至1.1.18 2026-11-02 14:24:06 +08:00
xuan 61bb43f759 fix: 取消更新后登录页不再自动弹框,等级改为非必填并升至1.1.17 2026-11-01 17:54:32 +08:00
xuan 7adec1b960 fix: 修复登录环境选择器选中框错位并升至1.1.16 2026-10-31 22:20:44 +08:00
xuan 640dcf3493 chore: 修正正式环境接口路径并将版本升至1.1.15 2026-10-31 22:12:16 +08:00
xuan b1404fdd89 feat: 更新正式环境API地址并默认选用 2026-10-30 11:59:10 +08:00
xuan a4dbcbe504 chore(manifest): 更新应用版本号至1.1.13 2026-10-26 15:34:58 +08:00
xuan 39e8393fde fix: 修复手动进仓语音乱码 2026-10-26 15:25:52 +08:00
xuan 35fb587e22 chore: 去掉上传脚本的本地配置文件 2026-10-14 09:35:27 +08:00
xuan 83645ccbf6 chore(manifest): 更新应用版本号至1.1.12 2026-10-14 09:35:26 +08:00
xuan 232a3e179a feat: 新增命令行上传PDA安装包 2026-10-13 18:23:13 +08:00
xuan 1c434a608a chore(manifest): 更新应用版本号至1.1.11 2026-10-13 17:35:15 +08:00
xuan f8ec49c79d feat: 我的页显示应用名称和版本 2026-10-13 17:35:15 +08:00
xuan 7b10d36361 feat: 登录页显示应用名称 2026-10-13 17:35:14 +08:00
xuan e8ae05b87b feat: 放大坯布出仓扫码按钮 2026-10-13 17:32:51 +08:00
xuan c4d5db056b feat: 手动进仓增加扫码和进仓成功语音 2026-10-13 17:32:50 +08:00
xuan 7b199ba559 feat: 坯布出仓增加操作语音并精简扫码明细 2026-10-13 17:13:01 +08:00
xuan 322ada8428 feat: 优化出库筛选字号与缓存 2026-10-08 17:14:10 +08:00
xuan 3e9b0fd1a8 chore(manifest): 更新应用版本号至1.1.10 2026-10-06 15:05:10 +08:00
xuan b734f50f0a fix: 手动进仓重量为空时不再默认显示0 2026-10-06 14:56:29 +08:00
xuan b04f890664 chore(manifest): 更新应用版本号至1.1.9 2026-09-30 12:30:16 +08:00
xuan 304d7ccde0 feat: 新增手动进仓并统一PDA字号标准 2026-09-30 12:29:45 +08:00
xuan 45a8928564 chore(manifest): 更新应用版本号至1.1.8 2026-09-29 11:29:31 +08:00
xuan f6f85ed8ce feat: 工作台改版并区分东大与新大陆扫码 2026-09-29 11:28:47 +08:00
xuan 3e936b064d fix: 关闭App端SSL校验以兼容老PDA 2026-09-28 12:13:17 +08:00
xuan 7c6c7a1b32 feat: 将版本更新入口移到我的页面 2026-09-24 22:09:12 +08:00
xuan c8ce45ae38 chore(manifest): 更新应用版本号至1.1.7 2026-09-24 21:56:17 +08:00
xuan bff563b444 feat: 放大小屏界面并让待审核单直达编辑 2026-09-24 21:54:17 +08:00
xuan 63755eab5c fix(scan): 修复新大陆扫码广播读取条码失败 2026-09-24 18:00:30 +08:00
xuan 26c7085ab2 feat: 默认测试环境并优化出仓与网络提示 2026-09-24 17:56:06 +08:00
xuan 53a059f16b chore(env): 更新周商织厂升级包名称 2026-09-24 16:48:24 +08:00
xuan e0ee8d8c8d chore(env): 切换周商正式环境并更新版本号 2026-09-24 16:35:12 +08:00
xuan fa0ff1614b feat: 开放服务器切换并修复扫码方式列表 2026-09-24 16:33:01 +08:00
xuanandCursor 3f2481d1eb fix(storefabric): 修复坯布库存表格上滑误触发下拉刷新
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-05 16:12:52 +08:00
xuanandCursor 162e10a6fc chore(env): 更新周商环境配置与应用名称
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 10:41:50 +08:00
xuanandCursor 26ff443107 feat(scan): 添加优博讯扫码广播配置
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 10:41:21 +08:00
86 changed files with 4817 additions and 5185 deletions
+37
View File
@@ -0,0 +1,37 @@
---
description: PDA 小屏界面字号与排版标准(以手动进仓页为准)
alwaysApply: true
---
# PDA 字号标准
本项目面向工业 PDA 小屏。新增/改版业务页时,**以后台手动进仓页**(`storeFabricManualIn.vue`)的字号为准,不要用偏小的默认字号。
共用变量:`@import '@/common/pda-typography.scss';`(或等价路径)。
## 字号(rpx)
| 用途 | 字号 | 变量 |
|------|------|------|
| 表单标签 / 正文 / 输入值 | **36** | `$pda-font-body` |
| 扫码输入框 | **36** | `$pda-font-body` |
| 占位提示 | **34** | `$pda-font-placeholder` |
| 行内操作(取消/修改) | **34** | `$pda-font-action` |
| 单位角标(如 KG) | **32** | `$pda-font-unit` |
| 顶栏次要文字(设置等) | **32** | `$pda-font-nav-sub` |
| 主按钮文字 | **36** | `$pda-font-button` |
| 弹层标题 / 选项 | **36** | `$pda-font-popup-title` / `$pda-font-popup-item` |
| 弹层取消 / 空态 | **34** | `$pda-font-popup-sub` |
## 行高与触控
- 列表行最小高度约 **100rpx**,可略加上下 padding
- 扫码输入框高度约 **100rpx**
- 主按钮高度约 **92rpx**
- 标签列宽约 **200rpx**(中文四字标签)
## 注意
- 登录环境选择、出仓明细等已放大过的页面,新改动保持不低于上表
- 不要为了“好看”再缩小字号;宁可少露内容、可滚动,也要可读
- 选择类弹层(如 `SearchSelectPopup`)与表单页使用同一套字号
+6 -5
View File
@@ -1,5 +1,6 @@
NODE_ENV = development
VUE_APP_ENV_NAME = 默认环境
VUE_APP_UPGRADE_NAME = erp_pda
VUE_APP_PRODUCTION_API_URL = https://www.haotopai.com/hcscm_weave/mes/server/pda/v1
VUE_APP_DEV_API_URL = https://www.haotopai.com/hcscm_weave/mes/server/pda/v1
NODE_ENV = production
VUE_APP_ENV_NAME = zhoushang环境
VUE_APP_UPGRADE_NAME = erp_pda_zhoushang_zhichang
VUE_APP_UPGRADE_CDN_PREFIX = https://zsfzcdn.yushangfangzhi.com/version/erp_pda_zhoushang_zhichang
VUE_APP_PRODUCTION_API_URL = https://zszc.yushangfangzhi.com/hcscm_weave/pda/v1
VUE_APP_DEV_API_URL = https://zszc.yushangfangzhi.com/hcscm_weave/pda/v1
-5
View File
@@ -1,5 +0,0 @@
NODE_ENV = development
VUE_APP_ENV_NAME = 本地穿透环境
VUE_APP_UPGRADE_NAME = erp_pda_dev
VUE_APP_PRODUCTION_API_URL = https://2yd52gx88533.vicp.fun/hcscm/pda/v1
VUE_APP_DEV_API_URL = https://2yd52gx88533.vicp.fun/hcscm/pda/v1
+2 -2
View File
@@ -1,5 +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
VUE_APP_PRODUCTION_API_URL = https://hcscmpre.zzfzyc.com/hcscm_weave/pda/v1
VUE_APP_DEV_API_URL = https://hcscmpre.zzfzyc.com/hcscm_weave/pda/v1
+4 -3
View File
@@ -1,5 +1,6 @@
NODE_ENV = production
VUE_APP_ENV_NAME = zhoushang环境
VUE_APP_UPGRADE_NAME = erp_pda_zhoushang
VUE_APP_PRODUCTION_API_URL = https://hcscmtest.zzfzyc.com/hcscm_weave/pda/v1
VUE_APP_DEV_API_URL = https://hcscmtest.zzfzyc.com/hcscm_weave/pda/v1
VUE_APP_UPGRADE_NAME = erp_pda_zhoushang_zhichang
VUE_APP_UPGRADE_CDN_PREFIX = https://zsfzcdn.yushangfangzhi.com/version/erp_pda_zhoushang_zhichang
VUE_APP_PRODUCTION_API_URL = https://zszc.yushangfangzhi.com/hcscm_weave/pda/v1
VUE_APP_DEV_API_URL = https://zszc.yushangfangzhi.com/hcscm_weave/pda/v1
+1 -2
View File
@@ -10,7 +10,6 @@
"build:app-plus:zhisheng": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build --mode zhisheng",
"build:app-plus:zhoushang": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build --mode zhoushang",
"build:app-plus:mes": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build --mode mes",
"build:app-plus:devlocal": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build --mode devlocal",
"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:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
@@ -31,7 +30,6 @@
"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:app-plus:devlocal": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch --mode devlocal",
"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:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
@@ -50,6 +48,7 @@
"dev:quickapp-webview-huawei": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build --watch",
"dev:quickapp-webview-union": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build --watch",
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js",
"upload:apk": "node scripts/upload-apk.js",
"serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js",
"test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i",
"test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
+333
View File
@@ -0,0 +1,333 @@
/**
* 上传已打包的 PDA APK,等价于 ERP「开发者资源上传」里的安装包上传。
*
* 用法:
* npm run upload:apk -- --file D:\path\app.apk --target test
* npm run upload:apk -- --file D:\path\app.apk --target prod
* npm run upload:apk -- --file D:\path\app.apk --target test --mode zhisheng
*
* --target 只决定 APK 放到哪套 CDN:
* test 测试 CDN
* prod 正式 CDN
* 两者没有别的差别。生产环境的 PDA 也可以从测试 CDN 下载并安装。
*
* 版本号取 src/manifest.json 的 versionName。
* 场景值取对应 .env 的 VUE_APP_UPGRADE_NAME,拼成 /version/{upgradeName}/{version}.apk。
* 版本包上传成功后,再把同一份安装包上传为 /version/{upgradeName}/latest.apk。
* 运行时输入 ERP 手机号和密码获取 token。多个账套时再选择一次。
*/
const fs = require('fs');
const path = require('path');
const readline = require('readline');
const ROOT = path.resolve(__dirname, '..');
const UPYUN_API = 'https://v0.api.upyun.com';
const DEFAULT_API_BASE = 'https://hcscmtest.zzfzyc.com/hcscm_weave';
const DEFAULT_CDN_HOST = {
test: 'https://testhcscm.cdn.zzfzyc.com',
prod: 'https://hcscm.cdn.zzfzyc.com',
};
/** 织厂环境签到 zhoushang 空间,下载域名与 ERP 相同 */
const MODE_UPLOAD = {
zhoushang: {
apiBase: 'https://zszc.yushangfangzhi.com/hcscm_weave',
cdnHost: 'https://zsfzcdn.yushangfangzhi.com',
status: 1,
},
};
const MODE_ENV = {
zhoushang: '.env.zhoushang',
zhisheng: '.env.zhisheng',
mes: '.env.mes',
cjt: '.env.cjt',
};
function parseArgs(argv) {
const args = { mode: 'zhoushang' };
for (let i = 0; i < argv.length; i += 1) {
const key = argv[i];
const value = argv[i + 1];
if (key === '--file' || key === '--target' || key === '--mode' || key === '--version' || key === '--phone' || key === '--password' || key === '--tenant') {
args[key.slice(2)] = value;
i += 1;
}
}
return args;
}
function readEnvValue(filePath, name) {
const text = fs.readFileSync(filePath, 'utf8');
const line = text.split(/\r?\n/).find((item) => item.trim().startsWith(`${name}`));
if (!line) return '';
const raw = line.slice(line.indexOf('=') + 1).trim();
return raw.replace(/^['"]|['"]$/g, '');
}
function readManifestVersion() {
const manifest = JSON.parse(fs.readFileSync(path.join(ROOT, 'src/manifest.json'), 'utf8'));
return String(manifest.versionName || '').trim();
}
function ask(question) {
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
return new Promise((resolve) => {
rl.question(question, (answer) => {
rl.close();
resolve(String(answer || '').trim());
});
});
}
function askPassword(question) {
return new Promise((resolve) => {
const stdin = process.stdin;
const stdout = process.stdout;
if (!stdin.isTTY || typeof stdin.setRawMode !== 'function') {
ask(question).then(resolve);
return;
}
stdout.write(question);
stdin.setRawMode(true);
stdin.resume();
stdin.setEncoding('utf8');
let value = '';
const onData = (char) => {
switch (char) {
case '\n':
case '\r':
case '\u0004':
stdin.setRawMode(false);
stdin.pause();
stdin.removeListener('data', onData);
stdout.write('\n');
resolve(value);
break;
case '\u0003':
process.exit();
break;
case '\u007f':
case '\b':
value = value.slice(0, -1);
break;
default:
value += char;
break;
}
};
stdin.on('data', onData);
});
}
async function apiJson(apiBase, urlPath, { method = 'GET', token, body } = {}) {
const headers = { Platform: '1' };
if (token) headers.Authorization = token;
if (body) headers['Content-Type'] = 'application/json';
const res = await fetch(`${apiBase}${urlPath}`, {
method,
headers,
body: body ? JSON.stringify(body) : undefined,
});
const data = await res.json().catch(() => ({}));
if (!res.ok || data.code !== 0) {
throw new Error(data.msg || `请求失败(HTTP ${res.status})`);
}
return data.data || {};
}
async function login(apiBase, { phone: phoneArg, password: passwordArg, tenant: tenantArg } = {}) {
const phone = phoneArg || await ask('手机号: ');
const password = passwordArg || await askPassword('密码: ');
if (!phone || !password) {
throw new Error('请输入手机号和密码');
}
console.log('正在登录...');
const first = await apiJson(apiBase, '/admin/v1/login', {
method: 'POST',
body: { phone, password },
});
const tempToken = first.token;
if (!tempToken) throw new Error('登录未返回 token');
const dropdown = await apiJson(apiBase, '/admin/v1/tenantManagement/dropdownList', {
token: tempToken,
});
const tenants = dropdown.list || [];
if (!tenants.length) return tempToken;
let tenant = tenants[0];
if (tenants.length > 1) {
if (tenantArg) {
const picked = Number(tenantArg);
tenant = tenants[picked - 1];
if (!tenant) throw new Error('账套序号无效');
} else {
console.log('请选择账套:');
tenants.forEach((item, index) => {
const name = item.company_name || item.database_name || item.tenant_contacts || item.tenant_management_id;
console.log(` ${index + 1}. ${name}`);
});
const picked = Number(await ask('序号: '));
tenant = tenants[picked - 1];
if (!tenant) throw new Error('账套序号无效');
}
}
const second = await apiJson(apiBase, '/admin/v1/login', {
method: 'POST',
token: tempToken,
body: {
token: tempToken,
tenant_management_id: tenant.tenant_management_id,
},
});
if (!second.token) throw new Error('选择账套后未返回 token');
return second.token;
}
async function getCdnSign({ apiBase, token, saveKey, status }) {
const url = new URL(`${apiBase}/admin/v1/cdn/token`);
url.searchParams.set('method', 'post');
url.searchParams.set('save_key', saveKey);
url.searchParams.set('status', String(status));
const res = await fetch(url, {
headers: {
Authorization: token,
Platform: '1',
},
});
const body = await res.json();
if (!res.ok || body.code !== 0) {
throw new Error(body.msg || `获取签名失败(HTTP ${res.status})`);
}
return body.data || {};
}
async function uploadToUpyun({ bucket, authorization, policy, filePath, fileName }) {
const buf = fs.readFileSync(filePath);
const form = new FormData();
form.append('authorization', authorization);
form.append('policy', policy);
form.append('file', new Blob([buf], { type: 'application/vnd.android.package-archive' }), fileName);
const res = await fetch(`${UPYUN_API}/${bucket}`, {
method: 'POST',
body: form,
});
const text = await res.text();
let body = {};
try {
body = JSON.parse(text);
} catch (e) {
body = { raw: text };
}
if (!res.ok || (body.code != null && Number(body.code) !== 200)) {
throw new Error(body.message || body.msg || body.raw || `上传失败(HTTP ${res.status})`);
}
return body;
}
function toPublicUrl(cdnHost, saveKey, uploaded) {
if (uploaded.url && String(uploaded.url).startsWith('http')) return uploaded.url;
return `${cdnHost}${saveKey}`;
}
async function uploadApkFile({ apiBase, token, apkPath, saveKey, fileName, status }) {
console.log(`场景路径: ${saveKey}`);
console.log('正在获取签名...');
const sign = await getCdnSign({
apiBase,
token,
saveKey,
status,
});
if (!sign.bucket || !sign.authorization || !sign.policy) {
throw new Error('签名返回缺少 bucket、authorization 或 policy');
}
console.log(`空间: ${sign.bucket}`);
console.log(`正在上传 ${fileName}...`);
const uploaded = await uploadToUpyun({
bucket: sign.bucket,
authorization: sign.authorization,
policy: sign.policy,
filePath: apkPath,
fileName,
});
console.log('上传成功');
return uploaded;
}
async function main() {
const args = parseArgs(process.argv.slice(2));
if (!args.file || !args.target) {
console.error('用法: npm run upload:apk -- --file <apk路径> --target test|prod [--mode zhoushang]');
console.error('--target 只切换 APK 的 CDN:test 测试 CDN,prod 正式 CDN。生产环境也可以从测试 CDN 下载安装。');
process.exit(1);
}
if (args.target !== 'test' && args.target !== 'prod') {
console.error('--target 只能是 test 或 prod。两者只是 APK 的 CDN 环境不同,生产环境也可以从测试 CDN 下载安装。');
process.exit(1);
}
const envFile = MODE_ENV[args.mode];
if (!envFile) {
console.error(`不支持的 --mode:${args.mode},可选 zhoushang、zhisheng、mes、cjt`);
process.exit(1);
}
const apkPath = path.resolve(args.file);
if (!fs.existsSync(apkPath)) {
console.error(`找不到 APK:${apkPath}`);
process.exit(1);
}
const version = args.version || readManifestVersion();
if (!version) {
console.error('manifest.json 里没有 versionName');
process.exit(1);
}
const upgradeName = readEnvValue(path.join(ROOT, envFile), 'VUE_APP_UPGRADE_NAME');
if (!upgradeName) {
console.error(`${envFile} 里没有 VUE_APP_UPGRADE_NAME`);
process.exit(1);
}
const modeUpload = MODE_UPLOAD[args.mode];
const status = modeUpload ? modeUpload.status : (args.target === 'prod' ? 2 : 1);
const fileName = `${version}.apk`;
const saveKey = `/version/${upgradeName}/${fileName}`;
const latestFileName = 'latest.apk';
const latestSaveKey = `/version/${upgradeName}/${latestFileName}`;
const apiBase = modeUpload ? modeUpload.apiBase : DEFAULT_API_BASE;
const cdnHost = modeUpload ? modeUpload.cdnHost : DEFAULT_CDN_HOST[args.target];
const token = await login(apiBase, {
phone: args.phone,
password: args.password,
tenant: args.tenant,
});
console.log(`版本号: ${version}`);
console.log(`签名接口: ${apiBase}`);
console.log(`CDN: ${cdnHost}`);
const uploaded = await uploadApkFile({
apiBase,
token,
apkPath,
saveKey,
fileName,
status,
});
console.log(toPublicUrl(cdnHost, saveKey, uploaded));
const latestUploaded = await uploadApkFile({
apiBase,
token,
apkPath,
saveKey: latestSaveKey,
fileName: latestFileName,
status,
});
console.log(toPublicUrl(cdnHost, latestSaveKey, latestUploaded));
}
main().catch((error) => {
console.error(error.message || error);
process.exit(1);
});
+9
View File
@@ -6,6 +6,7 @@ import { audioManager } from '@/utils/audioManager'
import util from '@/common/util.js';
import md5 from '@/common/md5.js';
import { ensureScanConfigAfterLogin } from '@/common/scanAutoConfig.js';
export default {
globalData: {
AppName: '',
@@ -30,6 +31,14 @@ import { audioManager } from '@/utils/audioManager'
audioManager.init();
// 初始化通知系统
this.$store.dispatch('initNotification');
// 已登录且本地无扫码配置时,自动匹配一次
const loginData = uni.getStorageSync('RemoteTokenData');
if (loginData && loginData.token && this.$u && this.$u.api) {
ensureScanConfigAfterLogin(this.$u.api).catch((error) => {
console.log('启动时自动匹配扫码设置失败', error);
});
}
}
}
</script>
+26 -10
View File
@@ -7,9 +7,10 @@ export const isDevelopment = process.env.NODE_ENV === 'development'
const config = {
upgradeName: process.env.VUE_APP_UPGRADE_NAME || 'erp_pda',
upgradeCdnPrefix: process.env.VUE_APP_UPGRADE_CDN_PREFIX || '',
// 产品名称
productName: '浩拓ERP',
productName: '浩拓技术',
// 公司名称
companyName: '浩拓科技',
@@ -20,21 +21,36 @@ const config = {
// 环境判断
isDevelopment: isDevelopment,
// 生产环境API URL(服务名段 hcscm)
productionApiUrl: process.env.VUE_APP_PRODUCTION_API_URL || 'https://www.haotopai.com/hcscm/pda/v1',
// 生产环境API URL(服务名段 hcscm_weave)
productionApiUrl: process.env.VUE_APP_PRODUCTION_API_URL,
// 开发环境API URL选项(服务名段 hcscm)
// 开发环境API URL选项(仅替换 //域名/ 后第一个路径段 hcscm → hcscm_weave,不改域名)
devApiUrlOptions: [
{ label: '测试环境', value: 'https://hcscmtest.zzfzyc.com/hcscm/pda/v1' },
{ label: '本地环境', value: 'http://192.168.1.66:7010/hcscm/pda/v1' },
{ label: '本地穿透', value: 'https://2yd52gx88533.vicp.fun/hcscm/pda/v1' },
{ label: '正式环境', value: process.env.VUE_APP_DEV_API_URL || 'https://www.haotopai.com/hcscm/pda/v1' },
{ label: '测试环境', value: 'https://hcscmtest.zzfzyc.com/hcscm_weave/pda/v1' },
{ label: '正式环境', value: process.env.VUE_APP_PRODUCTION_API_URL },
{ label: '本地环境', value: 'http://192.168.1.97:7010/hcscm_weave/pda/v1' },
{ label: '自定义', value: 'custom' }
]
}
// 设置后台接口服务的基础地址 - 使用动态API URL
// config.baseUrl = 'https://aidex.vip/api'; // 注释掉固定的baseUrl
export function resolveUpgradeDownloadUrl(downloadUrl) {
const raw = String(downloadUrl || '').trim();
const prefix = String(config.upgradeCdnPrefix || '').trim().replace(/\/+$/, '');
if (!raw || !prefix) {
return raw;
}
const path = raw.split('?')[0].split('#')[0];
const fileName = path.split('/').filter(Boolean).pop() || '';
if (!fileName || !/\.apk$/i.test(fileName)) {
return raw;
}
return `${prefix}/${fileName}`;
}
export function getDefaultApiUrl() {
const prod = config.devApiUrlOptions.find(item => item.label === '正式环境');
return (prod && prod.value) || config.productionApiUrl || 'https://zszc.yushangfangzhi.com/server/hcscm_weave/pda/v1';
}
export default config;
+17 -53
View File
@@ -8,26 +8,13 @@ const install = (Vue, vm) => {
const config = vm.vuex_config;
console.log('install u',config)
// 接口前缀统一走 hcscm(apiurl 已在 config.js 配置为 hcscm 服务)
// 部分基础资料(往来单位、营销体系)仍在 hcscm_weave
const getApiUrl = () => String(vm.$store.state.apiurl || '');
const getWeaveApiUrl = () => {
const url = getApiUrl();
if (url.indexOf('hcscm_weave') !== -1) return url;
return url.replace('/hcscm/', '/hcscm_weave/');
};
// 坯布出仓单接口前缀(apiurl 已在 config.js 统一配置为 hcscm_weave 服务)
const GFM_OTHER_DELIVERY_PREFIX = '/grey_fabric_manage/gfmOtherDeliveryOrder/';
const gfmOtherDeliveryUrl = (name) => getApiUrl() + GFM_OTHER_DELIVERY_PREFIX + name;
const gfmOtherDeliveryUrl = (name) => (vm.$store.state.apiurl || '') + GFM_OTHER_DELIVERY_PREFIX + name;
// 坯布库存接口前缀
const GFM_WAREHOUSE_PREFIX = '/grey_fabric_manage/gfmWarehouse/';
const gfmWarehouseUrl = (name) => getApiUrl() + GFM_WAREHOUSE_PREFIX + name;
const FPM_PROCESS_IN_PREFIX = '/product/fpmProcessInOrder/';
const fpmProcessInUrl = (name) => getApiUrl() + FPM_PROCESS_IN_PREFIX + name;
const FPM_PROCESS_OUT_PREFIX = '/product/fpmProcessOutOrder/';
const fpmProcessOutUrl = (name) => getApiUrl() + FPM_PROCESS_OUT_PREFIX + name;
const gfmWarehouseUrl = (name) => (vm.$store.state.apiurl || '') + GFM_WAREHOUSE_PREFIX + name;
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
vm.$u.api = {
@@ -59,50 +46,27 @@ const install = (Vue, vm) => {
detailList: (params = {}) => vm.$u.get(gfmWarehouseUrl('getGfmWarehouseList'), params),
},
// 加工进仓单
fpmProcessInOrder: {
list: (params = {}) => vm.$u.get(fpmProcessInUrl('getFpmProcessInOrderList'), params),
detail: (params = {}) => vm.$u.get(fpmProcessInUrl('getFpmProcessInOrder'), params),
add: (params = {}) => vm.$u.postJson(fpmProcessInUrl('addFpmProcessInOrder'), params),
scanUpdate: (params = {}) => vm.$u.putJson(fpmProcessInUrl('updateFpmProcessInOrder'), params),
statusPass: (params = {}) => vm.$u.putJson(fpmProcessInUrl('updateFpmProcessInOrderStatusPass'), params),
statusWait: (params = {}) => vm.$u.putJson(fpmProcessInUrl('updateFpmProcessInOrderStatusWait'), params),
statusReject: (params = {}) => vm.$u.putJson(fpmProcessInUrl('updateFpmProcessInOrderStatusReject'), params),
statusCancel: (params = {}) => vm.$u.putJson(fpmProcessInUrl('updateFpmProcessInOrderStatusCancel'), params),
// PDA 生产进仓(排产单细码扫码进仓)
productionScheduleOrder: {
getScanFineCodeDetail: (params = {}) => vm.$u.get('/produce/productionScheduleOrder/getScanFineCodeDetail', params),
scanInWarehouseFineCode: (params = {}) => vm.$u.putJson('/produce/productionScheduleOrder/scanInWarehouseFineCode', params),
},
// 加工出仓单
fpmProcessOutOrder: {
list: (params = {}) => vm.$u.get(fpmProcessOutUrl('getFpmProcessOutOrderList'), params),
detail: (params = {}) => vm.$u.get(fpmProcessOutUrl('getFpmProcessOutOrder'), params),
add: (params = {}) => vm.$u.postJson(fpmProcessOutUrl('addFpmProcessOutOrder'), params),
scanUpdate: (params = {}) => vm.$u.putJson(fpmProcessOutUrl('updateFpmProcessOutOrder'), params),
statusPass: (params = {}) => vm.$u.putJson(fpmProcessOutUrl('updateFpmProcessOutOrderStatusPass'), params),
statusWait: (params = {}) => vm.$u.putJson(fpmProcessOutUrl('updateFpmProcessOutOrderStatusWait'), params),
statusReject: (params = {}) => vm.$u.putJson(fpmProcessOutUrl('updateFpmProcessOutOrderStatusReject'), params),
statusCancel: (params = {}) => vm.$u.putJson(fpmProcessOutUrl('updateFpmProcessOutOrderStatusCancel'), params),
},
// 物理仓库下拉
physicalWarehouse: {
getDropdownList: (params = {}) => vm.$u.get('/warehouse/physicalWarehouse/getPhysicalWarehouseDropdownList', params),
},
// 仓位查询(Request: qr_code / warehouse_id / name;Response: GetPhysicalWarehouseBinData)
warehouseBin: {
getByQrCode: (params = {}) => vm.$u.get('/warehouse/warehouseBin/getWarehouseBin', params),
},
// 营销体系下拉(基础资料在 hcscm_weave)
// 营销体系下拉(路径相对 apiurl:.../pda/v1/saleSystem/getSaleSystemDropdownList)
saleSystem: {
getDropdownList: (params = {}) => vm.$u.get(getWeaveApiUrl() + '/saleSystem/getSaleSystemDropdownList', params),
getDropdownList: (params = {}) => vm.$u.get('/saleSystem/getSaleSystemDropdownList', params),
},
// 往来单位列表
// 往来单位列表(路径相对 apiurl:.../pda/v1/business_unit/list)
businessUnit: {
list: (params = {}) => vm.$u.get('/business_unit/list', params),
},
// 员工枚举(路径相对 apiurl:.../pda/v1/employee/list_enum)
employee: {
listEnum: (params = {}) => vm.$u.get('/employee/list_enum', params),
},
// 字典明细枚举(路径相对 apiurl:.../pda/v1/dictionaryDetail/getDictionaryDetailEnumList)
dictionary: {
getDetailEnumList: (params = {}) => vm.$u.get('/dictionaryDetail/getDictionaryDetailEnumList', params),
@@ -150,7 +114,7 @@ const install = (Vue, vm) => {
// 个人信息修改
user: {
saveUserInfo: (params = {}) => vm.$u.post(config.productionApiUrl+'/mobile/user/saveUserInfo', params),
infoSavePwd: (params = {}) => vm.$u.put(config.productionApiUrl+'/system/user/profile/updatePwd', params),
infoSavePwd: (params = {}) => vm.$u.put('/system/user/profile/updatePwd', params),
infoSavePqa: (params = {}) => vm.$u.post(config.productionApiUrl+'/sys/user/infoSavePqa', params),
},
+34 -26
View File
@@ -22,16 +22,13 @@ const install = (Vue, vm) => {
// 请求拦截,配置Token等参数
Vue.prototype.$u.http.interceptor.request = (req) => {
const reqUrl = req && req.url ? String(req.url) : '';
const isAbsolute = /^https?:\/\//i.test(reqUrl);
const fullUrl = isAbsolute ? reqUrl : (vm.$store.state.apiurl + reqUrl);
// 用 JSON 字符串输出,避免 HBuilderX 控制台对象被截断、点击 URL 跳浏览器
console.log('request => ' + JSON.stringify({
url: fullUrl,
method: req.method,
data: req.data,
header: req.header
}, null, 2));
console.log('request', req);
console.log('baseUrl', vm.$store.state.apiurl);
console.log('完整URL', vm.$store.state.apiurl + req.url);
// #ifdef APP-PLUS
// Android 5.x 等老 PDA 不信任 Let's Encrypt 新证书链,关闭校验证书
req.sslVerify = false;
// #endif
if (!req.header){
req.header = [];
}
@@ -75,26 +72,34 @@ const install = (Vue, vm) => {
});
return false;
}
// 非业务 JSON(如 404 page not found)
if (res.statusCode && res.statusCode !== 200) {
const msg = (res.data && res.data.msg) || `请求失败(${res.statusCode})`;
vm.$u.toast(msg);
return Promise.reject(new Error(msg));
}
console.log('res',res)
if (!(res.data)){
vm.$u.toast('未连接到服务器')
return Promise.reject(new Error('未连接到服务器'));
const rejectWithMessage = (message) => {
const text = String(message || '请求失败').trim() || '请求失败';
vm.$u.toast(text);
return Promise.reject(new Error(text));
};
// HTTP 非 200(如 404)时直接报错,避免把字符串/HTML 当业务 data 解析
if (res.statusCode && res.statusCode !== 200) {
let message = `请求失败(${res.statusCode})`;
if (typeof res.data === 'string' && res.data.trim()) {
message = res.data.trim().slice(0, 120);
} else if (res.data && typeof res.data === 'object') {
message = res.data.msg || res.data.message || message;
}
return rejectWithMessage(message);
}
if (res.data === undefined || res.data === null || res.data === '') {
const errMsg = String((res && res.errMsg) || '');
const isNetworkError = res.statusCode === -1
|| /Unable to resolve host|Failed to connect|request:fail|timeout|网络/i.test(errMsg);
const message = isNetworkError ? '当前没有网络,请检查网络后重试' : '未连接到服务器';
return rejectWithMessage(message);
}
if (typeof res.data !== 'object') {
const msg = '接口返回异常';
vm.$u.toast(msg);
return Promise.reject(new Error(msg));
return rejectWithMessage(String(res.data).slice(0, 120));
}
if(res.data.code !== 0) {
vm.$u.toast(res.data.msg)
return Promise.reject(new Error(res.data.msg))
if (res.data.code !== 0) {
return rejectWithMessage(res.data.msg || res.data.message || '请求失败');
}
let data = res.data.data;
console.log('data',data)
@@ -177,6 +182,9 @@ const install = (Vue, vm) => {
uni.request({
url,
method: 'PUT',
// #ifdef APP-PLUS
sslVerify: false,
// #endif
header: {
...header,
'Platform': 2,
+19
View File
@@ -0,0 +1,19 @@
/**
* PDA 小屏字号标准(以手动进仓页为准)
* 业务页请优先引用这些变量,避免字号再次变小。
*/
$pda-font-body: 36rpx;
$pda-font-placeholder: 34rpx;
$pda-font-action: 34rpx;
$pda-font-unit: 32rpx;
$pda-font-nav-sub: 32rpx;
$pda-font-button: 36rpx;
$pda-font-popup-title: 36rpx;
$pda-font-popup-item: 36rpx;
$pda-font-popup-sub: 34rpx;
$pda-row-min-height: 100rpx;
$pda-scan-input-height: 100rpx;
$pda-button-height: 92rpx;
$pda-label-width: 200rpx;
+47
View File
@@ -0,0 +1,47 @@
/**
* 登录后 / 冷启动:拉取扫码字典并在本地无配置时自动匹配写入
*/
import {
DICTIONARY_TYPE_SCANNER,
autoConfigureScanSettings,
} from '@/common/scanConfig.js';
function extractDictionaryList(res) {
if (Array.isArray(res)) return res;
if (res && Array.isArray(res.list)) return res.list;
return [];
}
/**
* @param {object} api - this.$u.api
* @returns {Promise<{saved:boolean,skipped:boolean,config:object|null,reason?:string}>}
*/
export async function ensureScanConfigAfterLogin(api) {
if (!api || !api.dictionary || !api.dictionary.getDetailEnumList) {
return autoConfigureScanSettings({ remoteConfigs: [] });
}
let remoteConfigs = [];
try {
const res = await api.dictionary.getDetailEnumList({
dictionary_id: DICTIONARY_TYPE_SCANNER,
});
remoteConfigs = extractDictionaryList(res);
} catch (error) {
console.log('拉取扫码字典失败,改用内置配置自动匹配', error);
}
const result = autoConfigureScanSettings({ remoteConfigs });
if (result.skipped) {
console.log('本地已有扫码设置,跳过自动匹配', result.config && result.config.name);
} else if (result.saved) {
if (result.reason === 'rematch_n5s_from_seuic') {
console.log('N5S 误识别为东集,已纠正为', result.config && result.config.name);
} else {
console.log('已自动写入扫码设置', result.config && result.config.name);
}
} else {
console.log('自动匹配扫码设置未写入', result.reason);
}
return result;
}
+400 -4
View File
@@ -4,18 +4,154 @@ export const DICTIONARY_TYPE_SCANNER = 10046;
export const PHONE_SCAN_BRAND = 'phone';
// 历史误用 brand=newland 表示东集;真正的新大陆是 nlscan
const LEGACY_SEUIC_BRANDS = ['newland', '东集', 'idata'];
export const PHONE_SCAN_CONFIG = {
brand: PHONE_SCAN_BRAND,
name: '手机扫码',
isPhoneScan: true,
};
/** 内置扫码配置:补 needSetup,并在字典拉不到时兜底 */
export const BUILTIN_SCANNER_CONFIGS = [
{
brand: 'seuic',
name: '东大集成(AUTOID)',
action: 'com.android.server.scannerservice.broadcast',
dataKey: 'scannerdata',
needSetup: true,
setupAction: 'com.android.scanner.service_settings',
setupParams: {
barcode_send_mode: 'BROADCAST',
action_barcode_broadcast: 'com.android.server.scannerservice.broadcast',
key_barcode_broadcast: 'scannerdata',
endchar: 'NONE',
},
},
{
brand: 'sunmi',
name: '商米',
action: 'com.sunmi.scanner.ACTION_DATA_CODE_RECEIVED',
dataKey: 'data',
needSetup: false,
},
{
brand: 'urovo',
name: '优博讯',
action: 'android.intent.ACTION_DECODE_DATA',
dataKey: 'barcode_string',
needSetup: false,
},
{
brand: 'nlscan',
name: '新大陆',
action: 'nlscan.action.SCANNER_RESULT',
dataKey: 'SCAN_BARCODE1',
needSetup: false,
},
{
// N5S 部分固件走智联天地兼容广播,而不是 nlscan.action
brand: 'nlscan_compat',
name: '新大陆(兼容广播)',
action: 'android.intent.action.RECEIVE_SCANDATA_BROADCAST',
dataKey: 'android.intent.extra.SCAN_BROADCAST_DATA',
needSetup: false,
},
{ ...PHONE_SCAN_CONFIG },
];
/** 设备关键词 / 常见扫码相关包名,用于自动识别 */
const DETECT_RULES = [
{
matchNames: ['商米'],
matchActions: ['com.sunmi.scanner.ACTION_DATA_CODE_RECEIVED'],
keywords: ['sunmi'],
packages: ['com.sunmi.scanner', 'woyou.aidlservice.jiuiv5'],
},
{
matchNames: ['新大陆', '新大陆(兼容广播)'],
matchActions: [
'nlscan.action.SCANNER_RESULT',
'android.intent.action.RECEIVE_SCANDATA_BROADCAST',
],
// N5S 机型常标成 alps/zltd,不能只靠 newland 关键字
keywords: ['newland', 'nls', 'nlscan', 'n5s', 'zltd'],
models: ['n5s', 'n5'],
packages: [
'com.nlscan.barcodescanner',
'com.newland',
'com.nlscan.android.scan.service',
],
},
{
matchNames: ['优博讯'],
matchActions: ['android.intent.ACTION_DECODE_DATA'],
keywords: ['urovo', 'ubx'],
packages: ['com.urovo', 'com.ubx'],
},
{
matchNames: ['盈达'],
matchActions: ['android.intent.action.SCANRESULT'],
keywords: ['idata', 'yingda'],
packages: ['com.idata'],
},
{
matchNames: ['海雅达'],
matchActions: ['com.android.scanner.broadcast'],
keywords: ['haiyada'],
packages: [],
},
{
matchNames: ['东大集成(AUTOID)', '东大集成', '东集'],
matchActions: ['com.android.server.scannerservice.broadcast'],
keywords: ['seuic', 'autoid', 'eastcom', '东集', '东大'],
packages: ['com.seuic.scanner'],
},
];
const PDA_DEVICE_KEYWORDS = [
'newland', 'nls', 'nlscan', 'n5s', 'zltd', 'sunmi', 'urovo', 'ubx', 'zebra', 'honeywell',
'idata', 'seuic', 'autoid', '东集', '东大',
];
/** 明确机型 → 优先品牌,避免通用东集广播抢分 */
const MODEL_PREFERRED_BRANDS = [
{
models: ['n5s'],
brands: ['nlscan', 'nlscan_compat'],
score: 220,
},
];
const NO_SETUP_HINT_KEY = 'pda_scan_config_hint_shown';
export function isPhoneScanConfig(config) {
return !!(config && (config.isPhoneScan || config.brand === PHONE_SCAN_BRAND));
}
function migrateLegacySeuicBrand(config) {
if (!config || isPhoneScanConfig(config)) {
return config;
}
const brand = String(config.brand || '');
const name = String(config.name || '');
const action = String(config.action || '');
// 历史内置配置把东集误标成 brand=newland;真正的新大陆是 nlscan
const isLegacySeuicLabel = LEGACY_SEUIC_BRANDS.includes(brand) || name === '东集';
if (!isLegacySeuicLabel) {
return config;
}
if (action.includes('nlscan')) {
return config;
}
return {
...config,
brand: 'seuic',
name: (!name || name === '东集') ? '东大集成(AUTOID)' : name,
};
}
function enrichFromBuiltinConfig(config, builtinConfigs = []) {
if (!config || !builtinConfigs.length) {
return config;
@@ -24,7 +160,13 @@ function enrichFromBuiltinConfig(config, builtinConfigs = []) {
const builtin = builtinConfigs.find((item) => {
return item.action === config.action
|| item.name === config.name
|| item.brand === config.brand;
|| item.brand === config.brand
|| (item.brand === 'seuic' && (
String(config.name || '').includes('东大')
|| String(config.name || '').includes('东集')
|| String(config.name || '').includes('AUTOID')
|| String(config.action || '').includes('scannerservice.broadcast')
));
});
if (!builtin) {
@@ -49,7 +191,7 @@ export function normalizeConfig(raw, builtinConfigs = []) {
return { ...PHONE_SCAN_CONFIG };
}
const config = enrichFromBuiltinConfig({
let config = {
brand,
name: raw.name || '',
action: raw.action || raw.code || '',
@@ -57,7 +199,10 @@ export function normalizeConfig(raw, builtinConfigs = []) {
needSetup: raw.needSetup != null ? raw.needSetup : !!raw.need_setup,
setupAction: raw.setupAction || raw.setup_action || '',
setupParams: raw.setupParams || raw.setup_params || null,
}, builtinConfigs);
};
config = migrateLegacySeuicBrand(config);
config = enrichFromBuiltinConfig(config, builtinConfigs);
if (!config.brand || !config.action || !config.dataKey) {
return null;
@@ -73,7 +218,16 @@ export function mapDictionaryToScannerConfig(raw, builtinConfigs = []) {
export function getScanConfig(builtinConfigs = []) {
try {
const data = uni.getStorageSync(STORAGE_KEY);
return normalizeConfig(data, builtinConfigs);
const normalized = normalizeConfig(data, builtinConfigs);
// 旧 brand=newland(东集) 迁移后写回,避免下次仍读到错误 brand
if (normalized && data && String(data.brand || '') !== String(normalized.brand || '')) {
try {
uni.setStorageSync(STORAGE_KEY, normalized);
} catch (e) {
console.log('迁移扫码枪配置写回失败', e);
}
}
return normalized;
} catch (e) {
console.log('读取扫码枪配置失败', e);
return null;
@@ -109,3 +263,245 @@ export function markNoConfigHintShown() {
console.log('记录扫码枪提示状态失败', e);
}
}
export function mergeScannerConfigs(remoteConfigs = []) {
const configMap = new Map();
BUILTIN_SCANNER_CONFIGS.forEach((item) => {
if (!isPhoneScanConfig(item)) {
configMap.set(item.action || item.brand, item);
}
});
(remoteConfigs || []).forEach((raw) => {
const normalized = mapDictionaryToScannerConfig(raw, BUILTIN_SCANNER_CONFIGS);
if (!normalized || isPhoneScanConfig(normalized)) return;
configMap.set(normalized.action || normalized.brand, normalized);
});
const list = Array.from(configMap.values());
list.push({ ...PHONE_SCAN_CONFIG });
return list;
}
export function getDeviceIdentity() {
// #ifdef APP-PLUS
try {
const Build = plus.android.importClass('android.os.Build');
return {
manufacturer: String(Build.MANUFACTURER || '').toLowerCase(),
model: String(Build.MODEL || '').toLowerCase(),
brand: String(Build.BRAND || '').toLowerCase(),
};
} catch (e) {
console.log('读取设备信息失败', e);
}
// #endif
return { manufacturer: '', model: '', brand: '' };
}
export function isPdaDevice() {
const identity = getDeviceIdentity();
const text = `${identity.manufacturer} ${identity.model} ${identity.brand}`;
return PDA_DEVICE_KEYWORDS.some((keyword) => text.includes(String(keyword).toLowerCase()));
}
function findDetectRule(config) {
return DETECT_RULES.find((rule) => {
if (rule.matchNames.includes(config.name)) return true;
if (rule.matchActions.includes(config.action)) return true;
return false;
}) || null;
}
function isPackageInstalled(packageName) {
// #ifdef APP-PLUS
try {
const main = plus.android.runtimeMainActivity();
const pm = main.getPackageManager();
plus.android.importClass(pm);
pm.getPackageInfo(packageName, 0);
return true;
} catch (e) {
return false;
}
// #endif
return false;
}
function canResolveBroadcast(action) {
if (!action) return false;
// #ifdef APP-PLUS
try {
const main = plus.android.runtimeMainActivity();
const Intent = plus.android.importClass('android.content.Intent');
const pm = main.getPackageManager();
plus.android.importClass(pm);
const intent = new Intent(action);
const list = pm.queryBroadcastReceivers(intent, 0);
return !!(list && list.size && list.size() > 0);
} catch (e) {
console.log('探测广播接收方失败', action, e);
return false;
}
// #endif
return false;
}
function isModelMatch(identity, models = []) {
const model = String((identity && identity.model) || '').toLowerCase();
if (!model) return false;
return (models || []).some((item) => model === item || model.includes(item));
}
function getModelPreferredBoost(config, identity) {
if (!config || isPhoneScanConfig(config)) {
return 0;
}
const brand = String(config.brand || '');
for (let i = 0; i < MODEL_PREFERRED_BRANDS.length; i += 1) {
const rule = MODEL_PREFERRED_BRANDS[i];
if (!isModelMatch(identity, rule.models)) continue;
if ((rule.brands || []).includes(brand)) {
return Number(rule.score) || 0;
}
}
return 0;
}
/** 新大陆 N5S / 智联天地 N5S:机型名常为 n5s,厂商可能是 newland/zltd/alps */
export function isNewlandN5sDevice(identity = getDeviceIdentity()) {
const model = String((identity && identity.model) || '').toLowerCase();
const text = `${identity.manufacturer || ''} ${identity.brand || ''} ${model}`.toLowerCase();
if (model === 'n5s' || model.includes('n5s')) {
return true;
}
return text.includes('n5s') && (
text.includes('newland')
|| text.includes('zltd')
|| text.includes('nlscan')
|| text.includes('alps')
);
}
function isWrongSeuicOnNewlandDevice(config, identity = getDeviceIdentity()) {
if (!config || isPhoneScanConfig(config)) {
return false;
}
if (!isNewlandN5sDevice(identity) && !isModelMatch(identity, ['n5s'])) {
return false;
}
const brand = String(config.brand || '');
const action = String(config.action || '');
return brand === 'seuic'
|| action.includes('scannerservice.broadcast')
|| String(config.name || '').includes('东集')
|| String(config.name || '').includes('东大');
}
function scoreScannerConfig(config, identity) {
if (!config || isPhoneScanConfig(config)) {
return 0;
}
let score = 0;
const rule = findDetectRule(config);
const deviceText = `${identity.manufacturer} ${identity.model} ${identity.brand}`;
if (canResolveBroadcast(config.action)) {
score += 100;
}
if (rule) {
if ((rule.packages || []).some((pkg) => isPackageInstalled(pkg))) {
score += 60;
}
if ((rule.keywords || []).some((keyword) => deviceText.includes(String(keyword).toLowerCase()))) {
score += 40;
}
if (isModelMatch(identity, rule.models || [])) {
score += 80;
}
}
score += getModelPreferredBoost(config, identity);
// 明确是 N5S 时,压低东集通用广播抢分
if (isNewlandN5sDevice(identity) && (
config.brand === 'seuic'
|| String(config.action || '').includes('scannerservice.broadcast')
)) {
score = Math.min(score, 30);
}
return score;
}
/**
* 在候选配置中选出最匹配当前设备的一项;非 PDA 且无命中则回落手机扫码
*/
export function matchBestScanConfig(candidateConfigs = []) {
const configs = (candidateConfigs || [])
.map((item) => normalizeConfig(item, BUILTIN_SCANNER_CONFIGS))
.filter(Boolean);
const pdaConfigs = configs.filter((item) => !isPhoneScanConfig(item));
const identity = getDeviceIdentity();
let best = null;
let bestScore = 0;
pdaConfigs.forEach((config) => {
const score = scoreScannerConfig(config, identity);
if (score > bestScore) {
bestScore = score;
best = config;
}
});
if (best && bestScore > 0) {
return best;
}
if (!isPdaDevice()) {
return { ...PHONE_SCAN_CONFIG };
}
return pdaConfigs[0] || { ...PHONE_SCAN_CONFIG };
}
/**
* 仅本地没有有效配置时,自动匹配并写入扫描设置。
* 若本地误把 N5S 识别成东集,则强制重配。
* @returns {{ saved: boolean, config: object|null, skipped: boolean, reason?: string }}
*/
export function autoConfigureScanSettings({ remoteConfigs = [] } = {}) {
const existing = getScanConfig(BUILTIN_SCANNER_CONFIGS);
const identity = getDeviceIdentity();
const forceRematch = !!(existing && isWrongSeuicOnNewlandDevice(existing, identity));
if (existing && !forceRematch) {
return {
saved: false,
skipped: true,
config: existing,
reason: 'local_exists',
};
}
const candidates = mergeScannerConfigs(remoteConfigs);
const matched = matchBestScanConfig(candidates);
if (!matched) {
return {
saved: false,
skipped: false,
config: existing || null,
reason: 'no_match',
};
}
const saved = saveScanConfig(matched);
return {
saved,
skipped: false,
config: matched,
reason: saved
? (forceRematch ? 'rematch_n5s_from_seuic' : 'saved')
: 'save_failed',
};
}
+90 -44
View File
@@ -1,18 +1,16 @@
// common/scanMixin.js
// 多厂商PDA扫码器兼容方案 - 策略模式 + 配置表驱动
import {
BUILTIN_SCANNER_CONFIGS,
getScanConfig,
hasShownNoConfigHint,
isPdaDevice as detectPdaDevice,
isPhoneScanConfig,
markNoConfigHintShown,
normalizeConfig,
PHONE_SCAN_CONFIG,
} from '@/common/scanConfig.js';
const PDA_DEVICE_KEYWORDS = [
'newland', 'nls', 'sunmi', 'urovo', 'zebra', 'honeywell', 'idata', 'seuic',
];
export default {
data() {
return {
@@ -27,29 +25,7 @@ export default {
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
},
{ ...PHONE_SCAN_CONFIG },
];
return BUILTIN_SCANNER_CONFIGS;
},
getPhoneScanConfig() {
@@ -57,20 +33,7 @@ export default {
},
isPdaDevice() {
// #ifdef APP-PLUS
try {
const Build = plus.android.importClass('android.os.Build');
const manufacturer = String(Build.MANUFACTURER || '').toLowerCase();
const model = String(Build.MODEL || '').toLowerCase();
return PDA_DEVICE_KEYWORDS.some((keyword) => {
return manufacturer.includes(keyword) || model.includes(keyword);
});
} catch (error) {
console.log('检测设备类型失败', error);
return false;
}
// #endif
return false;
return detectPdaDevice();
},
shouldUsePhoneScan() {
@@ -109,20 +72,63 @@ export default {
return configs.length ? configs[0] : null;
},
/** 停止手机连续扫码(含 Ba-Scanner) */
stopPhoneScanContinuous() {
this._phoneScanContinuousActive = false;
// #ifdef APP-PLUS
try {
const scanner = uni.requireNativePlugin('Ba-Scanner');
if (scanner && typeof scanner.onClose === 'function') {
scanner.onClose();
}
} catch (e) {
// 未购买/未打包原生插件时忽略
}
// #endif
},
/**
* 打开手机扫码
* @param {{ continuous?: boolean, callback?: Function, fail?: Function, scanType?: string[], hintText?: string, scanTimeSpace?: number }} options
* continuous=true 时优先用 Ba-Scanner 连续扫;无插件则扫完自动再开相机
*/
openPhoneScan(options = {}) {
const callback = options.callback || this._scanCallback;
const continuous = !!options.continuous;
this._phoneScanContinuousActive = continuous;
// #ifdef APP-PLUS
if (continuous && this.openBaScannerContinuous(options, callback)) {
return;
}
// #endif
// #ifdef APP-PLUS || MP-WEIXIN
uni.scanCode({
scanType: options.scanType || ['qrCode', 'barCode'],
success: (res) => {
this.handleScanResult(res.result, callback);
const result = this.handleScanResult(res.result, callback);
if (!continuous || !this._phoneScanContinuousActive) return;
Promise.resolve(result)
.catch(() => null)
.then(() => {
if (!this._phoneScanContinuousActive || !this.isPageActive) return;
setTimeout(() => {
if (!this._phoneScanContinuousActive || !this.isPageActive) return;
this.openPhoneScan(options);
}, Number(options.scanTimeSpace) > 0 ? Number(options.scanTimeSpace) : 400);
});
},
fail: (err) => {
console.error('手机扫码失败:', err);
this._phoneScanContinuousActive = false;
if (options.fail) {
options.fail(err);
return;
}
// 用户取消不打扰
const msg = (err && (err.errMsg || err.message)) || '';
if (/cancel|取消/i.test(msg)) return;
uni.showToast({
title: '扫码失败',
icon: 'none',
@@ -140,6 +146,41 @@ export default {
// #endif
},
/**
* Ba-Scanner 连续扫码(插件市场 id=9669)
* @returns {boolean} 是否已成功唤起原生连续扫
*/
openBaScannerContinuous(options = {}, callback) {
// #ifdef APP-PLUS
try {
const scanner = uni.requireNativePlugin('Ba-Scanner');
if (!scanner || typeof scanner.onScan !== 'function') return false;
scanner.onScan(
{
isContinuous: true,
scanTimeSpace: Number(options.scanTimeSpace) > 0 ? Number(options.scanTimeSpace) : 1500,
isShowVibrate: options.isShowVibrate !== false,
isShowBeep: !!options.isShowBeep,
isShowToast: false,
isShowPhotoAlbum: options.isShowPhotoAlbum !== false,
hintText: options.hintText || '扫二维码/条形码,可连续扫',
barcodeFormats: options.barcodeFormats || ['QR Code', 'Code 128', 'Code 39', 'EAN-13', 'EAN-8'],
},
(ret) => {
if (!ret || !ret.result) return;
if (!this._phoneScanContinuousActive) return;
this.handleScanResult(ret.result, callback);
},
);
return true;
} catch (e) {
console.warn('Ba-Scanner 不可用,回退 uni.scanCode', e);
return false;
}
// #endif
return false;
},
triggerScan() {
if (this.usePhoneScanFallback) {
this.openPhoneScan();
@@ -267,7 +308,8 @@ export default {
if (!self.isPageActive) return;
try {
plus.android.importClass('android.content.Intent');
// 广播回调里的 intent 需要按实例导入,否则 getStringExtra 不可用
plus.android.importClass(intent);
const scanResult = intent.getStringExtra(config.dataKey);
console.log(`${config.name}扫码结果:`, scanResult);
@@ -297,11 +339,12 @@ export default {
console.log("扫码结果:", cleanCode);
if (scanCallback) {
scanCallback(cleanCode);
return scanCallback(cleanCode);
}
} catch (error) {
console.error("处理扫码结果时出错:", error);
}
return undefined;
},
unregisterScanBroadcast() {
@@ -353,10 +396,13 @@ export default {
onHide() {
this.isPageActive = false;
// 不在 onHide 里关 Ba-Scanner:打开原生扫码页也会触发 hide,误关会打断连续扫
// 无插件回退模式靠 isPageActive 控制是否自动再开相机
},
onUnload() {
this.isPageActive = false;
this.stopPhoneScanContinuous();
this.unregisterScanBroadcast();
}
}
+90 -105
View File
@@ -46,12 +46,12 @@ export const FABRIC_INFO_FIELDS = [
/** 细码表格列(不含操作列) */
export const FINE_CODE_TABLE_COLUMNS = [
{ label: '序号', key: 'seq', width: 70 },
{ label: '卷号', key: 'roll_no', width: 90 },
{ label: '匹数', key: 'roll', width: 90 },
{ label: '数量(重量)', key: 'weight', width: 120 },
{ label: '条码', key: 'bar_code', width: 260 },
{ label: '仓位', key: 'position', width: 110 },
{ label: '序号', key: 'seq', width: 90 },
{ label: '卷号', key: 'roll_no', width: 110 },
{ label: '匹数', key: 'roll', width: 100 },
{ label: '数量(重量)', key: 'weight', width: 160 },
{ label: '条码', key: 'bar_code', width: 280 },
{ label: '仓位', key: 'position', width: 140 },
];
/** 审核状态变更操作配置(apiKey 对应 gfmOtherDeliveryOrder 下的方法名) */
@@ -61,6 +61,19 @@ export const STATUS_ACTION_CONFIG = {
unapprove: { status: AUDIT_STATUS.PENDING, msg: '确认消审该单据?', apiKey: 'statusWait' },
};
/** 审核 / 消审 / 作废成功后播放的语音文案 */
export const STATUS_ACTION_VOICE = {
approve: '审核成功',
unapprove: '消审成功',
void: '作废成功',
};
/** 将接口状态统一为数字,避免字符串导致按钮判断失效 */
export function toAuditStatus(status) {
const n = Number(status);
return Number.isFinite(n) ? n : DRAFT_AUDIT_STATUS;
}
// 出仓类型:当前后端仅提供「坯布其他出货单」一种类型的接口
export const BILL_TYPES = [
{ value: 'other', label: '坯布其他出货单' },
@@ -69,8 +82,8 @@ export const BILL_TYPES = [
/** 列表分页拉取每页条数 */
export const LIST_PAGE_SIZE = 100;
/** 往来单位类型:染厂(染厂下拉筛选) */
export const BUSINESS_UNIT_TYPE_DYE_FACTORY = 12;
/** 往来单位类型:染厂(接收单位下拉筛选) */
export const BUSINESS_UNIT_TYPE_DYEING_FACTORY = 12;
export function getStatusOptions() {
return Object.keys(AUDIT_STATUS_MAP).map((value) => ({
@@ -119,12 +132,14 @@ export function getFineCodeDisplayWeight(fineCode) {
*/
export function normalizeOrder(order) {
if (!order) return null;
const itemData = groupItemData((order.item_data || []).map((item) => normalizeItem(item)));
const normalizedItems = (order.item_data || []).map((item) => normalizeItem(item));
const itemData = groupItemData(normalizedItems);
const auditStatus = toAuditStatus(order.audit_status);
return {
id: order.id,
order_no: order.order_no || '',
audit_status: order.audit_status,
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[order.audit_status] || '',
audit_status: auditStatus,
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[auditStatus] || '',
// 表头
sale_system_id: order.sale_system_id || '',
sale_system_name: order.sale_system_name || '',
@@ -143,26 +158,59 @@ export function normalizeOrder(order) {
total_roll: formatRoll(order.total_roll),
total_weight: formatWeightKg(order.total_weight),
item_data: itemData,
summary_rows: buildSummaryRows(normalizedItems),
_raw: order,
};
}
/** 扫码详情区表格列 */
export const SCAN_DETAIL_TABLE_COLUMNS = [
{ label: '坯布编号', key: 'grey_fabric_code', width: 140 },
{ label: '坯布名称', key: 'grey_fabric_name', width: 140 },
{ label: '纱批', key: 'yarn_batch', width: 120 },
{ label: '机号', key: 'machine_number', width: 100 },
{ label: '条数', key: 'roll', width: 80 },
{ label: '重量', key: 'weight', width: 100 },
/** 扫码区下方汇总表列(与出仓明细表一致,可横向滑动) */
export const SUMMARY_TABLE_COLUMNS = [
{ label: '坯布编号', key: 'grey_fabric_code', width: 200 },
{ label: '坯布名称', key: 'grey_fabric_name', width: 240 },
{ label: '纱批', key: 'yarn_batch', width: 180 },
{ label: '机台号', key: 'machine_number', width: 160 },
{ label: '条数', key: 'roll', width: 140 },
{ label: '重量', key: 'weight', width: 160 },
];
/** 扫码详情区可勾选锁定维度(对应 PDAScanGfmOtherDeliveryOrderParam 的 *_lock;勾选后参与表格分组并随扫码请求传给后端) */
/** 汇总行归类:坯布编号 + 名称 + 纱批 + 机台号 */
export function getSummaryGroupKey(item) {
return [
item.grey_fabric_code || '',
item.grey_fabric_name || '',
item.yarn_batch || '',
item.machine_number || '',
].join('|');
}
/** 按坯布、纱批、机台号汇总条数和重量,供扫码区表格展示 */
export function buildSummaryRows(items) {
const grouped = new Map();
(items || []).forEach((item) => {
const groupKey = getSummaryGroupKey(item);
const existing = grouped.get(groupKey);
if (!existing) {
grouped.set(groupKey, {
...item,
group_key: groupKey,
fine_codes: [...(item.fine_codes || [])],
});
return;
}
existing.fine_codes.push(...(item.fine_codes || []));
existing.roll = Number((Number(existing.roll || 0) + Number(item.roll || 0)).toFixed(2));
existing.weight = Number((Number(existing.weight || 0) + Number(item.weight || 0)).toFixed(2));
});
return Array.from(grouped.values());
}
/** 扫码详情区汇总维度(勾选后随扫码请求把对应 lock 字段传给后端) */
export const SCAN_GROUP_OPTIONS = [
{ key: 'produce_order_no', label: '合同' },
{ key: 'grey_fabric_code', label: '布编' },
{ key: 'yarn_batch', label: '纱批' },
{ key: 'machine_number', label: '机号' },
{ key: 'volume_number', label: '布号' },
{ key: 'grey_fabric_level_name', label: '等级' },
];
@@ -175,32 +223,6 @@ export const SCAN_MERGE_FIELD_MAP = {
grey_fabric_level_name: 'grey_fabric_level_id_lock',
};
/** 扫码锁定维度不匹配时的语音文案(按匹配优先级排列) */
const SCAN_MISMATCH_VOICE_RULES = [
{ patterns: ['机台', '机号', 'machine_number'], voice: '机台不同' },
{ patterns: ['纱批', 'yarn_batch'], voice: '纱批不同' },
{ patterns: ['合同号', '合同', '生产通知单', 'produce_order'], voice: '合同号不同' },
{ patterns: ['布编', 'grey_fabric_code'], voice: '布编不同' },
{ patterns: ['等级', 'grey_fabric_level', 'level'], voice: '等级不同' },
];
/**
* 根据后端错误信息解析锁定维度不匹配的播报文案
* @param {string} message
* @returns {string} 如「机台不同」;无法识别则返回空串
*/
export function resolveScanMismatchVoice(message) {
const msg = String(message || '');
if (!msg) return '';
for (let i = 0; i < SCAN_MISMATCH_VOICE_RULES.length; i++) {
const rule = SCAN_MISMATCH_VOICE_RULES[i];
if (rule.patterns.some((p) => msg.indexOf(p) !== -1)) {
return rule.voice;
}
}
return '';
}
/** 构建扫码新增/删除请求参数(勾选锁定维度时附带当前详情区字段值) */
export function buildScanUpdateParams({ id, scanCode, scanType, groupKeys = [], detail = {} }) {
const params = {
@@ -325,56 +347,6 @@ export function buildScanDetailFromContext(context, order) {
};
}
function aggregateScanTableRows(rows, keys) {
const map = new Map();
rows.forEach((row) => {
const groupId = keys.map((k) => row[k] || '').join('|');
const existing = map.get(groupId);
if (!existing) {
map.set(groupId, { ...row, roll: 0, raw_weight: 0 });
}
const agg = map.get(groupId);
agg.roll = Number((agg.roll + Number(row.roll || 0)).toFixed(2));
agg.raw_weight = Number(agg.raw_weight || 0) + Number(row.raw_weight || 0);
});
return Array.from(map.values()).map((row) => ({
...row,
weight: formatWeightKg(row.raw_weight),
}));
}
/** 构建扫码详情区汇总表格数据 */
export function buildScanDetailTableRows(itemData, groupKeys = []) {
const rows = [];
(itemData || []).forEach((item) => {
(item.fine_codes || []).forEach((fc) => {
rows.push({
customer_name: item.customer_name || '',
produce_order_no: item.produce_order_no || item.contract_no || '',
grey_fabric_code: item.grey_fabric_code || '',
grey_fabric_name: item.grey_fabric_name || '',
yarn_batch: item.yarn_batch || '',
machine_number: item.machine_number || '',
volume_number: fc.roll_no || fc.fabric_piece_code || '',
grey_fabric_level_name: item.grey_fabric_level_name || '',
roll: fc.roll || 0,
raw_weight: fc.raw_weight != null ? fc.raw_weight : 0,
});
});
});
if (!rows.length) return [];
const keys = (groupKeys || []).filter(Boolean);
if (!keys.length) {
return aggregateScanTableRows(rows, ['grey_fabric_code', 'grey_fabric_name', 'yarn_batch', 'machine_number']);
}
return aggregateScanTableRows(rows, keys);
}
export function getScanDetailTableWidth(columns) {
const total = (columns || []).reduce((sum, col) => sum + (col.width || 120), 0);
return `${total}rpx`;
}
export function normalizeItem(item) {
const machineStockRaw = item.machine_stock_roll ?? item.machine_stock ?? item.machine_inventory_roll;
return {
@@ -468,11 +440,13 @@ export function formatDisplayTime(value, format = 'YYYY-MM-DD') {
}
export function canScanAtStatus(status) {
return [AUDIT_STATUS.PENDING, AUDIT_STATUS.REJECTED].includes(status);
const s = toAuditStatus(status);
return s === AUDIT_STATUS.PENDING || s === AUDIT_STATUS.REJECTED;
}
export function isLockedOrderStatus(status) {
return [AUDIT_STATUS.APPROVED, AUDIT_STATUS.VOIDED].includes(status);
const s = toAuditStatus(status);
return s === AUDIT_STATUS.APPROVED || s === AUDIT_STATUS.VOIDED;
}
/** 分页拉取全部列表(直至末页) */
@@ -487,9 +461,14 @@ export function fetchAllOrderList(listFn, params = {}, pageSize = LIST_PAGE_SIZE
return loadPage(1, []);
}
/** 新增/编辑页底部:审核、作废 */
/** 新增/编辑页底部:审核、作废 / 已审核时消审 */
export function getFormStatusActionButtons(headerSaved, orderId, status) {
if (!headerSaved || !orderId || !canScanAtStatus(status)) return [];
if (!headerSaved || !orderId) return [];
const s = toAuditStatus(status);
if (s === AUDIT_STATUS.APPROVED) {
return [{ label: '消审', action: 'unapprove' }];
}
if (!canScanAtStatus(s)) return [];
return [
{ label: '审核', action: 'approve' },
{ label: '作废', action: 'void' },
@@ -498,14 +477,15 @@ export function getFormStatusActionButtons(headerSaved, orderId, status) {
/** 查看页底部:编辑、审核、作废 / 消审 */
export function getViewStatusActionButtons(status) {
if (status === AUDIT_STATUS.PENDING || status === AUDIT_STATUS.REJECTED) {
const s = toAuditStatus(status);
if (s === AUDIT_STATUS.PENDING || s === AUDIT_STATUS.REJECTED) {
return [
{ label: '编辑', action: 'edit' },
{ label: '审核', action: 'approve' },
{ label: '作废', action: 'void' },
];
}
if (status === AUDIT_STATUS.APPROVED) {
if (s === AUDIT_STATUS.APPROVED) {
return [{ label: '消审', action: 'unapprove' }];
}
return [];
@@ -520,12 +500,14 @@ export function orderToFormFields(order) {
delivery_time: order.delivery_time,
remark: order.remark,
item_data: order.item_data,
summary_rows: order.summary_rows || [],
};
}
export function getFineCodeTableColumns(readonly) {
const cols = [...FINE_CODE_TABLE_COLUMNS];
if (!readonly) cols.push({ label: '操作', key: 'action', width: 90 });
// 操作列放前面,避免 PDA 小屏横向滚动后才看到删除
if (!readonly) cols.splice(1, 0, { label: '操作', key: 'action', width: 160 });
return cols;
}
@@ -551,7 +533,7 @@ export function getFineCodeTableWidth(columns) {
* @param {Vue} vm 页面实例,需有 $u.api 与 showError
* @param {{ orderId: number, action: string, onSuccess?: Function }} options
*/
export function confirmOrderStatusAction(vm, { orderId, action, onSuccess }) {
export function confirmOrderStatusAction(vm, { orderId, action, onSuccess, onCancel }) {
const cfg = STATUS_ACTION_CONFIG[action];
if (!cfg || !orderId) return;
const api = vm.$u.api.gfmOtherDeliveryOrder;
@@ -561,7 +543,10 @@ export function confirmOrderStatusAction(vm, { orderId, action, onSuccess }) {
title: '提示',
content: cfg.msg,
success: (res) => {
if (!res.confirm) return;
if (!res.confirm) {
if (typeof onCancel === 'function') onCancel();
return;
}
uni.showLoading({ title: '处理中...' });
requestFn(buildStatusParam(orderId, cfg.status))
.then(() => {
-375
View File
@@ -1,375 +0,0 @@
/**
* 加工进仓单常量与数据工具
*
* 真实接口请求统一注册在 src/common/http.api.js 的 vm.$u.api.fpmProcessInOrder 下。
*/
import dayjs from 'dayjs';
export const AUDIT_STATUS = {
PENDING: 1,
APPROVED: 2,
REJECTED: 3,
VOIDED: 4,
};
export const DRAFT_AUDIT_STATUS = 0;
export const DRAFT_AUDIT_STATUS_NAME = '待保存';
export const AUDIT_STATUS_MAP = {
1: '待审核',
2: '已审核',
3: '已驳回',
4: '已作废',
};
/** 操作类型:1录入 3删除 */
export const ARRANGE_TYPE = {
IN: 1,
DEL: 3,
};
/** 入仓类型:加工进仓单 */
export const IN_ORDER_TYPE_PROCESS = 5;
/** 往来单位类型:加工单位 */
export const BUSINESS_UNIT_TYPE_PROCESS = 12;
/** 成品物理仓类型 */
export const WAREHOUSE_TYPE_FINISHED = 103;
/** 默认仓库名称 */
export const DEFAULT_WAREHOUSE_NAME = '成品仓';
export const LIST_PAGE_SIZE = 100;
export const STATUS_ACTION_CONFIG = {
approve: { status: AUDIT_STATUS.APPROVED, msg: '确认审核该单据?', apiKey: 'statusPass' },
void: { status: AUDIT_STATUS.VOIDED, msg: '确认作废该单据?', apiKey: 'statusCancel' },
unapprove: { status: AUDIT_STATUS.PENDING, msg: '确认消审该单据?', apiKey: 'statusWait' },
};
export function getStatusOptions() {
return Object.keys(AUDIT_STATUS_MAP).map((value) => ({
value,
label: AUDIT_STATUS_MAP[value],
}));
}
export function mapToSelectOptions(data) {
const list = Array.isArray(data) ? data : (data && (data.list || data.items || data.records)) || [];
return list.map((item) => ({
value: item.id,
label: item.name || item.label || item.code || String(item.id),
}));
}
/** 匹数:后端 ×100 存储 */
export function formatRoll(value) {
const n = Number(value || 0) / 100;
return Number.isInteger(n) ? n : Number(n.toFixed(2));
}
/** 数量(公斤):后端 ×10000 存储 */
export function formatWeightKg(value) {
const n = Number(value || 0) / 10000;
return Number(n.toFixed(2));
}
export function normalizeOrder(order) {
if (!order) return null;
return {
id: order.id,
order_no: order.order_no || '',
audit_status: order.audit_status,
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[order.audit_status] || '',
process_unit_id: order.process_unit_id || '',
process_name: order.process_name || '',
warehouse_id: order.warehouse_id || '',
warehouse_name: order.warehouse_name || '',
sale_system_id: order.sale_system_id || '',
sale_system_name: order.sale_system_name || '',
in_order_type: order.in_order_type || IN_ORDER_TYPE_PROCESS,
in_order_type_name: order.in_order_type_name || '加工进仓单',
remark: order.remark || '',
warehouse_in_time: (order.warehouse_in_time || '').slice(0, 10),
creator_name: order.creator_name || '',
create_time: order.create_time || '',
auditor_name: order.auditor_name || '',
audit_time: order.audit_time || '',
total_roll: formatRoll(order.total_roll),
total_weight: formatWeightKg(order.total_weight),
total_length: formatRoll(order.total_length),
item_data: (order.item_data || []).map(normalizeItem),
_raw: order,
};
}
export function normalizeFineCode(fc) {
if (!fc) return null;
const weightRaw = fc.base_unit_weight != null
? fc.base_unit_weight
: (fc.settle_weight != null ? fc.settle_weight : fc.weight);
return {
id: fc.id,
volume_number: fc.volume_number != null && fc.volume_number !== '' ? String(fc.volume_number) : '',
roll: formatRoll(fc.roll),
weight: formatWeightKg(weightRaw),
bar_code: fc.bar_code || '',
qr_code: fc.qr_code || '',
dye_factory_dyelot_number: fc.dye_factory_dyelot_number || fc.dyelot_number || '',
warehouse_bin_name: fc.warehouse_bin_name || '',
shelf_no: fc.shelf_no || '',
scan_code: fc.qr_code || fc.bar_code || '',
};
}
export function normalizeItem(item) {
return {
id: item.id,
quote_order_no: item.quote_order_no || '',
product_code: item.product_code || '',
product_name: item.product_name || '',
product_color_code: item.product_color_code || '',
product_color_name: item.product_color_name || '',
dye_factory_dyelot_number: item.dye_factory_dyelot_number || '',
dye_factory_color_code: item.dye_factory_color_code || '',
in_roll: formatRoll(item.in_roll),
in_weight: formatWeightKg(item.in_weight),
item_fc_data: (item.item_fc_data || []).map(normalizeFineCode).filter(Boolean),
};
}
/**
* 明细分组:成品编号 → 成品色号 → 细码
*/
export function buildItemGroups(items) {
const productMap = new Map();
(items || []).forEach((item) => {
const productKey = item.product_code || '-';
if (!productMap.has(productKey)) {
productMap.set(productKey, {
group_key: `p:${productKey}`,
product_code: item.product_code || '',
product_name: item.product_name || '',
in_roll: 0,
in_weight: 0,
colors: new Map(),
});
}
const productGroup = productMap.get(productKey);
if (!productGroup.product_name && item.product_name) {
productGroup.product_name = item.product_name;
}
const colorKey = item.product_color_code || item.product_color_name || '-';
if (!productGroup.colors.has(colorKey)) {
productGroup.colors.set(colorKey, {
group_key: `p:${productKey}|c:${colorKey}`,
product_color_code: item.product_color_code || '',
product_color_name: item.product_color_name || '',
quote_order_no: item.quote_order_no || '',
dye_factory_dyelot_number: item.dye_factory_dyelot_number || '',
in_roll: 0,
in_weight: 0,
fine_codes: [],
});
}
const colorGroup = productGroup.colors.get(colorKey);
productGroup.in_roll = Number((productGroup.in_roll + Number(item.in_roll || 0)).toFixed(2));
productGroup.in_weight = Number((productGroup.in_weight + Number(item.in_weight || 0)).toFixed(2));
colorGroup.in_roll = Number((colorGroup.in_roll + Number(item.in_roll || 0)).toFixed(2));
colorGroup.in_weight = Number((colorGroup.in_weight + Number(item.in_weight || 0)).toFixed(2));
if (item.quote_order_no) colorGroup.quote_order_no = item.quote_order_no;
if (item.dye_factory_dyelot_number) {
colorGroup.dye_factory_dyelot_number = item.dye_factory_dyelot_number;
}
if (!colorGroup.product_color_name && item.product_color_name) {
colorGroup.product_color_name = item.product_color_name;
}
colorGroup.fine_codes.push(...(item.item_fc_data || []));
});
return Array.from(productMap.values()).map((product) => ({
group_key: product.group_key,
product_code: product.product_code,
product_name: product.product_name,
in_roll: product.in_roll,
in_weight: product.in_weight,
colors: Array.from(product.colors.values()),
}));
}
export function getEmptyScanDetail() {
return {
quote_order_no: '',
dyelot_number: '',
volume_number: '',
product_code: '',
product_color_code: '',
order_roll: 0,
item_roll: 0,
order_weight: 0,
item_weight: 0,
};
}
/** 从扫码接口返回构建详情区(匹数÷100,数量÷10000) */
export function buildScanDetailFromScanResponse(res) {
if (!res) return getEmptyScanDetail();
return {
quote_order_no: res.quote_order_no || '',
dyelot_number: res.dyelot_number || '',
volume_number: res.volume_number != null && res.volume_number !== '' ? String(res.volume_number) : '',
product_code: res.product_code || '',
product_color_code: res.product_color_code || '',
order_roll: formatRoll(res.order_roll != null ? res.order_roll : res.total_roll),
item_roll: formatRoll(res.item_roll != null ? res.item_roll : res.roll),
order_weight: formatWeightKg(res.order_weight != null ? res.order_weight : res.total_weight),
item_weight: formatWeightKg(res.item_weight != null ? res.item_weight : res.weight),
};
}
/** 构建扫码请求参数 */
export function buildScanUpdateParams({ id, scanCode, arrangeType, warehouseBinId }) {
const code = (scanCode || '').trim();
const params = {
id: Number(id),
arrange_type: arrangeType,
};
if (warehouseBinId) {
params.warehouse_bin_id = Number(warehouseBinId);
}
// 长度大于25走二维码,否则走条码
if (code.length > 25) {
params.qr_code = code;
} else {
params.bar_code = code;
}
return params;
}
export function buildStatusParam(id) {
return { id: String(id) };
}
export function formatDisplayTime(value, format = 'YYYY-MM-DD') {
if (!value) return '';
const parsed = dayjs(value);
return parsed.isValid() ? parsed.format(format) : String(value).slice(0, 10);
}
export function canScanAtStatus(status) {
return [AUDIT_STATUS.PENDING, AUDIT_STATUS.REJECTED].includes(status);
}
export function isLockedOrderStatus(status) {
return [AUDIT_STATUS.APPROVED, AUDIT_STATUS.VOIDED].includes(status);
}
export function fetchAllOrderList(listFn, params = {}, pageSize = LIST_PAGE_SIZE) {
const pickBatch = (res) => {
if (Array.isArray(res)) return res;
if (!res || typeof res !== 'object') return [];
return res.list || res.records || res.items || [];
};
const loadPage = (page, acc) => listFn({ ...params, page, size: pageSize })
.then((res) => {
const batch = pickBatch(res);
if (!batch.length) return acc;
// 一次返回超过 pageSize:后端忽略分页,视为全量,避免死循环翻页
if (batch.length > pageSize) return acc.concat(batch);
// 翻页后与首页首条相同:后端忽略 page,避免死循环
if (
page > 1
&& acc.length
&& batch[0]
&& acc[0]
&& String(batch[0].id) === String(acc[0].id)
) {
return acc;
}
const merged = acc.concat(batch);
const total = !Array.isArray(res) && res != null ? Number(res.total) : NaN;
if (!Number.isNaN(total) && merged.length >= total) return merged;
if (batch.length < pageSize) return merged;
return loadPage(page + 1, merged);
});
return loadPage(1, []);
}
export function getFormStatusActionButtons(headerSaved, orderId, status) {
if (!headerSaved || !orderId || !canScanAtStatus(status)) return [];
return [
{ label: '审核', action: 'approve' },
{ label: '作废', action: 'void' },
];
}
export function getViewStatusActionButtons(status) {
if (status === AUDIT_STATUS.PENDING || status === AUDIT_STATUS.REJECTED) {
return [
{ label: '编辑', action: 'edit' },
{ label: '审核', action: 'approve' },
{ label: '作废', action: 'void' },
];
}
if (status === AUDIT_STATUS.APPROVED) {
return [{ label: '消审', action: 'unapprove' }];
}
return [];
}
export function orderToFormFields(order) {
return {
order_no: order.order_no,
process_unit_id: order.process_unit_id,
process_name: order.process_name,
warehouse_id: order.warehouse_id,
warehouse_name: order.warehouse_name,
remark: order.remark,
item_data: order.item_data,
};
}
/** 从仓库下拉中选出默认成品仓 */
export function pickDefaultWarehouse(options, loginWarehouseId, loginWarehouseName) {
const list = options || [];
const byName = list.find((item) => item.label === DEFAULT_WAREHOUSE_NAME);
if (byName) return byName;
if (loginWarehouseId) {
const byId = list.find((item) => String(item.value) === String(loginWarehouseId));
if (byId) return byId;
if (loginWarehouseName) {
return { value: loginWarehouseId, label: loginWarehouseName };
}
}
return list[0] || null;
}
/**
* 确认并执行审核状态变更
*/
export function confirmOrderStatusAction(vm, { orderId, action, onSuccess }) {
const cfg = STATUS_ACTION_CONFIG[action];
if (!cfg || !orderId) return;
const api = vm.$u.api.fpmProcessInOrder;
const requestFn = api[cfg.apiKey];
if (typeof requestFn !== 'function') return;
uni.showModal({
title: '提示',
content: cfg.msg,
success: (res) => {
if (!res.confirm) return;
uni.showLoading({ title: '处理中...' });
requestFn(buildStatusParam(orderId))
.then(() => {
if (typeof onSuccess === 'function') return onSuccess();
uni.hideLoading();
})
.catch((e) => {
uni.hideLoading();
if (vm.showError) vm.showError(e.message || '操作失败');
});
},
});
}
-386
View File
@@ -1,386 +0,0 @@
/**
* 加工出仓单常量与数据工具
*
* 真实接口请求统一注册在 src/common/http.api.js 的 vm.$u.api.fpmProcessOutOrder 下。
*/
import dayjs from 'dayjs';
export const AUDIT_STATUS = {
PENDING: 1,
APPROVED: 2,
REJECTED: 3,
VOIDED: 4,
};
export const DRAFT_AUDIT_STATUS = 0;
export const DRAFT_AUDIT_STATUS_NAME = '待保存';
export const AUDIT_STATUS_MAP = {
1: '待审核',
2: '已审核',
3: '已驳回',
4: '已作废',
};
/** 操作类型:1录入 3删除 */
export const ARRANGE_TYPE = {
IN: 1,
DEL: 3,
};
/** 出仓类型:正常加工出仓单 WarehouseGoodOutTypeProcess = 5 */
export const OUT_ORDER_TYPE_PROCESS = 5;
export const OUT_ORDER_TYPE_PROCESS_NAME = '正常加工出仓单';
/** 往来单位类型:加工单位 */
export const BUSINESS_UNIT_TYPE_PROCESS = 12;
/** 成品物理仓类型 */
export const WAREHOUSE_TYPE_FINISHED = 103;
/** 默认仓库名称 */
export const DEFAULT_WAREHOUSE_NAME = '成品仓';
export const LIST_PAGE_SIZE = 100;
export const STATUS_ACTION_CONFIG = {
approve: { status: AUDIT_STATUS.APPROVED, msg: '确认审核该单据?', apiKey: 'statusPass' },
void: { status: AUDIT_STATUS.VOIDED, msg: '确认作废该单据?', apiKey: 'statusCancel' },
unapprove: { status: AUDIT_STATUS.PENDING, msg: '确认消审该单据?', apiKey: 'statusWait' },
};
export function getStatusOptions() {
return Object.keys(AUDIT_STATUS_MAP).map((value) => ({
value,
label: AUDIT_STATUS_MAP[value],
}));
}
export function mapToSelectOptions(data) {
const list = Array.isArray(data) ? data : (data && (data.list || data.items || data.records)) || [];
return list.map((item) => ({
value: item.id,
label: item.name || item.label || item.code || String(item.id),
}));
}
/** 匹数:后端 ×100 存储 */
export function formatRoll(value) {
const n = Number(value || 0) / 100;
return Number.isInteger(n) ? n : Number(n.toFixed(2));
}
/** 数量(公斤):后端 ×10000 存储 */
export function formatWeightKg(value) {
const n = Number(value || 0) / 10000;
return Number(n.toFixed(2));
}
export function normalizeOrder(order) {
if (!order) return null;
return {
id: order.id,
order_no: order.order_no || '',
audit_status: order.audit_status,
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[order.audit_status] || '',
process_unit_id: order.process_unit_id || '',
process_name: order.process_name || '',
warehouse_id: order.warehouse_id || '',
warehouse_name: order.warehouse_name || '',
sale_system_id: order.sale_system_id || '',
sale_system_name: order.sale_system_name || '',
out_order_type: order.out_order_type || OUT_ORDER_TYPE_PROCESS,
out_order_type_name: order.out_order_type_name || OUT_ORDER_TYPE_PROCESS_NAME,
remark: order.remark || '',
warehouse_out_time: (order.warehouse_out_time || '').slice(0, 10),
creator_name: order.creator_name || '',
create_time: order.create_time || '',
auditor_name: order.auditor_name || '',
audit_time: order.audit_time || '',
total_roll: formatRoll(order.total_roll),
total_weight: formatWeightKg(order.total_weight),
total_length: formatRoll(order.total_length),
item_data: (order.item_data || []).map(normalizeItem),
_raw: order,
};
}
export function normalizeFineCode(fc) {
if (!fc) return null;
// 出仓细码数量:优先基本单位公斤,其次结算数量
const weightRaw = fc.base_unit_weight != null
? fc.base_unit_weight
: (fc.settle_weight != null ? fc.settle_weight : fc.weight);
const qrCode = fc.qr_code || '';
const digitalCode = fc.digital_code || '';
const barCode = fc.bar_code || digitalCode || '';
return {
id: fc.id,
volume_number: fc.volume_number != null && fc.volume_number !== '' ? String(fc.volume_number) : '',
roll: formatRoll(fc.roll),
weight: formatWeightKg(weightRaw),
bar_code: barCode,
qr_code: qrCode,
digital_code: digitalCode,
dye_factory_dyelot_number: fc.dye_factory_dyelot_number || fc.dyelot_number || '',
warehouse_bin_name: fc.warehouse_bin_name || '',
shelf_no: fc.shelf_no || '',
// 删除扫码优先二维码
scan_code: qrCode || barCode || digitalCode || '',
};
}
export function normalizeItem(item) {
// 明细数量字段:OpenAPI 为 total_weight / settle_weight(×10000),匹数为 out_roll(×100)
const weightRaw = item.total_weight != null
? item.total_weight
: (item.settle_weight != null ? item.settle_weight : item.out_weight);
return {
id: item.id,
quote_order_no: item.quote_order_no || '',
product_code: item.product_code || '',
product_name: item.product_name || '',
product_color_code: item.product_color_code || '',
product_color_name: item.product_color_name || '',
dye_factory_dyelot_number: item.dye_factory_dyelot_number || '',
dye_factory_color_code: item.dye_factory_color_code || '',
out_roll: formatRoll(item.out_roll),
out_weight: formatWeightKg(weightRaw),
item_fc_data: (item.item_fc_data || []).map(normalizeFineCode).filter(Boolean),
};
}
/**
* 明细分组:成品编号 → 成品色号 → 细码
*/
export function buildItemGroups(items) {
const productMap = new Map();
(items || []).forEach((item) => {
const productKey = item.product_code || '-';
if (!productMap.has(productKey)) {
productMap.set(productKey, {
group_key: `p:${productKey}`,
product_code: item.product_code || '',
product_name: item.product_name || '',
out_roll: 0,
out_weight: 0,
colors: new Map(),
});
}
const productGroup = productMap.get(productKey);
if (!productGroup.product_name && item.product_name) {
productGroup.product_name = item.product_name;
}
const colorKey = item.product_color_code || item.product_color_name || '-';
if (!productGroup.colors.has(colorKey)) {
productGroup.colors.set(colorKey, {
group_key: `p:${productKey}|c:${colorKey}`,
product_color_code: item.product_color_code || '',
product_color_name: item.product_color_name || '',
quote_order_no: item.quote_order_no || '',
dye_factory_dyelot_number: item.dye_factory_dyelot_number || '',
out_roll: 0,
out_weight: 0,
fine_codes: [],
});
}
const colorGroup = productGroup.colors.get(colorKey);
productGroup.out_roll = Number((productGroup.out_roll + Number(item.out_roll || 0)).toFixed(2));
productGroup.out_weight = Number((productGroup.out_weight + Number(item.out_weight || 0)).toFixed(2));
colorGroup.out_roll = Number((colorGroup.out_roll + Number(item.out_roll || 0)).toFixed(2));
colorGroup.out_weight = Number((colorGroup.out_weight + Number(item.out_weight || 0)).toFixed(2));
if (item.quote_order_no) colorGroup.quote_order_no = item.quote_order_no;
if (item.dye_factory_dyelot_number) {
colorGroup.dye_factory_dyelot_number = item.dye_factory_dyelot_number;
}
if (!colorGroup.product_color_name && item.product_color_name) {
colorGroup.product_color_name = item.product_color_name;
}
colorGroup.fine_codes.push(...(item.item_fc_data || []));
});
return Array.from(productMap.values()).map((product) => ({
group_key: product.group_key,
product_code: product.product_code,
product_name: product.product_name,
out_roll: product.out_roll,
out_weight: product.out_weight,
colors: Array.from(product.colors.values()),
}));
}
export function getEmptyScanDetail() {
return {
quote_order_no: '',
dyelot_number: '',
volume_number: '',
product_code: '',
product_color_code: '',
order_roll: 0,
item_roll: 0,
order_weight: 0,
item_weight: 0,
};
}
/** 从扫码接口返回构建详情区(匹数÷100,数量÷10000) */
export function buildScanDetailFromScanResponse(res) {
if (!res) return getEmptyScanDetail();
return {
quote_order_no: res.quote_order_no || '',
dyelot_number: res.dyelot_number || '',
volume_number: res.volume_number != null && res.volume_number !== '' ? String(res.volume_number) : '',
product_code: res.product_code || '',
product_color_code: res.product_color_code || '',
order_roll: formatRoll(res.order_roll != null ? res.order_roll : res.total_roll),
item_roll: formatRoll(res.item_roll != null ? res.item_roll : res.roll),
order_weight: formatWeightKg(res.order_weight != null ? res.order_weight : res.total_weight),
item_weight: formatWeightKg(res.item_weight != null ? res.item_weight : res.weight),
};
}
/** 构建扫码请求参数 */
export function buildScanUpdateParams({ id, scanCode, arrangeType, warehouseBinId }) {
const code = (scanCode || '').trim();
const params = {
id: Number(id),
arrange_type: arrangeType,
};
if (warehouseBinId) {
params.warehouse_bin_id = Number(warehouseBinId);
}
// 长度大于25走二维码,否则走条码
if (code.length > 25) {
params.qr_code = code;
} else {
params.bar_code = code;
}
return params;
}
export function buildStatusParam(id) {
return { id: String(id) };
}
export function formatDisplayTime(value, format = 'YYYY-MM-DD') {
if (!value) return '';
const parsed = dayjs(value);
return parsed.isValid() ? parsed.format(format) : String(value).slice(0, 10);
}
export function canScanAtStatus(status) {
return [AUDIT_STATUS.PENDING, AUDIT_STATUS.REJECTED].includes(status);
}
export function isLockedOrderStatus(status) {
return [AUDIT_STATUS.APPROVED, AUDIT_STATUS.VOIDED].includes(status);
}
export function fetchAllOrderList(listFn, params = {}, pageSize = LIST_PAGE_SIZE) {
const pickBatch = (res) => {
if (Array.isArray(res)) return res;
if (!res || typeof res !== 'object') return [];
return res.list || res.records || res.items || [];
};
const loadPage = (page, acc) => listFn({ ...params, page, size: pageSize })
.then((res) => {
const batch = pickBatch(res);
if (!batch.length) return acc;
// 一次返回超过 pageSize:后端忽略分页,视为全量,避免死循环翻页
if (batch.length > pageSize) return acc.concat(batch);
// 翻页后与首页首条相同:后端忽略 page,避免死循环
if (
page > 1
&& acc.length
&& batch[0]
&& acc[0]
&& String(batch[0].id) === String(acc[0].id)
) {
return acc;
}
const merged = acc.concat(batch);
const total = !Array.isArray(res) && res != null ? Number(res.total) : NaN;
if (!Number.isNaN(total) && merged.length >= total) return merged;
if (batch.length < pageSize) return merged;
return loadPage(page + 1, merged);
});
return loadPage(1, []);
}
export function getFormStatusActionButtons(headerSaved, orderId, status) {
if (!headerSaved || !orderId || !canScanAtStatus(status)) return [];
return [
{ label: '审核', action: 'approve' },
{ label: '作废', action: 'void' },
];
}
export function getViewStatusActionButtons(status) {
if (status === AUDIT_STATUS.PENDING || status === AUDIT_STATUS.REJECTED) {
return [
{ label: '编辑', action: 'edit' },
{ label: '审核', action: 'approve' },
{ label: '作废', action: 'void' },
];
}
if (status === AUDIT_STATUS.APPROVED) {
return [{ label: '消审', action: 'unapprove' }];
}
return [];
}
export function orderToFormFields(order) {
return {
order_no: order.order_no,
process_unit_id: order.process_unit_id,
process_name: order.process_name,
warehouse_id: order.warehouse_id,
warehouse_name: order.warehouse_name,
remark: order.remark,
item_data: order.item_data,
};
}
/** 从仓库下拉中选出默认成品仓 */
export function pickDefaultWarehouse(options, loginWarehouseId, loginWarehouseName) {
const list = options || [];
const byName = list.find((item) => item.label === DEFAULT_WAREHOUSE_NAME);
if (byName) return byName;
if (loginWarehouseId) {
const byId = list.find((item) => String(item.value) === String(loginWarehouseId));
if (byId) return byId;
if (loginWarehouseName) {
return { value: loginWarehouseId, label: loginWarehouseName };
}
}
return list[0] || null;
}
/**
* 确认并执行审核状态变更
*/
export function confirmOrderStatusAction(vm, { orderId, action, onSuccess }) {
const cfg = STATUS_ACTION_CONFIG[action];
if (!cfg || !orderId) return;
const api = vm.$u.api.fpmProcessOutOrder;
const requestFn = api[cfg.apiKey];
if (typeof requestFn !== 'function') return;
uni.showModal({
title: '提示',
content: cfg.msg,
success: (res) => {
if (!res.confirm) return;
uni.showLoading({ title: '处理中...' });
requestFn(buildStatusParam(orderId))
.then(() => {
if (typeof onSuccess === 'function') return onSuccess();
uni.hideLoading();
})
.catch((e) => {
uni.hideLoading();
if (vm.showError) vm.showError(e.message || '操作失败');
});
},
});
}
-94
View File
@@ -1,94 +0,0 @@
/**
* Android PDA 语音播报(系统 TextToSpeech)
* App 端可用;非 App 环境静默跳过。
*/
let ttsInstance = null;
let ttsReady = false;
let ttsInitStarted = false;
const pendingQueue = [];
function flushPending() {
if (!ttsReady || !ttsInstance) return;
while (pendingQueue.length) {
const text = pendingQueue.shift();
doSpeak(text);
}
}
function doSpeak(text) {
if (!ttsInstance || !text) return;
try {
const TextToSpeech = plus.android.importClass('android.speech.tts.TextToSpeech');
// QUEUE_FLUSH:打断当前播报,立即播新内容
ttsInstance.speak(String(text), TextToSpeech.QUEUE_FLUSH, null);
} catch (e) {
console.warn('[tts] speak failed', e);
}
}
export function initTts() {
// #ifdef APP-PLUS
if (ttsInitStarted || typeof plus === 'undefined') return;
if (plus.os.name !== 'Android') return;
ttsInitStarted = true;
try {
const main = plus.android.runtimeMainActivity();
const TextToSpeech = plus.android.importClass('android.speech.tts.TextToSpeech');
const Locale = plus.android.importClass('java.util.Locale');
ttsInstance = new TextToSpeech(
main,
plus.android.implements('android.speech.tts.TextToSpeech$OnInitListener', {
onInit(status) {
if (status === TextToSpeech.SUCCESS) {
try {
ttsInstance.setLanguage(Locale.CHINA);
ttsInstance.setSpeechRate(1.0);
} catch (e) {
console.warn('[tts] setLanguage failed', e);
}
ttsReady = true;
flushPending();
} else {
console.warn('[tts] init status not SUCCESS', status);
ttsReady = false;
}
},
})
);
} catch (e) {
console.warn('[tts] init failed', e);
ttsInitStarted = false;
}
// #endif
}
/**
* 播报中文文本;TTS 未就绪时先入队,初始化成功后补播。
* @param {string} text
*/
export function speak(text) {
const content = (text || '').trim();
if (!content) return;
// #ifdef APP-PLUS
if (typeof plus === 'undefined' || plus.os.name !== 'Android') return;
if (!ttsInitStarted) initTts();
if (ttsReady && ttsInstance) {
doSpeak(content);
return;
}
pendingQueue.push(content);
// 避免异常堆积
if (pendingQueue.length > 5) pendingQueue.splice(0, pendingQueue.length - 5);
// #endif
}
export function stopSpeak() {
// #ifdef APP-PLUS
if (!ttsInstance) return;
try {
ttsInstance.stop();
} catch (e) {
/* ignore */
}
// #endif
}
+56
View File
@@ -23,6 +23,9 @@ export function request(options) {
url: apiurl + options.url,
method: options.method || 'GET',
data: options.data,
// #ifdef APP-PLUS
sslVerify: false,
// #endif
header: {
'Platform': 2,
'Authorization': token,
@@ -363,6 +366,58 @@ function playErrorAudio() {
errorAudio.play();
}
// 固定中文提示语音
const SPEAK_AUDIO = {
'扫码出仓成功': '/static/audio/scan_out_ok.mp3',
'删除成功': '/static/audio/delete_ok.mp3',
'提交成功': '/static/audio/submit_ok.mp3',
'审核成功': '/static/audio/audit_ok.mp3',
'作废成功': '/static/audio/void_ok.mp3',
'扫码成功': '/static/audio/scan_ok.wav',
'进仓成功': '/static/audio/in_ok.wav',
};
const speakAudioMap = {};
function stopOtherSpeak(exceptText) {
Object.keys(speakAudioMap).forEach((key) => {
if (key === exceptText || !speakAudioMap[key]) return;
try {
speakAudioMap[key].stop();
} catch (e) {}
});
if (successAudio) {
try {
successAudio.stop();
} catch (e) {}
}
}
function playSpeak(text) {
const src = SPEAK_AUDIO[text];
if (!src) return;
stopOtherSpeak(text);
const prev = speakAudioMap[text];
if (prev) {
try {
prev.stop();
prev.destroy();
} catch (e) {}
speakAudioMap[text] = undefined;
}
const audio = uni.createInnerAudioContext();
audio.autoplay = true;
audio.src = src;
audio.onError((res) => {
console.log('语音播放失败', text, res && res.errMsg);
try {
audio.destroy();
} catch (e) {}
if (speakAudioMap[text] === audio) speakAudioMap[text] = undefined;
});
speakAudioMap[text] = audio;
}
export default {
get apiurl() {
@@ -375,4 +430,5 @@ export default {
parGetData,
playSuccessAudio,
playErrorAudio,
playSpeak,
};
@@ -13,7 +13,7 @@
<view>{{ item.bill_type_name }}</view>
</view>
<view class="cardRow">
<view>染厂:</view>
<view>接收单位:</view>
<view>{{ item.business_unit_name || '-' }}</view>
</view>
<view class="cardRow">
@@ -1,67 +0,0 @@
<template>
<view class="myCard">
<view class="cardTopName">
<text>{{ item.order_no }}</text>
<text class="statusTag" :class="'status-' + item.audit_status">{{ item.audit_status_name }}</text>
</view>
<view class="cardRow">
<view>加工单位:</view>
<view>{{ item.process_name || '-' }}</view>
</view>
<view class="cardRow">
<view>仓库名称:</view>
<view>{{ item.warehouse_name || '-' }}</view>
</view>
<view class="cardRow">
<view>匹数总计:</view>
<view>{{ item.total_roll != null ? item.total_roll : '-' }}</view>
</view>
<view class="cardRow">
<view>创 建 人:</view>
<view>{{ item.create_user_name }} {{ formatTime(item.create_time, 'YYYY-MM-DD') }}</view>
</view>
<view v-if="item.auditor_name" class="cardRow">
<view>审 核 人:</view>
<view>{{ item.auditor_name }} {{ formatTime(item.audit_date, 'YYYY-MM-DD') }}</view>
</view>
<view v-if="!isDetail && !isSelect" class="lookDetail">
<text>查看详情</text>
<u-icon name="arrow-right" size="36" />
</view>
</view>
</template>
<script>
import { formatDisplayTime } from '@/common/storeGoodsProcessIn';
export default {
props: {
item: { type: Object, default: () => ({}) },
index: { type: Number, default: 0 },
isSelect: { type: Boolean, default: false },
isDetail: { type: Boolean, default: false },
},
methods: {
formatTime: formatDisplayTime,
},
};
</script>
<style scoped>
.cardTopName {
display: flex;
align-items: center;
justify-content: space-between;
}
.statusTag {
font-size: 24rpx;
padding: 4rpx 12rpx;
border-radius: 6rpx;
font-weight: normal;
}
.status-0 { background: #f0f0f0; color: #666; }
.status-1 { background: #fff7e6; color: #fa8c16; }
.status-2 { background: #f6ffed; color: #52c41a; }
.status-3 { background: #fff1f0; color: #f5222d; }
.status-4 { background: #f5f5f5; color: #999; }
</style>
@@ -1,67 +0,0 @@
<template>
<view class="myCard">
<view class="cardTopName">
<text>{{ item.order_no }}</text>
<text class="statusTag" :class="'status-' + item.audit_status">{{ item.audit_status_name }}</text>
</view>
<view class="cardRow">
<view>加工单位:</view>
<view>{{ item.process_name || '-' }}</view>
</view>
<view class="cardRow">
<view>仓库名称:</view>
<view>{{ item.warehouse_name || '-' }}</view>
</view>
<view class="cardRow">
<view>匹数总计:</view>
<view>{{ item.total_roll != null ? item.total_roll : '-' }}</view>
</view>
<view class="cardRow">
<view>创 建 人:</view>
<view>{{ item.create_user_name }} {{ formatTime(item.create_time, 'YYYY-MM-DD') }}</view>
</view>
<view v-if="item.auditor_name" class="cardRow">
<view>审 核 人:</view>
<view>{{ item.auditor_name }} {{ formatTime(item.audit_date, 'YYYY-MM-DD') }}</view>
</view>
<view v-if="!isDetail && !isSelect" class="lookDetail">
<text>查看详情</text>
<u-icon name="arrow-right" size="36" />
</view>
</view>
</template>
<script>
import { formatDisplayTime } from '@/common/storeGoodsProcessOut';
export default {
props: {
item: { type: Object, default: () => ({}) },
index: { type: Number, default: 0 },
isSelect: { type: Boolean, default: false },
isDetail: { type: Boolean, default: false },
},
methods: {
formatTime: formatDisplayTime,
},
};
</script>
<style scoped>
.cardTopName {
display: flex;
align-items: center;
justify-content: space-between;
}
.statusTag {
font-size: 24rpx;
padding: 4rpx 12rpx;
border-radius: 6rpx;
font-weight: normal;
}
.status-0 { background: #f0f0f0; color: #666; }
.status-1 { background: #fff7e6; color: #fa8c16; }
.status-2 { background: #f6ffed; color: #52c41a; }
.status-3 { background: #fff1f0; color: #f5222d; }
.status-4 { background: #f5f5f5; color: #999; }
</style>
+259
View File
@@ -0,0 +1,259 @@
<template>
<view v-show="visible" class="plus-barcode-panel">
<view class="plus-barcode-panel__toolbar">
<text class="plus-barcode-panel__tip">{{ tipText }}</text>
<text class="plus-barcode-panel__close" @click.stop="close">收起</text>
</view>
<!-- #ifdef APP-PLUS -->
<view :id="holderId" class="plus-barcode-panel__holder" />
<!-- #endif -->
<!-- #ifndef APP-PLUS -->
<view class="plus-barcode-panel__fallback">
<text>当前环境不支持半屏扫码,请使用输入框或系统扫码</text>
</view>
<!-- #endif -->
</view>
</template>
<script>
const DEFAULT_FILTERS = [0, 1, 2, 8, 10]; // QR EAN13 EAN8 CODE39 CODE128
let barcodeSeq = 0;
export default {
name: 'PlusBarcodePanel',
props: {
visible: { type: Boolean, default: false },
hintText: { type: String, default: '将条码放入框内,可连续扫' },
scanTimeSpace: { type: Number, default: 1200 },
filters: { type: Array, default: () => DEFAULT_FILTERS.slice() },
},
data() {
barcodeSeq += 1;
return {
holderId: `plusBarcodeHolder_${barcodeSeq}`,
barcodeViewId: `plusBarcodeView_${barcodeSeq}`,
_barcode: null,
_restartTimer: null,
_active: false,
_creating: false,
};
},
computed: {
tipText() {
return this.hintText || '将条码放入框内,可连续扫';
},
},
watch: {
visible(val) {
if (val) {
this.$nextTick(() => {
this.openNative();
});
} else {
this.destroyNative();
}
},
},
beforeDestroy() {
this.destroyNative();
},
methods: {
open() {
if (this.visible) {
this.$nextTick(() => this.openNative());
return;
}
this.$emit('update:visible', true);
},
close() {
this.destroyNative();
if (this.visible) {
this.$emit('update:visible', false);
}
this.$emit('close');
},
getCurrentWebview() {
// #ifdef APP-PLUS
try {
const pages = getCurrentPages();
const page = pages[pages.length - 1];
if (page && typeof page.$getAppWebview === 'function') {
return page.$getAppWebview();
}
} catch (e) {
console.warn('PlusBarcodePanel getCurrentWebview failed', e);
}
// #endif
return null;
},
openNative() {
// #ifdef APP-PLUS
if (!this.visible || this._creating) return;
if (this._barcode) {
this.resumeScan();
return;
}
this._creating = true;
this._active = true;
// 等占位区域完成布局后再量位置,避免 Android 上 rect 为 0
setTimeout(() => {
if (!this.visible || !this._active) {
this._creating = false;
return;
}
uni.createSelectorQuery()
.in(this)
.select('.plus-barcode-panel__holder')
.boundingClientRect((rect) => {
this._creating = false;
if (!this.visible || !this._active) return;
if (!rect || !rect.width || !rect.height) {
uni.showToast({ title: '扫码区域未就绪', icon: 'none' });
return;
}
this.createBarcode(rect);
})
.exec();
}, 80);
// #endif
},
createBarcode(rect) {
// #ifdef APP-PLUS
const webview = this.getCurrentWebview();
if (!webview || typeof plus === 'undefined' || !plus.barcode) {
uni.showToast({ title: '当前环境不支持扫码', icon: 'none' });
return;
}
this.destroyNative(false);
try {
const barcode = plus.barcode.create(
this.barcodeViewId,
this.filters && this.filters.length ? this.filters : DEFAULT_FILTERS,
{
top: `${Math.round(rect.top)}px`,
left: `${Math.round(rect.left)}px`,
width: `${Math.round(rect.width)}px`,
height: `${Math.round(rect.height)}px`,
position: 'absolute',
background: '#000000',
frameColor: '#2979ff',
scanbarColor: '#2979ff',
},
);
barcode.onmarked = (type, code) => {
this.onMarked(type, code);
};
barcode.onerror = (err) => {
console.error('PlusBarcodePanel onerror', err);
};
webview.append(barcode);
this._barcode = barcode;
this._active = true;
barcode.start({
vibrate: true,
sound: 'default',
});
} catch (e) {
console.error('PlusBarcodePanel create failed', e);
uni.showToast({ title: '打开扫码失败', icon: 'none' });
this._barcode = null;
}
// #endif
},
onMarked(type, code) {
const result = String(code || '').trim();
if (!result || !this._active) return;
try {
if (this._barcode) this._barcode.cancel();
} catch (e) {
// ignore
}
this.$emit('success', result, type);
clearTimeout(this._restartTimer);
const gap = Number(this.scanTimeSpace) > 0 ? Number(this.scanTimeSpace) : 1200;
this._restartTimer = setTimeout(() => {
this.resumeScan();
}, gap);
},
resumeScan() {
// #ifdef APP-PLUS
if (!this.visible || !this._active || !this._barcode) return;
try {
this._barcode.start({
vibrate: true,
sound: 'default',
});
} catch (e) {
console.warn('PlusBarcodePanel resume failed', e);
}
// #endif
},
destroyNative(clearActive = true) {
clearTimeout(this._restartTimer);
this._restartTimer = null;
if (clearActive) this._active = false;
// #ifdef APP-PLUS
const barcode = this._barcode;
this._barcode = null;
if (!barcode) return;
try {
barcode.cancel();
} catch (e) {
// ignore
}
try {
barcode.close();
} catch (e) {
// ignore
}
// #endif
},
},
};
</script>
<style scoped lang="scss">
@import '@/common/pda-typography.scss';
.plus-barcode-panel {
background: #000;
margin-top: 16rpx;
}
.plus-barcode-panel__toolbar {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 72rpx;
padding: 12rpx 26rpx;
background: #1f1f1f;
box-sizing: border-box;
}
.plus-barcode-panel__tip {
flex: 1;
color: #ffffff;
font-size: $pda-font-action;
padding-right: 16rpx;
}
.plus-barcode-panel__close {
color: #2979ff;
font-size: $pda-font-action;
flex-shrink: 0;
}
.plus-barcode-panel__holder {
width: 100%;
height: 420rpx;
background: #000;
}
.plus-barcode-panel__fallback {
display: flex;
align-items: center;
justify-content: center;
height: 420rpx;
padding: 24rpx;
box-sizing: border-box;
background: #333;
color: #fff;
font-size: $pda-font-body;
text-align: center;
}
</style>
@@ -1,6 +1,6 @@
<template>
<view>
<view class="fabric-out-sectionTitle">{{ title }}</view>
<view v-if="title" class="fabric-out-sectionTitle">{{ title }}</view>
<slot name="before-list" />
<view class="fabric-out-detailList">
<view
@@ -26,7 +26,7 @@
export default {
props: {
list: { type: Array, default: () => [] },
title: { type: String, default: '出仓细码' },
title: { type: String, default: '' },
},
};
</script>
+41 -11
View File
@@ -10,14 +10,20 @@
@input="$emit('input', $event.detail.value)"
@confirm="$emit('scan')"
/>
<u-icon
v-if="showPhoneScan"
class="fabric-out-phoneScanIcon"
name="scan"
size="44"
color="#2979ff"
@click="$emit('phone-scan')"
/>
<view
v-if="scanning"
class="fabric-out-scanClose"
@click.stop="$emit('phone-scan')"
>
关闭扫码
</view>
<view
v-else
class="fabric-out-toolbarIcon"
@click.stop="$emit('phone-scan')"
>
<u-icon name="scan" size="44" color="#595959" />
</view>
<checkbox-group @change="$emit('delete-mode-change', $event)">
<label class="fabric-out-delCheck">
<checkbox :checked="deleteMode" />删除
@@ -37,16 +43,40 @@ export default {
deleteMode: { type: Boolean, default: false },
message: { type: String, default: '' },
disabledTip: { type: String, default: '当前状态不可扫码' },
showPhoneScan: { type: Boolean, default: false },
scanning: { type: Boolean, default: false },
},
};
</script>
<style scoped lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
@import '@/common/pda-typography.scss';
.fabric-out-phoneScanIcon {
margin-left: 16rpx;
.fabric-out-toolbarIcon {
display: flex;
align-items: center;
justify-content: center;
width: 72rpx;
height: 72rpx;
margin-left: 8rpx;
border-radius: 8rpx;
border: 1rpx solid #d9d9d9;
background: #f7f7f7;
flex-shrink: 0;
}
.fabric-out-scanClose {
display: flex;
align-items: center;
justify-content: center;
margin-left: 8rpx;
padding: 0 16rpx;
height: 72rpx;
border-radius: 8rpx;
border: 1rpx solid #2979ff;
background: #eaf2ff;
color: #2979ff;
font-size: $pda-font-action;
flex-shrink: 0;
white-space: nowrap;
}
</style>
@@ -12,12 +12,14 @@
<text class="fabric-out-scanDetailLabel">客户:</text>
<text class="fabric-out-scanDetailValue">{{ detail.customer_name || '' }}</text>
</view>
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
<view class="fabric-out-scanDetailRow">
<view class="fabric-out-scanDetailCheck" @click="toggleGroup('produce_order_no')">
<checkbox :checked="isGroupChecked('produce_order_no')" />
<text class="fabric-out-scanDetailLabel">生产通知单:</text>
<text class="fabric-out-scanDetailValue">{{ detail.produce_order_no || '' }}</text>
</view>
</view>
<view class="fabric-out-scanDetailRow">
<view class="fabric-out-scanDetailCheck" @click="toggleGroup('grey_fabric_code')">
<checkbox :checked="isGroupChecked('grey_fabric_code')" />
<text class="fabric-out-scanDetailLabel">布编:</text>
@@ -41,7 +43,8 @@
<text class="fabric-out-scanDetailLabel">机号:</text>
<text class="fabric-out-scanDetailValue">{{ detail.machine_number || '' }}</text>
</view>
<view class="fabric-out-scanDetailCell">
<view class="fabric-out-scanDetailCheck" @click="toggleGroup('volume_number')">
<checkbox :checked="isGroupChecked('volume_number')" />
<text class="fabric-out-scanDetailLabel">布号:</text>
<text class="fabric-out-scanDetailValue">{{ detail.volume_number || '' }}</text>
</view>
@@ -57,75 +60,20 @@
<text class="fabric-out-scanDetailValue">{{ formatWeight(detail.weight) }}Kg</text>
</view>
</view>
<scroll-view scroll-x class="fabric-out-scanDetailTableScroll">
<view class="fabric-out-scanDetailTable" :style="{ width: tableWidth }">
<view class="fabric-out-scanDetailTableRow fabric-out-scanDetailTableHead">
<view
v-for="col in columns"
:key="col.key"
class="fabric-out-scanDetailTableCell"
:style="cellStyle(col)"
>{{ col.label }}</view>
</view>
<view v-if="!tableRows.length" class="fabric-out-scanDetailEmpty">暂无数据~~</view>
<view
v-for="(row, rowIndex) in tableRows"
:key="rowIndex"
class="fabric-out-scanDetailTableRow"
>
<view
v-for="col in columns"
:key="col.key"
class="fabric-out-scanDetailTableCell"
:style="cellStyle(col)"
>{{ formatCell(row, col.key) }}</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
import {
SCAN_DETAIL_TABLE_COLUMNS,
SCAN_GROUP_OPTIONS,
getScanDetailTableWidth,
buildScanDetailTableRows,
} from '@/common/storeFabricBusinessOut';
const LOCKABLE_GROUP_KEYS = SCAN_GROUP_OPTIONS.map((item) => item.key);
export default {
props: {
detail: { type: Object, default: () => ({}) },
itemData: { type: Array, default: () => [] },
groupKeys: { type: Array, default: () => [] },
},
computed: {
columns() {
return SCAN_DETAIL_TABLE_COLUMNS;
},
tableWidth() {
return getScanDetailTableWidth(this.columns);
},
tableRows() {
return buildScanDetailTableRows(this.itemData, this.groupKeys);
},
},
methods: {
cellStyle(col) {
return {
width: `${col.width}rpx`,
minWidth: `${col.width}rpx`,
maxWidth: `${col.width}rpx`,
};
},
isGroupChecked(key) {
return (this.groupKeys || []).includes(key);
},
toggleGroup(key) {
if (!LOCKABLE_GROUP_KEYS.includes(key)) return;
const next = [...(this.groupKeys || [])];
const index = next.indexOf(key);
if (index >= 0) next.splice(index, 1);
@@ -143,11 +91,6 @@ export default {
const n = Number(value || 0);
return Number(n.toFixed(2));
},
formatCell(row, key) {
if (key === 'roll') return this.formatRoll(row.roll);
if (key === 'weight') return this.formatWeight(row.weight);
return row[key] || '';
},
},
};
</script>
@@ -0,0 +1,140 @@
<template>
<view class="fabric-out-summary">
<scroll-view scroll-x class="fabric-out-summaryScroll">
<view class="fabric-out-summaryInner" :style="{ width: tableWidth }">
<t-table border="1" border-color="#e1e1e1">
<t-tr font-size="18" color="#3e3e3e" align="center">
<t-th
v-for="col in headers"
:key="col.key"
align="center"
>
<view class="fabric-out-th" :style="cellStyle(col)">{{ col.label }}</view>
</t-th>
</t-tr>
<t-tr
v-for="(row, rowIndex) in contents"
:key="row.group_key || rowIndex"
font-size="18"
color="#333"
align="center"
>
<t-td
v-for="col in headers"
:key="col.key"
align="center"
>
<view
class="fabric-out-td"
:style="cellStyle(col)"
@click="onCellClick(col.key, row)"
>{{ formatCell(row, col.key) }}</view>
</t-td>
</t-tr>
</t-table>
</view>
</scroll-view>
<view v-if="!contents.length" class="fabric-out-summaryEmpty">暂无数据~~</view>
</view>
</template>
<script>
import tTable from '@/components/t-table/t-table.vue';
import tTr from '@/components/t-table/t-tr.vue';
import tTh from '@/components/t-table/t-th.vue';
import tTd from '@/components/t-table/t-td.vue';
import { SUMMARY_TABLE_COLUMNS } from '@/common/storeFabricBusinessOut';
export default {
components: { tTable, tTr, tTh, tTd },
props: {
rows: { type: Array, default: () => [] },
},
computed: {
headers() {
return SUMMARY_TABLE_COLUMNS;
},
tableWidth() {
const total = this.headers.reduce((sum, col) => sum + (col.width || 160), 0);
return `${total}rpx`;
},
contents() {
return (this.rows || []).map((row) => ({
...row,
grey_fabric_code: row.grey_fabric_code || '',
grey_fabric_name: row.grey_fabric_name || '',
yarn_batch: row.yarn_batch || '',
machine_number: row.machine_number || '',
roll: row.roll != null && row.roll !== '' ? String(row.roll) : '0',
weight: row.weight != null && row.weight !== '' ? String(row.weight) : '0',
}));
},
},
methods: {
cellStyle(col) {
const width = `${col.width || 160}rpx`;
return {
width,
minWidth: width,
maxWidth: width,
};
},
formatCell(row, key) {
const val = row[key];
if (val === 0) return '0';
return val != null && val !== '' ? val : '-';
},
onCellClick(key, row) {
this.$emit('cell-click', { key, lineData: row });
},
},
};
</script>
<style scoped lang="scss">
@import '@/common/pda-typography.scss';
.fabric-out-summary {
background: #fff;
margin-top: 16rpx;
}
.fabric-out-summaryScroll {
width: 100%;
}
.fabric-out-summaryInner {
min-width: 100%;
}
.fabric-out-summary ::v-deep .t-table {
width: 100%;
}
.fabric-out-summary ::v-deep .t-th,
.fabric-out-summary ::v-deep .t-td {
flex: 0 0 auto;
width: auto;
padding: 0;
min-height: $pda-row-min-height;
box-sizing: border-box;
}
.fabric-out-th,
.fabric-out-td {
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
min-height: $pda-row-min-height;
padding: 16rpx 12rpx;
font-size: $pda-font-body;
word-break: break-all;
text-align: center;
}
.fabric-out-th {
font-weight: bold;
}
.fabric-out-summaryEmpty {
text-align: center;
color: #999;
font-size: $pda-font-body;
line-height: $pda-row-min-height;
background: #fff;
}
</style>
+40 -12
View File
@@ -21,11 +21,17 @@
:class="{ actionCell: col.key === 'action' && !readonly }"
:style="cellStyle(col)"
@click="onCellTap(col.key, rowIndex)"
>{{ row[col.key] }}</view>
>
<text
v-if="col.key === 'action' && !readonly"
class="deleteBtn"
>{{ row[col.key] }}</text>
<template v-else>{{ row[col.key] }}</template>
</view>
</view>
</view>
</scroll-view>
<view v-if="!readonly && list.length" class="tableTip">点击「操作」列删除,将调用扫码删除接口</view>
<view v-if="!readonly && list.length" class="tableTip">点击「删除」将调用扫码删除接口</view>
</view>
</u-popup>
</template>
@@ -81,9 +87,11 @@ export default {
};
</script>
<style scoped>
<style scoped lang="scss">
@import '@/common/pda-typography.scss';
.popupWrap {
padding: 24rpx 16rpx 30rpx;
padding: 28rpx 16rpx 32rpx;
max-height: 80vh;
box-sizing: border-box;
display: flex;
@@ -91,18 +99,18 @@ export default {
overflow: hidden;
}
.popupTitle {
font-size: 32rpx;
font-size: $pda-font-popup-title;
font-weight: bold;
text-align: center;
margin-bottom: 20rpx;
margin-bottom: 24rpx;
color: #333;
flex-shrink: 0;
}
.emptyTip {
text-align: center;
color: #999;
padding: 40rpx 0;
font-size: 28rpx;
padding: 48rpx 0;
font-size: $pda-font-popup-sub;
}
.tableScroll {
width: 100%;
@@ -118,6 +126,7 @@ export default {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: stretch;
border-bottom: 1rpx solid #e1e1e1;
}
.tableRow:last-child {
@@ -131,8 +140,12 @@ export default {
}
.tableCell {
flex-shrink: 0;
padding: 12rpx 8rpx;
font-size: 22rpx;
display: flex;
align-items: center;
justify-content: center;
min-height: $pda-row-min-height;
padding: 16rpx 10rpx;
font-size: $pda-font-popup-item;
color: #333;
text-align: center;
border-right: 1rpx solid #e1e1e1;
@@ -146,13 +159,28 @@ export default {
.headCell {
font-weight: bold;
color: #3e3e3e;
min-height: 80rpx;
}
.actionCell {
padding: 12rpx 8rpx;
}
.deleteBtn {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 120rpx;
min-height: 72rpx;
padding: 0 20rpx;
border-radius: 8rpx;
background: #fff1f0;
border: 1rpx solid #ffa39e;
color: #f5222d;
font-size: $pda-font-action;
line-height: 1.2;
}
.tableTip {
margin-top: 16rpx;
font-size: 22rpx;
margin-top: 20rpx;
font-size: $pda-font-popup-sub;
color: #999;
text-align: center;
flex-shrink: 0;
@@ -32,11 +32,11 @@ export default {
border-bottom: 1rpx solid #f5f5f5;
}
.statusLabel {
font-size: 28rpx;
font-size: 40rpx;
color: #333;
}
.statusTag {
font-size: 24rpx;
font-size: 34rpx;
padding: 4rpx 12rpx;
border-radius: 6rpx;
font-weight: normal;
@@ -0,0 +1,199 @@
<template>
<u-popup v-model="visible" mode="bottom" :safe-area-inset-bottom="true" border-radius="16">
<view class="search-select" :style="{ maxHeight: panelMaxHeight + 'px' }">
<view class="search-select__bar">
<text class="search-select__title">{{ title }}</text>
<text class="search-select__cancel" @click="visible = false">取消</text>
</view>
<view class="search-select__search">
<u-search v-model="keyword" :placeholder="placeholder" :show-action="false" />
</view>
<scroll-view
scroll-y
class="search-select__list"
:style="{ height: listHeight + 'px' }"
:enable-back-to-top="false"
>
<view v-if="!filteredList.length" class="search-select__empty">暂无匹配数据</view>
<view
v-for="item in filteredList"
:key="String(item.value)"
class="search-select__item"
:class="{ 'is-selected': multiple && isPicked(item) }"
@click="onItemClick(item)"
>
<text class="search-select__item-label">{{ item.label }}</text>
<text v-if="multiple && isPicked(item)" class="search-select__check">已选</text>
</view>
</scroll-view>
<view v-if="multiple" class="search-select__footer">
<view class="search-select__ok" @click="confirmMultiple">确定</view>
</view>
</view>
</u-popup>
</template>
<script>
export default {
props: {
show: { type: Boolean, default: false },
title: { type: String, default: '请选择' },
placeholder: { type: String, default: '请输入名称搜索' },
list: { type: Array, default: () => [] },
multiple: { type: Boolean, default: false },
selected: { type: Array, default: () => [] },
},
data() {
return {
keyword: '',
panelMaxHeight: 520,
listHeight: 360,
picked: [],
};
},
computed: {
visible: {
get() { return this.show; },
set(val) { this.$emit('update:show', val); },
},
filteredList() {
const keyword = (this.keyword || '').trim().toLowerCase();
if (!keyword) return this.list;
return this.list.filter((item) => String(item.label || '').toLowerCase().includes(keyword));
},
},
watch: {
show(val) {
if (val) {
this.keyword = '';
this.picked = (this.selected || []).map((item) => String(item));
this.calcHeight();
}
},
},
mounted() {
this.calcHeight();
},
methods: {
calcHeight() {
try {
const sys = uni.getSystemInfoSync();
const winH = sys.windowHeight || 600;
// 弹层约占屏高 65%,列表为弹层去掉标题+搜索后的剩余高度
this.panelMaxHeight = Math.floor(winH * 0.65);
const chrome = this.multiple ? 230 : 140;
this.listHeight = Math.max(220, this.panelMaxHeight - chrome);
} catch (e) {
this.panelMaxHeight = 520;
this.listHeight = this.multiple ? 280 : 360;
}
},
isPicked(item) {
return this.picked.includes(String(item.value));
},
onItemClick(item) {
if (!this.multiple) {
this.confirm(item);
return;
}
const key = String(item.value);
if (this.picked.includes(key)) {
this.picked = this.picked.filter((value) => value !== key);
return;
}
this.picked = this.picked.concat(key);
},
confirm(item) {
this.visible = false;
this.$emit('confirm', item);
},
confirmMultiple() {
const selected = (this.list || []).filter((item) => this.isPicked(item));
this.visible = false;
this.$emit('confirm', selected);
},
},
};
</script>
<style scoped lang="scss">
@import '@/common/pda-typography.scss';
.search-select {
background: #fff;
padding-bottom: 20rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
overflow: hidden;
}
.search-select__bar {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx 30rpx 12rpx;
}
.search-select__title {
font-size: $pda-font-popup-title;
font-weight: bold;
color: #202328;
}
.search-select__cancel {
font-size: $pda-font-popup-sub;
color: #888;
}
.search-select__search {
flex-shrink: 0;
padding: 0 24rpx 12rpx;
}
.search-select__list {
width: 100%;
box-sizing: border-box;
}
.search-select__empty {
padding: 80rpx 0;
text-align: center;
color: #999;
font-size: $pda-font-popup-sub;
}
.search-select__item {
display: flex;
align-items: center;
justify-content: space-between;
min-height: $pda-row-min-height;
padding: 20rpx 30rpx;
box-sizing: border-box;
font-size: $pda-font-popup-item;
color: #202328;
border-bottom: 1px solid #f2f2f2;
}
.search-select__item-label {
flex: 1;
min-width: 0;
font-size: $pda-font-popup-item;
color: #202328;
}
.search-select__item.is-selected .search-select__item-label {
color: #2f78e6;
}
.search-select__check {
flex-shrink: 0;
margin-left: 16rpx;
font-size: $pda-font-action;
color: #2f78e6;
}
.search-select__footer {
flex-shrink: 0;
padding: 16rpx 30rpx 8rpx;
}
.search-select__ok {
height: $pda-button-height;
line-height: $pda-button-height;
text-align: center;
font-size: $pda-font-button;
color: #fff;
background: #2979ff;
border-radius: 46rpx;
}
</style>
@@ -1,16 +1,14 @@
<template>
<view class="warehouse-table-wrap">
<scroll-view scroll-x class="tableScrollX">
<wyb-table
ref="table"
:headers="headers"
:contents="contents"
:width="tableWidth"
:height="height"
:first-line-fixed="firstLineFixed"
@onCellClick="onCellClick"
/>
</scroll-view>
<view class="warehouse-table-wrap" :class="{ 'is-auto-height': isAutoHeight }">
<wyb-table
ref="table"
:headers="headers"
:contents="contents"
:width="tableWidth"
:height="height"
:first-line-fixed="firstLineFixed"
@onCellClick="onCellClick"
/>
</view>
</template>
@@ -22,10 +20,14 @@ export default {
props: {
headers: { type: Array, default: () => [] },
contents: { type: Array, default: () => [] },
// auto:高度随内容撑开,纵向滚动交给外层 scroll-view,避免与下拉刷新抢手势
height: { type: String, default: 'auto' },
firstLineFixed: { type: Boolean, default: true },
firstLineFixed: { type: Boolean, default: false },
},
computed: {
isAutoHeight() {
return !this.height || this.height === 'auto';
},
tableWidth() {
const total = (this.headers || []).reduce((sum, col) => sum + (col.width || 160), 0);
return `${total}rpx`;
@@ -46,7 +48,10 @@ export default {
width: 100%;
background: #fff;
}
.tableScrollX {
width: 100%;
/* 取消表格内部纵向滚动,只保留横向;纵向由页面 scroll-view 处理 */
.is-auto-height ::v-deep .wyb-table-scroll-view {
height: auto !important;
overflow-x: auto;
overflow-y: visible;
}
</style>
@@ -1,71 +0,0 @@
<template>
<view>
<view v-if="canScan" class="flex-white-plr26 ptb20 bdb_f5 fabric-out-scanRow process-in-binRow">
<text class="mr26 process-in-binLabel">仓位<text class="redXingh">*</text></text>
<input
type="text"
:value="code"
class="fabric-out-scanInput"
placeholder="请先扫描仓位"
@input="$emit('code-input', $event.detail.value)"
@confirm="$emit('confirm')"
/>
<text v-if="name" class="process-in-binName">{{ name }}</text>
<u-icon
v-if="showPhoneScan"
class="fabric-out-phoneScanIcon"
name="scan"
size="44"
color="#2979ff"
@click="$emit('phone-scan')"
/>
<text v-if="binId" class="process-in-binClear" @click="$emit('clear')">更换</text>
</view>
<view v-else-if="showDisabledTip" class="fabric-out-scanTip">{{ disabledTip }}</view>
<view v-if="canScan && !binId" class="fabric-out-scanTip">请先扫描仓位,再扫描布匹二维码</view>
</view>
</template>
<script>
export default {
props: {
canScan: { type: Boolean, default: false },
binId: { type: [Number, String], default: 0 },
code: { type: String, default: '' },
name: { type: String, default: '' },
showPhoneScan: { type: Boolean, default: false },
showDisabledTip: { type: Boolean, default: true },
disabledTip: { type: String, default: '请先提交保存后再扫仓位' },
},
};
</script>
<style scoped lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
.process-in-binRow {
background: #fff;
}
.process-in-binLabel {
flex-shrink: 0;
}
.fabric-out-phoneScanIcon {
margin-left: 16rpx;
flex-shrink: 0;
}
.process-in-binName {
margin-left: 12rpx;
font-size: 26rpx;
color: #333;
max-width: 200rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.process-in-binClear {
margin-left: 16rpx;
font-size: 26rpx;
color: #2979ff;
flex-shrink: 0;
}
</style>
@@ -1,251 +0,0 @@
<template>
<view>
<view class="fabric-out-sectionTitle">{{ title }}</view>
<slot name="before-list" />
<view class="fabric-out-detailList">
<dataNull
v-if="!groups.length"
src="/src/static/img/chahua/gjNull.png"
title="暂无进仓明细"
title1="扫码后将在此展示"
/>
<view
v-for="product in groups"
:key="product.group_key"
class="fabric-out-detailCard process-in-productCard"
>
<view class="process-in-productHead">
<text class="process-in-productTitle">
{{ product.product_code || '-' }}
<text v-if="product.product_name" class="process-in-subText"> {{ product.product_name }}</text>
</text>
<text class="process-in-productSum">
匹数 {{ product.in_roll }} / 数量 {{ product.in_weight }}
</text>
</view>
<view
v-for="color in product.colors"
:key="color.group_key"
class="process-in-colorBlock"
>
<view class="process-in-colorHead">
<text class="process-in-colorTitle">
色号 {{ color.product_color_code || '-' }}
<text v-if="color.product_color_name" class="process-in-subText">
{{ color.product_color_name }}
</text>
</text>
<text class="process-in-colorSum">
匹数 {{ color.in_roll }} / 数量 {{ color.in_weight }}
</text>
</view>
<view class="process-in-colorMeta">
<text>染整单:{{ color.quote_order_no || '-' }}</text>
<text>缸号:{{ color.dye_factory_dyelot_number || '-' }}</text>
</view>
<view class="process-in-fcTitle">细码({{ color.fine_codes.length }})</view>
<view v-if="!color.fine_codes.length" class="process-in-fcEmpty">暂无细码</view>
<scroll-view v-else scroll-x class="process-in-fcScroll">
<view class="process-in-fcTable" :style="{ width: fineTableWidth }">
<view class="process-in-fcRow process-in-fcHead">
<view
v-for="col in fineColumns"
:key="col.key"
class="process-in-fcCell"
:style="cellStyle(col)"
>{{ col.label }}</view>
</view>
<view
v-for="(fc, fcIndex) in color.fine_codes"
:key="fc.id || fcIndex"
class="process-in-fcRow"
>
<view
v-for="col in fineColumns"
:key="col.key"
class="process-in-fcCell"
:class="{ 'process-in-fcAction': col.key === 'action' }"
:style="cellStyle(col)"
@click="onCellTap(col.key, fc)"
>{{ formatFineCell(fc, col.key) }}</view>
</view>
</view>
</scroll-view>
<view v-if="deletable && color.fine_codes.length" class="process-in-fcTip">
勾选上方「删除」后扫码,或点击「删除」列移除细码
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { buildItemGroups } from '@/common/storeGoodsProcessIn';
const FINE_COLUMNS = [
{ label: '卷号', key: 'volume_number', width: 90 },
{ label: '匹数', key: 'roll', width: 90 },
{ label: '数量', key: 'weight', width: 110 },
{ label: '条码', key: 'bar_code', width: 220 },
{ label: '仓位', key: 'warehouse_bin_name', width: 120 },
{ label: '缸号', key: 'dye_factory_dyelot_number', width: 140 },
];
export default {
props: {
list: { type: Array, default: () => [] },
title: { type: String, default: '进仓明细' },
deletable: { type: Boolean, default: false },
},
computed: {
groups() {
return buildItemGroups(this.list);
},
fineColumns() {
if (!this.deletable) return FINE_COLUMNS;
return [...FINE_COLUMNS, { label: '操作', key: 'action', width: 90 }];
},
fineTableWidth() {
const total = this.fineColumns.reduce((sum, col) => sum + (col.width || 100), 0);
return `${total}rpx`;
},
},
methods: {
cellStyle(col) {
return {
width: `${col.width}rpx`,
minWidth: `${col.width}rpx`,
maxWidth: `${col.width}rpx`,
};
},
formatFineCell(fc, key) {
if (key === 'action') return '删除';
const val = fc[key];
if (val === 0) return '0';
return val != null && val !== '' ? val : '-';
},
onCellTap(key, fc) {
if (!this.deletable || key !== 'action') return;
this.$emit('delete', fc);
},
},
};
</script>
<style scoped lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
.process-in-productCard {
padding: 0;
overflow: hidden;
}
.process-in-productHead {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx;
background: #f0f7ff;
border-bottom: 1rpx solid #e6f0ff;
}
.process-in-productTitle {
font-size: 28rpx;
font-weight: bold;
color: #1a1a1a;
flex: 1;
padding-right: 16rpx;
}
.process-in-productSum,
.process-in-colorSum {
font-size: 24rpx;
color: #666;
flex-shrink: 0;
}
.process-in-subText {
font-weight: normal;
color: #666;
font-size: 24rpx;
}
.process-in-colorBlock {
padding: 16rpx 20rpx 20rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.process-in-colorBlock:last-child {
border-bottom: none;
}
.process-in-colorHead {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8rpx;
}
.process-in-colorTitle {
font-size: 26rpx;
font-weight: bold;
color: #333;
flex: 1;
padding-right: 12rpx;
}
.process-in-colorMeta {
display: flex;
flex-wrap: wrap;
gap: 16rpx 24rpx;
font-size: 24rpx;
color: #888;
margin-bottom: 12rpx;
}
.process-in-fcTitle {
font-size: 24rpx;
color: #2979ff;
margin-bottom: 8rpx;
}
.process-in-fcEmpty {
font-size: 24rpx;
color: #bbb;
padding: 8rpx 0;
}
.process-in-fcScroll {
width: 100%;
}
.process-in-fcTable {
border: 1rpx solid #eee;
border-radius: 8rpx;
overflow: hidden;
}
.process-in-fcRow {
display: flex;
align-items: stretch;
border-bottom: 1rpx solid #f0f0f0;
}
.process-in-fcRow:last-child {
border-bottom: none;
}
.process-in-fcHead {
background: #fafafa;
}
.process-in-fcCell {
box-sizing: border-box;
padding: 10rpx 8rpx;
font-size: 22rpx;
color: #333;
border-right: 1rpx solid #f0f0f0;
word-break: break-all;
}
.process-in-fcHead .process-in-fcCell {
font-weight: bold;
color: #666;
}
.process-in-fcCell:last-child {
border-right: none;
}
.process-in-fcAction {
color: #f5222d;
}
.process-in-fcTip {
margin-top: 8rpx;
font-size: 22rpx;
color: #999;
}
</style>
@@ -1,36 +0,0 @@
<template>
<view class="fabric-out-scanDetail">
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
<text class="fabric-out-scanDetailCell">染整单号:{{ detail.quote_order_no || '-' }}</text>
<text class="fabric-out-scanDetailCell">缸号:{{ detail.dyelot_number || '-' }}</text>
</view>
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
<text class="fabric-out-scanDetailCell">卷号:{{ detail.volume_number || '-' }}</text>
<text class="fabric-out-scanDetailCell">成品编号:{{ detail.product_code || '-' }}</text>
</view>
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
<text class="fabric-out-scanDetailCell">成品色号:{{ detail.product_color_code || '-' }}</text>
<text class="fabric-out-scanDetailCell">本行匹数:{{ detail.item_roll != null ? detail.item_roll : '-' }}</text>
</view>
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
<text class="fabric-out-scanDetailCell">本行数量:{{ detail.item_weight != null ? detail.item_weight : '-' }}</text>
<text class="fabric-out-scanDetailCell">本单匹数:{{ detail.order_roll != null ? detail.order_roll : '-' }}</text>
</view>
<view class="fabric-out-scanDetailRow">
<text class="fabric-out-scanDetailLabel">本单数量:</text>
<text class="fabric-out-scanDetailValue">{{ detail.order_weight != null ? detail.order_weight : '-' }}</text>
</view>
</view>
</template>
<script>
export default {
props: {
detail: { type: Object, default: () => ({}) },
},
};
</script>
<style scoped lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
</style>
@@ -1,251 +0,0 @@
<template>
<view>
<view class="fabric-out-sectionTitle">{{ title }}</view>
<slot name="before-list" />
<view class="fabric-out-detailList">
<dataNull
v-if="!groups.length"
src="/src/static/img/chahua/gjNull.png"
title="暂无出仓明细"
title1="扫码后将在此展示"
/>
<view
v-for="product in groups"
:key="product.group_key"
class="fabric-out-detailCard process-in-productCard"
>
<view class="process-in-productHead">
<text class="process-in-productTitle">
{{ product.product_code || '-' }}
<text v-if="product.product_name" class="process-in-subText"> {{ product.product_name }}</text>
</text>
<text class="process-in-productSum">
匹数 {{ product.out_roll }} / 数量 {{ product.out_weight }}
</text>
</view>
<view
v-for="color in product.colors"
:key="color.group_key"
class="process-in-colorBlock"
>
<view class="process-in-colorHead">
<text class="process-in-colorTitle">
色号 {{ color.product_color_code || '-' }}
<text v-if="color.product_color_name" class="process-in-subText">
{{ color.product_color_name }}
</text>
</text>
<text class="process-in-colorSum">
匹数 {{ color.out_roll }} / 数量 {{ color.out_weight }}
</text>
</view>
<view class="process-in-colorMeta">
<text>染整单:{{ color.quote_order_no || '-' }}</text>
<text>缸号:{{ color.dye_factory_dyelot_number || '-' }}</text>
</view>
<view class="process-in-fcTitle">细码({{ color.fine_codes.length }})</view>
<view v-if="!color.fine_codes.length" class="process-in-fcEmpty">暂无细码</view>
<scroll-view v-else scroll-x class="process-in-fcScroll">
<view class="process-in-fcTable" :style="{ width: fineTableWidth }">
<view class="process-in-fcRow process-in-fcHead">
<view
v-for="col in fineColumns"
:key="col.key"
class="process-in-fcCell"
:style="cellStyle(col)"
>{{ col.label }}</view>
</view>
<view
v-for="(fc, fcIndex) in color.fine_codes"
:key="fc.id || fcIndex"
class="process-in-fcRow"
>
<view
v-for="col in fineColumns"
:key="col.key"
class="process-in-fcCell"
:class="{ 'process-in-fcAction': col.key === 'action' }"
:style="cellStyle(col)"
@click="onCellTap(col.key, fc)"
>{{ formatFineCell(fc, col.key) }}</view>
</view>
</view>
</scroll-view>
<view v-if="deletable && color.fine_codes.length" class="process-in-fcTip">
勾选上方「删除」后扫码,或点击「删除」列移除细码
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { buildItemGroups } from '@/common/storeGoodsProcessOut';
const FINE_COLUMNS = [
{ label: '卷号', key: 'volume_number', width: 90 },
{ label: '匹数', key: 'roll', width: 90 },
{ label: '数量', key: 'weight', width: 110 },
{ label: '条码', key: 'bar_code', width: 220 },
{ label: '仓位', key: 'warehouse_bin_name', width: 120 },
{ label: '缸号', key: 'dye_factory_dyelot_number', width: 140 },
];
export default {
props: {
list: { type: Array, default: () => [] },
title: { type: String, default: '出仓明细' },
deletable: { type: Boolean, default: false },
},
computed: {
groups() {
return buildItemGroups(this.list);
},
fineColumns() {
if (!this.deletable) return FINE_COLUMNS;
return [...FINE_COLUMNS, { label: '操作', key: 'action', width: 90 }];
},
fineTableWidth() {
const total = this.fineColumns.reduce((sum, col) => sum + (col.width || 100), 0);
return `${total}rpx`;
},
},
methods: {
cellStyle(col) {
return {
width: `${col.width}rpx`,
minWidth: `${col.width}rpx`,
maxWidth: `${col.width}rpx`,
};
},
formatFineCell(fc, key) {
if (key === 'action') return '删除';
const val = fc[key];
if (val === 0) return '0';
return val != null && val !== '' ? val : '-';
},
onCellTap(key, fc) {
if (!this.deletable || key !== 'action') return;
this.$emit('delete', fc);
},
},
};
</script>
<style scoped lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
.process-in-productCard {
padding: 0;
overflow: hidden;
}
.process-in-productHead {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx;
background: #f0f7ff;
border-bottom: 1rpx solid #e6f0ff;
}
.process-in-productTitle {
font-size: 28rpx;
font-weight: bold;
color: #1a1a1a;
flex: 1;
padding-right: 16rpx;
}
.process-in-productSum,
.process-in-colorSum {
font-size: 24rpx;
color: #666;
flex-shrink: 0;
}
.process-in-subText {
font-weight: normal;
color: #666;
font-size: 24rpx;
}
.process-in-colorBlock {
padding: 16rpx 20rpx 20rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.process-in-colorBlock:last-child {
border-bottom: none;
}
.process-in-colorHead {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8rpx;
}
.process-in-colorTitle {
font-size: 26rpx;
font-weight: bold;
color: #333;
flex: 1;
padding-right: 12rpx;
}
.process-in-colorMeta {
display: flex;
flex-wrap: wrap;
gap: 16rpx 24rpx;
font-size: 24rpx;
color: #888;
margin-bottom: 12rpx;
}
.process-in-fcTitle {
font-size: 24rpx;
color: #2979ff;
margin-bottom: 8rpx;
}
.process-in-fcEmpty {
font-size: 24rpx;
color: #bbb;
padding: 8rpx 0;
}
.process-in-fcScroll {
width: 100%;
}
.process-in-fcTable {
border: 1rpx solid #eee;
border-radius: 8rpx;
overflow: hidden;
}
.process-in-fcRow {
display: flex;
align-items: stretch;
border-bottom: 1rpx solid #f0f0f0;
}
.process-in-fcRow:last-child {
border-bottom: none;
}
.process-in-fcHead {
background: #fafafa;
}
.process-in-fcCell {
box-sizing: border-box;
padding: 10rpx 8rpx;
font-size: 22rpx;
color: #333;
border-right: 1rpx solid #f0f0f0;
word-break: break-all;
}
.process-in-fcHead .process-in-fcCell {
font-weight: bold;
color: #666;
}
.process-in-fcCell:last-child {
border-right: none;
}
.process-in-fcAction {
color: #f5222d;
}
.process-in-fcTip {
margin-top: 8rpx;
font-size: 22rpx;
color: #999;
}
</style>
@@ -1,36 +0,0 @@
<template>
<view class="fabric-out-scanDetail">
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
<text class="fabric-out-scanDetailCell">染整单号:{{ detail.quote_order_no || '-' }}</text>
<text class="fabric-out-scanDetailCell">缸号:{{ detail.dyelot_number || '-' }}</text>
</view>
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
<text class="fabric-out-scanDetailCell">卷号:{{ detail.volume_number || '-' }}</text>
<text class="fabric-out-scanDetailCell">成品编号:{{ detail.product_code || '-' }}</text>
</view>
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
<text class="fabric-out-scanDetailCell">成品色号:{{ detail.product_color_code || '-' }}</text>
<text class="fabric-out-scanDetailCell">本行匹数:{{ detail.item_roll != null ? detail.item_roll : '-' }}</text>
</view>
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
<text class="fabric-out-scanDetailCell">本行数量:{{ detail.item_weight != null ? detail.item_weight : '-' }}</text>
<text class="fabric-out-scanDetailCell">本单匹数:{{ detail.order_roll != null ? detail.order_roll : '-' }}</text>
</view>
<view class="fabric-out-scanDetailRow">
<text class="fabric-out-scanDetailLabel">本单数量:</text>
<text class="fabric-out-scanDetailValue">{{ detail.order_weight != null ? detail.order_weight : '-' }}</text>
</view>
</view>
</template>
<script>
export default {
props: {
detail: { type: Object, default: () => ({}) },
},
};
</script>
<style scoped lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
</style>
+86
View File
@@ -0,0 +1,86 @@
<template>
<view class="t-table" :style="{ 'border-width': border + 'px', 'border-color': borderColor }">
<slot />
</view>
</template>
<script>
export default {
props: {
border: {
type: String,
default: '1'
},
borderColor: {
type: String,
default: '#d0dee5'
},
isCheck: {
type: Boolean,
default: false
}
},
provide() {
return {
table: this
};
},
data() {
return {};
},
created() {
this.childrens = [];
this.index = 0;
},
methods: {
fire(e, index, len) {
let childrens = this.childrens;
console.log(childrens);
// 全选
if (index === 0) {
childrens.map((vm, index) => {
vm.checkboxData.checked = e;
return vm;
});
} else {
let isAll = childrens.find((n, ids) => ids !== 0 && !n.checkboxData.checked);
childrens[0].checkboxData.checked = isAll ? false : true;
}
let fireArr = [];
for (let i = 0; i < childrens.length; i++) {
if (childrens[i].checkboxData.checked && i !== 0) {
fireArr.push(childrens[i].checkboxData.value - 1);
}
}
this.$emit('change', {
detail: fireArr
});
}
}
};
</script>
<style scoped>
.t-table {
width: 100%;
border: 1px #d0dee5 solid;
border-left: none;
border-top: none;
box-sizing: border-box;
}
.t-table>>>t-tr {
display: flex;
}
.t-table>>>t-tr:nth-child(2n) {
background: #f5f5f5;
}
/* #ifdef H5 */
.t-table>>>.t-tr:nth-child(2n) {
background: #f5f5f5;
}
/* #endif */
</style>
+71
View File
@@ -0,0 +1,71 @@
<template>
<view class="t-td" :style="{ 'border-width': thBorder + 'px','border-color':borderColor ,'font-size':fontSize+'px' ,'color':color,'justify-content':tdAlignCpd}">
<slot></slot>
</view>
</template>
<script>
export default {
props: {
align: String
},
data() {
return {
thBorder: '1',
borderColor: '#d0dee5',
fontSize: '14',
color: '#555c60',
tdAlign: 'center'
};
},
inject: ['table', 'tr'],
created() {
this.thBorder = this.table.border;
this.borderColor = this.table.borderColor;
this.fontSize = this.tr.fontSize;
this.color = this.tr.color;
if (this.align) {
this.tdAlign = this.align;
} else {
this.tdAlign = this.tr.align
}
},
computed: {
tdAlignCpd() {
let nameAlign = '';
switch (this.tdAlign) {
case 'left':
nameAlign = 'flex-start'
break;
case 'center':
nameAlign = 'center'
break;
case 'right':
nameAlign = 'flex-end'
break;
default:
nameAlign = 'center'
break;
}
return nameAlign
}
}
};
</script>
<style>
.t-td {
flex: 1;
display: flex;
align-items: center;
width: 100%;
padding: 14upx;
border-top: 1px #d0dee5 solid;
border-left: 1px #d0dee5 solid;
text-align: center;
color: #555c60;
font-size: 28upx;
}
</style>
+71
View File
@@ -0,0 +1,71 @@
<template>
<view class="t-th" :style="{ 'border-width': thBorder + 'px' ,'border-color':borderColor,'font-size':fontSize+'px' ,'color':color,'justify-content':thAlignCpd}">
<slot></slot>
</view>
</template>
<script>
export default {
props: {
align: String,
},
data() {
return {
thBorder: '1',
borderColor: '#d0dee5',
fontSize: '15',
color: '#3b4246',
thAlign: 'center'
};
},
inject: ['table', 'tr'],
created() {
this.thBorder = this.table.border;
this.borderColor = this.table.borderColor;
this.fontSize = this.tr.fontSize;
this.color = this.tr.color;
if (this.align) {
this.thAlign = this.align;
} else {
this.thAlign = this.tr.align
}
},
computed: {
thAlignCpd() {
let nameAlign = '';
switch (this.thAlign) {
case 'left':
nameAlign = 'flex-start'
break;
case 'center':
nameAlign = 'center'
break;
case 'right':
nameAlign = 'flex-end'
break;
default:
nameAlign = 'center'
break;
}
return nameAlign
}
}
};
</script>
<style>
.t-th {
flex: 1;
display: flex;
align-items: center;
font-size: 30upx;
font-weight: bold;
text-align: center;
color: #3b4246;
border-left: 1px #d0dee5 solid;
border-top: 1px #d0dee5 solid;
padding: 15upx;
}
</style>
+81
View File
@@ -0,0 +1,81 @@
<template>
<view class="t-tr">
<view v-if="isCheck" class="t-check-box" :style="{ 'border-width': thBorder + 'px' ,'border-color':borderColor}">
<checkbox-group @change="checkboxChange">
<checkbox :value="checkboxData.value + ''" :checked="checkboxData.checked" />
</checkbox-group>
</view>
<slot></slot>
</view>
</template>
<script>
export default {
props: {
fontSize: String,
color: String,
align: String
},
inject: ['table'],
provide() {
return {
tr: this
};
},
data() {
return {
isCheck: false,
checkboxData: {
value: 0,
checked: false
},
checked: false,
thBorder: '1',
borderColor: '#d0dee5'
};
},
created() {
this.thBorder = this.table.border;
this.borderColor = this.table.borderColor;
this.table.childrens.push(this);
this.checkboxData.value = this.table.index++;
this.isCheck = this.table.isCheck;
},
methods: {
checkboxChange(e) {
this.checkboxData.checked = !this.checkboxData.checked;
this.table.childrens[this.checkboxData.value] = this;
this.table.fire(e.detail.value[0] ? true : false, this.checkboxData.value, this.table.index);
}
}
};
</script>
<style>
.t-tr {
width: 100%;
display: flex;
}
.t-tr t-th,
.t-tr t-td {
display: flex;
flex: 1;
}
.t-tr .t-check-box {
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
width: 80upx;
color: #3b4246;
border-left: 1px #d0dee5 solid;
border-top: 1px #d0dee5 solid;
}
.t-tr .t-check-box checkbox {
transform: scale(0.8);
}
</style>
+589
View File
@@ -0,0 +1,589 @@
<template>
<view class="u-select">
<u-popup :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto" :safeAreaInsetBottom="safeAreaInsetBottom" @close="close" :z-index="uZIndex">
<view class="u-select">
<view class="u-select__header" @touchmove.stop.prevent="">
<view
class="u-select__header__cancel u-select__header__btn"
:style="{ color: cancelColor }"
hover-class="u-hover-class"
:hover-stay-time="150"
@tap="getResult('cancel')"
>
{{cancelText}}
</view>
<view class="u-select__header__title">
{{title}}
</view>
<view
class="u-select__header__confirm u-select__header__btn"
:style="{ color: moving ? cancelColor : confirmColor }"
hover-class="u-hover-class"
:hover-stay-time="150"
@touchmove.stop=""
@tap.stop="getResult('confirm')"
>
{{confirmText}}
</view>
</view>
<view class="u-select__search" v-if="showSearch" @tap.stop>
<u-icon name="search" size="32" color="#909399"></u-icon>
<input
class="u-select__search__input"
:value="keyword"
:placeholder="searchPlaceholder"
confirm-type="search"
:adjust-position="true"
@input="onSearchInput"
@confirm="onSearchConfirm"
/>
<u-icon
v-if="keyword"
name="close-circle-fill"
size="28"
color="#c0c4cc"
@tap.stop="clearSearch"
></u-icon>
</view>
<view v-if="loading" class="u-select__loading">搜索中...</view>
<view class="u-select__body" :style="hasCustomItemHeight ? bodyStyle : null">
<view v-if="isColumnEmpty && !loading" class="u-select__empty">无匹配选项</view>
<picker-view
v-else-if="value && !isColumnEmpty"
:key="pickerKey"
@change="columnChange"
class="u-select__body__picker-view"
:style="pickerViewStyle"
:indicator-style="indicatorStyle"
:value="defaultSelector"
@pickstart="pickstart"
@pickend="pickend"
>
<picker-view-column v-for="(item, index) in columnData" :key="'col-' + pickerKey + '-' + index">
<view
class="u-select__body__picker-view__item"
:style="hasCustomItemHeight ? itemStyle : null"
v-for="(item1, index1) in item"
:key="item1[valueName] != null ? item1[valueName] : index1"
>
<view class="u-line-1" :style="hasCustomItemHeight ? itemStyle : null">{{ item1[labelName] }}</view>
</view>
</picker-view-column>
</picker-view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
/**
* select 列选择器(本地覆盖:选项支持搜索)
* @description 此选择器用于单列,多列,多列联动的选择场景。
* @tutorial http://uviewui.com/components/select.html
* @property {String} mode 模式选择,"single-column"-单列模式,"mutil-column"-多列模式,"mutil-column-auto"-多列联动模式
* @property {Array} list 列数据,数组形式,见官网说明
* @property {Boolean} v-model 布尔值变量,用于控制选择器的弹出与收起
* @property {Boolean} show-search 是否显示搜索框(默认true)
* @property {String} search-placeholder 搜索框占位文字
* @event {Function} confirm 点击确定按钮,返回当前选择的值
* @example <u-select v-model="show" :list="list"></u-select>
*/
export default {
props: {
list: {
type: Array,
default() {
return [];
}
},
border: {
type: Boolean,
default: true
},
value: {
type: Boolean,
default: false
},
cancelColor: {
type: String,
default: '#606266'
},
confirmColor: {
type: String,
default: '#2979ff'
},
zIndex: {
type: [String, Number],
default: 0
},
safeAreaInsetBottom: {
type: Boolean,
default: false
},
maskCloseAble: {
type: Boolean,
default: true
},
defaultValue: {
type: Array,
default() {
return [0];
}
},
mode: {
type: String,
default: 'single-column'
},
valueName: {
type: String,
default: 'value'
},
labelName: {
type: String,
default: 'label'
},
childName: {
type: String,
default: 'children'
},
title: {
type: String,
default: ''
},
cancelText: {
type: String,
default: '取消'
},
confirmText: {
type: String,
default: '确认'
},
showSearch: {
type: Boolean,
default: true
},
searchPlaceholder: {
type: String,
default: '搜索'
},
remote: {
type: Boolean,
default: false
},
loading: {
type: Boolean,
default: false
},
debounce: {
type: Number,
default: 400
},
/** 选项行高(rpx)。App 端需与 indicator 同步,避免选中框错位 */
itemHeight: {
type: [Number, String],
default: 0
},
/** 可见行数,用于计算滚轮高度;需为奇数,选中行才能居中 */
visibleItemCount: {
type: [Number, String],
default: 5
}
},
data() {
return {
defaultSelector: [0],
columnData: [],
selectValue: [],
lastSelectIndex: [],
columnNum: 0,
moving: false,
keyword: '',
pickerKey: 0,
// 勿用 _ 前缀:Vue2 不会把 data 代理到 this
searchTimer: null,
lastSearchEmit: '',
lastSearchAt: 0
};
},
watch: {
value: {
immediate: true,
handler(val) {
if (val) {
this.keyword = '';
this.applyPickerData();
if (this.remote) this.emitRemoteSearch('');
} else {
this.clearSearchTimer();
this.lastSearchEmit = '';
this.lastSearchAt = 0;
}
}
},
list: {
handler() {
if (!this.value) return;
this.applyPickerData();
},
},
loading(val) {
// loading 从 true→false 时再刷一次滚轮,避免原生 picker-view 漏更
if (!val && this.value && this.remote) this.applyPickerData();
},
},
beforeDestroy() {
this.clearSearchTimer();
},
computed: {
uZIndex() {
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
},
isColumnEmpty() {
return !this.columnData || !this.columnData.length || !this.columnData[0] || !this.columnData[0].length;
},
hasCustomItemHeight() {
return Number(this.itemHeight) > 0;
},
itemHeightRpx() {
return Number(this.itemHeight) || 70;
},
itemHeightPx() {
return uni.upx2px(this.itemHeightRpx);
},
visibleCount() {
const n = Number(this.visibleItemCount) || 5;
return n % 2 === 0 ? n + 1 : n;
},
indicatorStyle() {
if (!this.hasCustomItemHeight) return '';
return `height: ${this.itemHeightPx}px;`;
},
itemStyle() {
return {
height: `${this.itemHeightPx}px`,
lineHeight: `${this.itemHeightPx}px`,
};
},
pickerViewStyle() {
if (!this.hasCustomItemHeight) return null;
return { height: `${this.itemHeightPx * this.visibleCount}px` };
},
bodyStyle() {
return this.pickerViewStyle;
},
},
methods: {
pickstart() {
// #ifdef MP-WEIXIN
this.moving = true;
// #endif
},
pickend() {
// #ifdef MP-WEIXIN
this.moving = false;
// #endif
},
readInputValue(e) {
if (typeof e === 'string' || typeof e === 'number') return String(e);
if (e && e.detail && e.detail.value != null) return String(e.detail.value);
if (e && e.target && e.target.value != null) return String(e.target.value);
return '';
},
clearSearchTimer() {
if (this.searchTimer) {
clearTimeout(this.searchTimer);
this.searchTimer = null;
}
},
emitRemoteSearch(keyword) {
this.clearSearchTimer();
const key = keyword == null ? '' : String(keyword).trim();
const now = Date.now();
if (key === this.lastSearchEmit && now - this.lastSearchAt < 80) return;
this.lastSearchEmit = key;
this.lastSearchAt = now;
this.$emit('search', key);
},
scheduleRemoteSearch() {
this.clearSearchTimer();
this.searchTimer = setTimeout(() => {
this.emitRemoteSearch(this.keyword);
}, this.debounce);
},
onSearchInput(e) {
this.keyword = this.readInputValue(e);
if (this.remote) this.scheduleRemoteSearch();
else this.applyFilter();
},
onSearchConfirm(e) {
this.keyword = this.readInputValue(e);
if (this.remote) this.emitRemoteSearch(this.keyword);
else this.applyFilter();
},
clearSearch() {
this.keyword = '';
if (this.remote) this.emitRemoteSearch('');
else this.applyFilter();
},
matchKeyword(text) {
const keyword = (this.keyword || '').trim().toLowerCase();
if (!keyword) return true;
return String(text == null ? '' : text).toLowerCase().indexOf(keyword) !== -1;
},
filterItems(list) {
if (!Array.isArray(list)) return [];
if (this.remote) return list.slice();
const keyword = (this.keyword || '').trim();
if (!keyword) return list.slice();
return list.filter(item => {
return this.matchKeyword(item && item[this.labelName]) || this.matchKeyword(item && item[this.valueName]);
});
},
applyPickerData() {
this.init();
this.pickerKey += 1;
},
applyFilter() {
this.applyPickerData();
},
init() {
this.setColumnNum();
this.setDefaultSelector();
this.setColumnData();
this.setSelectValue();
},
setDefaultSelector() {
const columnNum = this.columnNum || 1;
const defaultValue = Array.isArray(this.defaultValue) ? this.defaultValue.slice() : [];
this.defaultSelector = defaultValue.length === columnNum
? defaultValue
: Array(columnNum).fill(0);
this.lastSelectIndex = this.defaultSelector.slice();
},
setColumnNum() {
if(this.mode == 'single-column') this.columnNum = 1;
else if(this.mode == 'mutil-column') this.columnNum = this.list.length;
else if(this.mode == 'mutil-column-auto') {
let num = 1;
let column = this.list;
while(column[0] && column[0][this.childName]) {
column = column[0] ? column[0][this.childName] : {};
num ++;
}
this.columnNum = num;
}
},
setColumnData() {
let data = [];
this.selectValue = [];
if(this.mode == 'mutil-column-auto') {
const sourceList = this.filterItems(this.list);
if (!sourceList.length) {
this.columnData = [[]];
return;
}
let selector = this.defaultSelector.length ? this.defaultSelector[0] : 0;
if (selector >= sourceList.length) selector = 0;
let column = sourceList[selector];
for (let i = 0; i < this.columnNum; i++) {
if (i == 0) {
data[i] = sourceList;
column = column ? column[this.childName] : [];
} else {
data[i] = column || [];
const nextIndex = this.defaultSelector[i] || 0;
column = (column && column[nextIndex]) ? column[nextIndex][this.childName] : [];
}
}
} else if(this.mode == 'single-column') {
data[0] = this.filterItems(this.list);
} else {
data = (this.list || []).map(col => this.filterItems(Array.isArray(col) ? col : []));
}
this.columnData = data.slice();
},
setSelectValue() {
let tmp = null;
for(let i = 0; i < this.columnNum; i++) {
const col = this.columnData[i] || [];
tmp = col[this.defaultSelector[i]];
let data = {
value: tmp ? tmp[this.valueName] : null,
label: tmp ? tmp[this.labelName] : null
};
if(tmp && tmp.extra !== undefined) data.extra = tmp.extra;
this.selectValue.push(data)
}
},
columnChange(e) {
let index = null;
let columnIndex = e.detail.value;
this.selectValue = [];
this.defaultSelector = columnIndex;
if(this.mode == 'mutil-column-auto') {
this.lastSelectIndex.map((val, idx) => {
if (val != columnIndex[idx]) index = idx;
});
for (let i = index + 1; i < this.columnNum; i++) {
this.columnData[i] = this.columnData[i - 1][i - 1 == index ? columnIndex[index] : 0][this.childName];
this.defaultSelector[i] = 0;
}
columnIndex.map((item, idx) => {
let data = this.columnData[idx][columnIndex[idx]];
let tmp = {
value: data ? data[this.valueName] : null,
label: data ? data[this.labelName] : null,
};
if(data && data.extra !== undefined) tmp.extra = data.extra;
this.selectValue.push(tmp);
})
this.lastSelectIndex = columnIndex;
} else if(this.mode == 'single-column') {
let data = this.columnData[0][columnIndex[0]];
let tmp = {
value: data ? data[this.valueName] : null,
label: data ? data[this.labelName] : null,
};
if(data && data.extra !== undefined) tmp.extra = data.extra;
this.selectValue.push(tmp);
} else if(this.mode == 'mutil-column') {
columnIndex.map((item, idx) => {
let data = this.columnData[idx][columnIndex[idx]];
let tmp = {
value: data ? data[this.valueName] : null,
label: data ? data[this.labelName] : null,
};
if(data && data.extra !== undefined) tmp.extra = data.extra;
this.selectValue.push(tmp);
})
}
},
close() {
this.$emit('input', false);
this.$set(this, 'defaultSelector', [0]);
this.keyword = '';
this.lastSearchEmit = '';
this.lastSearchAt = 0;
},
getResult(event = null) {
// #ifdef MP-WEIXIN
if (this.moving) return;
// #endif
if (event === 'confirm' && this.isColumnEmpty) {
this.$u.toast && this.$u.toast('无匹配选项');
return;
}
if (event) this.$emit(event, this.selectValue);
this.close();
},
selectHandler() {
this.$emit('click');
}
}
};
</script>
<style scoped lang="scss">
@import "~uview-ui/libs/css/style.components.scss";
.u-select {
&__action {
position: relative;
line-height: $u-form-item-height;
height: $u-form-item-height;
&__icon {
position: absolute;
right: 20rpx;
top: 50%;
transition: transform .4s;
transform: translateY(-50%);
z-index: 1;
&--reverse {
transform: rotate(-180deg) translateY(50%);
}
}
}
&__hader {
&__title {
color: $u-content-color;
}
}
&--border {
border-radius: 6rpx;
border-radius: 4px;
border: 1px solid $u-form-item-border-color;
}
&__header {
@include vue-flex;
align-items: center;
justify-content: space-between;
height: 80rpx;
padding: 0 40rpx;
}
&__search {
@include vue-flex;
align-items: center;
margin: 0 24rpx 16rpx;
padding: 0 24rpx;
height: 80rpx;
background-color: #f5f5f5;
border-radius: 12rpx;
box-sizing: border-box;
&__input {
flex: 1;
height: 80rpx;
margin-left: 12rpx;
font-size: 30rpx;
color: #303133;
}
}
&__loading {
padding: 0 24rpx 8rpx;
font-size: 26rpx;
color: #909399;
}
&__empty {
@include vue-flex;
align-items: center;
justify-content: center;
height: 100%;
font-size: 30rpx;
color: #909399;
}
&__body {
width: 100%;
height: 500rpx;
overflow: hidden;
background-color: #fff;
&__picker-view {
height: 100%;
box-sizing: border-box;
&__item {
@include vue-flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: $u-main-color;
padding: 0 8rpx;
}
}
}
}
</style>
+1 -1
View File
@@ -73,7 +73,7 @@
borderRight: index === headers.length - 1 || (!showVertBorder && index !== 0) ? 'none' : '1px solid' + borderColor,
zIndex: index === 0 ? 20 : 0,
left: index === 0 && firstLineFixed ? (enableCheck ? checkColWidth + 'rpx' : 0) : 'auto',
position: index === 0 ? 'sticky' : 'static'}">
position: index === 0 && firstLineFixed ? 'sticky' : 'static'}">
<text :style="{marginLeft: autoSortShow(index) && textAlign !== 'left' ? fontSize[0] * 0.65 + 'rpx' : 0}">
{{item.label || emptyString}}
</text>
+19
View File
@@ -17,6 +17,25 @@ import VueI18n from '@/common/vue-i18n.min.js';
import lang_zh_CN from '@/common/locales/zh_CN.js';
import lang_en from '@/common/locales/en.js';
// #ifdef APP-PLUS
// Android 5.x 等老 PDA 不信任 Let's Encrypt 新证书链,全局关闭 HTTPS 证书校验
(() => {
const patchSslVerify = (methodName) => {
const original = uni[methodName];
if (typeof original !== 'function') {
return;
}
uni[methodName] = (options = {}) => original({
...options,
sslVerify: false
});
};
patchSslVerify('request');
patchSslVerify('downloadFile');
patchSslVerify('uploadFile');
})();
// #endif
Vue.config.productionTip = false;
App.mpType = 'app';
+4 -4
View File
@@ -1,9 +1,9 @@
{
"name" : "浩拓ERP",
"name" : "浩拓织厂",
"appid" : "__UNI__F79F300",
"description" : "浩拓ERP",
"versionName" : "1.1.5",
"versionCode" : 105,
"description" : "周尚-浩拓织厂",
"versionName" : "1.1.26",
"versionCode" : 126,
"transformPx" : false,
"app-plus" : {
"optimization" : {
+9 -75
View File
@@ -1,5 +1,6 @@
{
"easycom": {
"^u-select$": "@/components/u-select/u-select.vue",
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
@@ -421,62 +422,6 @@
"enablePullDownRefresh": false
}
},{
"path" : "pages/storegoods/storeGoodsProcessInList",
"style" :
{
"navigationBarTitleText": "加工进仓列表",
"enablePullDownRefresh": false
}
},{
"path" : "pages/storegoods/storeGoodsProcessInAdd",
"style" :
{
"navigationBarTitleText": "新增加工进仓单",
"enablePullDownRefresh": false
}
},{
"path" : "pages/storegoods/storeGoodsProcessInEdit",
"style" :
{
"navigationBarTitleText": "编辑加工进仓单",
"enablePullDownRefresh": false
}
},{
"path" : "pages/storegoods/storeGoodsProcessInView",
"style" :
{
"navigationBarTitleText": "查看加工进仓单",
"enablePullDownRefresh": false
}
},{
"path" : "pages/storegoods/storeGoodsProcessOutList",
"style" :
{
"navigationBarTitleText": "加工出仓列表",
"enablePullDownRefresh": false
}
},{
"path" : "pages/storegoods/storeGoodsProcessOutAdd",
"style" :
{
"navigationBarTitleText": "新增加工出仓单",
"enablePullDownRefresh": false
}
},{
"path" : "pages/storegoods/storeGoodsProcessOutEdit",
"style" :
{
"navigationBarTitleText": "编辑加工出仓单",
"enablePullDownRefresh": false
}
},{
"path" : "pages/storegoods/storeGoodsProcessOutView",
"style" :
{
"navigationBarTitleText": "查看加工出仓单",
"enablePullDownRefresh": false
}
},{
"path" : "pages/storegoods/storeGoodsBusinessIn",
"style" :
@@ -625,7 +570,7 @@
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},{
},{
"path" : "pages/storefabric/storeFabricBusinessOutList",
"style" :
{
@@ -633,6 +578,13 @@
"enablePullDownRefresh": false
}
},{
"path": "pages/storefabric/storeFabricManualIn",
"style": {
"navigationBarTitleText": "手动进仓",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},{
"path" : "pages/storefabric/storeFabricBusinessOutAdd",
"style" :
{
@@ -856,30 +808,12 @@
"backgroundColor": "#ffffff",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/sys/msg/index",
"iconPath": "static/aidex/tabbar/msg_1.png",
"selectedIconPath": "static/aidex/tabbar/msg_2.png",
"text": "消息"
},
// {
// "pagePath": "pages/sys/home/index",
// "iconPath": "static/aidex/tabbar/home_1.png",
// "selectedIconPath": "static/aidex/tabbar/home_2.png",
// "text": "首页"
// },
{
"pagePath": "pages/sys/workbench/index",
"iconPath": "static/aidex/tabbar/apply_1.png",
"selectedIconPath": "static/aidex/tabbar/apply_2.png",
"text": "工作台"
},
{
"pagePath": "pages/sys/book/index",
"iconPath": "static/aidex/tabbar/book_1.png",
"selectedIconPath": "static/aidex/tabbar/book_2.png",
"text": "通讯录"
},
{
"pagePath": "pages/sys/user/index",
"iconPath": "static/aidex/tabbar/my_1.png",
@@ -1,206 +1,138 @@
<template>
<view class="fabric-out-page">
<OrderStatusBar class="fabric-out-mt32" :status="displayAuditStatus" :name="displayAuditStatusName" />
<view class="flex-white-plr26 ptb10 bdb_f5">
<text class="mr26">出仓单号</text>
<u-input disabled placeholder="保存后自动生成" v-model="form.order_no" />
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">出仓类型</text>
<view>{{ getBillTypeName() }}</view>
</view>
<view @click="pickerSelectFun('染厂')" class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">染厂<text class="redXingh">*</text></text>
<view :class="form.business_unit_name ? '' : 'cBlack'">
{{ form.business_unit_name || '请选择' }}
<u-icon v-if="headerEditable" class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
<view v-if="showHeaderToggle" class="fabric-out-headerBar" @click="toggleHeader">
<view class="fabric-out-headerBarMain">
<text class="fabric-out-headerBarTitle">单据信息</text>
<text v-if="form.order_no" class="fabric-out-headerBarSub">{{ form.order_no }}</text>
</view>
<view class="fabric-out-headerBarAction">
<text>{{ headerExpanded ? '收起' : '展开' }}</text>
<u-icon class="fabric-out-headerBarIcon" :name="headerExpanded ? 'arrow-up' : 'arrow-down'" size="32" color="#2979ff"></u-icon>
</view>
</view>
<view v-show="headerExpanded">
<OrderStatusBar class="fabric-out-mt32" :status="displayAuditStatus" :name="displayAuditStatusName" />
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">{{ dateLabel }}<text class="redXingh">*</text></text>
<picker mode="date" :value="form.delivery_time" :disabled="!headerEditable" @change="bindDateChange">
<view>{{ form.delivery_time }}</view>
</picker>
<view class="flex-white-plr26 ptb10 bdb_f5">
<text class="mr26">出仓单号</text>
<u-input disabled placeholder="保存后自动生成" v-model="form.order_no" />
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">出仓类型</text>
<view>{{ getBillTypeName() }}</view>
</view>
<view @click="pickerSelectFun('接收单位')" class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">接收单位<text class="redXingh">*</text></text>
<view :class="form.business_unit_name ? '' : 'cBlack'">
{{ form.business_unit_name || '请选择' }}
<u-icon v-if="headerEditable" class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
</view>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">{{ dateLabel }}<text class="redXingh">*</text></text>
<picker mode="date" :value="form.delivery_time" :disabled="!headerEditable" @change="bindDateChange">
<view>{{ form.delivery_time }}</view>
</picker>
</view>
<view class="flex-white-plr26-column ptb20 mt32">
<view style="margin-bottom: 8rpx;"><text>单据备注</text></view>
<u-input v-model="form.remark" :disabled="!headerEditable" type="textarea" :border="true" :height="100" :auto-height="true" />
</view>
</view>
<view class="flex-white-plr26-column ptb20 mt32">
<view style="margin-bottom: 8rpx;"><text>单据备注</text></view>
<u-input v-model="form.remark" :disabled="!headerEditable" type="textarea" :border="true" :height="100" :auto-height="true" />
</view>
<FabricOutDetailList
:list="form.item_data"
@fabric-info="openFabricInfo"
@fine-code="openFineCode"
>
<view v-if="showScanSection">
<PlusBarcodePanel
ref="plusBarcodePanel"
:visible.sync="phoneScanPanelOpen"
hint-text="连续扫码出仓,扫完可继续下一条"
:scan-time-space="1200"
@success="onPlusBarcodeSuccess"
/>
<FabricOutScanBar
slot="before-list"
:can-scan="canScan"
:value="QRBarCode"
:delete-mode="BarCodeDelStatus"
:message="BillDataMessage"
disabled-tip="请先提交保存后再扫码"
:show-phone-scan="usePhoneScanFallback"
:scanning="phoneScanPanelOpen"
@input="QRBarCode = $event"
@scan="handleScan"
@phone-scan="handlePhoneScan"
@delete-mode-change="BarCodeDelChange"
/>
<FabricOutScanDetail
slot="before-list"
:detail="scanDetail"
:item-data="form.item_data"
:group-keys="scanGroupKeys"
@group-change="scanGroupKeys = $event"
/>
</FabricOutDetailList>
<FabricOutSummaryTable
:rows="form.summary_rows"
@cell-click="onSummaryCellClick"
/>
</view>
<FabricOutFooter
v-if="!headerSaved"
:buttons="[{ label: '提交保存', action: 'save' }]"
single
@action="submitSave"
/>
<FabricOutFooter
v-else
:buttons="statusActionButtons"
@action="handleStatusAction"
/>
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
<search-select-popup
:show.sync="selectShow"
title="选择接收单位"
placeholder="请输入染厂名称"
:list="selectList"
@confirm="selectConfirmFun"
/>
<FabricInfoPopup :show.sync="fabricInfoShow" :data="currentFabricInfo" />
<FineCodePopup :show.sync="fineCodeShow" :list="currentFineCodes" :readonly="false" @delete="onDeleteFineCode" />
</view>
</template>
<script>
import formMixin from './storeFabricBusinessOutMixin.js';
import FabricInfoPopup from '@/components/storefabric/FabricInfoPopup.vue';
import FineCodePopup from '@/components/storefabric/FineCodePopup.vue';
import OrderStatusBar from '@/components/storefabric/OrderStatusBar.vue';
import FabricOutDetailList from '@/components/storefabric/FabricOutDetailList.vue';
import FabricOutScanBar from '@/components/storefabric/FabricOutScanBar.vue';
import FabricOutScanDetail from '@/components/storefabric/FabricOutScanDetail.vue';
import FabricOutSummaryTable from '@/components/storefabric/FabricOutSummaryTable.vue';
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
import SearchSelectPopup from '@/components/storefabric/SearchSelectPopup.vue';
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
export default {
components: {
FabricInfoPopup,
FineCodePopup,
OrderStatusBar,
FabricOutDetailList,
FabricOutScanBar,
FabricOutScanDetail,
FabricOutSummaryTable,
FabricOutFooter,
SearchSelectPopup,
PlusBarcodePanel,
},
mixins: [formMixin],
onLoad() {
uni.setNavigationBarTitle({ title: '新增坯布出仓单' });
this.pageMode = 'add';
this.loadBaseDropdowns();
},
};
</script>
<style lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
page {
background-color: #F8F8F8;
padding-bottom: 260rpx;
}
</style>
@@ -1,57 +1,79 @@
<template>
<view class="fabric-out-page">
<OrderStatusBar class="fabric-out-mt32" :status="displayAuditStatus" :name="displayAuditStatusName" />
<view class="flex-white-plr26 ptb10 bdb_f5">
<text class="mr26">出仓单号</text>
<text>{{ form.order_no }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">出仓类型</text>
<text>{{ getBillTypeName() }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">染厂</text>
<text>{{ form.business_unit_name || '-' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">{{ dateLabel }}</text>
<text>{{ form.delivery_time }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">单据备注</text>
<text>{{ form.remark || '-' }}</text>
<view v-if="showHeaderToggle" class="fabric-out-headerBar" @click="toggleHeader">
<view class="fabric-out-headerBarMain">
<text class="fabric-out-headerBarTitle">单据信息</text>
<text v-if="form.order_no" class="fabric-out-headerBarSub">{{ form.order_no }}</text>
</view>
<view class="fabric-out-headerBarAction">
<text>{{ headerExpanded ? '收起' : '展开' }}</text>
<u-icon class="fabric-out-headerBarIcon" :name="headerExpanded ? 'arrow-up' : 'arrow-down'" size="32" color="#2979ff"></u-icon>
</view>
</view>
<FabricOutDetailList
:list="form.item_data"
@fabric-info="openFabricInfo"
@fine-code="openFineCode"
>
<view v-show="headerExpanded">
<OrderStatusBar class="fabric-out-mt32" :status="displayAuditStatus" :name="displayAuditStatusName" />
<view class="flex-white-plr26 ptb10 bdb_f5">
<text class="mr26">出仓单号</text>
<text>{{ form.order_no }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">出仓类型</text>
<text>{{ getBillTypeName() }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">接收单位</text>
<text>{{ form.business_unit_name || '-' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">{{ dateLabel }}</text>
<text>{{ form.delivery_time }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">单据备注</text>
<text>{{ form.remark || '-' }}</text>
</view>
</view>
<view v-if="showScanSection">
<PlusBarcodePanel
ref="plusBarcodePanel"
:visible.sync="phoneScanPanelOpen"
hint-text="连续扫码出仓,扫完可继续下一条"
:scan-time-space="1200"
@success="onPlusBarcodeSuccess"
/>
<FabricOutScanBar
slot="before-list"
:can-scan="canScan"
:value="QRBarCode"
:delete-mode="BarCodeDelStatus"
:message="BillDataMessage"
:show-phone-scan="usePhoneScanFallback"
:scanning="phoneScanPanelOpen"
@input="QRBarCode = $event"
@scan="handleScan"
@phone-scan="handlePhoneScan"
@delete-mode-change="BarCodeDelChange"
/>
<FabricOutScanDetail
slot="before-list"
:detail="scanDetail"
:item-data="form.item_data"
:group-keys="scanGroupKeys"
@group-change="scanGroupKeys = $event"
/>
</FabricOutDetailList>
<FabricOutSummaryTable
:rows="form.summary_rows"
@cell-click="onSummaryCellClick"
/>
</view>
<FabricOutFooter :buttons="statusActionButtons" @action="handleStatusAction" />
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
<search-select-popup
:show.sync="selectShow"
title="选择接收单位"
placeholder="请输入染厂名称"
:list="selectList"
@confirm="selectConfirmFun"
/>
<FabricInfoPopup :show.sync="fabricInfoShow" :data="currentFabricInfo" />
<FineCodePopup :show.sync="fineCodeShow" :list="currentFineCodes" :readonly="false" @delete="onDeleteFineCode" />
</view>
@@ -62,25 +84,36 @@ import formMixin from './storeFabricBusinessOutMixin.js';
import FabricInfoPopup from '@/components/storefabric/FabricInfoPopup.vue';
import FineCodePopup from '@/components/storefabric/FineCodePopup.vue';
import OrderStatusBar from '@/components/storefabric/OrderStatusBar.vue';
import FabricOutDetailList from '@/components/storefabric/FabricOutDetailList.vue';
import FabricOutScanBar from '@/components/storefabric/FabricOutScanBar.vue';
import FabricOutScanDetail from '@/components/storefabric/FabricOutScanDetail.vue';
import FabricOutSummaryTable from '@/components/storefabric/FabricOutSummaryTable.vue';
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
import SearchSelectPopup from '@/components/storefabric/SearchSelectPopup.vue';
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
export default {
components: {
FabricInfoPopup,
FineCodePopup,
OrderStatusBar,
FabricOutDetailList,
FabricOutScanBar,
FabricOutScanDetail,
FabricOutSummaryTable,
FabricOutFooter,
SearchSelectPopup,
PlusBarcodePanel,
},
mixins: [formMixin],
data() {
return {
pageMode: 'edit',
headerExpanded: false,
};
},
onLoad(e) {
uni.setNavigationBarTitle({ title: '编辑坯布出仓单' });
this.pageMode = 'edit';
this.headerExpanded = false;
if (e.id) {
this.loadOrder(Number(e.id), { rejectIfLocked: true });
}
@@ -1,9 +1,19 @@
<template>
<view>
<view class="filterBar">
<u-search v-model="filters.order_no" placeholder="出仓单号" :show-action="false" @search="loadList" @custom="loadList" />
<view class="filterBtn" @click="filterShow = true">
<u-icon name="list" size="40" color="#666"></u-icon>
<u-search
v-model="filters.order_no"
placeholder="出仓单号"
:show-action="false"
@search="applySearch"
@custom="applySearch"
@clear="applySearch"
/>
<view class="filterBtn" :class="{ 'filterBtn--active': hasActiveFilter }" @click="filterShow = true">
<view class="filterBtn__icon">
<u-icon name="list" size="44" :color="hasActiveFilter ? '#2979ff' : '#666'"></u-icon>
<view v-if="hasActiveFilter" class="filterBtn__badge"></view>
</view>
<text>筛选</text>
</view>
</view>
@@ -20,36 +30,48 @@
<addBtn url="./storeFabricBusinessOutAdd"></addBtn>
<u-popup v-model="filterShow" mode="right" width="580rpx" :safe-area-inset-bottom="true">
<u-popup v-model="filterShow" mode="right" width="580rpx" :safe-area-inset-bottom="true" @close="cancelFilterEdit">
<view class="filterPanel">
<view class="filterTitle">筛选条件</view>
<view class="filterItem">
<text class="filterLabel">出仓单号</text>
<u-input v-model="filters.order_no" placeholder="请输入出仓单号" />
<view class="filterInput">
<u-input
v-model="filters.order_no"
placeholder="请输入出仓单号"
:height="100"
:custom-style="{ fontSize: '36rpx', color: '#202328' }"
placeholder-style="color: #aeb4bf; font-size: 34rpx;"
/>
</view>
</view>
<view class="filterItem">
<text class="filterLabel">出仓日期</text>
<view class="dateRow">
<picker mode="date" :value="filters.start_date" @change="e => filters.start_date = e.detail.value">
<view class="dateInput">{{ filters.start_date || '开始日期' }}</view>
<picker class="datePicker" mode="date" :value="filters.start_date" @change="e => filters.start_date = e.detail.value">
<view class="dateInput" :class="{ 'dateInput--placeholder': !filters.start_date }">
{{ filters.start_date || '开始日期' }}
</view>
</picker>
<text>~</text>
<picker mode="date" :value="filters.end_date" @change="e => filters.end_date = e.detail.value">
<view class="dateInput">{{ filters.end_date || '结束日期' }}</view>
<text class="dateSeparator">~</text>
<picker class="datePicker" mode="date" :value="filters.end_date" @change="e => filters.end_date = e.detail.value">
<view class="dateInput" :class="{ 'dateInput--placeholder': !filters.end_date }">
{{ filters.end_date || '结束日期' }}
</view>
</picker>
</view>
</view>
<!-- <view class="filterItem" @click="openDeliveryUnitSelect">-->
<!-- <text class="filterLabel">出仓单位</text>-->
<!-- <view class="filterValue">{{ deliveryUnitLabel || '全部' }} <u-icon name="arrow-right" size="28"></u-icon></view>-->
<!-- </view>-->
<view class="filterItem" @click="openDeliveryUnitSelect">
<text class="filterLabel">出仓单位</text>
<view class="filterValue">{{ deliveryUnitLabel || '全部' }} <u-icon name="arrow-right" size="36"></u-icon></view>
</view>
<view class="filterItem" @click="openBusinessUnitSelect">
<text class="filterLabel">染厂</text>
<view class="filterValue">{{ businessUnitLabel || '全部' }} <u-icon name="arrow-right" size="28"></u-icon></view>
<text class="filterLabel">接收单位</text>
<view class="filterValue">{{ businessUnitLabel || '全部' }} <u-icon name="arrow-right" size="36"></u-icon></view>
</view>
<view class="filterItem" @click="openStatusSelect">
<text class="filterLabel">订单状态</text>
<view class="filterValue">{{ statusLabel || '全部' }} <u-icon name="arrow-right" size="28"></u-icon></view>
<view class="filterValue">{{ statusLabel || '全部' }} <u-icon name="arrow-right" size="36"></u-icon></view>
</view>
<view class="filterActions">
<u-button type="warning" size="medium" @click="resetFilter">重置</u-button>
@@ -58,26 +80,76 @@
</view>
</u-popup>
<u-select v-model="statusSelectShow" :list="statusSelectList" @confirm="onStatusConfirm"></u-select>
<u-select v-model="unitSelectShow" :list="unitSelectList" @confirm="onUnitConfirm"></u-select>
<u-select
class="pdaSelect"
v-model="statusSelectShow"
title="选择订单状态"
:list="statusSelectList"
:default-value="statusSelectDefault"
@confirm="onStatusConfirm"
></u-select>
<u-select
class="pdaSelect"
v-model="unitSelectShow"
title="选择出仓单位"
:list="unitSelectList"
:default-value="unitSelectDefault"
@confirm="onUnitConfirm"
></u-select>
<search-select-popup
:show.sync="businessUnitSelectShow"
title="选择接收单位"
placeholder="请输入染厂名称"
:list="businessUnitSelectList"
@confirm="onBusinessUnitConfirm"
/>
</view>
</template>
<script>
import addBtn from '@/components/addBtn/addBtn.vue';
import FabricOutItem from '@/components/card/storeFabricBusinessOutItem.vue';
import SearchSelectPopup from '@/components/storefabric/SearchSelectPopup.vue';
import {
getStatusOptions,
AUDIT_STATUS,
AUDIT_STATUS_MAP,
BILL_TYPES,
BUSINESS_UNIT_TYPE_DYE_FACTORY,
BUSINESS_UNIT_TYPE_DYEING_FACTORY,
formatRoll,
mapToSelectOptions,
fetchAllOrderList,
} from '@/common/storeFabricBusinessOut';
const FILTER_STORAGE_KEY = 'storeFabricBusinessOutListFilters';
const createDefaultFilters = () => ({
order_no: '',
start_date: '',
end_date: '',
delivery_unit_id: '',
delivery_unit_name: '',
business_unit_id: '',
business_unit_name: '',
audit_status: AUDIT_STATUS.PENDING,
});
const normalizeFilters = (value) => {
const filters = createDefaultFilters();
if (!value || typeof value !== 'object' || Array.isArray(value)) return filters;
Object.keys(filters).forEach((key) => {
if (typeof value[key] === 'string' || typeof value[key] === 'number') {
filters[key] = value[key];
}
});
if (!filters.delivery_unit_id) filters.delivery_unit_name = '';
if (!filters.business_unit_id) filters.business_unit_name = '';
return filters;
};
export default {
components: { addBtn, FabricOutItem },
components: { addBtn, FabricOutItem, SearchSelectPopup },
data() {
return {
list: [],
@@ -86,21 +158,14 @@ export default {
filterShow: false,
statusSelectShow: false,
unitSelectShow: false,
businessUnitSelectShow: false,
unitSelectType: '',
deliveryUnitOptions: [],
businessUnitOptions: [],
unitOptionsLoading: false,
billTypeName: (BILL_TYPES[0] || {}).label || '坯布其他出货单',
filters: {
order_no: '',
start_date: '',
end_date: '',
delivery_unit_id: '',
delivery_unit_name: '',
business_unit_id: '',
business_unit_name: '',
audit_status: '',
},
filters: createDefaultFilters(),
appliedFilters: createDefaultFilters(),
statusSelectList: [
{ value: '', label: '全部' },
...getStatusOptions(),
@@ -119,23 +184,78 @@ export default {
return this.filters.business_unit_name || '';
},
unitSelectList() {
const options = this.unitSelectType === 'delivery' ? this.deliveryUnitOptions : this.businessUnitOptions;
return [{ value: '', label: '全部' }, ...options];
return [{ value: '', label: '全部' }, ...this.deliveryUnitOptions];
},
businessUnitSelectList() {
return [{ value: '', label: '全部' }, ...this.businessUnitOptions];
},
statusSelectDefault() {
const index = this.statusSelectList.findIndex(
(item) => String(item.value) === String(this.filters.audit_status)
);
return [index >= 0 ? index : 0];
},
unitSelectDefault() {
const index = this.unitSelectList.findIndex(
(item) => String(item.value) === String(this.filters.delivery_unit_id)
);
return [index >= 0 ? index : 0];
},
hasActiveFilter() {
const filters = this.appliedFilters;
return Boolean(
String(filters.order_no || '').trim()
|| filters.start_date
|| filters.end_date
|| filters.delivery_unit_id
|| filters.business_unit_id
|| (filters.audit_status !== '' && filters.audit_status !== null)
);
},
},
onLoad() {
uni.setNavigationBarTitle({ title: '坯布出库列表' });
this.restoreFilterCache();
uni.getSystemInfo({
success: (res) => {
this.scrollHeight = `${res.windowHeight - 50}px`;
},
});
this.loadList();
},
onShow() {
this.loadList();
},
methods: {
restoreFilterCache() {
try {
const filters = normalizeFilters(uni.getStorageSync(FILTER_STORAGE_KEY));
this.filters = { ...filters };
this.appliedFilters = { ...filters };
} catch (e) {
this.filters = createDefaultFilters();
this.appliedFilters = createDefaultFilters();
}
},
saveFilterCache() {
try {
uni.setStorageSync(FILTER_STORAGE_KEY, { ...this.appliedFilters });
} catch (e) {
// 缓存失败不影响列表筛选
}
},
commitFilters() {
const filters = normalizeFilters(this.filters);
this.filters = { ...filters };
this.appliedFilters = { ...filters };
this.saveFilterCache();
this.loadList();
},
applySearch() {
this.commitFilters();
},
cancelFilterEdit() {
this.filters = { ...this.appliedFilters };
},
loadDeliveryUnitOptions() {
if (this.deliveryUnitOptions.length) return Promise.resolve(this.deliveryUnitOptions);
return this.$u.api.businessUnit.list({})
@@ -150,7 +270,7 @@ export default {
},
loadBusinessUnitOptions() {
if (this.businessUnitOptions.length) return Promise.resolve(this.businessUnitOptions);
return this.$u.api.businessUnit.list({ unit_type_id: BUSINESS_UNIT_TYPE_DYE_FACTORY })
return this.$u.api.businessUnit.list({ unit_type_id: BUSINESS_UNIT_TYPE_DYEING_FACTORY })
.then((res) => {
this.businessUnitOptions = mapToSelectOptions(res);
return this.businessUnitOptions;
@@ -181,7 +301,23 @@ export default {
this.openUnitSelect('delivery');
},
openBusinessUnitSelect() {
this.openUnitSelect('business');
if (this.unitOptionsLoading) return;
this.unitOptionsLoading = true;
this.loadBusinessUnitOptions()
.then((list) => {
if (!list.length) {
uni.showToast({ title: '暂无可选单位', icon: 'none' });
return;
}
this.businessUnitSelectShow = true;
})
.finally(() => {
this.unitOptionsLoading = false;
});
},
onBusinessUnitConfirm(item) {
this.filters.business_unit_id = item.value;
this.filters.business_unit_name = item.value ? item.label : '';
},
onUnitConfirm(e) {
const item = e[0] || {};
@@ -194,10 +330,11 @@ export default {
}
},
loadList() {
const filters = this.appliedFilters;
const params = {};
if (this.filters.order_no) params.order_no = this.filters.order_no;
if (this.filters.audit_status !== '' && this.filters.audit_status !== null) {
params.audit_status = this.filters.audit_status;
if (filters.order_no) params.order_no = filters.order_no;
if (filters.audit_status !== '' && filters.audit_status !== null) {
params.audit_status = filters.audit_status;
}
fetchAllOrderList((p) => this.$u.api.gfmOtherDeliveryOrder.list(p), params)
.then((rows) => {
@@ -231,12 +368,13 @@ export default {
},
// 后端列表仅支持 单号/状态 过滤,出仓日期与单位在前端做本地过滤
matchClientFilter(item) {
if (this.filters.start_date && item.out_date < this.filters.start_date) return false;
if (this.filters.end_date && item.out_date > this.filters.end_date) return false;
if (this.filters.delivery_unit_id && String(item.delivery_unit_id) !== String(this.filters.delivery_unit_id)) {
const filters = this.appliedFilters;
if (filters.start_date && item.out_date < filters.start_date) return false;
if (filters.end_date && item.out_date > filters.end_date) return false;
if (filters.delivery_unit_id && String(item.delivery_unit_id) !== String(filters.delivery_unit_id)) {
return false;
}
if (this.filters.business_unit_id && String(item.business_unit_id) !== String(this.filters.business_unit_id)) {
if (filters.business_unit_id && String(item.business_unit_id) !== String(filters.business_unit_id)) {
return false;
}
return true;
@@ -246,40 +384,165 @@ export default {
this.loadList();
},
goView(item) {
uni.navigateTo({ url: `./storeFabricBusinessOutView?id=${item.id}` });
const page = Number(item.audit_status) === AUDIT_STATUS.PENDING
? 'storeFabricBusinessOutEdit'
: 'storeFabricBusinessOutView';
uni.navigateTo({ url: `./${page}?id=${item.id}` });
},
openStatusSelect() { this.statusSelectShow = true; },
onStatusConfirm(e) { this.filters.audit_status = e[0].value; },
resetFilter() {
this.filters = {
order_no: '',
start_date: '',
end_date: '',
delivery_unit_id: '',
delivery_unit_name: '',
business_unit_id: '',
business_unit_name: '',
audit_status: '',
};
this.filters = createDefaultFilters();
},
applyFilter() {
this.commitFilters();
this.filterShow = false;
this.loadList();
},
},
};
</script>
<style>
<style lang="scss">
@import '@/common/pda-typography.scss';
page { background-color: #F8F8F8; }
.filterBar { display: flex; align-items: center; padding: 16rpx 20rpx; background: #fff; gap: 16rpx; }
.filterBtn { display: flex; flex-direction: column; align-items: center; font-size: 22rpx; color: #666; min-width: 80rpx; }
.filterPanel { padding: 30rpx; }
.filterTitle { font-size: 32rpx; font-weight: bold; margin-bottom: 30rpx; }
.filterItem { margin-bottom: 24rpx; }
.filterLabel { display: block; font-size: 28rpx; color: #666; margin-bottom: 12rpx; }
.filterValue { display: flex; align-items: center; justify-content: space-between; padding: 16rpx; background: #f5f5f5; border-radius: 8rpx; font-size: 28rpx; }
.dateRow { display: flex; align-items: center; gap: 12rpx; }
.dateInput { padding: 16rpx; background: #f5f5f5; border-radius: 8rpx; font-size: 26rpx; min-width: 200rpx; text-align: center; }
.filterActions { display: flex; gap: 20rpx; margin-top: 40rpx; }
.filterBtn {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-width: 88rpx;
min-height: 76rpx;
padding: 6rpx 8rpx;
border: 2rpx solid transparent;
border-radius: 10rpx;
box-sizing: border-box;
font-size: $pda-font-nav-sub;
line-height: 1.2;
color: #666;
transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.filterBtn--active {
color: #2979ff;
background: #eef5ff;
border-color: #9fc5ff;
}
.filterBtn__icon {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.filterBtn__badge {
position: absolute;
top: -3rpx;
right: -7rpx;
width: 13rpx;
height: 13rpx;
border: 3rpx solid #fff;
border-radius: 50%;
background: #ff4d4f;
box-sizing: content-box;
}
.filterPanel {
min-height: 100%;
padding: 32rpx 28rpx;
box-sizing: border-box;
}
.filterTitle {
margin-bottom: 30rpx;
font-size: $pda-font-popup-title;
font-weight: bold;
color: #202328;
}
.filterItem { margin-bottom: 28rpx; }
.filterLabel {
display: block;
margin-bottom: 14rpx;
font-size: $pda-font-body;
line-height: 1.35;
color: #555b66;
}
.filterInput {
display: flex;
align-items: center;
min-height: $pda-row-min-height;
padding: 0 18rpx;
background: #f5f6f8;
border-radius: 8rpx;
box-sizing: border-box;
}
::v-deep .filterInput .u-input__input {
font-size: $pda-font-body !important;
color: #202328;
}
::v-deep .filterInput .u-input__input::placeholder {
font-size: $pda-font-placeholder;
color: #aeb4bf;
}
.filterValue {
display: flex;
align-items: center;
justify-content: space-between;
min-height: $pda-row-min-height;
padding: 0 18rpx;
background: #f5f6f8;
border-radius: 8rpx;
box-sizing: border-box;
font-size: $pda-font-body;
color: #202328;
}
.dateRow {
display: flex;
align-items: center;
gap: 10rpx;
}
.datePicker {
flex: 1;
min-width: 0;
}
.dateInput {
display: flex;
align-items: center;
justify-content: center;
min-height: $pda-row-min-height;
padding: 0 8rpx;
background: #f5f6f8;
border-radius: 8rpx;
box-sizing: border-box;
font-size: $pda-font-body;
color: #202328;
text-align: center;
white-space: nowrap;
}
.dateInput--placeholder {
font-size: $pda-font-placeholder;
color: #7d8490;
}
.dateSeparator {
flex-shrink: 0;
font-size: $pda-font-body;
color: #555b66;
}
.filterActions {
display: flex;
gap: 20rpx;
margin-top: 40rpx;
}
.filterActions .u-btn {
flex: 1;
height: $pda-button-height !important;
line-height: $pda-button-height !important;
padding: 0 !important;
font-size: $pda-font-button !important;
}
::v-deep .pdaSelect .u-select__header {
height: $pda-row-min-height;
}
::v-deep .pdaSelect .u-select__header__btn,
::v-deep .pdaSelect .u-select__header__title,
::v-deep .pdaSelect .u-select__body__picker-view__item {
font-size: $pda-font-popup-item !important;
}
</style>
@@ -3,18 +3,17 @@
*
* 业务说明:
* 1. 后端当前仅提供「坯布其他出货单」一种类型的接口,故出仓类型固定为 other,
* 表头保留染厂(business_unit) / 出货日期 / 备注 等字段。
* 2. 用户先填写表头并「提交保存」(addGfmOtherDeliveryOrder),拿到出仓单 id 后即可扫码;
* 表头保留接收单位(business_unit) / 出货日期 / 备注 等字段。
* 2. 用户先填写表头并「提交保存」(addGfmOtherDeliveryOrder),拿到出仓单 id 后才显示扫码区和汇总表;
* 扫码新增/删除细码走 updateGfmOtherDeliveryOrder;勾选锁定维度时附带 *_lock 字段,操作后用返回的最新详情刷新。
* 3. 后端没有「修改表头」接口,保存成功或编辑进入后表头变为只读,仅可扫码维护细码。
* 3. 后端没有「修改表头」接口,保存成功或编辑进入后表头变为只读,并默认收起,仅可扫码维护细码。
*/
import util from '@/common/util';
import scanMixin from '@/common/scanMixin.js';
import { initTts, speak } from '@/common/tts.js';
import {
AUDIT_STATUS_MAP,
BILL_TYPES,
BUSINESS_UNIT_TYPE_DYE_FACTORY,
BUSINESS_UNIT_TYPE_DYEING_FACTORY,
normalizeOrder,
mapToSelectOptions,
getFineCodeScanCode,
@@ -23,6 +22,7 @@ import {
getFormStatusActionButtons,
orderToFormFields,
confirmOrderStatusAction,
STATUS_ACTION_VOICE,
DRAFT_AUDIT_STATUS,
DRAFT_AUDIT_STATUS_NAME,
getEmptyScanDetail,
@@ -32,7 +32,6 @@ import {
buildScanUpdateParams,
getOrderDisplayWeight,
getFineCodeDisplayWeight,
resolveScanMismatchVoice,
} from '@/common/storeFabricBusinessOut';
export default {
@@ -43,6 +42,8 @@ export default {
orderId: 0,
form: this.getEmptyForm(),
headerSaved: false,
// 新增未保存时展开表头;保存后及编辑进入时收起
headerExpanded: true,
selectShow: false,
selectList: [],
selectType: '',
@@ -63,6 +64,7 @@ export default {
auditStatus: 0,
businessUnitOptions: [],
dropdownLoading: false,
phoneScanPanelOpen: false,
};
},
computed: {
@@ -76,6 +78,14 @@ export default {
headerEditable() {
return this.pageMode === 'add' && !this.headerSaved;
},
/** 已保存或编辑页才提供收起/展开 */
showHeaderToggle() {
return this.pageMode === 'edit' || this.headerSaved;
},
/** 未保存只填表头;保存后才出现扫码区与汇总表 */
showScanSection() {
return this.headerSaved;
},
dateLabel() {
return '出货日期';
},
@@ -94,7 +104,6 @@ export default {
},
onShow() {
this.isPageActive = true;
initTts();
if (this.canScan && this.isEditable) {
this.registerScanBroadcast((scanResult) => {
this.QRBarCode = scanResult.trim().replace(/[\r\n]/g, '');
@@ -104,15 +113,28 @@ export default {
},
onHide() {
this.isPageActive = false;
this.closePhoneScanPanel();
this.unregisterScanBroadcast();
},
onUnload() {
this.isPageActive = false;
this.closePhoneScanPanel();
this.unregisterScanBroadcast();
},
methods: {
handlePhoneScan() {
this.openPhoneScan();
if (!this.canScan) {
this.showError('请先提交保存后再扫码');
return;
}
this.phoneScanPanelOpen = !this.phoneScanPanelOpen;
},
closePhoneScanPanel() {
this.phoneScanPanelOpen = false;
},
onPlusBarcodeSuccess(scanResult) {
this.QRBarCode = String(scanResult || '').trim().replace(/[\r\n]/g, '');
return this.handleScan();
},
registerOrderScanBroadcast() {
this.registerScanBroadcast((scanResult) => {
@@ -124,6 +146,7 @@ export default {
const nextCanScan = this.isEditable && canScanAtStatus(status);
if (this.canScan && !nextCanScan) {
this.unregisterScanBroadcast();
this.closePhoneScanPanel();
}
this.canScan = nextCanScan;
},
@@ -139,7 +162,7 @@ export default {
},
ensureBusinessUnitOptions() {
if (this.businessUnitOptions.length) return Promise.resolve(this.businessUnitOptions);
return this.$u.api.businessUnit.list({ unit_type_id: BUSINESS_UNIT_TYPE_DYE_FACTORY })
return this.$u.api.businessUnit.list({ unit_type_id: BUSINESS_UNIT_TYPE_DYEING_FACTORY })
.then((res) => {
this.businessUnitOptions = mapToSelectOptions(res);
return this.businessUnitOptions;
@@ -153,8 +176,13 @@ export default {
delivery_time: this.$u.timeFormat(new Date(), 'yyyy-mm-dd'),
remark: '',
item_data: [],
summary_rows: [],
};
},
toggleHeader() {
if (!this.showHeaderToggle) return;
this.headerExpanded = !this.headerExpanded;
},
loadOrder(id, options = {}) {
const { rejectIfLocked = false } = options;
return this.$u.api.gfmOtherDeliveryOrder.detail({ id })
@@ -194,24 +222,22 @@ export default {
this.selectList = list;
this.selectShow = true;
};
if (type === '染厂') {
if (type === '接收单位') {
this.ensureBusinessUnitOptions()
.then(openPicker)
.catch((e) => this.showError(e.message || '加载单位列表失败'));
}
},
selectConfirmFun(e) {
const item = e[0];
if (this.selectType === '染厂') {
this.form.business_unit_id = item.value;
this.form.business_unit_name = item.label;
}
selectConfirmFun(item) {
if (!item || this.selectType !== '接收单位') return;
this.form.business_unit_id = item.value;
this.form.business_unit_name = item.label;
},
bindDateChange(e) {
this.form.delivery_time = e.detail.value;
},
validateForm() {
if (!this.form.business_unit_id) return '请选择染厂';
if (!this.form.business_unit_id) return '请选择接收单位';
if (!this.form.delivery_time) return '请选择出货日期';
return '';
},
@@ -246,8 +272,9 @@ export default {
const order = normalizeOrder(detail);
this.applyOrder(order);
this.headerSaved = true;
this.headerExpanded = false;
this.syncCanScanFromStatus(order.audit_status);
this.showSuccess('保存成功,可以扫码');
this.showSuccess('保存成功,可以扫码', '提交成功');
this.registerOrderScanBroadcast();
})
.catch((e) => {
@@ -302,14 +329,14 @@ export default {
if (!this.canScan || !this.orderId) {
this.showError('请先提交保存后再扫码');
this.QRBarCode = '';
return;
return Promise.resolve();
}
if (!code) {
this.QRBarCode = '';
return;
return Promise.resolve();
}
const scanType = this.BarCodeDelStatus ? 2 : 1;
this.doScanUpdate(code, scanType);
return this.doScanUpdate(code, scanType);
},
BarCodeDelChange(e) {
this.BarCodeDelStatus = (e.detail.value || []).length > 0;
@@ -329,27 +356,22 @@ export default {
uni.hideLoading();
const order = normalizeOrder(detail);
this.form.item_data = order.item_data;
this.form.summary_rows = order.summary_rows || [];
this.auditStatus = order.audit_status;
this.applyScanDetail(scanCode, order, scanType);
if (refreshFineCodes) {
const row = order.item_data.find((i) => (i.group_key || String(i.id)) === this.currentGroupKey);
this.currentFineCodes = row ? [...row.fine_codes] : [];
const rows = order.summary_rows || [];
const row = rows.find((i) => i.group_key === this.currentGroupKey);
this.currentFineCodes = row ? [...(row.fine_codes || [])] : [];
}
this.BillDataMessage = scanType === 2 ? '删除成功' : '扫描成功';
this.BillDataMessage = scanType === 2 ? '删除成功' : '扫码出仓成功';
this.QRBarCode = '';
if (scanType === 2) {
speak('已删除出仓');
uni.showToast({ title: '删除成功', icon: 'success' });
} else {
speak('成功');
}
if (scanType === 2) this.showSuccess('删除成功', '删除成功');
else util.playSpeak('扫码出仓成功');
})
.catch((e) => {
uni.hideLoading();
const message = e.message || (scanType === 2 ? '删除失败' : '扫码失败');
const mismatchVoice = resolveScanMismatchVoice(message);
if (mismatchVoice) speak(mismatchVoice);
this.showError(message, { skipErrorAudio: !!mismatchVoice });
this.showError(e.message || (scanType === 2 ? '删除失败' : '扫码失败'));
this.QRBarCode = '';
});
},
@@ -362,6 +384,15 @@ export default {
this.currentFineCodes = [...(row.fine_codes || [])];
this.fineCodeShow = true;
},
onSummaryCellClick(event) {
const row = event && event.lineData;
if (!row) return;
if (event.key === 'grey_fabric_code' || event.key === 'grey_fabric_name') {
this.openFabricInfo(row);
return;
}
this.openFineCode(row);
},
onDeleteFineCode(fineCode) {
if (this.isReadonly || !this.canScan) return;
const scanCode = getFineCodeScanCode(fineCode);
@@ -389,16 +420,18 @@ export default {
if (!order) return;
this.applyOrder(order);
this.syncCanScanFromStatus(order.audit_status);
this.showSuccess('操作成功');
const voice = STATUS_ACTION_VOICE[action] || '';
this.showSuccess(voice || '操作成功', voice);
}),
});
},
showError(message, options = {}) {
if (!options.skipErrorAudio) util.playErrorAudio();
showError(message) {
util.playErrorAudio();
uni.showModal({ title: '提示', content: message, showCancel: false });
},
showSuccess(message) {
util.playSuccessAudio();
showSuccess(message, speakText) {
if (speakText) util.playSpeak(speakText);
else util.playSuccessAudio();
uni.showToast({ title: message, icon: 'success' });
},
getBillTypeName() {
@@ -6,8 +6,66 @@
.fabric-out-mt32 {
margin-top: 32rpx;
}
.fabric-out-headerBar {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 100rpx;
padding: 16rpx 26rpx;
background: #fff;
border-bottom: 1rpx solid #f5f5f5;
box-sizing: border-box;
}
.fabric-out-headerBarMain {
display: flex;
align-items: center;
min-width: 0;
flex: 1;
}
.fabric-out-headerBarTitle {
font-size: 40rpx;
font-weight: bold;
color: #333;
flex-shrink: 0;
}
.fabric-out-headerBarSub {
margin-left: 16rpx;
font-size: 36rpx;
color: #666;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fabric-out-headerBarAction {
display: flex;
align-items: center;
flex-shrink: 0;
margin-left: 16rpx;
font-size: 36rpx;
color: #2979ff;
}
.fabric-out-headerBarIcon {
margin-left: 8rpx;
}
.fabric-out-page .flex-white-plr26,
.fabric-out-page .flex-white-plr26-column,
.fabric-out-page .flex-white-plr26 text,
.fabric-out-page .flex-white-plr26 view,
.fabric-out-page .u-input__input,
.fabric-out-page .uni-input-input,
.fabric-out-page .uni-textarea-textarea {
font-size: 40rpx;
}
.fabric-out-page .redXingh {
font-size: 40rpx;
}
.fabric-out-page .u-btn {
font-size: 36rpx !important;
height: 88rpx;
line-height: 88rpx;
}
.fabric-out-sectionTitle {
font-size: 30rpx;
font-size: 42rpx;
font-weight: bold;
padding: 24rpx 26rpx 12rpx;
border-left: 6rpx solid #007AFF;
@@ -16,7 +74,7 @@
.fabric-out-scanTip {
padding: 20rpx 26rpx;
color: #fa8c16;
font-size: 26rpx;
font-size: 36rpx;
background: #fff7e6;
margin: 16rpx 26rpx;
border-radius: 8rpx;
@@ -24,7 +82,7 @@
.fabric-out-msgTip {
padding: 12rpx 26rpx;
color: #52c41a;
font-size: 26rpx;
font-size: 36rpx;
}
.fabric-out-detailList {
padding: 0 26rpx;
@@ -39,7 +97,7 @@
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
font-size: 38rpx;
font-weight: bold;
padding-bottom: 12rpx;
border-bottom: 1rpx solid #f0f0f0;
@@ -49,7 +107,7 @@
align-items: center;
gap: 20rpx;
padding-top: 12rpx;
font-size: 26rpx;
font-size: 36rpx;
color: #666;
}
.fabric-out-scanRow {
@@ -66,7 +124,7 @@
.fabric-out-delCheck {
display: flex;
align-items: center;
font-size: 26rpx;
font-size: 36rpx;
color: #666;
white-space: nowrap;
}
@@ -82,7 +140,7 @@
flex-wrap: wrap;
padding: 16rpx 20rpx;
border-bottom: 1rpx solid #f0f0f0;
font-size: 26rpx;
font-size: 36rpx;
color: #333;
}
.fabric-out-scanDetailRow--2col {
@@ -108,34 +166,6 @@
color: #333;
word-break: break-all;
}
.fabric-out-scanDetailTableScroll {
width: 100%;
}
.fabric-out-scanDetailTable {
min-width: 100%;
}
.fabric-out-scanDetailTableRow {
display: flex;
border-bottom: 1rpx solid #f0f0f0;
}
.fabric-out-scanDetailTableHead {
background: #f5f5f5;
font-weight: bold;
}
.fabric-out-scanDetailTableCell {
padding: 14rpx 8rpx;
font-size: 24rpx;
color: #333;
text-align: center;
box-sizing: border-box;
word-break: break-all;
}
.fabric-out-scanDetailEmpty {
padding: 24rpx;
text-align: center;
font-size: 26rpx;
color: #999;
}
.fabric-out-submitView {
width: 100%;
padding: 16rpx 26rpx 26rpx;
@@ -11,7 +11,7 @@
<text>{{ billTypeName }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">染厂</text><text>{{ order.business_unit_name }}</text>
<text class="mr26">接收单位</text><text>{{ order.business_unit_name }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">出货日期</text><text>{{ formatTime(order.delivery_time) }}</text>
@@ -53,6 +53,7 @@ import {
getViewStatusActionButtons,
confirmOrderStatusAction,
formatDisplayTime,
STATUS_ACTION_VOICE,
} from '@/common/storeFabricBusinessOut';
export default {
@@ -123,8 +124,10 @@ export default {
uni.hideLoading();
const order = normalizeOrder(res);
if (order) this.order = order;
util.playSuccessAudio();
uni.showToast({ title: '操作成功', icon: 'success' });
const voice = STATUS_ACTION_VOICE[action] || '';
if (voice) util.playSpeak(voice);
else util.playSuccessAudio();
uni.showToast({ title: voice || '操作成功', icon: 'success' });
}),
});
},
@@ -0,0 +1,691 @@
<template>
<view class="manual-in">
<common-navbar title="手动进仓">
<template #right>
<view class="manual-in__setting" @click="navToSetting">
<u-icon name="setting" color="#333333" size="34"></u-icon>
<text>设置</text>
</view>
</template>
</common-navbar>
<PlusBarcodePanel
ref="plusBarcodePanel"
:visible.sync="phoneScanPanelOpen"
hint-text="先扫描布票,再填写信息后确认进仓"
:scan-time-space="1200"
@success="onPlusBarcodeSuccess"
/>
<view class="manual-in__scan">
<input
class="manual-in__scan-input"
type="text"
confirm-type="done"
:confirm-hold="true"
:focus="scanFocus"
v-model="scanCode"
placeholder="请先扫描布票编码"
placeholder-class="manual-in__placeholder"
@confirm="onScanConfirm"
/>
<view
v-if="scanCode"
class="manual-in__scan-icon"
@click.stop="clearScanCode"
>
<u-icon name="close-circle-fill" size="44" color="#bfbfbf" />
</view>
<view
v-if="phoneScanPanelOpen"
class="manual-in__scan-close"
@click.stop="handlePhoneScan"
>
关闭扫码
</view>
<view
v-else
class="manual-in__scan-icon"
@click.stop="handlePhoneScan"
>
<u-icon name="scan" size="44" color="#595959" />
</view>
</view>
<view class="manual-in__panel">
<view class="manual-in__row">
<text class="manual-in__label">布票编码</text>
<text class="manual-in__value">{{ detail.fabric_piece_code || '-' }}</text>
</view>
<view class="manual-in__row">
<text class="manual-in__label">生产单号</text>
<text class="manual-in__value">{{ detail.production_order_no || '-' }}</text>
</view>
<view class="manual-in__row">
<text class="manual-in__label">机台</text>
<text class="manual-in__value">{{ detail.machine_number || '-' }}</text>
</view>
<view class="manual-in__row">
<text class="manual-in__label">布种名称</text>
<text class="manual-in__value">{{ detail.grey_fabric_name || '-' }}</text>
</view>
<view class="manual-in__row">
<text class="manual-in__label">坯布编号</text>
<text class="manual-in__value">{{ detail.grey_fabric_code || '-' }}</text>
</view>
<view class="manual-in__row">
<text class="manual-in__label">卷号</text>
<text class="manual-in__value">{{ detail.volume_number != null && detail.volume_number !== '' ? detail.volume_number : '-' }}</text>
</view>
</view>
<view class="manual-in__panel manual-in__panel--form">
<view class="manual-in__row manual-in__row--input" @click="openInspectorPicker">
<text class="manual-in__label">查布工</text>
<view class="manual-in__right">
<text :class="detail.inspector_name ? 'manual-in__field-text' : 'manual-in__placeholder'">
{{ detail.inspector_name || '请选择查布工' }}
</text>
<text class="manual-in__action" @click.stop="clearInspector">取消</text>
</view>
</view>
<view class="manual-in__row manual-in__row--input">
<text class="manual-in__label">重量</text>
<view class="manual-in__right">
<input
class="manual-in__field"
type="digit"
v-model="weightKg"
placeholder="请输入"
placeholder-class="manual-in__placeholder"
/>
<text class="manual-in__unit">KG</text>
<text class="manual-in__action" @click="clearWeight">取消</text>
</view>
</view>
<view class="manual-in__row manual-in__row--input" @click="openLevelPicker">
<text class="manual-in__label">等级</text>
<view class="manual-in__right">
<text :class="levelDisplayName ? 'manual-in__field-text' : 'manual-in__placeholder'">
{{ levelDisplayName || '请选择等级' }}
</text>
<text class="manual-in__action" @click.stop="clearLevel">取消</text>
</view>
</view>
<view class="manual-in__row manual-in__row--input">
<text class="manual-in__label">存放仓位</text>
<view class="manual-in__right">
<input
class="manual-in__field"
type="text"
v-model="warehouseBinName"
placeholder="/"
placeholder-class="manual-in__placeholder"
/>
<text class="manual-in__action" @click="editWarehouseBin">修改</text>
</view>
</view>
</view>
<view class="manual-in__footer">
<u-button
type="primary"
:loading="submitting"
:disabled="submitting || loadingDetail"
@click="submitInWarehouse"
>
确认进仓
</u-button>
</view>
<SearchSelectPopup
:show.sync="levelPickerShow"
title="选择等级"
placeholder="请输入等级名称"
:list="levelOptions"
multiple
:selected="detail.grey_fabric_level_id"
@confirm="onLevelConfirm"
/>
<SearchSelectPopup
:show.sync="inspectorPickerShow"
title="选择查布工"
placeholder="请输入查布工姓名"
:list="inspectorOptions"
@confirm="onInspectorConfirm"
/>
</view>
</template>
<script>
import CommonNavbar from '@/components/common-navbar/index';
import SearchSelectPopup from '@/components/storefabric/SearchSelectPopup.vue';
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
import scanMixin from '@/common/scanMixin.js';
import util from '@/common/util.js';
import { formatWeightKg } from '@/common/storeFabricBusinessOut.js';
// 坯布等级字典 id(与后台字典配置一致)
const DICTIONARY_TYPE_GREY_FABRIC_LEVEL = 10025;
// 查布工岗位 duty(验布/查布相关)
const INSPECTOR_DUTY = '20004,20011';
const WEIGHT_SCALE = 10000;
function emptyDetail() {
return {
fabric_piece_code: '',
production_order_no: '',
machine_number: '',
grey_fabric_name: '',
grey_fabric_code: '',
inspection_weight: null,
grey_fabric_level_id: [],
grey_fabric_level_name: '',
inspector_id: null,
inspector_name: '',
volume_number: '',
grey_fabric_id: '',
id: '',
};
}
function toWeightInt(kg) {
const raw = String(kg == null ? '' : kg).trim();
if (!raw) return null;
const n = Number(raw);
if (!Number.isFinite(n) || n <= 0) return null;
return Math.round(n * WEIGHT_SCALE);
}
function formatDisplayWeightKg(value) {
if (value == null || value === '') return '';
const n = Number(value);
if (!Number.isFinite(n) || n <= 0) return '';
return String(formatWeightKg(n));
}
function normalizeLevelIds(value) {
if (Array.isArray(value)) {
return value.map((item) => Number(item)).filter((item) => Number.isFinite(item));
}
if (value == null || value === '') return [];
const n = Number(value);
return Number.isFinite(n) ? [n] : [];
}
export default {
components: { CommonNavbar, SearchSelectPopup, PlusBarcodePanel },
mixins: [scanMixin],
data() {
return {
scanCode: '',
scanFocus: true,
submitting: false,
loadingDetail: false,
warehouseBinId: null,
warehouseBinName: '',
weightKg: '',
detail: emptyDetail(),
levelPickerShow: false,
levelOptions: [],
levelOptionsLoaded: false,
inspectorPickerShow: false,
inspectorOptions: [],
inspectorOptionsLoaded: false,
phoneScanPanelOpen: false,
};
},
computed: {
levelDisplayName() {
if (this.detail.grey_fabric_level_name) return this.detail.grey_fabric_level_name;
const ids = normalizeLevelIds(this.detail.grey_fabric_level_id);
if (!ids.length) return '';
const nameMap = {};
this.levelOptions.forEach((item) => {
nameMap[String(item.value)] = item.label;
});
return ids.map((id) => nameMap[String(id)]).filter(Boolean).join('、');
},
},
onLoad() {
this.registerScanBroadcast(this.handleScanCode);
this.loadLevelOptions();
this.loadInspectorOptions();
},
onShow() {
this.isPageActive = true;
this.refocusScanInput(50);
},
onHide() {
this.isPageActive = false;
this.closePhoneScanPanel();
},
onUnload() {
this.isPageActive = false;
this.closePhoneScanPanel();
clearTimeout(this._scanFocusTimer);
},
methods: {
refocusScanInput(delay = 120) {
clearTimeout(this._scanFocusTimer);
this.scanFocus = false;
this._scanFocusTimer = setTimeout(() => {
this.scanFocus = true;
}, delay);
},
closePhoneScanPanel() {
this.phoneScanPanelOpen = false;
},
onPlusBarcodeSuccess(scanResult) {
return this.handleScanCode(scanResult);
},
navToSetting() {
uni.navigateTo({ url: '/pages/sys/user/scan-settings' });
},
clearWeight() {
this.weightKg = '';
this.detail.inspection_weight = null;
},
clearLevel() {
this.detail.grey_fabric_level_id = [];
this.detail.grey_fabric_level_name = '';
},
clearInspector() {
this.detail.inspector_id = null;
this.detail.inspector_name = '';
},
editWarehouseBin() {
uni.showModal({
title: '存放仓位',
editable: true,
placeholderText: '请输入仓位名称',
content: this.warehouseBinName || '',
success: (res) => {
if (!res.confirm) return;
this.warehouseBinName = (res.content || '').trim();
this.warehouseBinId = null;
},
});
},
async loadLevelOptions() {
try {
const res = await this.$u.api.dictionary.getDetailEnumList({
dictionary_id: DICTIONARY_TYPE_GREY_FABRIC_LEVEL,
status: 1,
size: 200,
});
const list = Array.isArray(res) ? res : (Array.isArray(res && res.list) ? res.list : []);
this.levelOptions = list
.map((item) => ({
value: item.id,
label: item.name || item.code || String(item.id),
}))
.filter((item) => item.value != null);
this.levelOptionsLoaded = true;
} catch (error) {
console.log('加载坯布等级枚举失败', error);
this.levelOptions = [];
}
},
async openLevelPicker() {
if (!this.levelOptionsLoaded || !this.levelOptions.length) {
await this.loadLevelOptions();
}
if (!this.levelOptions.length) {
this.$u.toast('暂无等级可选,请检查等级字典配置');
return;
}
this.levelPickerShow = true;
},
onLevelConfirm(items) {
const list = Array.isArray(items) ? items : (items ? [items] : []);
this.detail.grey_fabric_level_id = list
.map((item) => Number(item.value))
.filter((item) => Number.isFinite(item));
this.detail.grey_fabric_level_name = list
.map((item) => item.label)
.filter(Boolean)
.join('、');
},
async loadInspectorOptions() {
try {
const res = await this.$u.api.employee.listEnum({
size: 50,
duty: INSPECTOR_DUTY,
});
const list = Array.isArray(res) ? res : (Array.isArray(res && res.list) ? res.list : []);
this.inspectorOptions = list
.map((item) => ({
value: item.id,
label: item.name || item.employee_name || item.real_name || item.code || String(item.id),
}))
.filter((item) => item.value != null);
this.inspectorOptionsLoaded = true;
} catch (error) {
console.log('加载查布工枚举失败', error);
this.inspectorOptions = [];
}
},
async openInspectorPicker() {
if (!this.inspectorOptionsLoaded || !this.inspectorOptions.length) {
await this.loadInspectorOptions();
}
if (!this.inspectorOptions.length) {
this.$u.toast('暂无查布工可选');
return;
}
this.inspectorPickerShow = true;
},
onInspectorConfirm(item) {
if (!item) return;
this.detail.inspector_id = Number(item.value);
this.detail.inspector_name = item.label || '';
},
handleScanCode(scanResult) {
const code = String(scanResult || '').trim().replace(/[\r\n]/g, '');
if (!code) return;
this.fetchScanDetail(code);
},
clearScanCode() {
this.scanCode = '';
this.refocusScanInput();
},
handlePhoneScan() {
this.phoneScanPanelOpen = !this.phoneScanPanelOpen;
},
onScanConfirm() {
const code = String(this.scanCode || '').trim();
if (!code) {
this.$u.toast('请扫描或输入布票编码');
return;
}
this.fetchScanDetail(code);
},
validateBeforeSubmit() {
const fabricPieceCode = String(this.detail.fabric_piece_code || this.scanCode || '').trim();
if (!fabricPieceCode) {
return '请先扫描或输入布票编码';
}
const inspectorName = String(this.detail.inspector_name || '').trim();
if (!inspectorName && (this.detail.inspector_id == null || this.detail.inspector_id === '')) {
return '请选择查布工';
}
if (toWeightInt(this.weightKg) == null) {
return '请输入有效重量';
}
return '';
},
async fetchScanDetail(code) {
if (this.loadingDetail || this.submitting) return;
this.loadingDetail = true;
this.scanCode = code;
try {
const res = await this.$u.api.productionScheduleOrder.getScanFineCodeDetail({
fabric_piece_code: code,
});
this.applyScanDetail(res, code);
} catch (error) {
console.log('扫码获取细码失败', error);
const kept = this.keepFormFields();
this.detail = {
...emptyDetail(),
fabric_piece_code: code,
...kept,
};
this.scanCode = '';
this.refocusScanInput(200);
} finally {
this.loadingDetail = false;
}
},
keepFormFields() {
return {
grey_fabric_level_id: normalizeLevelIds(this.detail.grey_fabric_level_id),
grey_fabric_level_name: this.detail.grey_fabric_level_name || '',
inspector_id: this.detail.inspector_id,
inspector_name: this.detail.inspector_name || '',
};
},
applyScanDetail(res, fallbackCode) {
const data = res || {};
const kept = this.keepFormFields();
this.detail = {
...emptyDetail(),
fabric_piece_code: data.fabric_piece_code || fallbackCode || '',
production_order_no: data.production_order_no || '',
machine_number: data.machine_number || '',
grey_fabric_name: data.grey_fabric_name || '',
grey_fabric_code: data.grey_fabric_code || '',
inspection_weight: toWeightInt(this.weightKg),
volume_number: data.volume_number != null && data.volume_number !== '' ? data.volume_number : null,
...kept,
};
this.scanCode = this.detail.fabric_piece_code;
},
async submitInWarehouse() {
const err = this.validateBeforeSubmit();
if (err) {
this.$u.toast(err);
return;
}
const fabricPieceCode = String(this.detail.fabric_piece_code || this.scanCode || '').trim();
const actualWeight = toWeightInt(this.weightKg);
const levelIds = normalizeLevelIds(this.detail.grey_fabric_level_id);
if (this.submitting) return;
this.submitting = true;
try {
const payload = {
fabric_piece_code: fabricPieceCode,
actual_weight: actualWeight,
electronic_scale_weight: actualWeight,
};
if (levelIds.length) {
payload.grey_fabric_level_id = levelIds;
}
const inspectorName = String(this.detail.inspector_name || '').trim();
if (inspectorName) {
payload.inspector_name = inspectorName;
}
if (this.detail.inspector_id != null && this.detail.inspector_id !== '') {
payload.inspector_id = Number(this.detail.inspector_id);
}
const binName = String(this.warehouseBinName || '').trim();
if (binName && binName !== '/') {
payload.warehouse_bin_name = binName;
}
if (this.warehouseBinId != null && this.warehouseBinId !== '') {
payload.warehouse_bin_id = Number(this.warehouseBinId);
}
const res = await this.$u.api.productionScheduleOrder.scanInWarehouseFineCode(payload);
if (res) {
this.detail.volume_number = res.volume_number != null ? res.volume_number : this.detail.volume_number;
this.detail.grey_fabric_id = res.grey_fabric_id != null ? res.grey_fabric_id : this.detail.grey_fabric_id;
this.detail.id = res.id != null ? res.id : this.detail.id;
if (res.fabric_piece_code) {
this.detail.fabric_piece_code = res.fabric_piece_code;
}
}
const volumeText = res && res.volume_number != null ? `,卷号 ${res.volume_number}` : '';
util.playSpeak('进仓成功');
this.$u.toast(`进仓成功${volumeText}`);
this.resetForNextScan();
} catch (error) {
console.log('手动进仓失败', error);
this.scanCode = '';
this.refocusScanInput(200);
} finally {
this.submitting = false;
}
},
resetForNextScan() {
const kept = this.keepFormFields();
this.scanCode = '';
this.detail = {
...emptyDetail(),
...kept,
};
// toast 会抢焦点,稍后再聚焦,方便连续扫码
this.refocusScanInput(600);
},
},
};
</script>
<style lang="scss" scoped>
@import '@/common/pda-typography.scss';
.manual-in {
min-height: 100vh;
background: #f5f6f8;
padding-bottom: calc(160rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
}
.manual-in__setting {
display: flex;
align-items: center;
gap: 8rpx;
font-size: $pda-font-nav-sub;
color: #333;
}
.manual-in__scan {
margin: 16rpx 0;
padding: 0 28rpx;
background: #fff;
display: flex;
align-items: center;
gap: 12rpx;
}
.manual-in__scan-input {
flex: 1;
min-width: 0;
height: $pda-scan-input-height;
font-size: $pda-font-body;
color: #202328;
}
.manual-in__scan-icon {
display: flex;
align-items: center;
justify-content: center;
width: 72rpx;
height: 72rpx;
flex-shrink: 0;
border-radius: 8rpx;
border: 1rpx solid #d9d9d9;
background: #f7f7f7;
}
.manual-in__scan-close {
display: flex;
align-items: center;
justify-content: center;
height: 72rpx;
padding: 0 16rpx;
flex-shrink: 0;
border-radius: 8rpx;
border: 1rpx solid #2979ff;
background: #eaf2ff;
color: #2979ff;
font-size: $pda-font-action;
white-space: nowrap;
}
.manual-in__placeholder {
color: #b0b4bb;
font-size: $pda-font-placeholder;
}
.manual-in__panel {
background: #fff;
}
.manual-in__panel--form {
margin-top: 16rpx;
}
.manual-in__footer {
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: 20rpx 28rpx calc(20rpx + env(safe-area-inset-bottom));
background: #fff;
box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.06);
box-sizing: border-box;
z-index: 20;
::v-deep .u-btn {
height: $pda-button-height !important;
font-size: $pda-font-button !important;
}
}
.manual-in__row {
display: flex;
align-items: center;
min-height: $pda-row-min-height;
padding: 12rpx 28rpx;
border-bottom: 1rpx solid #eceff3;
box-sizing: border-box;
}
.manual-in__row--input {
justify-content: space-between;
}
.manual-in__label {
width: $pda-label-width;
flex-shrink: 0;
font-size: $pda-font-body;
color: #666;
}
.manual-in__value {
flex: 1;
font-size: $pda-font-body;
color: #202328;
text-align: left;
}
.manual-in__right {
flex: 1;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 18rpx;
}
.manual-in__field {
flex: 1;
min-width: 0;
text-align: right;
font-size: $pda-font-body;
color: #202328;
}
.manual-in__field-text {
flex: 1;
min-width: 0;
text-align: right;
font-size: $pda-font-body;
color: #202328;
word-break: break-all;
}
.manual-in__unit {
font-size: $pda-font-unit;
color: #666;
padding: 6rpx 14rpx;
border: 1rpx solid #d7dbe3;
border-radius: 8rpx;
}
.manual-in__action {
font-size: $pda-font-action;
color: #2f78e6;
flex-shrink: 0;
}
</style>
@@ -42,7 +42,7 @@
<WarehouseDataTable
:headers="tableHeaders"
:contents="tableContents"
:height="tableHeight"
height="auto"
@row-click="goStockList"
/>
</view>
@@ -56,7 +56,6 @@ import {
GROUP_TABLE_COLUMNS,
buildGroupListQuery,
buildStockListNavigateQuery,
calcTableHeight,
fetchAllWarehouseList,
mapGroupTableRow,
sumStockTotals,
@@ -85,9 +84,6 @@ export default {
totals() {
return sumStockTotals(this.list);
},
tableHeight() {
return calcTableHeight(this.tableContents.length);
},
},
onLoad() {
uni.setNavigationBarTitle({ title: '坯布库存' });
@@ -36,7 +36,7 @@
<WarehouseDataTable
:headers="tableHeaders"
:contents="tableContents"
:height="tableHeight"
height="auto"
@row-click="goDetail"
/>
</view>
@@ -50,7 +50,6 @@ import {
STOCK_TABLE_COLUMNS,
buildDetailNavigateQuery,
buildStockListQuery,
calcTableHeight,
fetchAllWarehouseList,
mapStockTableRow,
parsePageQuery,
@@ -84,9 +83,6 @@ export default {
totals() {
return sumStockTotals(this.list);
},
tableHeight() {
return calcTableHeight(this.tableContents.length, { maxPx: 9999 });
},
},
onLoad(options) {
const parsed = parsePageQuery(options || {});
@@ -1,112 +0,0 @@
<template>
<view class="fabric-out-page">
<OrderStatusBar class="fabric-out-mt32" :status="displayAuditStatus" :name="displayAuditStatusName" />
<view class="flex-white-plr26 ptb10 bdb_f5">
<text class="mr26">进仓单号</text>
<u-input disabled placeholder="保存后自动生成" v-model="form.order_no" />
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">进仓类型</text>
<view>加工进仓单</view>
</view>
<view @click="pickerSelectFun('加工单位')" class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">加工单位<text class="redXingh">*</text></text>
<view :class="form.process_name ? '' : 'cBlack'">
{{ form.process_name || '请选择' }}
<u-icon v-if="headerEditable" class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
</view>
</view>
<view @click="pickerSelectFun('仓库名称')" class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">仓库名称<text class="redXingh">*</text></text>
<view :class="form.warehouse_name ? '' : 'cBlack'">
{{ form.warehouse_name || '请选择' }}
<u-icon v-if="headerEditable" class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
</view>
</view>
<view class="flex-white-plr26-column ptb20 mt32">
<view style="margin-bottom: 8rpx;"><text>单据备注</text></view>
<u-input v-model="form.remark" :disabled="!headerEditable" type="textarea" :border="true" :height="100" :auto-height="true" />
</view>
<ProcessInBinBar
:can-scan="canScan"
:bin-id="warehouseBinId"
:code="warehouseBinCode"
:name="warehouseBinName"
:show-phone-scan="canScan"
@code-input="warehouseBinCode = $event"
@confirm="resolveWarehouseBin"
@phone-scan="handleBinPhoneScan"
@clear="clearWarehouseBin"
/>
<FabricOutScanBar
:can-scan="showQrScanBar"
:value="QRBarCode"
:delete-mode="BarCodeDelStatus"
:message="BillDataMessage"
:disabled-tip="qrDisabledTip"
:show-phone-scan="canScanQr"
@input="QRBarCode = $event"
@scan="handleScan"
@phone-scan="handlePhoneScan"
@delete-mode-change="BarCodeDelChange"
/>
<ProcessInScanDetail :detail="scanDetail" />
<ProcessInDetailList
:list="form.item_data"
:deletable="canScan"
@delete="onDeleteFineCode"
/>
<FabricOutFooter
v-if="!headerSaved"
:buttons="[{ label: '提交保存', action: 'save' }]"
single
@action="submitSave"
/>
<FabricOutFooter
v-else
:buttons="statusActionButtons"
@action="handleStatusAction"
/>
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
</view>
</template>
<script>
import formMixin from './storeGoodsProcessInMixin.js';
import OrderStatusBar from '@/components/storefabric/OrderStatusBar.vue';
import FabricOutScanBar from '@/components/storefabric/FabricOutScanBar.vue';
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
export default {
components: {
OrderStatusBar,
FabricOutScanBar,
FabricOutFooter,
ProcessInScanDetail,
ProcessInDetailList,
ProcessInBinBar,
},
mixins: [formMixin],
onLoad() {
uni.setNavigationBarTitle({ title: '新增加工进仓单' });
this.pageMode = 'add';
this.loadBaseDropdowns();
},
};
</script>
<style lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
page {
background-color: #F8F8F8;
padding-bottom: 260rpx;
}
</style>
@@ -1,98 +0,0 @@
<template>
<view class="fabric-out-page">
<OrderStatusBar class="fabric-out-mt32" :status="displayAuditStatus" :name="displayAuditStatusName" />
<view class="flex-white-plr26 ptb10 bdb_f5">
<text class="mr26">进仓单号</text>
<text>{{ form.order_no }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">进仓类型</text>
<text>加工进仓单</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">加工单位</text>
<text>{{ form.process_name || '-' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">仓库名称</text>
<text>{{ form.warehouse_name || '-' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">单据备注</text>
<text>{{ form.remark || '-' }}</text>
</view>
<ProcessInBinBar
:can-scan="canScan"
:bin-id="warehouseBinId"
:code="warehouseBinCode"
:name="warehouseBinName"
:show-phone-scan="canScan"
@code-input="warehouseBinCode = $event"
@confirm="resolveWarehouseBin"
@phone-scan="handleBinPhoneScan"
@clear="clearWarehouseBin"
/>
<FabricOutScanBar
:can-scan="showQrScanBar"
:value="QRBarCode"
:delete-mode="BarCodeDelStatus"
:message="BillDataMessage"
:disabled-tip="qrDisabledTip"
:show-phone-scan="canScanQr"
@input="QRBarCode = $event"
@scan="handleScan"
@phone-scan="handlePhoneScan"
@delete-mode-change="BarCodeDelChange"
/>
<ProcessInScanDetail :detail="scanDetail" />
<ProcessInDetailList
:list="form.item_data"
:deletable="canScan"
@delete="onDeleteFineCode"
/>
<FabricOutFooter :buttons="statusActionButtons" @action="handleStatusAction" />
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
</view>
</template>
<script>
import formMixin from './storeGoodsProcessInMixin.js';
import OrderStatusBar from '@/components/storefabric/OrderStatusBar.vue';
import FabricOutScanBar from '@/components/storefabric/FabricOutScanBar.vue';
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
export default {
components: {
OrderStatusBar,
FabricOutScanBar,
FabricOutFooter,
ProcessInScanDetail,
ProcessInDetailList,
ProcessInBinBar,
},
mixins: [formMixin],
onLoad(e) {
uni.setNavigationBarTitle({ title: '编辑加工进仓单' });
this.pageMode = 'edit';
if (e.id) {
this.loadOrder(Number(e.id), { rejectIfLocked: true });
}
},
};
</script>
<style lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
page {
background-color: #F8F8F8;
padding-bottom: 260rpx;
}
</style>
@@ -1,260 +0,0 @@
<template>
<view>
<view class="filterBar">
<u-search v-model="filters.order_no" placeholder="进仓单号" :show-action="false" @search="loadList" @custom="loadList" />
<view class="filterBtn" @click="filterShow = true">
<u-icon name="list" size="40" color="#666"></u-icon>
<text>筛选</text>
</view>
</view>
<scroll-view scroll-y :style="{ height: scrollHeight }" refresher-enabled
:refresher-triggered="triggered" @refresherrefresh="onRefresh">
<dataNull v-if="list.length === 0" src="/src/static/img/chahua/gjNull.png"
title="暂无加工进仓单" title1="请点击右下角按钮新增">
</dataNull>
<view v-for="(item, index) in list" :key="item.id" @click="goView(item)">
<ProcessInItem :item="item" :index="index" />
</view>
</scroll-view>
<addBtn url="./storeGoodsProcessInAdd"></addBtn>
<u-popup v-model="filterShow" mode="right" width="580rpx" :safe-area-inset-bottom="true">
<view class="filterPanel">
<view class="filterTitle">筛选条件</view>
<view class="filterItem">
<text class="filterLabel">进仓单号</text>
<u-input v-model="filters.order_no" placeholder="请输入进仓单号" />
</view>
<view class="filterItem" @click="openProcessUnitSelect">
<text class="filterLabel">加工单位</text>
<view class="filterValue">{{ processUnitLabel || '全部' }} <u-icon name="arrow-right" size="28"></u-icon></view>
</view>
<view class="filterItem" @click="openWarehouseSelect">
<text class="filterLabel">仓库</text>
<view class="filterValue">{{ warehouseLabel || '全部' }} <u-icon name="arrow-right" size="28"></u-icon></view>
</view>
<view class="filterItem" @click="openStatusSelect">
<text class="filterLabel">订单状态</text>
<view class="filterValue">{{ statusLabel || '全部' }} <u-icon name="arrow-right" size="28"></u-icon></view>
</view>
<view class="filterActions">
<u-button type="warning" size="medium" @click="resetFilter">重置</u-button>
<u-button type="primary" size="medium" @click="applyFilter">确定</u-button>
</view>
</view>
</u-popup>
<u-select v-model="statusSelectShow" :list="statusSelectList" @confirm="onStatusConfirm"></u-select>
<u-select v-model="unitSelectShow" :list="unitSelectList" @confirm="onUnitConfirm"></u-select>
</view>
</template>
<script>
import addBtn from '@/components/addBtn/addBtn.vue';
import ProcessInItem from '@/components/card/storeGoodsProcessInItem.vue';
import {
getStatusOptions,
AUDIT_STATUS_MAP,
BUSINESS_UNIT_TYPE_PROCESS,
WAREHOUSE_TYPE_FINISHED,
formatRoll,
mapToSelectOptions,
fetchAllOrderList,
} from '@/common/storeGoodsProcessIn';
export default {
components: { addBtn, ProcessInItem },
data() {
return {
list: [],
scrollHeight: '667px',
triggered: false,
listLoading: false,
filterShow: false,
statusSelectShow: false,
unitSelectShow: false,
unitSelectType: '',
processUnitOptions: [],
warehouseOptions: [],
unitOptionsLoading: false,
filters: {
order_no: '',
process_unit_id: '',
process_name: '',
warehouse_id: '',
warehouse_name: '',
audit_status: '',
},
statusSelectList: [
{ value: '', label: '全部' },
...getStatusOptions(),
],
};
},
computed: {
statusLabel() {
if (this.filters.audit_status === '' || this.filters.audit_status === null) return '';
return AUDIT_STATUS_MAP[Number(this.filters.audit_status)] || '';
},
processUnitLabel() {
return this.filters.process_name || '';
},
warehouseLabel() {
return this.filters.warehouse_name || '';
},
unitSelectList() {
const options = this.unitSelectType === 'warehouse' ? this.warehouseOptions : this.processUnitOptions;
return [{ value: '', label: '全部' }, ...options];
},
},
onLoad() {
uni.setNavigationBarTitle({ title: '加工进仓列表' });
uni.getSystemInfo({
success: (res) => {
this.scrollHeight = `${res.windowHeight - 50}px`;
},
});
},
onShow() {
this.loadList();
},
methods: {
loadProcessUnitOptions() {
if (this.processUnitOptions.length) return Promise.resolve(this.processUnitOptions);
return this.$u.api.businessUnit.list({ unit_type_id: BUSINESS_UNIT_TYPE_PROCESS })
.then((res) => {
this.processUnitOptions = mapToSelectOptions(res);
return this.processUnitOptions;
})
.catch(() => {
this.processUnitOptions = [];
return this.processUnitOptions;
});
},
loadWarehouseOptions() {
if (this.warehouseOptions.length) return Promise.resolve(this.warehouseOptions);
return this.$u.api.physicalWarehouse.getDropdownList({ warehouse_type_id: WAREHOUSE_TYPE_FINISHED })
.then((res) => {
this.warehouseOptions = mapToSelectOptions(res);
return this.warehouseOptions;
})
.catch(() => {
this.warehouseOptions = [];
return this.warehouseOptions;
});
},
openUnitSelect(type) {
if (this.unitOptionsLoading) return;
this.unitOptionsLoading = true;
const loadFn = type === 'warehouse' ? this.loadWarehouseOptions : this.loadProcessUnitOptions;
loadFn.call(this)
.then((list) => {
if (!list.length) {
uni.showToast({ title: '暂无可选数据', icon: 'none' });
return;
}
this.unitSelectType = type;
this.unitSelectShow = true;
})
.finally(() => {
this.unitOptionsLoading = false;
});
},
openProcessUnitSelect() {
this.openUnitSelect('process');
},
openWarehouseSelect() {
this.openUnitSelect('warehouse');
},
onUnitConfirm(e) {
const item = e[0] || {};
if (this.unitSelectType === 'warehouse') {
this.filters.warehouse_id = item.value;
this.filters.warehouse_name = item.value ? item.label : '';
} else {
this.filters.process_unit_id = item.value;
this.filters.process_name = item.value ? item.label : '';
}
},
loadList() {
if (this.listLoading) return;
this.listLoading = true;
const params = {};
if (this.filters.order_no) params.order_no = this.filters.order_no;
if (this.filters.process_unit_id) params.process_unit_id = this.filters.process_unit_id;
if (this.filters.warehouse_id) params.warehouse_id = this.filters.warehouse_id;
if (this.filters.audit_status !== '' && this.filters.audit_status !== null) {
params.audit_status = this.filters.audit_status;
}
fetchAllOrderList((p) => this.$u.api.fpmProcessInOrder.list(p), params)
.then((rows) => {
this.list = rows.map(this.mapToCard);
})
.catch((err) => {
this.list = [];
uni.showToast({ title: err.message || '加载失败', icon: 'none' });
})
.finally(() => {
this.listLoading = false;
this.triggered = false;
// 避免并发请求下 uView 全局 loading 遮罩关不掉
uni.hideLoading();
});
},
mapToCard(order) {
return {
id: order.id,
order_no: order.order_no || '',
process_unit_id: order.process_unit_id || '',
process_name: order.process_name || '',
warehouse_id: order.warehouse_id || '',
warehouse_name: order.warehouse_name || '',
create_user_name: order.creator_name || '',
create_time: order.create_time || '',
auditor_name: order.auditor_name || '',
audit_date: order.audit_time || '',
audit_status: order.audit_status,
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[order.audit_status] || '',
total_roll: formatRoll(order.total_roll),
};
},
onRefresh() {
this.triggered = true;
this.loadList();
},
goView(item) {
uni.navigateTo({ url: `./storeGoodsProcessInView?id=${item.id}` });
},
openStatusSelect() { this.statusSelectShow = true; },
onStatusConfirm(e) { this.filters.audit_status = e[0].value; },
resetFilter() {
this.filters = {
order_no: '',
process_unit_id: '',
process_name: '',
warehouse_id: '',
warehouse_name: '',
audit_status: '',
};
},
applyFilter() {
this.filterShow = false;
this.loadList();
},
},
};
</script>
<style>
page { background-color: #F8F8F8; }
.filterBar { display: flex; align-items: center; padding: 16rpx 20rpx; background: #fff; gap: 16rpx; }
.filterBtn { display: flex; flex-direction: column; align-items: center; font-size: 22rpx; color: #666; min-width: 80rpx; }
.filterPanel { padding: 30rpx; }
.filterTitle { font-size: 32rpx; font-weight: bold; margin-bottom: 30rpx; }
.filterItem { margin-bottom: 24rpx; }
.filterLabel { display: block; font-size: 28rpx; color: #666; margin-bottom: 12rpx; }
.filterValue { display: flex; align-items: center; justify-content: space-between; padding: 16rpx; background: #f5f5f5; border-radius: 8rpx; font-size: 28rpx; }
.filterActions { display: flex; gap: 20rpx; margin-top: 40rpx; }
</style>
@@ -1,535 +0,0 @@
/**
* 加工进仓单表单 mixin(新增/编辑共用)
*
* 1. 先填表头(加工单位 / 仓库 / 备注)提交 add,拿到 id 后可扫码
* 2. 先扫仓位(getWarehouseBin:传 qr_code + warehouse_id),校验后扫布匹二维码
* 3. 扫码走 updateFpmProcessInOrder(arrange_type: 1 录入 / 3 删除,带 warehouse_bin_id)
* 4. 手机扫码成功展示详情后自动再次调起扫码,形成连续扫
*/
import util from '@/common/util';
import scanMixin from '@/common/scanMixin.js';
import { initTts, speak } from '@/common/tts.js';
import {
AUDIT_STATUS_MAP,
ARRANGE_TYPE,
BUSINESS_UNIT_TYPE_PROCESS,
WAREHOUSE_TYPE_FINISHED,
IN_ORDER_TYPE_PROCESS,
normalizeOrder,
mapToSelectOptions,
canScanAtStatus,
isLockedOrderStatus,
getFormStatusActionButtons,
orderToFormFields,
confirmOrderStatusAction,
DRAFT_AUDIT_STATUS,
DRAFT_AUDIT_STATUS_NAME,
getEmptyScanDetail,
buildScanDetailFromScanResponse,
buildScanUpdateParams,
pickDefaultWarehouse,
} from '@/common/storeGoodsProcessIn';
export default {
mixins: [scanMixin],
data() {
return {
pageMode: 'add',
orderId: 0,
form: this.getEmptyForm(),
headerSaved: false,
selectShow: false,
selectList: [],
selectType: '',
canScan: false,
QRBarCode: '',
BarCodeDelStatus: false,
BillDataMessage: '',
scanDetail: getEmptyScanDetail(),
auditStatus: 0,
processUnitOptions: [],
warehouseOptions: [],
dropdownLoading: false,
/** 仓位 */
warehouseBinId: 0,
warehouseBinCode: '',
warehouseBinName: '',
/** 手机连续扫码开关:成功后自动再调起;取消/失败则关闭 */
phoneContinuousScan: false,
/** 手机扫当前目标:bin | qr */
phoneScanTarget: 'bin',
};
},
computed: {
isReadonly() {
return this.pageMode === 'view';
},
isEditable() {
return this.pageMode === 'add' || this.pageMode === 'edit';
},
headerEditable() {
return this.pageMode === 'add' && !this.headerSaved;
},
statusActionButtons() {
return getFormStatusActionButtons(this.headerSaved, this.orderId, this.auditStatus);
},
displayAuditStatus() {
if (this.pageMode === 'add' && !this.headerSaved) return DRAFT_AUDIT_STATUS;
return this.auditStatus;
},
displayAuditStatusName() {
if (this.pageMode === 'add' && !this.headerSaved) return DRAFT_AUDIT_STATUS_NAME;
return AUDIT_STATUS_MAP[this.auditStatus] || '';
},
/** 录入需先选仓位;删除模式仅需单据可扫 */
canScanQr() {
if (!this.canScan) return false;
if (this.BarCodeDelStatus) return true;
return !!this.warehouseBinId;
},
/** 扫码栏在可扫状态下始终展示(含删除勾选) */
showQrScanBar() {
return this.canScan;
},
qrDisabledTip() {
if (!this.canScan) return '请先提交保存后再扫码';
if (!this.warehouseBinId && !this.BarCodeDelStatus) return '请先扫描仓位后再扫布匹二维码';
return '当前状态不可扫码';
},
},
onShow() {
this.isPageActive = true;
initTts();
if (this.canScan && this.isEditable) {
this.registerOrderScanBroadcast();
}
},
onHide() {
this.isPageActive = false;
this.phoneContinuousScan = false;
this.unregisterScanBroadcast();
},
onUnload() {
this.isPageActive = false;
this.phoneContinuousScan = false;
this.unregisterScanBroadcast();
},
methods: {
clearWarehouseBin() {
this.warehouseBinId = 0;
this.warehouseBinCode = '';
this.warehouseBinName = '';
this.phoneContinuousScan = false;
},
handleBinPhoneScan() {
if (!this.canScan || !this.orderId) {
this.showError('请先提交保存后再扫码');
return;
}
this.phoneContinuousScan = false;
this.phoneScanTarget = 'bin';
this.openPhoneScan({
callback: (scanResult) => {
this.warehouseBinCode = String(scanResult || '').trim().replace(/[\r\n]/g, '');
this.$nextTick(() => this.resolveWarehouseBin());
},
fail: () => {},
});
},
handlePhoneScan() {
if (!this.canScan || !this.orderId) {
this.showError('请先提交保存后再扫码');
return;
}
// 删除模式可直接扫布匹码;录入模式无仓位时先扫仓位
if (!this.BarCodeDelStatus && !this.warehouseBinId) {
this.handleBinPhoneScan();
return;
}
this.phoneScanTarget = 'qr';
this.phoneContinuousScan = true;
this.openContinuousPhoneScan();
},
openContinuousPhoneScan() {
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
this.phoneContinuousScan = false;
return;
}
this.openPhoneScan({
callback: (scanResult) => {
this.QRBarCode = String(scanResult || '').trim().replace(/[\r\n]/g, '');
this.$nextTick(() => this.handleScan({ fromPhone: true }));
},
fail: () => {
this.phoneContinuousScan = false;
},
});
},
scheduleNextPhoneScan() {
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
this.phoneContinuousScan = false;
return;
}
setTimeout(() => {
this.openContinuousPhoneScan();
}, 400);
},
registerOrderScanBroadcast() {
this.registerScanBroadcast((scanResult) => {
const code = String(scanResult || '').trim().replace(/[\r\n]/g, '');
if (!code) return;
// 删除模式:直接按布匹码删除;未扫仓位时枪扫优先解析为仓位
if (!this.BarCodeDelStatus && !this.warehouseBinId) {
this.warehouseBinCode = code;
this.$nextTick(() => this.resolveWarehouseBin());
return;
}
this.QRBarCode = code;
this.$nextTick(() => this.handleScan());
});
},
resolveWarehouseBin() {
const code = (this.warehouseBinCode || '').trim();
if (!this.canScan || !this.orderId) {
this.showError('请先提交保存后再扫码');
return;
}
if (!code) return;
if (!this.form.warehouse_id) {
this.showError('单据缺少仓库信息');
return;
}
uni.showLoading({ title: '识别仓位...' });
return this.$u.api.warehouseBin.getByQrCode({
qr_code: code,
warehouse_id: Number(this.form.warehouse_id),
})
.then((data) => {
uni.hideLoading();
if (!data || !data.id) {
throw new Error('未识别到仓位');
}
// 返回 physical_warehouse_id,与单据仓库校验
if (
data.physical_warehouse_id
&& String(data.physical_warehouse_id) !== String(this.form.warehouse_id)
) {
this.warehouseBinId = 0;
this.warehouseBinName = '';
throw new Error('该仓位不属于当前仓库');
}
this.warehouseBinId = data.id;
this.warehouseBinCode = data.code || data.qr_code || code;
this.warehouseBinName = data.name || '';
this.BillDataMessage = '';
speak('仓位成功');
uni.showToast({ title: '仓位识别成功', icon: 'success' });
})
.catch((e) => {
uni.hideLoading();
this.warehouseBinId = 0;
this.warehouseBinName = '';
this.showError(e.message || '仓位识别失败');
});
},
syncCanScanFromStatus(status) {
const nextCanScan = this.isEditable && canScanAtStatus(status);
if (this.canScan && !nextCanScan) {
this.phoneContinuousScan = false;
this.unregisterScanBroadcast();
}
this.canScan = nextCanScan;
},
loadBaseDropdowns() {
if (this.dropdownLoading) return Promise.resolve();
this.dropdownLoading = true;
return Promise.all([
this.ensureProcessUnitOptions().catch((e) => {
console.error('加载加工单位失败', e);
return [];
}),
this.ensureWarehouseOptions().catch((e) => {
console.error('加载仓库失败', e);
return [];
}),
]).finally(() => {
this.dropdownLoading = false;
});
},
ensureProcessUnitOptions() {
if (this.processUnitOptions.length) return Promise.resolve(this.processUnitOptions);
return this.$u.api.businessUnit.list({ unit_type_id: BUSINESS_UNIT_TYPE_PROCESS })
.then((res) => {
this.processUnitOptions = mapToSelectOptions(res);
return this.processUnitOptions;
});
},
ensureWarehouseOptions() {
if (this.warehouseOptions.length) return Promise.resolve(this.warehouseOptions);
return this.$u.api.physicalWarehouse.getDropdownList({ warehouse_type_id: WAREHOUSE_TYPE_FINISHED })
.then((res) => {
this.warehouseOptions = mapToSelectOptions(res);
if (this.headerEditable && !this.form.warehouse_id) {
this.applyDefaultWarehouse();
}
return this.warehouseOptions;
});
},
applyDefaultWarehouse() {
const app = getApp();
const picked = pickDefaultWarehouse(
this.warehouseOptions,
app && app.globalData ? app.globalData.StoreNameID : '',
app && app.globalData ? app.globalData.StoreName : '',
);
if (!picked) return;
this.form.warehouse_id = picked.value;
this.form.warehouse_name = picked.label;
},
getEmptyForm() {
return {
order_no: '',
process_unit_id: '',
process_name: '',
warehouse_id: '',
warehouse_name: '',
remark: '',
item_data: [],
};
},
loadOrder(id, options = {}) {
const { rejectIfLocked = false } = options;
return this.$u.api.fpmProcessInOrder.detail({ id })
.then((res) => {
const order = normalizeOrder(res);
if (!order) {
this.showError('单据不存在');
return null;
}
if (rejectIfLocked && isLockedOrderStatus(order.audit_status)) {
this.showError('当前状态不可编辑');
setTimeout(() => uni.navigateBack(), 1500);
return null;
}
this.orderId = order.id;
this.auditStatus = order.audit_status;
this.headerSaved = true;
this.form = orderToFormFields(order);
this.clearWarehouseBin();
this.syncCanScanFromStatus(order.audit_status);
if (this.canScan) this.registerOrderScanBroadcast();
return order;
})
.catch((e) => {
this.showError(e.message || '加载单据失败');
return null;
});
},
pickerSelectFun(type) {
if (!this.headerEditable) return;
this.selectType = type;
const openPicker = (list) => {
if (!list.length) {
this.showError('暂无可选数据');
return;
}
this.selectList = list;
this.selectShow = true;
};
if (type === '加工单位') {
this.ensureProcessUnitOptions()
.then(openPicker)
.catch((e) => this.showError(e.message || '加载加工单位失败'));
} else if (type === '仓库名称') {
this.ensureWarehouseOptions()
.then(openPicker)
.catch((e) => this.showError(e.message || '加载仓库失败'));
}
},
selectConfirmFun(e) {
const item = e[0];
if (this.selectType === '加工单位') {
this.form.process_unit_id = item.value;
this.form.process_name = item.label;
} else if (this.selectType === '仓库名称') {
this.form.warehouse_id = item.value;
this.form.warehouse_name = item.label;
}
},
validateForm() {
if (!this.form.process_unit_id) return '请选择加工单位';
if (!this.form.warehouse_id) return '请选择仓库名称';
const app = getApp();
const saleSystemId = app && app.globalData ? app.globalData.PlanDepartmentID : '';
if (!saleSystemId) return '缺少营销体系,请重新登录';
return '';
},
buildAddParam() {
const app = getApp();
return {
inOrderType: IN_ORDER_TYPE_PROCESS,
process_unit_id: Number(this.form.process_unit_id),
warehouse_id: Number(this.form.warehouse_id),
sale_system_id: Number(app.globalData.PlanDepartmentID),
remark: this.form.remark || '',
item_data: [],
};
},
submitSave() {
if (this.headerSaved) {
this.showError('表头已保存,请直接扫码');
return;
}
const err = this.validateForm();
if (err) {
this.showError(err);
return;
}
uni.showLoading({ title: '保存中...' });
this.$u.api.fpmProcessInOrder.add(this.buildAddParam())
.then((res) => {
this.orderId = (res && res.id) || 0;
if (!this.orderId) {
throw new Error('保存失败,未返回单据ID');
}
return this.$u.api.fpmProcessInOrder.detail({ id: this.orderId });
})
.then((detail) => {
uni.hideLoading();
const order = normalizeOrder(detail);
this.applyOrder(order);
this.headerSaved = true;
this.clearWarehouseBin();
this.syncCanScanFromStatus(order.audit_status);
this.showSuccess('保存成功,请先扫描仓位');
this.registerOrderScanBroadcast();
})
.catch((e) => {
uni.hideLoading();
this.showError(e.message || '保存失败');
});
},
applyOrder(order) {
if (!order) return;
this.auditStatus = order.audit_status;
Object.assign(this.form, orderToFormFields(order));
},
handleScan(options = {}) {
const fromPhone = !!options.fromPhone;
const code = (this.QRBarCode || '').trim();
if (!this.canScan || !this.orderId) {
this.showError('请先提交保存后再扫码');
this.QRBarCode = '';
this.phoneContinuousScan = false;
return;
}
const isDelete = this.BarCodeDelStatus;
if (!isDelete && !this.warehouseBinId) {
this.showError('请先扫描仓位');
this.QRBarCode = '';
this.phoneContinuousScan = false;
return;
}
if (!code) {
this.QRBarCode = '';
if (fromPhone) this.scheduleNextPhoneScan();
return;
}
const arrangeType = isDelete ? ARRANGE_TYPE.DEL : ARRANGE_TYPE.IN;
this.doScanUpdate(code, arrangeType, { fromPhone });
},
BarCodeDelChange(e) {
this.BarCodeDelStatus = (e.detail.value || []).length > 0;
this.BillDataMessage = this.BarCodeDelStatus ? '删除模式:扫描细码即可删除' : '';
},
getFineCodeScanCode(fineCode) {
if (!fineCode) return '';
return fineCode.qr_code || fineCode.scan_code || fineCode.bar_code || '';
},
onDeleteFineCode(fineCode) {
if (!this.canScan || !this.orderId) {
this.showError('当前状态不可删除');
return;
}
const scanCode = this.getFineCodeScanCode(fineCode);
if (!scanCode) {
this.showError('该细码缺少条码,无法删除');
return;
}
uni.showModal({
title: '提示',
content: `确认删除细码 ${scanCode}?`,
success: (res) => {
if (!res.confirm) return;
this.doScanUpdate(scanCode, ARRANGE_TYPE.DEL);
},
});
},
doScanUpdate(scanCode, arrangeType, options = {}) {
const { fromPhone = false } = options;
const isDelete = arrangeType === ARRANGE_TYPE.DEL;
uni.showLoading({ title: isDelete ? '删除中...' : '处理中...' });
return this.$u.api.fpmProcessInOrder.scanUpdate(buildScanUpdateParams({
id: this.orderId,
scanCode,
arrangeType,
// 删除不强制仓位;录入带当前仓位
warehouseBinId: isDelete ? 0 : this.warehouseBinId,
}))
.then((scanRes) => {
this.scanDetail = buildScanDetailFromScanResponse(scanRes);
this.BillDataMessage = isDelete ? '删除成功' : '扫描成功';
this.QRBarCode = '';
if (isDelete) {
speak('已删除');
uni.showToast({ title: '删除成功', icon: 'success' });
} else {
speak('成功');
}
return this.$u.api.fpmProcessInOrder.detail({ id: this.orderId })
.then((detail) => {
const order = normalizeOrder(detail);
if (order) {
this.form.item_data = order.item_data;
this.auditStatus = order.audit_status;
}
})
.catch(() => null);
})
.then(() => {
uni.hideLoading();
if (fromPhone) this.scheduleNextPhoneScan();
})
.catch((e) => {
uni.hideLoading();
this.phoneContinuousScan = false;
const message = e.message || (isDelete ? '删除失败' : '扫码失败');
this.showError(message);
this.QRBarCode = '';
});
},
handleStatusAction(action) {
confirmOrderStatusAction(this, {
orderId: this.orderId,
action,
onSuccess: () => this.$u.api.fpmProcessInOrder.detail({ id: this.orderId })
.then((detail) => {
uni.hideLoading();
const order = normalizeOrder(detail);
if (!order) return;
this.applyOrder(order);
this.syncCanScanFromStatus(order.audit_status);
this.showSuccess('操作成功');
}),
});
},
showError(message) {
util.playErrorAudio();
uni.showModal({ title: '提示', content: message, showCancel: false });
},
showSuccess(message) {
util.playSuccessAudio();
uni.showToast({ title: message, icon: 'success' });
},
},
};
@@ -1,129 +0,0 @@
<template>
<view class="fabric-out-page">
<OrderStatusBar class="fabric-out-mt32" :status="order.audit_status" :name="order.audit_status_name" />
<view class="flex-white-plr26 ptb10 bdb_f5">
<text class="mr26">进仓单号</text>
<text>{{ order.order_no }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">进仓类型</text>
<text>{{ order.in_order_type_name || '加工进仓单' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">加工单位</text>
<text>{{ order.process_name || '-' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">仓库名称</text>
<text>{{ order.warehouse_name || '-' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">单据备注</text>
<text>{{ order.remark || '-' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">创建人</text>
<text>{{ order.creator_name }} {{ formatTime(order.create_time, 'YYYY-MM-DD') }}</text>
</view>
<view v-if="order.auditor_name" class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">审核人</text>
<text>{{ order.auditor_name }} {{ formatTime(order.audit_time, 'YYYY-MM-DD') }}</text>
</view>
<ProcessInDetailList
:title="detailTitle"
:list="order.item_data"
/>
<FabricOutFooter :buttons="actionButtons" @action="handleAction" />
</view>
</template>
<script>
import util from '@/common/util';
import OrderStatusBar from '@/components/storefabric/OrderStatusBar.vue';
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
import {
normalizeOrder,
getViewStatusActionButtons,
confirmOrderStatusAction,
formatDisplayTime,
} from '@/common/storeGoodsProcessIn';
export default {
components: { OrderStatusBar, FabricOutFooter, ProcessInDetailList },
data() {
return {
orderId: 0,
order: { item_data: [] },
};
},
computed: {
actionButtons() {
return getViewStatusActionButtons(this.order.audit_status);
},
detailTitle() {
return `进仓明细(共 ${this.order.total_roll || 0} 匹)`;
},
},
onLoad(e) {
uni.setNavigationBarTitle({ title: '查看加工进仓单' });
if (e.id) {
this.orderId = Number(e.id);
this.refreshOrder();
}
},
onShow() {
if (this.orderId) this.refreshOrder();
},
methods: {
formatTime: formatDisplayTime,
refreshOrder() {
this.$u.api.fpmProcessInOrder.detail({ id: this.orderId })
.then((res) => {
const order = normalizeOrder(res);
if (!order) {
this.showError('单据不存在');
return;
}
this.order = order;
})
.catch((err) => {
this.showError(err.message || '加载单据失败');
});
},
handleAction(action) {
if (action === 'edit') {
uni.navigateTo({ url: `./storeGoodsProcessInEdit?id=${this.orderId}` });
return;
}
confirmOrderStatusAction(this, {
orderId: this.orderId,
action,
onSuccess: () => this.$u.api.fpmProcessInOrder.detail({ id: this.orderId })
.then((res) => {
uni.hideLoading();
const order = normalizeOrder(res);
if (order) this.order = order;
util.playSuccessAudio();
uni.showToast({ title: '操作成功', icon: 'success' });
}),
});
},
showError(message) {
util.playErrorAudio();
uni.showModal({ title: '提示', content: message, showCancel: false });
},
},
};
</script>
<style lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
page {
background-color: #F8F8F8;
padding-bottom: 260rpx;
}
</style>
@@ -1,99 +0,0 @@
<template>
<view class="fabric-out-page">
<OrderStatusBar class="fabric-out-mt32" :status="displayAuditStatus" :name="displayAuditStatusName" />
<view class="flex-white-plr26 ptb10 bdb_f5">
<text class="mr26">出仓单号</text>
<u-input disabled placeholder="保存后自动生成" v-model="form.order_no" />
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">出仓类型</text>
<view>正常加工出仓单</view>
</view>
<view @click="pickerSelectFun('加工单位')" class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">加工单位<text class="redXingh">*</text></text>
<view :class="form.process_name ? '' : 'cBlack'">
{{ form.process_name || '请选择' }}
<u-icon v-if="headerEditable" class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
</view>
</view>
<view @click="pickerSelectFun('仓库名称')" class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">仓库名称<text class="redXingh">*</text></text>
<view :class="form.warehouse_name ? '' : 'cBlack'">
{{ form.warehouse_name || '请选择' }}
<u-icon v-if="headerEditable" class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
</view>
</view>
<view class="flex-white-plr26-column ptb20 mt32">
<view style="margin-bottom: 8rpx;"><text>单据备注</text></view>
<u-input v-model="form.remark" :disabled="!headerEditable" type="textarea" :border="true" :height="100" :auto-height="true" />
</view>
<FabricOutScanBar
:can-scan="showQrScanBar"
:value="QRBarCode"
:delete-mode="BarCodeDelStatus"
:message="BillDataMessage"
:disabled-tip="qrDisabledTip"
:show-phone-scan="canScanQr"
@input="QRBarCode = $event"
@scan="handleScan"
@phone-scan="handlePhoneScan"
@delete-mode-change="BarCodeDelChange"
/>
<ProcessOutScanDetail :detail="scanDetail" />
<ProcessOutDetailList
:list="form.item_data"
:deletable="canScan"
@delete="onDeleteFineCode"
/>
<FabricOutFooter
v-if="!headerSaved"
:buttons="[{ label: '提交保存', action: 'save' }]"
single
@action="submitSave"
/>
<FabricOutFooter
v-else
:buttons="statusActionButtons"
@action="handleStatusAction"
/>
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
</view>
</template>
<script>
import formMixin from './storeGoodsProcessOutMixin.js';
import OrderStatusBar from '@/components/storefabric/OrderStatusBar.vue';
import FabricOutScanBar from '@/components/storefabric/FabricOutScanBar.vue';
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
import ProcessOutScanDetail from '@/components/storegoods/ProcessOutScanDetail.vue';
import ProcessOutDetailList from '@/components/storegoods/ProcessOutDetailList.vue';
export default {
components: {
OrderStatusBar,
FabricOutScanBar,
FabricOutFooter,
ProcessOutScanDetail,
ProcessOutDetailList,
},
mixins: [formMixin],
onLoad() {
uni.setNavigationBarTitle({ title: '新增加工出仓单' });
this.pageMode = 'add';
this.loadBaseDropdowns();
},
};
</script>
<style lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
page {
background-color: #F8F8F8;
padding-bottom: 260rpx;
}
</style>
@@ -1,85 +0,0 @@
<template>
<view class="fabric-out-page">
<OrderStatusBar class="fabric-out-mt32" :status="displayAuditStatus" :name="displayAuditStatusName" />
<view class="flex-white-plr26 ptb10 bdb_f5">
<text class="mr26">出仓单号</text>
<text>{{ form.order_no }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">出仓类型</text>
<text>正常加工出仓单</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">加工单位</text>
<text>{{ form.process_name || '-' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">仓库名称</text>
<text>{{ form.warehouse_name || '-' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">单据备注</text>
<text>{{ form.remark || '-' }}</text>
</view>
<FabricOutScanBar
:can-scan="showQrScanBar"
:value="QRBarCode"
:delete-mode="BarCodeDelStatus"
:message="BillDataMessage"
:disabled-tip="qrDisabledTip"
:show-phone-scan="canScanQr"
@input="QRBarCode = $event"
@scan="handleScan"
@phone-scan="handlePhoneScan"
@delete-mode-change="BarCodeDelChange"
/>
<ProcessOutScanDetail :detail="scanDetail" />
<ProcessOutDetailList
:list="form.item_data"
:deletable="canScan"
@delete="onDeleteFineCode"
/>
<FabricOutFooter :buttons="statusActionButtons" @action="handleStatusAction" />
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
</view>
</template>
<script>
import formMixin from './storeGoodsProcessOutMixin.js';
import OrderStatusBar from '@/components/storefabric/OrderStatusBar.vue';
import FabricOutScanBar from '@/components/storefabric/FabricOutScanBar.vue';
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
import ProcessOutScanDetail from '@/components/storegoods/ProcessOutScanDetail.vue';
import ProcessOutDetailList from '@/components/storegoods/ProcessOutDetailList.vue';
export default {
components: {
OrderStatusBar,
FabricOutScanBar,
FabricOutFooter,
ProcessOutScanDetail,
ProcessOutDetailList,
},
mixins: [formMixin],
onLoad(e) {
uni.setNavigationBarTitle({ title: '编辑加工出仓单' });
this.pageMode = 'edit';
if (e.id) {
this.loadOrder(Number(e.id), { rejectIfLocked: true });
}
},
};
</script>
<style lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
page {
background-color: #F8F8F8;
padding-bottom: 260rpx;
}
</style>
@@ -1,260 +0,0 @@
<template>
<view>
<view class="filterBar">
<u-search v-model="filters.order_no" placeholder="出仓单号" :show-action="false" @search="loadList" @custom="loadList" />
<view class="filterBtn" @click="filterShow = true">
<u-icon name="list" size="40" color="#666"></u-icon>
<text>筛选</text>
</view>
</view>
<scroll-view scroll-y :style="{ height: scrollHeight }" refresher-enabled
:refresher-triggered="triggered" @refresherrefresh="onRefresh">
<dataNull v-if="list.length === 0" src="/src/static/img/chahua/gjNull.png"
title="暂无加工出仓单" title1="请点击右下角按钮新增">
</dataNull>
<view v-for="(item, index) in list" :key="item.id" @click="goView(item)">
<ProcessOutItem :item="item" :index="index" />
</view>
</scroll-view>
<addBtn url="./storeGoodsProcessOutAdd"></addBtn>
<u-popup v-model="filterShow" mode="right" width="580rpx" :safe-area-inset-bottom="true">
<view class="filterPanel">
<view class="filterTitle">筛选条件</view>
<view class="filterItem">
<text class="filterLabel">出仓单号</text>
<u-input v-model="filters.order_no" placeholder="请输入出仓单号" />
</view>
<view class="filterItem" @click="openProcessUnitSelect">
<text class="filterLabel">加工单位</text>
<view class="filterValue">{{ processUnitLabel || '全部' }} <u-icon name="arrow-right" size="28"></u-icon></view>
</view>
<view class="filterItem" @click="openWarehouseSelect">
<text class="filterLabel">仓库</text>
<view class="filterValue">{{ warehouseLabel || '全部' }} <u-icon name="arrow-right" size="28"></u-icon></view>
</view>
<view class="filterItem" @click="openStatusSelect">
<text class="filterLabel">订单状态</text>
<view class="filterValue">{{ statusLabel || '全部' }} <u-icon name="arrow-right" size="28"></u-icon></view>
</view>
<view class="filterActions">
<u-button type="warning" size="medium" @click="resetFilter">重置</u-button>
<u-button type="primary" size="medium" @click="applyFilter">确定</u-button>
</view>
</view>
</u-popup>
<u-select v-model="statusSelectShow" :list="statusSelectList" @confirm="onStatusConfirm"></u-select>
<u-select v-model="unitSelectShow" :list="unitSelectList" @confirm="onUnitConfirm"></u-select>
</view>
</template>
<script>
import addBtn from '@/components/addBtn/addBtn.vue';
import ProcessOutItem from '@/components/card/storeGoodsProcessOutItem.vue';
import {
getStatusOptions,
AUDIT_STATUS_MAP,
BUSINESS_UNIT_TYPE_PROCESS,
WAREHOUSE_TYPE_FINISHED,
formatRoll,
mapToSelectOptions,
fetchAllOrderList,
} from '@/common/storeGoodsProcessOut';
export default {
components: { addBtn, ProcessOutItem },
data() {
return {
list: [],
scrollHeight: '667px',
triggered: false,
listLoading: false,
filterShow: false,
statusSelectShow: false,
unitSelectShow: false,
unitSelectType: '',
processUnitOptions: [],
warehouseOptions: [],
unitOptionsLoading: false,
filters: {
order_no: '',
process_unit_id: '',
process_name: '',
warehouse_id: '',
warehouse_name: '',
audit_status: '',
},
statusSelectList: [
{ value: '', label: '全部' },
...getStatusOptions(),
],
};
},
computed: {
statusLabel() {
if (this.filters.audit_status === '' || this.filters.audit_status === null) return '';
return AUDIT_STATUS_MAP[Number(this.filters.audit_status)] || '';
},
processUnitLabel() {
return this.filters.process_name || '';
},
warehouseLabel() {
return this.filters.warehouse_name || '';
},
unitSelectList() {
const options = this.unitSelectType === 'warehouse' ? this.warehouseOptions : this.processUnitOptions;
return [{ value: '', label: '全部' }, ...options];
},
},
onLoad() {
uni.setNavigationBarTitle({ title: '加工出仓列表' });
uni.getSystemInfo({
success: (res) => {
this.scrollHeight = `${res.windowHeight - 50}px`;
},
});
},
onShow() {
this.loadList();
},
methods: {
loadProcessUnitOptions() {
if (this.processUnitOptions.length) return Promise.resolve(this.processUnitOptions);
return this.$u.api.businessUnit.list({ unit_type_id: BUSINESS_UNIT_TYPE_PROCESS })
.then((res) => {
this.processUnitOptions = mapToSelectOptions(res);
return this.processUnitOptions;
})
.catch(() => {
this.processUnitOptions = [];
return this.processUnitOptions;
});
},
loadWarehouseOptions() {
if (this.warehouseOptions.length) return Promise.resolve(this.warehouseOptions);
return this.$u.api.physicalWarehouse.getDropdownList({ warehouse_type_id: WAREHOUSE_TYPE_FINISHED })
.then((res) => {
this.warehouseOptions = mapToSelectOptions(res);
return this.warehouseOptions;
})
.catch(() => {
this.warehouseOptions = [];
return this.warehouseOptions;
});
},
openUnitSelect(type) {
if (this.unitOptionsLoading) return;
this.unitOptionsLoading = true;
const loadFn = type === 'warehouse' ? this.loadWarehouseOptions : this.loadProcessUnitOptions;
loadFn.call(this)
.then((list) => {
if (!list.length) {
uni.showToast({ title: '暂无可选数据', icon: 'none' });
return;
}
this.unitSelectType = type;
this.unitSelectShow = true;
})
.finally(() => {
this.unitOptionsLoading = false;
});
},
openProcessUnitSelect() {
this.openUnitSelect('process');
},
openWarehouseSelect() {
this.openUnitSelect('warehouse');
},
onUnitConfirm(e) {
const item = e[0] || {};
if (this.unitSelectType === 'warehouse') {
this.filters.warehouse_id = item.value;
this.filters.warehouse_name = item.value ? item.label : '';
} else {
this.filters.process_unit_id = item.value;
this.filters.process_name = item.value ? item.label : '';
}
},
loadList() {
if (this.listLoading) return;
this.listLoading = true;
const params = {};
if (this.filters.order_no) params.order_no = this.filters.order_no;
if (this.filters.process_unit_id) params.process_unit_id = this.filters.process_unit_id;
if (this.filters.warehouse_id) params.warehouse_id = this.filters.warehouse_id;
if (this.filters.audit_status !== '' && this.filters.audit_status !== null) {
params.audit_status = this.filters.audit_status;
}
fetchAllOrderList((p) => this.$u.api.fpmProcessOutOrder.list(p), params)
.then((rows) => {
this.list = rows.map(this.mapToCard);
})
.catch((err) => {
this.list = [];
uni.showToast({ title: err.message || '加载失败', icon: 'none' });
})
.finally(() => {
this.listLoading = false;
this.triggered = false;
// 避免并发请求下 uView 全局 loading 遮罩关不掉
uni.hideLoading();
});
},
mapToCard(order) {
return {
id: order.id,
order_no: order.order_no || '',
process_unit_id: order.process_unit_id || '',
process_name: order.process_name || '',
warehouse_id: order.warehouse_id || '',
warehouse_name: order.warehouse_name || '',
create_user_name: order.creator_name || '',
create_time: order.create_time || '',
auditor_name: order.auditor_name || '',
audit_date: order.audit_time || '',
audit_status: order.audit_status,
audit_status_name: order.audit_status_name || AUDIT_STATUS_MAP[order.audit_status] || '',
total_roll: formatRoll(order.total_roll),
};
},
onRefresh() {
this.triggered = true;
this.loadList();
},
goView(item) {
uni.navigateTo({ url: `./storeGoodsProcessOutView?id=${item.id}` });
},
openStatusSelect() { this.statusSelectShow = true; },
onStatusConfirm(e) { this.filters.audit_status = e[0].value; },
resetFilter() {
this.filters = {
order_no: '',
process_unit_id: '',
process_name: '',
warehouse_id: '',
warehouse_name: '',
audit_status: '',
};
},
applyFilter() {
this.filterShow = false;
this.loadList();
},
},
};
</script>
<style>
page { background-color: #F8F8F8; }
.filterBar { display: flex; align-items: center; padding: 16rpx 20rpx; background: #fff; gap: 16rpx; }
.filterBtn { display: flex; flex-direction: column; align-items: center; font-size: 22rpx; color: #666; min-width: 80rpx; }
.filterPanel { padding: 30rpx; }
.filterTitle { font-size: 32rpx; font-weight: bold; margin-bottom: 30rpx; }
.filterItem { margin-bottom: 24rpx; }
.filterLabel { display: block; font-size: 28rpx; color: #666; margin-bottom: 12rpx; }
.filterValue { display: flex; align-items: center; justify-content: space-between; padding: 16rpx; background: #f5f5f5; border-radius: 8rpx; font-size: 28rpx; }
.filterActions { display: flex; gap: 20rpx; margin-top: 40rpx; }
</style>
@@ -1,442 +0,0 @@
/**
* 加工出仓单表单 mixin(新增/编辑共用)
*
* 1. 先填表头(加工单位 / 仓库 / 备注)提交 add,拿到 id 后可扫码
* 2. 扫码走 updateFpmProcessOutOrder(arrange_type: 1 录入 / 3 删除),不扫仓位
* 3. 手机扫码成功展示详情后自动再次调起扫码,形成连续扫
*/
import util from '@/common/util';
import scanMixin from '@/common/scanMixin.js';
import { initTts, speak } from '@/common/tts.js';
import {
AUDIT_STATUS_MAP,
ARRANGE_TYPE,
BUSINESS_UNIT_TYPE_PROCESS,
WAREHOUSE_TYPE_FINISHED,
OUT_ORDER_TYPE_PROCESS,
normalizeOrder,
mapToSelectOptions,
canScanAtStatus,
isLockedOrderStatus,
getFormStatusActionButtons,
orderToFormFields,
confirmOrderStatusAction,
DRAFT_AUDIT_STATUS,
DRAFT_AUDIT_STATUS_NAME,
getEmptyScanDetail,
buildScanDetailFromScanResponse,
buildScanUpdateParams,
pickDefaultWarehouse,
formatDisplayTime,
} from '@/common/storeGoodsProcessOut';
export default {
mixins: [scanMixin],
data() {
return {
pageMode: 'add',
orderId: 0,
form: this.getEmptyForm(),
headerSaved: false,
selectShow: false,
selectList: [],
selectType: '',
canScan: false,
QRBarCode: '',
BarCodeDelStatus: false,
BillDataMessage: '',
scanDetail: getEmptyScanDetail(),
auditStatus: 0,
processUnitOptions: [],
warehouseOptions: [],
dropdownLoading: false,
/** 手机连续扫码开关:成功后自动再调起;取消/失败则关闭 */
phoneContinuousScan: false,
};
},
computed: {
isReadonly() {
return this.pageMode === 'view';
},
isEditable() {
return this.pageMode === 'add' || this.pageMode === 'edit';
},
headerEditable() {
return this.pageMode === 'add' && !this.headerSaved;
},
statusActionButtons() {
return getFormStatusActionButtons(this.headerSaved, this.orderId, this.auditStatus);
},
displayAuditStatus() {
if (this.pageMode === 'add' && !this.headerSaved) return DRAFT_AUDIT_STATUS;
return this.auditStatus;
},
displayAuditStatusName() {
if (this.pageMode === 'add' && !this.headerSaved) return DRAFT_AUDIT_STATUS_NAME;
return AUDIT_STATUS_MAP[this.auditStatus] || '';
},
canScanQr() {
return this.canScan;
},
showQrScanBar() {
return this.canScan;
},
qrDisabledTip() {
if (!this.canScan) return '请先提交保存后再扫码';
return '当前状态不可扫码';
},
},
onShow() {
this.isPageActive = true;
initTts();
if (this.canScan && this.isEditable) {
this.registerOrderScanBroadcast();
}
},
onHide() {
this.isPageActive = false;
this.phoneContinuousScan = false;
this.unregisterScanBroadcast();
},
onUnload() {
this.isPageActive = false;
this.phoneContinuousScan = false;
this.unregisterScanBroadcast();
},
methods: {
handlePhoneScan() {
if (!this.canScan || !this.orderId) {
this.showError('请先提交保存后再扫码');
return;
}
this.phoneContinuousScan = true;
this.openContinuousPhoneScan();
},
openContinuousPhoneScan() {
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
this.phoneContinuousScan = false;
return;
}
this.openPhoneScan({
callback: (scanResult) => {
this.QRBarCode = String(scanResult || '').trim().replace(/[\r\n]/g, '');
this.$nextTick(() => this.handleScan({ fromPhone: true }));
},
fail: () => {
this.phoneContinuousScan = false;
},
});
},
scheduleNextPhoneScan() {
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
this.phoneContinuousScan = false;
return;
}
setTimeout(() => {
this.openContinuousPhoneScan();
}, 400);
},
registerOrderScanBroadcast() {
this.registerScanBroadcast((scanResult) => {
const code = String(scanResult || '').trim().replace(/[\r\n]/g, '');
if (!code) return;
this.QRBarCode = code;
this.$nextTick(() => this.handleScan());
});
},
syncCanScanFromStatus(status) {
const nextCanScan = this.isEditable && canScanAtStatus(status);
if (this.canScan && !nextCanScan) {
this.phoneContinuousScan = false;
this.unregisterScanBroadcast();
}
this.canScan = nextCanScan;
},
loadBaseDropdowns() {
if (this.dropdownLoading) return Promise.resolve();
this.dropdownLoading = true;
return Promise.all([
this.ensureProcessUnitOptions().catch((e) => {
console.error('加载加工单位失败', e);
return [];
}),
this.ensureWarehouseOptions().catch((e) => {
console.error('加载仓库失败', e);
return [];
}),
]).finally(() => {
this.dropdownLoading = false;
});
},
ensureProcessUnitOptions() {
if (this.processUnitOptions.length) return Promise.resolve(this.processUnitOptions);
return this.$u.api.businessUnit.list({ unit_type_id: BUSINESS_UNIT_TYPE_PROCESS })
.then((res) => {
this.processUnitOptions = mapToSelectOptions(res);
return this.processUnitOptions;
});
},
ensureWarehouseOptions() {
if (this.warehouseOptions.length) return Promise.resolve(this.warehouseOptions);
return this.$u.api.physicalWarehouse.getDropdownList({ warehouse_type_id: WAREHOUSE_TYPE_FINISHED })
.then((res) => {
this.warehouseOptions = mapToSelectOptions(res);
if (this.headerEditable && !this.form.warehouse_id) {
this.applyDefaultWarehouse();
}
return this.warehouseOptions;
});
},
applyDefaultWarehouse() {
const app = getApp();
const picked = pickDefaultWarehouse(
this.warehouseOptions,
app && app.globalData ? app.globalData.StoreNameID : '',
app && app.globalData ? app.globalData.StoreName : '',
);
if (!picked) return;
this.form.warehouse_id = picked.value;
this.form.warehouse_name = picked.label;
},
getEmptyForm() {
return {
order_no: '',
process_unit_id: '',
process_name: '',
warehouse_id: '',
warehouse_name: '',
remark: '',
item_data: [],
};
},
loadOrder(id, options = {}) {
const { rejectIfLocked = false } = options;
return this.$u.api.fpmProcessOutOrder.detail({ id })
.then((res) => {
const order = normalizeOrder(res);
if (!order) {
this.showError('单据不存在');
return null;
}
if (rejectIfLocked && isLockedOrderStatus(order.audit_status)) {
this.showError('当前状态不可编辑');
setTimeout(() => uni.navigateBack(), 1500);
return null;
}
this.orderId = order.id;
this.auditStatus = order.audit_status;
this.headerSaved = true;
this.form = orderToFormFields(order);
this.syncCanScanFromStatus(order.audit_status);
if (this.canScan) this.registerOrderScanBroadcast();
return order;
})
.catch((e) => {
this.showError(e.message || '加载单据失败');
return null;
});
},
pickerSelectFun(type) {
if (!this.headerEditable) return;
this.selectType = type;
const openPicker = (list) => {
if (!list.length) {
this.showError('暂无可选数据');
return;
}
this.selectList = list;
this.selectShow = true;
};
if (type === '加工单位') {
this.ensureProcessUnitOptions()
.then(openPicker)
.catch((e) => this.showError(e.message || '加载加工单位失败'));
} else if (type === '仓库名称') {
this.ensureWarehouseOptions()
.then(openPicker)
.catch((e) => this.showError(e.message || '加载仓库失败'));
}
},
selectConfirmFun(e) {
const item = e[0];
if (this.selectType === '加工单位') {
this.form.process_unit_id = item.value;
this.form.process_name = item.label;
} else if (this.selectType === '仓库名称') {
this.form.warehouse_id = item.value;
this.form.warehouse_name = item.label;
}
},
validateForm() {
if (!this.form.process_unit_id) return '请选择加工单位';
if (!this.form.warehouse_id) return '请选择仓库名称';
const app = getApp();
const saleSystemId = app && app.globalData ? app.globalData.PlanDepartmentID : '';
if (!saleSystemId) return '缺少营销体系,请重新登录';
return '';
},
buildAddParam() {
const app = getApp();
return {
// OpenAPI: product.AddFpmProcessOutOrderParam
out_order_type: OUT_ORDER_TYPE_PROCESS, // WarehouseGoodOutTypeProcess = 5
process_unit_id: Number(this.form.process_unit_id),
warehouse_id: Number(this.form.warehouse_id),
sale_system_id: Number(app.globalData.PlanDepartmentID),
warehouse_out_time: formatDisplayTime(new Date(), 'YYYY-MM-DD'),
remark: this.form.remark || '',
item_data: [],
};
},
submitSave() {
if (this.headerSaved) {
this.showError('表头已保存,请直接扫码');
return;
}
const err = this.validateForm();
if (err) {
this.showError(err);
return;
}
uni.showLoading({ title: '保存中...' });
this.$u.api.fpmProcessOutOrder.add(this.buildAddParam())
.then((res) => {
this.orderId = (res && res.id) || 0;
if (!this.orderId) {
throw new Error('保存失败,未返回单据ID');
}
return this.$u.api.fpmProcessOutOrder.detail({ id: this.orderId });
})
.then((detail) => {
uni.hideLoading();
const order = normalizeOrder(detail);
this.applyOrder(order);
this.headerSaved = true;
this.syncCanScanFromStatus(order.audit_status);
this.showSuccess('保存成功,请开始扫码');
this.registerOrderScanBroadcast();
})
.catch((e) => {
uni.hideLoading();
this.showError(e.message || '保存失败');
});
},
applyOrder(order) {
if (!order) return;
this.auditStatus = order.audit_status;
Object.assign(this.form, orderToFormFields(order));
},
handleScan(options = {}) {
const fromPhone = !!options.fromPhone;
const code = (this.QRBarCode || '').trim();
if (!this.canScan || !this.orderId) {
this.showError('请先提交保存后再扫码');
this.QRBarCode = '';
this.phoneContinuousScan = false;
return;
}
if (!code) {
this.QRBarCode = '';
if (fromPhone) this.scheduleNextPhoneScan();
return;
}
const arrangeType = this.BarCodeDelStatus ? ARRANGE_TYPE.DEL : ARRANGE_TYPE.IN;
this.doScanUpdate(code, arrangeType, { fromPhone });
},
BarCodeDelChange(e) {
this.BarCodeDelStatus = (e.detail.value || []).length > 0;
this.BillDataMessage = this.BarCodeDelStatus ? '删除模式:扫描细码即可删除' : '';
},
getFineCodeScanCode(fineCode) {
if (!fineCode) return '';
return fineCode.qr_code
|| fineCode.scan_code
|| fineCode.digital_code
|| fineCode.bar_code
|| '';
},
onDeleteFineCode(fineCode) {
if (!this.canScan || !this.orderId) {
this.showError('当前状态不可删除');
return;
}
const scanCode = this.getFineCodeScanCode(fineCode);
if (!scanCode) {
this.showError('该细码缺少条码,无法删除');
return;
}
uni.showModal({
title: '提示',
content: `确认删除细码 ${scanCode}?`,
success: (res) => {
if (!res.confirm) return;
this.doScanUpdate(scanCode, ARRANGE_TYPE.DEL);
},
});
},
doScanUpdate(scanCode, arrangeType, options = {}) {
const { fromPhone = false } = options;
const isDelete = arrangeType === ARRANGE_TYPE.DEL;
uni.showLoading({ title: isDelete ? '删除中...' : '处理中...' });
return this.$u.api.fpmProcessOutOrder.scanUpdate(buildScanUpdateParams({
id: this.orderId,
scanCode,
arrangeType,
}))
.then((scanRes) => {
this.scanDetail = buildScanDetailFromScanResponse(scanRes);
this.BillDataMessage = isDelete ? '删除成功' : '扫描成功';
this.QRBarCode = '';
if (isDelete) {
speak('已删除');
uni.showToast({ title: '删除成功', icon: 'success' });
} else {
speak('成功');
}
return this.$u.api.fpmProcessOutOrder.detail({ id: this.orderId })
.then((detail) => {
const order = normalizeOrder(detail);
if (order) {
this.form.item_data = order.item_data;
this.auditStatus = order.audit_status;
}
})
.catch(() => null);
})
.then(() => {
uni.hideLoading();
if (fromPhone) this.scheduleNextPhoneScan();
})
.catch((e) => {
uni.hideLoading();
this.phoneContinuousScan = false;
const message = e.message || (isDelete ? '删除失败' : '扫码失败');
this.showError(message);
this.QRBarCode = '';
});
},
handleStatusAction(action) {
confirmOrderStatusAction(this, {
orderId: this.orderId,
action,
onSuccess: () => this.$u.api.fpmProcessOutOrder.detail({ id: this.orderId })
.then((detail) => {
uni.hideLoading();
const order = normalizeOrder(detail);
if (!order) return;
this.applyOrder(order);
this.syncCanScanFromStatus(order.audit_status);
this.showSuccess('操作成功');
}),
});
},
showError(message) {
util.playErrorAudio();
uni.showModal({ title: '提示', content: message, showCancel: false });
},
showSuccess(message) {
util.playSuccessAudio();
uni.showToast({ title: message, icon: 'success' });
},
},
};
@@ -1,129 +0,0 @@
<template>
<view class="fabric-out-page">
<OrderStatusBar class="fabric-out-mt32" :status="order.audit_status" :name="order.audit_status_name" />
<view class="flex-white-plr26 ptb10 bdb_f5">
<text class="mr26">出仓单号</text>
<text>{{ order.order_no }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">出仓类型</text>
<text>{{ order.out_order_type_name || '正常加工出仓单' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">加工单位</text>
<text>{{ order.process_name || '-' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">仓库名称</text>
<text>{{ order.warehouse_name || '-' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">单据备注</text>
<text>{{ order.remark || '-' }}</text>
</view>
<view class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">创建人</text>
<text>{{ order.creator_name }} {{ formatTime(order.create_time, 'YYYY-MM-DD') }}</text>
</view>
<view v-if="order.auditor_name" class="flex-white-plr26 ptb20 bdb_f5">
<text class="mr26">审核人</text>
<text>{{ order.auditor_name }} {{ formatTime(order.audit_time, 'YYYY-MM-DD') }}</text>
</view>
<ProcessOutDetailList
:title="detailTitle"
:list="order.item_data"
/>
<FabricOutFooter :buttons="actionButtons" @action="handleAction" />
</view>
</template>
<script>
import util from '@/common/util';
import OrderStatusBar from '@/components/storefabric/OrderStatusBar.vue';
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
import ProcessOutDetailList from '@/components/storegoods/ProcessOutDetailList.vue';
import {
normalizeOrder,
getViewStatusActionButtons,
confirmOrderStatusAction,
formatDisplayTime,
} from '@/common/storeGoodsProcessOut';
export default {
components: { OrderStatusBar, FabricOutFooter, ProcessOutDetailList },
data() {
return {
orderId: 0,
order: { item_data: [] },
};
},
computed: {
actionButtons() {
return getViewStatusActionButtons(this.order.audit_status);
},
detailTitle() {
return `出仓明细(共 ${this.order.total_roll || 0} 匹)`;
},
},
onLoad(e) {
uni.setNavigationBarTitle({ title: '查看加工出仓单' });
if (e.id) {
this.orderId = Number(e.id);
this.refreshOrder();
}
},
onShow() {
if (this.orderId) this.refreshOrder();
},
methods: {
formatTime: formatDisplayTime,
refreshOrder() {
this.$u.api.fpmProcessOutOrder.detail({ id: this.orderId })
.then((res) => {
const order = normalizeOrder(res);
if (!order) {
this.showError('单据不存在');
return;
}
this.order = order;
})
.catch((err) => {
this.showError(err.message || '加载单据失败');
});
},
handleAction(action) {
if (action === 'edit') {
uni.navigateTo({ url: `./storeGoodsProcessOutEdit?id=${this.orderId}` });
return;
}
confirmOrderStatusAction(this, {
orderId: this.orderId,
action,
onSuccess: () => this.$u.api.fpmProcessOutOrder.detail({ id: this.orderId })
.then((res) => {
uni.hideLoading();
const order = normalizeOrder(res);
if (order) this.order = order;
util.playSuccessAudio();
uni.showToast({ title: '操作成功', icon: 'success' });
}),
});
},
showError(message) {
util.playErrorAudio();
uni.showModal({ title: '提示', content: message, showCancel: false });
},
},
};
</script>
<style lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
page {
background-color: #F8F8F8;
padding-bottom: 260rpx;
}
</style>
+121 -73
View File
@@ -4,26 +4,25 @@
<view class="haotoplogo">
<image src="/static/haotop/image/logo/Start.jpg" mode="aspectFit" class="logoimg"></image>
</view>
<view class="app-name">{{ appName }}</view>
<!-- <div v-if="loginType === 'currentPhone'">-->
<!-- <u-tabs :list="list" :is-scroll="false" :current="current" @change="onClickItem"></u-tabs> -->
<!-- <view v-if="current === 0"> -->
<view class="list">
<template v-if="isDevelopment">
<view class="list-call">
<view class="iconfont icon-link" style="font-size: 22px;color:#5473e8;"></view>
<view style="width: 100%;">
<view class="server-selector" @click="showServerPicker">
<text>{{ getApiUrlLabel() }}</text>
<view class="iconfont icon-arrow-down" style="font-size: 16px;"></view>
</view>
<view class="list-call env-call">
<view class="iconfont icon-link" style="font-size: 28px;color:#5473e8;"></view>
<view style="width: 100%;">
<view class="server-selector" @click="showServerPicker">
<text>{{ getApiUrlLabel() }}</text>
<view class="iconfont icon-arrow-down"></view>
</view>
</view>
<view class="list-call" v-if="selectedApiUrl === 'custom'">
<!-- 当选择自定义时显示输入框 -->
<input class="u-input" type="text" v-model="customApiUrl" maxlength="100" placeholder="请输入服务器地址"
@blur="handleBlurInputUrl" />
</view>
</template>
</view>
<view class="list-call" v-if="selectedApiUrl === 'custom'">
<!-- 当选择自定义时显示输入框 -->
<input class="u-input" type="text" v-model="customApiUrl" maxlength="100" placeholder="请输入服务器地址"
@blur="handleBlurInputUrl" />
</view>
<view class="list-call">
<view class="iconfont icon-avatar" style="font-size: 22px;color:#5473e8;"></view>
<input class="u-input" type="text" v-model="login.username" maxlength="32"
@@ -105,8 +104,9 @@
<!-- </view>-->
<!-- </view>-->
<!-- </div>-->
<u-picker v-model="showApiUrlPicker" mode="selector" :range="apiUrlList" range-key="label"
@confirm="onApiUrlConfirm" @cancel="showApiUrlPicker = false"></u-picker>
<u-select class="login-env-picker" v-model="showApiUrlPicker" :list="apiUrlList" :default-value="apiUrlDefaultIndex"
title="选择服务器" :show-search="false" :item-height="88" :visible-item-count="5"
@confirm="onApiUrlConfirm" @cancel="showApiUrlPicker = false"></u-select>
<!-- 版本信息显示 -->
<view class="version-info">
<text class="version-text">版本: {{ appVersion }}</text>
@@ -118,13 +118,23 @@
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
import config from '@/common/config.js';
import config, { getDefaultApiUrl, resolveUpgradeDownloadUrl } from '@/common/config.js';
import base64 from '@/common/base64.js';
import util from '@/common/util.js';
import md5 from '@/common/md5.js';
import manifest from '@/manifest.json';
import { mapState } from 'vuex'
import app_upgrade from '@/uni_modules/app-upgrade/js_sdk/index.js'
import { ensureScanConfigAfterLogin } from '@/common/scanAutoConfig.js'
function isDefaultPassword(data) {
if (!data || typeof data !== 'object') return false;
const value = data.is_default_password != null
? data.is_default_password
: (data.user && data.user.is_default_password);
return value === true || value === 1 || value === '1' || value === 'true';
}
export default {
data() {
return {
@@ -136,10 +146,9 @@ export default {
password: ""
},
showApiUrlPicker: false,
// 根据环境设置默认URL和选项
selectedApiUrl: config.isDevelopment ? config.devApiUrlOptions[0].value : config.productionApiUrl,
customApiUrl: 'http://192.168.1.66:50002/hcscm/pda/v1',
apiUrlList: config.isDevelopment ? config.devApiUrlOptions : [],
selectedApiUrl: getDefaultApiUrl(),
customApiUrl: 'http://192.168.1.66:50002/hcscm_weave/pda/v1',
apiUrlList: config.devApiUrlOptions,
phoneNo: '',
//username: '',
//password: '',
@@ -159,25 +168,27 @@ export default {
};
},
computed: {
appName() {
return manifest.name || '';
},
appVersion() {
return manifest.versionName;
},
envName() {
return process.env.VUE_APP_ENV_NAME || '';
},
apiUrlDefaultIndex() {
const list = this.apiUrlList || [];
let index = list.findIndex(item => item.value === this.selectedApiUrl);
if (index < 0) index = list.findIndex(item => item.label === '正式环境');
return [index >= 0 ? index : 0];
}
},
onShow() {
// 只在开发环境读取存储的URL
if (config.isDevelopment) {
uni.getStorage({
key: 'ApiUrl',
success: (e) => {
util.updateApiUrl(e.data);
this.selectedApiUrl = e.data;
}
});
}
const defaultUrl = getDefaultApiUrl();
util.updateApiUrl(defaultUrl);
this.selectedApiUrl = defaultUrl;
uni.getStorage({
key: 'UserInfo',
@@ -218,9 +229,8 @@ export default {
},
onApiUrlConfirm(e) {
console.log('e', JSON.stringify(e));
const selectedValue = this.apiUrlList[e[0]].value;
console.log('selectedValue', selectedValue)
const selectedValue = e && e[0] && e[0].value;
if (selectedValue == null) return;
this.selectedApiUrl = selectedValue;
this.showApiUrlPicker = false;
@@ -300,21 +310,12 @@ export default {
title: '登录中...'
});
let currentApiUrl;
if (config.isDevelopment) {
// 开发环境:使用选择的URL
currentApiUrl = this.selectedApiUrl === 'custom' ? this.customApiUrl : this.selectedApiUrl;
if (!currentApiUrl || currentApiUrl.length === 0) {
this.$u.toast('请输入服务器地址');
return;
}
// 更新store中的URL
this.$store.dispatch('updateApiUrl', currentApiUrl);
} else {
// 生产环境:使用固定的生产URL
currentApiUrl = config.productionApiUrl;
const currentApiUrl = this.selectedApiUrl === 'custom' ? this.customApiUrl : this.selectedApiUrl;
if (!currentApiUrl || currentApiUrl.length === 0) {
this.$u.toast('请输入服务器地址');
return;
}
this.$store.dispatch('updateApiUrl', currentApiUrl);
if (this.login.username.length == 0) {
this.$u.toast('请输入账号');
@@ -334,19 +335,16 @@ export default {
this.$u.api.pdaLogin({
'phone': this.login.username,
'password': this.login.password,
}).then((res) => {
}).then(async (res) => {
console.log('login res', res)
var aLoginUserData = res;
//console.log('--aLoginUserData->>' + JSON.stringify(aLoginUserData));
// 只在开发环境保存 apiurl 到本地存储
if (config.isDevelopment) {
uni.setStorage({
key: 'ApiUrl',
data: currentApiUrl
});
util.updateApiUrl(currentApiUrl);
}
uni.setStorage({
key: 'ApiUrl',
data: currentApiUrl
});
util.updateApiUrl(currentApiUrl);
// 保存 token 到本地存储
uni.setStorageSync('RemoteTokenData', aLoginUserData);
@@ -368,9 +366,17 @@ export default {
getApp().globalData.StoreNameID = aLoginUserData.default_physical_warehouse_id;
getApp().globalData.StoreName = aLoginUserData.default_physical_warehouse_name;
getApp().globalData.StoreTypeNo = '';
try {
await ensureScanConfigAfterLogin(this.$u.api);
} catch (scanError) {
console.log('自动匹配扫码设置失败', scanError);
}
const workbenchUrl = isDefaultPassword(aLoginUserData)
? '/pages/sys/workbench/index?defaultPassword=1'
: '/pages/sys/workbench/index';
setTimeout(() => {
uni.reLaunch({
url: '/pages/sys/workbench/index'
url: workbenchUrl
});
}, 500);
@@ -443,10 +449,18 @@ export default {
return { status: 0 };
}
// 用户已取消过该版本:登录页自动检查不再弹框
const dismissedVersion = uni.getStorageSync('appUpdateDismissedVersion');
if (dismissedVersion && String(dismissedVersion) === String(res.latest_version)) {
console.log('用户已取消该版本更新,跳过自动弹框:', dismissedVersion);
return { status: 0 };
}
return {
changelog: res.message + ',最新版本:' + res.latest_version,
status: res.need_update ? 1 : 0, // 0 无新版本 | 1 有新版本
path: res.download_url // 新apk地址
path: resolveUpgradeDownloadUrl(res.download_url), // 新apk地址
latest_version: res.latest_version
};
} catch (error) {
console.log('检查版本更新失败:', error);
@@ -456,18 +470,14 @@ export default {
},
handleBlurInputUrl(e) {
// 只在开发环境处理自定义URL
if (config.isDevelopment) {
const url = e.detail.value.trim();
if (url) {
this.customApiUrl = url;
// 保存到本地存储
uni.setStorage({
key: 'ApiUrl',
data: url
});
util.updateApiUrl(url);
}
const url = e.detail.value.trim();
if (url) {
this.customApiUrl = url;
uni.setStorage({
key: 'ApiUrl',
data: url
});
util.updateApiUrl(url);
}
},
}
@@ -476,14 +486,25 @@ export default {
<style lang="scss">
@import 'index.scss';
.env-call {
height: auto;
min-height: 140rpx;
}
.server-selector {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 0;
min-height: 80rpx;
padding: 16rpx 0;
font-size: 40rpx;
border-bottom: 1px solid #eee;
}
.server-selector .icon-arrow-down {
font-size: 28px;
}
.list-call {
.u-select {
margin-bottom: 10rpx;
@@ -499,7 +520,16 @@ export default {
height: 150rpx;
// max-width: 5%;
// max-height: 5%;
margin: 10rpx auto 10rpx auto;
margin: 10rpx auto 0 auto;
}
.app-name {
margin: 8rpx 0 24rpx;
color: #242820;
font-size: 40rpx;
font-weight: 700;
line-height: 1.3;
text-align: center;
}
.logoimg {
@@ -598,3 +628,21 @@ export default {
margin-left: 10rpx;
}
</style>
<style lang="scss" scoped>
.login-env-picker {
::v-deep .u-select__header,
::v-deep .u-select__header__btn {
height: 100rpx;
font-size: 36rpx;
}
::v-deep .u-select__header__title {
font-size: 36rpx;
}
::v-deep .u-select__body__picker-view__item,
::v-deep .u-line-1 {
font-size: 40rpx;
}
}
</style>
+53 -16
View File
@@ -41,20 +41,28 @@
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-item icon="question-circle" :iconStyle="{ color: '#ff8d06' }" title="常见问题" @click="navTo('problem')"></u-cell-item>
<u-cell-item icon="kefu-ermai" :iconStyle="{ color: '#5f8dff' }" title="意见反馈" @click="navTo('comment')"></u-cell-item>
<u-cell-item icon="map" :iconStyle="{ color: '#316ede' }" title="账号安全" @click="navTo('pwd')"></u-cell-item>
<u-cell-item icon="map" :iconStyle="{ color: '#316ede' }" title="修改密码" @click="navTo('pwd')"></u-cell-item>
<u-cell-item icon="scan" :iconStyle="{ color: '#36cfc9' }" title="扫描设置" @click="navTo('scan-settings')"></u-cell-item>
<u-cell-item icon="order" :iconStyle="{ color: '#59bdf9' }" title="清除缓存" @click="navTo('clear-cache')"></u-cell-item>
<!--<u-cell-item icon="account" :iconStyle="{ color: '#27c0dc' }" title="关于我们" @click="navTo('about')"></u-cell-item>
<u-cell-item icon="kefu-ermai" :iconStyle="{ color: '#ff8a00' }" title="联系客服" @click="navTo('service')"></u-cell-item>!-->
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-item icon="reload" :iconStyle="{ color: '#19be6b' }" title="版本更新" @click="upgrade"></u-cell-item>
<u-cell-item icon="setting" :iconStyle="{ color: '#2767dc' }" title="系统设置" @click="navTo('setting')"></u-cell-item>
</u-cell-group>
</view>
</view>
<view class="app-meta">
<text class="app-name">{{ appName }}</text>
<text class="app-version">版本 {{ appVersion }}</text>
</view>
</view>
</template>
<script>
import CommonNavbar from "@/components/common-navbar/index";
import app_upgrade from '@/uni_modules/app-upgrade/js_sdk/index.js';
import config, { resolveUpgradeDownloadUrl } from '@/common/config.js';
import manifest from '@/manifest.json';
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
@@ -73,6 +81,12 @@ export default {
},
computed: {
appName() {
return manifest.name || '';
},
appVersion() {
return manifest.versionName || '';
},
avatarUrl() {
// let url = this.vuex_user.avatarUrl || '/ctxPath/static/images/user1.jpg';
// url = url.replace('/ctxPath/', this.vuex_config.baseUrl + '/');
@@ -102,25 +116,30 @@ export default {
},
upgrade(){
// #ifdef APP-PLUS
this.$u.api.upgradeCheck().then(res => {
if (res.result == 'true'){
uni.showModal({
title: '提示',
content: res.message + '是否下载更新?',
showCancel: true,
success: function (res2) {
if (res2.confirm) {
plus.runtime.openURL(res.data.apkUrl);
}
}
app_upgrade(async () => {
const appInfo = await new Promise((resolve) => {
plus.runtime.getProperty(plus.runtime.appid, (inf) => {
resolve(inf);
});
}else{
this.$u.toast(res.message);
});
const res = await this.$u.api.upgradeCheck({
app_name: config.upgradeName,
current_version: appInfo.version
});
if (!res.download_url) {
this.$u.toast('当前版本已是最新版');
return;
}
});
return {
changelog: res.message + ',最新版本:' + res.latest_version,
status: res.need_update ? 1 : 0,
path: resolveUpgradeDownloadUrl(res.download_url),
latest_version: res.latest_version
};
}, 1);
// #endif
// #ifndef APP-PLUS
this.$u.toast('小程序端或H5端无需检查更新')
this.$u.toast('小程序端或H5端已是最新版,无需检查更新!');
// #endif
}
}
@@ -145,4 +164,22 @@ page {
height:50rpx;
}
}
.app-meta {
padding: 48rpx 30rpx 40rpx;
text-align: center;
}
.app-name {
display: block;
color: #242820;
font-size: 36rpx;
font-weight: 700;
line-height: 1.4;
}
.app-version {
display: block;
margin-top: 8rpx;
color: #8a8f86;
font-size: 32rpx;
line-height: 1.3;
}
</style>
+22 -23
View File
@@ -68,31 +68,30 @@ export default {
methods: {
submit() {
this.$refs.uForm.validate(valid => {
if (valid) {
this.$u.api.user.infoSavePwd({
oldPassword: this.model.oldPassword,
newPassword: this.model.newPassword
}).then(res => {
if(res.code == '200'){
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false,
success: function () {
uni.navigateBack();
}
});
}else{
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false
});
if (!valid) {
this.$u.toast('您填写的信息有误,请根据提示修正。');
return;
}
this.$u.api.user.infoSavePwd({
oldPassword: this.model.oldPassword,
newPassword: this.model.newPassword
}).then(() => {
uni.showModal({
title: '提示',
content: '密码修改成功',
showCancel: false,
success: () => {
uni.navigateBack();
}
});
} else {
this.$u.toast('您填写的信息有误,请根据提示修正。');
}
}).catch((err) => {
const message = (err && (err.message || err.msg)) || '修改密码失败';
uni.showModal({
title: '提示',
content: message,
showCancel: false
});
});
});
},
cancel() {
+23 -24
View File
@@ -33,7 +33,7 @@ export default {
model: {
oldPassword: '',
newPassword: '',
confirmNewPassword: ''
confirmPassword: ''
},
rules: {
oldPassword: [
@@ -78,31 +78,30 @@ export default {
methods: {
submit() {
this.$refs.uForm.validate(valid => {
if (valid) {
this.$u.api.user.infoSavePwd({
oldPassword: this.model.oldPassword,
newPassword: this.model.newPassword
}).then(res => {
if(res.code == '200'){
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false,
success: function () {
uni.navigateBack();
}
});
}else{
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false
});
if (!valid) {
this.$u.toast('您填写的信息有误,请根据提示修正。');
return;
}
this.$u.api.user.infoSavePwd({
oldPassword: this.model.oldPassword,
newPassword: this.model.newPassword
}).then(() => {
uni.showModal({
title: '提示',
content: '密码修改成功',
showCancel: false,
success: () => {
uni.navigateBack();
}
});
} else {
this.$u.toast('您填写的信息有误,请根据提示修正。');
}
}).catch((err) => {
const message = (err && (err.message || err.msg)) || '修改密码失败';
uni.showModal({
title: '提示',
content: message,
showCancel: false
});
});
});
},
cancel() {
+37 -2
View File
@@ -42,6 +42,7 @@ import {
mapDictionaryToScannerConfig,
PHONE_SCAN_BRAND,
saveScanConfig,
autoConfigureScanSettings,
} from '@/common/scanConfig.js';
export default {
@@ -83,7 +84,7 @@ export default {
const res = await this.$u.api.dictionary.getDetailEnumList({
dictionary_id: DICTIONARY_TYPE_SCANNER,
});
const list = Array.isArray(res) ? res : [];
const list = Array.isArray(res) ? res : (Array.isArray(res && res.list) ? res.list : []);
const builtinConfigs = this.getScannerConfigs();
if (list.length) {
this.configList = list
@@ -98,6 +99,9 @@ export default {
this.useFallbackConfigList();
}
this.ensurePhoneScanOption();
this.ensureSeuicOption();
this.ensureNlscanOption();
this.ensureNlscanCompatOption();
this.initFormFromSaved();
},
useFallbackConfigList() {
@@ -110,8 +114,39 @@ export default {
this.configList.push(phoneConfig);
}
},
ensureBuiltinScannerOption(brand) {
const builtinConfig = this.getScannerConfigs().find((item) => item.brand === brand);
if (!builtinConfig) {
return;
}
const exists = this.configList.some((item) => {
return item.brand === builtinConfig.brand || item.action === builtinConfig.action;
});
if (exists) {
return;
}
const phoneIndex = this.configList.findIndex((item) => item.brand === PHONE_SCAN_BRAND);
if (phoneIndex >= 0) {
this.configList.splice(phoneIndex, 0, builtinConfig);
return;
}
this.configList.push(builtinConfig);
},
ensureSeuicOption() {
this.ensureBuiltinScannerOption('seuic');
},
ensureNlscanOption() {
this.ensureBuiltinScannerOption('nlscan');
},
ensureNlscanCompatOption() {
this.ensureBuiltinScannerOption('nlscan_compat');
},
initFormFromSaved() {
const savedConfig = getScanConfig(this.getScannerConfigs());
// N5S 曾被误识别为东集时,进入设置页会纠正并写回
const rematch = autoConfigureScanSettings({
remoteConfigs: this.remoteScannerConfigs || [],
});
const savedConfig = (rematch && rematch.config) || getScanConfig(this.getScannerConfigs());
if (savedConfig) {
this.applyConfig(savedConfig);
return;
-35
View File
@@ -4,7 +4,6 @@
<u-cell-group :border="false">
<u-cell-item title="通用" @click="navTo('/pages/sys/user/currency')" :arrow="true"></u-cell-item>
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-item title="版本更新" @click="upgrade()" :arrow="true"></u-cell-item>
<u-cell-item title="隐私政策" @click="navTo('')" :arrow="true"></u-cell-item>
<u-cell-item title="用户协议" @click="navTo('')" :arrow="true"></u-cell-item>
</u-cell-group>
@@ -18,10 +17,6 @@
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
import app_upgrade from '@/uni_modules/app-upgrade/js_sdk/index.js'
import util from '@/common/util.js';
import config from '../../../common/config';
export default {
data() {
return {
@@ -34,36 +29,6 @@ export default {
url: url
});
},
upgrade(){
// #ifdef APP-PLUS
app_upgrade(async ()=>{
// 获取应用信息
const appInfo = await new Promise((resolve) => {
plus.runtime.getProperty(plus.runtime.appid, (inf) => {
resolve(inf);
});
});
const res = await this.$u.api.upgradeCheck({
app_name: config.upgradeName,
current_version: appInfo.version
})
console.log('res',res)
if(!res.download_url){
this.$u.toast('当前版本已是最新版');
return
}
return {
changelog: res.message + ',最新版本:' + res.latest_version,
status: res.need_update ? 1 : 0, // 0 无新版本 | 1 有新版本
path: res.download_url // 新apk地址
}
}, 1)
// #endif
// #ifndef APP-PLUS
this.$u.toast('小程序端或H5端已是最新版,无需检查更新!');
// #endif
},
openSettings() {
// #ifdef APP-PLUS
uni.getSystemInfo({
+276 -182
View File
@@ -1,227 +1,321 @@
<template>
<view class="wrap">
<common-navbar title="工作台" :showBack="false">
<template #right>
<view class="scan_box">
<u-icon name="scan" color="#333333" size="46" @click="handleScan"></u-icon>
<view class="app-center">
<view class="app-center__status" :style="{ height: statusBarHeight + 'px' }"></view>
<view class="app-center__header">
<text class="app-center__version">v{{ appVersion }}</text>
<text class="app-center__title">工作台</text>
<view class="app-center__setting" @click="navTo('/pages/sys/user/setting')">
<u-icon name="setting" color="#333333" size="34"></u-icon>
<text>设置</text>
</view>
</view>
<view class="app-center__grid">
<view
v-for="item in menuList"
:key="item.path"
class="menu-card"
:class="item.tone"
hover-class="menu-card--pressed"
@click="navTo(item.path)"
>
<image class="menu-card__bg" :src="item.bg" mode="aspectFill"></image>
<view class="menu-card__mask"></view>
<text class="menu-card__quote">“</text>
<view v-if="item.tag" class="menu-card__tag">
<text>{{ item.tag }}</text>
</view>
</template>
</common-navbar>
<view class="workbench-title">销售管理</view>
<view class="toolbar">
<u-grid class="grid" :col="4" :border="false">
<u-grid-item :index="0" @click="navTo('/pages/saleship/salepickscan')">
<view class="home-icon icon-color05">
<i class="iconfont icon-hetongguanli"></i>
</view>
<view class="grid-text">成品配布</view>
</u-grid-item>
<!-- <u-grid-item :index="1" @click="navTo('/pages/storegoods/QRBarCodeReview')"> -->
<!-- <view class="home-icon icon-color02"> -->
<!-- <i class="iconfont icon-mall-bag"></i>-->
<!-- </view>-->
<!-- <view class="grid-text">标签检测</view>-->
<!-- </u-grid-item>-->
</u-grid>
</view>
<view class="workbench-title">成品管理</view>
<view class="toolbar">
<u-grid class="grid" :col="4" :border="false">
<u-grid-item :index="2" @click="navTo('/pages/storegoods/storeGoodsProcessInList')">
<view class="home-icon icon-color04">
<i class="iconfont icon-hetongguanli"></i>
</view>
<view class="grid-text">加工进仓</view>
</u-grid-item>
<u-grid-item :index="3" @click="navTo('/pages/storegoods/storeGoodsProcessOutList')">
<view class="home-icon icon-color05">
<i class="iconfont icon-hetongguanli"></i>
</view>
<view class="grid-text">加工出仓</view>
</u-grid-item>
</u-grid>
</view>
<view class="menu-card__body">
<text class="menu-card__name">{{ item.name }}</text>
<text class="menu-card__en">{{ item.en }}</text>
</view>
<view class="menu-card__arrow">
<text>›</text>
</view>
</view>
</view>
</view>
</template>
<script>
import CommonNavbar from "@/components/common-navbar/index";
import scanMixin from '@/common/scanMixin.js';
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
export default {
components: {
CommonNavbar,
},
mixins: [scanMixin],
data() {
return {
show: false,
head: "/static/aidex/images/head.png",
imgList: [
{ image: "/static/aidex/banner/banner01.png" },
//{image: '/static/aidex/banner/banner02.png'},
//{image: '/static/aidex/banner/banner03.png'}
],
todoCount: 3,
// scanReceiver 和 isPageActive 已由 scanMixin 提供
statusBarHeight: 20,
appVersion: '1.1.10',
menuList: [
{
name: '坯布出库',
en: 'FABRIC OUT',
tag: '出库',
path: '/pages/storefabric/storeFabricBusinessOutList',
tone: 'tone-out',
bg: '/static/img/workbench/fabric-out.jpg'
},
{
name: '坯布库存',
en: 'FABRIC STOCK',
tag: '库存',
path: '/pages/storefabric/storeFabricWarehouseGroupList',
tone: 'tone-stock',
bg: '/static/img/workbench/fabric-stock.jpg'
},
{
name: '手动进仓',
en: 'MANUAL ENTRY',
tag: '进仓',
path: '/pages/storefabric/storeFabricManualIn',
tone: 'tone-in',
bg: '/static/img/workbench/fabric-stock.jpg'
}
]
};
},
onLoad() {
onLoad(options) {
const sys = uni.getSystemInfoSync();
this.statusBarHeight = sys.statusBarHeight || 20;
if (options && String(options.defaultPassword) === '1') {
this.promptChangePassword();
}
// #ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid, (inf) => {
if (inf && inf.version) {
this.appVersion = inf.version;
}
});
// #endif
this.registerScanBroadcast(this.handleScanCode);
},
// onUnload, onHide, onShow 已由 scanMixin 自动处理
computed: {
contentStyle() {
const navHeight = getStatusBarHeight() + 44;
return {
height: `${navHeight}px`,
};
},
},
methods: {
// 自定义扫码处理回调 - 处理本页面特有的扫码逻辑
promptChangePassword() {
setTimeout(() => {
uni.showModal({
title: '提示',
content: '当前使用的是默认密码,请修改密码',
confirmText: '去修改',
cancelText: '稍后',
success: (res) => {
if (!res.confirm) return;
uni.navigateTo({ url: '/pages/sys/user/pwd' });
},
});
}, 400);
},
handleScanCode(scanResult) {
console.log('工作台-扫码结果:', scanResult);
const cleanResult = scanResult.trim().replace(/[\r\n]/g, '');
uni.navigateTo({
url: '/pages/saleship/salepickscandetail?order_no=' + cleanResult
});
},
navTo(url) {
uni.navigateTo({
url: url,
});
},
imgListClick(index) {
console.log(`点击了第${index + 1}页图片`);
},
itemClick(index) {
console.log(index);
},
// 处理扫码(手动点击扫码按钮)
handleScan() {
if (this.usePhoneScanFallback) {
this.openPhoneScan();
return;
}
// #ifdef APP-PLUS || MP-WEIXIN
uni.scanCode({
scanType: ['qrCode', 'barCode'], // 同时支持二维码和条形码
success: (res) => {
console.log('扫码成功:', res);
const cleanResult = res.result.trim().replace(/[\r\n]/g, '');
uni.navigateTo({
url: '/pages/saleship/salepickscandetail?order_no=' + cleanResult
})
},
fail: (err) => {
console.error('扫码失败:', err);
uni.showToast({
title: '扫码失败',
icon: 'none'
});
}
});
// #endif
// #ifdef H5
uni.showToast({
title: "H5环境不支持扫码功能",
icon: "error",
});
// #endif
},
// 处理扫码成功
handleScanSuccess(result) {
try {
// 这里可以根据实际需求处理扫码结果
// 例如:验证扫码结果的格式或内容
if (this.validateScanResult(result)) {
// 扫码验证通过,执行其他逻辑
uni.showToast({
title: "执行成功",
icon: "success",
});
} else {
uni.showToast({
title: "无效的二维码",
icon: "none",
});
}
} catch (error) {
console.error("处理扫码结果失败:", error);
uni.showToast({
title: "处理失败",
icon: "none",
});
}
},
// registerScanBroadcast 和 unregisterScanBroadcast 已由 scanMixin 提供
},
uni.navigateTo({ url });
}
}
};
</script>
<style lang="scss">
@import "index.scss";
page {
background: #eef1f4;
}
.scan_box {
.app-center {
min-height: 100vh;
background: #eef1f4;
box-sizing: border-box;
}
.app-center__header {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.scan_text {
font-size: 12px;
color: #2979ff;
}
height: 88rpx;
padding: 0 24rpx;
background: #ffffff;
border-bottom: 1rpx solid #e5e8ec;
}
.banner-box {
padding: 0 2%;
width: 96%;
height: 170rpx;
margin: 30rpx 0 30rpx;
.app-center__version {
position: absolute;
left: 24rpx;
font-size: 24rpx;
color: #9aa3ad;
line-height: 1;
}
.u-swiper-wrap {
padding: 0 10px;
.app-center__title {
font-size: 36rpx;
font-weight: 700;
color: #1f2430;
letter-spacing: 2rpx;
}
.banner-pic {
width: 47%;
float: left;
display: inline-block;
margin: 0 1.5%;
}
.banner-pic image {
width: 100%;
height: 170rpx;
border-radius: 12rpx;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}
.u-mode-light-info {
background-color: #ffffff;
color: #666666;
border: 1px solid #e9ecf6;
font-size: 12px;
padding: 2px 8px;
position: relative;
top: -3px;
}
.workbench-title {
font-size: 32rpx;
font-weight: bold;
.app-center__setting {
position: absolute;
right: 24rpx;
display: flex;
align-items: center;
gap: 6rpx;
font-size: 26rpx;
color: #333333;
padding: 15px 30rpx;
}
.home-icon i.icon-tongzhi {
font-size: 22px;
.app-center__grid {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 28rpx 48rpx 40rpx;
box-sizing: border-box;
}
.menu-card {
position: relative;
width: 310rpx;
height: 200rpx;
margin-bottom: 22rpx;
border-radius: 16rpx;
overflow: hidden;
box-sizing: border-box;
box-shadow: 0 6rpx 14rpx rgba(20, 40, 70, 0.12);
}
.menu-card--pressed {
opacity: 0.88;
transform: scale(0.985);
}
.menu-card__bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 0;
opacity: 0.38;
}
.menu-card__mask {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 1;
}
.menu-card__quote {
position: absolute;
left: 14rpx;
top: 2rpx;
font-size: 48rpx;
line-height: 1;
color: rgba(255, 255, 255, 0.55);
font-weight: 700;
z-index: 2;
}
.menu-card__tag {
position: absolute;
top: 14rpx;
right: 48rpx;
padding: 2rpx 12rpx;
border-radius: 6rpx;
background: #ffffff;
z-index: 3;
}
.menu-card__tag text {
font-size: 20rpx;
font-weight: 700;
line-height: 1.2;
}
.menu-card__body {
position: absolute;
left: 22rpx;
right: 22rpx;
top: 50%;
transform: translateY(-42%);
z-index: 2;
}
.menu-card__name {
display: block;
font-size: 34rpx;
font-weight: 700;
color: #ffffff;
line-height: 1.2;
}
.menu-card__en {
display: block;
margin-top: 8rpx;
font-size: 18rpx;
letter-spacing: 1rpx;
color: rgba(255, 255, 255, 0.88);
line-height: 1.2;
}
.menu-card__arrow {
position: absolute;
right: 0;
bottom: 0;
width: 48rpx;
height: 42rpx;
background: #eef1f4;
border-top-left-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
z-index: 3;
}
.menu-card__arrow text {
font-size: 30rpx;
color: #8a93a0;
line-height: 1;
margin-top: -4rpx;
}
.tone-out {
background: #e14b3b;
}
.tone-out .menu-card__mask {
background: rgba(225, 75, 59, 0.72);
}
.tone-out .menu-card__tag text {
color: #e14b3b;
}
.tone-stock {
background: #2f78e6;
}
.tone-stock .menu-card__mask {
background: rgba(47, 120, 230, 0.72);
}
.tone-stock .menu-card__tag text {
color: #2f78e6;
}
.tone-in {
background: #3f51b5;
}
.tone-in .menu-card__mask {
background: rgba(63, 81, 181, 0.72);
}
.tone-in .menu-card__tag text {
color: #3f51b5;
}
</style>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

+13 -36
View File
@@ -1,7 +1,7 @@
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
import config from '@/common/config.js';
import config, { getDefaultApiUrl } from '@/common/config.js';
import util from '@/common/util.js';
import Vue from 'vue'
import Vuex from 'vuex'
@@ -19,30 +19,15 @@ try{
}
// 本分支统一使用 hcscm 服务前缀
function normalizeApiUrl(url) {
return String(url || '').replace(/hcscm_weave/g, 'hcscm');
}
// 初始化API URL
// 初始化API URL(默认正式环境)
function initApiUrl() {
if (config.isDevelopment) {
// 开发环境:从存储读取,如果没有则使用测试环境
try {
const savedApiUrl = uni.getStorageSync('ApiUrl');
const url = normalizeApiUrl(savedApiUrl || config.devApiUrlOptions[0].value);
if (savedApiUrl && url !== savedApiUrl) {
uni.setStorageSync('ApiUrl', url);
}
return url;
} catch (e) {
console.log('读取存储的 apiurl 失败', e);
return config.devApiUrlOptions[0].value;
}
} else {
// 生产环境:使用固定的生产URL
return normalizeApiUrl(config.productionApiUrl);
const defaultUrl = getDefaultApiUrl();
try {
uni.setStorageSync('ApiUrl', defaultUrl);
} catch (e) {
console.log('写入正式环境地址失败', e);
}
return defaultUrl;
}
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
@@ -114,15 +99,8 @@ const store = new Vuex.Store({
state.vuex_notificationAudio = audio;
},
SET_API_URL(state, url) {
// 生产环境不允许修改URL
if (!config.isDevelopment) {
console.warn('生产环境不允许修改API URL');
return;
}
const nextUrl = normalizeApiUrl(url);
state.apiurl = nextUrl
// 同时保存到本地存储
uni.setStorageSync('ApiUrl', nextUrl)
state.apiurl = url
uni.setStorageSync('ApiUrl', url)
}
},
@@ -183,6 +161,9 @@ const store = new Vuex.Store({
uni.request({
url: util.apiurl + "/product/fpmArrangeOrder/getFpmArrangeOrderList",
method: "GET",
// #ifdef APP-PLUS
sslVerify: false,
// #endif
header: {
platform: "2",
Authorization: uni.getStorageSync("RemoteTokenData").token,
@@ -231,10 +212,6 @@ const store = new Vuex.Store({
name: 'vuex_messageList',
value: newList
});
uni.setTabBarBadge({
index: 0,
text: `${newList.length}`
});
}
// 使用 $uStore 方式更新状态
commit('$uStore', {
+8 -3
View File
@@ -37,11 +37,12 @@ class AppDialog {
}
// 显示
show(apkUrl, changelog) {
show(apkUrl, changelog, latestVersion = '') {
this.drawView(changelog)
this.maskEl.show()
this.popupEl.show()
this.apkUrl = apkUrl;
this.latestVersion = latestVersion || '';
}
// 隐藏
@@ -309,8 +310,12 @@ class AppDialog {
const buttonWidth = (this.viewWidth - this.viewPadding) / 2;
if (e.clientY > maxTop - 40 && e.clientY < maxTop) {
if (showCancel) {
// 取消
// if(e.clientX>this.viewPadding && e.clientX<maxLeft-buttonWidth-this.viewPadding){}
// 取消:记住已跳过的版本,登录页自动检查不再弹出
if (e.clientX > this.viewPadding && e.clientX < this.viewPadding + buttonWidth) {
if (this.latestVersion) {
uni.setStorageSync('appUpdateDismissedVersion', String(this.latestVersion));
}
}
// 确定
if (e.clientX > maxLeft - buttonWidth && e.clientX < maxLeft) {
upgrade.checkOs(this.apkUrl)
+2 -1
View File
@@ -40,7 +40,8 @@ class CheckUpate{
if(res.status===1){
const path=res.path || '';
const changeLog=res.changelog || '';
appDialog.show(path,changeLog);
const latestVersion=res.latest_version || '';
appDialog.show(path,changeLog,latestVersion);
}
})
this.storageTimeStamp()
+1
View File
@@ -14,6 +14,7 @@ module.exports = {
'process.env': {
...definitions[0]['process.env'],
VUE_APP_UPGRADE_NAME: JSON.stringify(process.env.VUE_APP_UPGRADE_NAME),
VUE_APP_UPGRADE_CDN_PREFIX: JSON.stringify(process.env.VUE_APP_UPGRADE_CDN_PREFIX),
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),
+155 -245
View File
@@ -189,21 +189,11 @@
resolved "https://mirrors.huaweicloud.com/repository/npm/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==
"@babel/helper-string-parser@^7.29.7":
version "7.29.7"
resolved "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz#7f0871d99824d23137d60f86fcf6130fd5a1b51f"
integrity sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==
"@babel/helper-validator-identifier@^7.27.1":
version "7.27.1"
resolved "https://mirrors.huaweicloud.com/repository/npm/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8"
integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==
"@babel/helper-validator-identifier@^7.29.7":
version "7.29.7"
resolved "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz#bd87084ced0c796ec46bda492de6e83d29e89fc2"
integrity sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==
"@babel/helper-validator-option@^7.27.1":
version "7.27.1"
resolved "https://mirrors.huaweicloud.com/repository/npm/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f"
@@ -233,13 +223,6 @@
dependencies:
"@babel/types" "^7.28.0"
"@babel/parser@^7.23.5":
version "7.29.7"
resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.29.7.tgz#837b87387cbf5ec5530cb634b3c622f68edb9334"
integrity sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==
dependencies:
"@babel/types" "^7.29.7"
"@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.27.1":
version "7.27.1"
resolved "https://mirrors.huaweicloud.com/repository/npm/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.27.1.tgz#61dd8a8e61f7eb568268d1b5f129da3eee364bf9"
@@ -961,14 +944,6 @@
"@babel/helper-string-parser" "^7.27.1"
"@babel/helper-validator-identifier" "^7.27.1"
"@babel/types@^7.29.7":
version "7.29.7"
resolved "https://registry.npmmirror.com/@babel/types/-/types-7.29.7.tgz#8005e31d82712ee7adaef6e23c63b71a62770a92"
integrity sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==
dependencies:
"@babel/helper-string-parser" "^7.29.7"
"@babel/helper-validator-identifier" "^7.29.7"
"@bcoe/v8-coverage@^0.2.3":
version "0.2.3"
resolved "https://mirrors.huaweicloud.com/repository/npm/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
@@ -982,24 +957,24 @@
exec-sh "^0.3.2"
minimist "^1.2.0"
"@dcloudio/types@^3.4.19":
version "3.4.31"
resolved "https://registry.npmmirror.com/@dcloudio/types/-/types-3.4.31.tgz#8dca3ff579044beb11dcf3d22c522734882a47e2"
integrity sha512-YAqOfJpcAwMs4Fagv2oP+iRHSCJOJoN8JUYyoRD6gwfANhsI9QaYj4/j22FzSopfHkqjX50B7YkG/VRAyz9OnA==
"@dcloudio/types@^3.3.2":
version "3.4.19"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/types/-/types-3.4.19.tgz#cf4b23cac1df4ba1ad7871a2a0658b57435f2ba3"
integrity sha512-1foayOFEAQ+jnQLt3ACsovCNjer3/fXn1I2VBpmDOzs2nk/n4UHwRLAxZV/RpxRqaGOPEvKrO/Pq+VI6sAmuRw==
"@dcloudio/uni-app-plus@2.0.2-4070520250711001":
"@dcloudio/uni-app-plus@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-app-plus/-/uni-app-plus-2.0.2-4070520250711001.tgz#ca95a9cbe077922d07c2d277184e57a85f8259e0"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-app-plus/-/uni-app-plus-2.0.2-4070520250711001.tgz#ca95a9cbe077922d07c2d277184e57a85f8259e0"
integrity sha512-InoNBw6nDzrUhct6OCKNXe/i2mMWp724Y5b/QSxSKzS5PdODRqWEX30LAke3EPDr292c9EI+JINQLmXVBedFXg==
"@dcloudio/uni-app@2.0.2-4070520250711001":
"@dcloudio/uni-app@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-app/-/uni-app-2.0.2-4070520250711001.tgz#71b234d5a43ca1822e0375b053385c954cde5cab"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-app/-/uni-app-2.0.2-4070520250711001.tgz#71b234d5a43ca1822e0375b053385c954cde5cab"
integrity sha512-LNSEC+bRIUOIpWMCGyp+lLa05dnFOdSJ6V70I7IDy/Cs0LlxX84LGvCUctyol9vTLvsPS793hIK9lIOo65RuEQ==
"@dcloudio/uni-automator@2.0.2-4070520250711001":
"@dcloudio/uni-automator@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-automator/-/uni-automator-2.0.2-4070520250711001.tgz#9b51f2d1ca719a8b12a03a65a95baa695bd81d5b"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-automator/-/uni-automator-2.0.2-4070520250711001.tgz#9b51f2d1ca719a8b12a03a65a95baa695bd81d5b"
integrity sha512-9JFBQCywhYt+WwAdHT4/CEEw38hPSaqXLRmURQpujtGnyE9L5248fXKxvy5Q4+4U/vB6Q9Svk7ctJk/c5qoc8w==
dependencies:
address "^1.1.2"
@@ -1014,17 +989,17 @@
qrcode-terminal "^0.12.0"
ws "^7.2.3"
"@dcloudio/uni-cli-i18n@2.0.2-4070520250711001":
"@dcloudio/uni-cli-i18n@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-cli-i18n/-/uni-cli-i18n-2.0.2-4070520250711001.tgz#583de80ff78c556d5038c62f90117dbf95e3ab85"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-cli-i18n/-/uni-cli-i18n-2.0.2-4070520250711001.tgz#583de80ff78c556d5038c62f90117dbf95e3ab85"
integrity sha512-10Rjb2+EbMHLUGYXUMLiZn9Gk3rp7iKANuFfrXKvNlUz5kdW1VNCpaA728ZIblib/JudNLa1k3ETTA34sWlF+Q==
dependencies:
i18n "^0.13.3"
os-locale-s-fix "^1.0.8-fix-1"
"@dcloudio/uni-cli-shared@2.0.2-4070520250711001":
"@dcloudio/uni-cli-shared@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-cli-shared/-/uni-cli-shared-2.0.2-4070520250711001.tgz#6b8365649c72b73e36fb03d6877cd5bb2b77ecdf"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-cli-shared/-/uni-cli-shared-2.0.2-4070520250711001.tgz#6b8365649c72b73e36fb03d6877cd5bb2b77ecdf"
integrity sha512-K3t8a+sBsjWRtYM9T2jWEUdO+qvYUBNvQOr5HHDHZRN7XOu7u6MK40uddzILj8+oQum6OJMTSaAYFgkXiEPFcg==
dependencies:
escape-string-regexp "^4.0.0"
@@ -1035,9 +1010,9 @@
postcss-urlrewrite "^0.2.2"
strip-json-comments "^2.0.1"
"@dcloudio/uni-h5@2.0.2-4070520250711001":
"@dcloudio/uni-h5@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-h5/-/uni-h5-2.0.2-4070520250711001.tgz#5379836be3d562a31814ae8bdeccaeddf667f601"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-h5/-/uni-h5-2.0.2-4070520250711001.tgz#5379836be3d562a31814ae8bdeccaeddf667f601"
integrity sha512-8SIuPIV1ziI8v4s8zqqGrBzSbPF6U9SNIMkqLPrLERZ7uD1zfPozxB4Vgp0zsSqduNfO0LqbFOQuyegt6T2SMA==
dependencies:
base64-arraybuffer "^0.2.0"
@@ -1046,19 +1021,19 @@
postcss-urlrewrite "^0.3.0"
safe-area-insets "^1.4.1"
"@dcloudio/uni-helper-json@^1.0.13":
"@dcloudio/uni-helper-json@*":
version "1.0.13"
resolved "https://registry.npmmirror.com/@dcloudio/uni-helper-json/-/uni-helper-json-1.0.13.tgz#4e8aa062daaefb30d98973c035a7b0ab628329c7"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-helper-json/-/uni-helper-json-1.0.13.tgz#4e8aa062daaefb30d98973c035a7b0ab628329c7"
integrity sha512-FO9Iu4zW4td3Tr+eiCDWuele2ehkJ4qxQ/UhpAMLjso+ZdWz6NagK5Syh6cdy1hoDqbxpNoqnLynuJXe81Ereg==
"@dcloudio/uni-i18n@2.0.2-4070520250711001":
"@dcloudio/uni-i18n@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-i18n/-/uni-i18n-2.0.2-4070520250711001.tgz#8149cff342b3844aa1b81426bdb50f48a9b5c058"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-i18n/-/uni-i18n-2.0.2-4070520250711001.tgz#8149cff342b3844aa1b81426bdb50f48a9b5c058"
integrity sha512-AvhlDf8AenEqJPHvRgSRd4JXQj5ur20qISrettE33jTCseA5L1PAF59hpxgjyuhXeBlNjssAsv/F2qzgwZnBDw==
"@dcloudio/uni-migration@2.0.2-4070520250711001":
"@dcloudio/uni-migration@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-migration/-/uni-migration-2.0.2-4070520250711001.tgz#d4d71c79dc044a8fd0606f3dc9ecba21464d2806"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-migration/-/uni-migration-2.0.2-4070520250711001.tgz#d4d71c79dc044a8fd0606f3dc9ecba21464d2806"
integrity sha512-V+07p5ehNMtbaW3xZcmcBksof7vtFRKgolmEuMAaJJeHCAwUlNbbjUB14LpBayjN2CSCqUqnvupNuxZ114/rFA==
dependencies:
commander "^4.0.1"
@@ -1067,69 +1042,69 @@
recast "*"
stricter-htmlparser2 "^3.9.6"
"@dcloudio/uni-mp-360@2.0.2-4070520250711001":
"@dcloudio/uni-mp-360@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-mp-360/-/uni-mp-360-2.0.2-4070520250711001.tgz#edc458f0ad94d1c35b34af8011c6bf5bd9a004cd"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-mp-360/-/uni-mp-360-2.0.2-4070520250711001.tgz#edc458f0ad94d1c35b34af8011c6bf5bd9a004cd"
integrity sha512-l74u/++BwQm/2X/6ZKLB1zfqdQejsya5Kj0Uf9K2ZCHnYA2lVt/8FN+pOWSrL/Ui2AabzKDsFRA5He23//3r9Q==
"@dcloudio/uni-mp-alipay@2.0.2-4070520250711001":
"@dcloudio/uni-mp-alipay@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-mp-alipay/-/uni-mp-alipay-2.0.2-4070520250711001.tgz#02b59499d802789d7fc31fa952366b8d6732044d"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-mp-alipay/-/uni-mp-alipay-2.0.2-4070520250711001.tgz#02b59499d802789d7fc31fa952366b8d6732044d"
integrity sha512-tP/ljYRi60RwS3x/U3JvRDl7tN39o7trrHxqPAcQnLqfN7CyO4uxGcUX+2uBgDoAUJm6gBOaqaPIuO9kAIC0Aw==
"@dcloudio/uni-mp-baidu@2.0.2-4070520250711001":
"@dcloudio/uni-mp-baidu@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-mp-baidu/-/uni-mp-baidu-2.0.2-4070520250711001.tgz#cfc8afee9c9277ece325c6669f84ead81bddef0c"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-mp-baidu/-/uni-mp-baidu-2.0.2-4070520250711001.tgz#cfc8afee9c9277ece325c6669f84ead81bddef0c"
integrity sha512-8HnPCU77uEm3GaJgG+uesjwOadRTTxDU0PETduCIIVIBMp/d+qeaYQL6zLLuITx9+DsLNC59eq0rCX92v4cijQ==
"@dcloudio/uni-mp-harmony@2.0.2-4070520250711001":
"@dcloudio/uni-mp-harmony@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-mp-harmony/-/uni-mp-harmony-2.0.2-4070520250711001.tgz#9e784a2d3ffd8df24fb96c29d65ff604ec36d97c"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-mp-harmony/-/uni-mp-harmony-2.0.2-4070520250711001.tgz#9e784a2d3ffd8df24fb96c29d65ff604ec36d97c"
integrity sha512-RnxYUX9+A17CU/5sdHnq7/W2lAfdw0vU4DLaACUvgaPXrsduuYWeqGKDRM2IB6Xmu8QMvfhVkMel43DSGIT6/g==
"@dcloudio/uni-mp-jd@2.0.2-4070520250711001":
"@dcloudio/uni-mp-jd@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-mp-jd/-/uni-mp-jd-2.0.2-4070520250711001.tgz#0ef070fe187207be11cb6d55a97164a8499672b3"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-mp-jd/-/uni-mp-jd-2.0.2-4070520250711001.tgz#0ef070fe187207be11cb6d55a97164a8499672b3"
integrity sha512-nQoSdM9P74yvZvMD6eqXmCZbUTcmIvO535KCN327SA3h1CCub7mF+HMK9xV++LGlrnt0XpJM/l4u+Begj5eJTw==
"@dcloudio/uni-mp-kuaishou@2.0.2-4070520250711001":
"@dcloudio/uni-mp-kuaishou@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-mp-kuaishou/-/uni-mp-kuaishou-2.0.2-4070520250711001.tgz#4d295a58b4027034a920e7b71eb8842fb1160e2a"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-mp-kuaishou/-/uni-mp-kuaishou-2.0.2-4070520250711001.tgz#4d295a58b4027034a920e7b71eb8842fb1160e2a"
integrity sha512-tk8SFytrkepNHEJu4yEs8EbmAPq90Kd7K8105xMNLQYpJqupwsvj25k2jjlwfWB46TK2Vj5mbavHpOyR0CrnWA==
"@dcloudio/uni-mp-lark@2.0.2-4070520250711001":
"@dcloudio/uni-mp-lark@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-mp-lark/-/uni-mp-lark-2.0.2-4070520250711001.tgz#24dabbec3f8d6a02a88c4bddc0aab0444974f383"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-mp-lark/-/uni-mp-lark-2.0.2-4070520250711001.tgz#24dabbec3f8d6a02a88c4bddc0aab0444974f383"
integrity sha512-J8wzephK9uzB6fDK+AV2TEnLospw6J7OLNlwDMboaXJ8/+k9pVUGX1Qyr1tbIt1Jk0YhO/fxmE+GGkgfL8/l6Q==
"@dcloudio/uni-mp-qq@2.0.2-4070520250711001":
"@dcloudio/uni-mp-qq@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-mp-qq/-/uni-mp-qq-2.0.2-4070520250711001.tgz#c301a7cbb2a3c70b22afb7bea05a3a6bfbde2a8e"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-mp-qq/-/uni-mp-qq-2.0.2-4070520250711001.tgz#c301a7cbb2a3c70b22afb7bea05a3a6bfbde2a8e"
integrity sha512-3TfkI2tteg+EveNu5Lk5fO39ohBdel2gYlz8SmGXJTElOCnsejJDzS7wYBHnrVXSW0Ldv2P8NB1N6rwOu7uTgA==
"@dcloudio/uni-mp-toutiao@2.0.2-4070520250711001":
"@dcloudio/uni-mp-toutiao@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-mp-toutiao/-/uni-mp-toutiao-2.0.2-4070520250711001.tgz#163055ddae974771777cf5c190b177c33b967c67"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-mp-toutiao/-/uni-mp-toutiao-2.0.2-4070520250711001.tgz#163055ddae974771777cf5c190b177c33b967c67"
integrity sha512-oOSeeyImPHykyF6esi7m2kFTuxXc8UUAq2qyz8X0EiKI+XtEbMNPW16/m4dLSzhOLVBE7RxPmyExhzWSi+1GEg==
"@dcloudio/uni-mp-vue@2.0.2-4070520250711001":
"@dcloudio/uni-mp-vue@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-mp-vue/-/uni-mp-vue-2.0.2-4070520250711001.tgz#879adfd4ceed9617b08122583b22c3c61f7d2262"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-mp-vue/-/uni-mp-vue-2.0.2-4070520250711001.tgz#879adfd4ceed9617b08122583b22c3c61f7d2262"
integrity sha512-BV04qXBfCWF+HLPzYXBYjMSPPJM7MPkFiiKnExgvBNkVyT35VmzeqL2zSUR1R7789G50z0qiop/wGtZRQHocFw==
"@dcloudio/uni-mp-weixin@2.0.2-4070520250711001":
"@dcloudio/uni-mp-weixin@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-mp-weixin/-/uni-mp-weixin-2.0.2-4070520250711001.tgz#9c2c86e0e2c64a44721e2e45d3d24d1bfaec7707"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-mp-weixin/-/uni-mp-weixin-2.0.2-4070520250711001.tgz#9c2c86e0e2c64a44721e2e45d3d24d1bfaec7707"
integrity sha512-a/MTqhhMKM7NGHasM/6qqQjTubSkDiDt6PLPyTHoExG5i+UEd9MzNufwzdot96qDduw1b59Jt8wAn9ZOUa6xhQ==
"@dcloudio/uni-mp-xhs@2.0.2-4070520250711001":
"@dcloudio/uni-mp-xhs@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-mp-xhs/-/uni-mp-xhs-2.0.2-4070520250711001.tgz#ae321f8ffb520dc8c11706ac0f0bf03c7ca4b52c"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-mp-xhs/-/uni-mp-xhs-2.0.2-4070520250711001.tgz#ae321f8ffb520dc8c11706ac0f0bf03c7ca4b52c"
integrity sha512-/X2/jhwlBprCleJ07S0xUNF2ULANhnehXRIN8zZ6yd6BTkd+fc2An/brfw4dkPvr5YDfcnLc9AsQc45ka+pQuw==
"@dcloudio/uni-quickapp-native@2.0.2-4070520250711001":
"@dcloudio/uni-quickapp-native@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-quickapp-native/-/uni-quickapp-native-2.0.2-4070520250711001.tgz#0ceab7b7d01e62dd58039e90569318443e800483"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-quickapp-native/-/uni-quickapp-native-2.0.2-4070520250711001.tgz#0ceab7b7d01e62dd58039e90569318443e800483"
integrity sha512-EZtZ8kAz40fOU396fQVWgAG+yZJJRviANcU9/ASfwEcGdqeYFmGUa8MIm4sYRZHKWPVC2k/drfBfzXy4vuhjCQ==
dependencies:
"@hap-toolkit/dsl-vue" "0.6.13"
@@ -1137,24 +1112,24 @@
"@hap-toolkit/server" "0.6.13"
module-alias "^2.1.0"
"@dcloudio/uni-quickapp-webview@2.0.2-4070520250711001":
"@dcloudio/uni-quickapp-webview@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-quickapp-webview/-/uni-quickapp-webview-2.0.2-4070520250711001.tgz#847b2512b95980eb3b434635d4d7460fc0244f2b"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-quickapp-webview/-/uni-quickapp-webview-2.0.2-4070520250711001.tgz#847b2512b95980eb3b434635d4d7460fc0244f2b"
integrity sha512-4ZpgIygoX4XFkiv8UCgXXrg/HEIEHBTtBpKqnATYOPYU9Uo+ThjUDDUWmAg4ya5Vm962hzuR5/RE+oZJtjx0yg==
"@dcloudio/uni-stacktracey@2.0.2-4070520250711001":
"@dcloudio/uni-stacktracey@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-stacktracey/-/uni-stacktracey-2.0.2-4070520250711001.tgz#0bd845c52fc9cd41b536dca55f749390aff63703"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-stacktracey/-/uni-stacktracey-2.0.2-4070520250711001.tgz#0bd845c52fc9cd41b536dca55f749390aff63703"
integrity sha512-ST3rLYbMN3cOABC+Oq4vJgF2RigBsZ7uiPrVYa7PBzWGTsilyFO/V77KX3tLwghxAmDHi+FrpdRUCX34Fu1ygQ==
"@dcloudio/uni-stat@2.0.2-4070520250711001", "@dcloudio/uni-stat@^2.0.2-4070520250711001":
"@dcloudio/uni-stat@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-stat/-/uni-stat-2.0.2-4070520250711001.tgz#508a456b073add5d0a0fe9d560a04003bc013c4c"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-stat/-/uni-stat-2.0.2-4070520250711001.tgz#508a456b073add5d0a0fe9d560a04003bc013c4c"
integrity sha512-1zRo9EgZrXjmyGK1Tn6l2g93nzVVHvHFEm3VRjDAyg66SAXk3nxkZFxpZd+5jOvDUfe1KyMg6RNcsfP8PB3N4Q==
"@dcloudio/uni-template-compiler@2.0.2-4070520250711001":
"@dcloudio/uni-template-compiler@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-template-compiler/-/uni-template-compiler-2.0.2-4070520250711001.tgz#260d47d3d82d2a24236e9e22b599d73a31be8a07"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-template-compiler/-/uni-template-compiler-2.0.2-4070520250711001.tgz#260d47d3d82d2a24236e9e22b599d73a31be8a07"
integrity sha512-vtHmRk13U0e2V8JjkAk5pjSWuX/5wXx8qBTdzwwm/foQNxndBoUQim3AQ1+D2mD7YuEOHnz3OWyWbdndIhd5og==
dependencies:
"@babel/parser" "^7.3.3"
@@ -1163,23 +1138,23 @@
"@babel/types" "^7.3.3"
vue-template-compiler "^2.6.10"
"@dcloudio/vue-cli-plugin-hbuilderx@2.0.2-4070520250711001":
"@dcloudio/vue-cli-plugin-hbuilderx@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/vue-cli-plugin-hbuilderx/-/vue-cli-plugin-hbuilderx-2.0.2-4070520250711001.tgz#71d6ac3fc7c654b816e5b9b37337b485d8680e71"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/vue-cli-plugin-hbuilderx/-/vue-cli-plugin-hbuilderx-2.0.2-4070520250711001.tgz#71d6ac3fc7c654b816e5b9b37337b485d8680e71"
integrity sha512-VSH1CBkdf/wXcxDP4pbDs5lIsTUYe0PCa7tEIaurygGuatrvER2MW6v1oKI2lL5382iOEJCkJM6pubA0UIqxIw==
dependencies:
acorn "^5.2.1"
css "~2.2.1"
escodegen "^1.8.1"
"@dcloudio/vue-cli-plugin-uni-optimize@2.0.2-4070520250711001":
"@dcloudio/vue-cli-plugin-uni-optimize@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/vue-cli-plugin-uni-optimize/-/vue-cli-plugin-uni-optimize-2.0.2-4070520250711001.tgz#72db4fabae07110f9e140eb426c6c023204c1705"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/vue-cli-plugin-uni-optimize/-/vue-cli-plugin-uni-optimize-2.0.2-4070520250711001.tgz#72db4fabae07110f9e140eb426c6c023204c1705"
integrity sha512-3FHIPEPYoXPJNjwautP2p0sIosfKPzuSWbyUm7Ddxi7BAoJyNq60Q84nUMnqPbN7vnUlT2e97HxCtNP+E6+u+A==
"@dcloudio/vue-cli-plugin-uni@2.0.2-4070520250711001":
"@dcloudio/vue-cli-plugin-uni@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/vue-cli-plugin-uni/-/vue-cli-plugin-uni-2.0.2-4070520250711001.tgz#57881ce0552f5811428fa5f1f9ca39574c58d222"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/vue-cli-plugin-uni/-/vue-cli-plugin-uni-2.0.2-4070520250711001.tgz#57881ce0552f5811428fa5f1f9ca39574c58d222"
integrity sha512-dCtI4tmVi+QfhS/PprfzIdEBzwGKtgRYKRfZ6ZKtABQSeyh60Sd64sg4qEnehYQ2kgqZo9RWDmoOF9Vk9/R+Qg==
dependencies:
"@dcloudio/uni-stat" "^2.0.2-4070520250711001"
@@ -1202,14 +1177,14 @@
wrap-loader "^0.2.0"
xregexp "4.0.0"
"@dcloudio/webpack-uni-mp-loader@2.0.2-4070520250711001":
"@dcloudio/webpack-uni-mp-loader@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/webpack-uni-mp-loader/-/webpack-uni-mp-loader-2.0.2-4070520250711001.tgz#227214c40b518814f0b1fe9c0f39260768c99632"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/webpack-uni-mp-loader/-/webpack-uni-mp-loader-2.0.2-4070520250711001.tgz#227214c40b518814f0b1fe9c0f39260768c99632"
integrity sha512-ro40ylznQ7Ty1+NiCn6dzZfP7oAO08L9KKO/qwJXXsWZyg7cqLzhx5pZpHzBZtUwRRgrbnLKg5hznGf26ZZF1w==
"@dcloudio/webpack-uni-pages-loader@2.0.2-4070520250711001":
"@dcloudio/webpack-uni-pages-loader@^2.0.2-4070520250711001":
version "2.0.2-4070520250711001"
resolved "https://registry.npmmirror.com/@dcloudio/webpack-uni-pages-loader/-/webpack-uni-pages-loader-2.0.2-4070520250711001.tgz#1a6be6a402c7f391e43c85668802e0a238ecc32b"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/webpack-uni-pages-loader/-/webpack-uni-pages-loader-2.0.2-4070520250711001.tgz#1a6be6a402c7f391e43c85668802e0a238ecc32b"
integrity sha512-ZbULh56PPvOPEJN7cPfgljwLsAh8hkxZO4ZA16D4fpqxMZzaZm66skOuLs6xfHx426/Di+Ipj/J9bz2DtTL9VQ==
dependencies:
merge "^2.1.1"
@@ -1370,14 +1345,6 @@
dependencies:
"@hapi/hoek" "^9.0.0"
"@icon-park/vue@^1.4.2":
version "1.4.2"
resolved "https://registry.npmmirror.com/@icon-park/vue/-/vue-1.4.2.tgz#bc3811d79fc7cfa0be3be62475d6ea9c3c4af169"
integrity sha512-YXXC53R0hjM76B2M4ANRI0m2bQB1cifUW+YXxQfGofITP6gr+pSMafBz/vzECYSkW3zZklm2mVuqQj4RAZGR2Q==
dependencies:
"@vue/babel-helper-vue-jsx-merge-props" "^1.0.0"
csstype "^3.0.3"
"@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0"
resolved "https://mirrors.huaweicloud.com/repository/npm/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
@@ -2286,9 +2253,9 @@
dependencies:
"@types/yargs-parser" "*"
"@vue/babel-helper-vue-jsx-merge-props@^1.0.0", "@vue/babel-helper-vue-jsx-merge-props@^1.4.0":
"@vue/babel-helper-vue-jsx-merge-props@^1.4.0":
version "1.4.0"
resolved "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz#8d53a1e21347db8edbe54d339902583176de09f2"
resolved "https://mirrors.huaweicloud.com/repository/npm/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz#8d53a1e21347db8edbe54d339902583176de09f2"
integrity sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA==
"@vue/babel-helper-vue-transform-on@1.5.0":
@@ -2334,10 +2301,10 @@
lodash.kebabcase "^4.1.1"
svg-tags "^1.0.0"
"@vue/babel-preset-app@^5.0.9":
version "5.0.9"
resolved "https://registry.npmmirror.com/@vue/babel-preset-app/-/babel-preset-app-5.0.9.tgz#5a604e4911f63bbd92f438f305eb93a052ae2c68"
integrity sha512-0rKOF4s/AhaRMJLybxOCgXfwtYhO3pwDSL/q/W8wRs1LzmHAc77FyTXWlun6VyKiSKwSdtH7CvOiWqq+DfofdA==
"@vue/babel-preset-app@^5.0.8":
version "5.0.8"
resolved "https://mirrors.huaweicloud.com/repository/npm/@vue/babel-preset-app/-/babel-preset-app-5.0.8.tgz#ce38f76314f5265d62a89756ef264c21f1d351a1"
integrity sha512-yl+5qhpjd8e1G4cMXfORkkBlvtPCIgmRf3IYCWYDKIQ7m+PPa5iTm4feiNmCMD6yGqQWMhhK/7M3oWGL9boKwg==
dependencies:
"@babel/core" "^7.12.16"
"@babel/helper-compilation-targets" "^7.12.16"
@@ -2419,48 +2386,48 @@
"@vue/babel-plugin-transform-vue-jsx" "^1.4.0"
camelcase "^5.0.0"
"@vue/cli-overlay@^5.0.9":
version "5.0.9"
resolved "https://registry.npmmirror.com/@vue/cli-overlay/-/cli-overlay-5.0.9.tgz#ada72d4832ba3f82dcf8afecc19ba3c4f2bb3c9b"
integrity sha512-aBdZWrYKxLuFz1FDsk/muFD7GycrsW73Gi11yRc7R2W7Bm8mDRc9HKAI790gdg4NV+chkDFmfkegjg5iMDEpAA==
"@vue/cli-overlay@^5.0.8":
version "5.0.8"
resolved "https://mirrors.huaweicloud.com/repository/npm/@vue/cli-overlay/-/cli-overlay-5.0.8.tgz#b61477acdc43bbd42fce6326d228471201ecdcdd"
integrity sha512-KmtievE/B4kcXp6SuM2gzsnSd8WebkQpg3XaB6GmFh1BJGRqa1UiW9up7L/Q67uOdTigHxr5Ar2lZms4RcDjwQ==
"@vue/cli-plugin-babel@~5.0.8":
version "5.0.9"
resolved "https://registry.npmmirror.com/@vue/cli-plugin-babel/-/cli-plugin-babel-5.0.9.tgz#ad6d52631687c7c34e843978a707ffa23a14d1b8"
integrity sha512-oDZt1Kfe4KGNtig3/3zFo2pIeDJij2uS0M6S+tAqQno4Zpla2D8Hk/AR5PrstUd/HmhHZYJoGyF78MOfj3SbWg==
"@vue/cli-plugin-babel@~5.0.0":
version "5.0.8"
resolved "https://mirrors.huaweicloud.com/repository/npm/@vue/cli-plugin-babel/-/cli-plugin-babel-5.0.8.tgz#54f9a07900f29baff54803dcfa916c602894feb7"
integrity sha512-a4qqkml3FAJ3auqB2kN2EMPocb/iu0ykeELwed+9B1c1nQ1HKgslKMHMPavYx3Cd/QAx2mBD4hwKBqZXEI/CsQ==
dependencies:
"@babel/core" "^7.12.16"
"@vue/babel-preset-app" "^5.0.9"
"@vue/cli-shared-utils" "^5.0.9"
"@vue/babel-preset-app" "^5.0.8"
"@vue/cli-shared-utils" "^5.0.8"
babel-loader "^8.2.2"
thread-loader "^3.0.0"
webpack "^5.54.0"
"@vue/cli-plugin-router@^5.0.9":
version "5.0.9"
resolved "https://registry.npmmirror.com/@vue/cli-plugin-router/-/cli-plugin-router-5.0.9.tgz#8ca4210c549d78abff8f2431357fcf6c81f84a02"
integrity sha512-kopbO/8kIl5CAffwgptXEwV509i+M0FfwW4sSkgQ2RzpxOYBjQZvp+096mjZfFcWKSmryNP/ri/Mnu78vmhlhw==
"@vue/cli-plugin-router@^5.0.8":
version "5.0.8"
resolved "https://mirrors.huaweicloud.com/repository/npm/@vue/cli-plugin-router/-/cli-plugin-router-5.0.8.tgz#a113ec626f3d4216d20496c42d35533bce9e889f"
integrity sha512-Gmv4dsGdAsWPqVijz3Ux2OS2HkMrWi1ENj2cYL75nUeL+Xj5HEstSqdtfZ0b1q9NCce+BFB6QnHfTBXc/fCvMg==
dependencies:
"@vue/cli-shared-utils" "^5.0.9"
"@vue/cli-shared-utils" "^5.0.8"
"@vue/cli-plugin-vuex@^5.0.9":
version "5.0.9"
resolved "https://registry.npmmirror.com/@vue/cli-plugin-vuex/-/cli-plugin-vuex-5.0.9.tgz#29830a46f075c9bb35a00cd37e8c0d133a5c41a8"
integrity sha512-AQhgGNFVd4Pu2crvS0a+hRckgrJv07gzOASdbLd3I72wkT43dd01MLRp8IBRRsu92t3MXenW86AZUCbQBz3//A==
"@vue/cli-plugin-vuex@^5.0.8":
version "5.0.8"
resolved "https://mirrors.huaweicloud.com/repository/npm/@vue/cli-plugin-vuex/-/cli-plugin-vuex-5.0.8.tgz#0d4cb3020f9102bea9288d750729dde176c66ccd"
integrity sha512-HSYWPqrunRE5ZZs8kVwiY6oWcn95qf/OQabwLfprhdpFWAGtLStShjsGED2aDpSSeGAskQETrtR/5h7VqgIlBA==
"@vue/cli-service@~5.0.8":
version "5.0.9"
resolved "https://registry.npmmirror.com/@vue/cli-service/-/cli-service-5.0.9.tgz#e5ec465aca058299e9e2f092b6557b4464f2e539"
integrity sha512-yTX7GVyM19tEbd+y5/gA6MkVKA6K61nVYHYAivD61Hx6odVFmQsaC3/R3cWAHM1P5oVKCevBbumPljbT+tFG2w==
"@vue/cli-service@~5.0.0":
version "5.0.8"
resolved "https://mirrors.huaweicloud.com/repository/npm/@vue/cli-service/-/cli-service-5.0.8.tgz#cf3f6f1b7bf0fba9cdab86b6bec4f9897f982dac"
integrity sha512-nV7tYQLe7YsTtzFrfOMIHc5N2hp5lHG2rpYr0aNja9rNljdgcPZLyQRb2YRivTHqTv7lI962UXFURcpStHgyFw==
dependencies:
"@babel/helper-compilation-targets" "^7.12.16"
"@soda/friendly-errors-webpack-plugin" "^1.8.0"
"@soda/get-current-script" "^1.0.2"
"@types/minimist" "^1.2.0"
"@vue/cli-overlay" "^5.0.9"
"@vue/cli-plugin-router" "^5.0.9"
"@vue/cli-plugin-vuex" "^5.0.9"
"@vue/cli-shared-utils" "^5.0.9"
"@vue/cli-overlay" "^5.0.8"
"@vue/cli-plugin-router" "^5.0.8"
"@vue/cli-plugin-vuex" "^5.0.8"
"@vue/cli-shared-utils" "^5.0.8"
"@vue/component-compiler-utils" "^3.3.0"
"@vue/vue-loader-v15" "npm:vue-loader@^15.9.7"
"@vue/web-component-wrapper" "^1.3.0"
@@ -2509,10 +2476,10 @@
webpack-virtual-modules "^0.4.2"
whatwg-fetch "^3.6.2"
"@vue/cli-shared-utils@^5.0.9":
version "5.0.9"
resolved "https://registry.npmmirror.com/@vue/cli-shared-utils/-/cli-shared-utils-5.0.9.tgz#dbb62953e953757773e89e69f369559fced135cf"
integrity sha512-lf4KykiG8j9KwvNVi7fKtASmHuLsxCcCsflVU2b2CHMRuR4weOIV3zuuCrjWKjk0APn/MHJhgCjJGzHMbTtd5w==
"@vue/cli-shared-utils@^5.0.8":
version "5.0.8"
resolved "https://mirrors.huaweicloud.com/repository/npm/@vue/cli-shared-utils/-/cli-shared-utils-5.0.8.tgz#75fc96528eba2b1c7e33cb7e989a984ddef99c8a"
integrity sha512-uK2YB7bBVuQhjOJF+O52P9yFMXeJVj7ozqJkwYE9PlMHL1LMHjtCYm4cSdOebuPzyP+/9p0BimM/OqxsevIopQ==
dependencies:
"@achrinza/node-ipc" "^9.2.5"
chalk "^4.1.2"
@@ -2546,17 +2513,6 @@
"@vue/compiler-core" "3.5.18"
"@vue/shared" "3.5.18"
"@vue/compiler-sfc@2.7.16":
version "2.7.16"
resolved "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz#ff81711a0fac9c68683d8bb00b63f857de77dc83"
integrity sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==
dependencies:
"@babel/parser" "^7.23.5"
postcss "^8.4.14"
source-map "^0.6.1"
optionalDependencies:
prettier "^1.18.2 || ^2.0.0"
"@vue/compiler-sfc@^3.5.18":
version "3.5.18"
resolved "https://mirrors.huaweicloud.com/repository/npm/@vue/compiler-sfc/-/compiler-sfc-3.5.18.tgz#ba1e849561337d809937994cdaf900539542eeca"
@@ -2596,12 +2552,12 @@
optionalDependencies:
prettier "^1.18.2 || ^2.0.0"
"@vue/shared@3.5.18", "@vue/shared@^3.5.18":
"@vue/shared@3.5.18", "@vue/shared@^3.0.0", "@vue/shared@^3.5.18":
version "3.5.18"
resolved "https://mirrors.huaweicloud.com/repository/npm/@vue/shared/-/shared-3.5.18.tgz#529f24a88d3ed678d50fd5c07455841fbe8ac95e"
integrity sha512-cZy8Dq+uuIXbxCZpuLd2GJdeSO/lIzIspC2WtkqIpje5QyFbvLaI5wZtdUjLHjGZrlVX6GilejatWwVYYRc8tA==
"@vue/vue-loader-v15@npm:vue-loader@^15.9.7", vue-loader@^15.6.4:
"@vue/vue-loader-v15@npm:vue-loader@^15.9.7":
version "15.11.1"
resolved "https://mirrors.huaweicloud.com/repository/npm/vue-loader/-/vue-loader-15.11.1.tgz#dee91169211276ed43c5715caef88a56b1f497b0"
integrity sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==
@@ -3293,9 +3249,9 @@ babel-plugin-dynamic-import-node@^2.3.3:
dependencies:
object.assign "^4.1.0"
babel-plugin-import@^1.13.8:
babel-plugin-import@^1.11.0:
version "1.13.8"
resolved "https://registry.npmmirror.com/babel-plugin-import/-/babel-plugin-import-1.13.8.tgz#782c517f6bbf2de3b1f75aaafd6d20a491c4878c"
resolved "https://mirrors.huaweicloud.com/repository/npm/babel-plugin-import/-/babel-plugin-import-1.13.8.tgz#782c517f6bbf2de3b1f75aaafd6d20a491c4878c"
integrity sha512-36babpjra5m3gca44V6tSTomeBlPA7cHUynrE2WiQIm3rEGD9xy28MKsx5IdO45EbnpJY7Jrgd00C6Dwt/l/2Q==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
@@ -3843,21 +3799,6 @@ charenc@0.0.2:
resolved "https://mirrors.huaweicloud.com/repository/npm/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667"
integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==
"chokidar@>=2.0.0 <4.0.0", chokidar@^3.4.1, chokidar@^3.5.3:
version "3.6.0"
resolved "https://mirrors.huaweicloud.com/repository/npm/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b"
integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==
dependencies:
anymatch "~3.1.2"
braces "~3.0.2"
glob-parent "~5.1.2"
is-binary-path "~2.1.0"
is-glob "~4.0.1"
normalize-path "~3.0.0"
readdirp "~3.6.0"
optionalDependencies:
fsevents "~2.3.2"
chokidar@^2.1.8:
version "2.1.8"
resolved "https://mirrors.huaweicloud.com/repository/npm/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917"
@@ -3877,6 +3818,21 @@ chokidar@^2.1.8:
optionalDependencies:
fsevents "^1.2.7"
chokidar@^3.4.1, chokidar@^3.5.3:
version "3.6.0"
resolved "https://mirrors.huaweicloud.com/repository/npm/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b"
integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==
dependencies:
anymatch "~3.1.2"
braces "~3.0.2"
glob-parent "~5.1.2"
is-binary-path "~2.1.0"
is-glob "~4.0.1"
normalize-path "~3.0.0"
readdirp "~3.6.0"
optionalDependencies:
fsevents "~2.3.2"
chownr@^1.1.1:
version "1.1.4"
resolved "https://mirrors.huaweicloud.com/repository/npm/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
@@ -4267,11 +4223,6 @@ core-js@^3.4.1, core-js@^3.8.3:
resolved "https://mirrors.huaweicloud.com/repository/npm/core-js/-/core-js-3.45.0.tgz#556c2af44a2d9c73ea7b49504392474a9f7c947e"
integrity sha512-c2KZL9lP4DjkN3hk/an4pWn5b5ZefhRJnAc42n6LJ19kSnbeRbdQZE5dSeE2LBol1OwJD3X1BQvFTAsa8ReeDA==
core-js@^3.45.0:
version "3.49.0"
resolved "https://registry.npmmirror.com/core-js/-/core-js-3.49.0.tgz#8b4d520ac034311fa21aa616f017ada0e0dbbddd"
integrity sha512-es1U2+YTtzpwkxVLwAFdSpaIMyQaq0PBgm3YD1W3Qpsn1NAmO3KSgZfu+oGSWVu6NvLHoHCV/aYcsE5wiB7ALg==
core-util-is@1.0.2:
version "1.0.2"
resolved "https://mirrors.huaweicloud.com/repository/npm/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@@ -4341,9 +4292,9 @@ cross-env@^5.2.0:
dependencies:
cross-spawn "^6.0.5"
cross-env@^7.0.3:
cross-env@^7.0.2:
version "7.0.3"
resolved "https://registry.npmmirror.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
resolved "https://mirrors.huaweicloud.com/repository/npm/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
dependencies:
cross-spawn "^7.0.1"
@@ -4561,11 +4512,6 @@ cssstyle@^2.0.0:
dependencies:
cssom "~0.3.6"
csstype@^3.0.3, csstype@^3.1.0:
version "3.2.3"
resolved "https://registry.npmmirror.com/csstype/-/csstype-3.2.3.tgz#ec48c0f3e993e50648c86da559e2610995cf989a"
integrity sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==
cyclist@^1.0.1:
version "1.0.2"
resolved "https://mirrors.huaweicloud.com/repository/npm/cyclist/-/cyclist-1.0.2.tgz#673b5f233bf34d8e602b949429f8171d9121bea3"
@@ -4587,11 +4533,6 @@ data-urls@^1.1.0:
whatwg-mimetype "^2.2.0"
whatwg-url "^7.0.0"
dayjs@^1.11.13:
version "1.11.21"
resolved "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.21.tgz#57f87562e62de76f3c704bd2b8d522fc33068eb2"
integrity sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA==
de-indent@^1.0.2:
version "1.0.2"
resolved "https://mirrors.huaweicloud.com/repository/npm/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
@@ -4895,11 +4836,6 @@ dotenv@^10.0.0:
resolved "https://mirrors.huaweicloud.com/repository/npm/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==
dotenv@^17.2.1:
version "17.4.2"
resolved "https://registry.npmmirror.com/dotenv/-/dotenv-17.4.2.tgz#c07e54a746e11eba021dd9e1047ced5afdc1c034"
integrity sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==
dunder-proto@^1.0.1:
version "1.0.1"
resolved "https://mirrors.huaweicloud.com/repository/npm/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a"
@@ -5535,9 +5471,9 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"
flyio@^0.6.14:
flyio@^0.6.2:
version "0.6.14"
resolved "https://registry.npmmirror.com/flyio/-/flyio-0.6.14.tgz#c5d83eb7a9b4fc1c915a463d2ea6dfce755c2d6f"
resolved "https://mirrors.huaweicloud.com/repository/npm/flyio/-/flyio-0.6.14.tgz#c5d83eb7a9b4fc1c915a463d2ea6dfce755c2d6f"
integrity sha512-RE2OXE1ZZmcXOKb0jCtGyquHDxpAqHg17CZ8lmQKRfl3x1kP+NBpaQDx4WgN7DNpLJjFnspTzTEQpwRGg6/xaA==
dependencies:
request "^2.85.0"
@@ -5983,7 +5919,7 @@ hasown@^2.0.0, hasown@^2.0.2:
dependencies:
function-bind "^1.1.2"
he@^1.2.0:
he@^1.1.0, he@^1.2.0:
version "1.2.0"
resolved "https://mirrors.huaweicloud.com/repository/npm/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
@@ -7009,9 +6945,9 @@ jest-worker@^27.0.2, jest-worker@^27.4.5:
merge-stream "^2.0.0"
supports-color "^8.0.0"
jest@^25.5.4:
jest@^25.4.0:
version "25.5.4"
resolved "https://registry.npmmirror.com/jest/-/jest-25.5.4.tgz#f21107b6489cfe32b076ce2adcadee3587acb9db"
resolved "https://mirrors.huaweicloud.com/repository/npm/jest/-/jest-25.5.4.tgz#f21107b6489cfe32b076ce2adcadee3587acb9db"
integrity sha512-hHFJROBTqZahnO+X+PMtT6G2/ztqAZJveGqz//FnWWHurizkD05PQGzRZOhF3XP6z7SJmL+5tCfW8qV06JypwQ==
dependencies:
"@jest/core" "^25.5.4"
@@ -7956,11 +7892,6 @@ nanoid@^3.3.11:
resolved "https://mirrors.huaweicloud.com/repository/npm/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b"
integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==
nanoid@^3.3.12:
version "3.3.15"
resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.15.tgz#36c490fad8c6e86c824c940dfdde999b69ed4316"
integrity sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==
nanomatch@^1.2.9:
version "1.2.13"
resolved "https://mirrors.huaweicloud.com/repository/npm/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
@@ -9004,15 +8935,6 @@ postcss@^8.2.6, postcss@^8.3.5, postcss@^8.4.33, postcss@^8.5.6:
picocolors "^1.1.1"
source-map-js "^1.2.1"
postcss@^8.4.14:
version "8.5.16"
resolved "https://registry.npmmirror.com/postcss/-/postcss-8.5.16.tgz#1230ce0b5df354c24c0ea45f99ce5f6a88279d28"
integrity sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==
dependencies:
nanoid "^3.3.12"
picocolors "^1.1.1"
source-map-js "^1.2.1"
prelude-ls@~1.1.2:
version "1.1.2"
resolved "https://mirrors.huaweicloud.com/repository/npm/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
@@ -9653,24 +9575,6 @@ sane@^4.0.3:
minimist "^1.1.1"
walker "~1.0.5"
sass-loader@8.0.2:
version "8.0.2"
resolved "https://registry.npmmirror.com/sass-loader/-/sass-loader-8.0.2.tgz#debecd8c3ce243c76454f2e8290482150380090d"
integrity sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==
dependencies:
clone-deep "^4.0.1"
loader-utils "^1.2.3"
neo-async "^2.6.1"
schema-utils "^2.6.1"
semver "^6.3.0"
sass@1.26.2:
version "1.26.2"
resolved "https://registry.npmmirror.com/sass/-/sass-1.26.2.tgz#4e17c5c2394e2ee7ffd653ac1d862314a6a5767b"
integrity sha512-9TRp1d1NH0mWH8rqaR/jCS05f/TFD1ykPF2zSYviprMhLb0EmXVqtKMUHsvDt3YIT/jbSK6qAvUlfCW/HJkdCw==
dependencies:
chokidar ">=2.0.0 <4.0.0"
sax@>=0.6.0:
version "1.4.1"
resolved "https://mirrors.huaweicloud.com/repository/npm/sax/-/sax-1.4.1.tgz#44cc8988377f126304d3b3fc1010c733b929ef0f"
@@ -9692,7 +9596,7 @@ schema-utils@^1.0.0:
ajv-errors "^1.0.0"
ajv-keywords "^3.1.0"
schema-utils@^2.5.0, schema-utils@^2.6.1, schema-utils@^2.6.5:
schema-utils@^2.5.0, schema-utils@^2.6.5:
version "2.7.1"
resolved "https://mirrors.huaweicloud.com/repository/npm/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7"
integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==
@@ -10939,11 +10843,6 @@ uuid@^8.3.2:
resolved "https://mirrors.huaweicloud.com/repository/npm/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
uview-ui@1.8.8:
version "1.8.8"
resolved "https://registry.npmmirror.com/uview-ui/-/uview-ui-1.8.8.tgz#2db41f5b5d59452eb2a17e4aa0b684a004ed0265"
integrity sha512-Osal3yzXiHor0In9OPTZuXTaqTbDglMZ9RGK/MPYDoQQs+y0hrBCUD0Xp5T70C8i2lLu2X6Z11zJhmsQWMR7Jg==
v8-to-istanbul@^4.1.3:
version "4.1.4"
resolved "https://mirrors.huaweicloud.com/repository/npm/v8-to-istanbul/-/v8-to-istanbul-4.1.4.tgz#b97936f21c0e2d9996d4985e5c5156e9d4e49cd6"
@@ -10985,10 +10884,16 @@ vue-hot-reload-api@^2.3.0:
resolved "https://mirrors.huaweicloud.com/repository/npm/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2"
integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==
vue-i18n@^8.28.2:
version "8.28.2"
resolved "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-8.28.2.tgz#913558066e274395c0a9f40b2f3393d5c2636840"
integrity sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA==
vue-loader@^15.6.4:
version "15.11.1"
resolved "https://mirrors.huaweicloud.com/repository/npm/vue-loader/-/vue-loader-15.11.1.tgz#dee91169211276ed43c5715caef88a56b1f497b0"
integrity sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==
dependencies:
"@vue/component-compiler-utils" "^3.1.0"
hash-sum "^1.0.2"
loader-utils "^1.1.0"
vue-hot-reload-api "^2.3.0"
vue-style-loader "^4.1.0"
vue-loader@^17.0.0:
version "17.4.2"
@@ -11007,7 +10912,15 @@ vue-style-loader@^4.1.0, vue-style-loader@^4.1.3:
hash-sum "^1.0.2"
loader-utils "^1.0.2"
vue-template-compiler@^2.6.10, vue-template-compiler@^2.6.14, vue-template-compiler@^2.6.7:
"vue-template-compiler@>= 2.6.14 < 2.7":
version "2.6.14"
resolved "https://mirrors.huaweicloud.com/repository/npm/vue-template-compiler/-/vue-template-compiler-2.6.14.tgz#a2f0e7d985670d42c9c9ee0d044fed7690f4f763"
integrity sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g==
dependencies:
de-indent "^1.0.2"
he "^1.1.0"
vue-template-compiler@^2.6.10, vue-template-compiler@^2.6.7:
version "2.7.16"
resolved "https://mirrors.huaweicloud.com/repository/npm/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz#c81b2d47753264c77ac03b9966a46637482bb03b"
integrity sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==
@@ -11020,17 +10933,14 @@ vue-template-es2015-compiler@^1.9.0:
resolved "https://mirrors.huaweicloud.com/repository/npm/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825"
integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==
vue@^2.6.14:
version "2.7.16"
resolved "https://registry.npmmirror.com/vue/-/vue-2.7.16.tgz#98c60de9def99c0e3da8dae59b304ead43b967c9"
integrity sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==
dependencies:
"@vue/compiler-sfc" "2.7.16"
csstype "^3.1.0"
"vue@>= 2.6.14 < 2.7":
version "2.6.14"
resolved "https://mirrors.huaweicloud.com/repository/npm/vue/-/vue-2.6.14.tgz#e51aa5250250d569a3fbad3a8a5a687d6036e235"
integrity sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==
vuex@^3.6.2:
vuex@^3.2.0:
version "3.6.2"
resolved "https://registry.npmmirror.com/vuex/-/vuex-3.6.2.tgz#236bc086a870c3ae79946f107f16de59d5895e71"
resolved "https://mirrors.huaweicloud.com/repository/npm/vuex/-/vuex-3.6.2.tgz#236bc086a870c3ae79946f107f16de59d5895e71"
integrity sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==
w3c-hr-time@^1.0.1: