|
@@ -19,6 +19,7 @@
|
|
|
>
|
|
|
<template #menu-left="{ size }">
|
|
|
<el-button type="primary" @click="scan">扫码导入</el-button>
|
|
|
+ <el-button type="primary" @click="test">测试数据</el-button>
|
|
|
</template>
|
|
|
<template #menu-right="{}">
|
|
|
<el-dropdown split-button v-hasPerm="['plan:order:import']"
|
|
@@ -224,6 +225,7 @@ import {
|
|
|
getExpandAlias,
|
|
|
scanImport,
|
|
|
getScanCode,
|
|
|
+ getTestCode,
|
|
|
} from "@/api/order";
|
|
|
import { ref } from "vue";
|
|
|
import _ from "lodash-es";
|
|
@@ -567,17 +569,23 @@ option.value = {
|
|
|
};
|
|
|
function useScanCode() {
|
|
|
const scanCodeArray = ref([]);
|
|
|
+ const test = async () => {
|
|
|
+ const { data, code } = await getTestCode();
|
|
|
+ let data1 = [];
|
|
|
+ data1.push(JSON.stringify(data[0]));
|
|
|
+ scanCodeArray.value = data1;
|
|
|
+ dialog3.visible = true;
|
|
|
+ };
|
|
|
const handleScanCode = async (id: string) => {
|
|
|
const { data, code } = await getScanCode(id);
|
|
|
let data1 = [];
|
|
|
data1.push(data[0]);
|
|
|
- data1.push(data[0]);
|
|
|
scanCodeArray.value = data1;
|
|
|
dialog3.visible = true;
|
|
|
};
|
|
|
- return { scanCodeArray, handleScanCode };
|
|
|
+ return { scanCodeArray, handleScanCode, test };
|
|
|
}
|
|
|
-const { scanCodeArray, handleScanCode } = useScanCode();
|
|
|
+const { scanCodeArray, handleScanCode, test } = useScanCode();
|
|
|
//扫码板块
|
|
|
|
|
|
function useScan() {
|