Commit 77358bd1 by zhaoxiqing

gsb

parent 5cec73bf
......@@ -21,6 +21,8 @@ class UserCtl extends CtlBase {
this.ejobapplySve = system.getObject("service.ejobapplySve");
this.redisClient = system.getObject("util.redisClient");
this.mailClient = system.getObject("util.mailClient");
this.usereaccountextendSve = system.getObject("service.usereaccountextendSve");
}
async findAndCountAll(queryobj, obj, req) {
var pageInfo = obj.pageInfo || {};
......@@ -896,6 +898,7 @@ class UserCtl extends CtlBase {
// appId,userCode, branchCode
var ecid = req.query.ecid || 0;
var appkey = 'wxf616c0a459d66081';
var legal = req.query.legal || "";
var userId = req.query.userId || "";
var appId = req.query.appId || "";
......@@ -944,6 +947,9 @@ class UserCtl extends CtlBase {
var accountId = await this.cache3rdAccount(existedUser.id, accountInfo);
var url = homePage + action;
url = url + "&ecid=" + ecid;
if(legal){
url = url + "&legal="+legal;
}
return url;
}
......@@ -967,6 +973,9 @@ class UserCtl extends CtlBase {
var accountId = await this.cache3rdAccount(existedUser.id, accountInfo);
var url = homePage + action;
url = url + "&ecid=" + ecid;
if(legal){
url = url + "&legal="+legal;
}
return url;
}
......@@ -1030,10 +1039,26 @@ class UserCtl extends CtlBase {
isPush: false,
};
eaccount = await this.usereaccountSve.create(eaccount);
} else {
bool = true;
}
if(pobj.legal){
var usereaccountextend = await this.usereaccountextendSve.findOne({id:eaccount.id});
if(!usereaccountextend.id){
usereaccountextend.id = eaccount.id;
usereaccountextend.zfb_no = pobj.zfb_no;
usereaccountextend.company_fullname = pobj.company_fullname;
usereaccountextend.bank_fullname = pobj.bank_fullname;
this.usereaccountextendSve.create(usereaccountextend);
}else {
usereaccountextend.zfb_no = pobj.zfb_no;
usereaccountextend.company_fullname = pobj.company_fullname;
usereaccountextend.bank_fullname = pobj.bank_fullname;
usereaccountextend.save();
}
}
if (!bool || !eaccount.eaccountid || (eaccount.userName != pobj.userName || eaccount.personsSign != pobj.personsSign || eaccount.bankno != pobj.bankno)) {
var bankthreeParams = {
name: pobj.userName, //姓名 必填
......
const system = require("../../system");
const Dao = require("../dao.base");
class UsereaccountextendDao extends Dao {
constructor() {
super(Dao.getModelName(UsereaccountextendDao));
}
async getById(id) {
return await this.model.findOne({where: {id: id}, raw: true});
}
}
module.exports = UsereaccountextendDao;
const system = require("../../system");
const settings = require("../../../config/settings");
const uiconfig = system.getUiConfig2(settings.wxconfig.appId);
module.exports = (db, DataTypes) => {
return db.define("usereaccountextend", {
zfb_no: DataTypes.STRING,
company_fullname: DataTypes.STRING,
bank_fullname: DataTypes.STRING,
}, {
paranoid: true, //假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_user_eaccount_extend',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../system");
const ServiceBase = require("../sve.base")
class UsereaccountextendService extends ServiceBase {
constructor() {
super(ServiceBase.getDaoName(UsereaccountextendService));
}
}
module.exports = UsereaccountextendService;
......@@ -174,19 +174,19 @@ axios.get("/vue/comp/base").then(function(res){
},
mounted(){
if (window.history && window.history.pushState) {
window.addEventListener('popstate', function() {
wx.miniProgram.navigateBack({delta: 1});
wx.miniProgram.postMessage({ data: '我要后退' });
}, false);
}
var self=this;
this.$refs.bottommenu.hidemenu();
var jaid = self.getHashParameter("jaid");
var cb = self.getHashParameter("cb");
......@@ -198,6 +198,11 @@ axios.get("/vue/comp/base").then(function(res){
var from = self.getHashParameter("from");
localStorage.setItem('from', from || "");
var legal = self.getHashParameter("legal");
console.log("legal===============",legal);
localStorage.setItem('legal', legal || "");
self.isYD = (from || "") == "ydh5";
var ecidcache = localStorage.getItem("ecid");
if(ecid && ecid != 'null' && ecid != "undefined") {
......@@ -233,10 +238,10 @@ axios.get("/vue/comp/base").then(function(res){
});
} else {
/* self.$router.push("/ecompany/signinfo"); */
var h5router = localStorage.getItem("h5router") || "/ecompany/signinfo";
console.log(h5router, "------------------2-----------");
self.$router.push({
path: h5router || "/ecompany/signinfo",
replace: true
......
......@@ -42,6 +42,16 @@
</el-col>
</el-row>
</el-form-item>
<el-form-item label="" prop="bank_fullname" v-if ="legal">
<el-row gutter="1" style="border-bottom:solid 1px #eee">
<el-col :span="2"><img src="/imgs/h5/kaihuhangmingcheng.png" style="margin-top:5px"/></el-col>
<el-col :span="22">
<el-input style="width:70%" v-model="personinfo.bank_fullname" placeHolder="请输入开户行全称" autocomplete="off"></el-input>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="" prop="bankno">
<el-row gutter="1" style="border-bottom:solid 1px #eee">
<el-col :span="2"><img src="/imgs/h5/icon_cell_code.png" style="margin-top:5px"/></el-col>
......@@ -50,6 +60,28 @@
</el-col>
</el-row>
</el-form-item>
<el-form-item label="" prop="zfb_no" v-if ="legal">
<el-row gutter="1" style="border-bottom:solid 1px #eee">
<el-col :span="2"><img src="/imgs/h5/zhifubaozhanghao.png" style="margin-top:5px"/></el-col>
<el-col :span="22">
<el-input style="width:70%" v-model="personinfo.zfb_no" placeHolder="请输入您的支付宝账号" autocomplete="off"></el-input>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="" prop="company_fullname" v-if ="legal">
<el-row gutter="1" style="border-bottom:solid 1px #eee">
<el-col :span="2"><img src="/imgs/h5/yingyezhizhao.png" style="margin-top:5px"/></el-col>
<el-col :span="22">
<el-input style="width:70%" v-model="personinfo.company_fullname" placeHolder="请输入营业执照公司全称" autocomplete="off"></el-input>
</el-col>
</el-row>
</el-form-item>
<div v-if="isyd" style="width:100%">
<el-button :loading="sbloading" @click="nextgo" style="width:100%" type="primary">下一步</el-button>
</div>
......
......@@ -49,8 +49,12 @@
ec_company_id: "",
userMobile: "nomobilessssss",
from: "",
legal : "",
userNameDisabled: false,
personsSignDisabled: false,
bank_fullnameDisabled :false,
zfb_noDisabled : false,
company_fullnameDisabled : false,
personinfo: {
ecompany_id: "",
ecompany_name: "",
......@@ -60,6 +64,10 @@
mobile: "",
vcode: "",
accountid: "",
zfb_no : "",
company_fullname : "",
bank_fullname : "",
legal:"",
},
currentAccountId: "",
accountList: [],
......@@ -106,6 +114,39 @@
trigger: 'blur'
},
],
bank_fullname: [{
required: true,
message: '请输入开户行全称',
trigger: 'blur'
},
{
validator: validateMethod,
trigger: 'blur'
},
],
zfb_no: [{
required: true,
message: '请输入您的支付宝账号',
trigger: 'blur'
},
{
validator: validateMethod,
trigger: 'blur'
},
],
company_fullname: [{
required: true,
message: '请输入营业执照公司全称',
trigger: 'blur'
},
{
validator: validateMethod,
trigger: 'blur'
},
],
}
};
},
......@@ -139,7 +180,7 @@
self.hasEcid = true;
self.ecid = ecid;
this.$root.postReq("/web/etemplateCtl/info",{id:ecid}).then(function(d){
if (d.status == 0) {
if (d.status == 0) {
self.personinfo.ecompany_name = d.data.ecompanyName;
self.personinfo.ecompany_id = d.data.ecompany_id;
self.ec_company_id = d.data.ecompany_id;
......@@ -168,6 +209,9 @@
self.isyd = true;
$("#bid").css("bottom", "100px");
}
self.legal = localStorage.getItem("legal") || "";
self.personinfo.legal = localStorage.getItem("legal") || "";
var accid = localStorage.getItem("accid");
if (accid) {
if(self.from == "ydh5") {
......@@ -209,8 +253,8 @@
},
getUserInfo() {
var self = this;
this.$root.postReq("/web/userCtl/getCurrentUser", {}).then(function (d) {
if (d.status == 0) {
this.$root.postReq("/web/userCtl/getCurrentUser", {}).then(function (d) {
if (d.status == 0) {
/* self.personinfo.userName = d.data.userName;*/
var info = (d.data || {}).info || {};
self.personinfo.personsSign = info.personsSign;
......@@ -332,4 +376,4 @@
}
},
vname: "gsb-signinfo"
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment