Commit 4db397b0 by 前端

Merge branch 'SAAS+V4.51.0-0331' into 'develop'

上线合并

See merge request !368
2 parents e75df6cd a22a607e
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
"pages/log/log", "pages/log/log",
"pages/changeScene/changeScene", "pages/changeScene/changeScene",
"pages/materails/index", "pages/materails/index",
"pages/pointsReview/pointsReview" "pages/pointsReview/pointsReview",
"pages/h5AuthPhone/h5AuthPhone"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
......
...@@ -805,7 +805,7 @@ Page({ ...@@ -805,7 +805,7 @@ Page({
// debugger // debugger
quotationGoodsList({ quotationGoodsList({
merchantId: default4SStoreInfo.merchantId, merchantId: default4SStoreInfo.merchantId,
suitCarPrice: price ? parseFloat((price / 10000).toFixed(4)) : "", suitCarPrice: price ? parseFloat((price / 10000).toFixed(6)) : "",
seriesId: carSeriesId seriesId: carSeriesId
}) })
.then((result) => { .then((result) => {
......
// packageEquity/pages/clueList/clueList.js // packageEquity/pages/clueList/clueList.js
import carLifeApi from '../../carEquityApi' import carLifeApi from '../../carEquityApi'
import NP from 'number-precision' import NP from 'number-precision'
import reportPageTrackMixin from '~/mixins/reportPageTrackMixin'
Page({ Page({
behaviors: [reportPageTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -33,6 +34,8 @@ Page({ ...@@ -33,6 +34,8 @@ Page({
key: 'defeat' key: 'defeat'
} }
], ],
track_event_code: 'leads_detail', //埋点动作类型
scene: null // 埋点业务类型
}, },
onRoute(options) { onRoute(options) {
console.log(options, 'options'); console.log(options, 'options');
...@@ -56,7 +59,8 @@ Page({ ...@@ -56,7 +59,8 @@ Page({
* 1精品升级 * 1精品升级
* 0会员权益/升级*/ * 0会员权益/升级*/
this.setData({ this.setData({
sceneType: sceneType sceneType: sceneType,
scene: sceneType
}) })
// this.getCustomerClueList() // this.getCustomerClueList()
this.getCustomerClueTodayCount() this.getCustomerClueTodayCount()
...@@ -209,20 +213,21 @@ Page({ ...@@ -209,20 +213,21 @@ Page({
*/ */
onShow() { onShow() {
this.getCustomerClueStatistics() this.getCustomerClueStatistics()
this.onPageShow()
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
this.onPageHide()
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {
this.onPageHide()
}, },
/** /**
......
...@@ -1064,6 +1064,9 @@ Component({ ...@@ -1064,6 +1064,9 @@ Component({
if (item.path == 'packageEquity.start'){ if (item.path == 'packageEquity.start'){
wx.$track.setTrackData(0, 'aiCheck_page', { }, '', 0) wx.$track.setTrackData(0, 'aiCheck_page', { }, '', 0)
} }
if (item.path == 'packageEquity.clueList') {
wx.$track.setTrackData(0, 'leads_page', { }, '', 0)
}
return wx.$router.go(item.path, { return wx.$router.go(item.path, {
scene: 0, scene: 0,
params: item.params || {}, params: item.params || {},
......
// pages/h5AuthPhone/h5AuthPhone.js
import api from '../../api/api.js'
Page({
/**
* 页面的初始数据
*/
data: {
routeObj: {}
},
/**
* 生命周期函数--监听页面加载
*/
onShow(options) {
// this.init()
// console.log(options);
},
onLoad(options) {
console.log(options, '-------');
this.setData({
routeObj: options
})
this.login()
},
jumpH5(target) {
const { routeObj } = this.data
routeObj.authphone = target.phone
let str = ''
Object.keys(routeObj).forEach((item, index) => {
if (!['page', 'h5Page'].includes(item)) {
str = str + (str ? '&' : '?') + item + '=' + routeObj[item]
}
})
const url = 'https://scrm.glsx.com.cn/glsx-bi-report/#/' + routeObj.h5Page + str
console.log(url, 'url')
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(url)}`
})
},
login() {
wx.$util.showLoading()
let _this = this
wx.login({
success({
code
}) {
if (code) {
api
.wxLogin({
code,
appId: wx.getAccountInfoSync().miniProgram.appId
})
.then(res => {
wx.$util.hideLoading()
if (res.code == '0') {
_this.setData({
loginToken: res.data
})
}
})
} else {
wx.$util.showToast('登录失败')
}
}
})
},
/**
* 获取授权手机号
*/
getPhoneNumber(e) {
let {
loginToken
} = this.data
let {
encryptedData,
iv
} = e.detail
if (!encryptedData) return
wx.$util.showLoading('加载中...')
api
.authPhone({
encryptedData,
loginToken,
iv,
noSignIn: false
})
.then(({
code,
data,
message
}) => {
wx.hideLoading()
console.log(data, 'data---')
if (code == 0) {
let {
loginUserInfoList,
sessionId,
noSignInUuid,
needSelectAccount
} = data
if (loginUserInfoList.length) {
this.jumpH5(loginUserInfoList[0])
} else {
wx.$router.reLaunch('pages.nothing')
}
} else {
wx.hideLoading()
wx.showModal({
title: '温馨提示',
content: message,
showCancel: false,
confirmText: '知道了',
confirmColor: '#347BFF'
})
}
})
},
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/h5AuthPhone/h5AuthPhone.wxss */
.button {
width: 100% !important;
height: 88rpx;
background: var(--btnColor);
border-radius: 16rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
line-height: 88rpx;
padding: 0;
transition: all .1s;
background-color: black;
}
\ No newline at end of file \ No newline at end of file
/* pages/h5AuthPhone/h5AuthPhone.wxss */
\ No newline at end of file \ No newline at end of file
<!--pages/h5AuthPhone/h5AuthPhone.wxml-->
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view>
<button class="button" hover-class="btn-hover" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">授权登录
</button>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -248,7 +248,8 @@ export const checkScene = options => { ...@@ -248,7 +248,8 @@ export const checkScene = options => {
deliveryTarget: 'packageEquity/pages/deliveryTarget/deliveryTarget', deliveryTarget: 'packageEquity/pages/deliveryTarget/deliveryTarget',
'aiDetail': 'packageEquity/pages/aiExcercise/ai/ai', 'aiDetail': 'packageEquity/pages/aiExcercise/ai/ai',
'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex', 'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex',
'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex' 'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex',
'h5AuthPhone': 'pages/h5AuthPhone/h5AuthPhone'
} }
options.path = pagePath[query.page] options.path = pagePath[query.page]
} }
...@@ -269,7 +270,7 @@ export const checkScene = options => { ...@@ -269,7 +270,7 @@ export const checkScene = options => {
console.log(options.path, 'options.path') console.log(options.path, 'options.path')
// wx.$SCENE = options // wx.$SCENE = options
if (!userInfo && !['pages/accountItems/accountItems', 'pages/wxLogin/wxLogin', 'tabWorkOrder/pages/staffDaily/staffDaily', 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily', 'packageEquity/pages/trainingMaterials/pages/playVideo/index', 'packageEquity/pages/deliveryTarget/deliveryTarget'].includes(options.path)) { if (!userInfo && !['pages/accountItems/accountItems', 'pages/wxLogin/wxLogin', 'tabWorkOrder/pages/staffDaily/staffDaily', 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily', 'packageEquity/pages/trainingMaterials/pages/playVideo/index', 'packageEquity/pages/deliveryTarget/deliveryTarget', 'pages/h5AuthPhone/h5AuthPhone'].includes(options.path)) {
// if (!userInfo) { // if (!userInfo) {
// console.log(userInfo); // console.log(userInfo);
console.log('未登录,请登录。') console.log('未登录,请登录。')
......
...@@ -462,6 +462,9 @@ Page({ ...@@ -462,6 +462,9 @@ Page({
} }
}) })
} }
if (item.url == 'packageEquity.clueList') {
wx.$track.setTrackData(0, 'leads_page', { }, '', 1)
}
// 判断是不是门店员工 // 判断是不是门店员工
if (userInfo?.merchantType && !userInfo.isSuper && type == 2) { if (userInfo?.merchantType && !userInfo.isSuper && type == 2) {
wx.$util.pointRecord(item.recordId) wx.$util.pointRecord(item.recordId)
......
...@@ -267,6 +267,6 @@ module.exports = { ...@@ -267,6 +267,6 @@ module.exports = {
/** 获取与会驻店人员 */ /** 获取与会驻店人员 */
getStaffList(data) { getStaffList(data) {
return api.get("dj.api.mindworkplate.app.daily.report.staffBaseInfo.pageList", data); return api.post("dj.api.mindworkplate.app.daily.report.staffBaseInfo.pageList", data);
}, },
}; };
...@@ -59,7 +59,8 @@ page { ...@@ -59,7 +59,8 @@ page {
} }
.main { .main {
padding: 0 var(--fontSize20) var(--fontSize136); // padding: 0 var(--fontSize20) var(--fontSize256);
padding: 0 20rpx 100rpx;
.mainheader { .mainheader {
margin: var(--fontSize20) var(--fontSize10) 0; margin: var(--fontSize20) var(--fontSize10) 0;
...@@ -90,8 +91,8 @@ page { ...@@ -90,8 +91,8 @@ page {
} }
} }
.isFullSucreen { page .isFullSucreen {
padding-bottom: 102px !important; padding-bottom: 160px !important;
} }
.isFullSucreen-btn { .isFullSucreen-btn {
...@@ -105,7 +106,16 @@ page { ...@@ -105,7 +106,16 @@ page {
overflow: hidden; overflow: hidden;
margin-top: var(--fontSize20); margin-top: var(--fontSize20);
height: calc(100% - var(--fontSize100)); height: calc(100% - var(--fontSize100));
padding: var(--fontSize24) 0;
// padding: var(--fontSize24) 0;
.presonBox {
height: 66rpx;
background: #e7f3ff;
text-align: center;
line-height: 66rpx;
color: #347bff;
font-size: 24rpx;
}
.carBandTitle { .carBandTitle {
padding: 0 var(--fontSize40) var(--fontSize24); padding: 0 var(--fontSize40) var(--fontSize24);
...@@ -117,12 +127,32 @@ page { ...@@ -117,12 +127,32 @@ page {
} }
.input-item { .input-item {
padding: 0 var(--fontSize40); // padding: 0 var(--fontSize40);
color: #292D33; color: #292D33;
font-size: var(--fontSize28); font-size: var(--fontSize28);
border-bottom: 1rpx solid #dee0e3;
display: flex;
justify-content: space-between;
padding: 24rpx 40rpx;
.left {
display: flex;
flex-direction: column;
justify-content: center;
.tips {
color: #d0d2d6;
font-size: 22rpx;
}
}
.label { .label {
margin-bottom: var(--fontSize16); margin-bottom: var(--fontSize16);
// display: flex;
color: #292d33;
font-size: 28rpx;
text { text {
color: #347BFF; color: #347BFF;
...@@ -134,19 +164,29 @@ page { ...@@ -134,19 +164,29 @@ page {
} }
} }
.disabled {
color: #5a5e66;
}
.content-input { .content-input {
height: var(--fontSize72); height: var(--fontSize91);
background: #FFFFFF; text-align: right;
border: var(--fontSize2) solid #ECECEC; font-size: var(--fontSize28);
padding: 0 var(--fontSize24); flex: 1;
border-radius: var(--fontSize8); line-height: 100%;
margin-bottom: var(--fontSize24); color: #292d33;
}
.inputerror {
color: #F24724;
} }
.content-input.disabled { .content-input.disabled {
background: #EFF0F2; color: #5a5e66;
} }
.content-input.flex { .content-input.flex {
display: flex; display: flex;
align-items: center; align-items: center;
......
// tabWorkOrder/pages/supervisorDaily/components/selectPopup/selectPopup.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function (n) {
if (n) {
this.setData({
nothing: !this.data.optionList.length,
keyword: '',
scrollTop: 0
})
this.search();
}
}
},
title: {
type: String,
value: '标题'
},
optionList: Array,
optionLabel: {
type: String,
value: 'confLabel'
}
},
/**
* 组件的初始数据
*/
data: {
keyword: '',
scrollTop: 0,
nothing: false,
isLoad: false
},
/**
* 组件的方法列表
*/
methods: {
clear() {
this.setData({
keyword: ""
});
this.search();
},
input(e) {
let {
value
} = e.detail;
this.setData({
keyword: value
});
},
search() {
var { keyword, isLoad } = this.data
if(isLoad) {
return true
}
this.setData({
isLoad: true
})
wx.$util.showLoading()
this.triggerEvent('search', {staffName: keyword})
},
choose(e) {
let { idx, item } = e.currentTarget.dataset
this.triggerEvent('click', {idx, item})
},
confirm() {
var { isLoad } = this.data
if(isLoad) {
return true
}
this.triggerEvent('confirm')
},
hidePopup() {
var { isLoad } = this.data
if(isLoad) {
return true
}
this.triggerEvent('cancel')
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/supervisorDaily/components/selectPopup/selectPopup.wxss */
.title{
margin-bottom: var(--fontSize20);
color: #292D33;
font-weight: 400;
font-size: var(--fontSize32);
}
.store-select-box{
height: calc(100% - var(--fontSize168));
}
.merchant-box{
height:100%;
}
.merchant-box .item{
display: flex;
height: var(--fontSize88);
align-items: center;
color: #292D33;
border-bottom: var(--fontSize1) solid #EFF0F2;
}
.merchant-box .item:last-child{
border-bottom: none;
}
.merchant-box .item.active{
color: #347BFF;
}
.item .merchant_item{
height: var(--fontSize88);
font-size: var(--fontSize28);
display: flex;
align-items: center;
width:94%;
}
.item .merchant_item .text-hide{
max-width: calc(100% - var(--fontSize192));
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item .icon {
width: var(--fontSize32);
height: var(--fontSize32);
display: block;
margin-right: var(--fontSize20);
flex-shrink: 0;
}
.item .icon .arc {
width: 100%;
height: 100%;
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
.mark{
width:var(--fontSize32);
height: var(--fontSize32);
}
.list-nothing,
.list-not {
text-align: center;
}
.search-input {
// border: 1rpx solid #979797;
background: #F7F8FA;
border-radius: var(--fontSize38);
//width: calc(100% - var(--fontSize64));
height: var(--fontSize72);
display: flex;
align-items: center;
margin: 16rpx 0;
}
.search-input .search-icon {
width: var(--fontSize28);
height: var(--fontSize28);
margin: 0 var(--fontSize10) 0 var(--fontSize26);
}
.search-input .search-clear {
width: var(--fontSize36);
height: var(--fontSize36);
margin: 0 var(--fontSize26) 0 var(--fontSize10);
}
.search-input .input {
font-size: var(--fontSize28);
height: var(--fontSize38);
line-height: var(--fontSize38);
width: calc(100% - var(--fontSize136));
}
.input-placeholder {
color: rgba(200, 201, 204, .89);
}
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/pages/supervisorDaily/components/selectPopup/selectPopup.wxml-->
<popup title="{{title}}" show="{{ show }}" bindconfirm="confirm" height="85%" bindcancel="hidePopup" class="store-wrap">
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="员工姓名查询" class="input" value="{{ keyword }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ keyword }}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<block wx:if="{{!isLoad}}">
<scroll-view class="store-select-box" scroll-top="{{scrollTop}}" style="height: calc(100% - var(--fontSize60));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-y bindscrolltolower="mineReachBottom">
<view class="merchant-box" wx:if="{{optionList.length>0}}">
<block wx:for="{{optionList}}" wx:key="index">
<view class="item {{item.active?'active':''}}" bindtap="choose" data-item="{{ item }}" data-idx="{{ index }}">
<view class="merchant_item">
<view class="text-hide">{{item[optionLabel]}}</view>
</view>
<view class="mark" wx:if="{{item.active}}">
<gl-image class="icon" src="/equity/mark.png" />
</view>
</view>
</block>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</view>
<view class="no-data" wx:else>
<empty-data />
</view>
</scroll-view>
</block>
</popup>
\ No newline at end of file \ No newline at end of file
...@@ -49,7 +49,7 @@ Page({ ...@@ -49,7 +49,7 @@ Page({
isChangeTab: false, isChangeTab: false,
isConfirm: false, isConfirm: false,
tabChange: true, tabChange: true,
staffCheckList: []
}, },
/** /**
...@@ -247,8 +247,8 @@ Page({ ...@@ -247,8 +247,8 @@ Page({
imgObj imgObj
}) })
}, },
// 问题选择 // 与会驻店选择
handleProblemPicker(e) { handleStaffPicker(e) {
let { pname, name } = e.currentTarget.dataset; let { pname, name } = e.currentTarget.dataset;
let { isDisable } = this.data let { isDisable } = this.data
if (isDisable) { if (isDisable) {
...@@ -272,21 +272,22 @@ Page({ ...@@ -272,21 +272,22 @@ Page({
showSelectItemPopup: true, showSelectItemPopup: true,
}); });
}, },
// 问题选择确定 // 与会驻店人员选择确定
changePromble(e) { changeStaff(e) {
// if (programeFlag) return; let { selectItemName, tmlpFormData, staffCheckList } = this.data;
// programeFlag = true;
let { mutiOption, selectItemName, tmlpFormData } = this.data;
tmlpFormData[selectItemName] = ""; tmlpFormData[selectItemName] = "";
tmlpFormData[selectItemName + "Txt"] = ""; tmlpFormData[selectItemName + "Txt"] = "";
// 与会驻店人员的ids
tmlpFormData.staffIds = "";
var list = []; var list = [];
mutiOption[selectItemName].optionList.forEach((item) => { var ids = []
if (item.active) { staffCheckList.forEach((item) => {
list.push(item.staffName); list.push(item.staffName);
} ids.push(item.id)
}); });
tmlpFormData[selectItemName] = list.join(","); tmlpFormData[selectItemName] = list.join(",");
tmlpFormData[selectItemName + 'Txt'] = list.join(',') tmlpFormData[selectItemName + 'Txt'] = list.join(',')
tmlpFormData.staffIds = ids.join(",")
let selectedStr = list.slice(0, 2).join(';') let selectedStr = list.slice(0, 2).join(';')
let selectTxt = (list.length > 2 ? ';等' + list.length + '人' : '') let selectTxt = (list.length > 2 ? ';等' + list.length + '人' : '')
this.setData( this.setData(
...@@ -298,12 +299,22 @@ Page({ ...@@ -298,12 +299,22 @@ Page({
} }
); );
}, },
staffSearch(e) {
let { staffName } = e.detail
console.log(staffName, 'staffname')
this.getStaffList(staffName)
},
click(e) { click(e) {
let { idx } = e.detail let { idx, item } = e.detail
let { mutiOption, selectPName, let { mutiOption, selectPName,
selectItemName } = this.data selectItemName, staffCheckList } = this.data
const checkIdx = staffCheckList.findIndex(k => k.id == item.id)
checkIdx == -1 ? staffCheckList.push(item) : staffCheckList.splice(checkIdx, 1)
this.setData({ this.setData({
[`mutiOption.${selectItemName}.optionList[${idx}].active`]: !this.data.mutiOption[selectItemName].optionList[idx].active [`mutiOption.${selectItemName}.optionList[${idx}].active`]: !this.data.mutiOption[selectItemName].optionList[idx].active,
staffCheckList
}) })
this.setData({ this.setData({
showSelectItemPopup: true, showSelectItemPopup: true,
...@@ -388,8 +399,8 @@ Page({ ...@@ -388,8 +399,8 @@ Page({
frontConfig.labelName = k.key + 'Txt' frontConfig.labelName = k.key + 'Txt'
} }
tempTmlpItemObj[val.key][k.key] = { tempTmlpItemObj[val.key][k.key] = {
placeholder: k.placeholder, placeholder: k.placeholder,
maxlength: frontConfig.maxlength || '140' maxlength: frontConfig.maxlength || '140'
} }
list.push({ list.push({
label: k.name, label: k.name,
...@@ -447,7 +458,7 @@ Page({ ...@@ -447,7 +458,7 @@ Page({
this.setData({ this.setData({
tmlpObj: obj, tmlpObj: obj,
tmlpFormData, tmlpFormData,
tmlpItemObj :tempTmlpItemObj, tmlpItemObj: tempTmlpItemObj,
imgObj, imgObj,
selectedStr, selectedStr,
selectTxt, selectTxt,
...@@ -455,31 +466,50 @@ Page({ ...@@ -455,31 +466,50 @@ Page({
}, () => { }, () => {
const staffIdx = obj?.organizeTraining?.findIndex(k => k.name == 'attendingStaff') || -1 const staffIdx = obj?.organizeTraining?.findIndex(k => k.name == 'attendingStaff') || -1
if (staffIdx != -1) { if (staffIdx != -1) {
this.getStaffList(staffIdx) this.getStaffList()
} }
this.dealOrganizeTraining() this.dealOrganizeTraining()
}) })
}, },
getStaffList(staffIdx) { getStaffList(staffName) {
let that = this let that = this
let params = { let params = {
staffName: staffName,
pageNum: 1, pageNum: 1,
pageSize: 99999 pageSize: 99999
} }
//organizeTraining //organizeTraining
api.getStaffList(params).then(res => { api.getStaffList(params).then(res => {
console.log(res, 'res-staff----') console.log(res, 'res-staff----')
let { tmlpObj } = that.data let { tmlpObj, staffCheckList, mutiOption } = that.data
const staffIdx = tmlpObj?.organizeTraining?.findIndex(k => k.name == 'attendingStaff') || -1 const staffIdx = tmlpObj?.organizeTraining?.findIndex(k => k.name == 'attendingStaff') || -1
if (staffIdx != -1) { if (staffIdx != -1) {
if (staffCheckList.length) {
staffCheckList.forEach(item => {
let findIdx = res.data.list.findIndex(i => i.id == item.id)
if (findIdx != -1) {
res.data.list[findIdx].active = true
}
})
}
tmlpObj.organizeTraining[staffIdx].optionId = 'id' tmlpObj.organizeTraining[staffIdx].optionId = 'id'
tmlpObj.organizeTraining[staffIdx].optionLabel = 'staffName' tmlpObj.organizeTraining[staffIdx].optionLabel = 'staffName'
tmlpObj.organizeTraining[staffIdx].optionList = res.data.list tmlpObj.organizeTraining[staffIdx].optionList = res.data.list
mutiOption.attendingStaff = {
optionList: tmlpObj.organizeTraining[staffIdx].optionList
}
this.setData({ this.setData({
mutiOption,
tmlpObj tmlpObj
}) })
} }
}).finally(() => {
const staffPopup = this.selectComponent("#staffPopup");
wx.$util.hideLoading()
staffPopup.setData({
isLoad: false
})
}) })
}, },
...@@ -509,6 +539,8 @@ Page({ ...@@ -509,6 +539,8 @@ Page({
noOrganAttrList.forEach(item => { noOrganAttrList.forEach(item => {
delete params[item] delete params[item]
}) })
delete params.staffIds
delete params.attendingStaffTxt
} }
if (params.attendingStaff) { if (params.attendingStaff) {
params.attendingStaff = params.attendingStaffTxt params.attendingStaff = params.attendingStaffTxt
...@@ -543,6 +575,27 @@ Page({ ...@@ -543,6 +575,27 @@ Page({
}); });
}, },
validLink(formData) {
if (!formData.tencentMeetingRecordingLink) {
return false
}
//https://meeting.tencent.com/crm/;无录屏
if (/https:\/\/meeting.tencent.com\/crm\//.test(formData.tencentMeetingRecordingLink) || formData.tencentMeetingRecordingLink.includes('无录屏')) {
return false
} else {
wx.showModal({
title: '温馨提示',
content: '请参考示例,填写正确的录屏链接,如没有录屏链接则填写“无录屏”。',
confirmText: '好的',
confirmColor: '#347BFF',
showCancel: false,
success(res) {
}
})
return true
}
},
handleConfirm() { handleConfirm() {
// var { tabActive } = this.data // var { tabActive } = this.data
// let formRule = allRuleObj[tabActive] // let formRule = allRuleObj[tabActive]
...@@ -557,7 +610,6 @@ Page({ ...@@ -557,7 +610,6 @@ Page({
const attrList = Object.keys(allRuleObj) const attrList = Object.keys(allRuleObj)
for (let i = 0; i < attrList.length; i++) { for (let i = 0; i < attrList.length; i++) {
let formRule = allRuleObj[attrList[i]] let formRule = allRuleObj[attrList[i]]
console.log(attrList[i])
let validObj = fn.checkRequired(formData, formRule) let validObj = fn.checkRequired(formData, formRule)
if (validObj) { if (validObj) {
this.setData({ this.setData({
...@@ -567,9 +619,16 @@ Page({ ...@@ -567,9 +619,16 @@ Page({
return return
} }
} }
if (this.validLink(formData)) {
this.setData({
isConfirm: false
})
return
}
let params = { let params = {
formJson: this.dealParams() formJson: this.dealParams()
} }
console.log(JSON.parse(JSON.stringify(params)), 'params-----')
this.secondConfirm(params) this.secondConfirm(params)
}, },
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"usingComponents": { "usingComponents": {
"van-overlay": "@vant/weapp/overlay/index", "van-overlay": "@vant/weapp/overlay/index",
"weekCalendar": "../staffDaily/components/weekCalendar/weekCalendar", "weekCalendar": "../staffDaily/components/weekCalendar/weekCalendar",
"select-item-popup": "../staffDaily/components/selectItemPopup/selectItemPopup" "select-item-popup": "../staffDaily/components/selectItemPopup/selectItemPopup",
"select-popup": "./components/selectPopup/selectPopup"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<gl-cust-form wx:if="{{tmlpObj && tabChange}}" id="{{tabActive}}" formData="{{ tmlpFormData }}" disable="{{isDisable}}" dataAttrName="{{ dataAttrName }}" formDataList="{{ tmlpObj[tabActive] }}" bind:radioEvent="radioEvent"> <gl-cust-form wx:if="{{tmlpObj && tabChange}}" id="{{tabActive}}" formData="{{ tmlpFormData }}" disable="{{isDisable}}" dataAttrName="{{ dataAttrName }}" formDataList="{{ tmlpObj[tabActive] }}" bind:radioEvent="radioEvent">
<!-- 与会人员 --> <!-- 与会人员 -->
<view wx:if="{{tabActive == 'organizeTraining'}}" slot='attendingStaff' class="attendingStaff"> <view wx:if="{{tabActive == 'organizeTraining'}}" slot='attendingStaff' class="attendingStaff">
<view class="picker" bindtap="handleProblemPicker" data-name="attendingStaff" data-pname="organizeTraining"> <view class="picker" bindtap="handleStaffPicker" data-name="attendingStaff" data-pname="organizeTraining">
<image class="pickerArrow" src="/components/images/arrow-x.png" /> <image class="pickerArrow" src="/components/images/arrow-x.png" />
<view class="flex" wx:if="{{selectedStr}}"> <view class="flex" wx:if="{{selectedStr}}">
<view class="text-hide">{{ selectedStr }}</view> <view class="text-hide">{{ selectedStr }}</view>
...@@ -71,7 +71,8 @@ ...@@ -71,7 +71,8 @@
</view> </view>
</view> </view>
<!-- 与会人员多选 --> <!-- 与会人员多选 -->
<select-item-popup show="{{showSelectItemPopup}}" title="{{selectItemTitle}}" optionList="{{mutiOption[selectItemName].optionList}}" index="1" optionLabel="staffName" bindconfirm="changePromble" bindcancel="closeSlectItemPopup" bindclick="click" /> <!-- <select-item-popup show="{{showSelectItemPopup}}" title="{{selectItemTitle}}" optionList="{{mutiOption[selectItemName].optionList}}" index="1" optionLabel="staffName" bindconfirm="changeStaff" bindcancel="closeSlectItemPopup" bindclick="click" /> -->
<select-popup show="{{showSelectItemPopup}}" id="staffPopup" title="{{selectItemTitle}}" optionList="{{mutiOption[selectItemName].optionList}}" index="1" optionLabel="staffName" bindconfirm="changeStaff" bindcancel="closeSlectItemPopup" bindclick="click" bindsearch="staffSearch"></select-popup>
<van-overlay show="{{ imgShow }}" bind:click="onClickHide" z-index="99999999"> <van-overlay show="{{ imgShow }}" bind:click="onClickHide" z-index="99999999">
<view class="wrapper"> <view class="wrapper">
<image src="{{IMG_URL}}/{{imgName}}.png" mode="widthFix" /> <image src="{{IMG_URL}}/{{imgName}}.png" mode="widthFix" />
......
...@@ -392,7 +392,10 @@ Page({ ...@@ -392,7 +392,10 @@ Page({
let { orderObj } = this.data let { orderObj } = this.data
if (!orderObj.merchantId) return false; if (!orderObj.merchantId) return false;
// 请求对应的4s店车型 // 请求对应的4s店车型
let result = await api.staffDailyReportMerchantCarBand({ merchantId: orderObj.merchantId }) let result = await api.staffDailyReportMerchantCarBand({
merchantId: orderObj.merchantId,
sceneType: 1
})
let { code, data } = result let { code, data } = result
let reportType = 0 let reportType = 0
let carBandList = [] let carBandList = []
...@@ -411,6 +414,8 @@ Page({ ...@@ -411,6 +414,8 @@ Page({
deliveryCount: '', deliveryCount: '',
brandName: '其他', brandName: '其他',
brandId: -1, brandId: -1,
firstBrandId: '',
firstBrandName: ""
}] }]
} }
this.setData({ this.setData({
......
...@@ -64,7 +64,7 @@ const domain_items = { ...@@ -64,7 +64,7 @@ const domain_items = {
// dj: 'http://192.168.1.174:8292',//范富荣 // dj: 'http://192.168.1.174:8292',//范富荣
// dj: 'http://192.168.1.89:8292', //周杭 // dj: 'http://192.168.1.89:8292', //周杭
// dj: 'http://192.168.1.89:8292', //璐琦 // dj: 'http://192.168.1.89:8292', //璐琦
dj: 'http://192.168.1.116:8292',//陈希 dj: 'http://192.168.1.227:8292',//陈希
// dj: 'http://192.168.1.60:8292',//周立明 // dj: 'http://192.168.1.60:8292',//周立明
// dj: 'http://192.168.148.235:8292',// 熊正顺 // dj: 'http://192.168.148.235:8292',// 熊正顺
// dj: 'http://192.168.148.221:8292', // dj: 'http://192.168.148.221:8292',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!