24 changed files with 819 additions and 46 deletions
Split View
Diff Options
-
BIN.DS_Store
-
41apis/clientListApi.js
-
50apis/commonApi.js
-
11apis/orderApi.js
-
20components/business-components/packingStationItem.vue
-
133components/qn-select/qn-select.vue
-
14enums/index.js
-
16pages.json
-
4pages/add-paper/index.vue
-
177pages/client-list/index.vue
-
22pages/mine/index.vue
-
175pages/my-client/index.vue
-
162pages/my-receipt-code/index.vue
-
37pages/order-detail/index.vue
-
2pages/paper-detail/index.vue
-
1pages/switching-mall/index.vue
-
BINstatic/.DS_Store
-
BINstatic/imgs/.DS_Store
-
BINstatic/imgs/general/camera-icon.png
-
BINstatic/imgs/general/close-icon.png
-
BINstatic/imgs/mine/credit-record.png
-
BINstatic/imgs/mine/my-client.png
-
BINstatic/imgs/mine/my-receipt-code.png
-
BINstatic/imgs/mine/设置税点.sketch
@ -0,0 +1,133 @@ |
|||
<template> |
|||
<view> |
|||
<view class="select-mask" v-show="visible" @click="hideOption"></view> |
|||
<view class="select-section" @click="showOption"> |
|||
<text :class="text ? '' : 'placeholder'">{{ text || placeholder }}</text> |
|||
<view class="icon"></view> |
|||
<view class="options-area" v-show="visible"> |
|||
<slot> |
|||
<view class="option" v-for="item in options" :key="item.value" @click.stop="handleSelect(item)"> |
|||
<text>{{ item.label }}</text> |
|||
<view v-if="value == item.value" class="icon"></view> |
|||
</view> |
|||
</slot> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
value: { |
|||
default: '' |
|||
}, |
|||
placeholder: { |
|||
type: String, |
|||
default: '请选择' |
|||
}, |
|||
options: { |
|||
type: Array, |
|||
default: () => [] |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
visible: false, |
|||
text: '' |
|||
} |
|||
}, |
|||
methods: { |
|||
handleSelect(item) { |
|||
this.text = item.label |
|||
this.$emit('input', item.value) |
|||
this.hideOption() |
|||
}, |
|||
showOption() { |
|||
this.visible = true |
|||
}, |
|||
hideOption() { |
|||
console.log('hideOption') |
|||
this.visible = false |
|||
} |
|||
}, |
|||
watch: { |
|||
value(val) { |
|||
let target = this.options.find((o) => o.value === val) |
|||
this.text = target?.label || '' |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.select-section { |
|||
width: 100%; |
|||
height: 100%; |
|||
min-height: 64rpx; |
|||
position: relative; |
|||
transform: translateX(0); |
|||
z-index: 300; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
color: rgb(51, 51, 51); |
|||
font-size: 28rpx; |
|||
line-height: 40rpx; |
|||
white-space: nowrap; |
|||
padding: 12rpx 24rpx; |
|||
background-color: rgb(245, 245, 245); |
|||
border-radius: 8rpx; |
|||
.icon { |
|||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAgCAYAAABHA7voAAACtklEQVRYhdXYOW8TQRgG4CcxBHIQTA5uCCDRICSoKChB3MefBYmjpYCCDjokEnIQEDRIiPsqPltJjGe8a++G8EpWJPvLeB7P7OzsDGEIZ3AK27GEx/js/8oUzmMWH/EU80M4i3MdxR9wB582s4cDZB+uiwFan7sNXMBIxwc7cRQv8aP27g2WWYHrNEBj2N/qdpq4IbBbNTOij91wMNLAtJi/3TKKQ2Ikf1bevcEyJXA7MjXPG3iD45nCMVsP2cQt+dm1iCcNcY3N45g0chwHBPJXdf3sK7sFbjRTs4yH+NVovfEdC5iTRk5gv3+LnBS48UzNMh5ozbbGug++CWRuJHdhrxjxzUZOCNxEpmYDjo1AiiEnxeo1j999drZsxnFb/MCptKflhnWiE0gx5G6x+m4GckyM3GSmpo37657dDUgxZLP1WlAfclTgmpmaJI40kEC+EreQ1I10j/hlF3r1tI/sxM3Wd6SSxZEHsjaSOeSUuDZe9WirTHYI3HSmZkUPHL2BFENOi4VgsUB7vTIicDOZmhWxWvbcJxcBUgw5I6bVUsE2u2VEbJxnMzWFcRQHsnZNHpNG7hWb9+US7bazHdfEo08qpXCUA8JXvReefa12V0q0uw1XxXYwldI4ygMphtzf+rtasA9XxIY+ldf6wLUb7ydFkAfFruJNj++/jCOZmte4r88H736BFEMeEhv5t10+G8YlcXKQykA4BgMSyEWckD4ZOIwveLfuvWFcFAtWKgPjGBzI2kjmkEfFAdZ7cYp3oVWfSiU4qgFSDDknjvNO42SmrcpwxK9ZZZpiFzLW5/9XiqO6EWzni7gmj0uPZCqrKsZRPZA1ZG66dmYV99RwBlsHkHLI2nDUB6QYspZpuT51Agnkku4b9Pbe8nudHagbSCBfiOfFMfFU8gyPbJ2D5P83fwA+SqvvLFrSmAAAAABJRU5ErkJggg==') |
|||
no-repeat center center/cover; |
|||
width: 28rpx; |
|||
height: 16rpx; |
|||
} |
|||
} |
|||
.select-mask { |
|||
width: 750rpx; |
|||
height: 100vh; |
|||
background-color: transparent; |
|||
position: fixed; |
|||
z-index: 200; |
|||
top: 0; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
} |
|||
.options-area { |
|||
z-index: 400; |
|||
position: fixed; |
|||
top: 100%; |
|||
left: 0rpx; |
|||
right: 0rpx; |
|||
height: 184rpx; |
|||
border-radius: 6rpx; |
|||
border: 2rpx solid #f5f5f5; |
|||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); |
|||
background-color: #fff; |
|||
overflow-y: auto; |
|||
.option { |
|||
height: 60rpx; |
|||
line-height: 60rpx; |
|||
// max-width: 500rpx; |
|||
// overflow-x: hidden; |
|||
// text-overflow: ellipsis; |
|||
padding: 0 24rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
border-bottom: 1rpx solid #f5f5f5; |
|||
.icon { |
|||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABa0lEQVRYhe2Tu0oDQRSG/zNYmNmnsDVlouJ7xIAgWIigWCiCZoPiFdyNCgGLgBDwhqCxt/ARMpvHSYLF7rHKhewk7iZxbeavBuYcvm+YcwATE5N/DiUBWSp+z/u+f8wsHhs3s1/9dzNJwAMENQikgWAZwFz/vUgCzsxpACDw02DNn32BBn6pXOskEYFBuCC+qjvWka526gLhl6OkXGkPq5+qQAhOuFWOPBjVExLI2s0zIpFDwBeqJGvjwgGUPVfu/9YX2gIikWPmNBPeFwrttXHgRLiLAtcLMJ93zkz8kj1sb8SBM1BRjtyNAtcK1F35IYB8r4KrmUJzOwocRPcNV+5EhWsFdBJEVMkWW3uj4ASqek5qKw58qIBOAoxyxm4VtHDiB+WmNuPCgQhruGi3VgKguw3EdAqBfG/a+dlzrfVx4JEEdBLdZsKrcmSkTZlIQCtBePMcuToJPJZAR8IHrgF8xp12ExMTk2H5ASlkxc57+JuCAAAAAElFTkSuQmCC') |
|||
no-repeat center center/cover; |
|||
width: 32rpx; |
|||
height: 32rpx; |
|||
} |
|||
} |
|||
} |
|||
.placeholder { |
|||
color: #ccc; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,175 @@ |
|||
<template> |
|||
<view class="content"> |
|||
<uni-nav-bar left-icon="back" statusBar @clickLeft="back" fixed title="我的客户"></uni-nav-bar> |
|||
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback"> |
|||
<view class="list-item flex-col" :key="item.id" v-for="item in list"> |
|||
<view class="top-group flex-col items-end"> |
|||
<view class="text-wrapper flex-col items-center" :style="{ backgroundColor: item.haveUser ? '' : 'rgb(226, 134, 134)' }"> |
|||
<text>{{ item.haveUser ? '已注册' : '未注册' }}</text> |
|||
</view> |
|||
<view class="group_5 flex-row"> |
|||
<image src="/static/imgs/client/client-default.png" class="image_4" /> |
|||
<view class="right-group flex-col"> |
|||
<text class="text_5">{{ item.enterpriseName }}</text> |
|||
<text class="text_6">{{ item.bizScope }}</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="bottom-group justify-between"> |
|||
<text class="text_7">{{ item.foundDate | dateFormat }}</text> |
|||
<text class="text_9" @click="go2('client-detail', { id: item.enterpriseId })">查看详情</text> |
|||
</view> |
|||
</view> |
|||
</scroll-list> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { go2, back } from '@/utils/hook.js' |
|||
import { getMyClientList } from '@/apis/clientListApi.js' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
pagination: { |
|||
pageNum: 0, // 初始会执行一次下拉加载 |
|||
pageSize: 10 |
|||
}, |
|||
condition: { |
|||
mallSupplierId: this.$store.state.supplierInfo.supplierId |
|||
}, |
|||
list: [], |
|||
option: { |
|||
size: 10, |
|||
auto: true, |
|||
emptyText: '暂无数据~', |
|||
background: '#F7F8FA' |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
go2, |
|||
back, |
|||
getList() { |
|||
return new Promise((resolve, reject) => { |
|||
getMyClientList({ ...this.condition, ...this.pagination }) |
|||
.then((res) => { |
|||
if (res) { |
|||
if (res.current == 1) { |
|||
this.list = res.records |
|||
} else { |
|||
this.list = this.list.concat(res.records) |
|||
} |
|||
resolve({ list: this.list, total: res.total }) |
|||
} else { |
|||
reject() |
|||
} |
|||
}) |
|||
.catch((err) => { |
|||
reject(err) |
|||
}) |
|||
}) |
|||
}, |
|||
downCallback() { |
|||
this.pagination.pageNum = 1 |
|||
this.getList() |
|||
.then(({ list, total }) => { |
|||
this.$refs.list.refreshSuccess({ list, total }) |
|||
}) |
|||
.catch(() => { |
|||
this.$refs.list.refreshFail() |
|||
}) |
|||
}, |
|||
upCallback(page) { |
|||
this.pagination.pageNum++ |
|||
this.getList() |
|||
.then(({ list, total }) => { |
|||
this.$refs.list.loadSuccess({ list, total }) |
|||
}) |
|||
.catch(() => { |
|||
this.$refs.list.loadFail() |
|||
}) |
|||
} |
|||
}, |
|||
filters: { |
|||
dateFormat(value) { |
|||
if (!value) { |
|||
return '' |
|||
} |
|||
return value.replace(/-/g, '/') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.content { |
|||
width: 750rpx; |
|||
} |
|||
.list-item { |
|||
background-color: rgb(255, 255, 255); |
|||
margin-bottom: 20rpx; |
|||
.top-group { |
|||
padding-bottom: 114rpx; |
|||
border-bottom: solid 2rpx rgb(221, 221, 221); |
|||
position: relative; |
|||
.text-wrapper { |
|||
padding: 5rpx 0; |
|||
color: rgb(255, 255, 255); |
|||
font-size: 28rpx; |
|||
font-weight: 500; |
|||
line-height: 40rpx; |
|||
white-space: nowrap; |
|||
background-color: rgb(134, 226, 223); |
|||
border-radius: 0px 0px 0px 20rpx; |
|||
width: 124rpx; |
|||
} |
|||
.group_5 { |
|||
position: absolute; |
|||
left: 32rpx; |
|||
right: 52rpx; |
|||
top: 24rpx; |
|||
.image_4 { |
|||
width: 100rpx; |
|||
height: 100rpx; |
|||
} |
|||
.right-group { |
|||
margin-left: 20rpx; |
|||
flex: 1 1 auto; |
|||
.text_5 { |
|||
color: rgb(51, 51, 51); |
|||
font-size: 30rpx; |
|||
font-weight: 500; |
|||
line-height: 42rpx; |
|||
white-space: nowrap; |
|||
} |
|||
.text_6 { |
|||
margin-top: 24rpx; |
|||
color: rgb(51, 51, 51); |
|||
font-size: 26rpx; |
|||
line-height: 37rpx; |
|||
white-space: nowrap; |
|||
width: 560rpx; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.bottom-group { |
|||
padding: 19rpx 32rpx 20rpx; |
|||
.text_7 { |
|||
color: rgb(136, 136, 136); |
|||
font-size: 28rpx; |
|||
line-height: 40rpx; |
|||
white-space: nowrap; |
|||
} |
|||
.text_9 { |
|||
color: rgb(0, 122, 255); |
|||
font-size: 28rpx; |
|||
line-height: 40rpx; |
|||
white-space: nowrap; |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
@ -0,0 +1,162 @@ |
|||
<template> |
|||
<view> |
|||
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="收款码"></uni-nav-bar> |
|||
<view class="container"> |
|||
<view class="top-section flex-col" v-for="(item, index) in list" :key="item.mallSupplierId"> |
|||
<view class="flex-col section_1" v-show="item.payeeCodeUrl"> |
|||
<view class="flex-col items-center group_5"> |
|||
<image :src="item.payeeCodeUrl" mode="aspectFit" class="image_4" @click="previewCode(item.payeeCodeUrl)" /> |
|||
<view class="justify-evenly section_2" @click="deleteCode(index)"> |
|||
<image src="/static/imgs/general/close-icon.png" class="image_5" /> |
|||
<text>删除</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="flex-col items-center section_3" v-show="!item.payeeCodeUrl" @click="uploadCode(item)"> |
|||
<view class="flex-col items-center image-wrapper"> |
|||
<image src="/static/imgs/general/camera-icon.png" class="image_6" /> |
|||
</view> |
|||
<text class="text_9">点击上传收款码</text> |
|||
</view> |
|||
<view class="bottom-group flex-col"> |
|||
<text class="text_5">{{ item.name }}</text> |
|||
<text class="text_7">收款码</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { back, uploadImage } from '@/utils/hook.js' |
|||
import { bindingReciptCode, getReciptCodeList } from '@/apis/commonApi' |
|||
export default { |
|||
data() { |
|||
return { |
|||
list: [] |
|||
} |
|||
}, |
|||
created() { |
|||
this.getList() |
|||
}, |
|||
methods: { |
|||
back, |
|||
uploadCode(item) { |
|||
uploadImage().then((res) => { |
|||
if (res.length > 0) { |
|||
bindingReciptCode({ |
|||
mallSupplierId: item.mallSupplierId, |
|||
payeeCodeUrl: res[0] |
|||
}).then((result) => { |
|||
if (result) { |
|||
item.payeeCodeUrl = res[0] |
|||
console.log('payeeCodeUrl', res[0]) |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
deleteCode(item) { |
|||
item.payeeCodeUrl = null |
|||
}, |
|||
previewCode(url) { |
|||
uni.previewImage({ urls: [url], current: url }) |
|||
}, |
|||
getList() { |
|||
getReciptCodeList().then((res) => { |
|||
if (res) { |
|||
this.list = res |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.container { |
|||
width: 750rpx; |
|||
padding: 0 32rpx; |
|||
} |
|||
.top-section { |
|||
margin-top: 20rpx; |
|||
background-color: rgb(255, 255, 255); |
|||
box-shadow: 0px 2rpx 14rpx 0px rgba(220, 220, 220, 0.5); |
|||
border-radius: 32rpx; |
|||
.section_1 { |
|||
color: rgb(255, 255, 255); |
|||
font-size: 30rpx; |
|||
line-height: 42rpx; |
|||
white-space: nowrap; |
|||
border-radius: 32rpx 32rpx 0px 0px; |
|||
.group_5 { |
|||
overflow: hidden; |
|||
border-radius: 32rpx 32rpx 0 0; |
|||
height: 438rpx; |
|||
width: 686rpx; |
|||
position: relative; |
|||
.image_4 { |
|||
border-radius: 32rpx 32rpx 0 0; |
|||
overflow: hidden; |
|||
width: 686rpx; |
|||
height: 438rpx; |
|||
} |
|||
.section_2 { |
|||
padding: 7rpx 24rpx 7rpx 26rpx; |
|||
background-color: rgba(255, 0, 0, 0.61); |
|||
border-radius: 0px 10rpx 0px 10rpx; |
|||
width: 154rpx; |
|||
position: absolute; |
|||
right: 0; |
|||
top: 0; |
|||
.image_5 { |
|||
margin: 3rpx 0 4rpx; |
|||
width: 35rpx; |
|||
height: 35rpx; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.bottom-group { |
|||
padding: 28rpx 24rpx 29rpx; |
|||
.text_5 { |
|||
color: rgb(0, 0, 0); |
|||
font-size: 36rpx; |
|||
font-weight: 500; |
|||
line-height: 50rpx; |
|||
white-space: nowrap; |
|||
} |
|||
.text_7 { |
|||
margin-top: 4rpx; |
|||
color: rgb(136, 136, 136); |
|||
font-size: 26rpx; |
|||
line-height: 37rpx; |
|||
white-space: nowrap; |
|||
} |
|||
} |
|||
} |
|||
.section_3 { |
|||
padding: 131rpx 0; |
|||
color: rgb(76, 74, 88); |
|||
font-size: 26rpx; |
|||
line-height: 37rpx; |
|||
white-space: nowrap; |
|||
border-radius: 32rpx 32rpx 0 0; |
|||
background-image: url('https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/611dd17441a9be0011f45822/620ccb0962a7d90011fe5c8f/16472372926943168687.png'); |
|||
background-size: 100% 100%; |
|||
background-repeat: no-repeat; |
|||
.image-wrapper { |
|||
padding: 39rpx 0 40rpx; |
|||
background-color: rgba(0, 122, 255, 0.79); |
|||
border-radius: 50%; |
|||
width: 120rpx; |
|||
.image_6 { |
|||
width: 48rpx; |
|||
height: 41rpx; |
|||
} |
|||
} |
|||
.text_9 { |
|||
margin-top: 20rpx; |
|||
} |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save