|
|
@@ -36,13 +36,15 @@
|
|
|
</div>
|
|
|
<div class="fixed__btn__panel">
|
|
|
<el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
|
|
|
- <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width" :loading="loading" :disabled="selectData.length == 0">确 定</el-button>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {mapGetters} from "vuex";
|
|
|
+
|
|
|
export default {
|
|
|
name: "add",
|
|
|
props:['status'],
|
|
|
@@ -67,6 +69,11 @@ export default {
|
|
|
selectData:[]
|
|
|
}
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ ...mapGetters({
|
|
|
+ loading:'loading'
|
|
|
+ })
|
|
|
+ },
|
|
|
methods:{
|
|
|
addShow(){
|
|
|
this.drawerVisible = true
|
|
|
@@ -101,6 +108,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
async onSubmit(){
|
|
|
+ this.$store.commit('setLoading',true)
|
|
|
const res = await this.$api.requested({
|
|
|
"id": 20240111131204,
|
|
|
"content": {
|
|
|
@@ -108,6 +116,7 @@ export default {
|
|
|
"hrcashbilldetail": this.selectData
|
|
|
}
|
|
|
})
|
|
|
+ this.$store.commit('setLoading',false)
|
|
|
this.tool.showMessage(res,() => {
|
|
|
this.drawerVisible = false
|
|
|
this.$emit('onSuccess')
|