Browse Source

YT-1435pc和pda端所有点击都需要增加loading

intex_20241211
张立 2 months ago
parent
commit
e90455f0ae
  1. 25
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue
  2. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

25
src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue

@ -39,11 +39,8 @@
</Table> </Table>
</ContentWrap> </ContentWrap>
<!-- :vLoading="formLoadingPlan" --> <!-- :vLoading="formLoadingPlan" -->
<Dialog title="预览要货计划" <Dialog title="预览要货计划" v-model="dialogVisiblePlan" width="80%" :close-on-click-modal="false" >
v-model="dialogVisiblePlan" <div v-loading="formLoadingPlan">
width="80%"
:close-on-click-modal="false"
>
<Table <Table
ref="tablePlanRef" ref="tablePlanRef"
:selection="true" :selection="true"
@ -55,13 +52,15 @@
v-model:sort="tableObjectPlan.sort" v-model:sort="tableObjectPlan.sort"
@getSelectionRows="getSelectionRowsPlan" @getSelectionRows="getSelectionRowsPlan"
/> />
<template #footer> <div style="padding-top: 20px;text-align: right;">
<slot name="foorter"></slot> <slot name="foorter"></slot>
<ButtonBase :Butttondata="[ <ButtonBase :Butttondata="[
defaultButtons.formSaveBtn(null), // defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) // defaultButtons.formCloseBtn(null) //
]" @button-base-click="buttonBaseClickPlan" /> ]"
</template> @button-base-click="buttonBaseClickPlan" />
</div>
</div>
</Dialog> </Dialog>
@ -94,7 +93,7 @@ const updataTableColumns = (val) => {
orginTableColumns.value = val orginTableColumns.value = val
} }
const formLoadingPlan = ref(false)
// //
const searchQueryTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchQueryTableSuccess = (formField, searchField, val, formRef, type, row ) => {
@ -292,7 +291,8 @@ const handlePreviewPlan = async ()=>{
const buttonBaseClickPlan = async (val)=>{ const buttonBaseClickPlan = async (val)=>{
if (val == 'save') { if (val == 'save') {
// //
dialogVisiblePlan.value = false formLoadingPlan.value =true
try {
let rows: any = [] let rows: any = []
selectionPlanRows.value.forEach((item) => { selectionPlanRows.value.forEach((item) => {
rows = [...rows, ...item.selectionRows.map((item1) => item1.id)] rows = [...rows, ...item.selectionRows.map((item1) => item1.id)]
@ -302,7 +302,12 @@ const buttonBaseClickPlan = async (val)=>{
let res = await DemandforecastingDetailApi.generateOrderPlan(rows) let res = await DemandforecastingDetailApi.generateOrderPlan(rows)
message.success(t('common.submitSuccess')) message.success(t('common.submitSuccess'))
buttonBaseClick('refresh', null) buttonBaseClick('refresh', null)
dialogVisiblePlan.value = false
console.log('保存',res) console.log('保存',res)
} finally {
formLoadingPlan.value =false
}
} }
// //
else if (val == 'close') { else if (val == 'close') {

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -1201,7 +1201,7 @@ const labelPrint = async (row) => {
// //
const { getList: getListPrint } = tableMethods const { getList: getListPrint } = tableMethods
getListPrint() await getListPrint()
tableObject.loading = false tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => { tableColumns.forEach((item) => {

Loading…
Cancel
Save