59 Commits

Author SHA1 Message Date
老叶 f6864c6e71 静态-登记订单 2022-12-30 17:41:33 +08:00
老叶 6fded64ccf 静态-登记订单 2022-12-28 17:55:04 +08:00
老叶 71267c64e3 上传失败提示 2022-12-20 17:33:07 +08:00
老叶 bec388ab40 画布改大备份 2022-12-20 17:23:06 +08:00
yerz123 6c724ac21d car_id!=33 2022-11-26 21:13:50 +08:00
yerz123 7bf43deb33 car_id 2022-11-26 15:10:22 +08:00
yerz123 6f80b130c8 s_id==33 2022-11-26 15:06:19 +08:00
老叶 63910b257b 正式环境 2022-11-23 09:49:15 +08:00
老叶 706c7f00fc 客户是否已存在 2022-11-22 17:59:52 +08:00
yerz123 6b7388719b 正式 2022-11-15 21:56:53 +08:00
老叶 4cca0525fc 列表添加车辆品牌车系车型车辆版本 2022-11-15 17:58:58 +08:00
老叶 380dadbfa5 按揭图片展示 2022-11-15 17:21:27 +08:00
老叶 5c250d53de 按揭通知函多图 2022-11-15 17:02:12 +08:00
老叶 41dd758bff 上传图片修改 2022-11-15 15:21:44 +08:00
老叶 b4c1100a13 实名认证资料 2022-11-03 14:23:56 +08:00
老叶 10c680eff9 实名认证资料 2022-11-03 14:22:08 +08:00
老叶 17876858d4 实销凭证 2022-11-01 14:46:04 +08:00
老叶 a8e68bff32 订单详情添加企微信息 2022-11-01 14:25:12 +08:00
老叶 5730cfea22 正式线 2022-10-17 17:56:30 +08:00
老叶 e75cf13e85 数据看板 2022-10-17 16:23:17 +08:00
老叶 4261b03e82 数据看板修改 2022-10-13 10:37:13 +08:00
老叶 ba06adb6a7 统计数据 2022-10-12 15:47:40 +08:00
老叶 e8e142d51a 订单筛选 2022-09-07 14:02:36 +08:00
老叶 bc0d42c08c 交付订单确定 2022-08-31 10:48:34 +08:00
老叶 63f479d72c 编辑查看大图 2022-08-26 11:08:18 +08:00
老叶 406f0cf7e8 添加交付确认单 2022-08-19 16:17:15 +08:00
老叶 6765776ad9 点击高级搜索不重置 2022-08-17 13:57:22 +08:00
老叶 2d0234e3aa 销售顾问多选 2022-08-17 13:48:42 +08:00
老叶 e3877ab86a 门店数据改成 数据看板 2022-08-16 16:42:42 +08:00
老叶 8c7bd3985e 店铺数据 2022-08-16 14:39:06 +08:00
老叶 3e40bd1d04 店铺数据 2022-08-15 17:38:03 +08:00
老叶 bcdc92bd7d 漏斗数据 2022-08-15 15:34:12 +08:00
老叶 827048f2c4 门店数据修改 2022-08-15 15:28:16 +08:00
老叶 178ab1ea72 带时间到子页面 2022-08-15 14:21:37 +08:00
老叶 706cf3a087 门店数据 2022-08-15 13:57:16 +08:00
老叶 b843c47ff7 门店数据 2022-08-15 13:57:16 +08:00
老叶 93f0cf046a 统计表消息通讯 2022-08-15 13:57:15 +08:00
老叶 3147791b6b 数据统计-静态 2022-08-15 13:57:15 +08:00
老叶 308b9008d1 订单详情,退款所有信息不可编辑 2022-08-12 14:38:21 +08:00
老叶 321be4abac 订单详情-发票-合格证展示 2022-08-12 10:46:16 +08:00
老叶 7e8892cfbf iconfont 2022-08-11 17:40:05 +08:00
老叶 ead124d8a4 合格证,发票展示修改 2022-08-11 17:29:44 +08:00
老叶 fdaa89d42a 订单手机号,身份证去除空格 2022-08-09 15:39:10 +08:00
老叶 f2d5e79464 订单详情样式修改 2022-08-05 11:59:49 +08:00
老叶 6e412b88b7 保单入口判断 2022-08-05 10:19:10 +08:00
老叶 67bf2bbbbe 订单详情 - 保单上传 2022-08-02 16:41:37 +08:00
老叶 b9cf0be6df 移交 2022-07-28 09:45:09 +08:00
老叶 d5cc6898bd 分配订单 2022-07-27 17:57:50 +08:00
老叶 5ca9c9b9a7 离职管理 2022-07-27 15:23:17 +08:00
老叶 a43c6a6a4c 企业微信客服样式 2022-07-21 17:28:18 +08:00
老叶 6f713ffcf3 企微客服替换 2022-07-21 10:38:19 +08:00
老叶 83023a5b50 分配,回访可以选当天 2022-07-20 15:12:39 +08:00
老叶 6a20f801d5 隐藏转介绍 2022-07-11 10:07:30 +08:00
老叶 5157016eac 企业下单客户身份证 2022-07-07 16:00:10 +08:00
老叶 7a3673efd9 他店改派样式 2022-07-05 15:31:11 +08:00
老叶 dbf02638ed 客户分配,选择城市地区 2022-07-04 11:34:34 +08:00
老叶 978d67eac1 uid==1才可以编辑车主信息 2022-07-01 11:32:44 +08:00
老叶 3c62dab9d0 线索来源是否显示 2022-06-30 16:05:12 +08:00
老叶 d97c06a053 精品选装&用户画像 2022-06-27 15:29:02 +08:00
94 changed files with 8331 additions and 890 deletions
+13 -1
View File
@@ -47,7 +47,19 @@
"pages/inventory/warning/index",
"pages/order/editFinance/index",
"pages/statement/registration/index",
"pages/statement/privacy/index"
"pages/statement/privacy/index",
"pages/order/editCardid/index",
"pages/order/editBusinessBicence/index",
"pages/order/editLicenseImg/index",
"pages/order/editInsImg/index",
"pages/order/editOtherImg/index",
"pages/storeData/index",
"pages/storeData/customerData/index",
"pages/storeData/wechatData/index",
"pages/storeData/orderData/index",
"pages/order/editDeliveryckimg/index",
"pages/order/editQVImg/index",
"pages/order/editVoucherImg/index"
],
"echarts": [
{
+2
View File
@@ -27,6 +27,8 @@
.bg-2f3346-1a1c26{background-image:linear-gradient(#2f3346,#1a1c26);}
.bg-f6-fff{background-image:linear-gradient(#f6f6f6,#fff);}
.bg-f3f6fc{background-color:#f3f6fc;}
.bg-fffaeb{background-color:#fffaeb;}
.bg-f1f9f8{background-color:#f1f9f8;}
+2 -1
View File
@@ -29,7 +29,6 @@
/*layout flex*/
.fn-flex{display:flex;flex-flow:row;align-items:stretch;}
.fn-flex-center{align-items:center;}
.fn-flex-item{display:block;flex:1;}
.fn-flex-item.flexsize2{flex:2;}
.fn-flex-item.flexsize3{flex:3;}
@@ -43,6 +42,8 @@
.fn-flex-between{justify-content: space-between;}/*两端对齐*/
.fn-flex-wrap{flex-wrap:wrap}/*多行*/
.fn-flex-around{justify-content: space-around;}/*各项周围留有空白*/
.fn-flex-middle{align-items:center;}/*交叉轴上上下居中对齐*/
.fn-flex-center{justify-content: center;}/*居中对齐*/
.wp25{width:25%;box-sizing:border-box;}
.wp31{width:31%;box-sizing:border-box;}
+2
View File
@@ -23,6 +23,7 @@
.mt150{margin-top:150rpx;}
.mt190{margin-top:190rpx;}
.ml-1{margin-left:-1rpx;}
.ml1{margin-left:1rpx;}
.ml5{margin-left:5rpx;}
.ml10{margin-left:10rpx;}
.ml15{margin-left:15rpx;}
@@ -45,6 +46,7 @@
.ml200{margin-left:200rpx;}
.mr-20{margin-right:-20rpx;}
.mr-30{margin-right:-30rpx;}
.mr1{margin-right:1rpx;}
.mr5{margin-right:5rpx;}
.mr10{margin-right:10rpx;}
.mr11{margin-right:11rpx;}
File diff suppressed because one or more lines are too long
+15 -2
View File
@@ -36,7 +36,7 @@ api = {
appCustomerData: "app/customers/data", //获取客户详细信息
appCusorder: "app/cusorder", //新建订单 /获取订单列表 /获取订单详情 /修改付款方式 /修改委托协议
appCusorderTabs: "app/cusorder/tabs", //获取tab
appEmployees: "app/employees", //获取客户详细信息 /获取店员列表 /更新店员信息 /删除店员
appEmployees: "app/employees", //获取客户详细信息 /获取店员列表 /更新店员信息 /删除店员
appIdcard: "app/idcard", //创建申请开票信息
appUserCal: "app/user/cal", //获取用户统计
appCusorderCkcar: "app/cusorder/ckcar", //确认交付
@@ -143,7 +143,20 @@ api = {
appCustomersComments:'app/customers/comments', //用户评论
appCityArea:'app/city/area', //获取省/市/区/街道
appEmployeesLeave:'app/employees/leave', //获取离职 //提交离职
appCusorderV2Admins:'app/cusorderV2/admins', //分配订单
appCusorderdataInfo:'app/cusorderdata/info', //保单信息确认
appBizStats:'app/biz/stats', //数据看板首页
appBizStats_customer:'app/biz/stats_customer', //客户数据
appBizStats_wxqy:'app/biz/stats_wxqy', //企微数据
appBizStats_order:'app/biz/stats_order', //订单数据
appBizStats_days:'app/biz/stats_days', //客户/订单走势图
}
+70 -1
View File
@@ -202,7 +202,7 @@ apiQuery.postAppEmployees = function (params) {
})
}
//更新店员信息
//更新店员信息 //提交离职
apiQuery.putAppEmployees = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(true, Config.api.appEmployees, 2, params, "PUT", resolve, reject)
@@ -861,5 +861,74 @@ apiQuery.postAppCustomersComments = function (params) {
})
}
//获取省/市/区/街道
apiQuery.getAppCityArea = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(false, Config.api.appCityArea, 2, params, "GET", resolve, reject)
})
}
//获取离职
apiQuery.getAppEmployeesLeave = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(false, Config.api.appEmployeesLeave, 2, params, "GET", resolve, reject)
})
}
//提交离职
apiQuery.putAppEmployeesLeave = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(true, Config.api.appEmployeesLeave, 2, params, "PUT", resolve, reject)
})
}
//分配订单
apiQuery.putAppCusorderV2Admins = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(true, Config.api.appCusorderV2Admins, 2, params, "PUT", resolve, reject)
})
}
//保单信息确认
apiQuery.putAppCusorderdataInfo = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(true, Config.api.appCusorderdataInfo, 2, params, "PUT", resolve, reject)
})
}
//数据看板首页
apiQuery.getAppBizStats = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(false, Config.api.appBizStats, 2, params, "GET", resolve, reject)
})
}
//客户数据
apiQuery.getAppBizStats_customer = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(false, Config.api.appBizStats_customer, 2, params, "GET", resolve, reject)
})
}
//企微数据
apiQuery.getAppBizStats_wxqy = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(false, Config.api.appBizStats_wxqy, 2, params, "GET", resolve, reject)
})
}
//订单数据
apiQuery.getAppBizStats_order = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(false, Config.api.appBizStats_order, 2, params, "GET", resolve, reject)
})
}
//客户/订单走势图
apiQuery.getAppBizStats_days = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(false, Config.api.appBizStats_days, 2, params, "GET", resolve, reject)
})
}
export default apiQuery;
@@ -0,0 +1,277 @@
import _ from '../../commons/js/commons'
import Canvas from '../../commons/js/utils/canvas'
let isGetImgInfo = false
const app = getApp()
Component({
//组件的属性列表
properties: {
source: {
type: String,
value: 'goods'
},
isShow: {
type: Boolean,
value: false
},
isCreateQrcode: {
type: Boolean,
value: false
},
qccodeid: {
type: String,
value: ''
},
customImg: {
type: String,
value: ''
},
slogan: {
type: String,
value: ''
},
moments: {
type: String,
value: ''
},
},
//组件的初始数据
data: {
//headImg:app.getStorageByKey("userInfo").headimg,
defaultQrcode: _.config.imgUrl + 'common/qr.jpg',
imgs: [],
tempPosterPath: '',
showOptBtn:false,//操作按钮显示
},
attached: function () {
isGetImgInfo = false
},
//数据监听
observers: {
'isCreateQrcode': function (e) {
if (e) {
this.getMaterialHomeQrcode()
}
},
'isShow': function (e) {
if (e) {
this.setData({
showOptBtn:false,
})
this.createPoster()
}
},
'customImg': function (e) {
if (e) {
// this.setData({
// headImg:app.getStorageByKey("userInfo").headimg,
// })
//头像
//this.getImageInfo(this.data.headImg, 4)
this.getImageInfo(this.data.customImg, 3)
}
},
},
//组件的方法列表
methods: {
// 转化网络图片,获取路径
getImageInfo(src, index) {
let that = this
isGetImgInfo = false
setTimeout(function () {
wx.getImageInfo({
src: src,
success: (res) => {
let arr = that.data.imgs
arr[index] = res
that.setData({
imgs: arr
})
isGetImgInfo = true
},
fail: (err) => {
console.log('error img is: ' + src)
}
})
}, 200)
},
//获取二维码
getMaterialHomeQrcode() {
let params = {};
params['page'] = 'pages/special2/index';
params['scene'] = this.data.qccodeid+'_'+app.getStorageByKey("userInfo").biz_id;
params['width'] = 1280;
_.apiQuery.getMaterialHomeQrcode(params).then(res => {
this.getImageInfo(res.data.url, 2)
}).catch(res => {
//this.getImageInfo(this.data.defaultQrcode, 2)
})
},
//自定义海报
customizePoster(CTX){
if(this.data.customImg){
let that = this
this.setData({
canvasInfo:{
width: parseFloat(this.data.imgs[3].width)+'px',
height: parseFloat(this.data.imgs[3].height)+'px'
}
})
console.log(this.data.imgs[3].width)
console.log(this.data.imgs[3].height)
//背景
if (that.data.imgs[3]) {
CTX.drawImage(that.data.imgs[3].path, 0, 0, that.data.imgs[3].width, that.data.imgs[3].height, 0, 0, that.data.imgs[3].width, that.data.imgs[3].height)
}
// //头像
// if (that.data.imgs[4]) {
// Canvas.circleImage(CTX,that.data.imgs[4].path,20, (that.data.imgs[3].height-170)/2,22/2)
// }
// //昵称
// Canvas.drawTextOverflow(CTX, app.getStorageByKey("userInfo").nickname, 150, 1, 14, '#fff', 20, 46, (that.data.imgs[3].height-132)/2)
// //标语
// if (that.data.slogan) {
// Canvas.drawTextOverflow(CTX, that.data.slogan, 200, 2, 11, '#fff', 17, 20, (that.data.imgs[3].height-85)/2)
// }
// //标语
// if (that.data.slogan) {
// Canvas.drawTextOverflow(CTX, that.data.slogan, 180, 2, 11, '#666', 17, 20, (that.data.imgs[3].height-100)/2)
// }
//二维码
if (that.data.imgs[2]) {
if(this.data.imgs[3].width>this.data.imgs[3].height){
Canvas.circleImage(CTX,that.data.imgs[2].path,parseFloat(this.data.imgs[3].width)-parseFloat(this.data.imgs[3].height/5.5)-30, parseFloat(this.data.imgs[3].height)-parseFloat(this.data.imgs[3].height/5.5)-30,parseFloat(this.data.imgs[3].height/11))
}else{
Canvas.circleImage(CTX,that.data.imgs[2].path,parseFloat(this.data.imgs[3].width)-parseFloat(this.data.imgs[3].width/5.5)-30, parseFloat(this.data.imgs[3].height)-parseFloat(this.data.imgs[3].width/5.5)-30,parseFloat(this.data.imgs[3].width/11))
}
}
setTimeout(function(){
CTX.save()
CTX.draw(true, function () {
wx.hideLoading()
that.saveCanvas()
})
},200)
}
},
//生成海报
createPoster() {
let that = this
wx.showLoading({
title: '正在生成',
})
if(isGetImgInfo){
this.setData({
tempPosterPath: ''
})
let ctx = wx.createCanvasContext('postercanvas', that)
that.customizePoster(ctx)
}
},
//临时存储canvas
saveCanvas() {
let that = this
wx.canvasToTempFilePath({
canvasId: 'postercanvas',
quality: 1,
success: (res) => {
// this.tempFilePath = res.tempFilePath
that.setData({
'tempPosterPath': res.tempFilePath
})
setTimeout(function () {
that.setData({
showOptBtn:true,
})
},200)
},
fail: (res) => {
app.printErrorClient('poseterfail',['错误信息:临时存储canvas失败',JSON.stringify(res)])
}
}, this)
},
//保存到相册
saveToAblum() {
let that = this
wx.saveImageToPhotosAlbum({
filePath: this.data.tempPosterPath,
success: (res) => {
_.utils.$toast('保存成功')
},
fail: (err) => {
app.printErrorClient('poseterfail',['错误信息:图片保存失败',JSON.stringify(err)])
if (err.errMsg == 'saveImageToPhotosAlbum:fail cancel') {
_.utils.$toast('您已取消保存')
} else if (err.errMsg == 'saveImageToPhotosAlbum:fail auth deny') {
_.utils.$modal('提示', '保存图片失败,您可以点击确定设置获取相册权限后再尝试保存!', '去授权').then(res => {
if (res) {
wx.openSetting({}) // 打开小程序设置页面,可以设置权限
}
})
}
}
})
},
//隐藏海报弹框
hidePoster() {
this.setData({
isShow: false
})
wx.hideLoading()
},
//预览图片
preview() {
wx.previewImage({
current: this.data.tempPosterPath, // 当前显示图片的http链接
urls: [this.data.tempPosterPath] // 需要预览的图片http链接列表
})
},
//推送链接
pushLink(e) {
if(e.currentTarget.dataset.url){
_.$router.openUrlScheme(e.currentTarget.dataset.url)
}
},
//复制内容
copyWord(e){
if(e.currentTarget.dataset.tx){
wx.setClipboardData({
data: e.currentTarget.dataset.tx,
success (res) {
_.utils.$toast('复制成功')
}
})
}else{
_.utils.$toast('目前无文案')
}
},
}
})
+35 -16
View File
@@ -188,6 +188,26 @@ Page({
urls:end_mileage,
})
}
else if(e.currentTarget.dataset.type=='edit_transport'){
let transportImg = []
this.data.transport.forEach(item => {
transportImg.push(item.src)
})
wx.previewImage({
current:e.currentTarget.dataset.current,
urls:transportImg,
})
}
else if(e.currentTarget.dataset.type=='edit_photos'){
let photos = []
this.data.photos.forEach(item => {
photos.push(item.src)
})
wx.previewImage({
current:e.currentTarget.dataset.current,
urls:photos,
})
}
},
@@ -329,6 +349,7 @@ Page({
title: '图片上传中',
})
let transport=that.data.transport
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
@@ -339,6 +360,7 @@ Page({
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
wx.hideLoading();
if (resp.data.code == 200) {
@@ -349,23 +371,20 @@ Page({
src:imgdata.data.full_url,
})
transport=transport.concat(list)
if(i+1==res1.tempFilePaths.length){
setTimeout(function () {
let params = {};
params['id'] = that.data.info.id;
params['type'] = 0;
let imgs = []
transport.forEach(item => {
imgs.push(item.value)
if(k == res1.tempFilePaths.length){
let params = {};
params['id'] = that.data.info.id;
params['type'] = 0;
let imgs = []
transport.forEach(item => {
imgs.push(item.value)
})
params['imgs'] = imgs;
_.apiQuery.postAppTransferTransport(params).then(res => {
that.setData({
transport,
})
params['imgs'] = imgs;
_.apiQuery.postAppTransferTransport(params).then(res => {
that.setData({
transport,
})
})
}, 500);
})
}
}else{
wx.showToast({
+3 -3
View File
@@ -46,7 +46,7 @@
<block wx:for='{{transport}}' wx:for-item='transport' wx:for-index="index" wx:key='transport'>
<view class="inline-block img-200x180 mr20 relative">
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-guanbi1 inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="delTransport" data-index="{{index}}" ></i>
<image class='img-200x180 ulib-r10' src='{{transport.src}}' mode='aspectFill'></image>
<image class='img-200x180 ulib-r10' src='{{transport.src}}' mode='aspectFill' bindtap="previewImage" data-type="edit_transport" data-current="{{transport.src}}"></image>
</view>
</block>
<block wx:if="{{transport.length<10}}">
@@ -119,7 +119,7 @@
<block wx:for='{{photos}}' wx:for-item='photos' wx:for-index="index" wx:key='photo'>
<view class="inline-block img-200x180 ml10 mr10 relative">
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-guanbi1 inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="delPic" data-index="{{index}}" ></i>
<image class='img-200x180 ulib-r10' src='{{photos.src}}' mode='aspectFill'></image>
<image class='img-200x180 ulib-r10' src='{{photos.src}}' mode='aspectFill' bindtap="previewImage" data-type="edit_photos" data-current="{{photos.src}}"></image>
</view>
</block>
<block wx:if="{{photos.length==0}}">
@@ -192,7 +192,7 @@
<block wx:for='{{photos}}' wx:for-item='photos' wx:for-index="index" wx:key='photo'>
<view class="inline-block img-200x180 ml10 mr10 relative">
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-guanbi1 inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="delPic" data-index="{{index}}" ></i>
<image class='img-200x180 ulib-r10' src='{{photos.src}}' mode='aspectFill'></image>
<image class='img-200x180 ulib-r10' src='{{photos.src}}' mode='aspectFill' bindtap="previewImage" data-type="edit_photos" data-current="{{photos.src}}"></image>
</view>
</block>
<block wx:if="{{photos.length==0}}">
+120 -5
View File
@@ -30,6 +30,13 @@ Page({
of2_id:'',
of1Index:-1,
of2Index:-1,
cityIndex:-1,
city_id:'',
countyIndex:-1,
county_id:'',
isShowExist:false, //客户是否已存在
},
//生命周期函数--监听页面加载
onLoad: function (options) {
@@ -271,18 +278,30 @@ Page({
icon: 'none'
})
}
else if (that.data.of_id == '' ) {
else if (that.data.sources.length>0&&that.data.of_id == '' ) {
wx.showToast({
title: '请选择线索来源',
icon: 'none'
})
}
else if (that.data.sources[that.data.of1Index].list.length>0&&that.data.of2_id == '' ) {
else if (that.data.sources.length>0&&that.data.sources[that.data.of1Index].list.length>0&&that.data.of2_id == '' ) {
wx.showToast({
title: '请选择'+that.data.sources[that.data.of1Index].name+'类型',
icon: 'none'
})
}
else if (that.data.city_id == '' ) {
wx.showToast({
title: '请选择所在城市',
icon: 'none'
})
}
else if (that.data.county_id == '' ) {
wx.showToast({
title: '请选择所在地区',
icon: 'none'
})
}
else if (that.data.buy_time == '' ) {
wx.showToast({
title: '请选择预计购车时间',
@@ -320,10 +339,14 @@ Page({
// if(this.data.b_s_id != ''){
// params['b_s_id'] = this.data.b_s_id;
// }
params['of_id'] = this.data.of_id;
if(this.data.of_id != ''){
params['of_id'] = this.data.of_id;
}
if(this.data.of2_id != ''){
params['of2_id'] = this.data.of2_id;
}
params['city_id'] = this.data.city_id;
params['county_id'] = this.data.county_id;
params['buy_time'] = this.data.buy_time;
_.apiQuery.postAppCustomers(params).then(res => {
@@ -385,6 +408,13 @@ Page({
this.setData({
submitFlag: false,
})
if(res.data.id){
wx.hideToast();
this.setData({
isShowExist: true,
exist: res,
})
}
});
}
},
@@ -395,12 +425,12 @@ Page({
params['status'] = this.data.status;
_.apiQuery.getAppCustomersOffline_sources(params).then(res => {
let of1Arr = []
res.data.forEach(item => {
res.data.sources.forEach(item => {
of1Arr.push(item.name)
})
this.setData({
of1Arr,
sources:res.data
sources:res.data.sources
})
});
},
@@ -434,8 +464,14 @@ Page({
getAppCustomersTag(){
_.apiQuery.getAppCustomersTag().then(res => {
this.setData({
city_id:res.data.city_id,
county_id:res.data.county_id,
taglList:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
})
//获取城市
this.getAppCityArea_city()
//获取地区
this.getAppCityArea_county()
});
},
@@ -458,4 +494,83 @@ Page({
})
},
//获取城市
getAppCityArea_city(){
let params = {};
params['type'] = 'city';
_.apiQuery.getAppCityArea(params).then(res => {
let cityArr = []
let cityIndex = -1
res.data.list.forEach((item,index) => {
cityArr.push(item.name)
if(this.data.city_id == item.id){
cityIndex = index
}
})
this.setData({
cityIndex,
cityArr,
city:res.data.list
})
});
},
//获取行政区
getAppCityArea_county(){
let params = {};
params['pid'] = this.data.city_id;
params['type'] = 'county';
_.apiQuery.getAppCityArea(params).then(res => {
let countyArr = []
let countyIndex = -1
res.data.list.forEach((item,index) => {
countyArr.push(item.name)
if(this.data.county_id == item.id){
countyIndex = index
}
})
this.setData({
countyIndex,
countyArr,
county:res.data.list
})
});
},
//选择城市
changeCity(e) {
if(this.data.cityIndex!=e.detail.value){
this.setData({
cityIndex:e.detail.value,
city_id:this.data.city[e.detail.value].id,
})
this.getAppCityArea_county()
}
},
//选择地区
changeCounty(e) {
if(this.data.countyIndex!=e.detail.value){
this.setData({
countyIndex:e.detail.value,
county_id:this.data.county[e.detail.value].id,
})
}
},
//查看存在客户信息
viewDetails(e){
wx.redirectTo({
url: '/pages/customer/detail/index?id=' + this.data.exist.data.id
})
},
//关闭客户已存在提示
colseExist(){
this.setData({
isShowExist: false,
})
},
})
+45 -10
View File
@@ -72,22 +72,44 @@
</picker>
</view>
</view> -->
<block wx:if="{{sources.length>0}}">
<view class="relative bbs-1-eb last-b-none pl140 font-28">
<view class="absolute left-0 box-middle">线索来源</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeOf1" value="{{of1Index}}" range="{{of1Arr}}">
<text class="color-ccc" wx:if="{{of1Index == -1}}">请选择</text>
<text wx:else>{{of1Arr[of1Index]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{of2Arr.length>0}}">
<view class="absolute left-0 box-middle">{{sources[of1Index].name}}</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeOf2" value="{{of2Index}}" range="{{of2Arr}}">
<text class="color-ccc" wx:if="{{of2Index == -1}}">请选择</text>
<text wx:else>{{of2Arr[of2Index]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
</block>
<view class="relative bbs-1-eb last-b-none pl140 font-28">
<view class="absolute left-0 box-middle">线索来源</view>
<view class="absolute left-0 box-middle">所在城市</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeOf1" value="{{of1Index}}" range="{{of1Arr}}">
<text class="color-ccc" wx:if="{{of1Index == -1}}">请选择</text>
<text wx:else>{{of1Arr[of1Index]}}</text>
<picker bindchange="changeCity" value="{{cityIndex}}" range="{{cityArr}}">
<text class="color-ccc" wx:if="{{cityIndex == -1}}">请选择</text>
<text wx:else>{{cityArr[cityIndex]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{of2Arr.length>0}}">
<view class="absolute left-0 box-middle">{{sources[of1Index].name}}</view>
<view class="relative bbs-1-eb last-b-none pl140 font-28">
<view class="absolute left-0 box-middle">所在地区</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeOf2" value="{{of2Index}}" range="{{of2Arr}}">
<text class="color-ccc" wx:if="{{of2Index == -1}}">请选择</text>
<text wx:else>{{of2Arr[of2Index]}}</text>
<picker bindchange="changeCounty" value="{{countyIndex}}" range="{{countyArr}}">
<text class="color-ccc" wx:if="{{countyIndex == -1}}">请选择</text>
<text wx:else>{{countyArr[countyIndex]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
@@ -132,4 +154,17 @@
</view>
</view>
<lcb-footer></lcb-footer>
<lcb-backChannel></lcb-backChannel>
<lcb-backChannel></lcb-backChannel>
<!--客户已存在-->
<lcb-msg isShow="{{isShowExist}}" isHasClose="{{true}}">
<view slot="content">
<view class="pt60 pl60 pr60 pb50">
<view class="font-36 text-center">{{exist.msg}}</view>
</view>
<view class="pl60 pr60 pb50 text-center font-32 color-666">
<button bindtap="viewDetails" class="inline-block wp50 btn-36afa2 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover" wx:if="{{exist.data.owner==1}}">前往查看</button>
<button bindtap="colseExist" class="inline-block wp50 btn-36afa2 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover" wx:else>知道了</button>
</view>
</view>
</lcb-msg>
+59 -5
View File
@@ -19,6 +19,12 @@ Page({
weekList:['日','一','二','三','四','五','六'],
dateList:[],
nextIndex:-1,//计划回访时间
distTabId:1,
distBizIndex:-1,
distBiz_id:'',
bizArray: [],
bizobj: [],
},
onLoad(options) {
for (let key in options) {
@@ -108,10 +114,17 @@ Page({
res.data.list.forEach(item => {
employeeArray.push(item.uname)
})
let bizArray = []
res.data.bizs.forEach(item => {
bizArray.push(item.name)
})
this.setData({
employeeArray:employeeArray,
employeeList:res.data.list,
employeeIndex:-1,
distributetabs:res.data.tabs,
bizArray:bizArray,
bizobj: res.data.bizs,
})
}
wx.stopPullDownRefresh()
@@ -134,6 +147,12 @@ Page({
optEmployees(){
this.setData({
isShowEmployees:!this.data.isShowEmployees,
employeeIndex:-1,
employee_id:'',
nextIndex:-1,
distTabId:1,
distBiz_id:'',
distBizIndex:-1,
})
},
@@ -147,26 +166,37 @@ Page({
//分配客户
putAppCustomersAdmins(){
let that = this
if (that.data.employeeIndex == -1 ) {
if (that.data.distTabId==1&&that.data.employeeIndex == -1 ) {
wx.showToast({
title: '请选择店员',
icon: 'none'
})
}
else if (that.data.nextIndex == -1 ) {
else if (that.data.distTabId==1&&that.data.nextIndex == -1 ) {
wx.showToast({
title: '请选择计划回访时间',
icon: 'none'
})
}
else if (that.data.distTabId==2&&that.data.distBizIndex == -1 ) {
wx.showToast({
title: '请选择门店',
icon: 'none'
})
}
else{
that.setData({
submitFlag: true,
})
let params = {};
params['ids'] = that.data.ids;
params['admin_id'] = that.data.admin_id;
params['visit_time'] = that.data.dateList[that.data.nextIndex].year +'-'+ that.data.dateList[that.data.nextIndex].month +'-'+ that.data.dateList[that.data.nextIndex].day;
if(that.data.distTabId==1){
params['admin_id'] = that.data.admin_id;
params['visit_time'] = that.data.dateList[that.data.nextIndex].year +'-'+ that.data.dateList[that.data.nextIndex].month +'-'+ that.data.dateList[that.data.nextIndex].day;
}
if(that.data.distTabId==2){
params['biz_id'] = that.data.distBiz_id;
}
_.apiQuery.putAppCustomersAdmins(params).then(res => {
wx.showToast({
@@ -289,7 +319,7 @@ Page({
})
dateList.forEach((item,index) => {
item.isopt = false
if(cindex<index&&index<cindex+kd+1){
if(cindex<=index&&index<cindex+kd+1){
item.isopt = true
}
})
@@ -308,6 +338,30 @@ Page({
}
},
//切换分配本地,其他门店
changeDistTab(e){
this.setData({
distTabId:e.currentTarget.dataset.id,
employeeIndex:-1,
employee_id:'',
nextIndex:-1,
distBiz_id:'',
distBizIndex:-1,
})
},
//分配选择门店
changeDistBiz(e) {
let distBiz_id = ''
if(e.detail.value >= 0){
distBiz_id = this.data.bizobj[e.detail.value].id
}
this.setData({
distBiz_id,
distBizIndex:e.detail.value,
})
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh(){
this.setData({
+33 -13
View File
@@ -12,6 +12,9 @@
</view>
<checkbox class="absolute right-0 box-middle font-30" value="{{item.id}}" checked="{{item.checked}}"/>
</view>
<view class="text-nowrap" wx:if="{{item.reassign}}">
<text class="inline-block mr10 pl10 pr10 bg-666 font-18 color-fff ulib-r750">{{item.reassign}}</text>
</view>
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
<view class="mt25 fn-clear font-28" wx:if="{{value}}">
<view class="fn-fl color-333">{{key}}</view>
@@ -38,21 +41,38 @@
<lcb-msg isShow="{{isShowEmployees}}">
<view slot="content">
<view class="inner40">
<view class="mt20 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">销售顾问</view>
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{employeeArray}}">
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
<text wx:else>{{employeeArray[employeeIndex]}}</text>
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
</picker>
<view class="mt10 font-28 text-center fn-flex" wx:if="{{distributetabs.length > 0}}">
<block wx:for="{{distributetabs}}" wx:key="index">
<view class="fn-flex-item relative ml10 mr10 pt20 pb20 ulib-r10 {{distTabId == item.id?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="changeDistTab" data-id="{{item.id}}">{{item.name}}</view>
</block>
</view>
<view class="mt20 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">计划回访时间</view>
<view bindtap="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>
<block wx:if="{{distTabId == 1}}">
<view class="mt20 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">销售顾问</view>
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{employeeArray}}">
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
<text wx:else>{{employeeArray[employeeIndex]}}</text>
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
</picker>
</view>
<view class="mt20 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">计划回访时间</view>
<view bindtap="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 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10" wx:else>
<view class="fn-fl">门店名称</view>
<picker class="fn-fr wp70 text-right" bindchange="changeDistBiz" value="{{distBizIndex}}" range="{{bizArray}}">
<view class="text-nowrap">
<text class="color-ccc" wx:if="{{distBizIndex == -1}}">请选择</text>
<text wx:else>{{bizArray[distBizIndex]}}</text>
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
</view>
</picker>
</view>
</view>
<view class="fn-flex pl60 pr60 pb50 text-center font-32 color-666">
+2 -5
View File
@@ -8,7 +8,7 @@ Page({
tabid:1,
tab:[
{"id":1,"title":"跟进记录"},
//{"id":2,"title":"客户画像"},
{"id":2,"title":"客户画像"},
],
logslist: [],//日志列表
pageNo: 1,
@@ -737,6 +737,7 @@ Page({
getAppCustomersTag(){
let params = {};
params['id'] = this.data.id;
params['type'] = 'detail';
_.apiQuery.getAppCustomersTag(params).then(res => {
if(res.data.tags&&res.data.tags.length>0){
let taglList = res.data.tags
@@ -749,10 +750,6 @@ Page({
})
this.setData({
taglList,
tab:[
{"id":1,"title":"跟进记录"},
{"id":2,"title":"客户画像"},
],
})
}
});
+95 -6
View File
@@ -20,6 +20,11 @@ Page({
of2_id:'',
of1Index:-1,
of2Index:-1,
cityIndex:-1,
city_id:'',
countyIndex:-1,
county_id:'',
},
//生命周期函数--监听页面加载
onLoad: function (options) {
@@ -338,18 +343,30 @@ Page({
icon: 'none'
})
}
else if (that.data.of_id == '' ) {
else if (that.data.sources.length>0&&that.data.of_id == '' ) {
wx.showToast({
title: '请选择线索来源',
icon: 'none'
})
}
else if (that.data.sources[that.data.of1Index].list.length>0&&that.data.of2_id == '' ) {
else if (that.data.sources.length>0&&that.data.sources[that.data.of1Index].list.length>0&&that.data.of2_id == '' ) {
wx.showToast({
title: '请选择'+that.data.sources[that.data.of1Index].name+'类型',
icon: 'none'
})
}
else if (that.data.city_id == '' ) {
wx.showToast({
title: '请选择所在城市',
icon: 'none'
})
}
else if (that.data.county_id == '' ) {
wx.showToast({
title: '请选择所在地区',
icon: 'none'
})
}
// else if(that.data.car_id == '' ){
// wx.showToast({
// title: '请选择车系车型',
@@ -392,6 +409,8 @@ Page({
if(that.data.of2_id != that.data.baseinfo.of_id.of2_id){
params['of2_id'] = that.data.of2_id;
}
params['city_id'] = that.data.city_id;
params['county_id'] = that.data.county_id;
// if(that.data.car_id != that.data.baseinfo.car_id.value){
// params['car_id'] = that.data.car_id;
// }
@@ -454,15 +473,15 @@ Page({
getAppCustomersOffline_sources(){
_.apiQuery.getAppCustomersOffline_sources().then(res => {
let of1Arr = []
res.data.forEach(item => {
res.data.sources.forEach(item => {
of1Arr.push(item.name)
})
this.setData({
of1Arr,
sources:res.data
sources:res.data.sources
})
if(this.data.of_id != ''){
res.data.forEach((item,index) => {
res.data.sources.forEach((item,index) => {
if(item.id == this.data.of_id){
this.setData({
of1Index:index,
@@ -471,7 +490,7 @@ Page({
})
if(this.data.of2Index != ''){
let of2Arr = []
res.data[this.data.of1Index].list.forEach((item,index) => {
res.data.sources[this.data.of1Index].list.forEach((item,index) => {
of2Arr.push(item.name)
if(item.id == this.data.of2_id){
this.setData({
@@ -518,8 +537,14 @@ Page({
params['id'] = this.data.id;
_.apiQuery.getAppCustomersTag(params).then(res => {
this.setData({
city_id:res.data.city_id,
county_id:res.data.county_id,
taglList:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
})
//获取城市
this.getAppCityArea_city()
//获取地区
this.getAppCityArea_county()
});
},
@@ -542,4 +567,68 @@ Page({
})
},
//获取城市
getAppCityArea_city(){
let params = {};
params['type'] = 'city';
_.apiQuery.getAppCityArea(params).then(res => {
let cityArr = []
let cityIndex = -1
res.data.list.forEach((item,index) => {
cityArr.push(item.name)
if(this.data.city_id == item.id){
cityIndex = index
}
})
this.setData({
cityIndex,
cityArr,
city:res.data.list
})
});
},
//获取行政区
getAppCityArea_county(){
let params = {};
params['pid'] = this.data.city_id;
params['type'] = 'county';
_.apiQuery.getAppCityArea(params).then(res => {
let countyArr = []
let countyIndex = -1
res.data.list.forEach((item,index) => {
countyArr.push(item.name)
if(this.data.county_id == item.id){
countyIndex = index
}
})
this.setData({
countyIndex,
countyArr,
county:res.data.list
})
});
},
//选择城市
changeCity(e) {
if(this.data.cityIndex!=e.detail.value){
this.setData({
cityIndex:e.detail.value,
city_id:this.data.city[e.detail.value].id,
})
this.getAppCityArea_county()
}
},
//选择地区
changeCounty(e) {
if(this.data.countyIndex!=e.detail.value){
this.setData({
countyIndex:e.detail.value,
county_id:this.data.county[e.detail.value].id,
})
}
},
})
+32 -10
View File
@@ -1,6 +1,6 @@
<view class="container">
<view class="inner30">
<view class="pl40 pr40 pt10 pb50 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
<view class="pl40 pr40 pt10 pb10 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
<view class="relative bbs-1-eb last-b-none pl140 font-28">
<view class="absolute left-0 box-middle">客户姓名</view>
<view>
@@ -53,22 +53,44 @@
</picker>
</view>
</view> -->
<block wx:if="{{sources.length>0}}">
<view class="relative bbs-1-eb last-b-none pl140 font-28">
<view class="absolute left-0 box-middle">线索来源</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeOf1" value="{{of1Index}}" range="{{of1Arr}}">
<text class="color-ccc" wx:if="{{of1Index == -1}}">请选择</text>
<text wx:else>{{of1Arr[of1Index]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{of2Arr.length>0}}">
<view class="absolute left-0 box-middle">{{sources[of1Index].name}}</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeOf2" value="{{of2Index}}" range="{{of2Arr}}">
<text class="color-ccc" wx:if="{{of2Index == -1}}">请选择</text>
<text wx:else>{{of2Arr[of2Index]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
</block>
<view class="relative bbs-1-eb last-b-none pl140 font-28">
<view class="absolute left-0 box-middle">线索来源</view>
<view class="absolute left-0 box-middle">所在城市</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeOf1" value="{{of1Index}}" range="{{of1Arr}}">
<text class="color-ccc" wx:if="{{of1Index == -1}}">请选择</text>
<text wx:else>{{of1Arr[of1Index]}}</text>
<picker bindchange="changeCity" value="{{cityIndex}}" range="{{cityArr}}">
<text class="color-ccc" wx:if="{{cityIndex == -1}}">请选择</text>
<text wx:else>{{cityArr[cityIndex]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{of2Arr.length>0}}">
<view class="absolute left-0 box-middle">{{sources[of1Index].name}}</view>
<view class="relative bbs-1-eb last-b-none pl140 font-28">
<view class="absolute left-0 box-middle">所在地区</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeOf2" value="{{of2Index}}" range="{{of2Arr}}">
<text class="color-ccc" wx:if="{{of2Index == -1}}">请选择</text>
<text wx:else>{{of2Arr[of2Index]}}</text>
<picker bindchange="changeCounty" value="{{countyIndex}}" range="{{countyArr}}">
<text class="color-ccc" wx:if="{{countyIndex == -1}}">请选择</text>
<text wx:else>{{countyArr[countyIndex]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
+59 -6
View File
@@ -33,6 +33,12 @@ Page({
weekList:['日','一','二','三','四','五','六'],
dateList:[],
nextIndex:-1,//计划回访时间
distTabId:1,
distBizIndex:-1,
distBiz_id:'',
bizArray: [],
bizobj: [],
},
onLoad(options) {
for (let key in options) {
@@ -41,7 +47,7 @@ Page({
})
}
//回访待跟进tab
//顶部tab
this.getAppCustomersVisit_tabs()
//销售顾问
@@ -253,9 +259,16 @@ Page({
res.data.list.forEach(item => {
staffArray.push(item.uname)
})
let bizArray = []
res.data.bizs.forEach(item => {
bizArray.push(item.name)
})
this.setData({
staffArray:staffArray,
staffobj: res.data.list,
distributetabs:res.data.tabs,
bizArray:bizArray,
bizobj: res.data.bizs,
})
});
},
@@ -277,6 +290,10 @@ Page({
employee_id:'',
cid:[],
optLevel:'',
nextIndex:-1,
distTabId:1,
distBiz_id:'',
distBizIndex:-1,
})
}
},
@@ -296,26 +313,37 @@ Page({
//分配客户
putAppCustomersAdmins(){
let that = this
if (that.data.employeeIndex == -1 ) {
if (that.data.distTabId==1&&that.data.employeeIndex == -1 ) {
wx.showToast({
title: '请选择店员',
icon: 'none'
})
}
else if (that.data.nextIndex == -1 ) {
else if (that.data.distTabId==1&&that.data.nextIndex == -1 ) {
wx.showToast({
title: '请选择计划回访时间',
icon: 'none'
})
}
else if (that.data.distTabId==2&&that.data.distBizIndex == -1 ) {
wx.showToast({
title: '请选择门店',
icon: 'none'
})
}
else{
that.setData({
submitFlag: true,
})
let params = {};
params['ids'] = that.data.cid;
params['admin_id'] = that.data.employee_id;
params['visit_time'] = that.data.dateList[that.data.nextIndex].year +'-'+ that.data.dateList[that.data.nextIndex].month +'-'+ that.data.dateList[that.data.nextIndex].day;
if(that.data.distTabId==1){
params['admin_id'] = that.data.employee_id;
params['visit_time'] = that.data.dateList[that.data.nextIndex].year +'-'+ that.data.dateList[that.data.nextIndex].month +'-'+ that.data.dateList[that.data.nextIndex].day;
}
if(that.data.distTabId==2){
params['biz_id'] = that.data.distBiz_id;
}
_.apiQuery.putAppCustomersAdmins(params).then(res => {
wx.showToast({
@@ -438,7 +466,7 @@ Page({
})
dateList.forEach((item,index) => {
item.isopt = false
if(cindex<index&&index<cindex+kd+1){
if(cindex<=index&&index<cindex+kd+1){
item.isopt = true
}
})
@@ -471,6 +499,31 @@ Page({
this.getAppCustomersList()
},
//切换分配本地,其他门店
changeDistTab(e){
this.setData({
distTabId:e.currentTarget.dataset.id,
employeeIndex:-1,
employee_id:'',
nextIndex:-1,
distBiz_id:'',
distBizIndex:-1,
})
},
//分配选择门店
changeDistBiz(e) {
let distBiz_id = ''
if(e.detail.value >= 0){
distBiz_id = this.data.bizobj[e.detail.value].id
}
this.setData({
distBiz_id,
distBizIndex:e.detail.value,
})
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh(){
this.setData({
+58 -18
View File
@@ -23,7 +23,7 @@
<view class="mt10 pl30 pr30">
<block wx:for='{{list}}' wx:key='index'>
<view class="inner40 relative ulib-r10 box-shadow-000-10-10 mb30 overflowhidden" bindtap="pushLink" data-url="/pages/customer/detail/index?id={{item.id}}">
<view wx:if="{{item.complete_mobile}}" class="inner40 relative ulib-r10 box-shadow-000-10-10 mb30 overflowhidden" bindtap="pushLink" data-url="/pages/customer/detail/index?id={{item.id}}">
<view class="absolute top-0 left-0 ml40 bg-36afa2 font-22 color-fff">
<text class="pl10 pr10" wx:if="{{item.tip}}">{{item.tip}}</text>
<text class="pl10 pr10 {{item.defeat?'bls-1-eb':''}}" wx:if="{{item.defeat}}">{{item.defeat}}</text>
@@ -68,7 +68,30 @@
<view wx:else class="fn-fr wp60 text-nowrap text-right color-666">{{value}}</view>
</view>
</block>
</view>
<view wx:elif="{{item.nickname}}" class="inner40 relative ulib-r10 box-shadow-000-10-10 mb30 overflowhidden">
<view class="absolute top-0 left-0 ml40 bg-36afa2 font-22 color-fff">
<text class="pl10 pr10" wx:if="{{item.tip}}">{{item.tip}}</text>
<text class="pl10 pr10 {{item.defeat?'bls-1-eb':''}}" wx:if="{{item.defeat}}">{{item.defeat}}</text>
<text class="pl10 pr10 {{item.orders_pay?'bls-1-eb':''}}" wx:if="{{item.orders_pay}}">{{item.orders_pay}}</text>
</view>
<view class="text-nowrap">
<image class='img-50x50 bds-1-eb ulib-r750 text-middle' lazy-load="{{true}}" mode="scaleToFill" src="{{item.avatar}}"></image>
<text class="pl10 text-middle font-26">{{item.nickname}}</text>
</view>
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
<view class="mt25 fn-clear font-28">
<view class="fn-fl color-333">{{key}}</view>
<block wx:if="{{key=='销售顾问'}}">
<view class="fn-fr wp60 text-nowrap text-right">
<text class="text-middle color-666" wx:if="{{value}}">{{value}}</text>
<text class="text-middle color-f9394d" wx:else>待分配</text>
<text class="inline-block ml10 bg-36afa2 pt5 pb5 pl15 pr15 text-middle font-22 color-fff ulib-r10" catchtap="optEmployees" data-cid="{{item.id}}" data-level="{{item.level}}" wx:if="{{item.allot == 1}}">{{value?'重新分配':'分配'}}</text>
</view>
</block>
<view wx:else class="fn-fr wp60 text-nowrap text-right color-666">{{value}}</view>
</view>
</block>
</view>
</block>
<lcb-listmore isLoading='{{loading}}' isEnd='{{end}}' isNoData='{{noData}}'></lcb-listmore>
@@ -92,25 +115,42 @@
<lcb-msg isShow="{{isShowEmployees}}">
<view slot="content">
<view class="inner40">
<view class="mt20 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">销售顾问</view>
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
<text wx:else>{{staffArray[employeeIndex]}}</text>
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
<view class="inner30">
<view class="mt10 font-28 text-center fn-flex" wx:if="{{distributetabs.length > 0}}">
<block wx:for="{{distributetabs}}" wx:key="index">
<view class="fn-flex-item relative ml10 mr10 pt20 pb20 ulib-r10 {{distTabId == item.id?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="changeDistTab" data-id="{{item.id}}">{{item.name}}</view>
</block>
</view>
<block wx:if="{{distTabId == 1}}">
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">销售顾问</view>
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
<text wx:else>{{staffArray[employeeIndex]}}</text>
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
</picker>
</view>
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">计划回访时间</view>
<view bindtap="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 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10" wx:else>
<view class="fn-fl">门店名称</view>
<picker class="fn-fr wp70 text-right" bindchange="changeDistBiz" value="{{distBizIndex}}" range="{{bizArray}}">
<view class="text-nowrap">
<text class="color-ccc" wx:if="{{distBizIndex == -1}}">请选择</text>
<text wx:else>{{bizArray[distBizIndex]}}</text>
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
</view>
</picker>
</view>
<view class="mt20 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">计划回访时间</view>
<view bindtap="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>
</view>
<view class="fn-flex pl60 pr60 pb50 text-center font-32 color-666">
<view class="fn-flex ml10 mr10 pl60 pr60 pb50 text-center font-32 color-666">
<button bindtap="optEmployees" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
<button disabled="{{submitFlag}}" bindtap="putAppCustomersAdmins" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定</button>
</view>
+98 -11
View File
@@ -81,6 +81,12 @@ Page({
weekList:['日','一','二','三','四','五','六'],
dateList:[],
nextIndex:-1,//计划回访时间
distTabId:1,
distBizIndex:-1,
distBiz_id:'',
bizArray: [],
bizobj: [],
},
onLoad(options) {
for (let key in options) {
@@ -137,9 +143,16 @@ Page({
res.data.list.forEach(item => {
staffArray.push(item.uname)
})
let bizArray = []
res.data.bizs.forEach(item => {
bizArray.push(item.name)
})
this.setData({
staffArray:staffArray,
staffobj: res.data.list,
distributetabs:res.data.tabs,
bizArray:bizArray,
bizobj: res.data.bizs,
})
});
},
@@ -215,9 +228,21 @@ Page({
load: false,
loading: true,
})
let admin_ids = ''
this.data.staffobj.forEach(item => {
if(item.checked){
if(admin_ids==''){
admin_ids=item.id
}else{
admin_ids=admin_ids+','+item.id
}
}
})
let params = {};
params['page'] = this.data.pageNo;
params['size'] = 10;
params['size'] = 3;
params['status'] = this.data.key;
if(this.data.cus_id != ''){
params['cus_id'] = this.data.cus_id;
@@ -259,9 +284,12 @@ Page({
if(this.data.of2_id != ''){
params['of2_id'] = this.data.of2_id;
}
if(this.data.staffIndex>-1){
params['admin_id'] = this.data.staffobj[this.data.staffIndex].id;
if(admin_ids!=''){
params['admin_ids'] = admin_ids;
}
// if(this.data.staffIndex>-1){
// params['admin_id'] = this.data.staffobj[this.data.staffIndex].id;
// }
if(this.data.s_visit_time != ''&&this.data.e_visit_time != ''){
params['s_visit_time'] = this.data.s_visit_time;
params['e_visit_time'] = this.data.e_visit_time;
@@ -492,7 +520,7 @@ Page({
})
},
//显示高级搜索
//显示隐藏高级搜索
optfilter(){
this.setData({
isShowfilter: !this.data.isShowfilter
@@ -500,6 +528,13 @@ Page({
this.resetFilter()
},
//显示高级搜索
showfilter(){
this.setData({
isShowfilter:true,
})
},
//确定高级搜索
submitFilter() {
this.setData({
@@ -510,7 +545,13 @@ Page({
//重置高级搜索
resetFilter() {
let staffobj = this.data.staffobj
staffobj.forEach(item => {
item.checked = false
})
this.setData({
staffobj,
cus_id:'',//编号
name:'',//名字
mobile:'',//手机号
@@ -601,12 +642,12 @@ Page({
getAppCustomersOffline_sources(){
_.apiQuery.getAppCustomersOffline_sources().then(res => {
let of1Arr = []
res.data.forEach(item => {
res.data.sources.forEach(item => {
of1Arr.push(item.name)
})
this.setData({
of1Arr,
sources:res.data
sources:res.data.sources
})
});
},
@@ -653,6 +694,10 @@ Page({
employee_id:'',
cid:[],
optLevel:'',
nextIndex:-1,
distTabId:1,
distBiz_id:'',
distBizIndex:-1,
})
}
},
@@ -672,26 +717,37 @@ Page({
//分配客户
putAppCustomersAdmins(){
let that = this
if (that.data.employeeIndex == -1 ) {
if (that.data.distTabId==1&&that.data.employeeIndex == -1 ) {
wx.showToast({
title: '请选择店员',
icon: 'none'
})
}
else if (that.data.nextIndex == -1 ) {
else if (that.data.distTabId==1&&that.data.nextIndex == -1 ) {
wx.showToast({
title: '请选择计划回访时间',
icon: 'none'
})
}
else if (that.data.distTabId==2&&that.data.distBizIndex == -1 ) {
wx.showToast({
title: '请选择门店',
icon: 'none'
})
}
else{
that.setData({
submitFlag: true,
})
let params = {};
params['ids'] = that.data.cid;
params['admin_id'] = that.data.employee_id;
params['visit_time'] = that.data.dateList[that.data.nextIndex].year +'-'+ that.data.dateList[that.data.nextIndex].month +'-'+ that.data.dateList[that.data.nextIndex].day;
if(that.data.distTabId==1){
params['admin_id'] = that.data.employee_id;
params['visit_time'] = that.data.dateList[that.data.nextIndex].year +'-'+ that.data.dateList[that.data.nextIndex].month +'-'+ that.data.dateList[that.data.nextIndex].day;
}
if(that.data.distTabId==2){
params['biz_id'] = that.data.distBiz_id;
}
_.apiQuery.putAppCustomersAdmins(params).then(res => {
wx.showToast({
@@ -814,7 +870,7 @@ Page({
})
dateList.forEach((item,index) => {
item.isopt = false
if(cindex<index&&index<cindex+kd+1){
if(cindex<=index&&index<cindex+kd+1){
item.isopt = true
}
})
@@ -833,6 +889,37 @@ Page({
}
},
//切换分配本地,其他门店
changeDistTab(e){
this.setData({
distTabId:e.currentTarget.dataset.id,
employeeIndex:-1,
employee_id:'',
nextIndex:-1,
distBiz_id:'',
distBizIndex:-1,
})
},
//分配选择门店
changeDistBiz(e) {
let distBiz_id = ''
if(e.detail.value >= 0){
distBiz_id = this.data.bizobj[e.detail.value].id
}
this.setData({
distBiz_id,
distBizIndex:e.detail.value,
})
},
//多选
checkPicker(e){
this.setData({
['staffobj['+e.currentTarget.dataset.index+'].checked']:!this.data.staffobj[e.currentTarget.dataset.index].checked,
})
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh(){
this.setData({
+68 -36
View File
@@ -30,7 +30,7 @@
</picker>
</view>
<view class="fn-fr {{key<2?'pr180':'pr40'}} relative">
<text bindtap="optfilter" class="inner5 iconfont icon-gaojisousuo ml10"></text>
<text bindtap="showfilter" class="inner5 iconfont icon-gaojisousuo ml10"></text>
<view bindtap="pushLink" data-url="/pages/customer/addCard/index?status={{key}}" class="absolute right-0 box-middle pt10 pb10 pl10 pr30 space-nowrap bg-333 font-22 color-fff ulib-rl750" wx:if="{{key<2}}"><i class="iconfont mr5 icon-jia"></i>客户建卡</view>
</view>
</view>
@@ -48,6 +48,9 @@
<view class="inline-block text-middle bg-f6 color-666 mb15 ml5 mr5 pt5 pb5 pl20 pr20 ulib-r10 font-22" wx:if="{{of1Index>-1}}">{{of1Arr[of1Index]}}</view>
<view class="inline-block text-middle bg-f6 color-666 mb15 ml5 mr5 pt5 pb5 pl20 pr20 ulib-r10 font-22" wx:if="{{of2Index>-1}}">{{of2Arr[of2Index]}}</view>
<view class="inline-block text-middle bg-f6 color-666 mb15 ml5 mr5 pt5 pb5 pl20 pr20 ulib-r10 font-22" wx:if="{{staffIndex>-1}}">{{staffArray[staffIndex]}}</view>
<block wx:for="{{staffobj}}" wx:key='index'>
<view class="inline-block text-middle bg-f6 color-666 mb15 ml5 mr5 pt5 pb5 pl20 pr20 ulib-r10 font-22" wx:if="{{item.checked}}">{{item.uname}}</view>
</block>
</view>
<view class="mt10 pl30 pr30">
@@ -211,26 +214,28 @@
</picker>
</view>
</view> -->
<view class="relative bbs-1-eb last-b-none pl140 font-28">
<view class="absolute left-0 box-middle">客户来源</view>
<view class="pt25 pb25 text-right font-28 color-666">
<picker bindchange="changeOf1" value="{{of1Index}}" range="{{of1Arr}}">
<text class="color-ccc" wx:if="{{of1Index == -1}}">请选择</text>
<text wx:else>{{of1Arr[of1Index]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
<block wx:if="{{sources.length>0}}">
<view class="relative bbs-1-eb last-b-none pl140 font-28">
<view class="absolute left-0 box-middle">客户来源</view>
<view class="pt25 pb25 text-right font-28 color-666">
<picker bindchange="changeOf1" value="{{of1Index}}" range="{{of1Arr}}">
<text class="color-ccc" wx:if="{{of1Index == -1}}">请选择</text>
<text wx:else>{{of1Arr[of1Index]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{of2Arr.length>0}}">
<view class="absolute left-0 box-middle">{{sources[of1Index].name}}</view>
<view class="pt25 pb25 text-right font-28 color-666">
<picker bindchange="changeOf2" value="{{of2Index}}" range="{{of2Arr}}">
<text class="color-ccc" wx:if="{{of2Index == -1}}">请选择</text>
<text wx:else>{{of2Arr[of2Index]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{of2Arr.length>0}}">
<view class="absolute left-0 box-middle">{{sources[of1Index].name}}</view>
<view class="pt25 pb25 text-right font-28 color-666">
<picker bindchange="changeOf2" value="{{of2Index}}" range="{{of2Arr}}">
<text class="color-ccc" wx:if="{{of2Index == -1}}">请选择</text>
<text wx:else>{{of2Arr[of2Index]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
</view>
</block>
<!-- <view class="relative bbs-1-eb pl190 last-b-none">
<view class="absolute left-0 box-middle font-28 color-333">到店次数</view>
<view class="pt25 pb25 text-right font-28 color-666">
@@ -241,7 +246,7 @@
</picker>
</view>
</view> -->
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{staffArray.length>0&&userInfo.group_id>1}}">
<!-- <view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{staffArray.length>0&&userInfo.group_id>1}}">
<view class="absolute left-0 box-middle">销售顾问</view>
<view class="pt25 pb25 text-right font-28 color-666">
<picker bindchange="changeStaff" value="{{staffIndex}}" range="{{staffArray}}">
@@ -250,6 +255,16 @@
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view> -->
<view class="relative bbs-1-eb pt25 pb25 last-b-none">
<view class="font-22">销售顾问</view>
<view class="fn-clear">
<block wx:for="{{staffobj}}" wx:key='index'>
<view class="inline-block radio-btn mt20 mr15 pt15 pb15 pl20 pr20 ulib-r10 font-28 {{item.checked?'bg-333 color-fff':'bg-f8'}}" bindtap="checkPicker" data-index="{{index}}">
{{item.uname}}
</view>
</block>
</view>
</view>
</view>
<view class="pt50 pb100"></view>
@@ -274,25 +289,42 @@
<lcb-msg isShow="{{isShowEmployees}}">
<view slot="content">
<view class="inner40">
<view class="mt20 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">销售顾问</view>
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
<text wx:else>{{staffArray[employeeIndex]}}</text>
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
<view class="inner30">
<view class="mt10 font-28 text-center fn-flex" wx:if="{{distributetabs.length > 0}}">
<block wx:for="{{distributetabs}}" wx:key="index">
<view class="fn-flex-item relative ml10 mr10 pt20 pb20 ulib-r10 {{distTabId == item.id?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="changeDistTab" data-id="{{item.id}}">{{item.name}}</view>
</block>
</view>
<block wx:if="{{distTabId == 1}}">
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">销售顾问</view>
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
<text wx:else>{{staffArray[employeeIndex]}}</text>
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
</picker>
</view>
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">计划回访时间</view>
<view bindtap="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 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10" wx:else>
<view class="fn-fl">门店名称</view>
<picker class="fn-fr wp70 text-right" bindchange="changeDistBiz" value="{{distBizIndex}}" range="{{bizArray}}">
<view class="text-nowrap">
<text class="color-ccc" wx:if="{{distBizIndex == -1}}">请选择</text>
<text wx:else>{{bizArray[distBizIndex]}}</text>
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
</view>
</picker>
</view>
<view class="mt20 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">计划回访时间</view>
<view bindtap="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>
</view>
<view class="fn-flex pl60 pr60 pb50 text-center font-32 color-666">
<view class="fn-flex ml10 mr10 pl60 pr60 pb50 text-center font-32 color-666">
<button bindtap="optEmployees" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
<button disabled="{{submitFlag}}" bindtap="putAppCustomersAdmins" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定</button>
</view>
+2 -2
View File
@@ -44,8 +44,8 @@
<view class="relative">
<button class="btn-concat">去添加</button>
<view class="absolute left-0 top-0 right-0 bottom-0 opacity-0 text-center overflowhidden">
<QYWXcontact buttonText="{{4}}" class="pt40 pb40" bind:completemessage="completemessage" styleType='3' plugid='877ffe64ccc36a5f308252eadc3066df' />
<QYWXcontact buttonText="{{4}}" class="pt40 pb40" bind:completemessage="completemessage" styleType='3' plugid='877ffe64ccc36a5f308252eadc3066df' />
<QYWXcontact buttonText="{{4}}" class="pt40 pb40" bind:completemessage="completemessage" styleType='1' plugid='9280d952ecab1136d907a34b6799df97' />
<QYWXcontact buttonText="{{4}}" class="pt40 pb40" bind:completemessage="completemessage" styleType='1' plugid='9280d952ecab1136d907a34b6799df97' />
</view>
</view>
</view>
+10 -5
View File
@@ -52,7 +52,7 @@ Page({
isResetbiz:false,//是否重置过BIZID
isShowVersionInfo:false,//是否显示版本更新
versionInfo:{
number:'V3.0.40',
number:'V3.0.51',
list:[
// '',
// '',
@@ -61,7 +61,8 @@ Page({
// '',
// '',
// '新增了小记评论功能',
// '修改【订单详情】页面样式及交互',
// '修改【保单上传】的相应内容,上传后需补充相应保单信息。',
],
},
},
@@ -74,15 +75,17 @@ Page({
}
if(this.data.biz_id){
this.putAppUserResetbiz()
let that = this
setTimeout(function () {
that.putAppUserResetbiz()
}, 500)
}else{
this.setData({
isResetbiz:true,
});
this.getUserInfo()
}
this.getAppStatisticsHcust()
//this.getAppStatisticsHorder()
//消息通讯 是否显示授权用户信息按钮
@@ -117,6 +120,7 @@ Page({
this.getAppTransferRemind()
this.getAppInventoryRemind()
this.getAppGoodsRemind()
this.getAppStatisticsHcust()
}
},
@@ -157,6 +161,7 @@ Page({
this.getAppTransferRemind()
this.getAppInventoryRemind()
this.getAppGoodsRemind()
this.getAppStatisticsHcust()
});
},
+34 -16
View File
@@ -15,21 +15,39 @@
</view>
</view>
</view>
<view class="mb30 pt40 pb40 pl20 pr20 bg-fff box-shadow-000-10-10 ulib-r10 fn-flex text-center font-22 color-666">
<view class="relative fn-flex-item" bindtap="pushLink" data-url="/pages/inventory/list/index">
<view class="absolute peg-tip box-center ml30 bg-f9394d bds-2-fff img-24x24 text-center font-18 color-fff ulib-r750 z-index-1" wx:if="{{pandianNum}}"><text class="absolute box-center-middle">{{pandianNum}}</text></view>
<image class='img-60x60' mode="aspectFill" src='{{imgUrl}}index/icon2-tab-1.png' lazy-load="{{true}}"></image>
<view>车辆盘点</view>
<view class="mb30 pt40 pb40 bg-fff box-shadow-000-10-10 ulib-r10 text-center">
<view class="pl20 pr20 fn-flex font-22 color-666">
<view class="relative fn-flex-item" bindtap="pushLink" data-url="/pages/inventory/list/index">
<view class="absolute peg-tip box-center ml30 bg-f9394d bds-2-fff img-24x24 text-center font-18 color-fff ulib-r750 z-index-1" wx:if="{{pandianNum}}"><text class="absolute box-center-middle">{{pandianNum}}</text></view>
<image class='img-60x60' mode="aspectFill" src='{{imgUrl}}index/icon2-tab-1.png' lazy-load="{{true}}"></image>
<view>车辆盘点</view>
</view>
<view class="relative fn-flex-item" bindtap="pushLink" data-url="/pages/storeData/index" wx:if="{{userInfo.group_id>1}}">
<image class='img-60x60' mode="aspectFill" src='{{imgUrl}}index/icon-tab-2.png' lazy-load="{{true}}"></image>
<view>数据分析</view>
</view>
<view class="relative fn-flex-item" bindtap="pushLink" data-url="/pages/allot/list/index">
<view class="absolute peg-tip box-center ml30 bg-f9394d bds-2-fff img-24x24 text-center font-18 color-fff ulib-r750 z-index-1" wx:if="{{diaoboNum}}"><text class="absolute box-center-middle">{{diaoboNum}}</text></view>
<image class='img-60x60' mode="aspectFill" src='{{imgUrl}}index/icon2-tab-2.png' lazy-load="{{true}}"></image>
<view>车辆调拨</view>
</view>
<view class="relative fn-flex-item" bindtap="pushLink" data-url="/pages/inventory/warning/index">
<view class="absolute peg-tip box-center ml30 bg-f9394d bds-2-fff img-24x24 text-center font-18 color-fff ulib-r750 z-index-1" wx:if="{{inventory.value}}"><text class="absolute box-center-middle">{{inventory.value}}</text></view>
<image class='img-60x60' mode="aspectFill" src='{{imgUrl}}index/icon2-tab-3.png' lazy-load="{{true}}"></image>
<view style="color:{{inventory.color}};">{{inventory.title}}</view>
</view>
</view>
<view class="relative fn-flex-item" bindtap="pushLink" data-url="/pages/allot/list/index">
<view class="absolute peg-tip box-center ml30 bg-f9394d bds-2-fff img-24x24 text-center font-18 color-fff ulib-r750 z-index-1" wx:if="{{diaoboNum}}"><text class="absolute box-center-middle">{{diaoboNum}}</text></view>
<image class='img-60x60' mode="aspectFill" src='{{imgUrl}}index/icon2-tab-2.png' lazy-load="{{true}}"></image>
<view>车辆调拨</view>
</view>
<view class="relative fn-flex-item" bindtap="pushLink" data-url="/pages/inventory/warning/index">
<view class="absolute peg-tip box-center ml30 bg-f9394d bds-2-fff img-24x24 text-center font-18 color-fff ulib-r750 z-index-1" wx:if="{{inventory.value}}"><text class="absolute box-center-middle">{{inventory.value}}</text></view>
<image class='img-60x60' mode="aspectFill" src='{{imgUrl}}index/icon2-tab-3.png' lazy-load="{{true}}"></image>
<view style="color:{{inventory.color}};">{{inventory.title}}</view>
</view>
<!-- 数据看板 -->
<view class="bg-fff mb30 inner30 box-shadow-000-10-10 ulib-r10">
<view class="font-36">数据看板</view>
<view class="fn-flex fn-flex-wrap pt20 pb10 text-center">
<block wx:for="{{userCal.statistics}}" wx:key='index'>
<view class="wp33 relative pt20 pb20 {{index>2?'bts-1-eb':''}} {{index%3==2?'':'brs-1-eb'}}" bindtap="pushLink" data-url="{{item.today.url}}">
<view class="text-bold"><text class="font-36">{{item.today.value}}</text><text class="font-28 color-666">/{{item.month.value}}</text></view>
<view class="font-22"><text>{{item.today.title}}</text><text class="color-666">/{{item.month.title}}</text></view>
</view>
</block>
</view>
</view>
<!--客户代办事项-->
@@ -137,7 +155,7 @@
</view>
<!-- 客户数据 -->
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<!-- <view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<view class="relative">
<view class="font-36">客户数据</view>
<view class="absolute right-0 box-middle pt10 pb10 pl20 pr20 bg-ffedeb color-ff4a3a ulib-r10 font-22">累计线索总量 {{cust_total}} 条</view>
@@ -163,7 +181,7 @@
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecPie }}"></ec-canvas>
</view>
</view>
</view>
</view> -->
<!-- 订单数据 -->
<!-- <view class="mt40 inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<view class="relative">
+15
View File
@@ -166,6 +166,21 @@ Page({
}
},
//查看图片
previewImage: function (e) {
if(e.currentTarget.dataset.type=='car_img'){
let car_img = []
this.data.car_img.forEach(item => {
car_img.push(item.src)
})
wx.previewImage({
current:e.currentTarget.dataset.current,
urls:car_img,
})
}
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh(){
this.getAppInventory()
+3 -3
View File
@@ -22,11 +22,11 @@
<view class="pl40 pr40 font-32">盘点信息</view>
<view class="mt20 pl30">
<block wx:for="{{car_img}}" wx:key='index'>
<view class="inline-block ml10 mr10 text-center ulib-r10 overflowhidden" bindtap="chooseImg" data-index="{{index}}" wx:if="{{item.value}}">
<view class="inline-block ml10 mr10 text-center ulib-r10 overflowhidden" wx:if="{{item.value}}">
<view class="bg-f8 img-190x175 relative ulib-r10">
<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"></i>
<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-index="{{index}}"></i>
<view class="absolute left-0 right-0 box-middle color-ccc">
<image class='img-190x175 ulib-r10' src='{{item.src}}' mode='aspectFill'></image>
<image class='img-190x175 ulib-r10' src='{{item.src}}' mode='aspectFill' bindtap="previewImage" data-type="car_img" data-current="{{item.src}}"></image>
</view>
</view>
<view class="mt10 font-24 color-666">{{item.title}}</view>
+2 -2
View File
@@ -31,8 +31,8 @@
<view class="absolute wp100 login-light img-fill-cover" style="background-image:url({{imgUrl}}/login/login-light.png?v=1);"></view>
<view class="absolute wp100 bottom-170 text-center font-28 color-999">
<view class="absolute left-0 top-0 right-0 bottom-0 opacity-0 overflowhidden">
<QYWXcontact buttonText="{{4}}" class="pt40 pb40" styleType='3' plugid='877ffe64ccc36a5f308252eadc3066df' />
<QYWXcontact buttonText="{{4}}" class="pt40 pb40" styleType='3' plugid='877ffe64ccc36a5f308252eadc3066df' />
<QYWXcontact buttonText="{{4}}" class="pt40 pb40" styleType='1' plugid='9280d952ecab1136d907a34b6799df97' />
<QYWXcontact buttonText="{{4}}" class="pt40 pb40" styleType='1' plugid='9280d952ecab1136d907a34b6799df97' />
</view>
<i class="iconfont icon-kefu mr5"></i>联系小狸
</view>
+11 -11
View File
@@ -95,17 +95,17 @@ Page({
this.setData({
userInfo: res
})
if(res.group_id==2||res.group_id==3){
let list = this.data.list
list.push({
icon:'https://qs.haodian.cn/wechat_app/lichebao/mine/icon-jieshao2.png',
title:'转介绍',
url:'/pages/recommend/index',
})
this.setData({
list,
})
}
// if(res.group_id==2||res.group_id==3){
// let list = this.data.list
// list.push({
// icon:'https://qs.haodian.cn/wechat_app/lichebao/mine/icon-jieshao2.png',
// title:'转介绍',
// url:'/pages/recommend/index',
// })
// this.setData({
// list,
// })
// }
});
},
+93
View File
@@ -196,6 +196,99 @@ Page({
}
},
//获取离职
getAppEmployeesLeave(e){
let params = {};
params['id'] = e.currentTarget.dataset.id;
_.apiQuery.getAppEmployeesLeave(params).then(res => {
let adviserArray = []
res.data.adviser.list.forEach(item => {
adviserArray.push(item.name)
})
this.setData({
out_id:e.currentTarget.dataset.id,
transfer:res.data.transfer,
adviser:res.data.adviser,
adviserArray,
isShowTransfer:true,
adviserIndex:-1,
})
});
},
//显示隐藏移交
optTransfer(){
this.setData({
isShowTransfer:!this.data.isShowTransfer,
})
},
//选择移交内容
changeTransfer(e){
let transfer = this.data.transfer
transfer.list[e.currentTarget.dataset.index].checked = !transfer.list[e.currentTarget.dataset.index].checked
this.setData({
transfer,
})
},
//选择顾问
changeAdviser(e) {
this.setData({
adviserIndex: e.detail.value,
})
},
//确定移交
putAppEmployeesLeave(){
let ischecked = false
this.data.transfer.list.forEach(item => {
if(item.checked){
ischecked = true
}
})
console.log(ischecked)
if (ischecked == false ) {
wx.showToast({
title: '请选择移交内容',
icon: 'none'
})
} else if(this.data.adviserIndex == -1){
wx.showToast({
title: '请选择销售顾问',
icon: 'none'
})
}else{
let that = this
wx.showModal({
title: '',
content:'确定移交该店员工作吗?',
confirmColor: '#36afa2',
success (res) {
if (res.confirm) {
let params = {};
params['out_id'] = that.data.out_id;
params['in_id'] = that.data.adviser.list[that.data.adviserIndex].id;
params['transfer'] = that.data.transfer;
_.apiQuery.putAppEmployeesLeave(params).then(res => {
that.setData({
isShowTransfer:false,
})
wx.showToast({
title: '移交成功',
icon: 'success'
})
that.onPullDownRefresh()
})
} else if (res.cancel) {
}
}
})
}
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh(){
this.setData({
+32 -4
View File
@@ -35,11 +35,12 @@
<view class="relative pt30 pb30 pr250 bbs-1-eb last-b-none {{item.status==1?'':'opacity-50'}}">
<view class="text-nowrap">
<image class='img-50x50 bds-1-eb ulib-r750 text-middle' lazy-load="{{true}}" mode="scaleToFill" src="{{imgUrl}}common/default-head.jpg?v=220223"></image>
<text class="pl10 text-middle font-28">{{item.uname}}</text>
<text class="pl10 text-middle font-28">{{item.mobile}}</text>
<text class="pl10 text-middle font-26">{{item.uname}}</text>
<text class="pl10 text-middle font-26">{{item.mobile}}</text>
</view>
<view class="absolute right-0 box-middle">
<view class="inline-block bg-333 mr20 pt5 pb5 pl10 pr10 font-22 color-fff ulib-r750" bindtap="putAppEmployees" data-index="{{index}}"><i class="iconfont icon-zanting mr5"></i>{{item.status == 1?'暂停':'开启'}}</view>
<view class="absolute right-0 box-middle font-26">
<view class="inline-block bg-333 mr10 pt5 pb5 pl10 pr10 font-22 color-fff ulib-r750" bindtap="getAppEmployeesLeave" data-id="{{item.id}}"><i class="iconfont icon-yuangonglizhi mr5"></i>离职</view>
<view class="inline-block bg-333 mr10 pt5 pb5 pl10 pr10 font-22 color-fff ulib-r750" bindtap="putAppEmployees" data-index="{{index}}"><i class="iconfont icon-zanting mr5"></i>{{item.status == 1?'暂停':'开启'}}</view>
<view class="inline-block bg-333 pt5 pb5 pl10 pr10 font-22 color-fff ulib-r750" bindtap="deleteAppEmployees" data-index="{{index}}"><i class="iconfont icon-shanchu mr5"></i>删除</view>
</view>
</view>
@@ -69,4 +70,31 @@
<button disabled="{{submitFlag}}" bindtap="postAppEmployees" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">添加</button>
</view>
</view>
</lcb-msg>
<lcb-msg isShow="{{isShowTransfer}}">
<view slot="content">
<view class="inner30">
<view class="mt10 font-28 text-center fn-flex" wx:if="{{transfer.list.length > 0}}">
<block wx:for="{{transfer.list}}" wx:key="index">
<view class="fn-flex-item relative ml10 mr10 pt20 pb20 ulib-r10 {{item.checked?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="changeTransfer" data-index="{{index}}">{{item.name}}</view>
</block>
</view>
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">{{adviser.title}}</view>
<picker class="fn-fr wp70 text-right" bindchange="changeAdviser" value="{{adviserIndex}}" range="{{adviserArray}}">
<view class="text-nowrap">
<text class="color-ccc" wx:if="{{adviserIndex == -1}}">请选择</text>
<text wx:else>{{adviserArray[adviserIndex]}}</text>
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
</view>
</picker>
</view>
</view>
<view class="fn-flex ml10 mr10 pl60 pr60 pb50 text-center font-32 color-666">
<button bindtap="optTransfer" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
<button disabled="{{submitFlag}}" bindtap="putAppEmployeesLeave" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定移交</button>
</view>
</view>
</lcb-msg>
+15 -15
View File
@@ -416,6 +416,7 @@ Page({
title: '图片上传中',
})
let ins_img=that.data.ins_img
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
@@ -426,6 +427,7 @@ Page({
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
wx.hideLoading();
if (resp.data.code == 200) {
@@ -436,22 +438,20 @@ Page({
src:imgdata.data.full_url,
})
ins_img=ins_img.concat(list)
if(i+1==res1.tempFilePaths.length){
setTimeout(function () {
let params = {};
params['id'] = that.data.id;
params['type'] = 0;
let img = []
ins_img.forEach(item => {
img.push(item.value)
if(k == res1.tempFilePaths.length){
let params = {};
params['id'] = that.data.id;
params['type'] = 0;
let img = []
ins_img.forEach(item => {
img.push(item.value)
})
params['img'] = img;
_.apiQuery.putAppCusorderCdata(params).then(res => {
that.setData({
ins_img,
})
params['img'] = img;
_.apiQuery.putAppCusorderCdata(params).then(res => {
that.setData({
ins_img,
})
})
}, 500);
})
}
}else{
wx.showToast({
+110 -33
View File
@@ -18,6 +18,8 @@ Page({
register_img:{},//登记证照片
ins_img:[],//保险照片
other_img:[],//交车合照
isShowCK:false,
isShowBill:false,
},
onLoad: function (options) {
for (let key in options) {
@@ -28,11 +30,11 @@ Page({
this.getAppCusorderV2()
this.getUserInfo()
this.getAppCusorderdata()
},
onShow: function () {
this.getAppCusorderdata()
},
//获取用户信息
@@ -100,6 +102,12 @@ Page({
ins_img:res.data.imgs.ins_img.length==0?[]:res.data.imgs.ins_img,
other_img:res.data.imgs.other_img.length==0?[]:res.data.imgs.other_img,
})
if('delivery_ck_img' in res.data.imgs){
this.setData({
delivery_ck_img:res.data.imgs.delivery_ck_img.length==0?{}:res.data.imgs.delivery_ck_img,
})
}
}
wx.stopPullDownRefresh()
})
@@ -465,6 +473,7 @@ Page({
title: '上传中',
})
let ins_img=that.data.ins_img
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
@@ -475,6 +484,7 @@ Page({
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
@@ -484,22 +494,20 @@ Page({
img:imgdata.data.full_url,
})
ins_img=ins_img.concat(list)
if(i+1==res1.tempFilePaths.length){
if(k == res1.tempFilePaths.length){
wx.hideLoading();
setTimeout(function () {
let params = {};
params['id'] = that.data.id;
let img = []
ins_img.forEach(item => {
img.push(item.value)
let params = {};
params['id'] = that.data.id;
let img = []
ins_img.forEach(item => {
img.push(item.value)
})
params['ins_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
that.setData({
ins_img,
})
params['ins_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
that.setData({
ins_img,
})
})
}, 500);
})
}
}
},
@@ -529,6 +537,7 @@ Page({
title: '上传中',
})
let other_img=that.data.other_img
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
@@ -539,6 +548,7 @@ Page({
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
@@ -548,22 +558,20 @@ Page({
img:imgdata.data.full_url,
})
other_img=other_img.concat(list)
if(i+1==res1.tempFilePaths.length){
if(k == res1.tempFilePaths.length){
wx.hideLoading();
setTimeout(function () {
let params = {};
params['id'] = that.data.id;
let img = []
other_img.forEach(item => {
img.push(item.value)
let params = {};
params['id'] = that.data.id;
let img = []
other_img.forEach(item => {
img.push(item.value)
})
params['other_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
that.setData({
other_img,
})
params['other_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
that.setData({
other_img,
})
})
}, 500);
})
}
}
},
@@ -692,9 +700,17 @@ Page({
//查看图片
previewImage: function (e) {
if(e.currentTarget.dataset.type=='bill_img'){
let urls = [this.data.info.bill_img]
wx.previewImage({
current:this.data.info.bill_img,
urls:[this.data.info.bill_img],
current:e.currentTarget.dataset.current,
urls,
})
}
else if(e.currentTarget.dataset.type=='bill_ck_img'){
let urls = this.data.imgInfo.imgs.bill_ck_img
wx.previewImage({
current:e.currentTarget.dataset.current,
urls,
})
}
else if(e.currentTarget.dataset.type=='cardida'){
@@ -729,11 +745,17 @@ Page({
}
else if(e.currentTarget.dataset.type=='ins_img'){
let img = []
if(this.data.imgInfo.imgs.insurance_img.img){
img.push(this.data.imgInfo.imgs.insurance_img.img)
}
if(this.data.imgInfo.imgs.business_img.img){
img.push(this.data.imgInfo.imgs.business_img.img)
}
this.data.imgInfo.imgs.ins_img.forEach(item => {
img.push(item.img)
})
wx.previewImage({
current:this.data.imgInfo.imgs.ins_img[0].img,
current:this.data.imgInfo.imgs.insurance_img.img,
urls:img,
})
}
@@ -747,6 +769,47 @@ Page({
urls:img,
})
}
else if(e.currentTarget.dataset.type=='delivery_ck_img'){
wx.previewImage({
current:this.data.imgInfo.imgs.delivery_ck_img.img,
urls:[this.data.imgInfo.imgs.delivery_ck_img.img],
})
}
else if(e.currentTarget.dataset.type=='wx_img'){
wx.previewImage({
current:this.data.imgInfo.imgs.insurance_img.img,
urls:[this.data.imgInfo.imgs.insurance_img.img],
})
}
else if(e.currentTarget.dataset.type=='mut_wx_img'){
wx.previewImage({
current:this.data.imgInfo.imgs.mut_wx_img.img,
urls:[this.data.imgInfo.imgs.mut_wx_img.img],
})
}
else if(e.currentTarget.dataset.type=='destory_img'){
wx.previewImage({
current:this.data.imgInfo.imgs.destory_img.img,
urls:[this.data.imgInfo.imgs.destory_img.img],
})
}
else if(e.currentTarget.dataset.type=='notify'){
let img = []
this.data.info.notify_file.forEach(item => {
img.push(item.src)
})
wx.previewImage({
current:e.currentTarget.dataset.current,
urls:img,
})
}
else if(e.currentTarget.dataset.type=='lend'){
wx.previewImage({
current:this.data.info.lend_file.src,
urls:[this.data.info.lend_file.src],
})
}
},
//推送链接
@@ -794,6 +857,20 @@ Page({
})
},
//显示隐藏合格证
optShowCK(){
this.setData({
isShowCK:!this.data.isShowCK,
})
},
//显示隐藏合格证
optShowBill(){
this.setData({
isShowBill:!this.data.isShowBill,
})
},
//删除订单
putAppCusorderV2Status(){
let that = this
+180 -36
View File
@@ -19,7 +19,7 @@
</view>
<view class="mt40 relative fn-clear">
<view class="fn-fl pt10 font-32">{{info.main_type==0?'车主信息':'企业信息'}}</view>
<view class="fn-fr" wx:if="{{info.edit_status==1}}">
<view class="fn-fr" wx:if="{{(userInfo.uid==1||info.car_id!=33)&&info.edit_status==1&&!info.refund_status}}">
<button bindtap="pushLink" data-url="/pages/order/editOwner/index?id={{id}}" class="inline-block font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover"><i class="iconfont icon-dengji mr10"></i>修改</button>
</view>
</view>
@@ -57,7 +57,7 @@
</view>
<view class="mt40 fn-clear">
<view class="fn-fl pt10 font-32">订单信息</view>
<view class="fn-fr" wx:if="{{info.edit_status==1}}">
<view class="fn-fr" wx:if="{{info.edit_status==1&&!info.refund_status}}">
<button bindtap="pushLink" data-url="/pages/order/edit/index2?id={{id}}" class="inline-block font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover"><i class="iconfont icon-dengji mr10"></i>修改</button>
</view>
</view>
@@ -69,32 +69,33 @@
</view>
<block wx:for="{{value.list}}" wx:for-index='key2' wx:for-item='value2' wx:key='j'>
<block wx:if="{{!!value2.list}}">
<view class="relative ml40 bbs-1-eb pl140 font-22 color-666">
<view class="absolute left-0 box-middle"><i class="iconfont ml5 mr10 icon-gengduo"></i>{{key2}}</view>
<view class="pt25 pb25 text-right" style="min-height:30rpx">{{value2.value}}</view>
<view class="relative ml40 bbs-1-eb pl140 font-22 color-666" style="min-height:30rpx">
<view class="pt25 pb25"><i class="iconfont ml5 mr5 icon-dian"></i>{{key2}}</view>
<view class="absolute right-0 box-middle">{{value2.value}}</view>
</view>
<block wx:for="{{value2.list}}" wx:for-index='key3' wx:for-item='value3' wx:key='k'>
<view class="relative ml80 bbs-1-eb pl140 font-22 color-666">
<view class="absolute left-0 box-middle"><i class="iconfont ml5 mr10 icon-gengduo"></i>{{key3}}</view>
<view class="pt25 pb25 text-right" style="min-height:30rpx">{{value3}}</view>
<view class="relative ml80 bbs-1-eb pl140 font-22 color-666" style="min-height:30rpx">
<view class="pt25 pb25"><i class="iconfont ml5 mr5 icon-dian"></i>{{key3}}</view>
<view class="absolute right-0 box-middle">{{value3}}</view>
</view>
</block>
</block>
<block wx:else>
<view class="relative ml40 bbs-1-eb pl140 font-22 color-666">
<view class="absolute left-0 box-middle"><i class="iconfont ml5 mr10 icon-gengduo"></i>{{key2}}</view>
<view class="pt25 pb25 text-right" style="min-height:30rpx">{{value2}}</view>
<view class="relative ml40 bbs-1-eb pr150 font-22 color-666" style="min-height:30rpx">
<view class="pt25 pb25"><i class="iconfont ml5 mr5 icon-dian"></i>{{key2}}</view>
<view class="absolute right-0 box-middle">{{value2}}</view>
</view>
</block>
</block>
</block>
<block wx:else>
<block wx:if="{{key == '按揭信息'}}">
<view class="relative bbs-1-eb pl140 font-28">
<view class="relative bbs-1-eb pl140 font-28" bindtap="{{info.loan_status&&!info.refund_status?'pushLink':''}}" data-url="/pages/order/editFinance/index?id={{id}}">
<view class="absolute left-0 box-middle font-28 color-333">{{key}}</view>
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx">
<text class="mr20 text-middle">{{value}}</text>
<button bindtap="pushLink" data-url="/pages/order/editFinance/index?id={{id}}" class="inline-block text-middle font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover" wx:if="{{info.loan_status}}"><i class="iconfont icon-dengji mr10"></i>更新</button>
<text >{{value}}</text>
<i wx:if="{{info.loan_status}}" class="iconfont ml10 icon-gengduo font-26 color-999"></i>
<!-- <button bindtap="pushLink" data-url="/pages/order/editFinance/index?id={{id}}" class="inline-block text-middle font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover" wx:if="{{info.loan_status}}"><i class="iconfont icon-dengji mr10"></i>更新</button> -->
</view>
</view>
</block>
@@ -113,19 +114,47 @@
<view class="relative bbs-1-eb pt30 pb30 text-right font-24 color-666" wx:if="{{info.inten_money}}">已付意向金<text class="pl5 pr5 color-f9394d">{{info.inten_money}}</text>元</view>
</view>
<!--开票信息展示-->
<view class="pl30 pr30" wx:if="{{info.bill_img}}">
<view class="mt40 font-32">开票信息</view>
<view class="mt20"><image bindtap="previewImage" data-type="bill_img" class='wp100' lazy-load="{{true}}" mode="widthFix" src="{{info.bill_img}}"></image></view>
<!--合格证,发票展示-->
<view class="pl30 pr30">
<view class="bbs-1-eb" wx:if="{{imgInfo.imgs.bill_ck_img.length>0}}">
<view class="relative pt30 pb30" bindtap="optShowCK">
<text class="font-32">合格证</text>
<view class="absolute right-0 box-middle red-tip mr30 ulib-r750" wx:if="{{!isShowCK}}"></view>
<i class="absolute right-0 box-middle iconfont {{isShowCK?'icon-xuanze':'icon-gengduo'}} font-26 color-999"></i>
</view>
<view hidden="{{!isShowCK}}">
<block wx:for='{{imgInfo.imgs.bill_ck_img}}' wx:key='index'>
<view class="mt10 mb10 "><image bindtap="previewImage" data-type="bill_ck_img" data-current="{{item}}" class='wp100' lazy-load="{{true}}" mode="widthFix" src="{{item}}"></image></view>
</block>
</view>
</view>
<view class="bbs-1-eb" wx:if="{{info.bill_img}}">
<view class="relative pt30 pb30" bindtap="optShowBill">
<text class="font-32">发票</text>
<view class="absolute right-0 box-middle red-tip mr30 ulib-r750" wx:if="{{!isShowBill}}"></view>
<i class="absolute right-0 box-middle iconfont {{isShowBill?'icon-xuanze':'icon-gengduo'}} font-26 color-999"></i>
</view>
<view hidden="{{!isShowBill}}">
<view class="mt10 mb10"><image bindtap="previewImage" data-type="bill_img" data-current="{{info.bill_img}}" class='wp100' lazy-load="{{true}}" mode="widthFix" src="{{info.bill_img}}"></image></view>
</view>
</view>
</view>
<!--图片-->
<view class="pl30 pr30">
<!--图片修改-->
<block wx:if="{{imgInfo.img_status==1}}">
<!--上传身份证-->
<block wx:if="{{info.main_type == 0}}">
<view class="mt40 font-32">身份证</view>
<view class="relative bbs-1-eb pl140 font-28" bindtap="{{!info.refund_status?'pushLink':''}}" data-url="/pages/order/editCardid/index?id={{id}}">
<view class="absolute left-0 box-middle font-32 color-333">身份证</view>
<view class="pt30 pb30 text-right font-26 color-999" style="min-height:38rpx">
<view>{{cardida.value||cardidb.value?'更新':'上传'}}<i class="iconfont ml10 icon-gengduo"></i></view>
<!-- <button bindtap="pushLink" data-url="/pages/order/editCardid/index?id={{id}}" class="inline-block text-middle font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover"><i class="iconfont icon-dengji mr10"></i>{{cardida.value||cardidb.value?'更新':'上传'}}</button> -->
</view>
</view>
<!-- <view class="mt40 font-32">身份证</view>
<view class="fn-flex mt30 text-center">
<view class="fn-flex-item relative mr10" bindtap="chooseImg" data-type="cardida">
<block wx:if="{{cardida.value}}">
@@ -165,11 +194,19 @@
</view>
</block>
</view>
</view>
</view> -->
</block>
<!--上传营业执照-->
<block wx:elif="{{info.main_type == 1}}">
<view class="mt40 font-32">营业执照</view>
<view class="relative bbs-1-eb pl140 font-28" bindtap="{{!info.refund_status?'pushLink':''}}" data-url="/pages/order/editBusinessBicence/index?id={{id}}">
<view class="absolute left-0 box-middle font-32 color-333">营业执照</view>
<view class="pt30 pb30 text-right font-26 color-999" style="min-height:38rpx">
<view>{{business_licence.value?'更新':'上传'}}<i class="iconfont ml10 icon-gengduo"></i></view>
<!-- <button bindtap="pushLink" data-url="/pages/order/editBusinessBicence/index?id={{id}}" class="inline-block text-middle font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover"><i class="iconfont icon-dengji mr10"></i>{{business_licence.value?'更新':'上传'}}</button> -->
</view>
</view>
<!-- <view class="mt40 font-32">营业执照</view>
<view class="mt30 text-center">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="business_licence">
<block wx:if="{{business_licence.value}}">
@@ -190,10 +227,18 @@
</view>
</block>
</view>
</view>
</view> -->
</block>
<!--上传上牌材料-->
<view class="mt40 font-32">上牌材料</view>
<!--上传车辆证件-->
<view class="relative bbs-1-eb pl140 font-28" bindtap="{{!info.refund_status?'pushLink':''}}" data-url="/pages/order/editLicenseImg/index?id={{id}}">
<view class="absolute left-0 box-middle font-32 color-333">车辆证件</view>
<view class="pt30 pb30 text-right font-26 color-999" style="min-height:38rpx">
<view>{{register_img.value||car_img.value?'更新':'上传'}}<i class="iconfont ml10 icon-gengduo"></i></view>
<!-- <button bindtap="pushLink" data-url="/pages/order/editLicenseImg/index?id={{id}}" class="inline-block text-middle font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover"><i class="iconfont icon-dengji mr10"></i>{{register_img.value||car_img.value?'更新':'上传'}}</button> -->
</view>
</view>
<!-- <view class="mt40 font-32">车辆证件</view>
<view class="fn-flex mt30 text-center">
<view class="fn-flex-item relative mr10" bindtap="chooseImg" data-type="register_img">
<block wx:if="{{register_img.value}}">
@@ -226,10 +271,17 @@
</view>
</view>
</block>
</view>
</view>-->
<!--上传保险单-->
<view class="relative bbs-1-eb pl140 font-28" bindtap="{{!info.refund_status?'pushLink':''}}" data-url="/pages/order/editInsImg/index?id={{id}}">
<view class="absolute left-0 box-middle font-32 color-333">保险单</view>
<view class="pt30 pb30 text-right font-26 color-999" style="min-height:38rpx">
<view>{{ins_img.length>0||imgInfo.imgs.insurance_img.value||imgInfo.imgs.business_img.value?'更新':'上传'}}<i class="iconfont ml10 icon-gengduo"></i></view>
<!-- <button bindtap="pushLink" data-url="/pages/order/editInsImg/index?id={{id}}" class="inline-block text-middle font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover"><i class="iconfont icon-dengji mr10"></i>{{ins_img.length>0?'更新':'上传'}}</button> -->
</view>
</view>
<!--上传保单-->
<view class="mt40 font-32">保单</view>
<!-- <view class="mt40 font-32">保险单</view>
<view class="mt30 pb20 text-center">
<scroll-view class="space-nowrap" scroll-x="true">
<block wx:for='{{ins_img}}' wx:for-item='ins_img' wx:key='index'>
@@ -242,14 +294,21 @@
<view class="inline-block bg-f8 img-300x200 ml15 mr15 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="ins_img">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt10 font-22">上传保单</view>
<view class="mt10 font-22">上传保单</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view> -->
<!--上传交车合照-->
<view class="mt40 font-32">交车合照</view>
<view class="relative bbs-1-eb pl140 font-28" bindtap="{{!info.refund_status?'pushLink':''}}" data-url="/pages/order/editOtherImg/index?id={{id}}">
<view class="absolute left-0 box-middle font-32 color-333">交车合照</view>
<view class="pt30 pb30 text-right font-26 color-999" style="min-height:38rpx">
<view>{{other_img.length>0?'更新':'上传'}}<i class="iconfont ml10 icon-gengduo"></i></view>
<!-- <button bindtap="pushLink" data-url="/pages/order/editOtherImg/index?id={{id}}" class="inline-block text-middle font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover"><i class="iconfont icon-dengji mr10"></i>{{other_img.length>0?'更新':'上传'}}</button> -->
</view>
</view>
<!-- <view class="mt40 font-32">交车合照</view>
<view class="mt30 pb20 text-center">
<scroll-view class="space-nowrap" scroll-x="true">
<block wx:for='{{other_img}}' wx:for-item='other_img' wx:key='index'>
@@ -267,6 +326,29 @@
</view>
</block>
</scroll-view>
</view> -->
<!--上传交车合照-->
<!--添加企微-->
<view class="relative bbs-1-eb pl140 font-28" bindtap="{{!info.refund_status?'pushLink':''}}" data-url="/pages/order/editQVImg/index?id={{id}}">
<view class="absolute left-0 box-middle font-32 color-333">企微信息</view>
<view class="pt30 pb30 text-right font-26 color-999" style="min-height:38rpx">
<view>{{imgInfo.imgs.wx_img.value||imgInfo.imgs.mut_wx_img.value?'更新':'上传'}}<i class="iconfont ml10 icon-gengduo"></i></view>
</view>
</view>
<!--end添加企微-->
<!--实名认证资料-->
<view class="relative bbs-1-eb pl140 font-28" bindtap="{{!info.refund_status?'pushLink':''}}" data-url="/pages/order/editVoucherImg/index?id={{id}}">
<view class="absolute left-0 box-middle font-32 color-333">实名认证资料</view>
<view class="pt30 pb30 text-right font-26 color-999" style="min-height:38rpx">
<view>{{imgInfo.imgs.destory_img.value?'更新':'上传'}}<i class="iconfont ml10 icon-gengduo"></i></view>
</view>
</view>
<!--end实名认证资料-->
<view class="relative bbs-1-eb pl140 font-28" bindtap="{{!info.refund_status?'pushLink':''}}" data-url="/pages/order/editDeliveryckimg/index?id={{id}}" wx:if="{{!!imgInfo.imgs.delivery_ck_img}}">
<view class="absolute left-0 box-middle font-32 color-333">交付确认单</view>
<view class="pt30 pb30 text-right font-26 color-999" style="min-height:38rpx">
<view><i class="iconfont ml10 icon-gengduo"></i></view>
</view>
</view>
</block>
@@ -299,7 +381,7 @@
</block>
<!--国家补材料-->
<block wx:if="{{imgInfo.imgs.register_img.img||imgInfo.imgs.car_img.img}}">
<view class="mt40 font-32">上牌材料</view>
<view class="mt40 font-32">车辆证件</view>
<view class="fn-flex mt30 text-center">
<view class="fn-flex-item relative mr10">
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" wx:if="{{imgInfo.imgs.register_img.img}}" bindtap="previewImage" data-type="register_img">
@@ -313,13 +395,13 @@
</view>
</view>
</block>
<!--保单-->
<!--保单-->
<block wx:if="{{imgInfo.imgs.ins_img.length>0}}">
<view class="mt40 font-32">保单</view>
<view class="mt40 font-32">保单</view>
<view class="mt30 pb20 text-center">
<view class="inline-block bg-f8 img-300x200 ml15 mr15 relative ulib-r10 overflowhidden" bindtap="previewImage" data-type="ins_img">
<view class="absolute box-center-middle font-28 color-fff z-index-1" wx:if="{{imgInfo.imgs.ins_img.length>1}}">{{imgInfo.imgs.ins_img.length}}张</view>
<image class='block wp100 img-h-200 ulib-r10' src='{{imgInfo.imgs.ins_img[0].img}}' mode='aspectFit'></image>
<view class="absolute box-center-middle font-28 color-fff z-index-1">{{imgInfo.imgs.ins_img.length+2}}张</view>
<image class='block wp100 img-h-200 ulib-r10' src='{{imgInfo.imgs.insurance_img.img}}' mode='aspectFit'></image>
</view>
</view>
</block>
@@ -333,9 +415,71 @@
</view>
</view>
</block>
<!--添加企微-->
<block wx:if="{{imgInfo.imgs.wx_img.img||imgInfo.imgs.mut_wx_img.img}}">
<view class="mt40 font-32">添加企微</view>
<view class="fn-flex mt30 text-center">
<view class="fn-flex-item relative mr10">
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" wx:if="{{imgInfo.imgs.wx_img.img}}" bindtap="previewImage" data-type="wx_img">
<image class='block wp100 img-h-200 ulib-r10' src='{{imgInfo.imgs.wx_img.img}}' lazy-load="{{true}}" mode="aspectFit"></image>
</view>
</view>
<view class="fn-flex-item relative ml10">
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" wx:if="{{imgInfo.imgs.mut_wx_img.img}}" bindtap="previewImage" data-type="mut_wx_img">
<image class='block wp100 img-h-200 ulib-r10' src='{{imgInfo.imgs.mut_wx_img.img}}' lazy-load="{{true}}" mode="aspectFit"></image>
</view>
</view>
</view>
</block>
<!--实名认证资料-->
<block wx:if="{{imgInfo.imgs.destory_img.img}}">
<view class="mt40 font-32">实名认证资料</view>
<view class="mt30 pb20 text-center">
<view class="inline-block bg-f8 img-300x200 ml15 mr15 relative ulib-r10 overflowhidden" bindtap="previewImage" data-type="destory_img">
<image class='block wp100 img-h-200 ulib-r10' src='{{imgInfo.imgs.destory_img.img}}' mode='aspectFit'></image>
</view>
</view>
</block>
<!--交付确认单-->
<block wx:if="{{imgInfo.imgs.delivery_ck_img.img}}">
<view class="mt40 font-32">交付确认单</view>
<view class="mt30 pb20 text-center">
<view class="inline-block bg-f8 img-300x200 ml15 mr15 relative ulib-r10 overflowhidden" bindtap="previewImage" data-type="delivery_ck_img">
<image class='block wp100 img-h-200 ulib-r10' src='{{imgInfo.imgs.delivery_ck_img.img}}' mode='aspectFit'></image>
</view>
</view>
</block>
</block>
<!--按揭图片展示-->
<block wx:if="{{!info.loan_status}}">
<block wx:if="{{info.notify_file.length>0}}">
<view class="mt30 font-28">按揭通知函</view>
<view class="mt30 pb30 text-center">
<scroll-view class="space-nowrap" scroll-x="true">
<block wx:for='{{info.notify_file}}' wx:for-item='notify' wx:key='index'>
<view class="inline-block bg-f8 img-300x200 ml10 mr10 relative ulib-r10 overflowhidden">
<image class='block wp100 img-h-200 ulib-r10' src='{{notify.src}}' mode='aspectFit' bindtap="previewImage" data-type="notify" data-current="{{notify.src}}"></image>
</view>
</block>
</scroll-view>
</view>
</block>
<block wx:if="{{info.lend_file.value}}">
<view class="mt30 font-28">放款通知函</view>
<view class="mt30 text-center">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden">
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden">
<image class='block wp100 img-h-200 ulib-r10' src='{{info.lend_file.src}}' mode='aspectFit' bindtap="previewImage" data-type="lend"></image>
</view>
</view>
</view>
</block>
</block>
<!--end 图片预览-->
</view>
</view>
<!--交付随车信息-->
@@ -401,7 +545,7 @@
<!--end交付随车信息-->
<!--订单作废 收取意向金 操作-->
<view class="fixed left-0 right-0 bottom-0 pt20 pl30 pr30 pb40 bg-000-op80 fn-flex z-index-9999">
<view class="fixed left-0 right-0 bottom-0 pt20 pl30 pr30 pb40 bg-000-op80 fn-flex z-index-9999" wx:if="{{!info.refund_status}}">
<button bindtap="putAppCusorderV2Status" class="fn-flex-item ml20 mr20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover" wx:if="{{!info.inten_money&&!info.price_book_status&&!info.price_last_status&&!price_srv_status}}"><i class="iconfont mr5 icon-zuofei"></i>订单作废</button>
<button bindtap="optShowOrderCode" class="fn-flex-item ml20 mr20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover"><i class="iconfont mr5 icon-zhifu"></i>邀请扫码</button>
</view>
+6
View File
@@ -1,3 +1,9 @@
.red-tip{
width:12rpx;
height:12rpx;
background-color:#f9394d;
}
/*复选框外框样式*/
checkbox .wx-checkbox-input {
width:30rpx;
+132 -79
View File
@@ -59,8 +59,7 @@ Page({
isShowRemarks:false,//意向金备注
srv_total:0,//代办费用
agencyList:[],//代办数组
fine_total_1:0,//精品费用-添加
fine_total_2:0,//精品费用-选择
fine_total:0,//精品费用
//if_fine:false,//精品尊享包
@@ -72,6 +71,9 @@ Page({
if_local_bill:0,//本地开具发票
fineArr:[],//精品选装
finedIndex:-1,//精品选装索引
},
//生命周期函数--监听页面加载
onLoad: function (options) {
@@ -84,6 +86,7 @@ Page({
this.getAppCusorderV2()
this.getAppSeriesBrands()
this.getUserInfo()
this.getAppFine()
},
@@ -323,45 +326,18 @@ Page({
}
//匹配精品赠送
let fineparams = {};
fineparams['limbiz'] = 1;
fineparams['page'] = 1;
fineparams['size'] = 100;
_.apiQuery.getAppFine(fineparams).then(res11 => {
if(res.data.fines&&res.data.fines.length>0){
let fine_total_1 = 0
let fine_total_2 = 0
let fines = []
let fineList = res11.data.list
res.data.fines.forEach(item1 => {
if(item1.id){
fineList.forEach(item2 => {
if(item1.id == item2.id){
item2.checked = true
fine_total_2 = fine_total_2 + parseFloat(item2.price)
}
})
}else{
fines.push(item1)
if(parseFloat(item1.price)>0){
fine_total_1 = fine_total_1 + parseFloat(item1.price)
}
}
})
this.setData({
fine_total_1,
fine_total_2,
fines,
fineList,
})
}else{
this.setData({
fine_total_1:0,
fine_total_2:0,
fineList:res11.data.list,
})
}
});
if(res.data.fines&&res.data.fines.length>0){
let fine_total = 0
res.data.fines.forEach(item => {
if(parseFloat(item.price)>0){
fine_total = fine_total + parseFloat(item.price)
}
})
this.setData({
fines:res.data.fines,
fine_total,
})
}
/*end匹配精品赠送*/
})
@@ -378,6 +354,12 @@ Page({
nextstep(){
switch (this.data.step) {
case 1:
this.setData({
mobile:this.trimAll(this.data.mobile),
cardid:this.trimAll(this.data.cardid),
owner_mobile:this.trimAll(this.data.owner_mobile),
owner_cardid:this.trimAll(this.data.owner_cardid),
})
if (this.data.customerIndex == -1 ) {
wx.showToast({
title: '请选择客户',
@@ -840,15 +822,6 @@ Page({
fines.push(item)
}
});
that.data.fineList.forEach(item => {
if(item.checked){
fines.push({
id:item.id,
txt:item.title,
price:item.price,
})
}
})
let params = {};
params['id'] = that.data.id;
@@ -862,12 +835,13 @@ Page({
params['delry_time'] = that.data.delry_time;
params['business_id'] = that.data.priceinfo.id;
params['disc_money'] = that.data.priceinfo.sdisc_money?that.data.priceinfo.sdisc_money:0;
if(that.data.sa != ''){
params['sa'] = that.data.sa;
}
params['sa'] = that.data.sa;
if(that.data.priceinfo.show_local_bill){
params['if_local_bill'] = that.data.if_local_bill;
}
let srv_arr = []
that.data.agencyList.forEach(item => {
if(item.checked){
@@ -878,12 +852,9 @@ Page({
})
}
})
if(srv_arr.length>0){
params['srv_arr'] = srv_arr;
}
if(fines.length>0){
params['fines'] = fines;
}
params['srv_arr'] = srv_arr;
params['fines'] = fines;
//精品优惠金额
// if(that.data.priceinfo.fine_money){
// params['if_fine'] = that.data.if_fine?'1':'0';
@@ -1032,14 +1003,14 @@ Page({
this.setData({
['fines['+e.currentTarget.dataset.index+'].price']:e.detail.value,
})
let fine_total_1 = 0
let fine_total = 0
this.data.fines.forEach(item => {
if(parseFloat(item.price)>0){
fine_total_1 = fine_total_1 + parseFloat(item.price)
fine_total = fine_total + parseFloat(item.price)
}
})
this.setData({
fine_total_1,
fine_total,
})
}
},
@@ -1196,26 +1167,99 @@ Page({
})
},
//精品选装
changeFines(e) {
let fineList = this.data.fineList
let values = e.detail.value
let fine_total_2 = 0
fineList.forEach(item1 => {
item1.checked = false
values.forEach(item2 => {
if(item1.id == item2){
item1.checked = true
if(parseFloat(item1.price)>0){
fine_total_2 = fine_total_2 + parseFloat(item1.price)
}
//获取精品选装
getAppFine(){
let params = {};
params['limbiz'] = 1;
params['page'] = 1;
params['size'] = 100;
_.apiQuery.getAppFine(params).then(res => {
let fineList = res.data.list
let fineArr = []
fineList.forEach(item => {
fineArr.push(item.title)
item.price=''
})
fineArr.push('其他')
this.setData({
fineArr,
fineList,
})
});
},
//添加精品选装
changeFine(e) {
if(this.data.fineArr[e.detail.value]=='其他'){
this.data.fines.push({
txt:'',
price:'',
})
this.setData({
finedIndex:-1,
fines:this.data.fines,
})
}else{
let fid = this.data.fineList[e.detail.value].id
let isadd = false
this.data.fines.forEach(item => {
if(item.id == fid){
isadd = true
}
})
})
if(isadd){
wx.showToast({
title: '您已添加过了',
icon: 'none',
duration: 2000
})
}else{
this.data.fineList.forEach(item => {
if(item.id == fid){
this.data.fines.push({
id:item.id,
txt:item.title,
price:'',
})
this.setData({
finedIndex:-1,
fines:this.data.fines,
})
}
})
}
}
this.setData({
fineList,
fine_total_2,
},
//删除精品选装
delFine(e){
let that = this
wx.showModal({
title: '确定删除吗?',
content: '',
confirmText: "确定删除",
confirmColor: "#36afa2",
cancelText: "取消",
cancelColor: "#666",
success(res) {
if (res.confirm) {
let fines = that.data.fines
fines.splice(e.currentTarget.dataset.index, 1)
that.setData({
fines,
})
let fine_total = 0
that.data.fines.forEach(item => {
if(parseFloat(item.price)>0){
fine_total = fine_total + parseFloat(item.price)
}
})
that.setData({
fine_total,
})
}
}
})
},
@@ -1224,4 +1268,13 @@ Page({
this.getAppCusorderV2()
},
//去除空格
trimAll(ele){
if(typeof ele === 'string'){
return ele.split(' ').join('');
}else{
console.error(`${typeof ele} is not the expected type, but the string type is expected`)
}
},
})
+9 -35
View File
@@ -169,16 +169,8 @@
</block>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle color-333">精品选装</view>
<view class="pt30 pb30 text-right font-28 color-666" style="height:38rpx;"><text class="mr10 color-f9394d">{{fine_total_1+fine_total_2}}</text>元</view>
<view class="pt30 pb30 text-right font-28 color-666" style="height:38rpx;"><text class="mr10 color-f9394d">{{fine_total}}</text>元</view>
</view>
<block wx:for="{{fineList}}" wx:key='index'>
<view class="relative ml40 bbs-1-eb pl140 font-22 color-666" wx:if="{{item.checked}}">
<view class="absolute left-0 box-middle"><i class="iconfont ml5 mr10 icon-gengduo"></i>{{item.title}}</view>
<view class="pt25 pb25 text-right" style="min-height:30rpx">
<blcok wx:if="{{item.price}}"><text class="mr10 color-f9394d">{{item.price}}</text>元</blcok>
</view>
</view>
</block>
<block wx:for="{{fines}}" wx:key='index'>
<view class="relative ml40 bbs-1-eb pl140 font-22 color-666" wx:if="{{item.txt}}">
<view class="absolute left-0 box-middle"><i class="iconfont ml5 mr10 icon-gengduo"></i>{{item.txt}}</view>
@@ -239,34 +231,24 @@
<view class="relative pl190">
<view class="absolute left-0 box-middle font-28 color-333">精品选装</view>
<view class="pt30 pb30 text-right font-28 color-666">
总计:<text class="mr10 color-f9394d">{{fine_total_1+fine_total_2}}</text>元
总计:<text class="mr10 color-f9394d">{{fine_total}}</text>元
</view>
</view>
<view class="pb10">
<checkbox-group bindchange="changeFines">
<block wx:for="{{fineList}}" wx:key='index'>
<view class="mb20 block relative height-100 pl220 pr20 bg-f6 font-28 ulib-r10">
<label class="absolute box-middle left-0 ml30">
<checkbox class="text-middle mr5" value="{{item.id}}" checked="{{item.checked}}" />
<text class="text-middle">{{item.title}}</text>
</label>
<view class="pt25 text-right" wx:if="{{item.price>0}}">
<text class="mr10 color-f9394d">{{item.price}}</text>元
</view>
</view>
</block>
</checkbox-group>
<block wx:for="{{fines}}" wx:key='index'>
<view class="fn-clear mb20 relative pl30 pr30 bg-f6 ulib-r10">
<view class="fn-fl wp50">
<view class="fn-clear mb20 relative pl30 pr80 bg-f6 ulib-r10">
<view class="fn-fl wp70">
<input class="wp100 height-100 font-28" placeholder-class="color-ccc" type="text" placeholder="精品名称" bindinput='inputFines' data-index="{{index}}" data-type="txt" value="{{item.txt}}" always-embed='{{true}}' />
</view>
<view class="fn-fr wp25">
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="digit" placeholder="精品价格" bindinput='inputFines' data-index="{{index}}" data-type="price" value="{{item.price}}" always-embed='{{true}}' />
</view>
<i class="absolute box-middle right-0 mr20 iconfont icon-guanbi1 font-30 color-666" bindtap="delFine" data-index="{{index}}"></i>
</view>
</block>
<view class="mb20 inner20 bds-2-36afa2 text-center font-28 color-36afa2 ulib-r10" bindtap="addFine"><i class="iconfont mr10 font-24 icon-jia1"></i>添加</view>
<picker class="mb20 inner20 bds-2-36afa2 text-center font-28 color-36afa2 ulib-r10" bindchange="changeFine" value="{{finedIndex}}" range="{{fineArr}}">
<i class="iconfont mr10 font-24 icon-jia1"></i>添加
</picker>
</view>
</view>
</block>
@@ -383,16 +365,8 @@
</block>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle color-333">精品选装</view>
<view class="pt30 pb30 text-right font-28 color-666" style="height:38rpx;"><text class="mr10 color-f9394d">{{fine_total_1+fine_total_2}}</text>元</view>
<view class="pt30 pb30 text-right font-28 color-666" style="height:38rpx;"><text class="mr10 color-f9394d">{{fine_total}}</text>元</view>
</view>
<block wx:for="{{fineList}}" wx:key='index'>
<view class="relative ml40 bbs-1-eb pl140 font-22 color-666" wx:if="{{item.checked}}">
<view class="absolute left-0 box-middle"><i class="iconfont ml5 mr10 icon-gengduo"></i>{{item.title}}</view>
<view class="pt25 pb25 text-right" style="min-height:30rpx">
<blcok wx:if="{{item.price}}"><text class="mr10 color-f9394d">{{item.price}}</text>元</blcok>
</view>
</view>
</block>
<block wx:for="{{fines}}" wx:key='index'>
<view class="relative ml40 bbs-1-eb pl140 font-22 color-666" wx:if="{{item.txt}}">
<view class="absolute left-0 box-middle"><i class="iconfont ml5 mr10 icon-gengduo"></i>{{item.txt}}</view>
+524
View File
@@ -0,0 +1,524 @@
import _ from '../../../commons/js/commons'
const app = getApp()
Page({
data: {
cardida:{},//身份证正面照片
cardidb:{},//身份证反面照片
business_licence:{},//营业执照照片
car_img:{},//行驶证照片
register_img:{},//登记证照片
ins_img:[],//保险照片
other_img:[],//交车合照
},
onLoad: function (options) {
for (let key in options) {
this.setData({
[key]: options[key]
})
}
this.getAppCusorderdata()
},
onShow: function () {
},
//获取订单图片
getAppCusorderdata(){
let params = {};
params['id'] = this.data.id;
_.apiQuery.getAppCusorderdata(params).then(res=>{
this.setData({
imgInfo:res.data,
})
if(res.data.img_status == 1){
this.setData({
cardida:res.data.imgs.cardida.length==0?{}:res.data.imgs.cardida,
cardidb:res.data.imgs.cardidb.length==0?{}:res.data.imgs.cardidb,
business_licence:res.data.imgs.business_licence.length==0?{}:res.data.imgs.business_licence,
car_img:res.data.imgs.car_img.length==0?{}:res.data.imgs.car_img,
register_img:res.data.imgs.register_img.length==0?{}:res.data.imgs.register_img,
ins_img:res.data.imgs.ins_img.length==0?[]:res.data.imgs.ins_img,
other_img:res.data.imgs.other_img.length==0?[]:res.data.imgs.other_img,
})
}
wx.stopPullDownRefresh()
})
},
//选择图片
chooseImg(e) {
let that = this
//上传身份证正面
if(e.currentTarget.dataset.type=='cardida'){
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) {
let params = {};
params['id'] = that.data.id;
params['cardida'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'cardida.value':resp.data.data.url,
'cardida.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
if(res2.code==418){
that.setData({
'cardida.value':resp.data.data.url,
'cardida.img':resp.data.data.full_url,
'cardida.err':!res2.data[0].caridA,
'cardida.errmsg':res2.data[0].errmsg,
})
}
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传身份证背面
if(e.currentTarget.dataset.type=='cardidb'){
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) {
let params = {};
params['id'] = that.data.id;
params['cardidb'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'cardidb.value':resp.data.data.url,
'cardidb.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
if(res2.code==418){
that.setData({
'cardidb.value':resp.data.data.url,
'cardidb.img':resp.data.data.full_url,
'cardidb.err':!res2.data[1].caridB,
'cardidb.errmsg':res2.data[1].errmsg,
})
}
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传营业执照
if(e.currentTarget.dataset.type=='business_licence'){
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) {
let params = {};
params['id'] = that.data.id;
params['business_licence'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'business_licence.value':resp.data.data.url,
'business_licence.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
if(res2.code==418){
that.setData({
'business_licence.value':resp.data.data.url,
'business_licence.img':resp.data.data.full_url,
'business_licence.err':!res2.data[0].business_licence,
'business_licence.errmsg':res2.data[0].errmsg,
})
}
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传登记证
if(e.currentTarget.dataset.type=='register_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) {
let params = {};
params['id'] = that.data.id;
params['register_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'register_img.value':resp.data.data.url,
'register_img.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传行驶证
if(e.currentTarget.dataset.type=='car_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) {
let params = {};
params['id'] = that.data.id;
params['car_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'car_img.value':resp.data.data.url,
'car_img.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传保单
if(e.currentTarget.dataset.type=='ins_img'){
wx.chooseImage({
count: 10 - that.data.ins_img.length, //
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success(res1) {
wx.showLoading({
title: '上传中',
})
let ins_img=that.data.ins_img
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
url:_.config.api.upImg,
filePath:res1.tempFilePaths[i],
name: 'img',
formData: {
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
let list = []
list.push({
value:imgdata.data.url,
img:imgdata.data.full_url,
})
ins_img=ins_img.concat(list)
if(k == res1.tempFilePaths.length){
let params = {};
params['id'] = that.data.id;
let img = []
ins_img.forEach(item => {
img.push(item.value)
})
params['ins_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
ins_img,
})
}).catch(res2=>{
wx.hideLoading();
});
}
}else{
wx.hideLoading();
}
},
})
}
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传交车合照
if(e.currentTarget.dataset.type=='other_img'){
wx.chooseImage({
count: 1, //
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success(res1) {
wx.showLoading({
title: '上传中',
})
let other_img=that.data.other_img
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
url:_.config.api.upImg,
filePath:res1.tempFilePaths[i],
name: 'img',
formData: {
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
let list = []
list.push({
value:imgdata.data.url,
img:imgdata.data.full_url,
})
other_img=other_img.concat(list)
if(k == res1.tempFilePaths.length){
let params = {};
params['id'] = that.data.id;
let img = []
other_img.forEach(item => {
img.push(item.value)
})
params['other_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
other_img,
})
}).catch(res2=>{
wx.hideLoading();
});
}
}else{
wx.hideLoading();
}
},
})
}
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
},
// 编辑页面删除图片
delImg(e){
if(e.currentTarget.dataset.type=='ins_img'){
let ins_img = this.data.ins_img
ins_img.splice(e.currentTarget.dataset.index, 1)
let params = {};
params['id'] = this.data.id;
let img = []
ins_img.forEach(item => {
img.push(item.value)
})
params['ins_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res => {
this.setData({
ins_img,
})
})
}else if(e.currentTarget.dataset.type=='other_img'){
let other_img = this.data.other_img
other_img.splice(e.currentTarget.dataset.index, 1)
let params = {};
params['id'] = this.data.id;
let img = []
other_img.forEach(item => {
img.push(item.value)
})
params['other_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res => {
this.setData({
other_img,
})
})
}
},
//查看图片
previewImage: function (e) {
if(e.currentTarget.dataset.type=='business_licence'){
wx.previewImage({
current:this.data.imgInfo.imgs.business_licence.img,
urls:[this.data.imgInfo.imgs.business_licence.img],
})
}
},
})
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "营业执照信息",
"usingComponents": {}
}
@@ -0,0 +1,28 @@
<view class="container">
<view class="inner30">
<!-- <view class="mt40 font-32">营业执照</view> -->
<view class="mt30 text-center">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden">
<block wx:if="{{business_licence.value}}">
<view class="inline-block bg-f8 img-300x200 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-4" bindtap="chooseImg" data-type="business_licence"></i>
<view class="absolute top-0 left-0 bottom-0 right-0 bg-f00-op50 z-index-3" wx:if="{{business_licence.err}}">
<view class="absolute left-0 right-0 box-middle pl20 pr20 text-break font-22 color-fff"><i class="iconfont icon-jinggao"></i>{{business_licence.errmsg}}</view>
</view>
<image class='block wp100 img-h-200 ulib-r10' src='{{business_licence.img}}' mode='aspectFit' bindtap="previewImage" data-type="business_licence"></image>
</view>
</block>
<block wx:else>
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="business_licence">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-fanmian font-60"></i>
<view class="mt10 font-22">上传营业执照</view>
</view>
</view>
</block>
</view>
</view>
</view>
</view>
@@ -0,0 +1 @@
/* pages/order/editBusinessBicence/index.wxss */
+524
View File
@@ -0,0 +1,524 @@
import _ from '../../../commons/js/commons'
const app = getApp()
Page({
data: {
cardida:{},//身份证正面照片
cardidb:{},//身份证反面照片
business_licence:{},//营业执照照片
car_img:{},//行驶证照片
register_img:{},//登记证照片
ins_img:[],//保险照片
other_img:[],//交车合照
},
onLoad: function (options) {
for (let key in options) {
this.setData({
[key]: options[key]
})
}
this.getAppCusorderdata()
},
onShow: function () {
},
//获取订单图片
getAppCusorderdata(){
let params = {};
params['id'] = this.data.id;
_.apiQuery.getAppCusorderdata(params).then(res=>{
this.setData({
imgInfo:res.data,
})
if(res.data.img_status == 1){
this.setData({
cardida:res.data.imgs.cardida.length==0?{}:res.data.imgs.cardida,
cardidb:res.data.imgs.cardidb.length==0?{}:res.data.imgs.cardidb,
business_licence:res.data.imgs.business_licence.length==0?{}:res.data.imgs.business_licence,
car_img:res.data.imgs.car_img.length==0?{}:res.data.imgs.car_img,
register_img:res.data.imgs.register_img.length==0?{}:res.data.imgs.register_img,
ins_img:res.data.imgs.ins_img.length==0?[]:res.data.imgs.ins_img,
other_img:res.data.imgs.other_img.length==0?[]:res.data.imgs.other_img,
})
}
wx.stopPullDownRefresh()
})
},
//选择图片
chooseImg(e) {
let that = this
//上传身份证正面
if(e.currentTarget.dataset.type=='cardida'){
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) {
let params = {};
params['id'] = that.data.id;
params['cardida'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'cardida.value':resp.data.data.url,
'cardida.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
if(res2.code==418){
that.setData({
'cardida.value':resp.data.data.url,
'cardida.img':resp.data.data.full_url,
'cardida.err':!res2.data[0].caridA,
'cardida.errmsg':res2.data[0].errmsg,
})
}
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传身份证背面
if(e.currentTarget.dataset.type=='cardidb'){
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) {
let params = {};
params['id'] = that.data.id;
params['cardidb'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'cardidb.value':resp.data.data.url,
'cardidb.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
if(res2.code==418){
that.setData({
'cardidb.value':resp.data.data.url,
'cardidb.img':resp.data.data.full_url,
'cardidb.err':!res2.data[1].caridB,
'cardidb.errmsg':res2.data[1].errmsg,
})
}
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传营业执照
if(e.currentTarget.dataset.type=='business_licence'){
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) {
let params = {};
params['id'] = that.data.id;
params['business_licence'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'business_licence.value':resp.data.data.url,
'business_licence.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
if(res2.code==418){
that.setData({
'business_licence.value':resp.data.data.url,
'business_licence.img':resp.data.data.full_url,
'business_licence.err':!res2.data[0].business_licence,
'business_licence.errmsg':res2.data[0].errmsg,
})
}
});
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传登记证
if(e.currentTarget.dataset.type=='register_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) {
let params = {};
params['id'] = that.data.id;
params['register_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'register_img.value':resp.data.data.url,
'register_img.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传行驶证
if(e.currentTarget.dataset.type=='car_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) {
let params = {};
params['id'] = that.data.id;
params['car_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'car_img.value':resp.data.data.url,
'car_img.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传保单
if(e.currentTarget.dataset.type=='ins_img'){
wx.chooseImage({
count: 10 - that.data.ins_img.length, //
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success(res1) {
wx.showLoading({
title: '上传中',
})
let ins_img=that.data.ins_img
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
url:_.config.api.upImg,
filePath:res1.tempFilePaths[i],
name: 'img',
formData: {
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
let list = []
list.push({
value:imgdata.data.url,
img:imgdata.data.full_url,
})
ins_img=ins_img.concat(list)
if(k == res1.tempFilePaths.length){
let params = {};
params['id'] = that.data.id;
let img = []
ins_img.forEach(item => {
img.push(item.value)
})
params['ins_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
ins_img,
})
}).catch(res2=>{
wx.hideLoading();
});
}
}else{
wx.hideLoading();
}
},
})
}
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传交车合照
if(e.currentTarget.dataset.type=='other_img'){
wx.chooseImage({
count: 1, //
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success(res1) {
wx.showLoading({
title: '上传中',
})
let other_img=that.data.other_img
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
url:_.config.api.upImg,
filePath:res1.tempFilePaths[i],
name: 'img',
formData: {
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
let list = []
list.push({
value:imgdata.data.url,
img:imgdata.data.full_url,
})
other_img=other_img.concat(list)
if(k == res1.tempFilePaths.length){
let params = {};
params['id'] = that.data.id;
let img = []
other_img.forEach(item => {
img.push(item.value)
})
params['other_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
other_img,
})
}).catch(res2=>{
wx.hideLoading();
});
}
}else{
wx.hideLoading();
}
},
})
}
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
},
// 编辑页面删除图片
delImg(e){
if(e.currentTarget.dataset.type=='ins_img'){
let ins_img = this.data.ins_img
ins_img.splice(e.currentTarget.dataset.index, 1)
let params = {};
params['id'] = this.data.id;
let img = []
ins_img.forEach(item => {
img.push(item.value)
})
params['ins_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res => {
this.setData({
ins_img,
})
})
}else if(e.currentTarget.dataset.type=='other_img'){
let other_img = this.data.other_img
other_img.splice(e.currentTarget.dataset.index, 1)
let params = {};
params['id'] = this.data.id;
let img = []
other_img.forEach(item => {
img.push(item.value)
})
params['other_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res => {
this.setData({
other_img,
})
})
}
},
//查看图片
previewImage: function (e) {
if(e.currentTarget.dataset.type=='cardida'){
wx.previewImage({
current:this.data.imgInfo.imgs.cardida.img,
urls:[this.data.imgInfo.imgs.cardida.img],
})
}
else if(e.currentTarget.dataset.type=='cardidb'){
wx.previewImage({
current:this.data.imgInfo.imgs.cardidb.img,
urls:[this.data.imgInfo.imgs.cardidb.img],
})
}
},
})
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "身份证信息",
"usingComponents": {}
}
+46
View File
@@ -0,0 +1,46 @@
<view class="container">
<view class="inner30">
<!-- <view class="mt40 font-32">身份证</view> -->
<view class="fn-flex mt30 text-center">
<view class="fn-flex-item relative mr10">
<block wx:if="{{cardida.value}}">
<view class="inline-block bg-f8 img-300x200 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-4" bindtap="chooseImg" data-type="cardida"></i>
<view class="absolute top-0 left-0 bottom-0 right-0 bg-f00-op50 z-index-3" wx:if="{{cardida.err}}">
<view class="absolute left-0 right-0 box-middle pl20 pr20 text-break font-22 color-fff"><i class="iconfont icon-jinggao"></i>{{cardida.errmsg}}</view>
</view>
<image class='block wp100 img-h-200 ulib-r10' src='{{cardida.img}}' mode='aspectFit' bindtap="previewImage" data-type="cardida"></image>
</view>
</block>
<block wx:else>
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="cardida">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-zhengmian font-60"></i>
<view class="mt10 font-22">上传身份证正面</view>
</view>
</view>
</block>
</view>
<view class="fn-flex-item relative ml10">
<block wx:if="{{cardidb.value}}">
<view class="inline-block bg-f8 img-300x200 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-4" bindtap="chooseImg" data-type="cardidb"></i>
<view class="absolute top-0 left-0 bottom-0 right-0 bg-f00-op50 z-index-3" wx:if="{{cardidb.err}}">
<view class="absolute left-0 right-0 box-middle pl20 pr20 text-break font-22 color-fff"><i class="iconfont icon-jinggao"></i>{{cardidb.errmsg}}</view>
</view>
<image class='block wp100 img-h-200 ulib-r10' src='{{cardidb.img}}' mode='aspectFit' bindtap="previewImage" data-type="cardidb"></image>
</view>
</block>
<block wx:else>
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="cardidb">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-fanmian font-60"></i>
<view class="mt10 font-22">上传身份证背面</view>
</view>
</view>
</block>
</view>
</view>
</view>
</view>
+1
View File
@@ -0,0 +1 @@
/* pages/order/editCardid/index.wxss */
+106
View File
@@ -0,0 +1,106 @@
import _ from '../../../commons/js/commons'
const app = getApp()
Page({
data: {
delivery_ck_img:{},//交付确认单
},
onLoad: function (options) {
for (let key in options) {
this.setData({
[key]: options[key]
})
}
this.getAppCusorderdata()
},
onShow: function () {
},
//获取订单图片
getAppCusorderdata(){
let params = {};
params['id'] = this.data.id;
_.apiQuery.getAppCusorderdata(params).then(res=>{
this.setData({
imgInfo:res.data,
})
if(res.data.img_status == 1){
this.setData({
delivery_ck_img:res.data.imgs.delivery_ck_img.length==0?{}:res.data.imgs.delivery_ck_img,
})
}
wx.stopPullDownRefresh()
})
},
//选择图片
chooseImg(e) {
let that = this
//上传登记证
if(e.currentTarget.dataset.type=='delivery_ck_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) {
let params = {};
params['id'] = that.data.id;
params['delivery_ck_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'delivery_ck_img.value':resp.data.data.url,
'delivery_ck_img.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
},
//查看图片
previewImage: function (e) {
if(e.currentTarget.dataset.type=='delivery_ck_img'){
wx.previewImage({
current:this.data.imgInfo.imgs.delivery_ck_img.img,
urls:[this.data.imgInfo.imgs.delivery_ck_img.img],
})
}
},
})
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "交付确认单信息",
"usingComponents": {}
}
+10
View File
@@ -0,0 +1,10 @@
<view class="container">
<view class="inner30">
<block wx:if="{{delivery_ck_img.img}}">
<image class='block wp100' src='{{delivery_ck_img.img}}' mode='widthFix' bindtap="previewImage" data-type="delivery_ck_img"></image>
</block>
<block wx:else>
<lcb-listmore isNoData='{{true}}'></lcb-listmore>
</block>
</view>
</view>
+1
View File
@@ -0,0 +1 @@
/* pages/order/editDeliveryckimg/index.wxss */
+124 -31
View File
@@ -14,6 +14,8 @@ Page({
nums:[],//金融分期期数列表
numIndex:-1,//分期期数索引
num:'',//分期期数
notify_file_obj:[],
},
onLoad: function (options) {
@@ -133,33 +135,53 @@ Page({
//上传按揭通知函
chooseImg(e) {
let that = this
//上传保单
if(e.currentTarget.dataset.type=='notify'){
wx.chooseImage({
count: 1, // 默认9
count: 10 - that.data.notify_file_obj.length, //
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success(res) {
success(res1) {
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);
wx.hideLoading();
if (resp.data.code == 200) {
that.setData({
'notify_file_obj.value':resp.data.data.url,
'notify_file_obj.src':resp.data.data.full_url,
})
}
},
})
let notify_file_obj=that.data.notify_file_obj
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
url:_.config.api.upImg,
filePath:res1.tempFilePaths[i],
name: 'img',
formData: {
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
let list = []
list.push({
value:imgdata.data.url,
src:imgdata.data.full_url,
})
notify_file_obj=notify_file_obj.concat(list)
if(k == res1.tempFilePaths.length){
wx.hideLoading();
that.setData({
notify_file_obj,
})
}
}else{
wx.hideLoading();
}
},
})
}
},
fail: res => {
wx.showToast({
@@ -170,6 +192,45 @@ Page({
}
})
}
// if(e.currentTarget.dataset.type=='notify'){
// 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);
// wx.hideLoading();
// if (resp.data.code == 200) {
// that.setData({
// 'notify_file_obj.value':resp.data.data.url,
// 'notify_file_obj.src':resp.data.data.full_url,
// })
// }
// },
// })
// },
// fail: res => {
// wx.showToast({
// title: '文件选择失败',
// icon: 'none',
// duration: 2000
// })
// }
// })
// }
if(e.currentTarget.dataset.type=='lend'){
wx.chooseImage({
count: 1, // 默认9
@@ -223,7 +284,7 @@ Page({
icon: 'none'
})
}
else if(!this.data.notify_file_obj.src){
else if(!this.data.notify_file_obj.length>0){
wx.showToast({
title: '请上传按揭通知函',
icon: 'none'
@@ -235,6 +296,11 @@ Page({
isShowConfirm:true,
})
}else{
let notify_file = []
this.data.notify_file_obj.forEach(item => {
notify_file.push(item.value)
})
let that = this
that.setData({
submitFlag: true,
@@ -242,7 +308,7 @@ Page({
let params = {};
params['o_id'] = that.data.id;
params['finance_id'] = that.data.finance_id;
params['notify_file'] = that.data.notify_file_obj.value;
params['notify_file'] = notify_file;
params['price_loan'] = that.data.price_loan;
if(that.data.lend_file_obj.value){
params['lend_file'] = that.data.lend_file_obj.value;
@@ -286,6 +352,10 @@ Page({
//修改贷款信息
putAppLoan2() {
let notify_file = []
this.data.notify_file_obj.forEach(item => {
notify_file.push(item.value)
})
let that = this
that.setData({
submitFlag: true,
@@ -293,7 +363,7 @@ Page({
let params = {};
params['o_id'] = that.data.id;
params['finance_id'] = that.data.finance_id;
params['notify_file'] = that.data.notify_file_obj.value;
params['notify_file'] = notify_file;
params['price_loan'] = that.data.price_loan;
if(that.data.lend_file_obj.value){
params['lend_file'] = that.data.lend_file_obj.value;
@@ -335,14 +405,6 @@ Page({
});
},
//查看图片
previewImage: function (e) {
wx.previewImage({
current:this.data.notify_file_obj.src,
urls:[this.data.notify_file_obj.src],
})
},
//获取金融分期期数
getAppFinanceNums(){
_.apiQuery.getAppFinanceNums().then(res => {
@@ -375,4 +437,35 @@ Page({
})
},
//查看图片
previewImage: function (e) {
if(e.currentTarget.dataset.type=='notify'){
let img = []
this.data.notify_file_obj.forEach(item => {
img.push(item.src)
})
wx.previewImage({
current:e.currentTarget.dataset.current,
urls:img,
})
}
else if(e.currentTarget.dataset.type=='lend'){
wx.previewImage({
current:this.data.lend_file_obj.src,
urls:[this.data.lend_file_obj.src],
})
}
},
// 编辑页面删除图片
delImg(e){
if(e.currentTarget.dataset.type=='notify'){
let notify_file_obj = this.data.notify_file_obj
notify_file_obj.splice(e.currentTarget.dataset.index, 1)
this.setData({
notify_file_obj,
})
}
},
})
+42 -16
View File
@@ -29,16 +29,34 @@
</view>
<view class="relative">
<view class="mt30 font-28">按揭通知函<text class="color-f9394d">*</text></view>
<view class="mt30 text-center">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="notify" >
<view class="mt30 pb30 text-center">
<scroll-view class="space-nowrap" scroll-x="true">
<block wx:for='{{notify_file_obj}}' wx:for-item='notify' wx:key='index'>
<view class="inline-block bg-f8 img-300x200 ml10 mr10 relative ulib-r10 overflowhidden">
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-guanbi1 inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="delImg" data-type="notify" data-index="{{index}}" ></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{notify.src}}' mode='aspectFit' bindtap="previewImage" data-type="notify" data-current="{{notify.src}}"></image>
</view>
</block>
<block wx:if="{{notify_file_obj.length<10}}">
<view class="inline-block bg-f8 img-300x200 ml10 mr10 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="notify">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt10 font-22">上传按揭通知函</view>
</view>
</view>
</block>
</scroll-view>
</view>
<!-- <view class="mt30 text-center">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden" >
<block wx:if="{{notify_file_obj.value}}">
<view class="inline-block bg-f8 img-300x200 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-4"></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{notify_file_obj.src}}' mode='aspectFit'></image>
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-shuaxin inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-4" bindtap="chooseImg" data-type="notify"></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{notify_file_obj.src}}' mode='aspectFit' bindtap="previewImage" data-type="notify"></image>
</view>
</block>
<block wx:else>
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden">
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="notify">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-fanmian font-60"></i>
<view class="mt10 font-22">上传按揭通知函</view>
@@ -46,7 +64,7 @@
</view>
</block>
</view>
</view>
</view> -->
</view>
</block>
<block wx:else>
@@ -60,29 +78,37 @@
</view>
<view class="relative">
<view class="mt30 font-28">按揭通知函</view>
<view class="mt30 text-center">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden" bindtap="previewImage">
<block wx:if="{{notify_file_obj.value}}">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden">
<image class='block wp100 img-h-200 ulib-r10' src='{{notify_file_obj.src}}' mode='aspectFit'></image>
<view class="mt30 pb30 text-center">
<scroll-view class="space-nowrap" scroll-x="true">
<block wx:for='{{notify_file_obj}}' wx:for-item='notify' wx:key='index'>
<view class="inline-block bg-f8 img-300x200 ml10 mr10 relative ulib-r10 overflowhidden">
<image class='block wp100 img-h-200 ulib-r10' src='{{notify.src}}' mode='aspectFit' bindtap="previewImage" data-type="notify" data-current="{{notify.src}}"></image>
</view>
</block>
</view>
<block wx:if="{{notify_file_obj.length==0}}">
<view class="inline-block bg-f8 img-300x200 ml10 mr10 relative ulib-r10 overflowhidden">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt10 font-22">没有上传按揭通知函</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
</block>
<view class="relative">
<view class="mt30 font-28">放款通知函</view>
<view class="mt30 text-center">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="lend">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden">
<block wx:if="{{lend_file_obj.value}}">
<view class="inline-block bg-f8 img-300x200 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-4"></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{lend_file_obj.src}}' mode='aspectFit'></image>
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-shuaxin inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-4" bindtap="chooseImg" data-type="lend"></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{lend_file_obj.src}}' mode='aspectFit' bindtap="previewImage" data-type="lend"></image>
</view>
</block>
<block wx:else>
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden">
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="lend">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-fanmian font-60"></i>
<view class="mt10 font-22">上传放款通知函</view>
+394
View File
@@ -0,0 +1,394 @@
import _ from '../../../commons/js/commons'
const app = getApp()
Page({
data: {
cardida:{},//身份证正面照片
cardidb:{},//身份证反面照片
business_licence:{},//营业执照照片
car_img:{},//行驶证照片
register_img:{},//登记证照片
other_img:[],//交车合照
insurance_img:{},//交强险
business_img:{},//商业险
ins_img:[],//其他保险照片
isEditInsurance:false,
isEditBusiness:false,
insurance_product:'',
insurance_date:'',
insurance_price:'',
business_product:'',
business_date:'',
business_price:'',
},
onLoad: function (options) {
for (let key in options) {
this.setData({
[key]: options[key]
})
}
this.getAppCusorderdata()
},
onShow: function () {
},
//获取订单图片
getAppCusorderdata(){
let params = {};
params['id'] = this.data.id;
_.apiQuery.getAppCusorderdata(params).then(res=>{
this.setData({
imgInfo:res.data,
})
if(res.data.img_status == 1){
this.setData({
ins_img:res.data.imgs.ins_img.length==0?[]:res.data.imgs.ins_img,
insurance_img:res.data.imgs.insurance_img.length==0?{}:res.data.imgs.insurance_img,
business_img:res.data.imgs.business_img.length==0?{}:res.data.imgs.business_img,
})
if(res.data.imgs.insurance_img.length!=0&&res.data.imgs.insurance_img.value){
this.setData({
insurance_product:res.data.imgs.insurance_img.product,
insurance_date:res.data.imgs.insurance_img.date,
insurance_price:res.data.imgs.insurance_img.price,
})
}
if(res.data.imgs.business_img.length!=0&&res.data.imgs.business_img.value){
this.setData({
business_product:res.data.imgs.business_img.product,
business_date:res.data.imgs.business_img.date,
business_price:res.data.imgs.business_img.price,
})
}
}
wx.stopPullDownRefresh()
})
},
//选择图片
chooseImg(e) {
let that = this
//上传交强险
if(e.currentTarget.dataset.type=='insurance_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) {
let params = {};
params['id'] = that.data.id;
params['insurance_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
isEditInsurance:false,
})
that.getAppCusorderdata()
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传商业险
if(e.currentTarget.dataset.type=='business_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) {
let params = {};
params['id'] = that.data.id;
params['business_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
isEditBusiness:false,
})
that.getAppCusorderdata()
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传其它保险
if(e.currentTarget.dataset.type=='ins_img'){
wx.chooseImage({
count: 10 - that.data.ins_img.length, //
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success(res1) {
wx.showLoading({
title: '上传中',
})
let ins_img=that.data.ins_img
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
url:_.config.api.upImg,
filePath:res1.tempFilePaths[i],
name: 'img',
formData: {
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
let list = []
list.push({
value:imgdata.data.url,
img:imgdata.data.full_url,
})
ins_img=ins_img.concat(list)
if(k == res1.tempFilePaths.length){
let params = {};
params['id'] = that.data.id;
let img = []
ins_img.forEach(item => {
img.push(item.value)
})
params['ins_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.getAppCusorderdata()
}).catch(res2=>{
wx.hideLoading();
});
}
}else{
wx.hideLoading();
}
},
})
}
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
},
// 编辑页面删除图片
delImg(e){
if(e.currentTarget.dataset.type=='ins_img'){
let ins_img = this.data.ins_img
ins_img.splice(e.currentTarget.dataset.index, 1)
let params = {};
params['id'] = this.data.id;
let img = []
ins_img.forEach(item => {
img.push(item.value)
})
params['ins_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res => {
this.setData({
ins_img,
})
})
}else if(e.currentTarget.dataset.type=='other_img'){
let other_img = this.data.other_img
other_img.splice(e.currentTarget.dataset.index, 1)
let params = {};
params['id'] = this.data.id;
let img = []
other_img.forEach(item => {
img.push(item.value)
})
params['other_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res => {
this.setData({
other_img,
})
})
}
},
//显示隐藏交强险
optEditInsurance(){
this.setData({
isEditInsurance:!this.data.isEditInsurance,
})
},
//显示隐藏商业险
optEditBusiness(){
this.setData({
isEditBusiness:!this.data.isEditBusiness,
})
},
//输入
inputTx(e) {
this.setData({
[e.currentTarget.dataset.key]: e.detail.value
})
},
//购买时间
selectDate(e){
if(e.currentTarget.dataset.type=='insurance'){
this.setData({
insurance_date: e.detail.value,
})
}
else if(e.currentTarget.dataset.type=='business'){
this.setData({
business_date: e.detail.value,
})
}
},
//保单信息确认
putAppCusorderdataInfo(e){
let params = {};
params['id'] = this.data.id;
if(e.currentTarget.dataset.type=='insurance'){
params['type'] = 1;
params['product'] = this.data.insurance_product;
params['price'] = this.data.insurance_price;
params['date'] = this.data.insurance_date;
}
else if(e.currentTarget.dataset.type=='business'){
params['type'] = 0;
params['product'] = this.data.business_product;
params['price'] = this.data.business_price;
params['date'] = this.data.business_date;
}
_.apiQuery.putAppCusorderdataInfo(params).then(res => {
wx.showToast({
title: '编辑成功',
icon: 'success'
})
if(e.currentTarget.dataset.type=='insurance'){
this.setData({
isEditInsurance:false,
})
}
else if(e.currentTarget.dataset.type=='business'){
this.setData({
isEditBusiness:false,
})
}
this.getAppCusorderdata()
});
},
//查看图片
previewImage: function (e) {
if(e.currentTarget.dataset.type=='insurance_img'){
wx.previewImage({
current:this.data.imgInfo.imgs.insurance_img.img,
urls:[this.data.imgInfo.imgs.insurance_img.img],
})
}
else if(e.currentTarget.dataset.type=='business_img'){
wx.previewImage({
current:this.data.imgInfo.imgs.business_img.img,
urls:[this.data.imgInfo.imgs.business_img.img],
})
}
else if(e.currentTarget.dataset.type=='ins_img'){
let img = []
this.data.imgInfo.imgs.ins_img.forEach(item => {
img.push(item.img)
})
wx.previewImage({
current:e.currentTarget.dataset.current,
urls:img,
})
}
},
})
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "保险单信息",
"usingComponents": {}
}
+155
View File
@@ -0,0 +1,155 @@
<view class="container">
<view class="inner30">
<view class="pl40 pr40 pt40 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
<view class="font-28 text-center text-bold">交强险</view>
<view class="mt30 pb30 text-center">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden">
<block wx:if="{{insurance_img.value}}">
<view class="inline-block bg-f8 img-300x200 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="insurance_img"></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{insurance_img.img}}' mode='aspectFit' bindtap="previewImage" data-type="insurance_img"></image>
</view>
</block>
<block wx:else>
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="insurance_img">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt10 font-22">上传交强险</view>
</view>
</view>
</block>
</view>
</view>
<view class="relative bg-f8 mb40 inner40 ulib-r10 overflowhidden font-28" wx:if="{{insurance_img.value&&!isEditInsurance}}">
<view class="sellout-tip font-24" bindtap="optEditInsurance">修改</view>
<view class="relative font-28">
保险公司:{{insurance_img.product}}
</view>
<view class="mt20 relative font-28">
生效日期:{{insurance_img.date}}
</view>
<view class="mt20 relative font-28">
保险金额:{{insurance_img.price}}元
</view>
</view>
<view wx:elif="{{insurance_img.value}}">
<view class="relative bbs-1-eb last-b-none pl140 font-28">
<view class="absolute left-0 box-middle">保险公司</view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入保险公司" bindinput='inputTx' data-key="insurance_product" name='insurance_product' value='{{insurance_product}}' always-embed='{{true}}' />
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">生效日期</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker mode="date" value="{{insurance_date}}" bindchange="selectDate" data-type="insurance">
<text class="color-ccc" wx:if="{{insurance_date == ''}}">请选择</text>
<text wx:else>{{insurance_date}}</text>
<i class="iconfont ml10 icon-gengduo"></i>
</picker>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl140 pr40 font-28">
<view class="absolute left-0 box-middle">保险金额</view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="digit" placeholder="请输入保险金额" bindinput='inputTx' data-key="insurance_price" name='insurance_price' value='{{insurance_price}}' always-embed='{{true}}' />
</view>
<view class="absolute right-0 box-middle">元</view>
</view>
<view class="relative bbs-1-eb last-b-none pt30 pb30 text-center font-28">
<button class="inline-block text-middle font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover" bindtap="putAppCusorderdataInfo" data-type="insurance">确定修改</button>
</view>
</view>
</view>
<view class="mt50 pl40 pr40 pt40 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
<view class="font-28 text-center text-bold">商业险</view>
<view class="mt30 pb30 text-center">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden">
<block wx:if="{{business_img.value}}">
<view class="inline-block bg-f8 img-300x200 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="business_img"></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{business_img.img}}' mode='aspectFit' bindtap="previewImage" data-type="business_img"></image>
</view>
</block>
<block wx:else>
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="business_img">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt10 font-22">上传商业险</view>
</view>
</view>
</block>
</view>
</view>
<view class="relative bg-f8 mb40 inner40 ulib-r10 overflowhidden font-28" wx:if="{{business_img.value&&!isEditBusiness}}">
<view class="sellout-tip font-24" bindtap="optEditBusiness">修改</view>
<view class="relative font-28">
保险公司:{{business_img.product}}
</view>
<view class="mt20 relative font-28">
生效日期:{{business_img.date}}
</view>
<view class="mt20 relative font-28">
保险金额:{{business_img.price}}元
</view>
</view>
<view wx:elif="{{business_img.value}}">
<view class="relative bbs-1-eb last-b-none pl140 font-28">
<view class="absolute left-0 box-middle">保险公司</view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入保险公司" bindinput='inputTx' data-key="business_product" name='business_product' value='{{business_product}}' always-embed='{{true}}' />
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">生效日期</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker mode="date" value="{{business_date}}" bindchange="selectDate" data-type="business">
<text class="color-ccc" wx:if="{{business_date == ''}}">请选择</text>
<text wx:else>{{business_date}}</text>
<i class="iconfont ml10 icon-gengduo"></i>
</picker>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl140 pr40 font-28">
<view class="absolute left-0 box-middle">保险金额</view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="digit" placeholder="请输入保险金额" bindinput='inputTx' data-key="business_price" name='business_price' value='{{business_price}}' always-embed='{{true}}' />
</view>
<view class="absolute right-0 box-middle">元</view>
</view>
<view class="relative bbs-1-eb last-b-none pt30 pb30 text-center font-28">
<button class="inline-block text-middle font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover" bindtap="putAppCusorderdataInfo" data-type="business">确定修改</button>
</view>
</view>
</view>
<view class="mt50 pt40 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
<view class="font-28 text-center text-bold">其他保险</view>
<view class="mt30 pb30 text-center">
<scroll-view class="space-nowrap" scroll-x="true">
<block wx:for='{{ins_img}}' wx:for-item='ins_img' wx:key='index'>
<view class="inline-block bg-f8 img-300x200 ml10 mr10 relative ulib-r10 overflowhidden">
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-guanbi1 inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="delImg" data-type="ins_img" data-index="{{index}}" ></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{ins_img.img}}' mode='aspectFit' bindtap="previewImage" data-type="ins_img" data-current="{{ins_img.img}}"></image>
</view>
</block>
<block wx:if="{{ins_img.length<10}}">
<view class="inline-block bg-f8 img-300x200 ml10 mr10 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="ins_img">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt10 font-22">上传其它保险</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
</view>
</view>
+12
View File
@@ -0,0 +1,12 @@
.sellout-tip{
position:absolute;
top:-28rpx;
right:-78rpx;
width:200rpx;
height:50rpx;
padding:50rpx 0 0 0;
background-color:#36afa2;
color:#fff;
text-align: center;
transform:rotate(45deg);
}
+530
View File
@@ -0,0 +1,530 @@
import _ from '../../../commons/js/commons'
const app = getApp()
Page({
data: {
cardida:{},//身份证正面照片
cardidb:{},//身份证反面照片
business_licence:{},//营业执照照片
car_img:{},//行驶证照片
register_img:{},//登记证照片
ins_img:[],//保险照片
other_img:[],//交车合照
},
onLoad: function (options) {
for (let key in options) {
this.setData({
[key]: options[key]
})
}
this.getAppCusorderdata()
},
onShow: function () {
},
//获取订单图片
getAppCusorderdata(){
let params = {};
params['id'] = this.data.id;
_.apiQuery.getAppCusorderdata(params).then(res=>{
this.setData({
imgInfo:res.data,
})
if(res.data.img_status == 1){
this.setData({
cardida:res.data.imgs.cardida.length==0?{}:res.data.imgs.cardida,
cardidb:res.data.imgs.cardidb.length==0?{}:res.data.imgs.cardidb,
business_licence:res.data.imgs.business_licence.length==0?{}:res.data.imgs.business_licence,
car_img:res.data.imgs.car_img.length==0?{}:res.data.imgs.car_img,
register_img:res.data.imgs.register_img.length==0?{}:res.data.imgs.register_img,
ins_img:res.data.imgs.ins_img.length==0?[]:res.data.imgs.ins_img,
other_img:res.data.imgs.other_img.length==0?[]:res.data.imgs.other_img,
})
}
wx.stopPullDownRefresh()
})
},
//选择图片
chooseImg(e) {
let that = this
//上传身份证正面
if(e.currentTarget.dataset.type=='cardida'){
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) {
let params = {};
params['id'] = that.data.id;
params['cardida'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'cardida.value':resp.data.data.url,
'cardida.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
if(res2.code==418){
that.setData({
'cardida.value':resp.data.data.url,
'cardida.img':resp.data.data.full_url,
'cardida.err':!res2.data[0].caridA,
'cardida.errmsg':res2.data[0].errmsg,
})
}
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传身份证背面
if(e.currentTarget.dataset.type=='cardidb'){
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) {
let params = {};
params['id'] = that.data.id;
params['cardidb'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'cardidb.value':resp.data.data.url,
'cardidb.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
if(res2.code==418){
that.setData({
'cardidb.value':resp.data.data.url,
'cardidb.img':resp.data.data.full_url,
'cardidb.err':!res2.data[1].caridB,
'cardidb.errmsg':res2.data[1].errmsg,
})
}
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传营业执照
if(e.currentTarget.dataset.type=='business_licence'){
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) {
let params = {};
params['id'] = that.data.id;
params['business_licence'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'business_licence.value':resp.data.data.url,
'business_licence.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
if(res2.code==418){
that.setData({
'business_licence.value':resp.data.data.url,
'business_licence.img':resp.data.data.full_url,
'business_licence.err':!res2.data[0].business_licence,
'business_licence.errmsg':res2.data[0].errmsg,
})
}
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传登记证
if(e.currentTarget.dataset.type=='register_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) {
let params = {};
params['id'] = that.data.id;
params['register_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'register_img.value':resp.data.data.url,
'register_img.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传行驶证
if(e.currentTarget.dataset.type=='car_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) {
let params = {};
params['id'] = that.data.id;
params['car_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'car_img.value':resp.data.data.url,
'car_img.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传保单
if(e.currentTarget.dataset.type=='ins_img'){
wx.chooseImage({
count: 10 - that.data.ins_img.length, //
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success(res1) {
wx.showLoading({
title: '上传中',
})
let ins_img=that.data.ins_img
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
url:_.config.api.upImg,
filePath:res1.tempFilePaths[i],
name: 'img',
formData: {
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
let list = []
list.push({
value:imgdata.data.url,
img:imgdata.data.full_url,
})
ins_img=ins_img.concat(list)
if(k == res1.tempFilePaths.length){
let params = {};
params['id'] = that.data.id;
let img = []
ins_img.forEach(item => {
img.push(item.value)
})
params['ins_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
ins_img,
})
}).catch(res2=>{
wx.hideLoading();
});
}
}else{
wx.hideLoading();
}
},
})
}
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传交车合照
if(e.currentTarget.dataset.type=='other_img'){
wx.chooseImage({
count: 1, //
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success(res1) {
wx.showLoading({
title: '上传中',
})
let other_img=that.data.other_img
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
url:_.config.api.upImg,
filePath:res1.tempFilePaths[i],
name: 'img',
formData: {
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
let list = []
list.push({
value:imgdata.data.url,
img:imgdata.data.full_url,
})
other_img=other_img.concat(list)
if(k == res1.tempFilePaths.length){
let params = {};
params['id'] = that.data.id;
let img = []
other_img.forEach(item => {
img.push(item.value)
})
params['other_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
other_img,
})
}).catch(res2=>{
wx.hideLoading();
});
}
}else{
wx.hideLoading();
}
},
})
}
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
},
// 编辑页面删除图片
delImg(e){
if(e.currentTarget.dataset.type=='ins_img'){
let ins_img = this.data.ins_img
ins_img.splice(e.currentTarget.dataset.index, 1)
let params = {};
params['id'] = this.data.id;
let img = []
ins_img.forEach(item => {
img.push(item.value)
})
params['ins_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res => {
this.setData({
ins_img,
})
})
}else if(e.currentTarget.dataset.type=='other_img'){
let other_img = this.data.other_img
other_img.splice(e.currentTarget.dataset.index, 1)
let params = {};
params['id'] = this.data.id;
let img = []
other_img.forEach(item => {
img.push(item.value)
})
params['other_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res => {
this.setData({
other_img,
})
})
}
},
//查看图片
previewImage: function (e) {
if(e.currentTarget.dataset.type=='register_img'){
wx.previewImage({
current:this.data.imgInfo.imgs.register_img.img,
urls:[this.data.imgInfo.imgs.register_img.img],
})
}
else if(e.currentTarget.dataset.type=='car_img'){
wx.previewImage({
current:this.data.imgInfo.imgs.car_img.img,
urls:[this.data.imgInfo.imgs.car_img.img],
})
}
},
})
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "车辆证件信息",
"usingComponents": {}
}
+41
View File
@@ -0,0 +1,41 @@
<view class="container">
<view class="inner30">
<!-- <view class="mt40 font-32">车辆证件</view> -->
<view class="fn-flex mt30 text-center">
<view class="fn-flex-item relative mr10">
<block wx:if="{{register_img.value}}">
<view class="inline-block bg-f8 img-300x200 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="register_img"></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{register_img.img}}' mode='aspectFit' bindtap="previewImage" data-type="register_img"></image>
</view>
</block>
<block wx:else>
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="register_img">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt10 font-22">上传登记证</view>
</view>
</view>
</block>
</view>
<view class="fn-flex-item relative ml10">
<block wx:if="{{car_img.value}}">
<view class="inline-block bg-f8 img-300x200 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="car_img"></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{car_img.img}}' mode='aspectFit' bindtap="previewImage" data-type="car_img"></image>
</view>
</block>
<block wx:else>
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="car_img">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt10 font-22">上传行驶证</view>
</view>
</view>
</block>
</view>
</view>
</view>
</view>
+1
View File
@@ -0,0 +1 @@
/* pages/order/editLicenseImg/index.wxss */
+528
View File
@@ -0,0 +1,528 @@
import _ from '../../../commons/js/commons'
const app = getApp()
Page({
data: {
cardida:{},//身份证正面照片
cardidb:{},//身份证反面照片
business_licence:{},//营业执照照片
car_img:{},//行驶证照片
register_img:{},//登记证照片
ins_img:[],//保险照片
other_img:[],//交车合照
},
onLoad: function (options) {
for (let key in options) {
this.setData({
[key]: options[key]
})
}
this.getAppCusorderdata()
},
onShow: function () {
},
//获取订单图片
getAppCusorderdata(){
let params = {};
params['id'] = this.data.id;
_.apiQuery.getAppCusorderdata(params).then(res=>{
this.setData({
imgInfo:res.data,
})
if(res.data.img_status == 1){
this.setData({
cardida:res.data.imgs.cardida.length==0?{}:res.data.imgs.cardida,
cardidb:res.data.imgs.cardidb.length==0?{}:res.data.imgs.cardidb,
business_licence:res.data.imgs.business_licence.length==0?{}:res.data.imgs.business_licence,
car_img:res.data.imgs.car_img.length==0?{}:res.data.imgs.car_img,
register_img:res.data.imgs.register_img.length==0?{}:res.data.imgs.register_img,
ins_img:res.data.imgs.ins_img.length==0?[]:res.data.imgs.ins_img,
other_img:res.data.imgs.other_img.length==0?[]:res.data.imgs.other_img,
})
}
wx.stopPullDownRefresh()
})
},
//选择图片
chooseImg(e) {
let that = this
//上传身份证正面
if(e.currentTarget.dataset.type=='cardida'){
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) {
let params = {};
params['id'] = that.data.id;
params['cardida'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'cardida.value':resp.data.data.url,
'cardida.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
if(res2.code==418){
that.setData({
'cardida.value':resp.data.data.url,
'cardida.img':resp.data.data.full_url,
'cardida.err':!res2.data[0].caridA,
'cardida.errmsg':res2.data[0].errmsg,
})
}
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传身份证背面
if(e.currentTarget.dataset.type=='cardidb'){
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) {
let params = {};
params['id'] = that.data.id;
params['cardidb'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'cardidb.value':resp.data.data.url,
'cardidb.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
if(res2.code==418){
that.setData({
'cardidb.value':resp.data.data.url,
'cardidb.img':resp.data.data.full_url,
'cardidb.err':!res2.data[1].caridB,
'cardidb.errmsg':res2.data[1].errmsg,
})
}
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传营业执照
if(e.currentTarget.dataset.type=='business_licence'){
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) {
let params = {};
params['id'] = that.data.id;
params['business_licence'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'business_licence.value':resp.data.data.url,
'business_licence.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
if(res2.code==418){
that.setData({
'business_licence.value':resp.data.data.url,
'business_licence.img':resp.data.data.full_url,
'business_licence.err':!res2.data[0].business_licence,
'business_licence.errmsg':res2.data[0].errmsg,
})
}
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传登记证
if(e.currentTarget.dataset.type=='register_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) {
let params = {};
params['id'] = that.data.id;
params['register_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'register_img.value':resp.data.data.url,
'register_img.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传行驶证
if(e.currentTarget.dataset.type=='car_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) {
let params = {};
params['id'] = that.data.id;
params['car_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
'car_img.value':resp.data.data.url,
'car_img.img':resp.data.data.full_url,
})
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传保单
if(e.currentTarget.dataset.type=='ins_img'){
wx.chooseImage({
count: 10 - that.data.ins_img.length, //
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success(res1) {
wx.showLoading({
title: '上传中',
})
let ins_img=that.data.ins_img
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
url:_.config.api.upImg,
filePath:res1.tempFilePaths[i],
name: 'img',
formData: {
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
let list = []
list.push({
value:imgdata.data.url,
img:imgdata.data.full_url,
})
ins_img=ins_img.concat(list)
if(k == res1.tempFilePaths.length){
let params = {};
params['id'] = that.data.id;
let img = []
ins_img.forEach(item => {
img.push(item.value)
})
params['ins_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
ins_img,
})
}).catch(res2=>{
wx.hideLoading();
});
}
}else{
wx.hideLoading();
}
},
})
}
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传交车合照
if(e.currentTarget.dataset.type=='other_img'){
wx.chooseImage({
count: 1, //
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success(res1) {
wx.showLoading({
title: '上传中',
})
let other_img=that.data.other_img
let k = 0
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
url:_.config.api.upImg,
filePath:res1.tempFilePaths[i],
name: 'img',
formData: {
'app': 'liche'
},
success: (resp) => {
k = k + 1
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
let list = []
list.push({
value:imgdata.data.url,
img:imgdata.data.full_url,
})
other_img=other_img.concat(list)
if(k == res1.tempFilePaths.length){
let params = {};
params['id'] = that.data.id;
let img = []
other_img.forEach(item => {
img.push(item.value)
})
params['other_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.setData({
other_img,
})
}).catch(res2=>{
wx.hideLoading();
});
}
}else{
wx.hideLoading();
}
},
})
}
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
},
// 编辑页面删除图片
delImg(e){
if(e.currentTarget.dataset.type=='ins_img'){
let ins_img = this.data.ins_img
ins_img.splice(e.currentTarget.dataset.index, 1)
let params = {};
params['id'] = this.data.id;
let img = []
ins_img.forEach(item => {
img.push(item.value)
})
params['ins_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res => {
this.setData({
ins_img,
})
})
}else if(e.currentTarget.dataset.type=='other_img'){
let other_img = this.data.other_img
other_img.splice(e.currentTarget.dataset.index, 1)
let params = {};
params['id'] = this.data.id;
let img = []
other_img.forEach(item => {
img.push(item.value)
})
params['other_imgs'] = img;
_.apiQuery.putAppCusorderdata(params).then(res => {
this.setData({
other_img,
})
})
}
},
//查看图片
previewImage: function (e) {
if(e.currentTarget.dataset.type=='other_img'){
let img = []
this.data.imgInfo.imgs.other_img.forEach(item => {
img.push(item.img)
})
wx.previewImage({
current:e.currentTarget.dataset.current,
urls:img,
})
}
},
})
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "交车合照信息",
"usingComponents": {}
}
+25
View File
@@ -0,0 +1,25 @@
<view class="container">
<view class="inner30">
<!-- <view class="mt40 font-32">交车合照</view> -->
<view class="mt30 pb20 text-center">
<scroll-view class="space-nowrap" scroll-x="true">
<block wx:for='{{other_img}}' wx:for-item='other_img' wx:key='index'>
<view class="inline-block bg-f8 img-300x200 ml15 mr15 relative ulib-r10 overflowhidden">
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-guanbi1 inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="delImg" data-type="other_img" data-index="{{index}}" ></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{other_img.img}}' mode='aspectFit' bindtap="previewImage" data-type="other_img" data-current="{{other_img.img}}"></image>
</view>
</block>
<block wx:if="{{other_img.length<1}}">
<view class="inline-block bg-f8 img-300x200 ml15 mr15 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="other_img">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt10 font-22">上传合照</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
</view>
+1
View File
@@ -0,0 +1 @@
/* pages/order/editOtherImg/index.wxss */
+21
View File
@@ -269,10 +269,22 @@ Page({
owner_cardidpic:resp.data.data.url,
})
})
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
fail: res => {
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
})
},
@@ -287,4 +299,13 @@ Page({
}
},
//去除空格
trimAll(ele){
if(typeof ele === 'string'){
return ele.split(' ').join('');
}else{
console.error(`${typeof ele} is not the expected type, but the string type is expected`)
}
},
})
+162
View File
@@ -0,0 +1,162 @@
import _ from '../../../commons/js/commons'
const app = getApp()
Page({
data: {
wx_img:{},
mut_wx_img:{},
},
onLoad: function (options) {
for (let key in options) {
this.setData({
[key]: options[key]
})
}
this.getAppCusorderdata()
},
onShow: function () {
},
//获取订单图片
getAppCusorderdata(){
let params = {};
params['id'] = this.data.id;
_.apiQuery.getAppCusorderdata(params).then(res=>{
this.setData({
imgInfo:res.data,
})
if(res.data.img_status == 1){
this.setData({
wx_img:res.data.imgs.insurance_img.length==0?{}:res.data.imgs.wx_img,
mut_wx_img:res.data.imgs.insurance_img.length==0?{}:res.data.imgs.mut_wx_img,
})
}
wx.stopPullDownRefresh()
})
},
//选择图片
chooseImg(e) {
let that = this
//上传交强险
if(e.currentTarget.dataset.type=='wx_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) {
let params = {};
params['id'] = that.data.id;
params['wx_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.getAppCusorderdata()
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传商业险
if(e.currentTarget.dataset.type=='mut_wx_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) {
let params = {};
params['id'] = that.data.id;
params['mut_wx_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.getAppCusorderdata()
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
},
//查看图片
previewImage: function (e) {
if(e.currentTarget.dataset.type=='wx_img'){
wx.previewImage({
current:this.data.imgInfo.imgs.insurance_img.img,
urls:[this.data.imgInfo.imgs.insurance_img.img],
})
}
else if(e.currentTarget.dataset.type=='mut_wx_img'){
wx.previewImage({
current:this.data.imgInfo.imgs.mut_wx_img.img,
urls:[this.data.imgInfo.imgs.mut_wx_img.img],
})
}
},
})
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "企微信息",
"usingComponents": {}
}
+51
View File
@@ -0,0 +1,51 @@
<view class="container">
<view class="inner30">
<view class="pl40 pr40 pt40 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
<view class="font-28 text-center text-bold">企业微信</view>
<view class="mt30 pb30 text-center">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden">
<block wx:if="{{wx_img.value}}">
<view class="inline-block bg-f8 img-300x200 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="wx_img"></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{wx_img.img}}' mode='aspectFit' bindtap="previewImage" data-type="wx_img"></image>
</view>
</block>
<block wx:else>
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="wx_img">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt10 font-22">上传企业微信</view>
</view>
</view>
</block>
</view>
</view>
</view>
<view class="mt50 pl40 pr40 pt40 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
<view class="font-28 text-center text-bold">多对一群</view>
<view class="mt30 pb30 text-center">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden">
<block wx:if="{{mut_wx_img.value}}">
<view class="inline-block bg-f8 img-300x200 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="mut_wx_img"></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{mut_wx_img.img}}' mode='aspectFit' bindtap="previewImage" data-type="mut_wx_img"></image>
</view>
</block>
<block wx:else>
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="mut_wx_img">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt10 font-22">上传多对一群</view>
</view>
</view>
</block>
</view>
</view>
</view>
</view>
</view>
+1
View File
@@ -0,0 +1 @@
/* pages/order/editQVImg/index.wxss */
+103
View File
@@ -0,0 +1,103 @@
import _ from '../../../commons/js/commons'
const app = getApp()
Page({
data: {
destory_img:{},
},
onLoad: function (options) {
for (let key in options) {
this.setData({
[key]: options[key]
})
}
this.getAppCusorderdata()
},
onShow: function () {
},
//获取订单图片
getAppCusorderdata(){
let params = {};
params['id'] = this.data.id;
_.apiQuery.getAppCusorderdata(params).then(res=>{
this.setData({
imgInfo:res.data,
})
if(res.data.img_status == 1){
this.setData({
destory_img:res.data.imgs.destory_img.length==0?{}:res.data.imgs.destory_img,
})
}
wx.stopPullDownRefresh()
})
},
//选择图片
chooseImg(e) {
let that = this
//上传交强险
if(e.currentTarget.dataset.type=='destory_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) {
let params = {};
params['id'] = that.data.id;
params['destory_img'] = resp.data.data.url;
_.apiQuery.putAppCusorderdata(params).then(res2 => {
wx.hideLoading();
that.getAppCusorderdata()
}).catch(res2=>{
wx.hideLoading();
});
}else{
wx.hideLoading();
wx.showToast({
title: '上传失败',
icon: 'none',
duration: 2000
})
}
},
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
},
//查看图片
previewImage: function (e) {
if(e.currentTarget.dataset.type=='destory_img'){
wx.previewImage({
current:this.data.imgInfo.imgs.destory_img.img,
urls:[this.data.imgInfo.imgs.destory_img.img],
})
}
},
})
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "实名认证资料",
"usingComponents": {}
}
+24
View File
@@ -0,0 +1,24 @@
<view class="container">
<view class="inner30">
<view class="mt30 pb20 text-center">
<view class="inline-block img-300x200 relative ulib-r10 overflowhidden">
<block wx:if="{{destory_img.value}}">
<view class="inline-block bg-f8 img-300x200 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="destory_img"></i>
<image class='block wp100 img-h-200 ulib-r10' src='{{destory_img.img}}' mode='aspectFit' bindtap="previewImage" data-type="destory_img"></image>
</view>
</block>
<block wx:else>
<view class="inline-block bg-f8 img-300x200 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-type="destory_img">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt10 font-22">上传实名认证资料</view>
</view>
</view>
</block>
</view>
</view>
</view>
</view>
+1
View File
@@ -0,0 +1 @@
/* pages/order/editVoucherImg/index.wxss */
+140 -1
View File
@@ -14,6 +14,14 @@ Page({
content:'',//短信内容
isRefresh:false,//判断返回是否需要刷新
v2OrderId:_.config.v2OrderId,//订单id临界切换版本
staffArray: [],
staffobj: [],
employeeIndex:-1,//分配销售索引
employee_id:'',//分配销售ID
tab:[],//回访待跟进tab
visit_tab_id:'',//回访待跟进tabid
},
onLoad: function (options) {
for (let key in options) {
@@ -21,11 +29,38 @@ Page({
[key]: options[key]
})
}
this.getAppCusorderV2List()
//顶部tab
this.getAppCustomersVisit_tabs()
//this.getAppCusorderV2List()
wx.setNavigationBarTitle({
title: this.data.title||'订单'
})
//销售顾问
this.getAppUserAdmins()
},
//回访待跟进tab
getAppCustomersVisit_tabs() {
let params = {};
if(this.data.status != ''){
params['status'] = this.data.status;
}
_.apiQuery.getAppCustomersVisit_tabs(params).then(res => {
if(res.data.list.length>0){
this.setData({
tab:res.data.list,
visit_tab_id:res.data.list[0].id,
})
}
this.getAppCusorderV2List()
wx.stopPullDownRefresh()
});
},
//获取订单列表
@@ -43,6 +78,9 @@ Page({
if(this.data.type != ''){
params['type'] = this.data.type;
}
if(this.data.visit_tab_id != ''){
params['visit_tab_id'] = this.data.visit_tab_id;
}
_.apiQuery.getAppCusorderV2List(params).then(res => {
this.setData({
pageNo: this.data.pageNo + 1,
@@ -135,6 +173,107 @@ Page({
}
},
//获取销售顾问
getAppUserAdmins(){
let params = {};
params['page'] = 1;
params['size'] = 1000;
_.apiQuery.getAppUserAdmins(params).then(res => {
let staffArray = []
res.data.list.forEach(item => {
staffArray.push(item.uname)
})
let bizArray = []
res.data.bizs.forEach(item => {
bizArray.push(item.name)
})
this.setData({
staffArray:staffArray,
staffobj: res.data.list,
})
});
},
//显示分配订单
showTransfer(e) {
this.setData({
ids:[e.currentTarget.dataset.id],
isShowTransfer:true,
})
},
//显示隐藏分配订单
optTransfer(e) {
this.setData({
employee_id:'',
employeeIndex:-1,
isShowTransfer:!this.data.isShowTransfer,
})
},
//选择店员
changeEmployee(e) {
let employee_id = ''
if(e.detail.value >= 0){
employee_id = this.data.staffobj[e.detail.value].id
}
this.setData({
employee_id,
employeeIndex:e.detail.value,
})
},
//分配订单
putAppCusorderV2Admins(){
let that = this
if (that.data.employeeIndex == -1 ) {
wx.showToast({
title: '请选择销售顾问',
icon: 'none'
})
}
else{
that.setData({
submitFlag: true,
})
let params = {};
params['ids'] = that.data.ids;
params['admin_id'] = that.data.employee_id;
_.apiQuery.putAppCusorderV2Admins(params).then(res => {
wx.showToast({
title: '移交成功',
icon: 'success',
duration: 2000
})
that.setData({
isShowTransfer:false,
submitFlag:false,
})
that.onPullDownRefresh()
}).catch(res=>{
that.setData({
submitFlag: false,
})
});
}
},
//切换tab
changeTab(e){
this.setData({
list: [],
pageNo: 1,
noData: false,
end: false,
load: true,
loading: false,
visit_tab_id: e.currentTarget.dataset.id,
})
this.getAppCusorderV2List()
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh(){
this.setData({
+54 -3
View File
@@ -1,6 +1,26 @@
<view class="container">
<view class="mt30 pl30 pr30">
<view wx:if="{{tab.length>0}}">
<view style="padding-top:110rpx"></view>
<view class="fixed top-0 left-0 right-0 bg-fff pl30 pr30 z-index-1">
<view class="fn-flex mt5 pl20 pr20 font-32 color-666 text-center" wx:if="{{tab.length<5}}">
<block wx:for='{{tab}}' wx:key='list'>
<view class="fn-flex-item pl20 pr20 tabmenu2 {{visit_tab_id == item.id?'active color-36afa2':''}}" data-id="{{item.id}}" bindtap="changeTab">
<view class="relative">{{item.name}}</view>
</view>
</block>
</view>
<scroll-view class="mt5 font-32 color-666 text-center space-nowrap" scroll-x="true" wx:else>
<block wx:for='{{tab}}' wx:key='list'>
<view class="pl20 pr20 tabmenu2 {{visit_tab_id == item.id?'active color-36afa2':''}}" data-id="{{item.id}}" bindtap="changeTab" >
<view class="relative">{{item.name}}</view>
</view>
</block>
</scroll-view>
</view>
</view>
<view class="mt10 pl30 pr30">
<block wx:for='{{list}}' wx:key='index'>
<block wx:if="{{item.id>=v2OrderId}}">
@@ -26,7 +46,13 @@
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item="pin" wx:key='i'>
<view class="mt20 fn-clear font-28">
<view class="fn-fl color-333">{{key}}</view>
<view class="fn-fr wp60 text-nowrap text-right color-666">
<block wx:if="{{key=='销售顾问'}}">
<view class="fn-fr wp60 text-nowrap text-right">
<text class="text-middle color-666" wx:if="{{pin.value}}">{{pin.value}}</text>
<text class="inline-block ml10 bg-36afa2 pt5 pb5 pl15 pr15 text-middle font-22 color-fff ulib-r10" catchtap="showTransfer" data-id="{{item.id}}" wx:if="{{item.allot == 1}}">移交</text>
</view>
</block>
<view wx:else class="fn-fr wp60 text-nowrap text-right color-666">
<block wx:if="{{pin.type=='checkbox'}}">
<block wx:for="{{pin.lists}}" wx:for-index='key' wx:for-item="lable" wx:key='j'>
<view class="inline-block ml10 mr10"><i class="iconfont font-34 mr5 text-middle {{lable.selected?'icon-danxuan_xuanzhong color-36afa2':'icon-danxuan'}}" /><text class="text-middle">{{lable.value}}</text></view>
@@ -54,7 +80,13 @@
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
<view class="mt25 fn-clear font-28" wx:if="{{value}}">
<view class="fn-fl color-333">{{key}}</view>
<view class="fn-fr wp60 text-nowrap text-right color-666">{{value}}</view>
<block wx:if="{{key=='销售顾问'}}">
<view class="fn-fr wp60 text-nowrap text-right">
<text class="text-middle color-666" wx:if="{{value}}">{{value}}</text>
<text class="inline-block ml10 bg-36afa2 pt5 pb5 pl15 pr15 text-middle font-22 color-fff ulib-r10" catchtap="showTransfer" data-id="{{item.id}}" wx:if="{{item.allot == 1}}">移交</text>
</view>
</block>
<view wx:else class="fn-fr wp60 text-nowrap text-right color-666">{{value}}</view>
</view>
</block>
@@ -80,4 +112,23 @@
<button disabled="{{submitFlag}}" bindtap="postAppSmsCusorder" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定</button>
</view>
</view>
</lcb-msg>
<lcb-msg isShow="{{isShowTransfer}}">
<view slot="content">
<view class="inner30">
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">销售顾问</view>
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
<text wx:else>{{staffArray[employeeIndex]}}</text>
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
</picker>
</view>
</view>
<view class="fn-flex ml10 mr10 pl60 pr60 pb50 text-center font-32 color-666">
<button bindtap="optTransfer" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
<button disabled="{{submitFlag}}" bindtap="putAppCusorderV2Admins" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定</button>
</view>
</view>
</lcb-msg>
+249 -2
View File
@@ -23,6 +23,18 @@ Page({
type:'',
order_s_time:'',//开始时间
order_e_time:'',//结束时间
staffArray: [],
staffobj: [],
employeeIndex:-1,//分配销售索引
employee_id:'',//分配销售ID
brand_id:'',//品牌id
car_id:'',//车系id
v_id:'',//车辆版本id
brandIndex:-1,//车辆品牌索引
modelIndex:-1,//车系车型索引
levelIndex:-1,//车辆版本索引
},
onLoad: function (options) {
for (let key in options) {
@@ -31,9 +43,16 @@ Page({
})
}
this.getAppCusorderV2Tabs()
//销售顾问
this.getAppUserAdmins()
//品牌列表
this.getAppSeriesBrands()
},
//客户-tab
//订单-tab
getAppCusorderV2Tabs() {
_.apiQuery.getAppCusorderV2Tabs().then(res => {
this.setData({
@@ -72,6 +91,18 @@ Page({
load: false,
loading: true,
})
let admin_ids = ''
this.data.staffobj.forEach(item => {
if(item.checked){
if(admin_ids==''){
admin_ids=item.id
}else{
admin_ids=admin_ids+','+item.id
}
}
})
let params = {};
params['page'] = this.data.pageNo;
params['size'] = 10;
@@ -86,6 +117,18 @@ Page({
params['order_s_time'] = this.data.order_s_time;
params['order_e_time'] = this.data.order_e_time;
}
if(admin_ids!=''){
params['admin_ids'] = admin_ids;
}
if(this.data.brand_id!=''){
params['brand_id'] = this.data.brand_id;
}
if(this.data.car_id!=''){
params['car_id'] = this.data.car_id;
}
if(this.data.v_id!=''){
params['v_id'] = this.data.v_id;
}
_.apiQuery.getAppCusorderV2List(params).then(res => {
this.setData({
flag: this.data.flag - 1
@@ -170,7 +213,7 @@ Page({
}
},
//显示高级搜索
//显示隐藏高级搜索
optfilter(){
this.setData({
isShowfilter: !this.data.isShowfilter
@@ -178,6 +221,13 @@ Page({
this.resetFilter()
},
//显示高级搜索
showfilter(){
this.setData({
isShowfilter:true,
})
},
//确定高级搜索
submitFilter() {
this.setData({
@@ -188,7 +238,19 @@ Page({
//重置高级搜索
resetFilter() {
let staffobj = this.data.staffobj
staffobj.forEach(item => {
item.checked = false
})
this.setData({
brand_id:'',
car_id:'',
v_id:'',
brandIndex:-1,
modelIndex:-1,
levelIndex:-1,
staffobj,
type:'',
order_s_time:'',
order_e_time:'',
@@ -218,6 +280,191 @@ Page({
})
},
//获取销售顾问
getAppUserAdmins(){
let params = {};
params['page'] = 1;
params['size'] = 1000;
_.apiQuery.getAppUserAdmins(params).then(res => {
let staffArray = []
res.data.list.forEach(item => {
staffArray.push(item.uname)
})
let bizArray = []
res.data.bizs.forEach(item => {
bizArray.push(item.name)
})
this.setData({
staffArray:staffArray,
staffobj: res.data.list,
})
});
},
//显示分配订单
showTransfer(e) {
this.setData({
ids:[e.currentTarget.dataset.id],
isShowTransfer:true,
})
},
//显示隐藏分配订单
optTransfer(e) {
this.setData({
employee_id:'',
employeeIndex:-1,
isShowTransfer:!this.data.isShowTransfer,
})
},
//选择店员
changeEmployee(e) {
let employee_id = ''
if(e.detail.value >= 0){
employee_id = this.data.staffobj[e.detail.value].id
}
this.setData({
employee_id,
employeeIndex:e.detail.value,
})
},
//分配订单
putAppCusorderV2Admins(){
let that = this
if (that.data.employeeIndex == -1 ) {
wx.showToast({
title: '请选择销售顾问',
icon: 'none'
})
}
else{
that.setData({
submitFlag: true,
})
let params = {};
params['ids'] = that.data.ids;
params['admin_id'] = that.data.employee_id;
_.apiQuery.putAppCusorderV2Admins(params).then(res => {
wx.showToast({
title: '移交成功',
icon: 'success',
duration: 2000
})
that.setData({
isShowTransfer:false,
submitFlag:false,
})
that.onPullDownRefresh()
}).catch(res=>{
that.setData({
submitFlag: false,
})
});
}
},
//多选
checkPicker(e){
this.setData({
['staffobj['+e.currentTarget.dataset.index+'].checked']:!this.data.staffobj[e.currentTarget.dataset.index].checked,
})
},
//获取车型品牌
getAppSeriesBrands(){
_.apiQuery.getAppSeriesBrands().then(res => {
if(res.data.list.length>0){
let brandArray = []
res.data.list.forEach(item => {
brandArray.push(item.name)
})
this.setData({
brandArray:brandArray,
brandList:res.data.list,
})
}
});
},
//获取车系车型
getAppSeries(){
let params = {};
params['brand_id'] = this.data.brand_id;
_.apiQuery.getAppSeries(params).then(res => {
if(res.data.list.length>0){
let modelArray = []
res.data.list.forEach(item => {
modelArray.push(item.name)
})
this.setData({
modelArray:modelArray,
modelList:res.data.list,
})
}
});
},
//获取车辆版本
getAppSeriesAttrslevel(){
let params = {};
params['id'] = this.data.car_id;
params['type'] = 0;
_.apiQuery.getAppSeriesAttrs(params).then(res => {
if(res.data.total>0){
let levelArray = []
res.data.list.forEach(item => {
levelArray.push(item.title)
})
this.setData({
levelArray:levelArray,
levelList:res.data.list,
})
}
});
},
//选择品牌
changeBrand(e) {
if(this.data.brandIndex != e.detail.value && e.detail.value >= 0){
this.setData({
brand_id:this.data.brandList[e.detail.value].id,
brandIndex:e.detail.value,
car_id:'',//车系id
v_id:'',//车辆版本id
modelIndex:-1,
levelIndex:-1,
})
this.getAppSeries()
}
},
//选择车系
changeModel(e) {
if(this.data.modelIndex != e.detail.value && e.detail.value >= 0){
this.setData({
car_id:this.data.modelList[e.detail.value].id,
modelIndex:e.detail.value,
v_id:'',//车辆版本id
levelIndex:-1,
})
this.getAppSeriesAttrslevel()
}
},
//车辆版本
changeLevel(e) {
if(this.data.levelIndex != e.detail.value && e.detail.value >= 0){
this.setData({
v_id:this.data.levelList[e.detail.value].id,
levelIndex:e.detail.value,
})
}
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh(){
this.setData({
+81 -4
View File
@@ -25,7 +25,7 @@
<input class="wp100 bg-f6 pl20 pr20 font-22 ulib-r750 text-center" bindinput="searchInput" bindfocus="searchFocus" bindblur="searchBlur" bindconfirm="searchSubmit" style="height:56rpx" type="text" />
</view>
<view class="absolute right-0 box-middle">
<text bindtap="optfilter" class="inner5 iconfont icon-gaojisousuo mr40"></text>
<text bindtap="showfilter" class="inner5 iconfont icon-gaojisousuo mr40"></text>
</view>
</view>
</view>
@@ -38,6 +38,12 @@
<view class="inline-block text-middle bg-f6 color-666 mt15 ml5 mr5 pt5 pb5 pl20 pr20 ulib-r10 font-22" wx:if="{{type}}">
<block wx:for="{{filters.type}}" wx:key='index' wx:if="{{type == item.key}}">{{item.name}}</block>
</view>
<block wx:for="{{staffobj}}" wx:key='index'>
<view class="inline-block text-middle bg-f6 color-666 mt15 ml5 mr5 pt5 pb5 pl20 pr20 ulib-r10 font-22" wx:if="{{item.checked}}">{{item.uname}}</view>
</block>
<view class="inline-block text-middle bg-f6 color-666 mt15 ml5 mr5 pt5 pb5 pl20 pr20 ulib-r10 font-22" wx:if="{{brandIndex != -1}}">{{brandArray[brandIndex]}}</view>
<view class="inline-block text-middle bg-f6 color-666 mt15 ml5 mr5 pt5 pb5 pl20 pr20 ulib-r10 font-22" wx:if="{{modelIndex != -1}}">{{modelArray[modelIndex]}}</view>
<view class="inline-block text-middle bg-f6 color-666 mt15 ml5 mr5 pt5 pb5 pl20 pr20 ulib-r10 font-22" wx:if="{{levelIndex != -1}}">{{levelArray[levelIndex]}}</view>
</view>
</view>
@@ -70,7 +76,13 @@
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item="pin" wx:key='i'>
<view class="mt20 fn-clear font-28">
<view class="fn-fl color-333">{{key}}</view>
<view class="fn-fr wp60 text-nowrap text-right color-666">
<block wx:if="{{key=='销售顾问'}}">
<view class="fn-fr wp60 text-nowrap text-right">
<text class="text-middle color-666" wx:if="{{pin.value}}">{{pin.value}}</text>
<text class="inline-block ml10 bg-36afa2 pt5 pb5 pl15 pr15 text-middle font-22 color-fff ulib-r10" catchtap="showTransfer" data-id="{{item.id}}" wx:if="{{item.allot == 1}}">移交</text>
</view>
</block>
<view wx:else class="fn-fr wp60 text-nowrap text-right color-666">
<block wx:if="{{pin.type=='checkbox'}}">
<block wx:for="{{pin.lists}}" wx:for-index='key' wx:for-item="lable" wx:key='j'>
<view class="inline-block ml10 mr10"><i class="iconfont font-34 mr5 text-middle {{lable.selected?'icon-danxuan_xuanzhong color-36afa2':'icon-danxuan'}}" /><text class="text-middle">{{lable.value}}</text></view>
@@ -98,7 +110,13 @@
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
<view class="mt25 fn-clear font-28" wx:if="{{value}}">
<view class="fn-fl color-333">{{key}}</view>
<view class="fn-fr wp60 text-nowrap text-right color-666">{{value}}</view>
<block wx:if="{{key=='销售顾问'}}">
<view class="fn-fr wp60 text-nowrap text-right">
<text class="text-middle color-666" wx:if="{{value}}">{{value}}</text>
<text class="inline-block ml10 bg-36afa2 pt5 pb5 pl15 pr15 text-middle font-22 color-fff ulib-r10" catchtap="showTransfer" data-id="{{item.id}}" wx:if="{{item.allot == 1}}">移交</text>
</view>
</block>
<view wx:else class="fn-fr wp60 text-nowrap text-right color-666">{{value}}</view>
</view>
</block>
@@ -159,6 +177,46 @@
</block>
</view>
</view>
<view class="relative bbs-1-eb pt25 pb25 last-b-none">
<view class="font-22">销售顾问</view>
<view class="fn-clear">
<block wx:for="{{staffobj}}" wx:key='index'>
<view class="inline-block radio-btn mt20 mr15 pt15 pb15 pl20 pr20 ulib-r10 font-28 {{item.checked?'bg-333 color-fff':'bg-f8'}}" bindtap="checkPicker" data-index="{{index}}">
{{item.uname}}
</view>
</block>
</view>
</view>
<view class="relative bbs-1-eb pl190">
<view class="absolute left-0 box-middle font-28 color-333">车辆品牌</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeBrand" value="{{brandIndex}}" range="{{brandArray}}">
<text class="color-ccc" wx:if="{{brandIndex == -1}}">请选择</text>
<text wx:else>{{brandArray[brandIndex]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
<view class="relative bbs-1-eb pl190" wx:if="{{brandIndex != -1}}">
<view class="absolute left-0 box-middle font-28 color-333">车系车型</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeModel" value="{{modelIndex}}" range="{{modelArray}}">
<text class="color-ccc" wx:if="{{modelIndex == -1}}">请选择</text>
<text wx:else>{{modelArray[modelIndex]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
<view class="relative bbs-1-eb pl190" wx:if="{{modelIndex != -1}}">
<view class="absolute left-0 box-middle font-28 color-333">车辆版本</view>
<view class="pt30 pb30 text-right font-28 color-666 text-nowrap">
<picker bindchange="changeLevel" value="{{levelIndex}}" range="{{levelArray}}">
<text class="color-ccc" wx:if="{{levelIndex == -1}}">请选择</text>
<text wx:else>{{levelArray[levelIndex]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
</view>
<view class="pt50 pb100"></view>
</scroll-view>
@@ -168,4 +226,23 @@
</view>
</view>
<view class="search-bg fixed left-0 right-0 top-0 bottom-0" bindtap="optfilter" hidden="{{!isShowfilter}}" style="background-color:rgba(0,0,0,.5);"></view>
<view class="search-bg fixed left-0 right-0 top-0 bottom-0" bindtap="optfilter" hidden="{{!isShowfilter}}" style="background-color:rgba(0,0,0,.5);"></view>
<lcb-msg isShow="{{isShowTransfer}}">
<view slot="content">
<view class="inner30">
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
<view class="fn-fl">销售顾问</view>
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
<text wx:else>{{staffArray[employeeIndex]}}</text>
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
</picker>
</view>
</view>
<view class="fn-flex ml10 mr10 pl60 pr60 pb50 text-center font-32 color-666">
<button bindtap="optTransfer" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
<button disabled="{{submitFlag}}" bindtap="putAppCusorderV2Admins" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定</button>
</view>
</view>
</lcb-msg>
+158 -204
View File
@@ -12,15 +12,15 @@ Page({
step:2,
},
{
title:'其他信息',
title:'价格明细',
step:3,
},
{
title:'其他信息',
step:4,
},
],
step:1,
name:'',//姓名
mobile:'',//手机号
cardid:'',//身份证
address:'',//地址
step:3,
owner_name:'',//车主姓名
owner_mobile:'',//车主手机号
owner_cardid:'',//车主身份证
@@ -68,8 +68,7 @@ Page({
checktext: '3s',
srv_total:0,//代办费用
agencyList:[],//代办数组
fine_total_1:0,//精品费用-添加
fine_total_2:0,//精品费用-选择
fine_total:0,//精品费用
isShowSuccess:false,//是否显示成功提示
isShowContract:false,//是否显示生成合同
@@ -81,8 +80,6 @@ Page({
business_type:0,//0未执行到商务政策 1商务政策执行中 2商务政策成功 3商务政策失败
isShowIntenMoney:false,//是否显示意向金弹框
isShowAddress:false,//是否显示地址弹框
region: ['福建省', '', ''],
c_city_id:'',
oncardArray:[],//上牌城市
oncardIndex:-1,//上牌城市索引
@@ -91,9 +88,14 @@ Page({
if_local_bill:0,//本地开具发票
customer_cardidpic:'',//客户身份证正面照
owner_cardidpic:'',//车主身份证正面照
fineArr:[],//精品选装
finedIndex:-1,//精品选装索引
isShowWanShan:false,//是否显示完善信息
isShowInfoForm:false,//是否显示完善信息
},
//生命周期函数--监听页面加载
onLoad: function (options) {
@@ -121,24 +123,11 @@ Page({
nextstep(){
switch (this.data.step) {
case 1:
if (this.data.name == '' ) {
wx.showToast({
title: '请输入客户姓名',
icon: 'none'
})
}else if (!/^1[3456789]\d{9}$/.test(this.data.mobile)){
wx.showToast({
title: '请输入客户手机号',
icon: 'none'
})
}
else if(this.data.main_type == 0&&(this.data.cardid == ''|| !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/.test(this.data.cardid))){
wx.showToast({
title: '请填写正确客户身份证',
icon: 'none'
})
}
else if(this.data.main_type == 0&&this.data.owner_name == ''){
this.setData({
owner_mobile:this.trimAll(this.data.owner_mobile),
owner_cardid:this.trimAll(this.data.owner_cardid),
})
if(this.data.main_type == 0&&this.data.owner_name == ''){
wx.showToast({
title: '请填写车主姓名',
icon: 'none'
@@ -156,12 +145,6 @@ Page({
icon: 'none'
})
}
else if(this.data.main_type == 0&&(this.data.region[2]== ''||this.data.address == '')){
wx.showToast({
title: '请填写车主地址',
icon: 'none'
})
}
else if(this.data.main_type == 1&&this.data.company == ''){
wx.showToast({
title: '请填写企业名称',
@@ -174,12 +157,6 @@ Page({
icon: 'none'
})
}
else if(this.data.c_city_id == ''){
wx.showToast({
title: '请选择上牌城市',
icon: 'none'
})
}
else{
this.setData({
step:2,
@@ -214,6 +191,11 @@ Page({
}
break;
case 3:
this.setData({
step:4,
})
break;
case 4:
if(this.data.paymentIndex == -1 ){
wx.showToast({
title: '请选择付款方式',
@@ -232,6 +214,12 @@ Page({
icon: 'none'
})
}
else if(this.data.c_city_id == ''){
wx.showToast({
title: '请选择上牌城市',
icon: 'none'
})
}
else{
let that = this
@@ -276,12 +264,6 @@ Page({
userInfo: res,
})
if(res.biz_name == '测试门店'){
this.setData({
cardid:'350000202101010000',//身份证
})
}
});
},
@@ -506,19 +488,6 @@ Page({
}
},
//购车主体
changeMain(e) {
this.setData({
main_type:e.detail.value,
cardid:'',
owner_name:'',
owner_mobile:'',
owner_cardid:'',
company:'',
credit:'',
})
},
//获取车辆价格
getAppBusiness(){
if(this.data.car_id != ''&&this.data.v_id != ''&&this.data.color_id != ''&&this.data.incolor_id != ''){
@@ -538,7 +507,7 @@ Page({
})
}).catch(res => {
this.setData({
business_type:3,
business_type:3
})
});
}
@@ -585,16 +554,6 @@ Page({
})
},
//一件同步购车人信息
synchroCustomer(e){
this.setData({
owner_name:this.data.name,
owner_mobile:this.data.mobile,
owner_cardid:this.data.cardid,
owner_cardidpic:this.data.customer_cardidpic,
})
},
//新建订单
postAppCusorderV2() {
let that = this
@@ -608,29 +567,11 @@ Page({
fines.push(item)
}
});
that.data.fineList.forEach(item => {
if(item.checked){
fines.push({
id:item.id,
txt:item.title,
price:item.price,
})
}
})
let params = {};
params['main_type'] = that.data.main_type;
params['cus_id'] = that.data.cus_id;
params['name'] = that.data.name;
params['mobile'] = that.data.mobile;
params['c_city_id'] = that.data.c_city_id;
if(that.data.address != ''){
params['pro'] = that.data.region;
params['address'] = that.data.address;
}
if(that.data.cardid != ''){
params['cardid'] = that.data.cardid;
}
params['car_id'] = that.data.car_id;
params['v_id'] = that.data.v_id;
params['color_id'] = that.data.color_id;
@@ -750,24 +691,11 @@ Page({
//点击收取意向金
createV2Inten() {
if (this.data.name == '' ) {
wx.showToast({
title: '请输入客户姓名',
icon: 'none'
})
}else if (!/^1[3456789]\d{9}$/.test(this.data.mobile)){
wx.showToast({
title: '请输入客户手机号',
icon: 'none'
})
}
else if(this.data.main_type == 0&&(this.data.cardid == ''|| !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/.test(this.data.cardid))){
wx.showToast({
title: '请填写正确客户身份证',
icon: 'none'
})
}
else if(this.data.main_type == 0&&this.data.owner_name == ''){
this.setData({
owner_mobile:this.trimAll(this.data.owner_mobile),
owner_cardid:this.trimAll(this.data.owner_cardid),
})
if(this.data.main_type == 0&&this.data.owner_name == ''){
wx.showToast({
title: '请填写车主姓名',
icon: 'none'
@@ -785,12 +713,6 @@ Page({
icon: 'none'
})
}
else if(this.data.main_type == 0&&(this.data.region[2]== ''||this.data.address == '')){
wx.showToast({
title: '请填写车主地址',
icon: 'none'
})
}
else if(this.data.main_type == 1&&this.data.company == ''){
wx.showToast({
title: '请填写企业名称',
@@ -842,17 +764,8 @@ Page({
let params = {};
params['main_type'] = that.data.main_type;
params['cus_id'] = that.data.cus_id;
params['name'] = that.data.name;
params['mobile'] = that.data.mobile;
params['inten_money'] = that.data.inten_money;
params['c_city_id'] = that.data.c_city_id;
if(that.data.address != ''){
params['pro'] = that.data.region;
params['address'] = that.data.address;
}
if(that.data.cardid != ''){
params['cardid'] = that.data.cardid;
}
if(that.data.owner_name != ''){
params['owner_name'] = that.data.owner_name;
}
@@ -981,14 +894,14 @@ Page({
this.setData({
['fines['+e.currentTarget.dataset.index+'].price']:e.detail.value,
})
let fine_total_1 = 0
let fine_total = 0
this.data.fines.forEach(item => {
if(parseFloat(item.price)>0){
fine_total_1 = fine_total_1 + parseFloat(item.price)
fine_total = fine_total + parseFloat(item.price)
}
})
this.setData({
fine_total_1,
fine_total,
})
}
},
@@ -1145,20 +1058,6 @@ Page({
}
},
//选择城市
bindRegionChange(e) {
this.setData({
region: e.detail.value
})
},
//显示隐藏修改地址
optAddress(){
this.setData({
isShowAddress:!this.data.isShowAddress,
})
},
//选择上牌城市
changeOncard(e) {
if(this.data.oncardIndex != e.detail.value && e.detail.value >= 0){
@@ -1179,55 +1078,8 @@ Page({
//选择图片
chooseImg(e) {
let that = this
//上传身份证正面-客户身份证
if(e.currentTarget.dataset.type=='customer'){
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) {
let params = {};
params['img'] = resp.data.data.url;
_.apiQuery.getAppIdcardInfo(params).then(res2 => {
wx.hideLoading();
that.setData({
cardid:res2.data.IdNum,
name:res2.data.Name,
customer_cardidpic:resp.data.data.url,
})
})
}
},
fail: res => {
wx.hideLoading();
}
})
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
}
//上传身份证正面-车主身份证
if(e.currentTarget.dataset.type=='owner'){
if(that.data.main_type == 0){
wx.chooseImage({
count: 1, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
@@ -1254,6 +1106,8 @@ Page({
owner_cardid:res2.data.IdNum,
owner_name:res2.data.Name,
owner_cardidpic:resp.data.data.url,
isShowInfoForm:true,
isShowWanShan:false,
})
})
}
@@ -1281,32 +1135,132 @@ Page({
params['page'] = 1;
params['size'] = 100;
_.apiQuery.getAppFine(params).then(res => {
let fineList = res.data.list
let fineArr = []
fineList.forEach(item => {
fineArr.push(item.title)
item.price=''
})
fineArr.push('其他')
this.setData({
fineList:res.data.list,
fineArr,
fineList,
})
});
},
//精品选装
changeFines(e) {
let fineList = this.data.fineList
let values = e.detail.value
let fine_total_2 = 0
fineList.forEach(item1 => {
item1.checked = false
values.forEach(item2 => {
if(item1.id == item2){
item1.checked = true
if(parseFloat(item1.price)>0){
fine_total_2 = fine_total_2 + parseFloat(item1.price)
}
//添加精品选装
changeFine(e) {
if(this.data.fineArr[e.detail.value]=='其他'){
this.data.fines.push({
txt:'',
price:'',
})
this.setData({
finedIndex:-1,
fines:this.data.fines,
})
}else{
let fid = this.data.fineList[e.detail.value].id
let isadd = false
this.data.fines.forEach(item => {
if(item.id == fid){
isadd = true
}
})
})
if(isadd){
wx.showToast({
title: '您已添加过了',
icon: 'none',
duration: 2000
})
}else{
this.data.fineList.forEach(item => {
if(item.id == fid){
this.data.fines.push({
id:item.id,
txt:item.title,
price:'',
})
this.setData({
finedIndex:-1,
fines:this.data.fines,
})
}
})
}
}
},
//删除精品选装
delFine(e){
let that = this
wx.showModal({
title: '确定删除吗?',
content: '',
confirmText: "确定删除",
confirmColor: "#36afa2",
cancelText: "取消",
cancelColor: "#666",
success(res) {
if (res.confirm) {
let fines = that.data.fines
fines.splice(e.currentTarget.dataset.index, 1)
that.setData({
fines,
})
let fine_total = 0
that.data.fines.forEach(item => {
if(parseFloat(item.price)>0){
fine_total = fine_total + parseFloat(item.price)
}
})
that.setData({
fine_total,
})
}
}
})
},
//去除空格
trimAll(ele){
if(typeof ele === 'string'){
return ele.split(' ').join('');
}else{
console.error(`${typeof ele} is not the expected type, but the string type is expected`)
}
},
//选择购车类型
radioPicker(e){
if(e.currentTarget.dataset.value != this.data.main_type){
this.setData({
main_type:e.currentTarget.dataset.value,
owner_name:'',
owner_mobile:'',
owner_cardid:'',
company:'',
credit:'',
isShowInfoForm:false,
})
}
},
//显示隐藏完善信息
optWanShan(){
this.setData({
fineList,
fine_total_2,
isShowWanShan:!this.data.isShowWanShan,
})
},
//显示信息表单
showInfoForm(){
this.setData({
isShowInfoForm:true,
isShowWanShan:false,
})
},
+173 -235
View File
@@ -2,8 +2,8 @@
<view class="pl30 pr30 pb200" wx:if="{{!isPreview}}">
<view class="height-100">
<view class="fixed top-0 left-0 right-0 height-100 fn-flex pt30 pl20 pr20 bg-fff text-center z-index-1">
<view class="pl40 pr40" wx:for="{{tab}}" wx:key="index">
<view class="inline-block {{step==item.step?'font-40 color-1a':'pt10 font-32'}} {{step>item.step?'color-666':''}} {{step<item.step?'color-999':''}}" bindtap="{{item.step < step?'optstep':''}}" data-step="{{item.step}}">
<view class="pl20 pr20" wx:for="{{tab}}" wx:key="index">
<view class="inline-block {{step==item.step?'font-38 color-1a':'pt10 font-30'}} {{step>item.step?'color-666':''}} {{step<item.step?'color-999':''}}" bindtap="{{item.step < step?'optstep':''}}" data-step="{{item.step}}">
{{item.title}}
</view>
</view>
@@ -12,92 +12,42 @@
<view class="pb200">
<view wx:if="{{step == 1}}">
<view class="mt40 font-32">购车信息</view>
<view class="mt30 pt10 pb10 pl30 pr30 bg-fff ulib-r10 box-shadow-000-10-10">
<view class="relative bbs-1-eb pl190 last-b-none">
<view class="absolute left-0 box-middle font-28 color-333">购车主体<text class="color-f9394d">*</text></view>
<view class="pt30 pb30 text-right font-28 color-666">
<radio-group bindchange="changeMain">
<label class="inline-block ml40" wx:for="{{main}}" wx:key="index">
<view class="inline-block text-middle">
<radio value="{{item.value}}" checked="{{item.value==main_type?true:false}}"/>
</view>
<text class="inline-block text-middle">{{item.title}}</text>
</label>
</radio-group>
</view>
</view>
<block>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">客户手机号码<text class="color-f9394d">*</text></view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="number" placeholder="请输入客户手机号码" model:value='{{mobile}}' disabled='{{isShowIntenMoney||isShowAddress?true:false}}' always-embed='{{true}}' />
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 pr60 font-28" wx:if="{{main_type==0}}">
<view class="absolute left-0 box-middle">客户身份证<text class="color-f9394d">*</text></view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="idcard" placeholder="请输入客户身份证" model:value='{{cardid}}' disabled='{{isShowIntenMoney||isShowAddress?true:false}}' always-embed='{{true}}' />
</view>
<view class="absolute right-0 box-middle font-50 iconfont icon-cardid color-666" bindtap="chooseImg" data-type="customer"></view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">客户姓名<text class="color-f9394d">*</text></view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入客户姓名" model:value='{{name}}' disabled='{{isShowIntenMoney||isShowAddress?true:false}}' always-embed='{{true}}' />
</view>
</view>
</block>
<view class="mt30 font-28 text-center fn-flex">
<view class="fn-flex-item relative pt20 pb20 ulib-r10 {{item.value == 0?'mr10':'ml10'}} {{main_type == item.value?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="radioPicker" data-value="{{item.value}}" wx:for="{{main}}" wx:key="index">{{item.title}}</view>
</view>
<block wx:if="{{main_type==0}}">
<view class="mt40 fn-clear">
<view class="fn-fl mt10 font-32">车主信息</view>
<view class="fn-fr">
<button bindtap="synchroCustomer" class="inline-block font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover">一键同步购车人</button>
</view>
<view class="fn-fl font-32">车主信息</view>
<view class="fn-fr mr5 font-50 iconfont icon-shenfenzheng color-666" bindtap="optWanShan"></view>
</view>
<view class="mt20 pt10 pb10 pl30 pr30 bg-fff ulib-r10 box-shadow-000-10-10">
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">车主手机号码<text class="color-f9394d">*</text></view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="number" placeholder="请输入车主手机号码" model:value='{{owner_mobile}}' disabled='{{isShowIntenMoney||isShowAddress?true:false}}' always-embed='{{true}}' />
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 pr60 font-28">
<view class="absolute left-0 box-middle">车主身份证<text class="color-f9394d">*</text></view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="idcard" placeholder="请输入车主身份证" model:value='{{owner_cardid}}' disabled='{{isShowIntenMoney||isShowAddress?true:false}}' always-embed='{{true}}' />
</view>
<view class="absolute right-0 box-middle font-50 iconfont icon-cardid color-666" bindtap="chooseImg" data-type="owner"></view>
</view>
<view class="mt20 pt10 pb10 pl30 pr30 bg-fff ulib-r10 box-shadow-000-10-10" wx:if="{{isShowInfoForm}}">
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">车主姓名<text class="color-f9394d">*</text></view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入车主姓名" model:value='{{owner_name}}' disabled='{{isShowIntenMoney||isShowAddress?true:false}}' always-embed='{{true}}' />
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" bindtap="optAddress">
<view class="absolute left-0 box-middle">车主地址<text class="color-f9394d">*</text></view>
<view class="pt30 pb30 text-right font-28 text-break" wx:if="{{address}}"><block wx:for="{{region}}" wx:key='index'>{{item}} </block>{{address}}</view>
<view wx:else class="pt30 pb30 text-right font-28 color-ccc">
请编辑车主地址
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">车主手机号码<text class="color-f9394d">*</text></view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="number" placeholder="请输入车主手机号码" model:value='{{owner_mobile}}' disabled='{{isShowIntenMoney||isShowAddress?true:false}}' always-embed='{{true}}' />
</view>
</view>
<view class="relative bbs-1-eb pl190 last-b-none">
<view class="absolute left-0 box-middle font-28 color-333">上牌城市<text class="color-f9394d">*</text></view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeOncard" value="{{oncardIndex}}" range="{{oncardArray}}">
<text class="color-ccc" wx:if="{{oncardIndex == -1}}">请选择</text>
<text wx:else>{{oncardArray[oncardIndex]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">车主身份证<text class="color-f9394d">*</text></view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="idcard" placeholder="请输入车主身份证" model:value='{{owner_cardid}}' disabled='{{isShowIntenMoney||isShowAddress?true:false}}' always-embed='{{true}}' />
</view>
</view>
</view>
</block>
<block wx:elif="{{main_type==1}}">
<view class="mt40 font-32">企业信息</view>
<view class="mt30 pt10 pb10 pl30 pr30 bg-fff ulib-r10 box-shadow-000-10-10">
<view class="mt40 fn-clear">
<view class="fn-fl font-32">企业信息</view>
<view class="fn-fr mr5 font-50 iconfont icon-yingyezizhi color-666" bindtap="optWanShan"></view>
</view>
<view class="mt20 pt10 pb10 pl30 pr30 bg-fff ulib-r10 box-shadow-000-10-10" wx:if="{{isShowInfoForm}}">
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">企业名称<text class="color-f9394d">*</text></view>
<view>
@@ -110,24 +60,26 @@
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入企业信用代码" model:value='{{credit}}' disabled='{{isShowIntenMoney||isShowAddress?true:false}}' always-embed='{{true}}' />
</view>
</view>
<view class="relative bbs-1-eb pl190 last-b-none">
<view class="absolute left-0 box-middle font-28 color-333">上牌城市<text class="color-f9394d">*</text></view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeOncard" value="{{oncardIndex}}" range="{{oncardArray}}">
<text class="color-ccc" wx:if="{{oncardIndex == -1}}">请选择</text>
<text wx:else>{{oncardArray[oncardIndex]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">代办人姓名<text class="color-f9394d">*</text></view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入企业信用代码" model:value='{{credit}}' disabled='{{isShowIntenMoney||isShowAddress?true:false}}' always-embed='{{true}}' />
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">代办人身份证<text class="color-f9394d">*</text></view>
<view>
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入企业信用代码" model:value='{{credit}}' disabled='{{isShowIntenMoney||isShowAddress?true:false}}' always-embed='{{true}}' />
</view>
</view>
</view>
</block>
<view class="mt40 font-22 color-666 text-center">
<!-- <view class="mt40 font-22 color-666 text-center">
<label class="inline-block text-middle statement fn-clear"><checkbox class="fn-fl" value="cb" /><text class="pt3 fn-fl">我已阅读并同意</text></label>
<text class="text-middle color-36afa2" bindtap="pushLink" data-url="/pages/statement/registration/index">《狸车用户注册协议》</text>
<text class="text-middle">和</text>
<text class="text-middle color-36afa2" bindtap="pushLink" data-url="/pages/statement/privacy/index">《狸车用户隐私政策》</text>
</view>
</view> -->
</view>
<view wx:if="{{step == 2}}">
<view class="relative bbs-1-eb pl190 last-b-none">
@@ -183,16 +135,121 @@
</view>
<view wx:if="{{step == 3}}">
<view class="relative bbs-1-eb pl190 last-b-none">
<view class="absolute left-0 box-middle font-28 color-333">付款方式<text class="color-f9394d">*</text></view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changePayment" value="{{paymentIndex}}" range="{{payment}}">
<text class="color-ccc" wx:if="{{paymentIndex == -1}}">请选择</text>
<text wx:else>{{payment[paymentIndex]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
<view class="mt40 fn-clear">
<view class="fn-fl font-32">车价明细</view>
<view class="fn-fr font-28 color-666">
总计:<text class="mr10 color-f9394d">{{srv_total}}</text>元
</view>
</view>
<view class="mt20 pt10 pb10 pl30 pr30 bg-fff ulib-r10 box-shadow-000-10-10">
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.price}}">
<view class="absolute left-0 box-middle color-333">平台售价</view>
<view class="pt30 pb30 text-right font-28 color-666" style="height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.price}}</text>元</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.price_color}}">
<view class="absolute left-0 box-middle color-333">颜色加价</view>
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.price_color}}</text>元</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.price_coplus}}">
<view class="absolute left-0 box-middle color-333">公司加价</view>
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.price_coplus}}</text>元</view>
</view>
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{priceinfo.deposit_list}}">
<view class="absolute left-0 box-middle font-28 color-333">定金<text class="color-f9394d">*</text></view>
<view class="pt30 pb30 text-right font-28 color-666">
<view class="fn-clear">
<block wx:for="{{priceinfo.deposit_list}}" wx:key='index'>
<view class="inline-block ml5 mr5 pt10 pb10 pl15 pr15 text-middle font-24 ulib-r10 {{priceinfo.sdeposit == item?'bg-36afa2 color-fff':'bg-f8'}}" bindtap="fillDeposit" data-deposit="{{item}}">
{{item}}
</view>
</block>
<input class="inline-block ml5 mr5 text-middle bg-fff bds-1-eb text-center font-24 ulib-r10" style="width:100rpx;height:52rpx;" placeholder-class="color-ccc" type="digit" placeholder="金额" bindinput='inputDeposit' bindblur='inputBlurDeposit' value="{{priceinfo.sdeposit}}" always-embed='{{true}}' />
</view>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.dis_money}}">
<view class="absolute left-0 box-middle font-28 color-333">车身优惠</view>
<view class="pt30 pb30 text-right font-28 color-666">
<view class="fn-clear">
<block wx:for="{{priceinfo.dis_money_list}}" wx:key='index'>
<view class="inline-block ml5 mr5 pt10 pb10 pl15 pr15 text-middle font-24 ulib-r10 {{priceinfo.sdisc_money == item?'bg-36afa2 color-fff':'bg-f8'}}" bindtap="fillDisc_money" data-disc_money="{{item}}">
{{item}}
</view>
</block>
<input class="inline-block ml5 mr5 text-middle bg-fff bds-1-eb text-center font-24 ulib-r10" style="width:100rpx;height:52rpx;" placeholder-class="color-ccc" type="digit" placeholder="金额" bindinput='inputDisc_money' bindblur='inputBlurDisc_money' value="{{priceinfo.sdisc_money}}" always-embed='{{true}}' />
</view>
</view>
</view>
<view class="relative bbs-1-eb pl190 last-b-none">
<view class="absolute left-0 box-middle font-28 color-333">付款方式<text class="color-f9394d">*</text></view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changePayment" value="{{paymentIndex}}" range="{{payment}}">
<text class="color-ccc" wx:if="{{paymentIndex == -1}}">请选择</text>
<text wx:else>{{payment[paymentIndex]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
</view>
<block wx:if="{{userInfo.biz_type == 1}}">
<view class="bbs-1-eb last-b-none" wx:if="{{agencyList.length>0}}">
<view class="mt40 fn-clear">
<view class="fn-fl font-32">委托明细</view>
<view class="fn-fr font-28 color-666">
总计:<text class="mr10 color-f9394d">{{srv_total}}</text>元
</view>
</view>
<view class="mt20 pt10 pb10 pl30 pr30 bg-fff ulib-r10 box-shadow-000-10-10">
<view class="pb10">
<checkbox-group bindchange="changeAgency">
<block wx:for="{{agencyList}}" wx:key='index'>
<view class="mb20 block relative height-100 pl220 pr20 bg-f6 font-28 ulib-r10">
<label class="absolute box-middle left-0 ml30">
<checkbox class="text-middle mr5" value="{{item.id}}" checked="{{item.checked}}" disabled="{{item.id == 1||item.id == 2}}" />
<text class="text-middle">{{item.title}}</text>
</label>
<view class="pt25 text-right" wx:if="{{item.checked&&item.price>0}}">
<block wx:for="{{item.price_list}}" wx:for-item='price_list' wx:for-index='i' wx:key='i'>
<text class="inline-block ml5 mr5 pt10 pb10 pl15 pr15 text-middle font-24 ulib-r10 {{item.sprice == price_list?'bg-36afa2 color-fff':'bg-e4 color-666'}}" bindtap="fillAgency" data-index="{{index}}" data-sprice="{{price_list}}">{{price_list}}</text>
</block>
<input class="inline-block ml5 mr5 text-middle bg-fff bds-1-eb text-center font-24 ulib-r10" style="width:100rpx;height:52rpx;" placeholder-class="color-ccc" type="digit" placeholder="价格" bindinput='inputAgency' data-index="{{index}}" value="{{item.sprice}}" always-embed='{{true}}' />
</view>
<view class="pt30 text-right color-666" wx:elif="{{item.text}}">{{item.text}}</view>
</view>
</block>
</checkbox-group>
</view>
</view>
</view>
<view class="bbs-1-eb last-b-none">
<view class="relative pl190">
<view class="absolute left-0 box-middle font-28 color-333">精品选装</view>
<view class="pt30 pb30 text-right font-28 color-666">
总计:<text class="mr10 color-f9394d">{{fine_total}}</text>元
</view>
</view>
<view class="pb10">
<block wx:for="{{fines}}" wx:key='index'>
<view class="fn-clear mb20 relative pl30 pr80 bg-f6 ulib-r10">
<view class="fn-fl wp70">
<input class="wp100 height-100 font-28" placeholder-class="color-ccc" type="text" placeholder="精品名称" bindinput='inputFines' data-index="{{index}}" data-type="txt" value="{{item.txt}}" always-embed='{{true}}' />
</view>
<view class="fn-fr wp25">
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="digit" placeholder="精品价格" bindinput='inputFines' data-index="{{index}}" data-type="price" value="{{item.price}}" always-embed='{{true}}' />
</view>
<i class="absolute box-middle right-0 mr20 iconfont icon-guanbi1 font-30 color-666" bindtap="delFine" data-index="{{index}}"></i>
</view>
</block>
<picker class="mb20 inner20 bds-2-36afa2 text-center font-28 color-36afa2 ulib-r10" bindchange="changeFine" value="{{finedIndex}}" range="{{fineArr}}">
<i class="iconfont mr10 font-24 icon-jia1"></i>添加
</picker>
</view>
</view>
</block>
</view>
<view wx:if="{{step == 4}}">
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">期望交付时间<text class="color-f9394d">*</text></view>
<view class="pt30 pb30 text-right font-28 color-666">
@@ -203,42 +260,14 @@
</picker>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.price}}">
<view class="absolute left-0 box-middle color-333">平台售价</view>
<view class="pt30 pb30 text-right font-28 color-666" style="height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.price}}</text>元</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.price_color}}">
<view class="absolute left-0 box-middle color-333">颜色加价</view>
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.price_color}}</text>元</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.price_coplus}}">
<view class="absolute left-0 box-middle color-333">公司加价</view>
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.price_coplus}}</text>元</view>
</view>
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{priceinfo.deposit_list}}">
<view class="absolute left-0 box-middle font-28 color-333">定金<text class="color-f9394d">*</text></view>
<view class="relative bbs-1-eb pl190 last-b-none">
<view class="absolute left-0 box-middle font-28 color-333">上牌城市<text class="color-f9394d">*</text></view>
<view class="pt30 pb30 text-right font-28 color-666">
<view class="fn-clear">
<block wx:for="{{priceinfo.deposit_list}}" wx:key='index'>
<view class="inline-block ml5 mr5 pt10 pb10 pl15 pr15 text-middle font-24 ulib-r10 {{priceinfo.sdeposit == item?'bg-36afa2 color-fff':'bg-f8'}}" bindtap="fillDeposit" data-deposit="{{item}}">
{{item}}
</view>
</block>
<input class="inline-block ml5 mr5 text-middle bg-fff bds-1-eb text-center font-24 ulib-r10" style="width:100rpx;height:52rpx;" placeholder-class="color-ccc" type="digit" placeholder="金额" bindinput='inputDeposit' bindblur='inputBlurDeposit' value="{{priceinfo.sdeposit}}" always-embed='{{true}}' />
</view>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.dis_money}}">
<view class="absolute left-0 box-middle font-28 color-333">车身优惠</view>
<view class="pt30 pb30 text-right font-28 color-666">
<view class="fn-clear">
<block wx:for="{{priceinfo.dis_money_list}}" wx:key='index'>
<view class="inline-block ml5 mr5 pt10 pb10 pl15 pr15 text-middle font-24 ulib-r10 {{priceinfo.sdisc_money == item?'bg-36afa2 color-fff':'bg-f8'}}" bindtap="fillDisc_money" data-disc_money="{{item}}">
{{item}}
</view>
</block>
<input class="inline-block ml5 mr5 text-middle bg-fff bds-1-eb text-center font-24 ulib-r10" style="width:100rpx;height:52rpx;" placeholder-class="color-ccc" type="digit" placeholder="金额" bindinput='inputDisc_money' bindblur='inputBlurDisc_money' value="{{priceinfo.sdisc_money}}" always-embed='{{true}}' />
</view>
<picker bindchange="changeOncard" value="{{oncardIndex}}" range="{{oncardArray}}">
<text class="color-ccc" wx:if="{{oncardIndex == -1}}">请选择</text>
<text wx:else>{{oncardArray[oncardIndex]}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</view>
<!-- <view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.fine_money}}">
@@ -260,69 +289,6 @@
</view>
</view>
</view> -->
<block wx:if="{{userInfo.biz_type == 1}}">
<view class="bbs-1-eb last-b-none" wx:if="{{agencyList.length>0}}">
<view class="relative pl190">
<view class="absolute left-0 box-middle font-28 color-333">委托代办</view>
<view class="pt30 pb30 text-right font-28 color-666">
总计:<text class="mr10 color-f9394d">{{srv_total}}</text>元
</view>
</view>
<view class="pb10">
<checkbox-group bindchange="changeAgency">
<block wx:for="{{agencyList}}" wx:key='index'>
<view class="mb20 block relative height-100 pl220 pr20 bg-f6 font-28 ulib-r10">
<label class="absolute box-middle left-0 ml30">
<checkbox class="text-middle mr5" value="{{item.id}}" checked="{{item.checked}}" disabled="{{item.id == 1||item.id == 2}}" />
<text class="text-middle">{{item.title}}</text>
</label>
<view class="pt25 text-right" wx:if="{{item.checked&&item.price>0}}">
<block wx:for="{{item.price_list}}" wx:for-item='price_list' wx:for-index='i' wx:key='i'>
<text class="inline-block ml5 mr5 pt10 pb10 pl15 pr15 text-middle font-24 ulib-r10 {{item.sprice == price_list?'bg-36afa2 color-fff':'bg-e4 color-666'}}" bindtap="fillAgency" data-index="{{index}}" data-sprice="{{price_list}}">{{price_list}}</text>
</block>
<input class="inline-block ml5 mr5 text-middle bg-fff bds-1-eb text-center font-24 ulib-r10" style="width:100rpx;height:52rpx;" placeholder-class="color-ccc" type="digit" placeholder="价格" bindinput='inputAgency' data-index="{{index}}" value="{{item.sprice}}" always-embed='{{true}}' />
</view>
<view class="pt30 text-right color-666" wx:elif="{{item.text}}">{{item.text}}</view>
</view>
</block>
</checkbox-group>
</view>
</view>
<view class="bbs-1-eb last-b-none">
<view class="relative pl190">
<view class="absolute left-0 box-middle font-28 color-333">精品选装</view>
<view class="pt30 pb30 text-right font-28 color-666">
总计:<text class="mr10 color-f9394d">{{fine_total_1+fine_total_2}}</text>元
</view>
</view>
<view class="pb10">
<checkbox-group bindchange="changeFines">
<block wx:for="{{fineList}}" wx:key='index'>
<view class="mb20 block relative height-100 pl220 pr20 bg-f6 font-28 ulib-r10">
<label class="absolute box-middle left-0 ml30">
<checkbox class="text-middle mr5" value="{{item.id}}" checked="{{item.checked}}" />
<text class="text-middle">{{item.title}}</text>
</label>
<view class="pt25 text-right" wx:if="{{item.price>0}}">
<text class="mr10 color-f9394d">{{item.price}}</text>元
</view>
</view>
</block>
</checkbox-group>
<block wx:for="{{fines}}" wx:key='index'>
<view class="fn-clear mb20 relative pl30 pr30 bg-f6 ulib-r10">
<view class="fn-fl wp50">
<input class="wp100 height-100 font-28" placeholder-class="color-ccc" type="text" placeholder="精品名称" bindinput='inputFines' data-index="{{index}}" data-type="txt" value="{{item.txt}}" always-embed='{{true}}' />
</view>
<view class="fn-fr wp25">
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="digit" placeholder="精品价格" bindinput='inputFines' data-index="{{index}}" data-type="price" value="{{item.price}}" always-embed='{{true}}' />
</view>
</view>
</block>
<view class="mb20 inner20 bds-2-36afa2 text-center font-28 color-36afa2 ulib-r10" bindtap="addFine"><i class="iconfont mr10 font-24 icon-jia1"></i>添加</view>
</view>
</view>
</block>
<block wx:if="{{userInfo.show_sa}}">
<view class="relative pt30 font-28 color-333">特别约定</view>
<textarea class="wp100 mt20 inner20 line-height-16 bg-f6 font-28 ulib-r10" style="height:180rpx;" placeholder-class="color-ccc" placeholder="请填写特别约定" model:value='{{sa}}' always-embed='{{true}}' />
@@ -350,6 +316,10 @@
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" bindtap="getAppBusiness" wx:elif="{{business_type==3}}">下一步</button>
</block>
<block wx:if="{{step==3}}">
<button class="wp100 bds-2-36afa2 bg-fff mr20 pt10 pb10 text-center font-32 color-36afa2 ulib-r750" hover-class="btn-36afa2-hover" bindtap="optstep" data-step="{{step-1}}">上一步</button>
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" bindtap="nextstep">下一步</button>
</block>
<block wx:if="{{step==4}}">
<button class="wp100 bds-2-36afa2 bg-fff mr20 pt10 pb10 text-center font-32 color-36afa2 ulib-r750" hover-class="btn-36afa2-hover" bindtap="optstep" data-step="{{step-1}}">上一步</button>
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" bindtap="nextstep">登记预览</button>
</block>
@@ -381,18 +351,6 @@
<view class="font-32">用户信息</view>
<view class="absolute right-0 box-middle font-22 color-666">销售顾问:<text class="color-36afa2">{{userInfo.uname}}</text></view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">客户姓名</view>
<view class="pt30 pb30 text-right font-28 color-666">{{name}}</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">客户手机号码</view>
<view class="pt30 pb30 text-right font-28 color-666">{{mobile}}</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{cardid}}">
<view class="absolute left-0 box-middle">客户身份证</view>
<view class="pt30 pb30 text-right font-28 color-666">{{cardid}}</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{owner_name}}">
<view class="absolute left-0 box-middle color-333">车主姓名</view>
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">
@@ -411,10 +369,6 @@
<text>{{owner_cardid}}</text>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{address}}">
<view class="absolute left-0 box-middle">车主地址</view>
<view class="pt30 pb30 text-right font-28 color-666"><block wx:for="{{region}}" wx:key='index'>{{item}} </block>{{address}}</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{company}}">
<view class="absolute left-0 box-middle color-333">企业名称</view>
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">
@@ -427,10 +381,6 @@
<text>{{credit}}</text>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{c_city_id}}">
<view class="absolute left-0 box-middle font-28 color-333">上牌城市</view>
<view class="pt30 pb30 text-right font-28 color-666">{{oncardArray[oncardIndex]}}</view>
</view>
<view class="mt40 font-32">车辆信息</view>
<view class="relative bbs-1-eb pl190 last-b-none">
<view class="absolute left-0 box-middle font-28 color-333">车辆品牌</view>
@@ -461,6 +411,10 @@
<view class="absolute left-0 box-middle font-28 color-333">期望交付时间</view>
<view class="pt30 pb30 text-right font-28 color-666">{{delry_time}}</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{c_city_id}}">
<view class="absolute left-0 box-middle font-28 color-333">上牌城市</view>
<view class="pt30 pb30 text-right font-28 color-666">{{oncardArray[oncardIndex]}}</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.price}}">
<view class="absolute left-0 box-middle color-333">平台售价</view>
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.price}}</text>元</view>
@@ -509,16 +463,8 @@
</block>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle color-333">精品选装</view>
<view class="pt30 pb30 text-right font-28 color-666" style="height:38rpx;"><text class="mr10 color-f9394d">{{fine_total_1+fine_total_2}}</text>元</view>
<view class="pt30 pb30 text-right font-28 color-666" style="height:38rpx;"><text class="mr10 color-f9394d">{{fine_total}}</text>元</view>
</view>
<block wx:for="{{fineList}}" wx:key='index'>
<view class="relative ml40 bbs-1-eb pl140 font-22 color-666" wx:if="{{item.checked}}">
<view class="absolute left-0 box-middle"><i class="iconfont ml5 mr10 icon-gengduo"></i>{{item.title}}</view>
<view class="pt25 pb25 text-right" style="min-height:30rpx">
<blcok wx:if="{{item.price}}"><text class="mr10 color-f9394d">{{item.price}}</text>元</blcok>
</view>
</view>
</block>
<block wx:for="{{fines}}" wx:key='index'>
<view class="relative ml40 bbs-1-eb pl140 font-22 color-666" wx:if="{{item.txt}}">
<view class="absolute left-0 box-middle"><i class="iconfont ml5 mr10 icon-gengduo"></i>{{item.txt}}</view>
@@ -610,26 +556,18 @@
</view>
</lcb-msg>
<!--车主地址-->
<lcb-msg isShow="{{isShowAddress}}">
<view slot="content" style="width:650rpx;">
<view class="pt50 font-36 text-center">请填写车主地址信息</view>
<view class="pt30 pl60 pr60 pb40">
<picker class="inner20 bds-1-eb relative text-center font-28 ulib-r10" mode="region" bindchange="bindRegionChange" value="{{region}}">
<text>{{region[0]}}</text>
<text class="pl10 pr10 color-666">-</text>
<text wx:if="{{region[1]}}">{{region[1]}}</text>
<text wx:else class="color-ccc">选择城市</text>
<text class="pl10 pr10 color-666">-</text>
<text wx:if="{{region[2]}}">{{region[2]}}</text>
<text wx:else class="color-ccc">选择地区</text>
</picker>
<view class="mt30 relative">
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" style="height:150rpx;" placeholder-class="color-ccc" type="text" placeholder="请输入详细地址" model:value='{{address}}' />
<!--完善信息-->
<lcb-msg isShow="{{isShowWanShan}}" isHasClose="{{true}}" bind:closeevent="optWanShan">
<view slot="content">
<view class="inner40 pt60 pb60 line-height-16 font-34 color-666">
<view class="text-center text-bold">完善信息</view>
<view class="pl50 pr50 text-center">
<view class="relative overflowhidden mt30 btn-36afa2 pt15 pb15 font-28 color-fff ulib-r10" bindtap="chooseImg">
<view class="orderTip text-center font-20 color-fff bg-f9394d">推荐</view>
{{main_type == 0?'上传身份证':'上传营业执照'}}
</view>
<view class="mt30 btn-36afa2 pt15 pb15 font-28 color-fff ulib-r10" bindtap="showInfoForm">手动输入信息</view>
</view>
</view>
<view class="pl60 pr60 pb50 text-center font-32 color-666">
<button bindtap="optAddress" class="inline-block wp50 btn-36afa2 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定</button>
</view>
</view>
</lcb-msg>
+11
View File
@@ -56,4 +56,15 @@ radio .wx-radio-input.wx-radio-input-checked::before{
color:#fff;
transform:translate(-50%, -50%) scale(1);
-webkit-transform:translate(-50%, -50%) scale(1);
}
.orderTip{
position: absolute;
top: -10rpx;
right: -35rpx;
width: 100rpx;
height: 35rpx;
padding-top:18rpx;
/* line-height: 50rpx; */
transform: rotate(45deg);
}
+554
View File
@@ -0,0 +1,554 @@
import _ from '../../../commons/js/commons';
import popularData from '../../../commons/js/lib/popularData';
import * as echarts from '../../../ecCanvas/components/ec-canvas/echarts';
const app = getApp()
let BarChartData;
let Pie1ChartData;
let Pie2ChartData;
function BarChart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
canvas.setChart(chart);
let option = BarChartData
chart.setOption(option);
chart.on('click',function(e){
console.log(e)
});
return chart;
}
function Pie1Chart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
canvas.setChart(chart);
let option = Pie1ChartData
chart.setOption(option);
chart.on('click',function(e){
console.log(e)
});
return chart;
}
function Pie2Chart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
canvas.setChart(chart);
let option = Pie2ChartData
chart.setOption(option);
chart.on('click',function(e){
console.log(e)
});
return chart;
}
Page({
data: {
imgUrl: _.config.imgUrl,//静态图片路径
showPie1Chart:false,//是否显示Pie1图表
ecPie1:{},
showPie2Chart:false,//是否显示Pie2图表
ecPie2:{},
showBarChart:false,//是否显示Bar图表
ecBar:{},
},
onLoad: function (options) {
for (let key in options) {
this.setData({
[key]: options[key]
})
}
// popularData.getDateLater(0,0).then(res => {
// this.setData({
// s_date:res[0],
// e_date:res[1],
// current_date:res[1],
// })
// })
this.getAppBizStats_customer()
},
//选择日期
changeDate(e){
if(e.currentTarget.dataset.type=="s_date"){
let begin = new Date(e.detail.value).getTime();
let end = new Date(this.data.e_date).getTime();
let day = 0
if(end>=begin){
day = (end - begin)/(24*60*60*1000);
this.setData({
s_date: e.detail.value,
})
}
else{
day = (begin - end)/(24*60*60*1000);
let s_date = this.data.e_date
let e_date = e.detail.value
this.setData({
s_date,
e_date,
})
}
if (day > 365) {
wx.showToast({
title: '请选择一年时间内',
icon: 'none'
})
}
else{
this.getAppBizStats_customer()
}
}
if(e.currentTarget.dataset.type=="e_date"){
let begin = new Date(this.data.s_date).getTime();
let end = new Date(e.detail.value).getTime();
let day = 0
if(end>=begin){
day = (end - begin)/(24*60*60*1000);
this.setData({
e_date: e.detail.value,
})
}
else{
day = (begin - end)/(24*60*60*1000);
let e_date = this.data.s_date
let s_date = e.detail.value
this.setData({
s_date,
e_date,
})
}
if (day > 365) {
wx.showToast({
title: '请选择一年时间内',
icon: 'none'
})
}
else{
this.getAppBizStats_customer()
}
}
},
//客户数据
getAppBizStats_customer(){
this.setData({
showPie1Chart:false,
showPie2Chart:false,
showBarChart:false,
})
let params = {};
params['s_time'] = this.data.s_date;
params['e_time'] = this.data.e_date;
_.apiQuery.getAppBizStats_customer(params).then(res => {
wx.setNavigationBarTitle({
title: res.data.title
})
this.setData({
Pie1title:res.data.pie1.title,
Pie2title:res.data.pie2.title,
Bartitle:res.data.bar.title,
})
// Pie1ChartData = getPie1Option()
if(res.data.pie1.series_data_1.length==0){
this.setData({
pie1noData:true,
})
}else{
Pie1ChartData = {
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
},
series: [
{
name: 'Access From',
type: 'pie',
selectedMode: 'single',
radius: [0, '30%'],
label: {
position: 'inner',
fontSize: 10
},
labelBar: {
show: false
},
data: []
},
{
name: 'Access From',
type: 'pie',
radius: ['45%', '65%'],
labelLine: {
fontSize:5,
length:10
},
label: {
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
backgroundColor: '#F6F8FC',
borderColor: '#8C8D8E',
borderWidth: 1,
borderRadius: 4,
rich: {
hr: {
borderColor: '#8C8D8E',
width: '100%',
borderWidth: 1,
height: 0
},
b: {
color: '#4C5058',
fontSize:10,
lineHeight:20,
align: 'center',
},
c: {
color: '#4C5058',
fontSize:8,
lineHeight:20,
align: 'center',
},
}
},
data: []
},
]
};
Pie1ChartData.series[0].data = res.data.pie1.series_data_1
Pie1ChartData.series[1].data = res.data.pie1.series_data_2
this.setData({
pie1noData:false,
showPie1Chart:true,
['ecPie1.onInit']:Pie1Chart,
})
}
// Pie2ChartData = getPie2Option()
if(res.data.pie2.series_data_1.length==0){
this.setData({
pie2noData:true,
})
}else{
Pie2ChartData = {
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
},
series: [
{
name: 'Access From',
type: 'pie',
selectedMode: 'single',
radius: [0, '30%'],
label: {
position: 'inner',
fontSize: 10
},
labelBar: {
show: false
},
data: []
},
{
name: 'Access From',
type: 'pie',
radius: ['45%', '65%'],
labelLine: {
fontSize:5,
length:10
},
label: {
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
backgroundColor: '#F6F8FC',
borderColor: '#8C8D8E',
borderWidth: 1,
borderRadius: 4,
rich: {
hr: {
borderColor: '#8C8D8E',
width: '100%',
borderWidth: 1,
height: 0
},
b: {
color: '#4C5058',
fontSize:10,
lineHeight:20,
align: 'center',
},
c: {
color: '#4C5058',
fontSize:8,
lineHeight:20,
align: 'center',
},
}
},
data: []
},
]
};
Pie2ChartData.series[0].data = res.data.pie2.series_data_1
Pie2ChartData.series[1].data = res.data.pie2.series_data_2
this.setData({
pie2noData:false,
showPie2Chart:true,
['ecPie2.onInit']:Pie2Chart,
})
}
//BarChartData = getBarOption()
BarChartData = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
xAxis: {
type: 'value',
data: []
},
yAxis: {
type: 'category',
data: []
},
grid: {
top: '1%',
left: '2%',
right: '5%',
bottom: '1%',
containLabel: true
},
series: [
{
data: [],
type: 'bar',
top: 0,
bottom:'0',
}
]
};
BarChartData.yAxis.data = res.data.bar.xAxis_data
BarChartData.series[0].data = res.data.bar.series_data
this.setData({
Barheight:100 + 50*(res.data.bar.xAxis_data.length),
showBarChart:true,
['ecBar.onInit']:BarChart,
})
wx.stopPullDownRefresh()
});
},
//推送链接
pushLink(e) {
if(e.currentTarget.dataset.url){
_.$router.openUrlScheme(e.currentTarget.dataset.url)
}
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh: function () {
this.getAppBizStats_customer()
},
})
function getPie1Option() {
return {
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
},
series: [
{
name: 'Access From',
type: 'pie',
selectedMode: 'single',
radius: [0, '30%'],
label: {
position: 'inner',
fontSize: 10
},
labelBar: {
show: false
},
data: [
{ value: 1548, name: 'H' },
{ value: 775, name: 'A' },
{ value: 679, name: 'B', }
]
},
{
name: 'Access From',
type: 'pie',
radius: ['45%', '65%'],
labelLine: {
fontSize:5,
length:10
},
label: {
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
backgroundColor: '#F6F8FC',
borderColor: '#8C8D8E',
borderWidth: 1,
borderRadius: 4,
rich: {
hr: {
borderColor: '#8C8D8E',
width: '100%',
borderWidth: 1,
height: 0
},
b: {
color: '#4C5058',
fontSize:10,
lineHeight:20,
align: 'center',
},
c: {
color: '#4C5058',
fontSize:8,
lineHeight:20,
align: 'center',
},
}
},
data: [
{ value: 1048, name: '转介绍' },
{ value: 335, name: '网络推广' },
{ value: 310, name: '外展外拓' },
{ value: 251, name: '自媒体' },
]
},
]
};
}
function getPie2Option() {
return {
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
},
series: [
{
name: 'Access From',
type: 'pie',
selectedMode: 'single',
radius: [0, '30%'],
label: {
position: 'inner',
fontSize: 10
},
labelLine: {
show: false
},
data: [
{ value: 258, name: 'H' },
{ value: 77, name: 'A' },
{ value: 67, name: 'B', }
]
},
{
name: 'Access From',
type: 'pie',
radius: ['45%', '65%'],
labelLine: {
fontSize:5,
length:10
},
label: {
formatter: '{b|{b}}{abg|}\n{hr|}\n{c| {c}({d}%) }',
backgroundColor: '#F6F8FC',
borderColor: '#8C8D8E',
borderWidth: 1,
borderRadius: 4,
rich: {
hr: {
borderColor: '#8C8D8E',
width: '100%',
borderWidth: 1,
height: 0
},
b: {
color: '#4C5058',
fontSize:10,
lineHeight:20,
align: 'center',
},
c: {
color: '#4C5058',
fontSize:8,
lineHeight:20,
align: 'center',
},
}
},
data: [
{ value: 48, name: '转介绍' },
{ value: 35, name: '网络推广' },
{ value: 30, name: '外展外拓' },
{ value: 21, name: '自媒体' },
]
},
]
};
}
function getBarOption() {
return{
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
xAxis: {
type: 'value',
data: []
},
yAxis: {
type: 'category',
data: ['张三', '李四', '王五', '赵六', '孙七', '周八', '吴九','郑十']
},
grid: {
top: '5%',
left: '2%',
right: '5%',
bottom: '3%',
containLabel: true
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130, 10],
type: 'bar',
top: 0,
bottom:'0',
}
]
};
}
+9
View File
@@ -0,0 +1,9 @@
{
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#ff7052",
"backgroundColor": "#ffffff",
"backgroundColorTop": "#ff7052",
"usingComponents": {
"ec-canvas": "../../../ecCanvas/components/ec-canvas/ec-canvas"
}
}
+62
View File
@@ -0,0 +1,62 @@
<view class="container img-top-cover" style="background-image:url({{imgUrl}}storedata/theme.png);">
<view class="text-center pt30 pb30">
<view class="inline-block bg-fff-op20 pt5 pb5 pl20 pr20 font-22 color-fff ulib-r750">
<picker class="inline-block" mode="date" value="{{s_date}}" end="{{current_date}}" bindchange="changeDate" data-type="s_date">
<view>
<text>{{s_date}}</text>
<i class="iconfont ml5 icon-xuanze"></i>
</view>
</picker>
<text class="pl10 pr10">至</text>
<picker class="inline-block" mode="date" value="{{e_date}}" end="{{current_date}}" bindchange="changeDate" data-type="e_date">
<view>
<text>{{e_date}}</text>
<i class="iconfont ml5 icon-xuanze"></i>
</view>
</picker>
</view>
</view>
<view class="mb30 pl30 pr30">
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<view class="relative">
<view class="font-36">{{Pie1title}}</view>
</view>
<lcb-listmore isNoData='{{pie1noData}}' noDataMsg='暂无数据'></lcb-listmore>
<view class="mt50 mb20 relative height-400 z-index-0" wx:if="{{!pie1noData}}">
<view class="absolute wp100 height-400" wx:if="{{showPie1Chart}}">
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecPie1 }}"></ec-canvas>
</view>
</view>
</view>
</view>
<view class="mb30 pl30 pr30">
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<view class="relative">
<view class="font-36">{{Pie2title}}</view>
</view>
<lcb-listmore isNoData='{{pie2noData}}' noDataMsg='暂无数据'></lcb-listmore>
<view class="mt50 mb20 relative height-400 z-index-0" wx:if="{{!pie2noData}}">
<view class="absolute wp100 height-400" wx:if="{{showPie2Chart}}">
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecPie2 }}"></ec-canvas>
</view>
</view>
</view>
</view>
<view class="mb30 pl30 pr30">
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<view class="relative">
<view class="font-36">{{Bartitle}}</view>
</view>
<view class="mt50 mb20 relative z-index-0" style="height:{{Barheight}}rpx;">
<view class="absolute wp100" style="height:{{Barheight}}rpx;" wx:if="{{showBarChart}}">
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecBar }}"></ec-canvas>
</view>
</view>
</view>
</view>
</view>
<lcb-footer></lcb-footer>
+1
View File
@@ -0,0 +1 @@
/* pages/storeData/index.wxss */
+405
View File
@@ -0,0 +1,405 @@
import _ from '../../commons/js/commons';
import popularData from '../../commons/js/lib/popularData';
import * as echarts from '../../ecCanvas/components/ec-canvas/echarts';
const app = getApp()
let lineChartData;
let FunnelChartData;
function lineChart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
canvas.setChart(chart);
let option = lineChartData
chart.setOption(option);
return chart;
}
function FunnelChart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
canvas.setChart(chart);
let option = FunnelChartData
chart.setOption(option);
return chart;
}
Page({
data: {
imgUrl: _.config.imgUrl,//静态图片路径
showFunnelChart:false,//是否显示Funnel图表
ecFunnel:{},
showLineChart:false,//是否显示Line图表
ecLine:{},
daysIndex:0,
daysArray:['近一周','近30日'],
isShowTip:false,
tipIndex:0,
},
onLoad: function (options) {
for (let key in options) {
this.setData({
[key]: options[key]
})
}
popularData.getDateLater(0,0).then(res => {
let s_date = res[0]
s_date= s_date.split('-')[0]+'-'+s_date.split('-')[1]+'-01'
this.setData({
s_date,
e_date:res[1],
current_date:res[1],
})
this.getAppBizStats()
this.getAppBizStats_days()
})
},
//选择日期
changeDate(e){
if(e.currentTarget.dataset.type=="s_date"){
let begin = new Date(e.detail.value).getTime();
let end = new Date(this.data.e_date).getTime();
let day = 0
if(end>=begin){
day = (end - begin)/(24*60*60*1000);
this.setData({
s_date: e.detail.value,
})
}
else{
day = (begin - end)/(24*60*60*1000);
let s_date = this.data.e_date
let e_date = e.detail.value
this.setData({
s_date,
e_date,
})
}
if (day > 365) {
wx.showToast({
title: '请选择一年时间内',
icon: 'none'
})
}
else{
this.getAppBizStats()
}
}
if(e.currentTarget.dataset.type=="e_date"){
let begin = new Date(this.data.s_date).getTime();
let end = new Date(e.detail.value).getTime();
let day = 0
if(end>=begin){
day = (end - begin)/(24*60*60*1000);
this.setData({
e_date: e.detail.value,
})
}
else{
day = (begin - end)/(24*60*60*1000);
let e_date = this.data.s_date
let s_date = e.detail.value
this.setData({
s_date,
e_date,
})
}
if (day > 365) {
wx.showToast({
title: '请选择一年时间内',
icon: 'none'
})
}
else{
this.getAppBizStats()
}
}
},
//数据看板-漏斗
getAppBizStats(){
this.setData({
showFunnelChart:false,
})
let params = {};
params['s_time'] = this.data.s_date;
params['e_time'] = this.data.e_date;
_.apiQuery.getAppBizStats(params).then(res => {
wx.setNavigationBarTitle({
title: res.data.title
})
this.setData({
tabs:res.data.tabs,
})
//FunnelChartData = getFunnelOption()
FunnelChartData = {
series: [
{
name: 'Expected',
type: 'funnel',
top: '1%',
bottom:'5%',
left: '2%',
width: '72%',
label: {
position: 'right',
formatter: '{b}'
},
labelLine: {
show: false
},
itemStyle: {
opacity: 0.7
},
data: []
},
{
name: 'Actual',
type: 'funnel',
top:'1%',
bottom:'5%',
left: '7%',
width: '62%',
maxSize: '62%',
label: {
position: 'inside',
formatter: '{c}',
color: '#000'
},
itemStyle: {
opacity: 0.4,
borderColor: '#fff',
borderWidth:1
},
data: [],
z: 100
}
]
};
if(res.data.funnel.actual_data[0].value==0&&res.data.funnel.actual_data[1].value==0&&res.data.funnel.actual_data[2].value==0){
FunnelChartData.series[1].itemStyle.opacity = 0
}
FunnelChartData.series[0].data = res.data.funnel.expected_data
FunnelChartData.series[1].data = res.data.funnel.actual_data
this.setData({
funneltitle:res.data.funnel.title,
showFunnelChart:true,
['ecFunnel.onInit']:FunnelChart,
})
wx.stopPullDownRefresh()
});
},
//客户/订单走势图
getAppBizStats_days(){
this.setData({
showLineChart:false,
})
let params = {};
params['days'] = this.data.daysIndex == 0?'7':'30';
_.apiQuery.getAppBizStats_days(params).then(res => {
//lineChartData = getLineOption()
lineChartData = {
tooltip: {
trigger: 'axis'
},
legend: {
top: 'bottom',
data: []
},
grid: {
top: '3%',
left: '2%',
right: '5%',
bottom: '20%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: []
},
yAxis: {
type: 'value'
},
series: []
};
lineChartData.legend.data = res.data.legend_data
lineChartData.xAxis.data = res.data.xAxis
lineChartData.series = res.data.series
this.setData({
linetitle:res.data.title,
showLineChart:true,
['ecLine.onInit']:lineChart,
})
wx.stopPullDownRefresh()
});
},
//选择天数
changeDays(e) {
this.setData({
daysIndex: e.detail.value
})
this.getAppBizStats_days()
},
//显示隐藏提示
optShowTip(e) {
this.setData({
isShowTip:!this.data.isShowTip,
})
if(e.currentTarget.dataset.index){
this.setData({
tipIndex:e.currentTarget.dataset.index
})
}
},
//推送链接
pushLink(e) {
if(e.currentTarget.dataset.url){
_.$router.openUrlScheme(e.currentTarget.dataset.url)
}
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh: function () {
this.getAppBizStats()
this.getAppBizStats_days()
},
})
function getFunnelOption() {
return {
// legend: {
// top: 'bottom',
// data: ['客户量', '到店数', '成交数']
// },
series: [
{
name: 'Expected',
type: 'funnel',
top: '1%',
bottom:'5%',
left: '2%',
width: '72%',
label: {
position: 'right',
formatter: '{b}'
},
labelLine: {
show: false
},
itemStyle: {
opacity: 0.7
},
data: [
{ value: 33.3, name: '成交数(10%)' },
{ value: 66.6, name: '到店数(25%)' },
{ value: 100, name: '客户数(100%)' }
]
},
{
name: 'Actual',
type: 'funnel',
top:'1%',
bottom:'5%',
left: '7%',
width: '62%',
maxSize: '62%',
label: {
position: 'inside',
formatter: '{c}',
color: '#000'
},
itemStyle: {
opacity: 0.4,
borderColor: '#fff',
borderWidth:1
},
// emphasis: {
// label: {
// position: 'inside',
// formatter: '{b}: {c}'
// }
// },
data: [
{ value: 20, name: '成交数' },
{ value: 50, name: '到店数' },
{ value:200, name: '客户量' }
],
z: 100
}
]
};
}
function getLineOption() {
return{
tooltip: {
trigger: 'axis'
},
legend: {
top: 'bottom',
data: ['客户数', '订单数',]
},
grid: {
top: '3%',
left: '2%',
right: '5%',
bottom: '20%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['1', '2', '3','4','5','6','7',]
},
yAxis: {
type: 'value'
},
series: [
{
name: '客户数',
type: 'line',
//stack: '总量',//累加
data: [20, 30, 50, 60, 66, 70, 73, ],
smooth: true,
},
{
name: '订单数',
type: 'line',
//stack: '总量',//累加
data: [10, 10, 10,1, 1, 1, 1,],
smooth: true,
},
]
};
}
+9
View File
@@ -0,0 +1,9 @@
{
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#ff7052",
"backgroundColor": "#ffffff",
"backgroundColorTop": "#ff7052",
"usingComponents": {
"ec-canvas": "../../ecCanvas/components/ec-canvas/ec-canvas"
}
}
+96
View File
@@ -0,0 +1,96 @@
<view class="container img-top-cover" style="background-image:url({{imgUrl}}storedata/theme.png);">
<view class="text-center pt30 pb30">
<view class="inline-block bg-fff-op20 pt5 pb5 pl20 pr20 font-22 color-fff ulib-r750">
<picker class="inline-block" mode="date" value="{{s_date}}" end="{{current_date}}" bindchange="changeDate" data-type="s_date">
<view>
<text>{{s_date}}</text>
<i class="iconfont ml5 icon-xuanze"></i>
</view>
</picker>
<text class="pl10 pr10">至</text>
<picker class="inline-block" mode="date" value="{{e_date}}" end="{{current_date}}" bindchange="changeDate" data-type="e_date">
<view>
<text>{{e_date}}</text>
<i class="iconfont ml5 icon-xuanze"></i>
</view>
</picker>
</view>
</view>
<view class="mt10 mb40 pl30 pr30 fn-flex text-center color-fff">
<block wx:for='{{tabs}}' wx:key='index'>
<view class="fn-flex-item">
<view class="inline-block text-left">
<view bindtap="optShowTip" data-index="{{index}}">
<view class="inline-block relative">
<text class="font-40">{{item.value_1}}</text>
<text class="font-28">{{item.value_2}}</text>
<i class="absolute font-24 iconfont icon-ziyuan" style="top:-10rpx;right:-20rpx;"></i>
</view>
</view>
<view class="pt10 font-22" bindtap="pushLink" data-url="{{item.url}}?s_date={{s_date}}&e_date={{e_date}}&current_date={{current_date}}">
<text>{{item.title}}</text>
<i class="iconfont ml5 icon-gengduo"></i>
</view>
</view>
</view>
</block>
</view>
<view class="mb30 pl30 pr30">
<view class="relative inner30 pb60 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<view class="relative">
<view class="font-36">{{funneltitle}}</view>
<!-- <picker class="absolute right-0 box-middle" bindchange="changeCity" value="{{cityIndex}}" range="{{cityArray}}">
<view class="pt10 pb10 pl20 pr20 bg-f6 ulib-r10 font-22">
<text>厦门</text>
<text>{{cityArray[cityIndex]}}</text>
<i class="iconfont ml10 icon-xiala color-999"></i>
</view>
</picker> -->
</view>
<view class="mt50 mb20 relative height-400 z-index-0">
<view class="absolute wp100 height-400" wx:if="{{showFunnelChart}}">
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecFunnel }}"></ec-canvas>
</view>
</view>
<view class="absolute left-0 bottom-0 mb40 wp100 text-center font-22 color-999">注:时间跨度越大越具参考性</view>
</view>
</view>
<view class="mb30 pl30 pr30">
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<view class="relative">
<view class="font-36">{{linetitle}}</view>
<picker class="absolute right-0 box-middle" bindchange="changeDays" value="{{daysIndex}}" range="{{daysArray}}">
<view class="pt10 pb10 pl20 pr20 bg-f6 ulib-r10 font-22">
<text>{{daysArray[daysIndex]}}</text>
<i class="iconfont ml10 icon-xiala color-999"></i>
</view>
</picker>
</view>
<view class="mt50 mb20 relative height-500 z-index-0">
<view class="absolute wp100 height-500" wx:if="{{showLineChart}}">
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecLine }}"></ec-canvas>
</view>
</view>
</view>
</view>
</view>
<lcb-footer></lcb-footer>
<lcb-msg isShow="{{isShowTip}}">
<view slot="content">
<view class="inner40 pt50 pb50 line-height-18 font-26 color-666" style="width:520rpx;">
<view class="text-center">
<text wx:if="{{tipIndex==0}}">发生在时间周期内的\n [客户建档] / [进店客户]</text>
<text wx:elif="{{tipIndex==1}}">发生在时间周期内的\n [企微添加好友] / [企微好友完善手机号码]</text>
<text wx:elif="{{tipIndex==2}}">发生在时间周期内的\n [下定订单] / [退款订单]</text>
</view>
</view>
<view class="bts-1-eb text-center font-32 color-666">
<view class="pt25 pb25 color-36afa2" bindtap="optShowTip">知道了</view>
</view>
</view>
</lcb-msg>
+1
View File
@@ -0,0 +1 @@
/* pages/storeData/index.wxss */
+624
View File
@@ -0,0 +1,624 @@
import _ from '../../../commons/js/commons';
import popularData from '../../../commons/js/lib/popularData';
import * as echarts from '../../../ecCanvas/components/ec-canvas/echarts';
const app = getApp()
let BarChartData;
let Pie1ChartData;
let Pie2ChartData;
function BarChart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
canvas.setChart(chart);
let option = BarChartData
chart.setOption(option);
chart.on('click',function(e){
console.log(e)
});
return chart;
}
function Pie1Chart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
canvas.setChart(chart);
let option = Pie1ChartData
chart.setOption(option);
chart.on('click',function(e){
console.log(e)
});
return chart;
}
function Pie2Chart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
canvas.setChart(chart);
let option = Pie2ChartData
chart.setOption(option);
chart.on('click',function(e){
//_.eventBus.emit("pinpai",e.name)
});
return chart;
}
Page({
data: {
imgUrl: _.config.imgUrl,//静态图片路径
showPie1Chart:false,//是否显示Pie1图表
ecPie1:{},
showPie2Chart:false,//是否显示Pie2图表
ecPie2:{},
showBarChart:false,//是否显示Bar图表
ecBar:{},
},
onLoad: function (options) {
for (let key in options) {
this.setData({
[key]: options[key]
})
}
// popularData.getDateLater(0,0).then(res => {
// this.setData({
// s_date:res[0],
// e_date:res[1],
// current_date:res[1],
// })
// })
this.getAppBizStats_order()
// //消息通讯 是否显示授权用户信息按钮
// _.eventBus.on("pinpai", this, function(res){
// this.setData({
// showPie2Chart:false,
// })
// Pie2ChartData = {
// tooltip: {
// fontSize:10,
// trigger: 'item',
// formatter: '{b}: {c} ({d}%)'
// },
// series: [
// {
// name: 'Access From',
// type: 'pie',
// selectedMode: 'single',
// radius: [0, '30%'],
// label: {
// position: 'inner',
// fontSize: 10
// },
// labelLine: {
// show: false
// },
// data: []
// },
// {
// name: 'Access From',
// type: 'pie',
// radius: ['45%', '65%'],
// labelLine: {
// fontSize:5,
// length:10
// },
// label: {
// formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
// backgroundColor: '#F6F8FC',
// borderColor: '#8C8D8E',
// borderWidth: 1,
// borderRadius: 4,
// rich: {
// hr: {
// borderColor: '#8C8D8E',
// width: '100%',
// borderWidth: 1,
// height: 0
// },
// b: {
// color: '#4C5058',
// fontSize:10,
// lineHeight:20,
// align: 'center',
// },
// c: {
// color: '#4C5058',
// fontSize:8,
// lineHeight:20,
// align: 'center',
// },
// }
// },
// data: []
// },
// ]
// };
// Pie2ChartData.series[0].data = this.data.pie2.series_data
// if(res == '成交'){
// Pie2ChartData.series[1].data = this.data.pie2.series_data_1
// }
// else if(res == '退定'){
// Pie2ChartData.series[1].data = this.data.pie2.series_data_2
// }
// this.setData({
// showPie2Chart:true,
// ['ecPie2.onInit']:Pie2Chart,
// })
// })
},
// //生命周期函数--监听页面卸载
// onUnload: function () {
// //卸载消息通讯 是否显示授权用户信息
// _.eventBus.remove('pinpai',this);
// },
//选择日期
changeDate(e){
if(e.currentTarget.dataset.type=="s_date"){
let begin = new Date(e.detail.value).getTime();
let end = new Date(this.data.e_date).getTime();
let day = 0
if(end>=begin){
day = (end - begin)/(24*60*60*1000);
this.setData({
s_date: e.detail.value,
})
}
else{
day = (begin - end)/(24*60*60*1000);
let s_date = this.data.e_date
let e_date = e.detail.value
this.setData({
s_date,
e_date,
})
}
if (day > 365) {
wx.showToast({
title: '请选择一年时间内',
icon: 'none'
})
}
else{
this.getAppBizStats_order()
}
}
if(e.currentTarget.dataset.type=="e_date"){
let begin = new Date(this.data.s_date).getTime();
let end = new Date(e.detail.value).getTime();
let day = 0
if(end>=begin){
day = (end - begin)/(24*60*60*1000);
this.setData({
e_date: e.detail.value,
})
}
else{
day = (begin - end)/(24*60*60*1000);
let e_date = this.data.s_date
let s_date = e.detail.value
this.setData({
s_date,
e_date,
})
}
if (day > 365) {
wx.showToast({
title: '请选择一年时间内',
icon: 'none'
})
}
else{
this.getAppBizStats_order()
}
}
},
//订单数据
getAppBizStats_order(){
this.setData({
showPie1Chart:false,
showPie2Chart:false,
showBarChart:false,
})
let params = {};
params['s_time'] = this.data.s_date;
params['e_time'] = this.data.e_date;
_.apiQuery.getAppBizStats_order(params).then(res => {
wx.setNavigationBarTitle({
title: res.data.title
})
this.setData({
Pie1title:res.data.pie1.title,
Pie2title:res.data.pie2.title,
Bartitle:res.data.bar.title,
})
// Pie1ChartData = getPie1Option()
if(res.data.pie1.series_data.length==0){
this.setData({
pie1noData:true,
})
}else{
Pie1ChartData = {
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
},
series: [
{
name: 'Access From',
type: 'pie',
bottom:'15%',
radius: ['40%', '70%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: false,
position: 'center'
},
labelLine: {
fontSize:5,
length:10
},
label: {
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
backgroundColor: '#F6F8FC',
borderColor: '#8C8D8E',
borderWidth: 1,
borderRadius: 4,
rich: {
hr: {
borderColor: '#8C8D8E',
width: '100%',
borderWidth: 1,
height: 0
},
b: {
color: '#4C5058',
fontSize:10,
lineHeight:20,
align: 'center',
},
c: {
color: '#4C5058',
fontSize:8,
lineHeight:20,
align: 'center',
},
}
},
data: []
}
]
};
Pie1ChartData.series[0].data = res.data.pie1.series_data
this.setData({
pie1noData:false,
showPie1Chart:true,
['ecPie1.onInit']:Pie1Chart,
pie1Bottom:res.data.pie1.bottom,
})
}
// Pie2ChartData = getPie2Option()
if(res.data.pie2.series_data.length==0){
this.setData({
pie2noData:true,
})
}else{
Pie2ChartData = {
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
},
series: [
{
name: 'Access From',
type: 'pie',
bottom:'15%',
radius: ['40%', '70%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: false,
position: 'center'
},
labelLine: {
fontSize:5,
length:10
},
label: {
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
backgroundColor: '#F6F8FC',
borderColor: '#8C8D8E',
borderWidth: 1,
borderRadius: 4,
rich: {
hr: {
borderColor: '#8C8D8E',
width: '100%',
borderWidth: 1,
height: 0
},
b: {
color: '#4C5058',
fontSize:10,
lineHeight:20,
align: 'center',
},
c: {
color: '#4C5058',
fontSize:8,
lineHeight:20,
align: 'center',
},
}
},
data: []
}
]
};
Pie2ChartData.series[0].data = res.data.pie2.series_data_1
this.setData({
pie2noData:false,
showPie2Chart:true,
['ecPie2.onInit']:Pie2Chart,
pie2Bottom:res.data.pie2.bottom,
//pie2:res.data.pie2,
})
}
//BarChartData = getBarOption()
BarChartData = {
tooltip: {
trigger: 'axis'
},
grid: {
top: '1%',
left: '5%',
right: '5%',
bottom: '1%',
containLabel: true
},
calculable: true,
xAxis: {
type: 'value',
data: []
},
yAxis: {
type: 'category',
data: []
},
series: []
};
BarChartData.yAxis.data = res.data.bar.xAxis_data
BarChartData.series = res.data.bar.series
this.setData({
Barheight:100 + 100*(res.data.bar.xAxis_data.length),
showBarChart:true,
['ecBar.onInit']:BarChart,
})
wx.stopPullDownRefresh()
});
},
//推送链接
pushLink(e) {
if(e.currentTarget.dataset.url){
_.$router.openUrlScheme(e.currentTarget.dataset.url)
}
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh: function () {
this.getAppBizStats_order()
},
})
function getPie1Option() {
return {
// tooltip: {
// trigger: 'item',
// formatter: '{b}: {c} ({d}%)'
// },
series: [
{
name: 'Access From',
type: 'pie',
bottom:'10%',
radius: ['40%', '70%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: false,
position: 'center'
},
labelLine: {
fontSize:5,
length:10
},
label: {
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
backgroundColor: '#F6F8FC',
borderColor: '#8C8D8E',
borderWidth: 1,
borderRadius: 4,
rich: {
hr: {
borderColor: '#8C8D8E',
width: '100%',
borderWidth: 1,
height: 0
},
b: {
color: '#4C5058',
fontSize:10,
lineHeight:20,
align: 'center',
},
c: {
color: '#4C5058',
fontSize:8,
lineHeight:20,
align: 'center',
},
}
},
data: [
{ value: 48, name: '转介绍' },
{ value: 35, name: '网络推广' },
{ value: 30, name: '外展外拓' },
{ value: 21, name: '自媒体' },
]
}
]
};
}
function getPie2Option() {
return {
tooltip: {
fontSize:10,
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
},
series: [
{
name: 'Access From',
type: 'pie',
selectedMode: 'single',
radius: [0, '30%'],
label: {
position: 'inner',
fontSize: 10
},
labelLine: {
show: false
},
data: [
{ value: 258, name:'成交',selected:true},
{ value: 77, name: '退定' },
]
},
{
name: 'Access From',
type: 'pie',
radius: ['45%', '65%'],
labelLine: {
fontSize:5,
length:10
},
label: {
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
backgroundColor: '#F6F8FC',
borderColor: '#8C8D8E',
borderWidth: 1,
borderRadius: 4,
rich: {
hr: {
borderColor: '#8C8D8E',
width: '100%',
borderWidth: 1,
height: 0
},
b: {
color: '#4C5058',
fontSize:10,
lineHeight:20,
align: 'center',
},
c: {
color: '#4C5058',
fontSize:8,
lineHeight:20,
align: 'center',
},
}
},
data: [
{ value: 48, name: '东风EV' },
{ value: 35, name: '岚图' },
{ value: 30, name: '哪吒' },
{ value: 21, name: '领跑' },
]
},
]
};
}
function getBarOption() {
return{
tooltip: {
trigger: 'axis'
},
grid: {
top: '8%',
left: '5%',
right: '5%',
bottom: '5%',
containLabel: true
},
calculable: true,
xAxis: {
type: 'value',
data: []
},
yAxis: {
type: 'category',
data: ['张三', '李四', '王五', '赵六', '孙七', '周八', '吴九','郑十']
},
series: [
{
name: '客户数',
type: 'bar',
data: [
2, 4, 7, 76, 135, 162, 6, 3
],
},
{
name: '订单数',
type: 'bar',
data: [
1, 2, 5, 70, 115.6, 122, 3, 2
],
}
]
};
}
+10
View File
@@ -0,0 +1,10 @@
{
"navigationBarTitleText": "订单数据",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#ff7052",
"backgroundColor": "#ffffff",
"backgroundColorTop": "#ff7052",
"usingComponents": {
"ec-canvas": "../../../ecCanvas/components/ec-canvas/ec-canvas"
}
}
+64
View File
@@ -0,0 +1,64 @@
<view class="container img-top-cover" style="background-image:url({{imgUrl}}storedata/theme.png);">
<view class="text-center pt30 pb30">
<view class="inline-block bg-fff-op20 pt5 pb5 pl20 pr20 font-22 color-fff ulib-r750">
<picker class="inline-block" mode="date" value="{{s_date}}" end="{{current_date}}" bindchange="changeDate" data-type="s_date">
<view>
<text>{{s_date}}</text>
<i class="iconfont ml5 icon-xuanze"></i>
</view>
</picker>
<text class="pl10 pr10">至</text>
<picker class="inline-block" mode="date" value="{{e_date}}" end="{{current_date}}" bindchange="changeDate" data-type="e_date">
<view>
<text>{{e_date}}</text>
<i class="iconfont ml5 icon-xuanze"></i>
</view>
</picker>
</view>
</view>
<view class="mb30 pl30 pr30">
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<view class="relative">
<view class="font-36">{{Pie1title}}</view>
</view>
<lcb-listmore isNoData='{{pie1noData}}' noDataMsg='暂无数据'></lcb-listmore>
<view class="mt50 mb20 relative height-400 z-index-0" wx:if="{{!pie1noData}}">
<view class="absolute wp100 height-400" wx:if="{{showPie1Chart}}">
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecPie1 }}"></ec-canvas>
</view>
<view class="absolute left-0 bottom-0 right-0 text-center font-22 color-888">{{pie1Bottom}}</view>
</view>
</view>
</view>
<view class="mb30 pl30 pr30">
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<view class="relative">
<view class="font-36">{{Pie2title}}</view>
</view>
<lcb-listmore isNoData='{{pie2noData}}' noDataMsg='暂无数据'></lcb-listmore>
<view class="mt50 mb20 relative height-400 z-index-0" wx:if="{{!pie2noData}}">
<view class="absolute wp100 height-400" wx:if="{{showPie2Chart}}">
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecPie2 }}"></ec-canvas>
</view>
<view class="absolute left-0 bottom-0 right-0 text-center font-22 color-888">{{pie2Bottom}}</view>
</view>
</view>
</view>
<view class="mb30 pl30 pr30">
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<view class="relative">
<view class="font-36">{{Bartitle}}</view>
</view>
<view class="mt50 mb20 relative z-index-0" style="height:{{Barheight}}rpx;">
<view class="absolute wp100" style="height:{{Barheight}}rpx;" wx:if="{{showBarChart}}">
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecBar }}"></ec-canvas>
</view>
</view>
</view>
</view>
</view>
<lcb-footer></lcb-footer>
+1
View File
@@ -0,0 +1 @@
/* pages/storeData/index.wxss */
+319
View File
@@ -0,0 +1,319 @@
import _ from '../../../commons/js/commons';
import popularData from '../../../commons/js/lib/popularData';
import * as echarts from '../../../ecCanvas/components/ec-canvas/echarts';
const app = getApp()
let Bar1ChartData;
let Bar2ChartData;
function Bar1Chart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
canvas.setChart(chart);
let option = Bar1ChartData
chart.setOption(option);
chart.on('click',function(e){
console.log(e)
});
return chart;
}
function Bar2Chart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
canvas.setChart(chart);
let option = Bar2ChartData
chart.setOption(option);
chart.on('click',function(e){
console.log(e)
});
return chart;
}
Page({
data: {
imgUrl: _.config.imgUrl,//静态图片路径
showBar1Chart:false,//是否显示Bar图表
ecBar1:{},
showBar2Chart:false,//是否显示Bar图表
ecBar2:{},
},
onLoad: function (options) {
for (let key in options) {
this.setData({
[key]: options[key]
})
}
// popularData.getDateLater(0,0).then(res => {
// this.setData({
// s_date:res[0],
// e_date:res[1],
// current_date:res[1],
// })
// })
this.getAppBizStats_wxqy()
},
//选择日期
changeDate(e){
if(e.currentTarget.dataset.type=="s_date"){
let begin = new Date(e.detail.value).getTime();
let end = new Date(this.data.e_date).getTime();
let day = 0
if(end>=begin){
day = (end - begin)/(24*60*60*1000);
this.setData({
s_date: e.detail.value,
})
}
else{
day = (begin - end)/(24*60*60*1000);
let s_date = this.data.e_date
let e_date = e.detail.value
this.setData({
s_date,
e_date,
})
}
if (day > 365) {
wx.showToast({
title: '请选择一年时间内',
icon: 'none'
})
}
else{
this.getAppBizStats_wxqy()
}
}
if(e.currentTarget.dataset.type=="e_date"){
let begin = new Date(this.data.s_date).getTime();
let end = new Date(e.detail.value).getTime();
let day = 0
if(end>=begin){
day = (end - begin)/(24*60*60*1000);
this.setData({
e_date: e.detail.value,
})
}
else{
day = (begin - end)/(24*60*60*1000);
let e_date = this.data.s_date
let s_date = e.detail.value
this.setData({
s_date,
e_date,
})
}
if (day > 365) {
wx.showToast({
title: '请选择一年时间内',
icon: 'none'
})
}
else{
this.getAppBizStats_wxqy()
}
}
},
//企微数据
getAppBizStats_wxqy(){
this.setData({
showBar1Chart:false,
showBar2Chart:false,
})
let params = {};
params['s_time'] = this.data.s_date;
params['e_time'] = this.data.e_date;
_.apiQuery.getAppBizStats_wxqy(params).then(res => {
wx.setNavigationBarTitle({
title: res.data.title
})
//Bar1ChartData = getBar1Option()
Bar1ChartData = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
xAxis: {
type: 'value',
data: []
},
yAxis: {
type: 'category',
data: []
},
grid: {
top: '1%',
left: '2%',
right: '5%',
bottom: '1%',
containLabel: true
},
series: [
{
data: [],
type: 'bar',
top: 0,
bottom:'0',
}
]
};
Bar1ChartData.yAxis.data = res.data.bar1.xAxis_data
Bar1ChartData.series[0].data = res.data.bar1.series_data
this.setData({
Bar1height:100 + 50*(res.data.bar1.xAxis_data.length),
Bar1title:res.data.bar1.title,
showBar1Chart:true,
['ecBar1.onInit']:Bar1Chart,
})
//Bar2ChartData = getBar2Option()
Bar2ChartData = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
xAxis: {
type: 'value',
data: []
},
yAxis: {
type: 'category',
data: []
},
grid: {
top: '1%',
left: '2%',
right: '1%',
bottom: '3%',
containLabel: true
},
series: [
{
data: [],
type: 'bar',
top: 0,
bottom:'0',
}
]
};
Bar2ChartData.yAxis.data = res.data.bar2.xAxis_data
Bar2ChartData.series[0].data = res.data.bar2.series_data
this.setData({
Bar2height:100 + 50*(res.data.bar2.xAxis_data.length),
Bar2title:res.data.bar2.title,
showBar2Chart:true,
['ecBar2.onInit']:Bar2Chart,
})
wx.stopPullDownRefresh()
});
},
//推送链接
pushLink(e) {
if(e.currentTarget.dataset.url){
_.$router.openUrlScheme(e.currentTarget.dataset.url)
}
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh: function () {
this.getAppBizStats_wxqy()
},
})
function getBar1Option() {
return{
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
xAxis: {
type: 'value',
data: []
},
yAxis: {
type: 'category',
data: ['张三', '李四', '王五', '赵六', '孙七', '周八', '吴九','郑十']
},
grid: {
top: '5%',
left: '2%',
right: '5%',
bottom: '3%',
containLabel: true
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130, 10],
type: 'bar',
top: 0,
bottom:'0',
}
]
};
}
function getBar2Option() {
return{
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
xAxis: {
type: 'value',
data: []
},
yAxis: {
type: 'category',
data: ['张三', '李四', '王五', '赵六', '孙七', '周八', '吴九','郑十']
},
grid: {
top: '5%',
left: '2%',
right: '5%',
bottom: '3%',
containLabel: true
},
series: [
{
data: [20, 20, 10, 20, 20, 20, 25, 2],
type: 'bar',
top: 0,
bottom:'0',
}
]
};
}
+9
View File
@@ -0,0 +1,9 @@
{
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#ff7052",
"backgroundColor": "#ffffff",
"backgroundColorTop": "#ff7052",
"usingComponents": {
"ec-canvas": "../../../ecCanvas/components/ec-canvas/ec-canvas"
}
}
+47
View File
@@ -0,0 +1,47 @@
<view class="container img-top-cover" style="background-image:url({{imgUrl}}storedata/theme.png);">
<view class="text-center pt30 pb30">
<view class="inline-block bg-fff-op20 pt5 pb5 pl20 pr20 font-22 color-fff ulib-r750">
<picker class="inline-block" mode="date" value="{{s_date}}" end="{{current_date}}" bindchange="changeDate" data-type="s_date">
<view>
<text>{{s_date}}</text>
<i class="iconfont ml5 icon-xuanze"></i>
</view>
</picker>
<text class="pl10 pr10">至</text>
<picker class="inline-block" mode="date" value="{{e_date}}" end="{{current_date}}" bindchange="changeDate" data-type="e_date">
<view>
<text>{{e_date}}</text>
<i class="iconfont ml5 icon-xuanze"></i>
</view>
</picker>
</view>
</view>
<view class="mb30 pl30 pr30">
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<view class="relative">
<view class="font-36">{{Bar1title}}</view>
</view>
<view class="mt50 mb20 relative z-index-0" style="height:{{Bar1height}}rpx;">
<view class="absolute wp100" style="height:{{Bar1height}}rpx;" wx:if="{{showBar1Chart}}">
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecBar1 }}"></ec-canvas>
</view>
</view>
</view>
</view>
<view class="mb30 pl30 pr30">
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
<view class="relative">
<view class="font-36">{{Bar2title}}</view>
</view>
<view class="mt50 mb20 relative z-index-0" style="height:{{Bar2height}}rpx;">
<view class="absolute wp100" style="height:{{Bar2height}}rpx;" wx:if="{{showBar2Chart}}">
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecBar2 }}"></ec-canvas>
</view>
</view>
</view>
</view>
</view>
<lcb-footer></lcb-footer>
+1
View File
@@ -0,0 +1 @@
/* pages/storeData/index.wxss */