diff --git a/src/assets/css/main.css b/src/assets/css/main.css
index d5f8164..6091a66 100644
--- a/src/assets/css/main.css
+++ b/src/assets/css/main.css
@@ -161,6 +161,9 @@ li {
.orderTable td .el-input{
width: 60%;
}
+.orderTable td .normal{
+ width: auto;
+}
.orderTable .el-select>.el-input{
display: inline-block;
diff --git a/src/setting.js b/src/setting.js
index 70e8e90..413d772 100644
--- a/src/setting.js
+++ b/src/setting.js
@@ -9,8 +9,8 @@ let jumpPath = `${location.origin}/judgmentPoint`
let host = `${location.origin}:9000/`
if (isDev) {
jumpPath = "http://192.168.31.125:8087/"; // 本地调试-需要启动本地判分点系统
- // host = 'http://39.108.250.202:9000/'
- host = 'http://192.168.31.151:9000/'// 榕
+ host = 'http://39.108.250.202:9000/'
+ // host = 'http://192.168.31.151:9000/'// 榕
// host = 'http://192.168.31.137:9000/'// 赓
} else if (isPro) {
jumpPath = "http://www.huorantech.cn/judgmentPoint/";
diff --git a/src/utils/api.js b/src/utils/api.js
index 3fddbc7..edee29c 100644
--- a/src/utils/api.js
+++ b/src/utils/api.js
@@ -256,6 +256,7 @@ export default {
platformLogList: `nakadai/log/platformLogList`,
listUpdate: `nakadai/log/update`,
checkRepeat: `nakadai/log/checkRepeat`,
+ logWithdrawal: `nakadai/log/logWithdrawal`,
// 合伙人
deleteParner: `${host1}nakadai/partnerClassification/delete`,
diff --git a/src/views/course/AddCurriculum.vue b/src/views/course/AddCurriculum.vue
index 584c244..2916389 100644
--- a/src/views/course/AddCurriculum.vue
+++ b/src/views/course/AddCurriculum.vue
@@ -62,9 +62,13 @@
比例分成
商务经理占比
-
+
+ %
+
产品厂商占比
-
+
+ %
+
@@ -656,6 +660,18 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.submiting) return false
+ const { form } = this
+ const { businessProportion, manufacturerProportion, settlementMethod, settlementPrice } = form
+ if (settlementMethod == 0) {
+ if(!settlementPrice) return this.$message.warning('请输入结算单价')
+ if(isNaN(settlementPrice)) return this.$message.warning('结算单价请输入数字')
+ } else {
+ if(!businessProportion) return this.$message.warning('请输入商务经理占比')
+ if(isNaN(businessProportion)) return this.$message.warning('商务经理占比请输入数字')
+ if(!manufacturerProportion) return this.$message.warning('请输入产品厂商占比')
+ if(isNaN(manufacturerProportion)) return this.$message.warning('产品厂商占比请输入数字')
+ if(+businessProportion + +manufacturerProportion !== 100) return this.$message.warning('比例分成总和须为100%,请重新修改')
+ }
if (!this.form.coverUrl) {
this.$message.warning("请上传课程封面");
return;
diff --git a/src/views/course/Curriculum.vue b/src/views/course/Curriculum.vue
index d69542c..ed7faaa 100644
--- a/src/views/course/Curriculum.vue
+++ b/src/views/course/Curriculum.vue
@@ -238,7 +238,7 @@ export default {
},
// 内容设置
config(row) {
- this.$router.push(`/contentSettings?cid=${row.cid}`);
+ this.$router.push(`/contentSettings?cid=${row.cid}&name=${row.curriculumName}`);
},
// 删除
handleDelete(row) {
diff --git a/src/views/course/contentSettings.vue b/src/views/course/contentSettings.vue
index 20bd7b4..4c2d106 100644
--- a/src/views/course/contentSettings.vue
+++ b/src/views/course/contentSettings.vue
@@ -2,7 +2,7 @@
-
+
@@ -218,6 +218,7 @@ export default {
name: "contentSettings",
data() {
return {
+ name: this.$route.query.name,
headers: {
token: sessionStorage.getItem('token')
},
diff --git a/src/views/customer/AddCustomer.vue b/src/views/customer/AddCustomer.vue
index 06c5e57..6bdaea0 100644
--- a/src/views/customer/AddCustomer.vue
+++ b/src/views/customer/AddCustomer.vue
@@ -7,7 +7,6 @@
返回
- 确定
@@ -15,68 +14,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
-
-
-
-
-
-
-
+ {{ $route.query.userName }}
@@ -28,6 +16,7 @@
订单列表
+
diff --git a/src/views/data/Product.vue b/src/views/data/Product.vue
index 8f24f62..eebea10 100644
--- a/src/views/data/Product.vue
+++ b/src/views/data/Product.vue
@@ -76,11 +76,15 @@
商务经理占比
-
+
+ %
+
产品厂商占比
-
+
+ %
+
@@ -530,8 +534,19 @@ export default {
if(this.submited) return false
const { productName, market, businessProportion, manufacturerProportion, settlementMethod, settlementPrice, supplier } = this
if(!productName) return this.$message.warning('请输入数据产品名称')
- if(!market) return this.$message.warning('请输入市场价格')
- if(isNaN(market)) return this.$message.warning('市场价格请输入数字')
+ if(!market) return this.$message.warning('请输入市场单价格')
+ if(isNaN(market)) return this.$message.warning('市场单价格请输入数字')
+ if(!supplier) return this.$message.warning('请输入供应厂商')
+ if (settlementMethod == 0) {
+ if(!settlementPrice) return this.$message.warning('请输入结算单价')
+ if(isNaN(settlementPrice)) return this.$message.warning('结算单价请输入数字')
+ } else {
+ if(!businessProportion) return this.$message.warning('请输入商务经理占比')
+ if(isNaN(businessProportion)) return this.$message.warning('商务经理占比请输入数字')
+ if(!manufacturerProportion) return this.$message.warning('请输入产品厂商占比')
+ if(isNaN(manufacturerProportion)) return this.$message.warning('产品厂商占比请输入数字')
+ if(+businessProportion + +manufacturerProportion !== 100) return this.$message.warning('比例分成总和须为100%,请重新修改')
+ }
if(!this.checkedIds.length) return this.$message.warning('请选择数据')
this.submited = true // 提交状态
let tableId = this.checkedIds
diff --git a/src/views/join/index.vue b/src/views/join/index.vue
index ddb6391..cb4d3f4 100644
--- a/src/views/join/index.vue
+++ b/src/views/join/index.vue
@@ -6,7 +6,7 @@
- 或然科技城市合伙人计划
+ 城市合伙人计划
加入并自动为你创建一个团队群组
@@ -26,9 +26,6 @@
{{ phoneBtnText }}
-
-
-
立即加入
@@ -49,7 +46,6 @@ export default {
partnerClassificationId: this.$route.query.id,
isTeam: 0,
account: '',
- email: '',
phone: '',
code: '',
userName: ''
diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue
index fcafdcc..d32a3ff 100644
--- a/src/views/order/AddOrder.vue
+++ b/src/views/order/AddOrder.vue
@@ -24,7 +24,7 @@
基本信息
-
+
@@ -171,43 +171,40 @@
-
+
-
- 万
-
-
+
-
- 万
-
+
-
- 万
@@ -347,7 +344,7 @@
-
@@ -355,7 +352,7 @@
-
-
- 万
-
- 万
@@ -839,34 +834,87 @@ export default {
this.$get(this.api.orderDetail, { orderId: +id }).then(res => {
let form = res.orderDetails.order;// 基本信息
let contract = res.orderDetails.contractInformation ? res.orderDetails.contractInformation : {}; // 合同
+ if (this.renewDisabled) { // 续费状态下,清空上个订单合同信息
+ this.contract = {
+ contractName: "",
+ contractFile: "",
+ contractMoney: "",
+ contractNumber: "",
+ startTime: "",
+ endTime: ""
+ };
+ } else {
+ this.contract = {
+ contractName: contract.contractName,
+ contractMoney: contract.contractMoney,
+ contractNumber: contract.contractNumber,
+ startTime: contract.startTime ? contract.startTime : "",
+ endTime: contract.endTime ? contract.endTime : "",
+ contractId: contract.contractId,
+ uploadList: {
+ name: contract.contractFile ? contract.contractFile.split("/").pop() : "",
+ url: contract.contractFile
+ }
+ };
+ if (contract.startTime && contract.endTime) {
+ this.contractTime = [contract.startTime, contract.endTime];
+ }
+ }
+ this.form = {
+ orderNumber: form.orderNumber,
+ createTime: form.createTime,
+ provinceId: form.provinceId,
+ orderContact: form.orderContact,
+ email: form.email,
+ customerId: form.customerId,
+ customerName: form.customerName,
+ orderType: form.orderType,
+ cityId: form.cityId,
+ phone: form.phone,
+ orderAmount: form.orderType === 2 ? 0 : form.orderAmount, // 如果是试用的订单,则订单金额显示为0
+ orderId: form.orderId,
+ options: form.options,
+ businessManagerId: form.businessManagerId ? +form.businessManagerId : ''
+ };
+ this.$nextTick(() => {
+ form.provinceId && this.getCityData()
+ });
const { orderOther } = res.orderDetails
+ const promises = []
+ const { customerId } = form
+ const list = []
if (orderOther.find(e => e.authority)) {
+ promises.push(new Promise((resolve, reject) => {
this.$post(this.api.renew, {
authority: 1,
- customerId: form.customerId,
+ customerId,
productId: orderOther.filter(e => e.authority).map(e => e.dataOrCourseId)
- }).then(res => {
- const renewList = res.orderOthers
- if (orderOther.find(e => !e.authority)) {
- this.$post(this.api.renew, {
- authority: 0,
- customerId: form.customerId,
- productId: orderOther.filter(e => !e.authority).map(e => e.dataOrCourseId)
- }).then(res => {
- renewList.push(...res.orderOthers)
- this.setStartDate(renewList, contract, form, orderOther)
- }).catch(err => {})
- } else {
- this.setStartDate(renewList, contract, form, orderOther)
- }
+ }).then(({ orderOthers }) => {
+ list.push(...orderOthers)
+ resolve()
+ }).catch(err => {})
+ }))
+ }
+ if (orderOther.find(e => !e.authority)) {
+ promises.push(new Promise((resolve, reject) => {
+ this.$post(this.api.renew, {
+ authority: 0,
+ customerId,
+ productId: orderOther.filter(e => !e.authority).map(e => e.dataOrCourseId)
+ }).then(({ orderOthers }) => {
+ list.push(...orderOthers)
+ resolve()
}).catch(err => {})
+ }))
}
+ Promise.all(promises).then(_ => {
+ this.setStartDate(list, orderOther)
+ })
});
},
- setStartDate(renewList, contract, form, orderOther) {
- const { orderType } = form
+ setStartDate(renewList, orderOther) {
+ console.log(555)
let list = orderOther.map(e => {
- if (orderType === 2) e.finalPrice = 0 // 如果是试用的订单,则成交价显示为0
const item = renewList.find(n => n.dataOrCourseId === e.dataOrCourseId && n.authority === e.authority) // 匹配renew接口返回的数据
if (item) {
// 处于续费
@@ -891,55 +939,8 @@ export default {
return e;
});// 俩列表
- if (this.renewDisabled) { // 续费状态下,清空上个订单合同信息
- this.contract = {
- contractName: "",
- contractFile: "",
- contractMoney: "",
- contractNumber: "",
- startTime: "",
- endTime: ""
- };
- } else {
- this.contract = {
- contractName: contract.contractName,
- contractMoney: contract.contractMoney,
- contractNumber: contract.contractNumber,
- startTime: contract.startTime ? contract.startTime : "",
- endTime: contract.endTime ? contract.endTime : "",
- contractId: contract.contractId,
- uploadList: {
- name: contract.contractFile ? contract.contractFile.split("/").pop() : "",
- url: contract.contractFile
- }
- };
- if (contract.startTime && contract.endTime) {
- this.contractTime = [contract.startTime, contract.endTime];
- }
- }
- this.form = {
- orderNumber: form.orderNumber,
- createTime: form.createTime,
- provinceId: form.provinceId,
- orderContact: form.orderContact,
- email: form.email,
- customerId: form.customerId,
- customerName: form.customerName,
- orderType: form.orderType,
- cityId: form.cityId,
- phone: form.phone,
- orderAmount: form.orderType === 2 ? 0 : form.orderAmount, // 如果是试用的订单,则订单金额显示为0
- orderId: form.orderId,
- options: form.options,
- businessManagerId: +form.businessManagerId
- };
this.coursePermissions = list.filter(i => i.authority === 1);
this.dataPlatformPermissions = list.filter(i => i.authority === 0);
- this.$nextTick(() => {
- if(this.form.provinceId){
- this.getCityData()
- }
- });
},
// 新增订单
submitOrder() {
@@ -1345,7 +1346,7 @@ export default {
let total = 0
const list = [...this.coursePermissions, ...this.dataPlatformPermissions]
list.map(e => total += +e.finalPrice)
- this.form.orderAmount = total * 10000
+ this.form.orderAmount = total
},
// 成交价修改后,计算成交单价 计算规则:成交价/账号数/时间(成交单价为元/账号/年,所以时间要换算成年的单位去计算)
dealFinalValue(val, row) {
@@ -1384,10 +1385,10 @@ export default {
priceUnit / 12 * useUnit :
priceUnit * useUnit) * (row.authority ?
1 :
- row.accountNum) / 10000).toFixed(2)
+ row.accountNum)).toFixed(2)
} else {
// 比例分成。计算规则:成交价*商务分成比例(单位是万)
- sPrice = row.finalPrice * row.businessProportion / 100 / 10000
+ sPrice = row.finalPrice * row.businessProportion / 100
}
row.settlementPrice = this.handleNaN(sPrice)
},
@@ -1424,7 +1425,7 @@ export default {
price / 365 * useUnit :
unit === 1 ?
price / 12 * useUnit :
- price * useUnit) / 10000).toFixed(2)
+ price * useUnit)).toFixed(2)
}
this.dealSettlePrice(row)
// 只有改变了起止日期才需要调接口查询订单,该接口作用是把开始时间传过去,会返回一个提示或者时间,如果是时间,则把时间+1天,如果是提示,则无法保存
@@ -1628,6 +1629,9 @@ export default {
/deep/ .contractDate .el-date-editor--daterange.el-input__inner {
width: 100%;
}
+.info .el-select {
+ width: 100%;
+}
.mag {
margin-right: 20px;
}
diff --git a/src/views/parner/staff.vue b/src/views/parner/staff.vue
index bdf244c..a75f125 100644
--- a/src/views/parner/staff.vue
+++ b/src/views/parner/staff.vue
@@ -302,7 +302,7 @@ export default {
},
// 删除部门
delOrg(node, data) {
- this.$confirm(data.isTeam ? '确定删除城市合伙人' : '确定要删除吗?', "提示", {
+ this.$confirm(data.isTeam ? '确定删除该城市合伙人?删除后,该团队同步解散,且不可恢复!' : '确定要删除吗?', "提示", {
type: "warning"
}).then(() => {
this.$post(`${this.api.deleteParner}?id=${data.id}`).then(res => {
@@ -406,11 +406,11 @@ export default {
const { accountId } = this
// 获取邀请码
this.$post(`${this.api.generateInvitationCode}?accountId=${accountId}`).then(({ expireTime, invitationCode }) => {
- const date = new Date(Date.now() + expireTime)
+ const date = new Date(Date.now() + expireTime * 1000) // 返回的秒,要*1000
this.expireTime = `${date.getFullYear()}-${util.preZero(date.getMonth() + 1)}-${util.preZero(date.getDate())} ${util.preZero(date.getHours())}:${util.preZero(date.getMinutes())}:${util.preZero(date.getMinutes())}`
this.parnerVisible = true
const cur = this.$refs.orgTree.getCurrentKey()
- const link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : 'nakadai'}/#/join?accountId=${accountId}&id=${cur ? cur: this.orgList[0].id}`
+ const link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : '/nakadai'}/#/join?accountId=${accountId}&id=${cur ? cur: this.orgList[0].id}`
// 生成二维码
this.link = link
diff --git a/src/views/system/manageLog.vue b/src/views/system/manageLog.vue
index 2ef593c..7ab80fe 100644
--- a/src/views/system/manageLog.vue
+++ b/src/views/system/manageLog.vue
@@ -41,7 +41,11 @@
-
+
+ 撤销
+
+
+
-
@@ -100,14 +104,20 @@ export default {
const vers = []
const platformName = Setting.platformList.find(e => e.id === logList[0].platformId).name
this.platformName = platformName
+ let isRevoke = 0
logList.map((e, i) => {
+ // 是否显示撤销按钮,第一个已发布的才显示
+ if (!e.open && !isRevoke) {
+ e.revoke = 1
+ isRevoke = 1
+ }
e.logContents.map(n => {
n.content = n.content.split('\n')
})
- vers.push({
- id: i,
- name: e.versionName
- })
+ vers.push({
+ id: i,
+ name: e.versionName
+ })
})
this.vers = vers
}
@@ -140,6 +150,17 @@ export default {
}).catch(res => {})
}).catch(() => {})
},
+ // 撤销
+ revoke(item) {
+ this.$confirm("确定要撤销吗?", "提示", {
+ type: "warning"
+ }).then(() => {
+ this.$get(`${this.api.logWithdrawal}?platformId=${this.platformId}`).then(res => {
+ this.$message.success('撤销成功')
+ this.getData()
+ }).catch(res => {})
+ }).catch(() => {})
+ },
changeStatus(logId, open, draft) {
this.$post(this.api.listUpdate, {
logId,
@@ -198,7 +219,7 @@ export default {
}
}
/deep/.timeline {
- margin-left: 20%;
+ padding-left: 20%;
overflow: hidden;
.el-timeline-item__node--normal {
top: 30px;
diff --git a/src/views/system/staff.vue b/src/views/system/staff.vue
index 7775655..732d7c6 100644
--- a/src/views/system/staff.vue
+++ b/src/views/system/staff.vue
@@ -563,6 +563,7 @@ export default {
this.form = data
this.originAccount = data.account
this.originWorkNumber = data.workNumber
+ console.log(333, this.orgList)
}).catch(res => {})
},
// 获取角色数据