Browse Source

基础数据管理--添加loading

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save