diff --git a/api/api.js b/api/api.js index 6877e42..7d9d20c 100644 --- a/api/api.js +++ b/api/api.js @@ -290,4 +290,18 @@ export function village(data) { */ export function brigade(data) { return request.get('v2/system/brigade', data, { noAuth: true }); -} \ No newline at end of file +} + +/* + 生产 -- 获取商户保证金信息支付接口 +*/ +export function paymerchant() { + return request.post(`user/margin`,{}); +} + +/* + 生产 -- 获取商户保证金信息接口 +*/ +export function merchant(data) { + return request.get(`store/merchant/margin`, data); +} diff --git a/api/product.js b/api/product.js index bd8caa4..28dcaf2 100644 --- a/api/product.js +++ b/api/product.js @@ -308,6 +308,12 @@ export function business(data) { noAuth: true }); } +/* + 商品 -- 获取交易申请记录 +*/ +export function intention(data) { + return request.get(`intention/lst`, data); +} /* 商品 -- 同意提交申请 diff --git a/api/store.js b/api/store.js index 2a8ae0f..1e3af0d 100644 --- a/api/store.js +++ b/api/store.js @@ -577,6 +577,20 @@ export function vicinityStoreApi(data) { /* 商家入驻 -- 获取商户入驻申请协议内容 */ -export function agreeiness(data) { +export function agreeiness() { return request.get(`business/agree`, data, { noAuth: true }); -} \ No newline at end of file +} + +//测试 +export function dotest() { + return request.get(`dotest`,{}, { noAuth: true }); +} + +/* + 生产 -- 商户保证金信息接口 +*/ +export function merchant() { + return request.get(`store/merchant/margin`, data, { noAuth: true }); +} + + diff --git a/components/payment/index.vue b/components/payment/index.vue index a27272f..552db8d 100644 --- a/components/payment/index.vue +++ b/components/payment/index.vue @@ -108,7 +108,6 @@ type = 'alipayQr'; // #endif } else if (paytype == 'creditBuy') { - console.log('123123'); type = 'creditBuy' } if (!that.order_id) return that.$util.Tips({ @@ -371,6 +370,10 @@ break; // #endif } + + + + }).catch(err => { uni.hideLoading(); return that.$util.Tips({ diff --git a/pages/moreProject/moreProject.vue b/pages/moreProject/moreProject.vue index d4fc247..c75b9c2 100644 --- a/pages/moreProject/moreProject.vue +++ b/pages/moreProject/moreProject.vue @@ -5,6 +5,19 @@ 市级供应链 + + + + + + + + + + 交易申请状态:已通过 + 交易申请状态:已拒绝 + 交易申请状态:待审核 + @@ -54,7 +67,12 @@ 订单核销 - + + + 保证缴纳金 + + @@ -151,7 +183,12 @@ 商户设置 - + + + + 保证缴纳金 + + + 保证缴纳金 + @@ -367,7 +438,96 @@ + + + + + +
+ + 填写信息 + + + + 开户行名称: + + + + + + + + 联系电话: + + + + + + + 开户行: + + + + + + 身份证正面: + + + + + + + + + + + + + + + + + + + + + 银行卡反面: + + + + + + + + + + + + + + + + + + + + + + +
+
+
@@ -381,6 +541,7 @@ } from 'vuex' import { business, + intention, intentionbus } from "@/api/product" import { @@ -396,7 +557,9 @@ Toast } from '@/libs/uniApi'; import { - getDiy + getDiy, + merchant, + paymerchant } from '@/api/api.js' export default { @@ -425,7 +588,23 @@ tagStyle: { img: 'width:100%;display:block;' }, - num: 15 + num: 15, + where: { + type: 2, + page: 1, + limit: 10 + }, + codenote: [], + validate: false, + merchantData: { + bank_username: '', + bank_opening: '', + bank_front: '', + bank_back: '', + cardno_front: '', + cardno_back: '' + }, + }; }, computed: { @@ -443,31 +622,129 @@ } this.getUserInfo() this.list() + this.codelist() + + }, methods: { + //关闭弹窗 + close() { + this.$refs.popup.close() + this.num = 15 + }, + //获取交易信息 + codelist() { + intention(this.where).then(res => { + this.codenote = res.data.list + }) + }, + + decimal() { + merchant({ + id: this.mer_id + }).then((res) => { + this.merchant_Data = res.data + }); + }, + //缴纳保证金 + paydecimal() { + if (this.merchant_Data.is_margin == 2) { + that.$util.Tips({ + title: '用户已提交' + }); + } else { + + + uni.showModal({ + title: '提示', + content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳保证金', + success: function(res) { + if (res.confirm) { + // console.log('用户点击确定'); + paymerchant().then((res) => { + console.log(res.data) + uni.requestPayment({ + provider: 'wxpay', + orderInfo: res.data + .config, //微信、支付宝订单数据 【注意微信的订单信息,键值应该全部是小写,不能采用驼峰命名】 + success: function(res) { + console.log('success:' + JSON.stringify(res)); + }, + fail: function(err) { + console.log('fail:' + JSON.stringify(err)); + } + }); + }).catch((err) => { + console.log(err) + }) + } else if (res.cancel) { + console.log('用户点击取消'); + } + } + }); + + } + + }, + //提交 + formSubmit: function(e) { + let that = this; + if (that.validateForm() && that.validate) { + + that.validate = false; + + intentionbus(that.merchantData).then(res => { + if (res.status == 200) { + this.$refs.popup.close() + that.$util.Tips({ + title: '提交成功' + }); + this.codelist() + that.timer = setTimeout(() => { + that.successful = true; + that.validate = true; + }, 1000) + + } + }).catch(res => { + that.validate = true; + this.num = 15 + this.$refs.popup.close() + that.$util.Tips({ + title: res + }); + }) + + + } + + }, //同意 agree() { - intentionbus({ - "status": 1 - }).then((res) => { - if (res.status == 200) { - this.$util.Tips({ - title: res.message, - icon: 'success', - }) - this.getUserInfo() - this.isFshow = false - } - }).catch((err) => { - this.isFshow = false - this.$util.Tips({ - title: err, - icon: 'error', - }) - }) + this.$refs.popup.open() + this.isFshow = false + + // intentionbus({ + // "status": 1 + // }).then((res) => { + // if (res.status == 200) { + // this.$util.Tips({ + // title: res.message, + // icon: 'success', + // }) + // this.getUserInfo() + // this.isFshow = false + // } + // }).catch((err) => { + // this.isFshow = false + // this.$util.Tips({ + // title: err, + // icon: 'error', + // }) + // }) }, //拒绝 refuse() { @@ -482,7 +759,7 @@ this.num = 15 this.isFshow = false } else { - this.num = 0 + this.num = 15 this.isFshow = false } }, @@ -509,6 +786,106 @@ }, 1000); + }, + //验证 + validateBtn: function() { + let that = this, + value = that.merchantData; + if (value.bank_username && value.bank_opening) { + if (!that.isShowCode) { + that.validate = true; + } else { + if (that.codeVal) { + that.validate = true; + } else { + that.validate = false; + } + } + } else { + that.validate = false; + } + }, + validateForm: function() { + let that = this, + value = that.merchantData; + + if (!value.bank_username) return that.$util.Tips({ + title: '请输入银行账户姓名' + }); + if (!value.bank_opening) return that.$util.Tips({ + title: '请输入开户行' + }); + + if (value.bank_front.length == 0) return that.$util.Tips({ + title: '请上传一张或者多张图片' + }); + + if (value.bank_back.length == 0) return that.$util.Tips({ + title: '请上传一张或者多张图片' + }); + if (value.cardno_front.length == 0) return that.$util.Tips({ + title: '请上传一张或者多张图片' + }); + if (value.cardno_back.length == 0) return that.$util.Tips({ + title: '请上传一张或者多张图片' + }); + that.validate = true; + return true; + }, + /** + * 上传文件 + * + */ + uploadpic(data) { + let that = this; + if (data.type == 1) { + that.$util.uploadImageOne('upload/image', function(res) { + that.merchantData.cardno_front = res.data.path + + }); + } else if (data.type == 2) { + that.$util.uploadImageOne('upload/image', function(res) { + that.merchantData.cardno_back = res.data.path + + }); + } else if (data.type == 3) { + that.$util.uploadImageOne('upload/image', function(res) { + that.merchantData.bank_front = res.data.path + + }); + } else { + that.$util.uploadImageOne('upload/image', function(res) { + that.merchantData.bank_back = res.data.path + + }); + } + + }, + //删除图片 + DelPic(data) { + let that = this; + if (data.type == 1) { + + that.merchantData.cardno_front = '' + + + } else if (data.type == 2) { + + that.merchantData.cardno_back = '' + + + } else if (data.type == 3) { + + that.merchantData.bank_front = '' + + + } else { + + that.merchantData.bank_back = '' + + + } + }, //商户设置 buyserset() { @@ -524,10 +901,10 @@ this.detail = res.data }) }, + navigator(url, t) { - // uni.navigateTo({ - // url: url - // }) + + if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) { this.isFshow = true this.countDown() @@ -536,19 +913,20 @@ url: url }) } - }, getUserInfo: function() { let that = this; getUserInfo().then(res => { that.userInfoData = res.data; - // console.log(res.data.service); + this.merchantData.phone = res.data.phone + if (res.data.service == null) { // console.log('123'); this.isShow = false } else { this.isShow = true this.mer_id = res.data.service.mer_id + this.decimal() } if (!res.data.mer_info) { @@ -566,6 +944,241 @@ background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%); } + .userpage { + width: 100%; + height: 1368rpx; + padding-top: 150rpx; + background-color: #fff; + position: relative; + } + + .userpage-icon { + width: 60rpx; + height: 60rpx; + position: absolute; + top: 60rpx; + right: 60rpx; + + image { + width: 100%; + height: 100%; + } + } + + .item-name { + width: 190rpx; + } + + .merchantsSettled { + height: 1368rpx; + } + + .merchantsSettled .title { + font-size: 35rpx; + font-family: Microsoft YaHei; + font-weight: 400; + text-align: center; + } + + .merchantsSettled .list { + background-color: #fff; + border-radius: 12px; + + margin: 0 15px; + position: absolute; + + width: calc(100% - 30px); + + } + + .application-record { + position: absolute; + display: flex; + align-items: center; + top: 240rpx; + right: 0; + color: #fff; + font-size: 22rpx; + background-color: rgba(0, 0, 0, 0.3); + padding: 8rpx 18rpx; + border-radius: 20px 0px 0px 20px; + } + + .item-card { + display: flex; + margin-top: 20rpx; + + .item-carda { + width: 298rpx; + height: 175rpx; + margin-right: 20rpx; + + image { + width: 100%; + height: 100%; + } + } + + .item-cardb { + width: 298rpx; + height: 175rpx; + + image { + width: 100%; + height: 100%; + } + } + } + + .merchantsSettled .list .item { + padding: 50rpx 0 20rpx; + + position: relative; + margin: 0 20px; + + &.no-border { + border-bottom: none; + padding-left: 0; + padding-right: 0; + } + + .item-title { + color: #666666; + font-size: 28rpx; + display: block; + } + + .item-desc { + color: #B2B2B2; + font-size: 22rpx; + display: block; + margin-top: 9rpx; + line-height: 36rpx; + } + } + + .acea-row, + .upload { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -o-box-lines: multiple; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + } + + .upload { + margin-top: 20rpx; + } + + .acea-row.row-middle { + -webkit-box-align: center; + -moz-box-align: center; + -o-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + padding-left: 2px; + } + + .acea-row.row-column { + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -o-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + } + + .acea-row.row-center-wrapper { + -webkit-box-align: center; + -moz-box-align: center; + -o-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: center; + -moz-box-pack: center; + -o-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + } + + .merchantsSettled .list .item .pictrue { + width: 130rpx; + height: 130rpx; + margin: 24rpx 22rpx 0 0; + position: relative; + font-size: 11px; + color: #bbb; + + &:nth-child(4n) { + margin-right: 0; + } + + &:nth-last-child(1) { + border: 0.5px solid #ddd; + box-sizing: border-box; + } + + uni-image, + image { + width: 100%; + height: 100%; + border-radius: 1px; + + img { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + display: block; + position: absolute; + top: 0; + left: 0; + opacity: 0; + width: 100%; + height: 100%; + } + } + + .icon-guanbi1 { + font-size: 33rpx; + position: absolute; + top: -10px; + right: -10px; + } + } + + .uni-list-cell-db { + position: relative; + } + + .merchantsSettled .submitBtn { + width: 588rpx; + margin: 0 auto; + height: 86rpx; + border-radius: 25px; + text-align: center; + line-height: 86rpx; + font-size: 15px; + color: #fff; + background: #E3E3E3; + margin-top: 25px; + pointer-events: none; + } + + .merchantsSettled .submitBtn.on { + background: red; + pointer-events: all; + } + + .settlementAgreement { width: 100%; height: 100%; @@ -783,7 +1396,48 @@ // margin-top: 52.63rpx; padding-top: 32rpx; border-radius: 17.54rpx; + // box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); + .special_work-title { + display: flex; + margin-bottom: 50rpx; + + background-color: #efefef; + padding: 10rpx 10rpx; + + .special_work-titlea { + width: 40rpx; + height: 40rpx; + + image { + width: 100%; + height: 100%; + } + } + + .special_work-titleb { + font-size: 23rpx; + font-family: PingFang SC-Regular, PingFang SC; + font-weight: 400; + color: #737373; + margin-top: 5rpx; + } + + .special_work-titlec { + font-size: 23rpx; + font-family: PingFang SC-Regular, PingFang SC; + font-weight: 400; + color: #16C295; + margin-top: 5rpx; + } + + .special_work-titled { + font-size: 23rpx; + font-family: PingFang SC-Regular, PingFang SC; + font-weight: 400; + margin-top: 5rpx; + } + } .title { font-size: 31.58rpx; diff --git a/pages/store/settled/index.vue b/pages/store/settled/index.vue index 52fada0..150d84a 100644 --- a/pages/store/settled/index.vue +++ b/pages/store/settled/index.vue @@ -489,6 +489,8 @@ that.isType = true getAgreementApi('sys_merchant_type').then(res => { that.protocol = res.data.sys_merchant_type + + }) }, // 获取历史提交数据详情 @@ -637,7 +639,7 @@ */ DelPic: function(index) { let that = this, - pic = this.pics[index]; + pic = this.pics[index]; that.pics.splice(index, 1); that.$set(that, 'pics', that.pics); }, @@ -723,8 +725,9 @@ }, formSubmit: function(e) { + console.log(this.mer_storeType) - if (this.num == 0) { + if (this.num == 0||this.mer_storeType=='镇级供应链') { let that = this; if (that.validateForm() && that.validate) { diff --git a/pages/users/login/login_copy.vue b/pages/users/login/login_copy.vue index 159220f..6603d0e 100644 --- a/pages/users/login/login_copy.vue +++ b/pages/users/login/login_copy.vue @@ -14,7 +14,7 @@ {{ item }} -
+
@@ -39,7 +39,7 @@
-
+
@@ -70,8 +70,8 @@
-
登录
-
登录
+
登录
+
登录
@@ -260,7 +260,7 @@ }, data: function() { return { - navList: ["账号登录", "快速登录"], + navList: ["快速登录","账号登录"], current: 0, account: "", password: "",