Commit d7bd3bf2 authored by 黄奎's avatar 黄奎

页面修改

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