Commit f655babb by wangzhihui

Merge branch 'SAAS+V4.49.0-0121' of http://192.168.3.233:8090/saas_plus/dj-car-b…

…outique-work-wechat into SAAS+V4.49.0-0121
2 parents f88c876c a3eb2fe0
......@@ -183,7 +183,7 @@ Component({
}
thisPage.setData({
[dataAttrName + '.' + attr]: value
[dataAttrName + '.' + attr]: value + ''
})
this.triggerEvent('inputEvent', {
attr
......
<!--components/GLCustForm/GLCustForm.wxml-->
<wxs src="./GLForm.wxs" module="filterUtils" />
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view wx:for="{{formDataList}}" wx:key="index" class="custom-class gl-form">
<gl-cell
wx:if="{{filterUtils.isShowFn(formData, item) && item.type != 'otherSlot' && !item.isHide}}"
......@@ -15,7 +16,8 @@
data-idx="{{index}}"
background="{{background}}"
required="{{item.required}}"
requiredAfter="{{item.requiredAfter}}"
requiredBefore="false"
requiredAfter="true"
cellHeight="{{!item.noCellHeight}}"
cellStyle="{{item.cellStyle||''}}"
labelStyle="{{item.labelStyle}}"
......
......@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 5cdptest
*/
let index = 1;
let index = 2;
const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion;
......
......@@ -540,9 +540,8 @@ Component({
let index = menuList?.findIndex((val) => val.menuText == "交车目标");
index > -1 && menuList.splice(index, 1);
}
// userInfo?loginRole == 3 || userInfo.loginRole == 5
if (menuList.every((item) => item.menuText != '工作日报')) {
// 督导和销售
if ((userInfo?.loginRole == 3 || userInfo?.loginRole == 5) && menuList.every((item) => item.menuText != '工作日报')) {
menuList.push({
menuText: "工作日报",
path: "tabWorkOrder.supervisorDaily",
......
......@@ -25,8 +25,8 @@
<block wx:for="{{loginUserInfoList}}" wx:key="index">
<view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}">
<view class="right">
<view class="midle {{item.isSuper==true?'midle_1':item.userType==1?'midle_2':(itemloginRole == 3 || userInfo.loginRole == 5 ?'midle_3' : item.loginRole == 4 ? 'midle_4' : 'midle_5')}}">
{{item.isSuper==true?'超管':item.userType==1?'商户':itemloginRole == 3 ? '督导' : userInfo.loginRole == 5? '销售':item.loginRole == 4 ? '驻店' : '员工'}}
<view class="midle {{item.isSuper==true?'midle_1':item.userType==1?'midle_2':(item.loginRole == 3 || item.loginRole == 5) ?'midle_3' : item.loginRole == 4 ? 'midle_4' : 'midle_5'}}">
{{item.isSuper==true?'超管':item.userType==1?'商户':item.loginRole == 3 ? '督导' : item.loginRole == 5? '销售':item.loginRole == 4 ? '驻店' : '员工'}}
</view>
</view>
<view class="left">
......
......@@ -1251,8 +1251,8 @@ Page({
icon: 'points_review'
})
}
// userInfo?loginRole == 3 || userInfo.loginRole == 5
if (menu.every((item) => item.name != '工作日报')) {
// 督导和销售
if ((userInfo?.loginRole == 3 || userInfo?.loginRole == 5) && menu.every((item) => item.name != '工作日报')) {
menu.push({
name: "工作日报",
url: "tabWorkOrder.supervisorDaily",
......
......@@ -62,21 +62,29 @@ Page({
flag: true,
});
},
dealOrganizeTraining() {
const params = {
target: {
id: 'organizeTraining'
},
detail: {
attr: 'isTrainingOrganized'
}
}
this.radioEvent(params)
},
radioEvent(e) {
console.log(e, 'radioEvent');
let pAttr = e.target.id
let {
attr
} = e.detail
let { tmlpFormData, tmlpObj } = this.data
tmlpObj.organizeTraining.forEach(item => {
tmlpObj.organizeTraining?.forEach(item => {
if (item.name != 'isTrainingOrganized') {
item.isHide = tmlpFormData[attr] == '否' ? true : false
}
})
console.log(pAttr)
console.log(allRuleObj[pAttr])
if (allRuleObj[pAttr] && pAttr == 'organizeTraining') {
let keyList = Object.keys(allRuleObj[pAttr])
keyList.forEach(item => {
......@@ -99,24 +107,6 @@ Page({
navBarHeight,
});
},
// initData() {
// wx.$util.showLoading()
// // 根据不同角色做页面回显
// this.setData({
// timeBean: util.getWeekDayList(this.data.selectWeek),
// });
// api.getMyTemplate({}).then(res => {
// console.log(res, 'res---')
// this.setData({
// tmlpInitData: res.data.types
// // tmlpInitData: resData.types
// })
// this.getDynamicForm()
// this.setReportDate();
// }).finally(() => {
// wx.hideLoading()
// })
// },
onClickShow(e) {
const { name } = e.target.dataset
......@@ -276,13 +266,15 @@ Page({
// if (programeFlag) return;
// programeFlag = true;
let { mutiOption, selectItemName, tmlpFormData } = this.data;
tmlpFormData[selectItemName + 'Txt'] = ''
var list = []
mutiOption[selectItemName].optionList.forEach(item => {
tmlpFormData[selectItemName] = "";
tmlpFormData[selectItemName + "Txt"] = "";
var list = [];
mutiOption[selectItemName].optionList.forEach((item) => {
if (item.active) {
list.push(item.staffName)
list.push(item.staffName);
}
})
});
tmlpFormData[selectItemName] = list.join(",");
tmlpFormData[selectItemName + 'Txt'] = list.join(',')
let selectedStr = list.slice(0, 2).join(';') + (list.length > 2 ? ';等' + list.length + '人' : '')
this.setData(
......@@ -427,6 +419,7 @@ Page({
if (staffIdx != -1) {
this.getStaffList(staffIdx)
}
this.dealOrganizeTraining()
// this.changeFormData()
// this.recoveryData()
},
......@@ -497,7 +490,7 @@ Page({
})
if (res.confirm) {
api.saveTempReport(params).then(res => {
if(res.code == '0') {
if (res.code == '0') {
that.getRecordDetail()
}
wx.$util.showToast(res.message)
......@@ -511,7 +504,7 @@ Page({
// var { tabActive } = this.data
// let formRule = allRuleObj[tabActive]
let { isConfirm } = this.data
if(isConfirm) {
if (isConfirm) {
return true
}
this.setData({
......@@ -534,7 +527,6 @@ Page({
let params = {
formJson: this.dealParams()
}
console.log(JSON.parse(params.formJson))
this.secondConfirm(params)
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!