新增检测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

@ -7,7 +7,7 @@ console.log(ENV,'当前环境'); // development开发环境 test测试环
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
const hostapi = 'https://7and5.cn'; const hostapi = 'https://7and5.cn';
// #endif // #endif
// #ifdef H5 // #ifdef H5
const hostapi = '/web'; const hostapi = '/web';
// const hostapi = 'https://7and5.cn'; // const hostapi = 'https://7and5.cn';
@ -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

@ -1,244 +1,227 @@
<template> <template>
<view class="content"> <view class="content">
<statusNav returnColor="#c2c2c2" navBarTitle="(备品)查询结果"></statusNav> <statusNav returnColor="#c2c2c2" navBarTitle="(备品)查询结果"></statusNav>
<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="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>
<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>
</view>
</view>
<view class="icon" v-if="true"> <container-subgroup-two>
<text class="icon-text">正常</text> <view class="dataQuery-content" slot="content" style="margin: 0 -30rpx;">
</view> <view class="li">
<view class="icon1" v-else> <view class="title mar-y120 clips1">项目名称湖南工业大学生化学院三楼会议室湖南工业大学生化学院三楼会议室</view>
<text class="icon-text">待维保</text> <view class="text-content">
</view> <view class="left">
</view> <view class="text clips1">核心品牌海康威视</view>
<view class="li"> <view class="text clips1">规格型号DS-CK18FI-H</view>
<view class="title"> <view class="text clips1"> 2210122</view>
项目名称湖南工业大学生化学院三楼会议室 </view>
</view> <view class="rigth">
<view class="text-content"> <view class="text">备品数量<text class="cor">3</text></view>
<view class="left"> <view class="text cor1">备品尺寸320*160</view>
<view class="text"> <view class="text cor1">入库时间2021-04-06 16:45:45</view>
核心品牌海康威视 </view>
</view> </view>
<view class="text"> <view class="icon" v-if="true">
规格型号DS-CK18FI-H <text class="icon-text">正常</text>
</view> </view>
<view class="text"> <view class="icon1" v-else>
2210122 <text class="icon-text">待维保</text>
</view> </view>
</view> </view>
<view class="rigth"> <view class="li">
<view class="text"> <view class="title">项目名称湖南工业大学生化学院三楼会议室</view>
备品数量<text class="cor">3</text> <view class="text-content">
</view> <view class="left">
<view class="text cor1"> <view class="text">核心品牌海康威视</view>
备品尺寸320*160 <view class="text">规格型号DS-CK18FI-H</view>
</view> <view class="text"> 2210122</view>
<view class="text cor1"> </view>
入库时间2021-04-06 16:45:45 <view class="rigth">
</view> <view class="text">备品数量<text class="cor">3</text></view>
</view> <view class="text cor1">备品尺寸320*160</view>
</view> <view class="text cor1">入库时间2021-04-06 16:45:45</view>
</view>
<view class="icon" v-if="true"> </view>
<text class="icon-text">正常</text> <view class="icon" v-if="true">
</view> <text class="icon-text">正常</text>
<view class="icon1" v-else> </view>
<text class="icon-text">待维保</text> <view class="icon1" v-else>
</view> <text class="icon-text">待维保</text>
</view> </view>
<view class="li"> </view>
<view class="title"> <view class="li">
项目名称湖南工业大学生化学院三楼会议室 <view class="title">项目名称湖南工业大学生化学院三楼会议室</view>
</view> <view class="text-content">
<view class="text-content"> <view class="left">
<view class="left"> <view class="text">核心品牌海康威视</view>
<view class="text"> <view class="text">规格型号DS-CK18FI-H</view>
核心品牌海康威视 <view class="text"> 2210122</view>
</view> </view>
<view class="text"> <view class="rigth">
规格型号DS-CK18FI-H <view class="text">备品数量<text class="cor">3</text></view>
</view> <view class="text cor1">备品尺寸320*160</view>
<view class="text"> <view class="text cor1">入库时间2021-04-06 16:45:45</view>
2210122 </view>
</view> </view>
</view> <view class="icon" v-if="false">
<view class="rigth"> <text class="icon-text">正常</text>
<view class="text"> </view>
备品数量<text class="cor">3</text> <view class="icon1" v-else>
</view> <text class="icon-text">待维保</text>
<view class="text cor1"> </view>
备品尺寸320*160 </view>
</view> <pitera v-if="total==dataList.length" textStr="暂无更多备品列表数据"></pitera>
<view class="text cor1"> </view>
入库时间2021-04-06 16:45:45 </container-subgroup-two>
</view> </view>
</view>
</view>
<view class="icon" v-if="false">
<text class="icon-text">正常</text>
</view>
<view class="icon1" v-else>
<text class="icon-text">待维保</text>
</view>
</view>
</view>
</container-subgroup-two >
</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 {
export default { queryFun
components: { } from '../../jsFile/public-api.js';
statusNav, import pitera from '@/components/nothing/pitera.vue';
containerSubgroupTwo export default {
}, components: {
data() { statusNav,
return { containerSubgroupTwo,
list_rows:20, pitera
page:1, },
total:0 data() {
} return {
}, dataList: [],
onLoad(op) { list_rows: 20,
if(op.key_word!=undefined) { page: 1,
// () total: 0,
this.queryFunEv(op.key_word); key_word: '' //
} }
}, },
methods: { 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();
}
},
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);
} }
}) })
} }
} }
} }
</script> </script>
<style> <style>
.dataQuery-content {
font-size: 24rpx;
color: #333333;
margin-top: 15rpx;
}
.dataQuery-content .li {
background-color: #FFFFFF;
padding: 26rpx 28rpx;
.dataQuery-content { margin-bottom: 14rpx;
font-size: 24rpx; }
color: #333333;
margin-top: 15rpx;
}
.dataQuery-content .li { .dataQuery-content .li {
background-color: #FFFFFF; position: relative;
padding: 26rpx 28rpx; }
.dataQuery-content .li .text-content {
display: flex;
border-bottom: 2rpx solid #EEEEEE;
padding-bottom: 10rpx;
margin-bottom: 14rpx; }
}
.dataQuery-content .li { .dataQuery-content .li .text-content .left {
position: relative; width: 48%;
} }
.dataQuery-content .li .text-content { .dataQuery-content .li .text-content .text {
display: flex; margin-top: 20rpx;
border-bottom: 2rpx solid #EEEEEE; }
padding-bottom: 10rpx;
} .cor {
color: #ff9000;
}
.dataQuery-content .li .text-content .left { .cor1 {
width: 48%; color: #999999;
} }
.dataQuery-content .li .text-content .text { .dataQuery-content .li .icon {
margin-top: 20rpx; background-image: url(../../static/iocn/zc.png);
} width: 125rpx;
height: 91rpx;
display: flex;
align-items: center;
box-sizing: border-box;
background-size: 100%;
padding-left: 30rpx;
right: 20rpx;
top: 20rpx;
position: absolute;
}
.cor { .dataQuery-content .li .icon .icon-text {
color: #ff9000; transform: rotateZ(20deg);
} color: #53e5d0;
.cor1 { }
color: #999999;
}
.dataQuery-content .li .icon { .dataQuery-content .li .icon1 {
background-image: url(../../static/iocn/zc.png); background-image: url(../../static/iocn/dwx.png);
width: 125rpx; width: 125rpx;
height: 91rpx; height: 91rpx;
display: flex; display: flex;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
background-size: 100%; background-size: 100%;
padding-left: 30rpx; padding-left: 30rpx;
right: 20rpx; right: 20rpx;
top: 20rpx; top: 20rpx;
position: absolute; position: absolute;
} }
.dataQuery-content .li .icon .icon-text { .dataQuery-content .li .icon1 .icon-text {
transform: rotateZ(20deg); transform: rotateZ(20deg);
color: #53e5d0; color: #ff0006;
} }
.dataQuery-content .li .icon1 {
background-image: url(../../static/iocn/dwx.png);
width: 125rpx;
height: 91rpx;
display: flex;
align-items: center;
box-sizing: border-box;
background-size: 100%;
padding-left: 30rpx;
right: 20rpx;
top: 20rpx;
position: absolute;
}
.dataQuery-content .li .icon1 .icon-text {
transform: rotateZ(20deg);
color: #ff0006;
}
</style> </style>

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(){
}, },

File diff suppressed because it is too large Load Diff

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 class="icon iconBerb" v-if="item.state==2">
临时项目
</view>
</view> </view>
<pitera v-if="total==projectQuery.length" textStr="暂无更多项目列表数据"></pitera>
</view> </view>
</view> </view>
</container-subgroup-two> </container-subgroup-two>
@ -41,110 +37,84 @@
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:{ projectQuery: [
page:1, {
list_rows:20 id:1,
}, name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectQuery: [ img: "../../static/del/img001.png",
{ code: "20220108-1001",
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏", model: "DS-CK25FI/H",
img: "../../static/del/img001.png", size: "3.94*2.02",
code: "20220108-1001", installationSite: "xxx综合楼2楼会议室",
model: "DS-CK25FI/H", address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
size: "3.94*2.02", date: "2022/01/08",
installationSite: "xxx综合楼2楼会议室", state: 1
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: 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);
}
}) })
}, },
bindPickerChange(data){ bindPickerChange(data){

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) { // if (!this.data.device_name) {
this.$toolAll.tools.showToast("请填写设备名称或型号"); // this.$toolAll.tools.showToast("");
return // return
} // }
} else { // } else {
if (!this.data.project_number) { // if (!this.data.project_number) {
this.$toolAll.tools.showToast("请扫描设备二维码"); // this.$toolAll.tools.showToast("");
return // return
} // }
} // }
if (!this.data.device_name) {
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,28 +194,90 @@ 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(){
uni.getLocation({ if(this.addressFlag) {
type: 'gcj02',//wgs84 gcj02 this.addressFlag = false;
altitude: true, uni.getLocation({
geocode: true, type: 'gcj02',//wgs84 gcj02
success: (res)=> { altitude: true,
let str = `output=jsonp&key=QNHBZ-55RKF-OMFJJ-NPU7O-EPSDH-ACBAA&location=${res.latitude},${res.longitude}` geocode: true,
jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{ success: (res)=> {
console.log(res,'H5'); let str = `output=jsonp&key=QNHBZ-55RKF-OMFJJ-NPU7O-EPSDH-ACBAA&location=${res.latitude},${res.longitude}`
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 || ''})` 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) { 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;