diff --git a/.env.dev b/.env.dev index 2f3ffe42..045df40e 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-21 14:45:52 - # @LastEditors: zhp + # @LastEditTime: 2024-03-22 10:28:37 + # @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: -->