确定随车物品
This commit is contained in:
@@ -87,6 +87,8 @@ api = {
|
||||
materialHomeBiz:'material/home/biz', //店铺海报
|
||||
materialHomePosters:'material/home/posters', //保存店铺海报
|
||||
|
||||
appDelivery:'app/delivery', //获取车辆确定随车资料
|
||||
|
||||
}
|
||||
|
||||
//远程图片存储地址
|
||||
|
||||
@@ -558,4 +558,11 @@ apiQuery.putMaterialHomePosters = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
//获取车辆确定随车资料
|
||||
apiQuery.getAppDelivery = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appDelivery, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
export default apiQuery;
|
||||
+142
-27
@@ -33,6 +33,11 @@ Page({
|
||||
},
|
||||
],
|
||||
isChangePayway:false,//合同付款方式是否修改
|
||||
remark:'',//补充说明
|
||||
carInfoList:[],//随车资料选项
|
||||
ckcarInfo:[],//随车资料选中内容
|
||||
carToolList:[],//随车随车工具选项
|
||||
ckcarTool:[],//随车工具选中内容
|
||||
},
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
@@ -67,6 +72,9 @@ Page({
|
||||
info:res.data,
|
||||
payway:res.data.payway,
|
||||
pack_id:res.data.pack_id,
|
||||
remark:res.data.ckcar_data.remark,//补充说明
|
||||
ckcarInfo:res.data.ckcar_data.info,//随车资料选中内容
|
||||
ckcarTool:res.data.ckcar_data.tool,//随车工具选中内容
|
||||
})
|
||||
|
||||
this.getAppLoan()
|
||||
@@ -74,11 +82,62 @@ Page({
|
||||
this.getAppServicesPackage()
|
||||
}
|
||||
|
||||
if(res.data.ckcar_status==1){
|
||||
this.getAppDelivery()
|
||||
}
|
||||
|
||||
wx.stopPullDownRefresh()
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
//获取车辆确定随车资料
|
||||
getAppDelivery(){
|
||||
_.apiQuery.getAppDelivery().then(res=>{
|
||||
|
||||
let delivery = res.data
|
||||
let carInfoList = []
|
||||
let ckcar_data = this.data.info.ckcar_data
|
||||
delivery.info.forEach(item => {
|
||||
carInfoList.push({
|
||||
title:item,
|
||||
checked:false,
|
||||
})
|
||||
})
|
||||
if(ckcar_data.info.length>0){
|
||||
carInfoList.forEach(item1 => {
|
||||
ckcar_data.info.forEach(item2 => {
|
||||
if(item1.title == item2){
|
||||
item1.checked = true
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
let carToolList = []
|
||||
delivery.tool.forEach(item => {
|
||||
carToolList.push({
|
||||
title:item,
|
||||
checked:false,
|
||||
})
|
||||
})
|
||||
if(ckcar_data.tool.length>0){
|
||||
carToolList.forEach(item1 => {
|
||||
ckcar_data.tool.forEach(item2 => {
|
||||
if(item1.title == item2){
|
||||
item1.checked = true
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
this.setData({
|
||||
carInfoList,
|
||||
carToolList,
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
//获取贷款产品信息
|
||||
getAppLoan(){
|
||||
let params = {};
|
||||
@@ -525,36 +584,54 @@ Page({
|
||||
|
||||
//确认交付
|
||||
putAppCusorderCkcar(){
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title:'确认交付?',
|
||||
content:'',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.setData({
|
||||
submitFlag: true,
|
||||
})
|
||||
let params = {};
|
||||
params['id'] = that.data.id;
|
||||
_.apiQuery.putAppCusorderCkcar(params).then(res => {
|
||||
|
||||
if(this.data.ckcarInfo.length == 0){
|
||||
wx.showToast({
|
||||
title: '请选择随车资料',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if(this.data.ckcarTool.length == 0){
|
||||
wx.showToast({
|
||||
title: '请选择随车工具',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else{
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title:'确认随车物品?',
|
||||
content:'',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.setData({
|
||||
submitFlag: false,
|
||||
submitFlag: true,
|
||||
})
|
||||
that.getAppCusorderDetails()
|
||||
|
||||
wx.showToast({
|
||||
title: '交付成功',
|
||||
icon: 'success'
|
||||
})
|
||||
|
||||
}).catch(res=>{
|
||||
that.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
});
|
||||
let params = {};
|
||||
params['id'] = that.data.id;
|
||||
params['info'] = that.data.ckcarInfo;
|
||||
params['tool'] = that.data.ckcarTool;
|
||||
params['remark'] = that.data.remark;
|
||||
_.apiQuery.putAppCusorderCkcar(params).then(res => {
|
||||
that.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
that.getAppCusorderDetails()
|
||||
|
||||
wx.showToast({
|
||||
title: '交付成功',
|
||||
icon: 'success'
|
||||
})
|
||||
|
||||
}).catch(res=>{
|
||||
that.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//客服微信码
|
||||
@@ -598,6 +675,44 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//随车资料
|
||||
changeMaterial(e) {
|
||||
let carInfoList = this.data.carInfoList
|
||||
let values = e.detail.value
|
||||
carInfoList.forEach(item1 => {
|
||||
item1.checked = false
|
||||
values.forEach(item2 => {
|
||||
if(item1.title == item2){
|
||||
item1.checked = true
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
this.setData({
|
||||
ckcarInfo:e.detail.value,
|
||||
carInfoList,
|
||||
})
|
||||
},
|
||||
|
||||
//随车工具
|
||||
changeTool(e) {
|
||||
let carToolList = this.data.carToolList
|
||||
let values = e.detail.value
|
||||
carToolList.forEach(item1 => {
|
||||
item1.checked = false
|
||||
values.forEach(item2 => {
|
||||
if(item1.title == item2){
|
||||
item1.checked = true
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
this.setData({
|
||||
ckcarTool:e.detail.value,
|
||||
carToolList,
|
||||
})
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh(){
|
||||
this.getAppCusorderDetails()
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx">{{value}}{{key == '车辆合同售价' || key == '定金'?'元':'' }}</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="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 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="">
|
||||
<view class="mt40 pl30 pr30 font-22 relative">
|
||||
@@ -141,6 +141,63 @@
|
||||
<view class="mt20" wx:if="{{info.bill_data.bill_img}}"><image bindtap="previewImage" class='wp100' lazy-load="{{true}}" mode="widthFix" src="{{info.bill_data.bill_img}}"></image></view>
|
||||
</view>
|
||||
|
||||
<!--交付随车信息-->
|
||||
<view class="mt30 pl30" wx:if="{{info.ckcar_status == 1}}">
|
||||
<view>
|
||||
<view class="bts-1-eb mr30 pt30 pb20 font-28 color-333">随车资料</view>
|
||||
<view class="pb10 fn-clear">
|
||||
<checkbox-group bindchange="changeMaterial">
|
||||
<block wx:for="{{carInfoList}}" wx:key='index'>
|
||||
<label class="fn-fl block mb20 relative inner30 pr80 bg-f6 font-28 ulib-r10 mr20">
|
||||
<text>{{item.title}}</text>
|
||||
<checkbox class="absolute right-0 box-middle mr15" value="{{item.title}}" checked="{{item.checked}}"/>
|
||||
</label>
|
||||
</block>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="bts-1-eb mr30 pt30 pb20 font-28 color-333">随车工具</view>
|
||||
<view class="pb10 fn-clear">
|
||||
<checkbox-group bindchange="changeTool">
|
||||
<block wx:for="{{carToolList}}" wx:key='index'>
|
||||
<label class="fn-fl block mb20 relative inner30 pr80 bg-f6 font-28 ulib-r10 mr20">
|
||||
<text>{{item.title}}</text>
|
||||
<checkbox class="absolute right-0 box-middle mr15" value="{{item.title}}" checked="{{item.checked}}"/>
|
||||
</label>
|
||||
</block>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pr30">
|
||||
<view class="bts-1-eb pt30 pb20 font-28 color-333">补充说明</view>
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" style="height:120rpx;" placeholder-class="color-ccc" maxlength='140' placeholder="请输入补充说明" model:value="{{remark}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="pt30 pl30 pr30" wx:if="{{info.ckcar_status == 0&&info.ckcar_data.info.length>0}}">
|
||||
<view class="relative bts-1-eb bbs-1-eb pl140 font-28">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">随车资料</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">
|
||||
<block wx:for="{{info.ckcar_data.info}}" wx:key='index'>
|
||||
<text class="pl10">{{item}}</text>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl140 font-28">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">随车工具</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">
|
||||
<block wx:for="{{info.ckcar_data.tool}}" wx:key='index'>
|
||||
<text class="pl10">{{item}}</text>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl140 font-28">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">补充说明</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{info.ckcar_data.remark}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--end交付随车信息-->
|
||||
|
||||
<view class="mt60 pl60 pr60" wx:if="{{info.loan_status == -10000}}"><!--210909不显示-->
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="{{info.loan_data.id?'putAppLoan':'postAppLoan'}}">{{info.loan_data.id?'修改信息':'保存信息'}}</button>
|
||||
</view>
|
||||
@@ -148,7 +205,7 @@
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="{{info.bill_data.id?'putAppIdcard':'postAppIdcard'}}">申请开票</button>
|
||||
</view>
|
||||
<view class="mt60 pl60 pr60" wx:elif="{{info.ckcar_status == 1}}">
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="putAppCusorderCkcar">确认交付</button>
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="putAppCusorderCkcar">确认随车物品</button>
|
||||
</view>
|
||||
|
||||
<view class="mt40 pt20 pl30 pr30 pb40 bg-000-op80 fn-flex">
|
||||
|
||||
@@ -1 +1,19 @@
|
||||
/* pages/order/detail/index.wxss */
|
||||
/*复选框外框样式*/
|
||||
checkbox .wx-checkbox-input {
|
||||
width:30rpx;
|
||||
height:30rpx;
|
||||
border-color: #999;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
/* 选中后的 背景样式*/
|
||||
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
border-color: #36afa2;
|
||||
background: #36afa2;
|
||||
}
|
||||
/*复选框选中后内部样式*/
|
||||
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
|
||||
font-size:20rpx;
|
||||
color:#fff;
|
||||
transform:translate(-50%, -50%) scale(1);
|
||||
-webkit-transform:translate(-50%, -50%) scale(1);
|
||||
}
|
||||
@@ -227,7 +227,7 @@
|
||||
</view>
|
||||
<view class="fixed left-0 right-0 bottom-0 bg-fff-op90 inner40 fn-flex safe-pb">
|
||||
<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="optPreview">重新编辑</button>
|
||||
<button class="wp100 btn-36afa2 ml20 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="putAppCusorder2">确认登记</button>
|
||||
<button class="wp100 btn-36afa2 ml20 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="putAppCusorder2">确认编辑</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
@@ -1 +1,19 @@
|
||||
/* pages/order/register/index.wxss */
|
||||
/*复选框外框样式*/
|
||||
checkbox .wx-checkbox-input {
|
||||
width:30rpx;
|
||||
height:30rpx;
|
||||
border-color: #999;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
/* 选中后的 背景样式*/
|
||||
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
border-color: #36afa2;
|
||||
background: #36afa2;
|
||||
}
|
||||
/*复选框选中后内部样式*/
|
||||
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
|
||||
font-size:20rpx;
|
||||
color:#fff;
|
||||
transform:translate(-50%, -50%) scale(1);
|
||||
-webkit-transform:translate(-50%, -50%) scale(1);
|
||||
}
|
||||
Reference in New Issue
Block a user