Browse Source
Merge branch 'devlop' of http://git.qniao.cn/dengxiongfei/paper-shopkeeper-app into devlop
devlop
Merge branch 'devlop' of http://git.qniao.cn/dengxiongfei/paper-shopkeeper-app into devlop
devlop
13 changed files with 1043 additions and 528 deletions
Split View
Diff Options
-
24apis/setting.js
-
1pages/about/index.vue
-
180pages/account-management/index.vue
-
262pages/add-account/index.vue
-
66pages/add-paper/index.vue
-
18pages/mall/index.vue
-
2pages/mine/index.vue
-
37pages/quotation-details/index.vue
-
173pages/setting/index.vue
-
11pages/submit-quotation/index.vue
-
572pages/trade/quotationList.vue
-
4pages/user-info/index.vue
-
221utils/index.js
@ -1,22 +1,262 @@ |
|||
<template> |
|||
<view> |
|||
|
|||
<view class="add-account"> |
|||
<view> |
|||
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title=""> |
|||
<view class="add-account-title">新增企业账号</view> |
|||
<view slot="left"></view> |
|||
<view slot="right"></view> |
|||
</uni-nav-bar> |
|||
</view> |
|||
<view class=""> |
|||
<view class="add-paper-list"> |
|||
<view> |
|||
<text class="add-paper-start"><uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons></text> |
|||
<text class="add-paper-text">手机号</text> |
|||
</view> |
|||
<view class="add-paper-input"> |
|||
<qn-easyinput |
|||
type="number" |
|||
:maxlength="11" |
|||
:styles="{ disableColor: '#fff' }" |
|||
v-model="form.mobile" |
|||
:inputBorder="false" |
|||
text="right" |
|||
placeholder="请输入手机号" |
|||
></qn-easyinput> |
|||
</view> |
|||
</view> |
|||
<view class="add-paper-border"></view> |
|||
<view class="add-paper-list"> |
|||
<view> |
|||
<text class="add-paper-start"><uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons></text> |
|||
<text class="add-paper-text">用户号</text> |
|||
</view> |
|||
<view class="add-paper-input"> |
|||
<qn-easyinput type="text" :styles="{ disableColor: '#fff' }" v-model="form.name" :inputBorder="false" text="right" placeholder="请输入用户号"></qn-easyinput> |
|||
</view> |
|||
</view> |
|||
<view class="add-paper-border"></view> |
|||
<view class="add-paper-list" @click="paperpopupShow()"> |
|||
<view> |
|||
<text class="add-paper-start"><uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons></text> |
|||
<text class="add-paper-text">职务</text> |
|||
</view> |
|||
<!-- categoryId --> |
|||
<view class=""> |
|||
<text v-if="form.title === ''" class="add-paph-text">点击选择职务</text> |
|||
<text v-else>{{ form.title }}</text> |
|||
<text><uni-icons type="right" color="#000000" size="18"></uni-icons></text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="uploud-btn"> |
|||
<view class=""><button type="primary" class="btn-class" plain="true" @click="cencelList()">取消</button></view> |
|||
<view class=""><button type="primary" class="btn-class-upload" @click="uploadData()">确认</button></view> |
|||
</view> |
|||
<uni-popup ref="paperpopup" type="bottom"> |
|||
<view class="popup_modal"> |
|||
<!-- <slot name="title"><view class="popup_modal-title">选择纸种</view></slot> --> |
|||
<scroll-view scroll-y="true" class="popup_modal-scroll"> |
|||
<view @click="paperSelectChange(item)" class="popup_modal-scroll-item" v-for="item in paperList" :key="item.id">{{ item.name }}</view> |
|||
<uGap></uGap> |
|||
<view class="cencel-btn" @click="cencelbtn">取消</view> |
|||
</scroll-view> |
|||
</view> |
|||
</uni-popup> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
import { back, go2, uploadFile } from '@/utils/hook.js' |
|||
import uGap from '@/components/u-gap/u-gap.vue' |
|||
import { addEmployee } from '@/apis/setting.js' |
|||
const validateFields = ['mobile', 'name', 'title'] |
|||
export default { |
|||
data() { |
|||
return { |
|||
form: { |
|||
title: '' |
|||
}, |
|||
paperList: [ |
|||
{ |
|||
name: '管理员', |
|||
id: '1' |
|||
}, |
|||
{ |
|||
name: '业务员', |
|||
id: '2' |
|||
}, |
|||
{ |
|||
name: '司机', |
|||
id: '3' |
|||
}, |
|||
{ |
|||
name: '分切', |
|||
id: '4' |
|||
}, |
|||
{ |
|||
name: '库管', |
|||
id: '5' |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
components: { uGap }, |
|||
methods: { |
|||
back, |
|||
paperpopupShow() { |
|||
this.$refs.paperpopup.open('bottom') |
|||
}, |
|||
paperSelectChange(item) { |
|||
this.$set(this.form, 'title', item.name) |
|||
this.$refs.paperpopup.close() |
|||
}, |
|||
methods: { |
|||
|
|||
cencelbtn() { |
|||
this.$refs.paperpopup.close() |
|||
}, |
|||
cencelList(){ |
|||
back() |
|||
}, |
|||
uploadData() { |
|||
for (let i = 0; i < validateFields.length; i++) { |
|||
if (this.form[validateFields[i]] === null || this.form[validateFields[i]] === '') { |
|||
uni.showToast({ |
|||
title: '请完善信息', |
|||
icon: 'none' |
|||
}) |
|||
return |
|||
} |
|||
} |
|||
var params = { |
|||
...this.form, |
|||
enterpriseId: this.$store.state.supplierInfo.id, |
|||
// userId:this.$store.state.userInfo.userId, |
|||
} |
|||
addEmployee(params).then(res => { |
|||
if (res) { |
|||
uni.showToast({ |
|||
title: '添加成功', |
|||
icon: 'success' |
|||
}) |
|||
setTimeout(() => { |
|||
back() |
|||
}, 1000) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
<style lang="scss"> |
|||
.add-account { |
|||
.add-account-title { |
|||
width: 100%; |
|||
font-size: 36rpx; |
|||
color: #000000; |
|||
letter-spacing: 0; |
|||
text-align: center; |
|||
font-weight: 500; |
|||
} |
|||
.add-account { |
|||
font-size: 28rpx; |
|||
color: #007aff; |
|||
text-align: right; |
|||
line-height: 40rpx; |
|||
font-weight: 500; |
|||
} |
|||
.add-paper-border { |
|||
border-bottom: 2rpx solid #d8d8d8; |
|||
margin-left: 32rpx; |
|||
} |
|||
.add-paper-list { |
|||
height: 88rpx; |
|||
background: #ffffff; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
padding-left: 32rpx; |
|||
padding-right: 32rpx; |
|||
} |
|||
.add-paper-text { |
|||
font-size: 28rpx; |
|||
color: #000000; |
|||
letter-spacing: 0; |
|||
font-weight: 400; |
|||
} |
|||
.add-paper-start { |
|||
font-size: 28rpx; |
|||
color: #f5222d; |
|||
letter-spacing: 0; |
|||
font-weight: 400; |
|||
} |
|||
.add-paper-input { |
|||
width: 40%; |
|||
} |
|||
.popup_modal { |
|||
width: 750rpx; |
|||
height: 600rpx; |
|||
background-color: #fff; |
|||
border-radius: 10rpx 10rpx 0 0; |
|||
.popup_modal-title { |
|||
display: flex; |
|||
flex-direction: row; |
|||
align-items: center; |
|||
justify-content: center; |
|||
width: 750rpx; |
|||
height: 88rpx; |
|||
font-weight: 600; |
|||
border-bottom: 2rpx solid #d8d8d8; |
|||
} |
|||
.popup_modal-scroll { |
|||
width: 750rpx; |
|||
height: 600rpx; |
|||
.popup_modal-scroll-item { |
|||
display: flex; |
|||
flex-direction: row; |
|||
align-items: center; |
|||
justify-content: center; |
|||
width: 750rpx; |
|||
height: 88rpx; |
|||
padding: 0rpx 32rpx; |
|||
border-bottom: 2rpx solid #d8d8d8; |
|||
} |
|||
} |
|||
} |
|||
.cencel-btn { |
|||
font-size: 32rpx; |
|||
color: #646566; |
|||
text-align: center; |
|||
line-height: 44rpx; |
|||
font-weight: 400; |
|||
margin-top: 40rpx; |
|||
} |
|||
.add-paph-text { |
|||
font-size: 28rpx; |
|||
color: #888888; |
|||
letter-spacing: 0; |
|||
font-weight: 400; |
|||
} |
|||
.btn-class { |
|||
height: 88rpx; |
|||
border-radius: 10rpx; |
|||
line-height: 80rpx; |
|||
width: 150px; |
|||
} |
|||
.btn-class-upload { |
|||
height: 88rpx; |
|||
border-radius: 10rpx; |
|||
line-height: 80rpx; |
|||
width: 200px; |
|||
} |
|||
.uploud-btn { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
padding: 20rpx 32rpx; |
|||
background-color: #ffffff; |
|||
position: absolute; |
|||
bottom: 0rpx; |
|||
width: 100%; |
|||
} |
|||
} |
|||
</style> |
|||
@ -1,83 +1,92 @@ |
|||
<template> |
|||
<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> |
|||
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 1: |
|||
go2('account-management') |
|||
break |
|||
case 4: |
|||
go2('about') |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<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; |
|||
} |
|||
} |
|||
<template> |
|||
<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> |
|||
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 1: |
|||
go2('account-management') |
|||
break |
|||
case 2: |
|||
go2('agreement') |
|||
break |
|||
case 3: |
|||
let main = plus.android.runtimeMainActivity() |
|||
let Intent = plus.android.importClass('android.content.Intent') |
|||
let mIntent = new Intent('android.settings.WIRELESS_SETTINGS') |
|||
main.startActivity(mIntent) |
|||
break |
|||
case 4: |
|||
go2('about') |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<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> |
|||
Write
Preview
Loading…
Cancel
Save