|
@@ -41,7 +41,7 @@
|
|
|
<u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888" @click="openMDpage"></u-icon>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="有效天数" label-width="160rpx" prop="effectiveDay">
|
|
|
- <u-input v-model="form.effectiveDay" type="number" input-align="right" placeholder="请输入任务有效天数" />
|
|
|
+ <u-input v-model="form.effectiveDay" type="number" input-align="right" placeholder="请输入任务有效天数" /> 天
|
|
|
</u-form-item>
|
|
|
</u-form>
|
|
|
<view class="btns">
|
|
@@ -109,6 +109,12 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
+ onLoad(opts) {
|
|
|
+ if(opts.id){
|
|
|
+ // 编辑
|
|
|
+ this.getCheckTaskConfig(opts.id)
|
|
|
+ }
|
|
|
+ },
|
|
|
onReady() {
|
|
|
this.$refs.uForm.setRules(this.rules);
|
|
|
// 检测选择的考评指标
|
|
@@ -133,6 +139,30 @@ export default {
|
|
|
uni.$off('selKpStores');
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 编辑信息
|
|
|
+ getCheckTaskConfig(id){
|
|
|
+ getCheckTaskConfig({id}).then(res => {
|
|
|
+ if(res.status==200){
|
|
|
+ console.log(res.data)
|
|
|
+ let data = res.data
|
|
|
+ this.form = Object.assign(this.form,{
|
|
|
+ id: data.id,
|
|
|
+ name: data.name, // 任务名称
|
|
|
+ cycleType: data.cycleType, // 周期类型
|
|
|
+ buildDateDay: data.buildDateDay, // 执行日期
|
|
|
+ buildDateWeekList: data.buildDateWeekList, // 周几
|
|
|
+ buildTime: data.buildTime, // 执行时间
|
|
|
+ startDate: data.startDate, // 开始日期
|
|
|
+ endDate: data.endDate, // 结束日期
|
|
|
+ assessList: data.assessTargetList, // 考评指标
|
|
|
+ storeList: data.storeList, // 考评门店
|
|
|
+ effectiveDay: Number(data.effectiveDay) // 任务有效天数
|
|
|
+ })
|
|
|
+ // 回显任务周期类型
|
|
|
+ this.$refs.cycleType.setVal(data.cycleType)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 天类型的执行日期
|
|
|
confirmBuildDateDay(val) {
|
|
|
this.form.buildDateDay = val.year + '-' + val.month + '-' + val.day;
|