diff --git a/commons/js/config.js b/commons/js/config.js
index e17e090..f4e2e9c 100644
--- a/commons/js/config.js
+++ b/commons/js/config.js
@@ -87,6 +87,8 @@ api = {
materialHomeBiz:'material/home/biz', //店铺海报
materialHomePosters:'material/home/posters', //保存店铺海报
+ appDelivery:'app/delivery', //获取车辆确定随车资料
+
}
//远程图片存储地址
diff --git a/commons/js/utils/apiQuery.js b/commons/js/utils/apiQuery.js
index 1852952..d554ca0 100644
--- a/commons/js/utils/apiQuery.js
+++ b/commons/js/utils/apiQuery.js
@@ -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;
\ No newline at end of file
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index ea322c7..0c23772 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -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()
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
index dbafd5d..2937741 100644
--- a/pages/order/detail/index.wxml
+++ b/pages/order/detail/index.wxml
@@ -30,7 +30,7 @@
{{value}}{{key == '车辆合同售价' || key == '定金'?'元':'' }}
- 已缴意向金{{info.inten_money}}元
+ 已缴意向金{{info.inten_money}}元
+
+
+ 随车资料
+
+
+
+
+
+
+
+
+
+ 随车工具
+
+
+
+
+
+
+
+
+
+ 补充说明
+
+
+
+
+
+ 随车资料
+
+
+ {{item}}
+
+
+
+
+ 随车工具
+
+
+ {{item}}
+
+
+
+
+ 补充说明
+ {{info.ckcar_data.remark}}
+
+
+
+
@@ -148,7 +205,7 @@
-
+
diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss
index 1212f54..a7e8ebf 100644
--- a/pages/order/detail/index.wxss
+++ b/pages/order/detail/index.wxss
@@ -1 +1,19 @@
-/* pages/order/detail/index.wxss */
\ No newline at end of file
+/*复选框外框样式*/
+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);
+}
\ No newline at end of file
diff --git a/pages/order/edit/index.wxml b/pages/order/edit/index.wxml
index 5830564..490c0fa 100644
--- a/pages/order/edit/index.wxml
+++ b/pages/order/edit/index.wxml
@@ -227,7 +227,7 @@
-
+
diff --git a/pages/order/edit/index.wxss b/pages/order/edit/index.wxss
index fa87606..a7e8ebf 100644
--- a/pages/order/edit/index.wxss
+++ b/pages/order/edit/index.wxss
@@ -1 +1,19 @@
-/* pages/order/register/index.wxss */
\ No newline at end of file
+/*复选框外框样式*/
+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);
+}
\ No newline at end of file