diff --git a/src/setting.js b/src/setting.js index b2dad47..12864b7 100644 --- a/src/setting.js +++ b/src/setting.js @@ -4,7 +4,7 @@ const url = location.host; const isDev = process.env.NODE_ENV === 'development'; // 开发环境 const isTest = url.includes('39.108.250.202'); //测试服 -const isPro = url.includes('huorantech'); //正式服 +const isPro = url.includes('124.71.12.62'); //正式服 let jumpPath = ""; let host = ""; @@ -12,7 +12,7 @@ if (isDev) { // jumpPath = "http://www.huorantech.cn/judgmentPoint/"; jumpPath = "http://39.108.250.202/judgmentPoint/"; // jumpPath = "http://192.168.31.254:8087/"; // 本地调试-需要启动本地判分点系统 - // host = "http://www.huorantech.cn:9000/";//线上 + // host = "http://www.huorantech.cn:9000";//线上 host = "http://39.108.250.202:9000";//测试 // host = 'http://192.168.31.151:9000'// 榕 // host = 'http://192.168.31.125:9000'// 坤 @@ -23,8 +23,10 @@ if (isDev) { host = "http://39.108.250.202:9000"; // host = "http://124.71.12.62:9000";//线上 } else if (isPro) { - jumpPath = "http://www.huorantech.cn/judgmentPoint/"; - host = "http://www.huorantech.cn:9000";//线上 + jumpPath = "http://124.71.12.62/judgmentPoint/"; + host = "http://124.71.12.62:9000";//线上 + // jumpPath = "http://www.huorantech.cn/judgmentPoint/"; + // host = "http://www.huorantech.cn:9000";//线上 } diff --git a/src/utils/api.js b/src/utils/api.js index 1b6ed59..67e0964 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -2,6 +2,7 @@ import Setting from "@/setting"; let host = Setting.host; // let uploadURL = "http://www.huorantech.cn:9000"; +// let uploadURL = "http://124.71.12.62:9000"; let uploadURL = "http://39.108.250.202:9000"; export default { diff --git a/src/views/customer/AddCustomer.vue b/src/views/customer/AddCustomer.vue index 8d8e633..d9f3f3e 100644 --- a/src/views/customer/AddCustomer.vue +++ b/src/views/customer/AddCustomer.vue @@ -97,14 +97,23 @@ - + + - + + - + diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue index 2c69fcc..a995764 100644 --- a/src/views/order/AddOrder.vue +++ b/src/views/order/AddOrder.vue @@ -121,17 +121,39 @@ - + + + + + + + - + @@ -236,17 +258,39 @@ - + + + + + + + @@ -599,6 +643,7 @@ export default { endTime: "" // 期限-尾 // orderId: '', // 绑定订单id }, + value1:'', contractTime: [],// 合同起止日期绑定值 token: "", orderOther: {// 订单其他数据 @@ -816,7 +861,8 @@ export default { cityId: form.cityId, phone: form.phone, orderAmount: form.orderAmount, - orderId: form.orderId + orderId: form.orderId, + options: form.options, }; this.coursePermissions = list.filter(i => i.authority === 1); this.dataPlatformPermissions = list.filter(i => i.authority === 0); @@ -1002,7 +1048,8 @@ export default { totalAmount: "",// 总价 isEnable: 1, // 启用否:1启用,0禁用 ship: 0,// 发货否(0未发货,1已发货,默认不发货) - authority: 1 // 区分权限 0为数据平台权限,1为课程权限 + authority: 1, // 区分权限 0为数据平台权限,1为课程权限 + options: 0, }; that.coursePermissions.push(obj); }; @@ -1113,7 +1160,8 @@ export default { totalAmount: "",// 总价 isEnable: 1, // 启用否:1启用,0禁用 ship: 0,// 发货否(0未发货,1已发货,默认不发货) - authority: 0// 数据平台权限 + authority: 0,// 数据平台权限 + options:0, }; that.dataPlatformPermissions.push(obj); }; @@ -1181,7 +1229,7 @@ export default { // 课程/数据平台-发货 handleDeliver(e, row) { if (this.editDisabled) { - this.$post(this.api.ship + "?id=" + `${row.dataOrCourseId}`).then(res => {}); + this.$post(this.api.ship,row).then(res => {}); } }, // 计算折扣率 @@ -1246,56 +1294,29 @@ export default { } }, // 使用期限转换以及计算剩余天数 - deadLine(e, row) { - function completeDate(value) { - if (value == 0) return "12"; - 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(); - if (this.renewDisabled || row.renew) {/* 处于续费状态 */ - if (!e) return row.endTime = ""; - let arr = row.startTime.split("-"); - let renewY = arr.shift();/* 年 */ - let renewM = arr.shift();/* 月 */ - let renewD = arr.shift();/* 日 */ - if ((+renewM + (+e)) > 12) { - renewY = +renewY + Math.ceil((+renewM + (+e)) / 12) - 1; + deadLine(e,row,options) { + let optionsData = '' + if(e > 0){ + if (options == 1){ + optionsData = e*30*24*60*60*1000 + }else if(options == 2){ + optionsData = e*365*24*60*60*1000 + }else{ + optionsData = e*24*60*60*1000 } - let endYear = renewY + char + completeDate((+renewM + (+e)) % 12) + char + renewD; - row.endTime = endYear; - - // 计算剩余天数 - let date1 = Date.parse(endYear); - let date2 = Date.parse(row.startTime); - let ms = Math.abs(date1 - date2); - row.remainingPeriod = Math.floor(ms / (24 * 3600 * 1000)); - } else { - if (e === "" || (e.substr(0, 1) === "0")) { - row.startTime = ""; - row.endTime = ""; - return; - } - //补全0,并拼接当前的时间点 - let nowYear = year + char + completeDate(month) + char + completeDate(day); - // 判断结束日期 - if ((+month + (+e)) > 12) { - year = +year + Math.ceil((+month + (+e)) / 12) - 1; - } - let endYear = year + char + completeDate((+month + (+e)) % 12) + char + completeDate(day); - // 得出起始年月日 - row.startTime = nowYear; - row.endTime = endYear; - // 计算剩余天数 - let date1 = Date.parse(endYear); - let date2 = Date.parse(nowYear); - let ms = Math.abs(date1 - date2); - let days = Math.floor(ms / (24 * 3600 * 1000)); - row.remainingPeriod = days; + }else{ + optionsData = 0 } + let time = new Date(row.startTime).getTime(); + let endTime = time + optionsData + row.endTime = time + optionsData + var timestamp = endTime; + var dt = new Date(timestamp); //根据时间戳生成的时间对象 + var date = (dt.getFullYear()) + "-" + (dt.getMonth() + 1) + "-" + (dt.getDate()) + row.endTime = date; + let endYear = timestamp - time + let endYears = endYear/1000/60/60/24 + row.remainingPeriod = endYears }, // 清除省份 clearprovince() { diff --git a/src/views/serve/Configure.vue b/src/views/serve/Configure.vue index 2112857..e2688e1 100644 --- a/src/views/serve/Configure.vue +++ b/src/views/serve/Configure.vue @@ -185,7 +185,8 @@ export default { this.$router.push("/addconfigure"); }, getIntoProject(row) { - this.$router.push(`/projectList?systemId=${row.systemId}&show=1`) + // console.log() + this.$router.push(`/projectList?systemId=${row.systemId}&show=1&name=${row.systemName}`) }, getIntoJudgement(row) { // console.log(`${Setting.jumpPath}#/?systemId=${row.systemId}&token=${this.token}&referrer=${btoa(location.href)}`); diff --git a/src/views/serve/projectList.vue b/src/views/serve/projectList.vue index 4c26be6..e10ff90 100644 --- a/src/views/serve/projectList.vue +++ b/src/views/serve/projectList.vue @@ -3,7 +3,7 @@ - + @@ -144,6 +144,7 @@ export default { return { showBack: Boolean(this.$route.query.show), systemId: this.$route.query.systemId, + titleName: this.$route.query.name, queryData: { platformId: 3, // 平台:职站:1 中台:3 founder: 0, // 创建人角色(0:系统 1:老师)