From 200acf9283ff06e75874df263b1e125a71e76215 Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期五, 27 十月 2023 14:57:43 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
cloud-server-management/src/main/webapp/static/modular/system/operator/operator.js | 108 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 96 insertions(+), 12 deletions(-)
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/operator/operator.js b/cloud-server-management/src/main/webapp/static/modular/system/operator/operator.js
index 4c69cd5..bbc7112 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/operator/operator.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/operator/operator.js
@@ -20,7 +20,7 @@
TSite.initColumn = function () {
return [
{field: 'selectItem', checkbox: true},
- {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'},
+ {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'},
{title: '运营商名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:'20%',},
{title: '管理员姓名', field: 'userName', visible: true, align: 'center', valign: 'middle',
},
@@ -34,7 +34,7 @@
formatter: function (data,row) {
var btn = "";
if(data==1) {
- var str = '<button class="btn btn-outline btn-primary" onclick="TSite.bindOperator('+row.id+')" >去绑定</button>'
+ var str = '<button class="btn btn-outline btn-primary" onclick="TSite.Allocationratio('+row.id+')" >去绑定</button>'
btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="" onfocus="TUser.tooltip()">' + str + '</p>']
}else{
var str = '<h3>已绑定</h3>'
@@ -64,18 +64,102 @@
return true;
}
};
-TSite.bindOperator = function (e) {
- var index = layer.open({
- type: 2,
- title: "认证",
- area: ['100%', '100%'], //宽高
- fix: false, //不固定
- maxmin: true,
- content: Feng.ctxPath + '/operatorUser/proportion/' + e
- });
- this.layerIndex = index;
+/**
+ * 商户号认证
+ */
+TSite.Allocationratio = function (e) {
+ console.log("看看E");
+ console.log(e);
+ var index = layer.open({
+ type: 2,
+ title: "商户认证",
+ area: ['100%', '100%'], //宽高
+ fix: false, //不固定
+ maxmin: true,
+ content: Feng.ctxPath + '/operator/proportionAuth/' + e
+ });
+ this.layerIndex = index;
+};
+/**
+ * 分账比例
+ */
+TSite.proportion = function () {
+ var selected = $('#' + this.id).bootstrapTable('getSelections');
+ if(selected.length >1 ){
+ Feng.info("只能选择一个运营商商户设置分账比例!");
+ }else {
+ if (this.check()) {
+ console.log("看看状态")
+ console.log(TSite.seItem.status)
+ if (TSite.seItem.status==1){
+ Feng.error("当前运营商没有绑定商户号,请先绑定商户号!")
+ return;
+ }
+ var index = layer.open({
+ type: 2,
+ title: "认证",
+ area: ['100%', '100%'], //宽高
+ fix: false, //不固定
+ maxmin: true,
+ content: Feng.ctxPath + '/operator/proportion/' + TSite.seItem.id
+ });
+ this.layerIndex = index;
+ }
+ }
};
+TSite.addSubmit = function(){
+ var alipayType = $("input[name='alipayType']:checked").val();
+ var wechatType = $("input[name='wechatType']:checked").val();
+ var alipayNum = $("#alipayNum").val();
+ var wechatNum = $("#wechatNum").val();
+ var operatorId = $("#operatorId").val();
+ if($("#alipayNum").val()=='' ){
+ Feng.info("请输入支付宝商户号")
+ return;
+ }
+ if($("#wechatNum").val()=='' ){
+ Feng.info("请输入微信商户号")
+ return;
+ }
+ var ajax = new $ax(Feng.ctxPath + "/operator/auth", function(data){
+ Feng.success("认证成功")
+ TSite.close();
+ TSite.search();
+ });
+ ajax.set("alipayType",alipayType);
+ ajax.set("wechatType",wechatType);
+ ajax.set("alipayNum",alipayNum);
+ ajax.set("wechatNum",wechatNum);
+ ajax.set("operatorId",operatorId);
+ ajax.start();
+};
+TSite.addSubmit1 = function(){
+ var alipayProportion = $("#alipayProportion").val();
+ var wechatProportion = $("#wechatProportion").val();
+ var operatorIdOne = $("#operatorIdOne").val();
+ if($("#alipayNum").val()=='' ){
+ Feng.info("请输入支付宝分账比例")
+ return;
+ }
+ if($("#wechatNum").val()=='' ){
+ Feng.info("请输入微信分账比例")
+ return;
+ }
+ if (Number(alipayProportion)+Number(wechatProportion)!=100){
+ Feng.info("总比例应该是100%,当前比例:"+Number(Number(alipayProportion)+Number(wechatProportion)));
+ return;
+ }
+ var ajax = new $ax(Feng.ctxPath + "/operator/proportion", function(data){
+ Feng.success("分账比例设置成功")
+ TSite.close();
+ TSite.search();
+ });
+ ajax.set("alipayProportion",alipayProportion);
+ ajax.set("wechatProportion",wechatProportion);
+ ajax.set("operatorIdOne",operatorIdOne);
+ ajax.start();
+};
/**
* 上架
*/
--
Gitblit v1.7.1