From c9f779c19d920efcca14fd17bbcca8254f92790d Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 22 八月 2024 10:22:40 +0800 Subject: [PATCH] 绑定工艺更新 --- src/views/tigerprojects/mes/smt/solder/smt_solder_his/index.vue | 208 +++++++++++++++++++++++++-------------------------- 1 files changed, 103 insertions(+), 105 deletions(-) diff --git a/src/views/tigerprojects/mes/smt/solder/smt_solder_his/index.vue b/src/views/tigerprojects/mes/smt/solder/smt_solder_his/index.vue index fafccff..1a7477f 100644 --- a/src/views/tigerprojects/mes/smt/solder/smt_solder_his/index.vue +++ b/src/views/tigerprojects/mes/smt/solder/smt_solder_his/index.vue @@ -20,117 +20,115 @@ </div> </template> <script lang="ts" setup> -import { reactive } from 'vue'; -import { aoaToSheetXlsx } from '/@/components/Excel'; -import { BasicTable, useTable, TableAction } from '/@/components/Table'; -//import SolderModal from './SolderModal.vue'; -import { useModal } from '/@/components/Modal'; -import { columns, searchFormSchema } from './smt_solder.data'; -import { getsolderListByPage } from '/@/api/tigerapi/mes/smt/solderhis'; -import { useGo } from '/@/hooks/web/usePage'; -import { Loading } from '/@/components/Loading'; -import { useMessage } from '/@/hooks/web/useMessage'; -import { useI18n } from '/@/hooks/web/useI18n'; -import { SaveSolder } from '/@/api/tigerapi/mes/smt/solder'; + import { reactive } from 'vue'; + import { aoaToSheetXlsx } from '/@/components/Excel'; + import { BasicTable, useTable, TableAction } from '/@/components/Table'; + //import SolderModal from './SolderModal.vue'; + import { useModal } from '/@/components/Modal'; + import { columns, searchFormSchema } from './smt_solder.data'; + import { getsolderListByPage } from '/@/api/tigerapi/mes/smt/solderhis'; + import { useGo } from '/@/hooks/web/usePage'; + import { Loading } from '/@/components/Loading'; + import { useMessage } from '/@/hooks/web/useMessage'; + import { useI18n } from '/@/hooks/web/useI18n'; + import { SaveSolder } from '/@/api/tigerapi/mes/smt/solder'; -const { t } = useI18n(); -const { createMessage } = useMessage(); -const go = useGo(); -const compState = reactive({ - absolute: false, - loading: false, - tip: '鍔犺浇涓�...', -}); -//const [registerSolder, { openModal: openSolderModal }] = useModal(); -const [registerTable,{getForm,getPaginationRef,reload}] = useTable({ - title: '閿¤啅鑳舵按鍘嗗彶', - api: getsolderListByPage, - columns, - formConfig: { - labelWidth: 120, - schemas: searchFormSchema, - }, - // actionColumn: { - // width: 80, - // title: '鎿嶄綔', - // dataIndex: 'action', - // slots: { customRender: 'action' }, - // fixed: 'right', //undefined, - // }, - ellipsis:true, - useSearchForm: true, - showTableSetting: false, - bordered: true, - showIndexColumn: false, -}); -let arr: any[] = []; -//瀵煎嚭 -// function aoaToExcel() { -// const totals = getPaginationRef().total -// if (totals < 30000) { -// arr = []; -// compState.loading = true; -// const col = getForm().getFieldsValue() -// getWmsItemSumByPage(col).then((res) => { -// res.items.forEach(element => { -// arr.push({ -// '浠撳簱': element.WH_CODE, -// '鐗╂枡浠g爜': element.ITEM_CODE, -// '鐗╂枡鍚嶇О': element.ITEM_NAME, -// '鏁伴噺': element.ZK_QTY, -// '鍗曚綅': element.UNIT -// }); -// }); -// const arrHeader = columns.map((column) => column.title); -// const arrData = arr.map((item) => { -// return Object.keys(item).map((key) => item[key]); -// }); -// // 淇濊瘉data椤哄簭涓巋eader涓�鑷� -// if(arr.length<30000){ -// aoaToSheetXlsx({ -// data: arrData, -// header: arrHeader, -// filename: '姹囨�绘姤琛�.xlsx', -// }); -// }else{ -// createMessage.error(t('瀵煎嚭鏁版嵁涓嶈兘瓒呰繃涓変竾鏉★紝濡傞渶瑕佹洿澶氱殑璇疯仈绯荤鐞嗗憳')); -// } - -// compState.loading = false; + const { t } = useI18n(); + const { createMessage } = useMessage(); + const go = useGo(); + const compState = reactive({ + absolute: false, + loading: false, + tip: '鍔犺浇涓�...', + }); + //const [registerSolder, { openModal: openSolderModal }] = useModal(); + const [registerTable, { getForm, getPaginationRef, reload }] = useTable({ + title: '閿¤啅鑳舵按鍘嗗彶', + api: getsolderListByPage, + columns, + formConfig: { + labelWidth: 120, + schemas: searchFormSchema, + }, + // actionColumn: { + // width: 80, + // title: '鎿嶄綔', + // dataIndex: 'action', + // slots: { customRender: 'action' }, + // fixed: 'right', //undefined, + // }, + ellipsis: true, + useSearchForm: true, + showTableSetting: false, + bordered: true, + showIndexColumn: false, + }); + let arr: any[] = []; + //瀵煎嚭 + // function aoaToExcel() { + // const totals = getPaginationRef().total + // if (totals < 30000) { + // arr = []; + // compState.loading = true; + // const col = getForm().getFieldsValue() + // getWmsItemSumByPage(col).then((res) => { + // res.items.forEach(element => { + // arr.push({ + // '浠撳簱': element.WH_CODE, + // '鐗╂枡浠g爜': element.ITEM_CODE, + // '鐗╂枡鍚嶇О': element.ITEM_NAME, + // '鏁伴噺': element.ZK_QTY, + // '鍗曚綅': element.UNIT + // }); + // }); + // const arrHeader = columns.map((column) => column.title); + // const arrData = arr.map((item) => { + // return Object.keys(item).map((key) => item[key]); + // }); + // // 淇濊瘉data椤哄簭涓巋eader涓�鑷� + // if(arr.length<30000){ + // aoaToSheetXlsx({ + // data: arrData, + // header: arrHeader, + // filename: '姹囨�绘姤琛�.xlsx', + // }); + // }else{ + // createMessage.error(t('瀵煎嚭鏁版嵁涓嶈兘瓒呰繃涓変竾鏉★紝濡傞渶瑕佹洿澶氱殑璇疯仈绯荤鐞嗗憳')); + // } -// }) + // compState.loading = false; -// } else { -// createMessage.error(t('瀵煎嚭鏁版嵁涓嶈兘瓒呰繃涓変竾鏉★紝濡傞渶瑕佹洿澶氱殑璇疯仈绯荤鐞嗗憳')); -// } + // }) - -// } -//璺宠浆鍒板疄鏃跺簱瀛� -function handleEdit(record: any) { - //璺宠浆椤甸潰 - //go('/WmsItem/' + record.ITEM_CODE); - // const apiAction = SaveSolder(record, true); - // apiAction.then((action) => { - // if (action) { - // if (action.IsSuccessed) { - // createMessage.success(t('宸叉姤搴熸垚鍔�')); - // } // } else { - // createMessage.error(action.Message); + // createMessage.error(t('瀵煎嚭鏁版嵁涓嶈兘瓒呰繃涓変竾鏉★紝濡傞渶瑕佹洿澶氱殑璇疯仈绯荤鐞嗗憳')); // } - // }); -} -// function solderAdd(){ -// //alert("鏂板") -// openSolderModal(true, { -// data: 'content', -// info: 'Info', -// }); -// } + // } + //璺宠浆鍒板疄鏃跺簱瀛� + function handleEdit(record: any) { + //璺宠浆椤甸潰 + //go('/WmsItem/' + record.ITEM_CODE); + // const apiAction = SaveSolder(record, true); + // apiAction.then((action) => { + // if (action) { + // if (action.IsSuccessed) { + // createMessage.success(t('宸叉姤搴熸垚鍔�')); + // } + // } else { + // createMessage.error(action.Message); + // } + // }); + } + // function solderAdd(){ + // //alert("鏂板") + // openSolderModal(true, { + // data: 'content', + // info: 'Info', + // }); + // } -function handleSuccess() { - reload(); -} + function handleSuccess() { + reload(); + } </script> -- Gitblit v1.9.3