wangfukang 3 years ago
parent
commit
101edab6ce
  1. BIN
      pages/.DS_Store
  2. 3
      pages/billing/changeGoods1.vue
  3. 9
      pages/index/addStock.vue
  4. 707
      pages/index/addStockList.vue
  5. 27
      pages/index/dataStatistics.vue
  6. 69
      pages/index/goodsStock.vue
  7. 3
      pages/index/orderDetail.vue
  8. 36
      pages/index/peopleList.vue
  9. 120
      pages/index/shopInfo.vue
  10. 31
      pages/index/stockDetail.vue
  11. 33
      pages/inventory/addinventory.vue
  12. 3
      pages/inventory/changeGoods1.vue
  13. 3
      pages/inventory/gategory.vue
  14. 1450
      pages/inventory/goodsList1.vue
  15. 28
      pages/inventory/inventory.vue
  16. BIN
      pages/staff/.DS_Store
  17. 107
      pages/staff/addStaff/addStaff.vue
  18. 144
      pages/staff/clock/clock.vue
  19. 92
      pages/staff/performance/performance.vue
  20. 141
      pages/staff/signRule/signRule.vue
  21. 8
      pages/staff/staff.vue

BIN
pages/.DS_Store

Binary file not shown.

3
pages/billing/changeGoods1.vue

@ -731,7 +731,8 @@
.content-left {
width: 170rpx;
background: #eee;
height: 100%;
height: 100%;
overflow: scroll;
}
.left-box {

9
pages/index/addStock.vue

@ -1,12 +1,9 @@
<template>
<view class="page1">
<view style="height: 150rpx;background: #fff;padding-top: 20rpx;">
<button size="default" type="default" @tap="scanCode" hover-class="is-hover">扫码盘点</button>
</view>
<!-- <view class="title-box">
<view class="page1">
<view class="title-box">
<uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/货号/供应商" cancelButton="none"
@confirm="search" />
</view> -->
</view>
<view class="content-box">
<view class="content-left">
<view class="left-box" v-for="(item, index) in indexList" :key="index"

707
pages/index/addStockList.vue

@ -0,0 +1,707 @@
<!-- 新增库存页 -->
<template>
<view class="page1">
<view class="content">
<view class="content-box">
<view class="shop-box" style="position: fixed;top:0;z-index: 99;width:100%;border-bottom: 1px solid #eee;margin-bottom: 20rpx;">
<u-grid :col="2" border>
<u-grid-item index="add" @tap.stop="scanCodeAdd">
<u-icon name="scan" size="36"></u-icon>
<text>扫一扫</text>
</u-grid-item>
<u-grid-item @tap.stop="goodsAdd">
<u-icon name="plus" size="28"></u-icon>
<text>添加商品</text>
</u-grid-item>
</u-grid>
</view>
<view class="shop-box" style="border-top:5px solid #eee;margin-top: 132rpx;" v-for="(value,key) in Array.from(carList)"
:key="key">
<view class="shop-name">
<img class="img-radius" :src="value[1].productPicture" alt=""
style="width: 140rpx;height: 140rpx;margin: 30rpx 0 0 30rpx;">
<view class="shop-productName">
<view style="color:#FF5809;">品名:{{value[1].productName}} ({{value[1].productSn}})</view>
<view>单价:{{value[1].purchasePrice || 0}} 数量:{{value[1].productCount}}</view>
<view>总价:{{value[1].price}}</view>
</view>
</view>
<view class="tui-order-content">
<u-collapse>
<u-collapse-item v-for="(item,index) in returnList" :key="index" :title="item.returnSale.createTime"
:name="item.returnSale.saleId">
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;">
<view style="width: 49%;text-align: center;border-right: 1px solid #eee;">商品规格</view>
<view style="width: 50%;text-align: center;">总数量</view>
</view>
<view v-for="(items,index1) in item.purchaseDetails">
<view v-for="(data,index2) in items.stockLogList1" style='height: 50rpx;line-height: 50rpx;'>
<view style="width: 49%;text-align: center;border-right: 1px solid #eee;float: left;">
{{data.attributeList | sliceMsg}}
</view>
<view style="width: 50%;text-align: center;float: left;">
{{data.productCount}}
</view>
</view>
</view>
</u-collapse-item>
</u-collapse>
</view>
</view>
</view>
<view class="content-box" style="margin-bottom:110rpx;" :style="{'margin-top':(carList.size>0?0:132) + 'rpx' }">
<!-- 账号权限是否可以维护成本价格(主账号和被授权的账号可以维护),参数名:shop_admin_cost,维护在用户表中,存在前后端缓存里,把备注栏挪出来,谁都可以备注 -->
<view class="price-box-list">
<view class="content-list">
<view class="list-name">备注</view>
<view class="">
<textarea v-model="remark" />
</view>
</view>
</view>
</view>
</view>
<view class="bottom-box">
<view class="bottom-left">
<text>合计:{{totalAmount}}</text>
<text style="color: #ffa200;">¥{{shouldPay}}</text>
</view>
<view class="bottom-right">
<button class="bottom-btn" @tap='inventorySubmit'>入库</button>
</view>
</view>
<!-- 弹出层 -->
<view>
<uni-popup ref="shopPopup" background-color="#fff">
<view class="shop-popup-content">
<view class="shop-popup-title">
<view class="shop-popup-title-left">
<img class="img-radius" :src="goodsDetail.productPicture" alt="" v-if="goodsDetail.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="shop-popup-title-right">
<view class="shop-popup-title-right-box" style="color: #088FEB;">{{goodsDetail.productName}}
</view>
<view class="shop-popup-title-right-box">{{goodsDetail.productSn}}</view>
</view>
</view>
<view class="shop-popup-container">
<ul style="border-top:20rpx;">
<li v-for="(items,index) in goodsDetail.attributeList" :key="index">
<view class="shop-title-fur">
<view class="shop-title-name">{{items.name}}</view>
</view>
<view class="shop-attrs">
<uni-data-checkbox v-model="value" :localdata="range"></uni-data-checkbox>
<text v-for="(itemTag, index1) in items.value" :key="index1"
@tap.stop="attrNameChange(index,index1) "
:class="itemTag.isChecked ? 'checkedText' : '' "> {{itemTag.value}}</text>
</view>
</li>
</ul>
<view style="padding-bottom: 100rpx;">
<view class="shop-checkList" v-for="(item,index) in temporaryList" :key="index">
<view @tap.stop="delCarData(index)" style="margin-right: 20rpx">
<uni-icons color="red" type="minus" size="26"></uni-icons>
</view>
<view class="shop-checkList-box">
<text style="width: 300rpx;display: inline-block;">{{item.name}}</text> <text style="color:#777;font-size: 12px;">库存:{{item.productNum}}</text>
</view>
<uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" />
</view>
</view>
</view>
</view>
<view class="shop-popup-bottom" v-for="(item,index) in temporaryList" :key="index">
<view class="shop-popup-bottom-left">
<text>数量:{{zNum}} 件</text>
</view>
<view class="shop-popup-bottom-right">
<view class="bottom-btn" @tap="temporaryCheck">选好了</view>
</view>
</view>
</uni-popup>
</view>
<!-- 弹出输入框 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" title="采购价" placeholder="请输入采购价"
@confirm="changePrice"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import {
mapState
} from 'vuex';
export default {
computed: mapState(['shopName']),
data() {
return {
// 表单数据
formData: {
name: '',
manufacturer: '',
price: '',
single: ''
},
khName: [],
carList: new Map(),
remark: '',
otherPay: '',
noPay: 0,
alreadyPay: '',
realAmount: 0,
shouldPay: '',
totalAmount: 0,
index: '',
index1: '',
goodsDetail: [],
columns: [],
keyList: [],
temporaryList: [],
zNum: 0,
storageType:'',
productNum:0,
productId:''
}
},
filters: {
sliceMsg(val) {
var name = ''
if (typeof(val) == 'string') {
let newObj = JSON.parse(val)
for (let as in newObj) {
name += newObj[as] + '/'
}
}
return name;
}
},
onShow() {
let that = this;
this.khName = JSON.parse(JSON.stringify(this.khName)) || ''
if (this.carList.size == 0) { //当前页没有数据
for (let i = 0; i < this.carList1.length; i++) {
let obj = {
purchasePrice: "", //进货价
price: 0,
productCount: 0,
productId: this.carList1[i].id,
productName: this.carList1[i].productName,
productPicture: this.carList1[i].productPicture,
productSn: this.carList1[i].productSn,
stockLogList: new Map(),
stockLogList1: []
}
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList1[i]
.saleDetailQueryDTO[m].productCount)
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount
}
this.carList.set(this.carList1[i].id, obj)
}
this.carList1 = []
} else { //当前页有数据
for (let i = 0; i < this.carList1.length; i++) {
if (this.carList.has(this.carList1[i].id) == true) { //商品相同
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
if (this.carList.get(this.carList1[i].id).stockLogList.has(this.carList1[i].saleDetailQueryDTO[
m].attributeList) == true) { //规格相同
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[
m].attributeList, this.carList.get(this.carList1[i].id).stockLogList.get(this
.carList1[i].saleDetailQueryDTO[m].attributeList) + this.carList1[i]
.saleDetailQueryDTO[m].productCount)
} else { //规格不同
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[
m].attributeList, this.carList1[i].saleDetailQueryDTO[m].productCount)
}
this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[
m].productCount
}
} else { //商品不同
let obj = {
purchasePrice: "", //进货价
price: 0,
productCount: 0,
productId: this.carList1[i].id,
productName: this.carList1[i].productName,
productPicture: this.carList1[i].productPicture,
productSn: this.carList1[i].productSn,
stockLogList: new Map(),
stockLogList1: [],
name: ''
}
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList1[i]
.saleDetailQueryDTO[m].productCount)
obj.name = this.carList1[i].saleDetailQueryDTO[m].name
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount
}
this.carList.set(this.carList1[i].id, obj)
}
this.carList.get(this.carList1[i].id).price = this.carList.get(this.carList1[i].id).purchasePrice * this.carList.get(this.carList1[i].id).productCount;
}
this.carList1 = []
}
this.getAllPrice()
},
onLoad() {
this.storageType = uni.getStorageSync('type')
},
methods: {
//扫一扫功能
scanCodeAdd() {
uni.scanCode({
success: (res) => {
if(res.scanType == "QR_CODE"){ //二维码
let shopId = res.result.split(',')[1]
if(shopId == uni.getStorageSync('shopId')){
this.productId = res.result.split(',')[0]
this.toggle('bottom', res.result.split(',')[0]);
if (item.saleDetailDTOList) {
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
this.carList.push(item.saleDetailDTOList[i])
}
}
}else{
this.tui.toast('您的店铺中暂无该商品!')
}
}else{
this.productId = res.result
this.tui.request("/app/product/getByBarcode", "POST", {
barcode:res.result
}, false, true).then((res1) => {
if (res1.code == 200) {
if(res1.result == ''){
this.tui.toast('您的店铺中暂无该商品!')
}else{
this.toggle('bottom', res1.result[0].id);
if (item.saleDetailDTOList) {
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
this.carList.push(item.saleDetailDTOList[i])
}
}
}
} else {
this.tui.toast(res.message)
}
}).catch((res) => {
this.tui.toast(res)
})
}
},
fail: (res) => {
uni.showToast({
title: '扫描失败',
icon: 'none'
})
}
})
},
goodsAdd() {
uni.navigateTo({
url: "/pages/index/addStock"
})
},
//删除整条商品
delShop(id) {
var that = this;
uni.showModal({
title: "提示",
content: "确定删除此条商品吗?",
success: function(res) {
if(res.confirm){
that.tui.request("/app/checkStockDetail/deleteCheckStockDetail", "POST", {
categoryId: id
}, false, true).then((res1) => {
if (res1.code == 200) {
that.tui.toast("删除成功")
} else {
that.tui.toast(res.message)
}
}).catch((res) => {})
}
}
})
},
//确认盘点
inventorySubmit() {
uni.showModal({
title: "提示",
content: "请再次确认盘点信息是否正确。确认完成盘点吗?",
success: function(res) {
if(res.confirm){
that.tui.request("/app/checkStock/submitToStock", "post", {}, false, false).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "盘点成功",
icon: 'none'
})
setTimeout(res=> {
uni.navigateBack({
delta: 1
})
},2000)
} else {
uni.showToast({
title: "盘点失败",
icon: 'none'
})
}
})
}
}
})
}
}
}
</script>
<style lang="scss" scoped>
page,
.page1 {
height: 100%;
}
.content {
border-top: 1px solid #eee;
overflow-y: scroll;
max-height: 100vh;
margin-bottom: 100rpx;
}
.content-box {
width: 100%;
height: auto;
background: #fff;
margin-bottom: 20rpx;
}
.content-list {
width: 95%;
margin: 0 auto;
display: flex;
height: 80rpx;
border-bottom: 1px solid #eee;
}
.content-list:last-child {
border-bottom: none;
height: auto;
}
.list-name {
width: 200rpx;
text-align: left;
line-height: 40px;
height: 80rpx;
padding-left: 20rpx;
}
.list-val {
width: 560rpx;
height: 80rpx;
line-height: 80rpx;
}
.list-val input {
width: 400rpx;
height: 60rpx;
display: inline-block;
line-height: 60rpx;
float: left;
margin-top: 10rpx;
padding-left: 20rpx;
border-bottom: 1px solid #088FEB;
}
.uni-data-select {
width: 80%;
text-align: center;
}
.uni-select {
border: none !important;
border-radius: 0 !important;
}
.uni-select__input-placeholder {
color: #6a6a6a;
font-size: 28rpx !important;
width: 400rpx;
}
.uni-select__input-box {
.uni-icons {
margin-left: 100rpx;
}
}
.shop-box {
width: 95%;
margin: 0 auto;
position: relative;
background: #fff;
}
.shop-name {
width: 100%;
height: 200rpx;
line-height: 80rpx;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
font-size: 28rpx;
font-weight: bold;
display: flex;
.uni-icons {
color: #088FEB !important;
}
}
.shop-productName {
flex: 1;
display: flex;
flex-direction: column;
padding-left: 20rpx;
}
.shop-productName view {
height: 55rpx;
}
.shop-collapse {
display: flex;
height: 80rpx;
font-size: 26rpx;
line-height: 80rpx;
}
.shop-collapse text {
width: 40%;
text-align: center;
padding-right: 40rpx;
border-right: 1px solid #eee;
}
.price-box-title {
width: 95%;
height: 80rpx;
line-height: 80rpx;
margin: 0 auto;
display: flex;
text-align: center;
border-bottom: 1px solid #eee;
}
.price-box-title text {
flex: 1;
}
.uni-list-cell {
display: flex;
margin-right: 20rpx;
}
.bottom-box {
width: 100%;
position: absolute;
bottom: 0rpx;
display: flex;
background: #fff;
border-top: 1px solid #eee;
height: 110rpx;
}
.bottom-left {
flex: 1;
height: 110rpx;
line-height: 110rpx;
}
.bottom-right {
flex: 1;
height: 110rpx;
line-height: 110rpx;
}
.bottom-left text {
line-height: 84rpx;
display: inline-block;
padding-left: 20rpx;
}
.bottom-btn {
width: 320rpx;
background: linear-gradient(90deg, #60F3FF, #088FEB);
color: #fff;
border-radius: 50rpx;
height: 85rpx;
margin-top: 15rpx;
}
textarea {
margin: 20rpx;
border: 1px solid #eee;
height: 150rpx;
width: 500rpx;
}
.shop-popup-content {
align-items: center;
justify-content: center;
padding: 15px;
height: 1200rpx;
background-color: #fff;
margin-bottom: 30rpx;
overflow: scroll;
}
.shop-popup-title {
display: flex;
height: 180rpx;
border-bottom: 1px solid #eee;
margin-top: 20rpx;
}
.shop-popup-title-left {
width: 150rpx;
height: 150rpx;
}
.shop-popup-title-left img {
width: 150rpx;
height: 150rpx;
}
.shop-popup-title-right {
width: 400rpx;
margin-left: 30rpx;
}
.shop-popup-title-right-box {
height: 50rpx;
line-height: 50rpx;
}
.shop-popup-container {
width: 100%;
background: #fff;
height: 50rpx;
}
.shop-title-fur {
width: 95%;
height: 70rpx;
margin: 0 auto;
}
.shop-title-name {
font-size: 30rpx;
width: 50%;
float: left;
height: 70rpx;
line-height: 70rpx;
}
.shop-attrs {
text {
display: inline-block;
border: 1px solid #5fd9ee;
margin: 20rpx;
background-color: #fff;
color: #5fd9ee;
width: 100rpx;
line-height: 70rpx;
height: 70rpx;
text-align: center;
}
.checkedText {
background-color: $u-primary;
color: #fff;
}
}
.shop-checkList {
display: flex;
height: 50rpx;
font-size: 28rpx;
line-height: 50rpx;
margin: 20rpx 0;
}
.shop-checkList-box {
height: 50rpx;
width: 60%;
}
.shop-popup-bottom {
width: 95%;
height: 100rpx;
position: fixed;
bottom: 0;
left: 2.5%;
display: flex;
z-index: 99;
background: #fff;
}
.shop-popup-bottom-left {
width: 50%;
line-height: 80rpx;
}
.shop-popup-bottom-right {
width: 50%;
line-height: 100rpx;
.bottom-btn {
width: 70%;
line-height: 35px;
height: 70rpx;
text-align: center;
color: #fff;
font-size: 28rpx;
margin: 0 auto;
background: linear-gradient(90deg, #60F3FF, #088FEB);
border-radius: 70rpx;
}
}
.noPic{
border-radius: 10px;
width: 150rpx;
height: 150rpx;
// margin: 30rpx 0 0 30rpx;
text-align: center;
line-height: 140rpx;
color: #777;
background: #eee;
}
.tui-order-content {
width: 100%;
padding: 24rpx 30rpx;
box-sizing: border-box;
background: #fff;
font-size: 24rpx;
line-height: 30rpx;
}
.u-collapse-content {
display: flex;
justify-content: space-between;
line-height: 30px;
}
</style>

27
pages/index/dataStatistics.vue

@ -9,14 +9,12 @@
<u-count-to :start-val="0" :end-val="shopInfo.totalAmount"></u-count-to>
<text class="grid-text">销售总金额</text>
</u-grid-item>
<u-grid-item>
<u-grid-item @tap="maskPrice">
<u-count-to :start-val="0" :end-val="shopInfo.totalAlreadyEarn + shopInfo.totalPayAmount"></u-count-to>
<uni-tooltip :content="'订单实收:' + shopInfo.totalAlreadyEarn +'回款:'+ shopInfo.totalPayAmount" placement="left">
<view class="grid-text" style="display: flex;">
<text>实收总额</text>
<u-icon name="question-circle" size="16"></u-icon>
</view>
</uni-tooltip>
<view class="grid-text" style="display: flex;">
<text>实收总额</text>
<u-icon name="question-circle" size="16"></u-icon>
</view>
</u-grid-item>
<u-grid-item>
<u-count-to :start-val="0" :end-val="type==0?shopInfo.totalProfit:0" :decimals="2"></u-count-to>
@ -74,6 +72,9 @@
this.type = uni.getStorageSync('type')
},
methods: {
maskPrice(){
this.tui.toast('订单实收:' + this.shopInfo.totalAlreadyEarn +'回款:'+ this.shopInfo.totalPayAmount)
},
getSaleInfo() {
this.tui.request("/app/sale/getShopAll", "POST", {
pageVo: {
@ -84,17 +85,7 @@
endTime:this.range[1]
}, false, false).then((res) => {
if (res.code == 200) {
this.shopInfo = {
totalAmount:res.result.totalAmount,
totalAlreadyEarn:res.result.totalAlreadyEarn,
totalPayAmount:res.result.totalPayAmount,
totalCCount:res.result.totalCCount,
totalCount:res.result.totalCount,
totalJCount:res.result.totalJCount,
totalProfit:res.result.totalProfit,
returnTotalAmount:res.result.returnTotalAmount,
returnTotalCount:res.result.returnTotalCount,
}
this.shopInfo = res.result
} else {
this.tui.toast(res.message)
}

69
pages/index/goodsStock.vue

@ -1,12 +1,13 @@
<template>
<view>
<view style="height: 150rpx;background: #fff;padding-top: 20rpx;">
<view class="search" style="position: fixed;top: 0;z-index: 99;">
<button size="default" type="default" @tap="addStock" hover-class="is-hover">新增盘点</button>
<uni-datetime-picker style="margin-bottom:10px;" v-model="range" @change="searchList" type="daterange" />
</view>
<view class="formBox">
<u-alert description="点击可查看对应每笔盘点单" type="primary"></u-alert>
<view class="swipe-action">
<view class="swipe-action__content" @tap="onItemClick(item)" v-for="(item,index) in list" :key="index">
<view class="swipe-action__content" @tap="onItemClick(item)" v-for="(item,index) in stockList" :key="index">
<view class="swipe-action__content__left">
<view class="swipe-action__content__text">{{ item.nickname == null ?'暂无':item.nickname}}</view>
</view>
@ -17,7 +18,8 @@
</view>
</view>
</view>
</view>
</view>
<u-loadmore :status="status" />
</view>
</template>
@ -37,29 +39,63 @@
backgroundColor: '#3c9cff'
}
}],
popupShow: false,
popupShow: false,
status: 'loadmore',
shopName: '',
list: []
list: [],
pages: 1,
totalPages: 0,
range:[],
}
},
onShow() {
this.getList()
},
onReachBottom() {
if (this.pages >= this.totalPages) return;
this.status = 'loading';
this.pages = ++this.pages;
this.getOrderInfoList();
},
methods: {
getList() {
this.tui.request("/app/customer/debt", "POST", {}, false, true).then((res) => {
if (res.code == 200) {
this.list = res.result.records
getList() {
this.status = 'loading';
this.tui.request("/app/checkStock/getCheckStockList", "POST", {
startDate:this.range[0],
endDate:this.range[1],
pageNum:this.pages,
pageSize:10
}, false, false).then((res) => {
this.status = 'nomore';
if (res.code == 200) {
if (this.pages == 1) {
this.stockList = res.result.records
} else {
this.stockList = [...this.stockList, ...res.result.records]
}
this.totalPages = res.result.pages
} else {
this.tui.toast(res.message)
}
})
},
searchList(res) {
this.pages = 1;
this.stockList = [];
this.getList()
},
addStock(){
uni.navigateTo({
url: '/pages/index/addStock'
})
// this.tui.request("/app/checkStock/addCheckStock", "POST", {}, false, false).then((res) => {
// if (res.code == 200) {
// uni.setStorageSync('stockId',res.result.stockId);
uni.navigateTo({
url: '/pages/index/addStockList'
})
// } else {
// this.tui.toast(res.message)
// }
// })
},
onItemClick(target) {
uni.navigateTo({
@ -185,12 +221,19 @@
button {
color: #ffffff;
background: #5fd9ee;
width: 90%;
width: 100%;
margin-bottom: 20rpx;
// margin-top: 20upx;
}
</style>
<style>
.u-radio {
margin: 15 upx 0;
}
.search {
padding: 20upx;
background-color: #fff;
width: 100%;
background-color: #fff;
}
</style>

3
pages/index/orderDetail.vue

@ -549,8 +549,9 @@
strCmd += blesdk.addCPCLPrint();
this.bufferData.push(strCmd);
}
console.log("传值之前",this.bufferData)
this.$nextTick(()=>{
uni.redirectTo({

36
pages/index/peopleList.vue

@ -9,7 +9,7 @@
@confirm="search" />
</view>
</view>
<view style="margin-top: 230rpx;overflow:scroll;">
<view style="overflow:scroll;" :style="{'margin-top':popleType == 'khName' || popleType == 'gysName'?'230rpx':'110rpx'}">
<view v-if="popleType== 'khName' || popleType== 'gysName'" style="overflow:scroll;">
<!-- 供应商、客户走这一套 -->
<view class="list-1" v-for="item in popleList" :key="item" @tap="clickList(item)"
@ -40,15 +40,15 @@
<!-- 物流、发车、大巴走这一套 -->
<view class="" v-if="popleType== 'wlName' || popleType== 'fcName' || popleType== 'dbName'">
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="(item,index) in popleList[0]" :key="index">
<view class="shop-mask" v-if="item.isOnLine == 0" @tap.stop="clickMask(item)">
<!-- <view class="shop-mask" v-if="item.isOnLine == 0" @tap.stop="clickMask(item)">
<view style="width: 100%;height: 100%;line-height: 120rpx;text-align: center;color: red;" @tap.stop="clickPhone(item.mobile)">
此{{popleType== 'wlName'?'物流公司': popleType== 'fcName'?'厢货车': popleType== 'dbName'?'大巴车':'公司'}}已下线,点击可拨打电话
</view>
</view>
</view> -->
<view class="name-tel">
<text style="line-height: 75rpx;">{{item.companyName}}</text>
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
<text style="line-height: 75rpx;">{{item.workerName}}</text>
<text style="line-height: 75rpx;" v-if="item.companyName">{{item.companyName}} <text v-if="item.isOnLine == 0" style="color: red;">(已下线)</text></text>
<text style="line-height: 75rpx;" v-if="item.shippingMethod">{{item.shippingMethod}} <text v-if="item.isOnLine == 0" style="color: red;">(已下线)</text></text>
<text style="line-height: 75rpx;" v-if="item.workerName">{{item.workerName}} <text v-if="item.isOnLine == 0" style="color: red;">(已下线)</text></text>
</view>
<view class="standard-box" @tap.stop="toggle('center',item)">
<view class="">
@ -66,15 +66,15 @@
<view>↓↓下方为区域内所有物流公司↓↓</view>
</view>
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList[1]" :key="item">
<view class="shop-mask" v-if="item.isOnLine == 0" @tap.stop="clickMask(item)">
<!-- <view class="shop-mask" v-if="item.isOnLine == 0" @tap.stop="clickMask(item)">
<view style="width: 100%;height: 100%;line-height: 120rpx;text-align: center;color: red;" @tap.stop="clickPhone(item.mobile)">
此{{popleType== 'wlName'?'物流公司': popleType== 'fcName'?'厢货车': popleType== 'dbName'?'大巴车':'公司'}}已下线,点击可拨打电话
</view>
</view>
</view> -->
<view class="name-tel">
<text style="line-height: 75rpx;">{{item.companyName}}</text>
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
<text style="line-height: 75rpx;">{{item.workerName}}</text>
<text style="line-height: 75rpx;" v-if="item.companyName">{{item.companyName}} <text v-if="item.isOnLine == 0" style="color: red;">(已下线)</text></text>
<text style="line-height: 75rpx;" v-if="item.shippingMethod">{{item.shippingMethod}} <text v-if="item.isOnLine == 0" style="color: red;">(已下线)</text></text>
<text style="line-height: 75rpx;" v-if="item.workerName">{{item.workerName}} <text v-if="item.isOnLine == 0" style="color: red;">(已下线)</text></text>
</view>
<view class="standard-box" @tap.stop="toggle('center',item)">
<view class="">
@ -91,15 +91,15 @@
<!--快递、拉包工 -->
<view class="" v-if="popleType== 'kdName' || popleType== 'lbgName' || popleType== 'kdyName'">
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList" :key="item">
<view class="shop-mask" v-if="item.isOnLine == 0" @tap.stop="clickMask(item)">
<!-- <view class="shop-mask" v-if="item.isOnLine == 0" @tap.stop="clickMask(item)">
<view style="width: 100%;height: 100%;line-height: 120rpx;text-align: center;color: red;" @tap.stop="clickPhone(item.mobile)">
此{{popleType== 'wlName'?'物流公司': popleType== 'fcName'?'厢货车': popleType== 'dbName'?'大巴车':'公司'}}已下线,点击可拨打电话
</view>
</view>
</view> -->
<view class="name-tel">
<text style="line-height: 75rpx;">{{item.companyName}}</text>
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
<text style="line-height: 75rpx;">{{item.workerName}}</text>
<text style="line-height: 75rpx;" v-if="item.companyName">{{item.companyName}} <text v-if="item.isOnLine == 0" style="color: red;">(已下线)</text></text>
<text style="line-height: 75rpx;" v-if="item.shippingMethod">{{item.shippingMethod}} <text v-if="item.isOnLine == 0" style="color: red;">(已下线)</text></text>
<text style="line-height: 75rpx;" v-if="item.workerName">{{item.workerName}} <text v-if="item.isOnLine == 0" style="color: red;">(已下线)</text></text>
</view>
<view class="standard-box" @tap.stop="toggle('center',item)">
<view class="">
@ -306,6 +306,10 @@
},
//点击选择列表,带参数 返回上一页
clickList(item) {
if(item.isOnLine ==0){
this.tui.toast(this.popleType== 'wlName'?'物流公司已下线': this.popleType== 'fcName'?'厢货车已下线': this.popleType== 'dbName'?'大巴车已下线':this.popleType== 'lbgName'?'拉包工已下线':this.popleType== 'kdyName'?'快递员已下线':'公司已下线')
return
}
if(this.noClick == 0){
let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
let prevPage = pages[pages.length - 2]; //上一页页面实例

120
pages/index/shopInfo.vue

@ -3,21 +3,22 @@
<view class="formBox">
<uni-forms :modelValue="addForm" ref="addForm" validateTrigger="bind" :rules="rules" label-width="160rpx"
label-align="right">
<uni-forms-item label="手机号" required name="mobile">
<uni-forms-item label="手机号" name="mobile">
<uni-easyinput type="text" v-model="addForm.mobile" placeholder="请输入登录手机号" />
</uni-forms-item>
<uni-forms-item label="原密码" required name="password">
</uni-forms-item>
<view class="line"></view>
<uni-forms-item label="原密码" name="password">
<uni-easyinput type="password" v-model="addForm.password" placeholder="请输入原登录密码" />
</uni-forms-item>
<uni-forms-item label="新密码" required name="password">
<uni-forms-item label="新密码" name="password">
<uni-easyinput type="password" v-model="addForm.newPass" placeholder="请输入新登录密码" />
</uni-forms-item>
<uni-forms-item label="密码确认" required name="confirm">
<uni-forms-item label="密码确认" name="confirm">
<uni-easyinput type="password" v-model="addForm.confirm" placeholder="请输入新登录密码" />
</uni-forms-item>
</uni-forms>
<view class="tui-tabbar">
<u-button type="primary" shape="circle" @tap.stop="onFormSubmit">确定</u-button>
<view class="bottom">
<button @tap.stop="onFormSubmit">确定</button>
</view>
</view>
</view>
@ -39,27 +40,7 @@
newPass: ''
},
userId: '',
shopList: [],
rules: {
mobile: {
rules: [{
required: true,
errorMessage: '手机号不能为空'
}]
},
password: {
rules: [{
required: true,
errorMessage: '密码不能为空'
}]
},
confirm: {
rules: [{
required: true,
errorMessage: '确认密码不能为空'
}]
},
}
shopList: []
}
},
onLoad(options) {
@ -67,31 +48,29 @@
this.addForm.mobile = this.mobile
},
methods: {
onFormSubmit() {
if(this.addForm.mobile == '' &&this.addForm.newPass == ''){
this.tui.toast("不能为空")
return;
onFormSubmit() {
if (this.addForm.mobile == '' && this.addForm.newPass == '') {
this.tui.toast("不能为空")
return;
}
if (this.addForm.confirm !== this.addForm.newPass) return this.tui.toast('两次密码不一致', 2000, )
// this.$refs.addForm.validate().then(async () => {
this.tui.request("/user/modifyPassAndMobile", "post", {
mobile: this.addForm.mobile,
password: this.addForm.password,
newPass: this.addForm.newPass,
userId: this.userId
}, false, true).then((res) => {
if (res.code == 200) {
this.tui.toast("修改成功!")
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/login'
})
}, 200)
} else {
this.tui.toast(res.message)
}
})
// })
this.tui.request("/user/modifyPassAndMobile", "post", {
mobile: this.addForm.mobile,
password: this.addForm.password,
newPass: this.addForm.newPass,
userId: this.userId
}, false, true).then((res) => {
if (res.code == 200) {
this.tui.toast("修改成功!")
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/login'
})
}, 200)
} else {
this.tui.toast(res.message)
}
})
}
}
}
@ -105,7 +84,7 @@
.formBox {
margin: 20rpx;
padding: 20rpx 26rpx;
padding: 40rpx 26rpx 20rpx;
border-radius: 14rpx;
box-shadow: 0px 1px 10px 2px #e2e2e2;
background-color: #fff;
@ -131,21 +110,26 @@
height: 120%;
border-radius: 4upx;
}
}
.tui-tabbar {
width: 100%;
height: 98rpx;
background: #fff;
position: fixed;
left: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 26rpx;
box-shadow: 0 0 1px rgba(0, 0, 0, .3);
padding-bottom: env(safe-area-inset-bottom);
z-index: 996;
}
.line{
height: 10rpx;
width: 100%;
background: #eee;
margin-bottom: 44rpx;
}
.bottom{
width: 100%;
height: 150rpx;
background: #fff;
position: fixed;
bottom: 0;
left: 0;
}
button{
background: #5fd9ee;
width: 95%;
border-radius: 10px;
margin: 10px auto 0;
color: #fff;
}
</style>

31
pages/index/stockDetail.vue

@ -106,14 +106,31 @@
}
}
console.log('第一个',data)
this.dataList.saleDetailQueryDTO = data
this.dataList.checkStockAttributeVos = data
console.log('二个',this.dataList)
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2];
prevPage.$vm.pdList = this.dataList
uni.navigateBack({
delta: 1
})
this.tui.request("/app/checkStockDetail/addCheckStockDetail", "POST", {
productId: this.dataList.id,
checkStockId:uni.getStorageSync('stockId'),
productName:this.dataList.productName,
productPicture:this.dataList.productPicture,
productSn:this.dataList.productSn,
checkStockAttributeVos:this.dataList.checkStockAttributeVos
}, false, true).then((res) => {
if (res.code == 200) {
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2];
prevPage.$vm.pdList = this.dataList
uni.navigateBack({
delta: 1
})
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
}
}

33
pages/inventory/addinventory.vue

@ -2,30 +2,29 @@
<template>
<view class="page1">
<view class="content">
<view class="content-box">
<view class="content-list">
<view class="content-box" style="position: fixed;top:0;z-index: 99;width: 100%;">
<view class="content-list" @tap="goPopleList('gysName')">
<view class="list-name">供应商</view>
<view class="list-val">
<input type="text" placeholder="请选择供应商" disabled
style="border-bottom: 1px solid #fff;text-align: center;" :value="khName.consigneeName"
@tap="goPopleList('gysName')">
style="border-bottom: 1px solid #fff;text-align: center;" :value="khName.consigneeName">
<uni-icons type="right" size="16" style="margin-left: 80rpx;line-height: 80rpx;"></uni-icons>
</view>
</view>
<view class="shop-box" style="border-bottom: 1px solid #eee;margin-bottom: 20rpx;">
<u-grid :col="2" border>
<u-grid-item index="add" @tap.stop="scanCodeAdd">
<u-icon name="scan" size="36"></u-icon>
<text>扫一扫</text>
</u-grid-item>
<u-grid-item @tap.stop="goodsAdd">
<u-icon name="plus" size="28"></u-icon>
<text>添加商品</text>
</u-grid-item>
</u-grid>
</view>
</view>
<view class="content-box">
<view class="shop-box" style="border-bottom: 1px solid #eee;margin-bottom: 20rpx;">
<u-grid :col="2" border>
<u-grid-item index="add" @tap.stop="scanCodeAdd">
<u-icon name="scan" size="36"></u-icon>
<text>扫一扫</text>
</u-grid-item>
<u-grid-item @tap.stop="goodsAdd">
<u-icon name="plus" size="28"></u-icon>
<text>添加商品</text>
</u-grid-item>
</u-grid>
</view>
<view class="content-box" style="margin-top: 212rpx;">
<view class="shop-box" style="border-top:5px solid #eee;" v-for="(value,key) in Array.from(carList)"
:key="key">
<view class="shop-name">

3
pages/inventory/changeGoods1.vue

@ -725,7 +725,8 @@
.content-left {
width: 170rpx;
background: #eee;
height: 100%;
height: 100%;
overflow: scroll;
}
.left-box {

3
pages/inventory/gategory.vue

@ -294,6 +294,9 @@
this.editItem = item;
}
},
close(){
this.$refs.addTypeDialog.close()
},
//查询分类下有没有库存
getTypeToNum(id) {

1450
pages/inventory/goodsList1.vue

File diff suppressed because it is too large

28
pages/inventory/inventory.vue

@ -1,6 +1,6 @@
<!-- 库存列表页 -->
<template>
<view style="display: flex;flex-direction: column;height: 1280rpx;">
<view style="display: flex;flex-direction: column;" :style="{height: windowHeight + 'px'}">
<view class="" style="display: flex;border-top: 1px solid #eee;border-bottom: 1px solid #eee;">
<view class="title-left">
<view class="title-left-box">
@ -26,19 +26,7 @@
<text>库存成本</text>
</view>
</view>
<!-- <view class="title-right" @tap.stop="onGridClick('0')">
<view class="title-right-top title-btn">
分类管理
</view>
<view class="title-right-bottom title-btn" @tap.stop="onGridClick('2')">
新增商品
</view>
<view class="title-right-bottom title-btn"
@tap.stop="onGridClick('1')">
新增入库
</view>
</view> -->
</view>
<view class="title-right">
<view class="title-right-top title-btn" @tap.stop="onGridClick('1')">
新增入库
@ -129,8 +117,18 @@
type:'',
warnMsg:[],
searchName:'',
categoryIndex:0
categoryIndex:0,
windowHeight:0
}
},
onLoad(){
let that = this
uni.getSystemInfo({
success: function (info) {
console.log(info.windowHeight)
that.windowHeight = info.windowHeight
}
});
},
onShow() {
this.getGategoryList()

BIN
pages/staff/.DS_Store

Binary file not shown.

107
pages/staff/addStaff/addStaff.vue

@ -1,107 +0,0 @@
<template>
<view>
<view class="popup-height">
<uni-forms :modelValue="addForm" ref="addForm" validateTrigger="bind" :rules="rules" label-width="160rpx"
label-align="right">
<uni-forms-item label="员工姓名" required name="nickname">
<uni-easyinput type="text" v-model="addForm.nickname" placeholder="请输入员工姓名" />
</uni-forms-item>
<uni-forms-item label="手机号" required name="mobile">
<uni-easyinput type="text" v-model="addForm.mobile" placeholder="请输入员工手机号" />
</uni-forms-item>
<uni-forms-item label="权限" required name="type">
<uni-data-select style="width: 100%" v-model="addForm.type" :localdata="typeList"></uni-data-select>
</uni-forms-item>
</uni-forms>
<u-button type="primary" @click="onFormSubmit">保存</u-button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
addForm: {
nickname: '',
mobile: '',
type: '',
password:'123456'
},
id: '',
typeList: [{
value: 0,
text: "管理员"
},
{
value: 1,
text: "员工"
},
],
rules: {
nickname: {
rules: [{
required: true,
errorMessage: '不能为空'
}]
},
mobile: {
rules: [{
required: true,
errorMessage: '不能为空'
}]
},
type: {
rules: [{
required: true,
errorMessage: '不能为空'
}]
},
}
}
},
onLoad(options) {
const type = options.type
const item = JSON.parse(options.item)
this.type = options.type
if (type === 'edit') {
this.addForm.nickname = item.nickname
this.addForm.mobile = item.mobile
this.addForm.type = Number(item.type)
this.id = item.id
}
uni.setNavigationBarTitle({
title: type === 'add' ? '新增员工' : '编辑信息'
});
},
methods: {
onFormSubmit() {
this.$refs.addForm.validate().then(async () => {
let url;
if(this.type=='edit'){
url = '/app/common/user/edit'
this.addForm.id = this.id
}else{
url = '/app/common/user/add'
}
const res = await this.tui.request(url, 'post', this.addForm, false,
true, false)
if (res.code == 200) {
uni.navigateBack()
} else {
this.tui.toast(res.message)
}
}, (reason) => {
})
}
}
}
</script>
<style lang="scss" scoped>
.popup-height {
padding: 0 25upx;
background-color: #fff;
}
</style>

144
pages/staff/clock/clock.vue

@ -1,144 +0,0 @@
<template>
<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'
export default {
data() {
return {
value: '未打卡',
isClock: false,
peopleType: '0',
staffList:[]
}
},
computed: mapState(['userId']),
onLoad() {
//明珠A 116.805796,38.335286
//明珠D 116.806408,38.338111
//明珠B 116.806913,38.336937
//明珠C 116.80562,38.337177
//明珠早市精品二合一给一个大的范围 116.810029,38.335321
this.peopleType = uni.getStorageSync('type')
if(this.peopleType == 0){
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() {
uni.getLocation({
type: 'wgs84',
isHighAccuracy:true,
accuracy:'best',
success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
}
});
// 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)
// }
// })
// }
}
}
}
</script>
<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>

92
pages/staff/performance/performance.vue

@ -1,92 +0,0 @@
<template>
<view>
<uni-section class="mb-10" title="业绩查看范围" type="line">
<uni-datetime-picker v-model="range" type="daterange" @change="change" />
</uni-section>
<view class="">
<uni-card title="业绩排名">
<uni-list>
<uni-list-item direction="row" v-for="(item , index) in staffList" :key="index">
<template #header>
<view class="avatar-wrap">
<text class="staff-name">{{ item.createByName?item.createByName:'暂无' }}</text>
</view>
</template>
<template #footer>
<view style="font-size: 24rpx;display: flex;flex-direction: column;width: 250rpx;">
<text style="display: inline-block;width: auto;">单数:{{item.totalCount?item.totalCount:'暂无'}}单</text>
<text style="display: inline-block;width: auto;">总金额:{{item.totalPrice?item.totalPrice:'暂无'}}元</text>
</view>
</template>
</uni-list-item>
</uni-list>
</uni-card>
</view>
</view>
</template>
<script>
export default {
data() {
return {
range: [],
name: '',
staffList:[]
}
},
onLoad() {
this.getMonth();
this.getStaffList()
},
methods: {
//改变时间选择
change(e){
var start = e[0]
var end = e[1]
this.range = [start,end]
this.getStaffList();
},
//获取业绩列表
getStaffList() {
this.tui.request('/app/sale/getSalesRankingByShopId', 'post', {
startTime:this.range[0],
endTime:this.range[1],
}, false, false, true).then((res) => {
if (res.code !== 200) return
this.staffList = res.result
})
},
//获取当月1日到当前时间
getMonth() {
let date = new Date()
let year = date.getFullYear().toString()
let month = date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1).toString():(date.getMonth()+1).toString() //'月'
let da = date.getDate() < 10 ? '0'+date.getDate().toString():date.getDate().toString() //'日'
let end = year + '-' + month + '-' + da
let beg = year + '-' + month + '-01'
this.range = [beg,end]
}
}
}
</script>
<style lang="scss" scoped>
.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>

141
pages/staff/signRule/signRule.vue

@ -1,141 +0,0 @@
<template>
<view>
<view class="popup-height">
<uni-forms :modelValue="addForm" ref="addForm" validateTrigger="bind" :rules="rules" label-width="160rpx"
label-align="right">
<uni-forms-item label="上班时间" required>
<picker mode="time" :value="addForm.startTime" start="00:00" end="23:59" @change="start">
<view class="uni-input">{{addForm.startTime}}</view>
</picker>
</uni-forms-item>
<uni-forms-item label="下班时间" required>
<picker mode="time" :value="addForm.endTime" start="00:00" end="23:59" @change="end">
<view class="uni-input">{{addForm.endTime}}</view>
</picker>
</uni-forms-item>
<uni-forms-item label="定位" name="latitude" required>
<input type="text" v-model="addForm.latitude + ','+addForm.longitude" style="text-align:center;width:70%;border: 1px solid #eee;height: 72rpx;line-height: 72rpx !important;" disabled placeholder="获取位置用于员工打卡">
<view class="dw-btn" @tap="clockPosi">一键定位</view>
</uni-forms-item>
<uni-forms-item label="打卡范围" name="categoryId" required>
<uni-data-select class="uni-data-select" :localdata="categoryList" v-model="formData.categoryId"
placeholder="请选择打卡范围"></uni-data-select>
</uni-forms-item>
</uni-forms>
<u-button type="primary" @click="onFormSubmit">保存</u-button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
addForm: {
startTime: '06:00',
endTime: '14:00',
latitude:'',
longitude:'',
categoryId: '',
},
categoryList: [{
value: 1,
text: '100米'
},{
value: 2,
text: '200米'
},{
value: 3,
text: '500米'
}],
rules: {
categoryId: {
rules: [{
required: true,
errorMessage: '请选择打卡范围',
}],
},
latitude: {
rules: [{
required: true,
errorMessage: '请定位店铺位置',
}],
}
}
}
},
onLoad() {
},
methods: {
bindTimeChange(e) {
this.time = e.detail.value;
},
clockPosi(){
let that = this;
uni.getLocation({
type: 'wgs84',
isHighAccuracy:true,
accuracy:'best',
success: function (res) {
that.addForm.latitude = res.latitude
that.addForm.longitude = res.longitude
}
});
},
onFormSubmit() {
this.$refs.addForm.validate().then(async () => {
let url;
if (this.type == 'edit') {
url = '/app/common/user/edit'
this.addForm.id = this.id
} else {
url = '/app/common/user/add'
}
const res = await this.tui.request(url, 'post', this.addForm, false,
true, false)
if (res.code == 200) {
uni.navigateBack()
} else {
this.tui.toast(res.message)
}
}, (reason) => {
})
},
start(e) {
this.addForm.startTime = e.detail.value
},
end(e) {
this.addForm.endTime = e.detail.value
}
}
}
</script>
<style lang="scss" scoped>
.popup-height {
padding: 0 25upx;
background-color: #fff;
}
.uni-date__input {
height: 40px;
width: 100%;
line-height: 40px;
font-size: 14px;
}
.text-center {
text-align: center;
}
.dw-btn{
width: 30%;
line-height: 72rpx;
text-align: center;
background: #088FEB;
color: #fff;
}
.uni-data-select {
width: 100%;
}
</style>

8
pages/staff/staff.vue

@ -71,7 +71,7 @@
onDotClick(type,item) {
if(this.type == 0){
uni.navigateTo({
url: `/pages/staff/addStaff/addStaff?type=${type}&item=`+ JSON.stringify(item)
url: `/package1/staff/addStaff?type=${type}&item=`+ JSON.stringify(item)
})
}else{
this.tui.toast("暂无添加权限")
@ -85,18 +85,18 @@
},
gotoPerformancePage() {
uni.navigateTo({
url: '/pages/staff/performance/performance'
url: '/package1/staff/performance'
})
},
gotoClockPage() {
uni.navigateTo({
url: '/pages/staff/clock/clock'
url: '/package1/staff/clock'
})
},
goGuide(){
if(this.type == 0){
uni.navigateTo({
url: '/pages/staff/signRule/signRule'
url: '/package1/staff/signRule'
})
}else{
this.tui.toast("暂无编辑权限")

Loading…
Cancel
Save