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 @@
...
@@ -59,7 +59,7 @@
<!-- textarea -->
<!-- textarea -->
<view wx:if="{{item.type == 'textarea'}}" class="meeting-box">
<view wx:if="{{item.type == 'textarea'}}" class="meeting-box">
<view class="meeting-textarea">
<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>
</view>
</view>
<!-- picker -->
<!-- picker -->
...
...
tabWorkOrder/pages/supervisorDaily/supervisorDaily.js
View file @
e5d7870
...
@@ -206,7 +206,7 @@ Page({
...
@@ -206,7 +206,7 @@ Page({
this
.
setData
({
this
.
setData
({
isDisable
:
timeBean
.
weekDayList
[
timeBean
.
selectDay
].
hasDailyValue
||
false
isDisable
:
timeBean
.
weekDayList
[
timeBean
.
selectDay
].
hasDailyValue
||
false
})
})
}
else
if
(
tmlpEditList
.
includes
(
tmlpCode
))
{
}
else
if
(
tmlpEditList
.
includes
(
tmlpCode
))
{
console
.
log
(
'???'
)
console
.
log
(
'???'
)
// 往期编辑
// 往期编辑
this
.
setData
({
this
.
setData
({
...
@@ -302,20 +302,24 @@ Page({
...
@@ -302,20 +302,24 @@ Page({
// 与会驻店人员选择确定
// 与会驻店人员选择确定
changeStaff
(
e
)
{
changeStaff
(
e
)
{
let
{
selectItemName
,
tmlpFormData
,
trainTmlpSuffix
}
=
this
.
data
;
let
{
selectItemName
,
tmlpFormData
,
trainTmlpSuffix
}
=
this
.
data
;
tmlpFormData
[
selectItemName
]
=
""
;
if
(
selectItemName
)
{
tmlpFormData
[
selectItemName
+
"Txt"
]
=
""
;
tmlpFormData
[
selectItemName
]
=
""
;
tmlpFormData
[
selectItemName
+
"Txt"
]
=
""
;
}
// 与会驻店人员的ids
// 与会驻店人员的ids
tmlpFormData
[
'staffIds'
+
trainTmlpSuffix
]
=
""
;
tmlpFormData
[
'staffIds'
+
trainTmlpSuffix
]
=
""
;
var
list
=
[];
var
list
=
[];
var
ids
=
[]
var
ids
=
[]
console
.
log
(
trainTmlpSuffix
,
'trainTmlpSuffix---'
)
//
console.log(trainTmlpSuffix, 'trainTmlpSuffix---')
console
.
log
(
this
.
data
[
'staffCheckList'
+
trainTmlpSuffix
],
'trainTmlpSuffix---'
)
//
console.log( this.data['staffCheckList' + trainTmlpSuffix], 'trainTmlpSuffix---')
this
.
data
[
'staffCheckList'
+
trainTmlpSuffix
].
forEach
((
item
)
=>
{
this
.
data
[
'staffCheckList'
+
trainTmlpSuffix
].
forEach
((
item
)
=>
{
list
.
push
(
item
.
staffName
);
list
.
push
(
item
.
staffName
);
ids
.
push
(
item
.
id
)
ids
.
push
(
item
.
id
)
});
});
tmlpFormData
[
selectItemName
]
=
list
.
join
(
","
);
if
(
selectItemName
)
{
tmlpFormData
[
selectItemName
+
'Txt'
]
=
list
.
join
(
','
)
tmlpFormData
[
selectItemName
]
=
list
.
join
(
","
);
tmlpFormData
[
selectItemName
+
'Txt'
]
=
list
.
join
(
','
)
}
tmlpFormData
[
'staffIds'
+
trainTmlpSuffix
]
=
ids
.
join
(
","
)
tmlpFormData
[
'staffIds'
+
trainTmlpSuffix
]
=
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
+
'人'
:
''
)
...
@@ -396,8 +400,7 @@ Page({
...
@@ -396,8 +400,7 @@ Page({
/**
/**
* 适配“带教培训”模版
* 适配“带教培训”模版
*/
*/
fitTraninTmlp
(
tabName
)
{
fitTraninTmlp
(
tabName
,
matchStr
=
'organizeTraining'
)
{
let
matchStr
=
'organizeTraining'
let
afterMatch
=
''
let
afterMatch
=
''
let
index
=
tabName
.
indexOf
(
matchStr
);
let
index
=
tabName
.
indexOf
(
matchStr
);
if
(
index
!==
-
1
)
{
if
(
index
!==
-
1
)
{
...
@@ -443,12 +446,8 @@ Page({
...
@@ -443,12 +446,8 @@ Page({
// console.log(k.frontRule, 'k.frontRule--')
// console.log(k.frontRule, 'k.frontRule--')
var
frontConfig
=
JSON
.
parse
(
k
.
frontRule
)
var
frontConfig
=
JSON
.
parse
(
k
.
frontRule
)
// console.log(frontConfig, 'frontConfig--')
// console.log(frontConfig, 'frontConfig--')
// if (k.key == 'attendingStaff' && k.value) {
if
(
k
.
key
.
includes
(
'attendingStaff'
))
{
if
(
k
.
key
.
includes
(
'attendingStaff'
)
&&
k
.
value
)
{
this
.
data
[
'staffCheckList'
+
trainSuffix
]
=
k
.
value
?
k
.
value
.
split
(
','
).
map
(
item
=>
{
return
{
staffName
:
item
}
})
:
[]
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
(
'trainingPhotos'
)
&&
k
.
value
)
{
if
(
k
.
key
.
includes
(
'trainingPhotos'
)
&&
k
.
value
)
{
imgObj
[
'trainingPhotos'
+
trainSuffix
]
=
[{
url
:
k
.
value
}]
imgObj
[
'trainingPhotos'
+
trainSuffix
]
=
[{
url
:
k
.
value
}]
...
@@ -485,7 +484,9 @@ Page({
...
@@ -485,7 +484,9 @@ Page({
inputLimit
:
frontConfig
.
inputLimit
||
{},
inputLimit
:
frontConfig
.
inputLimit
||
{},
isOnlyPc
:
frontConfig
.
isOnlyPc
||
false
isOnlyPc
:
frontConfig
.
isOnlyPc
||
false
})
})
tmlpFormData
[
k
.
key
]
=
k
.
value
if
(
!
frontConfig
.
isOnlyPc
)
{
tmlpFormData
[
k
.
key
]
=
k
.
value
}
if
(
frontConfig
.
type
==
'select'
)
{
if
(
frontConfig
.
type
==
'select'
)
{
tmlpFormData
[
frontConfig
.
labelName
]
=
k
.
value
tmlpFormData
[
frontConfig
.
labelName
]
=
k
.
value
}
}
...
@@ -557,9 +558,8 @@ Page({
...
@@ -557,9 +558,8 @@ Page({
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
99999
pageSize
:
99999
}
}
//organizeTraining
api
.
getStaffList
(
params
).
then
(
res
=>
{
api
.
getStaffList
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
'res-staff----'
)
//
console.log(res, 'res-staff----')
let
{
tmlpObj
,
mutiOption
}
=
that
.
data
let
{
tmlpObj
,
mutiOption
}
=
that
.
data
const
staffIdx
=
tmlpObj
?.[
'organizeTraining'
+
trainSuffix
]?.
findIndex
(
k
=>
k
.
name
.
includes
(
'attendingStaff'
))
||
-
1
const
staffIdx
=
tmlpObj
?.[
'organizeTraining'
+
trainSuffix
]?.
findIndex
(
k
=>
k
.
name
.
includes
(
'attendingStaff'
))
||
-
1
if
(
staffIdx
!=
-
1
)
{
if
(
staffIdx
!=
-
1
)
{
...
@@ -595,7 +595,7 @@ Page({
...
@@ -595,7 +595,7 @@ Page({
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
wx
.
$router
.
getPageInstance
()
return
thisPage
?.
data
[
this
.
data
.
dataAttrName
]
return
thisPage
?.
data
[
this
.
data
.
dataAttrName
]
},
},
dealParams
()
{
dealParams
()
{
let
{
tmlpObj
}
=
this
.
data
let
{
tmlpObj
}
=
this
.
data
let
list
=
Object
.
keys
(
tmlpObj
)
let
list
=
Object
.
keys
(
tmlpObj
)
...
@@ -609,22 +609,34 @@ Page({
...
@@ -609,22 +609,34 @@ Page({
}
}
})
})
})
})
// 没有组织培训,需删掉的属性
let
trainList
=
[{
let
noOrganAttrList
=
tmlpObj
?.
organizeTraining
?.
map
(
item
=>
{
tmlpName
:
'organizeTraining'
,
return
item
.
name
!=
'isTrainingOrganized'
?
item
.
name
:
''
isTrain
:
'isTrainingOrganized'
})
},
{
if
(
params
?.
isTrainingOrganized
==
'否'
)
{
tmlpName
:
'organizeTraining_1'
,
noOrganAttrList
.
forEach
(
item
=>
{
isTrain
:
'isTrainingOrganized_1'
delete
params
[
item
]
},
{
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
if
(
params
[
k
.
isTrain
]
==
'否'
)
{
delete
params
.
attendingStaffTxt
noOrganAttrList
.
forEach
(
item
=>
{
}
else
{
delete
params
[
item
]
params
.
staffIds
=
params
.
staffIds
||
[]
})
params
.
staffIds
.
concat
(
params
?.
staffIds_1
||
[]).
concat
(
params
?.
staffIds_2
||
[])
delete
params
[
'staffIds'
+
trainSuffix
]
delete
params
.
staffIds_1
delete
params
[
'attendingStaff'
+
trainSuffix
+
'Txt'
]
delete
params
.
staffIds_2
}
else
{
}
staffIds
=
staffIds
.
concat
(
params
[
'staffIds'
+
trainSuffix
]?.
split
(
','
)
||
[])
}
})
params
.
staffIds
=
staffIds
.
join
(
','
)
if
(
params
.
attendingStaff
)
{
if
(
params
.
attendingStaff
)
{
params
.
attendingStaff
=
params
.
attendingStaffTxt
params
.
attendingStaff
=
params
.
attendingStaffTxt
delete
params
.
attendingStaffTxt
delete
params
.
attendingStaffTxt
...
@@ -643,15 +655,16 @@ Page({
...
@@ -643,15 +655,16 @@ Page({
confirmText
:
"确定"
,
confirmText
:
"确定"
,
confirmColor
:
"#347BFF"
,
confirmColor
:
"#347BFF"
,
success
(
res
)
{
success
(
res
)
{
that
.
setData
({
isConfirm
:
false
})
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
api
.
saveTempReport
(
params
).
then
(
res
=>
{
api
.
saveTempReport
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
'0'
||
res
.
code
==
'-3'
)
{
if
(
res
.
code
==
'0'
||
res
.
code
==
'-3'
)
{
that
.
getRecordDetail
()
that
.
getRecordDetail
()
}
}
wx
.
$util
.
showToast
(
res
.
code
==
'0'
?
'提交成功'
:
res
.
message
)
wx
.
$util
.
showToast
(
res
.
code
==
'0'
?
'提交成功'
:
res
.
message
)
}).
finally
(()
=>
{
that
.
setData
({
isConfirm
:
false
})
})
})
}
}
}
}
...
@@ -704,7 +717,6 @@ Page({
...
@@ -704,7 +717,6 @@ Page({
}
}
let
linkList
=
[
'tencentMeetingRecordingLink'
,
'tencentMeetingRecordingLink_1'
,
'tencentMeetingRecordingLink_2'
]
let
linkList
=
[
'tencentMeetingRecordingLink'
,
'tencentMeetingRecordingLink_1'
,
'tencentMeetingRecordingLink_2'
]
for
(
let
i
=
0
;
i
<
linkList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
linkList
.
length
;
i
++
)
{
console
.
log
(
linkList
[
i
])
if
(
this
.
validLink
(
formData
,
linkList
[
i
]))
{
if
(
this
.
validLink
(
formData
,
linkList
[
i
]))
{
this
.
setData
({
this
.
setData
({
isConfirm
:
false
isConfirm
:
false
...
@@ -715,7 +727,7 @@ Page({
...
@@ -715,7 +727,7 @@ Page({
let
params
=
{
let
params
=
{
formJson
:
this
.
dealParams
()
formJson
:
this
.
dealParams
()
}
}
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
params
)
),
'params-----'
)
console
.
log
(
JSON
.
parse
(
params
.
formJson
),
'params-----'
)
this
.
secondConfirm
(
params
)
this
.
secondConfirm
(
params
)
},
},
...
@@ -807,7 +819,6 @@ Page({
...
@@ -807,7 +819,6 @@ Page({
[
"timeBean.yearMonth"
]:
y
+
"-"
+
m
,
[
"timeBean.yearMonth"
]:
y
+
"-"
+
m
,
[
"tmlpFormData.reportDate"
]:
date
,
[
"tmlpFormData.reportDate"
]:
date
,
isEditReport
:
false
,
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'
)
isDisable
:
timeBean
.
weekDayList
[
timeBean
.
selectDay
].
date
!=
new
Date
().
format
(
'yyyy-MM-dd'
)
});
});
this
.
getDateRecord
()
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