反馈接口部分调用完成

master
chen 2022-06-17 15:48:17 +08:00
parent 7640b848e0
commit 98e6b5fe45
13 changed files with 327 additions and 206 deletions

View File

@ -0,0 +1,154 @@
<template>
<!--地址picker-->
<view :status="checkStatus" v-if="lotusAddressData.visible" class="lotus-address-mask">
<view :class="lotusAddressData.visible?'lotus-address-box':'lotus-address-box lotus-address-box-out'">
<view class="lotus-address-action">
<text @tap="cancelPicker" class="lotus-address-action-cancel">取消</text>
<text @tap="chosedVal" class="lotus-address-action-affirm">确认</text>
</view>
<view class="lotus-address-picker-box">
<!---->
<scroll-view scroll-y :scroll-into-view="'pid'+pChoseIndex" class="lotus-address-picker-box-item">
<view @tap="clickPicker(1,pIndex);" :id="'pid'+pIndex" :class="pIndex === pChoseIndex?'lotus-address-picker lotus-address-picker2':'lotus-address-picker'" v-for="(pItem,pIndex) in province" :key="pIndex">{{pItem.value}}</view>
</scroll-view>
<!---->
<scroll-view scroll-y :scroll-into-view="'cid'+cChoseIndex" class="lotus-address-picker-box-item" v-if="isShow">
<view @tap="clickPicker(2,cIndex);" :id="'cid'+cIndex" :class="cIndex === cChoseIndex?'lotus-address-picker lotus-address-picker2':'lotus-address-picker'" v-for="(cItem,cIndex) in city" :key="cIndex">{{cItem.value}}</view>
</scroll-view>
<!---->
<scroll-view scroll-y :scroll-into-view="'tid'+tChoseIndex" class="lotus-address-picker-box-item">
<view @tap="clickPicker(3,tIndex);" :id="'tid'+tIndex" :class="tIndex === tChoseIndex?'lotus-address-picker lotus-address-picker2':'lotus-address-picker'" v-for="(tItem,tIndex) in town" :key="tIndex">{{tItem.value}}</view>
</scroll-view>
</view>
</view>
</view>
<!--地址picker END-->
</template>
<script>
export default {
props:['lotusAddressData'],
data() {
return {
visible: false,
province:[],
city:[],
town:[],
provinceName:'',
cityName:'',
townName:'',
type:0,//0 1
pChoseIndex:-1,
cChoseIndex:-1,
tChoseIndex:-1,
pidkey:'pid',
pid:0,
getType:'', //012
isShow: true
};
},
onReady() {
this.getProvince(1);
},
methods:{
//
cancelPicker(){
this.$emit("choseVal",{
visible:false
});
},
//
chosedVal(){
// isChose = 1
if((this.provinceName&&this.cityName)||(this.provinceName&&this.cityName&&this.townName)){
this.$emit("choseVal",{
province:this.provinceName,
city:this.cityName,
town:this.townName,
area_id:this.pid,
isChose:1,
visible:false
});
}else{
this.$toolAll.tools.showToast('您还未选择城市')
}
},
//
getProvince(getType) {
let params = {
pidkey:this.pidkey,
pid:this.pid,
}
this.$requst.get('/universal/api.other/city',params).then(res=>{
if(res.code) {
if(getType == 1){
console.log(res.data,'省数据')
this.province = res.data;
}
if(getType == 2){
console.log(res.data,'市数据')
this.city = res.data;
}
if(getType == 3){
console.log(res.data,'区数据')
this.town = res.data;
}
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
},
//
clickPicker(type,index){
if(type == 1){
this.pChoseIndex = index;
this.pid = this.province[index].pid;
this.provinceCode = this.province[index].pid;
this.provinceName = this.province[index].value;
this.cChoseIndex = -1;
this.tChoseIndex = -1;
this.city = [];
this.town = [];
if(this.provinceName == '北京市' || this.provinceName == '天津市' || this.provinceName == '上海市' || this.provinceName == '重庆市'){
this.isShow = false;
this.getProvince(2);
setTimeout(()=>{
this.cChoseIndex = 0;
this.pid = this.city[0].pid
this.cityCode = this.city[0].pid;
this.cityName = this.city[0].value;
this.tChoseIndex = -1;
this.town = [];
this.getProvince(3);
},200)
}else{
this.isShow = true;
this.getProvince(2);
}
}
if(type == 2){
this.cChoseIndex = index;
this.pid = this.city[index].pid
this.cityCode = this.city[index].pid;
this.cityName = this.city[index].value;
this.tChoseIndex = -1;
this.town = [];
this.getProvince(3);
}
if(type == 3){
this.tChoseIndex = index;
this.pid = this.town[index].pid
this.townCode = this.town[index].pid;
this.townName = this.town[index].value;
}
}
}
}
</script>
<style lang="less">
@import "./city.css";
</style>

View File

@ -3,10 +3,12 @@
<uni-icons v-if="showIcon === true || showIcon === 'true'" class="notice_left" type="sound" :color="getColor(theme)" size="22" /> <uni-icons v-if="showIcon === true || showIcon === 'true'" class="notice_left" type="sound" :color="getColor(theme)" size="22" />
<swiper class="notice_center" vertical v-if="direction=='column'" :autoplay="true" :interval="4000" :duration="500" :circular="true" disable-touch> <swiper class="notice_center" vertical v-if="direction=='column'" :autoplay="true" :interval="4000" :duration="500" :circular="true" disable-touch>
<swiper-item v-for="(item, index) in list" :key="index" class="swiperIn" @click="goItem(item)"> <swiper-item v-for="(item, index) in list" :key="index" class="swiperIn" @click="goItem(item)">
<view>{{item[theKey]}}</view> <view>{{item}}</view>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view :class="['','notice_center1','notice_center2','notice_center3','notice_center4','notice_center5'][speedTime]" v-else><view class="content">{{list[0][theKey]}}</view></view> <view :class="['','notice_center1','notice_center2','notice_center3','notice_center4','notice_center5'][speedTime]" v-else>
<view class="content">{{list[0]}}</view>
</view>
<view class="notice_right" v-if="showMore"> <view class="notice_right" v-if="showMore">
<view @click="goMore"></view> <view @click="goMore"></view>
</view> </view>

View File

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

View File

@ -256,12 +256,6 @@
url: urls[index] url: urls[index]
}) })
}, },
//
goSetUp() {
uni.navigateTo({
url: '/pagesB/set-up/set-up'
})
}
} }
} }
</script> </script>

View File

@ -36,14 +36,15 @@
<view class="bleft" style="height: 90rpx;"></view> <view class="bleft" style="height: 90rpx;"></view>
<view class="disjcac fc width50"> <view class="disjcac fc width50">
<view class="fon26 col9">实时工单</view> <view class="fon26 col9">实时工单</view>
<view class="fon60 bold">{{fault_count || 0}}</view> <view class="fon60 bold">{{project_error_count || 0}}</view>
</view> </view>
</view> </view>
<view class="disac pad-s30 pad-x10"> <view class="disac pad-s30 pad-x10">
<image class="mar-zy20" style="width: 64rpx;height: 27rpx;" src="/static/public/icon-home-notice.png" mode=""></image> <image class="mar-zy20" style="width: 64rpx;height: 27rpx;" src="/static/public/icon-home-notice.png" mode=""></image>
<view class="fon24 color6 mar-y20 width100 bleft pad-z20"> <view class="fon24 color6 mar-y20 width100 bleft pad-z20">
<!-- <lwNotice @dangGao="goNoticeDetail" :list="noticeList" :backgroundColor="'#FFFFFF'"></lwNotice> --> <!-- <lwNotice @dangGao="goNoticeDetail" :list="noticeList" :backgroundColor="'#FFFFFF'"></lwNotice> -->
<notice-one direction="row" :list="noticeList"></notice-one> <!-- <notice-one direction="row" :list="noticeList"></notice-one> -->
<notice-one :direction="announcementNum> 1?'column':'row'" :list="announcement"></notice-one>
</view> </view>
</view> </view>
</view> </view>
@ -254,6 +255,8 @@
statusHeight: uni.getSystemInfoSync().statusBarHeight + 50, statusHeight: uni.getSystemInfoSync().statusBarHeight + 50,
messageNumber: 0 ,// messageNumber: 0 ,//
noticeList:[{id:1,title:'系统正在维护中...'}],// noticeList:[{id:1,title:'系统正在维护中...'}],//
announcement:[], //
announcementNum:0, //
// //
repairList:[ repairList:[
{imgsrc:'/static/public/icon-home-repair.png',title:'报修'}, {imgsrc:'/static/public/icon-home-repair.png',title:'报修'},
@ -324,7 +327,7 @@
locationstr:'', locationstr:'',
contactPhone:'',// contactPhone:'',//
project_count:0,// project_count:0,//
fault_count:0,// project_error_count:0,//
} }
}, },
onShow() { onShow() {
@ -347,19 +350,43 @@
this.$requst.get('/universal/api.home/home').then(res=>{ this.$requst.get('/universal/api.home/home').then(res=>{
if(res.code) { if(res.code) {
let homeObj = res.data; let homeObj = res.data;
this.messageNumber = homeObj.message;// console.log(res,'首页信息查询')
this.messageNumber = homeObj.unread_messages;//
this.contactPhone = homeObj.contact;// this.contactPhone = homeObj.contact;//
this.project_count = homeObj.project_count;// this.project_count = homeObj.project_count;//
this.fault_count = homeObj.fault_count;// this.project_error_count = homeObj.project_error_count;//
this.projectRepairList[0].num = homeObj.pending_order_count; //
this.projectRepairList[1].num = homeObj.pending_count; //
this.projectRepairList[2].num = homeObj.under_repair_count; //
this.workOrderList[0].num = homeObj.abnormal_order_count; //
this.workOrderList[1].num = homeObj.overdue_order_count; //
this.workOrderList[2].num = homeObj.time_out_order_count; //
this.workOrderList[3].num = homeObj.work_order_count; //
this.settlementList[0].num = homeObj.pending_payment_count; //
this.settlementList[1].num = homeObj.paid_for_count; //
this.stayEventList[0].num = homeObj.approval_count; //
this.stayEventList[1].num = homeObj.pending_payment_count; //
// //
if(homeObj.notice.length) { // if(homeObj.notice.length) {
homeObj.notice.forEach(item=>{ // homeObj.notice.forEach(item=>{
let obj = { // let obj = {
id:1, // id:1,
title:`${item.name}${item.content}` // title:`${item.name}${item.content}`
} // }
this.noticeList.push(obj); // this.noticeList.push(obj);
}) // })
// }
//
if(homeObj.announcement.length>0){
this.announcementNum = homeObj.announcement.length;
this.announcement = homeObj.announcement;
console.log(this.announcement,'公告列表')
} }
} }
}) })

View File

@ -88,6 +88,7 @@
page: this.page page: this.page
} }
queryFun(params).then(res => { queryFun(params).then(res => {
console.log(res,'备品列表')
if (res.code) { if (res.code) {
this.total = res.data.total; // this.total = res.data.total; //
if (this.page == 1) this.dataList = []; if (this.page == 1) this.dataList = [];
@ -95,13 +96,13 @@
res.data.data.forEach(item=>{ res.data.data.forEach(item=>{
let obj = { let obj = {
id:item.spare_id, id:item.spare_id,
name:item.name,// name:item.project_name,//
brand:item.brand,// brand:item.brand,//
quantity: item.quantity,// quantity: item.quantity,//
model:item.model,// model:item.product_model,//
size:item.size,// size:item.size,//
batch_number:item.batch_number,// batch_number:item.batch_number,//
time:item.time,// time:item.warehousing_time,//
status:item.status //0 1 status:item.status //0 1
} }
this.dataList.push(obj); this.dataList.push(obj);

View File

@ -23,36 +23,10 @@
<image class="img" src="../../static/iocn/dn.png" mode=""></image> <image class="img" src="../../static/iocn/dn.png" mode=""></image>
<text class="text">基本信息</text> <text class="text">基本信息</text>
</view> </view>
<view class="text-content"> <view class="text-content">
<view class="li clips1"> <view class="li clips1" v-for="(item,index) in dataArr" :key="index">
客户名称<text class="cor">长沙警校</text> {{item.name}}<text class="cor">{{item.value}}</text>
</view> </view>
<view class="li">
客户编号<text class="cor">xxxxxxxxx</text>
</view>
<view class="li">
客户等级<text class="cor">VIP1</text>
</view>
<view class="li">
所属行业<text class="cor">安防</text>
</view>
<view class="li">
客户类型<text class="cor">xxxx</text>
</view>
<view class="li">
入库时间<text class="cor">2022.3.1</text>
</view>
<view class="li">
项目数量<text class="cor1 bold">50</text>
</view>
<view class="li">
所属区域<text class="cor">长沙</text>
</view>
<view class="li">
详细地址<text class="cor">长沙xxxxx</text>
</view>
</view> </view>
</view> </view>
<view class="details-content listTwo"> <view class="details-content listTwo">
@ -60,34 +34,10 @@
<image class="img" src="../../static/iocn/lxr.png" mode=""></image> <image class="img" src="../../static/iocn/lxr.png" mode=""></image>
<text class="text">联系人</text> <text class="text">联系人</text>
</view> </view>
<view class="text-content"> <view class="text-content">
<view class="li"> <view class="li clips1" v-for="(item,index) in contactArr" :key="index">
姓名<text class="cor">Eveal</text> {{item.name}}<text class="cor">{{item.value}}</text>
</view> </view>
<view class="li">
所属部门<text class="cor">产品研发部</text>
</view>
<view class="li">
职务<text class="cor">经理</text>
</view>
<view class="li">
电话<text class="cor">154751787</text>
</view>
<view class="li">
微信<text class="cor">14250</text>
</view>
<view class="li">
qq<text class="cor">9090000</text>
</view>
<view class="li">
邮箱<text class="cor">1216311@qq.com</text>
</view>
<view class="li">
负责时间段<text class="cor">xxxxx </text>
</view>
</view> </view>
</view> </view>
<view class="project-list listThree"> <view class="project-list listThree">
@ -147,22 +97,15 @@
}, },
data() { data() {
return { return {
dataArr:{ dataArr:[], //
customerName:"长沙警校", contactArr:[], //
customerCode:"xxxxxxxxx",
customerVIP:"VIP1",
industryInvolved:"安防",
customerType:"xxxx",
warehouseTime:"2022.3.1" ,
projectNum:"50",
area:"长沙",
},
clientId:'',//id clientId:'',//id
yearArr:[],// yearArr:[],//
currentyear: '',// currentyear: '',//
chooseyear:'',// chooseyear:'',//
projectList:[]// projectList:[],//
phone:'', //
wechart:'', //
} }
}, },
onLoad(op){ onLoad(op){
@ -184,8 +127,24 @@
// //
queryDetailEv(){ queryDetailEv(){
queryDetail({type_id:1,member_id:this.clientId}).then(res=>{ queryDetail({type_id:1,member_id:this.clientId}).then(res=>{
console.log(res,'客户详情信息')
if(res.code) { if(res.code) {
res.data.basic_information.forEach(item=>{
let obj={
name:item.name,
value:item.value
}
this.dataArr.push(obj)
})
res.data.principal.forEach(item=>{
let obj={
name:item.name,
value:item.value
}
this.contactArr.push(obj)
})
this.wechart = res.data.wechat;
this.phone = res.data.phone;
} else { } else {
this.$toolAll.tools.showToast(res.msg); this.$toolAll.tools.showToast(res.msg);
} }
@ -218,16 +177,25 @@
}, },
// //
copyWxFun(){ copyWxFun(){
uni.setClipboardData({ if(this.wechart !== ''){
data: 'hello', uni.setClipboardData({
success: function () {} data: this.wechart,
}); success: function () {}
});
}else{
this.$toolAll.tools.showToast('客户微信号为空');
}
}, },
// //
telFun(){ telFun(){
uni.makePhoneCall({ if(this.phone !== ''){
phoneNumber: '13608235524' // uni.makePhoneCall({
}); phoneNumber: this.phone
});
}else{
this.$toolAll.tools.showToast('客户电话号为空');
}
} }
} }
} }

View File

@ -4,8 +4,8 @@
<container-subgroup-two> <container-subgroup-two>
<view slot="content" style="margin: -30rpx;"> <view slot="content" style="margin: -30rpx;">
<view class="peopleManagement-input"> <view class="peopleManagement-input">
<input type="text" class="int" @confirm="callEv" v-model="keyword" placeholder="请输入关键字" placeholder-style="color:#999999;" /> <input type="text" class="int" @confirm="callEv()" v-model="keyword" placeholder="请输入关键字" placeholder-style="color:#999999;" />
<image class="search" @tap="callEv" src="../../static/iocn/ss.png" mode=""></image> <image class="search" @tap="callEv()" src="../../static/iocn/ss.png" mode=""></image>
<view class="xian"></view> <view class="xian"></view>
</view> </view>
<view class="peopleManagement-content pad-x50"> <view class="peopleManagement-content pad-x50">
@ -100,25 +100,25 @@
page:this.page, page:this.page,
keyword:this.keyword keyword:this.keyword
} }
this.$requst.get('/universal/api.user/user_location',params).then(res=>{ this.$requst.get('/universal/api.order/user_location',params).then(res=>{
if(res.code) { if(res.code) {
this.total = res.data.total; this.total = res.data.total;
if(this.page==1) this.dataList = []; if(this.page==1) this.dataList = [];
if(res.data.data.length) { if(res.data.data.length) {
res.data.data.forEach(item=>{ res.data.data.forEach(item=>{
let obj = { let obj = {
id:1, id:item.uid,
name: item.name, name: item.name,
imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', imgsrc:item.avatar,
number:'YG20211207-001', number:item.user_number,
rate:5, rate:item.starlevel,
num:item.pending_order, num:item.pending_order,
allnum:item.processed_order, allnum:item.processed_order,
address:item.address, address:item.address,
phone:item.phone, phone:item.phone,
time:item.register_time, time:item.register_time,
state: false, state: false,
isJob: item.is_working ? true : false, isJob: item.is_working==1 ? true : false,
is_check:item.is_check is_check:item.is_check
} }
this.dataList.push(obj); this.dataList.push(obj);
@ -132,6 +132,7 @@
this.page = 1; this.page = 1;
this.checkList(); this.checkList();
}, },
listStateFun(item){ listStateFun(item){
this.dataList.forEach(item1=>{item1.state = false}) this.dataList.forEach(item1=>{item1.state = false})
item.state = !item.state; item.state = !item.state;
@ -192,6 +193,7 @@
right: 43rpx; right: 43rpx;
top: 50%; top: 50%;
margin-top: -14rpx; margin-top: -14rpx;
z-index: 9;
} }
.peopleManagement-content .li { .peopleManagement-content .li {
background-color: #FFFFFF; background-color: #FFFFFF;

View File

@ -13,7 +13,7 @@
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="indication-point fon24 disjcac">{{index}}/{{imgNum}}</view> <view class="indication-point fon24 disjcac">{{index+1}}/{{imgNum}}</view>
</view> </view>
<view class="title">{{projectObj.project_name}}</view> <view class="title">{{projectObj.project_name}}</view>
<view class="code">{{projectObj.project_number}}</view> <view class="code">{{projectObj.project_number}}</view>
@ -151,7 +151,7 @@
}) })
}, },
changeAutoplay(data) { changeAutoplay(data) {
this.index = data.detail.current - 0 + 1 this.index = data.detail.current;
}, },
getData(id) { getData(id) {
this.$requst.get('/universal/api.project/project_info', { this.$requst.get('/universal/api.project/project_info', {

View File

@ -188,32 +188,6 @@
<view class="text">使用数量1</view> <view class="text">使用数量1</view>
</view> </view>
</view> </view>
<view class="li">
<image class="img" src="../../static/del/img001.png" mode="aspectFill" lazy-load>
</image>
<view class="text-content">
<view class="title">
<view class="text clips1">全彩LED显示屏电源</view>
<view class="date">1011-1</view>
</view>
<view class="text">配件品牌华鑫电源</view>
<view class="text">规格型号5A-75B</view>
<view class="text">使用数量1</view>
</view>
</view>
<view class="li">
<image class="img" src="../../static/del/img001.png" mode="aspectFill"
lazy-load></image>
<view class="text-content">
<view class="title">
<view class="text clips1">全彩LED显示屏电源</view>
<view class="date">1011-1</view>
</view>
<view class="text">配件品牌华鑫电源</view>
<view class="text">规格型号5A-75B</view>
<view class="text">使用数量1</view>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -328,9 +302,10 @@
getDetail(type) { getDetail(type) {
let params = { let params = {
order_id: this.orderId, order_id: this.orderId,
type type:type
} }
this.$requst.get('/universal/api.order/order_info', params).then(res => { this.$requst.get('/universal/api.order/order_info', params).then(res => {
console.log(res.data,'工单详情')
if (res.code) { if (res.code) {
switch (type) { switch (type) {
case 1: case 1:
@ -377,7 +352,7 @@
swiperCurrentFun(data) { swiperCurrentFun(data) {
let current = data.detail.current; let current = data.detail.current;
// //
this.detailSwitch(current); // this.detailSwitch(current);
this.detailsNavFun(current); this.detailsNavFun(current);
}, },
detailsNavFun(index) { detailsNavFun(index) {

View File

@ -31,11 +31,9 @@
}, },
data() { data() {
return { return {
dataList:[ dataList:[],
{id:1,imgsrc:'/static/del/img001.png',title:'智能会议平板交互电子白板会议一体机视 频会议多媒体教学培训',num:'1台',peopleNum:'1135'},
],
page:1, page:1,
size:20, size:10,
total:0, total:0,
ifLoading:true ifLoading:true
} }
@ -58,16 +56,28 @@
title:'加载中...', title:'加载中...',
mask:true mask:true
}) })
// this.$request.get('',{list_rows:this.size,page:this.page}).then(res=>{ this.$requst.get('/universal/api.new_product/new_product_list',{list_rows:this.size,page:this.page}).then(res=>{
// if(res.code) { if(res.code) {
// this.total = res.data.total; this.total = res.data.total;
// if(this.page==1) this.dataList = []; let list = res.data.data;
// } else { list.forEach(item=>{
// this.$toolAll.tools.showToast(res.msg); let obj={
// } id: item.id, //id
title: item.title, //
summary: item.summary, //
peopleNum: item.purchase, //
num: item.moq, //
imgsrc: item.cover_img //
}
this.dataList.push(obj);
})
console.log(this.dataList,'新产品列表2')
} else {
this.$toolAll.tools.showToast(res.msg);
}
uni.hideLoading(); uni.hideLoading();
this.ifLoading = false; this.ifLoading = false;
// }) })
}, },
// //
goDetail(index){ goDetail(index){

View File

@ -30,7 +30,7 @@
<view class="mar-y30 flexs">服务范围 <text style="color: red;">*</text></view> <view class="mar-y30 flexs">服务范围 <text style="color: red;">*</text></view>
<scroll-view scroll-x style="width: 76%;"> <scroll-view scroll-x style="width: 76%;">
<view class="disac"> <view class="disac">
<view @tap="chooseStatus(index,2)" v-for="(item,index) in serviceRange" :key="index" class="service-range-status mar-y10 flexs pad-zy30 pad-sx6" :class="rangeNum==index ? 'service-range-activeStatus' : ''">{{item}}</view> <view @tap="chooseStatus(index,2)" v-for="(item,index) in serviceRange" :key="index" class="service-range-status mar-y10 flexs pad-zy30 pad-sx6" :class="rangeNum==index ? 'service-range-activeStatus' : ''">{{item}}KM</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -47,7 +47,7 @@
</template> </template>
<script> <script>
import city from '@/components/city/city.vue'; import city from '@/components/city/city-new.vue';
// import city from '@/components/city/city.js'; // import city from '@/components/city/city.js';
export default { export default {
components:{ components:{
@ -59,7 +59,7 @@
statusNum:0, statusNum:0,
workingHours:[{id:3,title:'不限'},{id:1,title:'白天'},{id:2,title:'晚上'}], workingHours:[{id:3,title:'不限'},{id:1,title:'白天'},{id:2,title:'晚上'}],
hoursNum:0, hoursNum:0,
serviceRange:['30KM','80KM','1500KM','其他','其他','其他','其他'], serviceRange:['30','80','500','>500'],
rangeNum:0, rangeNum:0,
lotusAddressData:{ lotusAddressData:{
visible:false, visible:false,
@ -74,7 +74,8 @@
detailed_address:'',// detailed_address:'',//
remarkText:'',// remarkText:'',//
eareWidth:'', eareWidth:'',
flag:true flag:true,
area_id:''
} }
}, },
onReady() { onReady() {
@ -82,25 +83,9 @@
query.select('#timeBox').boundingClientRect((rect) => { query.select('#timeBox').boundingClientRect((rect) => {
this.eareWidth = rect.width; this.eareWidth = rect.width;
}).exec() }).exec()
this.getDistrict(); // this.getDistrict();
this.getEar();
}, },
methods: { methods: {
//
getEar() {
let params = {
pidkey:'',
pid:'',
all:1
}
this.$requst.get('/universal/api.other/city',params).then(res=>{
if(res.code) {
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
},
// //
submitData(){ submitData(){
if(this.checkEmpty()) { if(this.checkEmpty()) {
@ -109,7 +94,7 @@
let params = { let params = {
is_working:this.personnelStatus[this.statusNum].id,// is_working:this.personnelStatus[this.statusNum].id,//
working_hours:this.workingHours[this.hoursNum].id ,// working_hours:this.workingHours[this.hoursNum].id ,//
area_id:272, area_id:this.area_id,
area:this.region,// area:this.region,//
address:this.detailed_address,// address:this.detailed_address,//
service_distance: parseFloat(this.serviceRange[this.rangeNum]) || 0,// service_distance: parseFloat(this.serviceRange[this.rangeNum]) || 0,//
@ -140,42 +125,43 @@
} }
return result; return result;
}, },
getDistrict() { // getDistrict() {
let ya = this // let ya = this
uni.getLocation({ // uni.getLocation({
success:(res)=> { // success:(res)=> {
uni.request({ // uni.request({
url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=B2ABZ-SIDKS-WD2O3-6CJ2U-CDZOT-U3FKF`, // url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=B2ABZ-SIDKS-WD2O3-6CJ2U-CDZOT-U3FKF`,
header: { // header: {
'Content-Type':'application/json' // 'Content-Type':'application/json'
}, // },
success:(res)=> { // success:(res)=> {
// console.log('',res) // // console.log('',res)
let provinceStr = res.data.result.address_component.province; // let provinceStr = res.data.result.address_component.province;
if(provinceStr=='北京市') { // if(provinceStr=='') {
provinceStr = '北京'; // provinceStr = '';
} else if(provinceStr=='天津市') { // } else if(provinceStr=='') {
provinceStr = '天津'; // provinceStr = '';
} else if(provinceStr=='上海市') { // } else if(provinceStr=='') {
provinceStr = '上海'; // provinceStr = '';
} else if(provinceStr=='重庆市') { // } else if(provinceStr=='') {
provinceStr = '重庆'; // provinceStr = '';
} // }
ya.newProvice = provinceStr; // ya.newProvice = provinceStr;
ya.newCity = res.data.result.address_component.city; // ya.newCity = res.data.result.address_component.city;
ya.newDistrict = res.data.result.address_component.district; // ya.newDistrict = res.data.result.address_component.district;
this.region = ya.newProvice + ya.newCity + ya.newDistrict; // this.region = ya.newProvice + ya.newCity + ya.newDistrict;
} // }
}) // })
}, // },
}) // })
}, // },
//picker //picker
openPicker() { openPicker() {
this.lotusAddressData.visible = true; this.lotusAddressData.visible = true;
this.lotusAddressData.provinceName = this.newProvice; console.log(this.lotusAddressData.visible,'12121212121')
this.lotusAddressData.cityName = this.newCity; // this.lotusAddressData.provinceName = this.newProvice;
this.lotusAddressData.townName = this.newDistrict; // this.lotusAddressData.cityName = this.newCity;
// this.lotusAddressData.townName = this.newDistrict;
}, },
// //
choseValue(res){ choseValue(res){
@ -187,7 +173,8 @@
this.lotusAddressData.provinceName = res.province;// this.lotusAddressData.provinceName = res.province;//
this.lotusAddressData.cityName = res.city;// this.lotusAddressData.cityName = res.city;//
this.lotusAddressData.townName = res.town;// this.lotusAddressData.townName = res.town;//
this.region = `${res.province}${res.city}${res.town}`; //region this.area_id = res.area_id;
this.region = `${res.province}${res.city=='市辖区'?'':res.city}${res.town}`; //region
this.regionObj = { this.regionObj = {
province:res.province, province:res.province,
provinceCode:res.provinceCode, provinceCode:res.provinceCode,

View File

@ -116,8 +116,9 @@
// //
getSettings(){ getSettings(){
this.$requst.post('/universal/api.settings/settings').then(res=>{ this.$requst.post('/universal/api.settings/settings').then(res=>{
console.log(res,'调用成功')
if(res.code){ if(res.code){
// uni.navigateBack({delta:1}) // uni.navigateBack({delta:1})
} }