diff --git a/src/views/oder/AddOrder.vue b/src/views/oder/AddOrder.vue index 01753e5..8e90161 100644 --- a/src/views/oder/AddOrder.vue +++ b/src/views/oder/AddOrder.vue @@ -24,26 +24,29 @@ - + - + + + + + - - - - - - - + + + + @@ -51,22 +54,31 @@ - - - - - - - + + + - + + + + + + + + + + @@ -94,32 +106,56 @@ - + + + + + + + - + - + - + - + - + @@ -127,18 +163,111 @@ - + + + + + +
+
+
+

+ 数据平台权限 +
+ 添加 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -367,7 +496,29 @@ export default { provinceList: this.$store.state.provinceList, cityList: [], schoolList: [], - jurisdictionData: [], + jurisdictionData: [ + { name:'1', + date:'', + startDate:'', + endDate:'', + consignment:false, + + } + ],// 课程权限 + + dataPlatform:[ + { + name:'1', + date:'', + startDate:'', + endDate:'', + platformState:'', + bargain:'', + account:'', + gross:'' + + } + ],// 数据平台data permissionData: [], curVisible: false, configSearch: '', @@ -422,6 +573,7 @@ export default { test: [] }; }, + mounted() { if(this.form.orderId){ let data = { @@ -465,6 +617,9 @@ export default { } }, methods: { + testfn(event){ + console.log(event,'ev'); + }, // 清除省份 clearprovince(){ this.form.cityId = '', @@ -658,11 +813,7 @@ export default { this.form.orderAmount = sums return sums; }, - changeSwitch (e,row,index) { - let newData = row; - newData.status = newData.status === 1 ? 1 : 0; - this.jurisdictionData[index] = newData; - }, + // 上传文件 handleExceed(files, fileList) { this.$message.warning( @@ -698,12 +849,63 @@ export default { }, goback(){ this.$router.go(-1) + }, + + // 课程部分的switch切换 + courseSwitch(e,row){ + this.deadLine(row.date,row) + }, + // 平台权限switch切换 + platformSwitch (e,row) { + this.deadLine(row.date,row) + }, + // 使用期限转换 + deadLine(e,row){ + console.log(row.consignment,e,'row.consignment'); + if(e===''||!row.consignment) { + console.log('進入return'); + row.startDate = '' + row.endDate = '' + return + } + function completeDate(value) { + return value < 10 ? "0"+value:value; + } + let char = "-"; + let nowDate = new Date() + let day = nowDate.getDate(); + let month = nowDate.getMonth() + 1; + let year = nowDate.getFullYear(); + //补全0,并拼接当前的时间点 + let nowYear = year + char + completeDate(month) + char +completeDate(day); + // 判断结束日期 + let endYear = +year+parseInt(e/12) + char + completeDate(month+e%12) + char +completeDate(day); + // 待接口改 + row.startDate = nowYear + row.endDate = endYear + this.$forceUpdate(); + console.log(endYear,nowYear); + + }, + // 计算成交总额 + dealComputers(e,row){ + if(row.bargain&&row.account){ + row.gross = row.bargain*row.account; + this.$forceUpdate(); + console.log(row.gross,'row.gross'); + } } } }; -