From 463728a3435adfbaa790151c84eca8adf5418b4e Mon Sep 17 00:00:00 2001 From: e <2432808546@qq.com> Date: Mon, 28 Jun 2021 14:09:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/oder/AddOrder.vue | 288 ++++++++++++++++++++++++++++++------ 1 file changed, 245 insertions(+), 43 deletions(-) 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'); + } } } }; -