feat: 半屏扫码、改密退出与表格并升至1.1.19
This commit is contained in:
@@ -142,6 +142,8 @@ const install = (Vue, vm) => {
|
|||||||
// PDA登录接口
|
// PDA登录接口
|
||||||
pdaLogin: (params = {}) => vm.$u.postJson('/login', params),
|
pdaLogin: (params = {}) => vm.$u.postJson('/login', params),
|
||||||
pdaLogout: (params = {}) => vm.$u.postJson('/logout', params),
|
pdaLogout: (params = {}) => vm.$u.postJson('/logout', params),
|
||||||
|
// 修改密码:PUT pda/v1/user/updatePassword
|
||||||
|
updatePassword: (params = {}) => vm.$u.putJson('/user/updatePassword', params),
|
||||||
// 登录后获取当前用户信息、菜单与按钮权限
|
// 登录后获取当前用户信息、菜单与按钮权限
|
||||||
pdaGetInformation: (params = {}) => vm.$u.get('/information', params),
|
pdaGetInformation: (params = {}) => vm.$u.get('/information', params),
|
||||||
// 获取配布单列表
|
// 获取配布单列表
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ export default {
|
|||||||
registeredBrands: [],
|
registeredBrands: [],
|
||||||
remoteScannerConfigs: [],
|
remoteScannerConfigs: [],
|
||||||
usePhoneScanFallback: false,
|
usePhoneScanFallback: false,
|
||||||
|
phoneScanPanelOpen: false,
|
||||||
_scanCallback: null,
|
_scanCallback: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -72,6 +73,15 @@ export default {
|
|||||||
return configs.length ? configs[0] : null;
|
return configs.length ? configs[0] : null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
closePhoneScanPanel() {
|
||||||
|
this.phoneScanPanelOpen = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 半屏连续扫:再次点击同一入口则收起 */
|
||||||
|
togglePhoneScanPanel() {
|
||||||
|
this.phoneScanPanelOpen = !this.phoneScanPanelOpen;
|
||||||
|
},
|
||||||
|
|
||||||
openPhoneScan(options = {}) {
|
openPhoneScan(options = {}) {
|
||||||
const callback = options.callback || this._scanCallback;
|
const callback = options.callback || this._scanCallback;
|
||||||
// #ifdef APP-PLUS || MP-WEIXIN
|
// #ifdef APP-PLUS || MP-WEIXIN
|
||||||
@@ -317,10 +327,12 @@ export default {
|
|||||||
|
|
||||||
onHide() {
|
onHide() {
|
||||||
this.isPageActive = false;
|
this.isPageActive = false;
|
||||||
|
this.closePhoneScanPanel();
|
||||||
},
|
},
|
||||||
|
|
||||||
onUnload() {
|
onUnload() {
|
||||||
this.isPageActive = false;
|
this.isPageActive = false;
|
||||||
|
this.closePhoneScanPanel();
|
||||||
this.unregisterScanBroadcast();
|
this.unregisterScanBroadcast();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,286 @@
|
|||||||
|
<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="barcodeViewId" 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 {
|
||||||
|
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];
|
||||||
|
const vm = page && (page.$vm || page);
|
||||||
|
const scope = (vm && vm.$scope) || (page && page.$scope);
|
||||||
|
if (scope && typeof scope.$getAppWebview === 'function') {
|
||||||
|
return scope.$getAppWebview();
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
// 等占位节点挂到页面后再创建,避免 view 层报 Not Found: Page[-1]
|
||||||
|
setTimeout(() => {
|
||||||
|
if (!this.visible || !this._active) {
|
||||||
|
this._creating = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.measureHolder(0);
|
||||||
|
}, 200);
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
measureHolder(attempt) {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
const query = uni.createSelectorQuery().in(this);
|
||||||
|
query.select(`#${this.barcodeViewId}`)
|
||||||
|
.boundingClientRect((rect) => {
|
||||||
|
if (!this.visible || !this._active) {
|
||||||
|
this._creating = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!rect || !rect.width || !rect.height) {
|
||||||
|
if (attempt < 8) {
|
||||||
|
setTimeout(() => this.measureHolder(attempt + 1), 150);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const sys = uni.getSystemInfoSync();
|
||||||
|
this._creating = false;
|
||||||
|
this.createBarcode({
|
||||||
|
top: (sys.statusBarHeight || 0) + 44,
|
||||||
|
left: 0,
|
||||||
|
width: sys.windowWidth || 300,
|
||||||
|
height: 220,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this._creating = false;
|
||||||
|
this.createBarcode(rect);
|
||||||
|
})
|
||||||
|
.exec();
|
||||||
|
// #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);
|
||||||
|
const width = Math.max(Math.round(rect.width), 1);
|
||||||
|
const height = Math.max(Math.round(rect.height), 1);
|
||||||
|
const top = Math.max(0, Math.round(rect.top || 0));
|
||||||
|
const left = Math.max(0, Math.round(rect.left || 0));
|
||||||
|
try {
|
||||||
|
// 使用独立 id 覆盖在占位区域上,避免和页面节点 id 冲突导致 Not Found
|
||||||
|
const barcode = plus.barcode.create(
|
||||||
|
`plusBarcodeNative_${Date.now()}`,
|
||||||
|
this.filters && this.filters.length ? this.filters : DEFAULT_FILTERS,
|
||||||
|
{
|
||||||
|
top: `${top}px`,
|
||||||
|
left: `${left}px`,
|
||||||
|
width: `${width}px`,
|
||||||
|
height: `${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>
|
||||||
@@ -4,46 +4,44 @@
|
|||||||
<slot name="before-list" />
|
<slot name="before-list" />
|
||||||
<view class="summary-wrap">
|
<view class="summary-wrap">
|
||||||
<scroll-view scroll-x class="summary-scroll">
|
<scroll-view scroll-x class="summary-scroll">
|
||||||
<view class="summary-table" :style="{ width: tableWidth }">
|
<t-table v-if="list.length" border="1" border-color="#e5e5e5" :style="{ width: tableWidth }">
|
||||||
<view class="summary-row summary-head">
|
<t-tr class="summary-head" font-size="18" color="#666666" align="left">
|
||||||
<view
|
<t-th v-for="col in columns" :key="col.key" :style="cellStyle(col)">{{ col.label }}</t-th>
|
||||||
v-for="col in columns"
|
</t-tr>
|
||||||
:key="col.key"
|
<t-tr
|
||||||
class="summary-cell"
|
|
||||||
:style="cellStyle(col)"
|
|
||||||
>{{ col.label }}</view>
|
|
||||||
</view>
|
|
||||||
<view v-if="!list.length" class="summary-empty">暂无出仓明细</view>
|
|
||||||
<view
|
|
||||||
v-for="row in list"
|
v-for="row in list"
|
||||||
:key="row.group_key || row.id"
|
:key="row.group_key || row.id"
|
||||||
class="summary-row"
|
font-size="18"
|
||||||
|
color="#333333"
|
||||||
|
align="left"
|
||||||
@click="$emit('fabric-info', row)"
|
@click="$emit('fabric-info', row)"
|
||||||
>
|
>
|
||||||
<view class="summary-cell" :style="cellStyle(columns[0])">{{ row.grey_fabric_code || '-' }}</view>
|
<t-td :style="cellStyle(columns[0])">{{ row.grey_fabric_code || '-' }}</t-td>
|
||||||
<view class="summary-cell" :style="cellStyle(columns[1])">{{ row.grey_fabric_name || '-' }}</view>
|
<t-td :style="cellStyle(columns[1])">{{ row.grey_fabric_name || '-' }}</t-td>
|
||||||
<view class="summary-cell" :style="cellStyle(columns[2])">{{ displayNum(row.roll) }}</view>
|
<t-td :style="cellStyle(columns[2])">{{ displayNum(row.roll) }}</t-td>
|
||||||
<view class="summary-cell" :style="cellStyle(columns[3])">{{ displayNum(row.weight) }}</view>
|
<t-td :style="cellStyle(columns[3])">{{ displayNum(row.weight) }}</t-td>
|
||||||
<view
|
<t-td class="summary-action" :style="cellStyle(columns[4])" @click.stop="$emit('fine-code', row)">细码</t-td>
|
||||||
class="summary-cell summary-action"
|
</t-tr>
|
||||||
:style="cellStyle(columns[4])"
|
<t-tr class="summary-total" font-size="18" color="#333333" align="left">
|
||||||
@click.stop="$emit('fine-code', row)"
|
<t-td :style="cellStyle(columns[0])">合计</t-td>
|
||||||
>细码</view>
|
<t-td :style="cellStyle(columns[1])"></t-td>
|
||||||
</view>
|
<t-td :style="cellStyle(columns[2])">{{ totalRoll }}</t-td>
|
||||||
<view v-if="list.length" class="summary-row summary-total">
|
<t-td :style="cellStyle(columns[3])">{{ totalWeight }}</t-td>
|
||||||
<view class="summary-cell" :style="cellStyle(columns[0])">合计</view>
|
<t-td :style="cellStyle(columns[4])"></t-td>
|
||||||
<view class="summary-cell" :style="cellStyle(columns[1])"></view>
|
</t-tr>
|
||||||
<view class="summary-cell" :style="cellStyle(columns[2])">{{ totalRoll }}</view>
|
</t-table>
|
||||||
<view class="summary-cell" :style="cellStyle(columns[3])">{{ totalWeight }}</view>
|
<view v-else class="summary-empty">暂无出仓明细</view>
|
||||||
<view class="summary-cell" :style="cellStyle(columns[4])"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import tTable from '@/components/t-table/t-table.vue';
|
||||||
|
import tTh from '@/components/t-table/t-th.vue';
|
||||||
|
import tTr from '@/components/t-table/t-tr.vue';
|
||||||
|
import tTd from '@/components/t-table/t-td.vue';
|
||||||
|
|
||||||
const COLUMNS = [
|
const COLUMNS = [
|
||||||
{ key: 'grey_fabric_code', label: '坯布编号', width: 220 },
|
{ key: 'grey_fabric_code', label: '坯布编号', width: 220 },
|
||||||
{ key: 'grey_fabric_name', label: '坯布名称', width: 260 },
|
{ key: 'grey_fabric_name', label: '坯布名称', width: 260 },
|
||||||
@@ -53,6 +51,7 @@ const COLUMNS = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: { tTable, tTh, tTr, tTd },
|
||||||
props: {
|
props: {
|
||||||
list: { type: Array, default: () => [] },
|
list: { type: Array, default: () => [] },
|
||||||
title: { type: String, default: '出仓细码' },
|
title: { type: String, default: '出仓细码' },
|
||||||
@@ -74,10 +73,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
cellStyle(col) {
|
cellStyle(col) {
|
||||||
|
const width = `${col.width}rpx`;
|
||||||
return {
|
return {
|
||||||
width: `${col.width}rpx`,
|
width,
|
||||||
minWidth: `${col.width}rpx`,
|
minWidth: width,
|
||||||
maxWidth: `${col.width}rpx`,
|
maxWidth: width,
|
||||||
|
flex: `0 0 ${width}`,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
displayNum(val) {
|
displayNum(val) {
|
||||||
@@ -111,42 +112,19 @@ export default {
|
|||||||
.summary-scroll {
|
.summary-scroll {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.summary-row {
|
::v-deep .t-th,
|
||||||
display: flex;
|
::v-deep .t-td {
|
||||||
align-items: stretch;
|
|
||||||
border-bottom: 1rpx solid #f0f0f0;
|
|
||||||
}
|
|
||||||
.summary-row:last-child {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.summary-head {
|
|
||||||
background: #f7f8fa;
|
|
||||||
}
|
|
||||||
.summary-total {
|
|
||||||
background: #fff7e6;
|
|
||||||
}
|
|
||||||
.summary-cell {
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
min-height: $pda-row-min-height;
|
min-height: $pda-row-min-height;
|
||||||
padding: 12rpx 16rpx;
|
|
||||||
font-size: $pda-font-body;
|
|
||||||
color: #333;
|
|
||||||
border-right: 1rpx solid #f0f0f0;
|
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
.summary-head .summary-cell,
|
::v-deep .summary-head {
|
||||||
.summary-total .summary-cell {
|
background: #f7f8fa;
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
.summary-head .summary-cell {
|
::v-deep .summary-total {
|
||||||
color: #666;
|
background: #fff7e6;
|
||||||
}
|
}
|
||||||
.summary-cell:last-child {
|
::v-deep .summary-action {
|
||||||
border-right: none;
|
|
||||||
}
|
|
||||||
.summary-action {
|
|
||||||
color: #2979ff;
|
color: #2979ff;
|
||||||
}
|
}
|
||||||
.summary-empty {
|
.summary-empty {
|
||||||
|
|||||||
@@ -10,8 +10,13 @@
|
|||||||
@input="$emit('input', $event.detail.value)"
|
@input="$emit('input', $event.detail.value)"
|
||||||
@confirm="$emit('scan')"
|
@confirm="$emit('scan')"
|
||||||
/>
|
/>
|
||||||
|
<view
|
||||||
|
v-if="showPhoneScan && scanning"
|
||||||
|
class="fabric-out-scanClose"
|
||||||
|
@click.stop="$emit('phone-scan')"
|
||||||
|
>关闭扫码</view>
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="showPhoneScan"
|
v-else-if="showPhoneScan"
|
||||||
class="fabric-out-phoneScanIcon"
|
class="fabric-out-phoneScanIcon"
|
||||||
name="scan"
|
name="scan"
|
||||||
size="44"
|
size="44"
|
||||||
@@ -38,15 +43,32 @@ export default {
|
|||||||
message: { type: String, default: '' },
|
message: { type: String, default: '' },
|
||||||
disabledTip: { type: String, default: '当前状态不可扫码' },
|
disabledTip: { type: String, default: '当前状态不可扫码' },
|
||||||
showPhoneScan: { type: Boolean, default: false },
|
showPhoneScan: { type: Boolean, default: false },
|
||||||
|
scanning: { type: Boolean, default: false },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
|
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
|
||||||
|
@import '@/common/pda-typography.scss';
|
||||||
|
|
||||||
.fabric-out-phoneScanIcon {
|
.fabric-out-phoneScanIcon {
|
||||||
margin-left: 16rpx;
|
margin-left: 16rpx;
|
||||||
flex-shrink: 0;
|
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>
|
</style>
|
||||||
|
|||||||
@@ -4,39 +4,26 @@
|
|||||||
<slot name="before-list" />
|
<slot name="before-list" />
|
||||||
<view class="summary-wrap">
|
<view class="summary-wrap">
|
||||||
<scroll-view scroll-x class="summary-scroll">
|
<scroll-view scroll-x class="summary-scroll">
|
||||||
<view class="summary-table" :style="{ width: tableWidth }">
|
<t-table v-if="rows.length" border="1" border-color="#e5e5e5" :style="{ width: tableWidth }">
|
||||||
<view class="summary-row summary-head">
|
<t-tr class="summary-head" font-size="18" color="#666666" align="left">
|
||||||
<view
|
<t-th v-for="col in columns" :key="col.key" :style="cellStyle(col)">{{ col.label }}</t-th>
|
||||||
v-for="col in columns"
|
</t-tr>
|
||||||
:key="col.key"
|
<t-tr
|
||||||
class="summary-cell"
|
|
||||||
:style="cellStyle(col)"
|
|
||||||
>{{ col.label }}</view>
|
|
||||||
</view>
|
|
||||||
<view v-if="!rows.length" class="summary-empty">{{ emptyText }}</view>
|
|
||||||
<view
|
|
||||||
v-for="row in rows"
|
v-for="row in rows"
|
||||||
:key="row.group_key"
|
:key="row.group_key"
|
||||||
class="summary-row"
|
font-size="18"
|
||||||
|
color="#333333"
|
||||||
|
align="left"
|
||||||
:class="{ 'summary-row--open': expandedKey === row.group_key }"
|
:class="{ 'summary-row--open': expandedKey === row.group_key }"
|
||||||
@click="toggleRow(row.group_key)"
|
@click="toggleRow(row.group_key)"
|
||||||
>
|
>
|
||||||
<view
|
<t-td v-for="col in columns" :key="col.key" :style="cellStyle(col)">{{ formatCell(row, col.key) }}</t-td>
|
||||||
v-for="col in columns"
|
</t-tr>
|
||||||
:key="col.key"
|
<t-tr class="summary-total" font-size="18" color="#333333" align="left">
|
||||||
class="summary-cell"
|
<t-td v-for="col in columns" :key="col.key" :style="cellStyle(col)">{{ totalCell(col.key) }}</t-td>
|
||||||
:style="cellStyle(col)"
|
</t-tr>
|
||||||
>{{ formatCell(row, col.key) }}</view>
|
</t-table>
|
||||||
</view>
|
<view v-else class="summary-empty">{{ emptyText }}</view>
|
||||||
<view v-if="rows.length" class="summary-row summary-total">
|
|
||||||
<view
|
|
||||||
v-for="col in columns"
|
|
||||||
:key="col.key"
|
|
||||||
class="summary-cell"
|
|
||||||
:style="cellStyle(col)"
|
|
||||||
>{{ totalCell(col.key) }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
<view v-if="expandedRow" class="summary-fine">
|
<view v-if="expandedRow" class="summary-fine">
|
||||||
@@ -46,30 +33,26 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-if="!expandedRow.fine_codes.length" class="summary-empty">暂无细码</view>
|
<view v-if="!expandedRow.fine_codes.length" class="summary-empty">暂无细码</view>
|
||||||
<scroll-view v-else scroll-x class="summary-scroll">
|
<scroll-view v-else scroll-x class="summary-scroll">
|
||||||
<view class="summary-table" :style="{ width: fineTableWidth }">
|
<t-table border="1" border-color="#e5e5e5" :style="{ width: fineTableWidth }">
|
||||||
<view class="summary-row summary-head">
|
<t-tr class="summary-head" font-size="18" color="#666666" align="left">
|
||||||
<view
|
<t-th v-for="col in fineCols" :key="col.key" :style="cellStyle(col)">{{ col.label }}</t-th>
|
||||||
v-for="col in fineCols"
|
</t-tr>
|
||||||
:key="col.key"
|
<t-tr
|
||||||
class="summary-cell"
|
|
||||||
:style="cellStyle(col)"
|
|
||||||
>{{ col.label }}</view>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
v-for="(fc, fcIndex) in expandedRow.fine_codes"
|
v-for="(fc, fcIndex) in expandedRow.fine_codes"
|
||||||
:key="fc.id || fcIndex"
|
:key="fc.id || fcIndex"
|
||||||
class="summary-row"
|
font-size="18"
|
||||||
|
color="#333333"
|
||||||
|
align="left"
|
||||||
>
|
>
|
||||||
<view
|
<t-td
|
||||||
v-for="col in fineCols"
|
v-for="col in fineCols"
|
||||||
:key="col.key"
|
:key="col.key"
|
||||||
class="summary-cell"
|
|
||||||
:class="{ 'summary-action': col.key === 'action' }"
|
:class="{ 'summary-action': col.key === 'action' }"
|
||||||
:style="cellStyle(col)"
|
:style="cellStyle(col)"
|
||||||
@click="onFineCellTap(col.key, fc)"
|
@click="onFineCellTap(col.key, fc)"
|
||||||
>{{ formatFineCell(fc, col.key) }}</view>
|
>{{ formatFineCell(fc, col.key) }}</t-td>
|
||||||
</view>
|
</t-tr>
|
||||||
</view>
|
</t-table>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view v-if="deletable && expandedRow.fine_codes.length" class="summary-tip">
|
<view v-if="deletable && expandedRow.fine_codes.length" class="summary-tip">
|
||||||
点击「删除」移除对应细码
|
点击「删除」移除对应细码
|
||||||
@@ -80,6 +63,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import tTable from '@/components/t-table/t-table.vue';
|
||||||
|
import tTh from '@/components/t-table/t-th.vue';
|
||||||
|
import tTr from '@/components/t-table/t-tr.vue';
|
||||||
|
import tTd from '@/components/t-table/t-td.vue';
|
||||||
|
|
||||||
const SUMMARY_COLUMNS = [
|
const SUMMARY_COLUMNS = [
|
||||||
{ label: '成品编号', key: 'product_code', width: 260 },
|
{ label: '成品编号', key: 'product_code', width: 260 },
|
||||||
{ label: '色号', key: 'product_color_code', width: 220 },
|
{ label: '色号', key: 'product_color_code', width: 220 },
|
||||||
@@ -104,6 +92,7 @@ const TARE_COLUMNS = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: { tTable, tTh, tTr, tTd },
|
||||||
props: {
|
props: {
|
||||||
groups: { type: Array, default: () => [] },
|
groups: { type: Array, default: () => [] },
|
||||||
title: { type: String, default: '明细' },
|
title: { type: String, default: '明细' },
|
||||||
@@ -191,10 +180,12 @@ export default {
|
|||||||
return Number(total.toFixed(2));
|
return Number(total.toFixed(2));
|
||||||
},
|
},
|
||||||
cellStyle(col) {
|
cellStyle(col) {
|
||||||
|
const width = `${col.width}rpx`;
|
||||||
return {
|
return {
|
||||||
width: `${col.width}rpx`,
|
width,
|
||||||
minWidth: `${col.width}rpx`,
|
minWidth: width,
|
||||||
maxWidth: `${col.width}rpx`,
|
maxWidth: width,
|
||||||
|
flex: `0 0 ${width}`,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
joinName(code, name) {
|
joinName(code, name) {
|
||||||
@@ -255,46 +246,23 @@ export default {
|
|||||||
.summary-scroll {
|
.summary-scroll {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.summary-table {
|
::v-deep .t-th,
|
||||||
border-bottom: 1rpx solid #eee;
|
::v-deep .t-td {
|
||||||
}
|
|
||||||
.summary-row {
|
|
||||||
display: flex;
|
|
||||||
align-items: stretch;
|
|
||||||
border-bottom: 1rpx solid #f0f0f0;
|
|
||||||
}
|
|
||||||
.summary-row:last-child {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.summary-head {
|
|
||||||
background: #f7f8fa;
|
|
||||||
}
|
|
||||||
.summary-row--open {
|
|
||||||
background: #f0f7ff;
|
|
||||||
}
|
|
||||||
.summary-total {
|
|
||||||
background: #fff7e6;
|
|
||||||
}
|
|
||||||
.summary-cell {
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
min-height: $pda-row-min-height;
|
min-height: $pda-row-min-height;
|
||||||
padding: 12rpx 16rpx;
|
|
||||||
font-size: $pda-font-body;
|
|
||||||
color: #333;
|
|
||||||
border-right: 1rpx solid #f0f0f0;
|
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
.summary-head .summary-cell {
|
::v-deep .summary-head {
|
||||||
font-weight: bold;
|
background: #f7f8fa;
|
||||||
color: #666;
|
|
||||||
}
|
}
|
||||||
.summary-total .summary-cell {
|
::v-deep .summary-row--open {
|
||||||
font-weight: bold;
|
background: #f0f7ff;
|
||||||
}
|
}
|
||||||
.summary-cell:last-child {
|
::v-deep .summary-total {
|
||||||
border-right: none;
|
background: #fff7e6;
|
||||||
|
}
|
||||||
|
::v-deep .summary-action {
|
||||||
|
color: #f5222d;
|
||||||
}
|
}
|
||||||
.summary-empty {
|
.summary-empty {
|
||||||
padding: 28rpx 16rpx;
|
padding: 28rpx 16rpx;
|
||||||
|
|||||||
@@ -11,8 +11,13 @@
|
|||||||
@confirm="$emit('confirm')"
|
@confirm="$emit('confirm')"
|
||||||
/>
|
/>
|
||||||
<text v-if="name" class="process-in-binName">{{ name }}</text>
|
<text v-if="name" class="process-in-binName">{{ name }}</text>
|
||||||
|
<view
|
||||||
|
v-if="showPhoneScan && scanning"
|
||||||
|
class="fabric-out-scanClose"
|
||||||
|
@click.stop="$emit('phone-scan')"
|
||||||
|
>关闭扫码</view>
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="showPhoneScan"
|
v-else-if="showPhoneScan"
|
||||||
class="fabric-out-phoneScanIcon"
|
class="fabric-out-phoneScanIcon"
|
||||||
name="scan"
|
name="scan"
|
||||||
size="44"
|
size="44"
|
||||||
@@ -34,6 +39,7 @@ export default {
|
|||||||
code: { type: String, default: '' },
|
code: { type: String, default: '' },
|
||||||
name: { type: String, default: '' },
|
name: { type: String, default: '' },
|
||||||
showPhoneScan: { type: Boolean, default: false },
|
showPhoneScan: { type: Boolean, default: false },
|
||||||
|
scanning: { type: Boolean, default: false },
|
||||||
showDisabledTip: { type: Boolean, default: true },
|
showDisabledTip: { type: Boolean, default: true },
|
||||||
disabledTip: { type: String, default: '请先提交保存后再扫仓位' },
|
disabledTip: { type: String, default: '请先提交保存后再扫仓位' },
|
||||||
},
|
},
|
||||||
@@ -42,6 +48,7 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
|
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
|
||||||
|
@import '@/common/pda-typography.scss';
|
||||||
|
|
||||||
.process-in-binRow {
|
.process-in-binRow {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
@@ -53,6 +60,21 @@ export default {
|
|||||||
margin-left: 16rpx;
|
margin-left: 16rpx;
|
||||||
flex-shrink: 0;
|
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;
|
||||||
|
}
|
||||||
.process-in-binName {
|
.process-in-binName {
|
||||||
margin-left: 12rpx;
|
margin-left: 12rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -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>
|
||||||
@@ -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>
|
||||||
@@ -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>
|
||||||
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
"name" : "浩拓ERP",
|
"name" : "浩拓ERP",
|
||||||
"appid" : "__UNI__F79F300",
|
"appid" : "__UNI__F79F300",
|
||||||
"description" : "浩拓ERP",
|
"description" : "浩拓ERP",
|
||||||
"versionName" : "1.1.18",
|
"versionName" : "1.1.19",
|
||||||
"versionCode" : 118,
|
"versionCode" : 119,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"optimization" : {
|
"optimization" : {
|
||||||
|
|||||||
@@ -15,10 +15,22 @@
|
|||||||
<u-form-item>
|
<u-form-item>
|
||||||
<text class="title" style="width: 200px">备注内容:{{ BillRemark }}</text>
|
<text class="title" style="width: 200px">备注内容:{{ BillRemark }}</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
<PlusBarcodePanel
|
||||||
|
v-if="usePhoneScanFallback"
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
hint-text="连续扫码配布,扫完可继续下一条"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<u-form-item label-width="130" label="条码资料:">
|
<u-form-item label-width="130" label="条码资料:">
|
||||||
<input type="text" v-model="QRBarCode" maxlength="-1" style="width: 170px" @confirm="SalePickBillDetailScan" />
|
<input type="text" v-model="QRBarCode" maxlength="-1" style="width: 170px" @confirm="SalePickBillDetailScan" />
|
||||||
|
<text
|
||||||
|
v-if="usePhoneScanFallback && phoneScanPanelOpen"
|
||||||
|
class="phone-scan-close"
|
||||||
|
@click.stop="handlePhoneScan"
|
||||||
|
>关闭扫码</text>
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="usePhoneScanFallback"
|
v-else-if="usePhoneScanFallback"
|
||||||
name="scan"
|
name="scan"
|
||||||
size="44"
|
size="44"
|
||||||
color="#2979ff"
|
color="#2979ff"
|
||||||
@@ -83,8 +95,10 @@ import util, {
|
|||||||
} from "../../common/util";
|
} from "../../common/util";
|
||||||
import wybTable from "@/components/wyb-table/wyb-table.vue";
|
import wybTable from "@/components/wyb-table/wyb-table.vue";
|
||||||
import scanMixin from "@/common/scanMixin.js";
|
import scanMixin from "@/common/scanMixin.js";
|
||||||
|
import PlusBarcodePanel from "@/components/common/PlusBarcodePanel.vue";
|
||||||
let that = "";
|
let that = "";
|
||||||
export default {
|
export default {
|
||||||
|
components: { PlusBarcodePanel },
|
||||||
mixins: [scanMixin],
|
mixins: [scanMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -215,7 +229,10 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handlePhoneScan() {
|
handlePhoneScan() {
|
||||||
this.openPhoneScan();
|
this.togglePhoneScanPanel();
|
||||||
|
},
|
||||||
|
onPlusBarcodeSuccess(scanResult) {
|
||||||
|
this.handleScanResult(scanResult, this._scanCallback);
|
||||||
},
|
},
|
||||||
|
|
||||||
playSuccess(text) {
|
playSuccess(text) {
|
||||||
@@ -454,6 +471,18 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.phone-scan-close {
|
||||||
|
margin-left: 8px;
|
||||||
|
padding: 0 12px;
|
||||||
|
height: 36px;
|
||||||
|
line-height: 36px;
|
||||||
|
border: 1px solid #2979ff;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #2979ff;
|
||||||
|
background: #eaf2ff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
page {
|
page {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
padding-bottom: 260rpx;
|
padding-bottom: 260rpx;
|
||||||
|
|||||||
@@ -76,6 +76,13 @@
|
|||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<PlusBarcodePanel
|
||||||
|
slot="before-list"
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
hint-text="连续扫码出仓,扫完可继续下一条"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<FabricOutScanBar
|
<FabricOutScanBar
|
||||||
slot="before-list"
|
slot="before-list"
|
||||||
:can-scan="canScan"
|
:can-scan="canScan"
|
||||||
@@ -84,6 +91,7 @@
|
|||||||
:message="BillDataMessage"
|
:message="BillDataMessage"
|
||||||
disabled-tip="请先提交保存后再扫码"
|
disabled-tip="请先提交保存后再扫码"
|
||||||
:show-phone-scan="usePhoneScanFallback"
|
:show-phone-scan="usePhoneScanFallback"
|
||||||
|
:scanning="phoneScanPanelOpen"
|
||||||
@input="QRBarCode = $event"
|
@input="QRBarCode = $event"
|
||||||
@scan="handleScan"
|
@scan="handleScan"
|
||||||
@phone-scan="handlePhoneScan"
|
@phone-scan="handlePhoneScan"
|
||||||
@@ -158,12 +166,16 @@ import FabricOutScanDetail from '@/components/storefabric/FabricOutScanDetail.vu
|
|||||||
|
|
||||||
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
||||||
|
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
|
PlusBarcodePanel,
|
||||||
|
|
||||||
FabricInfoPopup,
|
FabricInfoPopup,
|
||||||
|
|
||||||
FineCodePopup,
|
FineCodePopup,
|
||||||
|
|||||||
@@ -30,6 +30,13 @@
|
|||||||
@fabric-info="openFabricInfo"
|
@fabric-info="openFabricInfo"
|
||||||
@fine-code="openFineCode"
|
@fine-code="openFineCode"
|
||||||
>
|
>
|
||||||
|
<PlusBarcodePanel
|
||||||
|
slot="before-list"
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
hint-text="连续扫码出仓,扫完可继续下一条"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<FabricOutScanBar
|
<FabricOutScanBar
|
||||||
slot="before-list"
|
slot="before-list"
|
||||||
:can-scan="canScan"
|
:can-scan="canScan"
|
||||||
@@ -37,6 +44,7 @@
|
|||||||
:delete-mode="BarCodeDelStatus"
|
:delete-mode="BarCodeDelStatus"
|
||||||
:message="BillDataMessage"
|
:message="BillDataMessage"
|
||||||
:show-phone-scan="usePhoneScanFallback"
|
:show-phone-scan="usePhoneScanFallback"
|
||||||
|
:scanning="phoneScanPanelOpen"
|
||||||
@input="QRBarCode = $event"
|
@input="QRBarCode = $event"
|
||||||
@scan="handleScan"
|
@scan="handleScan"
|
||||||
@phone-scan="handlePhoneScan"
|
@phone-scan="handlePhoneScan"
|
||||||
@@ -69,9 +77,11 @@ import FabricOutDetailList from '@/components/storefabric/FabricOutDetailList.vu
|
|||||||
import FabricOutScanBar from '@/components/storefabric/FabricOutScanBar.vue';
|
import FabricOutScanBar from '@/components/storefabric/FabricOutScanBar.vue';
|
||||||
import FabricOutScanDetail from '@/components/storefabric/FabricOutScanDetail.vue';
|
import FabricOutScanDetail from '@/components/storefabric/FabricOutScanDetail.vue';
|
||||||
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
PlusBarcodePanel,
|
||||||
FabricInfoPopup,
|
FabricInfoPopup,
|
||||||
FineCodePopup,
|
FineCodePopup,
|
||||||
OrderStatusBar,
|
OrderStatusBar,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
import util from '@/common/util';
|
import util from '@/common/util';
|
||||||
import scanMixin from '@/common/scanMixin.js';
|
import scanMixin from '@/common/scanMixin.js';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
import remoteSelectMixin from '@/common/remoteSelectMixin.js';
|
import remoteSelectMixin from '@/common/remoteSelectMixin.js';
|
||||||
import { withNameParam } from '@/common/remoteSelect';
|
import { withNameParam } from '@/common/remoteSelect';
|
||||||
import { initTts, speak } from '@/common/tts.js';
|
import { initTts, speak } from '@/common/tts.js';
|
||||||
@@ -38,6 +39,7 @@ import {
|
|||||||
} from '@/common/storeFabricBusinessOut';
|
} from '@/common/storeFabricBusinessOut';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: { PlusBarcodePanel },
|
||||||
mixins: [scanMixin, remoteSelectMixin],
|
mixins: [scanMixin, remoteSelectMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -115,7 +117,15 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handlePhoneScan() {
|
handlePhoneScan() {
|
||||||
this.openPhoneScan();
|
if (!this.canScan) {
|
||||||
|
this.showError('请先提交保存后再扫码');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.togglePhoneScanPanel();
|
||||||
|
},
|
||||||
|
onPlusBarcodeSuccess(scanResult) {
|
||||||
|
this.QRBarCode = String(scanResult || '').trim().replace(/[\r\n]/g, '');
|
||||||
|
return this.handleScan();
|
||||||
},
|
},
|
||||||
registerOrderScanBroadcast() {
|
registerOrderScanBroadcast() {
|
||||||
this.registerScanBroadcast((scanResult) => {
|
this.registerScanBroadcast((scanResult) => {
|
||||||
@@ -127,6 +137,7 @@ export default {
|
|||||||
const nextCanScan = this.isEditable && canScanAtStatus(status);
|
const nextCanScan = this.isEditable && canScanAtStatus(status);
|
||||||
if (this.canScan && !nextCanScan) {
|
if (this.canScan && !nextCanScan) {
|
||||||
this.unregisterScanBroadcast();
|
this.unregisterScanBroadcast();
|
||||||
|
this.closePhoneScanPanel();
|
||||||
}
|
}
|
||||||
this.canScan = nextCanScan;
|
this.canScan = nextCanScan;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -29,10 +29,22 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-input v-model="Remark" maxlength="-1" type="textarea" :border="true" :height="100" :auto-height="true" />
|
<u-input v-model="Remark" maxlength="-1" type="textarea" :border="true" :height="100" :auto-height="true" />
|
||||||
</view>
|
</view>
|
||||||
|
<PlusBarcodePanel
|
||||||
|
v-if="usePhoneScanFallback"
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
hint-text="连续扫码盘点,扫完可继续下一条"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<u-form-item label-width="150" label="条码资料:">
|
<u-form-item label-width="150" label="条码资料:">
|
||||||
<input type="text" maxlength="-1" v-model="QRBarCode" style="width:200px;" @confirm="GoodsCheckBillDetailScan" />
|
<input type="text" maxlength="-1" v-model="QRBarCode" style="width:200px;" @confirm="GoodsCheckBillDetailScan" />
|
||||||
|
<text
|
||||||
|
v-if="usePhoneScanFallback && phoneScanPanelOpen"
|
||||||
|
class="phone-scan-close"
|
||||||
|
@click.stop="handlePhoneScan"
|
||||||
|
>关闭扫码</text>
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="usePhoneScanFallback"
|
v-else-if="usePhoneScanFallback"
|
||||||
name="scan"
|
name="scan"
|
||||||
size="44"
|
size="44"
|
||||||
color="#2979ff"
|
color="#2979ff"
|
||||||
@@ -106,8 +118,10 @@
|
|||||||
playErrorAudio
|
playErrorAudio
|
||||||
} from '../../common/util';
|
} from '../../common/util';
|
||||||
import scanMixin from '@/common/scanMixin.js';
|
import scanMixin from '@/common/scanMixin.js';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||||
export default {
|
export default {
|
||||||
|
components: { PlusBarcodePanel },
|
||||||
mixins: [scanMixin],
|
mixins: [scanMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -245,7 +259,26 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handlePhoneScan() {
|
handlePhoneScan() {
|
||||||
this.openPhoneScan();
|
this.togglePhoneScanPanel();
|
||||||
|
},
|
||||||
|
onPlusBarcodeSuccess(scanResult) {
|
||||||
|
const code = String(scanResult || '').replace(/\s+/g, '').replace(/[\r\n]/g, '');
|
||||||
|
if (!code) return;
|
||||||
|
if (!this.StoreName) {
|
||||||
|
this.showError('请先选择仓库');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.StoreStationNo) {
|
||||||
|
this.StoreStationNo = code;
|
||||||
|
this.$nextTick(() => this.GetStoreStationName());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.GoodsCheckBillID) {
|
||||||
|
this.showError('请先提交');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.QRBarCode = code;
|
||||||
|
this.$nextTick(() => this.GoodsCheckBillDetailScan());
|
||||||
},
|
},
|
||||||
|
|
||||||
// 添加通用错误提示方法
|
// 添加通用错误提示方法
|
||||||
@@ -692,6 +725,18 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.phone-scan-close {
|
||||||
|
margin-left: 8px;
|
||||||
|
padding: 0 12px;
|
||||||
|
height: 36px;
|
||||||
|
line-height: 36px;
|
||||||
|
border: 1px solid #2979ff;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #2979ff;
|
||||||
|
background: #eaf2ff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
page {
|
page {
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
padding-bottom: 260rpx;
|
padding-bottom: 260rpx;
|
||||||
|
|||||||
@@ -9,11 +9,23 @@
|
|||||||
<text class="title" style="width:200px;">仓库名称:{{ StoreName }}</text>
|
<text class="title" style="width:200px;">仓库名称:{{ StoreName }}</text>
|
||||||
<text class="title" style="width:200px;">仓位名称:{{ StoreStationName }}</text>
|
<text class="title" style="width:200px;">仓位名称:{{ StoreStationName }}</text>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
<PlusBarcodePanel
|
||||||
|
v-if="usePhoneScanFallback"
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
hint-text="连续扫码盘点,扫完可继续下一条"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<u-form-item label-width="150" label="条码资料:">
|
<u-form-item label-width="150" label="条码资料:">
|
||||||
<input type="text" v-model="QRBarCode" maxlength="-1" style="width:200px;"
|
<input type="text" v-model="QRBarCode" maxlength="-1" style="width:200px;"
|
||||||
@confirm="GoodsCheckBillDetailScan" />
|
@confirm="GoodsCheckBillDetailScan" />
|
||||||
|
<text
|
||||||
|
v-if="usePhoneScanFallback && phoneScanPanelOpen"
|
||||||
|
class="phone-scan-close"
|
||||||
|
@click.stop="handlePhoneScan"
|
||||||
|
>关闭扫码</text>
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="usePhoneScanFallback"
|
v-else-if="usePhoneScanFallback"
|
||||||
name="scan"
|
name="scan"
|
||||||
size="44"
|
size="44"
|
||||||
color="#2979ff"
|
color="#2979ff"
|
||||||
@@ -78,9 +90,11 @@ import util, {
|
|||||||
playErrorAudio
|
playErrorAudio
|
||||||
} from '../../common/util';
|
} from '../../common/util';
|
||||||
import scanMixin from '@/common/scanMixin.js';
|
import scanMixin from '@/common/scanMixin.js';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||||
//let that = '';
|
//let that = '';
|
||||||
export default {
|
export default {
|
||||||
|
components: { PlusBarcodePanel },
|
||||||
mixins: [scanMixin],
|
mixins: [scanMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -178,7 +192,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handlePhoneScan() {
|
handlePhoneScan() {
|
||||||
this.openPhoneScan();
|
this.togglePhoneScanPanel();
|
||||||
|
},
|
||||||
|
onPlusBarcodeSuccess(scanResult) {
|
||||||
|
this.handleScanResult(scanResult, this._scanCallback);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 添加通用错误提示方法
|
// 添加通用错误提示方法
|
||||||
@@ -375,6 +392,18 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.phone-scan-close {
|
||||||
|
margin-left: 8px;
|
||||||
|
padding: 0 12px;
|
||||||
|
height: 36px;
|
||||||
|
line-height: 36px;
|
||||||
|
border: 1px solid #2979ff;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #2979ff;
|
||||||
|
background: #eaf2ff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
page {
|
page {
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
padding-bottom: 260rpx;
|
padding-bottom: 260rpx;
|
||||||
|
|||||||
@@ -23,11 +23,23 @@
|
|||||||
<checkbox ref="checkBoxRef" :checked="AllStoreStationScanStatus">整架</checkbox>
|
<checkbox ref="checkBoxRef" :checked="AllStoreStationScanStatus">整架</checkbox>
|
||||||
</checkbox-group>
|
</checkbox-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
<PlusBarcodePanel
|
||||||
|
v-if="usePhoneScanFallback"
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
hint-text="连续扫码移仓,扫完可继续下一条"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<u-form-item label-width="150" label="条码资料:" :class="{ 'input-highlight': shouldHighlightQR }">
|
<u-form-item label-width="150" label="条码资料:" :class="{ 'input-highlight': shouldHighlightQR }">
|
||||||
<input type="text" v-model="QRBarCode" maxlength="-1" style="width:150px;"
|
<input type="text" v-model="QRBarCode" maxlength="-1" style="width:150px;"
|
||||||
@confirm="GoodsStoreStationMoveScan" />
|
@confirm="GoodsStoreStationMoveScan" />
|
||||||
|
<text
|
||||||
|
v-if="usePhoneScanFallback && phoneScanPanelOpen"
|
||||||
|
class="phone-scan-close"
|
||||||
|
@click.stop="handlePhoneScan"
|
||||||
|
>关闭扫码</text>
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="usePhoneScanFallback"
|
v-else-if="usePhoneScanFallback"
|
||||||
name="scan"
|
name="scan"
|
||||||
size="44"
|
size="44"
|
||||||
color="#2979ff"
|
color="#2979ff"
|
||||||
@@ -83,7 +95,9 @@ import util, {
|
|||||||
} from '../../common/util';
|
} from '../../common/util';
|
||||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||||
import scanMixin from '@/common/scanMixin.js';
|
import scanMixin from '@/common/scanMixin.js';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
export default {
|
export default {
|
||||||
|
components: { PlusBarcodePanel },
|
||||||
mixins: [scanMixin],
|
mixins: [scanMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -183,7 +197,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handlePhoneScan() {
|
handlePhoneScan() {
|
||||||
this.openPhoneScan();
|
this.togglePhoneScanPanel();
|
||||||
|
},
|
||||||
|
onPlusBarcodeSuccess(scanResult) {
|
||||||
|
this.handleScanResult(scanResult, this._scanCallback);
|
||||||
},
|
},
|
||||||
|
|
||||||
playSuccess() {
|
playSuccess() {
|
||||||
@@ -511,6 +528,18 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.phone-scan-close {
|
||||||
|
margin-left: 8px;
|
||||||
|
padding: 0 12px;
|
||||||
|
height: 36px;
|
||||||
|
line-height: 36px;
|
||||||
|
border: 1px solid #2979ff;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #2979ff;
|
||||||
|
background: #eaf2ff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
.first {
|
.first {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,12 +65,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</OrderHeaderFold>
|
</OrderHeaderFold>
|
||||||
|
|
||||||
|
<PlusBarcodePanel
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
:hint-text="phoneScanHint"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<ProcessInBinBar
|
<ProcessInBinBar
|
||||||
:can-scan="canScan"
|
:can-scan="canScan"
|
||||||
:bin-id="warehouseBinId"
|
:bin-id="warehouseBinId"
|
||||||
:code="warehouseBinCode"
|
:code="warehouseBinCode"
|
||||||
:name="warehouseBinName"
|
:name="warehouseBinName"
|
||||||
:show-phone-scan="canScan"
|
:show-phone-scan="canScan"
|
||||||
|
:scanning="phoneScanPanelOpen && phoneScanTarget === 'bin'"
|
||||||
@code-input="warehouseBinCode = $event"
|
@code-input="warehouseBinCode = $event"
|
||||||
@confirm="resolveWarehouseBin"
|
@confirm="resolveWarehouseBin"
|
||||||
@phone-scan="handleBinPhoneScan"
|
@phone-scan="handleBinPhoneScan"
|
||||||
@@ -83,6 +90,7 @@
|
|||||||
:message="BillDataMessage"
|
:message="BillDataMessage"
|
||||||
:disabled-tip="qrDisabledTip"
|
:disabled-tip="qrDisabledTip"
|
||||||
:show-phone-scan="canScanQr"
|
:show-phone-scan="canScanQr"
|
||||||
|
:scanning="phoneScanPanelOpen && phoneScanTarget === 'qr'"
|
||||||
@input="QRBarCode = $event"
|
@input="QRBarCode = $event"
|
||||||
@scan="handleScan"
|
@scan="handleScan"
|
||||||
@phone-scan="handlePhoneScan"
|
@phone-scan="handlePhoneScan"
|
||||||
@@ -122,9 +130,11 @@ import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
|||||||
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
|
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
|
||||||
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
|
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
|
||||||
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
|
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
PlusBarcodePanel,
|
||||||
OrderStatusBar,
|
OrderStatusBar,
|
||||||
OrderHeaderFold,
|
OrderHeaderFold,
|
||||||
FabricOutScanBar,
|
FabricOutScanBar,
|
||||||
|
|||||||
@@ -53,12 +53,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</OrderHeaderFold>
|
</OrderHeaderFold>
|
||||||
|
|
||||||
|
<PlusBarcodePanel
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
:hint-text="phoneScanHint"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<ProcessInBinBar
|
<ProcessInBinBar
|
||||||
:can-scan="canScan"
|
:can-scan="canScan"
|
||||||
:bin-id="warehouseBinId"
|
:bin-id="warehouseBinId"
|
||||||
:code="warehouseBinCode"
|
:code="warehouseBinCode"
|
||||||
:name="warehouseBinName"
|
:name="warehouseBinName"
|
||||||
:show-phone-scan="canScan"
|
:show-phone-scan="canScan"
|
||||||
|
:scanning="phoneScanPanelOpen && phoneScanTarget === 'bin'"
|
||||||
@code-input="warehouseBinCode = $event"
|
@code-input="warehouseBinCode = $event"
|
||||||
@confirm="resolveWarehouseBin"
|
@confirm="resolveWarehouseBin"
|
||||||
@phone-scan="handleBinPhoneScan"
|
@phone-scan="handleBinPhoneScan"
|
||||||
@@ -71,6 +78,7 @@
|
|||||||
:message="BillDataMessage"
|
:message="BillDataMessage"
|
||||||
:disabled-tip="qrDisabledTip"
|
:disabled-tip="qrDisabledTip"
|
||||||
:show-phone-scan="canScanQr"
|
:show-phone-scan="canScanQr"
|
||||||
|
:scanning="phoneScanPanelOpen && phoneScanTarget === 'qr'"
|
||||||
@input="QRBarCode = $event"
|
@input="QRBarCode = $event"
|
||||||
@scan="handleScan"
|
@scan="handleScan"
|
||||||
@phone-scan="handlePhoneScan"
|
@phone-scan="handlePhoneScan"
|
||||||
@@ -100,9 +108,11 @@ import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
|||||||
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
|
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
|
||||||
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
|
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
|
||||||
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
|
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
PlusBarcodePanel,
|
||||||
OrderStatusBar,
|
OrderStatusBar,
|
||||||
OrderHeaderFold,
|
OrderHeaderFold,
|
||||||
FabricOutScanBar,
|
FabricOutScanBar,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
import util from '@/common/util';
|
import util from '@/common/util';
|
||||||
import scanMixin from '@/common/scanMixin.js';
|
import scanMixin from '@/common/scanMixin.js';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
import remoteSelectMixin from '@/common/remoteSelectMixin.js';
|
import remoteSelectMixin from '@/common/remoteSelectMixin.js';
|
||||||
import { withNameParam } from '@/common/remoteSelect';
|
import { withNameParam } from '@/common/remoteSelect';
|
||||||
import { initTts, speak } from '@/common/tts.js';
|
import { initTts, speak } from '@/common/tts.js';
|
||||||
@@ -38,6 +39,7 @@ import {
|
|||||||
} from '@/common/storeGoodsProcessIn';
|
} from '@/common/storeGoodsProcessIn';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: { PlusBarcodePanel },
|
||||||
mixins: [scanMixin, remoteSelectMixin],
|
mixins: [scanMixin, remoteSelectMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -110,6 +112,11 @@ export default {
|
|||||||
if (!this.warehouseBinId && !this.BarCodeDelStatus) return '请先扫描仓位后再扫布匹二维码';
|
if (!this.warehouseBinId && !this.BarCodeDelStatus) return '请先扫描仓位后再扫布匹二维码';
|
||||||
return '当前状态不可扫码';
|
return '当前状态不可扫码';
|
||||||
},
|
},
|
||||||
|
phoneScanHint() {
|
||||||
|
return this.phoneScanTarget === 'bin'
|
||||||
|
? '请扫描仓位,成功后自动扫布飞'
|
||||||
|
: '连续扫描布飞二维码,扫完可继续下一条';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.isPageActive = true;
|
this.isPageActive = true;
|
||||||
@@ -134,6 +141,9 @@ export default {
|
|||||||
this.warehouseBinCode = '';
|
this.warehouseBinCode = '';
|
||||||
this.warehouseBinName = '';
|
this.warehouseBinName = '';
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
|
this._phoneBinLocked = false;
|
||||||
|
this._pendingFabricCode = '';
|
||||||
|
if (this.phoneScanTarget === 'bin') this.closePhoneScanPanel();
|
||||||
},
|
},
|
||||||
/** 重扫仓位:先清空输入框再填入,避免残留旧码拼接 */
|
/** 重扫仓位:先清空输入框再填入,避免残留旧码拼接 */
|
||||||
applyWarehouseBinScan(scanResult) {
|
applyWarehouseBinScan(scanResult) {
|
||||||
@@ -145,19 +155,42 @@ export default {
|
|||||||
this.$nextTick(() => this.resolveWarehouseBin());
|
this.$nextTick(() => this.resolveWarehouseBin());
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
openHalfScreenScan(target) {
|
||||||
|
if (this.phoneScanPanelOpen && this.phoneScanTarget === target) {
|
||||||
|
this.closePhoneScanPanel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.phoneContinuousScan = false;
|
||||||
|
if (target === 'bin') this._phoneBinLocked = false;
|
||||||
|
this.phoneScanTarget = target;
|
||||||
|
this.phoneScanPanelOpen = true;
|
||||||
|
},
|
||||||
|
onPlusBarcodeSuccess(scanResult) {
|
||||||
|
const code = String(scanResult || '').trim().replace(/[\r\n]/g, '');
|
||||||
|
if (!code) return;
|
||||||
|
if (this.phoneScanTarget === 'bin') {
|
||||||
|
if (this._phoneBinLocked) {
|
||||||
|
if (!this.warehouseBinId) {
|
||||||
|
this._pendingFabricCode = code;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.phoneScanTarget = 'qr';
|
||||||
|
} else {
|
||||||
|
this._phoneBinLocked = true;
|
||||||
|
this._pendingFabricCode = '';
|
||||||
|
this.applyWarehouseBinScan(code);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.QRBarCode = code;
|
||||||
|
this.$nextTick(() => this.handleScan());
|
||||||
|
},
|
||||||
handleBinPhoneScan() {
|
handleBinPhoneScan() {
|
||||||
if (!this.canScan || !this.orderId) {
|
if (!this.canScan || !this.orderId) {
|
||||||
this.showError('请先提交保存后再扫码');
|
this.showError('请先提交保存后再扫码');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.phoneContinuousScan = false;
|
this.openHalfScreenScan('bin');
|
||||||
this.phoneScanTarget = 'bin';
|
|
||||||
this.openPhoneScan({
|
|
||||||
callback: (scanResult) => {
|
|
||||||
this.applyWarehouseBinScan(scanResult);
|
|
||||||
},
|
|
||||||
fail: () => {},
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
handlePhoneScan() {
|
handlePhoneScan() {
|
||||||
if (!this.canScan || !this.orderId) {
|
if (!this.canScan || !this.orderId) {
|
||||||
@@ -169,11 +202,10 @@ export default {
|
|||||||
this.handleBinPhoneScan();
|
this.handleBinPhoneScan();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.phoneScanTarget = 'qr';
|
this.openHalfScreenScan('qr');
|
||||||
this.phoneContinuousScan = true;
|
|
||||||
this.openContinuousPhoneScan();
|
|
||||||
},
|
},
|
||||||
openContinuousPhoneScan() {
|
openContinuousPhoneScan() {
|
||||||
|
if (this.phoneScanPanelOpen) return;
|
||||||
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
return;
|
return;
|
||||||
@@ -189,6 +221,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
scheduleNextPhoneScan() {
|
scheduleNextPhoneScan() {
|
||||||
|
if (this.phoneScanPanelOpen) return;
|
||||||
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
return;
|
return;
|
||||||
@@ -246,9 +279,19 @@ export default {
|
|||||||
this.BillDataMessage = '';
|
this.BillDataMessage = '';
|
||||||
speak('仓位成功');
|
speak('仓位成功');
|
||||||
uni.showToast({ title: '仓位识别成功', icon: 'success' });
|
uni.showToast({ title: '仓位识别成功', icon: 'success' });
|
||||||
|
if (this.phoneScanPanelOpen) this.phoneScanTarget = 'qr';
|
||||||
|
this._phoneBinLocked = false;
|
||||||
|
const pending = this._pendingFabricCode;
|
||||||
|
this._pendingFabricCode = '';
|
||||||
|
if (pending && this.phoneScanPanelOpen) {
|
||||||
|
this.QRBarCode = pending;
|
||||||
|
this.$nextTick(() => this.handleScan());
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
this._phoneBinLocked = false;
|
||||||
|
this._pendingFabricCode = '';
|
||||||
this.warehouseBinId = 0;
|
this.warehouseBinId = 0;
|
||||||
this.warehouseBinCode = '';
|
this.warehouseBinCode = '';
|
||||||
this.warehouseBinName = '';
|
this.warehouseBinName = '';
|
||||||
@@ -259,6 +302,7 @@ export default {
|
|||||||
const nextCanScan = this.isEditable && canScanAtStatus(status);
|
const nextCanScan = this.isEditable && canScanAtStatus(status);
|
||||||
if (this.canScan && !nextCanScan) {
|
if (this.canScan && !nextCanScan) {
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
|
this.closePhoneScanPanel();
|
||||||
this.unregisterScanBroadcast();
|
this.unregisterScanBroadcast();
|
||||||
}
|
}
|
||||||
this.canScan = nextCanScan;
|
this.canScan = nextCanScan;
|
||||||
|
|||||||
@@ -34,6 +34,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</OrderHeaderFold>
|
</OrderHeaderFold>
|
||||||
|
|
||||||
|
<PlusBarcodePanel
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
hint-text="连续扫码出仓,扫完可继续下一条"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<FabricOutScanBar
|
<FabricOutScanBar
|
||||||
:can-scan="showQrScanBar"
|
:can-scan="showQrScanBar"
|
||||||
:value="QRBarCode"
|
:value="QRBarCode"
|
||||||
@@ -41,6 +47,7 @@
|
|||||||
:message="BillDataMessage"
|
:message="BillDataMessage"
|
||||||
:disabled-tip="qrDisabledTip"
|
:disabled-tip="qrDisabledTip"
|
||||||
:show-phone-scan="canScanQr"
|
:show-phone-scan="canScanQr"
|
||||||
|
:scanning="phoneScanPanelOpen"
|
||||||
@input="QRBarCode = $event"
|
@input="QRBarCode = $event"
|
||||||
@scan="handleScan"
|
@scan="handleScan"
|
||||||
@phone-scan="handlePhoneScan"
|
@phone-scan="handlePhoneScan"
|
||||||
@@ -78,9 +85,11 @@ import FabricOutScanBar from '@/components/storefabric/FabricOutScanBar.vue';
|
|||||||
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
||||||
import ProcessOutScanDetail from '@/components/storegoods/ProcessOutScanDetail.vue';
|
import ProcessOutScanDetail from '@/components/storegoods/ProcessOutScanDetail.vue';
|
||||||
import ProcessOutDetailList from '@/components/storegoods/ProcessOutDetailList.vue';
|
import ProcessOutDetailList from '@/components/storegoods/ProcessOutDetailList.vue';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
PlusBarcodePanel,
|
||||||
OrderStatusBar,
|
OrderStatusBar,
|
||||||
OrderHeaderFold,
|
OrderHeaderFold,
|
||||||
FabricOutScanBar,
|
FabricOutScanBar,
|
||||||
|
|||||||
@@ -25,6 +25,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</OrderHeaderFold>
|
</OrderHeaderFold>
|
||||||
|
|
||||||
|
<PlusBarcodePanel
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
hint-text="连续扫码出仓,扫完可继续下一条"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<FabricOutScanBar
|
<FabricOutScanBar
|
||||||
:can-scan="showQrScanBar"
|
:can-scan="showQrScanBar"
|
||||||
:value="QRBarCode"
|
:value="QRBarCode"
|
||||||
@@ -32,6 +38,7 @@
|
|||||||
:message="BillDataMessage"
|
:message="BillDataMessage"
|
||||||
:disabled-tip="qrDisabledTip"
|
:disabled-tip="qrDisabledTip"
|
||||||
:show-phone-scan="canScanQr"
|
:show-phone-scan="canScanQr"
|
||||||
|
:scanning="phoneScanPanelOpen"
|
||||||
@input="QRBarCode = $event"
|
@input="QRBarCode = $event"
|
||||||
@scan="handleScan"
|
@scan="handleScan"
|
||||||
@phone-scan="handlePhoneScan"
|
@phone-scan="handlePhoneScan"
|
||||||
@@ -59,9 +66,11 @@ import FabricOutScanBar from '@/components/storefabric/FabricOutScanBar.vue';
|
|||||||
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
||||||
import ProcessOutScanDetail from '@/components/storegoods/ProcessOutScanDetail.vue';
|
import ProcessOutScanDetail from '@/components/storegoods/ProcessOutScanDetail.vue';
|
||||||
import ProcessOutDetailList from '@/components/storegoods/ProcessOutDetailList.vue';
|
import ProcessOutDetailList from '@/components/storegoods/ProcessOutDetailList.vue';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
PlusBarcodePanel,
|
||||||
OrderStatusBar,
|
OrderStatusBar,
|
||||||
OrderHeaderFold,
|
OrderHeaderFold,
|
||||||
FabricOutScanBar,
|
FabricOutScanBar,
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
import util from '@/common/util';
|
import util from '@/common/util';
|
||||||
import scanMixin from '@/common/scanMixin.js';
|
import scanMixin from '@/common/scanMixin.js';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
import remoteSelectMixin from '@/common/remoteSelectMixin.js';
|
import remoteSelectMixin from '@/common/remoteSelectMixin.js';
|
||||||
import { withNameParam } from '@/common/remoteSelect';
|
import { withNameParam } from '@/common/remoteSelect';
|
||||||
import { initTts, speak } from '@/common/tts.js';
|
import { initTts, speak } from '@/common/tts.js';
|
||||||
@@ -34,6 +35,7 @@ import {
|
|||||||
} from '@/common/storeGoodsProcessOut';
|
} from '@/common/storeGoodsProcessOut';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: { PlusBarcodePanel },
|
||||||
mixins: [scanMixin, remoteSelectMixin],
|
mixins: [scanMixin, remoteSelectMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -114,10 +116,15 @@ export default {
|
|||||||
this.showError('请先提交保存后再扫码');
|
this.showError('请先提交保存后再扫码');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.phoneContinuousScan = true;
|
this.phoneContinuousScan = false;
|
||||||
this.openContinuousPhoneScan();
|
this.togglePhoneScanPanel();
|
||||||
|
},
|
||||||
|
onPlusBarcodeSuccess(scanResult) {
|
||||||
|
this.QRBarCode = String(scanResult || '').trim().replace(/[\r\n]/g, '');
|
||||||
|
this.$nextTick(() => this.handleScan());
|
||||||
},
|
},
|
||||||
openContinuousPhoneScan() {
|
openContinuousPhoneScan() {
|
||||||
|
if (this.phoneScanPanelOpen) return;
|
||||||
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
return;
|
return;
|
||||||
@@ -133,6 +140,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
scheduleNextPhoneScan() {
|
scheduleNextPhoneScan() {
|
||||||
|
if (this.phoneScanPanelOpen) return;
|
||||||
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
return;
|
return;
|
||||||
@@ -153,6 +161,7 @@ export default {
|
|||||||
const nextCanScan = this.isEditable && canScanAtStatus(status);
|
const nextCanScan = this.isEditable && canScanAtStatus(status);
|
||||||
if (this.canScan && !nextCanScan) {
|
if (this.canScan && !nextCanScan) {
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
|
this.closePhoneScanPanel();
|
||||||
this.unregisterScanBroadcast();
|
this.unregisterScanBroadcast();
|
||||||
}
|
}
|
||||||
this.canScan = nextCanScan;
|
this.canScan = nextCanScan;
|
||||||
|
|||||||
@@ -31,12 +31,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</OrderHeaderFold>
|
</OrderHeaderFold>
|
||||||
|
|
||||||
|
<PlusBarcodePanel
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
:hint-text="phoneScanHint"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<ProcessInBinBar
|
<ProcessInBinBar
|
||||||
:can-scan="canScan"
|
:can-scan="canScan"
|
||||||
:bin-id="warehouseBinId"
|
:bin-id="warehouseBinId"
|
||||||
:code="warehouseBinCode"
|
:code="warehouseBinCode"
|
||||||
:name="warehouseBinName"
|
:name="warehouseBinName"
|
||||||
:show-phone-scan="canScan"
|
:show-phone-scan="canScan"
|
||||||
|
:scanning="phoneScanPanelOpen && phoneScanTarget === 'bin'"
|
||||||
@code-input="warehouseBinCode = $event"
|
@code-input="warehouseBinCode = $event"
|
||||||
@confirm="resolveWarehouseBin"
|
@confirm="resolveWarehouseBin"
|
||||||
@phone-scan="handleBinPhoneScan"
|
@phone-scan="handleBinPhoneScan"
|
||||||
@@ -49,6 +56,7 @@
|
|||||||
:message="BillDataMessage"
|
:message="BillDataMessage"
|
||||||
:disabled-tip="qrDisabledTip"
|
:disabled-tip="qrDisabledTip"
|
||||||
:show-phone-scan="canScanQr"
|
:show-phone-scan="canScanQr"
|
||||||
|
:scanning="phoneScanPanelOpen && phoneScanTarget === 'qr'"
|
||||||
@input="QRBarCode = $event"
|
@input="QRBarCode = $event"
|
||||||
@scan="handleScan"
|
@scan="handleScan"
|
||||||
@phone-scan="handlePhoneScan"
|
@phone-scan="handlePhoneScan"
|
||||||
@@ -87,9 +95,11 @@ import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
|||||||
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
|
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
|
||||||
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
|
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
|
||||||
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
|
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
PlusBarcodePanel,
|
||||||
OrderStatusBar,
|
OrderStatusBar,
|
||||||
OrderHeaderFold,
|
OrderHeaderFold,
|
||||||
FabricOutScanBar,
|
FabricOutScanBar,
|
||||||
|
|||||||
@@ -25,12 +25,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</OrderHeaderFold>
|
</OrderHeaderFold>
|
||||||
|
|
||||||
|
<PlusBarcodePanel
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
:hint-text="phoneScanHint"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<ProcessInBinBar
|
<ProcessInBinBar
|
||||||
:can-scan="canScan"
|
:can-scan="canScan"
|
||||||
:bin-id="warehouseBinId"
|
:bin-id="warehouseBinId"
|
||||||
:code="warehouseBinCode"
|
:code="warehouseBinCode"
|
||||||
:name="warehouseBinName"
|
:name="warehouseBinName"
|
||||||
:show-phone-scan="canScan"
|
:show-phone-scan="canScan"
|
||||||
|
:scanning="phoneScanPanelOpen && phoneScanTarget === 'bin'"
|
||||||
@code-input="warehouseBinCode = $event"
|
@code-input="warehouseBinCode = $event"
|
||||||
@confirm="resolveWarehouseBin"
|
@confirm="resolveWarehouseBin"
|
||||||
@phone-scan="handleBinPhoneScan"
|
@phone-scan="handleBinPhoneScan"
|
||||||
@@ -43,6 +50,7 @@
|
|||||||
:message="BillDataMessage"
|
:message="BillDataMessage"
|
||||||
:disabled-tip="qrDisabledTip"
|
:disabled-tip="qrDisabledTip"
|
||||||
:show-phone-scan="canScanQr"
|
:show-phone-scan="canScanQr"
|
||||||
|
:scanning="phoneScanPanelOpen && phoneScanTarget === 'qr'"
|
||||||
@input="QRBarCode = $event"
|
@input="QRBarCode = $event"
|
||||||
@scan="handleScan"
|
@scan="handleScan"
|
||||||
@phone-scan="handlePhoneScan"
|
@phone-scan="handlePhoneScan"
|
||||||
@@ -71,9 +79,11 @@ import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
|||||||
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
|
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
|
||||||
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
|
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
|
||||||
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
|
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
PlusBarcodePanel,
|
||||||
OrderStatusBar,
|
OrderStatusBar,
|
||||||
OrderHeaderFold,
|
OrderHeaderFold,
|
||||||
FabricOutScanBar,
|
FabricOutScanBar,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
import util from '@/common/util';
|
import util from '@/common/util';
|
||||||
import scanMixin from '@/common/scanMixin.js';
|
import scanMixin from '@/common/scanMixin.js';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
import remoteSelectMixin from '@/common/remoteSelectMixin.js';
|
import remoteSelectMixin from '@/common/remoteSelectMixin.js';
|
||||||
import { withNameParam } from '@/common/remoteSelect';
|
import { withNameParam } from '@/common/remoteSelect';
|
||||||
import { initTts, speak } from '@/common/tts.js';
|
import { initTts, speak } from '@/common/tts.js';
|
||||||
@@ -33,6 +34,7 @@ import {
|
|||||||
} from '@/common/storeGoodsProcessReturnIn';
|
} from '@/common/storeGoodsProcessReturnIn';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: { PlusBarcodePanel },
|
||||||
mixins: [scanMixin, remoteSelectMixin],
|
mixins: [scanMixin, remoteSelectMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -99,6 +101,11 @@ export default {
|
|||||||
if (!this.warehouseBinId && !this.BarCodeDelStatus) return '请先扫描仓位后再扫布匹二维码';
|
if (!this.warehouseBinId && !this.BarCodeDelStatus) return '请先扫描仓位后再扫布匹二维码';
|
||||||
return '当前状态不可扫码';
|
return '当前状态不可扫码';
|
||||||
},
|
},
|
||||||
|
phoneScanHint() {
|
||||||
|
return this.phoneScanTarget === 'bin'
|
||||||
|
? '请扫描仓位,成功后自动扫布飞'
|
||||||
|
: '连续扫描布飞二维码,扫完可继续下一条';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.isPageActive = true;
|
this.isPageActive = true;
|
||||||
@@ -123,6 +130,9 @@ export default {
|
|||||||
this.warehouseBinCode = '';
|
this.warehouseBinCode = '';
|
||||||
this.warehouseBinName = '';
|
this.warehouseBinName = '';
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
|
this._phoneBinLocked = false;
|
||||||
|
this._pendingFabricCode = '';
|
||||||
|
if (this.phoneScanTarget === 'bin') this.closePhoneScanPanel();
|
||||||
},
|
},
|
||||||
/** 重扫仓位:先清空输入框再填入,避免残留旧码拼接 */
|
/** 重扫仓位:先清空输入框再填入,避免残留旧码拼接 */
|
||||||
applyWarehouseBinScan(scanResult) {
|
applyWarehouseBinScan(scanResult) {
|
||||||
@@ -134,19 +144,42 @@ export default {
|
|||||||
this.$nextTick(() => this.resolveWarehouseBin());
|
this.$nextTick(() => this.resolveWarehouseBin());
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
openHalfScreenScan(target) {
|
||||||
|
if (this.phoneScanPanelOpen && this.phoneScanTarget === target) {
|
||||||
|
this.closePhoneScanPanel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.phoneContinuousScan = false;
|
||||||
|
if (target === 'bin') this._phoneBinLocked = false;
|
||||||
|
this.phoneScanTarget = target;
|
||||||
|
this.phoneScanPanelOpen = true;
|
||||||
|
},
|
||||||
|
onPlusBarcodeSuccess(scanResult) {
|
||||||
|
const code = String(scanResult || '').trim().replace(/[\r\n]/g, '');
|
||||||
|
if (!code) return;
|
||||||
|
if (this.phoneScanTarget === 'bin') {
|
||||||
|
if (this._phoneBinLocked) {
|
||||||
|
if (!this.warehouseBinId) {
|
||||||
|
this._pendingFabricCode = code;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.phoneScanTarget = 'qr';
|
||||||
|
} else {
|
||||||
|
this._phoneBinLocked = true;
|
||||||
|
this._pendingFabricCode = '';
|
||||||
|
this.applyWarehouseBinScan(code);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.QRBarCode = code;
|
||||||
|
this.$nextTick(() => this.handleScan());
|
||||||
|
},
|
||||||
handleBinPhoneScan() {
|
handleBinPhoneScan() {
|
||||||
if (!this.canScan || !this.orderId) {
|
if (!this.canScan || !this.orderId) {
|
||||||
this.showError('请先提交保存后再扫码');
|
this.showError('请先提交保存后再扫码');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.phoneContinuousScan = false;
|
this.openHalfScreenScan('bin');
|
||||||
this.phoneScanTarget = 'bin';
|
|
||||||
this.openPhoneScan({
|
|
||||||
callback: (scanResult) => {
|
|
||||||
this.applyWarehouseBinScan(scanResult);
|
|
||||||
},
|
|
||||||
fail: () => {},
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
handlePhoneScan() {
|
handlePhoneScan() {
|
||||||
if (!this.canScan || !this.orderId) {
|
if (!this.canScan || !this.orderId) {
|
||||||
@@ -158,11 +191,10 @@ export default {
|
|||||||
this.handleBinPhoneScan();
|
this.handleBinPhoneScan();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.phoneScanTarget = 'qr';
|
this.openHalfScreenScan('qr');
|
||||||
this.phoneContinuousScan = true;
|
|
||||||
this.openContinuousPhoneScan();
|
|
||||||
},
|
},
|
||||||
openContinuousPhoneScan() {
|
openContinuousPhoneScan() {
|
||||||
|
if (this.phoneScanPanelOpen) return;
|
||||||
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
return;
|
return;
|
||||||
@@ -178,6 +210,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
scheduleNextPhoneScan() {
|
scheduleNextPhoneScan() {
|
||||||
|
if (this.phoneScanPanelOpen) return;
|
||||||
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
return;
|
return;
|
||||||
@@ -235,9 +268,19 @@ export default {
|
|||||||
this.BillDataMessage = '';
|
this.BillDataMessage = '';
|
||||||
speak('仓位成功');
|
speak('仓位成功');
|
||||||
uni.showToast({ title: '仓位识别成功', icon: 'success' });
|
uni.showToast({ title: '仓位识别成功', icon: 'success' });
|
||||||
|
if (this.phoneScanPanelOpen) this.phoneScanTarget = 'qr';
|
||||||
|
this._phoneBinLocked = false;
|
||||||
|
const pending = this._pendingFabricCode;
|
||||||
|
this._pendingFabricCode = '';
|
||||||
|
if (pending && this.phoneScanPanelOpen) {
|
||||||
|
this.QRBarCode = pending;
|
||||||
|
this.$nextTick(() => this.handleScan());
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
this._phoneBinLocked = false;
|
||||||
|
this._pendingFabricCode = '';
|
||||||
this.warehouseBinId = 0;
|
this.warehouseBinId = 0;
|
||||||
this.warehouseBinCode = '';
|
this.warehouseBinCode = '';
|
||||||
this.warehouseBinName = '';
|
this.warehouseBinName = '';
|
||||||
@@ -248,6 +291,7 @@ export default {
|
|||||||
const nextCanScan = this.isEditable && canScanAtStatus(status);
|
const nextCanScan = this.isEditable && canScanAtStatus(status);
|
||||||
if (this.canScan && !nextCanScan) {
|
if (this.canScan && !nextCanScan) {
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
|
this.closePhoneScanPanel();
|
||||||
this.unregisterScanBroadcast();
|
this.unregisterScanBroadcast();
|
||||||
}
|
}
|
||||||
this.canScan = nextCanScan;
|
this.canScan = nextCanScan;
|
||||||
|
|||||||
@@ -65,12 +65,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</OrderHeaderFold>
|
</OrderHeaderFold>
|
||||||
|
|
||||||
|
<PlusBarcodePanel
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
:hint-text="phoneScanHint"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<ProcessInBinBar
|
<ProcessInBinBar
|
||||||
:can-scan="canScan"
|
:can-scan="canScan"
|
||||||
:bin-id="warehouseBinId"
|
:bin-id="warehouseBinId"
|
||||||
:code="warehouseBinCode"
|
:code="warehouseBinCode"
|
||||||
:name="warehouseBinName"
|
:name="warehouseBinName"
|
||||||
:show-phone-scan="canScan"
|
:show-phone-scan="canScan"
|
||||||
|
:scanning="phoneScanPanelOpen && phoneScanTarget === 'bin'"
|
||||||
@code-input="warehouseBinCode = $event"
|
@code-input="warehouseBinCode = $event"
|
||||||
@confirm="resolveWarehouseBin"
|
@confirm="resolveWarehouseBin"
|
||||||
@phone-scan="handleBinPhoneScan"
|
@phone-scan="handleBinPhoneScan"
|
||||||
@@ -83,6 +90,7 @@
|
|||||||
:message="BillDataMessage"
|
:message="BillDataMessage"
|
||||||
:disabled-tip="qrDisabledTip"
|
:disabled-tip="qrDisabledTip"
|
||||||
:show-phone-scan="canScanQr"
|
:show-phone-scan="canScanQr"
|
||||||
|
:scanning="phoneScanPanelOpen && phoneScanTarget === 'qr'"
|
||||||
@input="QRBarCode = $event"
|
@input="QRBarCode = $event"
|
||||||
@scan="handleScan"
|
@scan="handleScan"
|
||||||
@phone-scan="handlePhoneScan"
|
@phone-scan="handlePhoneScan"
|
||||||
@@ -122,9 +130,11 @@ import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
|||||||
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
|
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
|
||||||
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
|
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
|
||||||
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
|
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
PlusBarcodePanel,
|
||||||
OrderStatusBar,
|
OrderStatusBar,
|
||||||
OrderHeaderFold,
|
OrderHeaderFold,
|
||||||
FabricOutScanBar,
|
FabricOutScanBar,
|
||||||
|
|||||||
@@ -53,12 +53,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</OrderHeaderFold>
|
</OrderHeaderFold>
|
||||||
|
|
||||||
|
<PlusBarcodePanel
|
||||||
|
:visible.sync="phoneScanPanelOpen"
|
||||||
|
:hint-text="phoneScanHint"
|
||||||
|
:scan-time-space="1200"
|
||||||
|
@success="onPlusBarcodeSuccess"
|
||||||
|
/>
|
||||||
<ProcessInBinBar
|
<ProcessInBinBar
|
||||||
:can-scan="canScan"
|
:can-scan="canScan"
|
||||||
:bin-id="warehouseBinId"
|
:bin-id="warehouseBinId"
|
||||||
:code="warehouseBinCode"
|
:code="warehouseBinCode"
|
||||||
:name="warehouseBinName"
|
:name="warehouseBinName"
|
||||||
:show-phone-scan="canScan"
|
:show-phone-scan="canScan"
|
||||||
|
:scanning="phoneScanPanelOpen && phoneScanTarget === 'bin'"
|
||||||
@code-input="warehouseBinCode = $event"
|
@code-input="warehouseBinCode = $event"
|
||||||
@confirm="resolveWarehouseBin"
|
@confirm="resolveWarehouseBin"
|
||||||
@phone-scan="handleBinPhoneScan"
|
@phone-scan="handleBinPhoneScan"
|
||||||
@@ -71,6 +78,7 @@
|
|||||||
:message="BillDataMessage"
|
:message="BillDataMessage"
|
||||||
:disabled-tip="qrDisabledTip"
|
:disabled-tip="qrDisabledTip"
|
||||||
:show-phone-scan="canScanQr"
|
:show-phone-scan="canScanQr"
|
||||||
|
:scanning="phoneScanPanelOpen && phoneScanTarget === 'qr'"
|
||||||
@input="QRBarCode = $event"
|
@input="QRBarCode = $event"
|
||||||
@scan="handleScan"
|
@scan="handleScan"
|
||||||
@phone-scan="handlePhoneScan"
|
@phone-scan="handlePhoneScan"
|
||||||
@@ -100,9 +108,11 @@ import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
|
|||||||
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
|
import ProcessInScanDetail from '@/components/storegoods/ProcessInScanDetail.vue';
|
||||||
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
|
import ProcessInDetailList from '@/components/storegoods/ProcessInDetailList.vue';
|
||||||
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
|
import ProcessInBinBar from '@/components/storegoods/ProcessInBinBar.vue';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
PlusBarcodePanel,
|
||||||
OrderStatusBar,
|
OrderStatusBar,
|
||||||
OrderHeaderFold,
|
OrderHeaderFold,
|
||||||
FabricOutScanBar,
|
FabricOutScanBar,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
import util from '@/common/util';
|
import util from '@/common/util';
|
||||||
import scanMixin from '@/common/scanMixin.js';
|
import scanMixin from '@/common/scanMixin.js';
|
||||||
|
import PlusBarcodePanel from '@/components/common/PlusBarcodePanel.vue';
|
||||||
import remoteSelectMixin from '@/common/remoteSelectMixin.js';
|
import remoteSelectMixin from '@/common/remoteSelectMixin.js';
|
||||||
import { withNameParam } from '@/common/remoteSelect';
|
import { withNameParam } from '@/common/remoteSelect';
|
||||||
import { initTts, speak } from '@/common/tts.js';
|
import { initTts, speak } from '@/common/tts.js';
|
||||||
@@ -40,6 +41,7 @@ import {
|
|||||||
} from '@/common/storeGoodsPurchaseIn';
|
} from '@/common/storeGoodsPurchaseIn';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: { PlusBarcodePanel },
|
||||||
mixins: [scanMixin, remoteSelectMixin],
|
mixins: [scanMixin, remoteSelectMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -112,6 +114,11 @@ export default {
|
|||||||
if (!this.warehouseBinId && !this.BarCodeDelStatus) return '请先扫描仓位后再扫布匹二维码';
|
if (!this.warehouseBinId && !this.BarCodeDelStatus) return '请先扫描仓位后再扫布匹二维码';
|
||||||
return '当前状态不可扫码';
|
return '当前状态不可扫码';
|
||||||
},
|
},
|
||||||
|
phoneScanHint() {
|
||||||
|
return this.phoneScanTarget === 'bin'
|
||||||
|
? '请扫描仓位,成功后自动扫布飞'
|
||||||
|
: '连续扫描布飞二维码,扫完可继续下一条';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.isPageActive = true;
|
this.isPageActive = true;
|
||||||
@@ -136,6 +143,9 @@ export default {
|
|||||||
this.warehouseBinCode = '';
|
this.warehouseBinCode = '';
|
||||||
this.warehouseBinName = '';
|
this.warehouseBinName = '';
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
|
this._phoneBinLocked = false;
|
||||||
|
this._pendingFabricCode = '';
|
||||||
|
if (this.phoneScanTarget === 'bin') this.closePhoneScanPanel();
|
||||||
},
|
},
|
||||||
/** 重扫仓位:先清空输入框再填入,避免残留旧码拼接 */
|
/** 重扫仓位:先清空输入框再填入,避免残留旧码拼接 */
|
||||||
applyWarehouseBinScan(scanResult) {
|
applyWarehouseBinScan(scanResult) {
|
||||||
@@ -147,19 +157,42 @@ export default {
|
|||||||
this.$nextTick(() => this.resolveWarehouseBin());
|
this.$nextTick(() => this.resolveWarehouseBin());
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
openHalfScreenScan(target) {
|
||||||
|
if (this.phoneScanPanelOpen && this.phoneScanTarget === target) {
|
||||||
|
this.closePhoneScanPanel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.phoneContinuousScan = false;
|
||||||
|
if (target === 'bin') this._phoneBinLocked = false;
|
||||||
|
this.phoneScanTarget = target;
|
||||||
|
this.phoneScanPanelOpen = true;
|
||||||
|
},
|
||||||
|
onPlusBarcodeSuccess(scanResult) {
|
||||||
|
const code = String(scanResult || '').trim().replace(/[\r\n]/g, '');
|
||||||
|
if (!code) return;
|
||||||
|
if (this.phoneScanTarget === 'bin') {
|
||||||
|
if (this._phoneBinLocked) {
|
||||||
|
if (!this.warehouseBinId) {
|
||||||
|
this._pendingFabricCode = code;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.phoneScanTarget = 'qr';
|
||||||
|
} else {
|
||||||
|
this._phoneBinLocked = true;
|
||||||
|
this._pendingFabricCode = '';
|
||||||
|
this.applyWarehouseBinScan(code);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.QRBarCode = code;
|
||||||
|
this.$nextTick(() => this.handleScan());
|
||||||
|
},
|
||||||
handleBinPhoneScan() {
|
handleBinPhoneScan() {
|
||||||
if (!this.canScan || !this.orderId) {
|
if (!this.canScan || !this.orderId) {
|
||||||
this.showError('请先提交保存后再扫码');
|
this.showError('请先提交保存后再扫码');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.phoneContinuousScan = false;
|
this.openHalfScreenScan('bin');
|
||||||
this.phoneScanTarget = 'bin';
|
|
||||||
this.openPhoneScan({
|
|
||||||
callback: (scanResult) => {
|
|
||||||
this.applyWarehouseBinScan(scanResult);
|
|
||||||
},
|
|
||||||
fail: () => {},
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
handlePhoneScan() {
|
handlePhoneScan() {
|
||||||
if (!this.canScan || !this.orderId) {
|
if (!this.canScan || !this.orderId) {
|
||||||
@@ -171,11 +204,10 @@ export default {
|
|||||||
this.handleBinPhoneScan();
|
this.handleBinPhoneScan();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.phoneScanTarget = 'qr';
|
this.openHalfScreenScan('qr');
|
||||||
this.phoneContinuousScan = true;
|
|
||||||
this.openContinuousPhoneScan();
|
|
||||||
},
|
},
|
||||||
openContinuousPhoneScan() {
|
openContinuousPhoneScan() {
|
||||||
|
if (this.phoneScanPanelOpen) return;
|
||||||
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
return;
|
return;
|
||||||
@@ -191,6 +223,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
scheduleNextPhoneScan() {
|
scheduleNextPhoneScan() {
|
||||||
|
if (this.phoneScanPanelOpen) return;
|
||||||
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
if (!this.phoneContinuousScan || !this.canScanQr || !this.isPageActive) {
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
return;
|
return;
|
||||||
@@ -248,9 +281,19 @@ export default {
|
|||||||
this.BillDataMessage = '';
|
this.BillDataMessage = '';
|
||||||
speak('仓位成功');
|
speak('仓位成功');
|
||||||
uni.showToast({ title: '仓位识别成功', icon: 'success' });
|
uni.showToast({ title: '仓位识别成功', icon: 'success' });
|
||||||
|
if (this.phoneScanPanelOpen) this.phoneScanTarget = 'qr';
|
||||||
|
this._phoneBinLocked = false;
|
||||||
|
const pending = this._pendingFabricCode;
|
||||||
|
this._pendingFabricCode = '';
|
||||||
|
if (pending && this.phoneScanPanelOpen) {
|
||||||
|
this.QRBarCode = pending;
|
||||||
|
this.$nextTick(() => this.handleScan());
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
this._phoneBinLocked = false;
|
||||||
|
this._pendingFabricCode = '';
|
||||||
this.warehouseBinId = 0;
|
this.warehouseBinId = 0;
|
||||||
this.warehouseBinCode = '';
|
this.warehouseBinCode = '';
|
||||||
this.warehouseBinName = '';
|
this.warehouseBinName = '';
|
||||||
@@ -261,6 +304,7 @@ export default {
|
|||||||
const nextCanScan = this.isEditable && canScanAtStatus(status);
|
const nextCanScan = this.isEditable && canScanAtStatus(status);
|
||||||
if (this.canScan && !nextCanScan) {
|
if (this.canScan && !nextCanScan) {
|
||||||
this.phoneContinuousScan = false;
|
this.phoneContinuousScan = false;
|
||||||
|
this.closePhoneScanPanel();
|
||||||
this.unregisterScanBroadcast();
|
this.unregisterScanBroadcast();
|
||||||
}
|
}
|
||||||
this.canScan = nextCanScan;
|
this.canScan = nextCanScan;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
<u-cell-group class="personal-list" :border="false">
|
<u-cell-group class="personal-list" :border="false">
|
||||||
<u-cell-item icon="question-circle" :iconStyle="{ color: '#ff8d06' }" title="常见问题" :center="true" @click="navTo('problem')"></u-cell-item>
|
<u-cell-item icon="question-circle" :iconStyle="{ color: '#ff8d06' }" title="常见问题" :center="true" @click="navTo('problem')"></u-cell-item>
|
||||||
<u-cell-item icon="kefu-ermai" :iconStyle="{ color: '#5f8dff' }" title="意见反馈" :center="true" @click="navTo('comment')"></u-cell-item>
|
<u-cell-item icon="kefu-ermai" :iconStyle="{ color: '#5f8dff' }" title="意见反馈" :center="true" @click="navTo('comment')"></u-cell-item>
|
||||||
<u-cell-item icon="map" :iconStyle="{ color: '#316ede' }" title="账号安全" :center="true" @click="navTo('pwd')"></u-cell-item>
|
<u-cell-item icon="lock" :iconStyle="{ color: '#316ede' }" title="修改密码" :center="true" @click="navTo('pwd')"></u-cell-item>
|
||||||
<u-cell-item icon="scan" :iconStyle="{ color: '#36cfc9' }" title="扫描设置" :center="true" @click="navTo('scan-settings')"></u-cell-item>
|
<u-cell-item icon="scan" :iconStyle="{ color: '#36cfc9' }" title="扫描设置" :center="true" @click="navTo('scan-settings')"></u-cell-item>
|
||||||
<u-cell-item icon="order" :iconStyle="{ color: '#59bdf9' }" title="清除缓存" :center="true" @click="navTo('clear-cache')"></u-cell-item>
|
<u-cell-item icon="order" :iconStyle="{ color: '#59bdf9' }" title="清除缓存" :center="true" @click="navTo('clear-cache')"></u-cell-item>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
@@ -49,6 +49,8 @@
|
|||||||
<u-cell-item icon="reload" :iconStyle="{ color: '#19be6b' }" title="版本更新" :center="true" @click="upgrade"></u-cell-item>
|
<u-cell-item icon="reload" :iconStyle="{ color: '#19be6b' }" title="版本更新" :center="true" @click="upgrade"></u-cell-item>
|
||||||
<u-cell-item icon="setting" :iconStyle="{ color: '#2767dc' }" title="系统设置" :center="true" @click="navTo('setting')"></u-cell-item>
|
<u-cell-item icon="setting" :iconStyle="{ color: '#2767dc' }" title="系统设置" :center="true" @click="navTo('setting')"></u-cell-item>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
|
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
|
||||||
|
<u-button class="sign-out logout-btn" @click="logout" :hair-line="false">退出登录</u-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="app-meta">
|
<view class="app-meta">
|
||||||
<text class="app-name">{{ appName }}</text>
|
<text class="app-name">{{ appName }}</text>
|
||||||
@@ -60,6 +62,7 @@
|
|||||||
import CommonNavbar from "@/components/common-navbar/index";
|
import CommonNavbar from "@/components/common-navbar/index";
|
||||||
import app_upgrade from '@/uni_modules/app-upgrade/js_sdk/index.js';
|
import app_upgrade from '@/uni_modules/app-upgrade/js_sdk/index.js';
|
||||||
import config from '@/common/config.js';
|
import config from '@/common/config.js';
|
||||||
|
import { clearUserSession } from '@/common/userSession.js';
|
||||||
import manifest from '@/manifest.json';
|
import manifest from '@/manifest.json';
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
||||||
@@ -100,16 +103,17 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
logout() {
|
logout() {
|
||||||
this.$u.api.logout().then(res => {
|
const goLogin = () => {
|
||||||
this.$u.toast(res.msg);
|
clearUserSession();
|
||||||
if (res.code == '200' || res.code == '401') {
|
uni.reLaunch({
|
||||||
let self = this;
|
url: '/pages/sys/login/index'
|
||||||
setTimeout(() => {
|
});
|
||||||
uni.reLaunch({
|
};
|
||||||
url: '/pages/sys/login/index'
|
this.$u.api.pdaLogout().then(() => {
|
||||||
});
|
goLogin();
|
||||||
}, 500);
|
}).catch((error) => {
|
||||||
}
|
console.log('logout error', error);
|
||||||
|
goLogin();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
upgrade(){
|
upgrade(){
|
||||||
@@ -211,4 +215,9 @@ page {
|
|||||||
font-size: $pda-font-nav-sub;
|
font-size: $pda-font-nav-sub;
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
|
.logout-btn {
|
||||||
|
min-height: $pda-row-min-height;
|
||||||
|
font-size: $pda-font-body;
|
||||||
|
line-height: $pda-row-min-height;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+37
-20
@@ -33,7 +33,7 @@ export default {
|
|||||||
model: {
|
model: {
|
||||||
oldPassword: '',
|
oldPassword: '',
|
||||||
newPassword: '',
|
newPassword: '',
|
||||||
confirmNewPassword: ''
|
confirmPassword: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
oldPassword: [
|
oldPassword: [
|
||||||
@@ -79,26 +79,27 @@ export default {
|
|||||||
submit() {
|
submit() {
|
||||||
this.$refs.uForm.validate(valid => {
|
this.$refs.uForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$u.api.user.infoSavePwd({
|
this.$u.api.updatePassword({
|
||||||
oldPassword: this.model.oldPassword,
|
old_password: this.model.oldPassword,
|
||||||
newPassword: this.model.newPassword
|
new_password: this.model.newPassword
|
||||||
}).then(res => {
|
}).then(() => {
|
||||||
if(res.code == '200'){
|
const saved = uni.getStorageSync('UserInfo');
|
||||||
uni.showModal({
|
if (saved && typeof saved === 'object') {
|
||||||
title: '提示',
|
uni.setStorageSync('UserInfo', {
|
||||||
content: res.msg,
|
...saved,
|
||||||
showCancel: false,
|
password: this.model.newPassword
|
||||||
success: function () {
|
|
||||||
uni.navigateBack();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: res.msg,
|
|
||||||
showCancel: false
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '密码修改成功',
|
||||||
|
showCancel: false,
|
||||||
|
success: function () {
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}).catch((error) => {
|
||||||
|
console.log('updatePassword error', error);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$u.toast('您填写的信息有误,请根据提示修正。');
|
this.$u.toast('您填写的信息有误,请根据提示修正。');
|
||||||
@@ -112,15 +113,31 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@import '@/common/pda-typography.scss';
|
||||||
page{
|
page{
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
}
|
}
|
||||||
.u-form{
|
.u-form{
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 0px 15px;
|
padding: 0 30rpx;
|
||||||
}
|
}
|
||||||
.remind-text{
|
.remind-text{
|
||||||
padding: 20rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
font-size: $pda-font-popup-sub;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
.form-footer {
|
||||||
|
padding: 40rpx 30rpx;
|
||||||
|
}
|
||||||
|
::v-deep .u-form-item--left__content__label {
|
||||||
|
font-size: $pda-font-body;
|
||||||
|
}
|
||||||
|
::v-deep .u-input__input {
|
||||||
|
font-size: $pda-font-body;
|
||||||
|
}
|
||||||
|
::v-deep .u-btn {
|
||||||
|
height: $pda-button-height;
|
||||||
|
font-size: $pda-font-button;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -7,17 +7,12 @@
|
|||||||
<u-cell-item title="隐私政策" @click="navTo('')" :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-item title="用户协议" @click="navTo('')" :arrow="true"></u-cell-item>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
|
|
||||||
<view>
|
|
||||||
<u-button class="sign-out" @click="logout" :hair-line="false">退出登录</u-button>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
||||||
*/
|
*/
|
||||||
import { clearUserSession } from '@/common/userSession.js';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -49,20 +44,6 @@ export default {
|
|||||||
// #ifndef APP-PLUS
|
// #ifndef APP-PLUS
|
||||||
this.$u.toast('小程序端或H5端已是最新版,无需检查更新!');
|
this.$u.toast('小程序端或H5端已是最新版,无需检查更新!');
|
||||||
// #endif
|
// #endif
|
||||||
},
|
|
||||||
logout() {
|
|
||||||
const goLogin = () => {
|
|
||||||
clearUserSession();
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/sys/login/index'
|
|
||||||
});
|
|
||||||
};
|
|
||||||
this.$u.api.pdaLogout().then(() => {
|
|
||||||
goLogin();
|
|
||||||
}).catch(error => {
|
|
||||||
console.log('error',error)
|
|
||||||
goLogin();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user