Commit 1140258a by 张立顺

feat 功能开发

1 parent 4b1bf76b
......@@ -71,69 +71,80 @@ Page({
// approvedSource: 1, // 0是老板 1是督导
noStaffData: false,
noStoreData: false,
hwObj: {// 华为对象
hwObj: {
// 华为对象
staffCount: {
required: true,
max: 100,
min: 1,
placeholder: '当天在店的驻店人数'
},
deliveryCount: {// 店端实际交车数
deliveryCount: {
// 店端实际交车数
required: true,
max: 100,
min: 0,
placeholder: '门店当天的实际交付台次'
},
notDeliveryCount: {// 店端总未触客数
notDeliveryCount: {
// 店端总未触客数
required: true,
max: 100,
min: 0,
placeholder: '门店当天的总计未触客数'
},
equityToShopCount: {// 实际售前触客数
equityToShopCount: {
// 实际售前触客数
required: true,
max: 100,
min: 0,
placeholder: '接待的售前客户数'
},
afterSaleEquityToShopCount: {// 实际售后触客数
afterSaleEquityToShopCount: {
// 实际售后触客数
required: false,
max: 100,
min: 0,
placeholder: '接待的售后客户数'
},
extendedWarrantyCount: {//售前整车延保成交数
extendedWarrantyCount: {
//售前整车延保成交数
required: true,
max: 100,
min: 0,
placeholder: '个人售前客户的整车延保订单数'
},
tireWarrantyCount: {// 轮胎险成交数
tireWarrantyCount: {
// 轮胎险成交数
required: false,
max: 100,
min: 0,
inputPlaceholder: '自动填入系统数据'
},
axPackageCount: {// 安心包成交数
axPackageCount: {
// 安心包成交数
required: false,
max: 100,
min: 0,
inputPlaceholder: '自动填入系统数据'
},
batteryExtendedWarrantyCount: {// 电池延保成交数
batteryExtendedWarrantyCount: {
// 电池延保成交数
required: false,
max: 100,
min: 0,
inputPlaceholder: '自动填入系统数据'
},
batteryExtendedWarrantyMoney: {// 电池延保成交金额
batteryExtendedWarrantyMoney: {
// 电池延保成交金额
required: false,
max: 100,
min: 0,
inputPlaceholder: '自动填入系统数据'
},
totalOrderMoney: {// 个人成交总金额
totalOrderMoney: {
// 个人成交总金额
required: false,
max: 9999999,
min: 0,
......@@ -141,19 +152,22 @@ Page({
placeholder: '个人当天总产值(包含售后)',
inputPlaceholder: '自动填入系统数据'
},
cancelOrderCount: {// 延保退单数
cancelOrderCount: {
// 延保退单数
required: false,
max: 100,
min: 0,
placeholder: '当天延保退单订单数'
},
cancelOrderMoney: {// 延保退单金额
cancelOrderMoney: {
// 延保退单金额
required: false,
max: 9999999,
min: 0,
placeholder: '当天延保退单订单数'
},
notDeliveryReturnCount: {// 未触客数返店人数
notDeliveryReturnCount: {
// 未触客数返店人数
required: false,
max: 100,
min: 0,
......@@ -161,289 +175,300 @@ Page({
}
},
ohterObj: {
deliveryCount: {// 店端实际交车数
deliveryCount: {
// 店端实际交车数
required: false,
max: 100,
min: 0,
placeholder: '门店非问界车型的交付台次'
},
notDeliveryCount: { // 店端总未触客数
notDeliveryCount: {
// 店端总未触客数
required: false,
max: 100,
min: 0,
placeholder: '门店非问界车型未触客客户数'
},
equityToShopCount: {// 实际售前触客数
equityToShopCount: {
// 实际售前触客数
required: false,
max: 100,
min: 0,
placeholder: '非问界个人售前触客数'
},
afterSaleEquityToShopCount: {// 实际售后触客数
afterSaleEquityToShopCount: {
// 实际售后触客数
required: false,
max: 100,
min: 0,
placeholder: '非问界个人售后触客数'
},
totalOrderCount: {// 成交数
totalOrderCount: {
// 成交数
required: false,
max: 100,
min: 0,
placeholder: '非问界成交订单'
},
totalOrderMoney: {// 个人成交总金额
totalOrderMoney: {
// 个人成交总金额
required: false,
max: 9999999,
min: 0,
type: 'digit',
placeholder: '非问界成交总金额'
},
notDeliveryReturnCount: {// 售前未触客当日返店触客人数
notDeliveryReturnCount: {
// 售前未触客当日返店触客人数
required: false,
max: 100,
min: 0,
placeholder: '非问界往期未触客客户今日返店'
},
}
},
hwObjArray: [
{
label: "今日驻店人数(按店)",
key: "staffCount",
type: "number",
label: '今日驻店人数(按店)',
key: 'staffCount',
type: 'number',
required: true,
min: 0,
max: 100,
placeholder: "当天在店的驻店人数",
inputPlaceholder: "",
error: false,
placeholder: '当天在店的驻店人数',
inputPlaceholder: '',
error: false
},
{
label: "店端实际交车数(按店)",
key: "deliveryCount",
type: "number",
label: '店端实际交车数(按店)',
key: 'deliveryCount',
type: 'number',
required: true,
min: 0,
max: 100,
placeholder: "门店当天的实际交付台次",
inputPlaceholder: ""
placeholder: '门店当天的实际交付台次',
inputPlaceholder: ''
},
{
label: "店端总未触客数(按店)",
key: "notDeliveryCount",
type: "number",
label: '店端总未触客数(按店)',
key: 'notDeliveryCount',
type: 'number',
required: true,
min: 0,
max: 100,
placeholder: "门店当天的总计未触客数",
inputPlaceholder: ""
placeholder: '门店当天的总计未触客数',
inputPlaceholder: ''
},
{
name: 'person'
},
{
label: "实际售前触客数",
key: "equityToShopCount",
type: "number",
label: '实际售前触客数',
key: 'equityToShopCount',
type: 'number',
required: true,
min: 0,
max: 100,
placeholder: "接待的售前客户数",
inputPlaceholder: ""
placeholder: '接待的售前客户数',
inputPlaceholder: ''
},
{
label: "实际售后触客数",
key: "afterSaleEquityToShopCount",
type: "number",
label: '实际售后触客数',
key: 'afterSaleEquityToShopCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: "接待的售后客户数",
inputPlaceholder: ""
placeholder: '接待的售后客户数',
inputPlaceholder: ''
},
{
label: "售前整车延保成交数",
key: "extendedWarrantyCount",
type: "number",
label: '售前整车延保成交数',
key: 'extendedWarrantyCount',
type: 'number',
required: true,
min: 0,
max: 100,
placeholder: "个人售前客户的整车延保订单数",
inputPlaceholder: ""
placeholder: '个人售前客户的整车延保订单数',
inputPlaceholder: ''
},
{
label: "轮胎险成交数",
key: "tireWarrantyCount",
type: "number",
label: '轮胎险成交数',
key: 'tireWarrantyCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: "",
inputPlaceholder: "自动填入系统数据"
placeholder: '',
inputPlaceholder: '自动填入系统数据'
},
{
label: "安心包成交数",
key: "axPackageCount",
type: "number",
label: '安心包成交数',
key: 'axPackageCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: "",
inputPlaceholder: "自动填入系统数据"
placeholder: '',
inputPlaceholder: '自动填入系统数据'
},
{
label: "电池延保成交数",
key: "batteryExtendedWarrantyCount",
type: "number",
label: '电池延保成交数',
key: 'batteryExtendedWarrantyCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: "",
inputPlaceholder: "自动填入系统数据"
placeholder: '',
inputPlaceholder: '自动填入系统数据'
},
{
label: "电池延保成交金额",
key: "batteryExtendedWarrantyMoney",
type: "digit",
label: '电池延保成交金额',
key: 'batteryExtendedWarrantyMoney',
type: 'digit',
required: false,
min: 0,
max: 9999999,
placeholder: "",
inputPlaceholder: "自动填入系统数据"
placeholder: '',
inputPlaceholder: '自动填入系统数据'
},
{
label: "个人成交总金额",
key: "totalOrderMoney",
type: "digit",
label: '个人成交总金额',
key: 'totalOrderMoney',
type: 'digit',
required: true,
min: 0,
max: 9999999,
placeholder: "个人当天总产值(包含售后)",
inputPlaceholder: "自动填入系统数据"
placeholder: '个人当天总产值(包含售后)',
inputPlaceholder: '自动填入系统数据'
},
{
label: "延保退单数",
key: "cancelOrderCount",
type: "number",
label: '延保退单数',
key: 'cancelOrderCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: "当天延保退单订单数",
inputPlaceholder: ""
placeholder: '当天延保退单订单数',
inputPlaceholder: ''
},
{
label: "延保退单金额",
key: "cancelOrderMoney",
type: "digit",
label: '延保退单金额',
key: 'cancelOrderMoney',
type: 'digit',
required: false,
min: 0,
max: 9999999,
placeholder: "当天延保退单金额",
inputPlaceholder: ""
placeholder: '当天延保退单金额',
inputPlaceholder: ''
},
{
label: "未触客返店人数",
key: "notDeliveryReturnCount",
type: "number",
label: '未触客返店人数',
key: 'notDeliveryReturnCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: "往期未触客的客户今日返店的人数",
inputPlaceholder: ""
},
placeholder: '往期未触客的客户今日返店的人数',
inputPlaceholder: ''
}
],
otherObjArray: [
{
label: "店端实际交车数(按店)",
key: "deliveryCount",
type: "number",
label: '店端实际交车数(按店)',
key: 'deliveryCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: "门店非问界车型的交付台次",
inputPlaceholder: ""
placeholder: '门店非问界车型的交付台次',
inputPlaceholder: ''
},
{
label: "店端未触客数(按店)",
key: "notDeliveryCount",
type: "number",
label: '店端未触客数(按店)',
key: 'notDeliveryCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: "门店非问界车型未触客客户数",
inputPlaceholder: ""
placeholder: '门店非问界车型未触客客户数',
inputPlaceholder: ''
},
{
name: 'person'
},
{
label: "售前触客数",
key: "equityToShopCount",
type: "number",
label: '售前触客数',
key: 'equityToShopCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: "非问界个人售前触客数",
inputPlaceholder: ""
placeholder: '非问界个人售前触客数',
inputPlaceholder: ''
},
{
label: "售后触客数",
key: "afterSaleEquityToShopCount",
type: "number",
label: '售后触客数',
key: 'afterSaleEquityToShopCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: "非问界个人售后触客数",
inputPlaceholder: ""
placeholder: '非问界个人售后触客数',
inputPlaceholder: ''
},
{
label: "成交数",
key: "totalOrderCount",
type: "number",
label: '成交数',
key: 'totalOrderCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: "非问界成交订单",
inputPlaceholder: ""
placeholder: '非问界成交订单',
inputPlaceholder: ''
},
{
label: "成交总金额",
key: "totalOrderMoney",
label: '成交总金额',
key: 'totalOrderMoney',
required: false,
allowDecimal: true, // 允许小数输入
type: "digit",
allowDecimal: true, // 允许小数输入
type: 'digit',
min: 0,
max: 9999999,
placeholder: "非问界成交总金额",
inputPlaceholder: ""
placeholder: '非问界成交总金额',
inputPlaceholder: ''
},
{
label: "售前未触客当日返店触客人数",
key: "notDeliveryReturnCount",
type: "number",
label: '售前未触客当日返店触客人数',
key: 'notDeliveryReturnCount',
type: 'number',
required: false,
min: 0,
max: 100,
placeholder: "非问界往期未触客客户今日返店",
inputPlaceholder: ""
},
placeholder: '非问界往期未触客客户今日返店',
inputPlaceholder: ''
}
]
},
showStorePicker() {
let { userInfo } = this.data
; (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) &&
this.setData({
showPicker: true,
pickerType: 'merchant'
})
;(userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) &&
this.setData({
showPicker: true,
pickerType: 'merchant'
})
},
showStaffPicker() {
let { userInfo } = this.data
; (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) &&
this.setData({
showPicker: true,
pickerType: 'staff'
})
;(userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) &&
this.setData({
showPicker: true,
pickerType: 'staff'
})
},
navbarReady(e) {
let navBarHeight = e.detail.height
......@@ -568,7 +593,7 @@ Page({
showCancel: false,
confirmText: '确定',
confirmColor: '#347BFF',
success(res) { }
success(res) {}
})
} else {
wx.$util.showToast(message)
......@@ -614,22 +639,23 @@ Page({
// }
let checkFlag = false
carBandList.forEach(item => {
if (item.brandType == 0) { // 问界必填校验
if (item.brandType == 0) {
// 问界必填校验
hwObjArray = hwObjArray.map(el => {
if (el.required && ['', null].includes(item[el.key])) {
el.error = true
checkFlag = true
}
return el;
return el
})
}
})
console.log(checkFlag, 'checkFlag');
console.log(checkFlag, 'checkFlag')
if (checkFlag) {
this.setData({
hwObjArray
})
return false; //必填校验没过
return false //必填校验没过
}
orderObj.isAdmin = role == 'super' ? true : false
orderObj.oprBy = orderObj.staffUuid
......@@ -656,7 +682,7 @@ Page({
showCancel: false,
confirmText: '确定',
confirmColor: '#347BFF',
success(res) { }
success(res) {}
})
} else {
wx.$util.showToast(message)
......@@ -689,7 +715,9 @@ Page({
} = this.data
// 在超管/区域督导未拿到门店或员工信息
if (
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) &&
(userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) &&
(!yqMerchantId || !merchantId || !staffUuid)
)
return
......@@ -712,17 +740,25 @@ Page({
let that = this
let { value } = e.detail
let { name, hwIndex, otherIndex, index } = e.currentTarget.dataset
let { orderObj, userInfo, carBandList, hwObjArray, otherObjArray } = this.data
//
let { orderObj, userInfo, carBandList, hwObjArray, otherObjArray } =
this.data
//
if (['staffCount', 'deliveryCount', 'notDeliveryCount'].includes(name)) {
let checkName = `record${name}`
let checkVlaue = carBandList[index][checkName]
let context = hwObjArray[hwIndex]?.label || otherObjArray[otherIndex]?.label
let checkValue = carBandList[index][checkName]
let context =
hwObjArray[hwIndex]?.label || otherObjArray[otherIndex]?.label
// console.log(carBandList[index], carBandList[index][checkName], 'carBandList[name[checkName]]');
carBandList[index].name != carBandList[index[checkName]]
// console.log(checkVlaue != carBandList[index][name], orderObj.lastStaffUuid && userInfo.uuid != orderObj.lastStaffUuid);
// console.log(checkValue != carBandList[index][name], orderObj.lastStaffUuid && userInfo.uuid != orderObj.lastStaffUuid);
// console.log(carBandList[index][name]);
if (carBandList[index][checkName] != '' && carBandList[index][checkName] != null && checkVlaue != carBandList[index][name] && orderObj.lastStaffUuid && userInfo.uuid != orderObj.lastStaffUuid) {
if (
carBandList[index][checkName] != '' &&
carBandList[index][checkName] != null &&
checkValue != carBandList[index][name] &&
orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid
) {
wx.showModal({
title: '预警提示',
content: `${context}与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,${context}将被清空。`,
......@@ -737,102 +773,30 @@ Page({
})
}
}
},
// input(e) {
// let { value } = e.detail;
// let { name, index, hwIndex, otherIndex } = e.currentTarget.dataset;
// const { hwObjArray, otherObjArray } = this.data;
// const currentConfig = hwObjArray[hwIndex] || otherObjArray[otherIndex];
// const min = currentConfig.min || 0;
// const max = currentConfig.max || 9999999;
// // 清洗输入值,允许数字和小数点
// let cleanedValue = value
// .replace(/[^\d.]/g, '') // 移除非数字和小数点
// .replace(/^\./, '0.') // 处理以点开头的情况
// .replace(/\.+/g, '.') // 多个点替换为单个点
// .replace(/(\..*)\./g, '$1'); // 保留第一个点
// // 分割整数和小数部分
// let [integerPart, decimalPart] = cleanedValue.split('.');
// decimalPart = decimalPart ? decimalPart.slice(0, 2) : ''; // 截断小数部分到两位
// cleanedValue = decimalPart !== undefined ?
// `${integerPart || '0'}.${decimalPart}` :
// (integerPart || '');
// // 处理空值和必填项
// if (cleanedValue === '' || cleanedValue === '0.') {
// if (currentConfig.required) {
// cleanedValue = min.toFixed(currentConfig.allowDecimal ? 2 : 0);
// } else {
// this.setData({
// [`carBandList[${index}].${name}inputError`]: '',
// [`carBandList[${index}].${name}`]: ''
// });
// return;
// }
// }
// // 转换为数值
// let numValue = parseFloat(cleanedValue);
// if (isNaN(numValue)) {
// numValue = currentConfig.required ? min : 0;
// }
// // 数值范围限制
// numValue = Math.min(Math.max(numValue, min), max);
// // 格式化最终值(保留两位小数)
// let finalValue;
// if (cleanedValue.includes('.') || currentConfig.allowDecimal) {
// // 如果有小数点或允许小数,保留两位小数
// finalValue = numValue.toFixed(2);
// // 保留用户输入的小数点后数字(最多两位)
// if (decimalPart && decimalPart.length < 2) {
// finalValue = numValue.toFixed(decimalPart.length);
// }
// } else {
// finalValue = numValue.toString();
// }
// // 更新数据
// this.setData({
// [`carBandList[${index}].${name}`]: finalValue,
// });
// // 错误状态处理
// if (hwIndex !== undefined) {
// this.setData({
// [`hwObjArray[${hwIndex}].error`]: false
// });
// }
// },
input(e) {
// userInfo
// let { orderObj } = this.data
let { value } = e.detail
let { name, index, hwIndex, otherIndex } = e.currentTarget.dataset
// console.log(e.currentTarget.dataset);
const { hwObjArray, otherObjArray } = this.data; // 获取 hwObjArray 配置
const currentConfig = hwObjArray[hwIndex] || otherObjArray[otherIndex];
const min = currentConfig.min || 0; // 默认最小值 0
const max = currentConfig.max || 9999999; // 默认最大值
console.log(currentConfig, 'currentConfig');
const { hwObjArray, otherObjArray } = this.data // 获取 hwObjArray 配置
const currentConfig = hwObjArray[hwIndex] || otherObjArray[otherIndex]
const min = currentConfig.min || 0 // 默认最小值 0
const max = currentConfig.max || 9999999 // 默认最大值
console.log(currentConfig, 'currentConfig')
if (currentConfig.type == 'digit') {
let [number, decimal] = value.toString().split('.')
console.log(value, '222');
console.log(decimal == '', 'decimal');
console.log(value, '222')
console.log(decimal == '', 'decimal')
if (decimal != undefined) {
decimal = decimal.substring(0, 2)
number += `.${decimal}`
value = number
}
if (decimal == '') {
console.log(value);
console.log(value)
this.setData({
[`carBandList[${index}].${name}`]: value
});
})
return
}
}
......@@ -840,34 +804,40 @@ Page({
// return;
// 清洗输入值
// let cleanedValue = value.replace(/\D/g, ''); // 移除非数字字符
let cleanedValue = value; // 移除非数字字符
let cleanedValue = value // 移除非数字字符
// let numValue = parseInt(cleanedValue, 10);
let numValue = cleanedValue
if (hwIndex !== undefined) {
this.setData({
[`hwObjArray[${hwIndex}].error`]: false
})
}
// 处理空值
if (cleanedValue === '') {
if (currentConfig.required) {
// 必填项设置为 min 值(如 min=1 的字段不能为 0)
numValue = min;
} else {
// 非必填项允许为空
this.setData({
[`carBandList[${index}].${name}inputError`]: ''
});
return;
}
// if (currentConfig.required) {
// // 必填项设置为 min 值(如 min=1 的字段不能为 0)
// // numValue = min;
// } else {
// // 非必填项允许为空
// this.setData({
// [`carBandList[${index}].${name}inputError`]: ''
// });
// return;
// }
// this.setData({
// [`carBandList[${index}].${name}inputError`]: ''
// })
this.setData({
[`carBandList[${index}].${name}`]: numValue.toString()
})
return
}
// 限制数值范围
numValue = Math.min(Math.max(numValue, min), max);
numValue = Math.min(Math.max(numValue, min), max)
// 更新数据
this.setData({
[`carBandList[${index}].${name}`]: numValue.toString(),
});
if (hwIndex) {
this.setData({
[`hwObjArray[${hwIndex}].error`]: false
})
}
[`carBandList[${index}].${name}`]: numValue.toString()
})
},
/**
* 点击了下一周,选择周数字加一,然后直接调用工具类中一个方法获取到数据
......@@ -879,7 +849,9 @@ Page({
} = this.data
// 在超管/区域督导未拿到门店或员工信息
if (
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) &&
(userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) &&
(!yqMerchantId || !merchantId || !staffUuid)
)
return
......@@ -913,7 +885,9 @@ Page({
} = this.data
// 在超管/区域督导未拿到门店或员工信息
if (
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) &&
(userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) &&
(!yqMerchantId || !merchantId || !staffUuid)
)
return
......@@ -938,13 +912,13 @@ Page({
},
async getMerchantCarBandList() {
let { orderObj, hwObjArray, otherObjArray } = this.data
if (!orderObj.merchantId) return false;
if (!orderObj.merchantId) return false
// 请求对应的4s店车型
let result = await api.staffDailyReportMerchantCarBand({
merchantId: orderObj.merchantId,
sceneType: 0
})
console.log(result, 'result');
console.log(result, 'result')
let { code, data } = result
// let reportType = 0
let carBandList = []
......@@ -961,9 +935,9 @@ Page({
el[e.key] = null
})
}
return el;
return el
})
console.log(carBandList, 'carBandList');
console.log(carBandList, 'carBandList')
} else {
carBandList = []
}
......@@ -1036,22 +1010,17 @@ Page({
let { code, data, message } = res
// console.log(data, 'data')
if (code == 0) {
let {
brandDataList,
remark
} = data
let { brandDataList, remark } = data
if (brandDataList && brandDataList.length) {
carBandList = carBandList.map(item => {
let carBand = brandDataList.find(
ele => {
if ([0, 1].includes(ele.brandType)) {
return ele.brandType == item.brandType
} else if (ele.brandType == 2) {
return ele.firstBrandId == item.firstBrandId
}
let carBand = brandDataList.find(ele => {
if ([0, 1].includes(ele.brandType)) {
return ele.brandType == item.brandType
} else if (ele.brandType == 2) {
return ele.firstBrandId == item.firstBrandId
}
)
console.log(carBand, 'carBand');
})
console.log(carBand, 'carBand')
if (carBand != null) {
item = {
// ...item,
......@@ -1089,7 +1058,7 @@ Page({
}
hwObjArray = hwObjArray.map(item => {
item.error = false
return item;
return item
})
this.setData({
hwObjArray,
......@@ -1257,7 +1226,7 @@ Page({
wx.$util.message(message)
}
})
.catch(err => { })
.catch(err => {})
},
inputSearch(e) {
let { pickerType } = this.data
......@@ -1354,7 +1323,7 @@ Page({
this.setReportDate()
setTimeout(() => {
console.log(this.data.role, 'roleOther');
console.log(this.data.role, 'roleOther')
if (this.data.role == 'other' || approvedSource == '3') {
this.getMerchantCarBandList()
return
......@@ -1390,7 +1359,11 @@ Page({
this.getMerchantCarBandList()
}
// console.log(userInfo.isSuper, 'userInfo.isSuper')
if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) {
if (
userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5
) {
this.setData({
role: 'super'
})
......@@ -1460,7 +1433,7 @@ Page({
}
// }
})
.catch(err => { })
.catch(err => {})
},
/**
* 生命周期函数--监听页面加载
......@@ -1496,7 +1469,7 @@ Page({
if (options.approvedSource == '3') {
role = 'staff'
} else {
role = "other";
role = 'other'
}
this.setData(
......@@ -1555,7 +1528,7 @@ Page({
if (options.approvedSource == '3') {
role = 'staff'
} else {
role = "other";
role = 'other'
}
this.setData(
......@@ -1582,5 +1555,5 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () { }
onReady: function () {}
})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!