Commit 23390ed5 by 蒋勇

Merge branch 'igirl-web' of gitlab.gongsibao.com:jiangyong/zhichan into igirl-web

parents ca152021 44d19b46
...@@ -1429,11 +1429,6 @@ var app = new Vue({ ...@@ -1429,11 +1429,6 @@ var app = new Vue({
title: "登录", title: "登录",
name: "/login" name: "/login"
}); });
setTimeout(() => {
this.$refs.topmenu.fetchMetaData(() => {
});
}, 300);
} }
if (k == "roleview") { if (k == "roleview") {
this.pushx({ this.pushx({
......
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
register(){ register(){
this.$root.pushx({ this.$root.pushx({
title: "注册", title: "注册",
name: "/register" name: "/register",
}); });
this.a=false; this.a=false;
this.b=false; this.b=false;
...@@ -242,7 +242,6 @@ ...@@ -242,7 +242,6 @@
var that=this; var that=this;
var obj={ var obj={
mobile:that.form1.mobile, mobile:that.form1.mobile,
}; };
that.$refs.form1.validate(valid=>{ that.$refs.form1.validate(valid=>{
if(valid){ if(valid){
......
{ {
template: '${tmpl}', template: '${tmpl}',
data: function() { data: function () {
return { return {
imgHeight: null, imgHeight: null,
orderNum: "", orderNum: "",
orderInfo: {}, orderInfo: {},
payType: "wx", payType: "wx",
d: {}, d: {},
action: "", action: "",
zfpzUrl: "", zfpzUrl: "",
accounts: [], accounts: [],
account_id: "", account_id: "",
account_index: "", account_index: "",
accountinfo: {}, accountinfo: {},
qrcode: "", qrcode: "",
tradekey: "", tradekey: "",
time: "", time: "",
interval: null, interval: null,
roleList: null, roleList: null,
isBizemp: false, isBizemp: false,
loading: false, loading: false,
payOrderType: false payOrderType: false,
} email: "",
}, poliyLevel: "",
mounted: function() { address: "",
Deparment: "",
industry: "",
period:"3个月",
}
},
mounted: function () {
this.imgHeight = 'min-height:' + (document.documentElement.clientHeight - 221) + "px;"; this.imgHeight = 'min-height:' + (document.documentElement.clientHeight - 221) + "px;";
var currentUser = this.currentUser; var currentUser = this.currentUser;
if (currentUser) { if (currentUser) {
...@@ -41,7 +47,9 @@ ...@@ -41,7 +47,9 @@
} }
this.orderNum = this.$router.history.current.query.orderNum; this.orderNum = this.$router.history.current.query.orderNum;
var that = this; var that = this;
this.$root.getReq("/web/orderCtl/getItemTmOrderDetail", { orderNum: this.orderNum }).then(function (d) { this.$root.getReq("/web/orderCtl/getItemTmOrderDetail", {
orderNum: this.orderNum
}).then(function (d) {
if (d.code == 1) { if (d.code == 1) {
that.orderInfo = d.data; that.orderInfo = d.data;
that.closePayConfirm(); that.closePayConfirm();
...@@ -72,23 +80,42 @@ ...@@ -72,23 +80,42 @@
console.log(e); console.log(e);
that.$message.warning("获取账户信息失败"); that.$message.warning("获取账户信息失败");
}); });
/*接受pay.js界面传的参数*/
this.poliyLevel = this.$router.history.current.query.poliyLevel;
this.address = this.$router.history.current.query.address;
this.Department = this.$router.history.current.query.Department;
this.industry = this.$router.history.current.query.industry;
this.email = this.$router.history.current.query.email;
this.period = this.$router.history.current.query.period;
if (this.$store.state.currentUser) {
this.userName = this.$store.state.currentUser.userName;
this.userId = this.$store.state.currentUser.id;
console.log(this.userName, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxuser");
}
if (this.$store.state.currentCompany) {
this.currentCompany = this.$store.state.currentCompany.name;
console.log(this.$store.state.currentCompany, "BeginTimexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcurrentCompany");
};
this.Subscribe();
}, },
created: function() { created: function () {
}, },
methods: { methods: {
afterpayjump(){ afterpayjump() {
var that = this; var that = this;
this.$root.getReq("/wxop/pushmsgWxop/getQr", {}).then(function (r) { this.$root.getReq("/wxop/pushmsgWxop/getQr", {}).then(function (r) {
console.log("rrrrrrr"); console.log("rrrrrrr");
console.log(r); console.log(r);
if(r && r.code==1 && r.data){ if (r && r.code == 1 && r.data) {
that.$root.pushx({ that.$root.pushx({
title: "支付成功", title: "支付成功",
name: "/paysuccess", name: "/paysuccess",
params: { orderNum: that.orderNum } params: {
orderNum: that.orderNum
}
}); });
}else{ } else {
if (that.isBizemp) { if (that.isBizemp) {
that.$root.pushx({ that.$root.pushx({
title: "我的订单", title: "我的订单",
...@@ -101,7 +128,7 @@ ...@@ -101,7 +128,7 @@
}); });
} }
} }
}).catch(e=>{ }).catch(e => {
if (that.isBizemp) { if (that.isBizemp) {
that.$root.pushx({ that.$root.pushx({
title: "我的订单", title: "我的订单",
...@@ -115,7 +142,7 @@ ...@@ -115,7 +142,7 @@
} }
}); });
}, },
bankchange(d){ bankchange(d) {
var account = this.accounts[d]; var account = this.accounts[d];
console.log(account); console.log(account);
if (account) { if (account) {
...@@ -123,7 +150,7 @@ ...@@ -123,7 +150,7 @@
this.account_id = account.id; this.account_id = account.id;
} }
}, },
copyLink(){ copyLink() {
var oInput = document.createElement('input'); var oInput = document.createElement('input');
oInput.value = "https://igirl.gongsibao.com/orderpay/orderpay?state=" + this.orderNum; oInput.value = "https://igirl.gongsibao.com/orderpay/orderpay?state=" + this.orderNum;
document.body.appendChild(oInput); document.body.appendChild(oInput);
...@@ -136,11 +163,11 @@ ...@@ -136,11 +163,11 @@
message: '复制成功' message: '复制成功'
}); });
}, },
error(err){ error(err) {
this.$message.warning(`上传失败,请重新上传`); this.$message.warning(`上传失败,请重新上传`);
console.log(err); console.log(err);
}, },
setKey(name, flag){ setKey(name, flag) {
console.log(name); console.log(name);
console.log(flag); console.log(flag);
name = name.substring(name.length - 5); name = name.substring(name.length - 5);
...@@ -149,19 +176,19 @@ ...@@ -149,19 +176,19 @@
console.log(this.$refs[flag]); console.log(this.$refs[flag]);
this.$refs[flag].d.key = key; this.$refs[flag].d.key = key;
}, },
uploadsuccess2(result, obj){ uploadsuccess2(result, obj) {
this.zfpzUrl = result; this.zfpzUrl = result;
this.payOrderType = true; this.payOrderType = true;
}, },
toOfflinePay(){ toOfflinePay() {
this.payType = "offline"; this.payType = "offline";
this.closePayConfirm(); this.closePayConfirm();
}, },
toOtherPeoplePay(){ toOtherPeoplePay() {
this.payType = "otherPeople"; this.payType = "otherPeople";
this.closePayConfirm(); this.closePayConfirm();
}, },
offlinePaySubmit(){ offlinePaySubmit() {
var that = this; var that = this;
var fileUrl = this.zfpzUrl; var fileUrl = this.zfpzUrl;
var orderNum = this.orderNum; var orderNum = this.orderNum;
...@@ -208,24 +235,28 @@ ...@@ -208,24 +235,28 @@
that.$message.warning("参数错误"); that.$message.warning("参数错误");
} }
}, },
toWxPay(){ toWxPay() {
this.payType = "wx"; this.payType = "wx";
this.closePayConfirm(); this.closePayConfirm();
this.getPayQrCode(); this.getPayQrCode();
}, },
toAliPay(){ toAliPay() {
this.payType = "alipay"; this.payType = "alipay";
this.closePayConfirm(); this.closePayConfirm();
this.getPayQrCode(); this.getPayQrCode();
}, },
getPayQrCode: function() { getPayQrCode: function () {
var self = this; var self = this;
if (!this.orderInfo || !this.orderInfo.code) { if (!this.orderInfo || !this.orderInfo.code) {
this.$message.warning(`获取支付码失败,订单信息有误`); this.$message.warning(`获取支付码失败,订单信息有误`);
return; return;
} }
self.loading = true; self.loading = true;
self.$root.postReq("/web/orderCtl/getQrCodeTl", { code: this.orderInfo.code, company_id: this.orderInfo.company_id, op_type: this.payType }).then(d => { self.$root.postReq("/web/orderCtl/getQrCodeTl", {
code: this.orderInfo.code,
company_id: this.orderInfo.company_id,
op_type: this.payType
}).then(d => {
console.log(d, "getQrCode........................"); console.log(d, "getQrCode........................");
if (d && d.code == 1) { if (d && d.code == 1) {
var data = d.data; var data = d.data;
...@@ -243,17 +274,24 @@ ...@@ -243,17 +274,24 @@
self.loading = false; self.loading = false;
}); });
}, },
closePayConfirm(){ closePayConfirm() {
if (this.interval) { if (this.interval) {
window.clearInterval(this.interval); window.clearInterval(this.interval);
} }
}, },
checkOrderStatus(){ checkOrderStatus() {
var self = this; var self = this;
var startTime = Number(this.time); var startTime = Number(this.time);
setTimeout(function () { setTimeout(function () {
var inth = setInterval(function () { var inth = setInterval(function () {
self.$root.postReq("/web/orderCtl/findItemByCodeTl", { orderCode: self.orderInfo.code, wxPayOrderCode: self.orderInfo.wxPayOrderCode, aliPayOrderCode: self.orderInfo.aliPayOrderCode, company_id: self.orderInfo.company_id, sub_type: self.orderInfo.subType, op_type: self.payType }).then(d => { self.$root.postReq("/web/orderCtl/findItemByCodeTl", {
orderCode: self.orderInfo.code,
wxPayOrderCode: self.orderInfo.wxPayOrderCode,
aliPayOrderCode: self.orderInfo.aliPayOrderCode,
company_id: self.orderInfo.company_id,
sub_type: self.orderInfo.subType,
op_type: self.payType
}).then(d => {
if (d && d.code == 1 && d.data && d.data.orderPayStatus == "yfk") { if (d && d.code == 1 && d.data && d.data.orderPayStatus == "yfk") {
self.orderInfo = d.data; self.orderInfo = d.data;
window.clearInterval(inth); window.clearInterval(inth);
...@@ -283,6 +321,39 @@ ...@@ -283,6 +321,39 @@
self.interval = inth; self.interval = inth;
}, 5000); }, 5000);
}, },
Subscribe() {
console.log("oooooooooooo");
axios.post('http://106.13.228.212:8010/gsb/Subscribe', {
"userId": this.userId,
"poliyLevel": this.poliyLevel,
"city": this.address,
"Departments": this.Department,
"industry": this.industry,
"BeginTime": this.Date_new(new Date()),
"Email": this.email,
"comanyname": this.currentCompany,
"username": this.userName,
"period": this.period,
"money": this.money,
"pid": this.orderInfo.code
}).then(d => {
console.log(this.cities, "this.cities----------------------");
console.log(this.currentCompany, "this.currentCompany----------------------");
console.log(String(this.cities), "string----------------------");
console.log(JSON.stringify(this.cities), "cities----------------------");
})
},
Date_new(str) {
let date = str || new Date(),
year = date.getFullYear(),
month = date.getMonth() + 1,
day = date.getDate(),
hours = date.getHours(),
minutes = date.getMinutes();
second = date.getSeconds();
let a = `${year}-${month}-${day} ${hours}:${minutes}:${second}`;
return a;
},
}, },
vname: "gsb_orderpay" vname: "gsb_orderpay"
} }
\ No newline at end of file
...@@ -14,6 +14,6 @@ ...@@ -14,6 +14,6 @@
<el-input v-model="email" placeholder="请输入内容" type="email"></el-input> <el-input v-model="email" placeholder="请输入内容" type="email"></el-input>
</div> </div>
<h3>实付金额:<span>{{money}}元</span></h3> <h3>实付金额:<span>{{money}}元</span></h3>
<el-button type="primary" @click="btnClick();Subscribe()">去支付</el-button> <el-button type="primary" @click="btnClick()">去支付</el-button>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -24,12 +24,9 @@ ...@@ -24,12 +24,9 @@
itemCode: "zcdy3gy", itemCode: "zcdy3gy",
userId: "", userId: "",
poliyLevel: "", poliyLevel: "",
city: "", address: "",
Deparment: "", Deparment: "",
industry: "", industry: "",
BeginTime: "",
currentCompany: "",
userName: "",
period: "3个月", period: "3个月",
}; };
}, },
...@@ -37,20 +34,11 @@ ...@@ -37,20 +34,11 @@
}, },
mounted: function () { mounted: function () {
/*由policycondition.js传递*/
this.poliyLevel = this.$router.history.current.query.poliyLevel; this.poliyLevel = this.$router.history.current.query.poliyLevel;
this.cities = this.$router.history.current.query.cities; this.address = this.$router.history.current.query.address;
this.Department = this.$router.history.current.query.Department; this.Department = this.$router.history.current.query.Department;
this.industry = this.$router.history.current.query.industry; this.industry = this.$router.history.current.query.industry;
if (this.$store.state.currentUser) {
this.userName = this.$store.state.currentUser.userName;
this.userId = this.$store.state.currentUser.id;
console.log(this.userName, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxuser");
}
if (this.$store.state.currentCompany) {
this.currentCompany = this.$store.state.currentCompany.name;
}
console.log(this.$store.state.currentCompany, "BeginTimexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcurrentCompany");
}, },
methods: { methods: {
timeClick(item, ind) { timeClick(item, ind) {
...@@ -98,7 +86,13 @@ ...@@ -98,7 +86,13 @@
title: "订单支付", title: "订单支付",
name: "/orderpay", name: "/orderpay",
params: { params: {
orderNum: d.data.code orderNum: d.data.code,
"poliyLevel":this.poliyLevel,
"address":this.address,
"Department":this.Department,
"industry":this.industry,
"email":this.email,
"period":this.period,
} }
}); });
} else { } else {
...@@ -106,41 +100,6 @@ ...@@ -106,41 +100,6 @@
} }
}) })
}, },
Subscribe() {
axios.post('http://106.13.228.212:8010/gsb/Subscribe', {
/*axios.post('http://192.168.18.108:8009/gsb/Subscribe', {*/
"userId": this.userId,
"poliyLevel": this.poliyLevel,
"city": this.cities,
"Departments": this.Department,
"industry": this.industry,
"BeginTime": this.Date_new(new Date()),
/*"BeginTime": new Date(),*/
"Email": this.email,
"comanyname": this.currentCompany,
"username": this.userName,
"period": this.period,
"money": this.money,
}).then(d => {
console.log(d, "mysql----------------------");
console.log(money, "money----------------------");
console.log(String(this.cities), "string----------------------");
console.log(JSON.stringify(this.cities), "cities----------------------");
})
},
Date_new(str) {
/*let date = str || new Date(),*/
let date = new Date(),
year = date.getFullYear(),
month = date.getMonth() + 1,
day = date.getDate(),
hours = date.getHours(),
minutes = date.getMinutes();
second = date.getSeconds();
let a = `${year}-${month}-${day} ${hours}:${minutes}:${second}`;
return a
},
}, },
vname: "gsb-pay" vname: "gsb-pay"
} }
\ No newline at end of file
...@@ -266,7 +266,7 @@ ...@@ -266,7 +266,7 @@
name: "/pay", name: "/pay",
params: { params: {
"poliyLevel": this.level, "poliyLevel": this.level,
"cities": _arryCitys, "address": _arryCitys,
"Department": this.checkedfabus, "Department": this.checkedfabus,
"industry": this.checkedhangyes, "industry": this.checkedhangyes,
}, },
......
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