Browse Source

前端加loading

intex_online20250311
叶佳兴 4 weeks ago
parent
commit
f514a4d424
  1. 36
      src/views/wms/basicDataManage/supplierManage/supplierAddressModelDeli/index.vue

36
src/views/wms/basicDataManage/supplierManage/supplierAddressModelDeli/index.vue

@ -184,16 +184,13 @@ const openForm = (type: string, row?: any) => {
row.shift.push('night')
}
SupplierAddressModelDeli.allSchemas.formSchema.forEach((item) => {
// if(item.field == 'supplierCode'){
// item.componentProps.disabled = true
// }
if (item.field == 'supplierCode') {
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
if(item.field == 'supplierName'){
item.componentProps.disabled = true
}
// if(item.field == 'supplierName'){
// item.componentProps.disabled = true
// }
if(item.field == 'supplierAddress'){
item.componentProps.disabled = true
}
@ -210,7 +207,7 @@ const openForm = (type: string, row?: any) => {
item.componentProps.disabled = false
}
if(item.field == 'supplierName'){
item.componentProps.disabled = false
item.componentProps.disabled = true
}
if(item.field == 'supplierAddress'){
item.componentProps.disabled = true
@ -231,18 +228,21 @@ const formsSuccess = async (formType, dataParams) => {
data.isNight = data.shift.some(item => item === 'night') ? 'TRUE' :'FALSE'
data.model = data.modelShow.join(',')
delete data.shift
if (formType === 'create') {
basicFormRef.value.formLoading = true
await SupplierAddressModelDeliApi.createSupplierAddressModelDeli(data)
message.success(t('common.createSuccess'))
} else {
basicFormRef.value.formLoading = true
await SupplierAddressModelDeliApi.updateSupplierAddressModelDeli(data)
message.success(t('common.updateSuccess'))
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await SupplierAddressModelDeliApi.createSupplierAddressModelDeli(data)
message.success(t('common.createSuccess'))
} else {
await SupplierAddressModelDeliApi.updateSupplierAddressModelDeli(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
}
/** 详情操作 */

Loading…
Cancel
Save