|
|
@@ -25822,53 +25822,54 @@ This will fail in production.`);
|
|
|
const ttsModule2 = vue.ref(null);
|
|
|
const searchText = vue.ref("");
|
|
|
const locationInfo = vue.ref({
|
|
|
- location: "K01-01-1A",
|
|
|
- logisticsNo: "DPK20232154221",
|
|
|
- orderNo: "7516531",
|
|
|
- goodsCount: "10",
|
|
|
+ location: "",
|
|
|
+ logisticsNo: "",
|
|
|
+ orderNo: "",
|
|
|
+ goodsCount: "",
|
|
|
remark: ""
|
|
|
});
|
|
|
- const badList = vue.ref([
|
|
|
- {
|
|
|
- image: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png",
|
|
|
- title: "公文写作教程",
|
|
|
- isbn: "978704051555",
|
|
|
- price: 49.5,
|
|
|
- discount: 0.85,
|
|
|
- quantity: 5,
|
|
|
- set: "不是",
|
|
|
- estimate: 4.11,
|
|
|
- review: 0,
|
|
|
- good: 0,
|
|
|
- average: 0,
|
|
|
- bad: 1,
|
|
|
- reason: "明显泛黄水印/发霉/明显异味"
|
|
|
- },
|
|
|
- {
|
|
|
- image: "https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png",
|
|
|
- title: "公文写作教程",
|
|
|
- isbn: "978704051555",
|
|
|
- price: 49.5,
|
|
|
- discount: 0.85,
|
|
|
- quantity: 5,
|
|
|
- set: "不是",
|
|
|
- estimate: 4.11,
|
|
|
- review: 0,
|
|
|
- good: 0,
|
|
|
- average: 0,
|
|
|
- bad: 1,
|
|
|
- reason: "明显泛黄水印/发霉/明显异味"
|
|
|
+ const badList = vue.ref([]);
|
|
|
+ onLoad((options) => {
|
|
|
+ if (options.searchText) {
|
|
|
+ searchText.value = options.searchText;
|
|
|
+ onSearch();
|
|
|
}
|
|
|
- ]);
|
|
|
- vue.onMounted(() => {
|
|
|
ttsModule2.value = new VolumeTTS();
|
|
|
});
|
|
|
- const onSearch = () => {
|
|
|
+ const getSearchType = (text) => {
|
|
|
+ return /^[0-9]+$/.test(text) ? 1 : 2;
|
|
|
+ };
|
|
|
+ const onSearch = async () => {
|
|
|
+ if (!searchText.value)
|
|
|
+ return;
|
|
|
+ try {
|
|
|
+ const searchType = getSearchType(searchText.value);
|
|
|
+ const { data } = await uni.$u.http.post("/app/stock/findOrderOutStock", {
|
|
|
+ search: searchText.value,
|
|
|
+ searchType
|
|
|
+ });
|
|
|
+ if (data) {
|
|
|
+ locationInfo.value = {
|
|
|
+ location: data.location || "",
|
|
|
+ logisticsNo: data.logisticsNo || "",
|
|
|
+ orderNo: data.orderNo || "",
|
|
|
+ goodsCount: data.goodsCount || "",
|
|
|
+ remark: data.remark || ""
|
|
|
+ };
|
|
|
+ badList.value = data.badList || [];
|
|
|
+ }
|
|
|
+ } catch (error2) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "获取数据失败",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
const openScan = () => {
|
|
|
uni.scanCode({
|
|
|
success: (res2) => {
|
|
|
searchText.value = res2.result;
|
|
|
+ onSearch();
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
uni.showToast({
|
|
|
@@ -25882,13 +25883,34 @@ This will fail in production.`);
|
|
|
uni.showModal({
|
|
|
title: "确认提示",
|
|
|
content: "是否确认出库?",
|
|
|
- success: (res2) => {
|
|
|
+ success: async (res2) => {
|
|
|
if (res2.confirm) {
|
|
|
- uni.showToast({
|
|
|
- title: "出库成功",
|
|
|
- icon: "success"
|
|
|
- });
|
|
|
- ttsModule2.value.speak("出库成功");
|
|
|
+ try {
|
|
|
+ await uni.$u.http.post("/app/stock/outStock", {
|
|
|
+ orderId: locationInfo.value.orderNo,
|
|
|
+ positionCode: locationInfo.value.location,
|
|
|
+ outputRemark: locationInfo.value.remark
|
|
|
+ });
|
|
|
+ uni.showToast({
|
|
|
+ title: "出库成功",
|
|
|
+ icon: "success"
|
|
|
+ });
|
|
|
+ ttsModule2.value.speak("出库成功");
|
|
|
+ searchText.value = "";
|
|
|
+ locationInfo.value = {
|
|
|
+ location: "",
|
|
|
+ logisticsNo: "",
|
|
|
+ orderNo: "",
|
|
|
+ goodsCount: "",
|
|
|
+ remark: ""
|
|
|
+ };
|
|
|
+ badList.value = [];
|
|
|
+ } catch (error2) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "出库失败",
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -25908,8 +25930,10 @@ This will fail in production.`);
|
|
|
currentEditIndex.value = -1;
|
|
|
currentRemark.value = "";
|
|
|
};
|
|
|
- const __returned__ = { ttsModule: ttsModule2, searchText, locationInfo, badList, onSearch, openScan, onConfirm, remarkVisible, currentRemark, currentEditIndex, openRemarkDialog, handleRemarkConfirm, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, RemarkDialog, get VolumeTTS() {
|
|
|
+ const __returned__ = { ttsModule: ttsModule2, searchText, locationInfo, badList, getSearchType, onSearch, openScan, onConfirm, remarkVisible, currentRemark, currentEditIndex, openRemarkDialog, handleRemarkConfirm, ref: vue.ref, onMounted: vue.onMounted, BadOutCard, RemarkDialog, get VolumeTTS() {
|
|
|
return VolumeTTS;
|
|
|
+ }, get onLoad() {
|
|
|
+ return onLoad;
|
|
|
} };
|
|
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
|
return __returned__;
|
|
|
@@ -30498,12 +30522,70 @@ This will fail in production.`);
|
|
|
__definePage("pages/order/stat/pending-audit", PagesOrderStatPendingAudit);
|
|
|
__definePage("pages/order/stat/pending-payment", PagesOrderStatPendingPayment);
|
|
|
__definePage("pages/order/stat/receive-stat", PagesOrderStatReceiveStat);
|
|
|
+ function useInit() {
|
|
|
+ var barcodeModel = requireNativePlugin("iData-BarcodePlugin-BarcodeModule");
|
|
|
+ barcodeModel.initScan((ret) => {
|
|
|
+ formatAppLog("log", "at utils/useBarcodeModule.js:9", "初始化扫描", ret);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function useGlobalEvent(onChange) {
|
|
|
+ var globalEvent = requireNativePlugin("globalEvent");
|
|
|
+ globalEvent.addEventListener("iDataBarcodeEvent", function(e) {
|
|
|
+ onChange && onChange(e);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function useGlobalEventRemove() {
|
|
|
+ var globalEvent = requireNativePlugin("globalEvent");
|
|
|
+ globalEvent.removeEventListener("iDataBarcodeEvent");
|
|
|
+ }
|
|
|
+ function useRouteMonitor(onChange) {
|
|
|
+ uni.addInterceptor("navigateTo", {
|
|
|
+ invoke(e) {
|
|
|
+ var _a;
|
|
|
+ const pages2 = getCurrentPages();
|
|
|
+ const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
|
|
|
+ onChange && onChange(e.url, from);
|
|
|
+ formatAppLog("log", "at utils/useRouteMonitor.js:18", "navigateTo", e.url, from);
|
|
|
+ return e;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ uni.addInterceptor("redirectTo", {
|
|
|
+ invoke(e) {
|
|
|
+ var _a;
|
|
|
+ const pages2 = getCurrentPages();
|
|
|
+ const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
|
|
|
+ onChange && onChange(e.url, from);
|
|
|
+ formatAppLog("log", "at utils/useRouteMonitor.js:28", "redirectTo", e.url, from);
|
|
|
+ return e;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ uni.addInterceptor("reLaunch", {
|
|
|
+ invoke(e) {
|
|
|
+ var _a;
|
|
|
+ const pages2 = getCurrentPages();
|
|
|
+ const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
|
|
|
+ onChange && onChange(e.url, from);
|
|
|
+ formatAppLog("log", "at utils/useRouteMonitor.js:38", "reLaunch", e.url, from);
|
|
|
+ return e;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ uni.addInterceptor("switchTab", {
|
|
|
+ invoke(e) {
|
|
|
+ var _a;
|
|
|
+ const pages2 = getCurrentPages();
|
|
|
+ const from = ((_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route) || "";
|
|
|
+ onChange && onChange(e.url, from);
|
|
|
+ formatAppLog("log", "at utils/useRouteMonitor.js:48", "switchTab", e.url, from);
|
|
|
+ return e;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
const _sfc_main = {
|
|
|
__name: "App",
|
|
|
setup(__props, { expose: __expose }) {
|
|
|
__expose();
|
|
|
onLaunch(() => {
|
|
|
- formatAppLog("log", "at App.vue:7", "App Launch");
|
|
|
+ formatAppLog("log", "at App.vue:10", "App Launch");
|
|
|
if (!store.token) {
|
|
|
let token = uni.getStorageSync("token");
|
|
|
if (token) {
|
|
|
@@ -30516,12 +30598,17 @@ This will fail in production.`);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ useInit();
|
|
|
});
|
|
|
onShow(() => {
|
|
|
- formatAppLog("log", "at App.vue:23", "App Show");
|
|
|
+ formatAppLog("log", "at App.vue:30", "App Show");
|
|
|
+ useRouteMonitor((url2, from) => {
|
|
|
+ formatAppLog("log", "at App.vue:34", "onShow", url2, from);
|
|
|
+ useGlobalEventRemove();
|
|
|
+ });
|
|
|
});
|
|
|
onHide(() => {
|
|
|
- formatAppLog("log", "at App.vue:26", "App Hide");
|
|
|
+ formatAppLog("log", "at App.vue:43", "App Hide");
|
|
|
});
|
|
|
const __returned__ = { get onLaunch() {
|
|
|
return onLaunch;
|
|
|
@@ -30531,6 +30618,12 @@ This will fail in production.`);
|
|
|
return onHide;
|
|
|
}, get store() {
|
|
|
return store;
|
|
|
+ }, get useGlobalEventRemove() {
|
|
|
+ return useGlobalEventRemove;
|
|
|
+ }, get useInit() {
|
|
|
+ return useInit;
|
|
|
+ }, get useRouteMonitor() {
|
|
|
+ return useRouteMonitor;
|
|
|
} };
|
|
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
|
return __returned__;
|
|
|
@@ -32143,19 +32236,6 @@ This will fail in production.`);
|
|
|
};
|
|
|
}
|
|
|
};
|
|
|
- requireNativePlugin("modal");
|
|
|
- function useInit() {
|
|
|
- var barcodeModel = requireNativePlugin("iData-BarcodePlugin-BarcodeModule");
|
|
|
- barcodeModel.initScan((ret) => {
|
|
|
- formatAppLog("log", "at utils/useBarcodeModule.js:10", "初始化扫描", ret);
|
|
|
- });
|
|
|
- }
|
|
|
- function useGlobalEvent(onChange) {
|
|
|
- var globalEvent = requireNativePlugin("globalEvent");
|
|
|
- globalEvent.addEventListener("iDataBarcodeEvent", function(e) {
|
|
|
- onChange && onChange(e);
|
|
|
- });
|
|
|
- }
|
|
|
let ttsModule = new VolumeTTS();
|
|
|
useInit();
|
|
|
uni.$u.ttsModule = ttsModule;
|