Browse Source

一堆bug的修改

master
wangfukang 3 years ago
parent
commit
616df3fbc0
  1. 7
      pages/billing/changeGoods1.vue
  2. 17
      pages/index/index.vue
  3. 6
      pages/index/shareStyle.vue
  4. 51
      pages/index/waitStorage.vue
  5. 19
      pages/inventory/addinventory.vue
  6. 2
      pages/inventory/changeGoods1.vue
  7. 4
      pages/inventory/inventory.vue
  8. 6
      pages/inventory/inventoryDetail.vue

7
pages/billing/changeGoods1.vue

@ -23,7 +23,7 @@
<view class="box-right-name">{{item.productName}}</view> <view class="box-right-name">{{item.productName}}</view>
<view class="box-right-num">{{item.productSn}}</view> <view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price"> <view class="box-right-price">
<view class="price-box"> <view class="price-box" v-if="storageType== 0">
<text>{{item.purchasePrice}}</text> <text>{{item.purchasePrice}}</text>
<text>采购价</text> <text>采购价</text>
</view> </view>
@ -201,9 +201,10 @@
purchasePrice: 0, purchasePrice: 0,
zPrice: 0, zPrice: 0,
zNum: 0, zNum: 0,
storageType: 0, storageType: '',
carNum: 0, carNum: 0,
carType: 0 carType: 0,
type:'',
} }
}, },
onLoad() { onLoad() {

17
pages/index/index.vue

@ -102,9 +102,9 @@
arrow-direction="left"></u-cell> arrow-direction="left"></u-cell>
<u-cell icon="setting-fill" url="/pages/index/shopInfo" title="修改个人信息" clickable isLink <u-cell icon="setting-fill" url="/pages/index/shopInfo" title="修改个人信息" clickable isLink
arrow-direction="left"></u-cell> arrow-direction="left"></u-cell>
<u-cell icon="integral-fill" url="/pages/index/upstream" title="供货商欠款" clickable isLink <u-cell icon="integral-fill" url="/pages/index/upstream" v-if="type==0" title="供货商欠款" clickable isLink
arrow-direction="left"></u-cell> arrow-direction="left"></u-cell>
<u-cell icon="integral-fill" url="/pages/index/downstream" title="客户欠款" clickable isLink <u-cell icon="integral-fill" url="/pages/index/downstream" v-if="type==0" title="客户欠款" clickable isLink
arrow-direction="left"></u-cell> arrow-direction="left"></u-cell>
<u-cell icon="integral-fill" url="/pages/index/waitStorage" title="采购单历史" clickable isLink <u-cell icon="integral-fill" url="/pages/index/waitStorage" title="采购单历史" clickable isLink
arrow-direction="left"></u-cell> arrow-direction="left"></u-cell>
@ -134,6 +134,7 @@
'33333', '33333',
'34567' '34567'
], ],
type:'',
src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg', src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
inventoryList: [], inventoryList: [],
settingShow: false, settingShow: false,
@ -190,11 +191,15 @@
return val; return val;
} }
}, },
onShow(){
this.shopName = uni.getStorageSync('shopName')
this.type = uni.getStorageSync('type')
},
onLoad() { onLoad() {
this.getSaleInfo() this.getSaleInfo()
this.getServerData(); this.getServerData();
this.getOrderInfoList(); this.getOrderInfoList();
this.shopName = uni.getStorageSync('shopName')
}, },
methods: { methods: {
getSaleInfo() { getSaleInfo() {
@ -298,6 +303,12 @@
}, },
//首页头部四个按钮的菜单 //首页头部四个按钮的菜单
goSonPage(url){ goSonPage(url){
if(url=='/pages/index/waitStorage?inStorageStatus=0'){
if(this.type!= 0){
this.tui.toast('暂无查看权限!')
return;
}
}
uni.navigateTo({ uni.navigateTo({
url: url url: url
}) })

6
pages/index/shareStyle.vue

@ -21,7 +21,7 @@
<view class="box-right-name">{{item.productName}}</view> <view class="box-right-name">{{item.productName}}</view>
<view class="box-right-num">{{item.productSn}}</view> <view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price"> <view class="box-right-price">
<view class="price-box"> <view class="price-box" v-if="type==0">
<text>{{item.purchasePrice}}</text> <text>{{item.purchasePrice}}</text>
<text>采购价</text> <text>采购价</text>
</view> </view>
@ -114,7 +114,8 @@
id: '', id: '',
carList:[], carList:[],
carNum:0, carNum:0,
carType:0 carType:0,
type:''
} }
}, },
created() { created() {
@ -127,6 +128,7 @@
url: "/pages/index/downStearmList?khid=" + options.khid url: "/pages/index/downStearmList?khid=" + options.khid
}) })
} }
this.type = uni.getStorageSync('type')
this.getGategoryList() this.getGategoryList()
}, },
methods: { methods: {

51
pages/index/waitStorage.vue

@ -3,18 +3,24 @@
<u-alert description="点击可跳转至入库单" type="primary"></u-alert> <u-alert description="点击可跳转至入库单" type="primary"></u-alert>
<view class="ulList" v-if="list.length > 0"> <view class="ulList" v-if="list.length > 0">
<ul> <ul>
<li v-for="item in list" @tap="gotoDetail(item.id)"> <li v-for="item in list" @tap="returnPrice(item)">
<uni-card :title="item.id == null ?'暂无':item.id" :sub-title="item.createTime == null ?'暂无':item.createTime" :extra="'共'+(item.totalAmount == null ?'暂无':item.totalAmount) + '件'" <uni-card :title="item.id == null ?'暂无':item.id"
:sub-title="item.createTime == null ?'暂无':item.createTime"
:extra="'共'+(item.totalAmount == null ?'暂无':item.totalAmount) + '件'"
thumbnail="/static/images/dingdan/dd1.png"> thumbnail="/static/images/dingdan/dd1.png">
<view class="uni-body"><text class="cardText">销售员:</text> {{item.createBy == null ?'暂无':item.createBy}}</view> <view class="uni-body"><text class="cardText">
<view class="uni-body"> <text class="cardText"> 总成本:</text> <text class="priceText"> 销售员:</text>{{item.createBy == null ?'暂无':item.createBy}}
{{item.shouldPay == null ?'暂无':item.shouldPay}} </text> <text decode class="cardText">
{{'&nbsp;&nbsp;&nbsp;&nbsp; 欠款: '}} </text> <text class="priceText">{{item.noPay == null ?'暂无':item.noPay}}
</text></view>
<view class="uni-body"> <text class="cardText">
订单状态:</text>{{item.inStorageStatus == 0 ?'未入库' :'已入库'}}
</view> </view>
<view v-if="item.inStorageStatus== 0" class="return-price" @tap="returnPrice(item)">更新</view> <view class="uni-body" v-if="type==0">
<text class="cardText">总成本:</text>
<text class="priceText">{{item.shouldPay == null ?'暂无':item.shouldPay}} </text>
<text decode class="cardText">{{'&nbsp;&nbsp;&nbsp;&nbsp; 欠款: '}} </text>
<text class="priceText">{{item.noPay == null ?'暂无':item.noPay}}</text>
</view>
<view class="uni-body">
<text class="cardText">订单状态:</text>{{item.inStorageStatus == 0 ?'未入库' :'已入库'}}
</view>
<view v-if="item.inStorageStatus== 0 && type==0" class="return-price" @tap="returnPrice(item)">更新</view>
</uni-card> </uni-card>
</li> </li>
</ul> </ul>
@ -36,10 +42,11 @@
data() { data() {
return { return {
list: [], list: [],
inStorageStatus:'', inStorageStatus: '',
supplierName:'', supplierName: '',
startDate:'', startDate: '',
endDate:'' endDate: '',
type: ''
// status: 'loadmore', // status: 'loadmore',
// page: 1, // page: 1,
// totalPages: 0, // totalPages: 0,
@ -54,14 +61,15 @@
onLoad(option) { onLoad(option) {
this.inStorageStatus = option.inStorageStatus || '' this.inStorageStatus = option.inStorageStatus || ''
this.getList() this.getList()
this.type = uni.getStorageSync('type')
}, },
methods: { methods: {
getList() { getList() {
this.tui.request("/app/purchase/list", "POST", { this.tui.request("/app/purchase/list", "POST", {
inStorageStatus:this.inStorageStatus, inStorageStatus: this.inStorageStatus,
supplierName:this.supplierName, supplierName: this.supplierName,
startDate:this.startDate, startDate: this.startDate,
endDate:this.endDate endDate: this.endDate
}, false, false).then((res) => { }, false, false).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.list = res.result this.list = res.result
@ -70,9 +78,9 @@
} }
}) })
}, },
returnPrice(item){ returnPrice(item) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/waitStorageDetail?id='+ item.id url: '/pages/index/waitStorageDetail?id=' + item.id
}) })
} }
} }
@ -102,7 +110,8 @@
} }
} }
} }
.return-price{
.return-price {
position: absolute; position: absolute;
bottom: 30rpx; bottom: 30rpx;
right: 30rpx; right: 30rpx;

19
pages/inventory/addinventory.vue

@ -55,25 +55,25 @@
<view class="content-box" style="margin-bottom:110rpx;"> <view class="content-box" style="margin-bottom:110rpx;">
<!-- 账号权限是否可以维护成本价格(主账号和被授权的账号可以维护),参数名:shop_admin_cost,维护在用户表中,存在前后端缓存里,把备注栏挪出来,谁都可以备注 --> <!-- 账号权限是否可以维护成本价格(主账号和被授权的账号可以维护),参数名:shop_admin_cost,维护在用户表中,存在前后端缓存里,把备注栏挪出来,谁都可以备注 -->
<view class="price-box-list"> <view class="price-box-list">
<view class="content-list"> <view class="content-list" v-if='type==0'>
<view class="list-name">应付金额</view> <view class="list-name">应付金额</view>
<view class="list-val"> <view class="list-val">
<input type="text" v-model="shouldPay"> <input type="text" v-model="shouldPay">
</view> </view>
</view> </view>
<view class="content-list"> <view class="content-list" v-if='type==0'>
<view class="list-name">已付金额</view> <view class="list-name">已付金额</view>
<view class="list-val"> <view class="list-val">
<input type="text" v-model="alreadyPay" @blur="changePay"> <input type="text" v-model="alreadyPay" @blur="changePay">
</view> </view>
</view> </view>
<view class="content-list"> <view class="content-list" v-if='type==0'>
<view class="list-name">欠款</view> <view class="list-name">欠款</view>
<view class="list-val"> <view class="list-val">
<input type="text" v-model="noPay" disabled> <input type="text" v-model="noPay" disabled>
</view> </view>
</view> </view>
<view class="content-list"> <view class="content-list" v-if='type==0'>
<view class="list-name">其他费用</view> <view class="list-name">其他费用</view>
<view class="list-val"> <view class="list-val">
<input type="text" v-model="otherPay"> <input type="text" v-model="otherPay">
@ -189,7 +189,8 @@
columns: [], columns: [],
keyList: [], keyList: [],
temporaryList: [], temporaryList: [],
zNum: 0 zNum: 0,
type:''
} }
}, },
filters: { filters: {
@ -269,6 +270,7 @@
that.totalAmount += value.productCount that.totalAmount += value.productCount
}) })
this.noPay = this.shouldPay this.noPay = this.shouldPay
this.type = uni.getStorageSync('type')
}, },
onLoad() { onLoad() {
@ -523,6 +525,13 @@
title: "信息填写完成后入库!", title: "信息填写完成后入库!",
icon: 'none' icon: 'none'
}) })
}else{
if(type==0 && this.shouldPay == 0){
uni.showToast({
title: "管理员必须维护价格!",
icon: 'none'
})
}
} }
let that = this; let that = this;
let purchase = { let purchase = {

2
pages/inventory/changeGoods1.vue

@ -23,7 +23,7 @@
<view class="box-right-num">{{item.productSn}}</view> <view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price"> <view class="box-right-price">
<view class="price-box"> <view class="price-box">
<text>{{item.purchasePrice}}</text> <text>{{item.purchasePrice == null ?'待入库':item.purchasePrice}}</text>
<text>采购价</text> <text>采购价</text>
</view> </view>
<view class="price-box"> <view class="price-box">

4
pages/inventory/inventory.vue

@ -63,7 +63,7 @@
<view class="up-down" v-if="item.delFlag ==1" @tap.stop="upDown('0',item)">下架</view> <view class="up-down" v-if="item.delFlag ==1" @tap.stop="upDown('0',item)">下架</view>
<view class="up-down" v-if="item.delFlag ==0" @tap.stop="upDown('1',item)">上架</view> <view class="up-down" v-if="item.delFlag ==0" @tap.stop="upDown('1',item)">上架</view>
<view class="box-right-price"> <view class="box-right-price">
<view class="price-box"> <view class="price-box" v-if='type==0'>
<text v-if="item.purchasePrice==null" style="color: red;">新商品</text> <text v-if="item.purchasePrice==null" style="color: red;">新商品</text>
<text v-else>{{item.purchasePrice}}</text> <text v-else>{{item.purchasePrice}}</text>
<text>采购价</text> <text>采购价</text>
@ -143,11 +143,13 @@
shopList: [], shopList: [],
categoryId: '', //分类id categoryId: '', //分类id
shopId: '', //店铺id, shopId: '', //店铺id,
type:''
} }
}, },
onShow() { onShow() {
console.log('onshow'); console.log('onshow');
this.getGategoryList() this.getGategoryList()
this.type=uni.getStorageSync('type')
}, },
methods: { methods: {
//初始化获取分类列表 //初始化获取分类列表

6
pages/inventory/inventoryDetail.vue

@ -17,7 +17,7 @@
</view> </view>
</view> </view>
<view class="box-right-price"> <view class="box-right-price">
<view class="price-box"> <view class="price-box" v-if="type == 0">
<text>{{dataList.purchasePrice == null ? '暂无':dataList.purchasePrice}}</text> <text>{{dataList.purchasePrice == null ? '暂无':dataList.purchasePrice}}</text>
<text>平均采购价</text> <text>平均采购价</text>
</view> </view>
@ -63,7 +63,8 @@
pageNum: 1, //分页的页码 pageNum: 1, //分页的页码
dataList: [], dataList: [],
bufferData: '', bufferData: '',
pecsList:[] pecsList:[],
type:''
} }
}, },
filters: { filters: {
@ -91,6 +92,7 @@
onLoad(option) { onLoad(option) {
this.dataList = JSON.parse(option.item); this.dataList = JSON.parse(option.item);
this.getShareList(); this.getShareList();
this.type = uni.getStorageSync('type')
}, },
methods: { methods: {
//库存商品详情 //库存商品详情

Loading…
Cancel
Save