Browse Source

一堆bug的修改

master
wangfukang 3 years ago
parent
commit
616df3fbc0
  1. 7
      pages/billing/changeGoods1.vue
  2. 19
      pages/index/index.vue
  3. 8
      pages/index/shareStyle.vue
  4. 163
      pages/index/waitStorage.vue
  5. 29
      pages/inventory/addinventory.vue
  6. 2
      pages/inventory/changeGoods1.vue
  7. 8
      pages/inventory/inventory.vue
  8. 8
      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-num">{{item.productSn}}</view>
<view class="box-right-price">
<view class="price-box">
<view class="price-box" v-if="storageType== 0">
<text>{{item.purchasePrice}}</text>
<text>采购价</text>
</view>
@ -201,9 +201,10 @@
purchasePrice: 0,
zPrice: 0,
zNum: 0,
storageType: 0,
storageType: '',
carNum: 0,
carType: 0
carType: 0,
type:'',
}
},
onLoad() {

19
pages/index/index.vue

@ -102,9 +102,9 @@
arrow-direction="left"></u-cell>
<u-cell icon="setting-fill" url="/pages/index/shopInfo" title="修改个人信息" clickable isLink
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>
<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>
<u-cell icon="integral-fill" url="/pages/index/waitStorage" title="采购单历史" clickable isLink
arrow-direction="left"></u-cell>
@ -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
})

8
pages/index/shareStyle.vue

@ -21,7 +21,7 @@
<view class="box-right-name">{{item.productName}}</view>
<view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price">
<view class="price-box">
<view class="price-box" v-if="type==0">
<text>{{item.purchasePrice}}</text>
<text>采购价</text>
</view>
@ -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: {

163
pages/index/waitStorage.vue

@ -1,25 +1,31 @@
<template>
<view>
<u-alert description="点击可跳转至入库单" type="primary"></u-alert>
<view class="ulList" v-if="list.length > 0">
<ul>
<li v-for="item in list" @tap="gotoDetail(item.id)">
<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">
<view class="uni-body"><text class="cardText">销售员:</text> {{item.createBy == null ?'暂无':item.createBy}}</view>
<view class="uni-body"> <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" class="return-price" @tap="returnPrice(item)">更新</view>
</uni-card>
</li>
</ul>
<u-loadmore :status="status" />
</view>
<u-alert description="点击可跳转至入库单" type="primary"></u-alert>
<view class="ulList" v-if="list.length > 0">
<ul>
<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) + '件'"
thumbnail="/static/images/dingdan/dd1.png">
<view class="uni-body"><text class="cardText">
销售员:</text>{{item.createBy == null ?'暂无':item.createBy}}
</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>
</li>
</ul>
<u-loadmore :status="status" />
</view>
<u-empty v-else mode="order" margin-top="200"></u-empty>
</view>
</template>
@ -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
})
}
}
}
</script>
<style scoped lang="scss">
.ulList {
ul {
li {
font-size: 12px;
.floatRight {
float: right;
padding: 14rpx;
color: $u-primary;
font-size: 26upx;
}
.cardText {
font-size: 12px;
}
.priceText {
color: $u-primary;
font-size: 14px;
}
}
}
}
.return-price{
position: absolute;
bottom: 30rpx;
right: 30rpx;
background: #5fd9ee;
color: #fff;
width: 80rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
border-radius: 10px;
.ulList {
ul {
li {
font-size: 12px;
.floatRight {
float: right;
padding: 14rpx;
color: $u-primary;
font-size: 26upx;
}
.cardText {
font-size: 12px;
}
.priceText {
color: $u-primary;
font-size: 14px;
}
}
}
}
.return-price {
position: absolute;
bottom: 30rpx;
right: 30rpx;
background: #5fd9ee;
color: #fff;
width: 80rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
border-radius: 10px;
}
</style>

29
pages/inventory/addinventory.vue

@ -55,25 +55,25 @@
<view class="content-box" style="margin-bottom:110rpx;">
<!-- 账号权限是否可以维护成本价格(主账号和被授权的账号可以维护),参数名:shop_admin_cost,维护在用户表中,存在前后端缓存里,把备注栏挪出来,谁都可以备注 -->
<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-val">
<input type="text" v-model="shouldPay">
</view>
</view>
<view class="content-list">
<view class="content-list" v-if='type==0'>
<view class="list-name">已付金额</view>
<view class="list-val">
<input type="text" v-model="alreadyPay" @blur="changePay">
</view>
</view>
<view class="content-list">
<view class="content-list" v-if='type==0'>
<view class="list-name">欠款</view>
<view class="list-val">
<input type="text" v-model="noPay" disabled>
</view>
</view>
<view class="content-list">
<view class="content-list" v-if='type==0'>
<view class="list-name">其他费用</view>
<view class="list-val">
<input type="text" v-model="otherPay">
@ -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 = {

2
pages/inventory/changeGoods1.vue

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

8
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 ==0" @tap.stop="upDown('1',item)">上架</view>
<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-else>{{item.purchasePrice}}</text>
<text>采购价</text>
@ -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: {
//初始化获取分类列表

8
pages/inventory/inventoryDetail.vue

@ -17,7 +17,7 @@
</view>
</view>
<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>平均采购价</text>
</view>
@ -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: {
//库存商品详情

Loading…
Cancel
Save