| | |
| | | |
| | | const app = getApp() |
| | | let $api = require('../../../utils/ajaxFn.js') |
| | | let validator = require('../../../utils/validator.js') |
| | | Page({ |
| | | data: { |
| | | isBoss: true, |
| | |
| | | this.setData({ |
| | | info: { ...this.data.info, ...obj } |
| | | }) |
| | | console.log(this.data.info) |
| | | if (code == 1) { |
| | | if (!this.data.info.amt || !this.data.info.prodId || !this.data.info.term || !this.data.info.zfbVersion) { |
| | | this.setData({ |
| | |
| | | ] |
| | | }) |
| | | this.getList({ prodId: this.data.info.prodId }) |
| | | console.log(this.data.info.amt, this.data.info.prodId, this.data.info.term, this.data.info.zfbVersion) |
| | | if (!this.data.info.amt || !this.data.info.prodId || !this.data.info.term || !this.data.info.zfbVersion) { |
| | | this.setData({ |
| | | isBoss: false |
| | |
| | | termName: this.data.termsList[e.detail.value].name, |
| | | 'info.term': this.data.termsList[e.detail.value].code |
| | | }) |
| | | console.log(this.data.info.amt, this.data.info.prodId, this.data.info.term, this.data.info.zfbVersion) |
| | | if (!this.data.info.amt || !this.data.info.prodId || !this.data.info.term || !this.data.info.zfbVersion) { |
| | | this.setData({ |
| | | isBoss: false |
| | |
| | | { name: '支付利率', rate: 0 } |
| | | ] |
| | | }) |
| | | console.log(this.data.info.amt, this.data.info.prodId, this.data.info.term, this.data.info.zfbVersion) |
| | | this.getList({ prodId: this.data.info.prodId, zfbVersion: this.data.info.zfbVersion }) |
| | | if (!this.data.info.amt || !this.data.info.prodId || !this.data.info.term || !this.data.info.zfbVersion) { |
| | | this.setData({ |
| | |
| | | this.setData({ |
| | | 'info.payType': 2 |
| | | }) |
| | | for (let key in this.data.info) { |
| | | if (!this.data.info[key]) { |
| | | let info = this.data.info |
| | | if (!validator.checkbdMoney(info.amt)||info.amt==0) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请完整输入信息', |
| | | content: '请输入0.01-100000之间分期本金', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | if (validator.checkValEmpty(info.goodsName)) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请输入商品名称', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | if (validator.checkValEmpty(info.prodId)) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请选择付息方式', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | if (validator.checkValEmpty(info.zfbVersion)) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请选择办单通道', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | if (validator.checkValEmpty(info.term)) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请选择分期期数', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | if (validator.checkValEmpty(info.userName)) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请输入客户姓名', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | if (validator.checkValEmpty(info.userMblNo)) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请输入客户手机号', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | my.scan({ |
| | | scanType: ['qrCode', 'barCode'], |
| | |
| | | this.setData({ |
| | | 'info.payType': 1 |
| | | }) |
| | | for (let key in this.data.info) { |
| | | if (!this.data.info[key]) { |
| | | // for (let key in this.data.info) { |
| | | // if (!this.data.info[key]) { |
| | | // my.showToast({ |
| | | // type: 'none', |
| | | // content: '请完整输入信息', |
| | | // duration: 2000, |
| | | // }); |
| | | // return |
| | | // } |
| | | // } |
| | | let info = this.data.info |
| | | if (!validator.checkbdMoney(info.amt)||info.amt==0) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请完整输入信息', |
| | | content: '请输入0.01-100000之间分期本金', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | if (validator.checkValEmpty(info.goodsName)) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请输入商品名称', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | if (validator.checkValEmpty(info.prodId)) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请选择付息方式', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | if (validator.checkValEmpty(info.zfbVersion)) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请选择办单通道', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | if (validator.checkValEmpty(info.term)) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请选择分期期数', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | if (validator.checkValEmpty(info.userName)) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请输入客户姓名', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | if (validator.checkValEmpty(info.userMblNo)) { |
| | | my.showToast({ |
| | | type: 'none', |
| | | content: '请输入客户手机号', |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | let str = JSON.stringify(this.data.info) |
| | | my.navigateTo({ |