wangfukang 3 years ago
parent
commit
3a818dcc8a
  1. 3
      pages/billing/changeGoods1.vue
  2. 132
      pages/index/orderDetail.vue
  3. 3
      pages/index/peopleList.vue
  4. 6
      pages/inventory/goodsList1.vue
  5. 157
      pages/staff/clock/clock.vue
  6. 117
      pages/staff/performance/performance.vue
  7. 7
      pages/staff/staff.vue

3
pages/billing/changeGoods1.vue

@ -300,7 +300,8 @@
backPrevPage() {
let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
let prevPage = pages[pages.length - 2]; //上一页页面实例
prevPage.$vm.carList1 = this.carList
prevPage.$vm.carList1 = this.carList
prevPage.$vm.clearMsg = '1'
uni.navigateBack({
delta: 1
})

132
pages/index/orderDetail.vue

@ -1,15 +1,15 @@
<template>
<view class="container">
<uni-card :title="sales.userName" thumbnail="/static/images/dingdan/dd0.png">
<view class="uni-body">{{sales.province + sales.area + sales.city + sales.receiveAddress}} </view>
<uni-card :title="sales.userName == null ?'暂无':sales.userName" thumbnail="/static/images/dingdan/dd0.png">
<view class="uni-body" v-if="sales.province != null">{{sales.province + sales.area + sales.city + sales.receiveAddress}} </view>
</uni-card>
<view class="tui-order-item boxbg">
<u-collapse>
<u-collapse-item :open="isReturn" v-for="(item,index) in list" :key="index" :title="item.productName"
:name="item.saleId"
:value="'单价:'+ item.wholesalePrice + ' 折扣: ' + sales.discount + '折'">
<view class="u-collapse-content" v-for="(val, index2) in item.stockLogList1" :key="index2">
:value="'单价:'+ (item.wholesalePrice == null ?'暂无':item.wholesalePrice) + ' 折扣: ' + (item.discount == null ?'暂无':item.discount + '折')">
<view class="u-collapse-content" v-if="item.stockLogList1 != ''" v-for="(val, index2) in item.stockLogList1" :key="index2">
<!-- <u-icon name="checkmark-circle" color="#5fd9ee" size="20" v-if="isReturn"></u-icon>
<u-icon name="checkmark-circle" color="#999" size="20" v-if="isReturn"></u-icon> -->
{{ val.attributeList.substr(1).substring(0,val.attributeList.substr(1).length-1).replace(/\"/g, "") }}
@ -22,57 +22,58 @@
<view class="tui-goods-info">
<view class="tui-price-flex tui-size32 tui-pbtm20">
<view class="tui-flex-shrink">总金额</view>
<view class="tui-goods-price tui-primary-color">
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ sales.totalAmount }}</view>
<view class="tui-price-large">{{ sales.totalAmount == null ?'暂无':sales.totalAmount }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32">
<view class="tui-flex-shrink">实收金额</view>
<view class="tui-goods-price tui-primary-color">
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ sales.realAmount }}</view>
<view class="tui-price-large">{{ sales.realAmount == null ?'暂无':sales.realAmount }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32">
<view class="tui-flex-shrink">已收金额</view>
<view class="tui-goods-price tui-primary-color">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ sales.alreadyEarn }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32">
<view class="tui-flex-shrink">欠款</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ sales.noEarn}}</view>
<view class="tui-price-large">{{ sales.alreadyEarn == null ?'暂无':sales.alreadyEarn }}</view>
</view>
</view>
</view>
<view class="tui-price-flex tui-size32">
<view class="tui-flex-shrink">其他费用</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ sales.otherExpense}}</view>
<view class="tui-price-large">{{ sales.otherExpense == null ?'暂无':sales.otherExpense}}</view>
</view>
</view>
<view class="tui-price-flex tui-size32">
<view class="tui-flex-shrink">备注</view>
<view class="tui-goods-price">
<view class="tui-price-large">{{ sales.remark}}</view>
<view class="tui-price-large">{{ sales.remark == null ?'暂无':sales.remark}}</view>
</view>
</view>
<view class="tui-price-flex tui-size32">
<view class="tui-flex-shrink">欠款</view>
<view class="tui-goods-price tui-primary-color">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ sales.noEarn == null ?'暂无':sales.noEarn}}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" v-if="isReturn">
<view class="tui-flex-shrink">已选金额</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ changeAmount }}</view>
<view class="tui-price-large">{{ changeAmount}}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" v-if="isReturn">
<view class="tui-flex-shrink">退货金额</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ returnAmount }}</view>
<view class="tui-price-large">{{ returnAmount}}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" v-if="editNoPrice">
@ -85,7 +86,7 @@
<view class="tui-price-flex tui-size32" v-if="isReturn">
<view class="tui-flex-shrink">平台取货</view>
<view class="tui-goods-price">
<uni-data-checkbox v-model="radio1" :localdata="transportType"
<uni-data-checkbox v-model="radio1" :localdata="sex"
@change="checkBoxChange"></uni-data-checkbox>
</view>
</view>
@ -121,7 +122,7 @@
</view>
<view class="tui-order-info boxbg" v-if="isgys">
<view class="tui-order-title">
订单信息
物流信息
</view>
<view class="tui-order-content">
<view class="tui-order-flex">
@ -144,6 +145,24 @@
<view class="tui-item-content">
{{ sales.transportType == 0 ? '物流' : sales.transportType == 1 ? '快递' : sales.transportType == 2 ? '自送' : sales.transportType == 3 ? '拼包':'发车' }}
</view>
</view>
<view class="tui-order-flex">
<view class="tui-item-title">配送公司:</view>
<view class="tui-item-content">
{{ sales.transportType}}
</view>
</view>
<view class="tui-order-flex">
<view class="tui-item-title">配送人员:</view>
<view class="tui-item-content">
{{ sales.transportType}}
</view>
</view>
<view class="tui-order-flex">
<view class="tui-item-title">配送状态:</view>
<view class="tui-item-content">
{{ sales.status == 0 ?'待抢单' :sales.status == 1 ?'待取货' :sales.status == 3 ?'待送达' :sales.status == 4 ?'已完成' :sales.status == 5 ?'下游客户待退货' :sales.status == 00 ?'退货待抢单' :sales.status == 01 ?'退货待取货' :sales.status == 03 ?'退货待送达' :sales.status == 04 ?'待确认退货' :sales.status == 6 ?'待配货' :'挂单'}}
</view>
</view>
</view>
</view>
@ -153,28 +172,11 @@
</u-popup>
<view class="tui-tabbar">
<view class="tui-btn-mr">
<view class="btn-wrap">
<kk-printer ref="kkprinter" :bufferData="bufferData" @onPrint="onPrint"></kk-printer>
</view>
</view>
<view class="tui-btn-mr">
<u-button type="error" :plain="true" shape="circle" @click="cancelOrder">取消订单</u-button>
</view>
<view class="tui-btn-mr" v-if="sales.status == 4">
<u-button type="error" :plain="true" shape="circle"
@click="returnGoods">{{ !isReturn ? '退货' : '确认退货'}}</u-button>
</view>
<view class="tui-btn-mr">
<u-button type="error" :plain="true" shape="circle" @tap="inputDialogToggle()"
v-if="!editNoPrice">回款</u-button>
<!-- <u-button type="error" :plain="true" shape="circle" @click="sureNpPay" v-else>确认</u-button> -->
</view>
<view class="tui-btn-mr">
<u-button type="error" :plain="true" shape="circle" @tap="dealingsRecordList()"
v-if="!editNoPrice">回款记录</u-button>
<!-- <u-button type="error" :plain="true" shape="circle" @click="sureNpPay" v-else>确认</u-button> -->
<kk-printer ref="kkprinter" :bufferData="bufferData" @onPrint="onPrint"></kk-printer>
</view>
<view class="tui-btn-mr" @click="cancelOrder">取消订单</view>
<view class="tui-btn-mr" @click="returnGoods">{{ !isReturn ? '退货' : '确认退货'}}</view>
<view class="tui-btn-mr" @tap="inputDialogToggle()" v-if="!editNoPrice">回款</view>
</view>
<!-- 回款金额输入框 -->
<uni-popup ref="inputDialog" type="dialog">
@ -192,12 +194,12 @@
data() {
return {
radio1: 1,
transportType: [{
sex: [{
text: '是',
value: 0
}, {
text: '否',
value: 2
value: 1
}],
orderByWorkerCandidates: [],
orderByWorker: '',
@ -307,22 +309,22 @@
strCmd += blesdk.addCPCLText('40', '30', '24', '0', 0, '沧州明珠商贸城--快衣店')
strCmd += blesdk.addCPCLSETMAG(3, 3)
blesdk.addCPCLSETBOLD('bold')
strCmd += blesdk.addCPCLText('50', '120', '24', '0', 0, '收:' + this.order.name)
strCmd += blesdk.addCPCLText('50', '120', '24', '0', 0, '收:' + this.sales.userName)
strCmd += blesdk.addCPCLSETMAG(1, 1)
strCmd += blesdk.addCPCLText('50', '250', '24', '0', 0, this.order.phone)
strCmd += blesdk.addCPCLText('50', '250', '24', '0', 0, "15257485325")
strCmd += blesdk.addCPCLSETMAG(2, 2)
blesdk.addCPCLSETBOLD('bold')
strCmd += blesdk.addCPCLText('50', '330', '24', '0', 0, this.order.province + '/' + this.order.city + '/' +
this.order.area)
strCmd += blesdk.addCPCLText('50', '330', '24', '0', 0, this.sales.province + '/' + this.sales.city + '/' +
this.sales.area)
strCmd += blesdk.addCPCLSETMAG(1, 1)
strCmd += blesdk.addCPCLText('50', '410', '24', '0', 0, this.order.address)
strCmd += blesdk.addCPCLText('50', '410', '24', '0', 0, this.sales.receiveAddress)
strCmd += blesdk.addCPCLSETMAG(2, 2)
blesdk.addCPCLSETBOLD('bold')
strCmd += blesdk.addCPCLText('0', '490', '24', '0', 0, '——————————————————————————————')
strCmd += blesdk.addCPCLText('50', '570', '24', '0', 0, '发货方式:虚拟物流')
strCmd += blesdk.addCPCLText('50', '570', '24', '0', 0, '发货方式:'+ this.sales.companyName)
strCmd += blesdk.addCPCLSETMAG(2, 2)
strCmd += blesdk.addCPCLText('0', '650', '24', '0', 0, '——————————————————————————————')
strCmd += blesdk.addCPCLText('50', '730', '24', '0', 0, '店铺:张三的店')
strCmd += blesdk.addCPCLText('50', '730', '24', '0', 0, '店铺:'+this.sales.shopName)
strCmd += blesdk.addCPCLText('50', '810', '24', '0', 0, '13521030702')
strCmd += blesdk.addCPCLText('50', '890', '24', '0', 0, '地址:早市10059')
// strCmd += blesdk.addCPCLText(200,0,'24','5',0,'收件联');// 文字
@ -359,11 +361,12 @@
uni.navigateBack();
}).catch(res => {});
}else{
// this.sales.alreadyEarn = (this.sales.alreadyEarn * 1) + (this.newEarn * 1);
this.tui.request('/app/sale/editPayPrice','post', {
id:this.sales.id,
price:e
},false,true).then(res => {
this.sales.alreadyEarn = (this.sales.alreadyEarn * 1) + (this.newEarn * 1);
this.tui.request('/app/sale/edit','post', {
sale: this.sales,
customer: this.order,
saleDetailDTOList: this.list
},false,false).then(res => {
uni.showToast({
title: res.message,
icon: 'none'
@ -375,10 +378,6 @@
//回款金额输入框
inputDialogToggle() {
this.$refs.inputDialog.open()
},
// 记录
dealingsRecordList(){
},
//回款按钮 this.type==gys时,是上游客户欠款接口。否则为销售单欠款接口
editnoEarn() {
@ -421,8 +420,6 @@
}).catch((res) => {})
},
checkBoxChange() {
// 赋值物流方式
this.sales.transportType = this.radio1;
if (this.radio1 == 0 && this.orderByWorkerList.length == 0) {
this.transCompanyInput()
}
@ -771,6 +768,13 @@
}
.tui-btn-mr {
width:130rpx;
height: 60rpx;
background: #088FEB;
color: #fff;
border-radius: 10px;
line-height: 60rpx;
text-align: center;
margin-right: 30rpx;
}

3
pages/index/peopleList.vue

@ -144,7 +144,8 @@
prevPage.$vm.lbgName = item
} else if (this.popleType == 'kdyName') {
prevPage.$vm.kdyName = item
}
}
prevPage.$vm.clearMsg = '1'
uni.navigateBack({
delta: 1
})

6
pages/inventory/goodsList1.vue

@ -408,15 +408,17 @@
if(uni.getStorageSync('carList1') != ''){
this.carList.clear()
this.carList1 = JSON.parse(uni.getStorageSync('carList1'))
this.remark = this.carList1[0].remark
this.remark = this.carList1[0].remark
this.saleId = this.carList1[0].saleId
}else{
this.carList1 = this.carList1
}
if(this.carList1 == ''){
if(this.carList1 == '' && this.clearMsg != '1'){
this.carList.clear()
this.remark = ''
}
this.clearMsg = '';
this.totalAmount = 0;
this.shouldPay = 0
if (this.carList.size == 0) { //当前页没有数据

157
pages/staff/clock/clock.vue

@ -1,60 +1,127 @@
<template>
<view>
<view class="status">当前状态:{{value}}</view>
<view class="clock-button" :class="{isClock:isClock}" type="success" @click="onClock">打卡</view>
<view class="" v-if="peopleType=='1'">
<view class="status">当前状态:{{value}}</view>
<view class="clock-button" :class="{isClock:isClock}" type="success" @click="onClock">打卡</view>
</view>
<view class="" v-else>
<uni-section class="mb-10" title="时间选择" type="line">
<uni-datetime-picker v-model="range" type="daterange" />
</uni-section>
<uni-card title="打卡情况">
<uni-list>
<uni-list-item direction="row" v-for="(item , index) in staffList" :key="index">
<template #body>
<view class="tag-wrap">
<view v-if="item.departmentTitle">
<u-tag :text="item.departmentTitle" size="12" />
</view>
</view>
</template>
<template #header>
<view class="avatar-wrap">
<u-avatar :src="item.avatar" size="24">
</u-avatar>
<text class="staff-name">{{ item.nickname }}</text>
</view>
</template>
<template #footer>
<view style="font-size: 24rpx;">
<text style="margin-right: 10px;">正常:20</text>
<text style="margin-right: 10px;">迟到:<text style="color: red;">2</text></text>
<text>早退:<text style="color: red;">3</text></text>
</view>
</template>
</uni-list-item>
</uni-list>
</uni-card>
</view>
</view>
</template>
<script>
import {mapState} from 'vuex'
import {
mapState
} from 'vuex'
export default {
data() {
return {
value:'未打卡',
isClock:false
value: '未打卡',
isClock: false,
peopleType: '0',
staffList:[]
}
},
computed: mapState([ 'userId' ]),
methods: {
onClock() {
if (!this.isClock) {
this.tui.request("/app/clockIn/", "get", {
userId: this.userId
}, false, true).then((res) => {
if (res.code == 200) {
this.tui.toast('打卡成功', 2000, true)
this.value = '已打卡'
this.isClock = true
}else{
this.tui.toast(res.message)
}
console.log(res)
})
}
}
computed: mapState(['userId']),
onLoad() {
this.getStaffList()
},
methods: {
getStaffList() {
this.tui.request('/app/common/user/findAllUserByShopId', 'get', {}, false, false, true).then((res) => {
if (res.code !== 200) return
this.staffList = res.result
})
},
onClock() {
if (!this.isClock) {
this.tui.request("/app/clockIn/", "get", {
userId: this.userId
}, false, true).then((res) => {
if (res.code == 200) {
this.tui.toast('打卡成功', 2000, true)
this.value = '已打卡'
this.isClock = true
} else {
this.tui.toast(res.message)
}
console.log(res)
})
}
}
}
}
</script>
<style>
.status {
font-size: 40upx;
color: #333333;
text-align: center;
padding: 80upx;
}
.clock-button {
width: 200upx;
height: 200upx;
line-height: 200upx;
border-radius: 200upx;
text-align: center;
background-color: #5fd9ee;
color: #fef0f0;
font-size: 56upx;
margin: 50upx auto;
}
.isClock {
background: grey;
}
</style>
<style lang="scss">
.status {
font-size: 40upx;
color: #333333;
text-align: center;
padding: 80upx;
}
.clock-button {
width: 200upx;
height: 200upx;
line-height: 200upx;
border-radius: 200upx;
text-align: center;
background-color: #5fd9ee;
color: #fef0f0;
font-size: 56upx;
margin: 50upx auto;
}
.isClock {
background: grey;
}
.tag-wrap {
width: 100rpx;
flex: 1;
display: flex;
view {
margin: 0 2upx;
}
}
.avatar-wrap {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24upx;
}
</style>

117
pages/staff/performance/performance.vue

@ -1,28 +1,36 @@
<template>
<view>
<uni-section class="mb-10" title="业绩查看范围" type="line">
<uni-datetime-picker v-model="range" type="daterange" />
<view class="shop-choose">
<view class="shop-name">
门店
</view>
<uni-data-select
style="width: 100%"
v-model="name"
:localdata="shopList"
></uni-data-select>
</view>
<view class="shop-choose">
<view class="shop-name">
员工
</view>
<uni-data-select
style="width: 100%"
v-model="name"
:localdata="shopList"
></uni-data-select>
</view>
</uni-section>
<uni-section class="mb-10" title="业绩查看范围" type="line">
<uni-datetime-picker v-model="range" type="daterange" />
</uni-section>
<view class="">
<uni-card title="业绩排名">
<uni-list>
<uni-list-item direction="row" v-for="(item , index) in staffList" :key="index">
<template #body>
<view class="tag-wrap">
<view v-if="item.departmentTitle">
<u-tag :text="item.departmentTitle" size="12" />
</view>
</view>
</template>
<template #header>
<view class="avatar-wrap">
<u-avatar :src="item.avatar" size="24">
</u-avatar>
<text class="staff-name">{{ item.nickname }}</text>
</view>
</template>
<template #footer>
<view style="font-size: 24rpx;">
<text style="margin-right: 10px;">单数:20单</text>
<text>总金额:2463.00</text>
</view>
</template>
</uni-list-item>
</uni-list>
</uni-card>
</view>
</view>
</template>
@ -30,41 +38,42 @@
export default {
data() {
return {
range:[],
name:'',
shopList:[],
range: [],
name: '',
staffList:[]
}
},
created() {
console.log('created')
this.getShopList()
},
methods: {
getShopList() {
this.tui.request('/app/common/shops','get',{}, false,true,false).then(res => {
if (res.code !== 200) return
this.shopList = res.result.map((v) => {
return {
text:v.shopName,
value:v.id
}
})
})
},
onLoad() {
this.getStaffList()
},
methods: {
getStaffList() {
this.tui.request('/app/common/user/findAllUserByShopId', 'get', {}, false, false, true).then((res) => {
if (res.code !== 200) return
this.staffList = res.result
})
}
}
}
</script>
<style lang="scss" scoped>
.example-body {
}
.shop-choose {
padding: 25upx 15upx;
display: flex;
justify-content: space-between;
align-items: center;
.shop-name {
flex-basis: 150upx;
}
}
</style>
.example-body {}
.tag-wrap {
width: 100rpx;
flex: 1;
display: flex;
view {
margin: 0 2upx;
}
}
.avatar-wrap {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24upx;
}
</style>

7
pages/staff/staff.vue

@ -14,9 +14,9 @@
<u-icon name="list" :size="size"></u-icon>
<view class="list">业绩管理</view>
</u-grid-item>
<u-grid-item>
<u-grid-item @tap="goGuide">
<u-icon name="lock" :size="size"></u-icon>
<view class="lock">权限管理</view>
<view class="lock">打卡规则</view>
</u-grid-item>
</u-grid>
</uni-card>
@ -84,6 +84,9 @@
uni.navigateTo({
url: '/pages/staff/clock/clock'
})
},
goGuide(){
this.tui.toast("功能维护中...")
}
}
}

Loading…
Cancel
Save