From 99fd01670315384cadbac1e9bc8ee1e98c50001a Mon Sep 17 00:00:00 2001 From: helloDy <1615073571@qq.com> Date: Fri, 22 Mar 2024 10:27:57 +0800 Subject: [PATCH] bug 3 --- .env.dev | 4 +- src/api/base/coreWorkOrder.js | 29 ++- src/components/DialogForm/index.vue | 27 ++- src/views/base/coreCustomer/add-or-updata.vue | 11 +- src/views/base/coreEquipment/index.vue | 1 + src/views/base/coreEquipmentType/index.vue | 2 +- src/views/base/coreWorkOrder/addWorkOrder.vue | 35 ++- src/views/base/coreWorkOrder/allocation.vue | 206 ++++++++++-------- src/views/base/coreWorkOrder/detail.vue | 88 +++++--- src/views/base/coreWorkOrder/index.vue | 12 +- src/views/base/material/add-or-updata.vue | 16 +- .../base/materialProductBom/add-or-updata.vue | 42 ++-- src/views/core/monitoring/data24/index.vue | 18 +- .../equipment/analysis/quality/index.vue | 11 +- .../base/inspection/Confirm/add-or-updata.vue | 61 +++--- .../base/inspection/Record/index.vue | 2 +- .../equipment/base/maintain/Record/index.vue | 20 +- .../equipment/base/repair/Repair--add.vue | 9 +- src/views/equipment/monitor/SearchBar.vue | 33 ++- .../equipment/timing-diagram/status/chart.js | 2 +- 20 files changed, 417 insertions(+), 212 deletions(-) diff --git a/.env.dev b/.env.dev index 34598f0d..7c54100e 100644 --- a/.env.dev +++ b/.env.dev @@ -1,8 +1,8 @@ ### # @Author: Do not edit # @Date: 2023-08-29 09:40:39 - # @LastEditTime: 2024-03-13 14:57:16 - # @LastEditors: zhp + # @LastEditTime: 2024-03-22 10:18:20 + # @LastEditors: DY # @Description: ### # 开发环境配置 diff --git a/src/api/base/coreWorkOrder.js b/src/api/base/coreWorkOrder.js index 84d69b54..43c6d176 100644 --- a/src/api/base/coreWorkOrder.js +++ b/src/api/base/coreWorkOrder.js @@ -1,7 +1,7 @@ /* * @Author: Do not edit * @Date: 2023-10-21 11:50:46 - * @LastEditTime: 2023-11-15 17:19:19 + * @LastEditTime: 2024-03-21 10:49:24 * @LastEditors: DY * @Description: */ @@ -118,6 +118,24 @@ export function getCoreWOMaPage(query) { }) } +// 获得工单预使用原料分页----根据产品id +export function getlistByProductId(query) { + return request({ + url: '/base/material-product-bom-det/listByProductId', + method: 'get', + params: query + }) +} + +// 获得工单预使用原料分页----根据工艺流程 +export function getlistByFlowId(query) { + return request({ + url: '/extend/process-equ-material-bom-det/listByFlowId', + method: 'get', + params: query + }) +} + // 获得预计用料信息分页 export function getMaterialBomPage(query) { return request({ @@ -162,3 +180,12 @@ export function updateConCoreWOr(data) { data: data }) } + +// 修改分配产量----批量 +export function updateBatchConCoreWOr(data) { + return request({ + url: '/base/core-order-con-work-order/updateBatch', + method: 'put', + data: data + }) +} diff --git a/src/components/DialogForm/index.vue b/src/components/DialogForm/index.vue index 3d19ec29..2c05e32e 100644 --- a/src/components/DialogForm/index.vue +++ b/src/components/DialogForm/index.vue @@ -94,7 +94,7 @@ :show-file-list="false" icon="el-icon-upload2" :disabled="disabled" - :before-upload="beforeUpload" + :before-upload="col.uploadTips ? beforeUploadPic : beforeUpload" :on-success=" (response, file, fileList) => { handleUploadSuccess(response, file, col.prop); @@ -110,7 +110,7 @@ 上传文件
- {{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }} + {{ '只能上传jpg/png文件, 大小不超过2MB' }}
@@ -416,6 +416,26 @@ export default { // 上传成功的特殊处理 beforeUpload(file) { + const checkFileSize = () => { + const isLt2M = file.size / 1024 / 1024 < 2; + if (!isLt2M) { + this.$modal.msgError('上传文件大小不能超过 2MB!'); + } + return isLt2M; + }; + // const checkFileType = () => { + // const isJPG = + // file.type === 'image/jpeg' || + // file.type === 'image/png' || + // file.type === 'image/jpg'; + // return isJPG; + // }; + // return checkFileSize() && checkFileType(); + return checkFileSize(); + }, + + // 上传成功的特殊处理----图片 + beforeUploadPic(file) { const checkFileSize = () => { const isLt2M = file.size / 1024 / 1024 < 2; if (!isLt2M) { @@ -428,6 +448,9 @@ export default { file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg'; + if (!isJPG) { + this.$modal.msgError('只能上传jpg/png文件!'); + } return isJPG; }; return checkFileSize() && checkFileType(); diff --git a/src/views/base/coreCustomer/add-or-updata.vue b/src/views/base/coreCustomer/add-or-updata.vue index 4331c6be..156fd061 100644 --- a/src/views/base/coreCustomer/add-or-updata.vue +++ b/src/views/base/coreCustomer/add-or-updata.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2021-11-18 14:16:25 * @LastEditors: DY - * @LastEditTime: 2023-12-12 16:04:44 + * @LastEditTime: 2024-03-20 16:20:39 * @Description: -->