buffeyu 4 years ago
parent
commit
940ae50214
25 changed files with 618 additions and 485 deletions
  1. 30
      App.vue
  2. 5
      apis/commonApi.js
  3. 390
      pages/account-management/index.vue
  4. 60
      pages/add-paper/index.vue
  5. 2
      pages/client-credit-list/index.vue
  6. 1
      pages/client-credit/index.vue
  7. 10
      pages/client-detail/base-paper-deals.vue
  8. 2
      pages/client-detail/equipment-information.vue
  9. 2
      pages/client-list/index.vue
  10. 4
      pages/contract-manage/index.vue
  11. 2
      pages/credit-order-list/index.vue
  12. 4
      pages/follow-up-records/index.vue
  13. 8
      pages/guarantee-agreement/index.vue
  14. 87
      pages/mall/index.vue
  15. 1
      pages/order-detail/index.vue
  16. 81
      pages/paper-detail/index.vue
  17. 354
      pages/start-page/index.vue
  18. 4
      pages/trade/index.vue
  19. 2
      pages/trade/orderList.vue
  20. 2
      pages/trade/quotationList.vue
  21. BIN
      static/imgs/start-page/dzqy.png
  22. BIN
      static/imgs/start-page/ht.png
  23. BIN
      static/imgs/start-page/rz.png
  24. BIN
      static/imgs/start-page/zx.png
  25. 52
      utils/hook.js

30
App.vue

@ -2,14 +2,18 @@
import { go2 } from '@/utils/hook.js'
import store from '@/store/index.js'
export default {
onLaunch: function() {
const token = store.state.qnToken
if (!token) {
go2('login')
}
},
onShow: function() {},
onHide: function() {}
onLaunch: function () {
const token = store.state.qnToken
let flag = uni.getStorageSync('hasLaunch')
if (flag && !token) {
go2('login')
}
if (flag && token) {
go2('client')
}
},
onShow: function () {},
onHide: function () {}
}
</script>
@ -18,12 +22,12 @@ export default {
@import url('./common/css/reset.scss');
@import '@/static/icon/iconfont.css';
page {
height: 100%;
height: 100%;
}
/* uni-dialog标题样式 */
.uni-dialog-title-text {
font-size: 32rpx !important;
color: #323233 !important;
font-weight: 500 !important;
font-size: 32rpx !important;
color: #323233 !important;
font-weight: 500 !important;
}
</style>
</style>

5
apis/commonApi.js

@ -99,7 +99,10 @@ export function getVerifyUrl(data = {}) {
* @param {object} data 参数 mallSupplierId
*/
export function getGuaranteeContract(data = {}) {
return http.post({ url: '/yyt-uec/create/supplier/guarantee-contract?mallSupplierId=' + data.mallSupplierId, data })
return http.post({
url: `/yyt-uec/create/supplier/guarantee-contract?mallSupplierId=${data.mallSupplierId}&customerEnterpriseId=${data.customerEnterpriseId}`,
data
})
}
/**

390
pages/account-management/index.vue

@ -1,206 +1,210 @@
<template>
<view class="account-management">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="account-management-title">账号管理</view>
<view slot="left"></view>
<view slot="right" class="add-account" @click="addAccount">添加账号</view>
</uni-nav-bar>
</view>
<view class="">
<scroll-list style="touch-action: none" ref="orderRef" :option="orderOption" @load="orderUp" @refresh="orderDown">
<view class="account-list" v-for="(item,index) in list" :key="index">
<view class="account-iamge-width"><image class="list-image" src="../../static/imgs/client-credit-list/client-default.png" mode=""></image></view>
<view class="account-text">
<view class="account-name"><text>{{item.name}}-{{item.title}}</text></view>
<view class="account-phone"><text>{{item.mobile}}</text></view>
</view>
<view class="account-delete" @click="deleteAccount(item)"><text>删除账号</text></view>
</view>
</scroll-list>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="info" mode="base" title="确认删除该账号?" :duration="2000" :before-close="true" @close="close" @confirm="confirm">
<view class="account-dialog-text">
<text>账号删除后无法在使用系统请谨慎操作</text>
</view>
</uni-popup-dialog>
</uni-popup>
</view>
<view class="account-management">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="account-management-title">账号管理</view>
<view slot="left"></view>
<view slot="right" class="add-account" @click="addAccount">添加账号</view>
</uni-nav-bar>
</view>
<view class="">
<scroll-list style="touch-action: none" ref="orderRef" :option="orderOption" @load="orderUp" @refresh="orderDown">
<view class="account-list" v-for="(item, index) in list" :key="index">
<view class="account-iamge-width"><image class="list-image" src="../../static/imgs/client-credit-list/client-default.png" mode=""></image></view>
<view class="account-text">
<view class="account-name">
<text>{{ item.name }}-{{ item.title }}</text>
</view>
<view class="account-phone">
<text>{{ item.mobile }}</text>
</view>
</view>
<view class="account-delete" @click="deleteAccount(item)"><text>删除账号</text></view>
</view>
</scroll-list>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="info" mode="base" title="确认删除该账号?" :duration="2000" :before-close="true" @close="close" @confirm="confirm">
<view class="account-dialog-text">
<text>账号删除后无法在使用系统请谨慎操作</text>
</view>
</uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import { back, go2, uploadFile } from '@/utils/hook.js'
import { employeeList,deleteEmployee } from '@/apis/setting.js'
import { employeeList, deleteEmployee } from '@/apis/setting.js'
export default {
data() {
return {
orderOption: {
size: 10,
auto: true,
emptyText: '暂无用户~',
background: '#F7F8FA',
fontSize: '40rpx',
emptyImage: '/static/imgs/order/order-empty.png'
},
params: {
asc: '',
desc: '',
enterpriseId: this.$store.state.supplierInfo.id,
},
pagination: {
pageNum: 0, //
pageSize: 10
},
list:[],
deleteId:''
}
},
onShow() {
this.getList()
},
methods: {
back,
addAccount() {
go2('add-account')
},
deleteAccount(item){
// deleteEmployee
this.$refs.popup.open()
this.deleteId = item.id
},
confirm(){
var params= {
id:this.deleteId,
enterpriseId: this.$store.state.supplierInfo.id,
}
deleteEmployee(params)
.then(res => {
if (res) {
uni.showToast({
title: '删除成功',
icon: 'success'
})
this.close()
}
})
.catch(err => {
reject(err)
})
},
close(){
this.$refs.popup.close()
},
//
getList() {
return new Promise((resolve, reject) => {
employeeList({ ...this.params, ...this.pagination })
.then(res => {
if (res) {
if (this.pagination.pageNum == 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)
})
})
},
//
orderUp(page) {
this.pagination.pageNum++
this.getList()
.then(({ list, total }) => {
this.$refs.orderRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.orderRef.loadFail()
})
},
//
orderDown() {
this.pagination.pageNum = 1
this.getList()
.then(({ list, total }) => {
this.$refs.orderRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.orderRef.refreshFail()
})
}
}
data() {
return {
orderOption: {
size: 10,
auto: true,
emptyText: '暂无用户~',
background: '#F7F8FA',
fontSize: '40rpx',
emptyImage: '/static/imgs/order/order-empty.png'
},
params: {
asc: '',
desc: '',
enterpriseId: this.$store.state.supplierInfo.id
},
pagination: {
pageNum: 0, //
pageSize: 10
},
list: [],
deleteId: ''
}
},
onShow() {
this.getList()
},
methods: {
back,
addAccount() {
go2('add-account')
},
deleteAccount(item) {
// deleteEmployee
this.$refs.popup.open()
this.deleteId = item.id
},
confirm() {
var params = {
id: this.deleteId,
enterpriseId: this.$store.state.supplierInfo.id
}
deleteEmployee(params)
.then((res) => {
if (res) {
uni.showToast({
title: '删除成功',
icon: 'success'
})
this.close()
}
})
.catch((err) => {
reject(err)
})
},
close() {
this.$refs.popup.close()
},
//
getList() {
return new Promise((resolve, reject) => {
employeeList({ ...this.params, ...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)
})
})
},
//
orderUp(page) {
this.pagination.pageNum++
this.getList()
.then(({ list, total }) => {
this.$refs.orderRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.orderRef.loadFail()
})
},
//
orderDown() {
this.pagination.pageNum = 1
this.getList()
.then(({ list, total }) => {
this.$refs.orderRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.orderRef.refreshFail()
})
}
}
}
</script>
<style lang="scss">
.account-management {
.account-management-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;
}
.list-image {
width: 100rpx;
height: 100rpx;
border-radius: 50rpx;
}
.account-list {
display: flex;
align-items: center;
height: 148rpx;
background-color: #ffffff;
}
.account-name {
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
font-weight: 500;
}
.account-phone {
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
line-height: 32rpx;
font-weight: 400;
}
.account-delete {
font-size: 28rpx;
color: #f5222d;
text-align: right;
line-height: 40rpx;
font-weight: 400;
}
.account-text {
width: 60%;
line-height: 60rpx;
}
.account-iamge-width {
margin-left: 32rpx;
width: 15%;
}
.account-dialog-text{
font-size: 28rpx;
color: #969799;
text-align: center;
line-height: 40rpx;
font-weight: 400;
}
.account-management-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;
}
.list-image {
width: 100rpx;
height: 100rpx;
border-radius: 50rpx;
}
.account-list {
display: flex;
align-items: center;
height: 148rpx;
background-color: #ffffff;
}
.account-name {
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
font-weight: 500;
}
.account-phone {
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
line-height: 32rpx;
font-weight: 400;
}
.account-delete {
font-size: 28rpx;
color: #f5222d;
text-align: right;
line-height: 40rpx;
font-weight: 400;
}
.account-text {
width: 60%;
line-height: 60rpx;
}
.account-iamge-width {
margin-left: 32rpx;
width: 15%;
}
.account-dialog-text {
font-size: 28rpx;
color: #969799;
text-align: center;
line-height: 40rpx;
font-weight: 400;
}
}
</style>

60
pages/add-paper/index.vue

@ -201,16 +201,16 @@
<view class="paper-price">
<view class="paper-price-image-title"><text class="paper-price-title">纸品图片</text></view>
<view class="paper-price-image">
<view class="imgs flex-row-start-start">
<view v-for="(item, index) in imgList" :key="index" class="upload_img">
<uni-icons type="clear" size="16" class="close-icon" @click="deleteVoucher(index)"></uni-icons>
<image style="width: 120rpx; height: 120rpx" :src="item"></image>
</view>
<view class="default-upload" @click="uploadVoucher()">
<image src="/static/imgs/order/camera.png" class="icon"></image>
<text style="font-size: 26rpx; color: #4c4a58">上传图片</text>
</view>
</view>
<view class="imgs flex-row-start-start">
<view v-for="(item, index) in imgList" :key="index" class="upload_img">
<uni-icons type="clear" size="16" class="close-icon" @click="deleteVoucher(index)"></uni-icons>
<image style="width: 120rpx; height: 120rpx" :src="item"></image>
</view>
<view class="default-upload" @click="uploadVoucher()">
<image src="/static/imgs/order/camera.png" class="icon"></image>
<text style="font-size: 26rpx; color: #4c4a58">上传图片</text>
</view>
</view>
<!-- <uni-file-picker
v-model="imgList"
ref="files"
@ -222,14 +222,14 @@
>
<image @click="uploadVoucher()" class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image>
</uni-file-picker> -->
<!-- mode="grid"
<!-- mode="grid"
file-extname="png,jpg"
:limit="5"
@progress="progress"
@success="success"
@fail="fail"
@select="select" -->
<!-- <image @click="uploadVoucher()" class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image> -->
<!-- <image @click="uploadVoucher()" class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image> -->
</view>
</view>
<uGap></uGap>
@ -456,7 +456,7 @@ export default {
// }
// this.imgList.push(params)
// }
this.imgList = res.imgList
this.imgList = res.imgList
console.log('this.imgList', this.imgList)
}
})
@ -497,20 +497,20 @@ export default {
this.imgList[this.imgList.length - 1].pathUrl = val
})
},
uploadVoucher() {
uploadImage(['album'], 5)
.then((urls) => {
if (urls) {
this.imgList.push(urls[0])
}
})
.catch((e) => {
uni.showToast({
title: '上传失败',
icon: 'fail'
})
})
},
uploadVoucher() {
uploadImage(['album'], 5)
.then((urls) => {
if (urls) {
this.imgList = urls
}
})
.catch((e) => {
uni.showToast({
title: '上传失败',
icon: 'fail'
})
})
},
//
deleteImage(item) {
console.log('deleteImage', item)
@ -521,9 +521,9 @@ export default {
}
console.log(this.imgList)
},
deleteVoucher(index) {
this.imgList.splice(index, 1)
},
deleteVoucher(index) {
this.imgList.splice(index, 1)
},
uploadPrice() {
if (this.skuList.length === 0) {
uni.showToast({

2
pages/client-credit-list/index.vue

@ -79,7 +79,7 @@ export default {
getFsCreditList({ mallSupplierId: this.$store.state.supplierInfo.supplierId, ...this.pagination })
.then((res) => {
if (res) {
if (this.pagination.pageNum == 1) {
if (res.current == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)

1
pages/client-credit/index.vue

@ -194,6 +194,7 @@ export default {
getCreditList(data) {
getCustomerCreditInfo(data).then((res) => {
if (res) {
this.hasCreditList = []
res.hasCredit && this.hasCreditList.push('month')
res.hasFeisuanCredit && this.hasCreditList.push('fs')
this.isFinishedContract = res.isFinishedContract

10
pages/client-detail/base-paper-deals.vue

@ -19,7 +19,11 @@
</view>
<view class="content" v-for="(subItem, subIndex) in item.supplierOrderList[0].orderItems" :key="subIndex">
<!-- <image class="image" :src="/static/imgs/client/client-default.png" mode=""></image> -->
<image class="image" :src="subItem.productImg || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'" mode=""></image>
<image
class="image"
:src="subItem.productImg || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'"
mode=""
></image>
<view class="">
<view class="title">{{ subItem.productName }}</view>
<view class="desc">
@ -75,7 +79,7 @@ export default {
params: {
asc: '',
desc: '',
customerEnterpriseId: this.id,
customerEnterpriseId: this.id,
mallSupplierId: this.$store.state.supplierInfo.supplierId || null, // id
// customerEnterpriseId: '651107734133018624', // ID
// mallSupplierId: '670334117090562048', // id
@ -115,7 +119,7 @@ export default {
.then((res) => {
// console.log('', res)
if (res) {
if (this.pagination.pageNum == 1) {
if (res.current == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)

2
pages/client-detail/equipment-information.vue

@ -184,7 +184,7 @@ export default {
el.collapse = false
el.isShowSelect = false
})
if (this.pagination.pageNum == 1) {
if (res.current == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)

2
pages/client-list/index.vue

@ -98,7 +98,7 @@ export default {
getCompanyList({ ...this.params, ...this.pagination })
.then((res) => {
if (res) {
if (this.pagination.pageNum == 1) {
if (res.current == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)

4
pages/contract-manage/index.vue

@ -1,6 +1,6 @@
<template>
<view class="content">
<uni-nav-bar left-icon="back" @clickLeft="back" typeBar fixed title="合同管理"></uni-nav-bar>
<uni-nav-bar left-icon="back" statusBar @clickLeft="back" typeBar fixed title="合同管理"></uni-nav-bar>
<view class="condition-area flex-row-center-start">
<qn-data-picker
v-model="condition.customerEnterpriseId"
@ -125,7 +125,7 @@ export default {
getContractList({ ...this.condition, ...this.pagination })
.then((res) => {
if (res) {
if (this.pagination.pageNum == 1) {
if (res.current == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)

2
pages/credit-order-list/index.vue

@ -116,7 +116,7 @@ export default {
getFinanceList({ ...this.condition, ...this.pagination })
.then((res) => {
if (res) {
if (this.pagination.pageNum == 1) {
if (res.current == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)

4
pages/follow-up-records/index.vue

@ -73,7 +73,7 @@ export default {
emptyText: '暂无数据~',
background: '#F7F8FA',
disabled: false,
emptyImage: '/static/imgs/order/order-empty.png'
emptyImage: '/static/imgs/order/order-empty.png'
},
params: {
asc: '',
@ -115,7 +115,7 @@ export default {
.then((res) => {
// console.log('', res)
if (res) {
if (this.pagination.pageNum == 1) {
if (res.current == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)

8
pages/guarantee-agreement/index.vue

@ -10,7 +10,7 @@
<text class="sentence strong">甲方: 广州千鸟云纸信息科技有限公司</text>
<text class="sentence">注册地址: 广州市白云区钟落潭镇广从七路28号101</text>
<text class="sentence">法定代表人/负责人:邹依倩</text>
<text class="sentence">联系电话:</text>
<text class="sentence">联系电话:18028689006</text>
</view>
<view class="paragraph">
<text class="sentence strong">乙方:</text>
@ -72,7 +72,7 @@
</view>
<view class="sign">
<text class="sentence"> (盖章): </text>
<text class="sentence">法定代表人/委托代理人(签名):</text>
<text class="sentence">法定代表人/委托代理人(签名):邹依倩</text>
<text class="sentence"> : </text>
</view>
<view class="sign">
@ -117,6 +117,8 @@ export default {
onLoad(option) {
if (option) {
this.params = option
// true / false
this.params.isFinishedContract = this.params.isFinishedContract === 'true'
} else {
uni.showToast({
title: '参数错误',
@ -161,7 +163,7 @@ export default {
return
}
//
if (this.isFinishedContract) {
if (this.params.isFinishedContract) {
uni.showToast({
title: '您已签署过担保协议,即将跳转',
icon: 'none',

87
pages/mall/index.vue

@ -72,14 +72,18 @@
<text style="font-size: 30rpx; text-align: center; font-weight: 600">请先完善企业基本信息</text>
</view>
</view>
<view class="share-area" v-if="visible">
<view class="close-icon">
<uni-icons @click="closeShare" type="close" size="35" color="white"></uni-icons>
</view>
<view class="share-area" v-if="visible" @click="closeShare">
<view class="share-content">
<view class="flex-col-center-start">
<text style="font-size: 34rpx">截图分享店铺</text>
<image style="width: 250rpx; height: 250rpx; margin-top: 30rpx" :src="storeCodeImg"></image>
<image class="bg" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/qrCode-bg.png"></image>
<view class="flex-col-center-start code">
<view class="border flex-row-center-center">
<image style="width: 480rpx; height: 480rpx" :src="shareInfo.storeCodeImg"></image>
</view>
<view class="down-button flex-row-center-center" @click.stop="makeScreenShot">
<text class="text">下载二维码</text>
</view>
<text style="font-size: 46rpx; color: #333333">{{ shareInfo.storeName }}</text>
<text style="font-size: 32rpx; color: #888888; margin-top: 14rpx">每天上新特价纸库存有限先到先得</text>
</view>
</view>
</view>
@ -88,7 +92,7 @@
<script>
import uGap from '@/components/u-gap/u-gap.vue'
import { back, go2, loginGo2 } from '@/utils/hook.js'
import { back, go2, loginGo2, screenShot } from '@/utils/hook.js'
import { SupplierList, productStatus, storeDetail, getSupplierQrCode } from '@/apis/add-paper.js'
import { getTimer } from '@/utils/index.js'
import noData from './no-data.vue'
@ -105,7 +109,10 @@ export default {
},
data() {
return {
storeCodeImg: '', //
shareInfo: {
storeCodeImg: '',
storeName: ''
},
visible: false, //
storeInformation: {
supplierId: null,
@ -156,6 +163,10 @@ export default {
},
methods: {
back,
//
makeScreenShot() {
screenShot()
},
//
getSupplier(id) {
storeDetail(id)
@ -245,7 +256,7 @@ export default {
},
//
detailInfo(item) {
loginGo2('paper-detail', item)
loginGo2('paper-detail', { id: item.id })
},
//
productStatusChange(item) {
@ -272,7 +283,8 @@ export default {
getSupplierQrCode({ mallSupplierId: this.$store.state.supplierInfo.supplierId }).then((res) => {
if (res) {
this.visible = true
this.storeCodeImg = `data:image/png;base64,${res}`
this.shareInfo.storeCodeImg = `data:image/png;base64,${res}`
this.shareInfo.storeName = this.storeInformation.name
}
})
} else {
@ -465,32 +477,53 @@ export default {
.share-area {
width: 750rpx;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
background: #888888;
position: fixed;
z-index: 1000;
z-index: 998;
top: 0;
left: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.close-icon {
width: 750rpx;
padding: 0 32rpx;
height: 70rpx;
flex-grow: 0;
flex-shrink: 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
}
.share-content {
width: 560rpx;
margin-top: 26rpx;
width: 750rpx;
background-color: #fff;
border-radius: 20rpx;
padding: 42rpx;
padding: 64rpx 34rpx 70rpx;
position: relative;
.bg {
position: absolute;
top: 0;
left: 0;
width: 750rpx;
height: 944rpx;
}
.code {
position: relative;
z-index: 10;
background-color: #fff;
width: 680rpx;
border-radius: 20rpx;
box-shadow: 0px 3rpx 13rpx 0px rgba(0, 0, 0, 0.1);
padding: 40rpx 70rpx 64rpx;
.border {
width: 540rpx;
height: 540rpx;
background: url('https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/qrCode-border.png') no-repeat center/cover;
}
}
.down-button {
width: 540rpx;
height: 90rpx;
margin: 40rpx 0 76rpx;
background-image: linear-gradient(180deg, #6092ec 0%, #225dd4 100%);
border-radius: 45rpx;
.text {
font-size: 48rpx;
color: #ffffff;
}
}
}
}
</style>

1
pages/order-detail/index.vue

@ -232,6 +232,7 @@ export default {
quantity += item.quantity
}
})
this.outInfo.quantity = 0
this.outInfo.max = order.pieceQuantity - quantity
this.outInfo.index = index
this.$refs.popup.open('bottom')

81
pages/paper-detail/index.vue

@ -81,14 +81,18 @@
<text>{{ form.otherNote }}</text>
</view>
</view>
<view class="share-area" v-if="visible">
<view class="close-icon">
<uni-icons @click="closeShare" type="close" size="35" color="white"></uni-icons>
</view>
<view class="share-area" v-if="visible" @click="closeShare">
<view class="share-content">
<view class="flex-col-center-start">
<text style="font-size: 34rpx">截图分享纸品</text>
<image style="width: 250rpx; height: 250rpx; margin-top: 30rpx" :src="paperCodeImg"></image>
<image class="bg" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/qrCode-bg.png"></image>
<view class="flex-col-center-start code">
<view class="border flex-row-center-center">
<image style="width: 480rpx; height: 480rpx" :src="shareInfo.storeCodeImg"></image>
</view>
<view class="down-button flex-row-center-center" @click.stop="makeScreenShot">
<text class="text">下载二维码</text>
</view>
<text style="font-size: 46rpx; color: #333333">{{ shareInfo.storeName }}</text>
<text style="font-size: 32rpx; color: #888888; margin-top: 14rpx">{{ shareInfo.paperName }}</text>
</view>
</view>
</view>
@ -105,7 +109,11 @@ export default {
},
data() {
return {
paperCodeImg: '', //
shareInfo: {
storeCodeImg: '',
storeName: '',
paperName: ''
},
visible: false, //
form: {},
skuList: [],
@ -159,7 +167,9 @@ export default {
getPaperQrCode({ mallSupplierId: this.$store.state.supplierInfo.supplierId, paperId: this.id }).then((res) => {
if (res) {
this.visible = true
this.paperCodeImg = `data:image/png;base64,${res}`
this.shareInfo.storeCodeImg = `data:image/png;base64,${res}`
this.shareInfo.storeName = this.$store.state.supplierInfo.name
this.shareInfo.paperName = this.form.name
}
})
},
@ -250,32 +260,53 @@ export default {
.share-area {
width: 750rpx;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
background: #888888;
position: fixed;
z-index: 1000;
z-index: 998;
top: 0;
left: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.close-icon {
width: 750rpx;
padding: 0 32rpx;
height: 70rpx;
flex-grow: 0;
flex-shrink: 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
}
.share-content {
width: 560rpx;
margin-top: 26rpx;
width: 750rpx;
background-color: #fff;
border-radius: 20rpx;
padding: 42rpx;
padding: 64rpx 34rpx 70rpx;
position: relative;
.bg {
position: absolute;
top: 0;
left: 0;
width: 750rpx;
height: 944rpx;
}
.code {
position: relative;
z-index: 10;
background-color: #fff;
width: 680rpx;
border-radius: 20rpx;
box-shadow: 0px 3rpx 13rpx 0px rgba(0, 0, 0, 0.1);
padding: 40rpx 70rpx 64rpx;
.border {
width: 540rpx;
height: 540rpx;
background: url('https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/qrCode-border.png') no-repeat center/cover;
}
}
.down-button {
width: 540rpx;
height: 90rpx;
margin: 40rpx 0 76rpx;
background-image: linear-gradient(180deg, #6092ec 0%, #225dd4 100%);
border-radius: 45rpx;
.text {
font-size: 48rpx;
color: #ffffff;
}
}
}
}
</style>

354
pages/start-page/index.vue

@ -1,191 +1,189 @@
<template>
<view class="">
<view class="start-page">
<view class="view-lineHight"><image class="topImage" src="../../static/imgs/start-page/bkTop.png" mode=""></image></view>
<view class="page-jump" @click="jumpLogin"><text>跳过</text></view>
<view class="page1">
<swiper
class="swiper"
:current="current"
@change="currentChange"
@transition="transition"
:style="pageHight"
:indicator-dots="indicatorDots"
:autoplay="autoplay"
:interval="interval"
:duration="duration"
>
<swiper-item v-for="(swiper, swiperIndex) in pageText" :key="swiperIndex">
<view class="swiper-item uni-bg-red">
<view class="page-top">
<view class="page-text">
<text>{{ swiper.text }}</text>
</view>
<view class="page-title">
<text>{{ swiper.title }}</text>
</view>
<view class="page-subtitle">
<text>{{ swiper.subTitle }}</text>
</view>
<image class="" :src="swiper.image" mode=""></image>
</view>
</view>
</swiper-item>
</swiper>
<view class="index-point"><view v-for="(items, index) in pageText" :class="current === index ? 'indexs-check' : 'indexs-nocheck'"></view></view>
<view class="page-btn-class" v-if="current === pageText.length - 1"><button @click="jumpLogin" class="page-btn" type="default">立即开启</button></view>
</view>
<view class="">
<view class="start-page">
<view class="view-lineHight"><image class="topImage" src="../../static/imgs/start-page/bkTop.png" mode=""></image></view>
<view class="page-jump" @click="jumpLogin"><text>跳过</text></view>
<view class="page1">
<swiper
class="swiper"
:current="current"
@change="currentChange"
@transition="transition"
:style="{ height: '100vh' }"
:indicator-dots="indicatorDots"
:autoplay="autoplay"
:interval="interval"
:duration="duration"
>
<swiper-item v-for="(swiper, swiperIndex) in pageText" :key="swiperIndex">
<view class="swiper-item uni-bg-red">
<view class="page-top">
<view class="page-text">
<text>{{ swiper.text }}</text>
</view>
<view class="page-title">
<text>{{ swiper.title }}</text>
</view>
<view class="page-subtitle">
<text>{{ swiper.subTitle }}</text>
</view>
<image class="" :src="swiper.image" mode=""></image>
</view>
</view>
</swiper-item>
</swiper>
<view class="index-point">
<view v-for="(items, index) in pageText" :key="index" :class="current === index ? 'indexs-check' : 'indexs-nocheck'"></view>
</view>
<view class="page-btn-class" v-if="current === pageText.length - 1"><button @click="jumpLogin" class="page-btn" type="default">立即开启</button></view>
</view>
<view class="view-lineHight"><image class="topImage bottom-image" src="../../static/imgs/start-page/bkBottom.png" mode=""></image></view>
</view>
</view>
<view class="view-lineHight"><image class="topImage bottom-image" src="../../static/imgs/start-page/bkBottom.png" mode=""></image></view>
</view>
</view>
</template>
<script>
import { back, go2, uploadFile } from '@/utils/hook.js'
import { go2 } from '@/utils/hook.js'
export default {
data() {
return {
current: 0,
mode: 'round',
pageHight: 0,
background: ['color1', 'color2', 'color3'],
indicatorDots: false,
autoplay: true,
interval: 1500,
duration: 500,
pageText: [
{
text: '',
title: '账期订单融资',
subTitle: '给客户更便宜的价格,更大的销售额',
image: '../../static/imgs/start-page/rz.png'
},
{
text: '',
title: '征信管理',
subTitle: '具有客户更丰富多维的征信数据',
image: '../../static/imgs/start-page/zx.png'
},
{
text: '',
title: '电子签约',
subTitle: '避免交易过程可能的纠纷',
image: '../../static/imgs/start-page/dzqy.png'
},
{
text: '全新纸掌柜',
title: '智能合同',
subTitle: '实现合同同步的财务履约能力',
image: '../../static/imgs/start-page/ht.png'
}
]
}
},
methods: {
currentChange(item) {
this.current = item.detail.current
},
transition(item){
if(this.current === this.pageText.length - 1){
this.autoplay = false
}
},
jumpLogin(){
go2('client')
}
},
onLoad() {
this.pageHight = 'height:' + (window.screen.height - 60) + 'px'
console.log(this.pageHight)
}
data() {
return {
current: 0,
mode: 'round',
background: ['color1', 'color2', 'color3'],
indicatorDots: false,
autoplay: true,
interval: 2500,
duration: 500,
pageText: [
{
text: '',
title: '账期订单融资',
subTitle: '给客户更便宜的价格,更大的销售额',
image: 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/start-page-rz.png'
},
{
text: '',
title: '征信管理',
subTitle: '具有客户更丰富多维的征信数据',
image: 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/start-page-zx.png'
},
{
text: '',
title: '电子签约',
subTitle: '避免交易过程可能的纠纷',
image: 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/start-page-dzqy.png'
},
{
text: '全新纸掌柜',
title: '智能合同',
subTitle: '实现合同同步的财务履约能力',
image: 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/start-page-ht.png'
}
]
}
},
methods: {
currentChange(item) {
this.current = item.detail.current
},
transition(item) {
if (this.current === this.pageText.length - 1) {
this.autoplay = false
}
},
jumpLogin() {
uni.setStorageSync('hasLaunch', '1')
go2('client')
}
}
}
</script>
<style lang="scss">
.start-page {
.topImage {
width: 100%;
height: 72rpx;
}
.view-lineHight {
line-height: 0rpx;
}
.bottom-image {
position: absolute;
bottom: 0rpx;
}
.page1 {
background-color: #e7eeff;
text-align: center;
}
.page-title {
font-size: 100rpx;
color: #2143af;
text-align: center;
font-weight: 600;
margin: 32rpx 0rpx;
}
.page-text {
font-size: 80rpx;
color: #2143af;
font-weight: 400;
}
.page-top {
padding-top: 20%;
}
.page-subtitle {
font-size: 32rpx;
color: #333333;
font-weight: 400;
margin: 32rpx 0rpx;
}
.page-jump {
position: absolute;
padding: 12rpx;
border: 2rpx solid #979797;
border-radius: 38rpx;
width: 122rpx;
text-align: center;
right: 54rpx;
font-size: 24rpx;
color: #333333;
font-weight: 400;
z-index: 9999;
}
.indexs-check {
background-image: linear-gradient(90deg, #047fff 0%, #00b4fa 100%);
border-radius: 12rpx;
width: 54rpx;
height: 12rpx;
margin-left: 10rpx;
}
.indexs-nocheck {
width: 12rpx;
height: 12rpx;
background-color: #58c4fd;
margin-left: 10rpx;
border-radius: 10rpx;
}
.index-point {
position: absolute;
top: 70%;
left: 40%;
display: flex;
}
.page-btn {
background-image: linear-gradient(90deg, #047fff 0%, #00b4fa 100%);
border-radius: 8rpx;
font-size: 32rpx;
color: #FFFFFF;
font-weight: 500;
width: 400rpx;
}
.page-btn-class {
position: absolute;
top: 73%;
left: 0;
right: 0;
}
.topImage {
width: 100%;
height: 72rpx;
}
.view-lineHight {
line-height: 0rpx;
}
.bottom-image {
position: absolute;
bottom: 0rpx;
}
.page1 {
background-color: #e7eeff;
text-align: center;
}
.page-title {
font-size: 100rpx;
color: #2143af;
text-align: center;
font-weight: 600;
margin: 32rpx 0rpx;
}
.page-text {
font-size: 80rpx;
color: #2143af;
font-weight: 400;
}
.page-top {
padding-top: 20%;
}
.page-subtitle {
font-size: 32rpx;
color: #333333;
font-weight: 400;
margin: 32rpx 0rpx;
}
.page-jump {
position: absolute;
padding: 12rpx;
border: 2rpx solid #979797;
border-radius: 38rpx;
width: 122rpx;
text-align: center;
right: 54rpx;
font-size: 24rpx;
color: #333333;
font-weight: 400;
z-index: 9999;
}
.indexs-check {
background-image: linear-gradient(90deg, #047fff 0%, #00b4fa 100%);
border-radius: 12rpx;
width: 54rpx;
height: 12rpx;
margin-left: 10rpx;
}
.indexs-nocheck {
width: 12rpx;
height: 12rpx;
background-color: #58c4fd;
margin-left: 10rpx;
border-radius: 10rpx;
}
.index-point {
position: absolute;
top: 70%;
left: 40%;
display: flex;
}
.page-btn {
background-image: linear-gradient(90deg, #047fff 0%, #00b4fa 100%);
border-radius: 8rpx;
font-size: 32rpx;
color: #ffffff;
font-weight: 500;
width: 400rpx;
}
.page-btn-class {
position: absolute;
top: 73%;
left: 0;
right: 0;
}
}
</style>

4
pages/trade/index.vue

@ -27,10 +27,10 @@
<view class="" v-if="!hasLogin"><not-logged @loginChange="loginChange()"></not-logged></view>
<view class="" v-if="hasLogin">
<view class="content">
<view v-show="current === '0'">
<view v-if="current === '0'">
<quotationList :refresh="refresh"></quotationList>
</view>
<view v-show="current === '1'">
<view v-if="current === '1'">
<orderList :refresh="refresh"></orderList>
</view>
</view>

2
pages/trade/orderList.vue

@ -110,7 +110,7 @@ export default {
getSupplierOrderList({ ...this.params, ...this.pagination })
.then((res) => {
if (res) {
if (this.pagination.pageNum == 1) {
if (res.current == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)

2
pages/trade/quotationList.vue

@ -137,7 +137,7 @@ export default {
.then((res) => {
console.log('获取报价列表', res)
if (res) {
if (this.pagination.pageNum == 1) {
if (res.current == 1) {
this.list = res.records
// this.list = []
// this.list = [{ name: '111', id: '222' }, { name: '111', id: '222' }]

BIN
static/imgs/start-page/dzqy.png

Before After
Width: 750  |  Height: 603  |  Size: 28 KiB

BIN
static/imgs/start-page/ht.png

Before After
Width: 750  |  Height: 583  |  Size: 38 KiB

BIN
static/imgs/start-page/rz.png

Before After
Width: 750  |  Height: 583  |  Size: 42 KiB

BIN
static/imgs/start-page/zx.png

Before After
Width: 750  |  Height: 804  |  Size: 52 KiB

52
utils/hook.js

@ -158,3 +158,55 @@ export function uploadFile(path, type = 'image') {
})
})
}
/**
* 屏幕截图并保存到相册(不包含状态栏和tabBar)
*/
export function screenShot() {
var pages = getCurrentPages()
var page = pages[pages.length - 1]
var bitmap = null
// 获取当前页面 webview 的对象实例
var currentWebview = page.$getAppWebview()
bitmap = new plus.nativeObj.Bitmap('amway_img')
// 将webview内容绘制到Bitmap对象中
currentWebview.draw(
bitmap,
function () {
console.log('截屏绘制图片成功')
bitmap.save(
'_doc/a.jpg',
{},
function (i) {
uni.saveImageToPhotosAlbum({
filePath: i.target,
success: function () {
bitmap.clear() //销毁Bitmap图片
uni.showToast({
title: '保存图片成功',
mask: false,
duration: 1500
})
}
})
},
function (e) {
// console.log('保存图片失败:' + JSON.stringify(e))
uni.showToast({
title: '保存图片失败,请手动截图',
mask: false,
duration: 1500
})
}
)
},
function (e) {
// console.log('截屏绘制图片失败:' + JSON.stringify(e))
uni.showToast({
title: '保存图片失败,请手动截图',
mask: false,
duration: 1500
})
}
)
}
Loading…
Cancel
Save