Commit d7bd3bf2 authored by 黄奎's avatar 黄奎

页面修改

parent ae207fa6
......@@ -56,6 +56,18 @@
},
methods: {
initData() {
this.payWay = "1";
this.lastTime = '';
this.isShowPic = false;
this.payPic = "";
this.descMin = 0;
this.descSecond = 0;
this.descHour = 0;
this.timer = null;
this.timer2 = null;
this.chaTime = 0;
},
getPayPic(obj) {
let msg = {}
msg.OrderSource = 16
......@@ -66,7 +78,7 @@
msg.payway = this.payWay
this.apipost('OnlinePay_post_GetCodeUrl', msg, res => {
if (res.data.resultCode == 1) {
this.payPic = res.data.data.CodeURL
this.payPic = res.data.data.CodeURL;
this.lastTime = new Date(res.data.data.ExpireDate)
this.nowDate = new Date(res.data.data.NowDate)
this.chaTime = this.lastTime - this.nowDate
......@@ -96,30 +108,37 @@
this.apipost('OnlinePay_post_CheckOrderPay', msg, res => {
if (res.data.resultCode == 1) {
var data = res.data.data;
var fee=(Number(this.item.TotalPrice)*0.002).toFixed(2);
let mallMsg = {
OrderId: this.item.orderId,
MerchantsNo: data.Pay_Order,
User_Id: this.item.User_Id,
Out_Trade_No: data.Trade_Order,
Transaction_Id: data.Third_Order,
PayWay: myPay,
Money: this.item.TotalPrice,
Remarks: "支付赞羊商品订单:" + this.item.orderId,
Fee:fee,
FinanceId:data.FinanceId
}
this.mallapipost("/api/AppletOrder/UpdateERPGoodsOrderInfo", mallMsg, res => {
if (res.data.resultCode == 1) {
this.Success("支付成功!");
this.$emit('closeDia')
this.$emit('getGoodList');
clearInterval(this.timer2);
clearInterval(this.timer);
} else {
this.Error(res.data.message);
}
})
// var fee=(Number(this.item.TotalPrice)*0.002).toFixed(2);
// let mallMsg = {
// OrderId: this.item.orderId,
// MerchantsNo: data.Pay_Order,
// User_Id: this.item.User_Id,
// Out_Trade_No: data.Trade_Order,
// Transaction_Id: data.Third_Order,
// PayWay: myPay,
// Money: this.item.TotalPrice,
// Remarks: "支付赞羊商品订单:" + this.item.orderId,
// Fee:fee,
// FinanceId:data.FinanceId
// }
clearInterval(this.timer2);
clearInterval(this.timer);
this.Success("支付成功!");
this.$emit('closeDia')
this.$emit('getGoodList');
// this.mallapipost("/api/AppletOrder/UpdateERPGoodsOrderInfo", mallMsg, res => {
// if (res.data.resultCode == 1) {
// this.Success("支付成功!");
// this.$emit('closeDia')
// this.$emit('getGoodList');
// clearInterval(this.timer2);
// clearInterval(this.timer);
// } else {
// this.Error(res.data.message);
// }
// })
}
}, err => {})
},
......
......@@ -179,11 +179,10 @@
</el-select>
<span class="goodAddress" @click="addAddress()">新增</span>
</el-form-item>
<el-form-item label="运费" size="small">
<span style="color:red">{{orderMsg.FreightMoney}}</span>
</el-form-item>
<el-form-item label="价格" size="small">
<span style="color:red">{{orderMsg.TotalPrice}}</span>
<el-form-item label="合计" size="small">
商品:¥<span style="color:red">{{orderMsg.GoodPrice}}</span>元+
运费:¥<span style="color:red">{{orderMsg.FreightMoney}}</span>
= <span style="color:red">¥{{orderMsg.TotalPrice}}</span>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -228,6 +227,7 @@
payObj: {
orderId: 0,
OrderSource: 16,
TotalPrice: 0,
contactName: "",
customerId: 0,
......@@ -267,6 +267,7 @@
SpecificationSort: "", //规格
mallUserId: "", //用户Id
AddressId: '', //收货地址Id
GoodPrice:0,//商品价格
TotalPrice: 0, //总价格
specificationNameList: [], //规格列表
FreightMoney: 0, //运费
......@@ -331,6 +332,7 @@
this.orderMsg.SpecificationSort = "";
this.orderMsg.mallUserId = "";
this.orderMsg.AddressId = '';
this.orderMsg.GoodPrice=0;
this.orderMsg.TotalPrice = 0;
this.orderMsg.specificationNameList = [];
this.orderMsg.FreightMoney = 0;
......@@ -378,6 +380,7 @@
this.orderMsg.GoodsId = this.currentGoodsObj.id;
this.orderMsg.SpecificationSort = tempSku.sign_id;
this.orderMsg.specificationNameList = specificationNameList;
this.orderMsg.GoodPrice=(parseFloat(tempSku.price) * parseFloat(this.orderMsg.Number)).toFixed(2);
this.orderMsg.TotalPrice = (parseFloat(tempSku.price) * parseFloat(this.orderMsg.Number) + parseFloat(this
.orderMsg.FreightMoney)).toFixed(2);
}
......@@ -543,9 +546,8 @@
AnchorName: "", //主播名称
NewUserId: this.orderMsg.mallUserId,
NewShopId: this.getLocalStorage().MallSmallShopsId,
OrderSource:6,//ERP下单
OrderSource: 6, //ERP下单
}
if (orderData.DetailList == null || (orderData.DetailList && orderData.DetailList.length == 0) ||
(orderData.DetailList && orderData.DetailList.length > 0 && orderData.DetailList[0].SpecificationList &&
orderData.DetailList[0].SpecificationList
......@@ -562,19 +564,20 @@
this.Error('请选择收货地址!');
return;
}
this.mallapipost("/api/AppletOrder/SetERPGoodsOrderInfo", orderData, res => {
if (res.data.resultCode == 1) {
let userInfo = this.getLocalStorage();
var resData = res.data.data;
this.payObj.orderId = resData.OrderId;
this.payObj.TotalPrice = this.orderMsg.TotalPrice;
//this.payObj.TotalPrice=0.01;
this.payObj.contactName = userInfo.emName;
this.payObj.customerId = userInfo.EmployeeId;
this.payObj.outBranchId = userInfo.RB_Branch_id;
this.payObj.User_Id = this.orderMsg.mallUserId;
this.payVisible = true;
if (this.$refs.payChild) {
this.$refs.payChild.initData();
}
this.Success("下单成功!");
this.clreaMsg();
this.orderDialog = false;
......
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