lilei 4 lat temu
rodzic
commit
2d631bc051

+ 5 - 0
components/select/v-select.vue

@@ -38,6 +38,11 @@ export default {
       default: ''
     },
   },
+  watch: {
+  	value(newValue, oldValue) {
+  		this.setVal(newValue)
+  	}
+  },
   created () {
     if (this.code) {
       if (this.placeholder) {

+ 0 - 6
pages.json

@@ -205,12 +205,6 @@
 				"navigationBarTitleText": "考评指标详情"
 			}
 		},
-		{
-			"path": "pages/spotCheckConfigure/spotCheckDetail/evaluateStoreDetail",
-			"style": {
-				"navigationBarTitleText": "考评门店详情"
-			}
-		},
 		{
 			"path": "pages/spotCheckConfigure/evaluateItem",
 			"style": {

+ 31 - 1
pages/spotCheckConfigure/addSpotCheck.vue

@@ -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;

+ 2 - 1
pages/spotCheckConfigure/evaluateStore.vue

@@ -33,13 +33,14 @@
 		},
 		onLoad(opts) {
 			this.value = opts.item&&JSON.parse(opts.item)||[]
+			console.log(this.value)
 			this.value.map(item=>{
 				item.id = item.storeId
 			})
 			this.type = opts.type && opts.type || 'checkbox'
-			console.log(this.value)
 			// 查询门店
 			findStoreList({}).then(res=>{
+				onsole.log(res.data)
 				if(res.status == 200){
 					this.list = res.data || []
 				}

Plik diff jest za duży
+ 0 - 0
unpackage/dist/dev/app-plus/app-config-service.js


Plik diff jest za duży
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


Plik diff jest za duży
+ 12 - 13
unpackage/dist/dev/app-plus/app-view.js


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików