Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-4
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
office
haoban-4
Commits
a18e00b0
Commit
a18e00b0
authored
Nov 17, 2020
by
无尘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改下发设置
parent
76cf3757
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
4 deletions
+76
-4
target-set.vue
src/views/apps/target-manage/target-set.vue
+76
-4
No files found.
src/views/apps/target-manage/target-set.vue
View file @
a18e00b0
...
...
@@ -4,22 +4,49 @@
* @Author: 无尘
* @Date: 2020-11-09 10:05:27
* @LastEditors: 无尘
* @LastEditTime: 2020-11-
09 10:22:49
* @LastEditTime: 2020-11-
17 15:53:51
-->
<!-- -->
<
template
>
<div>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
@
submit
.
native
.
prevent
>
<el-form-item
label=
""
prop=
"overDayJudge"
>
<span
class=
"font-14 color-606266"
>
下发时间当月,第
</span><el-input-number
controls-position=
"right"
class=
"w-100"
v-model=
"ruleForm.overDayJudge"
placeholder=
"请输入"
:step=
"1"
:step-strictly=
"true"
:min=
"1"
:max=
"99999999"
></el-input-number><span
class=
"font-14 color-606266 p-l-10"
>
号
</span>
<span
class=
"font-14 color-606266"
>
注:如当月第28天下发,如果现在是1月份,即1月28号下发2月份指标。设置后次日生效
</span>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
:loading=
"loadingBtn"
@
click=
"submitForm('ruleForm')"
>
保存
</el-button>
</el-form-item>
</div>
</
template
>
<
script
>
import
fetch
from
'@/api/target-manage-app.js'
;
const
{
saveTargetSet
,
getTargetSet
}
=
fetch
;
import
{
_debounce
}
from
'@/common/js/public'
;
export
default
{
name
:
'TargetSet'
,
components
:
{},
props
:
{
brandId
:
{
type
:
String
,
default
()
{
return
''
;
}
}
},
data
()
{
return
{
ruleForm
:
{
overDayJudge
:
''
},
rules
:
{
overDayJudge
:
[
{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
},
]
},
loadingBtn
:
false
};
},
// 生命周期 - 挂载完成(访问DOM元素)
...
...
@@ -29,9 +56,54 @@ export default {
// methods
methods
:
{
/**
* 保存
*/
saveSet
:
_debounce
(
function
()
{
const
that
=
this
;
that
.
loadingBtn
=
true
;
that
.
postSave
();
},
300
),
postSave
()
{
const
that
=
this
;
const
para
=
{
overDayJudge
:
that
.
ruleForm
.
overDayJudge
,
wxEnterpriseId
:
that
.
wxEnterpriseId
};
saveTargetSet
(
para
)
.
then
(
res
=>
{
that
.
loadingBtn
=
false
;
that
.
$message
.
success
(
'保存成功'
);
})
.
catch
(
function
(
error
)
{
that
.
loadingBtn
=
false
;
});
},
/**
* 获取设置数据
*/
getData
()
{
const
that
=
this
;
const
para
=
{
enterpriseId
:
that
.
brandId
,
};
getTargetSet
(
para
)
.
then
(
res
=>
{
that
.
ruleForm
.
overDayJudge
=
res
.
result
.
overDayJudge
||
''
;
})
.
catch
(
function
(
error
)
{
});
}
},
watch
:
{
brandId
:
function
(
newData
,
oldData
)
{
const
that
=
this
;
if
(
!!
newData
)
{
that
.
getData
();
}
}
},
watch
:
{}
};
</
script
>
<
style
lang=
'less'
scoped
>
...
...
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