From 557d96fc0714c8b380c75504014c8c5b2721bd1f Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Wed, 10 Apr 2024 14:37:56 +0800 Subject: [PATCH 01/10] =?UTF-8?q?app=E5=8D=87=E7=BA=A7=EF=BC=8C=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=8C=85=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/systemInstallPackage/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/system/systemInstallPackage/index.vue b/src/views/system/systemInstallPackage/index.vue index 1f1f0617e..6a8d47ec8 100644 --- a/src/views/system/systemInstallPackage/index.vue +++ b/src/views/system/systemInstallPackage/index.vue @@ -148,6 +148,8 @@ const openForm = (type: string, row?: any) => { if(uploadFile){ uploadFile['componentProps']['upData']['tableId'] = currentTime uploadFile['componentProps']['modelValue']= [] + uploadFile['value'] = '' + } }else if(type=='update'){ const uploadFile = SystemInstallPackage.allSchemas.formSchema.find(item=>item.field=='uploadFile') @@ -163,7 +165,7 @@ const openForm = (type: string, row?: any) => { // form表单提交 const formsSuccess = async (formType,data) => { if (formType === 'create') { - delete data['uploadFile'] + // delete data['uploadFile'] await SystemInstallPackageApi.createSystemInstallPackage(data) message.success(t('common.createSuccess')) } else { From c74fefa8c455613bd04b25339023e9a853aa9e3c Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Wed, 10 Apr 2024 14:39:09 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchasePlanMain/purchasePlanMain.data.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts index 67e525b64..9a4167f45 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts @@ -56,7 +56,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ width: 150 }, form: { - labelMessage: '信息提示说明!!!', + // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, searchListPlaceholder: '请选择采购订单', @@ -89,7 +89,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ }, form: { componentProps: { - disabled: true + disabled: false } } }, @@ -101,7 +101,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive([ }, form: { componentProps: { - disabled: true + disabled: false } } }, From 183860ec1d645351fe4f8e73ec3a31c148f6a241 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 10 Apr 2024 14:42:13 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=89=BF=E6=8E=A5=E5=92=8C=E6=94=BE=E5=BC=83=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspectionJob/inspectionJobMain/index.ts | 25 +++++--- src/locales/zh-CN.ts | 4 ++ .../qms/inspection/inspectionJob/addForm.vue | 20 +++---- .../qms/inspection/inspectionJob/index.vue | 57 ++++++++++++++----- .../inspectionJob/inspectionJobMain.data.ts | 33 ++++++++++- .../qms/inspection/inspectionRecord/index.vue | 4 +- .../inspectionRequest/inspectionMain.data.ts | 1 + 7 files changed, 108 insertions(+), 36 deletions(-) diff --git a/src/api/qms/inspectionJob/inspectionJobMain/index.ts b/src/api/qms/inspectionJob/inspectionJobMain/index.ts index fe61e36c3..372fef2dc 100644 --- a/src/api/qms/inspectionJob/inspectionJobMain/index.ts +++ b/src/api/qms/inspectionJob/inspectionJobMain/index.ts @@ -1,7 +1,7 @@ import request from '@/config/axios' -// 查询检验申请列表 +// 查询检验任务列表 export const getInspectionJobMainPage = async (params) => { if (params.isSearch) { delete params.isSearch @@ -12,29 +12,40 @@ export const getInspectionJobMainPage = async (params) => { } } -// 查询检验申请详情 +// 查询检验任务详情 export const getInspectionJobMain = async (id: number) => { return await request.get({ url: `/qms/inspection-job-main/get?id=` + id }) } -// 新增检验申请 +// 新增检验任务 export const createInspectionJobMain = async (data) => { return await request.post({ url: `/qms/inspection-job-main/create`, data }) } -// 修改检验申请 +// 修改检验任务 export const updateInspectionJobMain = async (data) => { return await request.put({ url: `/qms/inspection-job-main/update`, data }) } -// 执行检验申请 +// 执行检验任务 export const executeInspectionJobMain = async (data) => { return await request.put({ url: `/qms/inspection-job-main/execute`, data }) } -// 删除检验申请 +// 删除检验任务 export const deleteInspectionJobMain = async (id: number) => { return await request.delete({ url: `/qms/inspection-job-main/delete?id=` + id }) } - +// 承接检验任务 +export const acceptInspectionJobMain = async (id) => { + return await request.put({ url: `/qms/inspection-job-main/accept?id=` + id }) +} +// 放弃检验任务 +export const abandonInspectionJobMain = async (id) => { + return await request.put({ url: `/qms/inspection-job-main/abandon?id=` + id }) +} +// 关闭检验任务 +export const closeInspectionJobMain = async (id) => { + return await request.put({ url: `/qms/inspection-job-main/close?id=` + id }) +} // 导出检验申请 Excel export const exportInspectionJobMain = async (params) => { return await request.download({ url: `/qms/inspection-job-main/export-excel`, params }) diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 37dc11cb8..645da237a 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -61,12 +61,16 @@ export default { agreeSuccess: '审批通过成功', refusedSuccess: '审批驳回成功', handleSuccess: '执行成功', + acceptSuccess: '承接成功', + giveupSuccess: '放弃成功', confirmColse: '确认关闭吗?', confirmReAdd: '确认重新添加吗?', confirmAgree: '确认审批通过吗?', confirmRefused: '确认审批驳回吗?', confirmHandle: '确认处理吗?', confirmSubmit: '确认提交吗?', + confirmAccept: '确认承接吗?', + confirmGiveup: '确认放弃吗?', }, error: { noPermission: `抱歉,您无权访问此页面。`, diff --git a/src/views/qms/inspection/inspectionJob/addForm.vue b/src/views/qms/inspection/inspectionJob/addForm.vue index fdef80d4c..afa359e9f 100644 --- a/src/views/qms/inspection/inspectionJob/addForm.vue +++ b/src/views/qms/inspection/inspectionJob/addForm.vue @@ -557,16 +557,16 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any } } else { item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] - // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false - // item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ - // inspectionValue: '', //检验值 - // qualitativeCode: '', //定性字典项值 - // estimateCode: '', //评估代码 - // defectLevel: '', //缺陷级别 - // qualifiedQuantity: '', //合格数量 - // unqualifiedQuantity: '' //不合格数量 - // } - // ) + rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false + item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ + inspectionValue: '', //检验值 + qualitativeCode: '', //定性字典项值 + estimateCode: '', //评估代码 + defectLevel: '', //缺陷级别 + qualifiedQuantity: '', //合格数量 + unqualifiedQuantity: '' //不合格数量 + } + ) } // 编辑判断上限下限目标值是否必填 if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) { diff --git a/src/views/qms/inspection/inspectionJob/index.vue b/src/views/qms/inspection/inspectionJob/index.vue index 1bbaa59be..baf4fad85 100644 --- a/src/views/qms/inspection/inspectionJob/index.vue +++ b/src/views/qms/inspection/inspectionJob/index.vue @@ -161,10 +161,10 @@ // 列表-操作按钮 const butttondata = (row) => { return [ - // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 - defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // 关闭 - // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 - defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 + defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), // 承接 + defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), // 关闭 + defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), // 放弃 + defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:execute'}), // 执行 defaultButtons.mainListPackageBtn(null), // 包装 ] } @@ -176,10 +176,15 @@ const listTableRef = ref() }else if (val == 'mainPackage') { // 包装 const list = await InspectionJobMainApi.getInspectionJobPackageList(row.id) listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list) - } - else if (val == 'mainJobClo') { // 关闭 - handleDelete(row.id) - } + }else if (val == 'mainJobAba') { // 放弃 + console.log('列表-操作按钮事件-放弃') + handleAbandon(row.id) + } else if (val == 'mainJobClo') { // 关闭 + handleClose(row.id) + } else if (val == 'mainJobAcc') { // 承接 + console.log('列表-操作按钮事件-承接') + handleAccept(row.id) + } } /** 添加/修改操作 */ @@ -200,19 +205,43 @@ const listTableRef = ref() const execute = async (type : string, row ?: number) => { formRef.value.open(type, row) } - /** 删除按钮操作 */ - const handleDelete = async (id : number) => { + /** 关闭按钮操作 */ + const handleClose = async (id : number) => { try { // 删除的二次确认 - await message.delConfirm() + await message.confirm(t('common.confirmColse')) // 发起删除 - await InspectionJobMainApi.deleteInspectionJobMain(id) - message.success(t('common.delSuccess')) + await InspectionJobMainApi.closeInspectionJobMain(id) + message.success(t('common.closeSuccess')) // 刷新列表 await getList() } catch { } } - + // 承接 + const handleAccept = async (id : number) => { + try { + // 承接的二次确认 + await message.confirm(t('common.confirmAccept')) + // 发起承接 + await InspectionJobMainApi.acceptInspectionJobMain(id) + message.success(t('common.acceptSuccess')) + // 刷新列表 + await getList() + } catch { } + } + // 放弃任务 + const handleAbandon = async (id : number) => { + try { + // 放弃的二次确认 + await message.confirm(t('common.confirmGiveup')) + // 发起放弃 + await InspectionJobMainApi.abandonInspectionJobMain(id) + message.success(t('common.giveupSuccess')) + // 刷新列表 + await getList() + } catch { } + } + /** 导出按钮操作 */ const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { diff --git a/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts b/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts index ed4bfcfab..70f7ae62e 100644 --- a/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts +++ b/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts @@ -61,20 +61,47 @@ export const InspectionJobMain = useCrudSchemas(reactive([ table: { width: 150 } + },{ + label: '供应商名称', + field: 'supplierName', + sort: 'custom', + isSearch: false, + table: { + width: 150 + }, + form: { + componentProps:{ + disabled:true + } + }, }, { label: '物料编码', - field: 'materialCode', + field: 'itemCode', sort: 'custom', - isSearch: true, + isSearch: false, + table: { + width: 150 + }, form: { componentProps:{ disabled:true } }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + isSearch: false, table: { width: 150 - } + }, + form: { + componentProps:{ + disabled:true + } + }, }, { label: '物料批次', diff --git a/src/views/qms/inspection/inspectionRecord/index.vue b/src/views/qms/inspection/inspectionRecord/index.vue index 3bf88f430..33e70f8d1 100644 --- a/src/views/qms/inspection/inspectionRecord/index.vue +++ b/src/views/qms/inspection/inspectionRecord/index.vue @@ -180,9 +180,9 @@ const butttondata = (row) => { return [ // defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // 完成 - defaultButtons.mainListEditBtn(null), // 编辑 + defaultButtons.mainListEditBtn({hasPermi:'qms:inspection-recode-main:edit'}), // 编辑 // defaultButtons.mainListDeleteBtn(null), // 删除 - defaultButtons.mainListOrderPubBtn(null), // 发布 + defaultButtons.mainListOrderPubBtn({hasPermi:'qms:inspection-recode-main:pub'}), // 发布 defaultButtons.mainListPackageBtn(null), // 包装 ] } diff --git a/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts b/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts index 97c80ce99..41af36dc4 100644 --- a/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts +++ b/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts @@ -365,6 +365,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, tableForm:{ + width:500, disabled:true }, table:{ From 3336ffa756a52dd6578c56f3bfdefe51cda3453b Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Wed, 10 Apr 2024 15:05:41 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=96=B9=E6=A1=88?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=98=AF=E5=90=A6=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspectionScheme/addForm.vue | 4 +- .../inspectionScheme/inspectionScheme.data.ts | 37 ++++++++++--------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/views/qms/basicDataManage/inspectionScheme/addForm.vue b/src/views/qms/basicDataManage/inspectionScheme/addForm.vue index f6d67ae35..a41ffb448 100644 --- a/src/views/qms/basicDataManage/inspectionScheme/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionScheme/addForm.vue @@ -209,11 +209,11 @@ /> - + ([ table: { width: 180 } - },{ - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, }, + // { + // label: '是否可用', + // field: 'available', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // }, + // }, { label: '操作', field: 'action', From 001aab488c5614df4120e1d9e22239a9a8a78d0f Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Wed, 10 Apr 2024 15:07:17 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E8=AE=A1=E6=95=B0=E5=99=A8=E6=9B=B4?= =?UTF-8?q?=E6=8D=A2=E6=A3=80=E9=AA=8C=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qms/counter/index.ts | 2 +- src/views/qms/basicDataManage/counter/counter.data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/qms/counter/index.ts b/src/api/qms/counter/index.ts index 3a75b8163..9190e34f5 100644 --- a/src/api/qms/counter/index.ts +++ b/src/api/qms/counter/index.ts @@ -3,7 +3,7 @@ import request from '@/config/axios' export interface CounterVO { id: number itemCode: string - testTypeCode: string + inspectionType: string supplierCode: string qualifiedTimes: number lastQualifiedBatch: string diff --git a/src/views/qms/basicDataManage/counter/counter.data.ts b/src/views/qms/basicDataManage/counter/counter.data.ts index 71a96b204..c5aa501fe 100644 --- a/src/views/qms/basicDataManage/counter/counter.data.ts +++ b/src/views/qms/basicDataManage/counter/counter.data.ts @@ -23,7 +23,7 @@ export const Counter = useCrudSchemas(reactive([ }, { label: '检验类型编码', - field: 'testTypeCode', + field: 'inspectionType', sort: 'custom', isSearch: true }, From e0b199a1b85036f9474ee0c13a06bda361457ba6 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 10 Apr 2024 15:27:37 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E8=BF=87=E8=B4=A6=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierinvoiceRecordMain.data.ts | 12 ++++++++++ .../supplierinvoiceRequestMain.data.ts | 24 +++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts index d07d76e25..6dbad5997 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts @@ -141,6 +141,18 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ width: 180 }, }, + { + label: '过账日期', + field: 'postingDate', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + } + }, { label: '业务类型', field:'businessType', diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index ebdecf62d..3c174965a 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -294,7 +294,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( }, }, { - label: '发票时间', + label: '发票日期', field: 'invoiceTime', formatter: dateFormatter, detail: { @@ -314,7 +314,27 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( } }, }, - + { + label: '过账日期', + field: 'postingDate', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, { label: '申请时间', field: 'requestTime', From 5132f01f820a469e016c4eccbf135e7791105a19 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Wed, 10 Apr 2024 15:45:17 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BasicForm/src/BasicForm.vue | 2 +- src/views/qms/aql/aql.data.ts | 54 +++++++++++++++++++++- src/views/qms/aql/index.vue | 42 +++++++++++++++++ 3 files changed, 96 insertions(+), 2 deletions(-) diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index afc1d884d..bcd2d6326 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -658,7 +658,7 @@ const inpuFocus = (headerItem, row, index) => { * @param cur 改变后值 */ const onChange = (field, cur) => { - emit('onChange', field, cur) + emit('onChange', field, cur, formRef) } /** diff --git a/src/views/qms/aql/aql.data.ts b/src/views/qms/aql/aql.data.ts index f3dc3fe56..8b04deda5 100644 --- a/src/views/qms/aql/aql.data.ts +++ b/src/views/qms/aql/aql.data.ts @@ -1,6 +1,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import {getSamplingScheme} from "@/api/qms/aql"; +import {validateNum} from "@/utils/validator"; // 表单校验 export const AqlRules = reactive({ @@ -8,7 +9,58 @@ export const AqlRules = reactive({ inspectionQualification: [required], sampleCharacterCode: [required], sampleSize: [required], - // available: [required], + a0separator010: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r0separator010: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a0separator015: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r0separator015: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a0separator025: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r0separator025: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a0separator040: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r0separator040: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a0separator065: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r0separator065: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a0separator10: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r0separator10: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a0separator15: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r0separator15: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a0separator25: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r0separator25: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a0separator40: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r0separator40: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a0separator65: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r0separator65: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a1separator0: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r1separator0: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a1separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r1separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a2separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r2separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a4separator0: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r4separator0: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a6separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r6separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a10: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r10: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a15: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r15: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a25: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r25: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a40: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r40: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a65: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r65: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a100: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r100: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a150: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r150: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a250: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r250: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a400: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r400: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a650: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r650: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a1000: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + r1000: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], }) const samplingSchemeList = await getSamplingScheme() export const Aql = useCrudSchemas(reactive([ diff --git a/src/views/qms/aql/index.vue b/src/views/qms/aql/index.vue index b5d0446a4..76a3e5a65 100644 --- a/src/views/qms/aql/index.vue +++ b/src/views/qms/aql/index.vue @@ -48,6 +48,7 @@ :apiCreate="AqlApi.createAql" @searchTableSuccess="searchTableSuccess" :isBusiness="false" + @onChange="onChange" /> @@ -235,6 +236,47 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } +const onChange = async (field, value, formRef) => { + // 检查字段是否以 "a" 开头 + if (field.startsWith("a") || field.startsWith("r")) { + // 从 "a" 字段名中获取其余部分 + const suffix = field.slice(1); + // 构建对应的 "r" 字段名 + const correspondingField = field.startsWith("a") ? "r" + suffix : "a" + suffix ; +console.log(correspondingField) + // 如果有值,则更新对应的 "r" 字段 + if (value) { + // 查找并更新对应 "r" 字段的值和属性 + Aql.allSchemas.formSchema.forEach(item => { + if (item.field === correspondingField) { + const setV = {}; + if(correspondingField.startsWith("r")){ + setV[correspondingField] = parseInt(value) + 1; + }else { + setV[correspondingField] = parseInt(value) - 1; + } + item.componentProps.disabled = true; + + // 使用 Vue 的 nextTick 来等待 DOM 更新 + nextTick(() => { + formRef.value.setValues(setV); + }); + } + }); + }else{ + Aql.allSchemas.formSchema.forEach(item => { + if (item.field === correspondingField || item.field === field) { + item.componentProps.disabled = false; + const setV = {}; + setV[correspondingField] = '' + nextTick(() => { + formRef.value.setValues(setV); + }); + } + }); + } + } +}; /** 初始化 **/ onMounted(async () => { getList() From df9da1b3291439f9ed4c063070e4bde0f0f1cb35 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 10 Apr 2024 15:47:12 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=AD=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en-US.ts | 5 +++++ src/locales/zh-CN.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 4590ca435..c59422a44 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -61,12 +61,17 @@ export default { agreeSuccess: 'Agree Success', refusedSuccess: 'Refused Success', handleSuccess: 'Handle Success', + acceptSuccess: 'Accept Success', + giveupSuccess: 'Giveup Success', + dealwithSuccess: 'Dealwith Success', confirmColse: 'Confirm Close?', confirmReAdd: 'Confirm ReAdd?', confirmAgree: 'Confirm Agree?', confirmRefused: 'Confirm Refused?', confirmHandle: 'Confirm Handle?', confirmSubmit: 'Confirm Submit?', + confirmAccept: 'Confirm Accept', + confirmGiveup: 'Confirm Giveup' }, error: { noPermission: `Sorry, you don't have permission to access this page.`, diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 645da237a..3bea036ee 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -61,6 +61,7 @@ export default { agreeSuccess: '审批通过成功', refusedSuccess: '审批驳回成功', handleSuccess: '执行成功', + dealwithSuccess: '处理成功', acceptSuccess: '承接成功', giveupSuccess: '放弃成功', confirmColse: '确认关闭吗?', From a7919251a63497ea243883894c1fd38661f6ee42 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 10 Apr 2024 16:06:22 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=92=8C=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TableForm/src/TableForm.vue | 2 +- .../qms/inspection/inspectionJob/addForm.vue | 46 ++++++++++++++----- .../inspection/inspectionRequest/index.vue | 2 +- .../inspectionRequest/inspectionMain.data.ts | 7 ++- 4 files changed, 39 insertions(+), 18 deletions(-) diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue index 2cf1fadea..131269e58 100644 --- a/src/components/TableForm/src/TableForm.vue +++ b/src/components/TableForm/src/TableForm.vue @@ -46,7 +46,7 @@ :label="headerItem.label" :prop="headerItem.field" :align="headerItem?.tableForm?.align || 'center'" :sortable="headerItem?.tableForm?.sortable || false" - :width="headerItem?.tableForm?.width || '200'" + :width="headerItem?.tableForm?.width || '200px'" :min-width="headerItem?.tableForm?.minWidth || 'auto'"> - + { const valid = await elForm.validate() if (!valid) return // 校验包装列表 - const validateForm1 = await tableFormRef.value.validateForm() + + console.log(11,data.value.packageList) + if(data.value.packageList?.length>0){ + const validateForm1 = await tableFormRef.value.validateForm() if (!validateForm1) return - let number = 0 - data.value.packageList.forEach(cur=>{ - number += parseFloat(cur.sampleAmount) - }) - if(number > data.value.sampleTotalAmount){ - message.error(`采样数量之和不可以大于总数量`) - return + let number = 0 + data.value.packageList.forEach(cur=>{ + number += parseFloat(cur.sampleAmount) + }) + if(number != data.value.sampleTotalAmount){ + message.error(`采样数量之和不等于总数量`) + return + } } + const bol2 = await validateForm(formFeaturesRef.value) if (!bol2) { message.error(`模板中有检验工序和检验特性未填写完全`) return } - // 判断附加费用数组是否有未填的选项 + // 判断数组是否有未填的选项 let arrBol = [] let isOutweigh = []//结束时间是否大于开始时间 + let numberList = []//判断合格数量和不合格数量之和是否等于主表数量 data.value.subList.forEach((item, index) => { if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { arrBol.push( @@ -750,7 +756,7 @@ const submitForm = async () => { arrBol.push( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( (cur, key) => { - return !cur.estimateCode || !cur.defectLevel + return !cur.estimateCode } ) ) @@ -777,16 +783,32 @@ const submitForm = async () => { if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) { isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime) } + // 合格数量和不合格数量之和不等于总数量 + if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { + numberList.push( + item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( + (cur, key) => { + return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != data.value.sampleTotalAmount + } + ) + ) + } }) let isEmpty1 = arrBol.some(item=>item == true) + let isEmptyNumberList = numberList.some(item=>item == true) if(isEmpty1){ message.error('检验工序和检验特性有字段未填写完全') return; } - if(isOutweigh.length>0){ + if(isOutweigh?.length>0){ message.error('检验特性中有开始时间大于结束时间') return; } + console.log(44,numberList) + if(isEmptyNumberList){ + message.error('合格数量和不合格数量之和不等于总数量') + return; + } if (formType.value == 'create') { // 主子表——提交请求 emit('submitForm', formType.value, data.value) diff --git a/src/views/qms/inspection/inspectionRequest/index.vue b/src/views/qms/inspection/inspectionRequest/index.vue index 8ddd8ba77..dc26eeb4e 100644 --- a/src/views/qms/inspection/inspectionRequest/index.vue +++ b/src/views/qms/inspection/inspectionRequest/index.vue @@ -220,7 +220,7 @@ const listTableRef = ref() await message.confirm(t('common.confirmHandle')) tableObject.loading = true await InspectionMainApi.handleInspectRequestMain(id) - message.success(t('common.handleSuccess')) + message.success(t('common.dealwithSuccess')) await getList() }catch{}finally{ tableObject.loading = false diff --git a/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts b/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts index 41af36dc4..fb1ad6bbe 100644 --- a/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts +++ b/src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts @@ -365,11 +365,10 @@ export const InspectionRequestPackage = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, tableForm:{ - width:500, disabled:true }, table:{ - width:150 + width:200 } }, { @@ -381,7 +380,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive([ disabled:true }, table:{ - width:150 + width:200 } }, { @@ -393,7 +392,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive([ disabled:true }, table:{ - width:150 + width:180 } }, { From 76cd71027699215d17eb03d8cd0cdd66e3c22548 Mon Sep 17 00:00:00 2001 From: chenfang Date: Wed, 10 Apr 2024 16:06:35 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E9=87=87=E8=B4=AD=E9=80=80=E8=B4=A7?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=96=B0=E5=A2=9E=E6=97=B6=E9=80=89=E6=94=B6?= =?UTF-8?q?=E8=B4=A7=E8=AE=B0=E5=BD=95=E8=BF=9B=E8=A1=8C=E5=8E=BB=E9=87=8D?= =?UTF-8?q?=E5=B9=B6=E8=AE=A1=E7=AE=97qty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/purchasereceiptRecordDetail/index.ts | 6 ++++++ src/utils/disposition/defaultButtons.ts | 13 +++++++++++++ .../purchasereturnRequestMain/index.vue | 3 ++- .../sparereceipt/sparereceiptJobMain/index.vue | 8 ++++---- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/api/wms/purchasereceiptRecordDetail/index.ts b/src/api/wms/purchasereceiptRecordDetail/index.ts index 2afacb3e1..04699eb06 100644 --- a/src/api/wms/purchasereceiptRecordDetail/index.ts +++ b/src/api/wms/purchasereceiptRecordDetail/index.ts @@ -76,6 +76,12 @@ export const getPurchasereceiptRecordDetailPageBySupplierCode = async (params) = export const getPurchasereceiptRecordDetailList = async (params) => { return await request.get({ url: `/wms/purchasereceipt-record-detail/list`, params }) } + +// 查询采购收货记录子列表 +export const getPurchasereceiptRecordDetailListToRepeat = async (params) => { + return await request.get({ url: `/wms/purchasereceipt-record-detail/listToRepeat`, params }) +} + // 查询采购收货记录子详情 export const getPurchasereceiptRecordDetail = async (id: number) => { return await request.get({ url: `/wms/purchasereceipt-record-detail/get?id=` + id }) diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 664d6d47e..7e42a749b 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -704,6 +704,19 @@ export function mainListJobExeBtn(option:any) { hasPermi: '' }) } + +// 主列表-任务流程-执行按钮(与执行按钮一致 只是名改叫'收货'而已) +export function mainListJobRecBtn(option:any) { + return __defaultBtnOption(option,{ + label: '收货', + name: 'mainJobExe', + hide: false, + type: 'primary', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} // 主列表-包装按钮 export function mainListPackageBtn(option:any) { return __defaultBtnOption(option,{ diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue index 01f83181a..67f5736d2 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue @@ -191,7 +191,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => setV['ppNumber'] = val[0]['ppNumber'] // 获取子表数据 getBomDisassemble - PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailList({ + // PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailList({ + PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailListToRepeat({ masterId: val[0]['id'] }).then((res) => { if (res) tableData.value = res diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue index e20fb51a8..38d320971 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue @@ -172,10 +172,10 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:accept'}), // 承接 - defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // 关闭 - defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-job-main:abandon'}), // 放弃 - defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-job-main:execute'}), // 执行 + // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:accept'}), // 承接 + // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // 关闭 + // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-job-main:abandon'}), // 放弃 + defaultButtons.mainListJobRecBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:execute'}), // 收货 ] }