新增检测app小程序是否开启GPS定位服务,并前往开启,调取费用计算接口、调用查询功能的(客户、项目、备品)列表查询,详情查询接口
parent
8dbd9af5b9
commit
49899aa8ed
6
App.vue
6
App.vue
|
@ -16,8 +16,8 @@
|
|||
this.globalData.hostapi = 'https://7and5.cn';
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
// this.globalData.hostapi = 'https://7and5.cn';
|
||||
this.globalData.hostapi = '/web';
|
||||
this.globalData.hostapi = 'https://7and5.cn';
|
||||
// this.globalData.hostapi = '/web';
|
||||
// #endif
|
||||
},
|
||||
onShow: function() {
|
||||
|
@ -27,6 +27,8 @@
|
|||
// 每十分钟更新用户地理位置
|
||||
this.$toolAll.tools.renewLocationEv();
|
||||
// }
|
||||
// 检测是否开启GPS定位服务
|
||||
this.$toolAll.tools.checkOpenGPSServiceByAndroidIOS();
|
||||
},
|
||||
onHide: function() {
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ uni-radio .uni-radio-input {border: 1rpx solid #444444;}
|
|||
background-color: #FFFFFF;
|
||||
}
|
||||
.solution-title {
|
||||
bottom: 0rpx;
|
||||
bottom: -2rpx;
|
||||
left: -40rpx;
|
||||
right: -40rpx;
|
||||
padding: 6rpx;
|
||||
|
|
|
@ -18,6 +18,10 @@ export function queryFun(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) {
|
||||
|
|
|
@ -112,7 +112,7 @@ const request = (method, url, options) => {
|
|||
},
|
||||
complete: rest => {
|
||||
// 是否成功,都会执行
|
||||
console.log(rest,100);
|
||||
console.log(rest,115);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -135,6 +135,7 @@ const uploadFile = (url, options) => {
|
|||
token:uni.getStorageSync('token') || ''
|
||||
},
|
||||
success: res => {
|
||||
console.log(res,138);
|
||||
if (res.statusCode == 200) {
|
||||
let temp = JSON.parse(res.data)
|
||||
if (temp.code == 1) {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
const app = getApp();
|
||||
import { renewLocation } from './public-api.js';
|
||||
// 解决微信小程序
|
||||
var QQMapWX = require('./map/qqmap-wx-jssdk.min.js');
|
||||
|
@ -36,7 +35,86 @@ const jsonp = function(url, data) {
|
|||
document.body.appendChild(scriptNode)
|
||||
})
|
||||
}
|
||||
|
||||
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,
|
||||
// 每十分钟调用一次
|
||||
|
@ -104,10 +182,10 @@ const tools = {
|
|||
},
|
||||
// h5
|
||||
getAddressH5(){
|
||||
uni.showLoading({
|
||||
title: '定位中...',
|
||||
mask:true
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: '定位中...',
|
||||
// mask:true
|
||||
// });
|
||||
uni.getLocation({
|
||||
type: 'gcj02', // wgs84 gcj02
|
||||
altitude: true,
|
||||
|
@ -116,7 +194,7 @@ const tools = {
|
|||
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=>{
|
||||
// console.log(res,'H5');
|
||||
uni.hideLoading();
|
||||
// uni.hideLoading();
|
||||
if(res.status == 0){
|
||||
// that.locationName = res.result.address; //当前定位
|
||||
let params = {
|
||||
|
@ -149,7 +227,7 @@ const tools = {
|
|||
if (res.code) {
|
||||
var params = {code:res.code}
|
||||
uni.request({
|
||||
url: `${app.globalData.hostapi}/api/user/login`,
|
||||
url: `${getApp().globalData.hostapi}/api/user/login`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
header: {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name" : "飞猴",
|
||||
"appid" : "__UNI__C9AEDD9",
|
||||
"appid" : "__UNI__25FB71A",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
{
|
||||
"pages": [{
|
||||
"path": "pages/workOrder/punchCard",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"navigationStyle": "custom" //禁用原生导航栏,微信小程序可用
|
||||
}
|
||||
},{
|
||||
"path": "pages/guide-page/guide-page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<statusNav returnColor="#c2c2c2" navBarTitle="客户(查询结果列表)"></statusNav>
|
||||
<container-subgroup-two>
|
||||
<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="">
|
||||
<view class="title">{{item.name}}</view>
|
||||
|
@ -19,6 +19,7 @@
|
|||
<view class="text">{{item.address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<pitera v-if="total==dataList.length" textStr="暂无更多客户列表数据"></pitera>
|
||||
</view>
|
||||
</container-subgroup-two>
|
||||
</view>
|
||||
|
@ -26,75 +27,50 @@
|
|||
|
||||
<script>
|
||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||
import pitera from '@/components/nothing/pitera.vue';
|
||||
import statusNav from '../../components/status-nav.vue';
|
||||
import {queryFun} from '../../jsFile/public-api.js';
|
||||
export default {
|
||||
components: {
|
||||
statusNav,
|
||||
containerSubgroupTwo
|
||||
containerSubgroupTwo,
|
||||
pitera
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList:[
|
||||
{
|
||||
name:'湖南争鸣光电科技有限公司',
|
||||
code:"KH20220304-002",
|
||||
icon:["弱电安防","弱电安防","弱电安防"],
|
||||
num:"12",
|
||||
address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
|
||||
},
|
||||
{
|
||||
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"
|
||||
},
|
||||
// {
|
||||
// name:'湖南争鸣光电科技有限公司',
|
||||
// code:"KH20220304-002",
|
||||
// icon:["弱电安防","弱电安防","弱电安防"],
|
||||
// num:"12",
|
||||
// address:"湖南省长沙市高新开发区谷园路109号像素大厦1205"
|
||||
// }
|
||||
],
|
||||
list_rows:20,
|
||||
page:1,
|
||||
total:0
|
||||
total:0,
|
||||
key_word:''//关键词
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if(this.total != this.dataList.length) {
|
||||
this.page++;
|
||||
this.queryFunEv();
|
||||
}
|
||||
},
|
||||
onLoad(op) {
|
||||
if(op.key_word!=undefined) {
|
||||
this.key_word = op.key_word;
|
||||
// 调用查询客户列表事件
|
||||
this.queryFunEv(op.key_word);
|
||||
this.queryFunEv(this.key_word);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 前往客户详情
|
||||
goDetail(index){
|
||||
goDetail(id){
|
||||
uni.navigateTo({
|
||||
url:'/pages/dataQuery/details'
|
||||
url:`/pages/dataQuery/details?id=${id}`
|
||||
})
|
||||
},
|
||||
// 查询客户列表事件
|
||||
|
@ -107,7 +83,23 @@
|
|||
}
|
||||
queryFun(params).then(res=>{
|
||||
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);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -5,34 +5,19 @@
|
|||
<container-subgroup-two>
|
||||
<view class="dataQuery-content" slot="content" style="margin: 0 -30rpx;">
|
||||
<view class="li">
|
||||
<view class="title mar-y120 clips1">
|
||||
项目名称:湖南工业大学生化学院三楼会议室湖南工业大学生化学院三楼会议室
|
||||
</view>
|
||||
<view class="title mar-y120 clips1">项目名称:湖南工业大学生化学院三楼会议室湖南工业大学生化学院三楼会议室</view>
|
||||
<view class="text-content">
|
||||
<view class="left">
|
||||
<view class="text clips1">
|
||||
核心品牌:海康威视
|
||||
</view>
|
||||
<view class="text clips1">
|
||||
规格型号:DS-CK18FI-H
|
||||
</view>
|
||||
<view class="text clips1">
|
||||
批 次 号:2210122
|
||||
</view>
|
||||
<view class="text clips1">核心品牌:海康威视</view>
|
||||
<view class="text clips1">规格型号:DS-CK18FI-H</view>
|
||||
<view class="text clips1">批 次 号:2210122</view>
|
||||
</view>
|
||||
<view class="rigth">
|
||||
<view class="text">
|
||||
备品数量:<text class="cor">3张</text>
|
||||
</view>
|
||||
<view class="text cor1">
|
||||
备品尺寸:320*160
|
||||
</view>
|
||||
<view class="text cor1">
|
||||
入库时间:2021-04-06 16:45:45
|
||||
<view class="text">备品数量:<text class="cor">3张</text></view>
|
||||
<view class="text cor1">备品尺寸:320*160</view>
|
||||
<view class="text cor1">入库时间:2021-04-06 16:45:45</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="icon" v-if="true">
|
||||
<text class="icon-text">正常</text>
|
||||
</view>
|
||||
|
@ -41,34 +26,19 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title">
|
||||
项目名称:湖南工业大学生化学院三楼会议室
|
||||
</view>
|
||||
<view class="title">项目名称:湖南工业大学生化学院三楼会议室</view>
|
||||
<view class="text-content">
|
||||
<view class="left">
|
||||
<view class="text">
|
||||
核心品牌:海康威视
|
||||
</view>
|
||||
<view class="text">
|
||||
规格型号:DS-CK18FI-H
|
||||
</view>
|
||||
<view class="text">
|
||||
批 次 号:2210122
|
||||
</view>
|
||||
<view class="text">核心品牌:海康威视</view>
|
||||
<view class="text">规格型号:DS-CK18FI-H</view>
|
||||
<view class="text">批 次 号:2210122</view>
|
||||
</view>
|
||||
<view class="rigth">
|
||||
<view class="text">
|
||||
备品数量:<text class="cor">3张</text>
|
||||
</view>
|
||||
<view class="text cor1">
|
||||
备品尺寸:320*160
|
||||
</view>
|
||||
<view class="text cor1">
|
||||
入库时间:2021-04-06 16:45:45
|
||||
<view class="text">备品数量:<text class="cor">3张</text></view>
|
||||
<view class="text cor1">备品尺寸:320*160</view>
|
||||
<view class="text cor1">入库时间:2021-04-06 16:45:45</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="icon" v-if="true">
|
||||
<text class="icon-text">正常</text>
|
||||
</view>
|
||||
|
@ -77,34 +47,19 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title">
|
||||
项目名称:湖南工业大学生化学院三楼会议室
|
||||
</view>
|
||||
<view class="title">项目名称:湖南工业大学生化学院三楼会议室</view>
|
||||
<view class="text-content">
|
||||
<view class="left">
|
||||
<view class="text">
|
||||
核心品牌:海康威视
|
||||
</view>
|
||||
<view class="text">
|
||||
规格型号:DS-CK18FI-H
|
||||
</view>
|
||||
<view class="text">
|
||||
批 次 号:2210122
|
||||
</view>
|
||||
<view class="text">核心品牌:海康威视</view>
|
||||
<view class="text">规格型号:DS-CK18FI-H</view>
|
||||
<view class="text">批 次 号:2210122</view>
|
||||
</view>
|
||||
<view class="rigth">
|
||||
<view class="text">
|
||||
备品数量:<text class="cor">3张</text>
|
||||
</view>
|
||||
<view class="text cor1">
|
||||
备品尺寸:320*160
|
||||
</view>
|
||||
<view class="text cor1">
|
||||
入库时间:2021-04-06 16:45:45
|
||||
<view class="text">备品数量:<text class="cor">3张</text></view>
|
||||
<view class="text cor1">备品尺寸:320*160</view>
|
||||
<view class="text cor1">入库时间:2021-04-06 16:45:45</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="icon" v-if="false">
|
||||
<text class="icon-text">正常</text>
|
||||
</view>
|
||||
|
@ -112,6 +67,7 @@
|
|||
<text class="icon-text">待维保</text>
|
||||
</view>
|
||||
</view>
|
||||
<pitera v-if="total==dataList.length" textStr="暂无更多备品列表数据"></pitera>
|
||||
</view>
|
||||
</container-subgroup-two>
|
||||
</view>
|
||||
|
@ -120,37 +76,66 @@
|
|||
<script>
|
||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.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 {
|
||||
components: {
|
||||
statusNav,
|
||||
containerSubgroupTwo
|
||||
containerSubgroupTwo,
|
||||
pitera
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
list_rows: 20,
|
||||
page: 1,
|
||||
total:0
|
||||
total: 0,
|
||||
key_word: '' //关键词
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.total != this.dataList.length) {
|
||||
this.page++;
|
||||
this.queryFunEv();
|
||||
}
|
||||
},
|
||||
onLoad(op) {
|
||||
if (op.key_word != undefined) {
|
||||
this.key_word = op.key_word;
|
||||
// 调用查询(备品)列表事件
|
||||
this.queryFunEv(op.key_word);
|
||||
this.queryFunEv();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查询(备品)列表事件
|
||||
queryFunEv(keyword){
|
||||
queryFunEv() {
|
||||
let params = {
|
||||
type_id: 3,
|
||||
keyword,
|
||||
keyword: this.key_word,
|
||||
list_rows: this.list_rows,
|
||||
page: this.page
|
||||
}
|
||||
queryFun(params).then(res => {
|
||||
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>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
.dataQuery-content {
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
|
|
|
@ -139,6 +139,7 @@
|
|||
<script>
|
||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||
import statusNav from '../../components/status-nav.vue';
|
||||
import {queryDetail} from '@/jsFile/public-api.js';
|
||||
export default {
|
||||
components: {
|
||||
statusNav,
|
||||
|
@ -159,9 +160,28 @@
|
|||
|
||||
},
|
||||
projectList:[],
|
||||
clientId:''//客户id
|
||||
}
|
||||
},
|
||||
onLoad(op){
|
||||
if(op.id!=undefined) {
|
||||
this.clientId = op.id;
|
||||
console.log(this.clientId);
|
||||
// 调用查询客户详情信息事件
|
||||
this.queryDetailEv();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查询客户详情信息
|
||||
queryDetailEv(){
|
||||
queryDetail({type_id:1,member_id:this.clientId}).then(res=>{
|
||||
if(res.code) {
|
||||
|
||||
} else {
|
||||
this.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
getData(){
|
||||
|
||||
},
|
||||
|
|
|
@ -6,253 +6,141 @@
|
|||
<view class="head-top">
|
||||
<view class="details-head">
|
||||
<view class="swiper-head">
|
||||
<swiper class="swiper" @change="changeAutoplay" :autoplay="autoplay" :interval="interval">
|
||||
<swiper-item>
|
||||
<swiper class="swiper" @change="changeAutoplay" :autoplay="autoplay" :interval="interval" circular>
|
||||
<swiper-item v-for="(item,index) in projectObj.completed_img" :key="index">
|
||||
<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>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<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>
|
||||
|
||||
<view class="indication-point ">
|
||||
{{index}}/3
|
||||
<view class="indication-point fon24 disjcac">{{index}}/{{imgNum}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="title">
|
||||
湖南工业大学生化学院会议室P2.5全彩LED显示屏
|
||||
</view>
|
||||
<view class="code">
|
||||
XM20220108-1001
|
||||
</view>
|
||||
|
||||
<view class="title">{{projectObj.project_name}}</view>
|
||||
<view class="code">{{projectObj.project_number}}</view>
|
||||
<view class="address">
|
||||
<image class="img" src="../../static/iocn/im.png" mode=""></image>
|
||||
<view class="text">
|
||||
湖南省长沙市高新开发区谷园路109号像素大厦1205
|
||||
<view class="text">{{projectObj.address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="last-date">
|
||||
<view class="last-date-content">
|
||||
<image class="icon" src="../../static/iocn/gzzt.png" mode=""></image>
|
||||
<view class="text">
|
||||
最近一次维保时间:2021-11-18 17:00:16
|
||||
<view class="text">最近一次维保时间:{{projectObj.downtime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="project-message-title">
|
||||
<view class="icon">
|
||||
|
||||
</view>
|
||||
<view class="text">
|
||||
项目概况
|
||||
</view>
|
||||
<view class="icon"></view>
|
||||
<view class="text">项目概况</view>
|
||||
</view>
|
||||
<view class="project-message-content">
|
||||
<view class="li">
|
||||
<view class="title-one">
|
||||
客户名称
|
||||
</view>
|
||||
<view class="text">
|
||||
:上海弘焱电子科技有限公司
|
||||
</view>
|
||||
<view class="title-one">客户名称</view>
|
||||
<view class="text">:上海弘焱电子科技有限公司</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title-one">
|
||||
竣工日期
|
||||
</view>
|
||||
<view class="text">
|
||||
:2022/2/26
|
||||
</view>
|
||||
<view class="title-one">竣工日期</view>
|
||||
<view class="text">:2022/2/26</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title-one">
|
||||
质保年限
|
||||
</view>
|
||||
<view class="text">
|
||||
:1 年
|
||||
</view>
|
||||
<view class="title-one">质保年限</view>
|
||||
<view class="text">:1 年</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title-one">
|
||||
产品品类:
|
||||
</view>
|
||||
<view class="text">
|
||||
单色LED屏
|
||||
</view>
|
||||
<view class="title-one">产品品类:</view>
|
||||
<view class="text">单色LED屏</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title-one">
|
||||
品牌
|
||||
</view>
|
||||
<view class="text">
|
||||
:海康威视
|
||||
</view>
|
||||
<view class="title-one">品牌</view>
|
||||
<view class="text">:海康威视</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title-one">
|
||||
|
||||
维保次数
|
||||
</view>
|
||||
<view class="text">
|
||||
:4 次
|
||||
</view>
|
||||
<view class="title-one">维保次数</view>
|
||||
<view class="text">:4 次</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title">
|
||||
规格型号
|
||||
</view>
|
||||
<view class="text">
|
||||
:DS-CK15FI
|
||||
</view>
|
||||
<view class="title">规格型号</view>
|
||||
<view class="text">:DS-CK15FI</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title">
|
||||
尺寸
|
||||
</view>
|
||||
<view class="text">
|
||||
:4.57m*2.88m
|
||||
</view>
|
||||
<view class="title">尺寸</view>
|
||||
<view class="text">:4.57m*2.88m</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title">
|
||||
合同类型:
|
||||
</view>
|
||||
<view class="text">
|
||||
制作安装
|
||||
</view>
|
||||
<view class="title">合同类型:</view>
|
||||
<view class="text">制作安装</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title">
|
||||
合同开始
|
||||
</view>
|
||||
<view class="text">
|
||||
: 2021/02/26
|
||||
</view>
|
||||
<view class="title">合同开始</view>
|
||||
<view class="text">: 2021/02/26</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title">
|
||||
合同结束
|
||||
</view>
|
||||
<view class="text">
|
||||
:2021/02/2
|
||||
</view>
|
||||
<view class="title">合同结束</view>
|
||||
<view class="text">:2021/02/2</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title">
|
||||
应用场景 </view>
|
||||
<view class="text">
|
||||
:会议室
|
||||
</view>
|
||||
<view class="title">应用场景 </view>
|
||||
<view class="text">:会议室</view>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="title">
|
||||
安装位置
|
||||
|
||||
</view>
|
||||
<view class="text">
|
||||
:地下负二层总控电机室
|
||||
</view>
|
||||
<view class="title">安装位置</view>
|
||||
<view class="text">:地下负二层总控电机室</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="project-message-title">
|
||||
<view class="icon">
|
||||
|
||||
</view>
|
||||
<view class="text">
|
||||
项目材料
|
||||
</view>
|
||||
<view class="icon"></view>
|
||||
<view class="text">项目材料</view>
|
||||
</view>
|
||||
<view class="project-materials-content">
|
||||
<view class="project-materials-title">
|
||||
<view class="text">
|
||||
名称
|
||||
</view>
|
||||
<view class="text">
|
||||
品牌
|
||||
</view>
|
||||
<view class="text">
|
||||
型号
|
||||
</view>
|
||||
<view class="text">
|
||||
批次
|
||||
</view>
|
||||
<view class="text">
|
||||
尺寸
|
||||
</view>
|
||||
<view class="text">
|
||||
数量
|
||||
</view>
|
||||
<view class="text">名称</view>
|
||||
<view class="text">品牌</view>
|
||||
<view class="text">型号</view>
|
||||
<view class="text">批次</view>
|
||||
<view class="text">尺寸</view>
|
||||
<view class="text">数量</view>
|
||||
</view>
|
||||
<view class="project-materials-text">
|
||||
<view class="text">
|
||||
接收卡
|
||||
</view>
|
||||
<view class="text">
|
||||
卡莱特
|
||||
</view>
|
||||
<view class="text">
|
||||
5A-75E
|
||||
</view>
|
||||
<view class="text">
|
||||
1033876
|
||||
</view>
|
||||
<view class="text">
|
||||
*
|
||||
</view>
|
||||
<view class="text">
|
||||
1台
|
||||
</view>
|
||||
<view class="text">接收卡</view>
|
||||
<view class="text">卡莱特</view>
|
||||
<view class="text">5A-75E</view>
|
||||
<view class="text">1033876</view>
|
||||
<view class="text">*</view>
|
||||
<view class="text">1台</view>
|
||||
</view>
|
||||
</view>
|
||||
<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}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="record-content">
|
||||
<view class="title">
|
||||
过程追踪
|
||||
</view>
|
||||
<view class="title">过程追踪</view>
|
||||
<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="text">“部分模组不显示”维保【陈志远】已处理。</view>
|
||||
<view class="date">2020-05-15 16:00</view>
|
||||
<view class="text">{{item.time_line}}</view>
|
||||
<!-- <view class="date">2020-05-15 16:00</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<pitera v-if="recordList.length==0" :textStr="nomoreText"></pitera>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</container-subgroup-two>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||
import statusNav from "../../components/status-nav.vue"
|
||||
import pitera from '@/components/nothing/pitera.vue';
|
||||
export default {
|
||||
components: {
|
||||
statusNav,
|
||||
containerSubgroupTwo
|
||||
containerSubgroupTwo,
|
||||
pitera
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -271,19 +159,70 @@
|
|||
title: '巡检记录',
|
||||
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: {
|
||||
// 查询维保记录、保养记录、巡检记录
|
||||
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) {
|
||||
console.log()
|
||||
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) {
|
||||
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++) {
|
||||
this.recordState[i].state = false
|
||||
}
|
||||
this.recordState[index].state = true
|
||||
this.getRecord();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -504,6 +443,7 @@
|
|||
border-left: 2rpx solid #999999;
|
||||
|
||||
}
|
||||
|
||||
.record-content .list .li::before {
|
||||
content: '';
|
||||
display: block;
|
||||
|
@ -514,10 +454,12 @@
|
|||
background-color: #999999;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.record-content .list .activeTrack {
|
||||
color: #0084ff;
|
||||
padding-top: 0rpx;
|
||||
}
|
||||
|
||||
.record-content .list .activeTrack::before {
|
||||
background-color: rgba(0, 132, 255, .5);
|
||||
top: -4rpx;
|
||||
|
@ -526,6 +468,7 @@
|
|||
left: -12rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.record-content .list .activeTrack::after {
|
||||
content: '';
|
||||
display: block;
|
||||
|
@ -537,13 +480,16 @@
|
|||
background-color: #999999;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.record-content .list .activeTrack .line-h60 {
|
||||
margin-top: -26rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.record-content .list .date {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.project-materials-title {
|
||||
display: flex;
|
||||
color: #00a2e9;
|
||||
|
@ -574,5 +520,4 @@
|
|||
width: 16%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<container-subgroup-two>
|
||||
<view slot="content" style="margin: 0 -30rpx;">
|
||||
<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">
|
||||
<image class="img" src="../../static/del/img001.png" mode="aspectFill"></image>
|
||||
<view class="text">
|
||||
|
@ -23,14 +23,10 @@
|
|||
<view class="date">{{item.date}}</view>
|
||||
</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 class="icon iconBerb" v-if="item.state==2">
|
||||
临时项目
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<pitera v-if="total==projectQuery.length" textStr="暂无更多项目列表数据"></pitera>
|
||||
</view>
|
||||
</view>
|
||||
</container-subgroup-two>
|
||||
|
@ -41,20 +37,19 @@
|
|||
import statusNav from '../../components/status-nav.vue';
|
||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||
import {queryFun} from '../../jsFile/public-api.js';
|
||||
import pitera from '@/components/nothing/pitera.vue';
|
||||
export default {
|
||||
components:{
|
||||
containerSubgroupTwo,
|
||||
statusNav
|
||||
statusNav,
|
||||
pitera
|
||||
},
|
||||
data() {
|
||||
|
||||
return {
|
||||
dataPage:{
|
||||
page:1,
|
||||
list_rows:20
|
||||
},
|
||||
projectQuery: [
|
||||
{
|
||||
id:1,
|
||||
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
|
||||
img: "../../static/del/img001.png",
|
||||
code: "20220108-1001",
|
||||
|
@ -65,85 +60,60 @@
|
|||
date: "2022/01/08",
|
||||
state: 1
|
||||
|
||||
},
|
||||
{
|
||||
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
|
||||
img: "../../static/del/img001.png",
|
||||
code: "20220108-1001",
|
||||
model: "DS-CK25FI/H",
|
||||
size: "3.94m*2.02m",
|
||||
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.94m*2.02m",
|
||||
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.94m*2.02m",
|
||||
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.94m*2.02m",
|
||||
installationSite: "xxx综合楼2楼会议室",
|
||||
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
|
||||
date: "2022/01/08",
|
||||
state: 0
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
],
|
||||
list_rows:20,
|
||||
page:1,
|
||||
total:0
|
||||
total:0,
|
||||
key_word:''//关键词
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if(this.total!=this.projectQuery.length) {
|
||||
this.page++;
|
||||
this.queryFunEv();
|
||||
}
|
||||
},
|
||||
onLoad(op) {
|
||||
if(op.key_word!=undefined) {
|
||||
this.key_word = op.key_word;
|
||||
// 调用查询(项目)列表事件
|
||||
this.queryFunEv(op.key_word);
|
||||
this.queryFunEv();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
projectDetailsFun(){
|
||||
projectDetailsFun(id){
|
||||
uni.navigateTo({
|
||||
url:"/pages/dataQuery/projectDetails"
|
||||
url:`/pages/dataQuery/projectDetails?id=${id}`
|
||||
})
|
||||
},
|
||||
// 查询(项目)列表事件
|
||||
queryFunEv(){
|
||||
let params = {
|
||||
type_id:2,
|
||||
keyword,
|
||||
keyword:this.key_word,
|
||||
list_rows:this.list_rows,
|
||||
page:this.page
|
||||
}
|
||||
queryFun(params).then(res=>{
|
||||
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);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
import footTabOne from "../../components/foot-tabs/foot-tab-one.vue"
|
||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||
import { uploadImg } from '@/jsFile/public-api.js';
|
||||
const app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
footTabOne,
|
||||
|
@ -181,6 +180,7 @@
|
|||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
border-top: 2rpx solid #EAEAEA;
|
||||
border-bottom: 2rpx solid #EAEAEA;
|
||||
background-color: #FFFFFF;
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="padding">
|
||||
<view class="devicename" @click="scanCodeFun()" v-if="navDataState[0].state">
|
||||
<view class="">请填写设备名称和型号或扫描二维码</view>
|
||||
<image class="sm" src="../../static/iocn/sm.png" lazy-load mode=""></image>
|
||||
<view class="devicename" v-if="navDataState[0].state">
|
||||
<input type="text" class="fon28 width100" v-model="data.device_name" placeholder="请填写设备名称和型号或扫描二维码" />
|
||||
<image @click="scanCodeFun()" class="sm flexs" src="../../static/iocn/sm.png" lazy-load mode=""></image>
|
||||
</view>
|
||||
<input v-model="data.device_name" class="devicename" placeholder="请填写设备名称和型号(例:华为LED)" v-else />
|
||||
<view class="fault-pictures radius10" @click="chooseImg">
|
||||
|
@ -172,17 +172,21 @@
|
|||
},
|
||||
submitButton() {
|
||||
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) {
|
||||
this.$toolAll.tools.showToast("请填写设备名称或型号");
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if (!this.data.project_number) {
|
||||
this.$toolAll.tools.showToast("请扫描设备二维码");
|
||||
return
|
||||
}
|
||||
}
|
||||
if (!this.data.username) {
|
||||
this.$toolAll.tools.showToast("请填写您的姓名");
|
||||
return
|
||||
|
|
|
@ -234,7 +234,6 @@
|
|||
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
|
||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||
import {getPlanType} from '@/jsFile/public-api.js';
|
||||
const app = getApp();
|
||||
export default {
|
||||
components:{
|
||||
pitera,
|
||||
|
@ -246,11 +245,11 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
role: 1, // 1:业务员 2:表示客户 3:表示客服 4:表示工程师
|
||||
// role: uni.getStorageSync('type_id'), // 1:业务员 2:表示客户 3:表示客服 4:表示工程师
|
||||
// role: 1, // 1:业务员 2:表示客户 3:表示客服 4:表示工程师
|
||||
role: uni.getStorageSync('type_id'), // 1:业务员 2:表示客户 3:表示客服 4:表示工程师
|
||||
statusHeight: uni.getSystemInfoSync().statusBarHeight + 50,
|
||||
messageNumber: 0 ,// 消息数量
|
||||
noticeList:[{id:1,title:'2021年11月06日公司团建,维保服务暂停一天服务暂停一天服务暂停一天。一天服务暂停一天服务暂停一天。'}],//公告
|
||||
noticeList:[{id:1,title:'系统正在维护中...'}],//公告
|
||||
// 故障报修
|
||||
repairList:[
|
||||
{imgsrc:'/static/public/icon-home-repair.png',title:'报修'},
|
||||
|
@ -280,27 +279,27 @@
|
|||
// 项目维保
|
||||
projectRepairList:[
|
||||
{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-repairIng.png',title:'维保中',num:6,id:4},
|
||||
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待执行',num:0,id:0},
|
||||
{imgsrc:'/static/public/icon-home-repairIng.png',title:'维保中',num:0,id:4},
|
||||
],
|
||||
// 工单数据
|
||||
workOrderList:[
|
||||
{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-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:[
|
||||
{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},
|
||||
],
|
||||
// 待办工单
|
||||
stayWorkOrderList:[
|
||||
{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-stayRepair.png',title:'待维保',num:6,id:3},
|
||||
{imgsrc:'/static/public/icon-home-stayAssign.png',title:'待指派',num:0,id:0},
|
||||
{imgsrc:'/static/public/icon-home-stayRepair.png',title:'待维保',num:0,id:3},
|
||||
{imgsrc:'/static/public/icon-home-returnVisit.png',title:'待回访',num:0,id:8},
|
||||
],
|
||||
// 待办事件
|
||||
|
@ -336,7 +335,6 @@
|
|||
this.getIncrementServiceType();
|
||||
// 调用获取常见故障列表事件
|
||||
this.getFaultsList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 首页信息查询
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</view>
|
||||
<view class="li">
|
||||
<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 class="li">
|
||||
<view class="title">紧急程度:</view>
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<view>{{serviceModeList[serviceModeIndex].name}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="li">
|
||||
<view class="li" @tap="getAddress">
|
||||
<view class="title flexs">定位地址:</view>
|
||||
<input type="text" disabled class="input" :value="targetObj.address" />
|
||||
</view>
|
||||
|
@ -181,7 +181,8 @@ var qqmapsdk = new QQMapWX({
|
|||
],//服务方式
|
||||
serviceModeIndex:0,//服务方式下标
|
||||
flag:true,
|
||||
temporaryImg:[]//暂存图片id
|
||||
temporaryImg:[],//暂存图片id
|
||||
addressFlag:true
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
@ -193,16 +194,71 @@ var qqmapsdk = new QQMapWX({
|
|||
this.orderId = op.id;
|
||||
this.handleWorkOrderGet(this.orderId);
|
||||
}
|
||||
this.getProductType();
|
||||
this.getFaultType();
|
||||
this.getAddressH5();
|
||||
// 更新定位地址
|
||||
this.getAddress();
|
||||
},
|
||||
methods: {
|
||||
// 定位地址
|
||||
// app获取经纬度和详细地址
|
||||
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(){
|
||||
if(this.addressFlag) {
|
||||
this.addressFlag = false;
|
||||
uni.getLocation({
|
||||
type: 'gcj02',//wgs84 gcj02
|
||||
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}`
|
||||
jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{
|
||||
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 || ''})`
|
||||
setTimeout(()=>{
|
||||
this.addressFlag = true;
|
||||
},2000)
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$toolAll.tools.showToast('请勿重复获取定位...')
|
||||
}
|
||||
},
|
||||
// 改变产品类型、维保类型、服务方式
|
||||
changePicker(index,e) {
|
||||
|
@ -312,6 +375,8 @@ var qqmapsdk = new QQMapWX({
|
|||
this.getProductType();
|
||||
// 调用查询故障类型事件
|
||||
this.getFaultType();
|
||||
// 调用获取服务方式
|
||||
// this.getServiceMode()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -341,8 +406,8 @@ var qqmapsdk = new QQMapWX({
|
|||
uni.setStorageSync('targetObj',this.targetObj);
|
||||
let params = {
|
||||
steps:1,
|
||||
order_id:this.orderId || 14,//工单id
|
||||
start_address:'四川省成都市成华区',//开工地址
|
||||
order_id:this.orderId,//工单id
|
||||
start_address:this.targetObj.address,//开工地址
|
||||
product_type:this.productTypeList[this.productIndex].id,//产品类型
|
||||
installation_location:this.targetObj.installLocation,//安装位置
|
||||
fault_type:this.faultTypeList[this.faultIndex].id,//维保类型
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<view class="text disjb fc" style="height: 180rpx;">
|
||||
<view class="title flexs">
|
||||
<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 class="disjb fc line-h38" style="margin-left: -20rpx;">
|
||||
<view class="serial-number scal09">
|
||||
|
@ -65,6 +65,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<pitera v-if="total==dataList.length && dataList.length!=0" textStr="暂无更多列表数据"></pitera>
|
||||
</view>
|
||||
<nothing-page v-if="dataList.length==0" content="暂无更多列表数据" currentType="0"></nothing-page>
|
||||
</view>
|
||||
|
@ -77,11 +78,13 @@
|
|||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||
import statusNav from '../../components/status-nav.vue';
|
||||
import footTabOne from "../../components/foot-tabs/foot-tab-one.vue"
|
||||
import pitera from '@/components/nothing/pitera.vue';
|
||||
export default {
|
||||
components: {
|
||||
footTabOne,
|
||||
statusNav,
|
||||
containerSubgroupTwo
|
||||
containerSubgroupTwo,
|
||||
pitera
|
||||
},
|
||||
data() {
|
||||
const currentDate = this.getDate({
|
||||
|
@ -356,7 +359,6 @@
|
|||
border-radius: 50rpx;
|
||||
color: #FFFFFF;
|
||||
display: flex;justify-content: center;align-items: center;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.project-list .li .message .text .title .icon1 {
|
||||
|
|
|
@ -51,12 +51,13 @@
|
|||
<view class="li">
|
||||
<view class="text flexs">其他费用</view>
|
||||
<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 class="total-price">
|
||||
费用合计<text class="money">¥{{totalPrice}}</text>
|
||||
<!-- 费用合计<text class="money">¥{{totalPrice}}</text> -->
|
||||
费用合计<text class="money">¥{{allPrice}}</text>
|
||||
</view>
|
||||
<picker @change="bindPickerChange" :value="paymentModeIndex" :range="array">
|
||||
<view class="serve-date">
|
||||
|
@ -179,11 +180,13 @@
|
|||
array: ['微信', '支付宝', '银行转账'],
|
||||
paymentModeIndex:0,
|
||||
serviceTime:'' ,// 服务时间
|
||||
allPrice:'0.00',//费用合计
|
||||
detailObj:{
|
||||
doorToDoorFee:'120.09',
|
||||
taxes:'120.20',
|
||||
materialCost:'120.02',
|
||||
otherCost:'',
|
||||
doorToDoorFee:'0.00',//上门费、人工费
|
||||
taxes:'0.00',
|
||||
materialCost:'0.00',//材料费
|
||||
otherCost:'',//其他费用
|
||||
taxRate:10,//税率
|
||||
address:'湖南省株洲市荷塘区红旗中路456号(五矿二十三冶)',
|
||||
collectionCode:[
|
||||
'/static/del/500478055.png',
|
||||
|
@ -221,7 +224,7 @@
|
|||
} else {
|
||||
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,0.1,"*",2);
|
||||
taxesResult = this.$toolAll.tools.operationEv(taxesResult,this.detailObj.taxRate,"*",2);
|
||||
}
|
||||
return taxesResult;
|
||||
}
|
||||
|
@ -243,14 +246,39 @@
|
|||
this.orderId = op.id;
|
||||
// 调用查询结算审核信息事件
|
||||
this.handleWorkOrderGet(this.orderId);
|
||||
// 调用支付费用计算
|
||||
this.priceEv();
|
||||
}
|
||||
this.handleWorkOrderGet();
|
||||
},
|
||||
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){
|
||||
let params = {
|
||||
order_id:14,
|
||||
order_id:this.orderId,
|
||||
steps:3
|
||||
}
|
||||
handleWorkOrderGet(params).then(res=>{
|
||||
|
@ -268,23 +296,20 @@
|
|||
order_id:this.orderId,
|
||||
steps:3,
|
||||
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:银行转账
|
||||
invoice_type:[3,2,1][this.billingIndex],//开票方式3:专票 2:普票 1:不开票
|
||||
is_collection:this.isMoney ? 1 : 0,//是否收款
|
||||
signature:this.signId,//签名id
|
||||
signature:this.signId || 62,//签名id
|
||||
settlement_address:this.detailObj.address,
|
||||
settlement_remark:this.remarkText//备注内容
|
||||
}
|
||||
console.log(params);
|
||||
handleWorkOrderSubmit(params).then(res=>{
|
||||
if(res.code) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/workOrder/workorderTwo?id=${this.orderId}`
|
||||
})
|
||||
} else {
|
||||
this.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
this.flag = true;
|
||||
})
|
||||
|
@ -314,6 +339,8 @@
|
|||
},
|
||||
clearingFormFun(index) {
|
||||
this.currentWay = index;
|
||||
// 调用支付费用计算
|
||||
this.priceEv();
|
||||
},
|
||||
bindPickerChange(data) {
|
||||
this.paymentModeIndex = data.detail.value;
|
||||
|
@ -327,6 +354,8 @@
|
|||
this.billingIndex = index;
|
||||
// this.conversionEv();
|
||||
}
|
||||
// 调用支付费用计算
|
||||
this.priceEv();
|
||||
},
|
||||
// 税金费用换算
|
||||
// conversionEv(){
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
const app = getApp();
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -49,7 +48,7 @@
|
|||
if(res.code){
|
||||
let userData = res.data;
|
||||
if(userData.avatar) {
|
||||
this.userImg = app.globalData.hostapi + '/' + userData.avatar;
|
||||
this.userImg = userData.avatar;
|
||||
}
|
||||
this.userId = userData.id;
|
||||
this.userName = userData.name;
|
||||
|
|
Loading…
Reference in New Issue