Commit f3a98ba2 by wangzhihui

bug修复

1 parent 42ec7ac9
......@@ -47,7 +47,8 @@ import {
Empty,
PullRefresh,
Picker,
Dialog
Dialog,
Loading
} from 'vant'
export const components = [
Button,
......@@ -87,5 +88,6 @@ export const components = [
Empty,
PullRefresh,
Picker,
Dialog
Dialog,
Loading
]
<!--
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-11-19 16:39:10
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-11-21 16:02:32
* @FilePath: \wx-notification\src\views\purchase\components\approveComp.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<h-dialog ref="myDialog" :title="title" :isVisible="isVisible" @confirm="handleSubmit" @cancel="handleCancel">
<div class="formObj">
......@@ -36,6 +29,7 @@ export default {
components: { hDialog, sendOutComp },
data() {
return {
isSubmit:false,
name: this.$route.query.name,
staffType: this.$route.query.staffType,
sendOutVisible: false,
......@@ -43,7 +37,7 @@ export default {
approveForm: {
remark: '',
sendOutMerchantId: '',
sendOutMerchantName: '深圳广联赛讯股份有限公司'
sendOutMerchantName: ''
}
}
},
......@@ -77,7 +71,9 @@ export default {
this.handleSendCancel()
},
initData(val) {
this.approveForm.sendOutMerchantName = val.sendOutMerchantName
console.log(1111)
console.log('val', val.sendOutMerchantName)
this.approveForm.sendOutMerchantName = val.sendOutMerchantName? val.sendOutMerchantName:''
this.approveForm.sendOutMerchantId = val.sendOutMerchantId
},
handleSelect() {
......@@ -115,6 +111,7 @@ export default {
return
}
try {
this.isSubmit = true
this.$refs.myDialog.startLoading()
const params = {
......@@ -133,20 +130,21 @@ export default {
if (result.code == 0) {
Toast.success('操作成功')
setTimeout(() => {
this.isSubmit = false
this.$refs.myDialog.stopLoading()
this.handleCancel()
this.$emit('success')
}, 500)
}, 0)
} else {
this.$refs.myDialog.stopLoading()
Toast.fail(result.message || '请求失败')
}
} catch (error) {
this.isSubmit = false
this.$refs.myDialog.stopLoading()
Toast.fail('系统异常,请稍后再试')
console.error(error)
}
// this.$refs.myDialog.stopLoading();
},
handleCancel() {
this.$emit('cancel')
......
......@@ -9,7 +9,8 @@
:close-on-click-overlay="false"
>
<div class="title">{{ title }}</div>
<div class="content">
<div v-if="!loading">
<div class="content">
<slot></slot>
</div>
<div class="btn-group">
......@@ -22,6 +23,13 @@
{{ loading ? '提交中...' : '确定' }}
</div>
</div>
</div>
<template v-else>
<div class="loading-home">
<van-loading size="50" color="#1989fa" />
</div>
</template>
</van-popup>
</template>
......@@ -133,5 +141,12 @@ export default {
margin-left: 11px;
}
}
.loading-home{
position:absolute;
left:50%;
top:50%;
transform:translate(-50%,-50%);
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!