|
|
@ -18,7 +18,9 @@ |
|
|
<view class="shop-box" style="border-bottom: 1px solid #eee;margin-bottom: 20rpx;"> |
|
|
<view class="shop-box" style="border-bottom: 1px solid #eee;margin-bottom: 20rpx;"> |
|
|
<view style="height: 80rpx;display: flex;padding: 5px 0;border-bottom: 1px solid #eee;"> |
|
|
<view style="height: 80rpx;display: flex;padding: 5px 0;border-bottom: 1px solid #eee;"> |
|
|
<view @tap.stop="scanCodeAdd" style="width: 33.33%;text-align: center;line-height: 70rpx;"> |
|
|
<view @tap.stop="scanCodeAdd" style="width: 33.33%;text-align: center;line-height: 70rpx;"> |
|
|
<uni-icons type="scan" size="12"></uni-icons> |
|
|
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/b3d67b975feb44edb12f0fd0a6e1afdf.png" |
|
|
|
|
|
alt="" style="width: 28%;height: 77% !important;padding-right: 20rpx;" @tap.stop="checksaoma()" /> |
|
|
|
|
|
<uni-icons type="scan" size="12"></uni-icons> |
|
|
<text>扫一扫</text> |
|
|
<text>扫一扫</text> |
|
|
</view> |
|
|
</view> |
|
|
<view @tap.stop="isSnList('')" |
|
|
<view @tap.stop="isSnList('')" |
|
|
@ -954,6 +956,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</uni-popup> |
|
|
</uni-popup> |
|
|
|
|
|
|
|
|
<!-- 弹出生成货号 --> |
|
|
<!-- 弹出生成货号 --> |
|
|
<uni-popup ref="SNDialog" background-color="#fff" :is-mask-click="true"> |
|
|
<uni-popup ref="SNDialog" background-color="#fff" :is-mask-click="true"> |
|
|
<view class="type-popup" style="max-height: 1000rpx;overflow: scroll;margin-bottom: 0;border-radius: 0;"> |
|
|
<view class="type-popup" style="max-height: 1000rpx;overflow: scroll;margin-bottom: 0;border-radius: 0;"> |
|
|
@ -1215,6 +1218,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</uni-popup> |
|
|
</uni-popup> |
|
|
|
|
|
|
|
|
<view class="mask-model" v-if="methodMask"> |
|
|
<view class="mask-model" v-if="methodMask"> |
|
|
<view>实收金额计算方式</view> |
|
|
<view>实收金额计算方式</view> |
|
|
<view> |
|
|
<view> |
|
|
@ -1228,6 +1232,20 @@ |
|
|
<u-keyboard ref="uKeyboard" @confirm='keyboardConfirm' @cancel="keyCancel" @close="keyCancel" |
|
|
<u-keyboard ref="uKeyboard" @confirm='keyboardConfirm' @cancel="keyCancel" @close="keyCancel" |
|
|
@change="valChange" @backspace="backspace" :overlay='true' :closeOnClickOverlay='true' |
|
|
@change="valChange" @backspace="backspace" :overlay='true' :closeOnClickOverlay='true' |
|
|
:defaultText="keyboardNum" mode="price" :show="showPrice"></u-keyboard> |
|
|
:defaultText="keyboardNum" mode="price" :show="showPrice"></u-keyboard> |
|
|
|
|
|
|
|
|
|
|
|
<uni-popup ref="saomaType" background-color="#fff"> |
|
|
|
|
|
<view class="popup-pay-content"> |
|
|
|
|
|
<view class="popup-pay-title"> |
|
|
|
|
|
<text>选择开单方式</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="popup-pay-container" @tap="checkSaomaType('0')"> |
|
|
|
|
|
<text style="display: inline-block">销售</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="popup-pay-container" @tap="checkSaomaType('1')"> |
|
|
|
|
|
<text style="display: inline-block">退货</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</uni-popup> |
|
|
<!-- 弹出多图轮播 --> |
|
|
<!-- 弹出多图轮播 --> |
|
|
<uni-popup ref="showImgDiaLog" background-color="#fff"> |
|
|
<uni-popup ref="showImgDiaLog" background-color="#fff"> |
|
|
<view class="showImg-box"> |
|
|
<view class="showImg-box"> |
|
|
@ -1380,6 +1398,7 @@ |
|
|
voiceType:'new', |
|
|
voiceType:'new', |
|
|
current: 0, |
|
|
current: 0, |
|
|
lunbocurrent: 4, |
|
|
lunbocurrent: 4, |
|
|
|
|
|
saomaotype:'0', |
|
|
voiceText: ' ', |
|
|
voiceText: ' ', |
|
|
voiceText1:' ', |
|
|
voiceText1:' ', |
|
|
discCurrent: '', //折扣 |
|
|
discCurrent: '', //折扣 |
|
|
@ -1723,6 +1742,12 @@ |
|
|
this.oneGoodsId = id |
|
|
this.oneGoodsId = id |
|
|
this.$refs.returnDialog.open('bottom') |
|
|
this.$refs.returnDialog.open('bottom') |
|
|
}, |
|
|
}, |
|
|
|
|
|
checkSaomaType(type){ |
|
|
|
|
|
let that = this; |
|
|
|
|
|
this.saomaotype = type |
|
|
|
|
|
this.$refs.saomaType.close() |
|
|
|
|
|
this.scanCodeAdd() |
|
|
|
|
|
}, |
|
|
onePecsReturnToCarList(){ |
|
|
onePecsReturnToCarList(){ |
|
|
let data = { |
|
|
let data = { |
|
|
attributeList: '{"颜色":"均色","尺码":"均码"}', |
|
|
attributeList: '{"颜色":"均色","尺码":"均码"}', |
|
|
@ -2386,6 +2411,9 @@ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
checksaoma(){ |
|
|
|
|
|
this.$refs.saomaType.open() |
|
|
|
|
|
}, |
|
|
AiHandleData() { |
|
|
AiHandleData() { |
|
|
let that = this; |
|
|
let that = this; |
|
|
for (let i = 0; i < this.carList1.length; i++) { |
|
|
for (let i = 0; i < this.carList1.length; i++) { |
|
|
@ -3098,7 +3126,7 @@ |
|
|
if (this.isPlusAndMinus == false) { |
|
|
if (this.isPlusAndMinus == false) { |
|
|
for (var i = 0; i < this.temporaryList.length; i++) { |
|
|
for (var i = 0; i < this.temporaryList.length; i++) { |
|
|
if (this.evalue.length == 0) { |
|
|
if (this.evalue.length == 0) { |
|
|
if(Number(this.allChangeNum) > this.temporaryList[i].productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400')){ |
|
|
if(Number(this.allChangeNum) > this.temporaryList[i].productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400' || this.shopId == '1818888277105709056')){ |
|
|
this.tui.toast(this.temporaryList[i].name + "已超出可售数量",300) |
|
|
this.tui.toast(this.temporaryList[i].name + "已超出可售数量",300) |
|
|
}else{ |
|
|
}else{ |
|
|
this.temporaryList[i].productCount = Number(this.allChangeNum) |
|
|
this.temporaryList[i].productCount = Number(this.allChangeNum) |
|
|
@ -3109,7 +3137,7 @@ |
|
|
} else { |
|
|
} else { |
|
|
for (var j = 0; j < this.evalue.length; j++) { |
|
|
for (var j = 0; j < this.evalue.length; j++) { |
|
|
if (this.evalue[j] == this.temporaryList[i].name) { |
|
|
if (this.evalue[j] == this.temporaryList[i].name) { |
|
|
if(Number(this.allChangeNum) > this.temporaryList[i].productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400')){ |
|
|
if(Number(this.allChangeNum) > this.temporaryList[i].productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400' || this.shopId == '1818888277105709056')){ |
|
|
this.tui.toast(this.temporaryList[i].name + "已超出可售数量",300) |
|
|
this.tui.toast(this.temporaryList[i].name + "已超出可售数量",300) |
|
|
}else{ |
|
|
}else{ |
|
|
this.temporaryList[i].productCount = Number(this.allChangeNum) |
|
|
this.temporaryList[i].productCount = Number(this.allChangeNum) |
|
|
@ -3192,7 +3220,7 @@ |
|
|
if (this.temporaryList[i].productCount == undefined) { |
|
|
if (this.temporaryList[i].productCount == undefined) { |
|
|
this.temporaryList[i].productCount = 1 |
|
|
this.temporaryList[i].productCount = 1 |
|
|
} else { |
|
|
} else { |
|
|
if(this.temporaryList[i].productCount + 1 > this.temporaryList[i].productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400')){ |
|
|
if(this.temporaryList[i].productCount + 1 > this.temporaryList[i].productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400' || this.shopId == '1818888277105709056')){ |
|
|
this.tui.toast(this.temporaryList[i].name + "已超出可售数量",300) |
|
|
this.tui.toast(this.temporaryList[i].name + "已超出可售数量",300) |
|
|
}else{ |
|
|
}else{ |
|
|
this.temporaryList[i].productCount++ |
|
|
this.temporaryList[i].productCount++ |
|
|
@ -3204,7 +3232,7 @@ |
|
|
if (this.temporaryList[i].productCount == undefined) { |
|
|
if (this.temporaryList[i].productCount == undefined) { |
|
|
this.temporaryList[i].productCount = 1 |
|
|
this.temporaryList[i].productCount = 1 |
|
|
} else { |
|
|
} else { |
|
|
if(this.temporaryList[i].productCount + 1 > this.temporaryList[i].productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400')){ |
|
|
if(this.temporaryList[i].productCount + 1 > this.temporaryList[i].productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400' || this.shopId == '1818888277105709056')){ |
|
|
this.tui.toast(this.temporaryList[i].name + "已超出可售数量",300) |
|
|
this.tui.toast(this.temporaryList[i].name + "已超出可售数量",300) |
|
|
}else{ |
|
|
}else{ |
|
|
this.temporaryList[i].productCount++ |
|
|
this.temporaryList[i].productCount++ |
|
|
@ -3625,17 +3653,8 @@ |
|
|
value1 += '"' + '颜色' + '":"' + data[i].value + '",' |
|
|
value1 += '"' + '颜色' + '":"' + data[i].value + '",' |
|
|
value1 += '"' + '尺码' + '":"' + dataJ[j].value + '"' |
|
|
value1 += '"' + '尺码' + '":"' + dataJ[j].value + '"' |
|
|
value1 += "}" |
|
|
value1 += "}" |
|
|
if(this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400'){ |
|
|
value.push(value1) |
|
|
for(let a = 0;a<this.pecsList.length;a++){ |
|
|
this.evalue.push(name) |
|
|
if(value1 == this.pecsList[a].attributeList && (this.pecsList[a].stockCount != null && Number(this.pecsList[a].stockCount) > 0)){ |
|
|
|
|
|
value.push(value1) |
|
|
|
|
|
this.evalue.push(name) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
value.push(value1) |
|
|
|
|
|
this.evalue.push(name) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -3780,7 +3799,7 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
numChange(e, index) { |
|
|
numChange(e, index) { |
|
|
if(Number(e) > this.temporaryList[index].productCount && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400')){ |
|
|
if(Number(e) > this.temporaryList[index].productCount && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400' || this.shopId == '1818888277105709056')){ |
|
|
this.tui.toast("已超出可售数量",300) |
|
|
this.tui.toast("已超出可售数量",300) |
|
|
}else{ |
|
|
}else{ |
|
|
this.temporaryList[index].productCount = Number(e) |
|
|
this.temporaryList[index].productCount = Number(e) |
|
|
@ -3816,7 +3835,7 @@ |
|
|
}, |
|
|
}, |
|
|
mapnumChange(e, id, id1) { |
|
|
mapnumChange(e, id, id1) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
if(!this.carList.get(id).isNew && e > this.carList.get(id).stockLogList.get(id1).productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400')){ |
|
|
if(!this.carList.get(id).isNew && e > this.carList.get(id).stockLogList.get(id1).productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400' || this.shopId == '1818888277105709056')){ |
|
|
this.tui.toast("已超出可售数量",300) |
|
|
this.tui.toast("已超出可售数量",300) |
|
|
}else{ |
|
|
}else{ |
|
|
this.carList.get(id).productCount = 0 |
|
|
this.carList.get(id).productCount = 0 |
|
|
@ -3886,7 +3905,7 @@ |
|
|
this.temporaryChange() |
|
|
this.temporaryChange() |
|
|
}, |
|
|
}, |
|
|
mapPlusNum(index) { |
|
|
mapPlusNum(index) { |
|
|
if(this.temporaryList[index].productCount + 1 > this.temporaryList[index].productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400')){ |
|
|
if(this.temporaryList[index].productCount + 1 > this.temporaryList[index].productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400' || this.shopId == '1818888277105709056')){ |
|
|
this.tui.toast("已超出可售数量",300) |
|
|
this.tui.toast("已超出可售数量",300) |
|
|
}else{ |
|
|
}else{ |
|
|
this.temporaryList[index].productCount++ |
|
|
this.temporaryList[index].productCount++ |
|
|
@ -3982,7 +4001,7 @@ |
|
|
}, |
|
|
}, |
|
|
onePlusNum(index, index1) { |
|
|
onePlusNum(index, index1) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
if(!this.carList.get(index).isNew && this.carList.get(index).stockLogList.get(index1).productCount + 1 > this.carList.get(index).stockLogList.get(index1).productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400')){ |
|
|
if(!this.carList.get(index).isNew && this.carList.get(index).stockLogList.get(index1).productCount + 1 > this.carList.get(index).stockLogList.get(index1).productNum && (this.shopId == '1838094297858183168' || this.shopId == '1811579958284390400' || this.shopId == '1818888277105709056')){ |
|
|
this.tui.toast("已超出可售数量") |
|
|
this.tui.toast("已超出可售数量") |
|
|
}else{ |
|
|
}else{ |
|
|
this.carList.get(index).stockLogList.get(index1).productCount++ |
|
|
this.carList.get(index).stockLogList.get(index1).productCount++ |
|
|
@ -8638,18 +8657,21 @@ |
|
|
uni.scanCode({ |
|
|
uni.scanCode({ |
|
|
success: (res) => { |
|
|
success: (res) => { |
|
|
if (res.scanType == "QR_CODE") { //二维码 |
|
|
if (res.scanType == "QR_CODE") { //二维码 |
|
|
if(res.result.split(',').length > 2){ |
|
|
if(res.result.split(',').length > 2){ |
|
|
that.attrBuilt = decodeURIComponent(res.result.split(',')[2].split('-')[0])+'-'+decodeURIComponent(res.result.split(',')[2].split('-')[1]) |
|
|
that.attrBuilt = decodeURIComponent(res.result.split(',')[2].split('-')[0])+'-'+decodeURIComponent(res.result.split(',')[2].split('-')[1]) |
|
|
} |
|
|
} |
|
|
let shopId = base.decode(res.result.split(',')[1]) |
|
|
let shopId = base.decode(res.result.split(',')[1]) |
|
|
if (shopId == uni.getStorageSync('shopId').substring('10','12')) { |
|
|
if (shopId == uni.getStorageSync('shopId').substring('10','12')) { |
|
|
that.productId = base.decode(res.result.split(',')[0]) |
|
|
that.productId = base.decode(res.result.split(',')[0]) |
|
|
that.toggle('bottom', base.decode(res.result.split(',')[0])); |
|
|
that.toggle('bottom', base.decode(res.result.split(',')[0])); |
|
|
|
|
|
setTimeout(res => { |
|
|
|
|
|
that.scanCodeAdd() |
|
|
|
|
|
}, 1100) |
|
|
} else { |
|
|
} else { |
|
|
setTimeout(res => { |
|
|
setTimeout(res => { |
|
|
that.tui.toast('您的店铺中暂无该商品!') |
|
|
that.tui.toast('您的店铺中暂无该商品!') |
|
|
}, 1000) |
|
|
}, 1000) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
that.tui.request("/app/product/getByBarcode", "POST", { |
|
|
that.tui.request("/app/product/getByBarcode", "POST", { |
|
|
@ -8670,7 +8692,7 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
that.tui.toast(res.message) |
|
|
that.tui.toast(res.message) |
|
|
} |
|
|
} |
|
|
@ -8678,7 +8700,14 @@ |
|
|
that.tui.toast(res) |
|
|
that.tui.toast(res) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
uni.vibrateLong({ |
|
|
|
|
|
success: function () { |
|
|
|
|
|
console.log('震动成功'); |
|
|
|
|
|
}, |
|
|
|
|
|
fail: function () { |
|
|
|
|
|
console.log('震动失败'); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
fail: (res) => { |
|
|
fail: (res) => { |
|
|
console.log('扫描失败',res) |
|
|
console.log('扫描失败',res) |
|
|
@ -10256,8 +10285,11 @@ |
|
|
this.tui.toast('失败了') |
|
|
this.tui.toast('失败了') |
|
|
} |
|
|
} |
|
|
//this.getKCList(res1.result.stock) |
|
|
//this.getKCList(res1.result.stock) |
|
|
that.$nextTick(() => { |
|
|
that.$nextTick(() => { |
|
|
let productcount1 = 1 |
|
|
let productcount1 = 1 |
|
|
|
|
|
if(that.saomaotype == '1'){ |
|
|
|
|
|
productcount1 = -1 |
|
|
|
|
|
} |
|
|
let stockcount = null |
|
|
let stockcount = null |
|
|
if(this.pecsList.length == 1){ |
|
|
if(this.pecsList.length == 1){ |
|
|
attr = this.pecsList[0].attributeList |
|
|
attr = this.pecsList[0].attributeList |
|
|
@ -10273,7 +10305,7 @@ |
|
|
if(that.carList.get(id).stockLogList.has(attr)){ |
|
|
if(that.carList.get(id).stockLogList.has(attr)){ |
|
|
let oldProductCount = that.carList.get(id).stockLogList.get(attr).productCount |
|
|
let oldProductCount = that.carList.get(id).stockLogList.get(attr).productCount |
|
|
if(oldProductCount != undefined){ |
|
|
if(oldProductCount != undefined){ |
|
|
productcount1 += Number(oldProductCount) |
|
|
productcount1 = productcount1 + Number(oldProductCount) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -11739,6 +11771,7 @@ |
|
|
|
|
|
|
|
|
this.tui.request(url, "post", this.sellObj, false, false).then((res) => { |
|
|
this.tui.request(url, "post", this.sellObj, false, false).then((res) => { |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
|
|
|
that.saomaotype = '' |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: "开单成功", |
|
|
title: "开单成功", |
|
|
icon: 'none' |
|
|
icon: 'none' |
|
|
@ -12257,7 +12290,7 @@ |
|
|
this.khData = res.result.records[0] |
|
|
this.khData = res.result.records[0] |
|
|
this.khName = { |
|
|
this.khName = { |
|
|
id: res.result.records[0].id, |
|
|
id: res.result.records[0].id, |
|
|
name: res.result.records[0].name, |
|
|
name: res.result.records[0].name, |
|
|
noEarn: res.result.records[0].noEarn, |
|
|
noEarn: res.result.records[0].noEarn, |
|
|
categoryId: res.result.records[0].categoryId |
|
|
categoryId: res.result.records[0].categoryId |
|
|
} |
|
|
} |
|
|
@ -12278,7 +12311,7 @@ |
|
|
this.khData = res.result |
|
|
this.khData = res.result |
|
|
this.khName = { |
|
|
this.khName = { |
|
|
id: res.result.userId, |
|
|
id: res.result.userId, |
|
|
name: res.result.userName, |
|
|
name: this.khName.name, |
|
|
noEarn: res.result.amountOwed, |
|
|
noEarn: res.result.amountOwed, |
|
|
categoryId: res.result.categoryId |
|
|
categoryId: res.result.categoryId |
|
|
} |
|
|
} |
|
|
|