From 509da05ff162f8f1acd4712219c1132e0243328f Mon Sep 17 00:00:00 2001 From: "YEJIAXING-PC\\lenovo" <591141169@qq.com> Date: Wed, 23 Oct 2024 16:16:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E7=B4=A2=E8=B5=94=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=20=E4=BB=A3=E7=A0=81=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/purchaseClaimRequestDetail/index.ts | 4 +- src/api/wms/purchaseClaimRequestMain/index.ts | 15 + src/utils/dict.ts | 1 + .../PurchaseClaimRequestMain.data.ts | 390 ++++++++++-------- .../purchaseClaimRequest/index.vue | 304 ++++++++------ 5 files changed, 411 insertions(+), 303 deletions(-) diff --git a/src/api/wms/purchaseClaimRequestDetail/index.ts b/src/api/wms/purchaseClaimRequestDetail/index.ts index f6e95f74d..c2242cf33 100644 --- a/src/api/wms/purchaseClaimRequestDetail/index.ts +++ b/src/api/wms/purchaseClaimRequestDetail/index.ts @@ -4,9 +4,9 @@ export const getPurchaseClaimRequestDetailPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/purchase-claim-request-detai/senior', data }) + return await request.post({ url: '/wms/purchaseClaim-request-detail/senior', data }) } else { - return await request.get({ url: `/wms/purchase-claim-request-detai/page`, params }) + return await request.get({ url: `/wms/purchaseClaim-request-detail/page`, params }) } } diff --git a/src/api/wms/purchaseClaimRequestMain/index.ts b/src/api/wms/purchaseClaimRequestMain/index.ts index 4e8df1b59..6836bb2cd 100644 --- a/src/api/wms/purchaseClaimRequestMain/index.ts +++ b/src/api/wms/purchaseClaimRequestMain/index.ts @@ -44,6 +44,21 @@ export const deletePurchaseClaimRequestMain = async (id: number) => { return await request.delete({ url: `/wms/purchaseClaim-request-main/delete?id=` + id }) } +// 提交审批采购索赔 +export const subPurchaseClaimRequestMain = async (id: number) => { + return await request.delete({ url: `/wms/purchaseClaim-request-main/subPurchaseClaimRequestMain?id=` + id }) +} + +// 审批通过采购索赔 +export const agreePurchaseClaimRequestMain = async (id: number) => { + return await request.delete({ url: `/wms/purchaseClaim-request-main/agreePurchaseClaimRequestMain?id=` + id }) +} + +// 审批驳回采购索赔 +export const rejectPurchaseClaimRequestMain = async (id: number) => { + return await request.delete({ url: `/wms/purchaseClaim-request-main/rejectPurchaseClaimRequestMain?id=` + id }) +} + // 导出采购索赔主 Excel export const exportPurchaseClaimRequestMain = async (params) => { return await request.download({ url: `/wms/purchaseClaim-request-main/export-excel`, params }) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 91bca1bd4..fb114e6ca 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -347,6 +347,7 @@ export enum DICT_TYPE { SUPPLIERINVOICE_REQUEST_STATUS = 'supplierinvoice_request_status', //发票申请状态 SUPPLIERINVOICE_STATUS = 'supplierinvoice_status', //待开票审核状态 + PURCHASECLAIM_REQUEST_STATUS = 'purchaseClaim_request_status', //采购索赔状态 INVOICE_REQUEST_STATUS = 'invoice_request_status', //待开票申请状态 // ========== system - 消息通知优化 - ========== diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts index 593411fe0..e653b5caa 100644 --- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts +++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts @@ -1,16 +1,21 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import * as SupplierApi from '@/api/wms/supplier' +import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' +import * as ItembasicApi from "@/api/wms/itembasic"; import { - CustomerStatementMain, -} from '../../../deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data' -import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain' + Supplieritem +} from "@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data"; +import * as SupplieritemApi from "@/api/wms/supplieritem"; // 表单校验 export const PurchaseClaimRequestMainRules = reactive({ - beforeTaxAmount: [required], - taxRate: [required], - taxAmount: [required], - adTaxAmount: [required], + supplierCode: [ + { required: true, message: '请选择供应商代码', trigger: 'blur' } + ], + supplierName: [ + { required: true, message: '请输入供应商名称', trigger: 'blur' } + ], }) export const PurchaseClaimRequestMain = useCrudSchemas(reactive([ @@ -20,144 +25,126 @@ export const PurchaseClaimRequestMain = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, isForm: false, + table: { + width: 150 + }, }, { - label: '状态', - field: 'status', - sort: 'custom', - isSearch: true, - isForm: false, - // 0:新增1:已发布2已作废 - }, - { - label: '客户对账单', - field: 'customerStatementNumber', + label: '供应商代码', + field: 'supplierCode', sort: 'custom', + table: { + width: 150 + }, isSearch: true, form: { - componentProps: { - enterSearch: true, + // labelMessage: '信息提示说明!!!', + componentProps: {     + enterSearch:true, isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择客户对账单', // 输入框占位文本 - searchField: 'number', // 查询弹窗赋值字段 - searchTitle: '客户对账单信息', // 查询弹窗标题 - searchAllSchemas: CustomerStatementMain.allSchemas, // 查询弹窗所需类 - searchPage: CustomerStatementMainApi.getCustomerStatementMainPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 + searchPage: SupplierApi.getSupplierPageSCP, // 查询弹窗所需分页方法 + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: 'true', + isFormModel: true + }], // 失去焦点校验参数 } } }, { - label: '客户代码', - field: 'customer', - sort: 'custom', - isSearch: true, - form: { - componentProps: { - disabled: true - } - } + label: '供应商名称', + field: 'supplierName', + isDetail: true, + table: { + width: 180 + }, }, { - label: '客户名称', - field: 'customerName', + label: '索赔时间', + field: 'invoiceTime', sort: 'custom', + formatter: dateFormatter, + table: { + width: 110 + }, + 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: { - disabled: true + type: 'datetime', + valueFormat: 'x' } - } + }, }, { - label: '未税金额', - field: 'beforeTaxAmount', + label: '供应商发票申请单号', + field: 'supplierinvoiceNumber', sort: 'custom', + isSearch: true, + isForm:false, form: { componentProps: { disabled: true } - } + }, + table: { + width: 180 + }, }, { - label: '税率(%)', - field: 'taxRate', - dictType: DICT_TYPE.TAX_RATE_DICT, + label: '状态', + field: 'status', + dictType: DICT_TYPE.PURCHASECLAIM_REQUEST_STATUS, dictClass: 'string', - sortTableDefault: 3, isTable: true, + isForm:false, sort: 'custom', table: { width: 150 }, - }, - { - label: '税额', - field: 'taxAmount', - sort: 'custom', - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '价税合计金额', - field: 'adTaxAmount', - sort: 'custom', + isSearch: true, form: { + value: '1', componentProps: { disabled: true } } }, { - label: '金税票号', - field: 'goldenTaxInvoiceNumber', - sort: 'custom', - }, - { - label: '开票日期', - field: 'invoiceTime', - sort: 'custom', + label: '创建时间', + field: 'createTime', 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, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 }, form: { component: 'DatePicker', componentProps: { type: 'datetime', - valueFormat: 'x' + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } }, - }, - - { - label: '备注', - field: 'remark', - sort: 'custom', - }, - { - label: '是否可用默认TRUE', - field: 'available', - sort: 'custom', - isTable: false, - isForm: false - }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, + isSearch: true, search: { component: 'DatePicker', componentProps: { @@ -166,7 +153,15 @@ export const PurchaseClaimRequestMain = useCrudSchemas(reactive([ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, - isForm: false, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isForm:false, + table: { + width: 150 + }, }, { label: '操作', @@ -180,108 +175,149 @@ export const PurchaseClaimRequestMain = useCrudSchemas(reactive([ ])) // 表单校验 export const PurchaseClaimRequestDetailRules = reactive({ - beforeTaxAmount: [required], - taxRate: [required], - taxAmount: [required], - adTaxAmount: [required], + itemCode: [ + { required: true, message: '请输入物料代码', trigger: 'blur' } + ], + claimQty: [ + { required: true, message: '请输入索赔数量', trigger: 'blur' } + ], + claimAmount: [ + { required: true, message: '请输入索赔金额', trigger: 'blur' } + ], }) export const PurchaseClaimRequestDetail = useCrudSchemas(reactive([ { - label: '品番', - field: 'number', + label: '物料代码', + field: 'itemCode', sort: 'custom', - isSearch: true, - isForm: false, - tableForm: { - disabled: true - } - }, - { - label: '品号', - field: 'articleNumber', - sort: 'custom', - isSearch: true, - isForm: false, - // 0:新增1:已发布2已作废 - }, - { - label: '数量', - field: 'qty', - sort: 'custom', - isSearch: true, + isSearch: false, + table: { + width: 150 + }, + tableForm:{ + multiple:false,//多选 + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码',// 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '供应商物料信息', // 查询弹窗标题 + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + },{ + key: 'supplierCode', + value: 'supplierCode', + action: '==', + message: '供应商代码不能为空!', + isFormModel:true, // filters中添加筛选的数据--取于formModel + required:true, // 前置添加必有,和isFormModel结合使用 + isSearch: true, + isMainValue: false + }], + verificationPage: ItembasicApi.getItemListByCodes, // tableForm下方输入框校验失去焦点之后是否正确的方法 + isShowTableFormSearch: false, //tableForm下方是否出现输入框 + verificationParams: [{ + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, form: { + // labelMessage: '信息提示说明!!!', componentProps: { + disabled:true, enterSearch: true, isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择客户对账单', // 输入框占位文本 - searchField: '', // 查询弹窗赋值字段 - searchTitle: '客户对账单信息', // 查询弹窗标题 - searchAllSchemas: CustomerStatementMain.allSchemas, // 查询弹窗所需类 - searchPage: CustomerStatementMainApi.getCustomerStatementMainPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } - }, - { - label: '销售单价', - field: 'price', - sort: 'custom', - isSearch: true, - form: { - componentProps: { - disabled: true + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '供应商物料信息', // 查询弹窗标题 + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'supplierCode', + value: 'supplierCode', + message: '供应商代码不能为空!', + isMainValue:true + } + ], + verificationParams: [ + { + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 } } }, + { - label: '模具分摊单价', - field: 'allocationPrice', + label: '物料名称', + field: 'itemName', sort: 'custom', - form: { - componentProps: { - disabled: true - } - } + table: { + width: 150 + }, }, { - label: '合计单价', - field: 'beforeTaxAmount', + label: '计量单位', + field: 'uom', sort: 'custom', - form: { - componentProps: { - disabled: true - } + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + table: { + width: 110 + }, + tableForm: { + type: 'Select' } }, { - label: '未税金额', - field: 'taxRate', + label: '索赔数量', + field: 'claimQty', sort: 'custom', - }, - { - label: '税额', - field: 'taxAmount', - sort: 'custom', - form: { - componentProps: { - disabled: true - } + isSearch: false, + isTable: true, + table: { + width: 110 + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 0 } }, { - label: '含税金额', - field: 'adTaxAmount', + label: '索赔金额', + field: 'claimAmount', sort: 'custom', - form: { - componentProps: { - disabled: true - } + isSearch: false, + isTable: true, + table: { + width: 110 + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 5 } }, - ])) diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue index 347668969..7bf093423 100644 --- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue +++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue @@ -1,21 +1,29 @@