wangfukang 3 years ago
parent
commit
2a32b31249
  1. 12
      pages/index/downStearmList.vue
  2. 18
      pages/index/shareStyle.vue
  3. 13
      pages/inventory/goodsList1.vue

12
pages/index/downStearmList.vue

@ -525,7 +525,7 @@
province: this.addressObj.province,
receiveAddress: that.formData.address,
totalAmount: that.zPrice, //应付金额
shopId: this.shopId
shopId: this.shopId,
},
saleDetailList: this.carList
}
@ -580,7 +580,15 @@
if (res.code == 200) {
this.shopList = res.result.shareList.records
this.priceType = res.result.share.priceType
this.shopId = res.result.shareList.records[0].shopId
this.shopId = res.result.shareList.records[0].shopId
for(var i= 0;i<this.shopList.length;i++){
if(res.result.share.priceType == 1){ //批发价
this.shopList[i].discountAmount = this.shopList[i].wholesalePrice
}else{ //零售
this.shopList[i].discountAmount = this.shopList[i].price
}
}
} else {
this.tui.toast(res.message)
}

18
pages/index/shareStyle.vue

@ -12,7 +12,7 @@
</view>
</view>
<view class="content-right">
<view class="right-box" v-for="(item,index) in goodsList" :key="index">
<view class="right-box" v-for="(item,index) in goodsList" :key="index" v-if="item.delFlag">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask"></view>
<view class="box-left">
@ -163,13 +163,18 @@
uni.redirectTo({
url: "/pages/index/downStearmList?khid=" + options.khid
})
}else{
this.type = uni.getStorageSync('type')
this.getGategoryList()
}
this.type = uni.getStorageSync('type')
this.getGategoryList()
},
methods: {
//初始化获取分类列表
getGategoryList() {
getGategoryList() {
this.shopList = []
this.indexList = []
this.goodsList = []
this.tui.request("/app/productCategory/list", "get", {}, false, true).then((res) => {
if (res.code == 200) {
this.indexList = res.result;
@ -220,7 +225,7 @@
//顶部搜索框
search(res) {
this.searchName = res.value
this.getShareList()
this.getGategoryList()
},
//未入库遮罩
clickMask() {
@ -239,7 +244,8 @@
}
}
this.categoryId = this.shopList[index].id
this.goodsList = this.shopList[index]
this.goodsList = this.shopList[index]
console.log(this.goodsList)
},
//选中商品
checkboxChange(item) {

13
pages/inventory/goodsList1.vue

@ -1145,7 +1145,8 @@
uni.showToast({
title: "开单成功",
icon: 'none'
})
})
console.log(this.carList)
setTimeout(res => {
this.$refs.printerPopup.open('center')
}, 1000)
@ -1165,8 +1166,14 @@
//打印小票
onPrint(opt) {
let that = this;
that.yNum = 150
let strCmd = blesdk.CreatCPCLPage(600, 2040, 1, 0);
that.yNum = 150
let heightNum = 300
heightNum += this.carList.size * 40
this.carList.forEach(function(value, key) {
heightNum += value.stockLogList.size * 30
})
let strCmd = blesdk.CreatCPCLPage(600, heightNum, 1, 0);
strCmd += blesdk.addCPCLSETMAG(2, 2)
blesdk.addCPCLSETBOLD('bold')
strCmd += blesdk.addCPCLLocation(2);

Loading…
Cancel
Save