Browse Source

Merge branch 'devlop' of http://git.qniao.cn/dengxiongfei/paper-shopkeeper-app into devlop

# Conflicts:
#	pages/mall/index.vue
devlop
buffeyu 4 years ago
parent
commit
a4d0d12e86
9 changed files with 323 additions and 21 deletions
  1. 8
      apis/setting.js
  2. 22
      pages.json
  3. 70
      pages/about/index.vue
  4. 14
      pages/add-paper/index.vue
  5. 23
      pages/mall/index.vue
  6. 25
      pages/paper-detail/index.vue
  7. 75
      pages/setting/index.vue
  8. 3
      pages/trade/quotationList.vue
  9. 104
      pages/user-info/index.vue

8
apis/setting.js

@ -0,0 +1,8 @@
import http from '../utils/http/index.js'
// 修改员工姓名
export function employeeName(data) {
return http.post({
url: '/yyt-uec/update/my/employee-name?userId='+data.userId +'&enterpriseId=' +data.enterpriseId,
data
})
}

22
pages.json

@ -258,7 +258,27 @@
"enablePullDownRefresh": false
}
}
],
,{
"path" : "pages/user-info/index",
"style" :
{
"navigationBarTitleText": "用户名",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/about/index",
"style" :
{
"navigationBarTitleText": "关于",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",

70
pages/about/index.vue

@ -0,0 +1,70 @@
<template>
<view class="about">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="about-title">关于纸掌柜</view>
<view slot="left"></view>
<view slot="right"></view>
</uni-nav-bar>
</view>
<view class="about-main">
<view class=""><image class="about-image" src="../../static/logo.png" mode=""></image></view>
<view class="about-text"><text>纸掌柜</text></view>
<view class="about-subtext"><text>帮你卖好每一吨纸</text></view>
<view class="about-vs"><text>版本号 纸掌柜 V1.0.0</text></view>
</view>
</view>
</template>
<script>
import { back, go2, uploadFile } from '@/utils/hook.js'
export default {
data() {
return {}
},
methods: {
back
}
}
</script>
<style lang="scss">
.about {
.about-main {
text-align: center;
}
.about-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.about-image {
width: 160rpx;
height: 160rpx;
margin-top: 180rpx;
}
.about-text {
opacity: 0.8;
font-size: 64rpx;
color: #000000;
font-weight: 400;
}
.about-subtext {
font-size: 28rpx;
color: #555555;
letter-spacing: 0;
font-weight: 400;
margin-top: 18rpx;
}
.about-vs {
font-size: 28rpx;
color: #888888;
letter-spacing: 0;
font-weight: 400;
margin-top: 100rpx;
}
}
</style>

14
pages/add-paper/index.vue

@ -346,19 +346,19 @@ export default {
this.title = option.title
}
this.option = option
this.getCategoryListQuery()
this.eidtFor = 0
if (this.title === '编辑纸品') {
this.getDteailList()
setTimeout(()=>{
this.getDteailList()
},200)
this.eidtFor = 1
}
console.log('this.$store.state.supplierInfo.id', this.$store.state.supplierInfo.id)
this.getCategoryListQuery()
},
watch: {
['form.name'](val) {
this.form.id = ''
console.log(111)
}
},
methods: {
back,

23
pages/mall/index.vue

@ -1,6 +1,6 @@
<template>
<view class="warpper">
<uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true">
<uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true">
<view slot="left" class="left-title">纸商城</view>
<view slot="right" class="right-title" @tap="shareTap">分享</view>
</uni-nav-bar>
@ -24,15 +24,18 @@
<view v-for="(item, index) in listData" :key="index" >
<view class="content" @click="detailInfo(item)">
<image class="image" :src="item.litPicUrl" mode=""></image>
<view class="">
<view class="" style="width: 100%;">
<view class="title">
<view class="">{{ item.brandName }}</view>
<view class="">
<image class="icon" :src="item.status === 1 ? '/static/imgs/mall/grounding-icon.png' : '/static/imgs/mall/sold-out-icon.png'" mode=""></image>
<image class="icon" :src="item.status === 30111 ? '/static/imgs/mall/grounding-icon.png' : '/static/imgs/mall/sold-out-icon.png'" mode=""></image>
</view>
</view>
<view class="sub-title">{{ item.categoryName }}/{{ item.name }}/{{ item.manufacturerName }}</view>
<view class="desc">克重(价格)200(3900) 235(3900) 255(390 0)255(390</view>
<view class="desc">
克重(价格)
<text v-for="(sku,index) in item.skuList">{{sku.weight}}({{sku.listPrice}})</text>
</view>
</view>
</view>
<view class="other">
@ -40,7 +43,7 @@
<view class="btn">
<view class="" @click="editPaper(item)">编辑</view>
<view class="divide"></view>
<view class="" @click="productStatusChange(item)">{{ item.status === '30111' ? '下架' : '上架' }}</view>
<view class="" @click="productStatusChange(item)">{{ item.status === 30111 ? '下架' : '上架' }}</view>
</view>
</view>
<uGap></uGap>
@ -98,6 +101,7 @@ export default {
supplierId: this.$store.state.supplierInfo.supplierId,
name: this.$store.state.supplierInfo.name
}
this.quertData()
},
onLoad() {
this.quertData()
@ -179,7 +183,7 @@ export default {
productStatusChange(item) {
var params = {
id: item.id,
status: item.status === '30111' ? '30112' : '30111'
status: item.status === 30111 ? 30112 : 30111
}
productStatus(params).then(res => {
if (res) {
@ -187,8 +191,11 @@ export default {
title: '状态修改成功',
icon: 'success'
})
this.orderPagination.pageNum = 1
this.quertData()
setTimeout(()=>{
this.orderPagination.pageNum = 1
this.quertData()
},500)
}
})

25
pages/paper-detail/index.vue

@ -4,7 +4,7 @@
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="paper-detail-title">纸品详情</view>
<view slot="left"></view>
<view slot="right" class="paper-detail-right-title">分享</view>
<view slot="right" class="paper-detail-right-title" @tap="shareTap">分享</view>
</uni-nav-bar>
</view>
<view class="paper-detail-info">
@ -88,11 +88,13 @@ export default {
return {
form:{},
skuList:[],
imgList:[]
imgList:[],
option:''
}
},
onLoad(option) {
this.getDteailList(option)
this.option = option
},
methods: {
back,
@ -107,9 +109,28 @@ export default {
this.form = res
this.skuList = res.skuList
this.imgList = res.imgList
this.$set(this.form,'categoryName',this.option.categoryName)
}
})
},
//
shareTap() {
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 0,
href: "http://uniapp.dcloud.io/",
title: "uni-app分享",
summary: "我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!",
imageUrl: "https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/d8590190-4f28-11eb-b680-7980c8a877b8.png",
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
}
});
}
}
}
</script>

75
pages/setting/index.vue

@ -1,9 +1,78 @@
<template>
<view>设置</view>
<view class="system-settimg">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="system-settimg-title">系统设置</view>
<view slot="left"></view>
<view slot="right"></view>
</uni-nav-bar>
</view>
<view class="list-main" v-for="(item,index) in name" :key="index">
<view class="list-flex" :class="(index+1) === name.length ? '':'list-border'" @click="checkList(index)">
<view class="list-text"><text>{{item}}</text></view>
<view class="">
<text><uni-icons type="right" color="#000000" size="18"></uni-icons></text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {}
import { back, go2, uploadFile } from '@/utils/hook.js'
export default {
data() {
return {
name:['用户名','账号管理','用户协议','系统权限','关于纸掌柜']
}
},
methods: {
back,
checkList(item){
switch (item){
case 0:
go2('user-info')
break;
case 4:
go2('about')
break;
default:
break;
}
},
}
}
</script>
<style></style>
<style lang="scss">
.system-settimg {
.system-settimg-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.list-main{
background-color: #FFFFFF;
}
.list-border{
border-bottom: 2rpx solid #d8d8d8;
}
.list-flex {
display: flex;
justify-content: space-between;
margin: 0rpx 32rpx;
height: 100rpx;
align-items: center;
}
.list-text {
font-size: 28rpx;
color: #000000;
letter-spacing: 0;
font-weight: 400;
}
}
</style>

3
pages/trade/quotationList.vue

@ -98,6 +98,9 @@ export default {
list: []
}
},
onShow() {
this.getQuotationQurty()
},
onLoad(option) {},
filters: {
replyStatusName(status) {

104
pages/user-info/index.vue

@ -0,0 +1,104 @@
<template>
<view class="user-info">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="user-info-title">用户名</view>
<view slot="left"></view>
<view slot="right">
<button type="primary" class="user-btn" @click="save">保存</button>
</view>
</uni-nav-bar>
</view>
<view class="user-contant">
<text class=""><uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons></text>
<text class="user-text">请输入新的用户名</text>
</view>
<view class="">
<uni-easyinput maxlength="100" :inputBorder="false" type="textarea" class="user-info-input" v-model="name" placeholder="请输入内容"></uni-easyinput>
</view>
</view>
</template>
<script>
import { back, go2, uploadFile } from '@/utils/hook.js'
import { employeeName, } from '@/apis/setting.js'
export default {
data() {
return {
name:''
}
},
onLoad() {
this.name = this.$store.state.userInfo.name
},
methods: {
back,
save(){
if(this.name === '' || this.name === null){
uni.showToast({
title: '请完善信息',
icon: 'none'
})
return
}
var params = {
userId:this.$store.state.userInfo.userId,
name:this.name,
enterpriseId :this.$store.state.supplierInfo.id
}
employeeName(params).then(res => {
if (res) {
uni.showToast({
title: '修改成功',
icon: 'success'
})
setTimeout(() => {
back()
}, 1000)
}
})
}
}
}
</script>
<style lang="scss">
.user-info{
background-color: #FFFFFF;
height: 800rpx;
.user-info-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.user-btn{
width: 108rpx;
height: 54rpx;
background: #007AFF;
border-radius: 27rpx;
font-size: 28rpx;
color: #FFFFFF;
letter-spacing: 0;
font-weight: 500;
line-height: 60rpx;
}
.user-text{
font-size: 28rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
}
.user-contant{
margin: 20rpx 32rpx;
}
.user-info-input {
background: #f7f8fa;
border-radius: 20rpx;
margin: 10rpx 32rpx 32rpx 32rpx;
width: 686rpx;
}
}
</style>
Loading…
Cancel
Save