Commit af6dd7e2 authored by Morson's avatar Morson
parents 3c4e45ee c240c944
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
:class="{'time-item':true,'active': item.pkey===appointRange}" v-for="(item,index) in timeList" :class="{'time-item':true,'active': item.pkey===appointRange}" v-for="(item,index) in timeList"
:key="item.pkey"> :key="item.pkey">
<button class="time" :plain="true" <button class="time" :plain="true"
:disabled="item.disabled" :hair-line="false" :disabled="item.disabled || (currentDayIndex == 0 && item.pkey <= currentPkey)" :hair-line="false"
@click="timeChange(item,index,timeList)"> @click="timeChange(item,index,timeList)">
{{item.name}} {{item.name}}
</button> </button>
...@@ -101,7 +101,9 @@ ...@@ -101,7 +101,9 @@
appointRange: null, appointRange: null,
appointRangeText: '', appointRangeText: '',
num: 0, num: 0,
hasLast: false hasLast: false,
currentPkey: 'appointment_range_' + new Date().getHours(),
currentDayIndex: -1,
} }
}, },
watch: { watch: {
...@@ -125,6 +127,7 @@ ...@@ -125,6 +127,7 @@
this.appointTime = item.day this.appointTime = item.day
this.appointRange = null this.appointRange = null
this.appointRangeText = '' this.appointRangeText = ''
this.currentDayIndex = index
this.$emit('date-change', data) this.$emit('date-change', data)
}, },
timeChange(item, index, list) { timeChange(item, index, list) {
......
<!-- ******************* 文件上传 ******************* --> <!-- ******************* 文件上传 ******************* -->
<template> <template>
<view> <view>
<view class="file-box" v-if="!takeStatus"> <view class="file-box">
<!-- <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>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</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" :currentItem="currentItemDate"></take-photo> <take-photo v-if="takeStatus" @close="closeTake" :currentItem="currentItemDate"></take-photo>
</view> </view>
</template> </template>
...@@ -41,7 +41,15 @@ ...@@ -41,7 +41,15 @@
}, },
partnerCompanyId: { partnerCompanyId: {
type: String, type: String,
default: '{}' default: ''
},
categoryId: {
type: String,
default: ''
},
brandId: {
type: String,
default: ''
}, },
}, },
filters:{}, filters:{},
...@@ -117,7 +125,7 @@ ...@@ -117,7 +125,7 @@
setValue() { setValue() {
const dataValue = [] const dataValue = []
this.imgList.map(item=>{ this.imgList.map(item=>{
dataValue.push(item.path) dataValue.push(item.src)
}) })
this.valueChange(dataValue) this.valueChange(dataValue)
}, },
...@@ -125,6 +133,7 @@ ...@@ -125,6 +133,7 @@
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
item.src = item.key
this.imgList.push(item) this.imgList.push(item)
}) })
this.setValue() this.setValue()
...@@ -143,34 +152,17 @@ ...@@ -143,34 +152,17 @@
}, },
getPhotoStander(){// 获取拍照规范接口 getPhotoStander(){// 获取拍照规范接口
let self = this let self = this
this.$u.api.orderStandardItem({}).then((res)=>{ let param = {"partnerCompanyId":self.partnerCompanyId,
"categoryId":self.categoryId,
"brandId":self.brandId,
"fieldName":self.item.fieldsName}
this.$u.api.orderStandardItem(param).then((res)=>{
if (res.code == 200 && res.data.length>0) { if (res.code == 200 && res.data.length>0) {
self.currentItemDate = res.data[0] self.currentItemDate = res.data[0]
}else{ }else{
console.log("获取完工项的拍照标准异常",res.data.message) console.log("获取完工项的拍照标准异常",res.data.message)
} }
}) })
// self.currentItemDate = {
// "id": 154,
// "partnerCompanyId": 10115000001,
// "categoryId": 1100000216,
// "brandId": null,
// "type": "勘测部分",
// "name": "勘测单",
// "fieldName": "06",
// "images": [
// "https://cloud-bak.banshouhui.com/2-勘测单.jpg"
// ],
// "mainPoint": [
// "表格清晰,文字可辨",
// "表格居中,不倾斜",
// "全部填写完整,不能填写的部分划横杠。",
// "涉及到用户签字部分,不允许我方人员代签,由用户或用户指定人进行签字确认。",
// "涉及到物业的由现场物业人员签字确认。"
// ],
// "note": "正面拍摄,完整看到单据 4 条边",
// "orderImages": null
// }
}, },
getWatermark(){ getWatermark(){
if(getApp().globalData.photo.waterSetting){ if(getApp().globalData.photo.waterSetting){
......
...@@ -29,18 +29,25 @@ ...@@ -29,18 +29,25 @@
}, },
computed: { computed: {
type() { type() {
let ty = this.item.fieldsType.toLocaleLowerCase() if (this.item) {
if (this.item.fieldsId == 200) { let ty = this.item.fieldsType.toLocaleLowerCase()
this.maxlength = 9 switch (ty) {
return 'digit' case 'text':
} else { return 'textarea'
if (this.item && ty == 'password') { case 'password':
return this.item.fieldsType return this.item.fieldsType
}else if (this.item && ty == 'text') { case 'decimal':
return 'textarea' case 'number':
} else { case 'double':
return 'text' case 'integer':
this.maxlength = 9
return 'digit'
case 'textarea':
default:
return 'text'
} }
} else {
return 'text'
} }
}, },
......
<!-- ******************* 输入框 ******************* -->
<template>
<view>
<view class="list u-flex u-row-between">
<image class="item-image" :src="mixingImage" v-if="item.required"></image>
<view class="u-m-r-20">{{item.fieldsTitle}}</view>
<view class="u-flex-1 location-name" >{{valueTxt}}</view>
</view>
</view>
</template>
<script>
import stringMixin from './stringMixin'
export default {
name: 'XhInput', // 新建 input
components: {},
mixins: [stringMixin],
props: {
placeholder: {
type: String,
default: '请输入'
},
},
data() {
return {
maxlength: 140,
}
},
computed: {
valueTxt() {
let str = '元'
const dataValue = this.dataValue
if(dataValue > 0){
str = dataValue + str
}
return str
},
mixingImage() {
return process.uniEnv.qn_base_url + 'mixing.png'
}
},
watch: {},
mounted() {
},
methods: {
}
}
</script>
<style scoped>
.required {
padding-right: 10rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #fa3534;
}
.item-image {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
.location-name {
color: #2272FF;
text-align: right;
}
.location {
background: #F4F5F7;
padding: 10rpx 20rpx;
border-radius: 12rpx;
}
</style>
...@@ -19,15 +19,16 @@ ...@@ -19,15 +19,16 @@
<image class="address-image" :src="dizhiImage" mode="widthFix"></image> <image class="address-image" :src="dizhiImage" mode="widthFix"></image>
<text>{{ formatAddress(orderData) }}</text> <text>{{ formatAddress(orderData) }}</text>
</view> </view>
<view v-if="showDistance"> <view v-if="showDistance" class="address-right-view">
{{orderDistance}}km {{orderDistance}}km
</view> </view>
</view> </view>
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
<view class="reason-view" v-if="showReason"><text class="reason-text">未通过原因:</text> <view class="reason-view" v-if="showReason">
<text v-for="(item, index) in orderData.auditResults" :key="index">{{item}}</text> <view><text class="reason-title">未通过原因:</text></view>
<view class="reason-text"><text v-for="(item, index) in orderData.auditResults" :key="index">{{item}}</text></view>
</view> </view>
<view class="bottom-view"> <view class="bottom-view">
<view> <view>
...@@ -215,6 +216,7 @@ ...@@ -215,6 +216,7 @@
} }
}, },
created() { created() {
console.log('+++++++++++')
/* /*
orderStatus: orderStatus:
待接单 orderStatus<31 工单状态小于31 待接单 orderStatus<31 工单状态小于31
...@@ -248,9 +250,9 @@ ...@@ -248,9 +250,9 @@
} else { } else {
this.orderType = this.types[this.type] this.orderType = this.types[this.type]
} }
this.timeout = this.orderData.currentOverTime < new Date().getTime() this.timeout = this.orderData.currentOverTime < new Date().getTime()
this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - new Date().getTime()) / 1000) this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - new Date().getTime()) / 1000)
console.log('++++++', this.timestamp)
}, },
methods: { methods: {
handleClick() { handleClick() {
...@@ -380,17 +382,20 @@ ...@@ -380,17 +382,20 @@
display: flex; display: flex;
align-items: center; align-items: center;
align-items: flex-start; align-items: flex-start;
text-align: left; text-align: left;
.address-image { .address-image {
width: 26rpx; width: 26rpx;
height: 28rpx; height: 28rpx;
margin-right: 8rpx; margin-right: 8rpx;
flex-shrink: 0; flex-shrink: 0;
margin-top: 4rpx; margin-top: 4rpx;
} }
} }
.address-right-view {} .address-right-view {
margin-left: 30rpx;
}
} }
} }
...@@ -407,10 +412,15 @@ ...@@ -407,10 +412,15 @@
font-size: 26rpx; font-size: 26rpx;
color: #FA5A49; color: #FA5A49;
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
.reason-text { display: flex;
.reason-title {
flex-shrink: 0; flex-shrink: 0;
color: #666666; color: #666666;
}
.reason-text {
display: flex;
flex-direction: column;
} }
} }
......
...@@ -113,12 +113,22 @@ ...@@ -113,12 +113,22 @@
photo.currentItemLength = 0 photo.currentItemLength = 0
// this.ctx = uni.createCameraContext(); // this.ctx = uni.createCameraContext();
this.updateTime() this.updateTime()
this.getLocation()
const locationData = uni.getStorageSync('locationData')
const validityTime = 60000
if (Date.now() - locationData.locationTime < validityTime) { // 1分钟内不重复请求位置信息
this.waterInfo.latitude = locationData.waterInfo.latitude
this.waterInfo.longitude = locationData.waterInfo.longitude
this.baiduLocation()
} else {
this.getLocation()
}
this.getMarkPath() this.getMarkPath()
this.initData() this.initData()
photo.currentItem = this.currentItem photo.currentItem = this.currentItem
if (this.currentItem.images.length > 0) { if (this.currentItem.images && this.currentItem.images.length > 0) {
this.shadowInitShow = true this.shadowInitShow = true
this.standardShow = true this.standardShow = true
this.standardStatus = true this.standardStatus = true
...@@ -266,6 +276,17 @@ ...@@ -266,6 +276,17 @@
success: function(res) { success: function(res) {
waterInfo.longitude = parseFloat(res.longitude).toFixed(4) waterInfo.longitude = parseFloat(res.longitude).toFixed(4)
waterInfo.latitude = parseFloat(res.latitude).toFixed(3) waterInfo.latitude = parseFloat(res.latitude).toFixed(3)
const data = {
waterInfo: {
latitude: waterInfo.latitude,
longitude: waterInfo.longitude
},
locationTime: Date.now()
}
uni.setStorage({
key: 'locationData',
data: data,
})
that.baiduLocation() that.baiduLocation()
}, },
fail(err) { fail(err) {
......
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
{ {
"path": "complete", "path": "complete",
"style": { "style": {
"navigationBarTitleText": "订单-完工配置", "navigationBarTitleText": "",
"navigationStyle": "custom", "navigationStyle": "custom",
"disableScroll": true "disableScroll": true
} }
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
{ {
"path": "feedback", "path": "feedback",
"style": { "style": {
"navigationBarTitleText": "订单-过程反馈", "navigationBarTitleText": "",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom", // 隐藏系统导航栏 "navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true "disableScroll": true
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
{ {
"path": "refuse", "path": "refuse",
"style": { "style": {
"navigationBarTitleText": "订单-拒单", "navigationBarTitleText": "",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom", // 隐藏系统导航栏 "navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true "disableScroll": true
...@@ -434,7 +434,7 @@ ...@@ -434,7 +434,7 @@
}, },
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F4F5F7" "backgroundColor": "#F4F5F7"
}, },
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<!-- 入驻前--> <!-- 入驻前-->
<view v-if="needSettled" class="tip-view"> <view v-if="needSettled" class="tip-view">
<image :src="weiruzhuImage" class="tip-view-image"></image> <image :src="weiruzhuImage" class="tip-view-image"></image>
<view class="tip-other">入驻通过后平台将向您推荐订单</view> <view class="tip-other">入驻后平台将向您分配或推荐订单</view>
<u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn" <u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn"
:custom-style="buttonStyle"> :custom-style="buttonStyle">
立即入驻 立即入驻
...@@ -230,49 +230,17 @@ ...@@ -230,49 +230,17 @@
uni.stopPullDownRefresh() // 结束下拉刷新 uni.stopPullDownRefresh() // 结束下拉刷新
self.loadedOrder = true self.loadedOrder = true
self.triggered = false; self.triggered = false;
self._freshing = false; self._freshing = false;
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/ if (res.code == 200 && res.data) {
// if (res.data.list) { if (self.search.pageNumber == 1) {
// if (res.data.list.length == 0 && res.data.total > 0) { self.orderList = []
// res.data.total = 15 }
// res.data.list = [{ if (res.data.list) {
// orderServiceType: '安装', // 服务类型:安装、维修 self.orderList.push(...res.data.list);
// categoryName: '充电桩', // 品类:充电桩 }
// orderBusinessTypeText: '分配单', // 业务类型:分配单、订单池 console.log('this.orderlist;', this.orderList)
// orderNumber: 'OR2021041809827', // 工单编号 self.currentLoadStatus = res.data.total > self.orderList.length && (res.data.list || []).length == self.search.pageSize ? 'loadmore' : 'nomore'
// contactName: '郭小清', // 客户信息
// contactPhone: '13631612077', // 联系方式
// contactAddress: '湾街道荔枝花园D座125号', // 详细地址
// contactAddressLatitud: '116.3896', // 联系人地址经度
// contactAddressLongitud: '39.91917', // 联系人地址纬度
// orderStatus: 0, // 工单状态
// appointmentDatetime: '', // 预约时间
// currentWillOverTime: 10000, // 剩余时间
// currentOverTime: new Date().getTime() + 10000, // 超过时间点
// auditDatetime: '2021.04.19 12:45:09', // 审核时间
// submissionTime: '2021.04.19 16:24:48', // 提交时间
// auditResults: {}, // 审核结果
// orderBusinessType: 'R', // 业务类型 R 为抢单
// orderId: '1100000216'
// }]
// res.data.list = [...res.data.list, ...res.data.list, ...res.data.list, ...res.data
// .list,
// ...res.data.list, ...res.data.list, ...res.data.list, ...res.data.list, ...
// res
// .data.list, ...res.data.list
// ]
// }
// }
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
if (res.code == 200) {
if (res.data && res.data.list && res.data.list.length > 0) {
if (self.search.pageNumber == 1) {
self.orderList = []
}
self.orderList.push(...res.data.list);
self.currentLoadStatus = res.data.total > self.orderList.length && res.data.list.length == self.search.pageSize ? 'loadmore' : 'nomore'
}
} else { } else {
console.log(res.message, "初始化订单列表异常"); console.log(res.message, "初始化订单列表异常");
} }
......
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
+ "&categoryId=" + item.categoryId + "&categoryId=" + item.categoryId
+ "&orderServiceType=" + item.orderServiceType + "&orderServiceType=" + item.orderServiceType
+ "&inGuaranteePeriod=" + item.inGuaranteePeriod + "&inGuaranteePeriod=" + item.inGuaranteePeriod
+ "&auditResultsId=" + (item.auditResults?Object.keys(item.auditResults)[0]:'') + "&auditResultsId=" + (item.auditResults?Object.keys(item.auditResults)[Object.keys(item.auditResults).length - 1]:'')
}) })
}, },
handleAction(item) { handleAction(item) {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<view class="class-bd"> <view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" label-position="top" <u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" label-position="top"
:prop="item.fieldsName" :border-bottom="false" v-show="item.fieldsId != 200 || show200"> :prop="item.fieldsName" :border-bottom="false" v-show="item.fieldsId != 200 || show200">
<view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="typeToComponentType(item.fieldsType)!=='location'&&typeToComponentType(item.fieldsType)!=='form'"> <view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="typeToComponentType(item.fieldsType)!=='location'&&typeToComponentType(item.fieldsType)!=='form'&&typeToComponentType(item.fieldsType)!=='label'">
<image class="item-image" :src="mixingImage" v-if="item.required"></image> <image class="item-image" :src="mixingImage" v-if="item.required"></image>
{{item.fieldsTitle}} {{item.fieldsTitle}}
</view> </view>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-select> </xh-select>
<xh-files v-else-if="typeToComponentType(item.fieldsType)==='file'" <xh-files v-else-if="typeToComponentType(item.fieldsType)==='file'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :partnerCompanyId="partnerCompanyId" :value='form[item.fieldsName] || []' :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :partnerCompanyId="partnerCompanyId" :categoryId="categoryId" :value='form[item.fieldsName] || []'
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-files> </xh-files>
<xh-location v-else-if="typeToComponentType(item.fieldsType)==='location'" <xh-location v-else-if="typeToComponentType(item.fieldsType)==='location'"
...@@ -77,6 +77,9 @@ ...@@ -77,6 +77,9 @@
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :order-id="orderId" :value='form[item.fieldsName] || ""' :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :order-id="orderId" :value='form[item.fieldsName] || ""'
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-service-more> </xh-service-more>
<xh-label v-else-if="typeToComponentType(item.fieldsType)==='label'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'>
</xh-label>
</template> </template>
</u-form-item> </u-form-item>
</view> </view>
...@@ -119,6 +122,7 @@ ...@@ -119,6 +122,7 @@
import XhTime from '@/components/createCom/XhTime.vue' import XhTime from '@/components/createCom/XhTime.vue'
import XhServiceMeasure from '@/components/createCom/XhServiceMeasure.vue' import XhServiceMeasure from '@/components/createCom/XhServiceMeasure.vue'
import XhServiceMore from "../../components/createCom/XhServiceMore"; import XhServiceMore from "../../components/createCom/XhServiceMore";
import XhLabel from "../../components/createCom/XhLabel";
// import XhRadio from '@/components/createCom/XhRadio.vue' // import XhRadio from '@/components/createCom/XhRadio.vue'
export default { export default {
data() { data() {
...@@ -191,13 +195,13 @@ ...@@ -191,13 +195,13 @@
XhPicker, XhPicker,
XhTime, XhTime,
XhServiceMeasure, XhServiceMeasure,
XhServiceMore XhServiceMore,
XhLabel
}, },
created() { created() {
// console.log(allComponents,'allComponents') // console.log(allComponents,'allComponents')
}, },
onLoad(option) { onLoad(option) {
console.log(option)
if (option) { if (option) {
this.orderId = option.orderId this.orderId = option.orderId
this.categoryId = option.categoryId this.categoryId = option.categoryId
...@@ -260,6 +264,12 @@ ...@@ -260,6 +264,12 @@
if (res.code == 200) { if (res.code == 200) {
self.list = res.data.config self.list = res.data.config
self.form = res.data.value || {} self.form = res.data.value || {}
uni.showLoading({
title: '加载中'
})
setTimeout(() => {
uni.hideLoading()
}, 1000)
// 异常单处理 // 异常单处理
if (self.auditResultsId) self.checkCompleteError() if (self.auditResultsId) self.checkCompleteError()
} else { } else {
...@@ -415,10 +425,29 @@ ...@@ -415,10 +425,29 @@
this.getMenuItemTop() this.getMenuItemTop()
}) })
}, },
calMaterialCraftListAmount(arr){
let amount = 0
if(arr){
arr.forEach(item =>{
if (Number(item.useLength) && Number(item.freeLength) && Number(item.unitAmt)) {
amount += Math.max(Number(item.useLength) - Number(item.freeLength), 0) * Number(item.unitAmt)
}
if(Number(item.extraAmt)){
amount += Number(item.extraAmt)
}
})
}
return amount
},
setData(data){// 通过页面设置数据 setData(data){// 通过页面设置数据
Object.keys(data).forEach(key => { Object.keys(data).forEach(key => {
this.$set(this.form,key,data[key]) this.$set(this.form,key,data[key])
}) })
// 更新预计超出金额
let amount = this.calMaterialCraftListAmount(this.form.materialList)
amount += this.calMaterialCraftListAmount(this.form.craftList)
this.$set(this.form,'overAmount',amount)
}, },
// 字段的值更新 // 字段的值更新
fieldValueChange(data) { fieldValueChange(data) {
...@@ -436,16 +465,16 @@ ...@@ -436,16 +465,16 @@
this.$set(this.form,innerItem.fieldsName,data.value) this.$set(this.form,innerItem.fieldsName,data.value)
} }
if (innerItem.fieldsId == 199) { // 选不需要收款的时候,收款金额修改为非必选 if (innerItem.fieldsId == 199) { // 选不需要收款的时候,收款金额修改为非必选
for (var item of this.list[0].items) { for (var list of this.list) { // 同时修改基本信息和完工信息
for (var i of item.items) { for (var item of list.items) {
if (i.fieldsId == 200) { for (var i of item.items) {
i.required = data.value !='03' if (i.fieldsId == 200) {
i.required = data.value !='03'
}
} }
} }
} }
} }
console.log(this.form)
}, },
nextStep() { nextStep() {
if (this.tabIndex < this.list.length - 1) { if (this.tabIndex < this.list.length - 1) {
...@@ -469,7 +498,7 @@ ...@@ -469,7 +498,7 @@
case 'number': case 'number':
case 'decimal': case 'decimal':
case 'double': case 'double':
case 'integer': case 'integer':
formType = 'input' formType = 'input'
break break
case 'multiinput': case 'multiinput':
...@@ -510,6 +539,9 @@ ...@@ -510,6 +539,9 @@
case 'form': case 'form':
formType = 'form' formType = 'form'
break break
case 'label':
formType = 'label'
break
} }
return formType return formType
}, },
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<text>{{ order.contactPhone }}</text> <text>{{ order.contactPhone }}</text>
</view> </view>
<view class="between-cell address-cell"> <view class="between-cell address-cell">
<view class="left"> <view class="left-address">
<u-icon name="map" size="28"></u-icon> <u-icon name="map" size="28"></u-icon>
<text class="address-txt">{{ formatAddress }}</text> <text class="address-txt">{{ formatAddress }}</text>
</view> </view>
...@@ -85,11 +85,12 @@ ...@@ -85,11 +85,12 @@
</view> </view>
<view class="line-view-right"> <view class="line-view-right">
<view> <view>
<text>{{record.operationType}}</text> <text>{{record.operationTypeText}}</text>
<text style="color: red;">{{record.overTime?'(超时)':''}}{{record.exception?'(异常)':''}}</text> <text style="color: red;">{{record.overTime?'(超时)':''}}{{record.exception?'(异常)':''}}</text>
<text style="color: #2272FF;" v-show="record.operationType==='报备'">(跟进)</text>
</view> </view>
<view v-show="record.operationType==='报备' || record.operationType==='改约'"> <view v-show="record.operationType==='报备' || record.operationType==='预约'|| record.operationType==='改约'">
<text>{{record.operationType==='报备' ? '下次联系时间:' : '改约时间:'}}</text> <text>{{record.operationType==='报备' ? '下次联系时间:' : record.operationType==='改约'?'改约时间:': ''}}</text>
<text style="color: #2272FF;">{{ <text style="color: #2272FF;">{{
record.operationType==='报备' && record.orderRecordRemark && record.orderRecordRemark.length>1? record.operationType==='报备' && record.orderRecordRemark && record.orderRecordRemark.length>1?
record.orderRecordRemark.substring(record.orderRecordRemark.indexOf(':')+1,record.orderRecordRemark.length) record.orderRecordRemark.substring(record.orderRecordRemark.indexOf(':')+1,record.orderRecordRemark.length)
...@@ -125,7 +126,7 @@ ...@@ -125,7 +126,7 @@
<view> <view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
<view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]"> <view v-if="showCenterBtn" @click="$u.throttle(handleBtn, 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>
...@@ -150,7 +151,7 @@ ...@@ -150,7 +151,7 @@
</view> </view>
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件--> <!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<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.throttle(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]">
<text>{{errorSignIn ? '异常' : '拍照'}}</text> <text>{{errorSignIn ? '异常' : '拍照'}}</text>
</view> </view>
...@@ -232,7 +233,8 @@ ...@@ -232,7 +233,8 @@
contactAddressLongitud:0, contactAddressLongitud:0,
contactAddressLatitud:0, contactAddressLatitud:0,
num:0, num:0,
showTimeOut:true showTimeOut:true,
clicking: false,
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -291,48 +293,48 @@ ...@@ -291,48 +293,48 @@
methods: { methods: {
openLocation(address){ openLocation(address){
if(this.isAllowDianhuaAndDaohang){ if(this.isAllowDianhuaAndDaohang){
uni.getLocation({ // uni.getLocation({
type: 'gcj02', //返回可以用于uni.openLocation的经纬度 // type: 'gcj02', //返回可以用于uni.openLocation的经纬度
success: function (res) { // success: function (res) {
const latitude = res.latitude; debugger
const longitude = res.longitude; const latitude = this.contactAddressLatitud //res.latitude;
const longitude =this.contactAddressLongitud //res.longitude;
uni.openLocation({ uni.openLocation({
latitude: latitude, latitude: Number(this.contactAddressLatitud),
longitude: longitude, longitude: Number(this.contactAddressLongitud),
success: function () { success: function () {
console.log('success'); console.log('success');
} }
}); });
}, // }
complete: function(res) { // ,
console.log('-------complete-----', res) // complete: function(res) {
if (res.errMsg.indexOf('auth') != -1) { // console.log('-------complete-----', res)
uni.showModal({ // if (res.errMsg.indexOf('auth') != -1) {
title: '提示', // uni.showModal({
content: '获取权限失败,请到设置页面开启权限', // title: '提示',
confirmText: '好的', // content: '获取权限失败,请到设置页面开启权限',
success(res) { // confirmText: '好的',
if (res.confirm) { // success(res) {
uni.openSetting({ // if (res.confirm) {
success(res) { // uni.openSetting({
console.log(res.authSetting) // success(res) {
} // console.log(res.authSetting)
}); // }
} // });
// }
} // }
}) // })
} else { // } else if (res.errMsg) {
uni.setClipboardData({ // // uni.setClipboardData({
data: address, // // data: address,
success: function () { // // success: function () {
console.log('success'); // // console.log('success');
} // // }
}); // // });
} // }
} // }
});
} }
}, },
phoneToCustomer(phone){ // 联系客户 phoneToCustomer(phone){ // 联系客户
...@@ -424,6 +426,16 @@ ...@@ -424,6 +426,16 @@
}; };
self.$u.api.listOrderRecord(param).then((res) => { self.$u.api.listOrderRecord(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
res.data.forEach(item =>{
if(item.operationType === '预约'){
item.operationTypeText = '上门时间'
}else if (item.operationType === '报备'){
let arr = item.orderRecordRemark.split(',')
item.operationTypeText = arr[0]
}else{
item.operationTypeText = item.operationType + '时间'
}
})
self.orderRecords = res.data self.orderRecords = res.data
} else { } else {
console.log(res.message, "获取订单详情失败!"); console.log(res.message, "获取订单详情失败!");
...@@ -554,6 +566,7 @@ ...@@ -554,6 +566,7 @@
} }
}, },
handleBtn() { handleBtn() {
console.log('click button')
if(!this.submitType){ if(!this.submitType){
return; return;
} }
...@@ -599,8 +612,13 @@ ...@@ -599,8 +612,13 @@
} }
return return
} }
if (this.clicking) {
return
}
this.clicking = true
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({
...@@ -612,6 +630,7 @@ ...@@ -612,6 +630,7 @@
// id: this.order.orderId // id: this.order.orderId
// } // }
callback : function(){ callback : function(){
this.clicking = false
uni.redirectTo({ uni.redirectTo({
url: 'pages/order/detail?id='+self.order.orderId url: 'pages/order/detail?id='+self.order.orderId
}); });
...@@ -622,7 +641,10 @@ ...@@ -622,7 +641,10 @@
title: res.data.message!==undefined ? res.data.message:res.message, title: res.data.message!==undefined ? res.data.message:res.message,
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default' // 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
type: 'warning', type: 'warning',
callback: res.data.message==='抱歉,手快的师傅已经抢到此单!'?this.isGan():'' callback: function() {
this.clicking = false
res.data.message==='抱歉,手快的师傅已经抢到此单!'?this.isGan():''
}
}) })
} }
}) })
...@@ -721,6 +743,7 @@ ...@@ -721,6 +743,7 @@
if(!currentOverTime){ if(!currentOverTime){
return 0 return 0
} }
console.log('--------', Math.round(Math.abs(this.order.currentOverTime - new Date().getTime()) / 1000))
return Math.round(Math.abs(this.order.currentOverTime - new Date().getTime()) / 1000); return Math.round(Math.abs(this.order.currentOverTime - new Date().getTime()) / 1000);
}, },
timeOutChange(currentOverTime){ timeOutChange(currentOverTime){
...@@ -847,7 +870,6 @@ ...@@ -847,7 +870,6 @@
} }
.address-cell { .address-cell {
height: 24rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
...@@ -857,9 +879,13 @@ ...@@ -857,9 +879,13 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.left { .left-address {
display: flex;
align-items: flex-start;
.address-txt { .address-txt {
line-height: 30rpx;
margin-left: 8rpx; margin-left: 8rpx;
margin-right: 30rpx;
} }
} }
} }
...@@ -949,19 +975,19 @@ ...@@ -949,19 +975,19 @@
z-index: 1; z-index: 1;
} }
.address-cell { // .address-cell {
height: 24rpx; // height: 24rpx;
font-size: 24rpx; // font-size: 24rpx;
font-weight: 400; // font-weight: 400;
color: #333333; // color: #333333;
line-height: 24rpx; // line-height: 24rpx;
.left { // .left {
.address-txt { // .address-txt {
margin-left: 8rpx; // margin-left: 8rpx;
} // }
} // }
} // }
} }
.record-item { .record-item {
......
...@@ -120,8 +120,8 @@ ...@@ -120,8 +120,8 @@
} }
} }
for (var item of this.other) { for (var item of this.other) {
if (item.freeMount && Number(item.freeMount)) { if (item.extraAmt && Number(item.extraAmt)) {
amount += Number(item.freeMount) amount += Number(item.extraAmt)
} }
} }
return amount return amount
...@@ -156,9 +156,9 @@ ...@@ -156,9 +156,9 @@
methods: { methods: {
getMaterialData(){ getMaterialData(){
let self = this let self = this
self.$u.api.getCompleteConfigAndData(self.orderId).then((res) => { self.$u.api.getOrderMaterial(self.orderId).then((res) => {
if (res.code !== 200) { if (res.code !== 200) {
console.log(result.data.message) console.log(res.data.message)
return return
} }
self.formatServiceMoreList(res.data) self.formatServiceMoreList(res.data)
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
loading: true, loading: true,
isPopShow: false, isPopShow: false,
userWatermark:{}, userWatermark:{},
title: '规范展示' title: '全部'
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
} }
if (e && e.brand) { if (e && e.brand) {
this.brand = decodeURIComponent(e.brand) this.brand = decodeURIComponent(e.brand)
this.title = this.brand // this.title = this.brand
} }
if (e && e.orderId) { if (e && e.orderId) {
......
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
flex-direction: column; flex-direction: column;
} }
/deep/ .u-image{ /deep/ .u-image{
height:100%!important; height:100vh !important;
} }
/deep/ .u-image__loading{ /deep/ .u-image__loading{
background-color: transparent!important; background-color: transparent!important;
......
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