Commit 04d34ea2 by 张立顺

场景名称修改

2 parents 2344c9be 5a795d7c
Showing 31 changed files with 451 additions and 188 deletions
// packageEquity/pages/carEquity/components/GLForm/GLForm.js // packageEquity/pages/carEquity/components/GLForm/GLForm.js
Component({ Component({
options: {
multipleSlots: true // 在组件定义时的选项中启用多 slot 支持
},
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
formData: { formData: {
type: Object, type: Object,
value: () => {}, value: () => { },
observer: function (n) { observer: function (n) {
this.setData({ this.setData({
formData: n formData: n
...@@ -71,11 +74,9 @@ Component({ ...@@ -71,11 +74,9 @@ Component({
let { attr } = e.target.dataset let { attr } = e.target.dataset
let { dataAttrName } = this.data let { dataAttrName } = this.data
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
// console.log('value', value)
thisPage.setData({ thisPage.setData({
[dataAttrName + '.' + attr]: value [dataAttrName + '.' + attr]: value
}) })
// console.log(thisPage.data)
}, },
handlePickerChange(e) { handlePickerChange(e) {
let idx = e.detail.value || 0 let idx = e.detail.value || 0
......
<!-- packageEquity/pages/carEquity/components/GLForm/GLForm.wxml --> <!-- packageEquity/pages/carEquity/components/GLForm/GLForm.wxml -->
<view wx:for="{{formDataList}}" wx:key="index"> <view wx:for="{{formDataList}}" wx:key="index">
<<<<<<< HEAD
<gl-cell <gl-cell
border="{{!item.noBorder}}" border="{{!item.noBorder}}"
class="{{item.name}}" class="{{item.name}}"
...@@ -66,3 +67,38 @@ ...@@ -66,3 +67,38 @@
</gl-cell> </gl-cell>
</view> </view>
=======
<gl-cell border="{{!item.noBorder}}" class="{{item.name}}" haveArrow="{{item.haveArrow || false}}" valueAlign="right" label="{{item.label}}" labelWidth="{{item.labelWidth || labelWidth}}" placeholder="{{item.placeholder || ''}}" bindclick="handleCellClick" data-target="{{item}}" data-idx="{{index}}" cellHeight="{{!item.noCellHeight}}">
<!-- slot -->
<slot wx:if="{{item.type == 'slot'}}" name="{{item.name}}"></slot>
<!-- input / textarea -->
<view wx:if="{{item.type == 'input'}}" class="input-box">
<van-field class="textarea" custom-style="padding: 20rpx 0;" border="{{ false}}" value="{{formData[item.name]}}" input-align="{{itme.inputAlign || 'right'}}" rows="1" autosize type="{{item.fieldType || 'text'}}" placeholder="{{item.placeholder || '请输入'}}" maxlength="{{item.maxlength || 140}}" disabled="{{item.disabled}}" readonly="{{item.readonly}}" data-attr="{{item.name}}" bindinput="handleInput" />
<text wx:if="{{item.suffix}}" class="input-suffix">{{item.suffix}}</text>
</view>
<!-- picker -->
<picker wx:if="{{item.type == 'select'}}" bindchange="handlePickerChange" data-target="{{item}}" value="{{index}}" range="{{item.optionList}}" range-key="{{item.optionLabel}}">
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
<!-- 时间选择器 -->
<picker wx:if="{{item.type == 'pickerTime'}}" mode="date" value="{{formData[name]}}" start="{{item.start || ''}}" end="{{item.end || ''}}" bindchange="handleTimeChange" data-target="{{item}}">
<view class="picker">
<image class="arrow" src="../../../components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.name]}}">{{formData[item.name]}}</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
<!-- 品牌车型 -->
<view wx:if="{{item.type == 'brand'}}" class="brand">
<view wx:if="{{formData.vehicleBrandId}}">{{formData.vehicleBrandName || ''}}/{{formData.vehicleSubBrandName || ''}}/{{formData.vehicleSeriesName || ''}}/{{formData.vehicleShapeName || ''}}</view>
<view wx:else class="placeholder-class">{{item.placeholder || '请选择'}}</view>
</view>
</gl-cell>
</view>
>>>>>>> 5a795d7ccc559e7f95caa1d91fb88ff74ae1ae9f
/* packageEquity/pages/carEquity/components/GLForm/GLForm.wxss */ /* packageEquity/pages/carEquity/components/GLForm/GLForm.wxss */
.input { .input-box {
display: flex;
justify-content: space-between;
}
.textarea {
text-align: right; text-align: right;
font-size: 28rpx; font-size: 28rpx;
flex-grow: 1;
}
.input-suffix {
height: 88rpx;
line-height: 88rpx;
margin-left: 4rpx;
} }
.placeholder-class { .placeholder-class {
...@@ -34,3 +46,8 @@ ...@@ -34,3 +46,8 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.brand {
text-align: right;
padding: 40rpx 0;
}
\ No newline at end of file \ No newline at end of file
...@@ -47,7 +47,8 @@ Page({ ...@@ -47,7 +47,8 @@ Page({
this.setData({ this.setData({
storeListRange: result, storeListRange: result,
userInfo, userInfo,
selectStroeIndex selectStroeIndex,
showPage: true
}) })
}) })
.catch(err => {}) .catch(err => {})
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</navigation-bar> </navigation-bar>
<!-- style="margin-top:{{navBarHeight}}px" --> <!-- style="margin-top:{{navBarHeight}}px" -->
<view class="layout" style="padding-top:{{navBarHeight}}px; height: calc(100vh - {{navBarHeight}}px);"> <view class="layout" style="padding-top:{{navBarHeight}}px; height: calc(100vh - {{navBarHeight}}px);">
<block wx:if="{{navBarHeight}}"> <block wx:if="{{navBarHeight && showPage}}">
<quotation-list id="page-0" navBarHeight="{{navBarHeight}}" class="{{tabIndex == 0?'':'hide'}}" /> <quotation-list id="page-0" navBarHeight="{{navBarHeight}}" class="{{tabIndex == 0?'':'hide'}}" />
<equity-list id="page-1" navBarHeight="{{navBarHeight}}" class="{{tabIndex == 1?'':'hide'}}" /> <equity-list id="page-1" navBarHeight="{{navBarHeight}}" class="{{tabIndex == 1?'':'hide'}}" />
</block> </block>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<tab-bar tabList="{{tabList}}" bindclick="tabClick" /> <tab-bar tabList="{{tabList}}" bindclick="tabClick" />
</view> </view>
<view class="total-box">总订单 · <text>{{statisticsObj.totalOder}}</text> 待补单 · <text style="color: #E7AA47;">{{statisticsObj.ladingOder}}</text> 提单失败 · <text style="color: #D26F6B;">{{statisticsObj.failed}}</text></view> <view class="total-box">总订单 · <text>{{statisticsObj.totalOder}}</text> 待补单 · <text style="color: #E7AA47;">{{statisticsObj.ladingOder}}</text> 提单失败 · <text style="color: #D26F6B;">{{statisticsObj.failed}}</text></view>
<view class="tips-box"> <view wx:if="{{tabIndex != 3 && list.length}}" class="tips-box">
<tips-bottom custom-class="tips-custom" style="width: 100%;box-sizing: border-box;" tipsProps="{{tipsProps}}" /> <tips-bottom custom-class="tips-custom" style="width: 100%;box-sizing: border-box;" tipsProps="{{tipsProps}}" />
</view> </view>
<view wx:if="{{flag}}" class="order-box"> <view wx:if="{{flag}}" class="order-box">
...@@ -74,9 +74,10 @@ ...@@ -74,9 +74,10 @@
<view class="list-nothing">到底了~</view> <view class="list-nothing">到底了~</view>
</block> </block>
</block> </block>
<block wx:else> <view class="no-data" wx:else>
<image class="no-data-img" src="/packageEquity/images/noData.png"></image>
<view class="list-not">暂无数据</view> <view class="list-not">暂无数据</view>
</block> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -480,6 +480,16 @@ ...@@ -480,6 +480,16 @@
height: 64rpx; height: 64rpx;
} }
.no-data {
text-align: center;
margin-top: 128rpx;
}
.no-data-img {
width: 160rpx;
height: 160rpx;
}
.list-nothing, .list-nothing,
.list-not { .list-not {
text-align: center; text-align: center;
......
// packageEquity/pages/carEquity/components/FirstStep/FirstStep.js // packageEquity/pages/carEquity/components/FirstStep/FirstStep.js
import data from '../constant/data' import constantData from '../constant/firstStepData'
import fn from '../constant/ruleFn' import fn from '../constant/ruleFn'
const defaultLabelWidth = '140rpx' const defaultLabelWidth = '140rpx'
import api from '~/api/api' import api from '~/api/api'
import carLifeApi from '../../../../carEquityApi' // import carLifeApi from '../../../../carEquityApi'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -17,6 +17,11 @@ Component({ ...@@ -17,6 +17,11 @@ Component({
formData: n formData: n
}) })
} }
},
// 页面存放表单对象的对象名,用于直接变更page的值
dataAttrName: {
type: String,
value: null
} }
}, },
...@@ -25,104 +30,63 @@ Component({ ...@@ -25,104 +30,63 @@ Component({
*/ */
data: { data: {
defaultLabelWidth, defaultLabelWidth,
formData: {}, // formData: {},
employeeList: [], employeeList: [],
formRule: data.formRule, secondObj: constantData.secondObj,
// 品牌车型 formRule: constantData.formRule
brandBox: false
}, },
lifetimes: { // lifetimes: {
attached() { // attached() {
wx.$eventbus.on("set_car_info", (n) => { // this.getEmployee()
let { formData } = this.data // }
if (formData) { // },
formData = Object.assign(formData, n)
this.setData({
formData,
carInfo: n,
})
}
})
this.getEmployee()
}
},
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
// showPopup(e) { // 获取推荐人列表
// let { showName } = e.currentTarget.dataset // getEmployee() {
// let userInfo = wx.$util.getStorageSync('dj_boutique_user_info')
// let params = {
// merchantId: userInfo.merchantId
// }
// carLifeApi.getEmployeeList(params).then(res => {
// if (res.code == 0) {
// this.setData({ // this.setData({
// [showName]: true // employeeList: res.data
// })
// } else {
// wx.$util.showToast(res.message || '接口异常')
// }
// }) // })
// }, // },
// 获取推荐人列表
getEmployee() {
let userInfo = wx.$util.getStorageSync('dj_boutique_user_info')
let params = {
merchantId: userInfo.merchantId
}
carLifeApi.getEmployeeList(params).then(res => {
if (res.code == 0) {
this.setData({
employeeList: res.data
})
} else {
wx.$util.showToast(res.message || '接口异常')
}
})
},
// 推荐人 // 删除图片
handleSalesChange(e) { handleDelete(e) {
let idx = e.detail.value || 0 let { attr } = e.currentTarget.dataset
this.setData({ let { dataAttrName } = this.data
'formData.actualSalesPersonId': this.data.employeeList[idx].uuid, let thisPage = wx.$router.getPageInstance()
'formData.actualSalesPerson': this.data.employeeList[idx].staffName thisPage.setData({
[dataAttrName + '.' + attr]: ''
}) })
}, },
// 品牌车型 // 放大图片
handleJumpBrand(e) { handlePreviewImg(e) {
// let { let { attr } = e.currentTarget.dataset
// detail: { brandInfo }, let { dataAttrName } = this.data
// carInfo, let thisPage = wx.$router.getPageInstance()
// } = this.data wx.previewImage({
// { name } = e.currentTarget.dataset, urls: [thisPage.data[dataAttrName][attr]],
// chooseItem = Object.keys(carInfo).length; })
// if (name == "carSeries") {
// console.log(carInfo);
// if (chooseItem || hasDefaultBrands) {
// let id = chooseItem
// ? carInfo.vehicleSubBrandId
// : brandInfo.vehicleSubBrandId,
// name = chooseItem
// ? carInfo.vehicleSubBrandName
// : brandInfo.vehicleSubBrandName,
// list = [
// {
// id,
// name,
// childs: null,
// },
// ];
// wx.$router.go("/pages/crowdfunding/carSeries/carSeries", {
// brandInfo: chooseItem ? carInfo : brandInfo,
// list,
// });
// return;
// }
// }
// wx.$router.go("/packageEquity/pages/carEquity/carBrands/carBrands");
wx.$router.go("packageEquity.carBrands")
}, },
handleUpload(e) { handleUpload(e) {
let _this = this
let { attr } = e.currentTarget.dataset let { attr } = e.currentTarget.dataset
let { dataAttrName } = this.data
let thisPage = wx.$router.getPageInstance()
wx.chooseImage({ wx.chooseImage({
count: 1, count: 1,
success(res) { success(res) {
...@@ -141,11 +105,10 @@ Component({ ...@@ -141,11 +105,10 @@ Component({
}) })
.then(img => { .then(img => {
wx.$util.hideLoading() wx.$util.hideLoading()
console.log(img)
let { code, data, message } = img let { code, data, message } = img
if (code == 0) { if (code == 0) {
_this.setData({ thisPage.setData({
['formData.' + attr]: data [dataAttrName + '.' + attr]: data
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -157,19 +120,8 @@ Component({ ...@@ -157,19 +120,8 @@ Component({
}) })
}, },
handleInput(e) {
let { value } = e.detail
let { attr } = e.currentTarget.dataset
this.setData({
['formData.' + attr]: value
})
},
handleDraft() { handleDraft() {
var { formData, formRule } = this.data this.triggerEvent('draft', { type: 'draft' })
this.triggerEvent('draft', { type: 'draft', formData })
}, },
handleConfirm() { handleConfirm() {
...@@ -182,7 +134,7 @@ Component({ ...@@ -182,7 +134,7 @@ Component({
// }) // })
return return
} }
this.triggerEvent('confirm', { formData }) this.triggerEvent('confirm')
} }
} }
}) })
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"gl-form": "/packageEquity/components/GLForm/GLForm"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -2,37 +2,29 @@ ...@@ -2,37 +2,29 @@
<view> <view>
<view class="box m-b-40"> <view class="box m-b-40">
<view class="title">服务信息</view> <view class="title">服务信息</view>
<gl-cell border valueAlign="right" label="推荐人" labelWidth="{{defaultLabelWidth}}"> <gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.carFormList}}">
<picker bindchange="handleSalesChange" value="{{index}}" range="{{employeeList}}" range-key="staffName"> <!-- 照片 -->
<view class="picker"> <view slot="tireUrl" class="tire-box">
<image class="arrow" src="../../../../../components/images/arrow-x.png" /> <view class="tire-label">轮胎资料</view>
<view class="text-hide" wx:if="{{formData.actualSalesPerson}}">{{formData.actualSalesPerson}}</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
</gl-cell>
<gl-cell border valueAlign="right" label="品牌车型" labelWidth="{{defaultLabelWidth}}" haveArrow bindclick="handleJumpBrand" placeholder="请选择">
<view wx:if="{{formData.vehicleBrandId}}">{{formData.vehicleBrandName}}/{{formData.vehicleSubBrandName}}/{{formData.vehicleSeriesName}}/{{formData.vehicleShapeName}}</view>
</gl-cell>
<gl-cell border valueAlign="right" label="轮胎品牌" labelWidth="{{defaultLabelWidth}}">
<input class="input" placeholder-class="placeholder-class" value="{{formData.tireBrand}}" placeholder="请输入" data-attr="tireBrand" bindinput="handleInput"></input>
</gl-cell>
<gl-cell label="轮胎资料" labelWidth="{{defaultLabelWidth}}">
</gl-cell>
<view class="tire-box">
<view class="flex"> <view class="flex">
<view class="tire-block" bindtap="handleUpload" data-attr="frontTireUrl"> <view class="tire-block" bindtap="handleUpload" data-attr="frontTireUrl">
<image wx:if="{{formData.frontTireUrl}}" src="{{formData.frontTireUrl}}" /> <view wx:if="{{serviceInfo.frontTireUrl}}" class="tire-img-box" catchtap="handlePreviewImg" data-attr="frontTireUrl">
<image class="icon-delete" catchtap="handleDelete" data-attr="frontTireUrl" src="/packageEquity/images/icon-delete.png" />
<image class="tire-img" src="{{serviceInfo.frontTireUrl}}" />
</view>
<view wx:else> <view wx:else>
<image class="icon-plus" src="../../../../../components/images/order-camera.png" /> <image class="icon-plus" src="/packageEquity/images/icon-plus.png" />
<view>轮胎照片</view> <view>轮胎照片</view>
<view>(前轮)</view> <view>(前轮)</view>
</view> </view>
</view> </view>
<view class="tire-block" bindtap="handleUpload" data-attr="rearTireUrl"> <view class="tire-block" bindtap="handleUpload" data-attr="rearTireUrl">
<image wx:if="{{formData.rearTireUrl}}" src="{{formData.rearTireUrl}}" /> <view wx:if="{{serviceInfo.rearTireUrl}}" class="tire-img-box" catchtap="handlePreviewImg" data-attr="rearTireUrl">
<image class="icon-delete" catchtap="handleDelete" data-attr="rearTireUrl" src="/packageEquity/images/icon-delete.png" />
<image class="tire-img" src="{{serviceInfo.rearTireUrl}}" />
</view>
<view wx:else> <view wx:else>
<image class="icon-plus" src="../../../../../components/images/order-camera.png" /> <image class="icon-plus" src="/packageEquity/images/icon-plus.png" />
<view>轮胎照片</view> <view>轮胎照片</view>
<view>(后轮)</view> <view>(后轮)</view>
</view> </view>
...@@ -40,6 +32,7 @@ ...@@ -40,6 +32,7 @@
</view> </view>
<view class="tire-tip">轮胎资料将影响客户权益补偿,请及时上传!</view> <view class="tire-tip">轮胎资料将影响客户权益补偿,请及时上传!</view>
</view> </view>
</gl-form>
</view> </view>
<button class="btn" bindtap="handleConfirm">下一步(1/2)</button> <button class="btn" bindtap="handleConfirm">下一步(1/2)</button>
<button class="btn draft-btn" bindtap="handleDraft">存草稿</button> <button class="btn draft-btn" bindtap="handleDraft">存草稿</button>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
border-radius: 16rpx; border-radius: 16rpx;
margin: 20rpx; margin: 20rpx;
color: #222222; color: #222222;
overflow: hidden;
} }
.m-b-40 { .m-b-40 {
...@@ -60,11 +61,17 @@ ...@@ -60,11 +61,17 @@
} }
.tire-box { .tire-box {
padding: 0 40rpx 44rpx; padding: 40rpx 0 44rpx;
font-size: 28rpx; font-size: 28rpx;
color: #9B9B9E; color: #9B9B9E;
} }
.tire-label {
font-size: 28rpx;
color: #222222;
margin-bottom: 24rpx;
}
.tire-block { .tire-block {
width: 240rpx; width: 240rpx;
height: 240rpx; height: 240rpx;
...@@ -74,12 +81,33 @@ ...@@ -74,12 +81,33 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
border-radius: 8rpx;
overflow: hidden;
} }
.tire-block:first-child { .tire-block:first-child {
margin-right: 20rpx; margin-right: 20rpx;
} }
.tire-img-box {
position: relative;
width: 100%;
height: 100%;
}
.tire-img-box .tire-img {
width: 100%;
height: 100%;
}
.icon-delete {
position: absolute;
top: 16rpx;
right: 16rpx;
width: 48rpx;
height: 48rpx;
}
.tire-tip { .tire-tip {
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
......
// packageEquity/pages/carEquity/components/SecondStep/SecondStep.js // packageEquity/pages/carEquity/components/SecondStep/SecondStep.js
import data from '../constant/secondStepData' import constantData from '../constant/secondStepData'
import fn from '../constant/ruleFn' import fn from '../constant/ruleFn'
const defaultLabelWidth = '140rpx' const defaultLabelWidth = '140rpx'
Component({ Component({
...@@ -23,14 +23,26 @@ Component({ ...@@ -23,14 +23,26 @@ Component({
*/ */
data: { data: {
defaultLabelWidth, defaultLabelWidth,
secondObj: data.secondObj, secondObj: constantData.secondObj,
formRule: data.formRule formRule: constantData.formRule,
isShowObj: {
car: true,
customer: true,
product: true,
store: true
}
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
handleUpDown(e) {
let { attr } = e.currentTarget.dataset
this.setData({
['isShowObj.' + attr]: !this.data.isShowObj[attr]
})
},
getPageData() { getPageData() {
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
return thisPage?.data[this.data.dataAttrName] return thisPage?.data[this.data.dataAttrName]
......
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"gl-form": "../../../../components/GLForm/GLForm" "gl-form": "/packageEquity/components/GLForm/GLForm"
} }
} }
...@@ -3,30 +3,58 @@ ...@@ -3,30 +3,58 @@
<view class="box"> <view class="box">
<view class="title"> <view class="title">
<view>车辆信息</view> <view>车辆信息</view>
<view class="flex">
<view class="ocrBtn" data-type="vehicleCertificate" bind:tap="navOcr"> <view class="ocrBtn" data-type="vehicleCertificate" bind:tap="navOcr">
<image data-type="vehicleCertificate" data-ocrType="car" class="pictureIcon" src="/packageEquity/images/pictureIcon.png" binderror="" bindload="" /> <image data-type="vehicleCertificate" data-ocrType="car" class="pictureIcon" src="/packageEquity/images/pictureIcon.png" binderror="" bindload="" />
<view class="text" data-type="vehicleCertificate">拍照识别</view> <view class="text" data-type="vehicleCertificate">拍照识别</view>
</view> </view>
<view class="up-down-box" bindtap="handleUpDown" data-attr="car">
<view class="up-down-arrow">
<view class="arrow-up {{isShowObj.car ? '' : 'arrow-down'}}"></view>
</view> </view>
<gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.carFormList}}"></gl-form> </view>
</view>
</view>
<gl-form wx:if="{{isShowObj.car}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.carFormList}}"></gl-form>
</view> </view>
<view class="box"> <view class="box">
<view class="title"> <view class="title">
<view>客户信息</view> <view>客户信息</view>
<view class="flex">
<view class="ocrBtn" data-type="idCard" bind:tap="navOcr"> <view class="ocrBtn" data-type="idCard" bind:tap="navOcr">
<image data-type="idCard" data-ocrType="idCard" class="pictureIcon" src="/packageEquity/images/pictureIcon.png" binderror="" bindload="" /> <image data-type="idCard" data-ocrType="idCard" class="pictureIcon" src="/packageEquity/images/pictureIcon.png" binderror="" bindload="" />
<view class="text" data-type="idCard">拍照识别</view> <view class="text" data-type="idCard">拍照识别</view>
</view> </view>
<view class="up-down-box" bindtap="handleUpDown" data-attr="customer">
<view class="up-down-arrow">
<view class="arrow-up {{isShowObj.customer ? '' : 'arrow-down'}}"></view>
</view>
</view> </view>
<gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.customerFormList}}"></gl-form> </view>
</view>
<gl-form wx:if="{{isShowObj.customer}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.customerFormList}}"></gl-form>
</view> </view>
<view class="box"> <view class="box">
<view class="title">产品信息</view> <view class="title">
<gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.productFormList}}"></gl-form> <view>产品信息</view>
<view class="up-down-box" bindtap="handleUpDown" data-attr="product">
<view class="up-down-arrow">
<view class="arrow-up {{isShowObj.product ? '' : 'arrow-down'}}"></view>
</view>
</view>
</view>
<gl-form wx:if="{{isShowObj.product}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.productFormList}}"></gl-form>
</view> </view>
<view class="box m-b-40"> <view class="box m-b-40">
<view class="title">店面信息</view> <view class="title">
<gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.storeFormList}}"></gl-form> <view>店面信息</view>
<view class="up-down-box" bindtap="handleUpDown" data-attr="store">
<view class="up-down-arrow">
<view class="arrow-up {{isShowObj.store ? '' : 'arrow-down'}}"></view>
</view>
</view>
</view>
<gl-form wx:if="{{isShowObj.store}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.storeFormList}}"></gl-form>
</view> </view>
<button class="btn" bindtap="handleConfirm">确认提交(2/2)</button> <button class="btn" bindtap="handleConfirm">确认提交(2/2)</button>
<button class="btn draft-btn" bindtap="handleDraft">存草稿</button> <button class="btn draft-btn" bindtap="handleDraft">存草稿</button>
......
...@@ -5,12 +5,48 @@ ...@@ -5,12 +5,48 @@
border-radius: 16rpx; border-radius: 16rpx;
margin: 20rpx; margin: 20rpx;
color: #222222; color: #222222;
overflow: hidden;
} }
.m-b-40 { .m-b-40 {
margin-bottom: 40rpx; margin-bottom: 40rpx;
} }
.up-down-box {
display: flex;
justify-content: center;
align-items: center;
height: 48rpx;
margin-left: 32rpx;
}
.up-down-arrow {
display: flex;
justify-content: center;
align-items: center;
width: 48rpx;
height: 32rpx;
background: #F4F5F7;
border-radius: 16rpx;
text-align: center;
}
.arrow-up {
width: 10rpx;
height: 10rpx;
border: 2rpx solid #B6B6B8;
border-width: 2rpx 2rpx 0 0;
transform: rotate(-45deg);
transition: all .3s;
margin-top: 4rpx;
}
.arrow-down {
transform: rotate(135deg);
transition: all .3s;
margin-top: 0;
}
.flex { .flex {
display: flex; display: flex;
} }
......
const formRule = {
actualSalesPersonId: [
{ required: true, message: '推荐人不能为空' },
// {
// validator: (rule, value) => {
// return value != 'cwq' ? { message: '不为cwq--' } : null
// }
// }
],
vehicleBrandId: [{ required: true, message: '汽车品牌不能为空' }],
vehicleSubBrandId: [{ required: true, message: '汽车子品牌不能为空' }],
vehicleSeriesId: [{ required: true, message: '车系不能为空' }],
vehicleShapeId: [{ required: true, message: '车型不能为空' }],
tireBrand: [{ required: true, message: '轮胎品牌不能为空' }],
frontTireUrl: [{ required: true, message: '请上传前轮胎图片' }],
rearTireUrl: [{ required: true, message: '请上传后轮胎图片' }],
}
const phoneRex = /^[1]([3-9])[0-9]{9}$/ const phoneRex = /^[1]([3-9])[0-9]{9}$/
// 0:待补录 3:提单失败 2:提单成功 // 0:待补录 3:提单失败 2:提单成功
...@@ -28,7 +10,7 @@ const equityStatusList = [{ ...@@ -28,7 +10,7 @@ const equityStatusList = [{
confName: '待补单', confName: '待补单',
confId: '0' confId: '0'
}, { }, {
confName: '提单成功', confName: '已完成',
confId: '2' confId: '2'
}, { }, {
confName: '提单失败', confName: '提单失败',
...@@ -36,7 +18,6 @@ const equityStatusList = [{ ...@@ -36,7 +18,6 @@ const equityStatusList = [{
}] }]
export default { export default {
formRule,
phoneRex, phoneRex,
equityStatusObj, equityStatusObj,
equityStatusList equityStatusList
......
import constantList from './constantList'
import data from './data'
const formRule = {
// actualSalesPersonId: [{ required: true, message: '推荐人不能为空' }],
vehicleBrandId: [{ required: true, message: '汽车品牌不能为空' }],
vehicleSubBrandId: [{ required: true, message: '汽车子品牌不能为空' }],
vehicleSeriesId: [{ required: true, message: '车系不能为空' }],
vehicleShapeId: [{ required: true, message: '车型不能为空' }],
tireBrand: [{ required: true, message: '轮胎品牌不能为空' }],
frontTireSpecification: [{ required: true, message: '规格型号(前轮)不能为空' }],
rearTireSpecification: [{ required: true, message: '规格型号(后轮)不能为空' }]
// frontTireUrl: [{ required: true, message: '请上传前轮胎图片' }],
// rearTireUrl: [{ required: true, message: '请上传后轮胎图片' }],
}
const secondObj = {
carFormList: [{
label: '品牌车系',
name: 'vehicleBrandId',
labelName: 'brandTxt',
type: 'brand',
haveArrow: true,
noCellHeight: true,
placeholder: '请选择'
}, {
label: '轮胎品牌',
name: 'tireBrand',
type: 'input',
maxlength: '20'
}, {
label: '规格型号(前轮)',
name: 'frontTireSpecification',
type: 'input',
maxlength: '20'
}, {
label: '规格型号(后轮)',
name: 'rearTireSpecification',
type: 'input',
maxlength: '20'
}, {
label: ' ',
name: 'tireUrl',
type: 'slot',
labelWidth: '0rpx',
noCellHeight: true
}],
}
export default {
constantList,
formRule,
secondObj
}
\ No newline at end of file \ No newline at end of file
...@@ -93,13 +93,8 @@ const secondObj = { ...@@ -93,13 +93,8 @@ const secondObj = {
labelName: 'brandTxt', labelName: 'brandTxt',
type: 'brand', type: 'brand',
haveArrow: true, haveArrow: true,
noCellHeight: true,
placeholder: '请选择' placeholder: '请选择'
// handleChange: function (that, dataAttrName, brandObj) {
// console.log(brandObj,'brandObj--')
// that.setData({
// [dataAttrName + '.brandTxt']: brandObj.vehicleBrandName + '/' + brandObj.vehicleSeriesName + '/' + brandObj.vehicleShapeName + '/' + brandObj.vehicleSubBrandName
// })
// }
}], }],
customerFormList: [{ customerFormList: [{
label: '客户类型', label: '客户类型',
...@@ -145,7 +140,8 @@ const secondObj = { ...@@ -145,7 +140,8 @@ const secondObj = {
label: '服务年限', label: '服务年限',
name: 'servicePeriod', name: 'servicePeriod',
type: 'input', type: 'input',
disabled: true disabled: true,
suffix: '年'
}, { }, {
label: '生效日期', label: '生效日期',
name: 'effectiveDate', name: 'effectiveDate',
......
...@@ -45,6 +45,7 @@ Page({ ...@@ -45,6 +45,7 @@ Page({
const filePath = res.tempFilePath const filePath = res.tempFilePath
wx.openDocument({ wx.openDocument({
filePath: filePath, filePath: filePath,
fileType: 'pdf',
showMenu: true, showMenu: true,
success: function (res) { success: function (res) {
console.log('打开文档成功') console.log('打开文档成功')
......
...@@ -32,7 +32,6 @@ Page({ ...@@ -32,7 +32,6 @@ Page({
step: 'first', step: 'first',
// step: 'second', // step: 'second',
routeInfo: {}, routeInfo: {},
// isSuccessDialog: false,
contractNo: '', contractNo: '',
apiObj: { apiObj: {
detail: 'getEquityDetail', detail: 'getEquityDetail',
...@@ -123,7 +122,6 @@ Page({ ...@@ -123,7 +122,6 @@ Page({
} }
carLifeApi[apiObj[routeInfo?.apiName]](params).then(res => { carLifeApi[apiObj[routeInfo?.apiName]](params).then(res => {
if (res.code == 0) { if (res.code == 0) {
console.log(res.data, '000')
let data = this.dealData(res.data) let data = this.dealData(res.data)
this.setData({ this.setData({
serviceInfo: data serviceInfo: data
...@@ -153,20 +151,13 @@ Page({ ...@@ -153,20 +151,13 @@ Page({
}) })
}, },
handleFirstDraft(e) {
let { formData } = e.detail
this.setData({
serviceInfo: formData
})
this.handleSecondConfirm(e)
},
handleFirstConfirm(e) { handleFirstConfirm(e) {
let { formData } = e.detail
this.setData({ this.setData({
serviceInfo: formData,
step: 'second' step: 'second'
}) })
wx.setNavigationBarTitle({
title: '服务信息确认'
})
}, },
dealComfirmData(obj) { dealComfirmData(obj) {
...@@ -274,19 +265,17 @@ Page({ ...@@ -274,19 +265,17 @@ Page({
this.setData({ this.setData({
userInfo: wx.$util.getStorageSync('dj_boutique_user_info') userInfo: wx.$util.getStorageSync('dj_boutique_user_info')
}) })
//删--- //删---start
this.setData({ this.setData({
routeInfo: options routeInfo: options
}) })
this.getDetail() this.getDetail()
//删---end
wx.$router.getData(res => { wx.$router.getData(res => {
this.setData({ this.setData({
routeInfo: res routeInfo: res
}) })
console.log(this.data.routeInfo) console.log(this.data.routeInfo)
// wx.setNavigationBarTitle({
// title: res.brandInfo.vehicleBrandName || ''
// })
this.getDetail() this.getDetail()
}) })
}, },
......
{ {
"navigationBarTitleText": "车辆和车主信息", "navigationBarTitleText": "服务信息录入",
"usingComponents": { "usingComponents": {
"first-step": "../components/FirstStep/FirstStep", "first-step": "../components/FirstStep/FirstStep",
"second-step": "../components/SecondStep/SecondStep", "second-step": "../components/SecondStep/SecondStep",
......
<!--packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxml--> <!--packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxml-->
<view class="layout"> <view class="layout">
<first-step wx:if="{{step == 'first'}}" id="FirstStep" serviceInfo="{{serviceInfo}}" bindconfirm="handleFirstConfirm" binddraft="handleFirstDraft"></first-step> <first-step wx:if="{{step == 'first'}}" id="FirstStep" serviceInfo="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bindconfirm="handleFirstConfirm" binddraft="handleSecondConfirm"></first-step>
<second-step wx:if="{{step == 'second'}}" id="SecondStep" serviceInfo="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bindconfirm="handleSecondConfirm" binddraft="handleSecondConfirm"></second-step> <second-step wx:if="{{step == 'second'}}" id="SecondStep" serviceInfo="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bindconfirm="handleSecondConfirm" binddraft="handleSecondConfirm"></second-step>
<shade-tip isShow="{{isDialogShow}}" type="{{dialogObj.type}}" title="{{dialogObj.title}}" tipTxt="{{dialogObj.tipTxt}}" btnTxt="{{dialogObj.btnTxt}}" bindclick="handleTipClick" data-type="{{dialogObj.type}}"></shade-tip> <shade-tip isShow="{{isDialogShow}}" type="{{dialogObj.type}}" title="{{dialogObj.title}}" tipTxt="{{dialogObj.tipTxt}}" btnTxt="{{dialogObj.btnTxt}}" bindclick="handleTipClick" data-type="{{dialogObj.type}}"></shade-tip>
</view> </view>
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxss */ /* packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxss */
.layout { .layout {
height: 100vh;
background: #F4F5F7; background: #F4F5F7;
padding-bottom: 60rpx; padding: 20rpx 0 60rpx;
} }
\ No newline at end of file \ No newline at end of file
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
/* margin-top: 50rpx; */ /* margin-top: 50rpx; */
color: #222222; color: #222222;
overflow: hidden;
} }
.employeeBox { .employeeBox {
......
...@@ -33,6 +33,10 @@ Component({ ...@@ -33,6 +33,10 @@ Component({
{ {
label: '支付时间', label: '支付时间',
key: 'payTime' key: 'payTime'
},
{
label: '创建时间',
key: 'createdTime'
} }
], ],
statisticsObj: {}, statisticsObj: {},
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
</view> </view>
<!-- style="margin-top:{{navBarHeight}}px" --> <!-- style="margin-top:{{navBarHeight}}px" -->
<view class="main"> <view class="main">
<<<<<<< HEAD
<view class="to-box"> <view class="to-box">
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
...@@ -167,3 +168,111 @@ ...@@ -167,3 +168,111 @@
bindload="" /> bindload="" />
</view> </view>
=======
<view class="to-box">
<view class="search-box">
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="请输入客户名字搜索" class="input" confirm-type="search" value="{{customerName}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{customerName}}">
<image src="/images/clear.png" class="search-clear" bindtap="handleReset" />
</block>
</view>
</view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick" />
</view>
<view class="total-box">{{tabIndex == 0 ? '总订单' : tabList[tabIndex]}} · {{total}}</view>
<view wx:if="{{flag}}" class="order-box">
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="search" bindscrolltolower="onBottomRefresh" class="list" style="height:calc(100vh - {{navBarHeight}}px - 300px - 60px);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<block wx:if="{{list.length > 0}}">
<view wx:for="{{list}}" wx:key="index" class="item">
<view class="itme-content">
<view class="item-header">
<view class="header-cust">
{{item.customerName}}
<image wx:if="{{item.ownerGender}}" class="icon-sex" src="{{item.ownerGender == '男' ? '../../../images/icon-man.png' : '../../../images/icon-woman.png'}}" />
</view>
<view class="header-status">
<!-- 0待报价、1待确认、2待支付、3已支付、-1战败 -->
<view wx:if="{{item.orderStatus == '3'}}">
<span class="green-txt">{{orderStatusObj[item.orderStatus]}}</span>
<span class="header-price">¥ {{item.equityPrice}}</span>
</view>
<view wx:else class="{{item.orderStatus == '-1' ? 'red-txt' : '' }}">
{{orderStatusObj[item.orderStatus] || '--'}}
</view>
</view>
</view>
<!-- 内容 -->
<view class="order-list">
<block wx:for="{{orderObj}}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i">
<block wx:if="{{i.key == 'remark' || i.key == 'payTime' || i.key == 'createdTime'}}">
<view class="order" wx:if="{{i.key == 'remark' && item.orderStatus == '-1'}}">
<view class="order-label">{{i.label}}</view>
<view class="order-value">
<block>{{item[i.key] || ''}}</block>
</view>
</view>
<view class="order" wx:if="{{i.key == 'payTime' && item.orderStatus == '3'}}">
<view class="order-label">{{i.label}}</view>
<view class="order-value">
<block>{{item[i.key] || ''}}</block>
</view>
</view>
<view class="order" wx:if="{{i.key == 'createdTime' && item.orderStatus == '3'}}">
<view class="order-label">{{i.label}}</view>
<view class="order-value">
<block>{{item[i.key] || ''}}</block>
</view>
</view>
</block>
<view class="order" wx:else>
<view class="order-label">{{i.label}}</view>
<view class="order-value">
<block>{{item[i.key] || ''}}</block>
</view>
</view>
</block>
</view>
<view class="order-detail" wx:if="{{item.orderStatus == '1' || item.orderStatus == '3'}}">
<view class="detail-item">
<view class="detail-label">报价金额</view>
<view class="text-hide">{{item.quotedPrice || '--'}}</view>
</view>
<view class="detail-item">
<view class="detail-label">权益金额</view>
<view class="text-hide">{{item.equityPrice || '--'}}</view>
</view>
<view class="detail-item">
<view class="detail-label">保险公司</view>
<view class="text-hide">{{item.insuranceCompany || '--'}}</view>
</view>
</view>
</view>
<!-- footer -->
<view class="item-footer">
<view>
<view wx:if="{{item.orderStatus == '3'}}" class="orange-txt">订单已支付,未录入权益合同</view>
<view wx:else>创建时间:{{item.createdTime}}</view>
</view>
<view wx:if="{{item.orderStatus == '-1' || item.orderStatus == '0'}}" class="order-btn" bindtap="handleClickBtn" data-target="{{item}}">
{{btnTxt[item.orderStatus]}}
</view>
<view wx:else class="order-btn default-btn" bindtap="handleClickBtn" data-target="{{item}}">
{{btnTxt[item.orderStatus]}}
</view>
</view>
</view>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</block>
<view class="no-data" wx:else>
<image class="no-data-img" src="/packageEquity/images/noData.png"></image>
<view class="list-not">暂无数据</view>
</view>
</scroll-view>
</view>
<image data-target="addOrder" bind:tap="handleClickOrderBtn" class="addOrder" src="/packageEquity/images/addOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" />
</view>
>>>>>>> 5a795d7ccc559e7f95caa1d91fb88ff74ae1ae9f
...@@ -483,6 +483,17 @@ ...@@ -483,6 +483,17 @@
bottom: 200rpx; bottom: 200rpx;
} }
.list-nothing, .list-not { .no-data {
text-align: center;
margin-top: 128rpx;
}
.no-data-img {
width: 160rpx;
height: 160rpx;
}
.list-nothing,
.list-not {
text-align: center; text-align: center;
} }
\ No newline at end of file \ No newline at end of file
...@@ -15,8 +15,8 @@ Page({ ...@@ -15,8 +15,8 @@ Page({
actived: false actived: false
}, },
{ {
sceneName: '2.0 会员权益/升级', sceneName: '2.1 会员权益/升级',
sceneDesc: '2.0新车车损险下单', sceneDesc: '2.1新车车损险下单',
sceneType: 0, sceneType: 0,
actived: false actived: false
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!