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 453e1b90
authored
Mar 23, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:页面input确实软键盘收起问题
1 parent
631e79fe
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
184 additions
and
7 deletions
api/environment.js
components/Calendar/Calendar.js
components/Calendar/Calendar_Function.js
components/Calendar/Static_Properties.js
components/vant/common/relation.js
tabOperating/pages/index/components/businessCell/businessCell.js
tabOperating/pages/index/components/businessCell/businessCell.scss
tabOperating/pages/index/components/businessCell/businessCell.wxml
tabOperating/pages/index/components/businessCell/businessCell.wxss
tabOperating/pages/index/index.js
tabOperating/pages/index/index.wxml
api/environment.js
View file @
453e1b9
...
...
@@ -5,7 +5,7 @@
2测试
3生产
*/
const
index
=
3
const
index
=
2
const
secretKey_items
=
{
ip
:
{
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
...
...
components/Calendar/Calendar.js
View file @
453e1b9
...
...
@@ -18,6 +18,39 @@ Component({
*/
methods
:
{
noScroll
()
{},
/** 日期手动改 */
resetData
(
date
)
{
// let _this = this[_CalendarObject_]
let
{
monthList
,
current
}
=
this
.
data
console
.
log
(
monthList
)
console
.
log
(
date
)
// return
monthList
.
map
(
x
=>
{
x
.
data
.
map
(
i
=>
(
i
.
active
=
false
))
})
monthList
.
map
((
item
,
index
)
=>
{
item
.
data
.
map
(
ele
=>
{
if
(
ele
.
data
==
date
)
{
console
.
log
(
ele
.
data
)
console
.
log
(
current
)
ele
.
active
=
true
current
=
index
}
})
})
this
.
setData
({
monthList
,
current
})
},
// resetData(date) {
// // console.log(this.resetData)
// // this.getUserDayReport(n)[CalendarFunction]
// // this[CalendarFunction].resetData(date)
// // console.log(date)
// // console.log(this[CalendarFunction].setCalenderBodyHeight)
// },
setCalenderBodyHeight
()
{
this
[
CalendarFunction
].
setCalenderBodyHeight
()
},
...
...
components/Calendar/Calendar_Function.js
View file @
453e1b9
...
...
@@ -162,6 +162,7 @@ class Calendar {
let
months
=
(
parseInt
(
year2
)
-
parseInt
(
year1
))
*
12
+
(
parseInt
(
month2
)
-
parseInt
(
month1
))
return
months
}
/**单选 */
single
(
e
)
{
let
_this
=
this
[
_CalendarObject_
]
...
...
components/Calendar/Static_Properties.js
View file @
453e1b9
...
...
@@ -76,6 +76,13 @@ export default {
/**隐藏水印 */
hideMark
:
Boolean
,
isComponents
:
Boolean
// dataDateStr: {
// type: String,
// observer: function (n) {
// // console.log(n)
// this.resetData(n)
// }
// } //日期变化
// forceFullSucreen: {
// // 兼容isFullSucreen 属性不准确的情况
// type: Boolean,
...
...
components/vant/common/relation.js
0 → 100644
View file @
453e1b9
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
useChildren
=
exports
.
useParent
=
void
0
;
function
useParent
(
name
,
onEffect
)
{
var
_a
;
var
path
=
"../"
+
name
+
"/index"
;
return
{
relations
:
(
_a
=
{},
_a
[
path
]
=
{
type
:
'ancestor'
,
linked
:
function
()
{
onEffect
&&
onEffect
.
call
(
this
);
},
linkChanged
:
function
()
{
onEffect
&&
onEffect
.
call
(
this
);
},
unlinked
:
function
()
{
onEffect
&&
onEffect
.
call
(
this
);
},
},
_a
),
mixin
:
Behavior
({
created
:
function
()
{
var
_this
=
this
;
Object
.
defineProperty
(
this
,
'parent'
,
{
get
:
function
()
{
return
_this
.
getRelationNodes
(
path
)[
0
];
},
});
Object
.
defineProperty
(
this
,
'index'
,
{
// @ts-ignore
get
:
function
()
{
var
_a
,
_b
;
return
(
_b
=
(
_a
=
_this
.
parent
)
===
null
||
_a
===
void
0
?
void
0
:
_a
.
children
)
===
null
||
_b
===
void
0
?
void
0
:
_b
.
indexOf
(
_this
);
},
});
},
}),
};
}
exports
.
useParent
=
useParent
;
function
useChildren
(
name
,
onEffect
)
{
var
_a
;
var
path
=
"../"
+
name
+
"/index"
;
return
{
relations
:
(
_a
=
{},
_a
[
path
]
=
{
type
:
'descendant'
,
linked
:
function
(
target
)
{
onEffect
&&
onEffect
.
call
(
this
,
target
);
},
linkChanged
:
function
(
target
)
{
onEffect
&&
onEffect
.
call
(
this
,
target
);
},
unlinked
:
function
(
target
)
{
onEffect
&&
onEffect
.
call
(
this
,
target
);
},
},
_a
),
mixin
:
Behavior
({
created
:
function
()
{
var
_this
=
this
;
Object
.
defineProperty
(
this
,
'children'
,
{
get
:
function
()
{
return
_this
.
getRelationNodes
(
path
)
||
[];
},
});
},
}),
};
}
exports
.
useChildren
=
useChildren
;
tabOperating/pages/index/components/businessCell/businessCell.js
View file @
453e1b9
// tabOperating/pages/index/component/business/business.js
import
api
from
'../../../../api'
const
app
=
getApp
()
Component
({
/**
* 组件的属性列表
...
...
@@ -48,6 +49,7 @@ Component({
* 组件的初始数据
*/
data
:
{
scrollTop
:
0
,
tipsShow
:
false
,
startX
:
0
,
//开始坐标
startY
:
0
,
...
...
@@ -145,7 +147,47 @@ Component({
* 组件的方法列表
*/
methods
:
{
inputFocus
(
e
)
{
this
.
setTimeout
(()
=>
{
wx
.
hideKeyboard
()
},
1000
)
// let thisPage = wx.$router.getPageInstance()
// // console.log(thisPage.data)
// let { statusBarHeight } = thisPage.data
// console.log(e, '键盘弹起', statusBarHeight)
// this.setData({
// scrollTop: 1000
// })
// wx.pageScrollTo({
// scrollTop: 271,
// duration: 300
// })
// var inputHeight = 0
// setTimeout(() => {
// thisPage.setData({
// statusBarHeight: -271
// })
// }, 1000)
// console.log(e.detail.height)
// thisPage.setData({
// statusBarHeight: -271
// })
// if (e.detail.height) {
// inputHeight = e.detail.height
// thisPage.setData({
// statusBarHeight: -parseInt(inputHeight)
// })
// }
},
inputBlur
(
e
)
{
// let statusBarHeight = app.globalData.statusBarHeight + 43
// let thisPage = wx.$router.getPageInstance()
// thisPage.setData({
// statusBarHeight
// })
// console.log('confirm')
// console.log(statusBarHeight)
let
{
index
}
=
e
.
currentTarget
.
dataset
let
{
list
,
dataDateStr
}
=
this
.
data
if
(
!
list
[
index
].
value
)
return
...
...
@@ -257,7 +299,7 @@ Component({
})
this
.
getUserDayReport
()
}
else
{
}
else
{
wx
.
$util
.
showToast
(
'新增字段失败'
)
}
})
...
...
tabOperating/pages/index/components/businessCell/businessCell.scss
View file @
453e1b9
...
...
@@ -105,6 +105,7 @@
.num
{
font-weight
:
600
;
position
:
relative
;
}
}
...
...
@@ -151,7 +152,10 @@
font-weight
:
600
;
font-size
:
28rpx
;
color
:
#333333
;
position
:
absolute
;
right
:
0
;
top
:
50%
;
transform
:
translateY
(
-50%
);
}
}
...
...
@@ -277,6 +281,11 @@
text-align
:
right
;
font-size
:
28rpx
;
max-width
:
240rpx
;
width
:
240rpx
;
height
:
40rpx
;
// line-height: 122rpx;
// height: 100%;
// width: 100%;
}
.placeholder-class
{
...
...
tabOperating/pages/index/components/businessCell/businessCell.wxml
View file @
453e1b9
...
...
@@ -9,6 +9,7 @@
bindrefresherrefresh="refreshList"
refresher-threshold="104"
style="height:100%;"
scroll-top="{{scrollTop}}"
class="businessPage list"
refresher-triggered="{{triggered}}">
<view class=" title">
...
...
@@ -119,7 +120,7 @@
{{item['fieldValue']}}
</view>
<!-- <view class="placeholder" >输入数字</view> -->
<input
<
!-- <
input
wx:else
placeholder="输入数字"
class="input"
...
...
@@ -129,8 +130,24 @@
type="text"
bindblur="inputBlur"
bindinput="input"
bindfocus="inputFocus"
data-index="{{index}}"
always-embed></input>
always-embed></input> -->
<textarea
wx:else
placeholder="输入数字"
class="input"
value="{{item['value']}}"
placeholder-class="placeholder-class"
maxlength="10"
type="text"
bindblur="inputBlur"
bindinput="input"
bindfocus="inputFocus"
bindconfirm="inputBlur"
data-index="{{index}}"
always-embed></textarea>
<!-- adjust-position="{{inputUp}}" adjust-position="" -->
</view>
</view>
</view>
...
...
tabOperating/pages/index/components/businessCell/businessCell.wxss
View file @
453e1b9
.businessPage .title{display:flex;justify-content:space-between;align-items:center;height:80rpx;padding:0 20rpx}.businessPage .title .addFields{font-size:24rpx;color:#333;display:flex;align-items:center;height:100%}.businessPage .title .addIcon{width:24rpx;height:24rpx;margin-right:6rpx}.businessPage .title .tips{display:flex;margin-left:auto;align-items:center;height:100%;color:#999;font-size:24rpx}.businessPage .title .tipsIcon{width:24rpx;height:24rpx;margin-left:8rpx}.businessPage .cell{margin:20rpx;padding-bottom:20rpx;font-size:24rpx;background-color:#fff;border-bottom:.5px solid #d8d4d4}.businessPage .cell .todayData{display:flex;justify-content:space-between;margin-bottom:10rpx;font-size:28rpx;color:#333333}.businessPage .cell .todayData .num{font-weight:600;display:flex;align-items:center}.businessPage .cell .todayData .num image{width:10rpx;height:6rpx}.businessPage .cell .monthData{display:flex;justify-content:space-between;color:#999999;font-size:24rpx}.businessPage .cell .monthData .num{display:flex;align-items:center}.businessPage .cell .monthData .num image{width:15rpx;height:9rpx;margin:4rpx 6rpx 0 10rpx}.businessPage .otherCell{display:flex;justify-content:space-between;margin:40rpx 20rpx 0;padding-bottom:40rpx;font-size:28rpx;color:#333;background-color:#fff;border-bottom:.5px solid #d8d4d4}.businessPage .otherCell .num{font-weight:600
}.businessPage .otherAdd{height:122rpx;display:flex;align-items:center;justify-content:space-between;background-color:#fff}.businessPage .otherAdd .otherData{display:flex;align-items:center}.businessPage .otherAdd .label{font-size:28rpx;margin-right:32rpx}.businessPage .otherAdd .check{display:flex;align-items:center;color:#3582EE;font-size:24rpx}.businessPage .otherAdd .check .checkIcon{width:24rpx;height:24rpx;margin-right:8rpx}.businessPage .otherAdd .placeholder{color:#C3C3C3;font-size:28rpx}.businessPage .otherAdd .placeholder.num{font-weight:600;font-size:28rpx;color:#333333}.businessPage .touch-item{margin:0 20rpx;display:flex;justify-content:space-between;width:calc(100% - 40rpx);overflow:hidden;border-bottom:.5px solid #d8d4d4}.businessPage .content{width:100%;margin-right:0;-webkit-transition:all 0.4s;transition:all 0.4s;-webkit-transform:translateX(90px);transform:translateX(90px);margin-left:-90px}.businessPage .content .item{display:flex}.businessPage .touch-item:nth-last-child(1){border-radius:0 0 16rpx 16rpx;border-bottom:0}.businessPage .del{width:90px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;background-color:#f1554c;-webkit-transform:translateX(90px);transform:translateX(90px);-webkit-transition:all 0.4s;transition:all 0.4s;font-size:28rpx}.businessPage .confirm{animation-duration:.5s;animation-name:fadein}@keyframes fadein{0%{opacity:0;transform:translateX(90px)}100%{opacity:1;transform:translateX(0px)}}.businessPage .touch-move-active .content,.businessPage .touch-move-active .del{-webkit-transform:translateX(0);transform:translateX(0)}.cellContainer view:last-child{border-bottom:none}.bottomTips{height:92rpx;line-height:92rpx;text-align:center;font-size:20rpx;color:#666666;background:#F8F9F9}.input{text-align:right;font-size:28rpx;max-width:2
40rpx}.placeholder-class{color:#C3C3C3}.cellContainer{border-radius:12rpx 12rpx 0 0;background-color:#fff;overflow:hidden}
.businessPage .title{display:flex;justify-content:space-between;align-items:center;height:80rpx;padding:0 20rpx}.businessPage .title .addFields{font-size:24rpx;color:#333;display:flex;align-items:center;height:100%}.businessPage .title .addIcon{width:24rpx;height:24rpx;margin-right:6rpx}.businessPage .title .tips{display:flex;margin-left:auto;align-items:center;height:100%;color:#999;font-size:24rpx}.businessPage .title .tipsIcon{width:24rpx;height:24rpx;margin-left:8rpx}.businessPage .cell{margin:20rpx;padding-bottom:20rpx;font-size:24rpx;background-color:#fff;border-bottom:.5px solid #d8d4d4}.businessPage .cell .todayData{display:flex;justify-content:space-between;margin-bottom:10rpx;font-size:28rpx;color:#333333}.businessPage .cell .todayData .num{font-weight:600;display:flex;align-items:center}.businessPage .cell .todayData .num image{width:10rpx;height:6rpx}.businessPage .cell .monthData{display:flex;justify-content:space-between;color:#999999;font-size:24rpx}.businessPage .cell .monthData .num{display:flex;align-items:center}.businessPage .cell .monthData .num image{width:15rpx;height:9rpx;margin:4rpx 6rpx 0 10rpx}.businessPage .otherCell{display:flex;justify-content:space-between;margin:40rpx 20rpx 0;padding-bottom:40rpx;font-size:28rpx;color:#333;background-color:#fff;border-bottom:.5px solid #d8d4d4}.businessPage .otherCell .num{font-weight:600
;position:relative}.businessPage .otherAdd{height:122rpx;display:flex;align-items:center;justify-content:space-between;background-color:#fff}.businessPage .otherAdd .otherData{display:flex;align-items:center}.businessPage .otherAdd .label{font-size:28rpx;margin-right:32rpx}.businessPage .otherAdd .check{display:flex;align-items:center;color:#3582EE;font-size:24rpx}.businessPage .otherAdd .check .checkIcon{width:24rpx;height:24rpx;margin-right:8rpx}.businessPage .otherAdd .placeholder{color:#C3C3C3;font-size:28rpx}.businessPage .otherAdd .placeholder.num{font-weight:600;font-size:28rpx;color:#333333;position:absolute;right:0;top:50%;transform:translateY(-50%)}.businessPage .touch-item{margin:0 20rpx;display:flex;justify-content:space-between;width:calc(100% - 40rpx);overflow:hidden;border-bottom:.5px solid #d8d4d4}.businessPage .content{width:100%;margin-right:0;-webkit-transition:all 0.4s;transition:all 0.4s;-webkit-transform:translateX(90px);transform:translateX(90px);margin-left:-90px}.businessPage .content .item{display:flex}.businessPage .touch-item:nth-last-child(1){border-radius:0 0 16rpx 16rpx;border-bottom:0}.businessPage .del{width:90px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;background-color:#f1554c;-webkit-transform:translateX(90px);transform:translateX(90px);-webkit-transition:all 0.4s;transition:all 0.4s;font-size:28rpx}.businessPage .confirm{animation-duration:.5s;animation-name:fadein}@keyframes fadein{0%{opacity:0;transform:translateX(90px)}100%{opacity:1;transform:translateX(0px)}}.businessPage .touch-move-active .content,.businessPage .touch-move-active .del{-webkit-transform:translateX(0);transform:translateX(0)}.cellContainer view:last-child{border-bottom:none}.bottomTips{height:92rpx;line-height:92rpx;text-align:center;font-size:20rpx;color:#666666;background:#F8F9F9}.input{text-align:right;font-size:28rpx;max-width:240rpx;width:240rpx;height:
40rpx}.placeholder-class{color:#C3C3C3}.cellContainer{border-radius:12rpx 12rpx 0 0;background-color:#fff;overflow:hidden}
tabOperating/pages/index/index.js
View file @
453e1b9
...
...
@@ -215,11 +215,13 @@ Page({
let
{
type
}
=
e
.
currentTarget
.
dataset
console
.
log
(
type
)
let
{
dateObj
}
=
this
.
data
this
.
calendar
=
this
.
selectComponent
(
'#calender'
)
if
(
type
==
'before'
)
{
this
.
setTimeList
(
dateObj
.
beforeDay
)
}
else
{
this
.
setTimeList
(
dateObj
.
nextDay
)
}
this
.
calendar
.
resetData
(
type
==
'before'
?
dateObj
.
beforeDay
:
dateObj
.
nextDay
)
},
// 获取选中天数
rangeSelect
(
e
)
{
...
...
tabOperating/pages/index/index.wxml
View file @
453e1b9
...
...
@@ -78,6 +78,7 @@
minDate="2020-10-01"
maxDate="{{dateObj.maxDate}}"
isComponents>
<!-- dataDateStr="{{dateObj.todayShow}}" -->
<view class="item text-center dateNum">
{{dateObj.todayShow}}
<image class="solidArrow" src="../../images/solidArrow.png" />
...
...
@@ -114,7 +115,7 @@
id="businessCell"
wx:if="{{activeTab==0}}"
canRemark="{{canRemark}}"
today
="{{dateObj.maxDate}}"
today
="{{dateObj.maxDate}}"
dataDateStr="{{dateObj.today}}" />
<staffCell id="staffCell" wx:if="{{activeTab==1}}" dataDateStr="{{dateObj.today}}" />
<conquestCell id="conquestCell" wx:if="{{activeTab==2}}" date="{{dateObj.today}}" />
...
...
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