Browse Source

基础数据管理--添加loading

hella_online_20240829
wangyufei 2 months ago
parent
commit
0d7a290bd1
  1. 6
      src/views/wms/agvManage/agvLocationrelation/index.vue
  2. 8
      src/views/wms/basicDataManage/documentSetting/businesstype/index.vue
  3. 5
      src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue
  4. 5
      src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue
  5. 7
      src/views/wms/basicDataManage/documentSetting/plansetting/index.vue
  6. 6
      src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue
  7. 6
      src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue
  8. 8
      src/views/wms/basicDataManage/documentSetting/switch/index.vue
  9. 7
      src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue
  10. 6
      src/views/wms/basicDataManage/labelManage/barcode/index.vue
  11. 6
      src/views/wms/basicDataManage/labelManage/callmaterials/index.vue
  12. 5
      src/views/wms/basicDataManage/labelManage/labeltype/index.vue
  13. 6
      src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue
  14. 6
      src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue
  15. 6
      src/views/wms/basicDataManage/orderManage/carrier/index.vue
  16. 7
      src/views/wms/basicDataManage/orderManage/owner/index.vue
  17. 6
      src/views/wms/basicDataManage/orderManage/shift/index.vue
  18. 6
      src/views/wms/basicDataManage/subject/mstr/index.vue
  19. 7
      src/views/wms/basicDataManage/subject/qadCostcentre/index.vue
  20. 7
      src/views/wms/basicDataManage/subject/qadProject/index.vue
  21. 7
      src/views/wms/basicDataManage/subject/subjectAccount/index.vue
  22. 7
      src/views/wms/buttMesManage/mesBarCode/index.vue

6
src/views/wms/agvManage/agvLocationrelation/index.vue

@ -188,6 +188,9 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await AgvLocationrelationApi.createAgvLocationrelation(data)
message.success(t('common.createSuccess'))
@ -195,6 +198,9 @@ const formsSuccess = async (formType,data) => {
await AgvLocationrelationApi.updateAgvLocationrelation(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

8
src/views/wms/basicDataManage/documentSetting/businesstype/index.vue

@ -264,7 +264,7 @@ const formsSuccess = async (formType, submitData) => {
data.inInventoryStatuses = data.inInventoryStatuses.join(',')
}
basicFormRef.value.formLoading = true
if (formType === 'create') {
await BusinesstypeApi.createBusinesstype(data)
.then(async () => {
@ -279,6 +279,9 @@ const formsSuccess = async (formType, submitData) => {
data.outInventoryStatuses = data.outInventoryStatuses.split(',')
data.inInventoryStatuses = data.inInventoryStatuses.split(',')
})
.finally(()=>{
basicFormRef.value.formLoading = false
})
} else {
await BusinesstypeApi.updateBusinesstype(data)
.then(async () => {
@ -293,6 +296,9 @@ const formsSuccess = async (formType, submitData) => {
data.outInventoryStatuses = data.outInventoryStatuses.split(',')
data.inInventoryStatuses = data.inInventoryStatuses.split(',')
})
.finally(()=>{
basicFormRef.value.formLoading = false
})
}
}

5
src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue

@ -163,6 +163,8 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await DocumentsettingApi.createDocumentsetting(data)
message.success(t('common.createSuccess'))
@ -170,6 +172,9 @@ const formsSuccess = async (formType,data) => {
await DocumentsettingApi.updateDocumentsetting(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

5
src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue

@ -163,6 +163,8 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await JobsettingApi.createJobsetting(data)
message.success(t('common.createSuccess'))
@ -170,6 +172,9 @@ const formsSuccess = async (formType,data) => {
await JobsettingApi.updateJobsetting(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

7
src/views/wms/basicDataManage/documentSetting/plansetting/index.vue

@ -162,6 +162,9 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await PlansettingApi.createPlansetting(data)
message.success(t('common.createSuccess'))
@ -169,6 +172,10 @@ const formsSuccess = async (formType,data) => {
await PlansettingApi.updatePlansetting(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

6
src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue

@ -163,6 +163,9 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await RecordsettingApi.createRecordsetting(data)
message.success(t('common.createSuccess'))
@ -170,6 +173,9 @@ const formsSuccess = async (formType,data) => {
await RecordsettingApi.updateRecordsetting(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

6
src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue

@ -163,6 +163,9 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await RequestsettingApi.createRequestsetting(data)
message.success(t('common.createSuccess'))
@ -170,6 +173,9 @@ const formsSuccess = async (formType,data) => {
await RequestsettingApi.updateRequestsetting(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

8
src/views/wms/basicDataManage/documentSetting/switch/index.vue

@ -222,6 +222,8 @@ const searchFormClick = (searchData) => {
getList() //
}
const success = async (formType, data) => {
basicFormRef.value.formLoading = true
try{
const res = await SwitchApi.updateSwitch(data)
if(true===res){
message.success(t('common.updateSuccess'))
@ -229,6 +231,12 @@ const success = async (formType, data) => {
}else{
message.error('修改失败')
}
} finally {
basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false
}
}
/** 初始化 **/

7
src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue

@ -163,6 +163,9 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await TransactiontypeApi.createTransactiontype(data)
message.success(t('common.createSuccess'))
@ -170,6 +173,10 @@ const formsSuccess = async (formType,data) => {
await TransactiontypeApi.updateTransactiontype(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

6
src/views/wms/basicDataManage/labelManage/barcode/index.vue

@ -167,6 +167,9 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await BarcodeApi.createBarcode(data)
message.success(t('common.createSuccess'))
@ -174,6 +177,9 @@ const formsSuccess = async (formType,data) => {
await BarcodeApi.updateBarcode(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

6
src/views/wms/basicDataManage/labelManage/callmaterials/index.vue

@ -235,6 +235,8 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await CallmaterialsApi.createCallmaterials(data)
message.success(t('common.createSuccess'))
@ -242,6 +244,10 @@ const formsSuccess = async (formType,data) => {
await CallmaterialsApi.updateCallmaterials(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

5
src/views/wms/basicDataManage/labelManage/labeltype/index.vue

@ -170,6 +170,8 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = true
try{
if (formType === 'create') {
await LabeltypeApi.createLabeltype(data)
message.success(t('common.createSuccess'))
@ -177,6 +179,9 @@ const formsSuccess = async (formType,data) => {
await LabeltypeApi.updateLabeltype(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

6
src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue

@ -288,6 +288,8 @@ const handlePoint = async (row) => {
// form
const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await PackageApi.createPackageLabel(data)
message.success(t('common.createSuccess'))
@ -295,6 +297,10 @@ const formsSuccess = async (formType,data) => {
await PackageApi.updatePackage(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

6
src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue

@ -284,6 +284,8 @@ const handlePoint = async (row) => {
// form
const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await PackageApi.createPackageLabel(data)
message.success(t('common.createSuccess'))
@ -291,6 +293,10 @@ const formsSuccess = async (formType,data) => {
await PackageApi.updatePackage(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

6
src/views/wms/basicDataManage/orderManage/carrier/index.vue

@ -182,6 +182,9 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await CarrierApi.createCarrier(data)
message.success(t('common.createSuccess'))
@ -189,6 +192,9 @@ const formsSuccess = async (formType,data) => {
await CarrierApi.updateCarrier(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

7
src/views/wms/basicDataManage/orderManage/owner/index.vue

@ -182,6 +182,9 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await OwnerApi.createOwner(data)
message.success(t('common.createSuccess'))
@ -189,6 +192,10 @@ const formsSuccess = async (formType,data) => {
await OwnerApi.updateOwner(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

6
src/views/wms/basicDataManage/orderManage/shift/index.vue

@ -189,6 +189,9 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try{
if (formType === 'create') {
await ShiftApi.createShift(data)
message.success(t('common.createSuccess'))
@ -196,6 +199,9 @@ const formsSuccess = async (formType,data) => {
await ShiftApi.updateShift(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

6
src/views/wms/basicDataManage/subject/mstr/index.vue

@ -157,6 +157,8 @@ const formsSuccess = async (formType,data) => {
var isHave =Mstr.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await MstrApi.createMstr(data)
message.success(t('common.createSuccess'))
@ -164,6 +166,10 @@ const formsSuccess = async (formType,data) => {
await MstrApi.updateMstr(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

7
src/views/wms/basicDataManage/subject/qadCostcentre/index.vue

@ -165,6 +165,9 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await QadCostcentreApi.createQadCostcentre(data)
message.success(t('common.createSuccess'))
@ -172,6 +175,10 @@ const formsSuccess = async (formType,data) => {
await QadCostcentreApi.updateQadCostcentre(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

7
src/views/wms/basicDataManage/subject/qadProject/index.vue

@ -165,6 +165,9 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await QadProjectApi.createQadProject(data)
message.success(t('common.createSuccess'))
@ -172,6 +175,10 @@ const formsSuccess = async (formType,data) => {
await QadProjectApi.updateQadProject(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

7
src/views/wms/basicDataManage/subject/subjectAccount/index.vue

@ -174,6 +174,9 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await SubjectAccountApi.createSubjectAccount(data)
message.success(t('common.createSuccess'))
@ -181,6 +184,10 @@ const formsSuccess = async (formType,data) => {
await SubjectAccountApi.updateSubjectAccount(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

7
src/views/wms/buttMesManage/mesBarCode/index.vue

@ -154,6 +154,9 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = true
try {
if (formType === 'create') {
await MesBarCodeApi.createMesBarCode(data)
message.success(t('common.createSuccess'))
@ -161,6 +164,10 @@ const formsSuccess = async (formType,data) => {
await MesBarCodeApi.updateMesBarCode(data)
message.success(t('common.updateSuccess'))
}
} finally {
basicFormRef.value.formLoading = false
}
basicFormRef.value.dialogVisible = false
getList()
}

Loading…
Cancel
Save