Commit c8ecc865 authored by 李超鹏's avatar 李超鹏

update:update

scope:self-support
body:修改拍照页面问题、完工问题
parent 9cb25c04
const globalUrl = process.uniEnv || {}
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
let certApiFun = function(vm){
let getCertList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-cert-list', params);
const certApi = {
getCertList
}
return certApi
}
module.exports = {
certApiFun
}
\ No newline at end of file
...@@ -64,6 +64,10 @@ let orderApiFun = function(vm){ ...@@ -64,6 +64,10 @@ let orderApiFun = function(vm){
* 获取拍照标准 * 获取拍照标准
*/ */
let orderStandard = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token+'/photo/standard', params); let orderStandard = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token+'/photo/standard', params);
/**
* 获取拍照标准单独项目
*/
let orderStandardItem = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token+'/photo/standard/only', params);
/** /**
* 保存图片信息 * 保存图片信息
...@@ -147,6 +151,7 @@ let orderApiFun = function(vm){ ...@@ -147,6 +151,7 @@ let orderApiFun = function(vm){
traceAndAppointment, traceAndAppointment,
rejectOrder, rejectOrder,
orderStandard, orderStandard,
orderStandardItem,
saveImage, saveImage,
getWatermark, getWatermark,
saveWatermark, saveWatermark,
......
<!-- ******************* 文件上传 ******************* --> <!-- ******************* 文件上传 ******************* -->
<template> <template>
<view> <view>
<view class="file-box" v-if="!takeStatus"> <view class="file-box" v-if="!takeStatus">
<!-- <view class="u-flex"> <!-- <view class="u-flex">
<view class="txt u-flex-1">{{item.fieldsTitle}}</view> <view class="txt u-flex-1">{{item.fieldsTitle}}</view>
<u-icon name="arrow-right" color="#666" size="28"></u-icon> <u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view> --> </view> -->
<view class="pics u-flex u-flex-wrap"> <view class="pics u-flex u-flex-wrap">
<view class="img-list" v-for="(item,index) in imgList" :key="index"> <view class="img-list" v-for="(item,index) in imgList" :key="index">
<u-image class="pic" width="160" height="160" :src="item.path" :border-radius="10" @click.stop="prviewImage(item.path,index)"></u-image> <u-image class="pic" width="160" height="160" :src="item.path" :border-radius="10" @click.stop="prviewImage(item.path,index)"></u-image>
<view class="icon-del-box" @click.stop="delFile(index)"> <view class="icon-del-box" @click.stop="delFile(index)">
<view class="icon-del"></view> <view class="icon-del"></view>
<view class="icon-del rotate"></view> <view class="icon-del rotate"></view>
</view> </view>
</view> </view>
<view class="img-list"> <view class="img-list">
<u-image class="pic" width="160rpx" height="160rpx" :border-radius="10" @click="selectUpload" :src="uploadImage"></u-image> <u-image class="pic" width="160rpx" height="160rpx" :border-radius="10" @click="selectUpload" :src="uploadImage"></u-image>
</view> </view>
<!-- <u-image class="pic" v-for="item in 6" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image> --> <!-- <u-image class="pic" v-for="item in 6" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image> -->
</view> </view>
<u-action-sheet :list="list" v-model="maskShow" :cancel-btn="true" @click="uploadSelect"></u-action-sheet> <u-action-sheet :list="list" v-model="maskShow" :cancel-btn="true" @click="uploadSelect"></u-action-sheet>
</view> </view>
<take-photo v-else @close="closeTake"></take-photo> <take-photo v-else @close="closeTake" :currentItem="currentItemDate"></take-photo>
</view> </view>
</template> </template>
<script> <script>
import arrMixin from './arrMixin' import arrMixin from './arrMixin'
import baseFile from '@/components/upload/index'; import baseFile from '@/components/upload/index';
import takePhoto from '@/components/take/index.vue' import takePhoto from '@/components/take/index.vue'
export default { export default {
name: 'XhFiles', name: 'XhFiles',
components: { components: {
'take-photo': takePhoto 'take-photo': takePhoto
}, },
mixins: [arrMixin,baseFile], mixins: [arrMixin,baseFile],
props: { props: {
files: { files: {
type: Array, type: Array,
} },
partnerCompanyId: {
type: String,
default: '{}'
},
}, },
filters:{}, filters:{},
data() { data() {
return { return {
maskShow:false, maskShow:false,
list: [ list: [
{ {
...@@ -53,14 +57,15 @@ ...@@ -53,14 +57,15 @@
} }
], ],
takeStatus: false, takeStatus: false,
currentItemDate:{},
} }
}, },
computed: { computed: {
settings() { settings() {
return this.item.settings || [] return this.item.settings || []
}, },
uploadImage() { uploadImage() {
return process.uniEnv.qn_base_url + 'upload-file.png' return process.uniEnv.qn_base_url + 'upload-file.png'
}, },
}, },
mounted() { mounted() {
...@@ -72,12 +77,12 @@ ...@@ -72,12 +77,12 @@
} }
}, },
methods: { methods: {
selectUpload(){ selectUpload(){
if (this.imgList.length === 10) { if (this.imgList.length === 10) {
return this.$refs.uToast.show({ return this.$refs.uToast.show({
title: '图片已超出最大数量', title: '图片已超出最大数量',
type: 'error', type: 'error',
}) })
} }
// 弹窗展示 // 弹窗展示
this.maskShow = true this.maskShow = true
...@@ -106,23 +111,25 @@ ...@@ -106,23 +111,25 @@
} }
// 使用拍照工具拍摄 // 使用拍照工具拍摄
this.takeStatus = true this.takeStatus = true
this.getWatermark()
this.getPhotoStander()
}, },
setValue() { setValue() {
const dataValue = [] const dataValue = []
this.imgList.map(item=>{ this.imgList.map(item=>{
dataValue.push(item.path) dataValue.push(item.path)
}) })
this.valueChange(dataValue) this.valueChange(dataValue)
}, },
closeTake(val) { closeTake(val) {
if(val && val.length > 0){ if(val && val.length > 0){
val.forEach((item,index,array)=>{ val.forEach((item,index,array)=>{
item.path = item.key item.path = item.key
this.imgList.push(item) this.imgList.push(item)
}) })
this.setValue() this.setValue()
} }
this.takeStatus = false this.takeStatus = false
}, },
prviewImage(url, index) { prviewImage(url, index) {
uni.previewImage({ uni.previewImage({
...@@ -133,27 +140,71 @@ ...@@ -133,27 +140,71 @@
delFile(index) { delFile(index) {
this.imgList.splice(index, 1) this.imgList.splice(index, 1)
this.setValue() this.setValue()
},
getPhotoStander(){// 获取拍照规范接口
let self = this
// this.$u.api.orderStandardItem({}).then((res)=>{
// if (res.code == 200 && res.data.length>0) {
// self.currentItemDate = res.data[0]
// }else{
// console.log("获取完工项的拍照标准异常",res.data.message)
// }
// })
self.currentItemDate = {
"id": 154,
"partnerCompanyId": 10331001475,
"categoryId": 1100000216,
"brandId": null,
"type": "勘测部分",
"name": "勘测单",
"fieldName": "06",
"images": [
"https://cloud-bak.banshouhui.com/2-勘测单.jpg"
],
"mainPoint": [
"表格清晰,文字可辨",
"表格居中,不倾斜",
"全部填写完整,不能填写的部分划横杠。",
"涉及到用户签字部分,不允许我方人员代签,由用户或用户指定人进行签字确认。",
"涉及到物业的由现场物业人员签字确认。"
],
"note": "正面拍摄,完整看到单据 4 条边",
"orderImages": null
}
},
getWatermark(){
if(getApp().globalData.photo.waterSetting){
return
}
var data={partnerCompanyId:this.partnerCompanyId}
this.$u.api.getWatermark(data).then((res) => {
if (res.code == 200) {
getApp().globalData.photo.waterSetting = res.data
} else {
console.log("获取水印备注异常",res.data.message)
}
});
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.img-list { .img-list {
position: relative; position: relative;
margin: 8rpx; margin: 8rpx;
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
.pic{ .pic{
// margin-right: 15rpx; // margin-right: 15rpx;
// margin-bottom: 15rpx; // margin-bottom: 15rpx;
&:nth-child(3n){ &:nth-child(3n){
margin-right: 0; margin-right: 0;
} }
} }
.icon-del-box { .icon-del-box {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
...@@ -170,14 +221,14 @@ ...@@ -170,14 +221,14 @@
z-index: 2; z-index: 2;
transform: rotate(-45deg); transform: rotate(-45deg);
} }
.icon-del { .icon-del {
width: 30rpx; width: 30rpx;
height: 4rpx; height: 4rpx;
background-color: #fff; background-color: #fff;
border-radius: 2px; border-radius: 2px;
} }
.rotate { .rotate {
position: absolute; position: absolute;
transform: rotate(90deg); transform: rotate(90deg);
......
This diff is collapsed.
This diff is collapsed.
...@@ -328,14 +328,14 @@ ...@@ -328,14 +328,14 @@
console.log('click cell') console.log('click cell')
this.viewOderItem(item.orderId) this.viewOderItem(item.orderId)
}, },
filish(item){ filish(item){
// 去完工 // 去完工
uni.navigateTo({ uni.navigateTo({
url: 'pages/order/complete?orderId='+item.orderId url: 'pages/order/complete?orderId='+item.orderId
+ "&categoryId=" + item.categoryId + "&categoryId=" + item.categoryId
+ "&orderServiceType=" + item.orderServiceType + "&orderServiceType=" + item.orderServiceType
+ "&inGuaranteePeriod=" + item.inGuaranteePeriod + "&inGuaranteePeriod=" + item.inGuaranteePeriod
+ "&auditResultsId=" + Object.keys(item.auditResults)[0] + "&auditResultsId=" + (item.auditResults?Object.keys(item.auditResults)[0]:'')
}) })
}, },
handleAction(item) { handleAction(item) {
......
<template>
<view class="cert-page">
<u-navbar
back-icon-color="#000000"
:background="background"
title-color="#000"
:border-bottom="false"
title="我的证件"
title-bold="true"
></u-navbar>
<view class="content-cody">
<view class="title">{{ info.type }}</view>
<view class="content" v-for="item in info.url"><image :src="item" mode=""></image></view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
info: {
type: "",
url: null
}
}
},
onLoad() {
var that = this;
const eventChannel = this.getOpenerEventChannel()
eventChannel.on('acceptDataFromCert', function(data) {
try{
let urlArr = data.url.split(',');
that.info.type = data.type;
that.info.url = urlArr;
console.log(urlArr);
}catch(e){}
console.log(that.info);
})
},
}
</script>
<style>
.cert-page {
font-size: 28rpx;
margin: 30rpx;
}
.content-cody {
padding-left: 30rpx;
padding-right: 30rpx;
background-color: #F4F5F7;
border-radius: 12rpx;
}
.title {
font-size: 32rpx;
font-weight: bold;
}
.content {
padding-top: 30rpx;
}
</style>
<template>
<view class="cert-page">
<u-navbar
class="navbarHeigth"
back-icon-color="#000000"
:background="background"
title-color="#000"
:border-bottom="false"
title="我的证件"
title-bold="true"
></u-navbar>
<view class="content-cody">
<u-cell-group :border="false">
<u-cell-item v-for="item in list" :title="item.name" :value="item.isUploadName" :arrow="true"
:value-style="{'color': item.color}" @click="toDetail(item.keyName)" :title-style="{'padding-left':'20rpx'}">
<u-icon slot="icon" size="32" name="checkmark-circle" :color="item.iconColor"></u-icon>
</u-cell-item>
</u-cell-group>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: {
id_card: {
name: "身份证",
isUpload: false,
isUploadName: "",
keyName: "id_card",
color: "#999999"
},
electrician_certificate: {
name: "电工证",
isUpload: false,
isUploadName: "",
keyName: "electrician_certificate",
color: "#999999"
},
driver_license: {
name: "驾驶证",
isUpload: false,
isUploadName: "",
keyName: "driver_license",
color: "#999999"
},
driving_license: {
name: "行驶证",
isUpload: false,
isUploadName: "",
keyName: "driving_license",
color: "#999999"
},
vehicle: {
name: "车辆照",
isUpload: false,
isUploadName: "",
keyName: "vehicle",
color: "#999999"
},
high_sky_license: {
name: "高空证",
isUpload: false,
isUploadName: "",
keyName: "high_sky_license",
color: "#999999"
},
refrigeration_license: {
name: "制冷证",
isUpload: false,
isUploadName: "",
keyName: "refrigeration_license",
color: "#999999"
},
business_license: {
name: "营业执照",
isUpload: false,
isUploadName: "",
keyName: "business_license",
color: "#999999"
},
}
}
},
onLoad() {
let that = this;
this.$u.api
.getCertList()
.then((res) => {
if(res.code != 200){
return
}
for(let key in this.list){
let getData = res.data[key];
this.list[key].isUpload = getData.status;
this.list[key].isUploadName = getData.status == 1 ? '已上传' : '未上传';
this.list[key].color = getData.status == 1 ? "#999999" : "#2272FF";
this.list[key].iconColor = getData.status == 1 ? "#2272FF" : "#999999";
this.list[key].data = getData;
}
console.log(this.list);
console.log(res);
}).catch((err) => {
console.log(err);
});
},
methods: {
isUpload(typeBool) {
return typeBool ? '已上传' : '未上传'
},
toDetail(key) {
let data = this.list[key].data;
if(data.status != 1){
return;
}
wx.navigateTo({
url: '/pages/mine/cert/detail',
success: function(res) {
res.eventChannel.emit('acceptDataFromCert', data)
}
});
}
}
}
</script>
<style>
.cert-page {
font-size: 28rpx;
margin: 30rpx;
height: 100vh;
display: flex;
flex-direction: column;
}
.content-cody {
padding: 30rpx;
background-color: #ffffff;
border-radius: 12rpx;
height: 82vh;
}
.rightBlue {
color: #007AFF;
}
</style>
<template>
<view class="cus-wrap">
<w-navbar title="联系客服"></w-navbar>
<view class="content">
<u-image class="qrcode" :src="cusQrcode" width="400" mode="widthFix" @longtap="download">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
<text class="desc">长按二维码保存图片添加官方客服微信</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
computed: {
cusQrcode() {
return process.uniEnv.qn_base_url + 'erweima-bg.png'
},
},
methods: {
download() {
let that = this;
uni.downloadFile({ //获得二维码的临时地址
url: that.erweimaImage,
success:(res)=>{
if(res.statusCode == 200){
uni.saveImageToPhotosAlbum({
filePath:res.tempFilePath,//传入临时地址
success() {
that.$u.toast('保存成功!');
},
fail() {
that.$u.toast('保存失败!');
}
})
}
}
})
}
}
}
</script>
<style lang="scss">
.cus-wrap {
background-color: #F4F5F7;
padding: 30rpx;
.content {
width: 690rpx;
height: 800rpx;
background: #FFFFFF;
border-radius: 12rpx;
display: flex;
flex-direction: column;
align-items: center;
.qrcode {
margin-top: 160rpx;
}
.desc {
margin-top: 40rpx;
font-size: 24rpx;
font-weight: 400;
color: #666666;
line-height: 24rpx;
}
}
}
</style>
<template>
<view class="wallet-view">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="我的钱包" titleColor="#333333" :border-bottom="false"></u-navbar>
<image class="header-image" mode="widthFix" :src="qianbaobeijing"></image>
<view class="survey-view">
<view class="survey-top-view">
<view class="survey-top-left">
<view>账户总资产(元)</view>
<view>{{info.totalPayAmount}}</view>
</view>
<view class="survey-top-right">
<u-button>提现</u-button>
</view>
</view>
<view class="survey-bottom-view">
<view v-for="(value, key) in items" :key="key">
<view>{{value}}</view>
<view>{{info[key]}}</view>
</view>
</view>
</view>
<view class="content-view">
<view v-for="(item, index) in lists" :class="['content-list', {'first': index==0}]" :key="index">
<view class="content-list-left">
<image class="content-list-image" :src="item.icon"></image>
<view class="content-list-text">
<view class="content-list-text-title">{{item.title}}</view>
<view>{{item.content}}</view>
</view>
</view>
<view class="content-list-right">
<text class="content-list-right-text">点击查看</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
</view>
<view class="list-view">
</view>
</view>
</template>
<script>
export default {
data() {
return {
info: {
canApplyAmount: 0, // 可提现金额
saveApplyCount: 0, // 已申请提现的支付单数
canApplyCount: 0, // 可申请提现的支付单数
saveAndApplyAmount: 0, // 已申请提现金额
totalPayAmount: 0, // 总共收入
/* 还没对字段名 */
dairuzhang: 0, // 预计待入账
}
}
},
computed: {
lists() {
return [{
title: '结算账单',
content: '展示您已提现的账单信息',
icon: this.imageUrl + 'jiesuan.png'
},{
title: '收入流水',
content: '当前展示最近5条,点击查看全部',
icon: this.imageUrl + 'liushui.png'
}]
},
items() {
return {canApplyAmount:'可提现(元)', dairuzhang:'预计待入账(元)'}
},
imageUrl() {
return process.uniEnv.qn_base_url
},
qianbaobeijing() {
return this.imageUrl + 'qianbaobeijing.png'
},
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.wallet-view {
position: relative;
height: 100vh;
overflow: auto;
background-color: #F4F5F7;
.header-image {
position: absolute;
width: 100%;
margin-left: 4rpx;
margin-top: 10rpx;
}
.survey-view {
position: relative;
height: 400rpx;
margin: 30rpx 30rpx 10rpx 30rpx;
color: #FFFFFF;
padding: 30rpx;
.survey-top-view {
display: flex;
justify-content: space-between;
align-items: flex-end;
.survey-top-left {
}
.survey-top-right {
}
}
.survey-bottom-view {
display: flex;
justify-content: space-between;
}
}
.content-view {
position: relative;
padding: 0 30rpx;
.content-list {
height: 140rpx;
border-radius: 12rpx;
display: flex;
justify-content: space-between;
padding: 30rpx;
background-color: #FFFFFF;
&.first {
margin-bottom: 20rpx;
}
.content-list-left {
display: flex;
.content-list-image {
width: 56rpx;
height: 56rpx;
margin-top: 2rpx;
}
.content-list-text {
font-size: 24rpx;
color: #666666;
margin-left: 20rpx;
.content-list-text-title {
font-size: 32rpx;
color: #333333;
}
}
}
.content-list-right {
color: #2272FF;
font-size: 26rpx;
.content-list-right-text {
margin-right: 4rpx;
}
}
}
}
.list-view {
position: relative;
}
}
</style>
This diff is collapsed.
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<view v-if="readMore" @click="readMore = false" class="read-more-toggle"> <view v-if="readMore" @click="readMore = false" class="read-more-toggle">
<u-icon name="arrow-down"></u-icon> <u-icon name="arrow-down"></u-icon>
<text class="read-more-text">查看更多</text> <text class="read-more-text">查看更多</text>
</view> </view>
<view v-else class="order-item-more"> <view v-else class="order-item-more">
<view class="line-view"></view> <view class="line-view"></view>
<view class="order-cell between-cell"> <view class="order-cell between-cell">
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<text class="cell-title">充电桩信息:</text> <text class="cell-title">充电桩信息:</text>
<text>{{ order.serviceContent }}</text> <text>{{ order.serviceContent }}</text>
</view> </view>
<!-- <view class="order-cell between-cell"> <!-- <view class="order-cell between-cell">
<!-- <view class="order-cell between-cell"> <!-- <view class="order-cell between-cell">
<text>备注:</text> <text>备注:</text>
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<view v-if="readMoreRecord" @click="readMoreRecord = false" class="read-more-toggle"> <view v-if="readMoreRecord" @click="readMoreRecord = false" class="read-more-toggle">
<u-icon name="arrow-down"></u-icon> <u-icon name="arrow-down"></u-icon>
<text class="read-more-text">查看更多</text> <text class="read-more-text">查看更多</text>
</view> </view>
<view v-else class="read-more-toggle"> <view v-else class="read-more-toggle">
<u-icon name="arrow-up"></u-icon> <u-icon name="arrow-up"></u-icon>
<text class="read-more-text" @click="readMoreRecord = true">点击收起</text> <text class="read-more-text" @click="readMoreRecord = true">点击收起</text>
...@@ -129,14 +129,14 @@ ...@@ -129,14 +129,14 @@
<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>
<u-count-down <u-count-down
:timestamp="timestampDiff(order.currentOverTime)" :timestamp="timestampDiff(order.currentOverTime)"
font-size="20" font-size="20"
color="#FFFFFF" color="#FFFFFF"
bg-color="transparent" bg-color="transparent"
separator-color="#FFFFFF" separator-color="#FFFFFF"
separator-size="20" separator-size="20"
:ref="'uCountDown'" :ref="'uCountDown'"
show-days show-days
height="20" height="20"
:show-days="threeDays()" :show-days="threeDays()"
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
<view class="right"> <view class="right">
<view v-if="errorSignIn || scenePhoto" @click="$u.debounce(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]"> <view v-if="errorSignIn || scenePhoto" @click="$u.debounce(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]">
<text>{{errorSignIn ? '异常' : '拍照'}}</text> <text>{{errorSignIn ? '异常' : '拍照'}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -240,14 +240,14 @@ ...@@ -240,14 +240,14 @@
console.log("option", option) console.log("option", option)
if (option && option.id) { if (option && option.id) {
this.orderId = option.id this.orderId = option.id
} }
this.loadOrderDetail() this.loadOrderDetail()
this.loadOrderRecord() this.loadOrderRecord()
this.getLocation() this.getLocation()
this.getSignDistance() this.getSignDistance()
}, },
computed: { computed: {
phoneIcon() { phoneIcon() {
//self-support/icon/dianhua-0@2x.png //self-support/icon/dianhua-0@2x.png
if(this.isAllowDianhuaAndDaohang){ if(this.isAllowDianhuaAndDaohang){
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
success: function () { success: function () {
console.log('success'); console.log('success');
} }
}); });
}, },
complete: function(res) { complete: function(res) {
...@@ -320,7 +320,7 @@ ...@@ -320,7 +320,7 @@
} }
}); });
} }
} }
}) })
} else { } else {
...@@ -345,7 +345,7 @@ ...@@ -345,7 +345,7 @@
this.contactTime() this.contactTime()
} }
}, },
contactTime() { contactTime() {
let self = this let self = this
var data={} var data={}
if(this.submitType === "workerAppointment"){ if(this.submitType === "workerAppointment"){
...@@ -414,7 +414,7 @@ ...@@ -414,7 +414,7 @@
self.$u.api.getSignDistance(data).then((res) => { self.$u.api.getSignDistance(data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
self.signDistance = res.data self.signDistance = res.data
} }
}); });
}, },
loadOrderRecord() { loadOrderRecord() {
...@@ -599,7 +599,7 @@ ...@@ -599,7 +599,7 @@
} }
this.$u.api[this.submitType](data, this.order.orderId).then(res => { this.$u.api[this.submitType](data, this.order.orderId).then(res => {
let self = this let self = this
if ((res.data.code!==undefined && res.data.code === 200) if ((res.data.code!==undefined && res.data.code === 200)
|| (res.code!==undefined && res.code === 200) ) { || (res.code!==undefined && res.code === 200) ) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: this.centerButtonText + '操作成功', title: this.centerButtonText + '操作成功',
...@@ -647,10 +647,11 @@ ...@@ -647,10 +647,11 @@
filish(){ filish(){
// 去完工 // 去完工
uni.navigateTo({ uni.navigateTo({
url: 'pages/order/complete?orderId='+this.order.orderId url: 'pages/order/complete?orderId='+this.order.orderId
+ "&categoryId=" + this.order.categoryId + "&categoryId=" + this.order.categoryId
+ "&orderServiceType=" + this.order.orderServiceType + "&orderServiceType=" + this.order.orderServiceType
+ "&inGuaranteePeriod=" + this.order.inGuaranteePeriod + "&inGuaranteePeriod=" + this.order.inGuaranteePeriod
+ "&partnerCompanyId=" + this.order.partnerCompanyId
}) })
}, },
rejectOrder() { // 拒单 rejectOrder() { // 拒单
...@@ -682,23 +683,23 @@ ...@@ -682,23 +683,23 @@
self.dataValue = dataValue self.dataValue = dataValue
}, },
fail(err) { fail(err) {
} }
}); });
}, },
getDistance(Latitud, Longitud){ getDistance(Latitud, Longitud){
return this.distance(Latitud,Longitud,this.dataValue[1],this.dataValue[0]) return this.distance(Latitud,Longitud,this.dataValue[1],this.dataValue[0])
}, },
/** /**
* echo distance(116.3896,39.91917,116.3940,39.91726); * echo distance(116.3896,39.91917,116.3940,39.91726);
* 计算两点之间直线距离 * 计算两点之间直线距离
* @param float $lon1 经度 * @param float $lon1 经度
* @param float $lat1 维度 * @param float $lat1 维度
* @param float $lon2 经度 * @param float $lon2 经度
* @param float $lat2 维度 * @param float $lat2 维度
* @return float 浮点数 * @return float 浮点数
*/ */
distance(lat1, lng1, lat2, lng2) { distance(lat1, lng1, lat2, lng2) {
console.log(lat1, lng1, lat2, lng2) console.log(lat1, lng1, lat2, lng2)
var radLat1 = this.Rad(lat1); var radLat1 = this.Rad(lat1);
var radLat2 = this.Rad(lat2); var radLat2 = this.Rad(lat2);
...@@ -708,7 +709,7 @@ ...@@ -708,7 +709,7 @@
Math.cos(radLat1)*Math.cos(radLat2)*Math.pow(Math.sin(b/2),2))); Math.cos(radLat1)*Math.cos(radLat2)*Math.pow(Math.sin(b/2),2)));
s = s *6378.137 ;// EARTH_RADIUS; s = s *6378.137 ;// EARTH_RADIUS;
s = Math.round(s * 10000)/10 ; //输出为米 s = Math.round(s * 10000)/10 ; //输出为米
console.log("计算结果",s,'M'); console.log("计算结果",s,'M');
return Number(s?s.toFixed(2):0); return Number(s?s.toFixed(2):0);
}, },
Rad(d){ Rad(d){
...@@ -736,7 +737,7 @@ ...@@ -736,7 +737,7 @@
}) })
}, },
threeDays() { threeDays() {
return this.timestampDiff(this.order.currentOverTime) > 3600 * 24 * 3 return this.timestampDiff(this.order.currentOverTime) > 3600 * 24 * 3
} }
} }
}; };
...@@ -814,7 +815,7 @@ ...@@ -814,7 +815,7 @@
color: #FFFFFF; color: #FFFFFF;
line-height: 40rpx; line-height: 40rpx;
background-image: linear-gradient(to right, #FF930D, #FFC174); background-image: linear-gradient(to right, #FF930D, #FFC174);
&.active { &.active {
background-image: linear-gradient(to right, #2272FF, #47ABFF); background-image: linear-gradient(to right, #2272FF, #47ABFF);
} }
...@@ -861,7 +862,7 @@ ...@@ -861,7 +862,7 @@
} }
} }
} }
.read-more-toggle { .read-more-toggle {
text-align: center; text-align: center;
color: #2272FF; color: #2272FF;
...@@ -869,11 +870,11 @@ ...@@ -869,11 +870,11 @@
margin-top: 30rpx; margin-top: 30rpx;
padding-bottom: 30rpx; padding-bottom: 30rpx;
} }
.read-more-text { .read-more-text {
padding-left: 8rpx; padding-left: 8rpx;
} }
.order-item-more { .order-item-more {
font-size: 26rpx; font-size: 26rpx;
color: #333333; color: #333333;
...@@ -883,9 +884,9 @@ ...@@ -883,9 +884,9 @@
height: 2rpx; height: 2rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
} }
.order-item { .order-item {
padding-bottom: 6rpx; padding-bottom: 6rpx;
...@@ -902,15 +903,15 @@ ...@@ -902,15 +903,15 @@
color: #333333; color: #333333;
line-height: 36rpx; line-height: 36rpx;
} }
} }
.no-record-view { .no-record-view {
font-size: 26rpx; font-size: 26rpx;
color: #333333; color: #333333;
margin-top: 30rpx; margin-top: 30rpx;
} }
.record-line-view { .record-line-view {
padding-left: 30rpx; padding-left: 30rpx;
position: relative; position: relative;
...@@ -923,7 +924,7 @@ ...@@ -923,7 +924,7 @@
.line-view-right { .line-view-right {
// text-align: right; // text-align: right;
} }
.record-line-view ::before { .record-line-view ::before {
content: " "; content: " ";
position: absolute; position: absolute;
...@@ -1013,7 +1014,7 @@ ...@@ -1013,7 +1014,7 @@
color: #FFFFFF; color: #FFFFFF;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
.time-view { .time-view {
display: flex; display: flex;
font-size: 20rpx; font-size: 20rpx;
...@@ -1069,7 +1070,7 @@ ...@@ -1069,7 +1070,7 @@
color: #333333; color: #333333;
line-height: 48rpx; line-height: 48rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.between-cell { .between-cell {
......
This diff is collapsed.
...@@ -8,20 +8,20 @@ ...@@ -8,20 +8,20 @@
<text class="itemTitle">保存原图</text> <text class="itemTitle">保存原图</text>
<text class="itemNotice">拍照后另保存一张无水印的图片</text> <text class="itemNotice">拍照后另保存一张无水印的图片</text>
</view> </view>
<switch class="itemSwitch" :checked="result['has_origin']" @change="handleOrigineChange" color="#007AFF" /> <switch class="itemSwitch" :checked="result['hasOrigin']" @change="handleOrigineChange" color="#007AFF" />
</view> </view>
<view class="itemView" v-if="showTitleSwitch"> <view class="itemView" v-if="showTitleSwitch">
<view class="itemTitleView" @click="itemClick({},-1)"> <view class="itemTitleView" @click="itemClick({},-1)">
<text class="itemTitle">水印标题</text> <text class="itemTitle">水印标题</text>
<text class="itemNotice">{{result['lower_right']['title_text'] || '点击可编辑更改'}}</text> <text class="itemNotice">{{result['lowerLeft']['title'] || '点击可编辑更改'}}</text>
</view> </view>
<switch class="itemSwitch" disabled :checked="result['lower_right']['title_text'] != ''" <switch class="itemSwitch" disabled :checked="result['lowerLeft']['title'] != ''"
@click="handleClickTitleSwitch" color="#007AFF" /> @click="handleClickTitleSwitch" color="#007AFF" />
</view> </view>
<view class="itemView" v-for="(item,ikey) in itemList" :key="ikey"> <view class="itemView" v-for="(item,ikey) in itemList" :key="ikey">
<view class="itemTitleView" @click="itemClick(item,ikey)"> <view class="itemTitleView" @click="itemClick(item,ikey)">
<text class="itemTitle">{{item['watemark_text'] || '自定义' + (ikey + 1)}}</text> <text class="itemTitle">{{item['watemarkText'] || '自定义' + (ikey + 1)}}</text>
<text class="itemNotice">{{item['watemark_value'] || '点击可编辑更改'}}</text> <text class="itemNotice">{{item['watemarkValue'] || '点击可编辑更改'}}</text>
</view> </view>
<switch class="itemSwitch" :checked="item['enable']" @change="itemChange(item, ikey)" color="#007AFF" /> <switch class="itemSwitch" :checked="item['enable']" @change="itemChange(item, ikey)" color="#007AFF" />
</view> </view>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<view class="inputBackView"> <view class="inputBackView">
<view class="ph-pop-left-view"> <view class="ph-pop-left-view">
<view class="leftInputView"> <view class="leftInputView">
<input class="leftInput" type="text" v-model="currenItem['watemark_text']" <input class="leftInput" type="text" v-model="currenItem['watemarkText']"
@input="leftInput()" :disabled="currenItem.type === 'title_text'" placeholder="请输入" @input="leftInput()" :disabled="currenItem.type === 'title_text'" placeholder="请输入"
maxlength="10" /> maxlength="10" />
</view> </view>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<view class="ph-pop-mid-view">:</view> <view class="ph-pop-mid-view">:</view>
<view> <view>
<view class="rightInputView"> <view class="rightInputView">
<input class="rightInput" type="text" v-model="currenItem['watemark_value']" <input class="rightInput" type="text" v-model="currenItem['watemarkValue']"
@input="rightInput()" placeholder="请输入内容" maxlength="30" /> @input="rightInput()" placeholder="请输入内容" maxlength="30" />
</view> </view>
<view class="ph-pop-tip-view" v-if="showTipRight">*必填项</view> <view class="ph-pop-tip-view" v-if="showTipRight">*必填项</view>
...@@ -71,14 +71,14 @@ ...@@ -71,14 +71,14 @@
isPopShow: false, isPopShow: false,
icon_close_new: '', icon_close_new: '',
result: { result: {
has_origin: true, hasOrigin: true,
lower_right: { lowerLeft: {
body: [] body: []
} }
}, },
currenItem: { currenItem: {
'watemark_text': '', 'watemarkText': '',
'watemark_value': '' 'watemarkValue': ''
}, },
editingItem: {}, editingItem: {},
showTipLeft: false, showTipLeft: false,
...@@ -88,8 +88,8 @@ ...@@ -88,8 +88,8 @@
}, },
computed: { computed: {
itemList() { itemList() {
if (this.result['lower_right']) { if (this.result['lowerLeft']) {
var arr = this.result['lower_right']['body'] var arr = this.result['lowerLeft']['body']
return arr.filter((item) => { return arr.filter((item) => {
return item.watemark_type === '备注' return item.watemark_type === '备注'
}) })
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
}, },
showTitleSwitch() { showTitleSwitch() {
return this.result['lower_right'].hasOwnProperty('title_text') return this.result['lowerLeft'].hasOwnProperty('title')
}, },
customStyleCancel() { customStyleCancel() {
return { return {
...@@ -164,12 +164,12 @@ ...@@ -164,12 +164,12 @@
//保存原图 开关 //保存原图 开关
handleOrigineChange: function(e) { handleOrigineChange: function(e) {
this.result['has_origin'] = !this.result['has_origin'] this.result['hasOrigin'] = !this.result['hasOrigin']
this.saveUserWatermark() this.saveUserWatermark()
}, },
handleClickTitleSwitch: function(e) { handleClickTitleSwitch: function(e) {
var string = this.result['lower_right']['title_text'] ? '水印标题不可关闭' : '请先编辑该自定义项' var string = this.result['lowerLeft']['title'] ? '水印标题不可关闭' : '请先编辑该自定义项'
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: string title: string
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
//自定义 开关 //自定义 开关
itemChange: function(item, ikey) { itemChange: function(item, ikey) {
if (item['watemark_value']) { if (item['watemarkValue']) {
// 修改 // 修改
item['enable'] = !item['enable'] item['enable'] = !item['enable']
this.saveUserWatermark() this.saveUserWatermark()
...@@ -194,8 +194,8 @@ ...@@ -194,8 +194,8 @@
itemClick: function(item, ikey) { itemClick: function(item, ikey) {
if (ikey === -1) { if (ikey === -1) {
this.currenItem = { this.currenItem = {
'watemark_text': '水印标题', 'watemarkText': '水印标题',
'watemark_value': this.result['lower_right']['title_text'], 'watemarkValue': this.result['lowerLeft']['title'],
'type': 'title_text' 'type': 'title_text'
} }
} else { } else {
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
//左侧输入框 //左侧输入框
leftInput: function(e) { leftInput: function(e) {
if (this.currenItem['watemark_text']) { if (this.currenItem['watemarkText']) {
this.showTipLeft = false this.showTipLeft = false
} }
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
//右侧输入框 //右侧输入框
rightInput: function(e) { rightInput: function(e) {
if (this.currenItem['watemark_value']) { if (this.currenItem['watemarkValue']) {
this.showTipRight = false this.showTipRight = false
} }
}, },
...@@ -227,8 +227,8 @@ ...@@ -227,8 +227,8 @@
popCancelClick: function() { popCancelClick: function() {
this.isPopShow = false this.isPopShow = false
this.currenItem = { this.currenItem = {
'watemark_text': '', 'watemarkText': '',
'watemark_value': '' 'watemarkValue': ''
} }
}, },
...@@ -239,22 +239,22 @@ ...@@ -239,22 +239,22 @@
//自定义弹窗 保存 //自定义弹窗 保存
popSaveClick: function() { popSaveClick: function() {
if (this.currenItem['watemark_text'] && this.currenItem['watemark_value']) { if (this.currenItem['watemarkText'] && this.currenItem['watemarkValue']) {
this.isPopShow = false this.isPopShow = false
if (this.currenItem.type === 'title_text') { if (this.currenItem.type === 'title_text') {
this.result['lower_right']['title_text'] = this.currenItem['watemark_value'] this.result['lowerLeft']['title'] = this.currenItem['watemarkValue']
} else { } else {
this.editingItem['watemark_text'] = this.currenItem['watemark_text'] this.editingItem['watemarkText'] = this.currenItem['watemarkText']
this.editingItem['watemark_value'] = this.currenItem['watemark_value'] this.editingItem['watemarkValue'] = this.currenItem['watemarkValue']
this.editingItem['enable'] = true this.editingItem['enable'] = true
} }
this.saveUserWatermark() this.saveUserWatermark()
} else { } else {
// 提示 // 提示
if (!this.currenItem['watemark_text']) { if (!this.currenItem['watemarkText']) {
this.showTipLeft = true this.showTipLeft = true
} }
if (!this.currenItem['watemark_value']) { if (!this.currenItem['watemarkValue']) {
this.showTipRight = true this.showTipRight = true
} }
} }
......
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