新增检测app小程序是否开启GPS定位服务,并前往开启,调取费用计算接口、调用查询功能的(客户、项目、备品)列表查询,详情查询接口

master
chen 2022-04-18 17:08:12 +08:00
parent 8dbd9af5b9
commit 49899aa8ed
20 changed files with 1054 additions and 968 deletions

View File

@ -16,8 +16,8 @@
this.globalData.hostapi = 'https://7and5.cn'; this.globalData.hostapi = 'https://7and5.cn';
// #endif // #endif
// #ifdef H5 // #ifdef H5
// this.globalData.hostapi = 'https://7and5.cn'; this.globalData.hostapi = 'https://7and5.cn';
this.globalData.hostapi = '/web'; // this.globalData.hostapi = '/web';
// #endif // #endif
}, },
onShow: function() { onShow: function() {
@ -27,6 +27,8 @@
// //
this.$toolAll.tools.renewLocationEv(); this.$toolAll.tools.renewLocationEv();
// } // }
// GPS
this.$toolAll.tools.checkOpenGPSServiceByAndroidIOS();
}, },
onHide: function() { onHide: function() {

View File

@ -196,7 +196,7 @@ uni-radio .uni-radio-input {border: 1rpx solid #444444;}
background-color: #FFFFFF; background-color: #FFFFFF;
} }
.solution-title { .solution-title {
bottom: 0rpx; bottom: -2rpx;
left: -40rpx; left: -40rpx;
right: -40rpx; right: -40rpx;
padding: 6rpx; padding: 6rpx;

View File

@ -18,6 +18,10 @@ export function queryFun(data) {
return request.post("/universal/api.search/search", data); return request.post("/universal/api.search/search", data);
} }
// (客户、项目、备品)详情
export function queryDetail(data) {
return request.post("/universal/api.search/search_info", data);
}
// 处理工单,获取 // 处理工单,获取
export function handleWorkOrderGet(data) { export function handleWorkOrderGet(data) {

View File

@ -112,7 +112,7 @@ const request = (method, url, options) => {
}, },
complete: rest => { complete: rest => {
// 是否成功,都会执行 // 是否成功,都会执行
console.log(rest,100); console.log(rest,115);
} }
}) })
}) })
@ -135,6 +135,7 @@ const uploadFile = (url, options) => {
token:uni.getStorageSync('token') || '' token:uni.getStorageSync('token') || ''
}, },
success: res => { success: res => {
console.log(res,138);
if (res.statusCode == 200) { if (res.statusCode == 200) {
let temp = JSON.parse(res.data) let temp = JSON.parse(res.data)
if (temp.code == 1) { if (temp.code == 1) {

View File

@ -1,4 +1,3 @@
const app = getApp();
import { renewLocation } from './public-api.js'; import { renewLocation } from './public-api.js';
// 解决微信小程序 // 解决微信小程序
var QQMapWX = require('./map/qqmap-wx-jssdk.min.js'); var QQMapWX = require('./map/qqmap-wx-jssdk.min.js');
@ -36,7 +35,86 @@ const jsonp = function(url, data) {
document.body.appendChild(scriptNode) document.body.appendChild(scriptNode)
}) })
} }
const tools = { const tools = {
checkOpenGPSServiceByAndroidIOS() {
// #ifdef APP-PLUS
let system = uni.getSystemInfoSync(); // 获取系统信息
if (system.platform === 'android') { // 判断平台
var context = plus.android.importClass("android.content.Context");
var locationManager = plus.android.importClass("android.location.LocationManager");
var main = plus.android.runtimeMainActivity();
var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
uni.showModal({
title: '提示',
content: '请打开定位服务功能',
showCancel: false, // 不显示取消按钮
success() {
if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
var Intent = plus.android.importClass('android.content.Intent');
var Settings = plus.android.importClass('android.provider.Settings');
var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
main.startActivity(intent); // 打开系统设置GPS服务页面
} else {
console.log('GPS功能已开启');
}
}
});
}
} else if (system.platform === 'ios') {
console.log("苹果");
var cllocationManger = plus.ios.import("CLLocationManager");
var enable = cllocationManger.locationServicesEnabled();
var status = cllocationManger.authorizationStatus();
plus.ios.deleteObject(cllocationManger);
if (enable && status != 2) {
console.log("手机系统的定位已经打开");
} else {
console.log("手机系统的定位没有打开");
uni.showModal({
title: '提示',
content: '请前往设置-隐私-定位服务打开定位服务功能',
showCancel: false, // 不显示取消按钮
success() {
var UIApplication = plus.ios.import("UIApplication");
var application2 = UIApplication.sharedApplication();
var NSURL2 = plus.ios.import("NSURL");
// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
// var setting2 = NSURL2.URLWithString("App-Prefs:root=LOCATION_SERVICES");
var setting2 = NSURL2.URLWithString("app-settings:");
//var setting2 = NSURL2.URLWithString("App-Prefs:root=Privacy&path=LOCATION");
// var setting2 = NSURL2.URLWithString("App-Prefs:root=Privacy&path=LOCATION_SERVICES");
application2.openURL(setting2);
plus.ios.deleteObject(setting2);
plus.ios.deleteObject(NSURL2);
plus.ios.deleteObject(application2);
}
});
}
}
// #endif
// #ifdef MP-WEIXIN
wx.getSetting({
success: (res) => {
console.log(res,99);
if (!res.authSetting['scope.userLocation']) {
//打开提示框,提示前往设置页面
uni.showModal({
title:'为了更好的体验,请开启定位服务',
confirmText:'开启',
cancelText:'关闭',
success:(res)=> {
if(res.confirm) {
wx.openSetting({success (res) {}})
}
}
})
}
}
})
// #endif
},
// 更新用户地理位置 // 更新用户地理位置
locationTimer:null, locationTimer:null,
// 每十分钟调用一次 // 每十分钟调用一次
@ -104,10 +182,10 @@ const tools = {
}, },
// h5 // h5
getAddressH5(){ getAddressH5(){
uni.showLoading({ // uni.showLoading({
title: '定位中...', // title: '定位中...',
mask:true // mask:true
}); // });
uni.getLocation({ uni.getLocation({
type: 'gcj02', // wgs84 gcj02 type: 'gcj02', // wgs84 gcj02
altitude: true, altitude: true,
@ -116,7 +194,7 @@ const tools = {
let str = `output=jsonp&key=QNHBZ-55RKF-OMFJJ-NPU7O-EPSDH-ACBAA&location=${res.latitude},${res.longitude}` let str = `output=jsonp&key=QNHBZ-55RKF-OMFJJ-NPU7O-EPSDH-ACBAA&location=${res.latitude},${res.longitude}`
jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{ jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{
// console.log(res,'H5'); // console.log(res,'H5');
uni.hideLoading(); // uni.hideLoading();
if(res.status == 0){ if(res.status == 0){
// that.locationName = res.result.address; //当前定位 // that.locationName = res.result.address; //当前定位
let params = { let params = {
@ -149,7 +227,7 @@ const tools = {
if (res.code) { if (res.code) {
var params = {code:res.code} var params = {code:res.code}
uni.request({ uni.request({
url: `${app.globalData.hostapi}/api/user/login`, url: `${getApp().globalData.hostapi}/api/user/login`,
method: 'post', method: 'post',
data: params, data: params,
header: { header: {

View File

@ -1,6 +1,6 @@
{ {
"name" : "飞猴", "name" : "飞猴",
"appid" : "__UNI__C9AEDD9", "appid" : "__UNI__25FB71A",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",

View File

@ -1,11 +1,5 @@
{ {
"pages": [ { "pages": [{
"path": "pages/workOrder/punchCard",
"style": {
"navigationBarTitleText": "个人中心",
"navigationStyle": "custom" //
}
},{
"path": "pages/guide-page/guide-page", "path": "pages/guide-page/guide-page",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",

View File

@ -3,7 +3,7 @@
<statusNav returnColor="#c2c2c2" navBarTitle="客户(查询结果列表)"></statusNav> <statusNav returnColor="#c2c2c2" navBarTitle="客户(查询结果列表)"></statusNav>
<container-subgroup-two> <container-subgroup-two>
<view class="client-content" slot="content" style="margin: -20rpx -30rpx 0;"> <view class="client-content" slot="content" style="margin: -20rpx -30rpx 0;">
<view @tap="goDetail(index)" class="li" v-for="(item,index) in dataList" :key="index"> <view @tap="goDetail(item.id)" class="li" v-for="(item,index) in dataList" :key="index">
<view class="li-content"> <view class="li-content">
<view class=""> <view class="">
<view class="title">{{item.name}}</view> <view class="title">{{item.name}}</view>
@ -19,6 +19,7 @@
<view class="text">{{item.address}}</view> <view class="text">{{item.address}}</view>
</view> </view>
</view> </view>
<pitera v-if="total==dataList.length" textStr="暂无更多客户列表数据"></pitera>
</view> </view>
</container-subgroup-two> </container-subgroup-two>
</view> </view>
@ -26,75 +27,50 @@
<script> <script>
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue'; import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import pitera from '@/components/nothing/pitera.vue';
import statusNav from '../../components/status-nav.vue'; import statusNav from '../../components/status-nav.vue';
import {queryFun} from '../../jsFile/public-api.js'; import {queryFun} from '../../jsFile/public-api.js';
export default { export default {
components: { components: {
statusNav, statusNav,
containerSubgroupTwo containerSubgroupTwo,
pitera
}, },
data() { data() {
return { return {
dataList:[ dataList:[
{ // {
name:'湖南争鸣光电科技有限公司', // name:'',
code:"KH20220304-002", // code:"KH20220304-002",
icon:["弱电安防","弱电安防","弱电安防"], // icon:["","",""],
num:"12", // num:"12",
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205" // address:"1091205"
}, // }
{
name:'湖南争鸣光电科技有限公司',
code:"KH20220304-002",
icon:["弱电安防","弱电安防","弱电安防"],
num:"11",
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
},
{
name:'湖南争鸣光电科技有限公司',
code:"KH20220304-002",
icon:["弱电安防","弱电安防","弱电安防"],
num:"12",
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
},
{
name:'湖南争鸣光电科技有限公司',
code:"KH20220304-002",
icon:["弱电安防","弱电安防","弱电安防"],
num:"14",
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
},
{
name:'湖南争鸣光电科技有限公司',
code:"KH20220304-002",
icon:["弱电安防","弱电安防","弱电安防"],
num:"15",
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
},
{
name:'湖南争鸣光电科技有限公司',
code:"KH20220304-002",
icon:["弱电安防","弱电安防","弱电安防"],
num:"16",
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
},
], ],
list_rows:20, list_rows:20,
page:1, page:1,
total:0 total:0,
key_word:''//
}
},
onReachBottom() {
if(this.total != this.dataList.length) {
this.page++;
this.queryFunEv();
} }
}, },
onLoad(op) { onLoad(op) {
if(op.key_word!=undefined) { if(op.key_word!=undefined) {
this.key_word = op.key_word;
// //
this.queryFunEv(op.key_word); this.queryFunEv(this.key_word);
} }
}, },
methods: { methods: {
// //
goDetail(index){ goDetail(id){
uni.navigateTo({ uni.navigateTo({
url:'/pages/dataQuery/details' url:`/pages/dataQuery/details?id=${id}`
}) })
}, },
// //
@ -107,7 +83,23 @@
} }
queryFun(params).then(res=>{ queryFun(params).then(res=>{
if(res.code) { if(res.code) {
this.total = res.data.total;//
if(this.page==1) this.dataList = [];
if(res.data.data.length) {
res.data.data.forEach(item=>{
let obj = {
id:item.member_id,//id
name:item.name,//
code:item.serial_number,//
icon:["弱电安防","弱电安防","弱电安防"],
num:item.project_count,//
address:item.address//
}
this.dataList.push(obj);
})
}
} else {
this.$toolAll.tools.showToast(res.msg);
} }
}) })
} }

View File

@ -2,37 +2,22 @@
<view class="content"> <view class="content">
<statusNav returnColor="#c2c2c2" navBarTitle="(备品)查询结果"></statusNav> <statusNav returnColor="#c2c2c2" navBarTitle="(备品)查询结果"></statusNav>
<container-subgroup-two > <container-subgroup-two>
<view class="dataQuery-content" slot="content" style="margin: 0 -30rpx;"> <view class="dataQuery-content" slot="content" style="margin: 0 -30rpx;">
<view class="li"> <view class="li">
<view class="title mar-y120 clips1"> <view class="title mar-y120 clips1">项目名称湖南工业大学生化学院三楼会议室湖南工业大学生化学院三楼会议室</view>
项目名称湖南工业大学生化学院三楼会议室湖南工业大学生化学院三楼会议室
</view>
<view class="text-content"> <view class="text-content">
<view class="left"> <view class="left">
<view class="text clips1"> <view class="text clips1">核心品牌海康威视</view>
核心品牌海康威视 <view class="text clips1">规格型号DS-CK18FI-H</view>
</view> <view class="text clips1"> 2210122</view>
<view class="text clips1">
规格型号DS-CK18FI-H
</view>
<view class="text clips1">
2210122
</view>
</view> </view>
<view class="rigth"> <view class="rigth">
<view class="text"> <view class="text">备品数量<text class="cor">3</text></view>
备品数量<text class="cor">3</text> <view class="text cor1">备品尺寸320*160</view>
</view> <view class="text cor1">入库时间2021-04-06 16:45:45</view>
<view class="text cor1">
备品尺寸320*160
</view>
<view class="text cor1">
入库时间2021-04-06 16:45:45
</view> </view>
</view> </view>
</view>
<view class="icon" v-if="true"> <view class="icon" v-if="true">
<text class="icon-text">正常</text> <text class="icon-text">正常</text>
</view> </view>
@ -41,34 +26,19 @@
</view> </view>
</view> </view>
<view class="li"> <view class="li">
<view class="title"> <view class="title">项目名称湖南工业大学生化学院三楼会议室</view>
项目名称湖南工业大学生化学院三楼会议室
</view>
<view class="text-content"> <view class="text-content">
<view class="left"> <view class="left">
<view class="text"> <view class="text">核心品牌海康威视</view>
核心品牌海康威视 <view class="text">规格型号DS-CK18FI-H</view>
</view> <view class="text"> 2210122</view>
<view class="text">
规格型号DS-CK18FI-H
</view>
<view class="text">
2210122
</view>
</view> </view>
<view class="rigth"> <view class="rigth">
<view class="text"> <view class="text">备品数量<text class="cor">3</text></view>
备品数量<text class="cor">3</text> <view class="text cor1">备品尺寸320*160</view>
</view> <view class="text cor1">入库时间2021-04-06 16:45:45</view>
<view class="text cor1">
备品尺寸320*160
</view>
<view class="text cor1">
入库时间2021-04-06 16:45:45
</view> </view>
</view> </view>
</view>
<view class="icon" v-if="true"> <view class="icon" v-if="true">
<text class="icon-text">正常</text> <text class="icon-text">正常</text>
</view> </view>
@ -77,34 +47,19 @@
</view> </view>
</view> </view>
<view class="li"> <view class="li">
<view class="title"> <view class="title">项目名称湖南工业大学生化学院三楼会议室</view>
项目名称湖南工业大学生化学院三楼会议室
</view>
<view class="text-content"> <view class="text-content">
<view class="left"> <view class="left">
<view class="text"> <view class="text">核心品牌海康威视</view>
核心品牌海康威视 <view class="text">规格型号DS-CK18FI-H</view>
</view> <view class="text"> 2210122</view>
<view class="text">
规格型号DS-CK18FI-H
</view>
<view class="text">
2210122
</view>
</view> </view>
<view class="rigth"> <view class="rigth">
<view class="text"> <view class="text">备品数量<text class="cor">3</text></view>
备品数量<text class="cor">3</text> <view class="text cor1">备品尺寸320*160</view>
</view> <view class="text cor1">入库时间2021-04-06 16:45:45</view>
<view class="text cor1">
备品尺寸320*160
</view>
<view class="text cor1">
入库时间2021-04-06 16:45:45
</view> </view>
</view> </view>
</view>
<view class="icon" v-if="false"> <view class="icon" v-if="false">
<text class="icon-text">正常</text> <text class="icon-text">正常</text>
</view> </view>
@ -112,45 +67,75 @@
<text class="icon-text">待维保</text> <text class="icon-text">待维保</text>
</view> </view>
</view> </view>
<pitera v-if="total==dataList.length" textStr="暂无更多备品列表数据"></pitera>
</view> </view>
</container-subgroup-two > </container-subgroup-two>
</view> </view>
</template> </template>
<script> <script>
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue'; import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import statusNav from '../../components/status-nav.vue'; import statusNav from '../../components/status-nav.vue';
import {queryFun} from '../../jsFile/public-api.js'; import {
queryFun
} from '../../jsFile/public-api.js';
import pitera from '@/components/nothing/pitera.vue';
export default { export default {
components: { components: {
statusNav, statusNav,
containerSubgroupTwo containerSubgroupTwo,
pitera
}, },
data() { data() {
return { return {
list_rows:20, dataList: [],
page:1, list_rows: 20,
total:0 page: 1,
total: 0,
key_word: '' //
}
},
onReachBottom() {
if (this.total != this.dataList.length) {
this.page++;
this.queryFunEv();
} }
}, },
onLoad(op) { onLoad(op) {
if(op.key_word!=undefined) { if (op.key_word != undefined) {
this.key_word = op.key_word;
// () // ()
this.queryFunEv(op.key_word); this.queryFunEv();
} }
}, },
methods: { methods: {
// () // ()
queryFunEv(keyword){ queryFunEv() {
let params = { let params = {
type_id:3, type_id: 3,
keyword, keyword: this.key_word,
list_rows:this.list_rows, list_rows: this.list_rows,
page:this.page page: this.page
} }
queryFun(params).then(res=>{ queryFun(params).then(res => {
if(res.code) { if (res.code) {
this.total = res.data.total; //
if (this.page == 1) this.dataList = [];
// if(res.data.data.length) {
// res.data.data.forEach(item=>{
// let obj = {
// id:item.member_id,//id
// name:item.name,//
// code:item.serial_number,//
// icon:["","",""],
// num:item.project_count,//
// address:item.address//
// }
// this.projectQuery.push(obj);
// })
// }
} else {
this.$toolAll.tools.showToast(res.msg);
} }
}) })
} }
@ -159,8 +144,6 @@
</script> </script>
<style> <style>
.dataQuery-content { .dataQuery-content {
font-size: 24rpx; font-size: 24rpx;
color: #333333; color: #333333;

View File

@ -139,6 +139,7 @@
<script> <script>
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue'; import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import statusNav from '../../components/status-nav.vue'; import statusNav from '../../components/status-nav.vue';
import {queryDetail} from '@/jsFile/public-api.js';
export default { export default {
components: { components: {
statusNav, statusNav,
@ -159,9 +160,28 @@
}, },
projectList:[], projectList:[],
clientId:''//id
}
},
onLoad(op){
if(op.id!=undefined) {
this.clientId = op.id;
console.log(this.clientId);
//
this.queryDetailEv();
} }
}, },
methods: { methods: {
//
queryDetailEv(){
queryDetail({type_id:1,member_id:this.clientId}).then(res=>{
if(res.code) {
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
},
getData(){ getData(){
}, },

View File

@ -6,253 +6,141 @@
<view class="head-top"> <view class="head-top">
<view class="details-head"> <view class="details-head">
<view class="swiper-head"> <view class="swiper-head">
<swiper class="swiper" @change="changeAutoplay" :autoplay="autoplay" :interval="interval"> <swiper class="swiper" @change="changeAutoplay" :autoplay="autoplay" :interval="interval" circular>
<swiper-item> <swiper-item v-for="(item,index) in projectObj.completed_img" :key="index">
<view class="swiper-item uni-bg-red"> <view class="swiper-item uni-bg-red">
<image class="img" src="../../static/del/img001.png" mode="aspectFill"></image> <image class="img" :src="item" mode="aspectFill"></image>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-red">
<image class="img" src="../../static/del/img001.png" mode="aspectFill"></image>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-red">
<image class="img" src="../../static/del/img001.png" mode="aspectFill"></image>
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="indication-point fon24 disjcac">{{index}}/{{imgNum}}</view>
<view class="indication-point ">
{{index}}/3
</view> </view>
<view class="title">{{projectObj.project_name}}</view>
</view> <view class="code">{{projectObj.project_number}}</view>
<view class="title">
湖南工业大学生化学院会议室P2.5全彩LED显示屏
</view>
<view class="code">
XM20220108-1001
</view>
<view class="address"> <view class="address">
<image class="img" src="../../static/iocn/im.png" mode=""></image> <image class="img" src="../../static/iocn/im.png" mode=""></image>
<view class="text"> <view class="text">{{projectObj.address}}</view>
湖南省长沙市高新开发区谷园路109号像素大厦1205
</view> </view>
</view> </view>
</view>
<view class="last-date"> <view class="last-date">
<view class="last-date-content"> <view class="last-date-content">
<image class="icon" src="../../static/iocn/gzzt.png" mode=""></image> <image class="icon" src="../../static/iocn/gzzt.png" mode=""></image>
<view class="text"> <view class="text">最近一次维保时间{{projectObj.downtime}}</view>
最近一次维保时间2021-11-18 170016
</view> </view>
</view> </view>
</view> </view>
</view>
<view class="project-message-title"> <view class="project-message-title">
<view class="icon"> <view class="icon"></view>
<view class="text">项目概况</view>
</view>
<view class="text">
项目概况
</view>
</view> </view>
<view class="project-message-content"> <view class="project-message-content">
<view class="li"> <view class="li">
<view class="title-one"> <view class="title-one">客户名称</view>
客户名称 <view class="text">上海弘焱电子科技有限公司</view>
</view>
<view class="text">
上海弘焱电子科技有限公司
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title-one"> <view class="title-one">竣工日期</view>
竣工日期 <view class="text">2022/2/26</view>
</view>
<view class="text">
2022/2/26
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title-one"> <view class="title-one">质保年限</view>
质保年限 <view class="text">1 </view>
</view>
<view class="text">
1
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title-one"> <view class="title-one">产品品类</view>
产品品类 <view class="text">单色LED屏</view>
</view>
<view class="text">
单色LED屏
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title-one"> <view class="title-one">品牌</view>
品牌 <view class="text">海康威视</view>
</view>
<view class="text">
海康威视
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title-one"> <view class="title-one">维保次数</view>
<view class="text">4 </view>
维保次数
</view>
<view class="text">
4
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title"> <view class="title">规格型号</view>
规格型号 <view class="text">DS-CK15FI</view>
</view>
<view class="text">
DS-CK15FI
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title"> <view class="title">尺寸</view>
尺寸 <view class="text">4.57m*2.88m</view>
</view>
<view class="text">
4.57m*2.88m
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title"> <view class="title">合同类型</view>
合同类型 <view class="text">制作安装</view>
</view>
<view class="text">
制作安装
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title"> <view class="title">合同开始</view>
合同开始 <view class="text"> 2021/02/26</view>
</view>
<view class="text">
2021/02/26
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title"> <view class="title">合同结束</view>
合同结束 <view class="text">2021/02/2</view>
</view>
<view class="text">
2021/02/2
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title"> <view class="title">应用场景 </view>
应用场景 </view> <view class="text">会议室</view>
<view class="text">
会议室
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title"> <view class="title">安装位置</view>
安装位置 <view class="text">地下负二层总控电机室</view>
</view>
<view class="text">
地下负二层总控电机室
</view>
</view> </view>
</view> </view>
<view class="project-message-title"> <view class="project-message-title">
<view class="icon"> <view class="icon"></view>
<view class="text">项目材料</view>
</view>
<view class="text">
项目材料
</view>
</view> </view>
<view class="project-materials-content"> <view class="project-materials-content">
<view class="project-materials-title"> <view class="project-materials-title">
<view class="text"> <view class="text">名称</view>
名称 <view class="text">品牌</view>
</view> <view class="text">型号</view>
<view class="text"> <view class="text">批次</view>
品牌 <view class="text">尺寸</view>
</view> <view class="text">数量</view>
<view class="text">
型号
</view>
<view class="text">
批次
</view>
<view class="text">
尺寸
</view>
<view class="text">
数量
</view>
</view> </view>
<view class="project-materials-text"> <view class="project-materials-text">
<view class="text"> <view class="text">接收卡</view>
接收卡 <view class="text">卡莱特</view>
</view> <view class="text">5A-75E</view>
<view class="text"> <view class="text">1033876</view>
卡莱特 <view class="text">*</view>
</view> <view class="text">1</view>
<view class="text">
5A-75E
</view>
<view class="text">
1033876
</view>
<view class="text">
*
</view>
<view class="text">
1
</view>
</view> </view>
</view> </view>
<view class="record-nav"> <view class="record-nav">
<view class="li" @click="recordNav(index)" :class="item.state?'on':''" v-for="(item,index) in recordState"> <view class="li" @click="recordNav(index)" :class="item.state?'on':''"
v-for="(item,index) in recordState">
{{item.title}} {{item.title}}
</view> </view>
</view> </view>
<view class="record-content"> <view class="record-content">
<view class="title"> <view class="title">过程追踪</view>
过程追踪
</view>
<view class="list"> <view class="list">
<view class="li pad-z40 fon27 col9" :class="index==0 ? 'activeTrack' : ''" v-for="(item,index) in 10" :key="index"> <view class="li pad-z40 fon27 col9" :class="index==0 ? 'activeTrack' : ''" v-for="(item,index) in recordList" :key="index">
<view class="disac fw line-h60"> <view class="disac fw line-h60">
<view class="text">部分模组不显示维保陈志远已处理</view> <view class="text">{{item.time_line}}</view>
<view class="date">2020-05-15 16:00</view> <!-- <view class="date">2020-05-15 16:00</view> -->
</view> </view>
</view> </view>
<pitera v-if="recordList.length==0" :textStr="nomoreText"></pitera>
</view> </view>
</view> </view>
</view> </view>
</container-subgroup-two> </container-subgroup-two>
</view> </view>
</template> </template>
<script> <script>
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue'; import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import statusNav from "../../components/status-nav.vue" import statusNav from "../../components/status-nav.vue"
import pitera from '@/components/nothing/pitera.vue';
export default { export default {
components: { components: {
statusNav, statusNav,
containerSubgroupTwo containerSubgroupTwo,
pitera
}, },
data() { data() {
return { return {
@ -271,19 +159,70 @@
title: '巡检记录', title: '巡检记录',
state: false state: false
}, },
] ],
projectObj:'',
imgNum:0,//
typeId:1,// 1 2: 3:
list_rows:200,
page:1,
recordList:[],//
nomoreText:'',
projectId: "",//id
}
},
onLoad(op) {
if(op.id!=undefined) {
this.projectId = op.id
this.getData(this.projectId);
this.getRecord();
} }
}, },
methods: { methods: {
//
getRecord(){
let params = {
project_id: this.projectId,
type_id: this.typeId, // 1 2: 3:
list_rows: this.list_rows,
page:this.page
}
this.$requst.get('/universal/api.project/recording',params).then(res=>{
if(res.code) {
/**
* {
* time_line:''
* }
*/
this.recordList = res.data.data;
} else {
this.nomoreText = res.msg;
}
})
},
changeAutoplay(data) { changeAutoplay(data) {
console.log()
this.index = data.detail.current - 0 + 1 this.index = data.detail.current - 0 + 1
}, },
getData(id) {
this.$requst.get('/universal/api.project/project_info', {
project_id: id,
}).then(res => {
if (res.code) {
this.projectObj = res.data;
this.imgNum = this.projectObj.completed_img.length;
} else {
}
})
},
recordNav(index) { recordNav(index) {
if(index==0) this.typeId = 1;
if(index==1) this.typeId = 2;
if(index==2) this.typeId = 3;
for (var i = 0; i < this.recordState.length; i++) { for (var i = 0; i < this.recordState.length; i++) {
this.recordState[i].state = false this.recordState[i].state = false
} }
this.recordState[index].state = true this.recordState[index].state = true
this.getRecord();
} }
} }
} }
@ -504,6 +443,7 @@
border-left: 2rpx solid #999999; border-left: 2rpx solid #999999;
} }
.record-content .list .li::before { .record-content .list .li::before {
content: ''; content: '';
display: block; display: block;
@ -514,18 +454,21 @@
background-color: #999999; background-color: #999999;
border-radius: 100%; border-radius: 100%;
} }
.record-content .list .activeTrack { .record-content .list .activeTrack {
color: #0084ff; color: #0084ff;
padding-top: 0rpx; padding-top: 0rpx;
} }
.record-content .list .activeTrack::before { .record-content .list .activeTrack::before {
background-color: rgba(0,132,255,.5); background-color: rgba(0, 132, 255, .5);
top: -4rpx; top: -4rpx;
width: 22rpx; width: 22rpx;
height: 22rpx; height: 22rpx;
left: -12rpx; left: -12rpx;
z-index: 1; z-index: 1;
} }
.record-content .list .activeTrack::after { .record-content .list .activeTrack::after {
content: ''; content: '';
display: block; display: block;
@ -537,13 +480,16 @@
background-color: #999999; background-color: #999999;
border-radius: 100%; border-radius: 100%;
} }
.record-content .list .activeTrack .line-h60 { .record-content .list .activeTrack .line-h60 {
margin-top: -26rpx; margin-top: -26rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.record-content .list .date { .record-content .list .date {
margin-left: 20rpx; margin-left: 20rpx;
} }
.project-materials-title { .project-materials-title {
display: flex; display: flex;
color: #00a2e9; color: #00a2e9;
@ -574,5 +520,4 @@
width: 16%; width: 16%;
text-align: center; text-align: center;
} }
</style> </style>

View File

@ -4,7 +4,7 @@
<container-subgroup-two> <container-subgroup-two>
<view slot="content" style="margin: 0 -30rpx;"> <view slot="content" style="margin: 0 -30rpx;">
<view class="project-list"> <view class="project-list">
<view class="li" @click="projectDetailsFun()" v-for="(item,index) in projectQuery"> <view class="li" @click="projectDetailsFun(item.id)" v-for="(item,index) in projectQuery" :key="index">
<view class="message pad-s10"> <view class="message pad-s10">
<image class="img" src="../../static/del/img001.png" mode="aspectFill"></image> <image class="img" src="../../static/del/img001.png" mode="aspectFill"></image>
<view class="text"> <view class="text">
@ -23,14 +23,10 @@
<view class="date">{{item.date}}</view> <view class="date">{{item.date}}</view>
</view> </view>
<view class="icon iconBer" v-if="item.state==0"></view> <view class="icon iconBer" v-if="item.state==0"></view>
<view class="icon iconBera" v-if="item.state==1"> <view class="icon iconBera" v-if="item.state==1"></view>
质保中 <view class="icon iconBerb" v-if="item.state==2"></view>
</view> </view>
<view class="icon iconBerb" v-if="item.state==2"> <pitera v-if="total==projectQuery.length" textStr="暂无更多项目列表数据"></pitera>
临时项目
</view>
</view>
</view> </view>
</view> </view>
</container-subgroup-two> </container-subgroup-two>
@ -41,20 +37,19 @@
import statusNav from '../../components/status-nav.vue'; import statusNav from '../../components/status-nav.vue';
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue'; import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import {queryFun} from '../../jsFile/public-api.js'; import {queryFun} from '../../jsFile/public-api.js';
import pitera from '@/components/nothing/pitera.vue';
export default { export default {
components:{ components:{
containerSubgroupTwo, containerSubgroupTwo,
statusNav statusNav,
pitera
}, },
data() { data() {
return { return {
dataPage:{
page:1,
list_rows:20
},
projectQuery: [ projectQuery: [
{ {
id:1,
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏", name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png", img: "../../static/del/img001.png",
code: "20220108-1001", code: "20220108-1001",
@ -65,85 +60,60 @@
date: "2022/01/08", date: "2022/01/08",
state: 1 state: 1
}, }
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 2
},
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 2
},
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 1
},
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 0
},
], ],
list_rows:20, list_rows:20,
page:1, page:1,
total:0 total:0,
key_word:''//
}
},
onReachBottom() {
if(this.total!=this.projectQuery.length) {
this.page++;
this.queryFunEv();
} }
}, },
onLoad(op) { onLoad(op) {
if(op.key_word!=undefined) { if(op.key_word!=undefined) {
this.key_word = op.key_word;
// () // ()
this.queryFunEv(op.key_word); this.queryFunEv();
} }
}, },
methods: { methods: {
projectDetailsFun(){ projectDetailsFun(id){
uni.navigateTo({ uni.navigateTo({
url:"/pages/dataQuery/projectDetails" url:`/pages/dataQuery/projectDetails?id=${id}`
}) })
}, },
// () // ()
queryFunEv(){ queryFunEv(){
let params = { let params = {
type_id:2, type_id:2,
keyword, keyword:this.key_word,
list_rows:this.list_rows, list_rows:this.list_rows,
page:this.page page:this.page
} }
queryFun(params).then(res=>{ queryFun(params).then(res=>{
if(res.code) { if(res.code) {
this.total = res.data.total;//
if(this.page==1) this.projectQuery = [];
// if(res.data.data.length) {
// res.data.data.forEach(item=>{
// let obj = {
// id:item.member_id,//id
// name:item.name,//
// code:item.serial_number,//
// icon:["","",""],
// num:item.project_count,//
// address:item.address//
// }
// this.projectQuery.push(obj);
// })
// }
} else {
this.$toolAll.tools.showToast(res.msg);
} }
}) })
}, },

View File

@ -52,7 +52,6 @@
import footTabOne from "../../components/foot-tabs/foot-tab-one.vue" import footTabOne from "../../components/foot-tabs/foot-tab-one.vue"
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue'; import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import { uploadImg } from '@/jsFile/public-api.js'; import { uploadImg } from '@/jsFile/public-api.js';
const app = getApp();
export default { export default {
components: { components: {
footTabOne, footTabOne,
@ -181,6 +180,7 @@
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
padding: 0 40rpx; padding: 0 40rpx;
box-sizing: border-box;
border-top: 2rpx solid #EAEAEA; border-top: 2rpx solid #EAEAEA;
border-bottom: 2rpx solid #EAEAEA; border-bottom: 2rpx solid #EAEAEA;
background-color: #FFFFFF; background-color: #FFFFFF;

View File

@ -23,9 +23,9 @@
</view> </view>
</view> </view>
<view class="padding"> <view class="padding">
<view class="devicename" @click="scanCodeFun()" v-if="navDataState[0].state"> <view class="devicename" v-if="navDataState[0].state">
<view class="">请填写设备名称和型号或扫描二维码</view> <input type="text" class="fon28 width100" v-model="data.device_name" placeholder="请填写设备名称和型号或扫描二维码" />
<image class="sm" src="../../static/iocn/sm.png" lazy-load mode=""></image> <image @click="scanCodeFun()" class="sm flexs" src="../../static/iocn/sm.png" lazy-load mode=""></image>
</view> </view>
<input v-model="data.device_name" class="devicename" placeholder="请填写设备名称和型号(例:华为LED" v-else /> <input v-model="data.device_name" class="devicename" placeholder="请填写设备名称和型号(例:华为LED" v-else />
<view class="fault-pictures radius10" @click="chooseImg"> <view class="fault-pictures radius10" @click="chooseImg">
@ -172,17 +172,21 @@
}, },
submitButton() { submitButton() {
this.data.fault_type = this.faultTypeData[this.indexType].id this.data.fault_type = this.faultTypeData[this.indexType].id
if (this.data.is_device == 0) { // if (this.data.is_device == 0) {
// if (!this.data.device_name) {
// this.$toolAll.tools.showToast("");
// return
// }
// } else {
// if (!this.data.project_number) {
// this.$toolAll.tools.showToast("");
// return
// }
// }
if (!this.data.device_name) { if (!this.data.device_name) {
this.$toolAll.tools.showToast("请填写设备名称或型号"); this.$toolAll.tools.showToast("请填写设备名称或型号");
return return
} }
} else {
if (!this.data.project_number) {
this.$toolAll.tools.showToast("请扫描设备二维码");
return
}
}
if (!this.data.username) { if (!this.data.username) {
this.$toolAll.tools.showToast("请填写您的姓名"); this.$toolAll.tools.showToast("请填写您的姓名");
return return

View File

@ -234,7 +234,6 @@
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue'; import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue'; import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import {getPlanType} from '@/jsFile/public-api.js'; import {getPlanType} from '@/jsFile/public-api.js';
const app = getApp();
export default { export default {
components:{ components:{
pitera, pitera,
@ -246,11 +245,11 @@
}, },
data() { data() {
return { return {
role: 1, // 1 2: 3: 4 // role: 1, // 1 2: 3: 4
// role: uni.getStorageSync('type_id'), // 1 2: 3: 4 role: uni.getStorageSync('type_id'), // 1 2: 3: 4
statusHeight: uni.getSystemInfoSync().statusBarHeight + 50, statusHeight: uni.getSystemInfoSync().statusBarHeight + 50,
messageNumber: 0 ,// messageNumber: 0 ,//
noticeList:[{id:1,title:'2021年11月06日公司团建维保服务暂停一天服务暂停一天服务暂停一天。一天服务暂停一天服务暂停一天。'}],// noticeList:[{id:1,title:'系统正在维护中...'}],//
// //
repairList:[ repairList:[
{imgsrc:'/static/public/icon-home-repair.png',title:'报修'}, {imgsrc:'/static/public/icon-home-repair.png',title:'报修'},
@ -280,27 +279,27 @@
// //
projectRepairList:[ projectRepairList:[
{imgsrc:'/static/public/icon-home-staySingle.png',title:'待接单',num:0,id:2}, {imgsrc:'/static/public/icon-home-staySingle.png',title:'待接单',num:0,id:2},
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待执行',num:99,id:0}, {imgsrc:'/static/public/icon-home-stayImplement.png',title:'待执行',num:0,id:0},
{imgsrc:'/static/public/icon-home-repairIng.png',title:'维保中',num:6,id:4}, {imgsrc:'/static/public/icon-home-repairIng.png',title:'维保中',num:0,id:4},
], ],
// //
workOrderList:[ workOrderList:[
{imgsrc:'/static/public/icon-home-abnormalSingle.png',title:'异常单',num:0,id:100}, {imgsrc:'/static/public/icon-home-abnormalSingle.png',title:'异常单',num:0,id:100},
{imgsrc:'/static/public/icon-home-overdueSingle.png',title:'逾期单',num:0,id:101}, {imgsrc:'/static/public/icon-home-overdueSingle.png',title:'逾期单',num:0,id:101},
{imgsrc:'/static/public/icon-home-overtime.png',title:'超时单 ',num:0,id:0}, {imgsrc:'/static/public/icon-home-overtime.png',title:'超时单 ',num:0,id:0},
{imgsrc:'/static/public/icon-home-workOrderPool.png',title:'工单池',num:6,id:0}, {imgsrc:'/static/public/icon-home-workOrderPool.png',title:'工单池',num:0,id:0},
], ],
// //
settlementList:[ settlementList:[
{imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0,id:5}, {imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0,id:5},
{imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:6,id:7}, {imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:0,id:7},
{imgsrc:'/static/public/icon-home-commission.png',title:'佣金',num:0,id:5}, {imgsrc:'/static/public/icon-home-commission.png',title:'佣金',num:0,id:5},
], ],
// //
stayWorkOrderList:[ stayWorkOrderList:[
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待受理',num:0,id:0}, {imgsrc:'/static/public/icon-home-stayImplement.png',title:'待受理',num:0,id:0},
{imgsrc:'/static/public/icon-home-stayAssign.png',title:'待指派',num:6,id:0}, {imgsrc:'/static/public/icon-home-stayAssign.png',title:'待指派',num:0,id:0},
{imgsrc:'/static/public/icon-home-stayRepair.png',title:'待维保',num:6,id:3}, {imgsrc:'/static/public/icon-home-stayRepair.png',title:'待维保',num:0,id:3},
{imgsrc:'/static/public/icon-home-returnVisit.png',title:'待回访',num:0,id:8}, {imgsrc:'/static/public/icon-home-returnVisit.png',title:'待回访',num:0,id:8},
], ],
// //
@ -336,7 +335,6 @@
this.getIncrementServiceType(); this.getIncrementServiceType();
// //
this.getFaultsList(); this.getFaultsList();
}, },
methods: { methods: {
// //

View File

@ -40,7 +40,7 @@
</view> </view>
<view class="li"> <view class="li">
<view class="title">维保类型</view> <view class="title">维保类型</view>
<input type="text" class="input" :value="detailObj.fault_type" /> <input type="text" disabled class="input" :value="detailObj.fault_type" />
</view> </view>
<view class="li"> <view class="li">
<view class="title">紧急程度</view> <view class="title">紧急程度</view>

View File

@ -84,7 +84,7 @@
<view>{{serviceModeList[serviceModeIndex].name}}</view> <view>{{serviceModeList[serviceModeIndex].name}}</view>
</picker> </picker>
</view> </view>
<view class="li"> <view class="li" @tap="getAddress">
<view class="title flexs">定位地址</view> <view class="title flexs">定位地址</view>
<input type="text" disabled class="input" :value="targetObj.address" /> <input type="text" disabled class="input" :value="targetObj.address" />
</view> </view>
@ -181,7 +181,8 @@ var qqmapsdk = new QQMapWX({
],// ],//
serviceModeIndex:0,// serviceModeIndex:0,//
flag:true, flag:true,
temporaryImg:[]//id temporaryImg:[],//id
addressFlag:true
} }
}, },
onShow() { onShow() {
@ -193,16 +194,71 @@ var qqmapsdk = new QQMapWX({
this.orderId = op.id; this.orderId = op.id;
this.handleWorkOrderGet(this.orderId); this.handleWorkOrderGet(this.orderId);
} }
this.getProductType(); //
this.getFaultType(); this.getAddress();
this.getAddressH5();
}, },
methods: { methods: {
// // app
getAddress() { getAddress(){
this.$toolAll.tools.showToast('正在获取定位...')
// #ifdef APP-PLUS
if(this.addressFlag) {
this.addressFlag = false;
uni.getLocation({
type: 'gcj02',
geocode:true,
success: (res)=> {
this.$toolAll.tools.showToast('定位成功');
// console.log(res,'app');
this.targetObj.address = `${res.address.province}${res.address.city}${res.address.district}${res.address.street || ''}${res.address.streetNum || ''}${res.address.poiName || ''}`
setTimeout(()=>{
this.addressFlag = true;
},2000)
}
});
} else {
this.$toolAll.tools.showToast('请勿重复获取定位...')
}
// #endif
// #ifdef MP-WEIXIN
this.getAddressWx();
// #endif
// #ifdef H5
this.getAddressH5();
// #endif
},
//
getAddressWx(){
if(this.addressFlag) {
this.addressFlag = false;
uni.getLocation({
type: 'gcj02',
geocode:true,
success: (res)=> {
// console.log(res,'');
qqmapsdk.reverseGeocoder({
location: {latitude: res.latitude, longitude: res.longitude},
success:(res)=> {
console.log(res,'WX');
this.$toolAll.tools.showToast('定位成功');
this.targetObj.address = `${res.result.address_component.province}${res.result.address_component.city}${res.result.address_component.district}${res.result.address_component.street || ''}(${res.result.address_component.street_number || ''})`
setTimeout(()=>{
this.addressFlag = true;
},2000)
},
fail(err) {
console.log(err)
}
})
}
});
} else {
this.$toolAll.tools.showToast('请勿重复获取定位...')
}
}, },
getAddressH5(){ getAddressH5(){
if(this.addressFlag) {
this.addressFlag = false;
uni.getLocation({ uni.getLocation({
type: 'gcj02',//wgs84 gcj02 type: 'gcj02',//wgs84 gcj02
altitude: true, altitude: true,
@ -211,10 +267,17 @@ var qqmapsdk = new QQMapWX({
let str = `output=jsonp&key=QNHBZ-55RKF-OMFJJ-NPU7O-EPSDH-ACBAA&location=${res.latitude},${res.longitude}` let str = `output=jsonp&key=QNHBZ-55RKF-OMFJJ-NPU7O-EPSDH-ACBAA&location=${res.latitude},${res.longitude}`
jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{ jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{
console.log(res,'H5'); console.log(res,'H5');
this.$toolAll.tools.showToast('定位成功');
this.targetObj.address = `${res.result.address_component.province}${res.result.address_component.city}${res.result.address_component.district}${res.result.address_component.street || ''}(${res.result.address_component.street_number || ''})` this.targetObj.address = `${res.result.address_component.province}${res.result.address_component.city}${res.result.address_component.district}${res.result.address_component.street || ''}(${res.result.address_component.street_number || ''})`
setTimeout(()=>{
this.addressFlag = true;
},2000)
}) })
} }
}); });
} else {
this.$toolAll.tools.showToast('请勿重复获取定位...')
}
}, },
// //
changePicker(index,e) { changePicker(index,e) {
@ -312,6 +375,8 @@ var qqmapsdk = new QQMapWX({
this.getProductType(); this.getProductType();
// //
this.getFaultType(); this.getFaultType();
//
// this.getServiceMode()
} }
}) })
}, },
@ -341,8 +406,8 @@ var qqmapsdk = new QQMapWX({
uni.setStorageSync('targetObj',this.targetObj); uni.setStorageSync('targetObj',this.targetObj);
let params = { let params = {
steps:1, steps:1,
order_id:this.orderId || 14,//id order_id:this.orderId,//id
start_address:'四川省成都市成华区',// start_address:this.targetObj.address,//
product_type:this.productTypeList[this.productIndex].id,// product_type:this.productTypeList[this.productIndex].id,//
installation_location:this.targetObj.installLocation,// installation_location:this.targetObj.installLocation,//
fault_type:this.faultTypeList[this.faultIndex].id,// fault_type:this.faultTypeList[this.faultIndex].id,//

View File

@ -39,7 +39,7 @@
<view class="text disjb fc" style="height: 180rpx;"> <view class="text disjb fc" style="height: 180rpx;">
<view class="title flexs"> <view class="title flexs">
<view class="text clips1">{{item.project_name}}</view> <view class="text clips1">{{item.project_name}}</view>
<view class="icon" :style="{backgroundColor: item.btn.attributes.color}">{{item.btn.attributes.text}}</view> <view class="icon" :style="{backgroundColor: item.btn.attributes.color || '#DDDDDD'}">{{item.btn.attributes.text}}</view>
</view> </view>
<view class="disjb fc line-h38" style="margin-left: -20rpx;"> <view class="disjb fc line-h38" style="margin-left: -20rpx;">
<view class="serial-number scal09"> <view class="serial-number scal09">
@ -65,6 +65,7 @@
</view> </view>
</view> </view>
</view> </view>
<pitera v-if="total==dataList.length && dataList.length!=0" textStr="暂无更多列表数据"></pitera>
</view> </view>
<nothing-page v-if="dataList.length==0" content="暂无更多列表数据" currentType="0"></nothing-page> <nothing-page v-if="dataList.length==0" content="暂无更多列表数据" currentType="0"></nothing-page>
</view> </view>
@ -77,11 +78,13 @@
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue'; import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import statusNav from '../../components/status-nav.vue'; import statusNav from '../../components/status-nav.vue';
import footTabOne from "../../components/foot-tabs/foot-tab-one.vue" import footTabOne from "../../components/foot-tabs/foot-tab-one.vue"
import pitera from '@/components/nothing/pitera.vue';
export default { export default {
components: { components: {
footTabOne, footTabOne,
statusNav, statusNav,
containerSubgroupTwo containerSubgroupTwo,
pitera
}, },
data() { data() {
const currentDate = this.getDate({ const currentDate = this.getDate({
@ -356,7 +359,6 @@
border-radius: 50rpx; border-radius: 50rpx;
color: #FFFFFF; color: #FFFFFF;
display: flex;justify-content: center;align-items: center; display: flex;justify-content: center;align-items: center;
line-height: 40rpx;
} }
.project-list .li .message .text .title .icon1 { .project-list .li .message .text .title .icon1 {

View File

@ -51,12 +51,13 @@
<view class="li"> <view class="li">
<view class="text flexs">其他费用</view> <view class="text flexs">其他费用</view>
<view class="price disac"> <view class="price disac">
<input class="tright fon28" type="digit" v-model="detailObj.otherCost" placeholder="0.00" /> <input @input="otherInput" class="tright fon28" type="digit" v-model="detailObj.otherCost" placeholder="0.00" />
</view> </view>
</view> </view>
</view> </view>
<view class="total-price"> <view class="total-price">
费用合计<text class="money">{{totalPrice}}</text> <!-- 费用合计<text class="money">{{totalPrice}}</text> -->
费用合计<text class="money">{{allPrice}}</text>
</view> </view>
<picker @change="bindPickerChange" :value="paymentModeIndex" :range="array"> <picker @change="bindPickerChange" :value="paymentModeIndex" :range="array">
<view class="serve-date"> <view class="serve-date">
@ -179,11 +180,13 @@
array: ['微信', '支付宝', '银行转账'], array: ['微信', '支付宝', '银行转账'],
paymentModeIndex:0, paymentModeIndex:0,
serviceTime:'' ,// serviceTime:'' ,//
allPrice:'0.00',//
detailObj:{ detailObj:{
doorToDoorFee:'120.09', doorToDoorFee:'0.00',//
taxes:'120.20', taxes:'0.00',
materialCost:'120.02', materialCost:'0.00',//
otherCost:'', otherCost:'',//
taxRate:10,//
address:'湖南省株洲市荷塘区红旗中路456号(五矿二十三冶)', address:'湖南省株洲市荷塘区红旗中路456号(五矿二十三冶)',
collectionCode:[ collectionCode:[
'/static/del/500478055.png', '/static/del/500478055.png',
@ -221,7 +224,7 @@
} else { } else {
taxesResult = this.$toolAll.tools.operationEv(this.detailObj.doorToDoorFee,this.detailObj.materialCost,'+',2); taxesResult = this.$toolAll.tools.operationEv(this.detailObj.doorToDoorFee,this.detailObj.materialCost,'+',2);
taxesResult = this.$toolAll.tools.operationEv(taxesResult,this.detailObj.otherCost,'+',2); taxesResult = this.$toolAll.tools.operationEv(taxesResult,this.detailObj.otherCost,'+',2);
taxesResult = this.$toolAll.tools.operationEv(taxesResult,0.1,"*",2); taxesResult = this.$toolAll.tools.operationEv(taxesResult,this.detailObj.taxRate,"*",2);
} }
return taxesResult; return taxesResult;
} }
@ -243,14 +246,39 @@
this.orderId = op.id; this.orderId = op.id;
// //
this.handleWorkOrderGet(this.orderId); this.handleWorkOrderGet(this.orderId);
//
this.priceEv();
} }
this.handleWorkOrderGet(); this.handleWorkOrderGet();
}, },
methods: { methods: {
//
otherInput() {
this.priceEv();
},
//
priceEv(){
let params = {
order_id:this.orderId,//id
settlement_type:[1,2,3,4][this.currentWay],//
invoice_type:[3,2,1][this.billingIndex],//
other_price:this.detailObj.otherCost || 0,//
}
this.$requst.post('/universal/api.order/compute_cost',params).then(res=>{
if(res.code) {
this.detailObj.doorToDoorFee = parseFloat(res.data.artificial_price);///
this.detailObj.taxRate = parseFloat(res.data.tax_rate)/100;//
this.detailObj.materialCost = parseFloat(res.data.material_price);//
this.allPrice = res.data.pay_price;//
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
},
// //
handleWorkOrderGet(id){ handleWorkOrderGet(id){
let params = { let params = {
order_id:14, order_id:this.orderId,
steps:3 steps:3
} }
handleWorkOrderGet(params).then(res=>{ handleWorkOrderGet(params).then(res=>{
@ -268,23 +296,20 @@
order_id:this.orderId, order_id:this.orderId,
steps:3, steps:3,
settlement_type:[1,2,3,4][this.currentWay],//1 2 3 4 settlement_type:[1,2,3,4][this.currentWay],//1 2 3 4
c:this.detailObj.doorToDoorFee,
d:this.detailObj.taxes,
e:this.detailObj.materialCost,
f:this.detailObj.otherCost,
g:this.totalPrice,
pay_type:[1,2,3][this.paymentModeIndex],//1 2 3 pay_type:[1,2,3][this.paymentModeIndex],//1 2 3
invoice_type:[3,2,1][this.billingIndex],//3 2 1 invoice_type:[3,2,1][this.billingIndex],//3 2 1
is_collection:this.isMoney ? 1 : 0,// is_collection:this.isMoney ? 1 : 0,//
signature:this.signId,//id signature:this.signId || 62,//id
settlement_address:this.detailObj.address,
settlement_remark:this.remarkText// settlement_remark:this.remarkText//
} }
console.log(params);
handleWorkOrderSubmit(params).then(res=>{ handleWorkOrderSubmit(params).then(res=>{
if(res.code) { if(res.code) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/workOrder/workorderTwo?id=${this.orderId}` url: `/pages/workOrder/workorderTwo?id=${this.orderId}`
}) })
} else {
this.$toolAll.tools.showToast(res.msg);
} }
this.flag = true; this.flag = true;
}) })
@ -314,6 +339,8 @@
}, },
clearingFormFun(index) { clearingFormFun(index) {
this.currentWay = index; this.currentWay = index;
//
this.priceEv();
}, },
bindPickerChange(data) { bindPickerChange(data) {
this.paymentModeIndex = data.detail.value; this.paymentModeIndex = data.detail.value;
@ -327,6 +354,8 @@
this.billingIndex = index; this.billingIndex = index;
// this.conversionEv(); // this.conversionEv();
} }
//
this.priceEv();
}, },
// //
// conversionEv(){ // conversionEv(){

View File

@ -27,7 +27,6 @@
</template> </template>
<script> <script>
const app = getApp();
export default { export default {
data() { data() {
return { return {
@ -49,7 +48,7 @@
if(res.code){ if(res.code){
let userData = res.data; let userData = res.data;
if(userData.avatar) { if(userData.avatar) {
this.userImg = app.globalData.hostapi + '/' + userData.avatar; this.userImg = userData.avatar;
} }
this.userId = userData.id; this.userId = userData.id;
this.userName = userData.name; this.userName = userData.name;