Merge branch 'feature-i18n' into dev
| | |
| | | # é
åå端æå¡ |
| | | # VITE_APP_LOCAL = 'int' |
| | | # VITE_APP_LOCAL = 'zhl' |
| | | VITE_APP_LOCAL = 'hjy' |
| | | VITE_APP_LOCAL = 'cxl' |
| | |
| | | "splitpanes": "3.1.5", |
| | | "vue": "3.4.31", |
| | | "vue-cropper": "1.1.1", |
| | | "vue-i18n": "^12.0.0-alpha.2", |
| | | "vue-router": "4.4.0", |
| | | "vuedraggable": "4.1.0", |
| | | "vxe-pc-ui": "4.5.15", |
| | | "xlsx": "^0.18.5", |
| | | "vxe-table": "^4.13.8", |
| | | "xe-utils": "^3.7.4" |
| | | "xe-utils": "^3.7.4", |
| | | "xlsx": "^0.18.5" |
| | | }, |
| | | "devDependencies": { |
| | | "@vitejs/plugin-vue": "5.0.5", |
| | |
| | | <template> |
| | | <div class="top-right-btn" :style="style"> |
| | | <el-row> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top" v-if="search"> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? $t('common.common.hideSearch') : $t('common.common.showSearch')" placement="top" v-if="search"> |
| | | <el-button circle icon="Search" @click="toggleSearch()" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-tooltip class="item" effect="dark" :content="$t('common.common.refresh')" placement="top"> |
| | | <el-button circle icon="Refresh" @click="refresh()" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" content="æ¾éå" placement="top" v-if="columns"> |
| | | <el-tooltip class="item" effect="dark" :content="$t('common.common.column')" placement="top" v-if="columns"> |
| | | <el-button circle icon="Menu" @click="showColumn()" v-if="showColumnsType == 'transfer'"/> |
| | | <el-dropdown trigger="click" :hide-on-click="false" style="padding-left: 12px" v-if="showColumnsType == 'checkbox'"> |
| | | <el-button circle icon="Menu" /> |
| | |
| | | <template> |
| | | <div class="navbar"> |
| | | <hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> |
| | | <breadcrumb v-if="!settingsStore.topNav" id="breadcrumb-container" class="breadcrumb-container" /> |
| | | <top-nav v-if="settingsStore.topNav" id="topmenu-container" class="topmenu-container" /> |
| | | <hamburger |
| | | id="hamburger-container" |
| | | :is-active="appStore.sidebar.opened" |
| | | class="hamburger-container" |
| | | @toggleClick="toggleSideBar" |
| | | /> |
| | | <breadcrumb |
| | | v-if="!settingsStore.topNav" |
| | | id="breadcrumb-container" |
| | | class="breadcrumb-container" |
| | | /> |
| | | <top-nav |
| | | v-if="settingsStore.topNav" |
| | | id="topmenu-container" |
| | | class="topmenu-container" |
| | | /> |
| | | |
| | | <div class="right-menu"> |
| | | <template v-if="appStore.device !== 'mobile'"> |
| | | |
| | | </template> |
| | | <template v-if="appStore.device !== 'mobile'"> </template> |
| | | <div class="mt5"> |
| | | <el-button @click="changeLanguage('zh')">䏿</el-button> |
| | | <el-button @click="changeLanguage('en')">English</el-button> |
| | | </div> |
| | | <div class="avatar-container"> |
| | | <el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click"> |
| | | <el-dropdown |
| | | @command="handleCommand" |
| | | class="right-menu-item hover-effect" |
| | | trigger="click" |
| | | > |
| | | <div class="avatar-wrapper"> |
| | | <img :src="userStore.avatar" class="user-avatar" /> |
| | | <el-icon><caret-bottom /></el-icon> |
| | |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <router-link to="/user/profile"> |
| | | <el-dropdown-item>个人ä¸å¿</el-dropdown-item> |
| | | <el-dropdown-item>{{ $t(`topNav.center`) }}</el-dropdown-item> |
| | | </router-link> |
| | | <!-- <el-dropdown-item command="setLayout" v-if="settingsStore.showSettings"> |
| | | <span>å¸å±è®¾ç½®</span> |
| | | </el-dropdown-item> --> |
| | | <el-dropdown-item divided command="logout"> |
| | | <span>éåºç»å½</span> |
| | | <span>{{ $t(`topNav.logout`) }}</span> |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ElMessageBox } from 'element-plus' |
| | | import Breadcrumb from '@/components/Breadcrumb' |
| | | import TopNav from '@/components/TopNav' |
| | | import Hamburger from '@/components/Hamburger' |
| | | import Screenfull from '@/components/Screenfull' |
| | | import SizeSelect from '@/components/SizeSelect' |
| | | import HeaderSearch from '@/components/HeaderSearch' |
| | | import RuoYiGit from '@/components/RuoYi/Git' |
| | | import RuoYiDoc from '@/components/RuoYi/Doc' |
| | | import useAppStore from '@/store/modules/app' |
| | | import useUserStore from '@/store/modules/user' |
| | | import useSettingsStore from '@/store/modules/settings' |
| | | |
| | | const appStore = useAppStore() |
| | | const userStore = useUserStore() |
| | | const settingsStore = useSettingsStore() |
| | | import { ElMessageBox } from "element-plus"; |
| | | import Breadcrumb from "@/components/Breadcrumb"; |
| | | import TopNav from "@/components/TopNav"; |
| | | import Hamburger from "@/components/Hamburger"; |
| | | import Screenfull from "@/components/Screenfull"; |
| | | import SizeSelect from "@/components/SizeSelect"; |
| | | import HeaderSearch from "@/components/HeaderSearch"; |
| | | import RuoYiGit from "@/components/RuoYi/Git"; |
| | | import RuoYiDoc from "@/components/RuoYi/Doc"; |
| | | import useAppStore from "@/store/modules/app"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | import useSettingsStore from "@/store/modules/settings"; |
| | | import useLanguageStore from "@/store/modules/language" |
| | | import { useI18n } from 'vue-i18n'//è¦å¨jsä¸ä½¿ç¨å½é
å |
| | | const appStore = useAppStore(); |
| | | const userStore = useUserStore(); |
| | | const settingsStore = useSettingsStore(); |
| | | const languageStore = useLanguageStore(); |
| | | const { proxy } = getCurrentInstance(); |
| | | function changeLanguage(type) { |
| | | proxy.$i18n.locale = type; |
| | | languageStore.setLocale(type) |
| | | } |
| | | |
| | | function toggleSideBar() { |
| | | appStore.toggleSideBar() |
| | | appStore.toggleSideBar(); |
| | | } |
| | | |
| | | function handleCommand(command) { |
| | |
| | | } |
| | | |
| | | function logout() { |
| | | ElMessageBox.confirm('ç¡®å®æ³¨éå¹¶éåºç³»ç»åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | userStore.logOut().then(() => { |
| | | location.href = '/index'; |
| | | ElMessageBox.confirm("ç¡®å®æ³¨éå¹¶éåºç³»ç»åï¼", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | userStore.logOut().then(() => { |
| | | location.href = "/index"; |
| | | }); |
| | | }) |
| | | }).catch(() => { }); |
| | | .catch(() => {}); |
| | | } |
| | | |
| | | const emits = defineEmits(['setLayout']) |
| | | const emits = defineEmits(["setLayout"]); |
| | | function setLayout() { |
| | | emits('setLayout'); |
| | | emits("setLayout"); |
| | | } |
| | | |
| | | function toggleTheme() { |
| | | settingsStore.toggleTheme() |
| | | settingsStore.toggleTheme(); |
| | | } |
| | | </script> |
| | | |
| | | <style lang='scss' scoped> |
| | | <style lang="scss" scoped> |
| | | .navbar { |
| | | height: 50px; |
| | | overflow: hidden; |
| | |
| | | height: 100%; |
| | | line-height: 50px; |
| | | display: flex; |
| | | |
| | | .mt5{ |
| | | margin-top:5px; |
| | | } |
| | | &:focus { |
| | | outline: none; |
| | | } |
| | |
| | | |
| | | svg { |
| | | transition: transform 0.3s; |
| | | |
| | | |
| | | &:hover { |
| | | transform: scale(1.15); |
| | | } |
| | |
| | | import 'vxe-pc-ui/lib/style.css' |
| | | import VxeUITable from 'vxe-table' |
| | | import 'vxe-table/lib/style.css' |
| | | |
| | | |
| | | import i18n from '@/utils/i18n' // å¼å
¥ i18n é
ç½®æä»¶ |
| | | const app = createApp(App) |
| | | |
| | | // å
¨å±æ¹æ³æè½½ |
| | |
| | | }) |
| | | app.use(VxeUIAll) |
| | | app.use(VxeUITable) |
| | | app.use(i18n) |
| | | app.mount('#app') |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const useLanguageStore = defineStore("language", { |
| | | state: () => ({ |
| | | locale: "zh", |
| | | }), |
| | | actions: { |
| | | setLocale(locale) { |
| | | this.locale = locale; // 设置è¯è¨å¹¶æ´æ°ç¶æ |
| | | console.log(this.locale,"this.localethis.locale") |
| | | } |
| | | }, |
| | | }); |
| | | |
| | | export default useLanguageStore; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // i18n.js æç±»ä¼¼çé
ç½®æä»¶ |
| | | import { createI18n } from 'vue-i18n' |
| | | import {zh as planZh, en as planEn} from './locales/plan' |
| | | import {zh as commonZh, en as commonEn} from './locales/common' |
| | | // import {zh as testZh, en as testEn} from './test' |
| | | let EN = { |
| | | plan: planEn, |
| | | common: commonEn |
| | | } |
| | | let ZH = { |
| | | plan: planZh, |
| | | common: commonZh |
| | | } |
| | | const i18n = createI18n({ |
| | | locale: 'zh', // 设置é»è®¤è¯è¨ä¸ºä¸æ |
| | | fallbackLocale: 'zh', |
| | | globalInjection:true, |
| | | legacy: false, // you must specify 'legacy: false' option |
| | | messages: { |
| | | en: EN, |
| | | zh: ZH |
| | | }, |
| | | }) |
| | | export default i18n |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const zh = { |
| | | topNav: { |
| | | center: "个人ä¸å¿", |
| | | logout: "éåºç»å½", |
| | | }, |
| | | common: { |
| | | import: "导å
¥", |
| | | export: "导åº", |
| | | update: "æ´æ°", |
| | | query: "æ¥è¯¢", |
| | | reset: "éç½®", |
| | | hideSearch: "éèæç´¢", |
| | | showSearch: "æ¾ç¤ºæç´¢", |
| | | refresh: "å·æ°", |
| | | column: "æ¾éå", |
| | | edit:"ç¼è¾", |
| | | save:"ä¿å", |
| | | cancel:"åæ¶" |
| | | } |
| | | }; |
| | | export const en = { |
| | | topNav: { |
| | | center: "Personal Center", |
| | | logout: "Logout", |
| | | }, |
| | | common: { |
| | | import: "Import", |
| | | export: "Export", |
| | | update: "Update", |
| | | query: "Query", |
| | | reset: "Reset", |
| | | hideSearch: "Hide Search", |
| | | showSearch: "Display search", |
| | | refresh: "Refresh", |
| | | column: "Explicit implicit column", |
| | | edit:"Edit", |
| | | save:"Save", |
| | | cancel:"Cancel" |
| | | }, |
| | | }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const zh = { |
| | | title: { |
| | | pipePlanCapacity: "管路产è½è§å", |
| | | gasPlanCapacity:"æ°æè§å产è½" |
| | | }, |
| | | options:{ |
| | | monthlyStatic:"ææç»è®¡", |
| | | dailyStatic:"ææ¥ç»è®¡" |
| | | }, |
| | | message: { |
| | | update: "æ°æ®æ´æ°æå", |
| | | dataWorkorderSuccess: "é¶ä»¶å·¥åæ°æ®å·²æåè§£æ", |
| | | dataWorkorderError: "é¶ä»¶å·¥åæ°æ®å·²è§£æå¤±è´¥", |
| | | metalplanDataSuccess: "é£éè®¡åæ°æ®å·²æåè§£æ", |
| | | metalplanDataError: "é£éè®¡åæ°æ®å·²è§£æå¤±è´¥", |
| | | idNotBeEmpty: "主é®idä¸è½ä¸ºç©º", |
| | | errorMonthEmpty:"è¯·éæ©å¹´æ" |
| | | }, |
| | | placeholder: { |
| | | startDate: "å¼å§æ¥æ", |
| | | endDate: "ç»ææ¥æ", |
| | | startMonth:"å¼å§æä»½", |
| | | endMonth:"ç»ææä»½", |
| | | to:"è³", |
| | | documentNumber: "请è¾å
¥åæ®å·", |
| | | customer: "请è¾å
¥å®¢æ·åç§°", |
| | | planWorkOderNO: "请è¾å
¥é£é计åå·¥åå·", |
| | | selectMonth:"éæ©æä»½" |
| | | }, |
| | | btns: { |
| | | batchPlanStartDay: "æ¹éä¿®æ¹è®¡åå¼å·¥æ¥", |
| | | batchPlanEndDay: "æ¹éä¿®æ¹è®¡åå®å·¥æ¥", |
| | | confirm: "ç¡®å®", |
| | | cancel: "åæ¶", |
| | | }, |
| | | query: { |
| | | daterangePlanStartDay: "计åå¼å·¥æ¥", |
| | | daterangePlanEndDay: "计åå®å·¥æ¥", |
| | | documentNumber: "åæ®å·", |
| | | customer: "客æ·åç§°", |
| | | workOrderNo: "å·¥åå·", |
| | | selectMonth: "éæ©æä»½", |
| | | statistical:"ç»è®¡æ¹å¼", |
| | | selectDateRange: "éæ©åºé´" |
| | | }, |
| | | upload: { |
| | | prevText: "å°æä»¶æå°æ¤å¤ï¼æ", |
| | | uploadPartWorkOrderData: "é¶ä»¶å·¥åæ°æ®ä¸ä¼ ", |
| | | uploadSheetMetalPlanData: "é£éè®¡åæ°æ®ä¸ä¼ ", |
| | | uploadGasPipelineData: "æ°ä½ç®¡è·¯è®¡åæ°æ®ä¸ä¼ ", |
| | | info: "ä¸ä¼ Excelæä»¶ï¼å
å«é¶ä»¶å·¥åä¿¡æ¯ãç³»ç»å°è§£ææ°æ®å¹¶ä¿åå°æ¬å°ï¼ç¨äºå
³èå°é¶ä»¶è®¡åä¸ã", |
| | | weldSeamInfo:"ä¸ä¼ Excelæä»¶ï¼å
å«çç¼å·¥åä¿¡æ¯ãç³»ç»å°è§£ææ°æ®å¹¶ä¿åå°æ¬å°ï¼ç¨äºå
³èå°çç¼è®¡åä¸ã", |
| | | uploadText: "ç¹å»ä¸ä¼ ", |
| | | fileTypeImport: "ä»
å
许导å
¥xlsãxlsxæ ¼å¼æä»¶ã", |
| | | dataPreview: "æ°æ®é¢è§", |
| | | totalUpload: "å
±ä¸ä¼ ", |
| | | itemUpload: "æ¡é¶ä»¶å·¥åæ°æ®", |
| | | confirmUpload: "确认ä¸ä¼ ", |
| | | cancel: "å æ¶", |
| | | errorResult: "导å
¥ç»æ", |
| | | uploadParsePartWorkOrderData: "é¶ä»¶å·¥åæ°æ®å·²æåä¸ä¼ åè§£æ", |
| | | uploadParseGasPipelineData: "æ°ä½ç®¡è·¯è®¡åæ°æ®å·²æåä¸ä¼ åè§£æ", |
| | | }, |
| | | table: { |
| | | mainPartNumber: "主件æå·", |
| | | businessType: "ä¸å¡ç±»å", |
| | | documentNumber: "åæ®å·", |
| | | requirementType: "éæ±åç±»", |
| | | documentStatus: "åæ®ç¶æ", |
| | | updateBy: "å®¡æ ¸æ¶é´", |
| | | workCenter: "å½åå·¥åº", |
| | | department: "å½åå·¥åºè´è´£äºº", |
| | | opStatus: "å½åå·¥åºç¶æ", |
| | | nextOpName: "ä¸ä¸å·¥åº", |
| | | nextProcessDeparment: "ä¸ä¸å·¥åºè´è´£äºº", |
| | | itemNumber: "æå·", |
| | | drawingNo: "å¾å·", |
| | | versionNumber: "çæ¬å·", |
| | | cheaperCode: "ä½é¶ç ", |
| | | productionQuantity: "ç产æ°é", |
| | | planworkOrderTime: "å·¥å计åä¸åæ¶é´", |
| | | planEndDay: "ç³»ç»å®å·¥æ¶é´", |
| | | seq: "åºå·", |
| | | masterPlanner: "主计åå", |
| | | weekDay: "卿¥", |
| | | weekCycle: "å¨åº¦", |
| | | mainPartDrawingNumber: "主件å¾å·", |
| | | customer: "客æ·åç§°", |
| | | goodProductsQuantity: "è¯åæ°é", |
| | | processNumber: "å·¥åºå·", |
| | | factoryCenter: "å·¥ä½ä¸å¿", |
| | | dependencyDepartment: "æå±é¨é¨", |
| | | planStartDay: "计åå¼å·¥æ¥", |
| | | planEndDayDate: "计åå®å·¥æ¥", |
| | | standbyNumber: "夿æå·", |
| | | standbyName: "夿åç§°", |
| | | standbyStock: "夿åºå", |
| | | departmentToNextProcessBelongs: "ä¸éå·¥åºæå±é¨é¨", |
| | | isSuspended: "æ¯å¦æèµ·", |
| | | isOutsourcing: "å¤åæ è¯", |
| | | account: "è´¦å¥", |
| | | workOrderNo: "å·¥åå·", |
| | | processName: "å·¥åºåç§°", |
| | | startDateOfProcessPlan: "å·¥åºè®¡åå¼å§æ¥æ", |
| | | endDateOfProcessPlan: "å·¥åºè®¡åç»ææ¥æ", |
| | | standardTime: "æ åå·¥æ¶", |
| | | processOrder: "å·¥åºæåº", |
| | | integrationDay: "éææ¥æ", |
| | | currentProcessNumber: "å½åå·¥åºå·", |
| | | totalWorkingHoursOfProcess: "å·¥åºæ»å·¥æ¶", |
| | | OrderCompletionDate: "订åå®å·¥æ¥", |
| | | dateYearMonth: "æ¥æ", |
| | | resourceName: "èµæºç»", |
| | | designWorkingHours: "设计工æ¶", |
| | | requiredWorkingHours: "鿱工æ¶", |
| | | capacityLoad: "产è½è´è·", |
| | | advancedMaterials: "ä¸é¶ç©æ", |
| | | advancedDocumentNumber: "ä¸é¶åæ®å·", |
| | | advancedRequirementDay: "ä¸é¶éæ±æ¥æ", |
| | | isPlanComplete: "计åé½å¥", |
| | | isStockComplete: "åºåé½å¥", |
| | | hasTurnback: "æ¯å¦ææè¿å·¥åº", |
| | | hasRisk: "é£é©æ è¯", |
| | | // 产è½è§å |
| | | satndardProcessName: "æ åå·¥åºåç§°", |
| | | dayProduceType: "æ¥äº§åºç±»å", |
| | | dayProduceNum: "æ¥äº§åºæ°é", |
| | | dayProduceUnit: "æ¥äº§åºåä½", |
| | | personnelNumber: "äººåæ°é", |
| | | dayProduceAllNum: "æ¥äº§åºæ»æ°é", |
| | | days: "天æ°", |
| | | monthProduceAllNum: "æäº§åºæ°é", |
| | | remark: "夿³¨", |
| | | }, |
| | | }; |
| | | export const en = { |
| | | title: { |
| | | pipePlanCapacity: "Pipeline planning capacity", |
| | | gasPlanCapacity: "Gas holder planning production capacity" |
| | | }, |
| | | options:{ |
| | | monthlyStatic:"Monthly statistics", |
| | | dailyStatic:"Daily statistics" |
| | | }, |
| | | message: { |
| | | update: "Data update successful", |
| | | dataWorkorderSuccess: |
| | | "The part work order data has been successfully parsed", |
| | | dataWorkorderError: "Failed to parse part work order data", |
| | | metalplanDataSuccess: "Sheet metal plan data successfully parsed", |
| | | metalplanDataError: "Sheet metal plan data parsing failed", |
| | | idNotBeEmpty: "The primary key ID cannot be empty", |
| | | errorMonthEmpty:"Please select year and month" |
| | | }, |
| | | placeholder: { |
| | | startDate: "Start date", |
| | | endDate: "End date", |
| | | startMonth:"Start Month", |
| | | endMonth:"End Month", |
| | | to:"To", |
| | | documentNumber: "Please enter the document number", |
| | | customer: "Please enter the customer name", |
| | | planWorkOderNO: "Please enter the sheet metal plan work order number", |
| | | selectMonth:"Select Month" |
| | | }, |
| | | btns: { |
| | | batchPlanStartDay: "Batch modification of planned start date", |
| | | batchPlanEndDay: "Batch modification plan completion date", |
| | | confirm: "Confirm", |
| | | cancel: "Cancel", |
| | | }, |
| | | query: { |
| | | daterangePlanStartDay: "Planned start date", |
| | | daterangePlanEndDay: "Planned completion date", |
| | | documentNumber: "Document number", |
| | | customer: "Customer Name", |
| | | workOrderNo: "Work order number", |
| | | selectMonth: "Select Month", |
| | | statistical:"Statistical method", |
| | | selectDateRange: "Select interval" |
| | | }, |
| | | upload: { |
| | | prevText: "Drag the file here, or", |
| | | uploadPartWorkOrderData: "Upload part work order data", |
| | | uploadSheetMetalPlanData: "Upload sheet metal plan data", |
| | | info: "Upload an Excel file containing part work order information. The system will parse the data and save it locally for association with the part plan.", |
| | | uploadText: " Click to upload", |
| | | fileTypeImport: |
| | | "Only xls and xlsx format files are allowed to be imported.", |
| | | dataPreview: "Data Preview", |
| | | totalUpload: "Upload", |
| | | itemUpload: "part work order data in total", |
| | | confirmUpload: "Confirm upload", |
| | | cancel: "Cancel", |
| | | errorResult: "Import results", |
| | | uploadParsePartWorkOrderData: |
| | | "The part work order data has been successfully uploaded and parsed", |
| | | uploadParseGasPipelineData: |
| | | "The gas pipeline plan data has been successfully uploaded and parsed", |
| | | }, |
| | | table: { |
| | | mainPartNumber: "Main part number", |
| | | businessType: "Business type", |
| | | documentNumber: "Document number", |
| | | requirementType: "Requirements classification", |
| | | documentStatus: "Document Status", |
| | | updateBy: "Audit time", |
| | | workCenter: "Current process", |
| | | department: "Current process leader", |
| | | opStatus: "Current process status", |
| | | nextOpName: "Next process", |
| | | nextProcessDeparment: "Next Process Manager", |
| | | itemNumber: "Item number", |
| | | drawingNo: "Drawing No", |
| | | versionNumber: "Version number", |
| | | cheaperCode: "Low order code", |
| | | productionQuantity: "Production quantity", |
| | | planworkOrderTime: "Work order plan issuance time", |
| | | planEndDay: "System completion time", |
| | | seq: "Serial Number", |
| | | masterPlanner: "Master scheduler", |
| | | weekDay: "Sunday", |
| | | weekCycle: "Week cycle", |
| | | mainPartDrawingNumber: "Main component drawing number", |
| | | customer: "Customer Name", |
| | | goodProductsQuantity: "Quantity of good products", |
| | | processNumber: "Process number", |
| | | factoryCenter: "Work center", |
| | | dependencyDepartment: "Department", |
| | | planStartDay: "Planned commencement date", |
| | | planEndDayDate: "Planned completion date", |
| | | standbyNumber: "Material preparation part number", |
| | | standbyName: "Material name", |
| | | standbyStock: "Material preparation inventory", |
| | | departmentToNextProcessBelongs: "Material preparation inventory", |
| | | isSuspended: "Is it suspended", |
| | | isOutsourcing: "Outsourcing identification", |
| | | account: "Account set", |
| | | workOrderNo: "Work order number", |
| | | processName: "Process name", |
| | | startDateOfProcessPlan: "Start date of process plan", |
| | | endDateOfProcessPlan: "End date of process plan", |
| | | standardTime: "Standard working hours", |
| | | processOrder: "Process sorting", |
| | | integrationDay: "Integration date", |
| | | currentProcessNumber: "Current process number", |
| | | totalWorkingHoursOfProcess: "Total working hours of the process", |
| | | OrderCompletionDate: "Order completion date", |
| | | dateYearMonth: "Date", |
| | | resourceName: "Resource Group", |
| | | designWorkingHours: "Design working hours", |
| | | requiredWorkingHours: "Required working hours", |
| | | capacityLoad: "capacity load", |
| | | advancedMaterials: "advanced materials", |
| | | advancedDocumentNumber: "advanced document number", |
| | | advancedRequirementDay: "advanced requirement day", |
| | | isPlanComplete: "Complete plan", |
| | | isStockComplete: "Complete inventory set", |
| | | hasTurnback: "Is there a turnaround process", |
| | | hasRisk: "Risk identification", |
| | | // 产è½è§å |
| | | satndardProcessName: "Standard process name", |
| | | dayProduceType: "Type of daily production", |
| | | dayProduceNum: "Daily output quantity", |
| | | dayProduceUnit: "Daily production unit", |
| | | personnelNumber: "Number of personnel", |
| | | dayProduceAllNum: "Total daily output quantity", |
| | | days: "Days", |
| | | monthProduceAllNum: "Monthly output quantity", |
| | | remark: "notes", |
| | | }, |
| | | }; |
| | |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['apsPartRouteStat:export']" |
| | | >导åº</el-button> |
| | | >{{ $t(`common.common.export`) }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | type="success" |
| | | plain |
| | | icon="Refresh" |
| | | @click="handleRefresh" |
| | | :disabled="loading" |
| | | v-hasPermi="['apsPartRouteStat:edit']" |
| | | >æ´æ°</el-button> |
| | | >{{ $t(`common.common.update`) }}</el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar @queryTable="getList" :search="false"></right-toolbar> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script setup name="apsPartRouteStat"> |
| | | import { query,updateStat } from "@/api/mainPlan/partRouteStat.js"; |
| | | import { query, updateStat } from "@/api/mainPlan/partRouteStat.js"; |
| | | import { ref } from "vue"; |
| | | import * as XLSX from 'xlsx'; |
| | | import * as XLSX from "xlsx"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const loading = ref(true); |
| | | import { useI18n } from "vue-i18n"; //è¦å¨jsä¸ä½¿ç¨å½é
å |
| | | const { t, locale } = useI18n(); |
| | | const loading = ref(false); |
| | | const gridRef = ref(); |
| | | const height = ref(document.documentElement.clientHeight - 130 + "px;") |
| | | const height = ref(document.documentElement.clientHeight - 130 + "px;"); |
| | | const headers = ref([]); |
| | | const exportData = ref([]); |
| | | |
| | |
| | | showFooterOverflow: true, |
| | | height: height, |
| | | columnConfig: { |
| | | resizable: true |
| | | resizable: true, |
| | | }, |
| | | scrollX: { |
| | | enabled: true, |
| | | gt: 0, |
| | | threshold: 50 |
| | | threshold: 50, |
| | | }, |
| | | scrollY: { |
| | | enabled: true, |
| | | gt: 0, |
| | | threshold: 50 |
| | | } |
| | | threshold: 50, |
| | | }, |
| | | }); |
| | | |
| | | let tableColumn = [] |
| | | let tableData = [] |
| | | let tableColumn = []; |
| | | let tableData = []; |
| | | let merges = []; |
| | | |
| | | watch(locale, (newLocale) => { |
| | | getList() |
| | | },{immediate:true, deep:true}) |
| | | /** æ¥è¯¢é¶ä»¶ç»è®¡è¡¨å表 */ |
| | | function getList() { |
| | | let rowKey = 0 |
| | | let colKey = 0 |
| | | headers.value = [] |
| | | exportData.value = [] |
| | | tableColumn = [] |
| | | tableData = [] |
| | | let rowKey = 0; |
| | | let colKey = 0; |
| | | headers.value = []; |
| | | exportData.value = []; |
| | | tableColumn = []; |
| | | tableData = []; |
| | | loading.value = true; |
| | | query().then(response => { |
| | | const colList = [] |
| | | let headersOne = [] |
| | | let headersTwo = [] |
| | | if(response.code == '200'){ |
| | | query().then((response) => { |
| | | const colList = []; |
| | | let headersOne = []; |
| | | let headersTwo = []; |
| | | if (response.code == "200") { |
| | | if (!response.planTitle) { |
| | | loading.value = false; |
| | | return; |
| | | } |
| | | headersOne.push('æ¥æ'); |
| | | headersTwo.push('èµæºç»'); |
| | | headersOne.push(t('plan.table.dateYearMonth')); |
| | | headersTwo.push(t('plan.table.resourceName')); |
| | | colList.push({ |
| | | field: 'dateCol', |
| | | title: 'æ¥æ', |
| | | fixed: 'left', |
| | | children: [ |
| | | { field: `resourceName`, title: 'èµæºç»', width: 250, type: 'html'}, |
| | | ], |
| | | width: 160 |
| | | }) |
| | | response.planTitle.forEach(item => { |
| | | field: "dateCol", |
| | | title: t('plan.table.dateYearMonth'), |
| | | fixed: "left", |
| | | children: [ |
| | | { field: `resourceName`, title: t('plan.table.resourceName'), width: 250, type: "html" }, |
| | | ], |
| | | width: 160, |
| | | }); |
| | | response.planTitle.forEach((item) => { |
| | | headersOne.push(item); |
| | | headersOne.push(''); |
| | | headersOne.push(''); |
| | | headersTwo.push('设计工æ¶'); |
| | | headersTwo.push('鿱工æ¶'); |
| | | headersTwo.push('产è½è´è·'); |
| | | colKey++ |
| | | headersOne.push(""); |
| | | headersOne.push(""); |
| | | headersTwo.push(t("plan.table.designWorkingHours")); |
| | | headersTwo.push(t("plan.table.requiredWorkingHours")); |
| | | headersTwo.push(t("plan.table.capacityLoad")); |
| | | colKey++; |
| | | colList.push({ |
| | | field: `dateColTime${colKey}`, |
| | | title: item, |
| | | children: [ |
| | | { field: `designTimes${colKey}`, title: '设计工æ¶', width: 80}, |
| | | { field: `requireTimes${colKey}`, title: '鿱工æ¶', width: 80}, |
| | | { field: `capacityLoad${colKey}`, title: '产è½è´è·', width: 80, type: 'html'}, |
| | | { field: `designTimes${colKey}`, title: t("plan.table.designWorkingHours"), width: 80 }, |
| | | { field: `requireTimes${colKey}`, title: t("plan.table.requiredWorkingHours"), width: 80 }, |
| | | { |
| | | field: `capacityLoad${colKey}`, |
| | | title: t("plan.table.capacityLoad"), |
| | | width: 80, |
| | | type: "html", |
| | | }, |
| | | ], |
| | | width: 160 |
| | | }) |
| | | width: 160, |
| | | }); |
| | | }); |
| | | |
| | | headers.value.push(headersOne); |
| | | headers.value.push(headersTwo); |
| | | |
| | | const columnList = [...tableColumn, ...colList] |
| | | const dataList = [] |
| | | const columnList = [...tableColumn, ...colList]; |
| | | const dataList = []; |
| | | let startCol = 1; |
| | | |
| | | //è·åmap |
| | | response.planTable.forEach(mapItem => { |
| | | rowKey++ |
| | | response.planTable.forEach((mapItem) => { |
| | | rowKey++; |
| | | let lastCol = startCol + 2; |
| | | merges.push({ s: { r: 0, c: startCol }, e: { r: 0, c: lastCol} }); |
| | | merges.push({ s: { r: 0, c: startCol }, e: { r: 0, c: lastCol } }); |
| | | startCol = lastCol + 1; |
| | | let data = []; |
| | | const item = { |
| | | id: `${rowKey}` |
| | | } |
| | | id: `${rowKey}`, |
| | | }; |
| | | for (const [key, listValue] of Object.entries(mapItem)) { |
| | | data.push(key); |
| | | |
| | | |
| | | let tableKey = 0; |
| | | let flag = false; |
| | | listValue.forEach(listItem => { |
| | | |
| | | tableKey++ |
| | | listValue.forEach((listItem) => { |
| | | tableKey++; |
| | | item[`designTimes${tableKey}`] = listItem.designTimes; |
| | | item[`requireTimes${tableKey}`] = listItem.requireTimes; |
| | | item[`capacityLoad${tableKey}`] = listItem.capacityLoad > 100 ? `<font color="red">${listItem.capacityLoad}%</font>` :listItem.capacityLoad+'%'; |
| | | item[`capacityLoad${tableKey}`] = |
| | | listItem.capacityLoad > 100 |
| | | ? `<font color="red">${listItem.capacityLoad}%</font>` |
| | | : listItem.capacityLoad + "%"; |
| | | data.push(listItem.designTimes); |
| | | data.push(listItem.requireTimes); |
| | | data.push(listItem.capacityLoad+'%'); |
| | | data.push(listItem.capacityLoad + "%"); |
| | | if (listItem.capacityLoad > 100) { |
| | | flag = true; |
| | | } |
| | | }); |
| | | |
| | | item[`resourceName`] = flag ? `<div class='el-badge'><sup class="el-badge__content is-fixed is-dot"></sup>${key}</div>` : key; |
| | | item[`resourceName`] = flag |
| | | ? `<div class='el-badge'><sup class="el-badge__content is-fixed is-dot"></sup>${key}</div>` |
| | | : key; |
| | | } |
| | | exportData.value.push(data); |
| | | dataList.push(item); |
| | | }); |
| | | |
| | | const $grid = gridRef.value |
| | | |
| | | const $grid = gridRef.value; |
| | | if ($grid) { |
| | | tableColumn = columnList |
| | | tableData = [...tableData, ...dataList] |
| | | $grid.loadColumn(tableColumn) |
| | | $grid.loadData(tableData) |
| | | gridOptions.loading = false |
| | | tableColumn = columnList; |
| | | tableData = [...tableData, ...dataList]; |
| | | $grid.loadColumn(tableColumn); |
| | | $grid.loadData(tableData); |
| | | gridOptions.loading = false; |
| | | } |
| | | |
| | | loading.value = false; |
| | |
| | | |
| | | /** å¯¼åºæé®æä½ */ |
| | | function handleExport() { |
| | | |
| | | // åå¹¶è¡¨å¤´åæ°æ® |
| | | const finalData = [...headers.value, ...exportData.value]; |
| | | |
| | |
| | | { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } } |
| | | ]; */ |
| | | |
| | | ws['!merges'] = merges; |
| | | |
| | | ws["!merges"] = merges; |
| | | |
| | | // å建 workbook |
| | | const wb = XLSX.utils.book_new(); |
| | | // å° worksheet æ·»å å° workbook ä¸ |
| | | XLSX.utils.book_append_sheet(wb, ws, 'Sheet1'); |
| | | XLSX.utils.book_append_sheet(wb, ws, "Sheet1"); |
| | | // å¯¼åºæä»¶ |
| | | XLSX.writeFile(wb, `apsPartRouteStat_${new Date().getTime()}.xlsx`); |
| | | |
| | | } |
| | | |
| | | /** å·æ°æé®æä½ */ |
| | | function handleRefresh(){ |
| | | updateStat().then(response => { |
| | | if(response.code == '200'){ |
| | | function handleRefresh() { |
| | | loading.value = true; |
| | | updateStat().then((response) => { |
| | | if (response.code == "200") { |
| | | ElMessage({ |
| | | message: t("plan.message.update"), |
| | | type: "success", |
| | | }); |
| | | getList(); |
| | | loading.value = false; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | getList(); |
| | | // getList(); |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-row :gutter="20"> <el-col> |
| | | <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="计åå¼å·¥æ¥" style="width: 100%;"> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryRef" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | :label-width="locale === 'zh' ? '90px' : '180px'" |
| | | label-position="left" |
| | | > |
| | | <!-- <el-row :gutter="20"> |
| | | <el-col :span="6"> --> |
| | | <el-form-item :label="$t('plan.query.daterangePlanStartDay')"> |
| | | <el-date-picker |
| | | v-model="daterangePlanStartDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | style="width: 240px" |
| | | v-model="daterangePlanStartDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | :start-placeholder="$t('plan.placeholder.startDate')" |
| | | :end-placeholder="$t('plan.placeholder.endDate')" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="计åå®å·¥æ¥" style="width: 100%;"> |
| | | <!-- </el-col> |
| | | <el-col :span="6"> --> |
| | | <el-form-item :label="$t('plan.query.daterangePlanEndDay')"> |
| | | <el-date-picker |
| | | v-model="daterangePlanEndDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | style="width: 240px" |
| | | v-model="daterangePlanEndDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | :start-placeholder="$t('plan.placeholder.startDate')" |
| | | :end-placeholder="$t('plan.placeholder.endDate')" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="åæ®å·" prop="documentNumber" style="width: 100%;"> |
| | | <!-- </el-col> |
| | | <el-col :span="6"> --> |
| | | <el-form-item |
| | | :label="$t('plan.query.documentNumber')" |
| | | prop="documentNumber" |
| | | > |
| | | <el-input |
| | | v-model="queryParams.documentNumber" |
| | | placeholder="请è¾å
¥åæ®å·" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | style="width: 240px" |
| | | v-model="queryParams.documentNumber" |
| | | :placeholder="$t('plan.placeholder.documentNumber')" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="客æ·åç§°" prop="customer" style="width: 100%;"> |
| | | <!-- </el-col> |
| | | <el-col :span="6"> --> |
| | | <el-form-item :label="$t('plan.query.customer')" prop="customer"> |
| | | <el-input |
| | | v-model="queryParams.customer" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | style="width: 240px" |
| | | v-model="queryParams.customer" |
| | | :placeholder="$t('plan.placeholder.customer')" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" style="text-align: right;"> |
| | | <!-- </el-col> |
| | | <el-col :span="24" style="text-align: right;"> --> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">{{ |
| | | $t("common.common.query") |
| | | }}</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">{{ |
| | | $t("common.common.reset") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- </el-col> --> |
| | | <!-- </el-row> --> |
| | | </el-form> |
| | | </el-col> </el-row> |
| | | </el-row> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >æ¹éä¿®æ¹è®¡åå¼å·¥æ¥</el-button> |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >{{ $t("plan.btns.batchPlanStartDay") }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Edit" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >æ¹éä¿®æ¹è®¡åå®å·¥æ¥</el-button> |
| | | type="success" |
| | | plain |
| | | icon="Edit" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >{{ $t("plan.btns.batchPlanEndDay") }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | plain |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | v-hasPermi="['apsPlatePlan:import']" |
| | | >导å
¥</el-button> |
| | | type="info" |
| | | plain |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | v-hasPermi="['apsPlatePlan:import']" |
| | | >{{ $t("common.common.import") }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['apsPlatePlan:export']" |
| | | >导åº</el-button> |
| | | >{{ $t("common.common.export") }}</el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
| | | <right-toolbar |
| | | v-model:showSearch="showSearch" |
| | | @queryTable="getList" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | |
| | | <HxlhTable |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="planList" |
| | | :loading="loading" |
| | | :height="height" |
| | | @on-checkbox="handleCheckboxChange" |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="planList" |
| | | :loading="loading" |
| | | :height="height" |
| | | @on-checkbox="handleCheckboxChange" |
| | | > |
| | | </HxlhTable> |
| | | |
| | | <!-- æ·»å æä¿®æ¹é£é计å管çå¯¹è¯æ¡ --> |
| | | <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body @close="dialogCancel"> |
| | | <el-dialog |
| | | :title="upload.title" |
| | | v-model="upload.open" |
| | | width="90%" |
| | | append-to-body |
| | | @close="dialogCancel" |
| | | > |
| | | <el-row :gutter="10"> |
| | | <el-col> |
| | | <div style="border-bottom: 1px solid #ccc;" > |
| | | <p>ä¸ä¼ Excelæä»¶ï¼å
å«é¶ä»¶å·¥åä¿¡æ¯ãç³»ç»å°è§£ææ°æ®å¹¶ä¿åå°æ¬å°ï¼ç¨äºå
³èå°é¶ä»¶è®¡åä¸ã</p> |
| | | <div style="border-bottom: 1px solid #ccc"> |
| | | <p>{{ $t("plan.upload.info") }}</p> |
| | | </div> |
| | | </el-col> |
| | | <el-col > |
| | | <el-col> |
| | | <div></div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="10" style="margin-top: 20px;"> </el-row> |
| | | <el-row :gutter="10" style="margin-top: 20px"> </el-row> |
| | | <el-row> |
| | | <el-col> |
| | | <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="true" drag> |
| | | <el-upload |
| | | ref="uploadRef" |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url + '?updateSupport=' + upload.updateSupport" |
| | | :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | :auto-upload="true" |
| | | drag |
| | | > |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | <div class="el-upload__text"> |
| | | {{ $t("plan.upload.prevText") |
| | | }}<em>{{ $t("plan.upload.uploadText") }}</em> |
| | | </div> |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | <!-- <div class="el-upload__tip"> |
| | | <el-checkbox v-model="upload.updateSupport" />æ¯å¦æ´æ°å·²ç»åå¨çç¨æ·æ°æ® |
| | | </div> --> |
| | | <span>ä»
å
许导å
¥xlsãxlsxæ ¼å¼æä»¶ã</span> |
| | | <span>{{ $t("plan.upload.fileTypeImport") }}</span> |
| | | <!-- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">ä¸è½½æ¨¡æ¿</el-link> --> |
| | | </div> |
| | | </template> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col style="margin-top: 20px;"> |
| | | <el-col style="margin-top: 20px"> |
| | | <div v-show="isVisible"> |
| | | <el-alert icon="Check" :show-icon="true" title="é£éè®¡åæ°æ®å·²æåè§£æ" type="success" :closable="false"/> |
| | | <el-alert |
| | | icon="Check" |
| | | :show-icon="true" |
| | | :title="$t('plan.message.metalplanDataSuccess')" |
| | | type="success" |
| | | :closable="false" |
| | | /> |
| | | </div> |
| | | <div v-show="isError"> |
| | | <el-alert icon="Close" :show-icon="true" title="é£éè®¡åæ°æ®å·²è§£æå¤±è´¥" type="error" :closable="false"/> |
| | | <el-alert |
| | | icon="Close" |
| | | :show-icon="true" |
| | | :title="$t('plan.message.metalplanDataError')" |
| | | type="error" |
| | | :closable="false" |
| | | /> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-show="isVisible"> |
| | | <el-col> |
| | | <div> |
| | | <h2>æ°æ®é¢è§</h2> |
| | | <h2>{{$t("plan.upload.dataPreview")}}</h2> |
| | | </div> |
| | | <HxlhTable |
| | | style="width: 100%" |
| | | :columns="exampleColumns" |
| | | :data="exampleList" |
| | | :loading="loading" |
| | | :maxHeight="exampleHeight" |
| | | @on-checkbox="handleCheckboxChange" |
| | | style="width: 100%" |
| | | :columns="exampleColumns" |
| | | :data="exampleList" |
| | | :loading="loading" |
| | | :maxHeight="exampleHeight" |
| | | @on-checkbox="handleCheckboxChange" |
| | | > |
| | | </HxlhTable> |
| | | </el-col> |
| | | <el-col> |
| | | <div style="text-align: right;"> |
| | | <h4>å
±ä¸ä¼ <span style="color: blue;">{{ total }}</span>æ¡é¶ä»¶å·¥åæ°æ®</h4> |
| | | <div style="text-align: right"> |
| | | <h4> |
| | | {{$t("plan.upload.totalUpload")}}<span style="color: blue">{{ total }}</span |
| | | >{{$t("plan.upload.itemUpload")}} |
| | | </h4> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Check" |
| | | :disabled="planned" |
| | | @click="uploadParse" |
| | | v-hasPermi="['gasPiping:confirm']" |
| | | >确认ä¸ä¼ </el-button> |
| | | type="success" |
| | | plain |
| | | icon="Check" |
| | | :disabled="planned" |
| | | @click="uploadParse" |
| | | v-hasPermi="['gasPiping:confirm']" |
| | | >{{$t('plan.upload.confirmUpload')}}</el-button |
| | | > |
| | | <!-- <el-button type="primary" @click="submitFileForm">ç¡® å®</el-button> --> |
| | | <el-button @click="dialogCancel">å æ¶</el-button> |
| | | <el-button @click="dialogCancel">{{$t('plan.upload.cancel')}}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup name="ApsPlatePlan"> |
| | | import { listPlan, examplePlan, confirmPart} from "@/api/mainPlan/gasPiping.js"; |
| | | import HxlhTable from '@/components/HxlhTable/index.vue' |
| | | import { |
| | | listPlan, |
| | | examplePlan, |
| | | confirmPart, |
| | | } from "@/api/mainPlan/gasPiping.js"; |
| | | import HxlhTable from "@/components/HxlhTable/index.vue"; |
| | | import { ref } from "vue"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | import { ElMessage } from "element-plus"; |
| | | import { useI18n } from "vue-i18n"; //è¦å¨jsä¸ä½¿ç¨å½é
å |
| | | const { t, locale } = useI18n(); |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const { aps_is_suspended, aps_document_status, aps_account, aps_business_type } = proxy.useDict('aps_is_suspended', 'aps_document_status', 'aps_account', 'aps_business_type'); |
| | | const { |
| | | aps_is_suspended, |
| | | aps_document_status, |
| | | aps_account, |
| | | aps_business_type, |
| | | } = proxy.useDict( |
| | | "aps_is_suspended", |
| | | "aps_document_status", |
| | | "aps_account", |
| | | "aps_business_type" |
| | | ); |
| | | |
| | | const exampleList = ref([]); |
| | | const planList = ref([]); |
| | |
| | | const total = ref(0); |
| | | const daterangePlanStartDay = ref([]); |
| | | const daterangePlanEndDay = ref([]); |
| | | const height = ref(document.documentElement.clientHeight - 270 + "px;") |
| | | const height = ref(document.documentElement.clientHeight - 270 + "px;"); |
| | | const isVisible = ref(false); |
| | | const isError = ref(false); |
| | | const planned = ref(true); |
| | | const batchNumber = ref(null); |
| | | const exampleHeight = ref("500px"); |
| | | const uploadRef = ref(); |
| | | |
| | | |
| | | /*** ç¨æ·å¯¼å
¥åæ° */ |
| | | const upload = reactive({ |
| | |
| | | // æ¯å¦æ´æ°å·²ç»åå¨çç¨æ·æ°æ® |
| | | updateSupport: 0, |
| | | // 设置ä¸ä¼ ç请æ±å¤´é¨ |
| | | headers: { Authorization: "Bearer " + getToken() ,local: 'zhl'}, |
| | | headers: { Authorization: "Bearer " + getToken(), local: "zhl" }, |
| | | // ä¸ä¼ çå°å |
| | | url: import.meta.env.VITE_APP_BASE_API + "/aps/gasPiping/importData" |
| | | url: import.meta.env.VITE_APP_BASE_API + "/aps/gasPiping/importData", |
| | | }); |
| | | |
| | | // è¡¨æ ¼é
ç½® |
| | | const exampleColumns = ref([ |
| | | { type: 'seq', title: 'åºå·', width: 60 }, |
| | | { |
| | | title: '主计åå', |
| | | field: 'masterPlanner', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '卿¥', |
| | | field: 'weekDay', |
| | | width: 100, |
| | | formatter: (({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | | const weekDay = new Date(cellValue); |
| | | const year = weekDay.getFullYear(); |
| | | const month = String(weekDay.getMonth() + 1).padStart(2, '0'); |
| | | const day = String(weekDay.getDate()).padStart(2, '0'); |
| | | return `${month}-${day}`; |
| | | } |
| | | return ''; |
| | | }) |
| | | }, |
| | | { |
| | | title: 'å¨åº¦', |
| | | field: 'weekCycle', |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: '主件æå·', |
| | | field: 'mainPartNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '主件å¾å·', |
| | | field: 'mainPartDrawingNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '客æ·åç§°', |
| | | field: 'customer', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'ä¸å¡ç±»å', |
| | | field: 'businessType', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'åæ®å·', |
| | | field: 'documentNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'éæ±åç±»', |
| | | field: 'requirementType', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'åæ®ç¶æ', |
| | | field: 'documentStatus', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'æå·', |
| | | field: 'itemNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å¾å·', |
| | | field: 'drawingNo', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'çæ¬å·', |
| | | field: 'versionNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ç产æ°é', |
| | | field: 'productionQuantity', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'è¯åæ°é', |
| | | field: 'goodProductsQuantity', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å·¥åºå·', |
| | | field: 'processNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å·¥ä½ä¸å¿', |
| | | field: 'workCenter', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'æå±é¨é¨', |
| | | field: 'department', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计åå¼å·¥æ¥', |
| | | field: 'planStartDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计åå®å·¥æ¥', |
| | | field: 'planEndDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '夿æå·', |
| | | field: 'standbyNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '夿åç§°', |
| | | field: 'standbyName', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: '夿åºå', |
| | | field: 'standbyStock', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ä¸éå·¥åºæå±é¨é¨', |
| | | field: 'nextProcessDeparment', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'æ¯å¦æèµ·', |
| | | field: 'isSuspended', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å¤åæ è¯', |
| | | field: 'isOutsourcing', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'è´¦å¥', |
| | | field: 'account', |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'ä¸é¶ç©æ', |
| | | // field: 'advancedMaterials', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶åæ®å·', |
| | | // field: 'advancedDocumentNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶éæ±æ¥æ', |
| | | // field: 'advancedRequirementDay', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: '计åé½å¥', |
| | | // field: 'isPlanComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'åºåé½å¥', |
| | | // field: 'isStockComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦ææè¿å·¥åº', |
| | | // field: 'hasTurnback', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: 'é£é©æ è¯', |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]); |
| | | const exampleColumns = ref([]); |
| | | |
| | | // è¡¨æ ¼é
ç½® |
| | | const columns = ref([ |
| | | { type: 'checkbox', width: 60, align:"center"}, |
| | | { type: 'seq', title: 'åºå·', width: 60 }, |
| | | { |
| | | title: '主计åå', |
| | | field: 'masterPlanner', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '卿¥', |
| | | field: 'weekDay', |
| | | width: 100, |
| | | formatter: (({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | | const weekDay = new Date(cellValue); |
| | | const year = weekDay.getFullYear(); |
| | | const month = String(weekDay.getMonth() + 1).padStart(2, '0'); |
| | | const day = String(weekDay.getDate()).padStart(2, '0'); |
| | | return `${month}-${day}`; |
| | | } |
| | | return ''; |
| | | }) |
| | | }, |
| | | { |
| | | title: 'å¨åº¦', |
| | | field: 'weekCycle', |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: '主件æå·', |
| | | field: 'mainPartNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '主件å¾å·', |
| | | field: 'mainPartDrawingNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '客æ·åç§°', |
| | | field: 'customer', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'ä¸å¡ç±»å', |
| | | field: 'businessType', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'åæ®å·', |
| | | field: 'documentNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'éæ±åç±»', |
| | | field: 'requirementType', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'åæ®ç¶æ', |
| | | field: 'documentStatus', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'æå·', |
| | | field: 'itemNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å¾å·', |
| | | field: 'drawingNo', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'çæ¬å·', |
| | | field: 'versionNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ç产æ°é', |
| | | field: 'productionQuantity', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'è¯åæ°é', |
| | | field: 'goodProductsQuantity', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å·¥åºå·', |
| | | field: 'processNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å·¥ä½ä¸å¿', |
| | | field: 'workCenter', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'æå±é¨é¨', |
| | | field: 'department', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计åå¼å·¥æ¥', |
| | | field: 'planStartDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计åå®å·¥æ¥', |
| | | field: 'planEndDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '夿æå·', |
| | | field: 'standbyNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '夿åç§°', |
| | | field: 'standbyName', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '夿åºå', |
| | | field: 'standbyStock', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ä¸éå·¥åºæå±é¨é¨', |
| | | field: 'nextProcessDeparment', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'æ¯å¦æèµ·', |
| | | field: 'isSuspended', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å¤åæ è¯', |
| | | field: 'isOutsourcing', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'è´¦å¥', |
| | | field: 'account', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ä¸é¶ç©æ', |
| | | field: 'advancedMaterials', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ä¸é¶åæ®å·', |
| | | field: 'advancedDocumentNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ä¸é¶éæ±æ¥æ', |
| | | field: 'advancedRequirementDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计åé½å¥', |
| | | field: 'isPlanComplete', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'åºåé½å¥', |
| | | field: 'isStockComplete', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'æ¯å¦ææè¿å·¥åº', |
| | | field: 'hasTurnback', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'é£é©æ è¯', |
| | | field: 'hasRisk', |
| | | width: 100, |
| | | }, |
| | | ]); |
| | | |
| | | const columns = ref([]); |
| | | |
| | | const data = reactive({ |
| | | form: {}, |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | customer: null, |
| | | documentNumber: null |
| | | documentNumber: null, |
| | | }, |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | id: [{ required: true, message:t("plan.message.idNotBeEmpty"), trigger: "blur" }], |
| | | }, |
| | | }); |
| | | |
| | | const { queryParams } = toRefs(data); |
| | | watch(locale, (newLocale) => { |
| | | exampleColumns.value = [ |
| | | { type: "seq", title: t("plan.table.seq"), width: 60 }, |
| | | { |
| | | title: t("plan.table.masterPlanner"), |
| | | field: "masterPlanner", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.weekDay"), |
| | | field: "weekDay", |
| | | width: 100, |
| | | formatter: ({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | | const weekDay = new Date(cellValue); |
| | | const year = weekDay.getFullYear(); |
| | | const month = String(weekDay.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(weekDay.getDate()).padStart(2, "0"); |
| | | return `${month}-${day}`; |
| | | } |
| | | return ""; |
| | | }, |
| | | }, |
| | | { |
| | | title: t("plan.table.weekCycle"), |
| | | field: "weekCycle", |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: t("plan.table.mainPartNumber"), |
| | | field: "mainPartNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.mainPartDrawingNumber"), |
| | | field: "mainPartDrawingNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.customer"), |
| | | field: "customer", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.businessType"), |
| | | field: "businessType", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.documentNumber"), |
| | | field: "documentNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.requirementType"), |
| | | field: "requirementType", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.documentStatus"), |
| | | field: "documentStatus", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "itemNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.drawingNo"), |
| | | field: "drawingNo", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.versionNumber"), |
| | | field: "versionNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.productionQuantity"), |
| | | field: "productionQuantity", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.goodProductsQuantity"), |
| | | field: "goodProductsQuantity", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.processNumber"), |
| | | field: "processNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.factoryCenter"), |
| | | field: "workCenter", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.dependencyDepartment"), |
| | | field: "department", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.planStartDay"), |
| | | field: "planStartDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.planEndDayDate"), |
| | | field: "planEndDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyNumber"), |
| | | field: "standbyNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyName"), |
| | | field: "standbyName", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyStock"), |
| | | field: "standbyStock", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.departmentToNextProcessBelongs"), |
| | | field: "nextProcessDeparment", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.isSuspended"), |
| | | field: "isSuspended", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.isOutsourcing"), |
| | | field: "isOutsourcing", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.account"), |
| | | field: "account", |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'ä¸é¶ç©æ', |
| | | // field: 'advancedMaterials', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶åæ®å·', |
| | | // field: 'advancedDocumentNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶éæ±æ¥æ', |
| | | // field: 'advancedRequirementDay', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: '计åé½å¥', |
| | | // field: 'isPlanComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'åºåé½å¥', |
| | | // field: 'isStockComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦ææè¿å·¥åº', |
| | | // field: 'hasTurnback', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: 'é£é©æ è¯', |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]; |
| | | columns.value = [ |
| | | { type: "checkbox", width: 60, align: "center" }, |
| | | { type: "seq", title: t("plan.table.seq"), width: 60 }, |
| | | { |
| | | title: t("plan.table.masterPlanner"), |
| | | field: "masterPlanner", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.weekDay"), |
| | | field: "weekDay", |
| | | width: 100, |
| | | formatter: ({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | | const weekDay = new Date(cellValue); |
| | | const year = weekDay.getFullYear(); |
| | | const month = String(weekDay.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(weekDay.getDate()).padStart(2, "0"); |
| | | return `${month}-${day}`; |
| | | } |
| | | return ""; |
| | | }, |
| | | }, |
| | | { |
| | | title: t("plan.table.weekCycle"), |
| | | field: "weekCycle", |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: t("plan.table.mainPartNumber"), |
| | | field: "mainPartNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.mainPartDrawingNumber"), |
| | | field: "mainPartDrawingNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.customer"), |
| | | field: "customer", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.businessType"), |
| | | field: "businessType", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.documentNumber"), |
| | | field: "documentNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.requirementType"), |
| | | field: "requirementType", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.documentStatus"), |
| | | field: "documentStatus", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "itemNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.drawingNo"), |
| | | field: "drawingNo", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.versionNumber"), |
| | | field: "versionNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.productionQuantity"), |
| | | field: "productionQuantity", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.goodProductsQuantity"), |
| | | field: "goodProductsQuantity", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.processNumber"), |
| | | field: "processNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.factoryCenter"), |
| | | field: "workCenter", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.dependencyDepartment"), |
| | | field: "department", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.planStartDay"), |
| | | field: "planStartDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.planEndDayDate"), |
| | | field: "planEndDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyNumber"), |
| | | field: "standbyNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyName"), |
| | | field: "standbyName", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyStock"), |
| | | field: "standbyStock", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.departmentToNextProcessBelongs"), |
| | | field: "nextProcessDeparment", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.isSuspended"), |
| | | field: "isSuspended", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.isOutsourcing"), |
| | | field: "isOutsourcing", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.account"), |
| | | field: "account", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.advancedMaterials"), |
| | | field: "advancedMaterials", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.advancedDocumentNumber"), |
| | | field: "advancedDocumentNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.advancedRequirementDay"), |
| | | field: "advancedRequirementDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.isPlanComplete"), |
| | | field: "isPlanComplete", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.isStockComplete"), |
| | | field: "isStockComplete", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.hasTurnback"), |
| | | field: "hasTurnback", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.hasRisk"), |
| | | field: "hasRisk", |
| | | width: 100, |
| | | }, |
| | | ]; |
| | | getList() |
| | | },{ immediate: true, deep: true }); |
| | | /** æ¥è¯¢é£é计å临æ¶ç®¡çå表 */ |
| | | function getExampleList() { |
| | | loading.value = true; |
| | | queryParams.value = {}; |
| | | queryParams.value.batchNumber = batchNumber.value; |
| | | examplePlan(queryParams.value).then(response => { |
| | | examplePlan(queryParams.value).then((response) => { |
| | | exampleList.value = response.rows; |
| | | total.value = response.total; |
| | | loading.value = false; |
| | |
| | | function getList() { |
| | | loading.value = true; |
| | | queryParams.value.params = {}; |
| | | if (null != daterangePlanStartDay && '' !== daterangePlanStartDay) { |
| | | queryParams.value.params["beginPlanStartDay"] = daterangePlanStartDay.value[0]; |
| | | queryParams.value.params["endPlanStartDay"] = daterangePlanStartDay.value[1]; |
| | | if (null != daterangePlanStartDay && "" !== daterangePlanStartDay) { |
| | | queryParams.value.params["beginPlanStartDay"] = |
| | | daterangePlanStartDay.value[0]; |
| | | queryParams.value.params["endPlanStartDay"] = |
| | | daterangePlanStartDay.value[1]; |
| | | } |
| | | if (null != daterangePlanEndDay && '' !== daterangePlanEndDay) { |
| | | if (null != daterangePlanEndDay && "" !== daterangePlanEndDay) { |
| | | queryParams.value.params["beginPlanEndDay"] = daterangePlanEndDay.value[0]; |
| | | queryParams.value.params["endPlanEndDay"] = daterangePlanEndDay.value[1]; |
| | | } |
| | | listPlan(queryParams.value).then(response => { |
| | | listPlan(queryParams.value).then((response) => { |
| | | planList.value = response.rows; |
| | | loading.value = false; |
| | | }); |
| | |
| | | }; |
| | | |
| | | /** æ¹éä¿®æ¹è®¡åå¼å·¥æ¥æé®æä½ */ |
| | | function plannedStart() { |
| | | |
| | | } |
| | | function plannedStart() {} |
| | | |
| | | /** æ¹éä¿®æ¹è®¡åå®å·¥æ¥æé®æä½ */ |
| | | function plannedEnd() { |
| | | |
| | | } |
| | | function plannedEnd() {} |
| | | |
| | | /** 导å
¥æé®æä½ */ |
| | | function handleImport() { |
| | | upload.title = "æ°ä½ç®¡è·¯è®¡åæ°æ®ä¸ä¼ "; |
| | | upload.title = t("plan.upload.uploadGasPipelineData"); |
| | | upload.open = true; |
| | | }; |
| | | } |
| | | |
| | | /** å¯¼åºæé®æä½ */ |
| | | function handleExport() { |
| | | proxy.download('aps/gasPiping/export', { |
| | | ...queryParams.value |
| | | }, `plan_${new Date().getTime()}.xlsx`) |
| | | proxy.download( |
| | | "aps/gasPiping/export", |
| | | { |
| | | ...queryParams.value, |
| | | }, |
| | | `plan_${new Date().getTime()}.xlsx` |
| | | ); |
| | | } |
| | | |
| | | /** ä¸è½½æ¨¡æ¿æä½ */ |
| | | function importTemplate() { |
| | | proxy.download("system/user/importTemplate", { |
| | | }, `user_template_${new Date().getTime()}.xlsx`); |
| | | }; |
| | | proxy.download( |
| | | "system/user/importTemplate", |
| | | {}, |
| | | `user_template_${new Date().getTime()}.xlsx` |
| | | ); |
| | | } |
| | | |
| | | /** buildEexample */ |
| | | function buildEexample() { |
| | | proxy.$refs["uploadRef"].submit(); |
| | | }; |
| | | } |
| | | |
| | | /**æä»¶ä¸ä¼ ä¸å¤ç */ |
| | | const handleFileUploadProgress = (event, file, fileList) => { |
| | |
| | | |
| | | /** æä»¶ä¸ä¼ æåå¤ç */ |
| | | const handleFileSuccess = (response, file, fileList) => { |
| | | if(response.code == '200'){ |
| | | if (response.code == "200") { |
| | | batchNumber.value = response.data; |
| | | isVisible.value = true; |
| | | planned.value = false; |
| | | isError.value = false; |
| | | getExampleList(); |
| | | }else{ |
| | | } else { |
| | | isError.value = true; |
| | | proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导å
¥ç»æ", { dangerouslyUseHTMLString: true }); |
| | | proxy.$alert( |
| | | "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + |
| | | response.msg + |
| | | "</div>", |
| | | t("plan.upload.errorResult"), |
| | | { dangerouslyUseHTMLString: true, |
| | | confirmButtonText: t("plan.btns.confirm"), |
| | | cancelButtonText: t("plan.btns.cancel"), |
| | | } |
| | | ); |
| | | } |
| | | proxy.$refs["uploadRef"].handleRemove(file); |
| | | upload.isUploading = false; |
| | |
| | | function uploadParse() { |
| | | queryParams.value.params = {}; |
| | | queryParams.value.params["batchNumber"] = batchNumber.value; |
| | | confirmPart(queryParams.value).then(response => { |
| | | confirmPart(queryParams.value).then((response) => { |
| | | exampleList.value = response.rows; |
| | | loading.value = false; |
| | | isVisible.value = false; |
| | |
| | | planned.value = true; |
| | | upload.open = false; |
| | | ElMessage({ |
| | | message: 'æ°ä½ç®¡è·¯è®¡åæ°æ®å·²æåä¸ä¼ åè§£æ', |
| | | type: 'success', |
| | | }) |
| | | message: t("plan.upload.uploadParseGasPipelineData"), |
| | | type: "success", |
| | | }); |
| | | getList(); |
| | | }); |
| | | } |
| | | |
| | | /** dialogåæ¶ */ |
| | | function dialogCancel(){ |
| | | function dialogCancel() { |
| | | if (uploadRef.value) { |
| | | uploadRef.value.clearFiles(); |
| | | } |
| | |
| | | upload.isUploading = false; |
| | | } |
| | | |
| | | getList(); |
| | | // getList(); |
| | | </script> |
| | | <style lang="css" scoped> |
| | | h4 { |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | :model="queryParams" |
| | | ref="queryRef" |
| | | :inline="true" |
| | | label-width="68px" |
| | | label-width="100px" |
| | | label-position="left" |
| | | > |
| | | <el-row type="flex" justify="left"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="éæ©æä»½" prop="description"> |
| | | <el-form-item :label="$t('plan.query.selectMonth')" prop="description"> |
| | | <el-date-picker |
| | | clearable |
| | | v-model="queryParams.date" |
| | | type="month" |
| | | value-format="YYYY-MM" |
| | | placeholder="éæ©æä»½" |
| | | :placeholder="$t('plan.query.selectMonth')" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | <el-col :span="18" style="text-align: right"> |
| | | <el-form-item class="column-with-margin"> |
| | | <el-button type="primary" icon="Search" @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | >{{$t("common.common.query")}}</el-button |
| | | > |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">{{$t("common.common.reset")}}</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <div class="box_container"> |
| | | <el-row> |
| | | <el-col :span="!clickedTableRef?22:20"> |
| | | <div class="title_text">管路è§å产è½</div> |
| | | <div class="title_text">{{$t('plan.title.pipePlanCapacity')}}</div> |
| | | </el-col> |
| | | <el-col :span="1" v-if="!clickedTableRef"> |
| | | <el-button |
| | | class="title_btn" |
| | | type="default" |
| | | @click="editRowEvent" >ç¼è¾</el-button> |
| | | @click="editRowEvent" >{{$t("common.common.edit")}}</el-button> |
| | | </el-col> |
| | | <el-col :span="1.8" v-if="clickedTableRef"> |
| | | <el-button |
| | |
| | | @click="saveRowEvent" |
| | | v-hasPermi="['aps:gasPipelineCapacityPlan:add']" |
| | | > |
| | | ä¿å |
| | | {{$t("common.common.save")}} |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1" v-if="clickedTableRef"> |
| | | <el-button |
| | | class="title_btn ml20" |
| | | type="default" |
| | | @click="handleCancleStaus">åæ¶</el-button> |
| | | @click="handleCancleStaus">{{$t("common.common.cancel")}}</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | show-overflow |
| | | :loading="loading" |
| | | :height="height" |
| | | :edit-config="{ trigger: 'click', mode: 'row', showStatus: true }" |
| | | :column-config="{ resizable: true, useKey: true }" |
| | | :data="routePlanList" |
| | | size="small" |
| | | > |
| | | <vxe-column field="processName" title="æ åå·¥åºåç§°" min-width="150" fixed="left"> |
| | | <vxe-column field="processName" :width="locale === 'zh' ? '150px' : '200px'" :title="$t('plan.table.satndardProcessName')" fixed="left"> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '150px' : '200px'" |
| | | field="dayProduceType" |
| | | title="æ¥äº§åºç±»å" |
| | | min-width="160" |
| | | :title="$t('plan.table.dayProduceType')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-select |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="dayProduceNum" |
| | | title="æ¥äº§åºæ°é" |
| | | min-width="200" |
| | | :title="$t('plan.table.dayProduceNum')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.dayProduceNum" size="mini" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '150px' : '200px'" |
| | | field="dayProduceUnit" |
| | | title="æ¥äº§åºåä½" |
| | | min-width="200" |
| | | :title="$t('plan.table.dayProduceUnit')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input v-model="row.dayProduceUnit" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="personnelNumber" |
| | | title="äººåæ°é" |
| | | min-width="200" |
| | | :title="$t('plan.table.personnelNumber')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.personnelNumber" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="dayProduceAllNum" |
| | | title="æ¥äº§åºæ»æ°é" |
| | | min-width="200" |
| | | :title="$t('plan.table.dayProduceAllNum')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.dayProduceAllNum" disabled /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="days" |
| | | title="天æ°" |
| | | min-width="200" |
| | | :title="$t('plan.table.days')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.days" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="monthProduceAllNum" |
| | | title="æäº§åºæ°é" |
| | | min-width="200" |
| | | :title="$t('plan.table.monthProduceAllNum')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.monthProduceAllNum" disabled /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '150px' : '200px'" |
| | | field="remark" |
| | | title="夿³¨" |
| | | min-width="200" |
| | | :title="$t('plan.table.remark')" |
| | | > |
| | | <!-- :edit-render="{ autoFocus: 'input' }" --> |
| | | <!-- <template #edit="{ row }"> |
| | |
| | | <div class="box_container"> |
| | | <el-row> |
| | | <el-col :span="!clickedTableRefGas?22:20"> |
| | | <div class="title_text">æ°æè§å产è½</div> |
| | | <div class="title_text">{{$t("plan.title.gasPlanCapacity")}}</div> |
| | | </el-col> |
| | | <el-col :span="1" v-if="!clickedTableRefGas"> |
| | | <el-button |
| | | class="title_btn" |
| | | type="default" |
| | | @click="editRowEventGas" >ç¼è¾</el-button> |
| | | @click="editRowEventGas" >{{$t("common.common.edit")}}</el-button> |
| | | </el-col> |
| | | <el-col :span="1.8" v-if="clickedTableRefGas"> |
| | | <el-button |
| | |
| | | @click="saveRowEvent1" |
| | | v-hasPermi="['aps:gasPipelineCapacityPlan:add']" |
| | | > |
| | | ä¿å |
| | | {{$t("common.common.save")}} |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1" v-if="clickedTableRefGas"> |
| | | <el-button |
| | | class="title_btn ml20" |
| | | type="default" |
| | | @click="handleCancleStausGas">åæ¶</el-button> |
| | | @click="handleCancleStausGas">{{$t("common.common.cancel")}}</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="tabel_container"> |
| | |
| | | size="small" |
| | | :loading="loading2" |
| | | :height="height" |
| | | :edit-config="{ mode: 'row', trigger: 'click', showStatus: true }" |
| | | :column-config="{ resizable: true, useKey: true }" |
| | | :data="gasPlanList" |
| | | > |
| | | <vxe-column field="processName" title="æ åå·¥åºåç§°" min-width="150" fixed="left"> |
| | | <vxe-column :width="locale === 'zh' ? '150px' : '200px'" field="processName" :title="$t('plan.table.satndardProcessName')" fixed="left"> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '150px' : '200px'" |
| | | field="dayProduceType" |
| | | title="æ¥äº§åºç±»å" |
| | | min-width="160" |
| | | :title="$t('plan.table.dayProduceType')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-select |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="dayProduceNum" |
| | | title="æ¥äº§åºæ°é" |
| | | min-width="200" |
| | | :title="$t('plan.table.dayProduceNum')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.dayProduceNum" size="mini" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '150px' : '200px'" |
| | | field="dayProduceUnit" |
| | | title="æ¥äº§åºåä½" |
| | | min-width="200" |
| | | :title="$t('plan.table.dayProduceUnit')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input v-model="row.dayProduceUnit" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="personnelNumber" |
| | | title="äººåæ°é" |
| | | min-width="200" |
| | | :title="$t('plan.table.personnelNumber')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.personnelNumber" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="dayProduceAllNum" |
| | | title="æ¥äº§åºæ»æ°é" |
| | | min-width="200" |
| | | :title="$t('plan.table.dayProduceAllNum')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.dayProduceAllNum" disabled /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="days" |
| | | title="天æ°" |
| | | min-width="200" |
| | | :title="$t('plan.table.days')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.days" /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '180px' : '200px'" |
| | | field="monthProduceAllNum" |
| | | title="æäº§åºæ°é" |
| | | min-width="200" |
| | | :title="$t('plan.table.monthProduceAllNum')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input-number v-model="row.monthProduceAllNum" disabled /> |
| | |
| | | </template> |
| | | </vxe-column> |
| | | <vxe-column |
| | | :width="locale === 'zh' ? '150px' : '200px'" |
| | | field="remark" |
| | | title="夿³¨" |
| | | min-width="200" |
| | | :title="$t('plan.table.remark')" |
| | | > |
| | | <!-- <template #edit="{ row }"> |
| | | <el-input |
| | |
| | | import { ElMessage } from "element-plus"; |
| | | import { listGasPlan, getGasPlanSave } from "@/api/mainPlan/gasPlanning"; |
| | | const height = ref(document.documentElement.clientHeight - 400 + "px;"); |
| | | import { useI18n } from "vue-i18n"; //è¦å¨jsä¸ä½¿ç¨å½é
å |
| | | const { t, locale } = useI18n(); |
| | | const loading = ref(false); |
| | | const loading2 = ref(false); |
| | | const clickedQuery = ref(false); |
| | |
| | | const $table = tableRef.value; |
| | | if ($table) { |
| | | $table.clearEdit().then(() => { |
| | | // loading.value = true |
| | | loading.value = true |
| | | // setTimeout(() => { |
| | | // loading.value = false |
| | | // VxeUI.modal.message({ content: `ä¿åæåï¼name=${row.name}`, status: 'success' }) |
| | |
| | | // } |
| | | // }; |
| | | async function getRouteList(year, month) { |
| | | loading.value = true; |
| | | const res = await listGasPlan({ |
| | | major: "管路", |
| | | year, |
| | | month, |
| | | }); |
| | | console.log(res.rows, "getList"); |
| | | routePlanList.value = res.rows; |
| | | routePlanList.value = routePlanList.value.map((item, index) => { |
| | | return { |
| | |
| | | loading.value = false; |
| | | } |
| | | async function getGasList(year, month) { |
| | | loading2.value = true; |
| | | const res = await listGasPlan({ |
| | | major: "æ°æ", |
| | | year, |
| | |
| | | // row.monthProduceAllNum = row.dayProduceAllNum * row.days; |
| | | // } |
| | | function cellClickEvent(e, row) { |
| | | console.log(row,"cellClickEvent") |
| | | if(row.dayProduceType==="1"){ |
| | | row.dayProduceAllNum = row.dayProduceNum * row.personnelNumber; |
| | | }else{ |
| | |
| | | message: "æ°æ®ä¿åæå", |
| | | type: "success", |
| | | }); |
| | | loading.value = false; |
| | | loading2.value = false; |
| | | handleQuery(); |
| | | } |
| | | async function handleSave2(row) { |
| | | const year = queryParams.value.date.split("-")[0]; |
| | | const month = parseInt(queryParams.value.date.split("-")[1]); |
| | | console.log(row, "baocun"); |
| | | // gasPlanList.value = gasPlanList.value.map((item) => { |
| | | // return { |
| | | // ...item, |
| | | // major: "æ°ä½", |
| | | // year, |
| | | // month, |
| | | // }; |
| | | // }); |
| | | // routePlanList.value = routePlanList.value.map((item) => { |
| | | // return { |
| | | // ...item, |
| | | // major: "管路", |
| | | // year, |
| | | // month, |
| | | // }; |
| | | // }); |
| | | const res = await getGasPlanSave([ |
| | | { |
| | | ...row, |
| | | major: "æ°æ", |
| | | year, |
| | | month, |
| | | }, |
| | | ]); |
| | | ElMessage({ |
| | | message: "æ°æ®ä¿åæå", |
| | | type: "success", |
| | | }); |
| | | handleQuery(); |
| | | console.log(res, "akiwjciwj"); |
| | | } |
| | | onMounted(() => { |
| | | // getRouteList(); |
| | | // getGasList(); |
| | | }); |
| | | // async function handleSave2(row) { |
| | | // const year = queryParams.value.date.split("-")[0]; |
| | | // const month = parseInt(queryParams.value.date.split("-")[1]); |
| | | // console.log(row, "baocun"); |
| | | // // gasPlanList.value = gasPlanList.value.map((item) => { |
| | | // // return { |
| | | // // ...item, |
| | | // // major: "æ°ä½", |
| | | // // year, |
| | | // // month, |
| | | // // }; |
| | | // // }); |
| | | // // routePlanList.value = routePlanList.value.map((item) => { |
| | | // // return { |
| | | // // ...item, |
| | | // // major: "管路", |
| | | // // year, |
| | | // // month, |
| | | // // }; |
| | | // // }); |
| | | // const res = await getGasPlanSave([ |
| | | // { |
| | | // ...row, |
| | | // major: "æ°æ", |
| | | // year, |
| | | // month, |
| | | // }, |
| | | // ]); |
| | | // ElMessage({ |
| | | // message: "æ°æ®ä¿åæå", |
| | | // type: "success", |
| | | // }); |
| | | // handleQuery(); |
| | | // console.log(res, "akiwjciwj"); |
| | | // } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .box_container { |
| | |
| | | ref="queryRef" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | label-width="68px" |
| | | :label-width="locale === 'zh' ? '68px' : '134px'" |
| | | > |
| | | <el-row type="flex" justify="left"> |
| | | <el-form-item label="ç»è®¡æ¹å¼"> |
| | | <el-form-item :label="$t('plan.query.statistical')"> |
| | | <el-select |
| | | v-model="queryParams.searchType" |
| | | style="width: 200px" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="éæ©åºé´"> |
| | | <el-form-item :label="$t('plan.query.selectDateRange')"> |
| | | <div v-if="!dayCom"> |
| | | <el-date-picker |
| | | v-model="queryParams.monthRange" |
| | | type="monthrange" |
| | | range-separator="è³" |
| | | start-placeholder="éæ©å¼å§æä»½" |
| | | end-placeholder="éæ©ç»ææä»½" |
| | | :range-separator="$t('plan.placeholder.to')" |
| | | :start-placeholder="$t('plan.placeholder.startMonth')" |
| | | :end-placeholder="$t('plan.placeholder.endMonth')" |
| | | /> |
| | | </div> |
| | | <div v-else> |
| | | <el-date-picker |
| | | v-model="queryParams.monthDays" |
| | | type="month" |
| | | placeholder="éæ©æä»½" |
| | | :placeholder="$t('plan.placeholder.selectMonth')" |
| | | /> |
| | | </div> |
| | | </el-form-item> |
| | | |
| | | <el-form-item class="column-with-margin"> |
| | | <el-button type="primary" icon="Search" @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">{{ |
| | | $t("common.common.query") |
| | | }}</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">{{ |
| | | $t("common.common.reset") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['aps:apsGasPipingRouteStat:exportExcel']" |
| | | >导åº</el-button |
| | | :disabled="loading" |
| | | >{{ $t("common.common.export") }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | type="success" |
| | | plain |
| | | icon="Refresh" |
| | | @click="handleRefresh" |
| | | v-hasPermi="['aps:apsGasPipingRouteStat:computeCapacity']" |
| | | :disabled="loading" |
| | | >æ´æ°</el-button |
| | | >{{ $t("common.common.update") }}</el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar @queryTable="handleQuery" :search="false"></right-toolbar> |
| | |
| | | import { ref } from "vue"; |
| | | import * as XLSX from "xlsx"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { useI18n } from "vue-i18n"; //è¦å¨jsä¸ä½¿ç¨å½é
å |
| | | const { t, locale } = useI18n(); |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const loading = ref(false); |
| | |
| | | queryParams: { |
| | | monthRange: "", |
| | | monthDays: "", |
| | | searchType: "ææç»è®¡", |
| | | searchType: t("plan.options.monthlyStatic"), |
| | | }, |
| | | }); |
| | | let searchTypeValue = ref("month"); |
| | | const options = [ |
| | | { |
| | | value: "month", |
| | | label: "ææç»è®¡", |
| | | }, |
| | | { |
| | | value: "day", |
| | | label: "ææ¥ç»è®¡", |
| | | }, |
| | | ]; |
| | | let options = ref([]); |
| | | const { queryParams } = toRefs(data); |
| | | const gridOptions = reactive({ |
| | | border: true, |
| | |
| | | let tableColumn = []; |
| | | let tableData = []; |
| | | let merges = []; |
| | | watch(locale, (newLocale) => { |
| | | options.value = [ |
| | | { |
| | | value: "month", |
| | | label: t("plan.options.monthlyStatic"), |
| | | }, |
| | | { |
| | | value: "day", |
| | | label: t("plan.options.dailyStatic"), |
| | | }, |
| | | ]; |
| | | queryParams.value.searchType = t("plan.options.monthlyStatic"); |
| | | if ( |
| | | (!queryParams.value.monthRange && dayCom.value == false) || |
| | | (!queryParams.value.monthDays && dayCom.value == true) |
| | | ) { |
| | | return; |
| | | } |
| | | getGasList(); |
| | | },{ immediate: true, deep: true }); |
| | | function handleChangeSelectType(e) { |
| | | searchTypeValue.value = e; |
| | | if (e === "day") { |
| | |
| | | loading.value = false; |
| | | return; |
| | | } |
| | | headersOne.push("æ¥æ"); |
| | | headersTwo.push("å·¥åºåç§°"); |
| | | headersOne.push(t("plan.table.dateYearMonth")); |
| | | headersTwo.push(t("plan.table.processName")); |
| | | colList.push({ |
| | | field: "dateCol", |
| | | title: "æ¥æ", |
| | | title: t("plan.table.dateYearMonth"), |
| | | fixed: "left", |
| | | children: [ |
| | | { |
| | | field: `resourceName`, |
| | | title: "å·¥åºåç§°", |
| | | title: t("plan.table.processName"), |
| | | width: 250, |
| | | type: "html", |
| | | }, |
| | |
| | | headersOne.push(item); |
| | | headersOne.push(""); |
| | | headersOne.push(""); |
| | | headersTwo.push("设计产è½"); |
| | | headersTwo.push("éæ±äº§è½"); |
| | | headersTwo.push("产è½è´è½½"); |
| | | headersTwo.push(t("plan.table.designWorkingHours")); |
| | | headersTwo.push(t("plan.table.requiredWorkingHours")); |
| | | headersTwo.push(t("plan.table.capacityLoad")); |
| | | colKey++; |
| | | colList.push({ |
| | | field: `dateColTime${colKey}`, |
| | | title: item, |
| | | children: [ |
| | | { field: `designTimes${colKey}`, title: "设计产è½", width: 80 }, |
| | | { field: `requireTimes${colKey}`, title: "éæ±äº§è½", width: 80 }, |
| | | { |
| | | field: `designTimes${colKey}`, |
| | | title: t("plan.table.designWorkingHours"), |
| | | width: 80, |
| | | }, |
| | | { |
| | | field: `requireTimes${colKey}`, |
| | | title: t("plan.table.requiredWorkingHours"), |
| | | width: 80, |
| | | }, |
| | | { |
| | | field: `capacityLoad${colKey}`, |
| | | title: "产è½è´è½½", |
| | | title: t("plan.table.capacityLoad"), |
| | | width: 80, |
| | | type: "html", |
| | | }, |
| | |
| | | tableKey++; |
| | | item[`designTimes${tableKey}`] = listItem.designTimes; |
| | | item[`requireTimes${tableKey}`] = listItem.requireTimes; |
| | | item[`capacityLoad${tableKey}`] = formatCapacityLoad(listItem.designTimes,listItem.requireTimes,listItem.capacityLoad) |
| | | item[`capacityLoad${tableKey}`] = formatCapacityLoad( |
| | | listItem.designTimes, |
| | | listItem.requireTimes, |
| | | listItem.capacityLoad |
| | | ); |
| | | data.push(listItem.designTimes); |
| | | data.push(listItem.requireTimes); |
| | | data.push(listItem.capacityLoad + "%"); |
| | |
| | | } |
| | | }); |
| | | } |
| | | function formatCapacityLoad(designTimes,requireTimes,capacityLoad){ |
| | | function formatCapacityLoad(designTimes, requireTimes, capacityLoad) { |
| | | /** |
| | | * // 0-100 绿è²ï¼101-120é»è²ï¼å¤§äº120çº¢è² |
| | | listItem.capacityLoad <= 100 |
| | | ? `<font color="red">${listItem.capacityLoad}%</font>` |
| | | : listItem.capacityLoad + "%"; |
| | | */ |
| | | if(designTimes>0&&capacityLoad>0&&capacityLoad<=100){ |
| | | return `<font color="#85cf60">${capacityLoad}%</font>` |
| | | }else if(designTimes>0&&capacityLoad>101&&capacityLoad<=120){ |
| | | return `<font color="#ecb869">${capacityLoad}%</font>` |
| | | }else if(designTimes>0&&capacityLoad>120){ |
| | | return `<font color="#f89c9c">${capacityLoad}%</font>` |
| | | }else if(designTimes==0&&requireTimes>0){ |
| | | return `<font color="#f56c6c">error</font>` |
| | | }else{ |
| | | return `${capacityLoad}%` |
| | | if (designTimes > 0 && capacityLoad > 0 && capacityLoad <= 100) { |
| | | return `<font color="#85cf60">${capacityLoad}%</font>`; |
| | | } else if (designTimes > 0 && capacityLoad > 101 && capacityLoad <= 120) { |
| | | return `<font color="#ecb869">${capacityLoad}%</font>`; |
| | | } else if (designTimes > 0 && capacityLoad > 120) { |
| | | return `<font color="#f89c9c">${capacityLoad}%</font>`; |
| | | } else if (designTimes == 0 && requireTimes > 0) { |
| | | return `<font color="#f56c6c">error</font>`; |
| | | } else { |
| | | return `${capacityLoad}%`; |
| | | } |
| | | } |
| | | /** å¯¼åºæé®æä½ */ |
| | |
| | | (!queryParams.value.monthDays && dayCom.value == true) |
| | | ) { |
| | | ElMessage({ |
| | | message: "è¯·éæ©å¹´æ", |
| | | message: t("plan.message.errorMonthEmpty"), |
| | | type: "error", |
| | | }); |
| | | return; |
| | |
| | | (!queryParams.value.monthDays && dayCom.value == true) |
| | | ) { |
| | | ElMessage({ |
| | | message: "è¯·éæ©å¹´æ", |
| | | message: t("plan.message.errorMonthEmpty"), |
| | | type: "error", |
| | | }); |
| | | return; |
| | |
| | | queryParams.value.monthRange = ""; |
| | | queryParams.value.monthDays = ""; |
| | | dayCom.value = false; |
| | | (queryParams.value.searchType = "ææç»è®¡"), |
| | | (queryParams.value.searchType = t("plan.options.monthlyStatic")), |
| | | (searchTypeValue.value = "month"); |
| | | tableData = []; |
| | | const $grid = gridRef.value; |
| | |
| | | (!queryParams.value.monthDays && dayCom.value == true) |
| | | ) { |
| | | ElMessage({ |
| | | message: "è¯·éæ©å¹´æ", |
| | | message: t("plan.message.errorMonthEmpty"), |
| | | type: "error", |
| | | }); |
| | | return; |
| | |
| | | major: "gas", |
| | | }).then((response) => { |
| | | ElMessage({ |
| | | message: "æ°æ®æ´æ°æå", |
| | | message: t("plan.message.update"), |
| | | type: "success", |
| | | }); |
| | | loading.value = false; |
| | |
| | | ref="queryRef" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | label-width="68px" |
| | | :label-width="locale === 'zh' ? '68px' : '134px'" |
| | | > |
| | | <el-row type="flex" justify="left"> |
| | | <el-form-item label="ç»è®¡æ¹å¼"> |
| | | <el-form-item :label="$t('plan.query.statistical')"> |
| | | <el-select |
| | | v-model="queryParams.searchType" |
| | | style="width: 200px" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="éæ©åºé´"> |
| | | <el-form-item :label="$t('plan.query.selectDateRange')"> |
| | | <div v-if="!dayCom"> |
| | | <el-date-picker |
| | | v-model="queryParams.monthRange" |
| | | type="monthrange" |
| | | range-separator="è³" |
| | | start-placeholder="éæ©å¼å§æä»½" |
| | | end-placeholder="éæ©ç»ææä»½" |
| | | :range-separator="$t('plan.placeholder.to')" |
| | | :start-placeholder="$t('plan.placeholder.startMonth')" |
| | | :end-placeholder="$t('plan.placeholder.endMonth')" |
| | | /> |
| | | </div> |
| | | <div v-else> |
| | | <el-date-picker |
| | | v-model="queryParams.monthDays" |
| | | type="month" |
| | | placeholder="éæ©æä»½" |
| | | :placeholder="$t('plan.placeholder.selectMonth')" |
| | | /> |
| | | </div> |
| | | </el-form-item> |
| | | |
| | | <el-form-item class="column-with-margin"> |
| | | <el-button type="primary" icon="Search" @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">{{ |
| | | $t("common.common.query") |
| | | }}</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">{{ |
| | | $t("common.common.reset") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['aps:apsGasPipingRouteStat:exportExcel']" |
| | | >导åº</el-button |
| | | >{{ $t("common.common.export") }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | type="success" |
| | | plain |
| | | icon="Refresh" |
| | | @click="handleRefresh" |
| | | v-hasPermi="['aps:apsGasPipingRouteStat:computeCapacity']" |
| | | :disabled="loading" |
| | | >æ´æ°</el-button |
| | | >{{ $t("common.common.update") }}</el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar @queryTable="handleQuery" :search="false"></right-toolbar> |
| | | </el-row> |
| | | <!-- <div class="box_container"> --> |
| | | <!-- <div class="title_text">管路è§å产è½è´è½½ç»è®¡</div> --> |
| | | <!-- <div class="tabel_container"> --> |
| | | <vxe-grid |
| | | ref="gridRef" |
| | | v-bind="gridOptions" |
| | | :loading="loading" |
| | | ></vxe-grid> |
| | | <!-- </div> --> |
| | | <!-- <div class="title_text">管路è§å产è½è´è½½ç»è®¡</div> --> |
| | | <!-- <div class="tabel_container"> --> |
| | | <vxe-grid ref="gridRef" v-bind="gridOptions" :loading="loading"></vxe-grid> |
| | | <!-- </div> --> |
| | | <!-- </div> --> |
| | | </div> |
| | | </template> |
| | |
| | | import { ref } from "vue"; |
| | | import * as XLSX from "xlsx"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { useI18n } from "vue-i18n"; //è¦å¨jsä¸ä½¿ç¨å½é
å |
| | | const { t, locale } = useI18n(); |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const loading = ref(false); |
| | |
| | | queryParams: { |
| | | monthRange: "", |
| | | monthDays: "", |
| | | searchType: "ææç»è®¡", |
| | | searchType: t("plan.options.monthlyStatic"), |
| | | }, |
| | | }); |
| | | let searchTypeValue = ref("month"); |
| | | const options = [ |
| | | { |
| | | value: "month", |
| | | label: "ææç»è®¡", |
| | | }, |
| | | { |
| | | value: "day", |
| | | label: "ææ¥ç»è®¡", |
| | | }, |
| | | ]; |
| | | let options = ref([]); |
| | | const { queryParams } = toRefs(data); |
| | | const gridOptions = reactive({ |
| | | border: true, |
| | |
| | | let tableColumn = []; |
| | | let tableData = []; |
| | | let merges = []; |
| | | watch( |
| | | locale, |
| | | (newLocale) => { |
| | | options.value = [ |
| | | { |
| | | value: "month", |
| | | label: t("plan.options.monthlyStatic"), |
| | | }, |
| | | { |
| | | value: "day", |
| | | label: t("plan.options.dailyStatic"), |
| | | }, |
| | | ]; |
| | | queryParams.value.searchType = t("plan.options.monthlyStatic"); |
| | | if ( |
| | | (!queryParams.value.monthRange && dayCom.value == false) || |
| | | (!queryParams.value.monthDays && dayCom.value == true) |
| | | ) { |
| | | return; |
| | | } |
| | | // queryParams.value.pageNum = 1; |
| | | getPipeList(); |
| | | }, |
| | | { immediate: true, deep: true } |
| | | ); |
| | | function handleChangeSelectType(e) { |
| | | searchTypeValue.value = e; |
| | | if (e === "day") { |
| | |
| | | searchType: searchTypeValue.value, |
| | | major: "piping", |
| | | }).then((response) => { |
| | | console.log(response.data.planTable, "responseresponseresponse"); |
| | | const colList = []; |
| | | let headersOne = []; |
| | | let headersTwo = []; |
| | |
| | | loading.value = false; |
| | | return; |
| | | } |
| | | headersOne.push("æ¥æ"); |
| | | headersTwo.push("å·¥åºåç§°"); |
| | | headersOne.push(t("plan.table.dateYearMonth")); |
| | | headersTwo.push(t("plan.table.processName")); |
| | | colList.push({ |
| | | field: "dateCol", |
| | | title: "æ¥æ", |
| | | title: t("plan.table.dateYearMonth"), |
| | | fixed: "left", |
| | | children: [ |
| | | { |
| | | field: `resourceName`, |
| | | title: "å·¥åºåç§°", |
| | | title: t("plan.table.processName"), |
| | | width: 250, |
| | | type: "html", |
| | | }, |
| | |
| | | headersOne.push(item); |
| | | headersOne.push(""); |
| | | headersOne.push(""); |
| | | headersTwo.push("设计产è½"); |
| | | headersTwo.push("éæ±äº§è½"); |
| | | headersTwo.push("产è½è´è½½"); |
| | | headersTwo.push(t("plan.table.designWorkingHours")); |
| | | headersTwo.push(t("plan.table.requiredWorkingHours")); |
| | | headersTwo.push(t("plan.table.capacityLoad")); |
| | | colKey++; |
| | | colList.push({ |
| | | field: `dateColTime${colKey}`, |
| | | title: item, |
| | | children: [ |
| | | { field: `designTimes${colKey}`, title: "设计产è½", width: 80 }, |
| | | { field: `requireTimes${colKey}`, title: "éæ±äº§è½", width: 80 }, |
| | | { |
| | | field: `designTimes${colKey}`, |
| | | title: t("plan.table.designWorkingHours"), |
| | | width: 80, |
| | | }, |
| | | { |
| | | field: `requireTimes${colKey}`, |
| | | title: t("plan.table.requiredWorkingHours"), |
| | | width: 80, |
| | | }, |
| | | { |
| | | field: `capacityLoad${colKey}`, |
| | | title: "产è½è´è½½", |
| | | title: t("plan.table.capacityLoad"), |
| | | width: 80, |
| | | type: "html", |
| | | }, |
| | |
| | | tableKey++; |
| | | item[`designTimes${tableKey}`] = listItem.designTimes; |
| | | item[`requireTimes${tableKey}`] = listItem.requireTimes; |
| | | item[`capacityLoad${tableKey}`] = formatCapacityLoad(listItem.designTimes,listItem.requireTimes,listItem.capacityLoad) |
| | | item[`capacityLoad${tableKey}`] = formatCapacityLoad( |
| | | listItem.designTimes, |
| | | listItem.requireTimes, |
| | | listItem.capacityLoad |
| | | ); |
| | | // 0-100 绿è²ï¼101-120é»è²ï¼å¤§äº120çº¢è² |
| | | // listItem.capacityLoad <= 100 |
| | | // ? `<font color="red">${listItem.capacityLoad}%</font>` |
| | | // : listItem.capacityLoad + "%"; |
| | | // listItem.capacityLoad <= 100 |
| | | // ? `<font color="red">${listItem.capacityLoad}%</font>` |
| | | // : listItem.capacityLoad + "%"; |
| | | data.push(listItem.designTimes); |
| | | data.push(listItem.requireTimes); |
| | | data.push(listItem.capacityLoad + "%"); |
| | |
| | | // item[`resourceName`] = flag |
| | | // ? `<div class='el-badge'><sup class="el-badge__content is-fixed is-dot"></sup>${key}</div>` |
| | | // : key; |
| | | item[`resourceName`] = key; |
| | | item[`resourceName`] = key; |
| | | } |
| | | exportData.value.push(data); |
| | | dataList.push(item); |
| | |
| | | } |
| | | }); |
| | | } |
| | | function formatCapacityLoad(designTimes,requireTimes,capacityLoad){ |
| | | function formatCapacityLoad(designTimes, requireTimes, capacityLoad) { |
| | | /** |
| | | * // 0-100 绿è²ï¼101-120é»è²ï¼å¤§äº120çº¢è² |
| | | listItem.capacityLoad <= 100 |
| | | ? `<font color="red">${listItem.capacityLoad}%</font>` |
| | | : listItem.capacityLoad + "%"; |
| | | */ |
| | | if(designTimes>0&&capacityLoad>0&&capacityLoad<=100){ |
| | | return `<font color="#85cf60">${capacityLoad}%</font>` |
| | | }else if(designTimes>0&&capacityLoad>101&&capacityLoad<=120){ |
| | | return `<font color="#ecb869">${capacityLoad}%</font>` |
| | | }else if(designTimes>0&&capacityLoad>120){ |
| | | return `<font color="#f89c9c">${capacityLoad}%</font>` |
| | | }else if(designTimes==0&&requireTimes>0){ |
| | | return `<font color="#f56c6c">error</font>` |
| | | }else{ |
| | | return `${capacityLoad}%` |
| | | if (designTimes > 0 && capacityLoad > 0 && capacityLoad <= 100) { |
| | | return `<font color="#85cf60">${capacityLoad}%</font>`; |
| | | } else if (designTimes > 0 && capacityLoad > 101 && capacityLoad <= 120) { |
| | | return `<font color="#ecb869">${capacityLoad}%</font>`; |
| | | } else if (designTimes > 0 && capacityLoad > 120) { |
| | | return `<font color="#f89c9c">${capacityLoad}%</font>`; |
| | | } else if (designTimes == 0 && requireTimes > 0) { |
| | | return `<font color="#f56c6c">error</font>`; |
| | | } else { |
| | | return `${capacityLoad}%`; |
| | | } |
| | | } |
| | | /** å¯¼åºæé®æä½ */ |
| | |
| | | (!queryParams.value.monthDays && dayCom.value == true) |
| | | ) { |
| | | ElMessage({ |
| | | message: "è¯·éæ©å¹´æ", |
| | | message: t("plan.message.errorMonthEmpty"), |
| | | type: "error", |
| | | }); |
| | | return; |
| | |
| | | (!queryParams.value.monthDays && dayCom.value == true) |
| | | ) { |
| | | ElMessage({ |
| | | message: "è¯·éæ©å¹´æ", |
| | | message: t("plan.message.errorMonthEmpty"), |
| | | type: "error", |
| | | }); |
| | | return; |
| | |
| | | queryParams.value.monthRange = ""; |
| | | queryParams.value.monthDays = ""; |
| | | dayCom.value = false; |
| | | (queryParams.value.searchType = "ææç»è®¡"), |
| | | (queryParams.value.searchType = t("plan.options.monthlyStatic")), |
| | | (searchTypeValue.value = "month"); |
| | | tableData = []; |
| | | const $grid = gridRef.value; |
| | |
| | | (!queryParams.value.monthDays && dayCom.value == true) |
| | | ) { |
| | | ElMessage({ |
| | | message: "è¯·éæ©å¹´æ", |
| | | message: t("plan.message.errorMonthEmpty"), |
| | | type: "error", |
| | | }); |
| | | return; |
| | |
| | | major: "piping", |
| | | }).then((response) => { |
| | | ElMessage({ |
| | | message: "æ°æ®æ´æ°æå", |
| | | message: t("plan.message.update"), |
| | | type: "success", |
| | | }); |
| | | loading.value = false; |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-row :gutter="20"> <el-col> |
| | | <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="计åå¼å·¥æ¥" style="width: 100%;"> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryRef" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | :label-width="locale === 'zh' ? '90px' : '180px'" |
| | | label-position="left" |
| | | > |
| | | <!-- <el-row :gutter="20"> |
| | | <el-col :span="6"> --> |
| | | <el-form-item :label="$t('plan.query.daterangePlanStartDay')"> |
| | | <el-date-picker |
| | | v-model="daterangePlanStartDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | style="width: 240px" |
| | | v-model="daterangePlanStartDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | :start-placeholder="$t('plan.placeholder.startDate')" |
| | | :end-placeholder="$t('plan.placeholder.endDate')" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="计åå®å·¥æ¥" style="width: 100%;"> |
| | | <!-- </el-col> |
| | | <el-col :span="6"> --> |
| | | <el-form-item :label="$t('plan.query.daterangePlanEndDay')"> |
| | | <el-date-picker |
| | | v-model="daterangePlanEndDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | style="width: 240px" |
| | | v-model="daterangePlanEndDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | :start-placeholder="$t('plan.placeholder.startDate')" |
| | | :end-placeholder="$t('plan.placeholder.endDate')" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="åæ®å·" prop="documentNumber" style="width: 100%;"> |
| | | <!-- </el-col> |
| | | <el-col :span="6"> --> |
| | | <el-form-item |
| | | :label="$t('plan.query.documentNumber')" |
| | | prop="documentNumber" |
| | | > |
| | | <el-input |
| | | v-model="queryParams.documentNumber" |
| | | placeholder="请è¾å
¥åæ®å·" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | style="width: 240px" |
| | | v-model="queryParams.documentNumber" |
| | | :placeholder="$t('plan.placeholder.documentNumber')" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="客æ·åç§°" prop="customer" style="width: 100%;"> |
| | | <!-- </el-col> |
| | | <el-col :span="6"> --> |
| | | <el-form-item :label="$t('plan.query.customer')" prop="customer"> |
| | | <el-input |
| | | v-model="queryParams.customer" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | style="width: 240px" |
| | | v-model="queryParams.customer" |
| | | :placeholder="$t('plan.placeholder.customer')" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" style="text-align: right;"> |
| | | <!-- </el-col> |
| | | <el-col :span="24" style="text-align: right;"> --> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">{{ |
| | | $t("common.common.query") |
| | | }}</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">{{ |
| | | $t("common.common.reset") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- </el-col> --> |
| | | <!-- </el-row> --> |
| | | </el-form> |
| | | </el-col> </el-row> |
| | | </el-row> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >æ¹éä¿®æ¹è®¡åå¼å·¥æ¥</el-button> |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >{{ $t("plan.btns.batchPlanStartDay") }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Edit" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >æ¹éä¿®æ¹è®¡åå®å·¥æ¥</el-button> |
| | | type="success" |
| | | plain |
| | | icon="Edit" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >{{ $t("plan.btns.batchPlanEndDay") }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | plain |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | v-hasPermi="['apsPlatePlan:import']" |
| | | >导å
¥</el-button> |
| | | type="info" |
| | | plain |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | v-hasPermi="['apsPlatePlan:import']" |
| | | >{{ $t("common.common.import") }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['apsPlatePlan:export']" |
| | | >导åº</el-button> |
| | | >{{ $t("common.common.export") }}</el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
| | | <right-toolbar |
| | | v-model:showSearch="showSearch" |
| | | @queryTable="getList" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | |
| | | <HxlhTable |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="planList" |
| | | :loading="loading" |
| | | :height="height" |
| | | @on-checkbox="handleCheckboxChange" |
| | | :expand-config="expandConfig" |
| | | :subGridOptions="subGridOptions" |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="planList" |
| | | :loading="loading" |
| | | :height="height" |
| | | @on-checkbox="handleCheckboxChange" |
| | | :expand-config="expandConfig" |
| | | :subGridOptions="subGridOptions" |
| | | > |
| | | |
| | | </HxlhTable> |
| | | |
| | | <!-- æ·»å æä¿®æ¹é£é计å管çå¯¹è¯æ¡ --> |
| | | <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body @close="dialogCancel" > |
| | | <el-dialog |
| | | :title="upload.title" |
| | | v-model="upload.open" |
| | | width="90%" |
| | | append-to-body |
| | | @close="dialogCancel" |
| | | > |
| | | <el-row :gutter="10"> |
| | | <el-col> |
| | | <div style="border-bottom: 1px solid #ccc;" > |
| | | <p>ä¸ä¼ Excelæä»¶ï¼å
å«é£é计åä¿¡æ¯ãç³»ç»å°è§£ææ°æ®å¹¶ä¿åå°æ¬å°ï¼ç¨äºå
³èå°é£é计åä¸ã</p> |
| | | <div style="border-bottom: 1px solid #ccc"> |
| | | <p>{{ $t("plan.upload.info") }}</p> |
| | | </div> |
| | | </el-col> |
| | | <el-col > |
| | | <el-col> |
| | | <div></div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col> |
| | | <el-upload ref="uploadRef" |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url + '?updateSupport=' + upload.updateSupport" |
| | | :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | :auto-upload="true" drag> |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | <span>ä»
å
许导å
¥xlsãxlsxæ ¼å¼æä»¶ã</span> |
| | | </div> |
| | | </template> |
| | | <el-upload |
| | | ref="uploadRef" |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url + '?updateSupport=' + upload.updateSupport" |
| | | :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | :auto-upload="true" |
| | | drag |
| | | > |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text"> |
| | | {{ $t("plan.upload.prevText") |
| | | }}<em>{{ $t("plan.upload.uploadText") }}</em> |
| | | </div> |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | <span>{{ $t("plan.upload.fileTypeImport") }}</span> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col style="margin-top: 20px;"> |
| | | <el-col style="margin-top: 20px"> |
| | | <div v-show="isVisible"> |
| | | <el-alert icon="Check" :show-icon="true" title="é£éè®¡åæ°æ®å·²æåè§£æ" type="success" :closable="false"/> |
| | | <el-alert |
| | | icon="Check" |
| | | :show-icon="true" |
| | | :title="$t('plan.message.metalplanDataSuccess')" |
| | | type="success" |
| | | :closable="false" |
| | | /> |
| | | </div> |
| | | <div v-show="isError"> |
| | | <el-alert icon="Close" :show-icon="true" title="é£éè®¡åæ°æ®å·²è§£æå¤±è´¥" type="error" :closable="false"/> |
| | | <el-alert |
| | | icon="Close" |
| | | :show-icon="true" |
| | | :title="$t('plan.message.metalplanDataError')" |
| | | type="error" |
| | | :closable="false" |
| | | /> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-show="isVisible"> |
| | | <el-col> |
| | | <div> |
| | | <h2>æ°æ®é¢è§</h2> |
| | | <h2>{{ $t("plan.upload.dataPreview") }}</h2> |
| | | </div> |
| | | <HxlhTable |
| | | style="width: 100%" |
| | | :columns="exampleColumns" |
| | | :data="exampleList" |
| | | :loading="loading" |
| | | :maxHeight="exampleHeight" |
| | | @on-checkbox="handleCheckboxChange" |
| | | style="width: 100%" |
| | | :columns="exampleColumns" |
| | | :data="exampleList" |
| | | :loading="loading" |
| | | :maxHeight="exampleHeight" |
| | | @on-checkbox="handleCheckboxChange" |
| | | > |
| | | </HxlhTable> |
| | | </el-col> |
| | | <el-col> |
| | | <div style="text-align: right;"> |
| | | <h4>å
±ä¸ä¼ <span style="color: blue;">{{ total }}</span>æ¡é¶ä»¶å·¥åæ°æ®</h4> |
| | | <div style="text-align: right"> |
| | | <h4> |
| | | {{ $t("plan.upload.totalUpload") |
| | | }}<span style="color: blue">{{ total }}</span |
| | | >{{ $t("plan.upload.itemUpload") }} |
| | | </h4> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Check" |
| | | :disabled="planned" |
| | | @click="uploadParse" |
| | | v-hasPermi="['apsPlatePlan:confirm']" |
| | | >{{ $t("plan.upload.confirmUpload") }}</el-button |
| | | > |
| | | |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Check" |
| | | :disabled="planned" |
| | | @click="uploadParse" |
| | | v-hasPermi="['apsPlatePlan:confirm']" |
| | | >确认ä¸ä¼ </el-button> |
| | | |
| | | <el-button @click="dialogCancel">å æ¶</el-button> |
| | | <el-button @click="dialogCancel">{{ |
| | | $t("plan.upload.cancel") |
| | | }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup name="ApsPlatePlan"> |
| | | import { listPlan, examplePlan, confirmPart} from "@/api/mainPlan/apsPlatePlan.js"; |
| | | import { |
| | | listPlan, |
| | | examplePlan, |
| | | confirmPart, |
| | | } from "@/api/mainPlan/apsPlatePlan.js"; |
| | | import { listProcessRoute } from "@/api/basicData/processRoute.js"; |
| | | import HxlhTable from '@/components/HxlhTable/index.vue' |
| | | import HxlhTable from "@/components/HxlhTable/index.vue"; |
| | | import { ref } from "vue"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | import { ElMessage } from "element-plus"; |
| | | import { useI18n } from "vue-i18n"; //è¦å¨jsä¸ä½¿ç¨å½é
å |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const { aps_is_suspended, aps_document_status, aps_account, aps_business_type } = proxy.useDict('aps_is_suspended', 'aps_document_status', 'aps_account', 'aps_business_type'); |
| | | |
| | | const { t, locale } = useI18n(); |
| | | const { |
| | | aps_is_suspended, |
| | | aps_document_status, |
| | | aps_account, |
| | | aps_business_type, |
| | | } = proxy.useDict( |
| | | "aps_is_suspended", |
| | | "aps_document_status", |
| | | "aps_account", |
| | | "aps_business_type" |
| | | ); |
| | | const exampleList = ref([]); |
| | | const planList = ref([]); |
| | | const loading = ref(true); |
| | |
| | | const daterangePlanStartDay = ref([]); |
| | | const daterangePlanEndDay = ref([]); |
| | | |
| | | const height = ref(document.documentElement.clientHeight - 270 + "px;") |
| | | const height = ref(document.documentElement.clientHeight - 270 + "px;"); |
| | | const isVisible = ref(false); |
| | | const isError = ref(false); |
| | | const planned = ref(true); |
| | | const batchNumber = ref(null); |
| | | const exampleHeight = ref("500px"); |
| | | const uploadRef = ref(); |
| | | |
| | | |
| | | /*** ç¨æ·å¯¼å
¥åæ° */ |
| | | const upload = reactive({ |
| | |
| | | // æ¯å¦æ´æ°å·²ç»åå¨çç¨æ·æ°æ® |
| | | updateSupport: 0, |
| | | // 设置ä¸ä¼ ç请æ±å¤´é¨ |
| | | headers: { Authorization: "Bearer " + getToken() ,local: 'zhl'}, |
| | | headers: { Authorization: "Bearer " + getToken(), local: "zhl" }, |
| | | // ä¸ä¼ çå°å |
| | | url: import.meta.env.VITE_APP_BASE_API + "/aps/apsPlatePlan/importData" |
| | | url: import.meta.env.VITE_APP_BASE_API + "/aps/apsPlatePlan/importData", |
| | | }); |
| | | |
| | | // è¡¨æ ¼é
ç½® |
| | | const exampleColumns = ref([ |
| | | { type: 'seq', title: 'åºå·', width: 60 }, |
| | | { |
| | | title: '主计åå', |
| | | field: 'masterPlanner', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '卿¥', |
| | | field: 'weekDay', |
| | | width: 100, |
| | | formatter: (({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | | const weekDay = new Date(cellValue); |
| | | const year = weekDay.getFullYear(); |
| | | const month = String(weekDay.getMonth() + 1).padStart(2, '0'); |
| | | const day = String(weekDay.getDate()).padStart(2, '0'); |
| | | return `${month}-${day}`; |
| | | } |
| | | return ''; |
| | | }) |
| | | }, |
| | | { |
| | | title: 'å¨åº¦', |
| | | field: 'weekCycle', |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: '主件æå·', |
| | | field: 'mainPartNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '主件å¾å·', |
| | | field: 'mainPartDrawingNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '客æ·åç§°', |
| | | field: 'customer', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'ä¸å¡ç±»å', |
| | | field: 'businessType', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'åæ®å·', |
| | | field: 'documentNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'éæ±åç±»', |
| | | field: 'requirementType', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'åæ®ç¶æ', |
| | | field: 'documentStatus', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'æå·', |
| | | field: 'itemNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å¾å·', |
| | | field: 'drawingNo', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'çæ¬å·', |
| | | field: 'versionNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ç产æ°é', |
| | | field: 'productionQuantity', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'è¯åæ°é', |
| | | field: 'goodProductsQuantity', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å·¥åºå·', |
| | | field: 'processNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å·¥ä½ä¸å¿', |
| | | field: 'workCenter', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'æå±é¨é¨', |
| | | field: 'department', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计åå¼å·¥æ¥', |
| | | field: 'planStartDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计åå®å·¥æ¥', |
| | | field: 'planEndDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '夿æå·', |
| | | field: 'standbyNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '夿åç§°', |
| | | field: 'standbyName', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: '夿åºå', |
| | | field: 'standbyStock', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ä¸éå·¥åºæå±é¨é¨', |
| | | field: 'nextProcessDeparment', |
| | | width: 180, |
| | | }, |
| | | { |
| | | title: 'æ¯å¦æèµ·', |
| | | field: 'isSuspended', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å¤åæ è¯', |
| | | field: 'isOutsourcing', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'è´¦å¥', |
| | | field: 'account', |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'ä¸é¶ç©æ', |
| | | // field: 'advancedMaterials', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶åæ®å·', |
| | | // field: 'advancedDocumentNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶éæ±æ¥æ', |
| | | // field: 'advancedRequirementDay', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: '计åé½å¥', |
| | | // field: 'isPlanComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'åºåé½å¥', |
| | | // field: 'isStockComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦ææè¿å·¥åº', |
| | | // field: 'hasTurnback', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: 'é£é©æ è¯', |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]); |
| | | |
| | | // è¡¨æ ¼é
ç½® |
| | | const columns = ref([ |
| | | { field: 'expand', type: 'expand', width: 60, align: 'center', slots: { content: 'expandContent' } }, |
| | | { type: 'checkbox', width: 60, align:"center"}, |
| | | { type: 'seq', title: 'åºå·', width: 60 }, |
| | | // { |
| | | // title: '主计åå', |
| | | // field: 'masterPlanner', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: '卿¥', |
| | | // field: 'weekDay', |
| | | // width: 100, |
| | | // formatter: (({ cellValue, row, column }) => { |
| | | // if (cellValue) { |
| | | // const weekDay = new Date(cellValue); |
| | | // const year = weekDay.getFullYear(); |
| | | // const month = String(weekDay.getMonth() + 1).padStart(2, '0'); |
| | | // const day = String(weekDay.getDate()).padStart(2, '0'); |
| | | // return `${month}-${day}`; |
| | | // } |
| | | // return ''; |
| | | // }) |
| | | // }, |
| | | // { |
| | | // title: 'å¨åº¦', |
| | | // field: 'weekCycle', |
| | | // width: 80, |
| | | // }, |
| | | { |
| | | title: '主件æå·', |
| | | field: 'mainPartNumber', |
| | | width: 150, |
| | | }, |
| | | // { |
| | | // title: '主件å¾å·', |
| | | // field: 'mainPartDrawingNumber', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: '客æ·åç§°', |
| | | // field: 'customer', |
| | | // width: 200, |
| | | // }, |
| | | { |
| | | title: 'ä¸å¡ç±»å', |
| | | field: 'businessType', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'åæ®å·', |
| | | field: 'documentNumber', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: 'éæ±åç±»', |
| | | field: 'requirementType', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'åæ®ç¶æ', |
| | | field: 'documentStatus', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'æå·', |
| | | field: 'itemNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å¾å·', |
| | | field: 'drawingNo', |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'çæ¬å·', |
| | | // field: 'versionNumber', |
| | | // width: 100, |
| | | // }, |
| | | { |
| | | title: 'ç产æ°é', |
| | | field: 'productionQuantity', |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'è¯åæ°é', |
| | | // field: 'goodProductsQuantity', |
| | | // width: 100, |
| | | // }, |
| | | { |
| | | title: 'å·¥åºå·', |
| | | field: 'processNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å·¥ä½ä¸å¿', |
| | | field: 'workCenter', |
| | | width: 180, |
| | | }, |
| | | // { |
| | | // title: 'æå±é¨é¨', |
| | | // field: 'department', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: '计åå¼å·¥æ¥', |
| | | // field: 'planStartDay', |
| | | // width: 100, |
| | | // }, |
| | | { |
| | | title: '计åå®å·¥æ¥', |
| | | field: 'planEndDay', |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: '夿æå·', |
| | | // field: 'standbyNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: '夿åç§°', |
| | | // field: 'standbyName', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: '夿åºå', |
| | | // field: 'standbyStock', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸éå·¥åºæå±é¨é¨', |
| | | // field: 'nextProcessDeparment', |
| | | // width: 160, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦æèµ·', |
| | | // field: 'isSuspended', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'å¤åæ è¯', |
| | | // field: 'isOutsourcing', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'è´¦å¥', |
| | | // field: 'account', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶ç©æ', |
| | | // field: 'advancedMaterials', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶åæ®å·', |
| | | // field: 'advancedDocumentNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶éæ±æ¥æ', |
| | | // field: 'advancedRequirementDay', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: '计åé½å¥', |
| | | // field: 'isPlanComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'åºåé½å¥', |
| | | // field: 'isStockComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦ææè¿å·¥åº', |
| | | // field: 'hasTurnback', |
| | | // width: 120, |
| | | // }, |
| | | // { |
| | | // title: 'é£é©æ è¯', |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]); |
| | | |
| | | |
| | | const data = reactive({ |
| | | form: {}, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | customer: null, |
| | | documentNumber: null |
| | | documentNumber: null, |
| | | }, |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | { |
| | | required: true, |
| | | message: t("plan.message.idNotBeEmpty"), |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | }); |
| | | |
| | | const { queryParams } = toRefs(data); |
| | | const exampleColumns = ref([]); |
| | | const columns = ref([]); |
| | | const subGridOptions = ref({ |
| | | border: true, |
| | | showOverflow: true, |
| | | columns: [], |
| | | }); |
| | | |
| | | watch( |
| | | locale, |
| | | (newLocale) => { |
| | | // éæ°è·åç¿»è¯ææ¬ |
| | | // è¡¨æ ¼é
ç½® |
| | | exampleColumns.value = [ |
| | | { type: "seq", title: t("plan.table.seq"), width: 60 }, |
| | | { |
| | | title: t("plan.table.masterPlanner"), |
| | | field: "masterPlanner", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.weekDay"), |
| | | field: "weekDay", |
| | | width: 100, |
| | | formatter: ({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | | const weekDay = new Date(cellValue); |
| | | const year = weekDay.getFullYear(); |
| | | const month = String(weekDay.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(weekDay.getDate()).padStart(2, "0"); |
| | | return `${month}-${day}`; |
| | | } |
| | | return ""; |
| | | }, |
| | | }, |
| | | { |
| | | title: t("plan.table.weekCycle"), |
| | | field: "weekCycle", |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: t("plan.table.mainPartNumber"), |
| | | field: "mainPartNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.mainPartDrawingNumber"), |
| | | field: "mainPartDrawingNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.customer"), |
| | | field: "customer", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.businessType"), |
| | | field: "businessType", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.documentNumber"), |
| | | field: "documentNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.requirementType"), |
| | | field: "requirementType", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.documentStatus"), |
| | | field: "documentStatus", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "itemNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.drawingNo"), |
| | | field: "drawingNo", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.versionNumber"), |
| | | field: "versionNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.productionQuantity"), |
| | | field: "productionQuantity", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.goodProductsQuantity"), |
| | | field: "goodProductsQuantity", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.processNumber"), |
| | | field: "processNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.factoryCenter"), |
| | | field: "workCenter", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.dependencyDepartment"), |
| | | field: "department", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.planStartDay"), |
| | | field: "planStartDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.planEndDayDate"), |
| | | field: "planEndDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyNumber"), |
| | | field: "standbyNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyName"), |
| | | field: "standbyName", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyStock"), |
| | | field: "standbyStock", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.departmentToNextProcessBelongs"), |
| | | field: "nextProcessDeparment", |
| | | width: 180, |
| | | }, |
| | | { |
| | | title: t("plan.table.isSuspended"), |
| | | field: "isSuspended", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.isOutsourcing"), |
| | | field: "isOutsourcing", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.account"), |
| | | field: "account", |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'ä¸é¶ç©æ', |
| | | // field: 'advancedMaterials', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶åæ®å·', |
| | | // field: 'advancedDocumentNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶éæ±æ¥æ', |
| | | // field: 'advancedRequirementDay', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: '计åé½å¥', |
| | | // field: 'isPlanComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'åºåé½å¥', |
| | | // field: 'isStockComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦ææè¿å·¥åº', |
| | | // field: 'hasTurnback', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: 'é£é©æ è¯', |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]; |
| | | // è¡¨æ ¼é
ç½® |
| | | columns.value = [ |
| | | { |
| | | field: "expand", |
| | | type: "expand", |
| | | width: 60, |
| | | align: "center", |
| | | slots: { content: "expandContent" }, |
| | | }, |
| | | { type: "checkbox", width: 60, align: "center" }, |
| | | { type: "seq", title: t("plan.table.seq"), width: 60 }, |
| | | // { |
| | | // title: '主计åå', |
| | | // field: 'masterPlanner', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: '卿¥', |
| | | // field: 'weekDay', |
| | | // width: 100, |
| | | // formatter: (({ cellValue, row, column }) => { |
| | | // if (cellValue) { |
| | | // const weekDay = new Date(cellValue); |
| | | // const year = weekDay.getFullYear(); |
| | | // const month = String(weekDay.getMonth() + 1).padStart(2, '0'); |
| | | // const day = String(weekDay.getDate()).padStart(2, '0'); |
| | | // return `${month}-${day}`; |
| | | // } |
| | | // return ''; |
| | | // }) |
| | | // }, |
| | | // { |
| | | // title: 'å¨åº¦', |
| | | // field: 'weekCycle', |
| | | // width: 80, |
| | | // }, |
| | | { |
| | | title: t("plan.table.mainPartNumber"), |
| | | field: "mainPartNumber", |
| | | width: 150, |
| | | }, |
| | | // { |
| | | // title: '主件å¾å·', |
| | | // field: 'mainPartDrawingNumber', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: '客æ·åç§°', |
| | | // field: 'customer', |
| | | // width: 200, |
| | | // }, |
| | | { |
| | | title: t("plan.table.businessType"), |
| | | field: "businessType", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.documentNumber"), |
| | | field: "documentNumber", |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: t("plan.table.requirementType"), |
| | | field: "requirementType", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.documentStatus"), |
| | | field: "documentStatus", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "itemNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.drawingNo"), |
| | | field: "drawingNo", |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'çæ¬å·', |
| | | // field: 'versionNumber', |
| | | // width: 100, |
| | | // }, |
| | | { |
| | | title: t("plan.table.productionQuantity"), |
| | | field: "productionQuantity", |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'è¯åæ°é', |
| | | // field: 'goodProductsQuantity', |
| | | // width: 100, |
| | | // }, |
| | | { |
| | | title: t("plan.table.processNumber"), |
| | | field: "processNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.factoryCenter"), |
| | | field: "workCenter", |
| | | width: 180, |
| | | }, |
| | | // { |
| | | // title: 'æå±é¨é¨', |
| | | // field: 'department', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: '计åå¼å·¥æ¥', |
| | | // field: 'planStartDay', |
| | | // width: 100, |
| | | // }, |
| | | { |
| | | title: t("plan.table.planEndDayDate"), |
| | | field: "planEndDay", |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: '夿æå·', |
| | | // field: 'standbyNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: '夿åç§°', |
| | | // field: 'standbyName', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: '夿åºå', |
| | | // field: 'standbyStock', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸éå·¥åºæå±é¨é¨', |
| | | // field: 'nextProcessDeparment', |
| | | // width: 160, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦æèµ·', |
| | | // field: 'isSuspended', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'å¤åæ è¯', |
| | | // field: 'isOutsourcing', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'è´¦å¥', |
| | | // field: 'account', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶ç©æ', |
| | | // field: 'advancedMaterials', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶åæ®å·', |
| | | // field: 'advancedDocumentNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶éæ±æ¥æ', |
| | | // field: 'advancedRequirementDay', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: '计åé½å¥', |
| | | // field: 'isPlanComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'åºåé½å¥', |
| | | // field: 'isStockComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦ææè¿å·¥åº', |
| | | // field: 'hasTurnback', |
| | | // width: 120, |
| | | // }, |
| | | // { |
| | | // title: 'é£é©æ è¯', |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]; |
| | | subGridOptions.value.columns = [ |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "itemNo", |
| | | width: 150, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.workOrderNo"), |
| | | field: "workOrderNo", |
| | | width: 150, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.processNumber"), |
| | | field: "processNumber", |
| | | width: 150, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.processName"), |
| | | field: "processName", |
| | | width: 150, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.startDateOfProcessPlan"), |
| | | field: "processPlanStartDay", |
| | | width: 200, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.endDateOfProcessPlan"), |
| | | field: "processPlanEndDay", |
| | | width: 200, |
| | | align: "center", |
| | | }, |
| | | // { |
| | | // title: 'æªå¼å·¥æ°é', |
| | | // field: 'notStartWorkCount', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: '已宿æ°é', |
| | | // field: 'completedCount', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: 'åºå¼æ°é', |
| | | // field: 'discardCount', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | { |
| | | title: t("plan.table.standardTime"), |
| | | field: "standardTime", |
| | | width: 90, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.processOrder"), |
| | | field: "processOrder", |
| | | width: 90, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.integrationDay"), |
| | | field: "integrationDay", |
| | | width: 160, |
| | | align: "center", |
| | | }, |
| | | ]; |
| | | getList(); |
| | | }, |
| | | { immediate: true, deep: true } |
| | | ); |
| | | /** æ¥è¯¢é£é计å临æ¶ç®¡çå表 */ |
| | | function getExampleList() { |
| | | loading.value = true; |
| | | queryParams.value = {}; |
| | | queryParams.value.batchNumber = batchNumber.value; |
| | | examplePlan(queryParams.value).then(response => { |
| | | examplePlan(queryParams.value).then((response) => { |
| | | exampleList.value = response.rows; |
| | | total.value = response.total; |
| | | loading.value = false; |
| | |
| | | function getList() { |
| | | loading.value = true; |
| | | queryParams.value.params = {}; |
| | | if (null != daterangePlanStartDay && '' !== daterangePlanStartDay) { |
| | | queryParams.value.params["beginPlanStartDay"] = daterangePlanStartDay.value[0]; |
| | | queryParams.value.params["endPlanStartDay"] = daterangePlanStartDay.value[1]; |
| | | if (null != daterangePlanStartDay && "" !== daterangePlanStartDay) { |
| | | queryParams.value.params["beginPlanStartDay"] = |
| | | daterangePlanStartDay.value[0]; |
| | | queryParams.value.params["endPlanStartDay"] = |
| | | daterangePlanStartDay.value[1]; |
| | | } |
| | | if (null != daterangePlanEndDay && '' !== daterangePlanEndDay) { |
| | | if (null != daterangePlanEndDay && "" !== daterangePlanEndDay) { |
| | | queryParams.value.params["beginPlanEndDay"] = daterangePlanEndDay.value[0]; |
| | | queryParams.value.params["endPlanEndDay"] = daterangePlanEndDay.value[1]; |
| | | } |
| | | listPlan(queryParams.value).then(response => { |
| | | listPlan(queryParams.value).then((response) => { |
| | | planList.value = response.rows; |
| | | loading.value = false; |
| | | }); |
| | |
| | | }; |
| | | |
| | | /** æ¹éä¿®æ¹è®¡åå¼å·¥æ¥æé®æä½ */ |
| | | function plannedStart() { |
| | | |
| | | } |
| | | function plannedStart() {} |
| | | |
| | | /** æ¹éä¿®æ¹è®¡åå®å·¥æ¥æé®æä½ */ |
| | | function plannedEnd() { |
| | | |
| | | } |
| | | function plannedEnd() {} |
| | | |
| | | /** 导å
¥æé®æä½ */ |
| | | function handleImport() { |
| | | upload.title = "é£éè®¡åæ°æ®ä¸ä¼ "; |
| | | upload.title = t("plan.upload.uploadSheetMetalPlanData"); |
| | | upload.open = true; |
| | | }; |
| | | } |
| | | |
| | | /** å¯¼åºæé®æä½ */ |
| | | function handleExport() { |
| | | proxy.download('aps/apsPlatePlan/export', { |
| | | ...queryParams.value |
| | | }, `plan_${new Date().getTime()}.xlsx`) |
| | | proxy.download( |
| | | "aps/apsPlatePlan/export", |
| | | { |
| | | ...queryParams.value, |
| | | }, |
| | | `plan_${new Date().getTime()}.xlsx` |
| | | ); |
| | | } |
| | | |
| | | /** ä¸è½½æ¨¡æ¿æä½ */ |
| | | function importTemplate() { |
| | | proxy.download("system/user/importTemplate", { |
| | | }, `user_template_${new Date().getTime()}.xlsx`); |
| | | }; |
| | | proxy.download( |
| | | "system/user/importTemplate", |
| | | {}, |
| | | `user_template_${new Date().getTime()}.xlsx` |
| | | ); |
| | | } |
| | | |
| | | /** buildEexample */ |
| | | function buildEexample() { |
| | | proxy.$refs["uploadRef"].submit(); |
| | | }; |
| | | } |
| | | |
| | | /**æä»¶ä¸ä¼ ä¸å¤ç */ |
| | | const handleFileUploadProgress = (event, file, fileList) => { |
| | |
| | | |
| | | /** æä»¶ä¸ä¼ æåå¤ç */ |
| | | const handleFileSuccess = (response, file, fileList) => { |
| | | if(response.code == '200'){ |
| | | if (response.code == "200") { |
| | | batchNumber.value = response.data; |
| | | isVisible.value = true; |
| | | planned.value = false; |
| | | isError.value = false; |
| | | getExampleList(); |
| | | }else{ |
| | | } else { |
| | | isError.value = true; |
| | | proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导å
¥ç»æ", { dangerouslyUseHTMLString: true }); |
| | | proxy.$alert( |
| | | "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + |
| | | response.msg + |
| | | "</div>", |
| | | t("plan.upload.errorResult"), |
| | | { dangerouslyUseHTMLString: true, |
| | | confirmButtonText: t("plan.btns.confirm"), |
| | | cancelButtonText: t("plan.btns.cancel"), |
| | | } |
| | | ); |
| | | } |
| | | proxy.$refs["uploadRef"].handleRemove(file); |
| | | upload.isUploading = false; |
| | |
| | | function uploadParse() { |
| | | queryParams.value.params = {}; |
| | | queryParams.value.params["batchNumber"] = batchNumber.value; |
| | | confirmPart(queryParams.value).then(response => { |
| | | confirmPart(queryParams.value).then((response) => { |
| | | exampleList.value = response.rows; |
| | | loading.value = false; |
| | | isVisible.value = false; |
| | |
| | | planned.value = true; |
| | | upload.open = false; |
| | | ElMessage({ |
| | | message: 'æ°ä½ç®¡è·¯è®¡åæ°æ®å·²æåä¸ä¼ åè§£æ', |
| | | type: 'success', |
| | | }) |
| | | message: t("plan.message.metalplanDataSuccess"), |
| | | type: "success", |
| | | }); |
| | | getList(); |
| | | }); |
| | | } |
| | | |
| | | /** dialogåæ¶ */ |
| | | function dialogCancel(){ |
| | | function dialogCancel() { |
| | | if (uploadRef.value) { |
| | | uploadRef.value.clearFiles(); |
| | | } |
| | |
| | | } |
| | | /*å®ä¹ä¸æäºçº§è¡¨*/ |
| | | |
| | | const subGridOptions = reactive({ |
| | | border: true, |
| | | showOverflow: true, |
| | | columns: [ |
| | | { |
| | | title: 'æå·', |
| | | field: 'itemNo', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: 'å·¥åå·', |
| | | field: 'workOrderNo', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: 'å·¥åºåºå·', |
| | | field: 'processNumber', |
| | | width: 100, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: 'å·¥åºåç§°', |
| | | field: 'processName', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: 'å·¥åºè®¡åå¼å§æ¥æ', |
| | | field: 'processPlanStartDay', |
| | | width: 200, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: 'å·¥åºè®¡åç»ææ¥æ', |
| | | field: 'processPlanEndDay', |
| | | width: 200, |
| | | align:"center", |
| | | }, |
| | | // { |
| | | // title: 'æªå¼å·¥æ°é', |
| | | // field: 'notStartWorkCount', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: '已宿æ°é', |
| | | // field: 'completedCount', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: 'åºå¼æ°é', |
| | | // field: 'discardCount', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | { |
| | | title: 'æ åå·¥æ¶', |
| | | field: 'standardTime', |
| | | width: 90, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: 'å·¥åºæåº', |
| | | field: 'processOrder', |
| | | width: 90, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: 'éææ¥æ', |
| | | field: 'integrationDay', |
| | | width: 160, |
| | | align:"center", |
| | | } |
| | | ] |
| | | }) |
| | | // const subGridOptions = ref({ |
| | | // border: true, |
| | | // showOverflow: true, |
| | | // columns: [ |
| | | // { |
| | | // title: t('plan.table.itemNumber'), |
| | | // field: 'itemNo', |
| | | // width: 150, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: t('plan.table.workOrderNo'), |
| | | // field: 'workOrderNo', |
| | | // width: 150, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: t('plan.table.processNumber'), |
| | | // field: 'processNumber', |
| | | // width: 100, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: t('plan.table.processName'), |
| | | // field: 'processName', |
| | | // width: 150, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: t('plan.table.startDateOfProcessPlan'), |
| | | // field: 'processPlanStartDay', |
| | | // width: 200, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: 'å·¥åºè®¡åç»ææ¥æ', |
| | | // field: 'processPlanEndDay', |
| | | // width: 200, |
| | | // align:"center", |
| | | // }, |
| | | // // { |
| | | // // title: 'æªå¼å·¥æ°é', |
| | | // // field: 'notStartWorkCount', |
| | | // // width: 90, |
| | | // // align:"center", |
| | | // // }, |
| | | // // { |
| | | // // title: '已宿æ°é', |
| | | // // field: 'completedCount', |
| | | // // width: 90, |
| | | // // align:"center", |
| | | // // }, |
| | | // // { |
| | | // // title: 'åºå¼æ°é', |
| | | // // field: 'discardCount', |
| | | // // width: 90, |
| | | // // align:"center", |
| | | // // }, |
| | | // { |
| | | // title: 'æ åå·¥æ¶', |
| | | // field: 'standardTime', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: 'å·¥åºæåº', |
| | | // field: 'processOrder', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: 'éææ¥æ', |
| | | // field: 'integrationDay', |
| | | // width: 160, |
| | | // align:"center", |
| | | // } |
| | | // ] |
| | | // }) |
| | | |
| | | const expandConfig = ref({ |
| | | lazy: true, |
| | | loadMethod ({ row }) { |
| | | loadMethod({ row }) { |
| | | // è°ç¨æ¥å£ |
| | | return listProcessRoute({'workOrderNo':row.documentNumber}).then(data => { |
| | | row.subList = data.rows; |
| | | }) |
| | | } |
| | | }) |
| | | return listProcessRoute({ workOrderNo: row.documentNumber }).then( |
| | | (data) => { |
| | | row.subList = data.rows; |
| | | } |
| | | ); |
| | | }, |
| | | }); |
| | | |
| | | getList(); |
| | | // getList(); |
| | | </script> |
| | | <style lang="css" scoped> |
| | | h4 { |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['plateProcessShopStat:export']" |
| | | >导åº</el-button |
| | | >{{ $t(`common.common.export`) }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Edit" |
| | | icon="Refresh" |
| | | @click="handleUpdate" |
| | | :disabled="loading" |
| | | v-hasPermi="['plateProcessShopStat:update']" |
| | | >æ´æ°</el-button |
| | | >{{ $t(`common.common.update`) }}</el-button |
| | | > |
| | | </el-col> |
| | | |
| | |
| | | > |
| | | </HxlhTable> |
| | | <!-- æ·»å æä¿®æ¹é£éç»è®¡å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" v-model="open" width="500px" append-to-body> |
| | | <!-- <el-dialog :title="title" v-model="open" width="500px" append-to-body> |
| | | <el-form |
| | | ref="aps_plate_process_statRef" |
| | | :model="form" |
| | |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { getToken } from "@/utils/auth"; |
| | | import { nextTick, onMounted, ref } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { useI18n } from "vue-i18n"; //è¦å¨jsä¸ä½¿ç¨å½é
å |
| | | // import i18n from "@/utils/i18n"; |
| | | // const t = i18n.global.t |
| | | const { t, locale } = useI18n(); |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | // console.log(proxy.$i18n.locale, "indexPlanList"); |
| | | const aps_plate_process_statList = ref([]); |
| | | const dynamicList = ref([]); |
| | | const generateColumnList = ref([]); |
| | |
| | | // }, |
| | | // rules: {}, |
| | | }); |
| | | const columns = ref([]); |
| | | const xGrid = ref(); |
| | | const { queryParams, form, rules } = toRefs(data); |
| | | |
| | | // è¡¨æ ¼é
ç½® |
| | | const columns = ref([ |
| | | /* { type: 'seq', title: 'åºå·', width: 60 },*/ |
| | | { |
| | | title: "主件æå·", |
| | | field: "mainPartNumber", |
| | | width: 150, |
| | | fixed: "left", |
| | | }, |
| | | { |
| | | title: "ä¸å¡ç±»å", |
| | | field: "businessType", |
| | | width: 120, |
| | | fixed: "left", |
| | | }, |
| | | { |
| | | title: "åæ®å·", |
| | | field: "documentNumber", |
| | | width: 160, |
| | | fixed: "left", |
| | | }, |
| | | { |
| | | title: "éæ±åç±»", |
| | | field: "requirementType", |
| | | width: 100, |
| | | fixed: "left", |
| | | }, |
| | | { |
| | | title: "åæ®ç¶æ", |
| | | field: "documentStatus", |
| | | width: 100, |
| | | fixed: "left", |
| | | }, |
| | | { |
| | | title: "å®¡æ ¸æ¶é´", |
| | | field: "updateBy", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "å½åå·¥åº", |
| | | field: "workCenter", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: "å½åå·¥åºè´è´£äºº", |
| | | field: "department", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: "å½åå·¥åºç¶æ", |
| | | field: "opStatus", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: "ä¸ä¸å·¥åº", |
| | | field: "nextOpName", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "ä¸ä¸å·¥åºè´è´£äºº", |
| | | field: "nextProcessDeparment", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: "æå·", |
| | | field: "itemNumber", |
| | | width: 150, |
| | | type: "html", |
| | | }, |
| | | { |
| | | title: "å¾å·", |
| | | field: "drawingNo", |
| | | width: 150, |
| | | // format: 'YYYY-MM-DD' |
| | | }, |
| | | { |
| | | title: "çæ¬å·", |
| | | field: "versionNumber", |
| | | width: 100, |
| | | type: "html", |
| | | }, |
| | | { |
| | | title: "ä½é¶ç ", |
| | | field: "updateBy", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "ç产æ°é", |
| | | field: "productionQuantity", |
| | | width: 100, |
| | | type: "html", |
| | | }, |
| | | { |
| | | title: "å·¥å计åä¸åæ¶é´", |
| | | field: "updateBy", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: "ç³»ç»å®å·¥æ¶é´", |
| | | field: "planEndDay", |
| | | width: 150, |
| | | format: "YYYY-MM-DD hh:mm:ss", |
| | | }, |
| | | ]); |
| | | |
| | | watch(locale, (newLocale) => { |
| | | // éæ°è·åç¿»è¯ææ¬ |
| | | // è¡¨æ ¼é
ç½® |
| | | columns.value = [ |
| | | /* { type: 'seq', title: 'åºå·', width: 60 },*/ |
| | | { |
| | | title: t("plan.table.mainPartNumber"), |
| | | field: "mainPartNumber", |
| | | width: 150, |
| | | fixed: "left", |
| | | }, |
| | | { |
| | | title: t("plan.table.businessType"), |
| | | field: "businessType", |
| | | width: 120, |
| | | fixed: "left", |
| | | }, |
| | | { |
| | | title: t("plan.table.documentNumber"), |
| | | field: "documentNumber", |
| | | width: 160, |
| | | fixed: "left", |
| | | }, |
| | | { |
| | | title: t("plan.table.requirementType"), |
| | | field: "requirementType", |
| | | width: 100, |
| | | fixed: "left", |
| | | }, |
| | | { |
| | | title: t("plan.table.documentStatus"), |
| | | field: "documentStatus", |
| | | width: 100, |
| | | fixed: "left", |
| | | }, |
| | | { |
| | | title: t("plan.table.updateBy"), |
| | | field: "updateBy", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.workCenter"), |
| | | field: "workCenter", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.department"), |
| | | field: "department", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.opStatus"), |
| | | field: "opStatus", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.nextOpName"), |
| | | field: "nextOpName", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.nextProcessDeparment"), |
| | | field: "nextProcessDeparment", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "itemNumber", |
| | | width: 150, |
| | | type: "html", |
| | | }, |
| | | { |
| | | title: t("plan.table.drawingNo"), |
| | | field: "drawingNo", |
| | | width: 150, |
| | | // format: 'YYYY-MM-DD' |
| | | }, |
| | | { |
| | | title: t("plan.table.versionNumber"), |
| | | field: "versionNumber", |
| | | width: 100, |
| | | type: "html", |
| | | }, |
| | | { |
| | | title: t("plan.table.cheaperCode"), |
| | | field: "cheaperCode", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.productionQuantity"), |
| | | field: "productionQuantity", |
| | | width: 100, |
| | | type: "html", |
| | | }, |
| | | { |
| | | title: t("plan.table.planworkOrderTime"), |
| | | field: "planworkOrderTime", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.planEndDay"), |
| | | field: "planEndDay", |
| | | width: 150, |
| | | format: "YYYY-MM-DD hh:mm:ss", |
| | | }, |
| | | ] |
| | | getList(); |
| | | },{immediate:true, deep:true}); |
| | | /** æ¥è¯¢é£éç»è®¡å表 */ |
| | | async function getList() { |
| | | loading.value = true; |
| | |
| | | }; |
| | | } |
| | | ); |
| | | console.log(aps_plate_process_statList.value, "resDataresDataresData"); |
| | | let newArray = []; |
| | | newArray = dynamicList.value.flatMap((item, index) => [ |
| | | { |
| | |
| | | listApsPlateProcessShopStatUpdate().then((response) => { |
| | | // form.value = response.data; |
| | | ElMessage({ |
| | | message: "æ°æ®æ´æ°æå", |
| | | message: t("plan.message.update"), |
| | | type: "success", |
| | | }); |
| | | loading.value = false; |
| | |
| | | `aps_plate_plan_list_${new Date().getTime()}.xlsx` |
| | | ); |
| | | } |
| | | getList(); |
| | | // getList(); |
| | | // onMounted(async () => { |
| | | // |
| | | // await nextTick(); |
| | | |
| | | // }); |
| | | </script> |
| | | <style lang="scss" scoped> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-row :gutter="20"> |
| | | <el-col> |
| | | <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å·¥åå·" prop="num"> |
| | | <el-input |
| | | v-model="queryParams.workOrderNo" |
| | | placeholder="请è¾å
¥é£é计åå·¥åå·" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-col> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <!-- <el-col> --> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryRef" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | :label-width="locale === 'zh' ? '60px' : '150px'" |
| | | label-position="left" |
| | | > |
| | | <!-- <el-row :gutter="20"> |
| | | <el-col :span="12"> --> |
| | | <el-form-item :label="$t('plan.query.workOrderNo')" prop="num"> |
| | | <el-input |
| | | style="width: 370px" |
| | | v-model="queryParams.workOrderNo" |
| | | :placeholder="$t('plan.placeholder.planWorkOderNO')" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <!-- </el-col> |
| | | <el-col :span="12" style="text-align: right;"> --> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">{{ |
| | | $t("common.common.query") |
| | | }}</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">{{ |
| | | $t("common.common.reset") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | <!-- </el-col> |
| | | </el-row> --> |
| | | </el-form> |
| | | <!-- </el-col> --> |
| | | </el-row> |
| | | <el-row :gutter="10" class="mb8"> |
| | | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['apsPlateProcessStat:export']" |
| | | >导åº</el-button> |
| | | type="warning" |
| | | plain |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['apsPlateProcessStat:export']" |
| | | >{{ $t("common.common.export") }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Edit" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlateProcessStat:edit']" |
| | | >æ´æ°</el-button> |
| | | type="success" |
| | | plain |
| | | icon="Refresh" |
| | | @click="handleUpdate" |
| | | :disabled="loading" |
| | | v-hasPermi="['apsPlateProcessStat:edit']" |
| | | >{{ $t("common.common.update") }}</el-button |
| | | > |
| | | </el-col> |
| | | |
| | | <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
| | | <right-toolbar |
| | | v-model:showSearch="showSearch" |
| | | @queryTable="getList" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | |
| | | <HxlhTable |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="aps_plate_process_statList" |
| | | :loading="loading" |
| | | :height="height" |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="aps_plate_process_statList" |
| | | :loading="loading" |
| | | :height="height" |
| | | > |
| | | </HxlhTable> |
| | | <!-- æ·»å æä¿®æ¹é£éç»è®¡å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" v-model="open" width="500px" append-to-body> |
| | | <el-form ref="aps_plate_process_statRef" :model="form" :rules="rules" label-width="80px"> |
| | | <!-- <el-dialog :title="title" v-model="open" width="500px" append-to-body> |
| | | <el-form |
| | | ref="aps_plate_process_statRef" |
| | | :model="form" |
| | | :rules="rules" |
| | | label-width="80px" |
| | | > |
| | | <el-form-item label="æåº" prop="num"> |
| | | <el-input v-model="form.num" placeholder="请è¾å
¥æåº" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç产æ°é" prop="productionQuantity"> |
| | | <el-input v-model="form.productionQuantity" placeholder="请è¾å
¥ç产æ°é" /> |
| | | <el-input |
| | | v-model="form.productionQuantity" |
| | | placeholder="请è¾å
¥ç产æ°é" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æ åå·¥æ¶" prop="standardTime"> |
| | | <el-input v-model="form.standardTime" placeholder="请è¾å
¥æ åå·¥æ¶" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºæ»å·¥æ¶" prop="processTotalTime"> |
| | | <el-input v-model="form.processTotalTime" placeholder="请è¾å
¥å·¥åºæ»å·¥æ¶" /> |
| | | <el-input |
| | | v-model="form.processTotalTime" |
| | | placeholder="请è¾å
¥å·¥åºæ»å·¥æ¶" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="设计工æ¶" prop="designTimes"> |
| | | <el-input v-model="form.designTimes" placeholder="请è¾å
¥è®¾è®¡å·¥æ¶" /> |
| | |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup name="Aps_plate_process_stat"> |
| | | import { listPlateStat,updateStat } from "@/api/mainPlan/plateProcessStat"; |
| | | import { listPlateStat, updateStat } from "@/api/mainPlan/plateProcessStat"; |
| | | import HxlhTable from "@/components/HxlhTable/index.vue"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { ref } from "vue"; |
| | | import {ElMessage} from "element-plus"; |
| | | import { ElMessage } from "element-plus"; |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | import { useI18n } from "vue-i18n"; //è¦å¨jsä¸ä½¿ç¨å½é
å |
| | | const { t, locale } = useI18n(); |
| | | const aps_plate_process_statList = ref([]); |
| | | const open = ref(false); |
| | | // const open = ref(false); |
| | | const loading = ref(false); |
| | | const showSearch = ref(true); |
| | | const single = ref(true); |
| | | const multiple = ref(true); |
| | | const total = ref(0); |
| | | const title = ref(""); |
| | | const height = ref(document.documentElement.clientHeight - 220 + "px;") |
| | | |
| | | const height = ref(document.documentElement.clientHeight - 220 + "px;"); |
| | | |
| | | const data = reactive({ |
| | | form: {}, |
| | | // form: {}, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | |
| | | designTimes: null, |
| | | batchNumber: null, |
| | | }, |
| | | rules: { |
| | | } |
| | | rules: {}, |
| | | }); |
| | | |
| | | const { queryParams, form, rules } = toRefs(data); |
| | | |
| | | const { queryParams, rules } = toRefs(data); // form |
| | | |
| | | // è¡¨æ ¼é
ç½® |
| | | const columns = ref([ |
| | | /* { type: 'seq', title: 'åºå·', width: 60 },*/ |
| | | { |
| | | title: 'å·¥åå·', |
| | | field: 'workOrderNo', |
| | | width: 150, |
| | | } , |
| | | { |
| | | title: 'å·¥åºåç§°', |
| | | field: 'processName', |
| | | }, |
| | | { |
| | | title: 'å·¥åºå·', |
| | | field: 'routeProcessNumberTxt', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å½åå·¥åºå·', |
| | | field: 'currentProcessNumberTxt', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ç产æ°é', |
| | | field: 'productionQuantity', |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: 'æ åå·¥æ¶', |
| | | field: 'standardTime', |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: 'å·¥åºæ»å·¥æ¶', |
| | | field: 'processTotalTime', |
| | | width: 80, |
| | | const columns = ref([]); |
| | | |
| | | watch( |
| | | locale, |
| | | (newLocale) => { |
| | | columns.value = [ |
| | | /* { type: 'seq', title: 'åºå·', width: 60 },*/ |
| | | { |
| | | title: t("plan.table.workOrderNo"), |
| | | field: "workOrderNo", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.processName"), |
| | | field: "processName", |
| | | }, |
| | | { |
| | | title: t("plan.table.processNumber"), |
| | | field: "routeProcessNumberTxt", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.currentProcessNumber"), |
| | | field: "currentProcessNumberTxt", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.productionQuantity"), |
| | | field: "productionQuantity", |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: t("plan.table.standardTime"), |
| | | field: "standardTime", |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: t("plan.table.totalWorkingHoursOfProcess"), |
| | | field: "processTotalTime", |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: t("plan.table.planStartDay"), |
| | | field: "processPlanStartDaytxt", |
| | | width: 200, |
| | | type: "html", |
| | | }, |
| | | { |
| | | title: t("plan.table.planEndDayDate"), |
| | | field: "processPlanEndDaytxt", |
| | | width: 200, |
| | | type: "html", |
| | | }, |
| | | { |
| | | title: t("plan.table.OrderCompletionDate"), |
| | | field: "orderPlanEndDay", |
| | | width: 200, |
| | | format: "YYYY-MM-DD HH:mm:ss", |
| | | }, |
| | | ]; |
| | | getList(); |
| | | }, |
| | | { |
| | | title: '计åå¼å·¥æ¥', |
| | | field: 'processPlanStartDaytxt', |
| | | width: 200, |
| | | type:'html' |
| | | }, |
| | | { |
| | | title: '计åå®å·¥æ¥', |
| | | field: 'processPlanEndDaytxt', |
| | | width: 200, |
| | | type: 'html' |
| | | }, |
| | | { |
| | | title: '订åå®å·¥æ¥', |
| | | field: 'orderPlanEndDay', |
| | | width: 200, |
| | | format: 'YYYY-MM-DD HH:mm:ss' |
| | | } |
| | | ]); |
| | | |
| | | |
| | | { immediate: true, deep: true } |
| | | ); |
| | | |
| | | /** æ¥è¯¢é£éç»è®¡å表 */ |
| | | function getList() { |
| | | loading.value = true; |
| | | listPlateStat(queryParams.value).then(response => { |
| | | listPlateStat(queryParams.value).then((response) => { |
| | | const listValue = response.rows; |
| | | listValue.forEach(listItem => { |
| | | listItem[`processPlanStartDaytxt`]= listItem.warning? `<font color="red">${listItem.processPlanStartDay}</font>` :listItem.processPlanStartDay; |
| | | listItem[`processPlanEndDaytxt`]= listItem.warning? `<font color="red">${listItem.processPlanEndDay}</font>` :listItem.processPlanEndDay; |
| | | listItem[`routeProcessNumberTxt`]= listItem.routeProcessNumber.toString().padStart(3, '0'); |
| | | listItem[`currentProcessNumberTxt`]= listItem.currentProcessNumber.toString().padStart(3, '0'); |
| | | |
| | | |
| | | listValue.forEach((listItem) => { |
| | | listItem[`processPlanStartDaytxt`] = listItem.warning |
| | | ? `<font color="red">${listItem.processPlanStartDay}</font>` |
| | | : listItem.processPlanStartDay; |
| | | listItem[`processPlanEndDaytxt`] = listItem.warning |
| | | ? `<font color="red">${listItem.processPlanEndDay}</font>` |
| | | : listItem.processPlanEndDay; |
| | | listItem[`routeProcessNumberTxt`] = listItem.routeProcessNumber |
| | | .toString() |
| | | .padStart(3, "0"); |
| | | listItem[`currentProcessNumberTxt`] = listItem.currentProcessNumber |
| | | .toString() |
| | | .padStart(3, "0"); |
| | | }); |
| | | aps_plate_process_statList.value =listValue |
| | | aps_plate_process_statList.value = listValue; |
| | | total.value = response.total; |
| | | loading.value = false; |
| | | }); |
| | | } |
| | | |
| | | // åæ¶æé® |
| | | function cancel() { |
| | | open.value = false; |
| | | reset(); |
| | | } |
| | | // // åæ¶æé® |
| | | // function cancel() { |
| | | // open.value = false; |
| | | // reset(); |
| | | // } |
| | | |
| | | // 表åéç½® |
| | | function reset() { |
| | | form.value = { |
| | | id: null, |
| | | workOrderNo: null, |
| | | processName: null, |
| | | num: null, |
| | | routeProcessNumber: null, |
| | | currentProcessNumber: null, |
| | | productionQuantity: null, |
| | | standardTime: null, |
| | | processTotalTime: null, |
| | | processPlanEndDay: null, |
| | | computePlanEndDay: null, |
| | | designTimes: null, |
| | | batchNumber: null, |
| | | createBy: null, |
| | | delFlag: null |
| | | }; |
| | | proxy.resetForm("aps_plate_process_statRef"); |
| | | } |
| | | // function reset() { |
| | | // form.value = { |
| | | // id: null, |
| | | // workOrderNo: null, |
| | | // processName: null, |
| | | // num: null, |
| | | // routeProcessNumber: null, |
| | | // currentProcessNumber: null, |
| | | // productionQuantity: null, |
| | | // standardTime: null, |
| | | // processTotalTime: null, |
| | | // processPlanEndDay: null, |
| | | // computePlanEndDay: null, |
| | | // designTimes: null, |
| | | // batchNumber: null, |
| | | // createBy: null, |
| | | // delFlag: null, |
| | | // }; |
| | | // proxy.resetForm("aps_plate_process_statRef"); |
| | | // } |
| | | |
| | | /** æç´¢æé®æä½ */ |
| | | function handleQuery() { |
| | |
| | | |
| | | /** éç½®æé®æä½ */ |
| | | function resetQuery() { |
| | | queryParams.value.workOrderNo =''; |
| | | queryParams.value.workOrderNo = ""; |
| | | proxy.resetForm("queryRef"); |
| | | handleQuery(); |
| | | } |
| | | |
| | | // å¤éæ¡é䏿°æ® |
| | | function handleSelectionChange(selection) { |
| | | ids.value = selection.map(item => item.id); |
| | | ids.value = selection.map((item) => item.id); |
| | | single.value = selection.length != 1; |
| | | multiple.value = !selection.length; |
| | | } |
| | | |
| | | /** æ°å¢æé®æä½ */ |
| | | function handleAdd() { |
| | | reset(); |
| | | open.value = true; |
| | | title.value = "æ·»å é£éç»è®¡"; |
| | | } |
| | | // function handleAdd() { |
| | | // reset(); |
| | | // open.value = true; |
| | | // title.value = "æ·»å é£éç»è®¡"; |
| | | // } |
| | | |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | function handleUpdate(row) { |
| | | reset(); |
| | | // reset(); |
| | | loading.value = true; |
| | | updateStat().then(response => { |
| | | form.value = response.data; |
| | | updateStat().then((response) => { |
| | | // form.value = response.data; |
| | | loading.value = false; |
| | | ElMessage({ |
| | | message: 'æ°æ®æ´æ°æå', |
| | | type: 'success', |
| | | }) |
| | | message: t("plan.message.update"), |
| | | type: "success", |
| | | }); |
| | | getList(); |
| | | }); |
| | | } |
| | | |
| | | /** æäº¤æé® */ |
| | | function submitForm() { |
| | | proxy.$refs["aps_plate_process_statRef"].validate(valid => { |
| | | if (valid) { |
| | | if (form.value.id != null) { |
| | | updateAps_plate_process_stat(form.value).then(response => { |
| | | proxy.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | } else { |
| | | addAps_plate_process_stat(form.value).then(response => { |
| | | proxy.$modal.msgSuccess("æ°å¢æå"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | // function submitForm() { |
| | | // proxy.$refs["aps_plate_process_statRef"].validate((valid) => { |
| | | // if (valid) { |
| | | // if (form.value.id != null) { |
| | | // updateAps_plate_process_stat(form.value).then((response) => { |
| | | // proxy.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | // open.value = false; |
| | | // getList(); |
| | | // }); |
| | | // } else { |
| | | // addAps_plate_process_stat(form.value).then((response) => { |
| | | // proxy.$modal.msgSuccess("æ°å¢æå"); |
| | | // open.value = false; |
| | | // getList(); |
| | | // }); |
| | | // } |
| | | // } |
| | | // }); |
| | | // } |
| | | |
| | | /** å é¤æé®æä½ */ |
| | | function handleDelete(row) { |
| | | const _ids = row.id || ids.value; |
| | | proxy.$modal.confirm('æ¯å¦ç¡®è®¤å é¤é£éç»è®¡ç¼å·ä¸º"' + _ids + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delAps_plate_process_stat(_ids); |
| | | }).then(() => { |
| | | getList(); |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | }).catch(() => {}); |
| | | } |
| | | // function handleDelete(row) { |
| | | // const _ids = row.id || ids.value; |
| | | // proxy.$modal |
| | | // .confirm('æ¯å¦ç¡®è®¤å é¤é£éç»è®¡ç¼å·ä¸º"' + _ids + '"çæ°æ®é¡¹ï¼') |
| | | // .then(function () { |
| | | // return delAps_plate_process_stat(_ids); |
| | | // }) |
| | | // .then(() => { |
| | | // getList(); |
| | | // proxy.$modal.msgSuccess("å 餿å"); |
| | | // }) |
| | | // .catch(() => {}); |
| | | // } |
| | | |
| | | /** å¯¼åºæé®æä½ */ |
| | | function handleExport() { |
| | | proxy.download('/aps/plateProcessStat/export', { |
| | | ...queryParams.value |
| | | }, `aps_plate_process_stat_${new Date().getTime()}.xlsx`) |
| | | proxy.download( |
| | | "/aps/plateProcessStat/export", |
| | | { |
| | | ...queryParams.value, |
| | | }, |
| | | `aps_plate_process_stat_${new Date().getTime()}.xlsx` |
| | | ); |
| | | } |
| | | const headerCellClassName = ({ column }) => { |
| | | if (column.field === 'name') { |
| | | return 'col-blue' |
| | | } |
| | | return null |
| | | } |
| | | const rowClassName = ({ rowIndex }) => { |
| | | if ([2, 3, 5].includes(rowIndex)) { |
| | | return 'row-green' |
| | | } |
| | | return null |
| | | } |
| | | const cellClassName = ({ row, column }) => { |
| | | if (column.field === 'processPlanStartDay'||column.field === 'processPlanEndDay') { |
| | | if (row.warning) { |
| | | return 'col-orange' |
| | | } |
| | | } |
| | | return null |
| | | } |
| | | getList(); |
| | | // const headerCellClassName = ({ column }) => { |
| | | // if (column.field === "name") { |
| | | // return "col-blue"; |
| | | // } |
| | | // return null; |
| | | // }; |
| | | // const rowClassName = ({ rowIndex }) => { |
| | | // if ([2, 3, 5].includes(rowIndex)) { |
| | | // return "row-green"; |
| | | // } |
| | | // return null; |
| | | // }; |
| | | // const cellClassName = ({ row, column }) => { |
| | | // if ( |
| | | // column.field === "processPlanStartDay" || |
| | | // column.field === "processPlanEndDay" |
| | | // ) { |
| | | // if (row.warning) { |
| | | // return "col-orange"; |
| | | // } |
| | | // } |
| | | // return null; |
| | | // }; |
| | | // getList(); |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | ::v-deep(.mytable-style.vxe-table .vxe-body--row.row-green) { |
| | |
| | | background-color: red; |
| | | color: #fff; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | v-hasPermi="['weldSeam:weldSeam:importData']" |
| | | >导å
¥</el-button> |
| | | >{{ $t("common.common.import") }}</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['weldSeam:weldSeam:export']" |
| | | >导åº</el-button> |
| | | >{{ $t("common.common.export") }}</el-button> |
| | | </el-col> |
| | | <right-toolbar :search="false" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | |
| | | @on-checkbox="handleCheckboxChange" |
| | | > |
| | | <template #buttons="{row}"> |
| | | <vxe-button mode="text" @click="viewEvent(row)">ç¼è¾</vxe-button> |
| | | <vxe-button mode="text" @click="viewEvent(row)">{{ $t("common.common.edit") }}</vxe-button> |
| | | <!-- <vxe-button mode="text" @row-click="viewEvent(row.year)">ç¼è¾</vxe-button> --> |
| | | </template> |
| | | </HxlhTable> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px"> |
| | | <el-row :gutter="20"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryRef" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | :label-width="locale === 'zh' ? '90px' : '180px'" |
| | | label-position="left" |
| | | > |
| | | <el-row :gutter="10" class="mb8"> |
| | | <!-- <el-col |
| | | :span="6"> --> |
| | | <el-form-item :label="$t('plan.query.daterangePlanStartDay')"> |
| | | <el-date-picker |
| | | style="width: 240px" |
| | | v-model="daterangePlanStartDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | :start-placeholder="$t('plan.placeholder.startDate')" |
| | | :end-placeholder="$t('plan.placeholder.endDate')" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <!-- </el-col> |
| | | <el-col :span="6"> --> |
| | | <el-form-item :label="$t('plan.query.daterangePlanEndDay')"> |
| | | <el-date-picker |
| | | style="width: 240px" |
| | | v-model="daterangePlanEndDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | :start-placeholder="$t('plan.placeholder.startDate')" |
| | | :end-placeholder="$t('plan.placeholder.endDate')" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <!-- </el-col> |
| | | <el-col |
| | | :span="6"> |
| | | <el-form-item label="计åå¼å·¥æ¥" style="width: 100%;"> |
| | | <el-date-picker |
| | | v-model="daterangePlanStartDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="计åå®å·¥æ¥" style="width: 100%;"> |
| | | <el-date-picker |
| | | v-model="daterangePlanEndDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col |
| | | :span="6"> |
| | | <el-form-item label="åæ®å·" prop="documentNumber" style="width: 100%;"> |
| | | <el-input |
| | | v-model="queryParams.documentNumber" |
| | | placeholder="请è¾å
¥åæ®å·" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col |
| | | :span="6"> |
| | | <el-form-item label="客æ·åç§°" prop="customer" style="width: 100%;"> |
| | | <el-input |
| | | v-model="queryParams.customer" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | :span="6"> --> |
| | | <el-form-item |
| | | :label="$t('plan.query.documentNumber')" |
| | | prop="documentNumber" |
| | | > |
| | | <el-input |
| | | v-model="queryParams.documentNumber" |
| | | :placeholder="$t('plan.placeholder.documentNumber')" |
| | | clearable |
| | | style="width: 240px" |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <!-- </el-col> |
| | | <el-col |
| | | :span="6"> --> |
| | | <el-form-item :label="$t('plan.query.customer')" prop="customer"> |
| | | <el-input |
| | | style="width: 240px" |
| | | v-model="queryParams.customer" |
| | | :placeholder="$t('plan.placeholder.customer')" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <!-- </el-col> |
| | | <el-col |
| | | :span="24" |
| | | style="text-align: right;"> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | |
| | | style="text-align: right;"> --> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">{{ |
| | | $t("common.common.query") |
| | | }}</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">{{ |
| | | $t("common.common.reset") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | <!-- </el-col> |
| | | --> |
| | | </el-row> |
| | | </el-form> |
| | | |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | :disabled="single" |
| | | @click="plannedStart" |
| | | v-hasPermi="['partPlan:add']" |
| | | >æ¹éä¿®æ¹è®¡åå¼å·¥æ¥</el-button> |
| | | >{{ $t("plan.btns.batchPlanStartDay") }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | :disabled="single" |
| | | @click="plannedEnd" |
| | | v-hasPermi="['partPlan:edit']" |
| | | >æ¹éä¿®æ¹è®¡åå®å·¥æ¥</el-button> |
| | | >{{ $t("plan.btns.batchPlanEndDay") }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | plain |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | <el-button |
| | | type="info" |
| | | plain |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | v-hasPermi="['partPlan:import']" |
| | | >导å
¥</el-button> |
| | | >{{ $t("common.common.import") }}</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['partPlan:export']" |
| | | >导åº</el-button> |
| | | >{{ $t("common.common.export") }}</el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
| | | <right-toolbar |
| | | v-model:showSearch="showSearch" |
| | | @queryTable="getList" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | |
| | | <HxlhTable |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="planList" |
| | | :loading="loading" |
| | | :height="height" |
| | | @on-checkbox="handleCheckboxChange" |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="planList" |
| | | :loading="loading" |
| | | :height="height" |
| | | @on-checkbox="handleCheckboxChange" |
| | | > |
| | | </HxlhTable> |
| | | |
| | | <!-- 导å
¥å¯¹è¯æ¡ --> |
| | | <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body @close="dialogCancel"> |
| | | <el-dialog |
| | | :title="upload.title" |
| | | v-model="upload.open" |
| | | width="90%" |
| | | append-to-body |
| | | @close="dialogCancel" |
| | | > |
| | | <el-row :gutter="10"> |
| | | <el-col> |
| | | <div style="border-bottom: 1px solid #ccc;" > |
| | | <p>ä¸ä¼ Excelæä»¶ï¼å
å«é¶ä»¶å·¥åä¿¡æ¯ãç³»ç»å°è§£ææ°æ®å¹¶ä¿åå°æ¬å°ï¼ç¨äºå
³èå°é¶ä»¶è®¡åä¸ã</p> |
| | | <div style="border-bottom: 1px solid #ccc"> |
| | | <p> |
| | | {{ $t("plan.upload.info") }} |
| | | </p> |
| | | </div> |
| | | </el-col> |
| | | <el-col > |
| | | <el-col> |
| | | <div></div> |
| | | </el-col> |
| | | <!-- <el-col> |
| | |
| | | </el-col> --> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="10" style="margin-top: 20px;"> |
| | | <el-row :gutter="10" style="margin-top: 20px"> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | |
| | | </el-row> --> |
| | | <el-row> |
| | | <el-col> |
| | | <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="true" drag> |
| | | <el-upload |
| | | ref="uploadRef" |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url + '?updateSupport=' + upload.updateSupport" |
| | | :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | :auto-upload="true" |
| | | drag |
| | | > |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | <div class="el-upload__text"> |
| | | {{ $t("plan.upload.prevText") |
| | | }}<em>{{ $t("plan.upload.uploadText") }}</em> |
| | | </div> |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | <!-- <div class="el-upload__tip"> |
| | | <el-checkbox v-model="upload.updateSupport" />æ¯å¦æ´æ°å·²ç»åå¨çç¨æ·æ°æ® |
| | | </div> --> |
| | | <span>ä»
å
许导å
¥xlsãxlsxæ ¼å¼æä»¶ã</span> |
| | | <span>{{ $t("plan.upload.fileTypeImport") }}</span> |
| | | <!-- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">ä¸è½½æ¨¡æ¿</el-link> --> |
| | | </div> |
| | | </template> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col style="margin-top: 20px;"> |
| | | <el-col style="margin-top: 20px"> |
| | | <div v-show="isVisible"> |
| | | <el-alert icon="Check" :show-icon="true" title="é¶ä»¶å·¥åæ°æ®å·²æåè§£æ" type="success" :closable="false"/> |
| | | <el-alert |
| | | icon="Check" |
| | | :show-icon="true" |
| | | :title="$t('plan.message.dataWorkorderSuccess')" |
| | | type="success" |
| | | :closable="false" |
| | | /> |
| | | </div> |
| | | <div v-show="isError"> |
| | | <el-alert icon="Close" :show-icon="true" title="é¶ä»¶å·¥åæ°æ®å·²è§£æå¤±è´¥" type="error" :closable="false"/> |
| | | <el-alert |
| | | icon="Close" |
| | | :show-icon="true" |
| | | :title="$t('plan.message.dataWorkorderSuccess')" |
| | | type="error" |
| | | :closable="false" |
| | | /> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-show="isVisible"> |
| | | <el-col> |
| | | <div> |
| | | <h2>æ°æ®é¢è§</h2> |
| | | <h2>{{$t("plan.upload.dataPreview")}}</h2> |
| | | </div> |
| | | <HxlhTable |
| | | style="width: 100%" |
| | |
| | | </HxlhTable> |
| | | </el-col> |
| | | <el-col> |
| | | <div style="text-align: right;"> |
| | | <h4>å
±ä¸ä¼ <span style="color: blue;">{{ total }}</span>æ¡é¶ä»¶å·¥åæ°æ®</h4> |
| | | <div style="text-align: right"> |
| | | <h4> |
| | | {{$t("plan.upload.totalUpload")}}<span style="color: blue">{{ total }}</span |
| | | >{{$t("plan.upload.itemUpload")}} |
| | | </h4> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <div class="dialog-footer"> |
| | | <!-- <el-button type="primary" @click="submitFileForm">ç¡® å®</el-button> --> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Check" |
| | | :disabled="planned" |
| | | @click="uploadParse" |
| | | v-hasPermi="['partPlan:confirmPart']" |
| | | >确认ä¸ä¼ </el-button> |
| | | <el-button @click="dialogCancel">å æ¶</el-button> |
| | | type="success" |
| | | plain |
| | | icon="Check" |
| | | :disabled="planned" |
| | | @click="uploadParse" |
| | | v-hasPermi="['partPlan:confirmPart']" |
| | | >{{$t("plan.upload.confirmUpload")}}</el-button |
| | | > |
| | | <el-button @click="dialogCancel">{{$t("plan.upload.cancel")}}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script setup name="Plan"> |
| | | import { listPlan, examplePlan, confirmPart, addPlan, updatePlan } from "@/api/partPlan/plan"; |
| | | import HxlhTable from '@/components/HxlhTable' |
| | | import { |
| | | listPlan, |
| | | examplePlan, |
| | | confirmPart, |
| | | addPlan, |
| | | updatePlan, |
| | | } from "@/api/partPlan/plan"; |
| | | import HxlhTable from "@/components/HxlhTable"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { ref } from "vue"; |
| | | import { ElMessage } from 'element-plus' |
| | | import { ElMessage } from "element-plus"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | import { useI18n } from "vue-i18n"; //è¦å¨jsä¸ä½¿ç¨å½é
å |
| | | const { t, locale } = useI18n(); |
| | | const exampleList = ref([]); |
| | | const planList = ref([]); |
| | | const loading = ref(true); |
| | |
| | | const total = ref(0); |
| | | const daterangePlanStartDay = ref([]); |
| | | const daterangePlanEndDay = ref([]); |
| | | const height = ref(document.documentElement.clientHeight - 270 + "px;") |
| | | const height = ref(document.documentElement.clientHeight - 270 + "px;"); |
| | | const isVisible = ref(false); |
| | | const isError = ref(false); |
| | | const planned = ref(true); |
| | |
| | | // 设置ä¸ä¼ ç请æ±å¤´é¨ |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | // ä¸ä¼ çå°å |
| | | url: import.meta.env.VITE_APP_BASE_API + "/aps/partPlan/importData" |
| | | url: import.meta.env.VITE_APP_BASE_API + "/aps/partPlan/importData", |
| | | }); |
| | | |
| | | // è¡¨æ ¼é
ç½® |
| | | const exampleColumns = ref([ |
| | | { type: 'seq', title: 'åºå·', width: 60 }, |
| | | { |
| | | title: '主计åå', |
| | | field: 'masterPlanner', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '卿¥', |
| | | field: 'weekDay', |
| | | width: 100, |
| | | formatter: (({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | | const weekDay = new Date(cellValue); |
| | | const year = weekDay.getFullYear(); |
| | | const month = String(weekDay.getMonth() + 1).padStart(2, '0'); |
| | | const day = String(weekDay.getDate()).padStart(2, '0'); |
| | | return `${month}-${day}`; |
| | | } |
| | | return ''; |
| | | }) |
| | | }, |
| | | { |
| | | title: 'å¨åº¦', |
| | | field: 'weekCycle', |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: '主件æå·', |
| | | field: 'mainPartNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '主件å¾å·', |
| | | field: 'mainPartDrawingNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '客æ·åç§°', |
| | | field: 'customer', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'ä¸å¡ç±»å', |
| | | field: 'businessType', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'åæ®å·', |
| | | field: 'documentNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'éæ±åç±»', |
| | | field: 'requirementType', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'åæ®ç¶æ', |
| | | field: 'documentStatus', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'æå·', |
| | | field: 'itemNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å¾å·', |
| | | field: 'drawingNo', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'çæ¬å·', |
| | | field: 'versionNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ç产æ°é', |
| | | field: 'productionQuantity', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'è¯åæ°é', |
| | | field: 'goodProductsQuantity', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å·¥åºå·', |
| | | field: 'processNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å·¥ä½ä¸å¿', |
| | | field: 'workCenter', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'æå±é¨é¨', |
| | | field: 'department', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计åå¼å·¥æ¥', |
| | | field: 'planStartDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计åå®å·¥æ¥', |
| | | field: 'planEndDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '夿æå·', |
| | | field: 'standbyNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '夿åç§°', |
| | | field: 'standbyName', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: '夿åºå', |
| | | field: 'standbyStock', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ä¸éå·¥åºæå±é¨é¨', |
| | | field: 'nextProcessDeparment', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'æ¯å¦æèµ·', |
| | | field: 'isSuspended', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å¤åæ è¯', |
| | | field: 'isOutsourcing', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'è´¦å¥', |
| | | field: 'account', |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'ä¸é¶ç©æ', |
| | | // field: 'advancedMaterials', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶åæ®å·', |
| | | // field: 'advancedDocumentNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶éæ±æ¥æ', |
| | | // field: 'advancedRequirementDay', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: '计åé½å¥', |
| | | // field: 'isPlanComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'åºåé½å¥', |
| | | // field: 'isStockComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦ææè¿å·¥åº', |
| | | // field: 'hasTurnback', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: 'é£é©æ è¯', |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]); |
| | | // è¡¨æ ¼é
ç½® |
| | | const exampleColumns = ref([]); |
| | | |
| | | // è¡¨æ ¼é
ç½® |
| | | const columns = ref([ |
| | | { type: 'checkbox', width: 60, align:"center"}, |
| | | { type: 'seq', title: 'åºå·', width: 60 }, |
| | | { |
| | | title: '主计åå', |
| | | field: 'masterPlanner', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '卿¥', |
| | | field: 'weekDay', |
| | | width: 100, |
| | | formatter: (({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | | const weekDay = new Date(cellValue); |
| | | const year = weekDay.getFullYear(); |
| | | const month = String(weekDay.getMonth() + 1).padStart(2, '0'); |
| | | const day = String(weekDay.getDate()).padStart(2, '0'); |
| | | return `${month}-${day}`; |
| | | } |
| | | return ''; |
| | | }) |
| | | }, |
| | | { |
| | | title: 'å¨åº¦', |
| | | field: 'weekCycle', |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: '主件æå·', |
| | | field: 'mainPartNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '主件å¾å·', |
| | | field: 'mainPartDrawingNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '客æ·åç§°', |
| | | field: 'customer', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'ä¸å¡ç±»å', |
| | | field: 'businessType', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'åæ®å·', |
| | | field: 'documentNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'éæ±åç±»', |
| | | field: 'requirementType', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'åæ®ç¶æ', |
| | | field: 'documentStatus', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'æå·', |
| | | field: 'itemNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å¾å·', |
| | | field: 'drawingNo', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'çæ¬å·', |
| | | field: 'versionNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ç产æ°é', |
| | | field: 'productionQuantity', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'è¯åæ°é', |
| | | field: 'goodProductsQuantity', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å·¥åºå·', |
| | | field: 'processNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å·¥ä½ä¸å¿', |
| | | field: 'workCenter', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'æå±é¨é¨', |
| | | field: 'department', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计åå¼å·¥æ¥', |
| | | field: 'planStartDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计åå®å·¥æ¥', |
| | | field: 'planEndDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '夿æå·', |
| | | field: 'standbyNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '夿åç§°', |
| | | field: 'standbyName', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: '夿åºå', |
| | | field: 'standbyStock', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'ä¸éå·¥åºæå±é¨é¨', |
| | | field: 'nextProcessDeparment', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'æ¯å¦æèµ·', |
| | | field: 'isSuspended', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'å¤åæ è¯', |
| | | field: 'isOutsourcing', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: 'è´¦å¥', |
| | | field: 'account', |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'ä¸é¶ç©æ', |
| | | // field: 'advancedMaterials', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶åæ®å·', |
| | | // field: 'advancedDocumentNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶éæ±æ¥æ', |
| | | // field: 'advancedRequirementDay', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: '计åé½å¥', |
| | | // field: 'isPlanComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'åºåé½å¥', |
| | | // field: 'isStockComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦ææè¿å·¥åº', |
| | | // field: 'hasTurnback', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: 'é£é©æ è¯', |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]); |
| | | // è¡¨æ ¼é
ç½® |
| | | const columns = ref([]); |
| | | |
| | | const data = reactive({ |
| | | queryParams: { |
| | | documentNumber: null, |
| | | customer: null, |
| | | batchNumber: null, |
| | | } |
| | | }, |
| | | }); |
| | | |
| | | const { queryParams } = toRefs(data); |
| | | |
| | | watch( |
| | | locale, |
| | | (newLocale) => { |
| | | columns.value = [ |
| | | { type: "checkbox", width: 60, align: "center" }, |
| | | { type: "seq", title: t("plan.table.seq"), width: 60 }, |
| | | { |
| | | title: t("plan.table.masterPlanner"), |
| | | field: "masterPlanner", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.weekDay"), |
| | | field: "weekDay", |
| | | width: 100, |
| | | formatter: ({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | | const weekDay = new Date(cellValue); |
| | | const year = weekDay.getFullYear(); |
| | | const month = String(weekDay.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(weekDay.getDate()).padStart(2, "0"); |
| | | return `${month}-${day}`; |
| | | } |
| | | return ""; |
| | | }, |
| | | }, |
| | | { |
| | | title: t("plan.table.weekCycle"), |
| | | field: "weekCycle", |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: t("plan.table.mainPartNumber"), |
| | | field: "mainPartNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.mainPartDrawingNumber"), |
| | | field: "mainPartDrawingNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.customer"), |
| | | field: "customer", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.businessType"), |
| | | field: "businessType", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.documentNumber"), |
| | | field: "documentNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.requirementType"), |
| | | field: "requirementType", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.documentStatus"), |
| | | field: "documentStatus", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "itemNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.drawingNo"), |
| | | field: "drawingNo", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.versionNumber"), |
| | | field: "versionNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.productionQuantity"), |
| | | field: "productionQuantity", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.goodProductsQuantity"), |
| | | field: "goodProductsQuantity", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.processNumber"), |
| | | field: "processNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.factoryCenter"), |
| | | field: "workCenter", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.dependencyDepartment"), |
| | | field: "department", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.planStartDay"), |
| | | field: "planStartDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.planEndDayDate"), |
| | | field: "planEndDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyNumber"), |
| | | field: "standbyNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyName"), |
| | | field: "standbyName", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyStock"), |
| | | field: "standbyStock", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.departmentToNextProcessBelongs"), |
| | | field: "nextProcessDeparment", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.isSuspended"), |
| | | field: "isSuspended", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.isOutsourcing"), |
| | | field: "isOutsourcing", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.account"), |
| | | field: "account", |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'ä¸é¶ç©æ', |
| | | // field: 'advancedMaterials', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶åæ®å·', |
| | | // field: 'advancedDocumentNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶éæ±æ¥æ', |
| | | // field: 'advancedRequirementDay', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: '计åé½å¥', |
| | | // field: 'isPlanComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'åºåé½å¥', |
| | | // field: 'isStockComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦ææè¿å·¥åº', |
| | | // field: 'hasTurnback', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: 'é£é©æ è¯', |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]; |
| | | exampleColumns.value = [ |
| | | { type: "seq", title: t("plan.table.seq"), width: 60 }, |
| | | { |
| | | title: t("plan.table.masterPlanner"), |
| | | field: "masterPlanner", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.weekDay"), |
| | | field: "weekDay", |
| | | width: 100, |
| | | formatter: ({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | | const weekDay = new Date(cellValue); |
| | | const year = weekDay.getFullYear(); |
| | | const month = String(weekDay.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(weekDay.getDate()).padStart(2, "0"); |
| | | return `${month}-${day}`; |
| | | } |
| | | return ""; |
| | | }, |
| | | }, |
| | | { |
| | | title: t("plan.table.weekCycle"), |
| | | field: "weekCycle", |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: t("plan.table.mainPartNumber"), |
| | | field: "mainPartNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.mainPartDrawingNumber"), |
| | | field: "mainPartDrawingNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.customer"), |
| | | field: "customer", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.businessType"), |
| | | field: "businessType", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.documentNumber"), |
| | | field: "documentNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.requirementType"), |
| | | field: "requirementType", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.documentStatus"), |
| | | field: "documentStatus", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "itemNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.drawingNo"), |
| | | field: "drawingNo", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.versionNumber"), |
| | | field: "versionNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.productionQuantity"), |
| | | field: "productionQuantity", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.goodProductsQuantity"), |
| | | field: "goodProductsQuantity", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.processNumber"), |
| | | field: "processNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.factoryCenter"), |
| | | field: "workCenter", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.dependencyDepartment"), |
| | | field: "department", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.planStartDay"), |
| | | field: "planStartDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.planEndDayDate"), |
| | | field: "planEndDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyNumber"), |
| | | field: "standbyNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyName"), |
| | | field: "standbyName", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t("plan.table.standbyStock"), |
| | | field: "standbyStock", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.departmentToNextProcessBelongs"), |
| | | field: "nextProcessDeparment", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: t("plan.table.isSuspended"), |
| | | field: "isSuspended", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.isOutsourcing"), |
| | | field: "isOutsourcing", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: t("plan.table.account"), |
| | | field: "account", |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'ä¸é¶ç©æ', |
| | | // field: 'advancedMaterials', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶åæ®å·', |
| | | // field: 'advancedDocumentNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶éæ±æ¥æ', |
| | | // field: 'advancedRequirementDay', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: '计åé½å¥', |
| | | // field: 'isPlanComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'åºåé½å¥', |
| | | // field: 'isStockComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦ææè¿å·¥åº', |
| | | // field: 'hasTurnback', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: 'é£é©æ è¯', |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]; |
| | | getList(); |
| | | }, |
| | | { immediate: true, deep: true } |
| | | ); |
| | | /** æ¥è¯¢é¶ä»¶è®¡å临æ¶ç®¡çå表 */ |
| | | function getExampleList() { |
| | | loading.value = true; |
| | | queryParams.value = {}; |
| | | queryParams.value.batchNumber = batchNumber.value; |
| | | examplePlan(queryParams.value).then(response => { |
| | | examplePlan(queryParams.value).then((response) => { |
| | | exampleList.value = response.rows; |
| | | total.value = response.total; |
| | | loading.value = false; |
| | |
| | | function getList() { |
| | | loading.value = true; |
| | | queryParams.value.params = {}; |
| | | if (null != daterangePlanStartDay && '' != daterangePlanStartDay) { |
| | | queryParams.value.params["beginPlanStartDay"] = daterangePlanStartDay.value[0]; |
| | | queryParams.value.params["endPlanStartDay"] = daterangePlanStartDay.value[1]; |
| | | if (null != daterangePlanStartDay && "" != daterangePlanStartDay) { |
| | | queryParams.value.params["beginPlanStartDay"] = |
| | | daterangePlanStartDay.value[0]; |
| | | queryParams.value.params["endPlanStartDay"] = |
| | | daterangePlanStartDay.value[1]; |
| | | } |
| | | if (null != daterangePlanEndDay && '' != daterangePlanEndDay) { |
| | | if (null != daterangePlanEndDay && "" != daterangePlanEndDay) { |
| | | queryParams.value.params["beginPlanEndDay"] = daterangePlanEndDay.value[0]; |
| | | queryParams.value.params["endPlanEndDay"] = daterangePlanEndDay.value[1]; |
| | | } |
| | | listPlan(queryParams.value).then(response => { |
| | | listPlan(queryParams.value).then((response) => { |
| | | planList.value = response.rows; |
| | | loading.value = false; |
| | | }); |
| | |
| | | |
| | | /** æç´¢æé®æä½ */ |
| | | function handleQuery() { |
| | | queryParams.value.pageNum = 1; |
| | | queryParams.value.planNum = 1; |
| | | getList(); |
| | | } |
| | | |
| | |
| | | }; |
| | | |
| | | /** æ¹éä¿®æ¹è®¡åå¼å·¥æ¥æé®æä½ */ |
| | | function plannedStart() { |
| | | |
| | | } |
| | | function plannedStart() {} |
| | | |
| | | /** æ¹éä¿®æ¹è®¡åå®å·¥æ¥æé®æä½ */ |
| | | function plannedEnd() { |
| | | |
| | | } |
| | | function plannedEnd() {} |
| | | |
| | | /** 导å
¥æé®æä½ */ |
| | | function handleImport() { |
| | | upload.title = "é¶ä»¶å·¥åæ°æ®ä¸ä¼ "; |
| | | upload.title = t("plan.upload.uploadPartWorkOrderData"); |
| | | upload.open = true; |
| | | }; |
| | | } |
| | | |
| | | /** å¯¼åºæé®æä½ */ |
| | | function handleExport() { |
| | | proxy.download('aps/partPlan/export', { |
| | | ...queryParams.value |
| | | }, `plan_${new Date().getTime()}.xlsx`) |
| | | proxy.download( |
| | | "aps/partPlan/export", |
| | | { |
| | | ...queryParams.value, |
| | | }, |
| | | `plan_${new Date().getTime()}.xlsx` |
| | | ); |
| | | } |
| | | |
| | | /** ä¸è½½æ¨¡æ¿æä½ */ |
| | | function importTemplate() { |
| | | proxy.download("system/user/importTemplate", { |
| | | }, `user_template_${new Date().getTime()}.xlsx`); |
| | | }; |
| | | proxy.download( |
| | | "system/user/importTemplate", |
| | | {}, |
| | | `user_template_${new Date().getTime()}.xlsx` |
| | | ); |
| | | } |
| | | |
| | | /** buildEexample */ |
| | | function buildEexample() { |
| | | proxy.$refs["uploadRef"].submit(); |
| | | }; |
| | | } |
| | | |
| | | /**æä»¶ä¸ä¼ ä¸å¤ç */ |
| | | const handleFileUploadProgress = (event, file, fileList) => { |
| | |
| | | |
| | | /** æä»¶ä¸ä¼ æåå¤ç */ |
| | | const handleFileSuccess = (response, file, fileList) => { |
| | | if(response.code == '200'){ |
| | | if (response.code == "200") { |
| | | batchNumber.value = response.data; |
| | | isVisible.value = true; |
| | | planned.value = false; |
| | | isError.value = false; |
| | | getExampleList(); |
| | | }else{ |
| | | } else { |
| | | isError.value = true; |
| | | proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导å
¥ç»æ", { dangerouslyUseHTMLString: true }); |
| | | proxy.$alert( |
| | | "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + |
| | | response.msg + |
| | | "</div>", |
| | | t("plan.upload.errorResult"), |
| | | { dangerouslyUseHTMLString: true, |
| | | confirmButtonText: t("plan.btns.confirm"), |
| | | cancelButtonText: t("plan.btns.cancel"), |
| | | } |
| | | ); |
| | | } |
| | | proxy.$refs["uploadRef"].handleRemove(file); |
| | | upload.isUploading = false; |
| | |
| | | function uploadParse() { |
| | | queryParams.value.params = {}; |
| | | queryParams.value.params["batchNumber"] = batchNumber.value; |
| | | confirmPart(queryParams.value).then(response => { |
| | | confirmPart(queryParams.value).then((response) => { |
| | | exampleList.value = response.rows; |
| | | loading.value = false; |
| | | isVisible.value = false; |
| | |
| | | planned.value = true; |
| | | upload.open = false; |
| | | ElMessage({ |
| | | message: 'é¶ä»¶å·¥åæ°æ®å·²æåä¸ä¼ åè§£æ', |
| | | type: 'success', |
| | | }) |
| | | message: t("plan.upload.uploadParsePartWorkOrderData"), |
| | | type: "success", |
| | | }); |
| | | getList(); |
| | | }); |
| | | } |
| | | |
| | | /** dialogåæ¶ */ |
| | | function dialogCancel(){ |
| | | function dialogCancel() { |
| | | if (uploadRef.value) { |
| | | uploadRef.value.clearFiles(); |
| | | } |
| | |
| | | upload.isUploading = false; |
| | | } |
| | | |
| | | getList(); |
| | | // getList(); |
| | | </script> |
| | | <style lang="css" scoped> |
| | | h4 { |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | | </style> |