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/api/promotion.js b/manager/src/api/promotion.js
index 42173562..0c7c6113 100644
--- a/manager/src/api/promotion.js
+++ b/manager/src/api/promotion.js
@@ -30,7 +30,7 @@ export const getLiveList = params => {
// 获取直播间详情
export const getLiveInfo = studioId => {
- return getRequest(`/broadcast/studio/studioInfo/${studioId}`);
+ return getRequest(`/broadcast/studio/${studioId}`);
};
// 获取当前进行中的促销活动商品
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;
+ }
+}
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 {
};
diff --git a/seller/src/config/index.js b/seller/src/config/index.js
index 17f824e8..a7163666 100644
--- a/seller/src/config/index.js
+++ b/seller/src/config/index.js
@@ -18,14 +18,14 @@ export default {
* @description api请求基础路径
*/
api_dev: {
- // common: 'https://common-api.pickmall.cn',
- // buyer: 'https://buyer-api.pickmall.cn',
- // seller: 'https://store-api.pickmall.cn',
- // manager: 'https://admin-api.pickmall.cn',
- common: 'http://192.168.0.100:8890',
- buyer: 'http://192.168.0.100:8888',
- seller: 'http://192.168.0.100:8889',
- manager: 'http://192.168.0.100:8887'
+ common: 'https://common-api.pickmall.cn',
+ buyer: 'https://buyer-api.pickmall.cn',
+ seller: 'https://store-api.pickmall.cn',
+ manager: 'https://admin-api.pickmall.cn',
+ // common: 'http://192.168.0.109:8890',
+ // buyer: 'http://192.168.0.109:8888',
+ // seller: 'http://192.168.0.109:8889',
+ // manager: 'http://192.168.0.109:8887'
},
api_prod: {
common: 'https://common-api.pickmall.cn',
diff --git a/seller/src/views/promotion/fullCut/newFullCut.vue b/seller/src/views/promotion/fullCut/newFullCut.vue
index 9f44bb6d..3f4c4d9f 100644
--- a/seller/src/views/promotion/fullCut/newFullCut.vue
+++ b/seller/src/views/promotion/fullCut/newFullCut.vue
@@ -113,9 +113,11 @@
>
送积分
+