|
@@ -20,7 +20,7 @@ window.onbeforeunload = function(){
|
|
function debounce(fn,delay){
|
|
function debounce(fn,delay){
|
|
var timer=null
|
|
var timer=null
|
|
return function(){
|
|
return function(){
|
|
- console.log(timer);
|
|
|
|
|
|
+ // console.log(timer);
|
|
if(timer){
|
|
if(timer){
|
|
clearTimeout(timer)
|
|
clearTimeout(timer)
|
|
}
|
|
}
|
|
@@ -33,7 +33,7 @@ function calculateGoodsPrice(r){
|
|
var rMap = r.map;
|
|
var rMap = r.map;
|
|
var barCode = r.goodsDetails.prodBarcode;
|
|
var barCode = r.goodsDetails.prodBarcode;
|
|
var brand = r.goodsDetails.brand;
|
|
var brand = r.goodsDetails.brand;
|
|
- console.log(rMap);
|
|
|
|
|
|
+ // console.log(rMap);
|
|
|
|
|
|
/*if(rMap.yhq){
|
|
/*if(rMap.yhq){
|
|
for(var i in rMap.yhq){
|
|
for(var i in rMap.yhq){
|
|
@@ -258,7 +258,7 @@ function calculateGoodsByMysy(goodsDetails,type){
|
|
// goodsDetails.activity = "买"+buyNum+"送1";
|
|
// goodsDetails.activity = "买"+buyNum+"送1";
|
|
// 清除该商品买一送一条件
|
|
// 清除该商品买一送一条件
|
|
vm.boughtNum.delete(goodsDetails.prodBarcode);
|
|
vm.boughtNum.delete(goodsDetails.prodBarcode);
|
|
- console.log(vm.boughtNum);
|
|
|
|
|
|
+ // console.log(vm.boughtNum);
|
|
}else{
|
|
}else{
|
|
// 如果不相等,已经购买数量+1
|
|
// 如果不相等,已经购买数量+1
|
|
vm.boughtNum.set(goodsDetails.prodBarcode , boughtNum+1);
|
|
vm.boughtNum.set(goodsDetails.prodBarcode , boughtNum+1);
|
|
@@ -484,7 +484,7 @@ function calculateGoodsByZhjsp(r){
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- console.log(vm.compareCombinationPrice);
|
|
|
|
|
|
+ // console.log(vm.compareCombinationPrice);
|
|
}
|
|
}
|
|
|
|
|
|
const delay = (function () {
|
|
const delay = (function () {
|
|
@@ -622,7 +622,9 @@ let vm = new Vue({
|
|
// 是否点击了加号或减号和操作新扫描商品的标识
|
|
// 是否点击了加号或减号和操作新扫描商品的标识
|
|
clickFlag: false,
|
|
clickFlag: false,
|
|
// 是否点击了计算活动价格
|
|
// 是否点击了计算活动价格
|
|
- calActivityFlag: false
|
|
|
|
|
|
+ calActivityFlag: false,
|
|
|
|
+ // 是否适用积分进行抵扣
|
|
|
|
+ switch1: true
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
prodBarcode (){
|
|
prodBarcode (){
|
|
@@ -684,7 +686,7 @@ let vm = new Vue({
|
|
},
|
|
},
|
|
queryInveResponse:function(){
|
|
queryInveResponse:function(){
|
|
$.get("../order/queryInveResponse/"+vm.orderSn1, function(r){
|
|
$.get("../order/queryInveResponse/"+vm.orderSn1, function(r){
|
|
- console.log(r.resultMessage);
|
|
|
|
|
|
+ // console.log(r.resultMessage);
|
|
let resultString = "";
|
|
let resultString = "";
|
|
if(r.resultMessage != null && r.resultMessage.length > 0){
|
|
if(r.resultMessage != null && r.resultMessage.length > 0){
|
|
for(let i = 0 ; i < r.resultMessage.length; i ++){
|
|
for(let i = 0 ; i < r.resultMessage.length; i ++){
|
|
@@ -698,9 +700,9 @@ let vm = new Vue({
|
|
vm.storeId = sessionStorage.getItem("storeId");
|
|
vm.storeId = sessionStorage.getItem("storeId");
|
|
var thisGoods = {};
|
|
var thisGoods = {};
|
|
var overflowLi = this.$refs.overflowLi;
|
|
var overflowLi = this.$refs.overflowLi;
|
|
- console.log("vm.$refs.saomiao.value===>" + vm.$refs.saomiao.value);
|
|
|
|
|
|
+ // console.log("vm.$refs.saomiao.value===>" + vm.$refs.saomiao.value);
|
|
let scanSellVolume = calScanSellVolume(vm.$refs.saomiao.value);
|
|
let scanSellVolume = calScanSellVolume(vm.$refs.saomiao.value);
|
|
- console.log("scanSellVolume===>" + scanSellVolume);
|
|
|
|
|
|
+ // console.log("scanSellVolume===>" + scanSellVolume);
|
|
$.get("../goods/details/"+vm.prodBarcode+"/"+vm.storeId+"/"+vm.prodBarcode+"/"+scanSellVolume, function (r) {
|
|
$.get("../goods/details/"+vm.prodBarcode+"/"+vm.storeId+"/"+vm.prodBarcode+"/"+scanSellVolume, function (r) {
|
|
if (r.code == 0) {
|
|
if (r.code == 0) {
|
|
if(r.goodsDetails.length>1) {
|
|
if(r.goodsDetails.length>1) {
|
|
@@ -735,7 +737,7 @@ let vm = new Vue({
|
|
handle(r.goodsDetails,"add");
|
|
handle(r.goodsDetails,"add");
|
|
vm.openSku = false;
|
|
vm.openSku = false;
|
|
var data = Object.assign({}, JSON.parse(JSON.stringify(r.goodsDetails)));
|
|
var data = Object.assign({}, JSON.parse(JSON.stringify(r.goodsDetails)));
|
|
- console.log("商品详情===>" + JSON.stringify(data));
|
|
|
|
|
|
+ // console.log("商品详情===>" + JSON.stringify(data));
|
|
vm.calGoodsList.push(data);
|
|
vm.calGoodsList.push(data);
|
|
//此时必须异步执行滚动条滑动至底部
|
|
//此时必须异步执行滚动条滑动至底部
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
@@ -751,9 +753,9 @@ let vm = new Vue({
|
|
saveOld:function(){
|
|
saveOld:function(){
|
|
vm.storeId = sessionStorage.getItem("storeId");
|
|
vm.storeId = sessionStorage.getItem("storeId");
|
|
var overflowLi = this.$refs.overflowLi;
|
|
var overflowLi = this.$refs.overflowLi;
|
|
- console.log("vm.$refs.saomiao.value===>" + vm.$refs.saomiao.value);
|
|
|
|
|
|
+ // console.log("vm.$refs.saomiao.value===>" + vm.$refs.saomiao.value);
|
|
let scanSellVolume = calScanSellVolume(vm.$refs.saomiao.value);
|
|
let scanSellVolume = calScanSellVolume(vm.$refs.saomiao.value);
|
|
- console.log("scanSellVolume===>" + scanSellVolume);
|
|
|
|
|
|
+ // console.log("scanSellVolume===>" + scanSellVolume);
|
|
$.get("../goods/detailsOld/"+vm.prodBarcode+"/"+vm.storeId+"/"+scanSellVolume, function (r) {
|
|
$.get("../goods/detailsOld/"+vm.prodBarcode+"/"+vm.storeId+"/"+scanSellVolume, function (r) {
|
|
if (r.code == 0) {
|
|
if (r.code == 0) {
|
|
r.goodsDetails.sellVolume = 1;
|
|
r.goodsDetails.sellVolume = 1;
|
|
@@ -763,7 +765,7 @@ let vm = new Vue({
|
|
handle(r.goodsDetails,"add");
|
|
handle(r.goodsDetails,"add");
|
|
vm.openSku = false;
|
|
vm.openSku = false;
|
|
var data = Object.assign({}, JSON.parse(JSON.stringify(r.goodsDetails)));
|
|
var data = Object.assign({}, JSON.parse(JSON.stringify(r.goodsDetails)));
|
|
- console.log("商品详情=1=>" + JSON.stringify(data));
|
|
|
|
|
|
+ // console.log("商品详情=1=>" + JSON.stringify(data));
|
|
vm.calGoodsList.push(data);
|
|
vm.calGoodsList.push(data);
|
|
//此时必须异步执行滚动条滑动至底部
|
|
//此时必须异步执行滚动条滑动至底部
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
@@ -838,7 +840,7 @@ let vm = new Vue({
|
|
|
|
|
|
},
|
|
},
|
|
selectItem:function(value) {
|
|
selectItem:function(value) {
|
|
- console.log(value);
|
|
|
|
|
|
+ // console.log(value);
|
|
},
|
|
},
|
|
deleteItem:function(value){
|
|
deleteItem:function(value){
|
|
vm.calActivityFlag = false;
|
|
vm.calActivityFlag = false;
|
|
@@ -923,7 +925,7 @@ let vm = new Vue({
|
|
alert("购物车中没有商品");
|
|
alert("购物车中没有商品");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- console.log(vm.pendingOrderMap.size);
|
|
|
|
|
|
+ // console.log(vm.pendingOrderMap.size);
|
|
if(vm.pendingOrderMap.size >= 3){
|
|
if(vm.pendingOrderMap.size >= 3){
|
|
alert("订单挂起最多支持3单");
|
|
alert("订单挂起最多支持3单");
|
|
return;
|
|
return;
|
|
@@ -969,7 +971,7 @@ let vm = new Vue({
|
|
return ;
|
|
return ;
|
|
}
|
|
}
|
|
var pendingObject = vm.pendingOrderMap.get(key);
|
|
var pendingObject = vm.pendingOrderMap.get(key);
|
|
- console.log(pendingObject);
|
|
|
|
|
|
+ // console.log(pendingObject);
|
|
vm.goodsList = pendingObject.goodsList;
|
|
vm.goodsList = pendingObject.goodsList;
|
|
vm.totalPrice = pendingObject.totalPrice;
|
|
vm.totalPrice = pendingObject.totalPrice;
|
|
vm.totalCount = pendingObject.totalCount;
|
|
vm.totalCount = pendingObject.totalCount;
|
|
@@ -990,7 +992,7 @@ let vm = new Vue({
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- console.log("vm.clickFlag==>" + vm.clickFlag);
|
|
|
|
|
|
+ // console.log("vm.clickFlag==>" + vm.clickFlag);
|
|
if (vm.clickFlag && !vm.calActivityFlag) {
|
|
if (vm.clickFlag && !vm.calActivityFlag) {
|
|
// 提示点击
|
|
// 提示点击
|
|
alert("请先计算活动优惠价!");
|
|
alert("请先计算活动优惠价!");
|
|
@@ -1297,9 +1299,9 @@ let vm = new Vue({
|
|
success: function (r) {
|
|
success: function (r) {
|
|
if (r.ticket != null) {
|
|
if (r.ticket != null) {
|
|
// printArea(r.ticket);
|
|
// printArea(r.ticket);
|
|
- console.log("核销打印前,订单号: " + vm.currentOrderNo);
|
|
|
|
|
|
+ // console.log("核销打印前,订单号: " + vm.currentOrderNo);
|
|
var content = getPrintContentOrder(r.ticket, printArea);
|
|
var content = getPrintContentOrder(r.ticket, printArea);
|
|
- console.log("核销打印后,小票码: " + vm.pickUpCode + ",订单号: " + r.ticket.ticketHead.orderId);
|
|
|
|
|
|
+ // console.log("核销打印后,小票码: " + vm.pickUpCode + ",订单号: " + r.ticket.ticketHead.orderId);
|
|
|
|
|
|
}else{
|
|
}else{
|
|
alert("打印小票失败");
|
|
alert("打印小票失败");
|
|
@@ -2068,7 +2070,7 @@ function toPayOrder(payCode){
|
|
'addrUser':addrUser,
|
|
'addrUser':addrUser,
|
|
'status':status,
|
|
'status':status,
|
|
};
|
|
};
|
|
- console.log(JSON.stringify(param));
|
|
|
|
|
|
+ // console.log(JSON.stringify(param));
|
|
vm.parCode = "";
|
|
vm.parCode = "";
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "POST",
|
|
type: "POST",
|
|
@@ -2076,7 +2078,7 @@ function toPayOrder(payCode){
|
|
contentType: "application/json",
|
|
contentType: "application/json",
|
|
data: JSON.stringify(param),
|
|
data: JSON.stringify(param),
|
|
success: function (r) {
|
|
success: function (r) {
|
|
- console.log(r);
|
|
|
|
|
|
+ // console.log(r);
|
|
if (r.code == 0) {
|
|
if (r.code == 0) {
|
|
if (r.resultObj != null) {
|
|
if (r.resultObj != null) {
|
|
$(".form-group input[type=text]").each(function(){
|
|
$(".form-group input[type=text]").each(function(){
|
|
@@ -2084,7 +2086,7 @@ function toPayOrder(payCode){
|
|
})
|
|
})
|
|
// 打印小票码小票
|
|
// 打印小票码小票
|
|
var content = getPrintContent(r.resultObj);
|
|
var content = getPrintContent(r.resultObj);
|
|
- console.log(content);
|
|
|
|
|
|
+ // console.log(content);
|
|
printArea2(content);
|
|
printArea2(content);
|
|
vm.goodsList = [];
|
|
vm.goodsList = [];
|
|
vm.customname = '' ;
|
|
vm.customname = '' ;
|
|
@@ -2131,8 +2133,8 @@ function toRefund(){
|
|
calScanSellVolume = function (prodBarcode) {
|
|
calScanSellVolume = function (prodBarcode) {
|
|
let goodsList = vm.goodsList;
|
|
let goodsList = vm.goodsList;
|
|
|
|
|
|
- console.log("prodBarcode typeof===>" + typeof prodBarcode);
|
|
|
|
- console.log("prodBarcode===>" + prodBarcode);
|
|
|
|
|
|
+ // console.log("prodBarcode typeof===>" + typeof prodBarcode);
|
|
|
|
+ // console.log("prodBarcode===>" + prodBarcode);
|
|
if (goodsList === null || goodsList.length === 0) {
|
|
if (goodsList === null || goodsList.length === 0) {
|
|
return 2;
|
|
return 2;
|
|
}
|
|
}
|
|
@@ -2154,9 +2156,10 @@ calculateOrderPrice = function() {
|
|
let param = {
|
|
let param = {
|
|
'storeId': sessionStorage.getItem("storeId"),
|
|
'storeId': sessionStorage.getItem("storeId"),
|
|
'memberCode': vm.$refs.couponBarCode.value,
|
|
'memberCode': vm.$refs.couponBarCode.value,
|
|
|
|
+ 'useScore': vm.switch1,
|
|
'goodsList' : vm.goodsList
|
|
'goodsList' : vm.goodsList
|
|
};
|
|
};
|
|
- // console.log("请求参数===>" + JSON.stringify(param));
|
|
|
|
|
|
+ console.log("请求参数===>" + JSON.stringify(param));
|
|
|
|
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "POST",
|
|
type: "POST",
|