From 1c41fac5b42cd9584eefa7ddcfb67ec5f519eab7 Mon Sep 17 00:00:00 2001 From: fengdong777 <1478994744@qq.com> Date: Thu, 25 May 2023 18:01:54 +0800 Subject: [PATCH] 5.25 --- .../src/api/baseInfo/commodityBrand/index.js | 24 + .../yxt-supervise-cyf-ui/src/router/index.js | 2 +- .../views/baseInfo/commodityBrand/index.vue | 6 +- .../baseInfo/commodityFily/commodity.vue | 419 ++++++++++-------- .../views/baseInfo/commodityFily/index.vue | 239 +++++++++- 5 files changed, 495 insertions(+), 195 deletions(-) diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/commodityBrand/index.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/commodityBrand/index.js index 67b9369b..508ded26 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/commodityBrand/index.js +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/commodityBrand/index.js @@ -69,6 +69,30 @@ export default { } }) }, + // 添加类别 + saveList: function(params) { + return request({ + url: '/cyf/productType/save ', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json', + 'token': tokens + } + }) + }, + // 修改商品名称 + updateShop: function(params) { + return request({ + url: '/cyf/productType/update ', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json', + 'token': tokens + } + }) + }, } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js index b3067087..c198922a 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js @@ -137,7 +137,7 @@ export const constantRoutes = [{ import('@/views/baseInfo/commodityFily/index.vue'), name: 'index', meta: { - title: '商品档案' + title: '商品类别' } }, ] diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/index.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/index.vue index c3617fa1..04fb9a3d 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/index.vue +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/index.vue @@ -7,7 +7,7 @@ {{ searchxianshitit }}
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/commodity.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/commodity.vue index 89efcb68..1d1f7ad9 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/commodity.vue +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/commodity.vue @@ -1,200 +1,257 @@ - - - - \ No newline at end of file + + } + diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/index.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/index.vue index 8baf8682..ead0c43c 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/index.vue +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/index.vue @@ -36,12 +36,30 @@ > 查看 + + 添加 + - + + + +
@@ -53,22 +71,127 @@
- - - + + + + + + + + + + + + + + + + + + + + + + + + +
品牌名称 + +
商品名称 + +
类别名称 + +
类别编码 + +
+
+ 保存 +
+
+ + + + + + + + + + + + + + + + + + +
品牌名称 + +
品牌编码 + +
商品名称 + +
名称编号 + +
+
+ 修改 +
+
- + + + + + + + + + + +
类别名称 + +
类别编码 + +
+
+ 修改 +
+
@@ -94,6 +217,9 @@ listLoading: false, btndisabled: false, editDialog: false, + categorys: false, + entry: false, + modify: false, form: { name:'', number:'', @@ -127,7 +253,28 @@ total: 0 }, viewState: 1, - datalist:[] + datalist:[], + forms: { + prodSid:'', + typeList:[] + }, + shopName:'', + shopsName:'', + shopNum:'', + arry: { + name:'', + number:'' + }, + modifythe:{ + sid:'', + name:'', + number:'' + }, + modifyArray:{ + sid:'', + name:'', + number:'' + } } }, mounted() { @@ -212,6 +359,78 @@ this.datalist=res.data }) }, + addshop(row) { + this.entry = true; + this.shopName=row.informationName + this.shopsName=row.name + this.forms.sid=row.sid + }, + modifyThe(row) { + this.modify = true; + this.modifythe.sid=row.sid + this.shopName=row.informationName + this.shopNum=row.informationNumber + this.modifythe.name=row.name + this.modifythe.number=row.number + }, + category(row) { + this.categorys = true; + this.editDialog = false; + this.modifyArray.sid=row.sid + this.modifyArray = Object.assign({}, row); + }, + modifyCategory(){ + req.updateShop(this.modifyArray).then((res)=>{ + if (res.success) { + this.$message({ + showClose: true, + type: 'success', + message: res.msg + }) + this.categorys = false; + this.getList() + } else { + // 根据resp.code进行异常情况处理 + } + }) + .catch(() => {}) + }, + modifyList(){ + req.updateShop(this.modifythe).then((res)=>{ + if (res.success) { + this.$message({ + showClose: true, + type: 'success', + message: res.msg + }) + this.modify = false; + this.getList() + } else { + // 根据resp.code进行异常情况处理 + } + }) + .catch(() => {}) + }, + addShop(){ + this.forms.typeList.push(this.arry) + + req.saveList(this.forms) + .then(resp => { + if (resp.success) { + this.$message({ + showClose: true, + type: 'success', + message: resp.msg + }) + this.entry = false; + } else { + // 根据resp.code进行异常情况处理 + } + }) + .catch(() => {}) + + this.arry={name:'',number:''} + }, save() { req.update(this.form) .then(resp => {