Commit 2344c9be by 张立顺

第二轮bug修复

1 parent e5b21305
<!-- 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">
<gl-cell border="{{!item.noBorder}}" class="{{item.name}}" haveArrow="{{item.haveArrow || false}}" valueAlign="right" label="{{item.label}}" labelWidth="{{labelWidth}}" placeholder="{{item.placeholder || ''}}" bindclick="handleCellClick" data-target="{{item}}" data-idx="{{index}}" cellHeight="{{!item.noCellHeight}}"> <gl-cell
border="{{!item.noBorder}}"
class="{{item.name}}"
haveArrow="{{item.haveArrow || false}}"
valueAlign="right"
label="{{item.label}}"
labelWidth="{{labelWidth}}"
placeholder="{{item.placeholder || ''}}"
bindclick="handleCellClick"
data-target="{{item}}"
data-idx="{{index}}"
cellHeight="{{!item.noCellHeight}}">
<!-- input / textarea --> <!-- input / textarea -->
<van-field wx:if="{{item.type == 'input'}}" class="textarea" 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" /> <van-field
border="{{false}}"
wx:if="{{item.type == 'input'}}"
class="textarea"
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" />
<!-- picker --> <!-- picker -->
<picker wx:if="{{item.type == 'select'}}" bindchange="handlePickerChange" data-target="{{item}}" value="{{index}}" range="{{item.optionList}}" range-key="{{item.optionLabel}}"> <picker
wx:if="{{item.type == 'select'}}"
bindchange="handlePickerChange"
data-target="{{item}}"
value="{{index}}"
range="{{item.optionList}}"
range-key="{{item.optionLabel}}">
<view class="picker"> <view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}"> <view class="text-hide" wx:if="{{formData[item.labelName]}}">
...@@ -14,7 +45,14 @@ ...@@ -14,7 +45,14 @@
</view> </view>
</picker> </picker>
<!-- 时间选择器 --> <!-- 时间选择器 -->
<picker wx:if="{{item.type == 'pickerTime'}}" mode="date" value="{{formData[name]}}" start="{{item.start || ''}}" end="{{item.end || ''}}" bindchange="handleTimeChange" data-target="{{item}}"> <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"> <view class="picker">
<image class="arrow" src="../../../components/images/arrow-x.png" /> <image class="arrow" src="../../../components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.name]}}">{{formData[item.name]}}</view> <view class="text-hide" wx:if="{{formData[item.name]}}">{{formData[item.name]}}</view>
...@@ -22,6 +60,9 @@ ...@@ -22,6 +60,9 @@
</view> </view>
</picker> </picker>
<!-- 品牌车型 --> <!-- 品牌车型 -->
<view wx:if="{{item.type == 'brand' && formData.vehicleBrandId}}">{{formData.vehicleBrandName}}/{{formData.vehicleSubBrandName}}/{{formData.vehicleSeriesName}}/{{formData.vehicleShapeName}}</view> <view wx:if="{{item.type == 'brand' && formData.vehicleBrandId}}">
{{formData.vehicleBrandName}}/{{formData.vehicleSubBrandName}}/{{formData.vehicleSeriesName}}/{{formData.vehicleShapeName}}
</view>
</gl-cell> </gl-cell>
</view> </view>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</view> </view>
<view class="item" wx:if="{{item.orderType!='success'}}"> <view class="item" wx:if="{{item.orderType!='success'}}">
<view class="label">{{item.labelName}}</view> <view class="label">{{item.labelName}}</view>
<view class="text" style="color:{{orderInfo.payOrder[item.key]==2?'#FF6601':'#4AC18E'}}" wx:if="{{item.key == 'payStatus'}}"> <view class="text" style="color:{{orderInfo.payOrder[item.key]==2?'#4AC18E':'#FF6601'}}" wx:if="{{item.key == 'payStatus'}}">
{{orderInfo.payOrder[item.key]==2?'已支付':'待支付'}} {{orderInfo.payOrder[item.key]==2?'已支付':'待支付'}}
<!-- test --> <!-- test -->
</view> </view>
......
...@@ -14,7 +14,6 @@ const errorObj = { ...@@ -14,7 +14,6 @@ const errorObj = {
btnTxt: '重新提单' btnTxt: '重新提单'
} }
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -36,8 +35,8 @@ Page({ ...@@ -36,8 +35,8 @@ Page({
// isSuccessDialog: false, // isSuccessDialog: false,
contractNo: '', contractNo: '',
apiObj: { apiObj: {
'detail': 'getEquityDetail', detail: 'getEquityDetail',
'handler': 'getEquityHandler' handler: 'getEquityHandler'
}, },
// 弹窗 // 弹窗
isDialogShow: false, isDialogShow: false,
...@@ -140,7 +139,7 @@ Page({ ...@@ -140,7 +139,7 @@ Page({
console.log(type, data) console.log(type, data)
let { serviceInfo } = this.data let { serviceInfo } = this.data
if (type == 'vehicleCertificate') { if (type == 'vehicleCertificate') {
let { vinNo: vin, limitPassenger: seatesNum, engineType: engineNo, carColor: vehicleColor } = data let { vinNo: vin, seatingCapacity: seatesNum, engineNo: engineNo, carColor: vehicleColor } = data
serviceInfo = Object.assign(serviceInfo, { vin, seatesNum, engineNo, vehicleColor }) serviceInfo = Object.assign(serviceInfo, { vin, seatesNum, engineNo, vehicleColor })
} }
if (type == 'idCard') { if (type == 'idCard') {
...@@ -186,8 +185,8 @@ Page({ ...@@ -186,8 +185,8 @@ Page({
confirm(e) { confirm(e) {
var typeObj = { var typeObj = {
"draft": 0, draft: 0,
'confirm': 1 confirm: 1
} }
let { serviceInfo } = this.data let { serviceInfo } = this.data
let type = e.detail?.type || 'draft' let type = e.detail?.type || 'draft'
...@@ -295,49 +294,35 @@ Page({ ...@@ -295,49 +294,35 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {},
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {}
}
}) })
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="payInfo"> <view class="payInfo">
<view class="payCom"> <view class="payCom">
<view class="title">支付成功</view> <view class="title">支付成功</view>
<view class="payPrice">订单支付成功,实付 1000.00 元</view> <view class="payPrice">订单支付成功,实付 {{orderDetail.totalPrice}} 元</view>
</view> </view>
<view class="tips"> <view class="tips">
<view class="title">温馨提示</view> <view class="title">温馨提示</view>
......
...@@ -30,22 +30,17 @@ Page({ ...@@ -30,22 +30,17 @@ Page({
wxqrcode: res.data wxqrcode: res.data
}) })
// 轮询订单状态 // 轮询订单状态
this.getOrderDetail() this.getDetail()
}) })
}, },
getOrderDetail() { // getOrderDetail() {
// console.log(wx.$router, 'wx.$router') // // console.log(wx.$router, 'wx.$router')
let _this = this // let _this = this
// let { orderCode } = this.data
// _this.getDetail(orderCode)
// },
getDetail() {
let { orderCode } = this.data let { orderCode } = this.data
_this.getDetail(orderCode)
if (!time) {
time = setInterval(() => {
_this.getDetail(orderCode)
}, 5 * 1000)
}
},
getDetail(orderCode) {
// console.log(orderCode) // console.log(orderCode)
let _this = this let _this = this
getOrderDetail({ getOrderDetail({
...@@ -92,13 +87,14 @@ Page({ ...@@ -92,13 +87,14 @@ Page({
} }
}) })
.finally(() => { .finally(() => {
if (time) clearInterval(time)
const pages = getCurrentPages() const pages = getCurrentPages()
const currentPage = pages[pages.length - 1] const currentPage = pages[pages.length - 1]
const url = `${currentPage.route}` const url = `${currentPage.route}`
// console.log(url, 'url') if ('packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay' == url) {
if ('packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay' != url) { time = setInterval(() => {
if (time) clearInterval(time) _this.getDetail(orderCode)
}, 5 * 1000)
} }
}) })
}, },
...@@ -106,7 +102,7 @@ Page({ ...@@ -106,7 +102,7 @@ Page({
let { orderId, orderCode, orderDetail, id } = this.data let { orderId, orderCode, orderDetail, id } = this.data
updateOrderStatus({ id, orderStatus: 3 }) updateOrderStatus({ id, orderStatus: 3 })
.then(result => { .then(result => {
wx.$router.go('CarQuotationDetail', { orderId, orderCode, orderDetail, id }) wx.$router.reLaunch('CarQuotationDetail', { orderId, orderCode, orderDetail, id })
}) })
.catch(err => {}) .catch(err => {})
}, },
...@@ -156,13 +152,15 @@ Page({ ...@@ -156,13 +152,15 @@ Page({
*/ */
onHide() { onHide() {
// clearInterval(time) // clearInterval(time)
if (time) clearInterval(time) // if (time) clearInterval(time)
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() {
if (time) clearInterval(time)
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
......
...@@ -109,7 +109,7 @@ Component({ ...@@ -109,7 +109,7 @@ Component({
getEmployee() { getEmployee() {
let userInfo = wx.$util.getStorageSync('dj_boutique_user_info') let userInfo = wx.$util.getStorageSync('dj_boutique_user_info')
let params = { let params = {
merchantId: userInfo.merchantId merchantId: userInfo.default4SStoreInfo.merchantId
} }
carLifeApi.getEmployeeList(params).then(res => { carLifeApi.getEmployeeList(params).then(res => {
if (res.code == 0) { if (res.code == 0) {
......
...@@ -8,6 +8,9 @@ const formRule = { ...@@ -8,6 +8,9 @@ const formRule = {
} }
import fn from '../constant/ruleFn' import fn from '../constant/ruleFn'
Component({ Component({
options: {
styleIsolation: 'shared'
},
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
......
...@@ -13,14 +13,14 @@ ...@@ -13,14 +13,14 @@
data-attrName="typeName" data-attrName="typeName"
placeholder="请输入" placeholder="请输入"
bindinput="handleInput" /> bindinput="handleInput" />
<view class="title">险种方案</view> <view class="title">险种保额</view>
<van-field <van-field
class="inputBox" class="inputBox"
border="{{false}}" border="{{false}}"
value="{{compensation}}" value="{{compensation}}"
data-attrType="vehiclesAndVessels" data-attrType="vehiclesAndVessels"
data-attrName="compensation" data-attrName="compensation"
placeholder="请输入险种方案" placeholder="请输入险种保额"
bindinput="handleInput" /> bindinput="handleInput" />
<view class="title">保费</view> <view class="title">保费</view>
<van-field <van-field
......
...@@ -20,3 +20,8 @@ ...@@ -20,3 +20,8 @@
overflow: hidden; overflow: hidden;
margin: 16rpx 0; margin: 16rpx 0;
} }
.inputBox .van-field__body {
padding-left: 8rpx;
width: 570rpx;
}
\ No newline at end of file \ No newline at end of file
...@@ -3,6 +3,9 @@ import data from '../constant/stepData' ...@@ -3,6 +3,9 @@ import data from '../constant/stepData'
import fn from '../constant/ruleFn' import fn from '../constant/ruleFn'
const defaultLabelWidth = '140rpx' const defaultLabelWidth = '140rpx'
Component({ Component({
options: {
styleIsolation: 'shared'
},
// behaviors: ['wx://component-export'], // behaviors: ['wx://component-export'],
// export() { // export() {
// return this.test // return this.test
...@@ -10,6 +13,14 @@ Component({ ...@@ -10,6 +13,14 @@ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
pageLifetimes: {
show: function () {
let that = this
// 调用年份的操作
that.makeYear()
},
hide: function () {}
},
properties: { properties: {
serviceInfo: { serviceInfo: {
type: Object, type: Object,
...@@ -44,6 +55,16 @@ Component({ ...@@ -44,6 +55,16 @@ Component({
*/ */
data: { data: {
defaultLabelWidth, defaultLabelWidth,
showYear: false,
// 选择时间的年份
columns: [],
currentDate: new Date().getTime(),
// 默认当前年份
currentIndex: new Date().getFullYear() - (new Date().getFullYear() - 25),
currentName: new Date().getFullYear() + '年',
popupShow: false, popupShow: false,
popupInputShow: false, popupInputShow: false,
// customInput: true, // customInput: true,
...@@ -75,6 +96,50 @@ Component({ ...@@ -75,6 +96,50 @@ Component({
// let { activeNames } = this.data // let { activeNames } = this.data
// console.log('activeNames', activeNames) // console.log('activeNames', activeNames)
// }, // },
//--------自定义方法----------
// 选择年份的区域,弹出弹窗框
chooseYear() {
console.log('选择年份')
this.setData({
showYear: true
})
},
// 弹出框确认事件
onConfirm(e) {
// console.log(e, 1111)
let thisPage = wx.$router.getPageInstance()
console.log(value, 'value')
thisPage.setData({
// ['orderInfo' + '.' + attrtype + '.' + attrname]: value
['orderInfo.vehiclesAndVessels.compensation']: value + '年'
})
this.setData({
showYear: false
})
},
// 取消选择年份的弹框
onCancel() {
let that = this
that.setData({
showYear: false
})
},
// 对选择时间进行单独的处理
makeYear() {
let year = []
let currentDate = new Date()
console.log(currentDate.getFullYear())
for (let j = currentDate.getFullYear() - 25; j < currentDate.getFullYear(); j++) {
year.push(j)
}
for (let i = currentDate.getFullYear(); i <= currentDate.getFullYear() + 25; i++) {
year.push(i)
}
this.setData({
columns: year
})
},
handlePopupShow(e) { handlePopupShow(e) {
// console.log(e) // console.log(e)
// let { attrtype, attrname, typename } = e.target.dataset // let { attrtype, attrname, typename } = e.target.dataset
...@@ -125,7 +190,12 @@ Component({ ...@@ -125,7 +190,12 @@ Component({
this.triggerEvent('editSave') this.triggerEvent('editSave')
} }
}, },
onchange() {}, onChange(event) {
console.log(event, 'event')
this.setData({
activeNames: event.detail
})
},
handleInput(e) { handleInput(e) {
let value = e.detail let value = e.detail
...@@ -136,7 +206,7 @@ Component({ ...@@ -136,7 +206,7 @@ Component({
console.log(attrtype) console.log(attrtype)
if (attrtype == 'modifyEquityQuotation') { if (attrtype == 'modifyEquityQuotation') {
let { orderInfo } = this.data let { orderInfo } = this.data
let showError = orderInfo.modifyEquityQuotation.minEquityPrice < value ? false : true let showError = orderInfo.modifyEquityQuotation.minEquityPrice <= value ? false : true
this.setData({ this.setData({
showError showError
}) })
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
"van-collapse-item": "@vant/weapp/collapse-item/index", "van-collapse-item": "@vant/weapp/collapse-item/index",
"van-checkbox": "@vant/weapp/checkbox/index", "van-checkbox": "@vant/weapp/checkbox/index",
"popup-select": "../PopupSelect/PopupSelect", "popup-select": "../PopupSelect/PopupSelect",
"popup-input": "../PopupInput/PopupInput" "popup-input": "../PopupInput/PopupInput",
"van-popup": "@vant/weapp/popup/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-picker": "@vant/weapp/picker/index"
} }
} }
...@@ -136,9 +136,16 @@ ...@@ -136,9 +136,16 @@
border-radius: 12rpx; border-radius: 12rpx;
overflow: hidden; overflow: hidden;
margin: 16rpx 0; margin: 16rpx 0;
.van-field__body {
padding-left: 8rpx;
width: 570rpx;
}
} }
} }
.incrementInfo { .incrementInfo {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
...@@ -212,3 +219,7 @@ ...@@ -212,3 +219,7 @@
font-size: 28rpx; font-size: 28rpx;
color: #EB4E4E; color: #EB4E4E;
} }
.placeHolder {
color: #B6B6B8;
}
\ No newline at end of file \ No newline at end of file
...@@ -8,11 +8,14 @@ ...@@ -8,11 +8,14 @@
catchtap="handlePopupShow"> catchtap="handlePopupShow">
<view class="label">保险公司</view> <view class="label">保险公司</view>
<view class="right"> <view class="right">
<view class="Company">{{orderInfo.business.company}}</view> <view class="Company" wx:if="{{orderInfo.business.company}}">
{{orderInfo.business.company}}
</view>
<view class="Company placeHolder" wx:else>请选择</view>
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="/components/images/arrow-x.png" />
</view> </view>
</view> </view>
<van-collapse value="{{activeNames}}"> <van-collapse value="{{activeNames}}" bind:change="onChange">
<view class="collapse"> <view class="collapse">
<van-collapse-item name="1"> <van-collapse-item name="1">
<view slot="title"> <view slot="title">
...@@ -29,6 +32,7 @@ ...@@ -29,6 +32,7 @@
value="{{orderInfo.business.base}}" value="{{orderInfo.business.base}}"
data-attrName="base" data-attrName="base"
data-type='number' data-type='number'
placeholder="请输入保费"
data-attrType="business" data-attrType="business"
bindinput="handleInput"> bindinput="handleInput">
<view slot="left-icon"> <view slot="left-icon">
...@@ -53,6 +57,7 @@ ...@@ -53,6 +57,7 @@
<van-field <van-field
class="inputBox" class="inputBox"
border="{{false}}" border="{{false}}"
placeholder="请输入保费"
value="{{orderInfo.business.threePremium}}" value="{{orderInfo.business.threePremium}}"
data-type='number' data-type='number'
data-attrType="business" data-attrType="business"
...@@ -80,6 +85,7 @@ ...@@ -80,6 +85,7 @@
<van-field <van-field
class="inputBox" class="inputBox"
border="{{false}}" border="{{false}}"
placeholder="请输入保费"
data-type='number' data-type='number'
value="{{orderInfo.business.carInsidePremium}}" value="{{orderInfo.business.carInsidePremium}}"
data-attrType="business" data-attrType="business"
...@@ -107,6 +113,7 @@ ...@@ -107,6 +113,7 @@
<van-field <van-field
class="inputBox" class="inputBox"
border="{{false}}" border="{{false}}"
placeholder="请输入保费"
data-type='number' data-type='number'
value="{{orderInfo.business.passengerPremium}}" value="{{orderInfo.business.passengerPremium}}"
data-attrType="business" data-attrType="business"
...@@ -186,6 +193,7 @@ ...@@ -186,6 +193,7 @@
<van-field <van-field
class="inputBox" class="inputBox"
border="{{false}}" border="{{false}}"
placeholder="请输入"
value="{{orderInfo.mutualStrength.compensation}}" value="{{orderInfo.mutualStrength.compensation}}"
data-attrType="mutualStrength" data-attrType="mutualStrength"
data-attrName="compensation" data-attrName="compensation"
...@@ -193,6 +201,7 @@ ...@@ -193,6 +201,7 @@
<van-field <van-field
class="inputBox" class="inputBox"
border="{{false}}" border="{{false}}"
placeholder="请输入保费"
data-type='number' data-type='number'
value="{{orderInfo.mutualStrength.payPrice}}" value="{{orderInfo.mutualStrength.payPrice}}"
data-attrType="mutualStrength" data-attrType="mutualStrength"
...@@ -203,16 +212,27 @@ ...@@ -203,16 +212,27 @@
</view> </view>
</van-field> </van-field>
<view class="title">车船税</view> <view class="title">车船税</view>
<van-field <view bind:tap="chooseYear" class="selectItem" catchtap="handlePopupShow">
{{orderInfo.vehiclesAndVessels.compensation}}
<image
class="arrow"
src="/components/images/arrow-x.png"
mode="widthFix"
binderror=""
bindload="" />
</view>
<!-- <van-field
class="inputBox" class="inputBox"
border="{{false}}" border="{{false}}"
placeholder="请输入"
value="{{orderInfo.vehiclesAndVessels.compensation}}" value="{{orderInfo.vehiclesAndVessels.compensation}}"
data-attrType="vehiclesAndVessels" data-attrType="vehiclesAndVessels"
data-attrName="compensation" data-attrName="compensation"
bindinput="handleInput" /> bindinput="handleInput" /> -->
<van-field <van-field
class="inputBox" class="inputBox"
border="{{false}}" border="{{false}}"
placeholder="请输入保费"
data-type='number' data-type='number'
value="{{orderInfo.vehiclesAndVessels.payPrice}}" value="{{orderInfo.vehiclesAndVessels.payPrice}}"
data-attrType="vehiclesAndVessels" data-attrType="vehiclesAndVessels"
...@@ -245,7 +265,9 @@ ...@@ -245,7 +265,9 @@
<text>包含</text> <text>包含</text>
<!-- {{orderInfo.quotationGoodsInfo.quotationGoodsServiceItemsRelationDTOList.length==index?'':'、'}} --> <!-- {{orderInfo.quotationGoodsInfo.quotationGoodsServiceItemsRelationDTOList.length==index?'':'、'}} -->
<block wx:key="index" wx:for="{{orderInfo.quotationGoodsInfo.quotationGoodsServiceItemsRelationDTOList}}"> <block wx:key="index" wx:for="{{orderInfo.quotationGoodsInfo.quotationGoodsServiceItemsRelationDTOList}}">
<text>{{item.serviceName}}{{orderInfo.quotationGoodsInfo.quotationGoodsServiceItemsRelationDTOList.length==index?'':'、'}}</text> <text>
{{item.serviceName}}{{orderInfo.quotationGoodsInfo.quotationGoodsServiceItemsRelationDTOList.length==index?'':'、'}}
</text>
</block> </block>
</view> </view>
</view> </view>
......
...@@ -12,12 +12,13 @@ const formRule = { ...@@ -12,12 +12,13 @@ const formRule = {
} }
], ],
certificateNo: [ certificateNo: [
{ required: false, message: '证件号码不能为空' },
{ {
validator: (rule, value) => { validator: (rule, value) => {
if (value) {
return value.length != 18 ? { message: '请输入正确的18位证件号' } : null return value.length != 18 ? { message: '请输入正确的18位证件号' } : null
} }
} }
}
], ],
carVin: [ carVin: [
{ required: true, message: '车架号不能为空' }, { required: true, message: '车架号不能为空' },
...@@ -28,7 +29,14 @@ const formRule = { ...@@ -28,7 +29,14 @@ const formRule = {
} }
], ],
seat: [{ required: true, message: '座位数不能为空' }], seat: [{ required: true, message: '座位数不能为空' }],
price: [{ required: true, message: '车辆发票价不能为空' }] price: [
{ required: true, message: '车辆发票价不能为空' },
{
validator: (rule, value) => {
return value > 2000000 ? { message: '车辆发票价最高不能超过200万' } : null
}
}
]
// engineNo: [{ required: true, message: '发动机号不能为空' }], // engineNo: [{ required: true, message: '发动机号不能为空' }],
// vehicleColor: [{ required: true, message: '车身颜色不能为空' }], // vehicleColor: [{ required: true, message: '车身颜色不能为空' }],
......
...@@ -30,11 +30,14 @@ Page({ ...@@ -30,11 +30,14 @@ Page({
driver: '1万', driver: '1万',
passenger: '1万' passenger: '1万'
}, },
// ['orderInfo.vehiclesAndVessels.compensation']: value + '年'
// currentName: new Date().getFullYear() + '年',
mutualStrength: { mutualStrength: {
type: 1 type: 1
}, },
vehiclesAndVessels: { vehiclesAndVessels: {
type: 2 type: 2,
compensation: new Date().getFullYear() + '年'
}, },
valueAddedVehicleLoss: { valueAddedVehicleLoss: {
type: 3 type: 3
...@@ -43,15 +46,15 @@ Page({ ...@@ -43,15 +46,15 @@ Page({
}, },
// 页面存放表单对象的对象名 // 页面存放表单对象的对象名
dataAttrName: 'owner', dataAttrName: 'owner',
step: 'first', // step: 'first',
// step: 'second', step: 'second',
needChangeList: ['price', 'base', 'threePremium', 'carInsidePremium', 'passengerPremium', 'payPrice'] needChangeList: ['price', 'base', 'threePremium', 'carInsidePremium', 'passengerPremium', 'payPrice']
}, },
reWrite(type, data) { reWrite(type, data) {
console.log(type, data) console.log(type, data)
let { owner } = this.data let { owner } = this.data
if (type == 'vehicleCertificate') { if (type == 'vehicleCertificate') {
let { vinNo: carVin, limitPassenger: seat, engineType: engineNumber, carColor } = data let { vinNo: carVin, seatingCapacity: seat, engineNo: engineNumber, carColor } = data
owner = Object.assign(owner, { carVin, seat, engineNumber, carColor }) owner = Object.assign(owner, { carVin, seat, engineNumber, carColor })
} }
if (type == 'idCard') { if (type == 'idCard') {
...@@ -130,6 +133,7 @@ Page({ ...@@ -130,6 +133,7 @@ Page({
// this.setData({ orderInfo }) // this.setData({ orderInfo })
let result = await this.handleSecondConfirmCheck() let result = await this.handleSecondConfirmCheck()
let { code, data: id, message } = result let { code, data: id, message } = result
console.log(id) console.log(id)
if (id) { if (id) {
// 校验生成告知书是否成功 // 校验生成告知书是否成功
...@@ -140,6 +144,8 @@ Page({ ...@@ -140,6 +144,8 @@ Page({
// let // let
// status && this.navigatorNext(id) // status && this.navigatorNext(id)
} else { } else {
console.log(message)
wx.$util.showToast(message || '报价失败') wx.$util.showToast(message || '报价失败')
} }
...@@ -149,6 +155,7 @@ Page({ ...@@ -149,6 +155,7 @@ Page({
let { orderInfo, owner } = this.data let { orderInfo, owner } = this.data
const insurance = ['business', 'mutualStrength', 'vehiclesAndVessels', 'valueAddedVehicleLoss', 'otherInsuranceList'] const insurance = ['business', 'mutualStrength', 'vehiclesAndVessels', 'valueAddedVehicleLoss', 'otherInsuranceList']
orderInfo = wx.$util.deepClone(orderInfo) orderInfo = wx.$util.deepClone(orderInfo)
owner = wx.$util.deepClone(owner)
let { default4SStoreInfo } = wx.$util.getUserInfo() let { default4SStoreInfo } = wx.$util.getUserInfo()
orderInfo.owner = owner orderInfo.owner = owner
orderInfo.owner.price = this.multipliedByHundred(orderInfo.owner?.price) || '' orderInfo.owner.price = this.multipliedByHundred(orderInfo.owner?.price) || ''
...@@ -347,9 +354,9 @@ Page({ ...@@ -347,9 +354,9 @@ Page({
if (options.id) { if (options.id) {
// 修改权益报价 // 修改权益报价
let { modifyEquityQuotation } = options let { modifyEquityQuotation } = options
if (modifyEquityQuotation) {
let minEquityPrice = this.divideByHundred(modifyEquityQuotation.minEquityPrice) let minEquityPrice = this.divideByHundred(modifyEquityQuotation.minEquityPrice)
let quotedPriceUpdate = this.divideByHundred(modifyEquityQuotation.quotedPriceUpdate) let quotedPriceUpdate = this.divideByHundred(modifyEquityQuotation.quotedPriceUpdate)
if (modifyEquityQuotation) {
this.setData({ this.setData({
['orderInfo.modifyEquityQuotation']: { ['orderInfo.modifyEquityQuotation']: {
minEquityPrice, minEquityPrice,
......
...@@ -174,7 +174,7 @@ Page({ ...@@ -174,7 +174,7 @@ Page({
wx.$util.showLoading('上传中...') wx.$util.showLoading('上传中...')
uploadImg({ uploadImg({
file: `${type}@${_res.data}` file: `${type}@${_res.data}`
}).then(img => { }).then(res => {
// _this.saveToHttp(img) // _this.saveToHttp(img)
let { data } = res let { data } = res
_this.saveToHttp(data) _this.saveToHttp(data)
...@@ -196,7 +196,7 @@ Page({ ...@@ -196,7 +196,7 @@ Page({
quotationUpgrade(para).then(res => { quotationUpgrade(para).then(res => {
wx.$util.hideLoading() wx.$util.hideLoading()
let { code, data } = res let { code, data } = res
code == 0 && wx.$router.go('CarQuotationPay', { data, id }) code == 0 && wx.$router.relaunch('CarQuotationPay', { data, id })
}) })
} }
}) })
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="decimal">.{{statisticsObj.todayTurDecimal}}</view> <view class="decimal">.{{statisticsObj.todayTurDecimal}}</view>
</view> </view>
<view class="count num"> <view class="count num">
今日单量 今日成交量
<view class="countNum">{{statisticsObj.todayOrderNumber || 0}}</view> <view class="countNum">{{statisticsObj.todayOrderNumber || 0}}</view>
</view> </view>
</view> </view>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<view class="decimal">.{{statisticsObj.totalTurDecimal}}</view> <view class="decimal">.{{statisticsObj.totalTurDecimal}}</view>
</view> </view>
<view class="count num"> <view class="count num">
累计单量 累计成交量
<view class="countNum">{{statisticsObj.totalOrderNumber || 0}}</view> <view class="countNum">{{statisticsObj.totalOrderNumber || 0}}</view>
</view> </view>
</view> </view>
...@@ -34,7 +34,15 @@ ...@@ -34,7 +34,15 @@
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
<image src="/images/search.png" class="search-icon" /> <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" /> <input
type="text"
placeholder="请输入客户名字搜索"
class="input"
confirm-type="search"
value="{{customerName}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{customerName}}"> <block wx:if="{{customerName}}">
<image src="/images/clear.png" class="search-clear" bindtap="handleReset" /> <image src="/images/clear.png" class="search-clear" bindtap="handleReset" />
</block> </block>
...@@ -44,7 +52,17 @@ ...@@ -44,7 +52,17 @@
</view> </view>
<view class="total-box">{{tabIndex == 0 ? '总订单' : tabList[tabIndex]}} · {{total}}</view> <view class="total-box">{{tabIndex == 0 ? '总订单' : tabList[tabIndex]}} · {{total}}</view>
<view wx:if="{{flag}}" class="order-box"> <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}}"> <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}}"> <block wx:if="{{list.length > 0}}">
<view wx:for="{{list}}" wx:key="index" class="item"> <view wx:for="{{list}}" wx:key="index" class="item">
<view class="itme-content"> <view class="itme-content">
...@@ -66,7 +84,11 @@ ...@@ -66,7 +84,11 @@
</view> </view>
<!-- 内容 --> <!-- 内容 -->
<view class="order-list"> <view class="order-list">
<block wx:for="{{orderObj}}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i"> <block
wx:for="{{orderObj}}"
wx:key="sindex"
wx:for-index="sindex"
wx:for-item="i">
<block wx:if="{{i.key == 'remark' || i.key == 'payTime'}}"> <block wx:if="{{i.key == 'remark' || i.key == 'payTime'}}">
<view class="order" wx:if="{{i.key == 'remark' && item.orderStatus == '-1'}}"> <view class="order" wx:if="{{i.key == 'remark' && item.orderStatus == '-1'}}">
<view class="order-label">{{i.label}}</view> <view class="order-label">{{i.label}}</view>
...@@ -110,10 +132,18 @@ ...@@ -110,10 +132,18 @@
<view wx:if="{{item.orderStatus == '3'}}" class="orange-txt">订单已支付,未录入权益合同</view> <view wx:if="{{item.orderStatus == '3'}}" class="orange-txt">订单已支付,未录入权益合同</view>
<view wx:else>创建时间:{{item.createdTime}}</view> <view wx:else>创建时间:{{item.createdTime}}</view>
</view> </view>
<view wx:if="{{item.orderStatus == '-1' || item.orderStatus == '0'}}" class="order-btn" bindtap="handleClickBtn" data-target="{{item}}"> <view
wx:if="{{item.orderStatus == '-1' || item.orderStatus == '0'}}"
class="order-btn"
bindtap="handleClickBtn"
data-target="{{item}}">
{{btnTxt[item.orderStatus]}} {{btnTxt[item.orderStatus]}}
</view> </view>
<view wx:else class="order-btn default-btn" bindtap="handleClickBtn" data-target="{{item}}"> <view
wx:else
class="order-btn default-btn"
bindtap="handleClickBtn"
data-target="{{item}}">
{{btnTxt[item.orderStatus]}} {{btnTxt[item.orderStatus]}}
</view> </view>
</view> </view>
...@@ -127,5 +157,13 @@ ...@@ -127,5 +157,13 @@
</block> </block>
</scroll-view> </scroll-view>
</view> </view>
<image data-target="addOrder" bind:tap="handleClickOrderBtn" class="addOrder" src="/packageEquity/images/addOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" /> <image
data-target="addOrder"
bind:tap="handleClickOrderBtn"
class="addOrder"
src="/packageEquity/images/addOrder.png"
mode="scaleToFill|aspectFit|aspectFill|widthFix"
binderror=""
bindload="" />
</view> </view>
...@@ -49,7 +49,7 @@ Page({ ...@@ -49,7 +49,7 @@ Page({
console.log(name) console.log(name)
if (name == 'confirm') { if (name == 'confirm') {
// this.triggerEvent('confirm') // this.triggerEvent('confirm')
wx.$router.go('signature', { id }) wx.$router.reLaunch('signature', { id })
} else if (name == 'edit') { } else if (name == 'edit') {
// this.triggerEvent('editSave') // this.triggerEvent('editSave')
this.backEdit() this.backEdit()
......
...@@ -215,7 +215,7 @@ Page({ ...@@ -215,7 +215,7 @@ Page({
wx.$util.hideLoading() wx.$util.hideLoading()
console.log(res, 'res') console.log(res, 'res')
let { code, data } = res let { code, data } = res
code == 0 && wx.$router.go('CarQuotationPay', { data, id }) code == 0 && wx.$router.relaunch('CarQuotationPay', { data, id })
}) })
} }
}) })
<view class="signature-wrap"> <view class="signature-wrap">
<view class="descprion_wrap bgcw"> <view class="descprion_wrap bgcw">
<view class="descTextTitle">尊敬的客户,您好!</view> <view class="descTextTitle">尊敬的客户,您好!</view>
<view class="h3 descText"> <view class="h3 descText">本人自愿在门店购买保险。门店已就新车投保项目及服务进行了说明,本人完全理解相关项目的服务流程及细则。</view>
本人自愿店方购买保险。新车投保项目我司进行了说明,本人完全理解保险公司在理赔上赔付差额或不赔付问题。本告知书对条款进行了简要介绍,作为投保参考,具体约定以保单及条款为准。
</view>
<!-- <view class="h3 descText"> <!-- <view class="h3 descText">
为进一步提高权益服务质量,您申请的{{serviceItemStr}}已被受理,请确认您的爱车(车架号:{{carInfo.vin}},车型:{{carInfo.vehicleBrandName || ''}}{{carInfo.vehicleSeriesName || ''}}{{carInfo.vehicleShapeName || ''}}),是否已到{{carInfo.merchantName}}进行服务。 为进一步提高权益服务质量,您申请的{{serviceItemStr}}已被受理,请确认您的爱车(车架号:{{carInfo.vin}},车型:{{carInfo.vehicleBrandName || ''}}{{carInfo.vehicleSeriesName || ''}}{{carInfo.vehicleShapeName || ''}}),是否已到{{carInfo.merchantName}}进行服务。
</view> </view>
......
...@@ -59,9 +59,10 @@ Page({ ...@@ -59,9 +59,10 @@ Page({
initImg(imgUrl) { initImg(imgUrl) {
let that = this let that = this
let { canvas, ctx, windowWidth, windowHeight, iPath } = this.data let { canvas, ctx, windowWidth, windowHeight, iPath } = this.data
windowWidth = windowWidth
windowHeight = windowHeight
console.log(windowWidth, windowHeight) console.log(windowWidth, windowHeight)
// windowWidth = parseInt(windowWidth)
// windowHeight = parseInt(windowHeight)
canvas.width = windowWidth canvas.width = windowWidth
canvas.height = windowHeight canvas.height = windowHeight
...@@ -260,89 +261,6 @@ Page({ ...@@ -260,89 +261,6 @@ Page({
} }
}) })
}) })
// wx.getSetting({
// success: res => {
// console.log(res)
// if (res.authSetting['scope.camera']) {
// // 用户已经授权
// console.log('用户已经授权')
// _this.setData({
// isAuth: true
// // isNeedSettingButton: false
// })
// } else {
// // 用户还没有授权,向用户发起授权请求
// wx.authorize({
// scope: 'scope.camera',
// success() {
// console.log('用户同意授权')
// // 用户同意授权
// _this.setData({
// isAuth: true
// // isNeedSettingButton: false
// })
// },
// fail() {
// // 用户不同意授权
// wx.showModal({
// title: '提示',
// content: '如需正常使用此小程序功能,请您按确定并在设置页面授权用户信息',
// cancelText: '不授权',
// cancelColor: '#999',
// confirmText: '授权',
// // confirmColor: '#f94218',
// success(res) {
// if (res.confirm) {
// wx.openSetting({
// success(res) {
// if (res.authSetting['scope.camera']) {
// //设置允许获取摄像头
// console.log('设置允许获取摄像头')
// wx.showToast({
// title: '授权成功',
// icon: 'success',
// duration: 1000
// })
// _this.setData({
// isAuth: true
// })
// } else {
// //不允许
// wx.showToast({
// title: '授权失败',
// icon: 'none',
// duration: 1000
// })
// wx.$router.back()
// }
// }
// })
// } else if (res.cancel) {
// console.log('用户点击取消')
// wx.showToast({
// title: '授权失败',
// icon: 'none',
// duration: 1000
// })
// wx.$router.back()
// }
// }
// })
// }
// })
// }
// },
// fail: res => {
// console.log('获取用户授权信息失败')
// wx.showToast({
// title: '获取用户授权信息失败',
// icon: 'none',
// duration: 3000
// })
// wx.$router.back()
// }
// })
}, },
// 获取存图片授权 // 获取存图片授权
...@@ -412,90 +330,6 @@ Page({ ...@@ -412,90 +330,6 @@ Page({
}) })
} }
}) })
// })
// wx.getSetting({
// success: res => {
// console.log(res)
// if (res.authSetting['scope.camera']) {
// // 用户已经授权
// console.log('用户已经授权')
// _this.setData({
// isAuth: true
// // isNeedSettingButton: false
// })
// } else {
// // 用户还没有授权,向用户发起授权请求
// wx.authorize({
// scope: 'scope.camera',
// success() {
// console.log('用户同意授权')
// // 用户同意授权
// _this.setData({
// isAuth: true
// // isNeedSettingButton: false
// })
// },
// fail() {
// // 用户不同意授权
// wx.showModal({
// title: '提示',
// content: '如需正常使用此小程序功能,请您按确定并在设置页面授权用户信息',
// cancelText: '不授权',
// cancelColor: '#999',
// confirmText: '授权',
// // confirmColor: '#f94218',
// success(res) {
// if (res.confirm) {
// wx.openSetting({
// success(res) {
// if (res.authSetting['scope.camera']) {
// //设置允许获取摄像头
// console.log('设置允许获取摄像头')
// wx.showToast({
// title: '授权成功',
// icon: 'success',
// duration: 1000
// })
// _this.setData({
// isAuth: true
// })
// } else {
// //不允许
// wx.showToast({
// title: '授权失败',
// icon: 'none',
// duration: 1000
// })
// wx.$router.back()
// }
// }
// })
// } else if (res.cancel) {
// console.log('用户点击取消')
// wx.showToast({
// title: '授权失败',
// icon: 'none',
// duration: 1000
// })
// wx.$router.back()
// }
// }
// })
// }
// })
// }
// },
// fail: res => {
// console.log('获取用户授权信息失败')
// wx.showToast({
// title: '获取用户授权信息失败',
// icon: 'none',
// duration: 3000
// })
// wx.$router.back()
// }
// })
}, },
onShow: function (data) { onShow: function (data) {
...@@ -531,9 +365,13 @@ Page({ ...@@ -531,9 +365,13 @@ Page({
that.ctx = wx.createCameraContext() that.ctx = wx.createCameraContext()
let { windowWidth, windowHeight } = wx.getSystemInfoSync() let { windowWidth, windowHeight } = wx.getSystemInfoSync()
this.setData({ windowWidth, windowHeight }) this.setData({ windowWidth, windowHeight })
setTimeout(() => {
that.initCanvas()
}, 100)
}, },
// 在页面首次渲染实现生命周期获取操作canvas的上下文对象 initCanvas() {
onReady() { console.log('onReady')
try {
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query query
.select('#image-canvas') .select('#image-canvas')
...@@ -541,7 +379,13 @@ Page({ ...@@ -541,7 +379,13 @@ Page({
.exec(res => { .exec(res => {
const canvas = res[0].node const canvas = res[0].node
const ctx = canvas.getContext('2d') const ctx = canvas.getContext('2d')
console.log(canvas, ctx, 'canvas, ctx')
this.setData({ canvas, ctx }) this.setData({ canvas, ctx })
}) })
} catch (error) {
console.log(error)
} }
},
// 在页面首次渲染实现生命周期获取操作canvas的上下文对象
onReady() {}
}) })
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!