diff --git a/src/utils/api.js b/src/utils/api.js
index ff12aad..e5bdfb7 100644
--- a/src/utils/api.js
+++ b/src/utils/api.js
@@ -28,6 +28,7 @@ export default {
bulkShipping: `nakadai/nakadai/orderOther/bulkShipping`,
getOrderOtherTime: `nakadai/nakadai/orderOther/getOrderOtherTime`,
refreshCache: `data/data/myDate/refreshCache`,
+ getPartnerTeamRates: `nakadai/nakadai/partner-team/getPartnerTeamRates`,
// 客户管理
delCustomers: `nakadai/nakadai/customer/delCustomers`,
@@ -418,6 +419,7 @@ export default {
articleEnableOrDisable: `nakadai/nakadai/partner/article/management/articleEnableOrDisable`,
checkIfTheTitleIsRepeat: `nakadai/nakadai/partner/article/management/checkIfTheTitleIsRepeat`,
modifiedSort: `nakadai/nakadai/partner/article/management/modifiedSort`,
+ articleTopOperation: `nakadai/nakadai/partner/article/management/articleTopOperation`,
batchDeletionParnerFile: `nakadai/nakadai/partner/article/file/batchDeletion`,
findByIdParnerFile: `nakadai/nakadai/partner/article/file/findById`,
saveParnerFile: `nakadai/nakadai/partner/article/file/save`,
diff --git a/src/views/join/index.vue b/src/views/join/index.vue
index 72fb0de..d9d6dd9 100644
--- a/src/views/join/index.vue
+++ b/src/views/join/index.vue
@@ -12,12 +12,12 @@
-
+
-
+
@@ -46,6 +46,7 @@ import Setting from "@/setting"
export default {
data() {
return {
+ provinceId: this.$route.query.provinceId,
provinces: [],
cities: [],
isMobile: util.isMobile(),
@@ -101,7 +102,7 @@ export default {
// 获取城市
getCity(val){
this.$get(this.api.queryCity,{
- provinceId: val
+ provinceId: this.form.provinceId
}).then(res => {
this.cities = res.list
if (val) this.form.cityId = ''
diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue
index 3386c5e..c9729f9 100644
--- a/src/views/order/AddOrder.vue
+++ b/src/views/order/AddOrder.vue
@@ -116,7 +116,7 @@
-
+
一键发货
取消全部发货
@@ -273,7 +273,7 @@
-
+
一键发货
取消全部发货
@@ -451,7 +451,7 @@
-
+
一键发货
取消全部发货
@@ -969,7 +969,8 @@ export default {
orderRepeat: [],
repeatMsg: '',
clients: [],
- valueList: []
+ valueList: [],
+ rate: ''
};
},
watch: {
@@ -1166,6 +1167,14 @@ export default {
this.dataPlatformPermissions = list.filter(i => i.authority === 0);
this.valuePermissions = list.filter(i => i.authority === 2);
},
+ // 获取费率
+ getRate() {
+ this.$post(this.api.getPartnerTeamRates, {
+ teamId: this.form.teamId
+ }).then(({ teamRates }) => {
+ this.rate = teamRates.annualMarketingFee || 0
+ }).catch(res => {})
+ },
// 获取全部客户
getClients() {
// const sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理')
@@ -1201,7 +1210,7 @@ export default {
if (!e.periodOfUse || e.finalPrice === '') {
return false;
} else {
- const curPurchase = +e.settlementPrice + (e.settlementPrice / 10)
+ const curPurchase = +e.settlementPrice + (e.settlementPrice * (this.rate / 100))
purchase += curPurchase
profit += +e.finalPrice - curPurchase
return true;
@@ -1222,7 +1231,7 @@ export default {
if (!e.periodOfUse || e.finalPrice === '' || !e.accountNum || e.settlementPrice === '') {
return false;
} else {
- const curPurchase = +e.settlementPrice + (e.settlementPrice / 10)
+ const curPurchase = +e.settlementPrice + (e.settlementPrice * (this.rate / 100))
purchase += curPurchase
profit += +e.finalPrice - curPurchase
return true;
@@ -1242,7 +1251,7 @@ export default {
if (!e.periodOfUse || e.finalPrice === '') {
return false;
} else {
- const curPurchase = +e.settlementPrice + (e.settlementPrice / 10)
+ const curPurchase = +e.settlementPrice + (e.settlementPrice * (this.rate / 100))
purchase += curPurchase
profit += +e.finalPrice - curPurchase
return true;
@@ -1649,17 +1658,17 @@ export default {
this.coursePermissions
list.map(e => e.ship = ship)
if (this.editDisabled) {
- this.refreshCache()
- this.$post(this.api.bulkShipping, {
- orderOthers: list
- }).then(res => {})
+ // this.refreshCache()
+ // this.$post(this.api.bulkShipping, {
+ // orderOthers: list
+ // }).then(res => {})
}
},
// 课程/数据平台-发货
handleDeliver(e, row) {
if (this.editDisabled) {
- this.refreshCache()
- this.$post(this.api.ship,row).then(res => {});
+ // this.refreshCache()
+ // this.$post(this.api.ship,row).then(res => {});
}
},
// 如果非数字,则返回0
@@ -1859,6 +1868,7 @@ export default {
teamChange() {
this.form.businessManagerId = ''
this.getBm()
+ this.getRate()
},
// 城市合伙人人员
getBm() {
diff --git a/src/views/parner/rate.vue b/src/views/parner/rate.vue
index e878bc1..b40da77 100644
--- a/src/views/parner/rate.vue
+++ b/src/views/parner/rate.vue
@@ -5,7 +5,6 @@
城市合伙人区域管理
- 添加分类
@@ -21,28 +20,6 @@
>
{{ node.label }}
-
-
- addOrg(node, data)">
-
- editOrg(node, data)">
-
- delOrg(node, data)">
-
-
@@ -99,13 +76,13 @@
- 固定年费{{ scope.row.annualTeamFee}}w
+ 固定年费{{ scope.row.annualTeamFee !== underfined ? scope.row.annualTeamFee + 'w' : '' }}
修改
- 项目抽成{{ scope.row.annualMarketingFee}}%
+ 项目抽成{{ scope.row.annualMarketingFee !== underfined ? scope.row.annualMarketingFee + '%' : '' }}
修改
@@ -114,10 +91,10 @@
-
+
- 万
+ 万
-
+
-
- 万
+
+ %
-
+
@@ -616,7 +618,7 @@ export default {
}).then(({ pageList }) => {
this.chooseVisible = false
this.transferVisible = false
- this.initData()
+ this.getOrg()
}).catch(err => {})
} else {
util.warningMsg('请选择成员!')
@@ -637,7 +639,7 @@ export default {
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 = transfer ? curRow.partnerClassificationId : this.$refs.orgTree.getCurrentKey()
- const link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : '/backstage'}/#/join?accountId=${accountId}&id=${cur || ''}${transfer ? '&admin=1' : '&isTeam=1'}`
+ const link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : '/backstage'}/#/join?accountId=${accountId}&id=${cur || ''}${transfer ? '&admin=1&provinceId=' + curRow.provinceId + '&cityId=' + curRow.cityId : '&isTeam=1'}`
// 生成二维码
this.link = link
diff --git a/src/views/parnerOperation/editor.js b/src/views/parnerOperation/editor.js
index e07a290..e9b3c73 100644
--- a/src/views/parnerOperation/editor.js
+++ b/src/views/parnerOperation/editor.js
@@ -319,14 +319,14 @@ export default {
form.append('file', blobInfo.blob()),
Axios({
method: 'post',
- url: Api.upload,
+ url: Api.fileUploadNakadai,
data: form,
headers: {
'Content-Type': 'multipart/form-data',
token: Util.local.get(Setting.tokenKey)
},
}).then(({ data }) => {
- succFun(data.url)
+ succFun(data.filesResult.fileUrl)
}).catch(res => {})
},
//自定义文件选择器的回调内容 此方法只有在点击上方图片按钮才会触发
@@ -349,14 +349,14 @@ export default {
fd.append("file", file);
Axios({
method: 'post',
- url: Api.upload,
+ url: Api.fileupload,
data: fd,
headers: {
'Content-Type': 'multipart/form-data',
token: Util.local.get(Setting.tokenKey)
},
}).then(({ data }) => {
- callback(data.url)
+ callback(data.data.filesResult.fileId)
}).catch(res => {})
}
//触发点击
diff --git a/src/views/parnerOperation/learnMg.vue b/src/views/parnerOperation/learnMg.vue
index c72605d..6d399ba 100644
--- a/src/views/parnerOperation/learnMg.vue
+++ b/src/views/parnerOperation/learnMg.vue
@@ -1,143 +1,153 @@
-
-
文章详情
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 设置
+
+
+
+
+
+
+
+
+ 设置
+
+
+
-
-
+
+
+
+
+
+
点击上传
+
+
-
-
-
-
-
-
-
-
-
-
- 设置
+
+
-
-
-
-
-
-
-
- 设置
+
+
+ 上传
+
+
+
+ 发布
+ 保存草稿
+ 取消
-
-
-
-
-
-
-
-
-
点击上传
-
-
-
-
-
-
-
-
- 上传
-
-
-
-
- 发布
- 保存草稿
- 取消
@@ -258,9 +268,9 @@ export default {
releaseTime: [
{ required: true, message: '请选择发布日期', trigger: 'change' }
],
- // bannerImg: [
- // { required: true, message: '请上传封面图', trigger: 'change' }
- // ],
+ bannerImg: [
+ { required: true, message: '请上传封面图', trigger: 'change' }
+ ],
mainBody: [
{ required: true, message: '请输入正文', trigger: 'blur' }
],
@@ -299,12 +309,13 @@ export default {
next()
} else if (!this.pass) {
// 更改了信息才需要提示
- if (this.updateTime > 1) {
+ if (this.updateTime) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
this.submit(this.form.isRelease, next)
}).catch(() => {
+ console.log(55)
next()
})
} else {
@@ -317,21 +328,30 @@ export default {
mounted() {
this.getArticle()
this.getLabel()
- this.getClassification()
},
methods: {
- // 文章列表
+ // 文章详情
getArticle() {
const { id } = this.form
id && this.$post(`${this.api.findByIdParnerArticle}?id=${id}`).then(({ data }) => {
data.lableId = data.lableId ? data.lableId.split(',').map(e => +e) : []
+ data.fileList.forEach(e => e.name = e.fileName)
this.form = data
+ this.getClassification(1)
}).catch(err => {})
},
// 获取所属分类
- getClassification() {
+ getClassification(detail) {
this.$post(`${this.api.queryClassificationByType}?typeId=${this.typeId}`).then(({ data }) => {
this.classifications = data
+ // 如果所选分类被删除,则清空分类id
+ if (detail) {
+ const id = this.form.classificationId
+ if (!data.find(e => e.id == id)) this.form.classificationId = ''
+ setTimeout(() => {
+ this.updateTime = 0
+ }, 500)
+ }
}).catch(err => {})
},
// 显示所属分类弹框
@@ -396,8 +416,9 @@ export default {
} else {
this.classVisible = false
}
+ // 所选的分类被删了后,要清空所选的分类id
+ if (!list.find(e => e.id == this.form.classificationId)) this.form.classificationId = ''
},
-
// 获取标签
getLabel() {
@@ -443,8 +464,6 @@ export default {
this.$post(this.api[row.id ? 'updateParnerLabel' : 'saveParnerLabel'], {
labelName: row.labelName,
id: row.id,
- // editorId: this.userId,
- // founderId: this.userId
}).then(res => {
showMsg && Util.successMsg((row.id ? '修改' : '新增') + '成功')
this.getLabel()
@@ -573,7 +592,7 @@ export default {
},
// 附件删除
handleRemove(e, fileList) {
- e.id ? this.$post(`${this.api.delContentFile}?id=${e.id}`).then(res => {
+ e.id ? this.$post(`${this.api.batchDeletionParnerFile}?ids=${e.id}`).then(res => {
this.form.fileList = fileList
}).catch(res => {}) : (this.form.fileList = fileList)
},
@@ -620,9 +639,8 @@ export default {
// 返回
back() {
this.pass = true
- const { updateTime } = this
// 更改了信息才需要提示
- if (updateTime > 1) {
+ if (this.updateTime) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
@@ -634,17 +652,6 @@ export default {
this.$router.back()
}
},
- // 更新附件的状态为发布
- updateFile(files, form, quoteId) {
- files.map(e => {
- this.$post(this.api.updateFile, {
- id: e,
- isRelease: form.isRelease,
- quote: form.title,
- quoteId
- }).then(res => {}).catch(err => {})
- })
- },
// 提交
submit(isRelease, next) {
if (this.submiting) return false
@@ -653,18 +660,12 @@ export default {
if (this.nameRepeat) return Util.errorMsg('该标题已重复!')
// 如果是发布
if (isRelease) {
- // if (!form.releaseTime) return Util.errorMsg('请选择发布日期')
- // if (!form.bannerImg ) return Util.errorMsg('请上传封面')
- // if (!form.mainBody) return Util.errorMsg('请输入正文')
+ if (!form.releaseTime) return Util.errorMsg('请选择发布日期')
+ if (!form.classificationId) return Util.errorMsg('请选择所属分类')
+ if (!form.bannerImg ) return Util.errorMsg('请上传封面')
+ if (!form.mainBody) return Util.errorMsg('请输入正文')
}
// if (this.uploading) return Util.errorMsg('文件正在上传,请上传完成后再发布')
- const { fileList, bannerImg } = form
- const fileId = []
- // 获取几个附件的id,url后面的数字串即是附件id
- if (bannerImg) fileId.push(bannerImg.substr(bannerImg.lastIndexOf('/') + 1))
- fileList && fileList.map(e => {
- fileId.push(e[e.url ? 'url' : 'filePath'].substr(e[e.url ? 'url' : 'filePath'].lastIndexOf('/') + 1))
- })
form.lableId = form.lableId.join(',')
form.releaseTime = Util.formatDate('yyyy-MM-dd', new Date(form.releaseTime)) // 发布日期转化为年月日格式
@@ -674,7 +675,6 @@ export default {
if (form.id) {
delete form.children
this.$post(this.api.updateParnerArticle, form).then(res => {
- // this.updateFile(fileId, form, form.id)
Util.successMsg('修改成功')
next ? next() : this.$router.back()
}).catch(err => {
@@ -682,18 +682,6 @@ export default {
})
} else {
this.$post(this.api.saveParnerArticle, form).then(({ data }) => {
- this.updateFile(fileId, form, data)
- // 新增文章完后需要把上传的附件添加到文章附件表
- // form.fileList.map(e => {
- // this.$post(this.api.saveContentFile, {
- // contentId: data,
- // editorId: this.userId,
- // founderId: this.userId,
- // id: '',
- // fileName: e.name,
- // filePath: e.url
- // }).then(res => {}).catch(err => {})
- // })
Util.successMsg('创建成功')
next ? next() : this.$router.back()
}).catch(err => {
@@ -829,7 +817,7 @@ $upload-lg-height: 102px;
}
.input-form {
&.model {
- height: calc(100vh - 250px);
+ height: calc(100vh - 340px);
padding-right: 20px;
overflow: auto;
.el-form-item__label {
diff --git a/src/views/parnerOperation/mobileRole.vue b/src/views/parnerOperation/mobileRole.vue
index 96504ba..f2557ef 100644
--- a/src/views/parnerOperation/mobileRole.vue
+++ b/src/views/parnerOperation/mobileRole.vue
@@ -24,9 +24,8 @@
-
-
-
+
+
{{ scope.row.isRelease ? '已发布' : '草稿' }}
@@ -37,6 +36,7 @@
编辑
删除