Browse Source

修改Q2前端BUG

hella_online_20240823
parent
commit
5dfcee16bc
  1. 51
      src/api/wms/purchasereceiptRecordDetail/index.ts
  2. 46
      src/views/qms/inspectionQ2/index.vue
  3. 14
      src/views/qms/inspectionQ2/inspectionQ2.data.ts

51
src/api/wms/purchasereceiptRecordDetail/index.ts

@ -45,52 +45,49 @@ export interface PurchasereceiptRecordDetailVO {
interfaceType: string
fromOwnerCode: string
toOwnerCode: string
toBatch: string,
parentPackingNumber:string
packingNumber:string
toBatch: string
parentPackingNumber: string
packingNumber: string
}
// 查询采购收货记录子列表
export const getPurchasereceiptRecordDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const data = { ...params }
return await request.post({ url: '/wms/purchasereceipt-record-detail/senior', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-record-detail/page`, params })
}
}
// 查询采购拒收记录
export const getPurchasereceiptRecordDetailRefusePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const data = { ...params }
return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorRefuse', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-record-detail/pageRefuse`, params })
}
}
// 查询备件收货记录子列表
export const getPurchasereceiptRecordDetailPageSpare = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const data = { ...params }
return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorSpare', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-record-detail/pageSpare`, params })
}
}
// 查询采购收货记录--退货筛选列表
export const getPurchasereceiptRecordDetailPageReturn = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const data = { ...params }
return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorReturn', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-record-detail/pageReturn`, params })
@ -100,7 +97,7 @@ export const getPurchasereceiptRecordDetailPageReturn = async (params) => {
export const getPurchasereceiptRecordDetailPageSCP = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const data = { ...params }
return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorSCP', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-record-detail/pageSCP`, params })
@ -111,21 +108,30 @@ export const getPurchasereceiptRecordDetailPageSCP = async (params) => {
export const getPurchasereceiptRecordDetailPageBySupplierCode = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorBySupplierCode', data })
const data = { ...params }
return await request.post({
url: '/wms/purchasereceipt-record-detail/seniorBySupplierCode',
data
})
} else {
return await request.get({ url: `/wms/purchasereceipt-record-detail/pageBySupplierCode`, params })
return await request.get({
url: `/wms/purchasereceipt-record-detail/pageBySupplierCode`,
params
})
}
}
// 查询采购收货记录子列表
export const getPurchasereceiptRecordDetailList = async (params) => {
return await request.get({ url: `/wms/purchasereceipt-record-detail/list`, params })
return await request.get({ url: `/wms/purchasereceipt-record-detail/list`, params })
}
// 查询采购收货记录子列表
export const getPurchasereceiptRecordDetailListToRepeat = async (params) => {
return await request.get({ url: `/wms/purchasereceipt-record-detail/listToRepeatPurchaseReceipt`, params })
return await request.get({
url: `/wms/purchasereceipt-record-detail/listToRepeatPurchaseReceipt`,
params
})
}
// 查询采购收货记录子详情
@ -161,7 +167,7 @@ export const importTemplate = () => {
export const getScarceGoodsDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const data = { ...params }
return await request.post({ url: '/wms/purchaseshortage-detail/senior', data })
} else {
return await request.get({ url: `/wms/purchaseshortage-detail/page`, params })
@ -170,10 +176,19 @@ export const getScarceGoodsDetailPage = async (params) => {
// 查询采购收货记录子包装数据
export const queryPurchaseceiptChildPackingNumber = async (params) => {
return await request.get({ url: `/wms/purchasereceipt-record-detail/pageChildPackingNumber`, params })
return await request.get({
url: `/wms/purchasereceipt-record-detail/pageChildPackingNumber`,
params
})
}
// 查询采购收货缺货记录子包装数据
export const queryPurchaseshortageChildPackingNumber = async (params) => {
return await request.get({ url: `/wms/purchaseshortage-detail/pageChildPackingNumber`, params })
}
// 查询采购收货缺货记录子包装数据
export const pageForQ2 = async (params) => {
return await request.get({ url: `/wms/purchasereceipt-record-detail/pageForQ2`, params })
}

46
src/views/qms/inspectionQ2/index.vue

@ -85,8 +85,6 @@ import * as SupplierApi from '@/api/wms/supplier'
import * as ItembasicApi from '@/api/wms/itembasic'
import { useUserStore } from '@/store/modules/user'
import { usePageLoading } from '@/hooks/web/usePageLoading'
const { loadStart, loadDone } = usePageLoading()
const userStore = useUserStore()
defineOptions({ name: 'InspectionQ2' })
@ -121,6 +119,8 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
})
}
})
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
if (formField == 'purchaseReceiptNumber') {
@ -131,12 +131,21 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
if (result.endsWith(',')) {
result = result.substring(0, result.length - 1)
}
setV['purchaseReceiptNumber'] = '123'
setV['purchaseReceiptNumber'] = result
formRef.setValues(setV)
}
if (formField == 'lightItemCode') {
setV['lightItemCode'] = val[0].code
setV['lightItemName'] = val[0].name
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
if (formField == 'costCode') {
setV['costCode'] = val[0].costcentreCode
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
if (formField == 'itemCode') {
@ -213,9 +222,10 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
})
}
})
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
@ -230,7 +240,10 @@ const onChange = (field, e) => {
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) +
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6)
basicFormRef.value.formRef.formModel.remainingAmount = (
parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) -
parseFloat(basicFormRef.value.formRef.formModel.disbursementAmount)
).toFixed(6)
}
if (field == 'claimMultiple') {
basicFormRef.value.formRef.formModel.claimAmount = (
@ -242,12 +255,20 @@ const onChange = (field, e) => {
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) +
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6)
basicFormRef.value.formRef.formModel.remainingAmount = (
parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) -
parseFloat(basicFormRef.value.formRef.formModel.disbursementAmount)
).toFixed(6)
}
if (field == 'otherclaimAmount') {
basicFormRef.value.formRef.formModel.summaryAmount = (
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) +
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6)
basicFormRef.value.formRef.formModel.remainingAmount = (
parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) -
parseFloat(basicFormRef.value.formRef.formModel.disbursementAmount)
).toFixed(6)
}
if (field == 'claimAmount') {
basicFormRef.value.formRef.formModel.summaryAmount = (
@ -416,18 +437,10 @@ const formsSuccess = async (formType, data) => {
return
}
}
if (data.lightQty > data.wmsQty) {
message.error('数量不能大于记录中的收货数量')
return
}
if (data.lightQty == 0) {
message.error('数量不能为0')
return
}
if (data.claimAmount == 0) {
message.error('索赔金额不能为0')
return
}
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
@ -468,18 +481,19 @@ const handleDelete = async (id: number) => {
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
loadStart()
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await Q2Api.exportQ2(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
loadDone()
exportLoading.value = false
}
}

14
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -23,7 +23,10 @@ const userStore = useUserStore()
export const Q2Rules = reactive({
itemCode: [{ required: true, message: '请选择供应商物料代码', trigger: 'change' }],
supplierCode: [{ required: true, message: '请选择供应商代码', trigger: 'change' }],
purchaseReceiptNumber: [{ required: true, message: '请选择采购收货单号', trigger: 'change' }],
purchaseReceiptNumber: [
{ required: true, message: '请选择采购收货单号', trigger: 'change' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
claimTime: [{ required: true, message: '请选择索赔日期', trigger: 'change' }],
lightItemCode: [{ required: true, message: '请选择整灯物料代码', trigger: 'change' }],
lightQty: [{ required: true, message: '请选择整灯数量', trigger: 'change' }],
@ -173,7 +176,7 @@ export const Q2 = useCrudSchemas(
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '采购收货记录', // 查询弹窗标题
searchAllSchemas: PurchasereceiptRecordDetail.allSchemas, // 查询弹窗所需类
searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage, // 查询弹窗所需分页方法
searchPage: PurchasereceiptRecordDetailApi.pageForQ2, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'supplierCode',
@ -433,7 +436,8 @@ export const Q2 = useCrudSchemas(
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
precision: 6,
disabled: true
}
}
},
@ -506,6 +510,9 @@ export const Q2 = useCrudSchemas(
isSearch: false,
isTable: true,
isForm: true,
table: {
width: '120'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
@ -541,6 +548,7 @@ export const Q2 = useCrudSchemas(
field: 'cashierEmail',
sort: 'custom',
isSearch: false,
isTable: false,
table: {
width: '150'
},

Loading…
Cancel
Save