个微截图
This commit is contained in:
@@ -38,6 +38,8 @@ Page({
|
||||
|
||||
isShowExist:false, //客户是否已存在
|
||||
wxgr:0,//是否添加个微
|
||||
wxgrimg:'',//个微
|
||||
wxgrimg_url:'',//个微
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
@@ -309,6 +311,12 @@ Page({
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if(this.data.wxgr==1&&this.data.wxgrimg==''){
|
||||
wx.showToast({
|
||||
title: '请上传个微截图',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
// else if(that.data.car_id == '' ){
|
||||
// wx.showToast({
|
||||
// title: '请选择车系车型',
|
||||
@@ -347,6 +355,9 @@ Page({
|
||||
params['of2_id'] = this.data.of2_id;
|
||||
}
|
||||
params['wxgr'] = this.data.wxgr;
|
||||
if(this.data.wxgr==1){
|
||||
params['wxgrimg'] = this.data.wxgrimg;
|
||||
}
|
||||
params['city_id'] = this.data.city_id;
|
||||
params['county_id'] = this.data.county_id;
|
||||
params['buy_time'] = this.data.buy_time;
|
||||
@@ -582,4 +593,66 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//选择图片
|
||||
chooseImg(e) {
|
||||
let that = this
|
||||
|
||||
//上传个微截图
|
||||
if(e.currentTarget.dataset.type=='gw_img'){
|
||||
wx.chooseImage({
|
||||
count: 1, // 默认9
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success(res) {
|
||||
wx.showLoading({
|
||||
title: '上传中',
|
||||
})
|
||||
wx.uploadFile({
|
||||
url:_.config.api.upImg,
|
||||
filePath:res.tempFilePaths[0],
|
||||
name: 'img',
|
||||
formData: {
|
||||
'app': 'liche'
|
||||
},
|
||||
success: (resp) => {
|
||||
resp.data = JSON.parse(resp.data);
|
||||
if (resp.data.code == 200) {
|
||||
wx.hideLoading();
|
||||
that.setData({
|
||||
wxgrimg:resp.data.data.url,
|
||||
wxgrimg_url:resp.data.data.full_url,
|
||||
})
|
||||
}else{
|
||||
wx.hideLoading();
|
||||
wx.showToast({
|
||||
title: '上传失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
fail: res => {
|
||||
wx.showToast({
|
||||
title: '文件选择失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//查看图片
|
||||
previewImage(e){
|
||||
if(e.currentTarget.dataset.type=='gw_img'){
|
||||
wx.previewImage({
|
||||
current:this.data.wxgrimg_url,
|
||||
urls:[this.data.wxgrimg_url],
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
@@ -130,9 +130,28 @@
|
||||
<switch checked="{{wxgr==1}}" bindchange="switchWxgr" type="switch" color='#36afa2' style="zoom:0.8" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mt30 text-center" wx:if="{{wxgr==1}}">
|
||||
<view class="inline-block img-250x150 relative ulib-r10 overflowhidden">
|
||||
<block wx:if="{{wxgrimg_url}}">
|
||||
<view class="inline-block bg-f8 img-250x150 relative ulib-r10 overflowhidden">
|
||||
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-shuaxin inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="chooseImg" data-type="gw_img"></i>
|
||||
<image class='block wp100 img-250x150 ulib-r10' src='{{wxgrimg_url}}' mode='aspectFit' bindtap="previewImage" data-type="gw_img"></image>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view class="inline-block bg-f8 img-250x150 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="gw_img">
|
||||
<view class="absolute left-0 right-0 box-middle color-ccc">
|
||||
<i class="iconfont icon-paizhao font-42"></i>
|
||||
<view class="mt10 font-22">上传个微截图</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<block wx:for='{{taglList}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
|
||||
<view class="relative mt40">
|
||||
<view class="relative mt30">
|
||||
<view class="font-28">
|
||||
<text class="text-middle">{{list.name}}</text>
|
||||
<text class="text-middle font-24" wx:if="{{list.type=='radio'}}">(单选)</text>
|
||||
|
||||
@@ -52,6 +52,9 @@ Page({
|
||||
wxgr:0,//是否添加个微
|
||||
defeatIndex:-1,
|
||||
defeatTag: [],
|
||||
|
||||
wxgrimg:'',//个微
|
||||
wxgrimg_url:'',//个微
|
||||
},
|
||||
onLoad(options) {
|
||||
for (let key in options) {
|
||||
@@ -179,7 +182,6 @@ Page({
|
||||
this.setData({
|
||||
detailinfo:res.data,
|
||||
statuskey:res.data.status!=3?res.data.status:-10,
|
||||
wxgr:res.data.wxgr,
|
||||
})
|
||||
|
||||
if(res.data.level){
|
||||
@@ -229,6 +231,9 @@ Page({
|
||||
_.apiQuery.getAppCustomerData(params).then(res=>{
|
||||
this.setData({
|
||||
baseinfo:res.data.baseinfo,
|
||||
wxgr:res.data.baseinfo.wxgr,
|
||||
wxgrimg:res.data.baseinfo.wxgrimg,
|
||||
wxgrimg_url:res.data.baseinfo.wxgrimg_url,
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -481,7 +486,14 @@ Page({
|
||||
title: '请填写战败理由',
|
||||
icon: 'none'
|
||||
})
|
||||
}else{
|
||||
}
|
||||
else if((this.data.statuskey == 0||this.data.statuskey == 1)&&this.data.wxgr==1&&this.data.wxgrimg==''){
|
||||
wx.showToast({
|
||||
title: '请上传个微截图',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else{
|
||||
let credentials = []
|
||||
let photos = this.data.photos
|
||||
photos.forEach(item => {
|
||||
@@ -527,6 +539,7 @@ Page({
|
||||
}
|
||||
if((this.data.statuskey == 0||this.data.statuskey == 1)&&this.data.wxgr==1){
|
||||
params['wxgr'] = this.data.wxgr;
|
||||
params['wxgrimg'] = this.data.wxgrimg;
|
||||
}
|
||||
console.log(this.data.daodianTag)
|
||||
console.log(params)
|
||||
@@ -675,27 +688,77 @@ Page({
|
||||
},
|
||||
|
||||
//选择图片
|
||||
chooseImg() {
|
||||
chooseImg(e) {
|
||||
let that = this
|
||||
wx.chooseImage({
|
||||
count: 2 - this.data.photos.length, // 默认6
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success(res1) {
|
||||
let currentLength = that.data.photos.length
|
||||
for (let i = 0; i < res1.tempFilePaths.length; i++) {
|
||||
//上传图片
|
||||
that.uploadImg(res1.tempFilePaths[i])
|
||||
//上传小记图片
|
||||
if(e.currentTarget.dataset.type=='note_img'){
|
||||
wx.chooseImage({
|
||||
count: 2 - this.data.photos.length, // 默认6
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success(res1) {
|
||||
let currentLength = that.data.photos.length
|
||||
for (let i = 0; i < res1.tempFilePaths.length; i++) {
|
||||
//上传图片
|
||||
that.uploadImg(res1.tempFilePaths[i])
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
wx.showToast({
|
||||
title: '文件选择失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
wx.showToast({
|
||||
title: '文件选择失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
//上传个微截图
|
||||
if(e.currentTarget.dataset.type=='gw_img'){
|
||||
wx.chooseImage({
|
||||
count: 1, // 默认9
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success(res) {
|
||||
wx.showLoading({
|
||||
title: '上传中',
|
||||
})
|
||||
wx.uploadFile({
|
||||
url:_.config.api.upImg,
|
||||
filePath:res.tempFilePaths[0],
|
||||
name: 'img',
|
||||
formData: {
|
||||
'app': 'liche'
|
||||
},
|
||||
success: (resp) => {
|
||||
resp.data = JSON.parse(resp.data);
|
||||
if (resp.data.code == 200) {
|
||||
wx.hideLoading();
|
||||
that.setData({
|
||||
wxgrimg:resp.data.data.url,
|
||||
wxgrimg_url:resp.data.data.full_url,
|
||||
})
|
||||
}else{
|
||||
wx.hideLoading();
|
||||
wx.showToast({
|
||||
title: '上传失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
fail: res => {
|
||||
wx.showToast({
|
||||
title: '文件选择失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//上传图片
|
||||
@@ -749,10 +812,18 @@ Page({
|
||||
|
||||
//查看图片
|
||||
previewImage(e){
|
||||
wx.previewImage({
|
||||
current:e.currentTarget.dataset.current,
|
||||
urls:this.data.logslist[e.currentTarget.dataset.index].imgs,
|
||||
})
|
||||
if(e.currentTarget.dataset.type=='logs'){
|
||||
wx.previewImage({
|
||||
current:e.currentTarget.dataset.current,
|
||||
urls:this.data.logslist[e.currentTarget.dataset.index].imgs,
|
||||
})
|
||||
}
|
||||
else if(e.currentTarget.dataset.type=='gw_img'){
|
||||
wx.previewImage({
|
||||
current:this.data.wxgrimg_url,
|
||||
urls:[this.data.wxgrimg_url],
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//战败/再战申请
|
||||
|
||||
+123
-105
@@ -89,7 +89,7 @@
|
||||
<!-- 图片 -->
|
||||
<view wx:if="{{item.imgs.length>0}}">
|
||||
<block wx:for="{{item.imgs}}" wx:for-item="img" wx:for-index="j" wx:key="j">
|
||||
<image bindtap="previewImage" data-current="{{img}}" data-index="{{index}}" class='img-125x75 mr10 bds-2-eb ulib-r5' src='{{img}}' mode='aspectFill'></image>
|
||||
<image bindtap="previewImage" data-type="logs" data-current="{{img}}" data-index="{{index}}" class='img-125x75 mr10 bds-2-eb ulib-r5' src='{{img}}' mode='aspectFill'></image>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 评论 -->
|
||||
@@ -278,123 +278,141 @@
|
||||
战败客户
|
||||
</view>
|
||||
</view>
|
||||
<block wx:if="{{statuskey==0||statuskey==1}}">
|
||||
<view class="mt20 bds-2-eb ml40 mr40 inner20 font-28 color-666 fn-clear ulib-r10">
|
||||
<view class="fn-fl">跟进渠道</view>
|
||||
<picker class="fn-fr wp60 text-right" bindchange="changeFollow" value="{{followIndex}}" range="{{follow}}">
|
||||
<text class="color-ccc" wx:if="{{followIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{follow[followIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="mt20 bds-2-eb ml40 mr40 inner20 font-28 color-666 fn-clear ulib-r10">
|
||||
<view class="fn-fl">客户等级</view>
|
||||
<view class="fn-fr wp60 text-right" wx:if="{{detailinfo.status==0&&statuskey==1}}">H</view>
|
||||
<picker class="fn-fr wp60 text-right" bindchange="changeLevel" value="{{levelIndex}}" range="{{level}}" wx:else>
|
||||
<text class="color-ccc" wx:if="{{levelIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{level[levelIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
|
||||
</picker>
|
||||
</view>
|
||||
<block wx:for='{{daoDianTag}}' wx:for-item='list' wx:for-index='i' wx:key='i' wx:if="{{statuskey==0}}">
|
||||
<view class="relative mt20 pl40 pr40">
|
||||
<view class="font-28">
|
||||
<text class="text-middle">{{list.name}}</text>
|
||||
<scroll-view scroll-y="true" style="max-height:1000rpx;">
|
||||
<block wx:if="{{statuskey==0||statuskey==1}}">
|
||||
<view class="mt20 bds-2-eb ml40 mr40 inner20 font-28 color-666 fn-clear ulib-r10">
|
||||
<view class="fn-fl">跟进渠道</view>
|
||||
<picker class="fn-fr wp60 text-right" bindchange="changeFollow" value="{{followIndex}}" range="{{follow}}">
|
||||
<text class="color-ccc" wx:if="{{followIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{follow[followIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="mt20 bds-2-eb ml40 mr40 inner20 font-28 color-666 fn-clear ulib-r10">
|
||||
<view class="fn-fl">客户等级</view>
|
||||
<view class="fn-fr wp60 text-right" wx:if="{{detailinfo.status==0&&statuskey==1}}">H</view>
|
||||
<picker class="fn-fr wp60 text-right" bindchange="changeLevel" value="{{levelIndex}}" range="{{level}}" wx:else>
|
||||
<text class="color-ccc" wx:if="{{levelIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{level[levelIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
|
||||
</picker>
|
||||
</view>
|
||||
<block wx:for='{{daoDianTag}}' wx:for-item='list' wx:for-index='i' wx:key='i' wx:if="{{statuskey==0}}">
|
||||
<view class="relative mt20 pl40 pr40">
|
||||
<view class="font-28">
|
||||
<text class="text-middle">{{list.name}}</text>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{list.type=='radio'}}">
|
||||
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
|
||||
<view class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 {{option.checked?'bg-36afa2 color-fff':'bg-f6 color-666'}}" bindtap="daoDianRadioPicker" data-i="{{i}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{list.type=='checkbox'}}">
|
||||
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
|
||||
<view class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 {{option.checked?'bg-36afa2 color-fff':'bg-f6 color-666'}}" bindtap="daoDianCheckPicker" data-i="{{i}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{list.type=='radio'}}">
|
||||
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
|
||||
<view class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 {{option.checked?'bg-36afa2 color-fff':'bg-f6 color-666'}}" bindtap="daoDianRadioPicker" data-i="{{i}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<block wx:for='{{gouMaiTag}}' wx:for-item='list' wx:for-index='i' wx:key='i' wx:if="{{statuskey==1}}">
|
||||
<view class="relative mt20 pl40 pr40">
|
||||
<view class="font-28">
|
||||
<text class="text-middle">{{list.name}}</text>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{list.type=='radio'}}">
|
||||
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
|
||||
<view class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 {{option.checked?'bg-36afa2 color-fff':'bg-f6 color-666'}}" bindtap="gouMaiRadioPicker" data-i="{{i}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{list.type=='checkbox'}}">
|
||||
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
|
||||
<view class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 {{option.checked?'bg-36afa2 color-fff':'bg-f6 color-666'}}" bindtap="gouMaiCheckPicker" data-i="{{i}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{list.type=='checkbox'}}">
|
||||
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
|
||||
<view class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 {{option.checked?'bg-36afa2 color-fff':'bg-f6 color-666'}}" bindtap="daoDianCheckPicker" data-i="{{i}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<view class="mt20 bds-2-eb ml40 mr40 inner20 font-28 {{levelIndex>-1?'color-666':'color-ccc'}} fn-clear ulib-r10">
|
||||
<view class="fn-fl">计划回访时间</view>
|
||||
<view bindtap="{{levelIndex>-1?'optShowTimePicker':''}}" class="fn-fr wp60 text-right">
|
||||
<text class="color-ccc" wx:if="{{nextIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{dateList[nextIndex].year}}-{{dateList[nextIndex].month}}-{{dateList[nextIndex].day}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:for='{{gouMaiTag}}' wx:for-item='list' wx:for-index='i' wx:key='i' wx:if="{{statuskey==1}}">
|
||||
<view class="relative mt20 pl40 pr40">
|
||||
<view class="font-28">
|
||||
<text class="text-middle">{{list.name}}</text>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{list.type=='radio'}}">
|
||||
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
|
||||
<view class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 {{option.checked?'bg-36afa2 color-fff':'bg-f6 color-666'}}" bindtap="gouMaiRadioPicker" data-i="{{i}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{list.type=='checkbox'}}">
|
||||
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
|
||||
<view class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 {{option.checked?'bg-36afa2 color-fff':'bg-f6 color-666'}}" bindtap="gouMaiCheckPicker" data-i="{{i}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="mt20 bds-2-eb ml40 mr40 inner20 font-28 {{levelIndex>-1?'color-666':'color-ccc'}} fn-clear ulib-r10">
|
||||
<view class="fn-fl">计划回访时间</view>
|
||||
<view bindtap="{{levelIndex>-1?'optShowTimePicker':''}}" class="fn-fr wp60 text-right">
|
||||
<text class="color-ccc" wx:if="{{nextIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{dateList[nextIndex].year}}-{{dateList[nextIndex].month}}-{{dateList[nextIndex].day}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="mt20 ml40 mr40 font-28 text-center relative mr10 pt20 pb20 ulib-r10 overflowhidden {{detailinfo.wxgr==1?'opacity-80':''}} {{wxgr == 1?'bg-36afa2 color-fff':'bg-f6'}}" style="height:78rpx;box-sizing:border-box;" bindtap="{{detailinfo.wxgr==1?'':'checkPicker'}}" data-pointer="gewei" wx:if="{{statuskey==0}}">
|
||||
<i class="absolute right-0 bottom-0 iconfont font-32 icon-xuanzhongjiaobiao" style="color:#56ffed;" wx:if="{{wxgr == 1}}"></i>
|
||||
<text>已添加个微</text>
|
||||
</view>
|
||||
<view class="mt20 pl40 pr40 font-28 text-center fn-flex" wx:if="{{statuskey==1}}">
|
||||
<view class="fn-flex-item flexsize6 relative mr10 pt20 pb20 ulib-r10 overflowhidden {{detailinfo.wxgr==1?'opacity-80':''}} {{wxgr == 1?'bg-36afa2 color-fff':'bg-f6'}}" style="height:78rpx;box-sizing:border-box;" bindtap="{{detailinfo.wxgr==1?'':'checkPicker'}}" data-pointer="gewei">
|
||||
<view class="mt20 ml40 mr40 font-28 text-center relative mr10 pt20 pb20 ulib-r10 overflowhidden {{baseinfo.wxgr==1?'opacity-80':''}} {{wxgr == 1?'bg-36afa2 color-fff':'bg-f6'}}" style="height:78rpx;box-sizing:border-box;" bindtap="{{baseinfo.wxgr==1?'':'checkPicker'}}" data-pointer="gewei" wx:if="{{statuskey==0}}">
|
||||
<i class="absolute right-0 bottom-0 iconfont font-32 icon-xuanzhongjiaobiao" style="color:#56ffed;" wx:if="{{wxgr == 1}}"></i>
|
||||
<text>已添加个微</text>
|
||||
</view>
|
||||
<view class="fn-flex-item flexsize5 relative ml10 mr10 pt20 pb20 ulib-r10 overflowhidden {{a_num == 1?'bg-36afa2 color-fff':'bg-f6'}}" style="height:78rpx;box-sizing:border-box;" bindtap="checkPicker" data-pointer="daodian">
|
||||
<i class="absolute right-0 bottom-0 iconfont font-32 icon-xuanzhongjiaobiao" style="color:#56ffed;" wx:if="{{a_num == 1}}"></i>
|
||||
<text>再次到店</text>
|
||||
<view class="mt20 pl40 pr40 font-28 text-center fn-flex" wx:if="{{statuskey==1}}">
|
||||
<view class="fn-flex-item flexsize6 relative mr10 pt20 pb20 ulib-r10 overflowhidden {{baseinfo.wxgr==1?'opacity-80':''}} {{wxgr == 1?'bg-36afa2 color-fff':'bg-f6'}}" style="height:78rpx;box-sizing:border-box;" bindtap="{{baseinfo.wxgr==1?'':'checkPicker'}}" data-pointer="gewei">
|
||||
<i class="absolute right-0 bottom-0 iconfont font-32 icon-xuanzhongjiaobiao" style="color:#56ffed;" wx:if="{{wxgr == 1}}"></i>
|
||||
<text>已添加个微</text>
|
||||
</view>
|
||||
<view class="fn-flex-item flexsize5 relative ml10 mr10 pt20 pb20 ulib-r10 overflowhidden {{a_num == 1?'bg-36afa2 color-fff':'bg-f6'}}" style="height:78rpx;box-sizing:border-box;" bindtap="checkPicker" data-pointer="daodian">
|
||||
<i class="absolute right-0 bottom-0 iconfont font-32 icon-xuanzhongjiaobiao" style="color:#56ffed;" wx:if="{{a_num == 1}}"></i>
|
||||
<text>再次到店</text>
|
||||
</view>
|
||||
<view class="fn-flex-item flexsize5 relative ml10 pt20 pb20 ulib-r10 overflowhidden {{t_num == 1?'bg-36afa2 color-fff':'bg-f6'}}" style="height:78rpx;box-sizing:border-box;" bindtap="checkPicker" data-pointer="shijia">
|
||||
<i class="absolute right-0 bottom-0 iconfont font-32 icon-xuanzhongjiaobiao" style="color:#56ffed;" wx:if="{{t_num == 1}}"></i>
|
||||
<text>客户试驾</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fn-flex-item flexsize5 relative ml10 pt20 pb20 ulib-r10 overflowhidden {{t_num == 1?'bg-36afa2 color-fff':'bg-f6'}}" style="height:78rpx;box-sizing:border-box;" bindtap="checkPicker" data-pointer="shijia">
|
||||
<i class="absolute right-0 bottom-0 iconfont font-32 icon-xuanzhongjiaobiao" style="color:#56ffed;" wx:if="{{t_num == 1}}"></i>
|
||||
<text>客户试驾</text>
|
||||
</view>
|
||||
</view>
|
||||
<block wx:if="{{statuskey!=3}}">
|
||||
<view class="mt20 pl40 pr40">
|
||||
<textarea class="wp100 inner20 bds-2-eb font-28 ulib-r10" style="height:200rpx;" placeholder-class="color-ccc" placeholder="请输入小记内容" bname='note' model:value='{{note}}' />
|
||||
</view>
|
||||
<view class="mt20 pl25 pr25">
|
||||
<view class="fn-flex">
|
||||
<block wx:for='{{photos}}' wx:for-item='photos' wx:for-index="index" wx:key='photo'>
|
||||
<view class="fn-flex-item ml15 mr15 relative">
|
||||
<i class="absolute top-0 right-0 bg-ccc iconfont icon-shanchu inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="delPic" data-index="{{index}}"></i>
|
||||
<image class='img-250x150 ulib-r10' src='{{photos.img_url}}' mode='aspectFill'></image>
|
||||
<view class="mt20 text-center" wx:if="{{(statuskey==0||statuskey==1)&&wxgr==1}}">
|
||||
<view class="inline-block img-250x150 relative ulib-r10 overflowhidden">
|
||||
<block wx:if="{{wxgrimg_url}}">
|
||||
<view class="inline-block bg-f8 img-250x150 relative ulib-r10 overflowhidden">
|
||||
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-shuaxin inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="chooseImg" data-type="gw_img"></i>
|
||||
<image class='block wp100 img-250x150 ulib-r10' src='{{wxgrimg_url}}' mode='aspectFit' bindtap="previewImage" data-type="gw_img"></image>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:if="{{photos.length==0}}">
|
||||
<view class="fn-flex-item ml15 mr15 relative" bindtap="chooseImg">
|
||||
<image class='img-250x150 ulib-r10' src='{{imgUrl}}common/add-pic.jpg' mode='aspectFill'></image>
|
||||
</view>
|
||||
<view class="fn-flex-item ml15 mr15 relative" bindtap="chooseImg">
|
||||
<image class='img-250x150 ulib-r10' src='{{imgUrl}}common/add-pic.jpg' mode='aspectFill'></image>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:elif="{{photos.length==1}}">
|
||||
<view class="fn-flex-item ml15 mr15 relative" bindtap="chooseImg">
|
||||
<image class='img-250x150 ulib-r10' src='{{imgUrl}}common/add-pic.jpg' mode='aspectFill'></image>
|
||||
<block wx:else>
|
||||
<view class="inline-block bg-f8 img-250x150 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="gw_img">
|
||||
<view class="absolute left-0 right-0 box-middle color-ccc">
|
||||
<i class="iconfont icon-paizhao font-42"></i>
|
||||
<view class="mt10 font-22">上传个微截图</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="pl40 pr40" wx:if="{{statuskey==3}}">
|
||||
<scroll-view scroll-y="true" style="max-height:700rpx;">
|
||||
<block wx:if="{{statuskey!=3}}">
|
||||
<view class="mt15 pl40 pr40">
|
||||
<textarea class="wp100 inner20 bds-2-eb font-28 ulib-r10" style="height:200rpx;" placeholder-class="color-ccc" placeholder="请输入小记内容" bname='note' model:value='{{note}}' />
|
||||
</view>
|
||||
<view class="mt20 pl25 pr25">
|
||||
<view class="fn-flex">
|
||||
<block wx:for='{{photos}}' wx:for-item='photos' wx:for-index="index" wx:key='photo'>
|
||||
<view class="fn-flex-item ml15 mr15 relative">
|
||||
<i class="absolute top-0 right-0 bg-ccc iconfont icon-shanchu inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="delPic" data-index="{{index}}"></i>
|
||||
<image class='img-250x150 ulib-r10' src='{{photos.img_url}}' mode='aspectFill'></image>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:if="{{photos.length==0}}">
|
||||
<view class="fn-flex-item ml15 mr15 relative" bindtap="chooseImg" data-type="note_img">
|
||||
<image class='img-250x150 ulib-r10' src='{{imgUrl}}common/add-pic.jpg' mode='aspectFill'></image>
|
||||
</view>
|
||||
<view class="fn-flex-item ml15 mr15 relative" bindtap="chooseImg" data-type="note_img">
|
||||
<image class='img-250x150 ulib-r10' src='{{imgUrl}}common/add-pic.jpg' mode='aspectFill'></image>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:elif="{{photos.length==1}}">
|
||||
<view class="fn-flex-item ml15 mr15 relative" bindtap="chooseImg" data-type="note_img">
|
||||
<image class='img-250x150 ulib-r10' src='{{imgUrl}}common/add-pic.jpg' mode='aspectFill'></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="pl40 pr40" wx:if="{{statuskey==3}}">
|
||||
<view class="mt20 bds-2-eb inner20 font-28 color-666 ulib-r10">
|
||||
<picker class="fn-clear" bindchange="changeDefeat" value="{{defeatIndex}}" range="{{defeatTitleList}}">
|
||||
<view class="wp90 fn-fl text-nowrap color-ccc" wx:if="{{defeatIndex == -1}}">请选择</view>
|
||||
@@ -444,8 +462,8 @@
|
||||
<view class="mt20">
|
||||
<textarea class="wp100 inner20 bds-2-eb font-28 ulib-r10" style="height:200rpx;" placeholder-class="color-ccc" maxlength='100' placeholder="请填写战败理由" name='defeat_reason' model:value='{{defeat_reason}}' />
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="fn-flex mt20 pl60 pr60 pb50 text-center font-32 color-666">
|
||||
<button bindtap="optShowNote" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">
|
||||
取消
|
||||
|
||||
@@ -26,6 +26,8 @@ Page({
|
||||
countyIndex:-1,
|
||||
county_id:'',
|
||||
wxgr:0,//是否添加个微
|
||||
wxgrimg:'',//个微
|
||||
wxgrimg_url:'',//个微
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
@@ -50,6 +52,8 @@ Page({
|
||||
of_id:res.data.baseinfo.of_id.of_id?res.data.baseinfo.of_id.of_id:'',
|
||||
of2_id:res.data.baseinfo.of_id.of2_id?res.data.baseinfo.of_id.of2_id:'',
|
||||
wxgr:res.data.baseinfo.wxgr,
|
||||
wxgrimg:res.data.baseinfo.wxgrimg,
|
||||
wxgrimg_url:res.data.baseinfo.wxgrimg_url,
|
||||
})
|
||||
|
||||
//编辑基础信息使用
|
||||
@@ -369,6 +373,12 @@ Page({
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if(this.data.wxgr==1&&this.data.wxgrimg==''){
|
||||
wx.showToast({
|
||||
title: '请上传个微截图',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
// else if(that.data.car_id == '' ){
|
||||
// wx.showToast({
|
||||
// title: '请选择车系车型',
|
||||
@@ -423,6 +433,9 @@ Page({
|
||||
// params['color_id'] = that.data.color_id;
|
||||
// }
|
||||
params['wxgr'] = this.data.wxgr;
|
||||
if(this.data.wxgr==1){
|
||||
params['wxgrimg'] = this.data.wxgrimg;
|
||||
}
|
||||
_.apiQuery.putAppCustomerData(params).then(res => {
|
||||
|
||||
//刷新列表页
|
||||
@@ -641,4 +654,66 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//选择图片
|
||||
chooseImg(e) {
|
||||
let that = this
|
||||
|
||||
//上传个微截图
|
||||
if(e.currentTarget.dataset.type=='gw_img'){
|
||||
wx.chooseImage({
|
||||
count: 1, // 默认9
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success(res) {
|
||||
wx.showLoading({
|
||||
title: '上传中',
|
||||
})
|
||||
wx.uploadFile({
|
||||
url:_.config.api.upImg,
|
||||
filePath:res.tempFilePaths[0],
|
||||
name: 'img',
|
||||
formData: {
|
||||
'app': 'liche'
|
||||
},
|
||||
success: (resp) => {
|
||||
resp.data = JSON.parse(resp.data);
|
||||
if (resp.data.code == 200) {
|
||||
wx.hideLoading();
|
||||
that.setData({
|
||||
wxgrimg:resp.data.data.url,
|
||||
wxgrimg_url:resp.data.data.full_url,
|
||||
})
|
||||
}else{
|
||||
wx.hideLoading();
|
||||
wx.showToast({
|
||||
title: '上传失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
fail: res => {
|
||||
wx.showToast({
|
||||
title: '文件选择失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//查看图片
|
||||
previewImage(e){
|
||||
if(e.currentTarget.dataset.type=='gw_img'){
|
||||
wx.previewImage({
|
||||
current:this.data.wxgrimg_url,
|
||||
urls:[this.data.wxgrimg_url],
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
@@ -102,8 +102,27 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mt30 text-center" wx:if="{{wxgr==1}}">
|
||||
<view class="inline-block img-250x150 relative ulib-r10 overflowhidden">
|
||||
<block wx:if="{{wxgrimg_url}}">
|
||||
<view class="inline-block bg-f8 img-250x150 relative ulib-r10 overflowhidden">
|
||||
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-shuaxin inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="chooseImg" data-type="gw_img"></i>
|
||||
<image class='block wp100 img-250x150 ulib-r10' src='{{wxgrimg_url}}' mode='aspectFit' bindtap="previewImage" data-type="gw_img"></image>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view class="inline-block bg-f8 img-250x150 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="gw_img">
|
||||
<view class="absolute left-0 right-0 box-middle color-ccc">
|
||||
<i class="iconfont icon-paizhao font-42"></i>
|
||||
<view class="mt10 font-22">上传个微截图</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<block wx:for='{{taglList}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
|
||||
<view class="relative mt40">
|
||||
<view class="relative mt30">
|
||||
<view class="font-28">
|
||||
<text class="text-middle">{{list.name}}</text>
|
||||
<text class="text-middle font-24" wx:if="{{list.type=='radio'}}">(单选)</text>
|
||||
|
||||
Reference in New Issue
Block a user