Commit c5fad040 authored by 高铭波's avatar 高铭波

Merge branch 'dev'

parents 0e9f7a82 f62c4046
...@@ -2,8 +2,10 @@ const globalUrl = process.uniEnv || {} ...@@ -2,8 +2,10 @@ const globalUrl = process.uniEnv || {}
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
let certApiFun = function(vm){ let certApiFun = function(vm){
let getCertList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-cert-list', params); let getCertList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-cert-list', params);
let submitCert = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/submit-cert', params);
const certApi = { const certApi = {
getCertList getCertList,
submitCert
} }
return certApi return certApi
} }
......
...@@ -170,6 +170,8 @@ let orderApiFun = function(vm){ ...@@ -170,6 +170,8 @@ let orderApiFun = function(vm){
let allowLogin = async (params = {}) => await vm.$u.get(prefix + 'other/auth/' + vm.vuex_token + '/allow/login', params); let allowLogin = async (params = {}) => await vm.$u.get(prefix + 'other/auth/' + vm.vuex_token + '/allow/login', params);
// 特殊登录切换师傅 // 特殊登录切换师傅
let otherUser = async (params = {}) => await vm.$u.get(prefix + 'other/auth/' + vm.vuex_token + '/other/user', params); let otherUser = async (params = {}) => await vm.$u.get(prefix + 'other/auth/' + vm.vuex_token + '/other/user', params);
// 是否添加客服
let checkAddCustomer = async (params = {}) => await vm.$u.get(prefix + 'order/revision/' + vm.vuex_token + '/checkAddCustomer', params);
const orderApi = { const orderApi = {
listByRecommendOrder, listByRecommendOrder,
...@@ -209,7 +211,8 @@ let orderApiFun = function(vm){ ...@@ -209,7 +211,8 @@ let orderApiFun = function(vm){
payableRecord, payableRecord,
workerApplyPay, workerApplyPay,
allowLogin, allowLogin,
otherUser otherUser,
checkAddCustomer
} }
return orderApi return orderApi
} }
......
<template> <template>
<view class="cus-wrap-component"> <view class="cus-wrap-component">
<image class="top-image" mode="widthFix" :src="minekefutuImage"></image> <image class="top-image" mode="widthFix" v-if="!isPop" :src="minekefutuImage"></image>
<view class="content-view"> <view class="content-view">
<view class="title-view" v-if="!isPop"> <view :class="['title-view', {'is-mine': isMine}]">
<text class="title-text">客服微信</text> <text :class="['title-text', {'is-mine': isMine}]">{{titleText[typeIndex]}}</text>
<text v-if="isMine">下载二维码添加官方客服微信</text> <text>{{tipText[typeIndex]}}</text>
</view> </view>
<u-image :class="['qrcode', {'is-pop': isPop}]" :src="cusQrcode" mode="widthFix" :fade="true" <u-image :class="['qrcode', {'is-mine': isMine}]" :src="cusQrcode" mode="widthFix" :fade="true"
duration="450"> duration="450">
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view> <view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image> </u-image>
<view v-if="isPop" class="pop-tip-view"> <button :class="['settle-button', {'is-mine': isMine}]" type="primary" :open-type="openTypes[typeIndex]" show-message-card
<text>请务必添加该微信号,后续工单相关通知均以微信消息形式通知</text> send-message-title="点击下方客服会话添加订单助手" shape="circle" @click="download" :send-message-img="kefuzxiaoxiImage"
</view> send-message-path="/pages/index/index">
<u-button class="settle-button" type="primary" shape="circle" @click="download" :custom-style="buttonStyle"> {{buttonText[typeIndex]}}
点击下载 </button>
</u-button>
<view class="bottom-view" v-if="isMine"> <view class="bottom-view" v-if="isMine">
<view class="line-view"></view> <view class="line-view"></view>
<view class="phone-view"> <view class="phone-view">
...@@ -28,9 +27,6 @@ ...@@ -28,9 +27,6 @@
</u-image> </u-image>
</view> </view>
</view> </view>
<view v-else-if="isExclusive" class="tip-view">
<text>请务必添加该微信号,后续工单相关通知均以微信消息形式通知</text>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -38,18 +34,20 @@ ...@@ -38,18 +34,20 @@
<script> <script>
export default { export default {
props: { props: {
type: { // exclusive:专属; mine:我的页面客服; pop: 弹窗客服 type: { // exclusive:专属; mine:我的页面客服; pop:弹窗;
type: String, type: String,
default: 'mine' default: 'mine'
} }
}, },
data() { data() {
return { return {};
};
}, },
computed: { computed: {
cusQrcode() { cusQrcode() {
return process.uniEnv.qn_base_url + (this.isMine ? 'erweima-rk.png' : 'erweima-bn.png') return process.uniEnv.qn_base_url + (this.isMine ? 'erweima-rk.png' : 'dingdanzhushou-n.png')
},
kefuzxiaoxiImage() {
return process.uniEnv.qn_base_url + 'kefuzxiaoxi.png'
}, },
minekefutuImage() { minekefutuImage() {
return process.uniEnv.qn_base_url + this.imageName return process.uniEnv.qn_base_url + this.imageName
...@@ -57,28 +55,38 @@ ...@@ -57,28 +55,38 @@
imageName() { imageName() {
return this.isMine ? 'kefufuwu-n.png' : 'kefutuzs.png' return this.isMine ? 'kefufuwu-n.png' : 'kefutuzs.png'
}, },
isMine() { // exclusive:专属; mine:我的页面客服; pop: 弹窗客服 isMine() { // exclusive:专属; mine:我的页面客服; pop:弹窗;
return this.type == 'mine' return this.type == 'mine'
}, },
isExclusive() {
return this.type == 'exclusive'
},
isPop() { isPop() {
return this.type == 'pop' return this.type == 'pop'
},
isExclusive() {
return this.type == 'exclusive'
}, },
phoneIcon() { phoneIcon() {
return process.uniEnv.qn_base_url + 'dianhua.png' return process.uniEnv.qn_base_url + 'dianhua.png'
}, },
buttonStyle() { types() {
return { return ['exclusive', 'pop', 'mine']
width: "300rpx", },
height: "80rpx", typeIndex() {
"font-size": "32rpx", return this.types.indexOf(this.type)
"font-weight": "bold",
};
}, },
phone() { phone() {
return '18124099271' return '18124099271'
},
openTypes() {
return ['contact', 'contact', '']
},
buttonText() {
return ['添加', '添加', '点击下载']
},
titleText() {
return ['添加订单助手', '添加订单助手', '客服微信']
},
tipText() {
return ['在对话框输入“加入”,即可获取二维码,添加订单助手', '在对话框输入“加入”,即可获取二维码,添加订单助手', '下载二维码添加官方客服微信']
} }
}, },
methods: { methods: {
...@@ -88,7 +96,11 @@ ...@@ -88,7 +96,11 @@
complete() {} complete() {}
}); });
}, },
download() { download() {
if (!this.isMine) {
this.$emit('click')
return
}
let self = this let self = this
uni.downloadFile({ //获得二维码的临时地址 uni.downloadFile({ //获得二维码的临时地址
url: self.cusQrcode, url: self.cusQrcode,
...@@ -97,8 +109,8 @@ ...@@ -97,8 +109,8 @@
uni.saveImageToPhotosAlbum({ uni.saveImageToPhotosAlbum({
filePath: result.tempFilePath, //传入临时地址 filePath: result.tempFilePath, //传入临时地址
success(e) { success(e) {
self.$u.toast('保存成功!'); self.$u.toast('保存成功!');
self.$emit('click') self.$emit('click')
}, },
fail(res) { fail(res) {
if (res.errMsg.indexOf('auth') != -1) { if (res.errMsg.indexOf('auth') != -1) {
...@@ -110,7 +122,8 @@ ...@@ -110,7 +122,8 @@
if (res.confirm) { if (res.confirm) {
uni.openSetting({ uni.openSetting({
success(res) { success(res) {
console.log(res.authSetting) console.log(res
.authSetting)
} }
}); });
} }
...@@ -119,7 +132,7 @@ ...@@ -119,7 +132,7 @@
}) })
} else if (res.errMsg) { } else if (res.errMsg) {
self.$u.toast('保存失败!'); self.$u.toast('保存失败!');
} }
}, },
}) })
} }
...@@ -146,32 +159,49 @@ ...@@ -146,32 +159,49 @@
align-items: center; align-items: center;
.title-view { .title-view {
font-size: 24rpx; text-align: center;
color: #666666; display: flex;
width: 100%; justify-content: center;
margin-top: 10rpx; align-items: center;
flex-direction: column;
color: #999999;
font-size: 28rpx;
padding-left: 40rpx;
padding-right: 60rpx;
margin-top: 20rpx;
&.is-mine {
display: inline;
font-size: 24rpx;
color: #666666;
width: 100%;
margin-top: 10rpx;
}
.title-text { .title-text {
font-weight: bold; font-weight: bold;
font-size: 32rpx;
color: #333333; color: #333333;
margin-right: 30rpx; font-size: 40rpx;
margin: 0 0 30rpx 0;
&.is-mine {
font-size: 32rpx;
margin-right: 30rpx;
}
} }
} }
.qrcode { .qrcode {
margin-top: 60rpx; width: 600rpx;
margin-bottom: 60rpx; height: 440rpx;
width: 400rpx; margin-top: 30rpx;
height: 400rpx; margin-bottom: 40rpx;
&.is-pop {
width: 248rpx; &.is-mine {
height: 248rpx; margin-top: 60rpx;
padding: 24rpx; margin-bottom: 60rpx;
border: 6rpx solid #2272FF; width: 400rpx;
border-radius: 32rpx; height: 400rpx;
margin-top: 10rpx;
margin-bottom: 40rpx;
} }
} }
...@@ -219,16 +249,30 @@ ...@@ -219,16 +249,30 @@
height: 56rpx; height: 56rpx;
} }
} }
} }
.settle-button {
.settle-button {
margin-bottom: 14rpx; margin-bottom: 14rpx;
} width: 400rpx;
height: 104rpx;
.pop-tip-view { font-size: 32rpx;
text-align: center; background-color: #2272FF;
color: #333333; border-radius: 52rpx;
font-size: 28rpx; line-height: 104rpx;
margin: 0rpx 60rpx 40rpx 60rpx; font-weight: bold;
&.is-mine {
width: 300rpx;
height: 80rpx;
border-radius: 40rpx;
line-height: 80rpx;
}
}
.pop-tip-view {
text-align: center;
color: #333333;
font-size: 28rpx;
margin: 0rpx 60rpx 40rpx 60rpx;
} }
.tip-view { .tip-view {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</view> </view>
<view class="right-view"> <view class="right-view">
<view :class="['statement-status-view', statementTypeClass]">{{data.status}}</view> <view :class="['statement-status-view', statementTypeClass]">{{data.status}}</view>
<view class="statement-amount-view">+{{data.amount}}</view> <view class="statement-amount-view">{{ fmtAmount }}</view>
</view> </view>
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
...@@ -52,6 +52,13 @@ ...@@ -52,6 +52,13 @@
return 'statement-type-h' return 'statement-type-h'
} }
}, },
fmtAmount() {
if(this.data.amount > 0) {
return (`+${this.data.amount}`)
} else {
return this.data.amount
}
},
isWarranty() { isWarranty() {
return this.data.inGuaranteePeriod ? '保内' : '保外' return this.data.inGuaranteePeriod ? '保内' : '保外'
}, },
......
...@@ -216,6 +216,13 @@ ...@@ -216,6 +216,13 @@
"navigationBarTitleText": "",//证件详情 "navigationBarTitleText": "",//证件详情
"navigationStyle":"custom" "navigationStyle":"custom"
} }
},
{
"path": "cert/upload",
"style": {
"navigationBarTitleText": "",//证件上传
"navigationStyle":"custom"
}
}, },
{ {
"path":"contract/index", "path":"contract/index",
......
...@@ -71,12 +71,6 @@ ...@@ -71,12 +71,6 @@
<!-- </TabBarPage> --> <!-- </TabBarPage> -->
</scroll-view> </scroll-view>
</view> </view>
<u-popup border-radius="12" v-model="visible" safe-area-inset-bottom mode="center" width="690rpx" closeable
:mask-close-able="false" close-icon-color="#FFFFFF">
<view class="order-pop-view">
<Customer type="pop" @click="handleDownload"></Customer>
</view>
</u-popup>
</TabBarPage> </TabBarPage>
</template> </template>
...@@ -86,14 +80,12 @@ ...@@ -86,14 +80,12 @@
import NoOrder from "@/components/order/noOrder.vue" import NoOrder from "@/components/order/noOrder.vue"
const app = getApp(); const app = getApp();
import OrderCell from "@/components/order/index.vue"; import OrderCell from "@/components/order/index.vue";
import Customer from "@/components/mine/customer.vue"
export default { export default {
components: { components: {
OrderCell, OrderCell,
TabBarPage, TabBarPage,
NoOrder, NoOrder,
Customer
}, },
data() { data() {
return { return {
...@@ -116,7 +108,6 @@ ...@@ -116,7 +108,6 @@
waitInit: false, // 当token为空时,等待自动登录结束 waitInit: false, // 当token为空时,等待自动登录结束
triggered: false, triggered: false,
_freshing: false, _freshing: false,
visible: false,
scrollTop: 0, scrollTop: 0,
old: { old: {
scrollTop: 0 scrollTop: 0
...@@ -163,10 +154,6 @@ ...@@ -163,10 +154,6 @@
} else { } else {
this.waitInit = true this.waitInit = true
} }
// 第一次入驻成功弹出客服弹窗
if (e && e.visible) {
this.visible = e.visible
}
}, },
onShow() { onShow() {
// 每次进入页面都刷新入驻状态 // 每次进入页面都刷新入驻状态
...@@ -403,9 +390,6 @@ ...@@ -403,9 +390,6 @@
url: "/pages/mine/customer/index" + '?type=exclusive', url: "/pages/mine/customer/index" + '?type=exclusive',
}); });
}, },
handleDownload() {
this.visible = false
}
}, },
}; };
</script> </script>
......
...@@ -9,8 +9,10 @@ ...@@ -9,8 +9,10 @@
title-bold="true" title-bold="true"
></u-navbar> ></u-navbar>
<view class="content-cody"> <view class="content-cody">
<view class="title">{{ info.type }}</view> <view v-for="item,key in info.url" :key="key">
<view class="content" v-for="item in info.url"><image :src="item" mode=""></image></view> <view class="title">{{ info.desc[key] }}</view>
<image class="content" :src="item" mode="aspectFit"></image>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -34,9 +36,8 @@ ...@@ -34,9 +36,8 @@
let urlArr = data.url.split(','); let urlArr = data.url.split(',');
that.info.type = data.type; that.info.type = data.type;
that.info.url = urlArr; that.info.url = urlArr;
console.log(urlArr); that.info.desc = data.desc;
}catch(e){} }catch(e){}
console.log(that.info);
}) })
}, },
} }
...@@ -49,8 +50,6 @@ ...@@ -49,8 +50,6 @@
} }
.content-cody { .content-cody {
padding-left: 30rpx;
padding-right: 30rpx;
background-color: #F4F5F7; background-color: #F4F5F7;
border-radius: 12rpx; border-radius: 12rpx;
} }
...@@ -62,5 +61,6 @@ ...@@ -62,5 +61,6 @@
.content { .content {
padding-top: 30rpx; padding-top: 30rpx;
width:100%;
} }
</style> </style>
...@@ -31,56 +31,65 @@ ...@@ -31,56 +31,65 @@
isUpload: false, isUpload: false,
isUploadName: "未上传", isUploadName: "未上传",
keyName: "id_card", keyName: "id_card",
color: "#999999" color: "#999999",
desc: ['身份证人像面', '身份证国徽面'],
}, },
electrician_certificate: { electrician_certificate: {
name: "电工证", name: "电工证",
isUpload: false, isUpload: false,
isUploadName: "未上传", isUploadName: "未上传",
keyName: "electrician_certificate", keyName: "electrician_certificate",
color: "#999999" color: "#999999",
desc: ['电工证正面'],
}, },
driver_license: { driver_license: {
name: "驾驶证", name: "驾驶证",
isUpload: false, isUpload: false,
isUploadName: "未上传", isUploadName: "未上传",
keyName: "driver_license", keyName: "driver_license",
color: "#999999" color: "#999999",
desc: ['驾驶证正面'],
}, },
driving_license: { driving_license: {
name: "行驶证", name: "行驶证",
isUpload: false, isUpload: false,
isUploadName: "未上传", isUploadName: "未上传",
keyName: "driving_license", keyName: "driving_license",
color: "#999999" color: "#999999",
desc: ['行驶证正面'],
}, },
vehicle: { vehicle: {
name: "车辆照", name: "车辆照",
isUpload: false, isUpload: false,
isUploadName: "未上传", isUploadName: "未上传",
keyName: "vehicle", keyName: "vehicle",
color: "#999999" color: "#999999",
desc: ['车辆正面/看到车牌', '车辆侧面/看到外观'],
}, },
high_sky_license: { high_sky_license: {
name: "高空证", name: "高空证",
isUpload: false, isUpload: false,
isUploadName: "未上传", isUploadName: "未上传",
keyName: "high_sky_license", keyName: "high_sky_license",
color: "#999999" color: "#999999",
desc: ['高空证正面'],
}, },
refrigeration_license: { refrigeration_license: {
name: "制冷证", name: "制冷证",
isUpload: false, isUpload: false,
isUploadName: "未上传", isUploadName: "未上传",
keyName: "refrigeration_license", keyName: "refrigeration_license",
color: "#999999" color: "#999999",
desc: ['制冷证正面'],
}, },
business_license: { business_license: {
name: "营业执照", name: "营业执照",
isUpload: false, isUpload: false,
isUploadName: "未上传", isUploadName: "未上传",
keyName: "business_license", keyName: "business_license",
color: "#999999" color: "#999999",
desc: ['营业执照正面'],
}, },
} }
} }
...@@ -102,10 +111,7 @@ ...@@ -102,10 +111,7 @@
this.list[key].iconColor = getData.status == 1 ? "#2272FF" : "#999999"; this.list[key].iconColor = getData.status == 1 ? "#2272FF" : "#999999";
this.list[key].data = getData; this.list[key].data = getData;
} }
console.log(this.list);
console.log(res);
}).catch((err) => { }).catch((err) => {
console.log(err);
}); });
}, },
methods: { methods: {
...@@ -114,15 +120,19 @@ ...@@ -114,15 +120,19 @@
}, },
toDetail(key) { toDetail(key) {
let data = this.list[key].data; let data = this.list[key].data;
data.desc = this.list[key].desc;
if(data.status != 1){ if(data.status != 1){
return; wx.navigateTo({
url: '/pages/mine/cert/upload?type=' + data.type_key
});
}else{
wx.navigateTo({
url: '/pages/mine/cert/detail',
success: function(res) {
res.eventChannel.emit('acceptDataFromCert', data)
}
});
} }
wx.navigateTo({
url: '/pages/mine/cert/detail',
success: function(res) {
res.eventChannel.emit('acceptDataFromCert', data)
}
});
} }
} }
} }
......
<template>
<view class="cert-page">
<view>
<u-navbar back-icon-color="#000000" :background="background" title-color="#000" :border-bottom="false"
title="证件上传" title-bold="true"></u-navbar>
</view>
<view class="content-body">
<view class="notice-top">
请上传您的:<text class="right">{{ imgList[key].typeName }}</text>
</view>
<view class="notice-two">
请点击上传图片,图片大小不大于3M
</view>
<view class="upload-container">
<view class="img-container" v-for="(item, index) in imgList[key].desc" :key="index">
<image class="upload-img" @click="handleClick(type, index)" :src="imgs[index]" mode="widthFix">
</image>
<text class="img-desc">{{ item }}</text>
</view>
</view>
</view>
<view class="button-container">
<view class="submit-button" :class="{'is-ok': isOk}" @click="submitCert()">提交</view>
</view>
</view>
</template>
<script>
import base from '@/components/upload/index';
export default {
mixins: [base],
data() {
return {
icon: process.uniEnv.qn_base_url + "tishi.png",
categories: [],
param: {
url: []
},
key: null,
type: null,
isOk: false,
imgs: [
process.uniEnv.qn_base_url + "shangchuanzhaopian-big.png",
process.uniEnv.qn_base_url + "shangchuanzhaopian-big.png",
],
imgList: [{
typeKey: 'id_card',
typeName: '身份证',
desc: ['上传身份证人像面', '上传身份证国徽面'],
maxImgs: 2
},
{
typeKey: 'electrician_certificate',
typeName: '电工证',
desc: ['上传电工证照片'],
maxImgs: 1
},
{
typeKey: 'driver_license',
typeName: '驾驶证',
desc: ['上传驾驶证照片'],
maxImgs: 1
},
{
typeKey: 'driving_license',
typeName: '行驶证',
desc: ['上传行驶证照片'],
maxImgs: 1
},
{
typeKey: 'vehicle',
typeName: '车辆照',
desc: ['车辆正面/看到车牌', '车辆侧面/看到外观'],
maxImgs: 2
},
{
typeKey: 'high_sky_license',
typeName: '高空证',
desc: ['上传高空证照片'],
maxImgs: 1
},
{
typeKey: 'refrigeration_license',
typeName: '制冷证',
desc: ['上传制冷证照片'],
maxImgs: 1
},
{
typeKey: 'business_license',
typeName: '营业执照',
desc: ['上传营业执照照片'],
maxImgs: 1
}
],
}
},
onLoad(param) {
this.type = param.type
this.key = this.getListKey(this.type);
},
methods: {
getListKey(typeKey) {
let length = this.imgList.length
for (let i = 0; i < length; i++) {
if (this.imgList[i].typeKey == typeKey) {
return i
}
}
},
async handleClick(certType, key) {
let self = this
self.uploadType = certType || ''
let attr = {
category: self.categories[1]
}
if (certType == 'id_card_front') {
attr = {
category: self.categories[2]
}
}
let src = await self.chooseImg({
count: 1
})
self.imgs[key] = src[0].path;
self.param.url[key] = src[0].key;
if(self.param.url.length == this.imgList[this.key].maxImgs){
this.isOk = true;
}else{
this.isOk = false;
}
},
submitCert() {
if(!this.isOk){
return;
}
this.param.url = this.param.url.toString();
this.param.type = this.type;
this.$u.api.submitCert(this.param)
.then((res) => {
if(res.status != 200){
uni.showToast({
icon: "none",
title: res.message,
});
}
wx.redirectTo({
url: '/pages/mine/cert/index'
});
})
.catch((err) => {
console.log(err);
});
}
}
}
</script>
<style>
page {
background: #F4F5F7;
}
.cert-page {
height: 70vh;
margin: 20rpx 30rpx 0rpx;
}
.content-body {
padding: 40rpx 30rpx 60rpx;
background-color: #FFF;
border-radius: 12rpx;
}
.notice-top {
height: 32rpx;
font-size: 32rpx;
font-family: PingFang-SC-Bold, PingFang-SC;
font-weight: bold;
color: #333333;
line-height: 32rpx;
}
.right {
color: #2272FF;
}
.notice-two {
height: 28rpx;
font-size: 24rpx;
font-family: PingFang-SC-Regular, PingFang-SC;
font-weight: 400;
color: #666666;
line-height: 28rpx;
margin-top: 18rpx;
}
.notice-bottom {
height: 20rpx;
font-size: 20rpx;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #999999;
line-height: 20rpx;
margin-top: 30rpx;
display: flex;
}
.submit-button {
width: 400rpx;
height: 104rpx;
background: #D1D4D4;
border-radius: 52rpx;
margin-top: 224rpx;
text-align: center;
line-height: 104rpx;
display: inline-block;
color: #FFFFFF;
font-weight: bold;
font-size: 32rpx;
}
.is-ok {
background: #2272FF;
}
.button-container {
text-align: center;
padding-bottom: 30rpx;
}
.upload-img {
margin-top: 30rpx;
width: 100%;
}
.two {
margin-left: 30rpx;
}
.icon {
width: 24rpx;
height: 24rpx;
}
.img-container {
position: relative;
}
.img-desc {
position: absolute;
bottom: 10rpx;
left: 0;
font-size: 20rpx;
color: #c5bfbf;
font-weight: 400;
line-height: 28px;
text-align: center;
width: 100%;
}
</style>
...@@ -7,17 +7,23 @@ ...@@ -7,17 +7,23 @@
:border-bottom="false" :border-bottom="false"
></u-navbar> ></u-navbar>
<view class="content"> <view class="content">
<text class="title">合同清单</text> <view v-if="res.length > 0">
<view <text class="title">合同清单</text>
class="jf-currency-class" <view
v-for="item in res" class="jf-currency-class"
:key="item.id" v-for="item in res"
@click="goBaidu(item.url)" :key="item.id"
> @click="goBaidu(item.url)"
<view class="left">{{ item.name }}</view> >
<view class="text1">《{{ item.name }}》</view> <view class="left">{{ item.name }}</view>
<view class="text2">下载时间: {{ item.create_at }}</view> <view class="text1">《{{ item.name }}》</view>
</view> <view class="text2">下载时间: {{ item.create_at }}</view>
</view>
</view>
<view v-else class="no-contract">
<image :src="zanwuhetonImage" class="no-contract-image"></image>
<text>当前暂无合同</text>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -37,7 +43,11 @@ export default { ...@@ -37,7 +43,11 @@ export default {
getApp().trackPage('我的合同列表页') getApp().trackPage('我的合同列表页')
this.getContract(this.type); this.getContract(this.type);
}, },
computed: {}, computed: {
zanwuhetonImage() {
return process.uniEnv.qn_base_url + 'zanwuheton.png'
},
},
methods: { methods: {
getContract(params) { getContract(params) {
this.$u.api.Mycontract(params).then((res) => { this.$u.api.Mycontract(params).then((res) => {
...@@ -141,4 +151,20 @@ export default { ...@@ -141,4 +151,20 @@ export default {
height: 100%; height: 100%;
position: absolute; position: absolute;
} }
.no-contract {
color: #999999;
text-align: center;
margin-top: 240rpx;
font-weight: 20rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.no-contract-image {
width: 374rpx;
height: 254rpx;
margin-bottom: 50rpx;
}
}
</style> </style>
\ No newline at end of file
...@@ -167,7 +167,10 @@ ...@@ -167,7 +167,10 @@
async loadStatement() { async loadStatement() {
let self = this let self = this
self.loading = true self.loading = true
let res = await self.$u.api.listStatement() let res = await self.$u.api.listStatement({
starDate: this.moment(new Date()).startOf('month').format('YYYY-MM-DD'),
endDate:this.moment(new Date()).endOf('month').format('YYYY-MM-DD')
})
self.loading = false self.loading = false
if(res && res.code == 200) { if(res && res.code == 200) {
let data = res.data && res.data.orderList || [] let data = res.data && res.data.orderList || []
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<view> <view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
<view v-if="showCenterBtn" @click="$u.throttle(handleBtn, 500)" class="button" :class="['center-button-view', btnClass]"> <view v-if="showCenterBtn" @click="$u.throttle(handleClickSure, 500)" class="button" :class="['center-button-view', btnClass]">
<text>{{ centerButtonText }}</text> <text>{{ centerButtonText }}</text>
<view v-if="order.currentOverTime && showTimeOut" class="time-view"> <view v-if="order.currentOverTime && showTimeOut" class="time-view">
<text style="padding-right: 8rpx;">{{order.currentOverTime > new Date().getTime()?'剩':'超'}}</text> <text style="padding-right: 8rpx;">{{order.currentOverTime > new Date().getTime()?'剩':'超'}}</text>
...@@ -181,7 +181,13 @@ ...@@ -181,7 +181,13 @@
</view> </view>
</view> </view>
<take-photo type="test" v-if="takeStatus" @close="closeTake" :upload="false" :num="1"></take-photo> <take-photo type="test" v-if="takeStatus" @close="closeTake" :upload="false" :num="1"></take-photo>
<PopView title="查看交互规范" message="为完善交付质量,请查看对应的交付规范" :visible.sync="visibale" @click="handleClick"/> <!-- <PopView title="查看交互规范" message="为完善交付质量,请查看对应的交付规范" :visible.sync="visible" @click="handleClick"/> -->
<u-popup border-radius="12" v-model="visible" safe-area-inset-bottom mode="center" width="690rpx"
:mask-close-able="false" close-icon-color="#FFFFFF">
<view class="order-pop-view">
<Customer type="pop" @click="handleDownload"></Customer>
</view>
</u-popup>
</template> </template>
</view> </view>
</template> </template>
...@@ -189,14 +195,17 @@ ...@@ -189,14 +195,17 @@
<script> <script>
import appointTime from '@/components/appoint/appoint-time.vue' import appointTime from '@/components/appoint/appoint-time.vue'
import takePhoto from '@/components/take/index.vue' import takePhoto from '@/components/take/index.vue'
import PopView from "@/components/popView/index.vue" // import PopView from "@/components/popView/index.vue"
import baseFile from '@/components/upload/index' import baseFile from '@/components/upload/index'
import Customer from "@/components/mine/customer.vue"
let now = new Date(new Date().toLocaleDateString()).getTime(); let now = new Date(new Date().toLocaleDateString()).getTime();
export default { export default {
components: { components: {
appointTime, appointTime,
'take-photo': takePhoto, 'take-photo': takePhoto,
PopView // PopView,
Customer
}, },
mixins: [baseFile], mixins: [baseFile],
data() { data() {
...@@ -232,7 +241,7 @@ ...@@ -232,7 +241,7 @@
// backgroundSize: 'cover', // backgroundSize: 'cover',
// 渐变色 // 渐变色
}, },
visibale: false, visible: false,
orderId: null, orderId: null,
order: {}, order: {},
allowRejection: false, // 允许拒单 allowRejection: false, // 允许拒单
...@@ -439,9 +448,9 @@ ...@@ -439,9 +448,9 @@
if(this.showTimeOut && this.order.currentOverTime && nowTime.getTime() > this.order.currentOverTime){ if(this.showTimeOut && this.order.currentOverTime && nowTime.getTime() > this.order.currentOverTime){
this.btnClass='timeOut-btn' this.btnClass='timeOut-btn'
} }
if(self.order.isFirstOrder){ // if(self.order.isFirstOrder){
this.visibale = true // this.visible = true
} // }
// 格式化时间 // 格式化时间
this.settlementInfo.formatTime = this.order.settleCenterSyncDatetime ? this.$u.timeFormat(this.order.settleCenterSyncDatetime, 'yyyy.mm.dd hh:MM:ss') : '-' this.settlementInfo.formatTime = this.order.settleCenterSyncDatetime ? this.$u.timeFormat(this.order.settleCenterSyncDatetime, 'yyyy.mm.dd hh:MM:ss') : '-'
} else { } else {
...@@ -631,6 +640,21 @@ ...@@ -631,6 +640,21 @@
this.isAllowDianhuaAndDaohang = true this.isAllowDianhuaAndDaohang = true
} }
}, },
handleClickSure() {
if (this.submitType == 'orderAccept' || this.submitType == 'orderGan') {
this.$u.api.checkAddCustomer().then((res) => {
if (res.code == 200) {
if(res.data.data === true){
this.handleBtn()
} else {
this.visible = true
}
} else {}
})
} else {
this.handleBtn()
}
},
handleBtn() { handleBtn() {
console.log('click button') console.log('click button')
if(!this.submitType){ if(!this.submitType){
...@@ -845,12 +869,16 @@ ...@@ -845,12 +869,16 @@
this.$refs['uCountDown'].seconds += 2 this.$refs['uCountDown'].seconds += 2
} }
}, },
handleClick(){ // handleClick(){
this.visibale = false // this.visible = false
// 交互规范 // // 交互规范
uni.switchTab({ // uni.switchTab({
url: 'pages/index/learn' // url: 'pages/index/learn'
}) // })
// },
handleDownload() {
this.visible = false
// 添加客服
}, },
threeDays() { threeDays() {
return this.timestampDiff(this.order.currentOverTime) > 3600 * 24 * 3 return this.timestampDiff(this.order.currentOverTime) > 3600 * 24 * 3
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
statusName: '已支付保证金', statusName: '已支付保证金',
txtArr: ['您已成功缴纳配件押金', " 成功缴纳配件押金后即前往接单"], txtArr: ['您已成功缴纳配件押金', " 成功缴纳配件押金后即前往接单"],
btnTxt: '去首页', btnTxt: '去首页',
url: '/pages/index/index?visible=1' url: '/pages/index/index'
}], }],
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交' // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status: '', status: '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment