Commit ef97d19e by 张立顺

bug修复

1 parent b8f9b0a3
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</view> </view>
<gl-form wx:if="{{isShowObj.store}}" id="store" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.storeFormList}}"></gl-form> <gl-form wx:if="{{isShowObj.store}}" id="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">{{serviceInfo.mode?'确认提交':'确认提交(2/2)'}}</button>
<button class="btn draft-btn" bindtap="handleDraft">存草稿</button> <button class="btn draft-btn" bindtap="handleDraft">存草稿</button>
<view class="h-40"></view> <view class="h-40"></view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -141,7 +141,8 @@ Page({ ...@@ -141,7 +141,8 @@ Page({
if (res.code == 0) { if (res.code == 0) {
let data = this.dealData(res.data) let data = this.dealData(res.data)
this.setData({ this.setData({
serviceInfo: data serviceInfo: data,
step:data.mode?'second':'first'
}) })
} else { } else {
wx.$util.showToast(res.message || '接口异常') wx.$util.showToast(res.message || '接口异常')
......
...@@ -62,7 +62,7 @@ Component({ ...@@ -62,7 +62,7 @@ Component({
employeeList: [], employeeList: [],
first: data.firstObj, first: data.firstObj,
disable: true, disable: true,
formRule: data.formRule, formRule: data.formRuleSimple,
referrerPicker: false, referrerPicker: false,
textNameObj: { textNameObj: {
confirmName: '下一步(1/4)', confirmName: '下一步(1/4)',
...@@ -164,15 +164,16 @@ Component({ ...@@ -164,15 +164,16 @@ Component({
// console.log(thisPage.data['orderInfo']['actualSalesPersonId']) // console.log(thisPage.data['orderInfo']['actualSalesPersonId'])
if (!thisPage.data['orderInfo']['referrerId']) { if (!thisPage.data['orderInfo']['referrerId']) {
wx.$util.showToast('请选择推荐人') wx.$util.showToast('请选择推荐人')
return return false
} }
let validObj = fn.checkRequired(thisPage.data[dataAttrName], formRule) let validObj = fn.checkRequired(thisPage.data[dataAttrName], formRule)
if (validObj) { if (validObj) {
wx.$util.showToast(validObj.message) wx.$util.showToast(validObj.message)
return return false
} }
this.triggerEvent('confirm') this.triggerEvent('confirm')
return true
} }
} }
}) })
...@@ -31,6 +31,11 @@ Component({ ...@@ -31,6 +31,11 @@ Component({
orderInfo: { orderInfo: {
type: Object, type: Object,
observer: function (n) { observer: function (n) {
if (n.quotedPriceUpdate) {
this.setData({
testQuotedPriceUpdate: n.quotedPriceUpdate
})
}
if (n?.modifyEquityQuotation) { if (n?.modifyEquityQuotation) {
this.setData({ this.setData({
activeNames: ['3'], activeNames: ['3'],
......
...@@ -37,20 +37,43 @@ const formRule = { ...@@ -37,20 +37,43 @@ const formRule = {
} }
} }
] ]
}
// engineNo: [{ required: true, message: '发动机号不能为空' }], const formRuleSimple = {
// vehicleColor: [{ required: true, message: '车身颜色不能为空' }], owner: [{ required: true, message: '姓名不能为空' }],
// billingDate: [{ required: true, message: '购车日期不能为空' }], phone: [
// vehicleBrandId: [{ required: true, message: '品牌车系不能为空' }], { required: true, message: '联系电话不能为空' },
// customerType: [{ required: true, message: '客户类型不能为空' }], {
// customerAddress: [{ required: true, message: '联系地址不能为空' }], validator: (rule, value) => {
// effectiveDate: [{ required: true, message: '生效日期不能为空' }], return !data.phoneRex.test(value) ? { message: '请输入正确的手机号' } : null
// tireBrand: [{ required: true, message: '轮胎品牌不能为空' }], }
// frontTireSpecification: [{ required: true, message: '规格型号(前轮)不能为空' }], }
// rearTireSpecification: [{ required: true, message: '规格型号(后轮)不能为空' }], ],
// compensationName: [{ required: true, message: '第一受益人不能为空' }], certificateNo: [
// merchantPhone: [{ required: true, message: '联系电话不能为空' }], {
// merchantAddress: [{ required: true, message: '联系地址不能为空' }] validator: (rule, value) => {
if (value) {
return value.length != 18 ? { message: '请输入正确的18位证件号' } : null
}
}
}
],
carVin: [
// { required: true, message: '车架号不能为空' },
{
validator: (rule, value) => {
return value?value.length != 17 ? { message: '请输入正确的17位车架号' } : null:null
}
}
],
seat: [{ required: true, message: '座位数不能为空' }],
price: [
{ required: true, message: '车辆发票价不能为空' },
{
validator: (rule, value) => {
return value > 2000000 ? { message: '车辆发票价最高不能超过200万' } : null
}
}
]
} }
const firstObj = { const firstObj = {
...@@ -242,5 +265,6 @@ export default { ...@@ -242,5 +265,6 @@ export default {
formRule, formRule,
firstObj, firstObj,
optionsSelect, optionsSelect,
firstObjSimple firstObjSimple,
formRuleSimple
} }
...@@ -169,8 +169,10 @@ Page({ ...@@ -169,8 +169,10 @@ Page({
}, },
async handleSecondConfirm() { async handleSecondConfirm() {
// 先校验 // 先校验
this.selectComponent(`#FirstStep`).handleConfirm() let status = this.selectComponent(`#FirstStep`).handleConfirm()
if(!status) return false
let {orderInfo} = this.data
if (!orderInfo.goodsId) return wx.$util.showToast('请选择增值车损险')
// 修改权益报价逻辑 // 修改权益报价逻辑
let { let {
modifyEquityQuotation, modifyEquityQuotation,
...@@ -197,6 +199,7 @@ Page({ ...@@ -197,6 +199,7 @@ Page({
}) })
console.log('id', id) console.log('id', id)
// { orderId:data.orderId, id } // { orderId:data.orderId, id }
return
status.code == 0 ? this.navigatorNext({ status.code == 0 ? this.navigatorNext({
id, id,
orderId: status.data.orderId orderId: status.data.orderId
......
...@@ -325,7 +325,10 @@ Component({ ...@@ -325,7 +325,10 @@ Component({
} }
break break
case '-1': case '-1':
wx.$router.go('createOrderCarQuotation', { // wx.$router.go('createOrderCarQuotation', {
// id: target.id
// })
wx.$router.go(target.mode != 0 ? 'createOrderCarQuotationSimple' : 'createOrderCarQuotation', {
id: target.id id: target.id
}) })
break break
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!