已重命名1个文件
已复制1个文件
已修改1个文件
已添加1个文件
ÎļþÃû´Ó src/api/ApsPlatePlan/ApsPlatePlan.js ÐÞ¸Ä |
| | |
| | | import request from '@/utils/request' |
| | | import request from '@/utils/request.js' |
| | | |
| | | // æ¥è¯¢é£é计å管çå表 |
| | | export function listPlan(query) { |
copy from src/api/ApsPlatePlan/ApsPlatePlan.js
copy to src/api/mainPlan/gasPiping.js
Îļþ´Ó src/api/ApsPlatePlan/ApsPlatePlan.js ¸´ÖÆ |
| | |
| | | // æ¥è¯¢é£é计å管çå表 |
| | | export function listPlan(query) { |
| | | return request({ |
| | | url: '/aps/apsPlatePlan/list', |
| | | url: '/aps/gasPiping/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | |
| | | // æ¥è¯¢é£é计å管çè¯¦ç» |
| | | export function getApsPlatePlan(id) { |
| | | return request({ |
| | | url: '/aps/ApsPlatePlan/ApsPlatePlan/' + id, |
| | | url: '/aps/gasPiping/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | // æ°å¢é£é计å管ç |
| | | export function addApsPlatePlan(data) { |
| | | return request({ |
| | | url: '/aps/ApsPlatePlan/ApsPlatePlan/add', |
| | | url: '/aps/gasPiping/add', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | |
| | | // ä¿®æ¹é£é计å管ç |
| | | export function updateApsPlatePlan(data) { |
| | | return request({ |
| | | url: '/ApsPlatePlan/ApsPlatePlan', |
| | | url: '/aps/gasPiping', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | |
| | | // å é¤é£é计å管ç |
| | | export function delApsPlatePlan(id) { |
| | | return request({ |
| | | url: '/ApsPlatePlan/ApsPlatePlan/' + id, |
| | | url: '/aps/gasPiping/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | //é£é计åä¸ä¼ |
| | | export function uploadApsPlatePlan(data) { |
| | | return request({ |
| | | url: '/aps/ApsPlatePlan/upload', |
| | | url: '/aps/gasPiping/upload', |
| | | method: 'post', |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
| | | data: data |
| | |
| | | // æ¥è¯¢é¶ä»¶è®¡å管çå表 |
| | | export function examplePlan(query) { |
| | | return request({ |
| | | url: '/aps/apsPlatePlanTemp/list', |
| | | url: '/aps/gasPipingTemp/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | |
| | | // æ¥è¯¢é¶ä»¶è®¡å管çå表 |
| | | export function confirmPart(data) { |
| | | return request({ |
| | | url: '/aps/apsPlatePlan/confirmPart', |
| | | url: '/aps/gasPiping/confirmGasPiping', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | |
| | | </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> |
| | | <p>ä¸ä¼ Excelæä»¶ï¼å
å«é£é计åä¿¡æ¯ãç³»ç»å°è§£ææ°æ®å¹¶ä¿åå°æ¬å°ï¼ç¨äºå
³èå°é£é计åä¸ã</p> |
| | | </div> |
| | | </el-col> |
| | | <el-col > |
| | | <div></div> |
| | | </el-col> |
| | | </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-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </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> |
| | | <!-- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">ä¸è½½æ¨¡æ¿</el-link> --> |
| | | </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">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | <span>ä»
å
许导å
¥xlsãxlsxæ ¼å¼æä»¶ã</span> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 20px;"> |
| | | <el-col> |
| | | <div> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Check" |
| | | :disabled="planned" |
| | | @click="uploadParse" |
| | | v-hasPermi="['partPlan:confirmPart']" |
| | | >ä¸ä¼ å¹¶è§£æ</el-button> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col style="margin-top: 20px;"> |
| | | <div v-show="isVisible"> |
| | |
| | | </el-row> |
| | | <template #footer> |
| | | <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> |
| | | </div> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script setup name="ApsPlatePlan"> |
| | | import { listPlan, examplePlan, confirmPart} from "@/api/ApsPlatePlan/ApsPlatePlan"; |
| | | import { listPlan, examplePlan, confirmPart} from "@/api/mainPlan/apsPlatePlan"; |
| | | import HxlhTable from '@/components/HxlhTable' |
| | | import { ref } from "vue"; |
| | | import { getToken } from "@/utils/auth"; |
| | |
| | | const total = ref(0); |
| | | const daterangePlanStartDay = ref([]); |
| | | const daterangePlanEndDay = ref([]); |
| | | |
| | | const height = ref(document.documentElement.clientHeight - 210 + "px;") |
| | | const isVisible = ref(false); |
| | | const isError = ref(false); |
| | |
| | | planned.value = true; |
| | | upload.open = false; |
| | | ElMessage({ |
| | | message: 'é£éè®¡åæ°æ®å·²æåä¸ä¼ åè§£æ', |
| | | message: 'æ°ä½ç®¡è·¯è®¡åæ°æ®å·²æåä¸ä¼ åè§£æ', |
| | | type: 'success', |
| | | }) |
| | | getList(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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-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> |
| | | <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> |
| | | </el-row> |
| | | </el-form> |
| | | </el-col> </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> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Edit" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >æ¹éä¿®æ¹è®¡åå®å·¥æ¥</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | plain |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | v-hasPermi="['apsPlatePlan:import']" |
| | | >导å
¥</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['apsPlatePlan:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <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" |
| | | > |
| | | </HxlhTable> |
| | | |
| | | <!-- æ·»å æä¿®æ¹é£é计å管çå¯¹è¯æ¡ --> |
| | | <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> |
| | | </el-col> |
| | | <el-col > |
| | | <div></div> |
| | | </el-col> |
| | | </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-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </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> |
| | | <!-- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">ä¸è½½æ¨¡æ¿</el-link> --> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col style="margin-top: 20px;"> |
| | | <div v-show="isVisible"> |
| | | <el-alert icon="Check" :show-icon="true" title="é£éè®¡åæ°æ®å·²æåè§£æ" type="success" :closable="false"/> |
| | | </div> |
| | | <div v-show="isError"> |
| | | <el-alert icon="Close" :show-icon="true" title="é£éè®¡åæ°æ®å·²è§£æå¤±è´¥" type="error" :closable="false"/> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-show="isVisible"> |
| | | <el-col> |
| | | <div> |
| | | <h2>æ°æ®é¢è§</h2> |
| | | </div> |
| | | <HxlhTable |
| | | 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> |
| | | </el-col> |
| | | </el-row> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Check" |
| | | :disabled="planned" |
| | | @click="uploadParse" |
| | | v-hasPermi="['partPlan:confirmPart']" |
| | | >确认ä¸ä¼ </el-button> |
| | | <!-- <el-button type="primary" @click="submitFileForm">ç¡® å®</el-button> --> |
| | | <el-button @click="dialogCancel">å æ¶</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 { ref } from "vue"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | 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 exampleList = ref([]); |
| | | const planList = ref([]); |
| | | const loading = ref(true); |
| | | const showSearch = ref(true); |
| | | const single = ref(true); |
| | | const total = ref(0); |
| | | const daterangePlanStartDay = ref([]); |
| | | const daterangePlanEndDay = ref([]); |
| | | const height = ref(document.documentElement.clientHeight - 210 + "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({ |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå±ï¼ç¨æ·å¯¼å
¥ï¼ |
| | | open: false, |
| | | // å¼¹åºå±æ é¢ï¼ç¨æ·å¯¼å
¥ï¼ |
| | | title: "", |
| | | // æ¯å¦ç¦ç¨ä¸ä¼ |
| | | isUploading: false, |
| | | // æ¯å¦æ´æ°å·²ç»åå¨çç¨æ·æ°æ® |
| | | updateSupport: 0, |
| | | // 设置ä¸ä¼ ç请æ±å¤´é¨ |
| | | headers: { Authorization: "Bearer " + getToken() ,local: 'zhl'}, |
| | | // ä¸ä¼ çå°å |
| | | 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 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 data = reactive({ |
| | | form: {}, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | customer: null, |
| | | documentNumber: null |
| | | }, |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }); |
| | | |
| | | const { queryParams } = toRefs(data); |
| | | /** æ¥è¯¢é£é计å临æ¶ç®¡çå表 */ |
| | | function getExampleList() { |
| | | loading.value = true; |
| | | queryParams.value = {}; |
| | | queryParams.value.batchNumber = batchNumber.value; |
| | | 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 != daterangePlanEndDay && '' !== daterangePlanEndDay) { |
| | | queryParams.value.params["beginPlanEndDay"] = daterangePlanEndDay.value[0]; |
| | | queryParams.value.params["endPlanEndDay"] = daterangePlanEndDay.value[1]; |
| | | } |
| | | listPlan(queryParams.value).then(response => { |
| | | planList.value = response.rows; |
| | | loading.value = false; |
| | | }); |
| | | } |
| | | |
| | | /** æç´¢æé®æä½ */ |
| | | function handleQuery() { |
| | | queryParams.value.pageNum = 1; |
| | | getList(); |
| | | } |
| | | |
| | | /** éç½®æé®æä½ */ |
| | | function resetQuery() { |
| | | daterangePlanStartDay.value = []; |
| | | daterangePlanEndDay.value = []; |
| | | proxy.resetForm("queryRef"); |
| | | handleQuery(); |
| | | } |
| | | |
| | | // å¤éæ¡é䏿°æ® |
| | | const handleCheckboxChange = (data) => { |
| | | console.log(data); |
| | | }; |
| | | |
| | | /** æ¹éä¿®æ¹è®¡åå¼å·¥æ¥æé®æä½ */ |
| | | function plannedStart() { |
| | | |
| | | } |
| | | |
| | | /** æ¹éä¿®æ¹è®¡åå®å·¥æ¥æé®æä½ */ |
| | | function plannedEnd() { |
| | | |
| | | } |
| | | |
| | | /** 导å
¥æé®æä½ */ |
| | | function handleImport() { |
| | | upload.title = "æ°ä½ç®¡è·¯è®¡åæ°æ®ä¸ä¼ "; |
| | | upload.open = true; |
| | | }; |
| | | |
| | | /** å¯¼åºæé®æä½ */ |
| | | function handleExport() { |
| | | 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`); |
| | | }; |
| | | |
| | | /** buildEexample */ |
| | | function buildEexample() { |
| | | proxy.$refs["uploadRef"].submit(); |
| | | }; |
| | | |
| | | /**æä»¶ä¸ä¼ ä¸å¤ç */ |
| | | const handleFileUploadProgress = (event, file, fileList) => { |
| | | upload.isUploading = true; |
| | | }; |
| | | |
| | | /** æä»¶ä¸ä¼ æåå¤ç */ |
| | | const handleFileSuccess = (response, file, fileList) => { |
| | | if(response.code == '200'){ |
| | | batchNumber.value = response.data; |
| | | isVisible.value = true; |
| | | planned.value = false; |
| | | isError.value = false; |
| | | getExampleList(); |
| | | }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.$refs["uploadRef"].handleRemove(file); |
| | | upload.isUploading = false; |
| | | }; |
| | | |
| | | /** ä¸ä¼ å¹¶è§£ææé®æä½ */ |
| | | function uploadParse() { |
| | | queryParams.value.params = {}; |
| | | queryParams.value.params["batchNumber"] = batchNumber.value; |
| | | confirmPart(queryParams.value).then(response => { |
| | | exampleList.value = response.rows; |
| | | loading.value = false; |
| | | isVisible.value = false; |
| | | isError.value = false; |
| | | planned.value = true; |
| | | upload.open = false; |
| | | ElMessage({ |
| | | message: 'æ°ä½ç®¡è·¯è®¡åæ°æ®å·²æåä¸ä¼ åè§£æ', |
| | | type: 'success', |
| | | }) |
| | | getList(); |
| | | }); |
| | | } |
| | | |
| | | /** dialogåæ¶ */ |
| | | function dialogCancel(){ |
| | | if (uploadRef.value) { |
| | | uploadRef.value.clearFiles(); |
| | | } |
| | | isVisible.value = false; |
| | | isError.value = false; |
| | | planned.value = true; |
| | | upload.open = false; |
| | | upload.isUploading = false; |
| | | } |
| | | |
| | | getList(); |
| | | </script> |
| | | <style lang="css" scoped> |
| | | h4 { |
| | | font-weight: bold; |
| | | } |
| | | </style> |