From 8229dd1904324d2b5a4bc2a1fc6f73c9c5a3824b Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 26 Apr 2023 16:06:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E7=AE=A1=E7=90=86=E8=81=94?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/api.js | 27 + src/utils/editor.js | 3 +- src/views/order/AddOrder.vue | 30 +- src/views/shop/addProduct/index.vue | 1405 +++++++++++++++---------- src/views/shop/list/market/index.vue | 132 ++- src/views/shop/list/product/index.vue | 62 +- 6 files changed, 1016 insertions(+), 643 deletions(-) diff --git a/src/utils/api.js b/src/utils/api.js index f5967a8..5620b19 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -432,4 +432,31 @@ export default { saveScheme: `nakadai/nakadai/partner/schemeManagement/save`, schemeList: `nakadai/nakadai/partner/schemeManagement/schemeList`, updateScheme: `nakadai/nakadai/partner/schemeManagement/update`, + + // 商城管理 + addProductCategory: `nakadai/productClassification/addProductCategory`, + deleteProductCategory: `nakadai/productClassification/deleteProductCategory`, + productCategoryList: `nakadai/productClassification/productCategoryList`, + addProductType: `nakadai/productType/addProductType`, + deleteProductType: `nakadai/productType/deleteProductType`, + productTypeList: `nakadai/productType/productTypeList`, + addSupplier: `nakadai/supplier/addSupplier`, + deleteSupplier: `nakadai/supplier/deleteSupplier`, + supplierList: `nakadai/supplier/supplierList`, + addTags: `nakadai/tags/addTags`, + deleteTags: `nakadai/tags/deleteTags`, + tagsList: `nakadai/tags/tagsList`, + addGoods: `nakadai/mall/addGoods`, + listOfGoods: `nakadai/mall/listOfGoods`, + deletionOfGoods: `nakadai/mall/deletionOfGoods`, + detailsOfGoods: `nakadai/mall/detailsOfGoods`, + renewalOfGoods: `nakadai/mall/renewalOfGoods`, + goodsOffTheShelf: `nakadai/mall/goodsOffTheShelf`, + + // 营销推广 + delMarketing: `nakadai/nakadai/mall/marketing/promotion/batchDeletion`, + findByIdMarketing: `nakadai/nakadai/mall/marketing/promotion/findById`, + listMarketing: `nakadai/nakadai/mall/marketing/promotion/pagingQueryList`, + saveMarketing: `nakadai/nakadai/mall/marketing/promotion/save`, + updateMarketing: `nakadai/nakadai/mall/marketing/promotion/update`, }; \ No newline at end of file diff --git a/src/utils/editor.js b/src/utils/editor.js index 109d3c5..f7b9386 100644 --- a/src/utils/editor.js +++ b/src/utils/editor.js @@ -376,7 +376,8 @@ export default { ed.target.editorCommands.execCommand("fontName", false, "Microsoft Yahei") ed.target.editorCommands.execCommand("fontSize", false, "19px") ed.target.editorCommands.execCommand("lineHeight", false, "1.5") - top.document.querySelector('#articleTitle').focus() // 第一个字段聚焦 + const el = top.document.querySelector('#articleTitle') + el && el.focus() // 第一个字段聚焦 }) }, } \ No newline at end of file diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue index fe8b242..aa95183 100644 --- a/src/views/order/AddOrder.vue +++ b/src/views/order/AddOrder.vue @@ -706,6 +706,11 @@ @@ -1392,7 +1405,10 @@ export default { repeatMsg: '', clients: [], valueList: [], - rate: '' + rate: '', + shipVisible: false, + shipContent: '', + curRow: {}, }; }, watch: { @@ -2452,6 +2468,7 @@ export default { if(row.ship === 1) { row.isEnable = 1 } + if (type == 3 && row.ship) this.shipVisible = true // 非集成课程发货了后显示填写发货信息弹框 }, // 如果非数字,则返回0 handleNaN(val) { @@ -2601,6 +2618,17 @@ export default { }) } }, + // 打开填写发货信息弹框 + showShip(row) { + this.curRow = row + this.shipContent = row.shipContent + this.shipVisible = true + }, + // 发货信息弹框提交 + submitShip() { + this.curRow.shipContent = this.shipContent + this.shipVisible = false + }, // 清除省份 clearprovince() { this.form.cityId = ""; diff --git a/src/views/shop/addProduct/index.vue b/src/views/shop/addProduct/index.vue index a4a40b9..93a4878 100644 --- a/src/views/shop/addProduct/index.vue +++ b/src/views/shop/addProduct/index.vue @@ -7,292 +7,307 @@ - - - - - + + + + +
+ + 请选择 + {{ form.mall.associatedProductName }} +
+
+ +
+
- - - + + + - - - + + + + + 自定义 + +
+ + + + + + + + + + + 自定义 + + + + - 自定义 + + + + +
+
+ + + + + + + + + + + + + + + +
+
+
+ +
-
- - - - - - + + + + - - - + + + + + + - - - - - - - -
- - - - - - - - - + + + + - - - - + + + +
+ +

上传封面

+
+ +
+

只能上传jpg/png文件

+

课程封面图将按1:1显示,最佳分辨率80*80

+
+
-
-
- - - - - - - - - - - - - - - - - - - - -
- -

上传封面

+ + +
+ 上传界面图
+
+ +
+
+
+ + + +
+ +

上传封面

+
-
-

只能上传jpg/png文件

-

课程封面图将按1:1显示,最佳分辨率80*80

-
-
-
- - - -
- -

上传界面图

+
+

只能上传jpg/png文件

+

课程封面图将按1:1显示,最佳分辨率80*80

+
+ + + + + + + + + + + +
+ 除外地区 + +
+
+ +
+
+ + +
+ 除外地区 + +
+
+ +
+
+ + + + + + + - -
- -

上传封面

-
- -
-

只能上传jpg/png文件

-

课程封面图将按1:1显示,最佳分辨率80*80

-
+ 上传文件
-
-
- - - - - - - -
- 普适地区 - - - - - - - -
-
- - - - - - - - - 上传文件 - - -
+ + + +
+ 保存并上架 + + 取消 +
- -
- - - {{tag.label}} - -
- - - 取 消 - 确 定 - -
- +
- + - @@ -301,11 +316,70 @@ 返回
+ + +
+ +
+ + + + + + + + + + + 返回 + +
+ + + + + + + + + + + + + + + + 取消 + 确定 + +
\ No newline at end of file diff --git a/src/views/shop/list/market/index.vue b/src/views/shop/list/market/index.vue index dd087b7..842ed2b 100644 --- a/src/views/shop/list/market/index.vue +++ b/src/views/shop/list/market/index.vue @@ -1,52 +1,66 @@ @@ -59,36 +73,35 @@ export default { headers: { token: sessionStorage.getItem("token") }, - list: [{}], + list: [], + bannerVisible: false, + form: { + id: '', + banner: '', + title: '', + url: '', + } }; }, mounted() { - + this.getList() }, methods: { getList() { - this.$post(this.api.listTheoreticalCourse, { - pageNum: this.page, - pageSize: this.pageSize, - keyWord: this.keyword, - createPlatform: 0, - platformSource: Setting.platformSource, - ...this.form + this.$post(this.api.listMarketing, { + pageNum: 1, + pageSize: 1000 }).then(({ page }) => { this.list = page.records; this.total = page.total; - if (!this.list.length && this.total) { - this.page--; - this.getData(); - } }).catch(res => { }); }, handleExceed() { // 文件超出个数限制时的钩子 this.$message.warning("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!"); }, - uploadSuccess(res, row) { // 文件上传成功时的钩子 - row.pic = res.data.filesResult.fileUrl; + uploadSuccess(res) { // 文件上传成功时的钩子 + this.form.banner = res.data.filesResult.fileUrl; }, uploadError(err, file, fileList) { // 文件上传失败时的钩子 this.$message({ @@ -103,20 +116,37 @@ export default { handleRemove(file, fileList) { // 文件列表移除文件时的钩子 // this.form.coverUrl = '' }, - addCourse() { - this.$router.push("/addTheoreticalCourse"); + add() { + this.form = { + id: '', + banner: '', + title: '', + url: '', + } + this.bannerVisible = true + }, + edit(row) { + this.form = JSON.parse(JSON.stringify(row)) + this.bannerVisible = true }, - editCourse(row) { - this.$router.push(`/addTheoreticalCourse?id=${row.id}`); + // banner弹框提交 + submitBanner() { + const { form } = this + if (!form.banner) return util.errorMsg('请上传图片') + if (!form.title) return util.errorMsg('请输入标题') + this.$post(this.api[form.id ? 'updateMarketing' : 'saveMarketing'], form).then(res => { + this.getList() + this.bannerVisible = false + }).catch(res => {}) }, handleDelete(row) { this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { type: "warning" }) .then(() => { - this.$post(`${this.api.delTheoreticalCourse}?ids=${row.id}`).then(res => { + this.$post(`${this.api.delMarketing}?ids=${row.id}`).then(res => { util.successMsg("删除成功"); - this.initData(); + this.getList(); }).catch(res => { }); }) diff --git a/src/views/shop/list/product/index.vue b/src/views/shop/list/product/index.vue index 66443e3..6ea5758 100644 --- a/src/views/shop/list/product/index.vue +++ b/src/views/shop/list/product/index.vue @@ -41,20 +41,24 @@ {{ scope.$index + (page - 1) * pageSize + 1 }} - - - - - + + + + + + + - +