From e6d2c51252485e88644c5df811d70f85897dd389 Mon Sep 17 00:00:00 2001 From: mabo Date: Wed, 23 Jun 2021 08:45:18 +0800 Subject: [PATCH 01/22] no message --- manager/package.json | 4 ++-- manager/src/main.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manager/package.json b/manager/package.json index 112223b4..427ac89e 100644 --- a/manager/package.json +++ b/manager/package.json @@ -31,6 +31,7 @@ "sockjs-client": "^1.4.0", "stompjs": "^2.3.3", "swiper": "^6.3.5", + "uuid": "^8.3.2", "view-design": "^4.2.0", "vue": "^2.6.10", "vue-apexcharts": "^1.5.1", @@ -48,8 +49,7 @@ "vuex": "^3.4.0", "wangeditor": "^4.5.3", "xlsx": "^0.16.2", - "xss": "^1.0.7", - "uuid": "^8.3.2" + "xss": "^1.0.7" }, "devDependencies": { "@vue/cli-plugin-babel": "^4.4.4", diff --git a/manager/src/main.js b/manager/src/main.js index 2bbf62ee..fa03abd2 100644 --- a/manager/src/main.js +++ b/manager/src/main.js @@ -6,7 +6,7 @@ import ViewUI from 'view-design' import './styles/theme.less'; import "core-js/stable" -import "regenerator-runtime/runtime" +// import "regenerator-runtime/runtime" import App from './App' import { router } from './router/index' import store from './store' From 8032f3bda1a4fbcea539d2ff7940d86667fca50c Mon Sep 17 00:00:00 2001 From: Chopper Date: Wed, 23 Jun 2021 16:48:43 +0800 Subject: [PATCH 02/22] =?UTF-8?q?=E5=88=86=E7=B1=BB=E8=A7=84=E6=A0=BC?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/src/api/goods.js | 15 +- .../src/views/goods/goods-manage/category.vue | 1 - manager/src/views/goods/goods-manage/spec.vue | 156 +++++++----------- 3 files changed, 60 insertions(+), 112 deletions(-) diff --git a/manager/src/api/goods.js b/manager/src/api/goods.js index 4b02cd15..13a4a41a 100644 --- a/manager/src/api/goods.js +++ b/manager/src/api/goods.js @@ -76,15 +76,15 @@ export const disableCategory = (id, type) => { // 获取商品规格分页列表 export const getSpecListData = (params) => { - return getRequest('/goods/spec/page', params) + return getRequest('/goods/spec', params) } // 添加或修改规格设置 export const insertSpec = (params) => { return postRequest('/goods/spec', params) } // 添加或修改规格设置 -export const updateSpec = (params) => { - return putRequest('/goods/spec', params) +export const updateSpec = (id,params) => { + return putRequest(`/goods/spec/${id}`, params) } //根据分类id获取关联规格 export const getCategorySpecListData = (category_id, params) => { @@ -94,15 +94,6 @@ export const getCategorySpecListData = (category_id, params) => { export const delSpec = (id, params) => { return deleteRequest(`/goods/spec/${id}`, params) } -// 获取商品规格值列表 -export const getSpecValuesListData = (id, params) => { - return getRequest(`/goods/specValues/values/${id}`, params) -} -// 添加商品规格值 -export const saveSpecValues = (id, params) => { - return postRequest(`/goods/specValues/save/${id}`, params) -} - // 查询某分类下的全部子分类列表 export const getGoodsCategory = (parent_id) => { diff --git a/manager/src/views/goods/goods-manage/category.vue b/manager/src/views/goods/goods-manage/category.vue index 1bcc3217..deacb087 100644 --- a/manager/src/views/goods/goods-manage/category.vue +++ b/manager/src/views/goods/goods-manage/category.vue @@ -261,7 +261,6 @@ export default { getCategorySpecListData(v.id).then((res) => { this.categoryId = v.id; this.modalSpecTitle = "规格关联"; - console.log(res); this.specForm.categorySpecs = res.map((item) => item.id); this.modalSpecVisible = true; }); diff --git a/manager/src/views/goods/goods-manage/spec.vue b/manager/src/views/goods/goods-manage/spec.vue index 701554d8..b6cdfa3e 100644 --- a/manager/src/views/goods/goods-manage/spec.vue +++ b/manager/src/views/goods/goods-manage/spec.vue @@ -23,8 +23,8 @@ - - + + - + + + +
-
- - -
- - -
- - 提交 +
@@ -118,10 +98,9 @@ import { getSpecListData, insertSpec, updateSpec, - delSpec, - getSpecValuesListData, - saveSpecValues, + delSpec } from "@/api/goods"; + export default { name: "spec", components: {}, @@ -131,7 +110,6 @@ export default { modalType: 0, // 添加或编辑标识 modalVisible: false, // 添加或编辑显示 modalTitle: "", // 添加或编辑标题 - dialogSpecValuesVisible: false, // 添加或编辑规格值 specTitle: "", // 添加或编辑规格值 searchForm: { // 搜索框初始化对象 @@ -145,9 +123,8 @@ export default { specName: "", specValue: "", }, - specForm: {}, /** 编辑规格值 */ - specValues: [], + specValue: [], // 表单验证规则 formValidate: {}, submitLoading: false, // 添加或编辑提交状态 @@ -179,24 +156,7 @@ export default { width: 250, render: (h, params) => { return h("div", [ - h( - "Button", - { - props: { - type: "primary", - size: "small", - }, - style: { - marginRight: "5px", - }, - on: { - click: () => { - this.editSpec(params.row); - }, - }, - }, - "编辑规格值" - ), + h( "Button", { @@ -239,23 +199,28 @@ export default { }; }, methods: { + //初始化,获取数据 init() { this.getDataList(); }, + //修改分页 changePage(v) { this.searchForm.pageNumber = v; this.getDataList(); this.clearSelectAll(); }, + //修改页面大小 changePageSize(v) { this.searchForm.pageSize = v; this.getDataList(); }, + //搜索参数 handleSearch() { this.searchForm.pageNumber = 1; this.searchForm.pageSize = 10; this.getDataList(); }, + //重置搜索参数 handleReset() { this.$refs.searchForm.resetFields(); this.searchForm.pageNumber = 1; @@ -263,6 +228,7 @@ export default { // 重新加载数据 this.getDataList(); }, + //更改排序 changeSort(e) { this.searchForm.sort = e.key; this.searchForm.order = e.order; @@ -271,36 +237,27 @@ export default { } this.getDataList(); }, + //清除已选择 clearSelectAll() { this.$refs.table.selectAll(false); }, + //修改已选择 changeSelect(e) { this.selectList = e; this.selectCount = e.length; }, + //获取数据 getDataList() { this.loading = true; // 带多条件搜索参数获取表单数据 请自行修改接口 getSpecListData(this.searchForm).then((res) => { this.loading = false; - if (res.success) { - this.data = res.result.records; - this.total = res.result.total; - } + this.data = res.records; + this.total = res.total; }); this.loading = false; }, - submitSpecValuesForm() { - saveSpecValues(this.specForm.specId, this.specForm).then((res) => { - this.submitLoading = false; - if (res.success) { - this.$Message.success("规格值保存成功"); - this.getDataList(); - this.modalVisible = false; - this.dialogSpecValuesVisible = false; - } - }); - }, + //新增规格 saveSpec() { this.$refs.form.validate((valid) => { if (valid) { @@ -318,7 +275,7 @@ export default { }); } else { // 编辑 - updateSpec(this.form).then((res) => { + updateSpec(this.form.id, this.form).then((res) => { this.submitLoading = false; if (res.success) { this.$Message.success("操作成功"); @@ -330,6 +287,7 @@ export default { } }); }, + //弹出添加框 add() { this.modalType = 0; this.modalTitle = "添加"; @@ -337,31 +295,31 @@ export default { delete this.form.id; this.modalVisible = true; }, + //弹出编辑框 edit(v) { this.modalType = 1; this.modalTitle = "编辑"; - this.$refs.form.resetFields(); // 转换null为"" for (let attr in v) { if (v[attr] === null) { v[attr] = ""; } } - let str = JSON.stringify(v); - let data = JSON.parse(str); - this.form = data; + let localVal = v.specValue; + + this.form.specName = v.specName; + this.form.id = v.id; + this.form.specValue = v.specValue; + + if (localVal && localVal.indexOf("," > 0)) { + this.form.specValue = localVal.split(",") + this.specValue = this.form.specValue + this.$set(this, 'specValue', this.form.specValue) + } else { + this.specValue = []; + } this.modalVisible = true; }, - editSpec(v) { - getSpecValuesListData(v.id).then((res) => { - this.modalType = 1; - this.modalTitle = "编辑"; - this.specValues = res.result; - this.specForm.specValue = res.result.map(item => item.specValue) - this.specForm.specId = v.id; - this.dialogSpecValuesVisible = true; - }); - }, remove(v) { this.$Modal.confirm({ title: "确认删除", @@ -415,5 +373,5 @@ export default { }; From e65d84f95ff6f702ab4497326edd66ad226ed3ed Mon Sep 17 00:00:00 2001 From: Chopper Date: Thu, 24 Jun 2021 11:54:21 +0800 Subject: [PATCH 03/22] =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=AB=AF=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=9D=A5=E6=BA=90=E5=AD=97=E6=AE=B5=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/src/utils/filters.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/manager/src/utils/filters.js b/manager/src/utils/filters.js index 71c092db..9124cbfe 100644 --- a/manager/src/utils/filters.js +++ b/manager/src/utils/filters.js @@ -16,6 +16,22 @@ export function unitPrice(val, unit, location) { return (unit || '') + price } +/** + * 订单来源 + */ +export function clientTypeWay(val) { + if (val == "H5") { + return "移动端"; + } else if (val == "PC") { + return "PC端"; + } else if (val == "WECHAT_MP") { + return "小程序端"; + } else if (val == "APP") { + return "移动应用端"; + } else { + return val; + } +} From 39fd76ebdc9a6b6edf934c725139819eecdb4dfd Mon Sep 17 00:00:00 2001 From: mabo Date: Thu, 24 Jun 2021 15:56:20 +0800 Subject: [PATCH 04/22] =?UTF-8?q?=E8=A7=84=E6=A0=BC=E9=A1=B9=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/goodsDetail/ShowGoods.vue | 2 +- seller/src/api/goods.js | 16 +- .../goods/goods-seller/goodsOperation.vue | 194 ++++++++---------- 3 files changed, 95 insertions(+), 117 deletions(-) diff --git a/buyer/src/components/goodsDetail/ShowGoods.vue b/buyer/src/components/goodsDetail/ShowGoods.vue index 40bda016..6380f86f 100644 --- a/buyer/src/components/goodsDetail/ShowGoods.vue +++ b/buyer/src/components/goodsDetail/ShowGoods.vue @@ -151,7 +151,7 @@ export default { count: 1, // 商品数量 imgIndex: 0, // 展示图片下标 currentSelceted: [], // 当前商品sku - imgList: this.detail.data.specList[0].specImage, // 商品图片列表 + imgList: this.detail.data.specList[0].specImage || [], // 商品图片列表 skuDetail: this.detail.data, // sku详情 goodsSpecList: this.detail.specs, // 商品spec promotionMap: { // 活动状态 diff --git a/seller/src/api/goods.js b/seller/src/api/goods.js index 36359d22..dd8e4264 100644 --- a/seller/src/api/goods.js +++ b/seller/src/api/goods.js @@ -215,13 +215,13 @@ export const getSkuPage = params => { }; // 获取商品规格值列表 -export const getSpecValuesListSellerData = (id, params) => { - return getRequest(`/goods/spec-values/values/${id}`, params); -}; +// export const getSpecValuesListSellerData = (id, params) => { +// return getRequest(`/goods/spec-values/values/${id}`, params); +// }; // 添加商品规格值 -export const saveSpecValuesSeller = (id, params) => { - return postRequest(`/goods/spec-values/save/${id}`, params); -}; +// export const saveSpecValuesSeller = (id, params) => { +// return postRequest(`/goods/spec-values/save/${id}`, params); +// }; // 获取商品规格分页列表 export const getSpecListSellerData = params => { @@ -312,8 +312,8 @@ export const getCategoryParamsListDataSeller = (id, params) => { }; //保存获取关联规格 -export const getGoodsSpecInfoSeller = (category_id, params) => { - return getRequest(`/goods/spec/${category_id}`, params); +export const getGoodsSpecInfoSeller = (category_id) => { + return getRequest(`/goods/spec/${category_id}`); }; //批量设置运费模板 diff --git a/seller/src/views/goods/goods-seller/goodsOperation.vue b/seller/src/views/goods/goods-seller/goodsOperation.vue index b5dbab40..e1f6549b 100644 --- a/seller/src/views/goods/goods-seller/goodsOperation.vue +++ b/seller/src/views/goods/goods-seller/goodsOperation.vue @@ -185,29 +185,33 @@
- - + + +
- - + + + +
- +
- + @@ -523,7 +527,6 @@ export default { check: false, }, ], - show: "1", //提交状态 submitLoading: false, //上传图片路径 @@ -616,8 +619,9 @@ export default { brandId: 0, /** 计量单位 **/ goodsUnit: "", + /** 商品类型 **/ goodsType: "", - /** 路径 **/ + /** 分类路径 **/ categoryPath: "", /** 商品卖点 **/ sellingPoint: "", @@ -637,47 +641,20 @@ export default { /** 表格数据 */ skuTableData: [], - /** 请求数据*/ + /** 默认的规格参数 */ skuData: [], - - /** 当前可选择的 规格名称*/ - skuKey: [], - - /** 当前可选择的 规格值*/ - skuValue: [], - + + /** 默认的规格值 */ + skuVals: [], + // 某一规格名下的规格值 + skuVal: [], open_panel: [1, 2], /** 要提交的规格数据*/ skuInfo: [], - /** 当前选择的规格项*/ - specSelected: "", - - /** 当前选择的规格值*/ - specValSelected: "", - /** 当前规格项下的规格值列表*/ - specListSelected: [], - - /** 当前规格项下的规格值列表*/ - specList: [], - - /** 当前规格项索引 */ - activeSkuItemIndex: 0, - - /** 当前规格项 */ - activeSkuItem: {}, - /** 规格图片 */ images: [], - /** 当前规格值索引 */ - activeSkuValIndex: 0, - - /** 当前规格值 */ - activeSkuVal: {}, - - /** 当前百分比 */ - currentPercent: 0, /** 运费模板 **/ logisticsTemplate: [], @@ -738,6 +715,7 @@ export default { "specId", "specValueId", ], + skuValVisible: true, }; }, @@ -757,6 +735,7 @@ export default { this.goodsId = this.$route.query.id; this.GET_GoodData(); this.selectGoodsType = false; + } //编辑模版 else if (this.$route.query.draftId) { @@ -937,7 +916,7 @@ export default { } return !check; }, - + // 跳转商品列表 gotoGoodsList() { this.$router.push({ name: "goods" }); }, @@ -981,6 +960,7 @@ export default { } }); }, + // 编辑时获取商品信息 async GET_GoodData() { let response = {}; if (this.draftId) { @@ -1006,6 +986,8 @@ export default { this.activeCategoryName3 = response.result.categoryName[2]; this.baseInfoForm.categoryId = response.result.categoryPath.split(","); + + if ( response.result.goodsGalleryList && response.result.goodsGalleryList.length > 0 @@ -1019,6 +1001,8 @@ export default { this.categoryId = this.baseInfoForm.categoryId[2]; + this.Get_SkuInfoByCategory(this.categoryId) + this.renderGoodsDetailSku(response.result.skuList); /** 查询品牌列表 */ @@ -1029,7 +1013,7 @@ export default { this.GET_ShopGoodsLabel(); this.GET_GoodsUnit(); }, - + // 渲染sku数据 renderGoodsDetailSku(skuList) { let skus = []; let skusInfo = []; @@ -1151,16 +1135,31 @@ export default { */ this.renderTableData(); }, - async GET_SkuSpecVal(id) { - let specValResult = await API_GOODS.getSpecValuesListSellerData(id, { - pageNumber: 1, - pageSize: 10, - specVal: this.specValSelected, - }); - if (specValResult.success && specValResult.result.records.length > 0) { - this.skuValue = specValResult.result.records.map((i) => i.specValue); - } else { - this.skuValue = []; + // 编辑规格名 + editSkuItem () { + this.renderTableData(); + }, + // 编辑规格值 + async skuValueChange(val, index, item) { + /** 更新skuInfo数据 */ + let _arr = cloneObj(item); + this.$set(item, "name", _arr.name); + this.$set(this.skuInfo, index, _arr); + /** + * 渲染规格详细表格 + */ + this.renderTableData(); + }, + // 获取焦点时,取得规格名对应的规格值 + changeSkuVals (name) { + if (name) { + this.skuData.forEach((e, index) => { + if (e === name) { + if (this.skuVal.length != this.skuVals[index].length) { + this.skuVal = this.skuVals[index] + } + } + }) } }, /** 移除当前规格项 进行数据变化*/ @@ -1171,6 +1170,7 @@ export default { */ this.renderTableData(); }, + // 添加规格值的验证 validateEmpty(params) { let flag = true; params.forEach((item) => { @@ -1187,16 +1187,15 @@ export default { }, /** 添加当前规格项的规格值*/ addSpec($index, item) { - this.activeSkuItemIndex = $index; - if (this.validateEmpty(this.skuInfo[$index].spec_values)) { - if (this.skuInfo[$index].spec_values.length >= 10) { + if (this.validateEmpty(item.spec_values)) { + if (item.spec_values.length >= 10) { this.$Message.error("规格值不能大于10个!"); return; } this.$set( - this.skuInfo[$index].spec_values, - this.skuInfo[$index].spec_values.length, + item.spec_values, + item.spec_values.length, { name: item.name, } @@ -1208,21 +1207,10 @@ export default { this.renderTableData(); } }, - /** - * 根据规格项名称,搜索对应的规格对象(如果是服务器设置过的话) - */ - findSpec(name) { - let spec = { name: name }; - this.skuData.forEach((item) => { - if (item.name === name) { - spec = item; - } - }); - return spec; - }, + /** 移除当前规格值 */ - handleCloseSkuValue($index, index) { - this.skuInfo[$index].spec_values.splice(index, 1); + handleCloseSkuValue(item, index) { + item.spec_values.splice(index, 1); this.baseInfoForm.regeneratorSkuFlag = true; /** @@ -1230,19 +1218,7 @@ export default { */ this.renderTableData(); }, - /** 选择规格值时触发 */ - async skuValueChange(val, index, item) { - this.specValSelected = val; - await this.GET_SkuSpecVal(item.spec_id); - /** 更新skuInfo数据 */ - let _arr = cloneObj(this.skuInfo[this.activeSkuItemIndex]); - this.$set(this.skuInfo[this.activeSkuItemIndex], "name", _arr.name); - this.$set(this.skuInfo, this.activeSkuItemIndex, _arr); - /** - * 渲染规格详细表格 - */ - this.renderTableData(); - }, + /** * 渲染table所需要的column 和 data */ @@ -1310,35 +1286,34 @@ export default { }); cloneTemp.splice(0, 1); result = this.specIterator(result, cloneTemp); - result = this.defaultParams(result); + // result = this.defaultParams(result); this.skuTableData = result; } }, - /** 自动完成表单所需方法*/ - filterMethod(value, option) { - return option.toUpperCase().indexOf(value.toUpperCase()) !== -1; - }, /** 根据分类id获取系统设置规格信息*/ - Get_SkuInfoByCategory() { - if (this.baseInfoForm.categoryId) { - API_GOODS.getGoodsSpecInfoSeller(this.baseInfoForm.categoryId, {}).then( - (response) => { - this.skuData = response; - if (this.skuData.length > 0) { - this.skuData.forEach((spec) => { - this.skuKey.push(spec.name); - }); + Get_SkuInfoByCategory(categoryId) { + if (categoryId) { + API_GOODS.getGoodsSpecInfoSeller(categoryId).then(res => { + if(res.length) { + res.forEach(e => { + this.skuData.push(e.specName) + this.skuVals.push(e.specValue ? e.specValue.split(',') : []) + }) } } ); } }, + /** 自动完成表单所需方法*/ + filterMethod(value, option) { + return option.toUpperCase().indexOf(value.toUpperCase()) !== -1; + }, /** * 添加固有属性 */ - defaultParams(tableData) { - return tableData; - }, + // defaultParams(tableData) { + // return tableData; + // }, /** * 迭代属性,形成表格 * result 渲染的数据 @@ -1367,6 +1342,7 @@ export default { } return this.specIterator(result, cloneTemp); }, + // 规格表格操作 handleSpan({ row, column, rowIndex, columnIndex }) {}, /** 数据改变之后 抛出数据 */ updateSkuTable(row, item) { @@ -1454,7 +1430,7 @@ export default { /** 查询品牌列表 */ this.getGoodsBrandList(); /** 查询分类绑定的规格信息 */ - this.Get_SkuInfoByCategory(); + this.Get_SkuInfoByCategory(this.baseInfoForm.categoryId); // 获取商品单位 this.GET_GoodsUnit(); // 获取当前店铺分类 @@ -1485,6 +1461,7 @@ export default { this.loading = false; if (this.activestep++ > 2) return; }, + // 店内分类选择 selectTree(v) { if (v.length > 0) { // 转换null为"" @@ -1499,6 +1476,7 @@ export default { this.editTitle = menu.title; } }, + // 店内分类选中 changeSelect(v) { this.selectCount = v.length; let ids = ""; @@ -1581,7 +1559,7 @@ export default { } }); }, - /** 保存至草稿箱 */ + /** 保存为模板 */ saveToDraft(saveType) { let showType = saveType === "TEMPLATE" ? "模版" : "草稿"; this.baseInfoForm.skuList = this.skuTableData; @@ -1629,7 +1607,7 @@ export default { }, }); }, - SAVE_DRAFT_GOODS() { // 保存草稿商品 + SAVE_DRAFT_GOODS() { // 保存模板 API_GOODS.saveDraftGoods(this.baseInfoForm).then((res) => { if (res.success) { this.$Message.info("保存成功!"); From 84f3eaea10605b7343452d59237768e820001afd Mon Sep 17 00:00:00 2001 From: mabo Date: Thu, 24 Jun 2021 16:41:04 +0800 Subject: [PATCH 05/22] =?UTF-8?q?=E5=95=86=E5=93=81=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goods/goods-seller/goodsOperation.vue | 39 ++++++------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/seller/src/views/goods/goods-seller/goodsOperation.vue b/seller/src/views/goods/goods-seller/goodsOperation.vue index e1f6549b..e55795d9 100644 --- a/seller/src/views/goods/goods-seller/goodsOperation.vue +++ b/seller/src/views/goods/goods-seller/goodsOperation.vue @@ -405,11 +405,9 @@ - - @@ -1286,7 +1284,6 @@ export default { }); cloneTemp.splice(0, 1); result = this.specIterator(result, cloneTemp); - // result = this.defaultParams(result); this.skuTableData = result; } }, @@ -1297,7 +1294,8 @@ export default { if(res.length) { res.forEach(e => { this.skuData.push(e.specName) - this.skuVals.push(e.specValue ? e.specValue.split(',') : []) + const vals = e.specValue ? e.specValue.split(',') : [] + this.skuVals.push(Array.from(new Set(vals))) }) } } @@ -1306,14 +1304,9 @@ export default { }, /** 自动完成表单所需方法*/ filterMethod(value, option) { - return option.toUpperCase().indexOf(value.toUpperCase()) !== -1; + return option.toUpperCase().indexOf(value.toUpperCase()) !== -1; }, - /** - * 添加固有属性 - */ - // defaultParams(tableData) { - // return tableData; - // }, + /** * 迭代属性,形成表格 * result 渲染的数据 @@ -1324,7 +1317,6 @@ export default { if (cloneTemp.length > 0) { let table = []; result.forEach((resItem) => { - let tableItem = []; cloneTemp[0].spec_values.forEach((valItem) => { let obj = cloneObj(resItem); obj[valItem.name] = valItem.value; @@ -1560,29 +1552,22 @@ export default { }); }, /** 保存为模板 */ - saveToDraft(saveType) { - let showType = saveType === "TEMPLATE" ? "模版" : "草稿"; + saveToDraft() { this.baseInfoForm.skuList = this.skuTableData; if (this.baseInfoForm.goodsGalleryFiles.length > 0) { this.baseInfoForm.goodsGalleryList = this.baseInfoForm.goodsGalleryFiles.map((i) => i.url); } this.baseInfoForm.categoryName = []; - this.baseInfoForm.saveType = saveType; + this.baseInfoForm.saveType = 'TEMPLATE'; if (this.draftId) { this.baseInfoForm.id = this.draftId; this.$Modal.confirm({ - title: "当前" + showType + "已存在", - content: - "当前" + - showType + - "已存在,是否保存为新" + - showType + - "或替换原" + - showType, - okText: "保存新" + showType, - cancelText: "替换旧" + showType, + title: "当前模板已存在", + content: "当前模板已存在,保存为新模板或替换原模板", + okText: "保存新模板", + cancelText: "替换旧模板", closable: true, onOk: () => { delete this.baseInfoForm.id; @@ -1598,7 +1583,7 @@ export default { } this.$Modal.confirm({ - title: "保存" + showType, + title: "保存模板", content: "是否确定保存", okText: "保存", closable: true, From e0a7bb86a621f14be574000dae9179e3f9ecc4f9 Mon Sep 17 00:00:00 2001 From: mabo Date: Thu, 24 Jun 2021 17:13:26 +0800 Subject: [PATCH 06/22] =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/goods/goods-seller/goodsOperation.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/seller/src/views/goods/goods-seller/goodsOperation.vue b/seller/src/views/goods/goods-seller/goodsOperation.vue index e55795d9..2d39f1a4 100644 --- a/seller/src/views/goods/goods-seller/goodsOperation.vue +++ b/seller/src/views/goods/goods-seller/goodsOperation.vue @@ -67,8 +67,7 @@ > {{ activeCategoryName3 }}

@@ -727,7 +726,8 @@ export default { this.logisticsTemplate = res.result; } }) - //编辑商品 + + // 编辑商品 if (this.$route.query.id) { this.activestep = 1; this.goodsId = this.$route.query.id; @@ -735,7 +735,7 @@ export default { this.selectGoodsType = false; } - //编辑模版 + // 编辑模板 else if (this.$route.query.draftId) { this.draftId = this.$route.query.draftId; this.activestep = 1; @@ -776,7 +776,14 @@ export default { this.GET_GoodsTemplate(); this.GET_NextLevelCategory(); }, - + // 获取已选模板 + checkedTemplate () { + if(this.goodsTemplates.length) { + return this.goodsTemplates.find(item=>{return item.id == this.draftId}).goodsName + } else { + return "" + } + }, // 选择商品模板 handleClickGoodsTemplate(val) { this.draftId = val.id; From 3cb1edee83da9e2d542727122d823ffd9b4536cd Mon Sep 17 00:00:00 2001 From: Chopper Date: Thu, 24 Jun 2021 17:44:43 +0800 Subject: [PATCH 07/22] =?UTF-8?q?=E5=8F=82=E6=95=B0=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goods/goods-seller/goodsOperation.vue | 444 ++++++++++-------- 1 file changed, 238 insertions(+), 206 deletions(-) diff --git a/seller/src/views/goods/goods-seller/goodsOperation.vue b/seller/src/views/goods/goods-seller/goodsOperation.vue index e1f6549b..0f8c064f 100644 --- a/seller/src/views/goods/goods-seller/goodsOperation.vue +++ b/seller/src/views/goods/goods-seller/goodsOperation.vue @@ -3,21 +3,23 @@
-
- +
+
-

{{item.title}}

-

{{item.desc}}

+

{{ item.title }}

+

{{ item.desc }}

返回

-
- +
+
-

{{item.goodsName}}

-

{{item.sellingPoint || ''}}

+

{{ item.goodsName }}

+

{{ item.sellingPoint || '' }}

@@ -26,36 +28,38 @@ -
- +
- +
- +
    -
  • +
  • {{ item.name }} >
    -
  • +
  • {{ item.name }} >
    -
  • +
  • {{ item.name }}
@@ -67,7 +71,12 @@ > {{ activeCategoryName3 }}

@@ -84,11 +93,11 @@ - + - + - + 零售型 @@ -125,18 +135,18 @@

商品规格及图片

- + - + - +
@@ -163,16 +173,18 @@
- +
- +
@@ -185,23 +197,30 @@
- - - + + + -
+
- - + + - +
@@ -225,34 +244,36 @@ } " :span-method="handleSpan"> diff --git a/buyer/yarn.lock b/buyer/yarn.lock index 6dbcc1c8..afd75933 100644 --- a/buyer/yarn.lock +++ b/buyer/yarn.lock @@ -2051,7 +2051,7 @@ copy-webpack-plugin@^4.0.1: p-limit "^1.0.0" serialize-javascript "^1.4.0" -core-js@^2.4.0, core-js@^2.5.0: +core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.5: version "2.6.12" resolved "https://registry.npm.taobao.org/core-js/download/core-js-2.6.12.tgz?cache=0&sync_timestamp=1607216048810&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" integrity sha1-2TM9+nsGXjR8xWgiGdb2kIWcwuw= @@ -5150,6 +5150,16 @@ mute-stream@0.0.7: resolved "https://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= +mv-count-down@^0.1.15: + version "0.1.15" + resolved "https://registry.npmjs.org/mv-count-down/-/mv-count-down-0.1.15.tgz#a3f3c1677576e592c7710b441b2dda96acac2702" + integrity sha512-7poh86i27D/u4AvE9Ne8QHhy61p4MYAhSf4XAVyxzL0gXVCyccJ0NtJferEOxBP6C2q9jImknpKLGdwnEeJ7qQ== + dependencies: + core-js "^2.6.5" + vue "^2.6.10" + vue-router "^3.0.3" + vuex "^3.0.1" + nan@^2.12.1, nan@^2.13.2: version "2.14.2" resolved "https://registry.npm.taobao.org/nan/download/nan-2.14.2.tgz?cache=0&sync_timestamp=1602591700047&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnan%2Fdownload%2Fnan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" @@ -8315,6 +8325,11 @@ vue-router@^3.0.1: resolved "https://registry.npm.taobao.org/vue-router/download/vue-router-3.4.9.tgz?cache=0&sync_timestamp=1607347231238&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.4.9.tgz#c016f42030ae2932f14e4748b39a1d9a0e250e66" integrity sha1-wBb0IDCuKTLxTkdIs5odmg4lDmY= +vue-router@^3.0.3: + version "3.5.2" + resolved "https://registry.npmjs.org/vue-router/-/vue-router-3.5.2.tgz#5f55e3f251970e36c3e8d88a7cd2d67a350ade5c" + integrity sha512-807gn82hTnjCYGrnF3eNmIw/dk7/GE4B5h69BlyCK9KHASwSloD1Sjcn06zg9fVG4fYH2DrsNBZkpLtb25WtaQ== + vue-style-loader@^3.0.0, vue-style-loader@^3.0.1: version "3.1.2" resolved "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-3.1.2.tgz#6b66ad34998fc9520c2f1e4d5fa4091641c1597a" From 4160ebe004057c3741a8c1fc2811a1d977d8d3bd Mon Sep 17 00:00:00 2001 From: mabo Date: Fri, 25 Jun 2021 17:36:00 +0800 Subject: [PATCH 17/22] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=94=AE=E5=90=8E=EF=BC=8C=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/goodsDetail/ShowGoods.vue | 1 + .../goodsDetail/ShowGoodsDetail.vue | 22 +++++++++++++++++++ .../home/orderCenter/AfterSaleDetail.vue | 9 ++++++++ .../pages/home/orderCenter/ApplyAfterSale.vue | 11 ++++++---- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/buyer/src/components/goodsDetail/ShowGoods.vue b/buyer/src/components/goodsDetail/ShowGoods.vue index 4378d9ac..32536da6 100644 --- a/buyer/src/components/goodsDetail/ShowGoods.vue +++ b/buyer/src/components/goodsDetail/ShowGoods.vue @@ -327,6 +327,7 @@ export default { }) }, promotion () { // 格式化促销活动,返回当前促销的对象 + if (!this.detail.promotionMap) return false; let keysArr = Object.keys(this.detail.promotionMap); if (keysArr.length === 0) return false; diff --git a/buyer/src/components/goodsDetail/ShowGoodsDetail.vue b/buyer/src/components/goodsDetail/ShowGoodsDetail.vue index 72b4a349..d58f5a6e 100644 --- a/buyer/src/components/goodsDetail/ShowGoodsDetail.vue +++ b/buyer/src/components/goodsDetail/ShowGoodsDetail.vue @@ -86,6 +86,14 @@
+ +
+ + + +
{{param.paramName}}{{param.paramValue}}
+ + @@ -475,4 +483,18 @@ export default { .ivu-rate-star-full:before, .ivu-rate-star-half .ivu-rate-star-content:before { color: $theme_color; } +table{ + border-color: #eee; + color: #999; + width: 70%; + margin-left: 10px; + tr{ + td:nth-child(1){ + width: 200px; + } + } + td{ + padding: 5px; + } +} diff --git a/buyer/src/pages/home/orderCenter/AfterSaleDetail.vue b/buyer/src/pages/home/orderCenter/AfterSaleDetail.vue index 7adcfd1a..51301f2e 100644 --- a/buyer/src/pages/home/orderCenter/AfterSaleDetail.vue +++ b/buyer/src/pages/home/orderCenter/AfterSaleDetail.vue @@ -44,6 +44,12 @@ +
+

图片信息

+
+ +
+
From 0adbde45b9ba6d0ebfaf14a7c85fb186be8db45d Mon Sep 17 00:00:00 2001 From: Chopper Date: Fri, 25 Jun 2021 18:30:30 +0800 Subject: [PATCH 18/22] =?UTF-8?q?=E5=85=85=E5=80=BC=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/home/userCenter/MoneyManagement.vue | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/buyer/src/pages/home/userCenter/MoneyManagement.vue b/buyer/src/pages/home/userCenter/MoneyManagement.vue index d9e8a317..f57011b3 100644 --- a/buyer/src/pages/home/userCenter/MoneyManagement.vue +++ b/buyer/src/pages/home/userCenter/MoneyManagement.vue @@ -215,7 +215,7 @@ export default { color: 'green' } }, - params.row.money + this.$options.filters.unitPrice(params.row.money, '+ ¥') ) ]); } else if (params.row.money < 0) { @@ -227,7 +227,7 @@ export default { color: 'red' } }, - params.row.money + this.$options.filters.unitPrice(0 - params.row.money, '- ¥') ) ]); } @@ -252,7 +252,10 @@ export default { }, { title: '充值金额', - key: 'rechargeMoney' + key: 'rechargeMoney', + render: (h, params) => { + return h('div', [h('span', this.$options.filters.unitPrice(params.row.rechargeMoney, '¥'))]); + } }, { title: '支付状态', @@ -281,7 +284,9 @@ export default { { title: '提现金额', key: 'applyMoney', - width: 120 + render: (h, params) => { + return h('div', [h('span', this.$options.filters.unitPrice(params.row.applyMoney, '¥'))]); + } }, { title: '提现状态', @@ -392,9 +397,10 @@ export default { if (valid) { recharge(this.formData).then((res) => { if (res.message === 'success') { - // TODO 根据返回的值跳转到收银台进行支付,一下是输出sn - console.warn(res.result.rechargeSn); - this.modal = false; + this.$router.push({ + path: '/payment', + query: { orderType: 'RECHARGE', sn: res.result.rechargeSn } + }); } }); } From 31c585bcafeeeff44fde77f671b4738a62c049d4 Mon Sep 17 00:00:00 2001 From: mabo Date: Fri, 25 Jun 2021 18:31:55 +0800 Subject: [PATCH 19/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BD=99=E9=A2=9D?= =?UTF-8?q?=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/package.json | 2 +- buyer/src/assets/iconfont/icomoon.eot | Bin 2380 -> 3260 bytes buyer/src/assets/iconfont/icomoon.svg | 2 + buyer/src/assets/iconfont/icomoon.ttf | Bin 2216 -> 3096 bytes buyer/src/assets/iconfont/icomoon.woff | Bin 2292 -> 3172 bytes buyer/src/assets/iconfont/iconfont.css | 18 ++-- .../indexDecorate/modelList/seckill.vue | 2 +- buyer/src/pages/payment/PayMent.vue | 83 +++++++++++------- 8 files changed, 66 insertions(+), 41 deletions(-) diff --git a/buyer/package.json b/buyer/package.json index 7a960738..9f64b7fb 100644 --- a/buyer/package.json +++ b/buyer/package.json @@ -17,7 +17,7 @@ "mv-count-down": "^0.1.15", "psl": "^1.8.0", "qs": "^6.9.4", - "swiper": "^6.4.1", + "swiper": "^5.2.0", "uuid": "^8.3.2", "v-distpicker": "^1.0.17", "view-design": "^4.3.2", diff --git a/buyer/src/assets/iconfont/icomoon.eot b/buyer/src/assets/iconfont/icomoon.eot index 5a5b53d373f1261ad6934976642f5d4b111fe746..1155a87a0b218ca403925d4f0941eb704e047617 100644 GIT binary patch delta 1189 zcmZuxPe>F|82`R`JM(;F>$L99ny|X=Os$g9uCA_8N>T?S3p#9uh}5EM9<&yc5>gf_ zIz$$-Py|JXf-HgxgNQ6Tbm(B04$&c{h%QkOL=ae0-ik1U>`69DRodMzi^UDTCU&Db`wdmKPzlE&#m=$4U_cZS zkb<4i1qYxHMqmPpa04E~JiLeR$kC*_F-tQ8p>QhJoNf)Y#92tQV^*BhG?~ICw=Jy( zL*Z@MobJGuIJa91;aEAv`Okr zaTXL>Xe(?mCn_pLPWSsOGnukdfZao);P;Cm;rhOoR4~-i5~mDPa4wi~UlT%mfM^-v zu;DC{q*iDtjG`A6hI<6xs_BAnJk5pRMJ}9oab1&oT8eu@8CCIa1%{Hl@+IFOczoyX(<`J4rKM4ksg~jsmkX_FcgV|f)T%! zNLbjAuzsDfl1YnAScywL{lSPAIGl{N#*(*V$z<&JH5vF(QLhH8RF!@O zNTlfN@6AjeG}?baxsMDXfOkuMQ=~2Ll5??^S64@+%@=jkq`I>7;yzxtk#did(_1=~ bsfBrr;~iy$z46tOS$5Mg43)DN_%r+qL>$k0 delta 322 zcmdlZc}9rMhm(O}1;<1-GZw|eg^?2-$_0-zFfi-^;)LYf!~*fKOI;IB$kdnQNIYg> zV60$ZV7ZZznwTQ9N%A8D16u%4ommD@fc-G@DImWC$XCh8EvXP=WB{_+)&ThmIr+(n z%)6Mnfc!H+zEEyrMFE2V1Bm|sB%hay2r^EU$nJCMuRR*+v@!oUnFhHWYA7-om9I2j*}wh%m@8oMBXBT*Z_F6agva N0D6sm^FOYAi~y@}MJfOQ diff --git a/buyer/src/assets/iconfont/icomoon.svg b/buyer/src/assets/iconfont/icomoon.svg index a44989ac..780957bd 100644 --- a/buyer/src/assets/iconfont/icomoon.svg +++ b/buyer/src/assets/iconfont/icomoon.svg @@ -11,4 +11,6 @@ + + \ No newline at end of file diff --git a/buyer/src/assets/iconfont/icomoon.ttf b/buyer/src/assets/iconfont/icomoon.ttf index b63f6d43ced31f4d9052ebfee5e4fe8caf067d84..d89161b6aba46403a9920b2a9654b381732298ba 100644 GIT binary patch delta 1242 zcmZuxU1$_n6h3EeW^V2*n=#p)O&&HsJEI#>>29*grkI5K1Ew^Q7F;7Gh%RQ6JS4i1 zAQ2-gT6`!CB@I*s#Rn17BGh6)q%G`2AN9ot@gWI{_#*X51R*+l&ddgv&&VzvTw}(=lR)hYEJb%-7{KQng*f{+7Cjg8S&W-1%i!^T`%yaGd zNjegFg3(W#Z%KWB$P(z9mhe4zZS}0q5caF zqJD1(b-mO8ry(PL6bHeAR!Bhx_QL=iff1O5Iaq|7unZ638N5M>HjySA!>*6UGKtP? zcYRkDwl){C9le(Xw0w>uO0A0K9dcxfjF1w9$tm7B=j$R_rl zAUCMZa*yt=Czl+MTdE>rLv!BH(V{I41KEvd?v+S8?b58A1 z@^+ANU#ejxGn_|;UOT<}kL8+HQHC(ILkB%w|33MKJLm;8I!U_5Y$=mqPu0WgN74QT z(q+pIU3(ReMC0*jBp!BBDF?TwocBLC>9ix}oYb$wp>2(!sPgXM(MUW2%`5bxwSt>DMBSx=ud`{&UcG^!wboV^-f=2-T3|0Km%n$ULnob44@#A3$R-4Js1l zk7aSADElmYTX(i4jd zfV2RR5288Jb1KtHawHxD`4tQdEH^Sz6H{b1Nq%HtU<&}sn`Hn6*bg(G0`fb6e3gvc zk_s_K1|XYl4Un&plb`IE$h?aQXaU<9pnyqNI_m=Zt6@g&fg3S>_9GK zTS0zt3DBWHzyUH)fq|KM*2Dw$jLef5y&0J|`!KSyYJ&U&#F2%E732ABzA|vLfYdYG zIq_;2g8qMig>mvdPDx3SY6ccYkPZ~UF91^|J^x)Epy=4Qaklls{CjZS&_=tN-(086xyXK5Px`|Ma@nz6fN z*H`6}vGMOl3A;~FAIpF9!}m+Y!U%v#E|6ns>0bG%L?B_?$o`Z?J`u~MiJ6mx9VB}L zOKUs$5oswQpHuez=v*CVu zGll`ZS=*Cql6$c=*?U9ZFgC|Edb(4av7<_cm;~fvRWi}la3aEWZ02PXn_xk~x>u$I zHT2l(4V}4*pb)8`?uR&T%tq^T6Tnjr5bP2gT7w;QIC zn|_o^$%<6|!<1?8I>+j|GDdhd)B!^kr8*~7S;=2H!spDiC-&La2Oj?I)h>j#J7TVq zpU(SJwHEFO8)S!>{9kJ_5IH^vp?S7-h09#gG$!>0pH`Uq~)v+PHTUpv6t#kw}J2odOjPI|h*eew-=(hF#E zQ*@2FayH3G&BNC;U RL)gMpJO)OwwV9WqYgn+Pk*rl%Y z#A1-x9*`a=7D&&jOaqD?VPIgn0m3CY5|1-d6H^!%*yaG$n1Qg&CdrQ(KtZ6`6(C;) zgxL=>pUTKBsQ`-o0P+<;Sd5XOBPTx@sLqdF0w^E^!pysvx^fdMfEKgsfE0nT07F+^ zVs0u>%m-+B8wk(z;{08ZUt9uo8^{ufI%Xh?nR(V^9!7gc=E**c-i*wfXE3s|Ml%8> zfH<=7uwp#F%~u9)7N7tF!<`eab|L8h2Ur-H4*>Zb3``(VAOPxNKJfnl(5E01KqQz3 yv7vxtatxOO$cqdNTnr)%atvn})fiVX