| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <view class="task-box" >
- <en-nav :title="title"></en-nav>
- <post-loan-item v-model="postLoan" :showKeys="[]"></post-loan-item>
- <view class="but but-all" @click="setPostLoan">保存</view>
- </view>
- </template>
- <script>
- import EnNav from "@/components/en-utils/en-nav/en-nav";
- import PostLoanItem from "@/pages-task/add-client/new-model/post-loan-item";
- import {setPostLoan} from "@/api/task";
- import tools from "@/common/js/tools";
- export default {
- components: {
- PostLoanItem,
- EnNav,
- },
- data() {
- return {
- title: '完善贷后',
- titleColor: '#fff',
- titleBg: '',
- businessId: '',
- postLoan: {
- 'bank_id':'',
- 'loans_money':'',
- 'interest_rate':'',
- 'repayment_money':'',
- 'refund_num':'',
- 'repayment_type':'1',
- 'repayment_date':'',
- },
- }
- },
- onLoad(data) {
- if (data.id === undefined) {
- this.backEvent();
- } else {
- this.businessId = data.id
- }
- },
- mounted() {
- },
- methods: {
- setPostLoan(){
- setPostLoan({'businessId':this.businessId,'postLoan':this.postLoan}).then((res)=>{
- if(res.code===1){
- tools.success(res.msg)
- uni.$emit('newTaskList')
- uni.$emit('newTaskInfo')
- setTimeout(()=>{
- this.backEvent()
- },1500)
- }else {
- tools.error(res.msg)
- }
- })
- },
- backEvent() {
- uni.navigateBack({
- delta: 1
- })
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .task-box{
- background: #fff;
- .but{
- width: 90%;
- margin: auto;
- border-radius: 8rpx;
- text-align: center;
- height: 88rpx;
- line-height: 88rpx;
- }
- .but-all{
- color: #fff;
- background: #306AFB;
- }
- }
- </style>
|