Browse Source

供应商发票修改

master_hella_20240701
zhaoxuebing 8 months ago
parent
commit
0b14078e61
  1. 6
      src/api/wms/supplierinvoiceRequestDetail/index.ts
  2. 25
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  3. 60
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

6
src/api/wms/supplierinvoiceRequestDetail/index.ts

@ -39,6 +39,12 @@ export const getPoNumber = async (params) => {
return await request.get({ url: `/wms/supplierinvoice-request-detail/getPoNumber`, params}) return await request.get({ url: `/wms/supplierinvoice-request-detail/getPoNumber`, params})
} }
// 查询供应商发票明细数据
export const getPoNumberPoLineInfo = async (params) => {
return await request.get({ url: `/wms/supplierinvoice-request-detail/getPoNumberPoLineInfo`, params})
}
// 查询供应商发票申请子详情 // 查询供应商发票申请子详情
export const getSupplierinvoiceRequestDetail = async (id: number) => { export const getSupplierinvoiceRequestDetail = async (id: number) => {
return await request.get({ url: `/wms/supplierinvoice-request-detail/get?id=` + id }) return await request.get({ url: `/wms/supplierinvoice-request-detail/get?id=` + id })

25
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -122,7 +122,6 @@
} }
} else { } else {
console.log(searchFormRef.formModel); console.log(searchFormRef.formModel);
const setV = {} const setV = {}
if(formField == 'recordNumber'){ if(formField == 'recordNumber'){
setV['recordNumber'] = val[0]['number'] setV['recordNumber'] = val[0]['number']
@ -131,12 +130,32 @@
'billType':searchFormRef.formModel.billType, 'billType':searchFormRef.formModel.billType,
'recordNumber':val[0]['number'] 'recordNumber':val[0]['number']
} }
let orderNoFlag = false;
SupplierinvoiceRequestDetailApi.getPoNumber(params).then(res =>{ SupplierinvoiceRequestDetailApi.getPoNumber(params).then(res =>{
console.log("返回结果:",res) console.log("返回结果:",res)
if(res.length == 0){
orderNoFlag = true
return
}
let options = [];
for(let i=0;i<res.length;i++){
let option = {
label:res[i],
value:res[i]
}
options.push(option)
}
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach(item => {
if (item.field == 'poNumber') {
item.componentProps.options = options
}
}) })
})
if(orderNoFlag){
message.error("选择的记录单号没有订单")
return;
}
} }
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
searchFormRef.setValues(setV) searchFormRef.setValues(setV)
} }

60
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -235,12 +235,12 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
form: { form: {
component: 'Select', component: 'Select',
componentProps:{ componentProps:{
options:[{lablel:'',value:''}] options:[{label:'',value:''}]
} }
}, },
tableForm: { tableForm: {
type: 'Select', type: 'Select',
options:[{lablel:'',value:''}] options:[{label:'',value:''}]
} }
}, },
{ {
@ -561,12 +561,8 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
}, },
}, },
{ {
label: '订单号', label: '订单行',
field: 'poNumber', field: 'poLine',
sort: 'custom',
table: {
width: 150
},
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
@ -575,7 +571,27 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
searchField: 'number', searchField: 'number',
searchTitle: '订单号信息', searchTitle: '订单号信息',
searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas, searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumber searchPage: supplierinvoiceRequestDetailApi.getPoNumberPoLineInfo,
searchCondition: [
{
key: 'recordNumber',
value: 'recordNumber',
message: '请填写单号!',
isMainValue: true
},
{
key: 'billType',
value: 'billType',
message: '请填写单号类型!',
isMainValue: true
},
{
key: 'poNumber',
value: 'poNumber',
message: '请选择订单号',
isMainValue: true
}
]
} }
}, },
tableForm: { tableForm: {
@ -584,33 +600,27 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
searchField: 'number', searchField: 'number',
searchTitle: '订单号信息', searchTitle: '订单号信息',
searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas, searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumber, searchPage: supplierinvoiceRequestDetailApi.getPoNumberPoLineInfo,
searchCondition: [ searchCondition: [
{ {
key: 'number', key: 'recordNumber',
value: 'recordNumber', value: 'recordNumber',
message: '请填写单号!', message: '请填写单号!',
isMainValue: true isMainValue: true
} },
,
{ {
key: 'recordType', key: 'billType',
value: 'recordType', value: 'billType',
message: '请填写单号类型!', message: '请填写单号类型!',
isMainValue: true isMainValue: true
}]
}
}, },
{ {
label: '订单行', key: 'poNumber',
field: 'poLine', value: 'poNumber',
form: { message: '请选择订单号',
componentProps: { isMainValue: true
disabled: true
} }
}, ]
tableForm: {
disabled: true
} }
}, },
{ {

Loading…
Cancel
Save