const App = { mixins: [sharedMixin], /////共用的方法///// data() { return { dialogRecord: false, searchData: { page: 1, page_size: 20, kw: '', }, loading: false, list: [], other: {}, recordInfo: {}, dialogVisible_Picture: false, record_id: 0, previewImageUrl: '', assetInfo: { record_id: '', status: '', service_charge: '', review_comments: '',//不通过原因 }, assetRules: { service_charge: [ { required: true, message: '请输入手续费', trigger: 'blur' }, // { pattern: /^(?!0+(?:\.0+)?$)(?:[1-9]\d*|0)(?:\.\d{1,2})?$/, message: '金额必须大于0且仅包含两位小数', trigger: 'blur' } ], }, }; }, mounted() { this.getWithdrawalRecordList(); }, created() { }, methods: { passReviewWithdrawalRecord() { const that = this; this.$refs.assetForm.validate(valid => { if (!valid) { return false; } if (that.assetInfo.service_charge > that.recordInfo.payment_amount) { that.$notify.error({ title: '错误', position: 'top-left', message: '手续费不能大于提现金额' }); return false; } this.reviewWithdrawalRecord(1); }); }, reviewWithdrawalRecord(status) { const that = this; let tips = '' that.assetInfo.record_id = that.record_id that.assetInfo.status = status if (status == 2) { if (that.assetInfo.review_comments == '') { that.$notify.error({ title: '错误', position: 'top-left', message: '请填写不通过原因' }); return false; } } if (status == 1) { tips = '确定通过审核吗?' } else { tips = '确定不通过审核吗?' } that.$confirm( tips, '警告', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', center: true, } ).then(() => { let url = "/admin/withdrawalRecord/reviewWithdrawalRecord.html" postRequest(url, that.assetInfo).then(res => { if (res.data.code == 200) { that.$notify({ title: '成功', message: res.data.message, position: 'top-left', type: 'success', duration: 1000, }); that.dialogRecord = false that.getWithdrawalRecordList(); } else { that.$notify.error({ title: '错误', position: 'top-left', message: res.data.message }); } }); ///////////// }).catch(() => { //取消,不做处理 }) }, showRecord(row) { let that = this; that.dialogRecord = true that.recordInfo = row; that.record_id = row.id that.assetInfo.service_charge = 0 }, ///改变翻页中的每页设置多少条数据/////// handleSizeChange(page_size) { this.searchData.page_size = page_size; this.getWithdrawalRecordList(); }, ///改变翻页中的当前页/////// handleCurrentChange(page) { this.searchData.page = page; this.getWithdrawalRecordList(); }, /////获取品牌列表///// getWithdrawalRecordList() { let that = this; let url = "/admin/withdrawalRecord/getWithdrawalRecordList.html" postRequest(url, that.searchData).then(res => { if (res.data.code == 200) { that.list = res.data.list; that.other = res.data.other; } }); }, } }; const app = Vue.createApp(App); for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component(key, component) } app.use(ElementPlus, { locale: ElementPlusLocaleZhCn, }); app.mount("#vue_item");