From 02065bea56b68c16df5ac6435143e111b2f1882b Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Wed, 3 Apr 2024 09:24:53 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2--?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=88=90=E5=8A=9F=EF=BC=8C=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E9=87=8D=E5=A4=8D=E5=8A=A0=E8=BD=BD=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/components/LoginForm.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index f442aaef1..89e1559a6 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -100,7 +100,7 @@ const iconLock = useIcon({ icon: 'ep:lock' }) const formLogin = ref() const { validForm } = useFormValid(formLogin) const { setLoginState, getLoginState } = useLoginState() -const { currentRoute, push } = useRouter() +const { currentRoute, push , replace} = useRouter() const permissionStore = usePermissionStore() const redirect = ref('') const loginLoading = ref(false) @@ -215,7 +215,7 @@ const handleLogin = async (params) => { window.location.href = window.location.href.replace('/login?redirect=', '') } else { console.log(redirect.value) - push({ path: redirect.value || permissionStore.addRouters[0].path }) + replace({ path: redirect.value || permissionStore.addRouters[0].path }) } // 存储 部门信息 const { wsCache } = useCache() From de6146e9ea91601f7d6102ae155d56350eb30225 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 3 Apr 2024 09:28:44 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/supplierinvoiceRequestMain/index.ts | 18 +- .../supplierinvoiceRequestMain/index.vue | 179 ++++-- .../supplierinvoiceRequestMain.data.ts | 596 +++++++++--------- 3 files changed, 446 insertions(+), 347 deletions(-) diff --git a/src/api/wms/supplierinvoiceRequestMain/index.ts b/src/api/wms/supplierinvoiceRequestMain/index.ts index b3e752a7b..1c25c05c5 100644 --- a/src/api/wms/supplierinvoiceRequestMain/index.ts +++ b/src/api/wms/supplierinvoiceRequestMain/index.ts @@ -68,14 +68,24 @@ export const cloSupplierinvoiceRequestMain = async (id: number) => { export const subSupplierinvoiceRequestMain = async (id: number) => { return await request.post({ url: `/wms/supplierinvoice-request-main/sub?id=` + id }) } -// 审批通过供应商发货申请主 +// 供应商--审批通过供应商发货申请主 export const appSupplierinvoiceRequestMain = async (id: number) => { return await request.post({ url: `/wms/supplierinvoice-request-main/app?id=` + id }) } -// 驳回供应商发货申请主 +// 供应商--驳回供应商发货申请主 export const rejSupplierinvoiceRequestMain = async (id: number) => { return await request.post({ url: `/wms/supplierinvoice-request-main/rej?id=` + id }) } + +// 财务--审批通过供应商发货申请主 +export const financeappSupplierinvoiceRequestMain = async (id: number) => { + return await request.post({ url: `/wms/supplierinvoice-request-main/financeApp?id=` + id }) +} +// 财务--驳回供应商发货申请主 +export const financerejSupplierinvoiceRequestMain = async (id: number) => { + return await request.post({ url: `/wms/supplierinvoice-request-main/financeRej?id=` + id }) +} + // 生成记录 export const genRecordsSupplierinvoiceRequestMain = async (id) => { return await request.post({ url: `/wms/supplierinvoice-request-main/genRecords?id=` + id }) @@ -89,3 +99,7 @@ export const exportSupplierinvoiceRequestMain = async (params) => { } } +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 1bb8a0389..ade3d6fdd 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -65,6 +65,17 @@ :Echo="Echo" /> + + + diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index 4f2f11589..8116caf7a 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -5,7 +5,6 @@ import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/su const { t } = useI18n() // 国际化 import * as getRequestsettingApi from '@/api/wms/requestsetting/index' -import * as supplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain' import * as supplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail' // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -27,47 +26,30 @@ const requestsettingData = data?.list[0] || {} const userDeptArray:any = [userDept] - - export const PurchaseReceiptOrReturnRecordMain = useCrudSchemas(reactive([ +/** + * @returns {Array} 采购订单或者采购退货单 + */ +export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive([ { - label: '单据号', - field: 'number' + label: '项目编码', + field: 'projectCode' }, { - label: '供应商代码', - field: 'supplierCode' + label: '单据类型', + field: 'billType' }, { - label: '发货单号', - field: 'asnNumber' + label: '单据号', + field: 'recvBillNum' }, { - label: '备注', - field: 'remark', + label: '发货单号', + field: 'asnBillNum' }, { - label: '创建时间', - field: 'createTime', - isTable: true, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - isTableForm: false, - isForm: false + label: '供应商代码', + field: 'supplierCode' }, - { - label: '创建者', - field: 'creator', - isTableForm: false, - isForm: false - } -])) - -/** - * @returns {Array} 采购订单或者采购退货单 - */ -export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive([ { label: '订单号', field: 'poNumber' @@ -77,41 +59,16 @@ export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive( } }, { - label: '单据类型', - field: 'billType', - dictType: DICT_TYPE.BILL_TYPE, + label: '状态', + field: 'status', + dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS, dictClass: 'string', isTable: true, - isSearch: true, sort: 'custom', table: { width: 150 }, + isSearch: true, + form: { + value: '1', + componentProps: { + disabled: true + } + } }, { - label: '记录单号', - field: 'recvBillNum', - sort: 'custom', + label: '金额', + field: 'amount', table: { width: 150 }, form: { - // labelMessage: '信息提示说明!!!', + component: 'InputNumber', componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择单号', // 输入框占位文本 - searchField: 'number', // 查询弹窗赋值字段 - searchTitle: '单号信息', // 查询弹窗标题 - searchAllSchemas: PurchaseReceiptOrReturnRecordMain.allSchemas, - searchPage: supplierinvoiceRequestMainApi.getNumber, - searchCondition: [{ - key: 'supplierCode', - value: 'supplierCode', - message: '请填写供应商代码!', - isMainValue: true - }, - { - key: 'billType', - value: 'billType', - message: '请填写单据类型!', - isMainValue: true - }] + min: 0, + precision: 6, } }, tableForm: { - isInpuFocusShow: true, - searchListPlaceholder: '请选择单号', - searchField: 'number', - searchTitle: '单号信息', - searchAllSchemas: PurchaseReceiptOrReturnRecordMain.allSchemas, - searchPage: supplierinvoiceRequestMainApi.getNumber, - searchCondition: [{ - key: 'supplierCode', - value: 'supplierCode', - message: '请填写供应商代码!', - isMainValue: true - }, - { - key: 'billType', - value: 'billType', - message: '请填写单据类型!', - isMainValue: true - }] + type: 'InputNumber', + min: 0, + precision: 6, } }, { - label: '发货单号', - field: 'asnBillNum', + label: '税率', + field: 'taxRate', + table: { + width: 150 + }, form: { + component: 'InputNumber', componentProps: { - disabled: true + min: 0, + precision: 6, } }, tableForm: { - disabled: true + type: 'InputNumber', + min: 0, + precision: 6, } }, { - label: '订单号', - field: 'poBillNum', - sort: 'custom', + label: '税额', + field: 'taxAmount', table: { width: 150 }, form: { - component: 'Select', - componentProps:{ - options:[{label:'',value:''}] + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, } }, tableForm: { - type: 'Select', - options:[{label:'',value:''}] + type: 'InputNumber', + min: 0, + precision: 6, } }, { - label: '调增金额', - field: 'adjustAmount', - sort: 'custom', + label: '税后金额', + field: 'afterTaxAmount', table: { width: 150 }, - isForm:false, - isTable:false, form: { component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } }, { - label: '业务类型', - field: 'businessType', - sort: 'custom', + label: '索赔金额', + field: 'claimAmount', table: { width: 150 }, - isTable:false, - isForm:false, form: { - value: 'SupplierInvoice', + component: 'InputNumber', componentProps: { - disabled: true, + min: 0, + precision: 6, } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, } }, { - label: '申请时间', - field: 'requestTime', + label: '折扣金额', + field: 'discountAmount', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } + }, + { + label: '调整税额', + field: 'adjustingTaxAmount', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } + }, + { + label: '金税票号', + field: 'afterTaxAmount', + table: { + width: 150 + }, + }, + { + label: '快递单号', + field: 'expressTrackingNumber', + table: { + width: 150 + }, + }, + { + label: '发票时间', + field: 'invoiceTime', formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -301,19 +295,20 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( table: { width: 180 }, - isForm:false, form: { component: 'DatePicker', componentProps: { + style: {width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, }, + { - label: '截止时间', - field: 'dueTime', + label: '申请时间', + field: 'requestTime', formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -323,7 +318,6 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( width: 180 }, isForm:false, - isTable:false, form: { component: 'DatePicker', componentProps: { @@ -356,33 +350,6 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( } } }, - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.REQUEST_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - form: { - value: '1', - componentProps: { - disabled: true - } - } - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, { label: '创建者', field: 'creator', @@ -437,6 +404,15 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( } }, }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, { label: '自动提交', field: 'autoCommit', @@ -444,6 +420,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( dictClass: 'string', isTable: false, isForm:false, + isTableForm:false, + isDetail:false, sort: 'custom', table: { width: 150 @@ -464,7 +442,9 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isTable: false, - isForm: false, + isForm:false, + isTableForm:false, + isDetail:false, sort: 'custom', table: { width: 150 @@ -485,7 +465,9 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isTable: false, - isForm: false, + isForm:false, + isTableForm:false, + isDetail:false, sort: 'custom', table: { width: 150 @@ -505,8 +487,10 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( field: 'directCreateRecord', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isForm: false, isTable: false, + isForm:false, + isTableForm:false, + isDetail:false, sort: 'custom', table: { width: 150 @@ -566,35 +550,41 @@ export const SupplierinvoiceRequestMainRules = reactive({ * @returns {Array} 供应商发票申请子表 */ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive([ + { + label: '订单号', + field: 'poNumber', + form: { + componentProps: { + disabled: true + } + }, + table: { + width: 150 + }, + tableForm:{ + disabled: true + } + }, { label: '订单行', field: 'poLine', + table: { + width: 150 + }, form: { // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, - searchListPlaceholder: '请选择订单号', - searchField: 'number', - searchTitle: '订单号信息', + searchListPlaceholder: '请选择订单行', + searchField: 'poLine', + searchTitle: '待开票列表', searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas, searchPage: supplierinvoiceRequestDetailApi.getPoNumberPoLineInfo, searchCondition: [ { - key: 'recordNumber', - value: 'recvBillNum', - message: '请填写单号!', - isMainValue: true - }, - { - key: 'billType', - value: 'billType', - message: '请填写单号类型!', - isMainValue: true - }, - { - key: 'poNumber', - value: 'poBillNum', - message: '请选择订单号', + key: 'supplierCode', + value: 'supplierCode', + message: '请填供应商信息!', isMainValue: true } ] @@ -602,150 +592,188 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive Date: Wed, 3 Apr 2024 09:40:23 +0800 Subject: [PATCH 3/8] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qms/inspection/inspectionJob/index.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/qms/inspection/inspectionJob/index.vue b/src/views/qms/inspection/inspectionJob/index.vue index 392c0797f..e893d4510 100644 --- a/src/views/qms/inspection/inspectionJob/index.vue +++ b/src/views/qms/inspection/inspectionJob/index.vue @@ -78,11 +78,11 @@ if (type == 'tableForm') { // 明细查询页赋值 row[formField] = val[0][searchField] - row['itemNumber'] = val[0]['number'] - row['itemName'] = val[0]['name'] - row['uom'] = val[0]['uom'] - row['isRadeIn'] = val[0]['isRadeIn'] - row['available'] = val[0]['available'] + // row['itemNumber'] = val[0]['number'] + // row['itemName'] = val[0]['name'] + // row['uom'] = val[0]['uom'] + // row['isRadeIn'] = val[0]['isRadeIn'] + // row['available'] = val[0]['available'] } else { const setV = {} setV[formField] = val[0][searchField] From 3369a0ee21ba7d997e1b5ab2faca817d21a0654f Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 3 Apr 2024 09:41:06 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qms/inspectionPlan/index.ts | 23 +-- src/utils/dict.ts | 4 +- .../inspectionPlan/addForm.vue | 141 ++++++++++++++++-- .../basicDataManage/inspectionPlan/index.vue | 10 +- .../inspectionTemplate/addForm.vue | 18 ++- 5 files changed, 159 insertions(+), 37 deletions(-) diff --git a/src/api/qms/inspectionPlan/index.ts b/src/api/qms/inspectionPlan/index.ts index 1c07a30d3..e0938f648 100644 --- a/src/api/qms/inspectionPlan/index.ts +++ b/src/api/qms/inspectionPlan/index.ts @@ -1,30 +1,23 @@ import request from '@/config/axios' - - - -// 查询采样过程列表 -export const getListByTempleteCode = async (code) => { - return await request.get({ url: `/qms/inspection-process/getListByTempleteCode?code=`+code}) -} // 新增 -export const inspectionTemplateCreat = async (data) => { - return await request.post({ url: `/qms/programme-template/create`,data}) +export const inspectionPlanCreat = async (data) => { + return await request.post({ url: `/qms/type-template/create`,data}) } // 编辑 -export const inspectionTemplateUpdate = async (data) => { - return await request.put({ url: `/qms/programme-template/update`,data}) +export const inspectionPlanUpdate = async (data) => { + return await request.put({ url: `/qms/type-template/update`,data}) } // 删除 -export const inspectionTemplateDelete = async (id) => { - return await request.delete({ url: `/qms/programme-template/delete?id=`+id}) +export const inspectionPlanDelete = async (id) => { + return await request.delete({ url: `/qms/type-template/delete?id=`+id}) } // 列表 -export const inspectionTemplatePage = async (params) => { +export const inspectionPlanPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} return request.post({ url: '/wms/accountcalendar/senior', data }) } else { - return await request.get({ url: `/qms/programme-template/page`, params }) + return await request.get({ url: `/qms/type-template/page`, params }) } } \ No newline at end of file diff --git a/src/utils/dict.ts b/src/utils/dict.ts index b72ef2599..df8c4ee05 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -293,7 +293,9 @@ export enum DICT_TYPE { INSPECTION_CHARACTERISTICS_FEATURE_TYPE = "inspection_characteristics_feature_type", // 特征类型 INSPECTION_CHARACTERISTICS_RESULT_ENTRY = "inspection_characteristics_result_entry", // 结果录入方式 INSPECTION_SEVERITY = 'inspection_severity',//检验严重性 - + SPLIT_RULES = "split_rules", // 拆分规则 + INSPECTION_LEVEL = "inspection_level", // 检验水平字典 + BASIC_AQL = "basic_aql", // aql // ========== 业务 - mes -gaojs ========== QUALIFY_STATUS = 'qualify_status',//质检状态 diff --git a/src/views/qms/basicDataManage/inspectionPlan/addForm.vue b/src/views/qms/basicDataManage/inspectionPlan/addForm.vue index d20c0ba3d..1d59048e2 100644 --- a/src/views/qms/basicDataManage/inspectionPlan/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionPlan/addForm.vue @@ -7,9 +7,8 @@ :vLoading="formLoading" >
- - + @@ -25,6 +24,103 @@ + + +
+ + + +
+
+
+ + +
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
检验工序
- @@ -483,6 +572,7 @@ const data = ref({ code: '', description: '', version: '', + available:true, process: [] }) const isYesList = [ @@ -576,10 +666,28 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any formType.value = type if (row) { data.value = row + let list = await InspectionProcessPageApi.getListByTempleteCode(row.code) list.forEach((item, index) => { editableTabsValue.value = index + 1 item.name = index + 1 + // 编辑判断上限下限目标值是否必填 + if(item.quantifyIsCapping){ + rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true + }else{ + rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false + } + if(item.quantifyIsLowlimit){ + rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true + }else{ + rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false + } + if(item.quantifyIsTarget){ + rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true + }else{ + rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false + } + }) data.value.process = list } else { @@ -587,6 +695,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any code: '', description: '', version: '', + available:true, process: [] } } @@ -645,6 +754,7 @@ const buttonBaseClick1 = (val) => { featureType: '', quantifyIsCapping: '', quantifyIsLowlimit: '', + quantifyIsTarget: '', quantifyTarget: '', quantifyCapping: '', quantifyLowlimit: '', @@ -691,6 +801,7 @@ const validateForm = (formRef) => { return false }) } + const submitForm = async () => { try { const validateForm1 = await validateForm(formProcessRef.value) @@ -706,6 +817,13 @@ const submitForm = async () => { message.error(`模板中有检验工序和检验特性未填写完全`) return; } + const arr = data.value.process.filter(item=>(!item.inspectionCharacteristicsBaseVO.quantifyIsCapping&&!item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit&&!item.inspectionCharacteristicsBaseVO.quantifyIsTarget&&item.inspectionCharacteristicsBaseVO.featureType == 0)) + console.log(arr) + if(arr&&arr.length>0){ + const str = arr.map(item=>item.description).join(',') + message.error(`${str}是否设定上线,是否设定下限,是否是定目标值至少一项为是`) + return; + } if (formType.value == 'create') { // 主子表——提交请求 emit('submitForm', formType.value, data) @@ -730,6 +848,11 @@ if (props.footButttondata) { // 选择特征类型 const changeFeatureType = (e) => { console.log(e) + // if (e) { + // rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true + // } else { + // rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false + // } } const searchTableRef = ref() const opensearchTable = ( diff --git a/src/views/qms/basicDataManage/inspectionPlan/index.vue b/src/views/qms/basicDataManage/inspectionPlan/index.vue index 9699dd2a2..be2a9d26b 100644 --- a/src/views/qms/basicDataManage/inspectionPlan/index.vue +++ b/src/views/qms/basicDataManage/inspectionPlan/index.vue @@ -66,7 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import Detail from '@/components/Detail/src/Detail.vue' import AddForm from './addForm.vue' -import * as InspectionProcessPageApi from '@/api/qms/inspectionPlan' +import * as InspectionPlanApi from '@/api/qms/inspectionPlan' defineOptions({ name: 'AgvLocationrelation' }) @@ -84,7 +84,7 @@ const updataTableColumns = (val) => { } const { tableObject, tableMethods } = useTable({ - getListApi: InspectionProcessPageApi.inspectionTemplatePage // 分页接口 + getListApi: InspectionPlanApi.inspectionPlanPage // 分页接口 }) // 获得表格的各种操作 @@ -149,10 +149,10 @@ const openForm = (type: string, row?: any) => { const submitForm = async (formType,data) => { console.log(data.value) if (formType === 'create') { - await InspectionProcessPageApi.inspectionTemplateCreat(data.value) + await InspectionPlanApi.inspectionPlanCreat(data.value) message.success(t('common.createSuccess')) } else { - await InspectionProcessPageApi.inspectionTemplateUpdate(data.value) + await InspectionPlanApi.inspectionPlanUpdate(data.value) message.success(t('common.updateSuccess')) } basicFormRef.value.dialogVisible = false @@ -171,7 +171,7 @@ const handleDelete = async (id: number) => { // 删除的二次确认 await message.delConfirm() // 发起删除 - await InspectionProcessPageApi.inspectionTemplateDelete(id) + await InspectionPlanApi.inspectionPlanDelete(id) message.success(t('common.delSuccess')) // 刷新列表 await getList() diff --git a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue index 555761be5..3297217fb 100644 --- a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue @@ -8,7 +8,7 @@ >
- + @@ -266,7 +266,9 @@ label="是否设定上限" prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" > - + @@ -295,7 +297,8 @@ label="是否设定下限" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" > - + @@ -324,7 +327,8 @@ label="是否设定目标值" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" > - + From 0b7a4fef3133565ad8d58ccc48d521c0379a425f Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 3 Apr 2024 09:59:52 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E8=AE=B0=E5=BD=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierinvoiceRecordMain.data.ts | 164 ++++++++++++++++-- 1 file changed, 149 insertions(+), 15 deletions(-) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts index 07807ad56..d07d76e25 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts @@ -34,8 +34,63 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ isSearch: true }, { - label: '调增金额', - field: 'adjustAmount', + label: '金额', + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '税率', + field: 'taxRate', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '税额', + field: 'taxAmount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '税后金额', + field: 'afterTaxAmount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '索赔金额', + field: 'claimAmount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '折扣金额', + field: 'discountAmount', sort: 'custom', table: { width: 150 @@ -44,6 +99,48 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive([ component: 'InputNumber', } }, + { + label: '调整税额', + field: 'adjustingTaxAmount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '金税票号', + field: 'goldenTaxInvoiceNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '快递单号', + field: 'expressTrackingNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '发票时间', + field: 'invoiceTime', + isTable: true, + formatter: dateFormatter, + deatil: { + dateFormatter: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + }, { label: '业务类型', field:'businessType', @@ -226,16 +323,16 @@ export const SupplierinvoiceRecordMainRules = reactive({ */ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive([ { - label: '收货单号', - field: 'recordNumber', + label: '项目编号', + field: 'projectCode', sort: 'custom', table: { width: 150 }, }, { - label: '批次', - field: 'batch', + label: '单据类型', + field: 'billType', sort: 'custom', table: { width: 150 @@ -265,6 +362,22 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive width: 180 }, }, + { + label: '发货单号', + field: 'asnBillNum', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 180 + }, + }, { label: '物料代码', field: 'itemCode', @@ -274,19 +387,16 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive }, }, { - label: '计量单位', - field: 'uom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, + label: '物料名称', + field: 'itemName', sort: 'custom', table: { width: 150 }, }, { - label: '数量', - field: 'qty', + label: '货币', + field: 'currency', sort: 'custom', table: { width: 150 @@ -304,8 +414,32 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive } }, { - label: '金额', - field: 'amount', + label: '采购价格', + field: 'purchasePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '收货日期', + field: 'deliveryDate', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '开票数量', + field: 'invoicableQuantity', sort: 'custom', table: { width: 150 From 967f98cf94329779dd56d8ae2cafdbe7887562f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Wed, 3 Apr 2024 11:32:46 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E9=A2=84=E7=94=9F=E4=BA=A7=20=E8=A3=85?= =?UTF-8?q?=E9=85=8D=E6=94=B6=E8=B4=A7=E7=94=B3=E8=AF=B7=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productreceipt/productreceiptRequestMain/index.vue | 1 + .../productreceiptAssembleRequestMain/index.vue | 1 + 2 files changed, 2 insertions(+) diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index c94351527..dec55bc4a 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -533,6 +533,7 @@ const handleDeleteTable = (item, index) => { // 主子数据 提交 const submitForm = async (formType, data) => { + data.type = 'predict' data.subList = tableData.value // 拼接子表数据参数 if(data.subList.find(item => (item.qty <= 0))) { message.warning('数量必须大于0') diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index 394e6041c..6b4dd59df 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -532,6 +532,7 @@ const handleDeleteTable = (item, index) => { // 主子数据 提交 const submitForm = async (formType, data) => { + data.type = 'assemble' data.subList = tableData.value // 拼接子表数据参数 if(data.subList.find(item => (item.qty <= 0))) { message.warning('数量必须大于0') From bf091befbeeb2509ec7e7da714ff3970b14b670a Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Wed, 3 Apr 2024 13:00:29 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=8E=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86--=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E7=94=B3=E8=AF=B7=EF=BC=9A1=E3=80=81=E6=96=B0?= =?UTF-8?q?=E5=A2=9E--=E6=B7=BB=E5=8A=A0=E6=98=8E=E7=BB=86=E5=A4=9A?= =?UTF-8?q?=E9=80=89=E4=BB=A5=E5=8F=8A=E7=9B=B4=E6=8E=A5=E5=B1=95=E7=A4=BA?= =?UTF-8?q?SearchTable=202=E3=80=81=E8=AF=A6=E6=83=85--=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=90=88=E5=90=8C=E9=99=84=E4=BB=B6=20=E7=94=B5=E5=AD=90?= =?UTF-8?q?=E5=8F=91=E7=A5=A8=E9=99=84=E4=BB=B6=20=E8=B4=A7=E8=BF=90?= =?UTF-8?q?=E5=8D=95=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 53 ++++++++++++++++--- .../supplierinvoiceRequestMain/index.vue | 50 +++++++++++------ .../supplierinvoiceRequestMain.data.ts | 1 + 3 files changed, 81 insertions(+), 23 deletions(-) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 4b0b7512f..5a865fca5 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -28,7 +28,7 @@
- + - + - + [] + }, // 是否是基础数据 展现详情顶部表单 isBasic: { type: Boolean, @@ -334,7 +346,7 @@ if (props.isBasic == true) { } } -const otherList = [{ +const otherList = [...props.annexTable,{ label:'附件', prop:'Annex' },{ @@ -373,6 +385,8 @@ const remarkHeight = computed(() => { const annexData = reactive({ annexList: [] }) +// 其他附件默认数据数组 +const annexTableData = ref>([]) // 备注数据 const remarksData = reactive({ @@ -394,6 +408,23 @@ const getFileList = async () => { detailLoading.value = false } } +// 获取其他附件列表篇 +const getAnnexFileList = async () => { + props.annexTable?.forEach(async (item) => { + let requstData = {...remarksData.data,tableName: item?.tableName} + const annexList = await FileApi.getFileList(requstData) + const annexData = annexTableData.value.find(annex=>annex.label === item.label) + if(annexData){ + annexData.annexList = annexList + }else{ + annexTableData.value.push({ + label: item.label, + tableName: item?.tableName || '', + annexList + }) + } + }) +} /** 添加附件 */ const handleAnnexSuccess = () => { getFileList() @@ -404,6 +435,11 @@ const deleteAnnexSuccess = async () => { getFileList() getChangeRecordList() } +/** 追加的附件 */ +const updateAnnexTableHandle = () => { + getAnnexFileList() + getChangeRecordList() +} // Tabs当前选择 const current = ref(0) @@ -481,6 +517,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: detailData.value = row getRemarkList() getFileList() + getAnnexFileList() getChangeRecordList() // 判断详情按钮是否显示 let detailButtonFilter: any = [] diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index ade3d6fdd..30e09f66a 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -35,6 +35,8 @@ - { if (type == 'tableForm') { // 明细查询页赋值 - row[formField] = val[0][searchField] - if (formField == 'poLine') { - row['poNumber'] = val[0]['poNumber'] - row['poLine'] = val[0]['poLine'] - row['tax'] = val[0]['tax'] - row['projectCode'] = val[0]['projectCode'] - row['billType'] = val[0]['billType'] - row['recvBillNum'] = val[0]['recvBillNum'] - row['asnBillNum'] = val[0]['asnBillNum'] - row['supplierCode'] = val[0]['supplierCode'] - row['purchasePrice'] = val[0]['purchasePrice'] - row['invoicableQuantity'] = val[0]['invoicableQuantity'] - row['itemCode'] = val[0]['itemCode'] - } + val.forEach(item=>{ + const newRow = {...row} + newRow[formField] = item[searchField] + if (formField == 'poLine') { + newRow['poNumber'] = item['poNumber'] + newRow['poLine'] = item['poLine'] + newRow['tax'] =item['tax'] + newRow['projectCode'] = item['projectCode'] + newRow['billType'] = item['billType'] + newRow['recvBillNum'] = item['recvBillNum'] + newRow['asnBillNum'] = item['asnBillNum'] + newRow['supplierCode'] = item['supplierCode'] + newRow['purchasePrice'] = item['purchasePrice'] + newRow['invoicableQuantity'] = item['invoicableQuantity'] + newRow['itemCode'] = item['itemCode'] + } + tableData.value.push(newRow) + }) + } else { const setV = {} setV[formField] = val[0][searchField] diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index 8116caf7a..a6f9f7e6d 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -591,6 +591,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive Date: Wed, 3 Apr 2024 13:17:58 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/utils/dict.ts | 2 +- .../sparepartsrequisitionJobMain/index.vue | 241 ++++++ .../sparepartsrequisitionJobMain.data.ts | 769 ++++++++++++++++++ .../sparepartsrequisitionRecordMain/index.vue | 174 ++++ .../sparepartsrequisitionRecordMain.data.ts | 592 ++++++++++++++ .../index.vue | 460 +++++++++++ .../sparepartsrequisitionRequestMain.data.ts | 669 +++++++++++++++ 8 files changed, 2908 insertions(+), 3 deletions(-) create mode 100644 src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue create mode 100644 src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/sparepartsrequisitionJobMain.data.ts create mode 100644 src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue create mode 100644 src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts create mode 100644 src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue create mode 100644 src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts diff --git a/.env.development b/.env.development index 78976cddd..1c9b5ad06 100644 --- a/.env.development +++ b/.env.development @@ -4,10 +4,10 @@ NODE_ENV=development VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://localhost:12080' +VITE_BASE_URL='http://192.168.0.108:12080' # 上传路径 -VITE_UPLOAD_URL='http://localhost:12080/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://192.168.0.108:12080/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH=/dev-api diff --git a/src/utils/dict.ts b/src/utils/dict.ts index df8c4ee05..c90f1b236 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -306,6 +306,6 @@ export enum DICT_TYPE { REWORK_TYPE='rework_type',//工作类型:返工登记、返修登记 REWORK_STATUS='rework_status',//返工返修状态:待返修,返修中,返修完成 REWORK_REPLACE_FLAG = 'rework_replace_flag',//是否有替换件 - + SUPPLIERINVOICE_REQUEST_STATUS = 'supplierinvoice_request_status', //发票申请状态 } diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue new file mode 100644 index 000000000..582c86a2e --- /dev/null +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue @@ -0,0 +1,241 @@ + + + diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/sparepartsrequisitionJobMain.data.ts b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/sparepartsrequisitionJobMain.data.ts new file mode 100644 index 000000000..8609deee4 --- /dev/null +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/sparepartsrequisitionJobMain.data.ts @@ -0,0 +1,769 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' + +/** + * @returns {Array} 计划外出库任务主表 + */ +export const UnplannedissueJobMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.JOB_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '要求截止时间', + field: 'requestDueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '过期时间', + field: 'expiredTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '状态', + // field: 'jobStageStatus', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '优先级', + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '优先级增量', + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '自动完成', + field: 'autoComplete', + 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: 'allowModifyLocation', + 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: 'allowModifyQty', + 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: 'allowBiggerQty', + 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: 'allowSmallerQty', + 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: 'allowModifyInventoryStatus', + 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: 'allowContinuousScanning', + 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: 'allowPartialComplete', + 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: 'allowModifyBatch', + 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: 'allowModifyPackingNumber', + 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: 'acceptTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '承接人', + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '完成时间', + field: 'completeTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '完成人', + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 120, + fixed: 'right' + }, + } +])) + +//表单校验 +export const UnplannedissueJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择仓库代码', trigger: 'change' } + ], + fromAreaTypes: [ + { required: true, message: '请选择从库区类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + // jobStageStatus: [ + // { required: true, message: '请选择阶段状态', trigger: 'change' } + // ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 计划外出库任务子表 + */ +export const UnplannedissueJobDetail = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '原因', + field: 'reason', + dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, + dictClass: 'string', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, + table: { + width: 150 + }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } + }, + { + label: '货主代码', + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, +])) + +//表单校验 +export const UnplannedissueJobDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue new file mode 100644 index 000000000..d07d2ec17 --- /dev/null +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue @@ -0,0 +1,174 @@ + + + diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts new file mode 100644 index 000000000..75c83ba26 --- /dev/null +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts @@ -0,0 +1,592 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' + +/** + * @returns {Array} 计划外出库记录主表 + */ +export const UnplannedissueRecordMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true + }, + { + label: '任务单号', + field: 'jobNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '执行时间', + field: 'executeTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '生效日期', + field: 'activeDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从月台代码', + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, +])) + +//表单校验 +export const UnplannedissueRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'change' } + ], + fromAreaTypes: [ + { required: true, message: '请选择从库区类型范围', trigger: 'change' } + ], + fromAreaCodes: [ + { required: true, message: '请选择从库区代码范围', trigger: 'change' } + ], + outTransaction: [ + { required: true, message: '请输入出库事务类型', trigger: 'blur' } + ], + inTransaction: [ + { required: true, message: '请输入入库事务类型', trigger: 'blur' } + ], + executeTime: [ + { required: true, message: '请输入执行时间', trigger: 'change' } + ], + activeDate: [ + { required: true, message: '请输入生效日期', trigger: 'change' } + ], + available: [ + { required: true, message: '请输入是否可用', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + interfaceType: [ + { required: true, message: '请选择接口类型', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 计划外出库记录子表 + */ +export const UnplannedissueRecordDetail = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单价', + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '金额', + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '原因', + field: 'reason', + dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, + dictClass: 'string', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, + table: { + width: 150 + }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } + }, + { + label: '货主代码', + field: 'ownerCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位组代码', + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库区代码', + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, +])) + +//表单校验 +export const UnplannedissueRecordDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择从库位组代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择从库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue new file mode 100644 index 000000000..94eb8a380 --- /dev/null +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue @@ -0,0 +1,460 @@ + + + diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts new file mode 100644 index 000000000..2c0d3080f --- /dev/null +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts @@ -0,0 +1,669 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' + +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +const { t } = useI18n() // 国际化 + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'UnplannedDeliverRequest' +} + const data = await getRequestsettingApi.getRequestsettingPage(queryParams) + const requestsettingData =data?.list[0]||{} + + // 获取当前操作人的部门 +import { useUserStore } from '@/store/modules/user' +import { TableColumn } from '@/types/table' +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept + // id 转str 否则form回显匹配不到 + userDept.id = userDept.id.toString() +const userDeptArray:any = [userDept] + +/** + * @returns {Array} 计划外出库申请主表 + */ +export const UnplannedissueRequestMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '申请时间', + field: 'requestTime', + 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: 'dueTime', + 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: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + isForm: false, + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + isForm: false, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'UnplannedDeliver', + componentProps: { + disabled: true + } + }, + isForm: false, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id == cellValue)?.name + }, + form: { + value: userDept.id, + component: 'Select', + api: () => userDeptArray, + componentProps: { + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } + } + } + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoCommit, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoAgree, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoExecute, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '直接生成记录', + field: 'directCreateRecord', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + { + label: '创建时间', + field: 'createTime', + 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', + } + }, + isForm: false, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '最后更新时间', + field: 'updateTime', + 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', + } + }, + isForm: false, + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 300, + fixed: 'right' + }, + } +])) + +//表单校验 +export const UnplannedissueRequestMainRules = reactive({ + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 计划外出库申请子表 + */ +export const UnplannedissueRequestDetail = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.getBalancePage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', + searchAllSchemas: Balance.allSchemas, + searchPage: BalanceApi.getBalancePage + } + } + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select' + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select' + } + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '原因', + field: 'reason', + dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, + dictClass: 'string', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, + table: { + width: 150 + }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTableForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建时间', + field: 'createTime', + 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', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新时间', + field: 'updateTime', + 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', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:false, + } +])) + +//表单校验 +export const UnplannedissueRequestDetailRules = reactive({ + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + containerNumber: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], +}) \ No newline at end of file