diff --git a/pages/index/addHangOrder.vue b/pages/index/addHangOrder.vue index b49e473..f15cef0 100644 --- a/pages/index/addHangOrder.vue +++ b/pages/index/addHangOrder.vue @@ -32,7 +32,7 @@ - {{items.productName}}({{items.productSn}})单价:{{items.price}} + {{items.productName}}({{items.productSn}})单价:{{items.discountAmount}} diff --git a/pages/index/customAndSupplierProductDetail.vue b/pages/index/customAndSupplierProductDetail.vue index b328cab..6f670f7 100644 --- a/pages/index/customAndSupplierProductDetail.vue +++ b/pages/index/customAndSupplierProductDetail.vue @@ -4,7 +4,7 @@ - 采购价:{{item.realPrice?item.realPrice:'暂无'}} 总数量:{{item.productCount?item.productCount:'暂无'}} 总价:{{item.shouldPay?item.shouldPay:'暂无'}} + 采购价:{{item.realPrice?item.realPrice:'暂无'}} 总数量:{{item.productCount?item.productCount:'暂无'}} 总价:{{item.shouldPay?item.shouldPay:'暂无'}} 商品规格 @@ -34,7 +34,8 @@ pages: 1, pageNum: 1, userId:'', - type:'' + type:'', + userType:'' } }, filters: { @@ -51,6 +52,7 @@ }, onLoad(option) { this.userId = option.id + this.userType = uni.getStorageSync('type') this.type = option.type this.getList() }, diff --git a/pages/index/dataStatistics.vue b/pages/index/dataStatistics.vue index a062d06..2259be5 100644 --- a/pages/index/dataStatistics.vue +++ b/pages/index/dataStatistics.vue @@ -14,7 +14,7 @@ - 今日利润 + 利润 @@ -50,13 +50,15 @@ return { range:[], shopInfo:{}, - priceList:[] + priceList:[], + type:'' }; }, onShow(){ this.getMonth(); this.getSaleInfo(); this.getList(); + this.type = uni.getStorageSync('type') }, methods: { getSaleInfo() { diff --git a/pages/index/downStearmList.vue b/pages/index/downStearmList.vue index aff8308..b1c6cf6 100644 --- a/pages/index/downStearmList.vue +++ b/pages/index/downStearmList.vue @@ -703,10 +703,13 @@ } .bottom-box { - width: 100%; - position: fixed; - bottom: 0; - display: flex; + width: 100%; + height: 120rpx; + position: fixed; + bottom: 0; + display: flex; + background: #fff; + z-index: 99; } .bottom-left { @@ -774,7 +777,8 @@ .content-right { width: 100%; - overflow-y: scroll; + overflow-y: scroll; + margin-bottom: 150rpx; } .right-box { diff --git a/pages/index/index.vue b/pages/index/index.vue index d34a3bc..83ffebd 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -61,7 +61,7 @@ - + 本周营收统计 @@ -106,14 +106,14 @@ - - diff --git a/pages/index/orderDetail.vue b/pages/index/orderDetail.vue index ff9b216..3d92e67 100644 --- a/pages/index/orderDetail.vue +++ b/pages/index/orderDetail.vue @@ -76,7 +76,7 @@ 备注 - {{ sales.remark == null ?'暂无':sales.remark}} + {{ sales.remark == null ?'':sales.remark}} @@ -543,6 +543,9 @@ '-' + that.list[i].stockLogList1[z] .attributeList) + }else{ + that.list[i].stockLogList1[z].maxNum = that.list[i].stockLogList1[z] + .productCount } } } @@ -560,7 +563,8 @@ } else { this.tui.toast(res.message) } - }) + }) + console.log('刷新',that.list) }, checkBoxChange() { if (this.radio1 == 2) { @@ -582,26 +586,38 @@ if(this.$refs.returnClose.val == ''){ this.tui.toast("金额不能为空") return - } - this.list.forEach(item1 => { - item1.stockLogList1.forEach((item2, index) => { - if (item2.returnCount) { - item2.productCount = item2.returnCount - } else { - item1.stockLogList1.splice(index, 1) - } - - }) - }) + } + + for (var i = 0; i < this.list.length; i++) { + this.list[i].stockLogList = [] + } + for (var i = 0; i < this.list.length; i++) { + for (var m = 0; m < this.list[i].stockLogList1.length; m++) { + if(this.list[i].stockLogList1[m].returnCount && this.list[i].stockLogList1[m].returnCount > 0){ + this.list[i].stockLogList.push(this.list[i].stockLogList1[m]) + } + } + } + console.log(this.list) for (var i = 0; i < this.list.length; i++) { - for (var m = 0; m < this.list[i].stockLogList1.length; m++) { - if (m == 0) { - this.list[i].productCount = this.list[i].stockLogList1[m].productCount - } else { - this.list[i].productCount += this.list[i].stockLogList1[m].productCount + for (var m = 0; m < this.list[i].stockLogList.length; m++) { + this.list[i].stockLogList[m].productCount = this.list[i].stockLogList[m].returnCount + if(this.list[i].stockLogList.length >0){ + if (m == 0) { + this.list[i].productCount = this.list[i].stockLogList[m].productCount + } else { + this.list[i].productCount += this.list[i].stockLogList[m].productCount + } } + + } + this.list[i].stockLogList1 = this.list[i].stockLogList + console.log('长度',this.list[i].stockLogList1.length) + if(this.list[i].stockLogList1.length <= 0){ + this.list[i].productCount = 0 } - } + } + console.log(this.list) this.sales.saleId = this.sales.id; this.sales.province = '' this.sales.city = '' diff --git a/pages/index/peopleList.vue b/pages/index/peopleList.vue index 8a2c26a..1e4c77c 100644 --- a/pages/index/peopleList.vue +++ b/pages/index/peopleList.vue @@ -18,16 +18,16 @@ {{item.name}} - {{item.phone}} + {{item.phone}} - {{item.province + item.city + item.area}} - {{item.address}} + {{item.name == '散客'?'-':item.province + item.city + item.area}} + {{item.name == '散客'?'-':item.address}} - + 编辑 - + 查看明细 @@ -40,7 +40,7 @@ {{item.shippingMethod}} {{item.workerName}} - + 线路查询 @@ -61,9 +61,9 @@ {{item.shippingMethod}} {{item.workerName}} - + - 收费标准 + 线路查询 拨打电话 @@ -81,7 +81,7 @@ {{item.shippingMethod}} {{item.workerName}} - + 收费标准 @@ -268,7 +268,10 @@ //查询拉包工和快递人员的列表 kdyOrlbgList() { this.tui.request("/worker/getWXByCondition", "post", { - ownerCompany: this.companyType, //公司id,如果是快递公司,才需要传 + ownerCompany: this.companyType, //公司id,如果是快递公司,才需要传 + searchStr:this.searchName, + pageNum: 1, + pageSize: 10 }, false, false).then((res) => { if (res.code == 200) { this.popleList = res.result; @@ -291,10 +294,10 @@ }) }, //打开弹出层 - toggle(type,id) { - uni.setStorageSync("transCompany", id) + toggle(type,item) { + uni.setStorageSync("transCompany", item.shippingMethodId || item.id) uni.navigateTo({ - url: "/package1/other/logisticsAddress" + url: "/package1/other/logisticsAddress?type=kaidan" }) }, //关闭弹出层 diff --git a/pages/index/shareStyle.vue b/pages/index/shareStyle.vue index 816fb58..6d1c6ec 100644 --- a/pages/index/shareStyle.vue +++ b/pages/index/shareStyle.vue @@ -24,7 +24,7 @@ {{item.productSn}} - {{item.purchasePrice}} + {{item.purchasePrice?item.purchasePrice:'暂无'}} 采购价 diff --git a/pages/inventory/gategory.vue b/pages/inventory/gategory.vue index 0916043..519507a 100644 --- a/pages/inventory/gategory.vue +++ b/pages/inventory/gategory.vue @@ -28,20 +28,29 @@ - + 提示 - {{goodsList[0].productName}}商品有以下库存,确认继续删除吗? - - - - - {{item.attributeList | sliceMsg}} {{item.stockCount}} + {{goodsList[0].productName}}商品有以下库存,确认继续删除吗? + + + + 商品规格 + 数量 + + + + + {{item.attributeList | sliceMsg}} + + + {{item.stockCount}} + { - if (res1.code == 200) { - if(res1.result.length > 0){ - uni.showModal({ - title: "提示", - content: "此分类已经维护了子分类,确定继续删除吗?", - success: function(res2) { - if (res2.confirm) { - that.delItemModal() - } - } - }) - }else{ - that.show = true - } - } + } else { + this.tui.request("/app/productAttribute/selectByCategoryId", "POST", { + categoryId: this.delItems.id + }, false, true).then((res1) => { + if (res1.code == 200) { + if (res1.result.length > 0) { + uni.showModal({ + title: "提示", + content: "此分类已经维护了子分类,确定继续删除吗?", + success: function(res2) { + if (res2.confirm) { + that.delItemModal() + } + } + }) + } else { + that.show = true + } + } }).catch((res) => {}) } } diff --git a/pages/inventory/gategoryLow.vue b/pages/inventory/gategoryLow.vue index b0246a1..a16f25d 100644 --- a/pages/inventory/gategoryLow.vue +++ b/pages/inventory/gategoryLow.vue @@ -31,6 +31,42 @@ + + + + + 提示 + + {{goodsList[0].productName}}商品有以下库存,确认继续删除吗? + + + + 商品规格 + 数量 + + + + + {{item.attributeList | sliceMsg}} + + + {{item.stockCount}} + + + + + + + + 再想想 + + + 确认删除 + + + @@ -52,12 +88,25 @@ delType: '', showList: {}, dialogTit: '输入分类名', - categoryId:'', + categoryId:'', + goodsList:[] // type: 'center', } }, computed: { + }, + filters: { + sliceMsg(val) { + var name = '' + if (typeof(val) == 'string') { + let newObj = JSON.parse(val) + for (let as in newObj) { + name += newObj[as] + '/' + } + } + return name; + } }, onLoad(options) { this.categoryId = options.id @@ -96,6 +145,42 @@ this.tui.toast(res.message) } }).catch((res) => {}) + }, + //查询分类下有没有库存 + getTypeToNum() { + let that = this; + this.tui.request("/app/stock/getlistByAttributeList", "post", { + categoryId: this.categoryId, + attributeList:this.delItems.attributeName || this.delItems.value, + }, false, true).then((res) => { + if (res.code == 200) { + if (res.result != '') { + this.goodsList = res.result + this.$refs.carPopup.open('bottom') + } else { + that.show = true + // this.tui.request("/app/productAttribute/selectByCategoryId", "POST", { + // categoryId: this.delItems.id + // }, false, true).then((res1) => { + // if (res1.code == 200) { + // if (res1.result.length > 0) { + // uni.showModal({ + // title: "提示", + // content: "此分类已经维护了子分类,确定继续删除吗?", + // success: function(res2) { + // if (res2.confirm) { + // that.delItemModal() + // } + // } + // }) + // } else { + // that.show = true + // } + // } + // }).catch((res) => {}) + } + } + }).catch((res) => {}) }, // 获取属性名 getProductAttribute() { @@ -305,7 +390,8 @@ uni.showToast({ title: "删除成功", icon: 'none' - }) + }) + this.$refs.carPopup.close() } else { uni.showToast({ title: "删除失败", @@ -325,7 +411,8 @@ uni.showToast({ title: "删除成功", icon: 'none' - }) + }) + this.$refs.carPopup.close() } else { uni.showToast({ title: "删除失败", @@ -345,7 +432,8 @@ uni.showToast({ title: "删除成功", icon: 'none' - }) + }) + this.$refs.carPopup.close() } else { uni.showToast({ title: "删除失败", @@ -357,8 +445,9 @@ }, delItem(item, type) { this.delType = type; - this.delItems = item; - this.show = true; + this.delItems = item; + this.getTypeToNum() + // this.show = true; }, } } @@ -428,5 +517,67 @@ .content-low:hover { background: #eee; + } + .popup-content { + align-items: center; + justify-content: center; + padding: 15px; + height: 1200rpx; + background-color: #fff; + margin-bottom: 30rpx; + overflow: scroll; + } + + .popup-container { + width: 100%; + background: #fff; + height: 50rpx; + } + + .checkList { + display: flex; + height: 50rpx; + font-size: 28rpx; + line-height: 50rpx; + margin: 20rpx 0; + } + + .checkList-box { + height: 50rpx; + width: 60%; + } + + .popup-bottom { + width: 95%; + height: 100rpx; + position: fixed; + bottom: 0; + left: 2.5%; + display: flex; + z-index: 99; + background: #fff; + } + + .popup-bottom-left { + width: 50%; + line-height: 80rpx; + } + + .popup-bottom-right { + width: 50%; + line-height: 100rpx; + } + + .bottom-btn { + width: 70%; + line-height: 35px; + height: 70rpx; + text-align: center; + /* margin-top: 10rpx; */ + color: #fff; + font-size: 28rpx; + margin: 0 auto; + background: linear-gradient(90deg, #60F3FF, #088FEB); + border-radius: 70rpx; } \ No newline at end of file diff --git a/pages/inventory/getProductIdToList.vue b/pages/inventory/getProductIdToList.vue index 7eec860..1aacb5a 100644 --- a/pages/inventory/getProductIdToList.vue +++ b/pages/inventory/getProductIdToList.vue @@ -24,7 +24,7 @@ - 采购价:{{item.purchaseDetails[0].purchasePrice?item.purchaseDetails[0].purchasePrice:'暂无'}} 总数量:{{item.purchase.totalAmount?item.purchase.totalAmount:'暂无'}} 总价:{{item.purchase.shouldPay?item.purchase.shouldPay:'暂无'}} + 采购价:{{item.purchaseDetails[0].purchasePrice?item.purchaseDetails[0].purchasePrice:'暂无'}} 总数量:{{item.purchase.totalAmount?item.purchase.totalAmount:'暂无'}} 总价:{{item.purchase.shouldPay?item.purchase.shouldPay:'暂无'}} 商品规格 @@ -56,7 +56,8 @@ pages: 1, pageNum: 1, productId:'', - type:'' + type:'', + userType:'' } }, filters: { @@ -73,6 +74,7 @@ }, onLoad(option) { this.productId = option.id + this.userType = uni.getStorageSync('type') this.type = option.type this.getWaitStorage() },