wangfukang 3 years ago
parent
commit
e6e18b1e49
  1. 1
      pages/billing/changeGoods1.vue
  2. 4
      pages/index/addHangOrder.vue
  3. 3
      pages/index/downStearmList.vue
  4. 21
      pages/index/index.vue
  5. 7
      pages/index/orderDetail.vue
  6. 1
      pages/index/shareStyle.vue
  7. 1
      pages/index/waitStorageDetail.vue
  8. 85
      pages/inventory/addGoods.vue
  9. 1
      pages/inventory/addinventory.vue
  10. 1
      pages/inventory/changeGoods1.vue
  11. 49
      pages/inventory/gategory.vue
  12. 9
      pages/inventory/goodsList1.vue
  13. 1
      pages/inventory/inventory.vue
  14. 1
      pages/inventory/inventoryDetail.vue
  15. 9
      pages/login/login.vue
  16. 1
      pages/other/customDetail.vue
  17. 2
      pages/other/logistics.vue
  18. 26
      pages/rebate/rebate.vue
  19. 30
      pages/staff/staff.vue

1
pages/billing/changeGoods1.vue

@ -916,6 +916,7 @@
.noPic{ .noPic{
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
border-radius: 10px;
// margin: 30rpx 0 0 30rpx; // margin: 30rpx 0 0 30rpx;
text-align: center; text-align: center;
line-height: 140rpx; line-height: 140rpx;

4
pages/index/addHangOrder.vue

@ -705,7 +705,7 @@
obj.productPicture = item.saleDetailDTOList[i].productPicture+'?time='+new Date().getTime() obj.productPicture = item.saleDetailDTOList[i].productPicture+'?time='+new Date().getTime()
obj.productSn = item.saleDetailDTOList[i].productSn obj.productSn = item.saleDetailDTOList[i].productSn
obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice
obj.saleId = item.saleDetailDTOList[i].saleId obj.saleId = item.id
obj.remark = item.remark obj.remark = item.remark
obj.xsyId = item.createBy obj.xsyId = item.createBy
obj.createByName = item.createByName obj.createByName = item.createByName
@ -715,6 +715,7 @@
let obj = {} let obj = {}
obj.num = 0 obj.num = 0
obj.price = 0 obj.price = 0
obj.saleId = item.id
obj.remark = item.remark obj.remark = item.remark
obj.xsyId = item.createBy obj.xsyId = item.createBy
obj.createByName = item.createByName obj.createByName = item.createByName
@ -1097,6 +1098,7 @@
border-radius: 50%; border-radius: 50%;
} }
.noPic{ .noPic{
border-radius: 10px;
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
// margin: 30rpx 0 0 30rpx; // margin: 30rpx 0 0 30rpx;

3
pages/index/downStearmList.vue

@ -240,9 +240,6 @@
}, },
} }
}, },
created() {
uni.hideHomeButton() //左上角HOME按钮
},
onLoad(options) { onLoad(options) {
this.khid = options.khid; this.khid = options.khid;
this.getShareList(options.khid); this.getShareList(options.khid);

21
pages/index/index.vue

@ -141,8 +141,8 @@
<!-- 宣传页 --> <!-- 宣传页 -->
<uni-popup ref="publicizepopup" background-color="#fff" @change="change"> <uni-popup ref="publicizepopup" background-color="#fff" @change="change">
<view class="publicize-content"> <view class="publicize-content">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/df3ba4122dc644e99003f6c45b96c6d5.jpg" alt="宣传图"> <img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/35bbea7341334aca9f27c33b78bd2961.jpg" alt="宣传图">
<view class="pop-close">X</view> <view class="pop-close" @tap="popClose">X</view>
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
@ -231,13 +231,22 @@
this.type = uni.getStorageSync('type') this.type = uni.getStorageSync('type')
this.getSaleInfo() this.getSaleInfo()
}, },
onLoad() { onLoad() {
this.$refs.publicizepopup.open('center') if(uni.getStorageSync('publicize')){
}else{
uni.setStorageSync("publicize", true)
this.$refs.publicizepopup.open('center')
}
}, },
onTabItemTap(e){ onTabItemTap(e){
this.getSaleInfo() this.getSaleInfo()
}, },
methods: { methods: {
popClose(){
this.$refs.publicizepopup.close()
},
getSaleInfo() { getSaleInfo() {
this.tui.request("/app/sale/getShopAll", "POST", { this.tui.request("/app/sale/getShopAll", "POST", {
pageVo: { pageVo: {
@ -508,7 +517,7 @@
background: rgba(255, 255, 255, 0) !important; background: rgba(255, 255, 255, 0) !important;
} }
.publicize-content{ .publicize-content{
width: 400rpx; width: 460rpx;
height: 600rpx; height: 600rpx;
} }

7
pages/index/orderDetail.vue

@ -582,6 +582,10 @@
if (this.radio1 == 0 && this.changeA == '') { if (this.radio1 == 0 && this.changeA == '') {
this.tui.toast("请输入取货地址") this.tui.toast("请输入取货地址")
return return
}
if(this.$refs.returnClose.val == ''){
this.tui.toast("金额不能为空")
return
} }
this.list.forEach(item1 => { this.list.forEach(item1 => {
item1.stockLogList1.forEach((item2, index) => { item1.stockLogList1.forEach((item2, index) => {
@ -987,7 +991,8 @@
border-right: 1px solid #eee; border-right: 1px solid #eee;
} }
.noPic { .noPic {
border-radius: 10px;
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
margin: 30rpx 0 0 30rpx; margin: 30rpx 0 0 30rpx;

1
pages/index/shareStyle.vue

@ -650,6 +650,7 @@
color: #fff; color: #fff;
} }
.noPic{ .noPic{
border-radius: 10px;
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
text-align: center; text-align: center;

1
pages/index/waitStorageDetail.vue

@ -529,6 +529,7 @@
width: 500rpx; width: 500rpx;
} }
.noPic{ .noPic{
border-radius: 10px;
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
text-align: center; text-align: center;

85
pages/inventory/addGoods.vue

@ -22,27 +22,25 @@
<uni-forms-item label="市场价" name="price" required> <uni-forms-item label="市场价" name="price" required>
<uni-easyinput type="digit" v-model="formData.price" placeholder="请输入零售价" trim="all" /> <uni-easyinput type="digit" v-model="formData.price" placeholder="请输入零售价" trim="all" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="尾货预警" name="salesWeek" required>
<!-- <uni-easyinput type="digit" v-model="formData.salesWeek" placeholder="请输入零售价" trim="all" /> -->
<uni-datetime-picker type="date" :clear-icon="false" v-model="formData.salesWeek" />
</uni-forms-item>
<uni-forms-item label="库存预警" name="tailWarn" required>
<uni-easyinput type="digit" v-model="formData.tailWarn" placeholder="请设置库存预警最低件数" trim="all" />
</uni-forms-item>
<uni-forms-item label="分类" name="categoryId" required v-if="dataList == ''"> <uni-forms-item label="分类" name="categoryId" required v-if="dataList == ''">
<uni-data-select class="uni-data-select" :localdata="categoryList" v-model="formData.categoryId" <!-- <uni-data-select class="uni-data-select" :localdata="categoryList" v-model="formData.categoryId"
placeholder="请选择分类" @change="categoryChange(formData.categoryId)"></uni-data-select> placeholder="请选择分类" @change="categoryChange(formData.categoryId)"></uni-data-select> -->
</uni-forms-item>
<uni-forms-item label="商品规格" name="wholesalePrice" required v-if="categoryId != ''">
<view class="content-list"> <view class="content-list">
<view class="list-val"> <view class="list-val">
<input type="text" placeholder="点击查询该分类下所有规格" disabled :value="wlName.shippingMethod" <input type="text" placeholder="请选择分类" disabled :value="typeItem.categoryName"
style="border-bottom: 1px solid #fff;text-align: center;" style="border-bottom: 1px solid #fff;text-align: center;"
@tap="goGategoryLow"> @tap="goGategoryLow">
<uni-icons type="right" size="16" <uni-icons type="right" size="16"
style="margin-left: 40rpx;line-height: 70rpx;"></uni-icons> style="margin-left: 40rpx;line-height: 70rpx;"></uni-icons>
</view> </view>
</view> </view>
</uni-forms-item>
<uni-forms-item label="尾货预警" name="salesWeek">
<!-- <uni-easyinput type="digit" v-model="formData.salesWeek" placeholder="请输入零售价" trim="all" /> -->
<uni-datetime-picker type="date" :clear-icon="false" v-model="formData.salesWeek" />
</uni-forms-item>
<uni-forms-item label="库存预警" name="tailWarn">
<uni-easyinput type="digit" v-model="formData.tailWarn" placeholder="请设置库存预警最低件数" trim="all" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="货品简介" name="productIntro"> <uni-forms-item label="货品简介" name="productIntro">
<uni-easyinput type="textarea" autoHeight v-model="formData.productIntro" placeholder="请输入货品简介" <uni-easyinput type="textarea" autoHeight v-model="formData.productIntro" placeholder="请输入货品简介"
@ -75,7 +73,8 @@
}, },
categoryList: [], categoryList: [],
productId:'', productId:'',
arrtList: [], arrtList: [],
typeItem:{},
arrtChange: [], arrtChange: [],
categoryId:'', categoryId:'',
dataList:[], dataList:[],
@ -109,21 +108,28 @@
required: true, required: true,
errorMessage: '请填写商品名称', errorMessage: '请填写商品名称',
}, ], }, ],
},
tailWarn: {
rules: [{
required: true,
errorMessage: '请填写库存预警天数',
}, ],
},
salesWeek: {
rules: [{
required: true,
errorMessage: '请选择尾货预警天数',
}, ],
} }
// tailWarn: {
// rules: [{
// required: true,
// errorMessage: '请填写库存预警天数',
// }, ],
// },
// salesWeek: {
// rules: [{
// required: true,
// errorMessage: '请选择尾货预警天数',
// }, ],
// }
} }
} }
},
onShow(){
let that = this;
this.typeItem = JSON.parse(JSON.stringify(this.typeItem)) || ''
if(this.typeItem){
this.formData.categoryId = this.typeItem.categoryId
}
}, },
onLoad(option) { onLoad(option) {
if(option.dataList){ if(option.dataList){
@ -138,20 +144,6 @@
this.formData.salesWeek = this.dataList.salesWeek this.formData.salesWeek = this.dataList.salesWeek
this.formData.tailWarn = this.dataList.tailWarn this.formData.tailWarn = this.dataList.tailWarn
} }
this.tui.request("/app/productCategory/list", "get", {
// shopId: 1,
}, false, true).then((res) => {
if (res.code == 200) {
this.categoryList = res.result.map(item => {
return {
value: item.id,
text: item.categoryName
}
})
} else {
this.tui.toast(res.message)
}
})
}, },
methods: { methods: {
// 删除图片 // 删除图片
@ -240,16 +232,11 @@
}) })
}, },
//跳转子分类页 //跳转分类页
goGategoryLow() { goGategoryLow() {
if(this.categoryId){ uni.navigateTo({
uni.navigateTo({ url: '/pages/inventory/gategory'
url: '/pages/inventory/gategoryLow?id='+this.categoryId })
})
}else{
this.tui.toast('请选择分类后再查看商品规格!')
}
} }
} }
} }

1
pages/inventory/addinventory.vue

@ -997,6 +997,7 @@
} }
} }
.noPic{ .noPic{
border-radius: 10px;
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
// margin: 30rpx 0 0 30rpx; // margin: 30rpx 0 0 30rpx;

1
pages/inventory/changeGoods1.vue

@ -906,6 +906,7 @@
background: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.1);
} }
.noPic{ .noPic{
border-radius: 10px;
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
// margin: 30rpx 0 0 30rpx; // margin: 30rpx 0 0 30rpx;

49
pages/inventory/gategory.vue

@ -5,10 +5,12 @@
</view> </view>
<view class="card-list"> <view class="card-list">
<ul> <ul>
<li v-for="(item, index) in indexList" :key="index" @tap="goGategoryLow(item.id)"> <li v-for="(item, index) in indexList" :key="index" @tap="clickList(item)">
<view class="name">{{item.categoryName}}</view> <view class="name" >
<button class="bj-btn" @tap.stop="inputDialogToggle('edit', item)">编辑</button> <text>{{item.categoryName}}</text>
<uni-icons type="forward" size="25"></uni-icons> <u-icon name="edit-pen-fill" size="22" @tap.stop="inputDialogToggle('edit', item)"></u-icon>
</view>
<button class="bj-btn" @tap.stop="goGategoryLow(item.id)">编辑规格</button>
</li> </li>
</ul> </ul>
</view> </view>
@ -49,7 +51,7 @@
computed: { computed: {
}, },
onLoad() { onShow() {
this.getGategoryList() this.getGategoryList()
}, },
methods: { methods: {
@ -83,6 +85,35 @@
} }
}, },
//查询分类下有没有库存
getTypeToNum(){
// this.tui.request("/app/stock/getlistByAttributeList", "post", {
// categoryId: ,
// }, false, true).then((res) => {
// if (res.code == 200) {
// this.getGategoryList()
// uni.showToast({
// title:"添加成功",
// icon: 'none'
// })
// } else {
// uni.showToast({
// title:"添加失败",
// icon: 'none'
// })
// }
// }).catch((res) => {})
},
//点击选择列表,带参数 返回上一页
clickList(item) {
let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
let prevPage = pages[pages.length - 2]; //上一页页面实例
prevPage.$vm.typeItem = item
uni.navigateBack({
delta: 1
})
},
//分类编辑(新增,修改) //分类编辑(新增,修改)
dialogInputConfirm(e) { dialogInputConfirm(e) {
switch (this.typeModel) { switch (this.typeModel) {
@ -266,19 +297,19 @@
margin: 0 auto; margin: 0 auto;
} }
.bj-btn{ .bj-btn{
width: 95rpx; width: 120rpx;
height: 60rpx; height: 60rpx;
font-size: 26rpx; font-size: 26rpx;
background: red; background: red;
margin: 0; margin: 20rpx 0;
margin: 20rpx;
float: left; float: left;
padding: 0; padding: 0;
line-height: 60rpx; line-height: 60rpx;
} }
.name{ .name{
width: 70%; width: 75%;
float: left; float: left;
display: flex;
} }
.data-v-5ff5d986{ .data-v-5ff5d986{

9
pages/inventory/goodsList1.vue

@ -465,8 +465,7 @@
this.gysName = JSON.parse(JSON.stringify(this.gysName)) this.gysName = JSON.parse(JSON.stringify(this.gysName))
this.wlName = JSON.parse(JSON.stringify(this.wlName)) this.wlName = JSON.parse(JSON.stringify(this.wlName))
this.kdyName = JSON.parse(JSON.stringify(this.kdyName)) this.kdyName = JSON.parse(JSON.stringify(this.kdyName))
this.lbgName = JSON.parse(JSON.stringify(this.lbgName)) this.lbgName = JSON.parse(JSON.stringify(this.lbgName))
console.log(this.wlName)
if (uni.getStorageSync('carList1') != '') { if (uni.getStorageSync('carList1') != '') {
this.carList.clear() this.carList.clear()
this.carList1 = JSON.parse(uni.getStorageSync('carList1')) this.carList1 = JSON.parse(uni.getStorageSync('carList1'))
@ -1094,7 +1093,7 @@
} }
let obj = { let obj = {
orderByWorker: this.lbgName.workerId, orderByWorker: this.lbgName.workerId,
oldSaleId: this.saleId, oldSaleId: this.saleId || '',
sale: { sale: {
// relPrice:, // relPrice:,
alreadyEarn: this.priceOk, //已付金额 alreadyEarn: this.priceOk, //已付金额
@ -1136,7 +1135,8 @@
}) })
this.saleDetailList = purchaseDetails; this.saleDetailList = purchaseDetails;
obj.saleDetailList = purchaseDetails; obj.saleDetailList = purchaseDetails;
let url = '' let url = ''
console.log(this.saleId)
if (this.saleId != '') { if (this.saleId != '') {
url = '/app/sale/shareToBuyNew' url = '/app/sale/shareToBuyNew'
} else { } else {
@ -1806,6 +1806,7 @@
} }
} }
.noPic{ .noPic{
border-radius: 10px;
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
margin: 30rpx 0 0 30rpx; margin: 30rpx 0 0 30rpx;

1
pages/inventory/inventory.vue

@ -422,6 +422,7 @@
border-radius: 10px; border-radius: 10px;
} }
.noPic{ .noPic{
border-radius: 10px;
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
// margin: 30rpx 0 0 30rpx; // margin: 30rpx 0 0 30rpx;

1
pages/inventory/inventoryDetail.vue

@ -272,6 +272,7 @@
overflow: hidden; overflow: hidden;
} }
.noPic{ .noPic{
border-radius: 10px;
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
// margin: 30rpx 0 0 30rpx; // margin: 30rpx 0 0 30rpx;

9
pages/login/login.vue

@ -108,7 +108,9 @@
}, },
computed: mapState(['type']), computed: mapState(['type']),
onLoad() { onLoad() {
this.getCaptchaImg(); this.getCaptchaImg();
// this.username = uni.getStorageSync('username')
// this.password = uni.getStorageSync('password')
}, },
methods: { methods: {
...mapMutations(['login']), ...mapMutations(['login']),
@ -154,7 +156,7 @@
} }
loginUrl='/auth/smsLogin' loginUrl='/auth/smsLogin'
} }
if(this.wayValue == 1){ //15630117759 19950123kang if(this.wayValue == 1){ //物流公司
this.tui.request("/app/logitics/login", "POST", { this.tui.request("/app/logitics/login", "POST", {
username: this.username, username: this.username,
password: this.password, password: this.password,
@ -225,7 +227,8 @@
deviceId:res1.deviceId deviceId:res1.deviceId
}, false, true).then((res) => { }, false, true).then((res) => {
if (res.code == 200) { if (res.code == 200) {
uni.setStorageSync('shopName',item.shopName) // uni.setStorageSync('username',this.username)
// uni.setStorageSync('password',this.password)
uni.setStorageSync('type',item.type) uni.setStorageSync('type',item.type)
uni.setStorageSync('shopId',item.shopId) uni.setStorageSync('shopId',item.shopId)
setTimeout(() => { setTimeout(() => {

1
pages/other/customDetail.vue

@ -554,6 +554,7 @@
border-right: 1px solid #eee; border-right: 1px solid #eee;
} }
.noPic{ .noPic{
border-radius: 10px;
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
margin: 30rpx 0 0 30rpx; margin: 30rpx 0 0 30rpx;

2
pages/other/logistics.vue

@ -111,7 +111,7 @@
id:this.id id:this.id
}, },
header: { header: {
'content-type': 'application/json', 'content-type': 'application/x-www-form-urlencoded',
'appWLToken': this.tui.getToken() 'appWLToken': this.tui.getToken()
}, },
method: 'POST', //'GET','POST' method: 'POST', //'GET','POST'

26
pages/rebate/rebate.vue

@ -6,13 +6,13 @@
<view class="content-balance"> <view class="content-balance">
<text class="balance-text">累计返佣(元)</text> <text class="balance-text">累计返佣(元)</text>
<view class="balance-number"> <view class="balance-number">
<text style="font-size: 40px;">{{allrebateAmount}}</text> <text style="font-size: 40px;">{{allrebateAmount?allrebateAmount:'0'}}</text>
</view> </view>
</view> </view>
<view class="content-balance"> <view class="content-balance">
<text class="balance-text">返佣余额(元)</text> <text class="balance-text">返佣余额(元)</text>
<view class="balance-number"> <view class="balance-number">
<text style="font-size: 40px;">{{rebateAmount}}</text> <text style="font-size: 40px;">{{rebateAmount?rebateAmount:'0'}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -23,19 +23,19 @@
</view> </view>
</uni-card> </uni-card>
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button" <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button"
activeColor="#0072E3"></uni-segmented-control> activeColor="#5fd9ee"></uni-segmented-control>
<view class="content"> <view class="content">
<uni-card title="返佣记录" v-show="current === 0"> <uni-card title="返佣记录" v-show="current === 0">
<ul class="inventoryList"> <ul class="inventoryList">
<li v-for="(item ,index) in commissionList" :key="index" style="margin-bottom:20rpx;"> <li v-for="(item ,index) in commissionList" :key="index" style="margin-bottom:20rpx;">
<uni-card :title="'返佣日期:'+ item.createTime" :sub-title="'返佣后账户余额:'+ item.shopAfterDepoBal" @tap=""> <uni-card :title="'返佣日期:'+ item.createTime" :sub-title="'返佣后账户余额:'+ item.shopAfterDepoBal" @tap="">
<view class="uni-body" style="margin-bottom: 5px;padding-bottom: 10rpx;border-bottom:1px solid #eee;"> <view class="uni-body" style="margin-bottom: 5px;padding-bottom: 10rpx;border-bottom:1px solid #eee;">
<view class="cardText">物流返佣:{{item.companyName}}</view> <view class="cardText">物流返佣:{{item.companyName?item.companyName:'暂无'}}</view>
<view class="cardText">返佣金额:{{item.companyRebateAmount}}元</view> <view class="cardText">返佣金额:{{item.companyRebateAmount?item.companyRebateAmount:'暂无'}}</view>
</view> </view>
<view class="uni-body"> <view class="uni-body">
<view class="cardText">拉包返佣:{{item.workerName}}</view> <view class="cardText">拉包返佣:{{item.workerName?item.workerName:'暂无'}}</view>
<view class="cardText">返佣金额:{{item.workerRebateAmount}}元</view> <view class="cardText">返佣金额:{{item.workerRebateAmount?item.workerRebateAmount:'暂无'}}</view>
</view> </view>
</uni-card> </uni-card>
</li> </li>
@ -47,10 +47,10 @@
<uni-card :title="'返佣日期:'+ item.registerShopTime" :sub-title="'返佣后账户余额:'+ item.shopAfterRebateAmount" @tap=""> <uni-card :title="'返佣日期:'+ item.registerShopTime" :sub-title="'返佣后账户余额:'+ item.shopAfterRebateAmount" @tap="">
<view class="uni-body" style="margin-bottom: 5px;padding-bottom: 10rpx;border-bottom:1px solid #eee;"> <view class="uni-body" style="margin-bottom: 5px;padding-bottom: 10rpx;border-bottom:1px solid #eee;">
<view class="cardText">返佣状态:{{item.isOpen == 1?'已返佣':'未返佣'}}</view> <view class="cardText">返佣状态:{{item.isOpen == 1?'已返佣':'未返佣'}}</view>
<view class="cardText">返佣金额:{{item.shopRebateAmount}}元</view> <view class="cardText">返佣金额:{{item.shopRebateAmount?item.shopRebateAmount:'暂无'}}</view>
</view> </view>
<view class="uni-body"> <view class="uni-body">
<view class="cardText">邀请店铺名:{{item.registerShopName}}</view> <view class="cardText">邀请店铺名:{{item.registerShopName?item.registerShopName:'暂无'}}</view>
</view> </view>
</uni-card> </uni-card>
</li> </li>
@ -128,6 +128,14 @@
this.status = 'nomore'; this.status = 'nomore';
if (res.code == 200) { if (res.code == 200) {
this.commissionList = res.result.records this.commissionList = res.result.records
for(let i=0;i<this.commissionList.length;i++){
if(this.commissionList[i].shopAfterDepoBal == undefined){
this.commissionList[i].shopAfterDepoBal = '暂无'
}
if(this.commissionList[i].createTime == null){
this.commissionList[i].createTime = '暂无'
}
}
} }
}) })
}, },

30
pages/staff/staff.vue

@ -22,7 +22,7 @@
</uni-card> </uni-card>
<uni-card title="员工列表"> <uni-card title="员工列表">
<uni-list> <uni-list>
<uni-list-item direction="row" clickable @tap="onDotClick('edit',item)" v-for="(item , index) in staffList" <uni-list-item direction="row" clickable v-for="(item , index) in staffList"
:key="index"> :key="index">
<template #body> <template #body>
<view class="tag-wrap"> <view class="tag-wrap">
@ -43,7 +43,7 @@
</view> </view>
</template> </template>
<template #footer> <template #footer>
<view><u-icon name="edit-pen-fill" size="28"></u-icon></view> <view @tap="onDotClick('edit',item)"><u-icon name="edit-pen-fill" size="28"></u-icon></view>
</template> </template>
</uni-list-item> </uni-list-item>
</uni-list> </uni-list>
@ -57,17 +57,25 @@
return { return {
staffList: [], staffList: [],
avatar: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png', avatar: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
size: 30, size: 30,
type:''
}; };
},
onLoad() {
this.type = uni.getStorageSync('type')
}, },
onShow() { onShow() {
this.getStaffList() this.getStaffList()
}, },
methods: { methods: {
onDotClick(type,item) { onDotClick(type,item) {
uni.navigateTo({ if(this.type == 0){
url: `/pages/staff/addStaff/addStaff?type=${type}&item=`+ JSON.stringify(item) uni.navigateTo({
}) url: `/pages/staff/addStaff/addStaff?type=${type}&item=`+ JSON.stringify(item)
})
}else{
this.tui.toast("暂无添加权限")
}
}, },
getStaffList() { getStaffList() {
this.tui.request('/app/common/user/findAllUserByShopId', 'get', {}, false, false, true).then((res) => { this.tui.request('/app/common/user/findAllUserByShopId', 'get', {}, false, false, true).then((res) => {
@ -86,9 +94,13 @@
}) })
}, },
goGuide(){ goGuide(){
uni.navigateTo({ if(this.type == 0){
url: '/pages/staff/signRule/signRule' uni.navigateTo({
}) url: '/pages/staff/signRule/signRule'
})
}else{
this.tui.toast("暂无编辑权限")
}
} }
} }
} }

Loading…
Cancel
Save