From 615ca197bd552578f45c232bec046f843c98d526 Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Mon, 6 May 2024 15:47:31 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicDataManage/inspectionScheme/addForm.vue | 8 +++++++- .../inspectionRequestMain.data.ts | 16 ++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/views/qms/basicDataManage/inspectionScheme/addForm.vue b/src/views/qms/basicDataManage/inspectionScheme/addForm.vue index 787c3a407..e199200ac 100644 --- a/src/views/qms/basicDataManage/inspectionScheme/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionScheme/addForm.vue @@ -104,7 +104,13 @@ '检验模板', InspectionTemplateMain.allSchemas, InspectionTemplateApi.inspectionTemplatePage, - null, + [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ], false, 'main', null diff --git a/src/views/qms/inspection/inspectionRequest/inspectionRequestMain.data.ts b/src/views/qms/inspection/inspectionRequest/inspectionRequestMain.data.ts index 1b486a144..1482f4200 100644 --- a/src/views/qms/inspection/inspectionRequest/inspectionRequestMain.data.ts +++ b/src/views/qms/inspection/inspectionRequest/inspectionRequestMain.data.ts @@ -370,8 +370,8 @@ export const InspectionMain = useCrudSchemas(reactive([ // 表单校验 export const InspectionRequestPackageRules = reactive({ - packageCode: [required], - packageSpecificationCode: [required], + // packageCode: [required], + // packageSpecificationCode: [required], amount: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}], measuringUnit: [required], }) @@ -388,9 +388,6 @@ export const InspectionRequestPackage = useCrudSchemas(reactive([ tableForm:{ disabled:true }, - table:{ - width:200 - }, isTableForm:false, form:{ componentProps:{ @@ -406,9 +403,6 @@ export const InspectionRequestPackage = useCrudSchemas(reactive([ tableForm:{ disabled:false }, - table:{ - width:200 - } }, { label: '包装规格', @@ -418,9 +412,6 @@ export const InspectionRequestPackage = useCrudSchemas(reactive([ tableForm:{ disabled:false }, - table:{ - width:180 - } }, { label: '数量', @@ -434,9 +425,6 @@ export const InspectionRequestPackage = useCrudSchemas(reactive([ tableForm:{ disabled:false }, - table:{ - width:150 - } }, { label: '计量单位', From 16e6a03f5ea03e4dfd1df4080a740167800ec674 Mon Sep 17 00:00:00 2001 From: chenfang Date: Mon, 6 May 2024 16:19:10 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=94=80=E5=94=AE=E5=8F=91=E8=BF=90?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/saleShipmentDetail/index.ts | 65 +++ src/api/wms/saleShipmentMain/index.ts | 64 +++ .../deliver/deliverRequestMain/index.vue | 2 - .../saleShipmentMainRequest/index.vue | 319 +++++++++++++ .../saleShipmentMain.data.ts | 439 ++++++++++++++++++ 5 files changed, 887 insertions(+), 2 deletions(-) create mode 100644 src/api/wms/saleShipmentDetail/index.ts create mode 100644 src/api/wms/saleShipmentMain/index.ts create mode 100644 src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue create mode 100644 src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts diff --git a/src/api/wms/saleShipmentDetail/index.ts b/src/api/wms/saleShipmentDetail/index.ts new file mode 100644 index 000000000..50dd3e242 --- /dev/null +++ b/src/api/wms/saleShipmentDetail/index.ts @@ -0,0 +1,65 @@ +import request from '@/config/axios' + +export interface SaleShipmentDetailVO { + id: number + soNumber: string + soLine: string + fromOwnerCode: string + packingNumber: string + batch: string + inventoryStatus: string + fromLocationCode: string + masterId: number + number: string + itemCode: string + itemName: string + itemDesc1: string + itemDesc2: string + projectCode: string + qty: number + uom: string + remark: string + concurrencyStamp: string + siteId: number +} + +// 查询销售发运申请子列表 +export const getSaleShipmentDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/sale-shipment-detail/senior', data }) + } else { + return await request.get({ url: `/wms/sale-shipment-detail/page`, params }) + } +} + +// 查询销售发运申请子详情 +export const getSaleShipmentDetail = async (id: number) => { + return await request.get({ url: `/wms/sale-shipment-detail/get?id=` + id }) +} + +// 新增销售发运申请子 +export const createSaleShipmentDetail = async (data: SaleShipmentDetailVO) => { + return await request.post({ url: `/wms/sale-shipment-detail/create`, data }) +} + +// 修改销售发运申请子 +export const updateSaleShipmentDetail = async (data: SaleShipmentDetailVO) => { + return await request.put({ url: `/wms/sale-shipment-detail/update`, data }) +} + +// 删除销售发运申请子 +export const deleteSaleShipmentDetail = async (id: number) => { + return await request.delete({ url: `/wms/sale-shipment-detail/delete?id=` + id }) +} + +// 导出销售发运申请子 Excel +export const exportSaleShipmentDetail = async (params) => { + return await request.download({ url: `/wms/sale-shipment-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/sale-shipment-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/saleShipmentMain/index.ts b/src/api/wms/saleShipmentMain/index.ts new file mode 100644 index 000000000..e03719231 --- /dev/null +++ b/src/api/wms/saleShipmentMain/index.ts @@ -0,0 +1,64 @@ +import request from '@/config/axios' + +export interface SaleShipmentMainVO { + id: number + customerCode: string + number: string + businessType: string + remark: string + extraProperties: string + siteId: number + invoiceTime: Date + requestTime: Date + dueTime: Date + departmentCode: string + status: string + autoCommit: string + autoAgree: string + autoExecute: string + directCreateRecord: string + concurrencyStamp: string + ruleUserId: number + serialNumber: string +} + +// 查询销售发运申请主列表 +export const getSaleShipmentMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/sale-shipment-main-request/senior', data }) + } else { + return await request.get({ url: `/wms/sale-shipment-main-request/page`, params }) + } +} + +// 查询销售发运申请主详情 +export const getSaleShipmentMain = async (id: number) => { + return await request.get({ url: `/wms/sale-shipment-main-request/get?id=` + id }) +} + +// 新增销售发运申请主 +export const createSaleShipmentMain = async (data: SaleShipmentMainVO) => { + return await request.post({ url: `/wms/sale-shipment-main-request/create`, data }) +} + +// 修改销售发运申请主 +export const updateSaleShipmentMain = async (data: SaleShipmentMainVO) => { + return await request.put({ url: `/wms/sale-shipment-main-request/update`, data }) +} + +// 删除销售发运申请主 +export const deleteSaleShipmentMain = async (id: number) => { + return await request.delete({ url: `/wms/sale-shipment-main-request/delete?id=` + id }) +} + +// 导出销售发运申请主 Excel +export const exportSaleShipmentMain = async (params) => { + return await request.download({ url: `/wms/sale-shipment-main-request/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/sale-shipment-main-request/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index 9394880ba..e0345b511 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -92,7 +92,6 @@ import { DeliverRequestMain,DeliverRequestMainRules,DeliverRequestDetail,Deliver import * as DeliverRequestMainApi from '@/api/wms/deliverRequestMain' import * as DeliverRequestDetailApi from '@/api/wms/deliverRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' -import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail' // 发货申请 defineOptions({ name: 'DeliverRequestMain' }) @@ -103,7 +102,6 @@ const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name -const customerCode = ref() const tableColumns = ref([...DeliverRequestMain.allSchemas.tableColumns,...DeliverRequestDetail.allSchemas.tableMainColumns]) const isShowButton = ref(true) diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue new file mode 100644 index 000000000..ab3d2d769 --- /dev/null +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue @@ -0,0 +1,319 @@ + + + diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts new file mode 100644 index 000000000..98ab99139 --- /dev/null +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts @@ -0,0 +1,439 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +import * as CustomerApi from '@/api/wms/customer' +import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data' + +import * as SaleMainApi from '@/api/wms/saleMain' +import { SaleMain } from '@/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data' + +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'DeliverRequest' +} + const data = await getRequestsettingApi.getRequestsettingPage(queryParams) + const requestsettingData =data?.list[0]||{} + +// 表单校验 +export const SaleShipmentMainRules = reactive({ +}) + +export const SaleShipmentMain = useCrudSchemas(reactive([ + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择客户代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '客户信息', // 查询弹窗标题 + searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类 + searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + isForm: false, + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '发票时间', + field: 'invoiceTime', + sort: 'custom', + formatter: dateFormatter, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isForm: false, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + table: { + width: 150 + }, + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isForm:false, + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + 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: false, + isForm: false, + 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: false, + isForm: false, + 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: 'createTime', + sort: 'custom', + formatter: dateFormatter, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + +// 表单校验 +export const SaleShipmentDetailRules = reactive({ +}) + +export const SaleShipmentDetail = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + width: 180 + }, + isTable: false, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '销售订单号', + field: 'soNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择销售订单号', + searchField: 'number', + searchTitle: '销售订单信息', + searchAllSchemas: SaleMain.allSchemas, + searchPage: SaleMainApi.getSaleMainPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择销售订单号', + searchField: 'number', + searchTitle: '销售订单信息', + searchAllSchemas: SaleMain.allSchemas, + searchPage: SaleMainApi.getSaleMainPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '销售订单行', + field: 'soLine', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择销售订单行', + searchField: 'lineNumber', + searchTitle: '销售订单信息', + searchAllSchemas: SaleMain.allSchemas, + searchPage: SaleMainApi.getSaleMainPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择销售订单行', + searchField: 'lineNumber', + searchTitle: '销售订单信息', + searchAllSchemas: SaleMain.allSchemas, + searchPage: SaleMainApi.getSaleMainPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + isSearch: true, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true, + }, + { + label: '库存状态', + field: 'inventoryStatus', + sort: 'custom', + isSearch: true, + form: { + component: 'Radio' + }, + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + isSearch: true, + }, + { + label: '主表ID', + field: 'masterId', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '物品代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + }, + { + label: '物品名称', + field: 'itemName', + sort: 'custom', + isSearch: true, + }, + { + label: '物品描述1', + field: 'itemDesc1', + sort: 'custom', + isSearch: true, + }, + { + label: '物品描述2', + field: 'itemDesc2', + sort: 'custom', + isSearch: true, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + isSearch: true, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isSearch: true, + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + isSearch: true, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) \ No newline at end of file From b46958eaa466680329cf1f30d9c0d21ffca8982d Mon Sep 17 00:00:00 2001 From: chenfang Date: Mon, 6 May 2024 16:36:04 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=94=80=E5=94=AE=E5=8F=91=E8=BF=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saleShipmentMainRequest/index.vue | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue index ab3d2d769..d22258d89 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue @@ -108,8 +108,12 @@ const trueFalse = ref(false) const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { const setV = {} - setV[formField] = val[0][searchField] - formRef.setValues(setV) + if(formField == 'CustomerCode') { + setV['CustomerCode'] = val[0]['CustomerCode'] + } else { + setV[formField] = val[0][searchField] + } + formRef.setValues(setV) }) } @@ -117,11 +121,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { nextTick(() => { const setV = {} - if(formField == 'CustomerCode') { - setV['CustomerCode'] = val[0]['CustomerCode'] - }else { - setV[formField] = val[0][searchField] - } + setV[formField] = val[0][searchField] formRef.setValues(setV) }) } @@ -167,7 +167,13 @@ const buttonBaseClick = (val, item) => { } else if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 - getList() + if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { + searchFormClick({ + filters: tableObject.params.filters + }) + } else { + getList() + } } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) @@ -243,8 +249,8 @@ const submitForm = async (formType, data) => { // 添加明细 const handleAddTable = () => { - tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) -} + tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) + } // 删除明细 const handleDeleteTable = (item, index) => { tableData.value.splice(index, 1) From 5e34c5d3ecf9971bd3fd9e5f5121726c55cdf9d3 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 6 May 2024 16:45:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=8C=B9=E9=85=8D=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E6=9C=80=E5=A4=9A?= =?UTF-8?q?=E9=99=90=E5=88=B6999=E8=A1=8C=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=B6=85=E8=BF=87999=E8=A1=8C=EF=BC=8C?= =?UTF-8?q?=E7=AB=8B=E5=88=BB=E7=BB=99=E6=88=91=E6=8F=90=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=85=81=E8=AE=B8=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierinvoice/supplierinvoiceRequestMain/index.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index fff40c055..49653cb14 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -615,6 +615,14 @@ const handleImport = () => { data.subList = tableData.value // 拼接子表数据参数 try { if (formType === 'create') { + if(data.subList.length == 0){ + message.warning("请添明细数据") + return; + } + if(data.subList.length > 999){ + message.warning("明细数据条数已超过最大数量限制【999条】") + return; + } await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data) message.success(t('common.createSuccess')) } else {