Browse Source

供应商发票申请--bug

master_hella_20240701
wangyufei 5 months ago
parent
commit
4dfd531b4a
  1. 107
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

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

@ -293,6 +293,14 @@ const basicFormFooter = computed(()=>{
}) })
} else { } else {
//
if(formField=='supplierCode'&&val[0][searchField]!=searchFormRef.formModel.supplierCode){
tableData.value = []
}
//
if(formField=='orderType'&&val[0][searchField]!=searchFormRef.formModel.orderType){
tableData.value = []
}
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
searchFormRef.setValues(setV) searchFormRef.setValues(setV)
@ -474,11 +482,19 @@ const handleImport = () => {
const formRef = ref() const formRef = ref()
const openForm = async (type : string, row ?: number) => { const openForm = async (type : string, row ?: number) => {
if(type=='update'){ if(type=='update'){
//
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => { SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => {
//
if(item.field == 'supplierCode'){
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
//
if(item.field == 'orderType'){ if(item.field == 'orderType'){
item.componentProps.disabled = true item.componentProps.disabled = true
} }
if(row.status=='1'){ //
if(row.status=='1'||row.status=='6'){
if(item.field == 'procurementCreator'){ if(item.field == 'procurementCreator'){
// //
item.componentProps.disabled = false item.componentProps.disabled = false
@ -487,13 +503,53 @@ const handleImport = () => {
// //
item.componentProps.disabled = false item.componentProps.disabled = false
} }
//
if(item.field == 'discountAmount'){
item.componentProps.disabled = false
}
//
if(item.field == 'adjustingTaxAmount'){
item.componentProps.disabled = false
}
//
if(item.field == 'discountAmount1'){
item.componentProps.disabled = false
}
//
if(item.field == 'goldenTaxInvoiceNumber'){
item.componentProps.disabled = false
}
//
if(item.field == 'invoiceTime'){
item.componentProps.disabled = false
}
}else{ }else{
if(item.field == 'procurementCreator'){
// //
if(item.field == 'procurementCreator'){
item.componentProps.disabled = true item.componentProps.disabled = true
} }
if(item.field == 'taxRate'){
// //
if(item.field == 'taxRate'){
item.componentProps.disabled = true
}
//
if(item.field == 'discountAmount'){
item.componentProps.disabled = true
}
//
if(item.field == 'adjustingTaxAmount'){
item.componentProps.disabled = true
}
//
if(item.field == 'discountAmount1'){
item.componentProps.disabled = true
}
//
if(item.field == 'goldenTaxInvoiceNumber'){
item.componentProps.disabled = true
}
//
if(item.field == 'invoiceTime'){
item.componentProps.disabled = true item.componentProps.disabled = true
} }
} }
@ -501,20 +557,47 @@ const handleImport = () => {
}) })
}else{ }else{
//
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => { SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'orderType'){
item.componentProps.disabled = false //
}
if(item.field == 'supplierCode'){ if(item.field == 'supplierCode'){
// //
item.value = defaultSupplierCode.value item.value = defaultSupplierCode.value
item.componentProps.isSearchList = true
item.componentProps.disabled = false
} }
if(item.field == 'procurementCreator'){ //
if(item.field == 'orderType'){
item.componentProps.disabled = false
}
// //
if(item.field == 'procurementCreator'){
item.componentProps.disabled = false item.componentProps.disabled = false
} }
if(item.field == 'taxRate'){
// //
if(item.field == 'taxRate'){
item.componentProps.disabled = false
}
//
if(item.field == 'discountAmount'){
item.componentProps.disabled = false
}
//
if(item.field == 'adjustingTaxAmount'){
item.componentProps.disabled = false
}
//
if(item.field == 'discountAmount1'){
item.componentProps.disabled = false
}
//
if(item.field == 'goldenTaxInvoiceNumber'){
item.componentProps.disabled = false
}
//
if(item.field == 'invoiceTime'){
item.componentProps.disabled = false item.componentProps.disabled = false
} }
}) })
@ -902,10 +985,10 @@ const handleImport = () => {
message.warning(t('ts.请添明细数据')) message.warning(t('ts.请添明细数据'))
return; return;
} }
if(data.subList.length > 999){ // if(data.subList.length > 999){
message.warning(t('ts.明细数据条数已超过最大数量限制【999条】')) // message.warning(t('ts.999'))
return; // return;
} // }
await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data) await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {

Loading…
Cancel
Save