Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 00be3968f9 | |||
| 618666421e | |||
| 3185a66f8c | |||
| e23037fb23 | |||
| e6e37c13bd | |||
| 9d77a609b6 | |||
| 22adbc11bc | |||
| 979caffedd | |||
| de3e1f8177 | |||
| 2975f9692c | |||
| 00509601ba | |||
| 29fd5146e3 | |||
| 207baaf8a4 | |||
| da7f1f00dd |
@@ -27,3 +27,11 @@ const assemblySize = computed(() => globalStore.assemblySize);
|
||||
// element button config
|
||||
const buttonConfig = reactive({ autoInsertSpace: false });
|
||||
</script>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: MyCustomFont;
|
||||
font-style: normal; /* 字体样式 */
|
||||
font-weight: normal; /* 字体粗细 */
|
||||
src: url("./assets/font/FiraCode-Light.ttf") format("truetype");
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -116,17 +116,34 @@ class RequestHttp {
|
||||
location.href = usePathUrl();
|
||||
return Promise.reject(data);
|
||||
}
|
||||
|
||||
let statusStr = data.status + "";
|
||||
const STATUS_STRS = ["600006", "600002", "600003", "600001", "600004", "600005", "3433535", "40005"];
|
||||
const STATUS_STRS = [
|
||||
"600006",
|
||||
"600002",
|
||||
"600003",
|
||||
"600001",
|
||||
"600004",
|
||||
"600005",
|
||||
"3433535",
|
||||
"40005"
|
||||
// "70003",
|
||||
// "70001"
|
||||
];
|
||||
//单数70005
|
||||
const STATUS_STRS1 = ["70005", "70004", "70003"];
|
||||
if (statusStr.length > 3 && STATUS_STRS1.includes(statusStr)) {
|
||||
console.log("走到了这里");
|
||||
return data;
|
||||
// return Promise.reject(data);
|
||||
}
|
||||
if (statusStr.length > 3 && !STATUS_STRS.includes(statusStr)) {
|
||||
console.log("32121");
|
||||
ElMessage.error(data.msg || data.message);
|
||||
return Promise.reject(data);
|
||||
}
|
||||
if (data.status === 504) {
|
||||
ElMessage.error("请求超时!请您稍后重试");
|
||||
}
|
||||
|
||||
// 全局错误信息拦截(防止下载文件的时候返回数据流,没有 code 直接报错)
|
||||
if (data.code && data.code !== ResultEnum.SUCCESS) {
|
||||
ElMessage.error(data.msg);
|
||||
@@ -144,7 +161,6 @@ class RequestHttp {
|
||||
const { response } = error;
|
||||
|
||||
tryHideFullScreenLoading();
|
||||
|
||||
// 请求超时 && 网络错误单独判断,没有 response
|
||||
if (error.message.indexOf("timeout") !== -1) ElMessage.error("请求超时!请您稍后重试");
|
||||
if (error.message.indexOf("Network Error") !== -1) ElMessage.error("网络错误!请您稍后重试");
|
||||
|
||||
@@ -37,65 +37,30 @@ export const getListApi = (params: Record<string, any>) => {
|
||||
};
|
||||
//产品条码列表
|
||||
export const getCodeListApi = (params: Record<string, any>) => {
|
||||
// console.log(params);
|
||||
// return {
|
||||
// totalCount: 300,
|
||||
// data: [
|
||||
// {
|
||||
// materialNumber: "G01-43-552867",
|
||||
// materialName: "7口USB3.0集线器",
|
||||
// specifications: "ORICO-H7013-U3-AD-EU-BK-BP",
|
||||
// old_Specifications: "",
|
||||
// barCode: "6936761881968",
|
||||
// serialNumber: "10FC-616M3R",
|
||||
// twoSerialNumber: "10FC-616M3R-two",
|
||||
// numberCode: "241224000417",
|
||||
// id: 202593401,
|
||||
// number: 300,
|
||||
// isUse: false,
|
||||
// isUseStr: "否",
|
||||
// box: "",
|
||||
// creator: "admin",
|
||||
// createTime: "2024-12-24 10:27:05",
|
||||
// printNumber: 0,
|
||||
// downLoadNumber: 1,
|
||||
// printTime: "",
|
||||
// downLoadTime: "2025-01-08 16:11:39",
|
||||
// isEnablePrint: true
|
||||
// },
|
||||
// {
|
||||
// materialNumber: "G01-43-552867",
|
||||
// materialName: "7口USB3.0集线器",
|
||||
// specifications: "ORICO-H7013-U3-AD-EU-BK-BP",
|
||||
// old_Specifications: "",
|
||||
// barCode: "6936761881968",
|
||||
// serialNumber: "10FC-616M3Q",
|
||||
// twoSerialNumber: "10FC-616M3R-two",
|
||||
// numberCode: "241224000416",
|
||||
// id: 202593400,
|
||||
// number: 300,
|
||||
// isUse: false,
|
||||
// isUseStr: "否",
|
||||
// box: "",
|
||||
// creator: "admin",
|
||||
// createTime: "2024-12-24 10:27:05",
|
||||
// printNumber: 0,
|
||||
// downLoadNumber: 1,
|
||||
// printTime: "",
|
||||
// downLoadTime: "2025-01-08 16:11:39",
|
||||
// isEnablePrint: true
|
||||
// }
|
||||
// ],
|
||||
// isSuccess: true,
|
||||
// status: 200,
|
||||
// message: "Success"
|
||||
// };
|
||||
return http.post<ResPage<any>>(`SerialNumber/GetList`, params);
|
||||
const { isDownLoad } = params;
|
||||
return http.post<ResPage<any>>(`SerialNumber/GetList`, params, {
|
||||
noLoading: isDownLoad
|
||||
});
|
||||
};
|
||||
|
||||
// export const getCodeList1Api = (params: Record<string, any>) => {
|
||||
// return http.post<ResPage<any>>(`SerialNumber/GetList`, params, {
|
||||
// noLoading: true
|
||||
// });
|
||||
// };
|
||||
|
||||
//转换规格型号 SerialNumber/UpdateMaterial
|
||||
export const getUpdateMaterialApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/UpdateMaterial`, params);
|
||||
};
|
||||
//2件装转换
|
||||
export const getTransferSnApi = (params: Record<string, any>) => {
|
||||
return http.post<any>(`SerialNumber/TransferSn`, params);
|
||||
};
|
||||
//2件装检测
|
||||
export const getTransferSnJCApi = (params: Record<string, any>) => {
|
||||
return http.post<any>(`SerialNumber/VerifSn`, params);
|
||||
};
|
||||
//产品条码列表下载
|
||||
export const getSerialNumberDownLoadApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/Export`, params);
|
||||
|
||||
BIN
src/assets/font/FiraCode-Light.ttf
Normal file
BIN
src/assets/font/FiraCode-Light.ttf
Normal file
Binary file not shown.
BIN
src/assets/font/FiraCode-Medium.ttf
Normal file
BIN
src/assets/font/FiraCode-Medium.ttf
Normal file
Binary file not shown.
117
src/auto-import.d.ts
vendored
117
src/auto-import.d.ts
vendored
@@ -4,66 +4,67 @@
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||
const defineComponent: typeof import('vue')['defineComponent']
|
||||
const effectScope: typeof import('vue')['effectScope']
|
||||
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||
const h: typeof import('vue')['h']
|
||||
const inject: typeof import('vue')['inject']
|
||||
const isProxy: typeof import('vue')['isProxy']
|
||||
const isReactive: typeof import('vue')['isReactive']
|
||||
const isReadonly: typeof import('vue')['isReadonly']
|
||||
const isRef: typeof import('vue')['isRef']
|
||||
const markRaw: typeof import('vue')['markRaw']
|
||||
const nextTick: typeof import('vue')['nextTick']
|
||||
const onActivated: typeof import('vue')['onActivated']
|
||||
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
|
||||
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
|
||||
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||
const onMounted: typeof import('vue')['onMounted']
|
||||
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||
const onUpdated: typeof import('vue')['onUpdated']
|
||||
const provide: typeof import('vue')['provide']
|
||||
const reactive: typeof import('vue')['reactive']
|
||||
const readonly: typeof import('vue')['readonly']
|
||||
const ref: typeof import('vue')['ref']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||
const shallowRef: typeof import('vue')['shallowRef']
|
||||
const toRaw: typeof import('vue')['toRaw']
|
||||
const toRef: typeof import('vue')['toRef']
|
||||
const toRefs: typeof import('vue')['toRefs']
|
||||
const toValue: typeof import('vue')['toValue']
|
||||
const triggerRef: typeof import('vue')['triggerRef']
|
||||
const unref: typeof import('vue')['unref']
|
||||
const useAttrs: typeof import('vue')['useAttrs']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useLink: typeof import('vue-router')['useLink']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
const useRouter: typeof import('vue-router')['useRouter']
|
||||
const useSlots: typeof import('vue')['useSlots']
|
||||
const watch: typeof import('vue')['watch']
|
||||
const watchEffect: typeof import('vue')['watchEffect']
|
||||
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||
const EffectScope: typeof import("vue")["EffectScope"];
|
||||
const ElMessage: typeof import("element-plus/es")["ElMessage"];
|
||||
const computed: typeof import("vue")["computed"];
|
||||
const createApp: typeof import("vue")["createApp"];
|
||||
const customRef: typeof import("vue")["customRef"];
|
||||
const defineAsyncComponent: typeof import("vue")["defineAsyncComponent"];
|
||||
const defineComponent: typeof import("vue")["defineComponent"];
|
||||
const effectScope: typeof import("vue")["effectScope"];
|
||||
const getCurrentInstance: typeof import("vue")["getCurrentInstance"];
|
||||
const getCurrentScope: typeof import("vue")["getCurrentScope"];
|
||||
const h: typeof import("vue")["h"];
|
||||
const inject: typeof import("vue")["inject"];
|
||||
const isProxy: typeof import("vue")["isProxy"];
|
||||
const isReactive: typeof import("vue")["isReactive"];
|
||||
const isReadonly: typeof import("vue")["isReadonly"];
|
||||
const isRef: typeof import("vue")["isRef"];
|
||||
const markRaw: typeof import("vue")["markRaw"];
|
||||
const nextTick: typeof import("vue")["nextTick"];
|
||||
const onActivated: typeof import("vue")["onActivated"];
|
||||
const onBeforeMount: typeof import("vue")["onBeforeMount"];
|
||||
const onBeforeRouteLeave: typeof import("vue-router")["onBeforeRouteLeave"];
|
||||
const onBeforeRouteUpdate: typeof import("vue-router")["onBeforeRouteUpdate"];
|
||||
const onBeforeUnmount: typeof import("vue")["onBeforeUnmount"];
|
||||
const onBeforeUpdate: typeof import("vue")["onBeforeUpdate"];
|
||||
const onDeactivated: typeof import("vue")["onDeactivated"];
|
||||
const onErrorCaptured: typeof import("vue")["onErrorCaptured"];
|
||||
const onMounted: typeof import("vue")["onMounted"];
|
||||
const onRenderTracked: typeof import("vue")["onRenderTracked"];
|
||||
const onRenderTriggered: typeof import("vue")["onRenderTriggered"];
|
||||
const onScopeDispose: typeof import("vue")["onScopeDispose"];
|
||||
const onServerPrefetch: typeof import("vue")["onServerPrefetch"];
|
||||
const onUnmounted: typeof import("vue")["onUnmounted"];
|
||||
const onUpdated: typeof import("vue")["onUpdated"];
|
||||
const provide: typeof import("vue")["provide"];
|
||||
const reactive: typeof import("vue")["reactive"];
|
||||
const readonly: typeof import("vue")["readonly"];
|
||||
const ref: typeof import("vue")["ref"];
|
||||
const resolveComponent: typeof import("vue")["resolveComponent"];
|
||||
const shallowReactive: typeof import("vue")["shallowReactive"];
|
||||
const shallowReadonly: typeof import("vue")["shallowReadonly"];
|
||||
const shallowRef: typeof import("vue")["shallowRef"];
|
||||
const toRaw: typeof import("vue")["toRaw"];
|
||||
const toRef: typeof import("vue")["toRef"];
|
||||
const toRefs: typeof import("vue")["toRefs"];
|
||||
const toValue: typeof import("vue")["toValue"];
|
||||
const triggerRef: typeof import("vue")["triggerRef"];
|
||||
const unref: typeof import("vue")["unref"];
|
||||
const useAttrs: typeof import("vue")["useAttrs"];
|
||||
const useCssModule: typeof import("vue")["useCssModule"];
|
||||
const useCssVars: typeof import("vue")["useCssVars"];
|
||||
const useLink: typeof import("vue-router")["useLink"];
|
||||
const useRoute: typeof import("vue-router")["useRoute"];
|
||||
const useRouter: typeof import("vue-router")["useRouter"];
|
||||
const useSlots: typeof import("vue")["useSlots"];
|
||||
const watch: typeof import("vue")["watch"];
|
||||
const watchEffect: typeof import("vue")["watchEffect"];
|
||||
const watchPostEffect: typeof import("vue")["watchPostEffect"];
|
||||
const watchSyncEffect: typeof import("vue")["watchSyncEffect"];
|
||||
}
|
||||
// for type re-export
|
||||
declare global {
|
||||
// @ts-ignore
|
||||
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
|
||||
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from "vue";
|
||||
}
|
||||
|
||||
131
src/components.d.ts
vendored
131
src/components.d.ts
vendored
@@ -5,54 +5,89 @@
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
export {}
|
||||
|
||||
declare module 'vue' {
|
||||
declare module "vue" {
|
||||
export interface GlobalComponents {
|
||||
ElAside: typeof import('element-plus/es')['ElAside']
|
||||
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
|
||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElContainer: typeof import('element-plus/es')['ElContainer']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
||||
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElMain: typeof import('element-plus/es')['ElMain']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
IEpArrowDown: typeof import('~icons/ep/arrow-down')['default']
|
||||
IEpCircleClose: typeof import('~icons/ep/circle-close')['default']
|
||||
IEpFolderDelete: typeof import('~icons/ep/folder-delete')['default']
|
||||
IEpFullScreen: typeof import('~icons/ep/full-screen')['default']
|
||||
IEpRefresh: typeof import('~icons/ep/refresh')['default']
|
||||
IEpRemove: typeof import('~icons/ep/remove')['default']
|
||||
IEpSearch: typeof import('~icons/ep/search')['default']
|
||||
IEpSwitchButton: typeof import('~icons/ep/switch-button')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
403: typeof import("./components/ErrorMessage/403.vue")["default"];
|
||||
404: typeof import("./components/ErrorMessage/404.vue")["default"];
|
||||
500: typeof import("./components/ErrorMessage/500.vue")["default"];
|
||||
Add: typeof import("./components/DetailsBtns/components/Add.vue")["default"];
|
||||
ColSetting: typeof import("./components/ProTable/components/ColSetting.vue")["default"];
|
||||
Convert: typeof import("./components/ListBtns/components/Convert.vue")["default"];
|
||||
Del: typeof import("./components/ListBtns/components/Del.vue")["default"];
|
||||
DetailsBtns: typeof import("./components/DetailsBtns/index.vue")["default"];
|
||||
DetailsSearch: typeof import("./components/DetailsSearch/index.vue")["default"];
|
||||
Download: typeof import("./components/ListBtns/components/download.vue")["default"];
|
||||
ElAside: typeof import("element-plus/es")["ElAside"];
|
||||
ElAutocomplete: typeof import("element-plus/es")["ElAutocomplete"];
|
||||
ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"];
|
||||
ElBreadcrumbItem: typeof import("element-plus/es")["ElBreadcrumbItem"];
|
||||
ElButton: typeof import("element-plus/es")["ElButton"];
|
||||
ElCheckbox: typeof import("element-plus/es")["ElCheckbox"];
|
||||
ElContainer: typeof import("element-plus/es")["ElContainer"];
|
||||
ElDatePicker: typeof import("element-plus/es")["ElDatePicker"];
|
||||
ElDialog: typeof import("element-plus/es")["ElDialog"];
|
||||
ElDivider: typeof import("element-plus/es")["ElDivider"];
|
||||
ElDrawer: typeof import("element-plus/es")["ElDrawer"];
|
||||
ElDropdown: typeof import("element-plus/es")["ElDropdown"];
|
||||
ElDropdownItem: typeof import("element-plus/es")["ElDropdownItem"];
|
||||
ElDropdownMenu: typeof import("element-plus/es")["ElDropdownMenu"];
|
||||
ElForm: typeof import("element-plus/es")["ElForm"];
|
||||
ElFormItem: typeof import("element-plus/es")["ElFormItem"];
|
||||
ElHeader: typeof import("element-plus/es")["ElHeader"];
|
||||
ElIcon: typeof import("element-plus/es")["ElIcon"];
|
||||
ElInput: typeof import("element-plus/es")["ElInput"];
|
||||
ElInputNumber: typeof import("element-plus/es")["ElInputNumber"];
|
||||
ElMain: typeof import("element-plus/es")["ElMain"];
|
||||
ElMenu: typeof import("element-plus/es")["ElMenu"];
|
||||
ElMenuItem: typeof import("element-plus/es")["ElMenuItem"];
|
||||
ElOption: typeof import("element-plus/es")["ElOption"];
|
||||
ElPagination: typeof import("element-plus/es")["ElPagination"];
|
||||
ElProgress: typeof import("element-plus/es")["ElProgress"];
|
||||
ElScrollbar: typeof import("element-plus/es")["ElScrollbar"];
|
||||
ElSelect: typeof import("element-plus/es")["ElSelect"];
|
||||
ElSubMenu: typeof import("element-plus/es")["ElSubMenu"];
|
||||
ElSwitch: typeof import("element-plus/es")["ElSwitch"];
|
||||
ElTable: typeof import("element-plus/es")["ElTable"];
|
||||
ElTableColumn: typeof import("element-plus/es")["ElTableColumn"];
|
||||
ElTabPane: typeof import("element-plus/es")["ElTabPane"];
|
||||
ElTabs: typeof import("element-plus/es")["ElTabs"];
|
||||
ElTag: typeof import("element-plus/es")["ElTag"];
|
||||
ElTooltip: typeof import("element-plus/es")["ElTooltip"];
|
||||
ElUpload: typeof import("element-plus/es")["ElUpload"];
|
||||
Empty: typeof import("./components/ProTable/components/Empty.vue")["default"];
|
||||
Form: typeof import("./components/Form/index.vue")["default"];
|
||||
FormItem: typeof import("./components/Form/components/FormItem.vue")["default"];
|
||||
FormTable: typeof import("./components/FormTable/index.vue")["default"];
|
||||
Generate: typeof import("./components/DetailsBtns/components/Generate.vue")["default"];
|
||||
GenerateBox: typeof import("./components/ListBtns/components/GenerateBox.vue")["default"];
|
||||
Generates: typeof import("./components/ListBtns/components/Generates.vue")["default"];
|
||||
Grid: typeof import("./components/Grid/index.vue")["default"];
|
||||
GridItem: typeof import("./components/Grid/components/GridItem.vue")["default"];
|
||||
IEpArrowDown: typeof import("~icons/ep/arrow-down")["default"];
|
||||
IEpCircleClose: typeof import("~icons/ep/circle-close")["default"];
|
||||
IEpFolderDelete: typeof import("~icons/ep/folder-delete")["default"];
|
||||
IEpFullScreen: typeof import("~icons/ep/full-screen")["default"];
|
||||
IEpRefresh: typeof import("~icons/ep/refresh")["default"];
|
||||
IEpRemove: typeof import("~icons/ep/remove")["default"];
|
||||
IEpSearch: typeof import("~icons/ep/search")["default"];
|
||||
IEpSwitchButton: typeof import("~icons/ep/switch-button")["default"];
|
||||
ImportExcel: typeof import("./components/ImportExcel/index.vue")["default"];
|
||||
ListBtns: typeof import("./components/ListBtns/index.vue")["default"];
|
||||
ListResultDig: typeof import("./components/ListResultDig/index.vue")["default"];
|
||||
Loading: typeof import("./components/Loading/index.vue")["default"];
|
||||
NumberCode: typeof import("./components/DetailsBtns/components/numberCode.vue")["default"];
|
||||
PackingBox: typeof import("./components/ListBtns/components/PackingBox.vue")["default"];
|
||||
Pagination: typeof import("./components/ProTable/components/Pagination.vue")["default"];
|
||||
Print: typeof import("./components/DetailsBtns/components/Print.vue")["default"];
|
||||
PrintBox: typeof import("./components/ListBtns/components/PrintBox.vue")["default"];
|
||||
ProTable: typeof import("./components/ProTable/index.vue")["default"];
|
||||
Refresh: typeof import("./components/ListBtns/components/Refresh.vue")["default"];
|
||||
RefreshBox: typeof import("./components/ListBtns/components/RefreshBox.vue")["default"];
|
||||
RouterLink: typeof import("vue-router")["RouterLink"];
|
||||
RouterView: typeof import("vue-router")["RouterView"];
|
||||
SearchForm: typeof import("./components/SearchForm/index.vue")["default"];
|
||||
SearchFormItem: typeof import("./components/SearchForm/components/SearchFormItem.vue")["default"];
|
||||
Switch: typeof import("./components/DetailsBtns/components/Switch.vue")["default"];
|
||||
TableColumn: typeof import("./components/ProTable/components/TableColumn.vue")["default"];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ import { ElTable, ElTableColumn } from "element-plus";
|
||||
import { QuestionFilled } from "@element-plus/icons-vue";
|
||||
const props = defineProps<{
|
||||
columns: any;
|
||||
rowStyle?: (params: any) => void;
|
||||
rowStyle?: any;
|
||||
isStatus?: boolean;
|
||||
tableData?: any;
|
||||
height?: number;
|
||||
|
||||
171
src/components/ListBtns/components/Convert.vue
Normal file
171
src/components/ListBtns/components/Convert.vue
Normal file
@@ -0,0 +1,171 @@
|
||||
<template>
|
||||
<div class="common-btn-box font12" @click="handleBtnClick()">
|
||||
<span>转两件装</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ElMessageBox } from "element-plus";
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
import { getTransferSnApi, getTransferSnJCApi } from "@/api/modules/barCode";
|
||||
// const $router = useRouter();
|
||||
import { WarningFilled } from "@element-plus/icons-vue";
|
||||
const props: any = defineProps<{
|
||||
selectionList?: any[];
|
||||
handleChildBtnCallback?: () => void;
|
||||
ruleForm: any;
|
||||
}>();
|
||||
const emits = defineEmits<{
|
||||
(e: "handleChildBtnCallback", result: Record<string, any>): void;
|
||||
}>();
|
||||
|
||||
const getTransferSn = (ids: any) => {
|
||||
ElMessageBox.confirm("确定数据转换为两件装, 一旦转换不可回退!", "温馨提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(async () => {
|
||||
const result: any = await getTransferSnApi({ ids: ids });
|
||||
if (result.status === 200) {
|
||||
useMsg("success", "操作成功 !");
|
||||
emits("handleChildBtnCallback", {
|
||||
type: "Convert"
|
||||
});
|
||||
} else {
|
||||
useMsg("error", result.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
//防止xss攻击
|
||||
// const escapeHtml = (unsafe: any) => {
|
||||
// return unsafe
|
||||
// .replace(/&/g, "&")
|
||||
// .replace(/</g, "<")
|
||||
// .replace(/>/g, ">")
|
||||
// .replace(/"/g, """)
|
||||
// .replace(/'/g, "'");
|
||||
// };
|
||||
// 提交事件
|
||||
const handleBtnClick = async () => {
|
||||
if (!props.selectionList.length) {
|
||||
useMsg("warning", `请选择需要转换的数据 !`);
|
||||
return;
|
||||
}
|
||||
if (props.selectionList.length > 50) {
|
||||
useMsg("warning", `请选择50条以内的数据进行转换 !`);
|
||||
return;
|
||||
}
|
||||
// let isSome = props.selectionList.filter((item: any) => {
|
||||
// return item.useNumber;
|
||||
// });
|
||||
// let isNumber = props.selectionList.filter((item: any) => {
|
||||
// return item.number % 2 === 1;
|
||||
// });
|
||||
// let specificationsArr: any = [];
|
||||
// let specificationsArr1: any = [];
|
||||
// //多种条件
|
||||
// if (isSome.length && isNumber.length) {
|
||||
// //单个
|
||||
// isSome.forEach((item: any) => {
|
||||
// specificationsArr.push(item.specifications);
|
||||
// });
|
||||
// specificationsArr = [...new Set(specificationsArr)];
|
||||
// let specifications = specificationsArr.join(",");
|
||||
|
||||
// //单数
|
||||
// isNumber.forEach((item: any) => {
|
||||
// specificationsArr1.push(item.specifications);
|
||||
// });
|
||||
// specificationsArr = [...new Set(specificationsArr1)];
|
||||
// let specifications1 = specificationsArr1.join(",");
|
||||
// // useMsg("warning", `${specifications1}条码个数为单数, 不支持转两件装 !`);
|
||||
// useMsg(
|
||||
// "warning",
|
||||
// `${specifications}序列码存在已使用, 请选择未使用序列码的数据; ${specifications1}条码个数为单数, 不支持转两件装 !`
|
||||
// );
|
||||
// return;
|
||||
// }
|
||||
// //单个使用
|
||||
// if (isSome.length) {
|
||||
// isSome.forEach((item: any) => {
|
||||
// specificationsArr.push(item.specifications);
|
||||
// });
|
||||
// specificationsArr = [...new Set(specificationsArr)];
|
||||
// let specifications = specificationsArr.join(",");
|
||||
// useMsg("warning", `${specifications}序列码存在已使用, 请选择未使用序列码的数据 !`);
|
||||
// return;
|
||||
// }
|
||||
// //单数转换
|
||||
// if (isNumber.length) {
|
||||
// isNumber.forEach((item: any) => {
|
||||
// specificationsArr1.push(item.specifications);
|
||||
// });
|
||||
// specificationsArr1 = [...new Set(specificationsArr1)];
|
||||
// let specifications1 = specificationsArr1.join(",");
|
||||
// useMsg("warning", `${specifications1}条码个数为单数, 不支持转两件装 !`);
|
||||
// // return;
|
||||
// }
|
||||
|
||||
let ids: any[] = [];
|
||||
props.selectionList.forEach((item: any) => {
|
||||
//只传一件装数量不为0的
|
||||
if (item.isTwo === 1 && item.number) {
|
||||
ids.push({
|
||||
id: item.id,
|
||||
specifications: item.specifications
|
||||
});
|
||||
}
|
||||
});
|
||||
const result: any = await getTransferSnJCApi({ ids: ids });
|
||||
if (result.status === 200) {
|
||||
getTransferSn(ids);
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
dangerouslyUseHTMLString: true,
|
||||
message: `<div style="line-height:1.5;max-width:800px;max-height: 800px;
|
||||
overflow-y: auto; color:red">${result.msg || result.message}</div>`,
|
||||
|
||||
icon: WarningFilled,
|
||||
customClass: "custom-message-error"
|
||||
// type: "error"
|
||||
// duration: 100000
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "../index.scss";
|
||||
.custom-message-error {
|
||||
// color: red;
|
||||
background: var(--el-color-error-light-9) !important;
|
||||
border-color: var(--el-color-error-light-8) !important;
|
||||
}
|
||||
.custom-message-error > .el-message-icon--info {
|
||||
color: red;
|
||||
}
|
||||
|
||||
// .custom-message-error > .el-message__closeBtn {
|
||||
// color: #ffffff;
|
||||
// }
|
||||
|
||||
// .el-message {
|
||||
// width: 800px;
|
||||
// height: 800px;
|
||||
// overflow-y: auto;
|
||||
// }
|
||||
// .custom-message-error > i {
|
||||
// color: red !important;
|
||||
|
||||
// // background-color: var(--el-color-error-light-9) !important;
|
||||
// // border-color: var(--el-color-error-light-8) !important;
|
||||
|
||||
// // -el-message-bg-color: var(--el-color-error-light-9);
|
||||
|
||||
// // --el-message-border-color: var(--el-color-error-light-8);
|
||||
// // --el-message-text-color: var(--el-color-error);
|
||||
// }
|
||||
</style>
|
||||
@@ -33,11 +33,28 @@ const handleBtnClick = async () => {
|
||||
useMsg("warning", "请选择要下载的数据 !");
|
||||
return;
|
||||
}
|
||||
|
||||
let isTwo1 = props.selectionList.some((item: any) => {
|
||||
return item.isTwo == 1;
|
||||
});
|
||||
let isTwo2 = props.selectionList.some((item: any) => {
|
||||
return item.isTwo == 2;
|
||||
});
|
||||
|
||||
if (isTwo1 && isTwo2) {
|
||||
useMsg("warning", "数据含有单件装和两件装条码, 请分开选择数据进行下载 !");
|
||||
return;
|
||||
}
|
||||
|
||||
let isTwo = props.selectionList[0].isTwo;
|
||||
props.selectionList.forEach((item: any) => {
|
||||
ids.push(item.id);
|
||||
});
|
||||
|
||||
const result = await operationButtonsApi(URLS[name.value], { ids });
|
||||
let params: any = {
|
||||
antiCode: { ids },
|
||||
barCode: { ids, isTwo }
|
||||
};
|
||||
const result = await operationButtonsApi(URLS[name.value], params[name.value]);
|
||||
if (result.status === 200 && result.isSuccess) {
|
||||
useMsg("success", "导出成功请前往导出列表中进行下载 !");
|
||||
} else {
|
||||
|
||||
@@ -13,6 +13,7 @@ import PackingBox from "../components/PackingBox.vue";
|
||||
import PrintBox from "../components/PrintBox.vue";
|
||||
import RefreshBox from "../components/RefreshBox.vue";
|
||||
import Generates from "../components/Generates.vue";
|
||||
import Convert from "../components/Convert.vue";
|
||||
// const BTNS =[]
|
||||
|
||||
// 路由跳转映射表
|
||||
@@ -44,16 +45,20 @@ export const BTNS_ROUTE = (routeName: any) => {
|
||||
if (SHOW_BTBS[key][i] === "barCodeGenerate" && routeName === "barCode") {
|
||||
btnsCom[key].push(Generate);
|
||||
}
|
||||
|
||||
if (SHOW_BTBS[key][i] === "barCodeGenerates" && routeName === "barCode") {
|
||||
btnsCom[key].push(Generates);
|
||||
}
|
||||
if (SHOW_BTBS[key][i] === "barCodeRefresh" && routeName === "barCode") {
|
||||
btnsCom[key].push(Refresh);
|
||||
}
|
||||
|
||||
if (SHOW_BTBS[key][i] === "barCodedownload" && routeName === "barCode") {
|
||||
btnsCom[key].push(download);
|
||||
}
|
||||
//两件装
|
||||
if (routeName === "barCode" && SHOW_BTBS[key][i] === "barCodeConvert") {
|
||||
btnsCom[key].push(Convert);
|
||||
}
|
||||
if (SHOW_BTBS[key][i] === "boxMarkAdd") {
|
||||
btnsCom[key].push(Add);
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ const options = [
|
||||
const props = defineProps<SearchFormItem>();
|
||||
const _searchParam = computed(() => props.searchParam);
|
||||
|
||||
if (routeName.value === "boxCode" || routeName.value === "barCode") {
|
||||
if (routeName.value === "boxCode" || routeName.value === "barCode" || routeName.value === "antiCode") {
|
||||
_searchParam.value.createUser = userStore.userInfo.nickname;
|
||||
}
|
||||
if (routeName.value === "boxMarkIndex") {
|
||||
@@ -345,6 +345,12 @@ const handleInput = (item: any) => {
|
||||
createUser: _searchParam.value["createUser"]
|
||||
});
|
||||
}
|
||||
if (routeName.value === "antiCode" && item.prop === "createUser") {
|
||||
$Bus.emit("setAntiCodeInputCreateUser", {
|
||||
createUser: _searchParam.value["createUser"]
|
||||
});
|
||||
}
|
||||
|
||||
if (routeName.value === "boxMarkIndex" && item.prop === "creator") {
|
||||
$Bus.emit("setBoxMarkIndexInputCreateUser", {
|
||||
creator: _searchParam.value["creator"]
|
||||
@@ -374,6 +380,9 @@ const handleEmitClear = (item: any) => {
|
||||
if (routeName.value === "boxMarkIndex") {
|
||||
$Bus.emit("clearBoxMarkIndexCreator");
|
||||
}
|
||||
if (routeName.value === "antiCode") {
|
||||
$Bus.emit("clearBoxMarkIndexCreator");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scope>
|
||||
|
||||
3
src/hooks/useHtmlMsg.vue
Normal file
3
src/hooks/useHtmlMsg.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ElMessage } from "element-plus"; export const useMsg = (type: any = "success", msg: string, duration?: number,
|
||||
showClose?: boolean) => { ElMessage({ showClose: showClose ? showClose : false, message: msg, type: type, duration: duration ?
|
||||
duration : 3000 }); };
|
||||
@@ -62,6 +62,9 @@ export const useTable = (
|
||||
try {
|
||||
// 先把初始化参数和分页参数放到总参数里面 initParam
|
||||
Object.assign(state.totalParam, isPageable ? pageParam.value : {});
|
||||
// console.log(state.searchInitParam, "=========state.searchInitParam===");
|
||||
// console.log(initParam, "=========initParam===");
|
||||
|
||||
let { data, totalCount } = await api({ ...state.searchInitParam, ...initParam, ...state.totalParam });
|
||||
state.tableData = data;
|
||||
|
||||
@@ -91,6 +94,7 @@ export const useTable = (
|
||||
// 处理查询参数,可以给查询参数加自定义前缀操作
|
||||
let nowSearchParam: Table.StateProps["searchParam"] = {};
|
||||
// 防止手动清空输入框携带参数(这里可以自定义查询参数前缀)
|
||||
|
||||
for (let key in state.searchParam) {
|
||||
//剔除日期参数
|
||||
if (key !== "Time" && key !== "Time1") {
|
||||
@@ -120,6 +124,10 @@ export const useTable = (
|
||||
const search = () => {
|
||||
state.pageable.pageNo = 1;
|
||||
state.pageable.pageSize = 50;
|
||||
if (routeName === "barCode") {
|
||||
$Bus.emit("searchBarCodeSsDownLoad");
|
||||
}
|
||||
|
||||
updatedTotalParam();
|
||||
getTableList();
|
||||
};
|
||||
@@ -135,7 +143,7 @@ export const useTable = (
|
||||
Object.keys(state.searchInitParam).forEach(key => {
|
||||
state.searchParam[key] = state.searchInitParam[key];
|
||||
});
|
||||
|
||||
console.log(routeName, "=routeName=");
|
||||
if (routeName === "barCode") {
|
||||
$Bus.emit("clearBarCodeCreateUser");
|
||||
}
|
||||
@@ -145,6 +153,9 @@ export const useTable = (
|
||||
if (routeName === "boxMarkIndex") {
|
||||
$Bus.emit("clearBoxMarkIndexCreator");
|
||||
}
|
||||
if (routeName === "antiCode") {
|
||||
$Bus.emit("clearBoxAntiCodeCreator");
|
||||
}
|
||||
updatedTotalParam();
|
||||
getTableList();
|
||||
};
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
z-index: 2058 !important;
|
||||
}
|
||||
|
||||
// .el-message {
|
||||
// width: 800px;
|
||||
// height: 800px;
|
||||
// overflow-y: auto;
|
||||
// }
|
||||
|
||||
// .el-message,
|
||||
// .el-message--info {
|
||||
// color: red !important;
|
||||
|
||||
@@ -56,6 +56,7 @@ function printLeftContent(item, code69Img) {
|
||||
if (specifications) {
|
||||
LODOP.ADD_PRINT_TEXT(4, 15, "100%", 10, specifications);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
}
|
||||
//SN码和底部文字
|
||||
if (numberCode && numberCode !== " ") {
|
||||
@@ -87,6 +88,7 @@ function printRightContent(item, code69Img) {
|
||||
if (specifications) {
|
||||
LODOP.ADD_PRINT_TEXT(4, 177, "100%", 10, specifications);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
}
|
||||
|
||||
//SN码和底部文字
|
||||
@@ -98,5 +100,6 @@ function printRightContent(item, code69Img) {
|
||||
//底部文字(SN码)
|
||||
LODOP.ADD_PRINT_TEXT(66, 195, 140, 10, numberCode);
|
||||
LODOP.SET_PRINT_STYLEA(0, "LetterSpacing", 4);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ function printContent(item, code69Img, date) {
|
||||
const HTML = `<div
|
||||
style="text-align:center;width:210px;white-space: nowrap; overflow: hidden;font-size:13px;font-family:黑体;font-weight:900;">${specifications}</div>`;
|
||||
LODOP.ADD_PRINT_HTM(11, 4, 590, 10, HTML);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
}
|
||||
//SN码和底部文字
|
||||
if (serialNumber && serialNumber !== " ") {
|
||||
|
||||
@@ -57,6 +57,8 @@ function printLeftContent(item, code69Img, date) {
|
||||
if (specifications) {
|
||||
LODOP.ADD_PRINT_TEXT(4, 15, "100%", 10, specifications);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
console.log("到这里");
|
||||
}
|
||||
//SN码和底部文字
|
||||
if (serialNumber && serialNumber !== " ") {
|
||||
@@ -67,6 +69,7 @@ function printLeftContent(item, code69Img, date) {
|
||||
LODOP.ADD_PRINT_TEXT(65, 26, 100, 10, serialNumber);
|
||||
//底部文字(日期)
|
||||
LODOP.ADD_PRINT_TEXT(65, 125, 40, 10, date);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
}
|
||||
}
|
||||
//右边打印
|
||||
@@ -88,6 +91,7 @@ function printRightContent(item, code69Img, date) {
|
||||
if (specifications) {
|
||||
LODOP.ADD_PRINT_TEXT(4, 177, "100%", 10, specifications);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
}
|
||||
|
||||
//SN码和底部文字
|
||||
|
||||
@@ -39,6 +39,7 @@ function printLeftContent(item) {
|
||||
const { serialNumber } = item;
|
||||
// //SN码和底部文字
|
||||
if (serialNumber && serialNumber !== " ") {
|
||||
console.log("走到了这里,开新");
|
||||
//SN码;
|
||||
LODOP.ADD_PRINT_IMAGE(7, 16, 140, 20, '<img src="' + codeSN(serialNumber) + '">'); // 添加图片
|
||||
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
|
||||
|
||||
@@ -38,7 +38,6 @@ export const set69Code = barCode => {
|
||||
let barCode1 = barCode;
|
||||
let barCodeClone = barCode1 ? barCode1.replace(/\s/g, "") : barCode1;
|
||||
if (barCodeClone && barCodeClone.length === 13 && barCodeClone !== " ") {
|
||||
console.log("走到了这里吗?");
|
||||
barCodeClone = Number(barCodeClone);
|
||||
if (!isNaN(barCodeClone)) {
|
||||
// 创建一个canvas
|
||||
|
||||
@@ -27,7 +27,6 @@ export const boxMarkListPrint = (printData, printNumber) => {
|
||||
LODOP.SET_PRINT_STYLE("FontSize", 9.3);
|
||||
LODOP.SET_PRINT_STYLE("Bold", 1);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
|
||||
let logs = [];
|
||||
let printDataClone = [];
|
||||
let resultArray = [];
|
||||
@@ -96,35 +95,44 @@ function AddPrintContent(obj) {
|
||||
if (specifications) {
|
||||
let chinesePattern = /[\u4e00-\u9fa5]/; // 匹配中文字符的正则表达式
|
||||
if (chinesePattern.test(specifications)) {
|
||||
// LODOP.ADD_PRINT_TEXT(8, 8, "20mm", 10, "产品型号:");
|
||||
//`${specifications} DIP/N-MOS/VS6880AT/T0220/铁封
|
||||
if (specifications.length > 15) {
|
||||
LODOP.ADD_PRINT_TEXT(8, 8, "20mm", 10, "产品型号:");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.ADD_PRINT_TEXT(8, 64, "45mm", 20, `${specifications}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
LODOP.SET_PRINT_STYLE("FontName", "黑体");
|
||||
//防止文字未满进行换行
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextNeatRow", 1);
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -5);
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(8, 8, "20mm", "10mm", "产品型号:");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.ADD_PRINT_TEXT(8, 64, "45mm", "100%", `${specifications}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -5);
|
||||
//防止文字未满进行换行
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextNeatRow", 1);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
}
|
||||
} else {
|
||||
if (specifications.length > 25) {
|
||||
LODOP.ADD_PRINT_TEXT(8, 8, "20mm", 10, "产品型号:");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.ADD_PRINT_TEXT(8, 64, "45mm", 20, `${specifications}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
//防止文字未满进行换行
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextNeatRow", 1);
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -5);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(8, 8, "20mm", "10mm", "产品型号:");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.ADD_PRINT_TEXT(8, 64, "45mm", "100%", `${specifications}`);
|
||||
//防止文字未满进行换行
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextNeatRow", 1);
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -5);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
}
|
||||
}
|
||||
logStr = `规格型号${specifications}`;
|
||||
@@ -167,22 +175,27 @@ function AddPrintContent(obj) {
|
||||
let str3 = str.substring(7, 14);
|
||||
//224
|
||||
LODOP.ADD_PRINT_TEXT(130, 231, "10mm", "10mm", `${str1}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "SourceHanSansCN-Bold");
|
||||
// LODOP.SET_PRINT_STYLEA(0, "FontName", "");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
//238
|
||||
LODOP.ADD_PRINT_TEXT(130, 245, "15mm", "10mm", `${str2}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "SourceHanSansCN-Bold");
|
||||
// LODOP.SET_PRINT_STYLEA(0, "FontName", "");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
//283
|
||||
LODOP.ADD_PRINT_TEXT(130, 290, "15mm", "10mm", `${str3}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "SourceHanSansCN-Bold");
|
||||
// LODOP.SET_PRINT_STYLEA(0, "FontName", "");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
}
|
||||
}
|
||||
|
||||
//产品名称
|
||||
if (materialName) {
|
||||
LODOP.ADD_PRINT_TEXT(37, 8, "20mm", "10mm", "产品名称:");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.ADD_PRINT_TEXT(37, 64, "45mm", 20, `${materialName}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "TextOverflow", 2);
|
||||
LODOP.SET_PRINT_STYLEA(0, "LineSpacing", -4);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
}
|
||||
|
||||
//二维码
|
||||
@@ -217,15 +230,18 @@ function AddPrintContent(obj) {
|
||||
let weishuElement = `<div style="font-size:16px;color:#000;font-weight:bold;">尾数</div>
|
||||
</div>`;
|
||||
LODOP.ADD_PRINT_HTM(68, 295, "45mm", "100%", weishuElement);
|
||||
|
||||
LODOP.SET_PRINT_STYLEA(0, "Angle", 30);
|
||||
LODOP.ADD_PRINT_ELLIPSE(48, 293, 40, 40, 1, 1);
|
||||
}
|
||||
//订单号
|
||||
if (beginNumber) {
|
||||
LODOP.ADD_PRINT_TEXT(64, 8, "78mm", 10, `订单号:${orderBillNo}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "Overflow", 2);
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(65, 8, "78mm", 10, `订单号:${orderBillNo}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "Overflow", 2);
|
||||
}
|
||||
|
||||
@@ -233,20 +249,26 @@ function AddPrintContent(obj) {
|
||||
//装箱序号
|
||||
if (isTail) {
|
||||
LODOP.ADD_PRINT_TEXT(79, 8, "50mm", "10mm", `装箱序号:${boxSortCount + "/" + boxSortCount}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(79, 8, "50mm", "10mm", `装箱序号:${sort + "/" + boxSortCount}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
}
|
||||
} else {
|
||||
if (isTail) {
|
||||
LODOP.ADD_PRINT_TEXT(85, 8, "50mm", "10mm", `装箱序号:${boxSortCount + "/" + boxSortCount}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(85, 8, "50mm", "10mm", `装箱序号:${sort + "/" + boxSortCount}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
}
|
||||
}
|
||||
if (beginNumber) {
|
||||
LODOP.ADD_PRINT_TEXT(79, 107, "30mm", "10mm", `净重:${isTail ? tailboxNetWeightQty : cratingNetWeightQty} KG`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(85, 107, "30mm", "10mm", `净重:${isTail ? tailboxNetWeightQty : cratingNetWeightQty} KG`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
}
|
||||
//净重
|
||||
|
||||
@@ -255,44 +277,54 @@ function AddPrintContent(obj) {
|
||||
if (beginNumber) {
|
||||
if (cratingQty > productQty) {
|
||||
LODOP.ADD_PRINT_TEXT(95, 8, "50mm", "10mm", `装箱数量:${productQty} PCS`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(95, 8, "50mm", "10mm", `装箱数量:${isTail ? tailboxQty : cratingQty} PCS`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
}
|
||||
} else {
|
||||
if (cratingQty > productQty) {
|
||||
LODOP.ADD_PRINT_TEXT(107, 8, "50mm", "10mm", `装箱数量:${productQty} PCS`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(107, 8, "50mm", "10mm", `装箱数量:${isTail ? tailboxQty : cratingQty} PCS`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
}
|
||||
}
|
||||
|
||||
//毛重
|
||||
if (beginNumber) {
|
||||
LODOP.ADD_PRINT_TEXT(96, 107, "30mm", "10mm", `毛重:${isTail ? tailboxGrossWeightQty : cratingGrossWeightQty} KG`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(102, 107, "30mm", "10mm", `毛重:${isTail ? tailboxGrossWeightQty : cratingGrossWeightQty} KG`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
}
|
||||
|
||||
//日期
|
||||
let createTimeClone = createTime.substring(0, 10);
|
||||
if (beginNumber) {
|
||||
LODOP.ADD_PRINT_TEXT(111, 8, "50mm", "10mm", `日期:${createTimeClone}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
//流水号
|
||||
} else {
|
||||
LODOP.ADD_PRINT_TEXT(129, 8, "50mm", "10mm", `日期:${createTimeClone}`);
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
}
|
||||
|
||||
if (beginNumber) {
|
||||
let beginNumberStr = `<div style="font-size:12px;color:#000;font-weight:bold;font-family:'黑体'">
|
||||
流水号:${beginNumber}
|
||||
</div>`;
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
//LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
LODOP.ADD_PRINT_HTM(126, 8, "50mm", "100%", beginNumberStr);
|
||||
}
|
||||
if (endNumber) {
|
||||
let endNumberStr = `<div style="font-size:12px;color:#000;font-weight:bold;font-family:'黑体';"><span>${endNumber}</span></div>
|
||||
</div>`;
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
// LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
|
||||
LODOP.SET_PRINT_STYLEA(0, "FontName", "Times New Roman");
|
||||
LODOP.ADD_PRINT_HTM(138, 51, "50mm", "100%", endNumberStr);
|
||||
}
|
||||
logStr = `规格型号:【${specifications}】->订单:【${orderBillNo}】->条码:【${barCodeClone}】->条码图片路径:【${image64}】->序号:【${
|
||||
|
||||
@@ -65,6 +65,12 @@ export const FORM_DATA: FormItem[] = [
|
||||
isArray: true,
|
||||
options: [],
|
||||
label: "规格型号: "
|
||||
},
|
||||
{
|
||||
prop: "createUser",
|
||||
placeholder: "请输入生成人",
|
||||
type: "input",
|
||||
label: "生成人: "
|
||||
}
|
||||
];
|
||||
|
||||
@@ -72,6 +78,7 @@ export const RULE_FORM = {
|
||||
pageNo: 1,
|
||||
pageSize: 50,
|
||||
orgCode: 0
|
||||
// createUser: ""
|
||||
};
|
||||
export const DOWN_FORM_DATA: any[] = [
|
||||
{
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<script setup lang="ts" name="antiCode">
|
||||
import ListBtns from "@/components/ListBtns/index.vue";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
|
||||
import $Bus from "@/utils/mittBus";
|
||||
import { QuestionFilled } from "@element-plus/icons-vue";
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
import type { FormInstance } from "element-plus";
|
||||
@@ -143,7 +143,8 @@ if (SHOW_BTBS["antiCode"] && SHOW_BTBS["antiCode"].length) {
|
||||
}
|
||||
|
||||
// 获取用户信息(组织id)
|
||||
const userStore = useUserStore();
|
||||
const userStore: any = useUserStore();
|
||||
|
||||
// 数据源
|
||||
const datas = reactive<any>({
|
||||
downVisible: false,
|
||||
@@ -162,6 +163,10 @@ const datas = reactive<any>({
|
||||
initDownParam: cloneDeep(DOWN_RULE_FORM), //
|
||||
downSelectionList: [] //防伪码下载列表选中
|
||||
});
|
||||
|
||||
datas.ruleForm.createUser = userStore?.userInfo?.nickname;
|
||||
datas.initParam.createUser = userStore?.userInfo?.nickname;
|
||||
|
||||
// input输入验证
|
||||
const valueVerify = () => {
|
||||
datas.numberRuleForm.number = integerRexg(datas.numberRuleForm.number);
|
||||
@@ -219,7 +224,7 @@ const getGenerateSecurityNumber = async () => {
|
||||
useMsg("success", "防伪码生成成功 !");
|
||||
datas.dialogFormVisible = false;
|
||||
//这里应该调用重置接口,如果调用列表接口页面还会保留上次的搜索条件
|
||||
proTable.value!.reset();
|
||||
proTable.value!.getTableList();
|
||||
//proTable.value!.getTableList();
|
||||
}
|
||||
};
|
||||
@@ -312,6 +317,21 @@ watch(
|
||||
deep: true
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
$Bus.on("clearBoxAntiCodeCreator", () => {
|
||||
datas.ruleForm.createUser = "";
|
||||
datas.initParam.createUser = "";
|
||||
console.log("123232");
|
||||
});
|
||||
|
||||
$Bus.on("setAntiCodeInputCreateUser", (params: any) => {
|
||||
const { createUser } = params;
|
||||
datas.ruleForm.createUser = createUser;
|
||||
datas.initParam.createUser = createUser;
|
||||
console.log("1232323");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scope lang="scss">
|
||||
|
||||
@@ -132,5 +132,6 @@ export const PRINT_CODE_FORM_DATA: FormItem[] = [
|
||||
|
||||
export const PRINT_CODE_RULE_FORM_DATA = {
|
||||
pageNo: 1,
|
||||
pageSize: 50
|
||||
pageSize: 50,
|
||||
isDownLoad: false
|
||||
};
|
||||
|
||||
@@ -290,6 +290,7 @@ import { PRINT_CODE_FORM_DATA, PRINT_CODE_RULE_FORM_DATA, PRINT_CODE_FORM_COLUMN
|
||||
// 接口
|
||||
import {
|
||||
getCodeListApi,
|
||||
// getCodeList1Api,
|
||||
getSerialNumberDownLoadApi,
|
||||
getPrintListCodeApi,
|
||||
getListApi,
|
||||
@@ -351,6 +352,7 @@ const datas = reactive<any>({
|
||||
printCodeColumns: cloneDeep(PRINT_CODE_FORM_COLUMNS), //打印条码弹窗表格配置项
|
||||
remoteSelectItem: {}, //转换规格的选中的数据
|
||||
isSave: false, //生成条码保存按钮状态
|
||||
// isDownLoad: false,
|
||||
generateComplete: "", //条码生成状态,生成中的不可打印
|
||||
jsonData: [], //批产条码数据
|
||||
generateRecordId: null, //生成记录id
|
||||
@@ -384,6 +386,8 @@ const codePrintSelection = (selection: any) => {
|
||||
// 点击打印条码按钮进行赋值
|
||||
const handlerPrintBarCode = (row: any) => {
|
||||
datas.codePrintSelectionList = [];
|
||||
resetVisibleGroups();
|
||||
datas.printCodeRuleFormData.isDownLoad = false;
|
||||
if (row.id) {
|
||||
datas.printCodeRuleFormData.orgCode = userStore.orgCode;
|
||||
datas.printCodeRuleFormData.generateRecordId = row.id;
|
||||
@@ -393,22 +397,102 @@ const handlerPrintBarCode = (row: any) => {
|
||||
datas.allPrintBtn = row.isTwo > 1 ? cloneDeep(ALL_PRINT_BTN) : cloneDeep(ALL_PRINT_BTN1);
|
||||
}
|
||||
};
|
||||
// 全局组ID注册表(在组件生命周期内持久化)
|
||||
// 用于记录所有组的唯一ID,确保跨筛选/刷新保持一致
|
||||
const globalGroupRegistry = new Map<string, number>();
|
||||
let globalNextGroupId = 0;
|
||||
|
||||
const tableRowClassName = ({ row, rowIndex }: { row: any; rowIndex: number }) => {
|
||||
if (row.isTwo == 1) {
|
||||
return "";
|
||||
}
|
||||
// 计算当前行所在的组(每组2行)
|
||||
let groupIndex = Math.floor(rowIndex / 2);
|
||||
// 临时组跟踪(仅用于当前渲染批次,记录可见组的顺序)
|
||||
let visibleGroupOrder: string[] = [];
|
||||
|
||||
// 根据组索引的奇偶性决定使用哪种颜色
|
||||
if (groupIndex % 2 === 0) {
|
||||
return "warning-row";
|
||||
} else {
|
||||
return "success-row";
|
||||
}
|
||||
return "";
|
||||
// 重置临时跟踪(筛选/分页时调用,保留全局注册表)
|
||||
const resetVisibleGroups = () => {
|
||||
visibleGroupOrder = [];
|
||||
globalNextGroupId = 0;
|
||||
};
|
||||
// // 生成组标识(与之前相同)
|
||||
const getGroupKey = (row: any) => {
|
||||
return JSON.stringify([row.serialNumber, row.twoSerialNumber].sort());
|
||||
};
|
||||
|
||||
// 关键改进:跨筛选/刷新保持颜色交替的行样式函数
|
||||
const tableRowClassName = ({ row }: { row: any }) => {
|
||||
// 排除不需要着色的行
|
||||
if (row.isTwo === 1) return "";
|
||||
|
||||
// 验证必要字段
|
||||
if (!row.serialNumber || !row.twoSerialNumber) return "";
|
||||
|
||||
const groupKey = getGroupKey(row);
|
||||
|
||||
// 1. 全局注册组ID(首次出现时分配,永久不变)
|
||||
if (!globalGroupRegistry.has(groupKey)) {
|
||||
globalGroupRegistry.set(groupKey, globalNextGroupId);
|
||||
globalNextGroupId++;
|
||||
}
|
||||
globalGroupRegistry.get(groupKey)!;
|
||||
|
||||
// 2. 跟踪当前可见组的出现顺序
|
||||
if (!visibleGroupOrder.includes(groupKey)) {
|
||||
visibleGroupOrder.push(groupKey);
|
||||
}
|
||||
const visibleIndex = visibleGroupOrder.indexOf(groupKey);
|
||||
|
||||
// 3. 基于可见顺序的索引分配颜色(确保当前视图内严格交替)
|
||||
return visibleIndex % 2 === 0 ? "warning-row" : "success-row";
|
||||
};
|
||||
// // 新增:分组缓存管理
|
||||
// const groupCache = new Map<string, { groupIndex: number; colorClass: string }>();
|
||||
// let groupCounter = 0;
|
||||
|
||||
// // // 重置分组缓存(在表格数据变化时调用)
|
||||
// const resetGroupCache = () => {
|
||||
// groupCache.clear();
|
||||
// groupCounter = 0;
|
||||
// };
|
||||
// const tableRowClassName = ({ row }: { row: any }) => {
|
||||
// // 当isTwo为1时不应用颜色
|
||||
// if (row.isTwo === 1) {
|
||||
// return "";
|
||||
// }
|
||||
|
||||
// // 确保serialNumber和twoSerialNumber存在
|
||||
// if (!row.serialNumber || !row.twoSerialNumber) {
|
||||
// return "";
|
||||
// }
|
||||
|
||||
// // 生成唯一组标识(排序后拼接,确保A-B和B-A属于同一组)
|
||||
// const groupKey = [row.serialNumber, row.twoSerialNumber].sort().join("-");
|
||||
|
||||
// // 如果该组已处理过,直接使用缓存的颜色
|
||||
// if (groupCache.has(groupKey)) {
|
||||
// return groupCache.get(groupKey)!.colorClass;
|
||||
// }
|
||||
|
||||
// // 新组:分配组索引并确定颜色(偶数组红色,奇数组绿色)
|
||||
// const groupIndex = groupCounter++;
|
||||
// const colorClass = groupIndex % 2 === 0 ? "warning-row" : "success-row";
|
||||
|
||||
// // // 缓存该组信息
|
||||
// groupCache.set(groupKey, { groupIndex, colorClass });
|
||||
|
||||
// return colorClass;
|
||||
|
||||
// // if (row.isTwo == 1) {
|
||||
// // return "";
|
||||
// // }
|
||||
// // console.log(row, "============>");
|
||||
// // // 计算当前行所在的组(每组2行)
|
||||
// // let groupIndex = Math.floor(rowIndex / 2);
|
||||
|
||||
// // // 根据组索引的奇偶性决定使用哪种颜色
|
||||
// // if (groupIndex % 2 === 0) {
|
||||
// // return "warning-row";
|
||||
// // } else {
|
||||
// // return "success-row";
|
||||
// // }
|
||||
// // return "";
|
||||
// };
|
||||
// 删除文件
|
||||
const handleRemoveFiles = () => {
|
||||
datas.uploadProgress = "";
|
||||
@@ -452,7 +536,21 @@ const handleFilesChange = (file: any) => {
|
||||
const worksheet: any = workbook.Sheets[sheetName];
|
||||
const jsonData: any = utils.sheet_to_json(worksheet);
|
||||
datas.jsonData = jsonData;
|
||||
if (!datas.jsonData.length) {
|
||||
return;
|
||||
}
|
||||
//大于1000只能是1000
|
||||
datas.jsonData.forEach((item: any) => {
|
||||
if (item["生成数量*"] > 1000) {
|
||||
item["生成数量*"] = 1000;
|
||||
}
|
||||
});
|
||||
//过滤为0的
|
||||
datas.jsonData = datas.jsonData.filter((item: any) => {
|
||||
return item["生成数量*"] > 0;
|
||||
});
|
||||
};
|
||||
|
||||
//进度条(假的,产品要进度条!),将文件上传到本地是很快的
|
||||
reader.onprogress = (e: any) => {
|
||||
if (e.lengthComputable) {
|
||||
@@ -636,6 +734,7 @@ const handleSpecificationConfirm = async () => {
|
||||
if (result.status === 200) {
|
||||
if (result.isSuccess) {
|
||||
useMsg("success", "规格转换成功 !");
|
||||
resetVisibleGroups();
|
||||
printCodeTable.value.getTableList();
|
||||
datas.specificationVisible = false;
|
||||
handleSpecificationClose();
|
||||
@@ -654,6 +753,7 @@ const handleSpecificationClose = () => {
|
||||
datas.specificationList = [];
|
||||
datas.specificationValue = "";
|
||||
datas.remoteSelectItem = {};
|
||||
datas.isDownLoad = false;
|
||||
};
|
||||
|
||||
// 生成条码弹窗远程操作赋值(规格型号点击选择)
|
||||
@@ -703,12 +803,16 @@ const verificationInput = (params: Record<string, any>) => {
|
||||
if (prop !== "number") {
|
||||
return;
|
||||
}
|
||||
if (datas.generateCodeTableData[index]["number"] == 0) {
|
||||
datas.generateCodeTableData[index]["number"] = "";
|
||||
}
|
||||
let isTwoClone = datas.generateCodeTableData[index]["isTwoClone"];
|
||||
if (isTwoClone == 2) {
|
||||
isTowNumber(index);
|
||||
} else {
|
||||
datas.generateCodeTableData[index]["number"] = integerNumber(datas.generateCodeTableData[index]["number"]);
|
||||
}
|
||||
|
||||
if (datas.generateCodeTableData[index]["number"] > 1000) {
|
||||
datas.generateCodeTableData[index]["number"] = 1000;
|
||||
}
|
||||
@@ -729,11 +833,14 @@ const handleCloseGenerateCode = () => {
|
||||
|
||||
// 条码列表下载
|
||||
const getSerialNumberDownLoad = async () => {
|
||||
datas.printCodeRuleFormData.isDownLoad = true;
|
||||
if (!datas.codePrintSelectionList.length) {
|
||||
useMsg("warning", "请选择需要下载的数据 !");
|
||||
return;
|
||||
}
|
||||
|
||||
let serialNumbers: any[] = [];
|
||||
let isTwo = datas.codePrintSelectionList[0].isTwo;
|
||||
datas.codePrintSelectionList.forEach((item: any) => {
|
||||
serialNumbers.push(item.serialNumber);
|
||||
});
|
||||
@@ -742,13 +849,17 @@ const getSerialNumberDownLoad = async () => {
|
||||
const result = await getSerialNumberDownLoadApi({
|
||||
orgCode,
|
||||
serialNumbers,
|
||||
generateRecordId
|
||||
generateRecordId,
|
||||
isTwo
|
||||
});
|
||||
if (result.status === 200 && result.isSuccess) {
|
||||
useMsg("success", "导出成功请前往导出列表中进行下载 !");
|
||||
resetVisibleGroups();
|
||||
printCodeTable.value.getTableList();
|
||||
datas.printCodeRuleFormData.isDownLoad = false;
|
||||
} else {
|
||||
useMsg("warning", "导出失败,请稍后重试 !");
|
||||
datas.printCodeRuleFormData.isDownLoad = false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -759,6 +870,7 @@ const handleDown = () => {
|
||||
|
||||
// 打印记录接口
|
||||
const getPrintListCode = async (params: any) => {
|
||||
datas.printCodeRuleFormData.isDownLoad = false;
|
||||
const result = await getPrintListCodeApi(params);
|
||||
if (result.status === 200) {
|
||||
printCodeTable!.value.getTableList();
|
||||
@@ -863,14 +975,22 @@ watch(
|
||||
|
||||
onMounted(() => {
|
||||
$Bus.on("clearBarCodeCreateUser", () => {
|
||||
resetVisibleGroups();
|
||||
datas.ruleForm.createUser = "";
|
||||
datas.initParam.createUser = "";
|
||||
datas.printCodeRuleFormData.isDownLoad = false;
|
||||
});
|
||||
|
||||
$Bus.on("setBarCodeInputCreateUser", (params: any) => {
|
||||
const { createUser } = params;
|
||||
datas.ruleForm.createUser = createUser;
|
||||
datas.initParam.createUser = createUser;
|
||||
});
|
||||
//searchBarCodeSsDownLoad
|
||||
$Bus.on("searchBarCodeSsDownLoad", () => {
|
||||
resetVisibleGroups();
|
||||
datas.printCodeRuleFormData.isDownLoad = false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ const generateBarCode = async (datas: any, proTable: any) => {
|
||||
datas.generateCodeVisible = false;
|
||||
setTimeout(() => {
|
||||
//getTableList reset
|
||||
proTable.value!.reset();
|
||||
proTable.value!.getTableList();
|
||||
}, 3000);
|
||||
} else {
|
||||
useMsg("error", "操作失败 !");
|
||||
@@ -96,11 +96,12 @@ export const initRuleForm = (datas: any) => {
|
||||
//顶部按钮事件
|
||||
export const handleBtnClick = (result: any, datas: any, proTable: any) => {
|
||||
const { type } = result;
|
||||
console.log(type, "============>");
|
||||
//生成条码
|
||||
if (type === "Generate") {
|
||||
datas.generateCodeVisible = true;
|
||||
}
|
||||
if (type === "Refresh") {
|
||||
if (type === "Refresh" || type === "Convert") {
|
||||
proTable!.value.getTableList();
|
||||
}
|
||||
if (type === "Generates") {
|
||||
|
||||
@@ -112,7 +112,7 @@ export const FORM_DATA: FormItem[] = [
|
||||
export const RULE_FORM = {
|
||||
pageNo: 1,
|
||||
pageSize: 50,
|
||||
createUser: "杨春龙"
|
||||
createUser: ""
|
||||
};
|
||||
|
||||
export const NUM_RULE_FORM = {
|
||||
|
||||
@@ -241,8 +241,9 @@ const getBoxGenerate = async () => {
|
||||
msgHtml("箱码生成成功 !");
|
||||
setTimeout(() => {
|
||||
datas.generateVisible = false;
|
||||
proTable.value!.reset();
|
||||
// proTable.value!.getTableList();
|
||||
// datas.ruleForm.createUser = userStore.userInfo.nickname;
|
||||
// datas.initParam.createUser = userStore.userInfo.nickname;
|
||||
proTable.value!.getTableList();
|
||||
}, 500);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ const getBoxRestart = async (datas: any, proTable: any) => {
|
||||
const result = await getBoxRestartApi({ ids });
|
||||
if (result.status === 200) {
|
||||
msgHtml("操作成功 !");
|
||||
proTable.value!.reset();
|
||||
proTable.value!.getTableList();
|
||||
} else {
|
||||
msgHtml(result.message);
|
||||
}
|
||||
|
||||
366
vite.config.ts.timestamp-1754386973362-bb38544bf2da9.mjs
Normal file
366
vite.config.ts.timestamp-1754386973362-bb38544bf2da9.mjs
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user