Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e5d7870d
authored
Apr 10, 2025
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
工作日报bug修复
1 parent
3eddcc0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
41 deletions
components/GLCustForm/GLCustForm.wxml
tabWorkOrder/pages/supervisorDaily/supervisorDaily.js
components/GLCustForm/GLCustForm.wxml
View file @
e5d7870
...
...
@@ -59,7 +59,7 @@
<!-- textarea -->
<view wx:if="{{item.type == 'textarea'}}" class="meeting-box">
<view class="meeting-textarea">
<van-field value="{{formData[item.name]}}" hold-keyboard type="textarea" rows="{{item.rows || '4'}}" autosize="{ minHeight: 50 }" show-word-limit placeholder="{{item.placeholder || '请输入'}}" maxlength="{{item.maxlength || 140}}" disabled="{{item.disabled||disable}}" data-attr="{{item.name}}" bindinput="handleInput" />
<van-field value="{{formData[item.name]}}" hold-keyboard type="textarea" rows="{{item.rows || '4'}}" autosize="{ minHeight: 50 }" show-word-limit placeholder="{{item.placeholder || '请输入'}}" maxlength="{{item.maxlength || 140}}" disabled="{{item.disabled||disable}}" data-attr="{{item.name}}"
data-item="{{item}}"
bindinput="handleInput" />
</view>
</view>
<!-- picker -->
...
...
tabWorkOrder/pages/supervisorDaily/supervisorDaily.js
View file @
e5d7870
...
...
@@ -206,7 +206,7 @@ Page({
this
.
setData
({
isDisable
:
timeBean
.
weekDayList
[
timeBean
.
selectDay
].
hasDailyValue
||
false
})
}
else
if
(
tmlpEditList
.
includes
(
tmlpCode
))
{
}
else
if
(
tmlpEditList
.
includes
(
tmlpCode
))
{
console
.
log
(
'???'
)
// 往期编辑
this
.
setData
({
...
...
@@ -302,20 +302,24 @@ Page({
// 与会驻店人员选择确定
changeStaff
(
e
)
{
let
{
selectItemName
,
tmlpFormData
,
trainTmlpSuffix
}
=
this
.
data
;
tmlpFormData
[
selectItemName
]
=
""
;
tmlpFormData
[
selectItemName
+
"Txt"
]
=
""
;
if
(
selectItemName
)
{
tmlpFormData
[
selectItemName
]
=
""
;
tmlpFormData
[
selectItemName
+
"Txt"
]
=
""
;
}
// 与会驻店人员的ids
tmlpFormData
[
'staffIds'
+
trainTmlpSuffix
]
=
""
;
var
list
=
[];
var
ids
=
[]
console
.
log
(
trainTmlpSuffix
,
'trainTmlpSuffix---'
)
console
.
log
(
this
.
data
[
'staffCheckList'
+
trainTmlpSuffix
],
'trainTmlpSuffix---'
)
//
console.log(trainTmlpSuffix, 'trainTmlpSuffix---')
//
console.log( this.data['staffCheckList' + trainTmlpSuffix], 'trainTmlpSuffix---')
this
.
data
[
'staffCheckList'
+
trainTmlpSuffix
].
forEach
((
item
)
=>
{
list
.
push
(
item
.
staffName
);
ids
.
push
(
item
.
id
)
});
tmlpFormData
[
selectItemName
]
=
list
.
join
(
","
);
tmlpFormData
[
selectItemName
+
'Txt'
]
=
list
.
join
(
','
)
if
(
selectItemName
)
{
tmlpFormData
[
selectItemName
]
=
list
.
join
(
","
);
tmlpFormData
[
selectItemName
+
'Txt'
]
=
list
.
join
(
','
)
}
tmlpFormData
[
'staffIds'
+
trainTmlpSuffix
]
=
ids
.
join
(
","
)
let
selectedStr
=
list
.
slice
(
0
,
2
).
join
(
';'
)
let
selectTxt
=
(
list
.
length
>
2
?
';等'
+
list
.
length
+
'人'
:
''
)
...
...
@@ -396,8 +400,7 @@ Page({
/**
* 适配“带教培训”模版
*/
fitTraninTmlp
(
tabName
)
{
let
matchStr
=
'organizeTraining'
fitTraninTmlp
(
tabName
,
matchStr
=
'organizeTraining'
)
{
let
afterMatch
=
''
let
index
=
tabName
.
indexOf
(
matchStr
);
if
(
index
!==
-
1
)
{
...
...
@@ -443,12 +446,8 @@ Page({
// console.log(k.frontRule, 'k.frontRule--')
var
frontConfig
=
JSON
.
parse
(
k
.
frontRule
)
// console.log(frontConfig, 'frontConfig--')
// if (k.key == 'attendingStaff' && k.value) {
if
(
k
.
key
.
includes
(
'attendingStaff'
)
&&
k
.
value
)
{
this
.
data
[
'staffCheckList'
+
trainSuffix
]
=
k
.
value
.
split
(
','
).
map
(
item
=>
{
return
{
staffName
:
item
}})
// let staffList = k.value.split(',')
// selectedStr = staffList.slice(0, 2).join(';')
// selectTxt = (staffList.length > 2 ? ';等' + staffList.length + '人' : '')
if
(
k
.
key
.
includes
(
'attendingStaff'
))
{
this
.
data
[
'staffCheckList'
+
trainSuffix
]
=
k
.
value
?
k
.
value
.
split
(
','
).
map
(
item
=>
{
return
{
staffName
:
item
}
})
:
[]
}
if
(
k
.
key
.
includes
(
'trainingPhotos'
)
&&
k
.
value
)
{
imgObj
[
'trainingPhotos'
+
trainSuffix
]
=
[{
url
:
k
.
value
}]
...
...
@@ -485,7 +484,9 @@ Page({
inputLimit
:
frontConfig
.
inputLimit
||
{},
isOnlyPc
:
frontConfig
.
isOnlyPc
||
false
})
tmlpFormData
[
k
.
key
]
=
k
.
value
if
(
!
frontConfig
.
isOnlyPc
)
{
tmlpFormData
[
k
.
key
]
=
k
.
value
}
if
(
frontConfig
.
type
==
'select'
)
{
tmlpFormData
[
frontConfig
.
labelName
]
=
k
.
value
}
...
...
@@ -557,9 +558,8 @@ Page({
pageNum
:
1
,
pageSize
:
99999
}
//organizeTraining
api
.
getStaffList
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
'res-staff----'
)
//
console.log(res, 'res-staff----')
let
{
tmlpObj
,
mutiOption
}
=
that
.
data
const
staffIdx
=
tmlpObj
?.[
'organizeTraining'
+
trainSuffix
]?.
findIndex
(
k
=>
k
.
name
.
includes
(
'attendingStaff'
))
||
-
1
if
(
staffIdx
!=
-
1
)
{
...
...
@@ -595,7 +595,7 @@ Page({
let
thisPage
=
wx
.
$router
.
getPageInstance
()
return
thisPage
?.
data
[
this
.
data
.
dataAttrName
]
},
dealParams
()
{
let
{
tmlpObj
}
=
this
.
data
let
list
=
Object
.
keys
(
tmlpObj
)
...
...
@@ -609,22 +609,34 @@ Page({
}
})
})
// 没有组织培训,需删掉的属性
let
noOrganAttrList
=
tmlpObj
?.
organizeTraining
?.
map
(
item
=>
{
return
item
.
name
!=
'isTrainingOrganized'
?
item
.
name
:
''
})
if
(
params
?.
isTrainingOrganized
==
'否'
)
{
noOrganAttrList
.
forEach
(
item
=>
{
delete
params
[
item
]
let
trainList
=
[{
tmlpName
:
'organizeTraining'
,
isTrain
:
'isTrainingOrganized'
},
{
tmlpName
:
'organizeTraining_1'
,
isTrain
:
'isTrainingOrganized_1'
},
{
tmlpName
:
'organizeTraining_2'
,
isTrain
:
'isTrainingOrganized_2'
}]
let
staffIds
=
[]
trainList
.
forEach
(
k
=>
{
let
trainSuffix
=
this
.
fitTraninTmlp
(
k
.
tmlpName
)
// 没有组织培训,需删掉的属性
let
noOrganAttrList
=
tmlpObj
[
k
.
tmlpName
]?.
map
(
item
=>
{
return
item
.
name
!=
k
.
isTrain
?
item
.
name
:
''
})
delete
params
.
staffIds
delete
params
.
attendingStaffTxt
}
else
{
params
.
staffIds
=
params
.
staffIds
||
[]
params
.
staffIds
.
concat
(
params
?.
staffIds_1
||
[]).
concat
(
params
?.
staffIds_2
||
[])
delete
params
.
staffIds_1
delete
params
.
staffIds_2
}
if
(
params
[
k
.
isTrain
]
==
'否'
)
{
noOrganAttrList
.
forEach
(
item
=>
{
delete
params
[
item
]
})
delete
params
[
'staffIds'
+
trainSuffix
]
delete
params
[
'attendingStaff'
+
trainSuffix
+
'Txt'
]
}
else
{
staffIds
=
staffIds
.
concat
(
params
[
'staffIds'
+
trainSuffix
]?.
split
(
','
)
||
[])
}
})
params
.
staffIds
=
staffIds
.
join
(
','
)
if
(
params
.
attendingStaff
)
{
params
.
attendingStaff
=
params
.
attendingStaffTxt
delete
params
.
attendingStaffTxt
...
...
@@ -643,15 +655,16 @@ Page({
confirmText
:
"确定"
,
confirmColor
:
"#347BFF"
,
success
(
res
)
{
that
.
setData
({
isConfirm
:
false
})
if
(
res
.
confirm
)
{
api
.
saveTempReport
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
'0'
||
res
.
code
==
'-3'
)
{
that
.
getRecordDetail
()
}
wx
.
$util
.
showToast
(
res
.
code
==
'0'
?
'提交成功'
:
res
.
message
)
}).
finally
(()
=>
{
that
.
setData
({
isConfirm
:
false
})
})
}
}
...
...
@@ -704,7 +717,6 @@ Page({
}
let
linkList
=
[
'tencentMeetingRecordingLink'
,
'tencentMeetingRecordingLink_1'
,
'tencentMeetingRecordingLink_2'
]
for
(
let
i
=
0
;
i
<
linkList
.
length
;
i
++
)
{
console
.
log
(
linkList
[
i
])
if
(
this
.
validLink
(
formData
,
linkList
[
i
]))
{
this
.
setData
({
isConfirm
:
false
...
...
@@ -715,7 +727,7 @@ Page({
let
params
=
{
formJson
:
this
.
dealParams
()
}
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
params
)
),
'params-----'
)
console
.
log
(
JSON
.
parse
(
params
.
formJson
),
'params-----'
)
this
.
secondConfirm
(
params
)
},
...
...
@@ -807,7 +819,6 @@ Page({
[
"timeBean.yearMonth"
]:
y
+
"-"
+
m
,
[
"tmlpFormData.reportDate"
]:
date
,
isEditReport
:
false
,
// isShowBtn: timeBean.weekDayList[timeBean.selectDay].date == new Date().format('yyyy-MM-dd'),
isDisable
:
timeBean
.
weekDayList
[
timeBean
.
selectDay
].
date
!=
new
Date
().
format
(
'yyyy-MM-dd'
)
});
this
.
getDateRecord
()
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment