反馈接口部分调用完成
parent
7640b848e0
commit
98e6b5fe45
|
@ -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:'', //0省,1市,2区
|
||||
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>
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
// 处理工单,获取
|
||||
|
|
|
@ -256,12 +256,6 @@
|
|||
url: urls[index]
|
||||
})
|
||||
},
|
||||
// 前往设置页面
|
||||
goSetUp() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/set-up/set-up'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -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,'公告列表')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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('客户电话号为空');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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', {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -116,8 +116,9 @@
|
|||
// 设置
|
||||
getSettings(){
|
||||
this.$requst.post('/universal/api.settings/settings').then(res=>{
|
||||
console.log(res,'调用成功')
|
||||
if(res.code){
|
||||
|
||||
|
||||
// uni.navigateBack({delta:1})
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue