Browse Source

修改销售员、挂单页优化

master
tianyi@bogon 3 years ago
parent
commit
a8f6a9cc80
  1. 514
      pages/index/addHangOrder.vue
  2. 2
      pages/index/index.vue
  3. 2
      pages/index/order.vue
  4. 34
      pages/inventory/addinventory.vue
  5. 14
      pages/inventory/goodsList1.vue
  6. 2
      pages/inventory/inventory.vue
  7. 2
      pages/login/login.vue

514
pages/index/addHangOrder.vue

@ -1,3 +1,4 @@
<!-- 新增挂单 -->
<template> <template>
<view class=""> <view class="">
<view> <view>
@ -8,21 +9,41 @@
<ul> <ul>
<!-- <li v-for="(item, index) in indexList" :key="index" @tap="clickCollapse"> --> <!-- <li v-for="(item, index) in indexList" :key="index" @tap="clickCollapse"> -->
<li @tap="clickCollapse"> <li @tap="clickCollapse">
<view class="name">{{item.categoryName}}</view> <!-- <view class="name">{{item.categoryName}}</view> -->
<view class="name">张三的订单</view> <view class="name">
<view class="bj-btn" @tap.stop="inputDialogToggle('edit', item)">编辑</view> <view>张三的订单</view>
<view class="bj-btn" @tap.stop="scanCodeAdd">新增</view> <view class="name-date">
<view class="bj-btn" @tap="toggle('center')">语音备注</view> <text>销售员</text>
<uni-icons type="bottom" size="25"></uni-icons> <text>2023-10-10 12:01:23</text>
</view>
</view>
<view class="btn-list">
<view class="bj-btn" @tap.stop="inputDialogToggle('edit', item)">编辑</view>
<view class="bj-btn" @tap.stop="scanCodeAdd">扫码开单</view>
<view class="bj-btn" @tap="toggle('center')">语音备注</view>
</view>
<uni-icons type="bottom" size="25" style="position: absolute;bottom:0;right:0;"></uni-icons>
</li> </li>
</ul> </ul>
</view> </view>
<view class="order-collapse-item" v-if="isCollapse"> <view class="order-collapse-item" v-if="isCollapse">
<view class="collapse-1"> <view class="collapse-1">
<view class="order-notes"> <view class="order-notes">
备注: 备注:张三13895968700北京丰台总部基地给张三9折折扣张三13895968700北京丰台总部基地给张三9折折扣张三13895968700北京丰台总部基地给张三9折折扣
</view> </view>
</view> <view class="shop-list">
<view>
女士连衣裙(HD738206579)
<img src="/static/images/datu.png" @tap="" alt="">
</view>
<view>颜色:黑色,尺码:s码 * 2</view>
<view>颜色:黑色,尺码:s码 * 2</view>
<view><uni-icons color="red" type="minus" size="26"></uni-icons></view>
</view>
<view class="save-btn">保存</view>
</view>
</view> </view>
<!-- 语音识别弹出层 --> <!-- 语音识别弹出层 -->
<view> <view>
@ -31,7 +52,7 @@
<view class="popup-title"> <view class="popup-title">
<text>语音录入</text> <text>语音录入</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16" <uni-icons @tap='close' type="closeempty" color='red' size="16"
style="height:40rpx;line-height: 40rpx;position: absolute;right: 0;"></uni-icons> style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
</view> </view>
<view class="popup-container"> <view class="popup-container">
<textarea name="" id="" style="width:100%;border:1px solid #eee;" v-model="voiceText" <textarea name="" id="" style="width:100%;border:1px solid #eee;" v-model="voiceText"
@ -50,62 +71,69 @@
<view class="voice-model" v-if="recordState == true"> <view class="voice-model" v-if="recordState == true">
<img src="/static/images/maikefeng.png" alt=""> <img src="/static/images/maikefeng.png" alt="">
<view class="voice-text">语音识别中...</view> <view class="voice-text">语音识别中...</view>
</view> </view>
<!-- 商品弹出层 --> <!-- 商品弹出层 -->
<view> <view>
<uni-popup ref="shopPopup" background-color="#fff" @change="change"> <uni-popup ref="shopPopup" background-color="#fff" @change="change">
<view class="shop-popup-content"> <view class="shop-popup-content">
<view class="shop-popup-title"> <view class="shop-popup-title">
<view class="shop-popup-title-left"> <view class="shop-popup-title-left">
<img src="/static/images/logo.png" alt=""> <img src="/static/images/logo.png" alt="">
</view> </view>
<view class="shop-popup-title-right"> <view class="shop-popup-title-right">
<view class="shop-popup-title-right-box" style="color: #088FEB;">创意小众单肩包</view> <view class="shop-popup-title-right-box" style="color: #088FEB;">创意小众单肩包</view>
<view class="shop-popup-title-right-box">QS2023101001</view> <view class="shop-popup-title-right-box">QS2023101001</view>
<view class="shop-popup-title-right-box" style="color: darkorange;" @tap="inputDialogToggle"> <view class="shop-popup-title-right-box" style="color: darkorange;"
<text style="margin-right:20rpx;">¥0.00</text> @tap="inputDialogToggle">
<text style="color: 088FEB;">临时改价</text> <text style="margin-right:20rpx;">¥0.00</text>
</view> <text style="color: 088FEB;">临时改价</text>
</view> </view>
</view> </view>
<view class="shop-popup-container"> </view>
<ul> <view class="shop-popup-container">
<!-- <li v-for="items in attrList" :key="items.id"> --> <ul>
<li> <!-- <li v-for="items in attrList" :key="items.id"> -->
<view class="shop-title-fur"> <li>
<view class="shop-name">男装</view> <view class="shop-title-fur">
</view> <view class="shop-name">男装</view>
<view class="shop-content-fur"> </view>
<!-- <view class="content-low" v-for="item in items.attributeValue" :key="item.id" @tap="delItem(item, 'attrNameDel')">男装</view> --> <view class="shop-content-fur">
<view class="shop-content-low">男装</view> <!-- <view class="content-low" v-for="item in items.attributeValue" :key="item.id" @tap="delItem(item, 'attrNameDel')">男装</view> -->
</view> <view class="shop-content-low">男装</view>
</li> </view>
</ul> </li>
<view class="shop-checkList"> </ul>
<view class="shop-checkList-box"> <view class="shop-checkList">
<text>女装</text> <view class="shop-checkList-box">
<text>S码</text> <text>女装</text>
<text>黄色</text> <text>S码</text>
</view> <text>黄色</text>
<uni-number-box :value="numberValue" @change="change" /> </view>
</view> <uni-number-box :value="numberValue" @change="change" />
</view> </view>
<view class="shop-popup-bottom"> </view>
<view class="shop-popup-bottom-left"> <view class="shop-popup-bottom">
<text>2 款 9 件</text> <view class="shop-popup-bottom-left">
<text>¥2952.00</text> <text>2 款 9 件</text>
</view> <text>¥2952.00</text>
<view class="shop-popup-bottom-right"> </view>
<view class="bottom-btn" @tap="">选好了</view> <view class="shop-popup-bottom-right">
</view> <view class="bottom-btn" @tap="">选好了</view>
</view> </view>
</view> </view>
</uni-popup> </view>
</view> </uni-popup>
<!-- 弹出输入框 --> </view>
<uni-popup ref="inputDialog" type="dialog"> <!-- 弹出输入框 -->
<uni-popup-dialog ref="inputClose" mode="input" title="临时改价" placeholder="请输入临时售价" <uni-popup ref="inputDialog" type="dialog">
@confirm="dialogInputConfirm"></uni-popup-dialog> <uni-popup-dialog ref="inputClose" mode="input" title="临时改价" placeholder="请输入临时售价"
@confirm="dialogInputConfirm"></uni-popup-dialog>
</uni-popup>
<!-- 查看大图弹出层 -->
<uni-popup ref="imgPopup" background-color="#fff" @change="change">
<view class="img-popup-content">
<img src="/static/images/logo.png" alt="">
</view>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
@ -187,10 +215,10 @@
//扫一扫功能 //扫一扫功能
scanCodeAdd() { scanCodeAdd() {
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
console.log(typeof(res.result)) console.log(typeof(res.result))
this.toggle('bottom',res.result); this.toggle('bottom', res.result);
}, },
fail: (res) => { fail: (res) => {
uni.showToast({ uni.showToast({
@ -199,32 +227,32 @@
}) })
} }
}) })
}, },
//弹出商品规格选择 //弹出商品规格选择
toggle(type,id) { toggle(type, id) {
this.type = type this.type = type
if(type == 'bottom'){ if (type == 'bottom') {
this.$refs.shopPopup.open(type) this.$refs.shopPopup.open(type)
this.getById(id); this.getById(id);
}else{ } else {
this.$refs.popup.open(type) this.$refs.popup.open(type)
} }
}, },
//临时改价弹窗 //临时改价弹窗
inputDialogToggle() { inputDialogToggle() {
this.$refs.inputDialog.open() this.$refs.inputDialog.open()
}, },
//通过商品id查询商品详细信息 //通过商品id查询商品详细信息
getById(id){ getById(id) {
this.tui.request("/app/product/getById", "POST", { this.tui.request("/app/product/getById", "POST", {
id:id id: id
}, false, false).then((res) => { }, false, false).then((res) => {
if (res.code == 200) { if (res.code == 200) {
} else { } else {
this.tui.toast(res.message) this.tui.toast(res.message)
} }
}).catch((res) => {}) }).catch((res) => {})
} }
} }
} }
@ -251,11 +279,12 @@
.order-list li { .order-list li {
width: 95%; width: 95%;
height: 100rpx; height: 160rpx;
line-height: 100rpx; line-height: 80rpx;
font-size: 37rpx; font-size: 37rpx;
border-bottom: 0.5px solid #eee; border-bottom: 0.5px solid #eee;
margin: 0 auto; margin: 0 auto;
position: relative;
} }
.name { .name {
@ -263,25 +292,50 @@
float: left; float: left;
} }
.name-date {
font-size: 28rpx;
}
.bj-btn { .bj-btn {
width: auto; width: auto;
/* height: 60rpx; */ /* height: 60rpx; */
font-size: 26rpx; font-size: 26rpx;
background: #fff; background: #fff;
margin: 0; margin: 0;
margin-top: 20rpx;
float: left; float: left;
padding-right: 20rpx; padding-right: 36rpx;
line-height: 60rpx;
color: blue; color: blue;
text-decoration: underline; text-decoration: underline;
} }
.save-btn{
width: 95%;
height: 80rpx;
text-align: center;
line-height: 80rpx;
margin: 0 auto;
background: #088FEB;
color: #fff;
}
.order-collapse-item { .order-collapse-item {
display: flex;
text-align: center;
background: #eee; background: #eee;
height: 110rpx; height: auto;
width: 95%;
border-radius: 20rpx;
margin: 0 auto;
padding: 20rpx;
}
.order-notes {
height: 100rpx;
line-height: 50rpx;
text-overflow: ellipsis;
overflow: hidden;
white-space: pre-wrap;
text-overflow: -o-ellipsis-lastline;
display: -webkit-box; //特别显示模式
-webkit-line-clamp: 2; //行数
line-clamp: 2;
-webkit-box-orient: vertical; //盒子中内容竖直排列
} }
.popup-content { .popup-content {
@ -342,127 +396,133 @@
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
margin: 0 auto; margin: 0 auto;
} }
.btn-list {
.shop-popup-content { width: 47%;
align-items: center; float: left;
justify-content: center; }
padding: 15px;
height: 1200rpx;
background-color: #fff; .shop-popup-content {
} align-items: center;
justify-content: center;
.shop-popup-title-right-box { padding: 15px;
height: 50rpx; height: 1200rpx;
line-height: 50rpx; background-color: #fff;
} }
.shop-popup-title-right { .shop-popup-title-right-box {
width: 400rpx; height: 50rpx;
margin-left: 30rpx; line-height: 50rpx;
} }
.shop-popup-title-left { .shop-popup-title-right {
width: 150rpx; width: 400rpx;
height: 150rpx; margin-left: 30rpx;
} }
.shop-popup-title-left image { .shop-popup-title-left {
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
}
}
.shop-popup-title-left image {
.shop-popup-title { width: 150rpx;
display: flex; height: 150rpx;
height: 180rpx;
border-bottom: 1px solid #eee; }
}
.shop-popup-title {
.shop-popup-container { display: flex;
width: 95%; height: 180rpx;
border-radius: 10upx; border-bottom: 1px solid #eee;
background: #fff; }
height: auto;
margin: 20upx auto; .shop-popup-container {
} width: 95%;
.shop-title-fur { border-radius: 10upx;
width: 95%; background: #fff;
height: 70rpx; height: auto;
margin: 0 auto; margin: 20upx auto;
} }
.shop-name { .shop-title-fur {
font-size: 30rpx; width: 95%;
width: 50%; height: 70rpx;
float: left; margin: 0 auto;
height: 70rpx; }
line-height: 70rpx;
} .shop-name {
font-size: 30rpx;
.shop-content-fur { width: 50%;
padding-bottom: 25rpx; float: left;
} height: 70rpx;
line-height: 70rpx;
.shop-content-low { }
width: auto;
border: 1px solid #eee; .shop-content-fur {
display: inline-block; padding-bottom: 25rpx;
min-width: 90rpx; }
padding: 5rpx;
font-size: 35rpx; .shop-content-low {
text-align: center; width: auto;
color: #777; border: 1px solid #eee;
margin: 20rpx 0 0 20rpx; display: inline-block;
} min-width: 90rpx;
padding: 5rpx;
.shop-content-low:hover { font-size: 35rpx;
background: #eee; text-align: center;
} color: #777;
margin: 20rpx 0 0 20rpx;
.shop-checkList { }
display: flex;
height: 50rpx; .shop-content-low:hover {
font-size: 28rpx; background: #eee;
line-height: 50rpx; }
padding: 20rpx 10rpx;
border-top: 1px solid #eee; .shop-checkList {
} display: flex;
height: 50rpx;
.shop-checkList-box { font-size: 28rpx;
height: 50rpx; line-height: 50rpx;
width: 60%; padding: 20rpx 10rpx;
} border-top: 1px solid #eee;
}
.shop-popup-bottom {
width: 100%; .shop-checkList-box {
height: 100rpx; height: 50rpx;
position: fixed; width: 60%;
bottom: 0; }
display: flex;
} .shop-popup-bottom {
width: 100%;
.shop-popup-bottom-left { height: 100rpx;
width: 50%; position: fixed;
line-height: 80rpx; bottom: 0;
} display: flex;
}
.shop-popup-bottom-right {
width: 50%; .shop-popup-bottom-left {
line-height: 100rpx; width: 50%;
line-height: 80rpx;
.bottom-btn { }
width: 70%;
line-height: 35px; .shop-popup-bottom-right {
height: 70rpx; width: 50%;
text-align: center; line-height: 100rpx;
/* margin-top: 10rpx; */
color: #fff; .bottom-btn {
font-size: 28rpx; width: 70%;
margin: 0 auto; line-height: 35px;
background: linear-gradient(90deg, #60F3FF, #088FEB); height: 70rpx;
border-radius: 70rpx; text-align: center;
} /* margin-top: 10rpx; */
color: #fff;
font-size: 28rpx;
margin: 0 auto;
background: linear-gradient(90deg, #60F3FF, #088FEB);
border-radius: 70rpx;
}
} }
</style> </style>

2
pages/index/index.vue

@ -86,7 +86,7 @@
<li v-for="item in inventoryList" :key="item.id"> <li v-for="item in inventoryList" :key="item.id">
<uni-card :title="item.id" :sub-title="'¥'+item.totalAmount" :thumbnail="item.img" <uni-card :title="item.id" :sub-title="'¥'+item.totalAmount" :thumbnail="item.img"
@tap="gotoDetail(item.id)"> @tap="gotoDetail(item.id)">
<view class="uni-body">{{ item.createBy }} - {{ item.createTime }}</view> <view class="uni-body">{{ item.createByName }} - {{ item.createTime }}</view>
</uni-card> </uni-card>
</li> </li>
</ul> </ul>

2
pages/index/order.vue

@ -9,7 +9,7 @@
<li v-for="item in inventoryList" @tap="gotoDetail(item.id)"> <li v-for="item in inventoryList" @tap="gotoDetail(item.id)">
<uni-card :title="item.id" :sub-title="item.createTime" :extra="'¥'+item.totalAmount" <uni-card :title="item.id" :sub-title="item.createTime" :extra="'¥'+item.totalAmount"
thumbnail="/static/images/logo.png"> thumbnail="/static/images/logo.png">
<view class="uni-body"><text class="cardText">销售员:</text> {{item.createBy}}</view> <view class="uni-body"><text class="cardText">销售员:</text> {{item.createByName}}</view>
<view class="uni-body"> <text class="cardText"> 营业额:</text> <text class="priceText"> <view class="uni-body"> <text class="cardText"> 营业额:</text> <text class="priceText">
{{item.realAmount}} </text> <text decode class="cardText"> {{item.realAmount}} </text> <text decode class="cardText">
{{'&nbsp;&nbsp;&nbsp;&nbsp; 欠款: '}} </text> <text class="priceText">{{item.noEarn}} {{'&nbsp;&nbsp;&nbsp;&nbsp; 欠款: '}} </text> <text class="priceText">{{item.noEarn}}

34
pages/inventory/addinventory.vue

@ -1,26 +1,5 @@
<template> <!-- 新增库存页 -->
<!-- <view> <template>
<view class="formBox">
<uni-forms ref="form" :modelValue="formData" labelWidth="85px">
<uni-forms-item label="店铺名称" name="name">
<uni-easyinput type="text" v-model="shopName" disabled />
</uni-forms-item>
</uni-forms>
<uni-card title="选择商品">
<u-grid :col="2" border>
<u-grid-item index="add" @tap.stop="scanCodeAdd">
<u-icon name="scan" size="36"></u-icon>
</u-grid-item>
<u-grid-item @tap.stop="goodsAdd">
<u-icon name="plus" size="28"></u-icon>
</u-grid-item>
</u-grid>
</uni-card>
</view>
<view class="tui-tabbar">
<u-button type="primary" :plain="true" shape="circle" @tap.stop="submit(ret)">保存</u-button>
</view>
</view> -->
<view class="page1"> <view class="page1">
<view class="content"> <view class="content">
<view class="content-box"> <view class="content-box">
@ -32,11 +11,6 @@
<uni-icons type="right" size="16" style="margin-left: 80rpx;line-height: 80rpx;"></uni-icons> <uni-icons type="right" size="16" style="margin-left: 80rpx;line-height: 80rpx;"></uni-icons>
</view> </view>
</view> </view>
<!-- <view class="content-list">
<view class="list-name">销售员</view>
<uni-data-select class="uni-data-select" :localdata="categoryList" v-model="value"
placeholder="请选择销售员" @change="categoryChange"></uni-data-select>
</view> -->
</view> </view>
<view class="content-box"> <view class="content-box">
<view class="shop-box" style="border-bottom: 1px solid #eee;margin-bottom: 20rpx;"> <view class="shop-box" style="border-bottom: 1px solid #eee;margin-bottom: 20rpx;">
@ -71,10 +45,6 @@
</view> </view>
</view> </view>
<view class="content-box"> <view class="content-box">
<!-- <view class="price-box-title">
<text>商品数量:5 </text>
<text style="text-align: left;padding-left: 40rpx;color: red;">金额:500.00</text>
</view> -->
<!-- 账号权限是否可以维护成本价格(主账号和被授权的账号可以维护),参数名:shop_admin_cost,维护在用户表中,存在前后端缓存里,把备注栏挪出来,谁都可以备注 --> <!-- 账号权限是否可以维护成本价格(主账号和被授权的账号可以维护),参数名:shop_admin_cost,维护在用户表中,存在前后端缓存里,把备注栏挪出来,谁都可以备注 -->
<view class="price-box-list"> <view class="price-box-list">
<view class="content-list"> <view class="content-list">

14
pages/inventory/goodsList1.vue

@ -1,3 +1,4 @@
<!-- 销售商品 -->
<template> <template>
<view class="page1"> <view class="page1">
<view class="content"> <view class="content">
@ -285,9 +286,13 @@
}) })
}, },
//切换销售员 //切换销售员
categoryChange(e) { categoryChange(e) {
this.xsyId = e for (i=0;i<this.categoryList.length;i++) {
console.log(e) if(this.categoryList[i].value== e){
this.xsyId = e;
this.createByName = this.categoryList[i].text
}
}
}, },
//点击切换折叠状态 //点击切换折叠状态
clickCollapse() { clickCollapse() {
@ -346,7 +351,8 @@
totalAmount: 100, //应付金额 totalAmount: 100, //应付金额
transportType: 0, //this.radioType transportType: 0, //this.radioType
discount: 10, discount: 10,
createBy: this.xsyId, createBy: this.xsyId,
createByName:this.createByName,
userId: "1704126992443641856", userId: "1704126992443641856",
remark: '123' remark: '123'
}, },

2
pages/inventory/inventory.vue

@ -1,3 +1,4 @@
<!-- 库存列表页 -->
<template> <template>
<view style="display: flex;flex-direction: column;height: 1280rpx;"> <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="" style="display: flex;border-top: 1px solid #eee;border-bottom: 1px solid #eee;">
@ -36,7 +37,6 @@
</view> </view>
</view> </view>
<view class="search"> <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" /> <uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/编号" cancelButton="none" @confirm="search" />
<view class="title-right-bottom title-btn" <view class="title-right-bottom title-btn"
style="width:22%;float: left;height:75rpx;line-height: 75rpx;margin-top:20rpx;" style="width:22%;float: left;height:75rpx;line-height: 75rpx;margin-top:20rpx;"

2
pages/login/login.vue

@ -202,7 +202,7 @@
this.choose = true this.choose = true
this.setTime() this.setTime()
this.tui.request("/common/captcha/sendLoginSms/" + this.phone, "GET", { this.tui.request("/common/captcha/sendLoginSms/" + this.phone, "GET", {
type:this.wayValue
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({

Loading…
Cancel
Save