From 616df3fbc047fcae9abfc4a15acb59b62200bcbf Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Mon, 20 Nov 2023 10:27:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E5=A0=86bug=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/billing/changeGoods1.vue | 7 +- pages/index/index.vue | 19 +++- pages/index/shareStyle.vue | 8 +- pages/index/waitStorage.vue | 163 +++++++++++++++------------- pages/inventory/addinventory.vue | 29 +++-- pages/inventory/changeGoods1.vue | 2 +- pages/inventory/inventory.vue | 8 +- pages/inventory/inventoryDetail.vue | 8 +- 8 files changed, 140 insertions(+), 104 deletions(-) diff --git a/pages/billing/changeGoods1.vue b/pages/billing/changeGoods1.vue index 24cac91..7680c0f 100644 --- a/pages/billing/changeGoods1.vue +++ b/pages/billing/changeGoods1.vue @@ -23,7 +23,7 @@ {{item.productName}} {{item.productSn}} - + {{item.purchasePrice}} 采购价 @@ -201,9 +201,10 @@ purchasePrice: 0, zPrice: 0, zNum: 0, - storageType: 0, + storageType: '', carNum: 0, - carType: 0 + carType: 0, + type:'', } }, onLoad() { diff --git a/pages/index/index.vue b/pages/index/index.vue index 68e5e12..dd45ef4 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -102,9 +102,9 @@ arrow-direction="left"> - - @@ -133,7 +133,8 @@ '22222', '33333', '34567' - ], + ], + type:'', src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg', inventoryList: [], settingShow: false, @@ -189,12 +190,16 @@ val == null || undefined ? '暂无' : val return val; } + }, + onShow(){ + this.shopName = uni.getStorageSync('shopName') + this.type = uni.getStorageSync('type') }, onLoad() { this.getSaleInfo() this.getServerData(); this.getOrderInfoList(); - this.shopName = uni.getStorageSync('shopName') + }, methods: { getSaleInfo() { @@ -298,6 +303,12 @@ }, //首页头部四个按钮的菜单 goSonPage(url){ + if(url=='/pages/index/waitStorage?inStorageStatus=0'){ + if(this.type!= 0){ + this.tui.toast('暂无查看权限!') + return; + } + } uni.navigateTo({ url: url }) diff --git a/pages/index/shareStyle.vue b/pages/index/shareStyle.vue index a96e5fd..27fdb10 100644 --- a/pages/index/shareStyle.vue +++ b/pages/index/shareStyle.vue @@ -21,7 +21,7 @@ {{item.productName}} {{item.productSn}} - + {{item.purchasePrice}} 采购价 @@ -114,7 +114,8 @@ id: '', carList:[], carNum:0, - carType:0 + carType:0, + type:'' } }, created() { @@ -126,7 +127,8 @@ uni.redirectTo({ url: "/pages/index/downStearmList?khid=" + options.khid }) - } + } + this.type = uni.getStorageSync('type') this.getGategoryList() }, methods: { diff --git a/pages/index/waitStorage.vue b/pages/index/waitStorage.vue index e21a001..df991e8 100644 --- a/pages/index/waitStorage.vue +++ b/pages/index/waitStorage.vue @@ -1,25 +1,31 @@ @@ -35,33 +41,35 @@ }, data() { return { - list: [], - inStorageStatus:'', - supplierName:'', - startDate:'', - endDate:'' - // status: 'loadmore', - // page: 1, + list: [], + inStorageStatus: '', + supplierName: '', + startDate: '', + endDate: '', + type: '' + // status: 'loadmore', + // page: 1, // totalPages: 0, } - }, - // onReachBottom() { - // if (this.page >= this.totalPages) return; - // this.status = 'loading'; - // this.page = ++this.page; - // this.getList(); + }, + // onReachBottom() { + // if (this.page >= this.totalPages) return; + // this.status = 'loading'; + // this.page = ++this.page; + // this.getList(); // }, - onLoad(option) { + onLoad(option) { this.inStorageStatus = option.inStorageStatus || '' this.getList() + this.type = uni.getStorageSync('type') }, methods: { getList() { this.tui.request("/app/purchase/list", "POST", { - inStorageStatus:this.inStorageStatus, - supplierName:this.supplierName, - startDate:this.startDate, - endDate:this.endDate + inStorageStatus: this.inStorageStatus, + supplierName: this.supplierName, + startDate: this.startDate, + endDate: this.endDate }, false, false).then((res) => { if (res.code == 200) { this.list = res.result @@ -69,49 +77,50 @@ this.tui.toast(res.message) } }) - }, - returnPrice(item){ - uni.navigateTo({ - url: '/pages/index/waitStorageDetail?id='+ item.id - }) + }, + returnPrice(item) { + uni.navigateTo({ + url: '/pages/index/waitStorageDetail?id=' + item.id + }) } } } \ No newline at end of file diff --git a/pages/inventory/addinventory.vue b/pages/inventory/addinventory.vue index 297fbdc..b6badc5 100644 --- a/pages/inventory/addinventory.vue +++ b/pages/inventory/addinventory.vue @@ -55,25 +55,25 @@ - + 应付金额 - + 已付金额 - + 欠款 - + 其他费用 @@ -189,7 +189,8 @@ columns: [], keyList: [], temporaryList: [], - zNum: 0 + zNum: 0, + type:'' } }, filters: { @@ -268,7 +269,8 @@ this.carList.forEach(function(value, key) { that.totalAmount += value.productCount }) - this.noPay = this.shouldPay + this.noPay = this.shouldPay + this.type = uni.getStorageSync('type') }, onLoad() { @@ -518,11 +520,18 @@ }) }, inventorySubmit() { - if (this.khName == '' || this.carList == '') { - uni.showToast({ - title: "信息填写完成后入库!", - icon: 'none' + if (this.khName == '' || this.carList == '') { + uni.showToast({ + title: "信息填写完成后入库!", + icon: 'none' }) + }else{ + if(type==0 && this.shouldPay == 0){ + uni.showToast({ + title: "管理员必须维护价格!", + icon: 'none' + }) + } } let that = this; let purchase = { diff --git a/pages/inventory/changeGoods1.vue b/pages/inventory/changeGoods1.vue index f90fceb..46bd04c 100644 --- a/pages/inventory/changeGoods1.vue +++ b/pages/inventory/changeGoods1.vue @@ -23,7 +23,7 @@ {{item.productSn}} - {{item.purchasePrice}} + {{item.purchasePrice == null ?'待入库':item.purchasePrice}} 采购价 diff --git a/pages/inventory/inventory.vue b/pages/inventory/inventory.vue index bf5ce16..99c9c18 100644 --- a/pages/inventory/inventory.vue +++ b/pages/inventory/inventory.vue @@ -63,7 +63,7 @@ 下架 上架 - + 新商品 {{item.purchasePrice}} 采购价 @@ -142,12 +142,14 @@ pageNum: 1, //分页的页码 shopList: [], categoryId: '', //分类id - shopId: '', //店铺id, + shopId: '', //店铺id, + type:'' } }, onShow() { console.log('onshow'); - this.getGategoryList() + this.getGategoryList() + this.type=uni.getStorageSync('type') }, methods: { //初始化获取分类列表 diff --git a/pages/inventory/inventoryDetail.vue b/pages/inventory/inventoryDetail.vue index 327ec9f..389c245 100644 --- a/pages/inventory/inventoryDetail.vue +++ b/pages/inventory/inventoryDetail.vue @@ -17,7 +17,7 @@ - + {{dataList.purchasePrice == null ? '暂无':dataList.purchasePrice}} 平均采购价 @@ -63,7 +63,8 @@ pageNum: 1, //分页的页码 dataList: [], bufferData: '', - pecsList:[] + pecsList:[], + type:'' } }, filters: { @@ -90,7 +91,8 @@ }, onLoad(option) { this.dataList = JSON.parse(option.item); - this.getShareList(); + this.getShareList(); + this.type = uni.getStorageSync('type') }, methods: { //库存商品详情