Commit 8b3262bf by 张立顺

fix bug修复

1 parent 3d6fb738
...@@ -4,6 +4,7 @@ import fn from '../constant/ruleFn' ...@@ -4,6 +4,7 @@ import fn from '../constant/ruleFn'
import carLifeApi from '~/packageEquity/carEquityApi' import carLifeApi from '~/packageEquity/carEquityApi'
import commonApi from '~/api/api' import commonApi from '~/api/api'
const defaultLabelWidth = 'var(--fontSize140)' const defaultLabelWidth = 'var(--fontSize140)'
import Util from '~/utils/util'
// import api from '~/api/api' // import api from '~/api/api'
Component({ Component({
options: { options: {
...@@ -88,8 +89,8 @@ Component({ ...@@ -88,8 +89,8 @@ Component({
defaultLabelWidth, defaultLabelWidth,
formData: {}, formData: {},
employeeList: [], employeeList: [],
first: data.firstObjSimple,
disable: true, disable: true,
first: data.firstObjSimple,
formRule: data.formRuleSimple, formRule: data.formRuleSimple,
referrerPicker: false, referrerPicker: false,
textNameObj: { textNameObj: {
...@@ -102,7 +103,10 @@ Component({ ...@@ -102,7 +103,10 @@ Component({
attached() { attached() {
this.getEmployee() this.getEmployee()
this.getYqStoreConfig() this.getYqStoreConfig()
// this.setData({
// first: Util.deepClone(data.firstObjSimple),
// formRule: Util.deepClone(data.formRuleSimple),
// })
} }
}, },
......
...@@ -265,6 +265,8 @@ const firstObj = { ...@@ -265,6 +265,8 @@ const firstObj = {
optionList: constantList.seatesList, optionList: constantList.seatesList,
optionId: "optionId", optionId: "optionId",
optionLabel: "optionLabel", optionLabel: "optionLabel",
required: true,
requiredAfter: true
}, },
{ {
label: "车辆发票价", label: "车辆发票价",
...@@ -395,6 +397,8 @@ const firstObjSimple = { ...@@ -395,6 +397,8 @@ const firstObjSimple = {
optionList: constantList.seatesList, optionList: constantList.seatesList,
optionId: "optionId", optionId: "optionId",
optionLabel: "optionLabel", optionLabel: "optionLabel",
required: true,
requiredAfter: true
}, },
{ {
label: "车辆发票价", label: "车辆发票价",
......
...@@ -13,6 +13,7 @@ import { ...@@ -13,6 +13,7 @@ import {
orderSettingList orderSettingList
} from "../../../api"; } from "../../../api";
import { quotedImgUrl } from "~/config"; import { quotedImgUrl } from "~/config";
import dataForm from '../components/constant/stepData'
import NP from "number-precision"; import NP from "number-precision";
Page({ Page({
/** /**
...@@ -933,14 +934,16 @@ Page({ ...@@ -933,14 +934,16 @@ Page({
} }
return pre return pre
}, []) }, [])
let first = this.selectComponent(`#FirstStep`)
let firstData = first.data let firstCom = this.selectComponent(`#FirstStep`)
console.log(firstData = this.selectComponent(`#FirstStep`).data); let firstData = wx.$util.deepClone(dataForm)
let first = firstData.firstObjSimple
let formRule = firstData.formRuleSimple
// console.log(firstData = this.selectComponent(`#FirstStep`).data);
// let secondData = this.selectComponent(`#SecondStep`).data // let secondData = this.selectComponent(`#SecondStep`).data
console.log(required, 'required'); console.log(required, firstData, 'required');
if (required.includes('carBrand')) { if (required.includes('carBrand')) {
first.carFormList[0] = {
firstData.first.carFormList[0] = {
configItem: true, configItem: true,
label: "车型", label: "车型",
name: "brands", name: "brands",
...@@ -948,16 +951,15 @@ Page({ ...@@ -948,16 +951,15 @@ Page({
required: true, required: true,
requiredAfter: true requiredAfter: true
} }
firstData.formRule.brands = [ formRule.carSeriesName = [
{ {
required: true, required: true,
message: "车型不能为空", message: "车型不能为空",
}, },
] ]
} }
if (required.includes('carNo')) { if (required.includes('carNo')) {
firstData.first.carFormList[2] = { first.carFormList[2] = {
label: "车架号", label: "车架号",
maxlength: "17", maxlength: "17",
name: "carVin", name: "carVin",
...@@ -965,26 +967,24 @@ Page({ ...@@ -965,26 +967,24 @@ Page({
required: true, required: true,
requiredAfter: true requiredAfter: true
} }
firstData.formRule.carVin = [ formRule.carVin = [
{ {
required: true, required: true,
message: "车架号不能为空", message: "车架号不能为空",
}, },
{ {
validator: (rule, value) => { validator: (rule, value) => {
if (value) { return value.length != 17
return value.length != 18
? { ? {
message: "请输入正确的18位证件号", message: "请输入正确的17位车架号",
} }
: null; : null;
}
}, },
}, },
] ]
} }
if (required.includes('idNumber')) { if (required.includes('idNumber')) {
firstData.first.customerFormList[6] = { first.customerFormList[6] = {
label: "证件号码", label: "证件号码",
maxlength: "18", maxlength: "18",
name: "certificateNo", name: "certificateNo",
...@@ -993,7 +993,7 @@ Page({ ...@@ -993,7 +993,7 @@ Page({
required: true, required: true,
requiredAfter: true requiredAfter: true
} }
firstData.formRule.certificateNo = [ formRule.certificateNo = [
{ {
required: true, required: true,
message: "证件号码不能为空", message: "证件号码不能为空",
...@@ -1011,9 +1011,11 @@ Page({ ...@@ -1011,9 +1011,11 @@ Page({
}, },
] ]
} }
console.log(firstData, 'firstData'); console.log(first, formRule, 'firstData');
first.setData({ firstCom.setData({
...firstData // ...firstData
first,
formRule
}) })
} }
}).catch((err) => { }).catch((err) => {
......
...@@ -48,6 +48,15 @@ Page({ ...@@ -48,6 +48,15 @@ Page({
wx.$util.showToast(message) wx.$util.showToast(message)
} }
}) })
// 是初次登录并进入到选场景的时候,不是是切换园区店进来不用处理
if (!userInfo.isLog) {
let now = new Date()
api.loginRecordSave({
staffUuid: userInfo.uuid, loginTime: now.format('yyyy-MM-dd hh:mm:ss'), merchantId: shopMerchantId,
merchantName: shopMerchantName
})
}
} }
this.setData({ this.setData({
sceneList sceneList
......
...@@ -432,6 +432,7 @@ Page({ ...@@ -432,6 +432,7 @@ Page({
// 兼容除精品升级外场景 已选门店数据 // 兼容除精品升级外场景 已选门店数据
wx.$util.setUserInfo({ wx.$util.setUserInfo({
...wx.$util.getUserInfo(), ...wx.$util.getUserInfo(),
isLog: true,
default4SStoreInfo: { default4SStoreInfo: {
merchantId: shopMerchantId, merchantId: shopMerchantId,
merchantName: shopMerchantName merchantName: shopMerchantName
...@@ -450,9 +451,13 @@ Page({ ...@@ -450,9 +451,13 @@ Page({
else wx.$router.go(pageUrl[num]) else wx.$router.go(pageUrl[num])
this.setData({ jumpPageFlag: false }) this.setData({ jumpPageFlag: false })
// console.log(wx.$util.getUserInfo(), 'wx.$util.getUserInfo()'); // console.log(wx.$util.getUserInfo(), 'wx.$util.getUserInfo()');
let { uuid } = wx.$util.getUserInfo() // let { uuid } = wx.$util. 找()
// debugger
let now = new Date() let now = new Date()
api.loginRecordSave({ staffUuid: uuid, loginTime: now.format('yyyy-MM-dd hh:mm:ss') }) api.loginRecordSave({
staffUuid: loginUserObj.uuid, loginTime: now.format('yyyy-MM-dd hh:mm:ss'), merchantId: shopMerchantId,
merchantName: shopMerchantName
})
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!