Browse Source

开单逻辑

master
tianyi@bogon 3 years ago
parent
commit
76b7a565a3
  1. 4
      pages/billing/changeGoods.vue
  2. 251
      pages/billing/changeGoods1.vue
  3. 116
      pages/index/peopleList.vue
  4. 5
      pages/inventory/addGoods.vue
  5. 225
      pages/inventory/goodsList1.vue
  6. 120
      pages/inventory/inventory.vue
  7. 51
      pages/staff/addStaff/addStaff.vue
  8. 24
      pages/staff/staff.vue

4
pages/billing/changeGoods.vue

@ -74,7 +74,9 @@
},
onLoad(options) {
this.goodsDetail = JSON.parse(decodeURIComponent(options.info))
let newObj = JSON.parse(this.goodsDetail.attributeList)
let newObj = JSON.parse(this.goodsDetail.attributeList)
console.log("1111")
console.log(newObj)
let newArr = []
for (let val in newObj) {
let valueObj = [];

251
pages/billing/changeGoods1.vue

@ -12,7 +12,7 @@
</view>
</view>
<view class="content-right">
<view class="right-box" v-for="item in shopList" :key="item">
<view class="right-box" v-for="item in shopList" :key="item" @tap="toggle('bottom',item)">
<view class="box-left">
<img :src="item.productPicture" alt="">
</view>
@ -38,11 +38,11 @@
</view>
</view>
</view>
<checkbox-group @change="checkboxChange">
<!-- <checkbox-group @change="checkboxChange">
<label>
<checkbox :value="item.id" class="checkbox" />
</label>
</checkbox-group>
</checkbox-group> -->
</view>
</view>
</view>
@ -53,7 +53,7 @@
<text class="uni-tab__text">已选择</text>
</view>
<text style="background-color:#ff0000;color:#fff;position: absolute;top: 0;right: 10rpx;"
class="uni-tab__dot">{{ info }}</text>
class="uni-tab__dot">{{carList.length}}</text>
</view>
<view class="bottom-right">
<view class="bottom-btn" open-type="share" @tap="toggle('bottom')">选好了</view>
@ -68,43 +68,44 @@
<img src="/static/images/logo.png" alt="">
</view>
<view class="popup-title-right">
<view class="popup-title-right-box" style="color: #088FEB;">创意小众单肩包</view>
<view class="popup-title-right-box">QS2023101001</view>
<view class="popup-title-right-box" style="color: #088FEB;">{{goodsDetail.productName}}
</view>
<view class="popup-title-right-box">{{goodsDetail.barcode}}</view>
<view class="popup-title-right-box" style="color: darkorange;" @tap="inputDialogToggle">
<text style="margin-right:20rpx;">¥0.00</text>
<uni-icons color="#088FEB" type="compose" size="16" style="color:#088FEB"></uni-icons>
<text style="margin-right:20rpx;">¥{{goodsDetail.price}}</text>
<text style="color:blue;">临时改价</text>
</view>
</view>
</view>
<view class="popup-container">
<ul>
<!-- <li v-for="items in attrList" :key="items.id"> -->
<li>
<li v-for="(items,index) in goodsDetail.attributeList" :key="index">
<view class="title-fur">
<view class="name">男装</view>
<view class="name">{{items.name}}</view>
</view>
<view class="content-fur">
<!-- <view class="content-low" v-for="item in items.attributeValue" :key="item.id" @tap="delItem(item, 'attrNameDel')">男装</view> -->
<view class="content-low">男装</view>
<view class="attrs">
<uni-data-checkbox v-model="value" :localdata="range"
@change="change"></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 class="checkList">
<view class="checkList" v-for="item in temporaryList">
<view class="checkList-box">
<text>女装</text>
<text>S码</text>
<text>黄色</text>
{{item.name}}
</view>
<uni-number-box :value="numberValue" @change="change" />
<uni-number-box :value="item.temporaryNum" @change="temporaryChange" />
</view>
</view>
<view class="popup-bottom">
<view class="popup-bottom" v-for="item in temporaryList">
<view class="popup-bottom-left">
<text>2 款 9 件</text>
<text>¥2952.00</text>
<text>{{item.num}} 件</text>
<text>¥{{item.num * item.price}}</text>
</view>
<view class="popup-bottom-right">
<view class="bottom-btn" @tap="">选好了</view>
<view class="bottom-btn" @tap="temporaryCheck">选好了</view>
</view>
</view>
</view>
@ -113,84 +114,46 @@
<!-- 弹出输入框 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" title="临时改价" placeholder="请输入临时售价"
@confirm="dialogInputConfirm"></uni-popup-dialog>
@confirm="changePrice"></uni-popup-dialog>
</uni-popup>
<!-- 购物车弹出层 -->
<uni-popup ref="carPopup" background-color="#fff" @change="change">
<view class="popup-content">
<view class="popup-title">
<view class="popup-title-left">
<img src="/static/images/logo.png" alt="">
</view>
<view class="popup-title-right">
<view class="popup-title-right-box" style="color: #088FEB;">创意小众单肩包</view>
<view class="popup-title-right-box">QS2023101001</view>
<view class="popup-title-right-box" style="color: darkorange;" @tap="inputDialogToggle">
<text style="margin-right:20rpx;">¥0.00</text>
<uni-icons color="#088FEB" type="compose" size="16"></uni-icons>
<view style="position: absolute;top: 30rpx;right: 30rpx;">
<uni-icons color="red" type="trash" size="26"></uni-icons>
</view>
</view>
<view v-for="item in carList">
</view>
</view>
<view class="popup-container">
<view class="checkList">
<view style="margin-right:5%;">
<uni-icons color="red" type="minus" size="26"></uni-icons>
</view>
<view class="checkList-box">
<text>女装</text>
<text>S码</text>
<text>黄色</text>
<view class="popup-title">
<view class="popup-title-left">
<img src="/static/images/logo.png" alt="">
</view>
<uni-number-box :value="numberValue" @change="change" />
</view>
</view>
<view class="popup-title">
<view class="popup-title-left">
<img src="/static/images/logo.png" alt="">
</view>
<view class="popup-title-right">
<view class="popup-title-right-box" style="color: #088FEB;">创意小众单肩包</view>
<view class="popup-title-right-box">QS2023101001</view>
<view class="popup-title-right-box" style="color: darkorange;" @tap="inputDialogToggle">
<text style="margin-right:20rpx;">¥0.00</text>
<uni-icons color="#088FEB" type="compose" size="16"></uni-icons>
<view style="position: absolute;top: 30rpx;right: 30rpx;">
<uni-icons color="red" type="trash" size="26"></uni-icons>
<view class="popup-title-right">
<view class="popup-title-right-box" style="color: #088FEB;">{{item.productName}}</view>
<view class="popup-title-right-box">{{item.productSn}}</view>
<view class="popup-title-right-box" style="color: darkorange;" @tap="inputDialogToggle">
<text style="margin-right:20rpx;">¥{{item.price}}</text>
<uni-icons color="#088FEB" type="compose" size="16"></uni-icons>
<view style="position: absolute;top: 30rpx;right: 30rpx;">
<uni-icons color="red" type="trash" size="26"></uni-icons>
</view>
</view>
</view>
</view>
</view>
<view class="popup-container">
<view class="checkList">
<view style="margin-right:5%;">
<uni-icons color="red" type="minus" size="26"></uni-icons>
</view>
<view class="checkList-box">
<text>女装</text>
<text>S码</text>
<text>黄色</text>
</view>
<uni-number-box :value="numberValue" @change="change" />
</view>
</view>
<view class="popup-container">
<view class="checkList">
<view style="margin-right:5%;">
<uni-icons color="red" type="minus" size="26"></uni-icons>
</view>
<view class="checkList-box">
<text>女装</text>
<text>S码</text>
<text>黄色</text>
<view class="popup-container">
<view class="checkList">
<view style="margin-right:5%;">
<uni-icons color="red" type="minus" size="26"></uni-icons>
</view>
<view class="checkList-box">
<text>女装</text>
<text>S码</text>
<text>黄色</text>
</view>
<uni-number-box :value="numberValue" @change="change" />
</view>
<uni-number-box :value="numberValue" @change="change" />
</view>
</view>
<view class="popup-bottom">
<view class="popup-bottom-left">
<text>2 款 9 件</text>
@ -218,7 +181,11 @@
searchName: '', //搜索框输入值
shopId: '', //店铺id,
checkbox: [], //需要分享的商品id
numberValue: 0,
temporaryNum: 0,
goodsDetail: [],
attrNameList: [],
temporaryList: [],
carList: []
}
},
onLoad() {
@ -243,14 +210,45 @@
} else {}
}).catch((res) => {})
},
attrNameChange(index, index1) {
this.goodsDetail.attributeList[index].value.forEach(item => {
item.isChecked = false;
})
this.goodsDetail.attributeList[index].isChecked = true;
this.goodsDetail.attributeList[index].value[index1].isChecked = true;
console.log(this.goodsDetail)
var name = '';
for (var i = 0; i < this.goodsDetail.attributeList.length; i++) {
for (var m = 0, Ien = this.goodsDetail.attributeList[i].value; m < Ien.length; m++) {
console.log(Ien[m])
if (Ien[m].isChecked == true) {
name += Ien[m].value
}
}
}
this.temporaryList = [{
id: this.goodsDetail.id,
barcode: this.goodsDetail.barcode,
price: this.goodsDetail.price,
name: name,
num: this.temporaryNum,
productName: this.goodsDetail.productName,
productSn: this.goodsDetail.productSn
}]
},
temporaryChange(val) {
console.log(val)
this.temporaryList[0].num = val
},
//点击分类获取商品列表
getShareList(id) {
this.tui.request("/app/product/getShareList", "POST", {
shopId: '002',
// categoryId:id || '1695090289036890112',
categoryId: '1695090289036890112',
// supplierName:this.searchName || '测试',
supplierName: '测试',
categoryId: id,
// categoryId: '1695090289036890112',
supplierName: this.searchName,
// supplierName: '测试',
pageNum: this.pageNum,
pageSize: '10'
}, false, true).then((res) => {
@ -264,13 +262,15 @@
change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show);
},
//弹出商品规格选择
toggle(type) {
//弹出购物车或者商品规格选择弹窗
toggle(type, item) {
this.type = type
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
if (type == 'carPopup') {
this.$refs.carPopup.open('bottom')
} else {
this.checkGoods(item);
this.$refs.popup.open('bottom')
}
@ -282,6 +282,34 @@
// icon: 'none'
// })
// },
//选择商品查询商品规格
checkGoods(item) {
this.goodsDetail = item
if (typeof(this.goodsDetail.attributeList) == 'string') {
let newObj = JSON.parse(this.goodsDetail.attributeList)
let newArr = []
for (let val in newObj) {
let valueObj = [];
for (var i = 0; i < newObj[val].length; i++) {
valueObj.push({
value: newObj[val][i],
isChecked: false
})
this.attrNameList.push({
value: newObj[val][i],
name: val,
isChecked: false
})
}
newArr.push({
name: val,
value: valueObj
})
}
this.goodsDetail.attributeList = newArr;
}
},
//底部右侧两个分享按钮
buttonClick(e) {
@ -343,6 +371,20 @@
inputDialogToggle() {
this.$refs.inputDialog.open()
},
//临时改价
changePrice(val) {
this.goodsDetail.price = this.temporaryList[0].price = val
},
//弹窗选择规格后,点击弹窗中选好了按钮
temporaryCheck() {
this.carList.push(this.temporaryList[0]);
this.$refs.popup.close()
// for (var i =0;i<this.shopList.length;i++) {
// if(this.shopList[i].id == this.temporaryList[0].id){
// this.shopList[i].temporaryList = this.temporaryList[0]
// }
// }
}
}
}
</script>
@ -636,4 +678,23 @@
border-radius: 70rpx;
}
}
.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;
}
}
</style>

116
pages/index/peopleList.vue

@ -1,30 +1,31 @@
<template>
<view class="">
<view class="">
<view class="" v-if="popleType1== 'khName'" @tap="">
<view class="" v-if="popleType== 'khName'" @tap="">
<!-- 供应商、客户走这一套 -->
<view>
<button size="default" type="default" @tap="" hover-class="is-hover">新增人员</button>
</view>
<view class="list-1" v-for="item in popleList" :key="item" @tap="clickList(item)"
style="display: flex;flex-direction: column;height: 150rpx;">
<view class="name-tel" style="">
<view class="name-tel" style="width: 100%;">
<text style="line-height: 75rpx;">{{item.name}}</text>
<text>{{item.phone}}</text>
</view>
<view class="name-tel">
<view class="name-tel" style="width: 100%;">
<text>{{item.province + item.city + item.area + item.address}}</text>
</view>
</view>
</view>
<!-- 物流公司、快递公司、啦包公走这一套 -->
<view class="" v-else>
<view class="list-1" style="display: flex;height:75rpx;" v-for="item in popleList" :key="item">
<view class="list-1" style="display: flex;height:75rpx;" @tap="clickList(item)" v-for="item in popleList" :key="item">
<view class="name-tel">
<text style="line-height: 75rpx;">{{item.companyName}}</text>
<text style="line-height: 75rpx;">{{item.companyName}}</text>
<text style="line-height: 75rpx;">{{item.workerName}}</text>
</view>
<view class="phone-btn" @tap="clickPhone(item.moblie)">拨打电话</view>
<view class="standard-box" @tap="toggle('center')">
<view class="phone-btn" @tap.stop="clickPhone(item.mobile)" v-if="popleType != 'kdName'">拨打电话</view>
<view class="standard-box" @tap.stop="toggle('center')">
收费标准<uni-icons type="info" color='#088FEB' size="16"
style="line-height: 75rpx;padding-right:40rpx;"></uni-icons>
</view>
@ -52,23 +53,27 @@
export default {
data() {
return {
popleType1: '',
popleType: '',
popleList: [],
signCompany: '', // 1物流 2快递
people:'', //快递、物流、发车的id
radioType:'' //选择的是快递还是物流
signCompany: '', // 1物流 2快递 3发车
people: '', //快递、物流、发车的id
radioType: '', //选择的是快递还是物流
companyType: '', //运输公司类型 快递公司有值 物流公司直接传空
}
},
onLoad(options) {
this.popleType1 = options.popleType
this.people = options.people
this.radioType = options.radioType
if (options.popleType == ('khName' || 'gys')) { //供应商或者客户
this.popleType = options.popleType
this.companyType = options.companyType || ''
console.log(options.companyType)
// this.radioType = options.radioType
if (options.popleType == ('khName' || 'gysName')) { //供应商或者客户
this.khOrGysList(options.popleType);
} else if(options.popleType == ('khName' || 'gys')){ //物流快递
} else if (options.popleType == 'wlName' || options.popleType == 'kdName') { //物流快递
this.wlOrKdList(options.popleType)
} else if (options.popleType == 'fcName') {
this.wlOrKdList(options.popleType)
} else{
this.kdyOrlbgList();
} else {
this.kdyOrlbgList();
}
},
methods: {
@ -84,7 +89,7 @@
},
//物流或者快递列表
wlOrKdList(e) {
//物流:1 快递:2
//物流:1 快递:2 发车3
if (e == 'wlName') {
this.signCompany = 1;
} else if (e == 'kdName') {
@ -104,40 +109,37 @@
clickList(item) {
let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
let prevPage = pages[pages.length - 2]; //上一页页面实例
if (this.popleType1 == 'khName') {
if (this.popleType == 'khName') {
prevPage.$vm.khName = item
uni.navigateBack({
delta: 1
})
} else if (this.popleType1 == 'khName') {
} else if (this.popleType == 'gysName') {
prevPage.$vm.gysName = item
} else if (this.popleType == 'kdName' || this.popleType == 'wlName' || this.popleType == 'fcName') {
prevPage.$vm.wlName = item
} else if (this.popleType == 'lbgName') {
prevPage.$vm.lbgName = item
} else if (this.popleType == 'kdyName') {
prevPage.$vm.kdyName = item
}
uni.navigateBack({
delta: 1
})
},
clickPhone(phone) {
clickPhone(phone) {
console.log(phone);
uni.makePhoneCall({
phoneNumber: phone
});
},
//查询拉包工和快递人员的列表
kdyOrlbgList(){
this.tui.request("/worker/getWXByCondition", "post", {
ownerCompany: options.people, //公司id,如果是快递公司,才需要传
//signPerson: this.radioType ==0 ? 2 : 1 //物流1 快递2 这个参数不传了,判断ownerCompany是空就查拉包工,不是空是就查快递员
}, false, false).then((res) => {
if (res.code == 200) {
let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
let prevPage = pages[pages.length - 2]; //上一页页面实例
if (this.popleType1 == 'khName') {
prevPage.$vm.khName = item
uni.navigateBack({
delta: 1
})
} else if (this.popleType1 == 'khName') {
}
}
})
},
//查询拉包工和快递人员的列表
kdyOrlbgList() {
this.tui.request("/worker/getWXByCondition", "post", {
ownerCompany: this.companyType, //公司id,如果是快递公司,才需要传
}, false, false).then((res) => {
if (res.code == 200) {
this.popleList = res.result;
}
})
},
//打开弹出层
toggle(type) {
@ -180,11 +182,11 @@
}
.standard-box {
color: #088FEB;
line-height: 75rpx;
width: 50%;
text-align: right;
font-size: 26rpx;
color: #088FEB;
line-height: 75rpx;
width: 50%;
text-align: right;
font-size: 26rpx;
}
@ -209,10 +211,10 @@
}
.phone-btn {
width: 150rpx;
height: 75rpx;
color: #088FEB;
line-height: 75rpx;
font-size: 26rpx;
width: 150rpx;
height: 75rpx;
color: #088FEB;
line-height: 75rpx;
font-size: 26rpx;
}
</style>

5
pages/inventory/addGoods.vue

@ -13,10 +13,9 @@
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
:maxCount="10"></u-upload>
</uni-forms-item>
<uni-forms-item label=" 供应商" required name="supplierId">
<!-- <uni-forms-item label=" 供应商" required name="supplierId">
<uni-easyinput type="text" v-model="formData.supplierId" placeholder="请输入供应商" trim="all" />
<!-- <uni-easyinput type="text" v-model="formData.name" /> -->
</uni-forms-item>
</uni-forms-item> -->
<uni-forms-item label="货号" name="productSn" required>
<uni-easyinput type="text" v-model="formData.productSn" placeholder="请输入货号" trim="all" />
</uni-forms-item>

225
pages/inventory/goodsList1.vue

@ -6,7 +6,8 @@
<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.name" @tap="goPopleList('khName')">
style="border-bottom: 1px solid #fff;text-align: center;" :value="khName.name"
@tap="goPopleList('khName')">
<uni-icons type="right" size="16" style="margin-left: 80rpx;line-height: 80rpx;"></uni-icons>
</view>
</view>
@ -124,7 +125,8 @@
<view class="list-name" style="width: 100%;">发货方式</view>
<view class="list-val" style="display: flex;width: 100%;">
<radio-group @change="radioChange" style="display: flex;">
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in logisticsType" :key="item.value">
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in logisticsType"
:key="item.value">
<view>
<radio :value="item.value" :checked="index === current" />
</view>
@ -132,38 +134,44 @@
</label>
</radio-group>
</view>
</view>
<view class="">
<view class="content-list" v-if="radioType == '0' || radioType == '1'">
<view class="list-name" style="width:150rpx;">{{radioType == '0'? '选择快递' :'选择物流'}}</view>
<view class="list-val">
<input type="text" placeholder="请选择" disabled
style="border-bottom: 1px solid #fff;text-align: center;" @tap="goPopleList(radioType == '0'? 'kdName' :'wlName')">
<uni-icons type="right" size="16" style="margin-left: 80rpx;line-height: 80rpx;"></uni-icons>
</view>
</view>
<view class="content-list" v-if="radioType == '2'">
<view class="list-name" style="width:150rpx;">选择车号</view>
<view class="list-val">
<input type="text" placeholder="请选择" disabled
style="border-bottom: 1px solid #fff;text-align: center;" @tap="goPopleList('fcName')">
<uni-icons type="right" size="16" style="margin-left: 80rpx;line-height: 80rpx;"></uni-icons>
</view>
</view>
<view class="content-list" v-if="radioType != '4' && radioType !=''">
<view class="list-name" style="width:150rpx;">{{radioType == '0'? '快递员' :'拉包工'}}</view>
<view class="list-val">
<input type="text" placeholder="请选择" disabled
style="border-bottom: 1px solid #fff;text-align: center;" @tap="goPopleList(radioType == '0'? 'kdyName' :'lbgName')">
<uni-icons type="right" size="16" style="margin-left: 80rpx;line-height: 80rpx;"></uni-icons>
</view>
</view>
<view class="content-list" v-if="radioType == '3'">
<view class="list-name">拼包地址</view>
<view class="">
<textarea />
</view>
</view>
</view>
<view class="">
<view class="content-list" v-if="radioType == '0' || radioType == '1'">
<view class="list-name" style="width:150rpx;">{{radioType == '0'? '选择快递' :'选择物流'}}</view>
<view class="list-val">
<input type="text" placeholder="请选择" disabled :value="wlName.companyName"
style="border-bottom: 1px solid #fff;text-align: center;"
@tap="goPopleList(radioType == '0'? 'kdName' :'wlName')">
<uni-icons type="right" size="16"
style="margin-left: 80rpx;line-height: 80rpx;"></uni-icons>
</view>
</view>
<view class="content-list" v-if="radioType == '2'">
<view class="list-name" style="width:150rpx;">选择车号</view>
<view class="list-val">
<input type="text" placeholder="请选择" disabled
style="border-bottom: 1px solid #fff;text-align: center;"
@tap="goPopleList('fcName')">
<uni-icons type="right" size="16"
style="margin-left: 80rpx;line-height: 80rpx;"></uni-icons>
</view>
</view>
<view class="content-list" v-if="radioType != '4' && radioType !=''">
<view class="list-name" style="width:150rpx;">{{radioType == '0'? '快递员' :'拉包工'}}</view>
<view class="list-val">
<input type="text" placeholder="请选择" disabled :value="radioType == '0'? kdyName.workerName : lbgName.workerName"
style="border-bottom: 1px solid #fff;text-align: center;"
@tap="goPopleList(radioType == '0'? 'kdyName' :'lbgName')">
<uni-icons type="right" size="16"
style="margin-left: 80rpx;line-height: 80rpx;"></uni-icons>
</view>
</view>
<view class="content-list" v-if="radioType == '3'">
<view class="list-name">拼包地址</view>
<view class="">
<textarea />
</view>
</view>
</view>
</view>
</view>
@ -218,92 +226,107 @@
},
],
discCurrent: '', //折扣
logisticsCurrent: '' ,//物流
categoryList:'' ,//销售员
radioType:'', //发货方式按钮选择
khName:[], //客户
gysName:[], //供应商
wlName:[], //物流公司
kdName:[], //快递公司
kdyName:[],//快递员
lbgName:[],//拉包工姓名
fcName:[],//发车车号
logisticsCurrent: '', //物流
categoryList: '', //销售员
radioType: '', //发货方式按钮选择
khName: [], //客户
gysName: [], //供应商
wlName: [], //物流公司/物流/发车
kdyName: [], //快递员
lbgName: [], //拉包工姓名
}
},
onShow(){
this.khName = JSON.parse(JSON.stringify(this.khName))
console.log(this.khName)
},
onLoad(){
this.xsyList();
},
methods: {
//销售员列表
xsyList() {
this.tui.request('/app/common/user/list', 'get', {
}, false, false, true).then((res) => {
if (res.code !== 200) return
this.categoryList = res.result.map(item => {
return {
value: item.id,
text: item.nickname
}
})
})
},
//切换销售员
categoryChange(e){
console.log(e)
onShow() {
this.khName = JSON.parse(JSON.stringify(this.khName)) || ''
this.gysName = JSON.parse(JSON.stringify(this.gysName)) || ''
this.wlName = JSON.parse(JSON.stringify(this.wlName)) || ''
this.kdyName = JSON.parse(JSON.stringify(this.kdyName)) || ''
this.lbgName = JSON.parse(JSON.stringify(this.lbgName)) || ''
},
onLoad() {
this.xsyList();
},
methods: {
//销售员列表
xsyList() {
this.tui.request('/app/common/user/list', 'get', {
}, false, false, true).then((res) => {
if (res.code !== 200) return
this.categoryList = res.result.map(item => {
return {
value: item.id,
text: item.nickname
}
})
})
},
//切换销售员
categoryChange(e) {
console.log(e)
},
//点击切换折叠状态
clickCollapse() {
this.isCollapse = !this.isCollapse
},
radioChange(e) {
//快递0 物流1 发车2 拼包3 自送4
this.radioType = e.detail.value;
console.log(this.radioType);
this.khName = ''
this.gysName = ''
this.wlName = ''
this.kdyName = ''
this.lbgName = ''
//快递0 物流1 发车2 拼包3 自送4
this.radioType = e.detail.value;
for (let i = 0; i < this.items.length; i++) {
if (this.items[i].value === e.detail.value) {
this.current = i;
break;
}
}
},
goPopleList(popleType){
uni.navigateTo({
url: '/pages/index/peopleList?popleType=' +popleType + '&people=' + people + '&radioType=' + radioType
})
},
goodsAdd(){
uni.navigateTo({
url: '/pages/billing/changeGoods1'
})
},
goSell(){
uni.showToast({
title: "开单成功",
icon: 'success'
})
setTimeout(res=> {
uni.navigateTo({
url:"/pages/index/order"
})
},2000)
},
goPopleList(popleType) {
if (popleType == 'kdyName' && this.wlName == '') {
uni.showToast({
title: "先选择快递公司",
icon: 'error'
})
return
}
let companyType = this.radioType == 0 ? this.wlName.id : ''
console.log(companyType)
uni.navigateTo({
url: '/pages/index/peopleList?popleType=' + popleType + '&companyType=' + companyType
})
},
goodsAdd() {
uni.navigateTo({
url: '/pages/billing/changeGoods1'
})
},
goSell() {
uni.showToast({
title: "开单成功",
icon: 'success'
})
setTimeout(res => {
uni.navigateTo({
url: "/pages/index/order"
})
}, 2000)
}
}
}
</script>
<style lang="scss">
page,.page1{
height: 100%;
<style lang="scss">
page,
.page1 {
height: 100%;
}
.content {
border-top: 1px solid #eee;
overflow-y: scroll;
border-top: 1px solid #eee;
overflow-y: scroll;
max-height: 100vh;
}
@ -311,8 +334,8 @@
width: 100%;
height: auto;
background: #fff;
margin-bottom: 20rpx;
margin-bottom: 20rpx;
}
.content-list {

120
pages/inventory/inventory.vue

@ -2,29 +2,29 @@
<view style="display: flex;flex-direction: column;height: 1280rpx;">
<view class="" style="display: flex;border-top: 1px solid #eee;border-bottom: 1px solid #eee;">
<view class="title-left">
<view class="title-left-box">
<text>100</text>
<text>库存预警</text>
<view class="title-left-box">
<text>100</text>
<text>库存预警</text>
</view>
<view class="title-left-box">
<text>100</text>
<text>尾货预警</text>
</view>
<view class="title-left-box" style="flex-direction: inherit;">
<view class="shop-box">
<view>2</view>
<view>商品数</view>
</view>
<view class="shop-box">
<view>2</view>
<view>库存数</view>
</view>
<view class="title-left-box">
<text>100</text>
<text>尾货预警</text>
</view>
<view class="title-left-box">
<text>¥1000000.00</text>
<text>库存成本</text>
<view class="title-left-box" style="flex-direction: inherit;">
<view class="shop-box">
<view>2</view>
<view>商品数</view>
</view>
<view class="shop-box">
<view>2</view>
<view>库存数</view>
</view>
</view>
<view class="title-left-box">
<text>¥1000000.00</text>
<text>库存成本</text>
</view>
</view>
<view class="title-right" @click="onGridClick('0')">
<view class="title-right-top title-btn">
@ -36,11 +36,12 @@
</view>
</view>
<view class="search">
<!-- <u-search placeholder="输入商品名称/编号查询" v-model="keyword"></u-search> -->
<uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/编号" cancelButton="none"
@confirm="search" />
<view class="title-right-bottom title-btn" style="width:22%;float: left;height:75rpx;line-height: 75rpx;margin-top:20rpx;" @click="onGridClick('2')">
新增商品
<!-- <u-search placeholder="输入商品名称/编号查询" v-model="keyword"></u-search> -->
<uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/编号" cancelButton="none" @confirm="search" />
<view class="title-right-bottom title-btn"
style="width:22%;float: left;height:75rpx;line-height: 75rpx;margin-top:20rpx;"
@click="onGridClick('2')">
新增商品
</view>
</view>
<view class="content-box">
@ -192,15 +193,19 @@
}).catch((res) => {})
},
//点击头部 分类管理 和 新增入库 按钮
onGridClick(target) {
if(target == '0'){
uni.navigateTo({
url: '/pages/inventory/gategory'
})
}else{
uni.navigateTo({
url: '/pages/inventory/addinventory'
})
onGridClick(target) {
if (target == '0') {
uni.navigateTo({
url: '/pages/inventory/gategory'
})
} else if (target == '1') {
uni.navigateTo({
url: '/pages/inventory/addinventory'
})
} else {
uni.navigateTo({
url: "/pages/inventory/addGoods"
})
}
}
},
@ -257,17 +262,18 @@
}
.title-btn {
width: 70%;
height: 80rpx;
color: #fff;
border-radius: 10px;
text-align: center;
line-height: 80rpx;
margin: 10rpx auto 10rpx;
}
.shop-box{
width: 50%;
width: 70%;
height: 80rpx;
color: #fff;
border-radius: 10px;
text-align: center;
line-height: 80rpx;
margin: 10rpx auto 10rpx;
}
.shop-box {
width: 50%;
}
.title-right-top {
@ -289,7 +295,7 @@
background: #eee;
height: 100%;
}
.left-box {
width: 100%;
height: 90rpx;
@ -367,14 +373,16 @@
.price-box text:first-child {
color: #ffa200
}
.uni-mt-10 {
position: relative;
width: 74% !important;
float: left !important;
}
.uni-searchbar,.uni-searchbar__box{
width: 100% !important;
}
}
.uni-mt-10 {
position: relative;
width: 74% !important;
float: left !important;
}
.uni-searchbar,
.uni-searchbar__box {
width: 100% !important;
}
</style>

51
pages/staff/addStaff/addStaff.vue

@ -17,13 +17,13 @@
<uni-forms-item label="邮箱" name="email">
<uni-easyinput type="text" v-model="addForm.email" placeholder="请输入员工邮箱" />
</uni-forms-item>
<uni-forms-item label="所属门店" required name="shopId">
<!-- <uni-forms-item label="所属门店" required name="shopId">
<uni-data-select
style="width: 100%"
v-model="addForm.shopId"
:localdata="shopList"
></uni-data-select>
</uni-forms-item>
</uni-forms-item> -->
<uni-forms-item label="权限" required name="type">
<uni-data-select
style="width: 100%"
@ -59,7 +59,7 @@ export default {
type:'',
sex:'',
avatar:[],
shopId:'',
// shopId:'',
email:''
},
typeList:[
@ -84,9 +84,9 @@ export default {
mobile:{
rules:[{required:true,errorMessage:'不能为空'}]
},
shopId:{
rules:[{required:true,errorMessage:'不能为空'}]
},
// shopId:{
// rules:[{required:true,errorMessage:'不能为空'}]
// },
type:{
rules:[{required:true,errorMessage:'不能为空'}]
},
@ -103,31 +103,32 @@ export default {
uni.setNavigationBarTitle({
title: type=== 'add'? '新增员工' : '编辑信息'
});
this.getShopList()
// this.getShopList()
},
methods:{
getShopList() {
this.tui.request('/app/common/shops','get',{}, false,true,false).then(res => {
if (res.code !== 200) {
return uni.showToast({
title:res.message,
icon:'none'
})}
this.shopList = res.result.map((v) => {
return {
text:v.shopName,
value:v.id
}
})
})
},
// getShopList() {
// this.tui.request('/app/common/shops','get',{}, false,true,false).then(res => {
// if (res.code !== 200) {
// return uni.showToast({
// title:res.message,
// icon:'none'
// })}
// this.shopList = res.result.map((v) => {
// return {
// text:v.shopName,
// value:v.id
// }
// })
// })
// },
onFormSubmit() {
console.log('submit')
this.$refs.addForm.validate().then(async () => {
const res = await this.tui.request('/app/common/user/add','post',this.addForm,false,true,false)
if (res.code !== 200) return
uni.navigateBack()
console.log(res)
if (res.code == 200){
uni.navigateBack()
console.log(res)
}
},(reason) => {
console.log(reason)
})

24
pages/staff/staff.vue

@ -23,6 +23,17 @@
<uni-card title="员工列表">
<uni-list>
<uni-list-item direction="row" clickable @tap="onDotClick(item)" 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>
<u-tag text="店长" v-if="item.type==1" size="12" />
<u-tag text="员工" v-if="item.type==0" size="12" />
</view>
</view>
</template>
<template #header>
<view class="avatar-wrap">
<u-avatar :src="item.avatar" size="24">
@ -30,16 +41,6 @@
<text class="staff-name">{{ item.nickname }}</text>
</view>
</template>
<template #body>
<view class="tag-wrap">
<view v-if="item.departmentTitle">
<u-tag :text="item.departmentTitle" size="12" />
</view>
<view>
<u-tag text="店长" size="12" />
</view>
</view>
</template>
<template #footer>
<view><u-icon name="edit-pen-fill" size="28"></u-icon></view>
</template>
@ -104,7 +105,8 @@
padding: 0 15upx;
}
.tag-wrap {
.tag-wrap {
width: 100rpx;
flex: 1;
display: flex;

Loading…
Cancel
Save