|
|
@ -293,6 +293,14 @@ const basicFormFooter = computed(()=>{ |
|
|
|
}) |
|
|
|
|
|
|
|
} 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 = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
searchFormRef.setValues(setV) |
|
|
@ -474,11 +482,19 @@ const handleImport = () => { |
|
|
|
const formRef = ref() |
|
|
|
const openForm = async (type : string, row ?: number) => { |
|
|
|
if(type=='update'){ |
|
|
|
//编辑 |
|
|
|
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
// 供应商代码 |
|
|
|
if(item.field == 'supplierCode'){ |
|
|
|
item.componentProps.isSearchList = false |
|
|
|
item.componentProps.disabled = true |
|
|
|
} |
|
|
|
// 订单类型 |
|
|
|
if(item.field == 'orderType'){ |
|
|
|
item.componentProps.disabled = true |
|
|
|
} |
|
|
|
if(row.status=='1'){ |
|
|
|
// 根据状态判断 |
|
|
|
if(row.status=='1'||row.status=='6'){ |
|
|
|
if(item.field == 'procurementCreator'){ |
|
|
|
// 采购价格审批人 |
|
|
|
item.componentProps.disabled = false |
|
|
@ -487,13 +503,53 @@ const handleImport = () => { |
|
|
|
// 税率 |
|
|
|
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{ |
|
|
|
// 采购价格审批人 |
|
|
|
if(item.field == 'procurementCreator'){ |
|
|
|
// 采购价格审批人 |
|
|
|
item.componentProps.disabled = true |
|
|
|
} |
|
|
|
// 税率 |
|
|
|
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 |
|
|
|
} |
|
|
|
} |
|
|
@ -501,20 +557,47 @@ const handleImport = () => { |
|
|
|
}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
// 新增 |
|
|
|
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
if(item.field == 'orderType'){ |
|
|
|
item.componentProps.disabled = false |
|
|
|
} |
|
|
|
|
|
|
|
// 供应商代码 |
|
|
|
if(item.field == 'supplierCode'){ |
|
|
|
//默认供应商代码 |
|
|
|
item.value = defaultSupplierCode.value |
|
|
|
item.componentProps.isSearchList = true |
|
|
|
item.componentProps.disabled = false |
|
|
|
} |
|
|
|
// 订单类型 |
|
|
|
if(item.field == 'orderType'){ |
|
|
|
item.componentProps.disabled = false |
|
|
|
} |
|
|
|
|
|
|
|
//采购价格审批人 |
|
|
|
if(item.field == 'procurementCreator'){ |
|
|
|
//采购价格审批人 |
|
|
|
item.componentProps.disabled = false |
|
|
|
} |
|
|
|
// 税率 |
|
|
|
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 |
|
|
|
} |
|
|
|
}) |
|
|
@ -902,10 +985,10 @@ const handleImport = () => { |
|
|
|
message.warning(t('ts.请添明细数据')) |
|
|
|
return; |
|
|
|
} |
|
|
|
if(data.subList.length > 999){ |
|
|
|
message.warning(t('ts.明细数据条数已超过最大数量限制【999条】')) |
|
|
|
return; |
|
|
|
} |
|
|
|
// if(data.subList.length > 999){ |
|
|
|
// message.warning(t('ts.明细数据条数已超过最大数量限制【999条】')) |
|
|
|
// return; |
|
|
|
// } |
|
|
|
await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
|