| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <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="资源组" prop="resourceGroupName"> |
| | | <el-input |
| | | v-model="queryParams.resourceGroupName" |
| | |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col |
| | | :span="6"> |
| | | <el-form-item label="截止机加需求日期" style="width: 400px" label-width="150px"> |
| | | <el-date-picker |
| | | v-model="daterangeRequestDate" |
| | |
| | | end-placeholder="结束日期" |
| | | ></el-date-picker> |
| | | </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-row :gutter="10" class="mb8"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 20px;"> |
| | | <el-form-item label="截止机加需求日期" prop="requestDate" > |
| | | <el-date-picker clearable |
| | | v-model="requestDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | placeholder="请选择机加需求日期" |
| | | :disabled-date="disabledDate" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-col> |
| | | <div> |
| | | <el-button |
| | |
| | | const exampleHeight = ref("500px"); |
| | | const uploadRef = ref(); |
| | | const exampleList = ref([]); |
| | | const requestDate = ref(null); |
| | | // 计算当前时间往后推 15 天的日期 |
| | | const disabledDate = (time) => { |
| | | // return time.getTime() > Date.now() |
| | | // 计算 15 天的毫秒数 |
| | | const fifteenDaysInMillis = 15 * 24 * 60 * 60 * 1000; |
| | | // 计算当前时间加上 15 天后的毫秒数 |
| | | const maxTime = Date.now() + fifteenDaysInMillis; |
| | | return time.getTime() > maxTime; |
| | | } |
| | | /*** 用户导入参数 */ |
| | | const upload = reactive({ |
| | | // 是否显示弹出层(用户导入) |
| | |
| | | { type: 'checkbox', width: 60, align:"center"}, |
| | | { type: 'seq', title: '序号', width: 60 }, |
| | | { |
| | | title: '料号', |
| | | field: 'itemNo', |
| | | title: '资源组名称', |
| | | field: 'resourceGroupName', |
| | | width: 300, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '设备数量', |
| | | field: 'devicesQuantity', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工单号', |
| | | field: 'workOrderNo', |
| | | width: 150, |
| | | title: '每日理论时间', |
| | | field: 'theoryHours', |
| | | width: 300, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序序号', |
| | | field: 'processNumber', |
| | | width: 100, |
| | | title: '截止需求日剩余天数', |
| | | field: 'restDays', |
| | | width: 210, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序名称', |
| | | field: 'processName', |
| | | width: 150, |
| | | title: '理论产能', |
| | | field: 'theoryCapacity', |
| | | width: 300, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序计划开始日期', |
| | | field: 'processPlanStartDay', |
| | | width: 200, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序计划结束日期', |
| | | field: 'processPlanEndDay', |
| | | width: 200, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '未开工数量', |
| | | field: 'notStartWorkCount', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '已完成数量', |
| | | field: 'completedCount', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '废弃数量', |
| | | field: 'discardCount', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '集成日期', |
| | | field: 'integrationDay', |
| | | width: 160, |
| | | title: '截止机加需求日期', |
| | | field: 'requestDate', |
| | | width: 300, |
| | | align:"center", |
| | | } |
| | | ]); |
| | |
| | | const exampleColumns = ref([ |
| | | { type: 'seq', title: '序号', width: 60 }, |
| | | { |
| | | title: '料号', |
| | | field: 'itemNo', |
| | | title: '资源组名称', |
| | | field: 'resourceGroupName', |
| | | width: 300, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '设备数量', |
| | | field: 'devicesQuantity', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工单号', |
| | | field: 'workOrderNo', |
| | | width: 150, |
| | | title: '每日理论时间', |
| | | field: 'theoryHours', |
| | | width: 300, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序序号', |
| | | field: 'processNumber', |
| | | width: 100, |
| | | title: '截止需求日剩余天数', |
| | | field: 'restDays', |
| | | width: 210, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序名称', |
| | | field: 'processName', |
| | | width: 150, |
| | | title: '理论产能', |
| | | field: 'theoryCapacity', |
| | | width: 300, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序计划开始日期', |
| | | field: 'processPlanStartDay', |
| | | width: 200, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序计划结束日期', |
| | | field: 'processPlanEndDay', |
| | | width: 200, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '未开工数量', |
| | | field: 'notStartWorkCount', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '已完成数量', |
| | | field: 'completedCount', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '废弃数量', |
| | | field: 'discardCount', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '集成日期', |
| | | field: 'integrationDay', |
| | | width: 160, |
| | | title: '截止机加需求日期', |
| | | field: 'requestDate', |
| | | width: 370, |
| | | align:"center", |
| | | } |
| | | ]); |
| | |
| | | plant: null |
| | | }, |
| | | rules: { |
| | | |
| | | } |
| | | }); |
| | | |
| | |
| | | loading.value = false; |
| | | }); |
| | | } |
| | | |
| | | function handleCheckboxChange(){} |
| | | // 取消按钮 |
| | | function cancel() { |
| | | open.value = false; |
| | |
| | | } |
| | | /** 上传并解析按钮操作 */ |
| | | function uploadParse() { |
| | | if (requestDate.value === null || typeof requestDate.value === 'undefined' || requestDate.value === '') { |
| | | ElMessage({ |
| | | message: '请选择截止机加需求日期', |
| | | type: 'warning', |
| | | }) |
| | | return |
| | | } |
| | | queryParams.value.params = {}; |
| | | queryParams.value.params["batchNumber"] = batchNumber.value; |
| | | queryParams.value.params["requestDate"] = requestDate.value; |
| | | confirmApsResourceGroup(queryParams.value).then(response => { |
| | | exampleList.value = response.rows; |
| | | loading.value = false; |
| | |
| | | isError.value = false; |
| | | planned.value = true; |
| | | upload.open = false; |
| | | requestDate.value = null; |
| | | ElMessage({ |
| | | message: '资源池数据已成功上传和解析', |
| | | type: 'success', |
| | |
| | | if (uploadRef.value) { |
| | | uploadRef.value.clearFiles(); |
| | | } |
| | | requestDate.value = null; |
| | | isVisible.value = false; |
| | | isError.value = false; |
| | | planned.value = true; |
| | | upload.open = false; |
| | | |
| | | } |
| | | |
| | | getList(); |