浏览代码

调整补交模拟接口,调整补交操作按钮开启弹窗的方式

master
ys001 3 年前
父节点
当前提交
5dab18d087
共有 2 个文件被更改,包括 86 次插入39 次删除
  1. 20
    0
      src/mock/fcc/resubmissions.js
  2. 66
    39
      src/views/fancongcong/addsupplyCardBalance/addsupplyCardBalance.vue

+ 20
- 0
src/mock/fcc/resubmissions.js 查看文件

} }
}) })


Mock.mock(/\/csms\/finance\/balancepayment\/payment/, "post", (options) => {
console.log("ope", options);
//var pageNo = getparams(options.body, 'pageNo');
var pageSize = getparams(options.body, 'pageSize');
//console.log(pagenum, pagesize)
return {
code: 200,
message: '请求列表成功!',
data: {
currentPage: 1,
pageCount: 15,
pageSize: 1,
totalCount: 15,
cardBalance:card.cardBalance,
cardId: '',
handleTime: ''
}
}
})



const getparams = (option, agrument) => { const getparams = (option, agrument) => {
//console.log(JSON.parse(option)) //console.log(JSON.parse(option))

+ 66
- 39
src/views/fancongcong/addsupplyCardBalance/addsupplyCardBalance.vue 查看文件

<el-table-column prop="cardchannel" label="卡片所属渠道" /> <el-table-column prop="cardchannel" label="卡片所属渠道" />
<el-table-column label="操作" class="table_btn" width="600px" align="center"> <el-table-column label="操作" class="table_btn" width="600px" align="center">
<template v-slot="scope"> <template v-slot="scope">
<el-tooltip content="卡账正常" placement="top" v-if="scope.row.fee >= 0">
<el-tooltip content="卡账正常" placement="top" v-if="cardBalance >= 0">
<el-button type="primary" disabled>卡账正常</el-button> <el-button type="primary" disabled>卡账正常</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="全额补交" placement="top" v-if="scope.row.fee < 0">
<el-tooltip content="全额补交" placement="top" v-if="cardBalance < 0">
<el-button type="primary" @click="allBanner">全额补交</el-button> <el-button type="primary" @click="allBanner">全额补交</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="补交明细" placement="top"> <el-tooltip content="补交明细" placement="top">
<el-button type="primary" @click="dialogFormVisibles = true">补交明细</el-button>
<el-button type="primary" @click="getquerydetails(scope.row)">补交明细</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="卡帐名细" placement="top"> <el-tooltip content="卡帐名细" placement="top">
<el-button type="primary" @click="dialogFormVisible = true">卡帐名细</el-button> <el-button type="primary" @click="dialogFormVisible = true">卡帐名细</el-button>
</el-table> </el-table>


<div class="page_box"> <div class="page_box">
<el-pagination
:page-count="pageCount"
:current-page="pageNo"
layout="prev, pager, next"
@update:current-page="pagechange"
/>
<el-pagination :page-count="pageCount" :current-page="pageNo" layout="prev, pager, next"
@update:current-page="pagechange" />
</div> </div>


<el-dialog v-model="dialogFormVisible" title="卡账明细"> <el-dialog v-model="dialogFormVisible" title="卡账明细">
</span> </span>
</template> </template>
</el-dialog> </el-dialog>


</div> </div>
</template> </template>


}, },
] ]
const tableData = ref([ const tableData = ref([
{
date: '52011750220200003674',
name: '100.00',
address: '安顺市顺安防雷安全检测站平坝分站',
number: '黔通',
time: '2021-06-22T12:52:17',
type: '已启用',
regname: 'xn18096012008',
regtime: '2021-06-23T15:08:39',
},

]) ])
const CardDetil = [ const CardDetil = [
{ {
Money: '0.0元', //金额 Money: '0.0元', //金额
}, },
] ]
let cardBalance = ref(-1)


//事件处理 //事件处理
const onSubmit = () => { const onSubmit = () => {
baseURL: 'http://localhost:8085', baseURL: 'http://localhost:8085',
}) })
.then((res: any) => { .then((res: any) => {
console.log("卡账",res.data.data.cardBalance)
console.log("卡账", res.data.data.cardBalance)
if (res.data.code == 200) { if (res.data.code == 200) {
if(res.data.data.cardBalance <0 ){
proxy.$request
.post('/csms/finance/balancepayment/querydetails/', data, {
baseURL: 'http://localhost:8085',
})
.then((res: any) => {
console.log(res)
if (res.data.code == 200) {
tableData.value = res.data.data.result
pageCount.value = parseInt(res.data.data.pageCount)
}
})
.catch((err: any) => {
console.log(err)
})
}else{
cardBalance.value = res.data.data.cardBalance;
if (res.data.data.cardBalance < 0) {
proxy.$request
.post('/csms/finance/balancepayment/querydetails/', data, {
baseURL: 'http://localhost:8085',
})
.then((res: any) => {
console.log(res)
if (res.data.code == 200) {
tableData.value = res.data.data.result
pageCount.value = parseInt(res.data.data.pageCount)
}
})
.catch((err: any) => {
console.log(err)
})
} else {
ElMessage({ ElMessage({
type: 'success',
message: '该卡不需要补交!',
})
type: 'success',
message: '该卡不需要补交!',
})
} }
} }
}) })
pageNo.value = el pageNo.value = el
search() search()
} }

const getquerydetails = (row) => {
dialogFormVisibles.value = true;
proxy.$request.post('/csms/finance/balancepayment/querydetails/', {}, {
baseURL: 'http://localhost:8085',
})
.then((res: any) => {
console.log(res)
if (res.data.code == 200) {

}
})
.catch((err: any) => {
console.log(err)
})
}

const getquerydetailes =(row)=>{
dialogFormVisible.value = true;
proxy.$request.post('/csms/finance/balancepayment/querydetails/', {}, {
baseURL: 'http://localhost:8085',
})
.then((res: any) => {
console.log(res)
if (res.data.code == 200) {

}
})
.catch((err: any) => {
console.log(err)
})
}



</script> </script>


<style lang="scss"> <style lang="scss">

正在加载...
取消
保存