Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsApp
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d0631fa0
authored
Jul 31, 2025
by
liangjianmin
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix(tallyReceive): 优化日期转DC输入处理,添加输入事件监听,提升用户体验
parent
8c935ae7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
pages/tallyReceive/operate.vue
pages/tallyReceive/operate.vue
View file @
d0631fa0
...
...
@@ -207,7 +207,7 @@
<text
class=
"input-title-t2"
>
日期转DC:
</text>
</view>
<view
class=
"input-box"
>
<input
type=
"number"
maxlength=
"6"
class=
"uni-input"
placeholder-style=
"color:#919399"
placeholder=
"请输入6位数年月日"
v-model=
"date_code_format"
/>
<input
type=
"number"
maxlength=
"6"
class=
"uni-input"
placeholder-style=
"color:#919399"
placeholder=
"请输入6位数年月日"
v-model=
"date_code_format"
@
input=
"handleDateCodeFormatInput"
/>
</view>
</view>
</view>
...
...
@@ -469,12 +469,6 @@
}
else
{
this
.
formParams
.
image_ids
=
''
;
}
},
// 监听日期转DC输入
date_code_format
:
{
handler
:
function
(
val
)
{
this
.
handleDateCodeFormat
(
val
);
}
}
},
methods
:
{
...
...
@@ -1004,10 +998,18 @@
},
200
);
},
/**
* 处理日期转DC格式输入事件
* @param {Object} event - 输入事件对象
*/
handleDateCodeFormatInput
:
debounce
(
function
(
event
)
{
var
val
=
event
.
target
.
value
;
this
.
handleDateCodeFormat
(
val
);
},
500
),
/**
* 处理日期转DC格式
* @param {String} val - 输入的6位数字日期
*/
handleDateCodeFormat
:
debounce
(
function
(
val
)
{
handleDateCodeFormat
:
function
(
val
)
{
if
(
val
&&
val
.
length
===
6
)
{
// 获取年份后两位
var
year
=
val
.
substring
(
0
,
2
);
...
...
@@ -1066,7 +1068,7 @@
icon
:
'none'
});
}
}
,
500
)
}
}
};
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment