Commit a3eb2fe0 by chenwq

带教培训

1 parent 16e6bcd7
......@@ -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
......@@ -429,6 +419,7 @@ Page({
if (staffIdx != -1) {
this.getStaffList(staffIdx)
}
this.dealOrganizeTraining()
// this.changeFormData()
// this.recoveryData()
},
......@@ -499,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)
......@@ -513,7 +504,7 @@ Page({
// var { tabActive } = this.data
// let formRule = allRuleObj[tabActive]
let { isConfirm } = this.data
if(isConfirm) {
if (isConfirm) {
return true
}
this.setData({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!