反馈接口部分调用完成

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" />
<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)">
<view>{{item[theKey]}}</view>
<view>{{item}}</view>
</swiper-item>
</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 @click="goMore"></view>
</view>

View File

@ -20,7 +20,7 @@ export function queryFun(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]
})
},
//
goSetUp() {
uni.navigateTo({
url: '/pagesB/set-up/set-up'
})
}
}
}
</script>

View File

@ -36,14 +36,15 @@
<view class="bleft" style="height: 90rpx;"></view>
<view class="disjcac fc width50">
<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 class="disac pad-s30 pad-x10">
<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">
<!-- <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>
@ -254,6 +255,8 @@
statusHeight: uni.getSystemInfoSync().statusBarHeight + 50,
messageNumber: 0 ,//
noticeList:[{id:1,title:'系统正在维护中...'}],//
announcement:[], //
announcementNum:0, //
//
repairList:[
{imgsrc:'/static/public/icon-home-repair.png',title:'报修'},
@ -324,7 +327,7 @@
locationstr:'',
contactPhone:'',//
project_count:0,//
fault_count:0,//
project_error_count:0,//
}
},
onShow() {
@ -347,19 +350,43 @@
this.$requst.get('/universal/api.home/home').then(res=>{
if(res.code) {
let homeObj = res.data;
this.messageNumber = homeObj.message;//
console.log(res,'首页信息查询')
this.messageNumber = homeObj.unread_messages;//
this.contactPhone = homeObj.contact;//
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) {
homeObj.notice.forEach(item=>{
let obj = {
id:1,
title:`${item.name}${item.content}`
}
this.noticeList.push(obj);
})
// if(homeObj.notice.length) {
// homeObj.notice.forEach(item=>{
// let obj = {
// id:1,
// title:`${item.name}${item.content}`
// }
// 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
}
queryFun(params).then(res => {
console.log(res,'备品列表')
if (res.code) {
this.total = res.data.total; //
if (this.page == 1) this.dataList = [];
@ -95,13 +96,13 @@
res.data.data.forEach(item=>{
let obj = {
id:item.spare_id,
name:item.name,//
name:item.project_name,//
brand:item.brand,//
quantity: item.quantity,//
model:item.model,//
model:item.product_model,//
size:item.size,//
batch_number:item.batch_number,//
time:item.time,//
time:item.warehousing_time,//
status:item.status //0 1
}
this.dataList.push(obj);

View File

@ -23,36 +23,10 @@
<image class="img" src="../../static/iocn/dn.png" mode=""></image>
<text class="text">基本信息</text>
</view>
<view class="text-content">
<view class="li clips1">
客户名称<text class="cor">长沙警校</text>
<view class="li clips1" v-for="(item,index) in dataArr" :key="index">
{{item.name}}<text class="cor">{{item.value}}</text>
</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 class="details-content listTwo">
@ -60,34 +34,10 @@
<image class="img" src="../../static/iocn/lxr.png" mode=""></image>
<text class="text">联系人</text>
</view>
<view class="text-content">
<view class="li">
姓名<text class="cor">Eveal</text>
<view class="li clips1" v-for="(item,index) in contactArr" :key="index">
{{item.name}}<text class="cor">{{item.value}}</text>
</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 class="project-list listThree">
@ -147,22 +97,15 @@
},
data() {
return {
dataArr:{
customerName:"长沙警校",
customerCode:"xxxxxxxxx",
customerVIP:"VIP1",
industryInvolved:"安防",
customerType:"xxxx",
warehouseTime:"2022.3.1" ,
projectNum:"50",
area:"长沙",
},
dataArr:[], //
contactArr:[], //
clientId:'',//id
yearArr:[],//
currentyear: '',//
chooseyear:'',//
projectList:[]//
projectList:[],//
phone:'', //
wechart:'', //
}
},
onLoad(op){
@ -184,8 +127,24 @@
//
queryDetailEv(){
queryDetail({type_id:1,member_id:this.clientId}).then(res=>{
console.log(res,'客户详情信息')
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 {
this.$toolAll.tools.showToast(res.msg);
}
@ -218,16 +177,25 @@
},
//
copyWxFun(){
uni.setClipboardData({
data: 'hello',
success: function () {}
});
if(this.wechart !== ''){
uni.setClipboardData({
data: this.wechart,
success: function () {}
});
}else{
this.$toolAll.tools.showToast('客户微信号为空');
}
},
//
telFun(){
uni.makePhoneCall({
phoneNumber: '13608235524' //
});
if(this.phone !== ''){
uni.makePhoneCall({
phoneNumber: this.phone
});
}else{
this.$toolAll.tools.showToast('客户电话号为空');
}
}
}
}

View File

@ -4,8 +4,8 @@
<container-subgroup-two>
<view slot="content" style="margin: -30rpx;">
<view class="peopleManagement-input">
<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>
<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>
<view class="xian"></view>
</view>
<view class="peopleManagement-content pad-x50">
@ -100,25 +100,25 @@
page:this.page,
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) {
this.total = res.data.total;
if(this.page==1) this.dataList = [];
if(res.data.data.length) {
res.data.data.forEach(item=>{
let obj = {
id:1,
id:item.uid,
name: item.name,
imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
number:'YG20211207-001',
rate:5,
imgsrc:item.avatar,
number:item.user_number,
rate:item.starlevel,
num:item.pending_order,
allnum:item.processed_order,
address:item.address,
phone:item.phone,
time:item.register_time,
state: false,
isJob: item.is_working ? true : false,
isJob: item.is_working==1 ? true : false,
is_check:item.is_check
}
this.dataList.push(obj);
@ -132,6 +132,7 @@
this.page = 1;
this.checkList();
},
listStateFun(item){
this.dataList.forEach(item1=>{item1.state = false})
item.state = !item.state;
@ -192,6 +193,7 @@
right: 43rpx;
top: 50%;
margin-top: -14rpx;
z-index: 9;
}
.peopleManagement-content .li {
background-color: #FFFFFF;

View File

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

View File

@ -188,32 +188,6 @@
<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 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>
@ -328,9 +302,10 @@
getDetail(type) {
let params = {
order_id: this.orderId,
type
type:type
}
this.$requst.get('/universal/api.order/order_info', params).then(res => {
console.log(res.data,'工单详情')
if (res.code) {
switch (type) {
case 1:
@ -377,7 +352,7 @@
swiperCurrentFun(data) {
let current = data.detail.current;
//
this.detailSwitch(current);
// this.detailSwitch(current);
this.detailsNavFun(current);
},
detailsNavFun(index) {

View File

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

View File

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

View File

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