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. 66
      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})
}
// 查询供应商发票明细数据
export const getPoNumberPoLineInfo = async (params) => {
return await request.get({ url: `/wms/supplierinvoice-request-detail/getPoNumberPoLineInfo`, params})
}
// 查询供应商发票申请子详情
export const getSupplierinvoiceRequestDetail = async (id: number) => {
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 {
console.log(searchFormRef.formModel);
const setV = {}
if(formField == 'recordNumber'){
setV['recordNumber'] = val[0]['number']
@ -131,12 +130,32 @@
'billType':searchFormRef.formModel.billType,
'recordNumber':val[0]['number']
}
let orderNoFlag = false;
SupplierinvoiceRequestDetailApi.getPoNumber(params).then(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]
searchFormRef.setValues(setV)
}

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

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

Loading…
Cancel
Save