From a6068d98c7391ffbd8e5b435433f559e1edd95bc Mon Sep 17 00:00:00 2001
From: guoxing <1369478551@qq.com>
Date: Wed, 8 May 2024 14:34:13 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=95=86=E5=93=81?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
yxt-as-ui/src/api/Common/Upload.js | 2 +-
yxt-as-ui/src/api/goods/unit.js | 2 +-
.../src/views/goods/brands/brandsAdd.vue | 36 +-
yxt-as-ui/src/views/goods/goods/goodsAdd.vue | 1085 ++++++++---------
yxt-as-ui/src/views/goods/goods/goodsInfo.vue | 976 +++++----------
yxt-as-ui/src/views/goods/goods/index.vue | 6 +-
6 files changed, 829 insertions(+), 1278 deletions(-)
diff --git a/yxt-as-ui/src/api/Common/Upload.js b/yxt-as-ui/src/api/Common/Upload.js
index 6f5f0c578a..2a3a89c243 100644
--- a/yxt-as-ui/src/api/Common/Upload.js
+++ b/yxt-as-ui/src/api/Common/Upload.js
@@ -1,4 +1,4 @@
import request from '@/utils/request'
// 上传图片
-export const uploadFile = '/api/riskcenter/file/upload'
+export const uploadFile = '/api/portal/file/upload'
diff --git a/yxt-as-ui/src/api/goods/unit.js b/yxt-as-ui/src/api/goods/unit.js
index 8795c0b363..732f5d9f27 100644
--- a/yxt-as-ui/src/api/goods/unit.js
+++ b/yxt-as-ui/src/api/goods/unit.js
@@ -46,7 +46,7 @@ export default {
// 初始化
initUnits: function(data) {
return request({
- url: '/base/basegoodsunit/initialization/' + data,
+ url: '/yxtbase/apiadmin/base/basegoodsunit/initialization/' + data,
method: 'get'
});
},
diff --git a/yxt-as-ui/src/views/goods/brands/brandsAdd.vue b/yxt-as-ui/src/views/goods/brands/brandsAdd.vue
index 75c4756677..79f461d2c9 100644
--- a/yxt-as-ui/src/views/goods/brands/brandsAdd.vue
+++ b/yxt-as-ui/src/views/goods/brands/brandsAdd.vue
@@ -54,11 +54,11 @@
-->
品牌Logo:
-
-
+
@@ -98,8 +98,8 @@
// this.initData()
},
methods: {
- backData(value) {
- console.log('backData》》》》', value)
+
+ backData(value){
console.log('imgList', this.imgList)
if (this.imgList.length > 0) {
@@ -107,25 +107,13 @@
} else {
this.formobj.image = ''
}
-
this.hideUploadBtn = this.imgList.length != 0
console.log('this.hideUploadBtn', this.hideUploadBtn)
},
- backData2(value) {
- console.log('backData2》》》》', value)
- console.log('imgList2', this.imgList2)
-
- if (this.imgList2.length > 0) {
- this.formobj.bigPic = this.imgList2[0].url
- } else {
- this.formobj.bigPic = ''
- }
- this.hideUploadBtn2 = this.imgList2.length != 0
- console.log('this.hideUploadBtn2', this.hideUploadBtn2)
- },
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
+
req.saveBrands(this.formobj)
.then(resp => {
if (resp.success) {
@@ -144,9 +132,7 @@
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.imgList = []
- this.imgList2 = []
this.hideUploadBtn = true
- this.hideUploadBtn2 = true
this.formobj = {
sid: '',
brandName: '',
@@ -159,9 +145,7 @@
},
showAdd() {
console.log("this.imgList", this.imgList)
- console.log("this.imgList2", this.imgList2)
this.hideUploadBtn = this.imgList.length != 0
- this.hideUploadBtn2 = this.imgList2.length != 0
},
showEdit(row) {
req.initBrands(row.sid)
@@ -169,26 +153,18 @@
if (resp.success) {
this.formobj = resp.data
this.imgList = []
- this.imgList2 = []
if (resp.data.image != '') {
this.imgList.push({
url: resp.data.image
})
}
- if (resp.data.bigPic != '') {
- this.imgList2.push({
- url: resp.data.bigPic
- })
- }
this.hideUploadBtn = this.imgList.length != 0
- this.hideUploadBtn2 = this.imgList2.length != 0
}
})
.catch(e => {
this.formobj = row
this.imgList = []
- this.imgList2 = []
})
},
diff --git a/yxt-as-ui/src/views/goods/goods/goodsAdd.vue b/yxt-as-ui/src/views/goods/goods/goodsAdd.vue
index d2bb507b42..70f7dceb86 100644
--- a/yxt-as-ui/src/views/goods/goods/goodsAdd.vue
+++ b/yxt-as-ui/src/views/goods/goods/goodsAdd.vue
@@ -15,241 +15,329 @@
-
-
+
+
-
-
- 商品名称
+
+
+ 商品名称
+
+
-
-
-
+
+
+ 商品简称
+
+
-
-
- 商品编码
+
+
+
+
+
+
+ 商品副标题
+
+
-
-
-
+
+
+ 商品拼音缩写
+
+
+
-
-
- 商品品牌
+
+
+ 商品编码
+
+
+
+
+
+
+ 商品条形码
+
+
-
-
-
+
+
+
+
+ 商品品牌
+
+
-
-
- 商品类别
-
-
-
-
-
+
+
+ 商品类别
+
+
+
-
-
- 商品厂家
-
-
-
-
-
+ 商品厂家
+
+
-
-
- 厂家货号
-
-
-
-
-
+
+
+ 厂家货号
+
+
+
-
-
- 外部编码
+
+
+ 商品单位
+
+
+
+
-
-
-
+
+
+ 是否上架
+
+
+ 上架
+ 下架
+
-
-
- 国标码
+
+
+
+
+
+
+ 外部编码
+
+
-
-
-
+ 国标码
+
+
+
-
-
- 税率
+
+
+ 税率
+
+
-
-
-
+
+
+ 保质期天
+
+
-
-
- 保质期天
+
+
+
+
+
+
+ 商品排序
+
+
-
-
-
+
+
+ 商品备注
+
+
+
-
-
- 商品详细说明
+
+
+ 商品详细说明
+
+
-
-
-
+
+
+
+
+
+
+ 商品描述
+
+
+
-
-
- 商品描述
+
+
+ 商品通用规格参数
+
+
-
-
-
+
+
+
+
+
+
+ 商品特有规格参数
+
+
+
-
-
-
- 规格列表添加
+
+
+
+
+
+
+ 编辑
-
-
-
-
-
- 编辑
-
-
-
-
-
-
-
-
-
-
-
-
- 查看
- 编辑
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看
+ 编辑
+
+
+
-
+
+
+
-
-
- 规格代码
-
-
-
-
-
-
+
+
+ 规格代码
+
+
-
-
- 规格标题
+
+
+ 商品标题
+
+
-
-
-
-
+
+
+ 外部编码
+
+
-
-
- 外部编码
+
+
+
+
+
+
+ 特有规格属性
+
+
-
-
-
-
+
+
+
+
+
+
+ 特有规格参数
+
+
+
@@ -262,184 +350,179 @@
-
-
+
+
-
-
- 最后采购价
-
-
-
-
- {{itemInfo.finalPurchasePrice}}
-
-
-
-
- 安全库存天数
-
-
-
-
- {{itemInfo.safetyStockDays}}
+
+
+ 最后采购价
+
+ {{itemInfo.finalPurchasePrice}}
-
-
- 是否原厂
+
+
+ 安全库存天数
+
+ {{itemInfo.safetyStockDays}}
-
-
- {{itemInfo.isOriginalFactory}}
+
+
+ 是否原厂
+
+
+ 是
+ 否
+
+
-
-
- 是否库存警戒
-
-
-
-
- {{itemInfo.isInventoryAlert}}
-
-
-
-
- 库存警戒上线
-
-
-
-
- {{itemInfo.inventoryAlertUpperLimit}}
+
+
+ 是否库存警戒
+
+
+ 是
+ 否
+
-
-
- 库存警戒下线
+
+
+ 库存警戒上线
+
+ {{itemInfo.inventoryAlertUpperLimit}}
-
-
- {{itemInfo.inventoryAlertLowerLimit}}
+
+
+ 库存警戒下线
+
+ {{itemInfo.inventoryAlertLowerLimit}}
+
-
-
- 成本价
-
-
-
-
- {{itemInfo.costPrice}}
-
-
-
-
- 吊牌价
-
-
-
-
- {{itemInfo.tagPrice}}
+
+
+ 成本价
+
+ {{itemInfo.costPrice}}
-
-
- 销售单价
+
+
+ 吊牌价
+
+ {{itemInfo.tagPrice}}
-
-
- {{itemInfo.salesPrice}}
+
+
+ 销售单价
+
+ {{itemInfo.salesPrice}}
+
+
-
-
- 标准进价
-
-
-
-
- {{itemInfo.standardPurchasePrice}}
-
-
-
-
- 代理价
-
-
-
-
- {{itemInfo.agencyPrice}}
+
+
+ 标准进价
+
+ {{itemInfo.standardPurchasePrice}}
-
-
- 折扣
+
+
+ 代理价
+
+ {{itemInfo.agencyPrice}}
-
-
- {{itemInfo.discount}}
+
+
+ 折扣
+
+ {{itemInfo.discount}}
+
+
-
-
- 最低零售价
+
+
+ 最低零售价
+
+ {{itemInfo.minimumSalesPrice}}
-
-
- {{itemInfo.minimumSalesPrice}}
+
+
+ 是否积分兑换
+
+
+ 是
+ 否
+
-
-
- 是否积分兑换
+
+
+ 积分数量
+
+ {{itemInfo.integralAmount}}
-
-
- {{itemInfo.isIntegralExchange}}
+
+
+
+
+
+
+ 锁定销售价格
+
+
+ 是
+ 否
+
-
-
- 积分数量
+
+
+ 排序
+
+ {{itemInfo.sortNo}}
-
-
- {{itemInfo.integralAmount}}
+
+
+ 备注
+
+ {{itemInfo.remarks}}
+
-
-
- 规格图片
-
-
-
-
+
+ 规格图片
+
-
+
-
-
+
+
-
-
- 最后采购价
-
-
-
-
-
-
-
-
-
-
- 安全库存天数
-
-
-
-
-
-
+
+
+ 最后采购价
+
+
-
-
- 是否原厂
+
+
+ 安全库存天数
+
+
-
-
-
-
+
+
+ 是否原厂
+
+
+ 是
+ 否
+
+
-
-
- 是否库存警戒
-
-
-
-
-
-
-
-
-
-
- 库存警戒上线
-
-
-
-
-
-
+
+
+ 是否库存警戒
+
+
+ 是
+ 否
+
-
-
- 库存警戒下线
+
+
+ 库存警戒上线
+
+
-
-
-
-
+
+
+ 库存警戒下线
+
+
+
-
-
- 成本价
-
-
-
-
-
-
-
-
-
-
- 吊牌价
-
-
-
-
-
-
+
+
+ 成本价
+
+
-
-
- 销售单价
+
+
+ 吊牌价
+
+
-
-
-
-
+
+
+ 销售单价
+
+
+
-
-
- 标准进价
-
-
-
-
-
-
-
-
-
-
- 代理价
-
-
-
-
-
-
+
+
+ 标准进价
+
+
-
-
- 折扣
+
+
+ 代理价
+
+
-
-
-
-
+
+
+ 折扣
+
+
+
-
-
- 最低零售价
-
-
-
-
-
-
+
+
+ 最低零售价
+
+
-
-
- 是否积分兑换
+
+
+ 是否积分兑换
+
+
+ 是
+ 否
+
-
-
-
-
+
+
+ 积分数量
+
+
-
-
- 积分数量
+
+
+
+
+
+
+ 锁定销售价格
+
+
+ 是
+ 否
+
-
-
-
-
+
+
+
+ 排序
+
+
-
-
-
-
- 规格图片
+
+ 备注
+
+
-
-
-
-
+
+
+
+ 规格图片
+
+
-
确 定
-
-
@@ -737,6 +751,7 @@
import req2 from '@/api/goods/brand.js'
import req3 from '@/api/goods/category.js'
import req4 from '@/api/goods/factory.js'
+ import req5 from '@/api/goods/unit.js'
import uploadImg from '@/components/uploadFile/uploadImg'
export default {
components: {
@@ -771,6 +786,7 @@
brandList: [],
cateList: [],
facturerList: [],
+ unitNameList: [],
hideUploadBtn: false,
dialogVisible: false,
dialogVisible2: false,
@@ -793,16 +809,15 @@
req4.getAllFacturer().then(resp => {
this.facturerList = resp.data
})
+ req5.getAllUnit().then(resp => {
+ this.unitNameList = resp.data
+ })
},
backData(value) {
console.log('backData》》》》', value)
console.log('imgList', this.imgList)
- if (this.imgList.length > 0) {
- this.formobj.picUrl = this.imgList[0].url
- } else {
- this.formobj.picUrl = ''
- }
+ this.itemInfo.urls = this.imgList
this.hideUploadBtn = this.imgList.length != 0
console.log('this.hideUploadBtn', this.hideUploadBtn)
@@ -890,6 +905,12 @@
this.formobj.manufacturerSid = choose[0].sid
this.formobj.manufacturerName = choose[0].manufacturerName
},
+ selectunitNameChange(val) {
+ const choose = this.unitNameList.filter((item) => item.sid == val)
+ console.log('>>>>>>>>>selectunitNameChange', choose)
+ this.formobj.goodsUnitSid = choose[0].sid
+ this.formobj.goodsUnitName = choose[0].unitName
+ },
editGoodsSku(goodsSku) {
console.log('>>>>>>>>>editGoodsSku', goodsSku)
this.orderInfo = goodsSku
@@ -922,7 +943,7 @@
},
saveGoodsSku() {
- console.log('>>>>>>>>>saveGoodsSkuDttail', this.orderInfo)
+ console.log('>>>>>>>>>saveGoodsSkuDttail', this.orderInfo)
if (this.orderInfo.sid == '') {
this.orderInfo.sid = require('uuid').v1()
@@ -991,7 +1012,7 @@
addGoodsSku() {
this.dialogVisible3 = true
this.orderInfo = {
- sid:''
+ sid: ''
}
}
@@ -999,103 +1020,29 @@
}
}
-
diff --git a/yxt-as-ui/src/views/goods/goods/goodsInfo.vue b/yxt-as-ui/src/views/goods/goods/goodsInfo.vue
index cb54f3debc..15ec78ebf9 100644
--- a/yxt-as-ui/src/views/goods/goods/goodsInfo.vue
+++ b/yxt-as-ui/src/views/goods/goods/goodsInfo.vue
@@ -6,7 +6,6 @@
商品信息
- 保存
关闭
@@ -15,648 +14,432 @@
-
-
+
+
-
-
- 商品名称
-
-
-
-
-
-
-
-
-
- 商品编码
+
+
+ 商品名称
+
+ {{formobj.goodsName}}
-
-
-
+
+
+ 商品简称
+
+ {{formobj.goodsShortName}}
+
-
-
- 商品品牌
+
+
+ 商品副标题
+
+ {{formobj.subTitle}}
-
-
-
-
-
+
+
+ 商品拼音缩写
+
+ {{formobj.goodsPY}}
-
-
- 商品类别
+
+
+
+
+
+
+ 商品编码
+
+ {{formobj.goodsCode}}
-
-
-
-
-
+
+
+ 商品条形码
+
+ {{formobj.barCode}}
+
-
-
- 商品厂家
+
+
+ 商品品牌
+
+ {{formobj.brandName}}
-
-
-
-
-
+
+
+ 商品类别
+
+ {{formobj.typeName}}
-
-
- 厂家货号
+
+
+
+
+
+
+ 商品厂家
+
+ {{formobj.manufacturerName}}
-
-
-
+
+
+ 厂家货号
+
+ {{formobj.factoryCode}}
+
-
-
- 外部编码
+
+
+ 商品单位
+
+ {{formobj.goodsUnitName}}
-
-
-
+
+
+ 是否上架
+
+
+ 上架
+ 下架
+
-
-
- 国标码
+
+
+
+
+
+
+ 外部编码
+
+ {{formobj.externalCode}}
-
-
-
+
+
+ 国标码
+
+ {{formobj.nationalStandardCode}}
+
-
-
- 税率
+
+
+ 税率
+
+ {{formobj.taxRate}}
-
-
-
+
+
+ 保质期天
+
+ {{formobj.shelfLife}}
-
-
- 保质期天
+
+
+
+
+
+
+ 商品排序
+
+ {{formobj.sortNo}}
-
-
-
+
+
+ 商品备注
+
+ {{formobj.remarks}}
+
-
-
- 商品详细说明
+
+
+ 商品详细说明
+
+ {{formobj.baseGoodsSpuDetail.goodsExplain}}
-
-
-
+
+
+
+
+
+
+ 商品描述
+
+ {{formobj.baseGoodsSpuDetail.goodsDescription}}
+
-
-
- 商品描述
+
+
+ 商品通用规格参数
+
+ {{formobj.baseGoodsSpuDetail.genericSpec}}
-
-
-
+
+
+
+
+
+
+ 商品特有规格参数
+
+ {{formobj.baseGoodsSpuDetail.specialSpec}}
+
-
-
-
- 规格列表添加
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查看
- 编辑
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ 查看
+
+
+
-
-
+
+
-
-
- 最后采购价
-
-
-
-
- {{itemInfo.finalPurchasePrice}}
-
-
-
-
- 安全库存天数
-
-
-
-
- {{itemInfo.safetyStockDays}}
-
-
-
-
- 是否原厂
-
-
-
-
- {{itemInfo.isOriginalFactory}}
-
-
-
-
-
-
- 是否库存警戒
-
-
-
-
- {{itemInfo.isInventoryAlert}}
-
-
-
-
- 库存警戒上线
+
+ 最后采购价
+
+ {{itemInfo.finalPurchasePrice}}
-
-
- {{itemInfo.inventoryAlertUpperLimit}}
-
-
-
-
- 库存警戒下线
-
-
-
-
- {{itemInfo.inventoryAlertLowerLimit}}
-
-
-
-
-
-
- 成本价
+
+ 安全库存天数
+
+ {{itemInfo.safetyStockDays}}
-
-
- {{itemInfo.costPrice}}
-
-
-
-
- 吊牌价
-
-
-
-
- {{itemInfo.tagPrice}}
-
-
-
-
- 销售单价
-
-
-
-
- {{itemInfo.salesPrice}}
+
+
+ 是否原厂
+
+
+ 是
+ 否
+
+
-
-
- 标准进价
-
-
-
-
- {{itemInfo.standardPurchasePrice}}
-
-
-
-
- 代理价
-
-
-
-
- {{itemInfo.agencyPrice}}
+
+
+ 是否库存警戒
+
+
+ 是
+ 否
+
-
-
- 折扣
+
+
+ 库存警戒上线
+
+ {{itemInfo.inventoryAlertUpperLimit}}
-
-
- {{itemInfo.discount}}
+
+
+ 库存警戒下线
+
+ {{itemInfo.inventoryAlertLowerLimit}}
+
+
-
-
- 最低零售价
-
-
-
-
- {{itemInfo.minimumSalesPrice}}
-
-
-
-
- 是否积分兑换
-
-
-
-
- {{itemInfo.isIntegralExchange}}
-
-
-
-
- 积分数量
-
-
-
-
- {{itemInfo.integralAmount}}
+
+
+ 成本价
+
+ {{itemInfo.costPrice}}
-
-
-
-
- 规格图片
+
+ 吊牌价
+
+ {{itemInfo.tagPrice}}
-
-
-
-
-
-
-
-
-
-
+
+
+ 销售单价
+
+ {{itemInfo.salesPrice}}
-
-
-
- 关 闭
-
-
-
-
-
-
-
-
-
-
- 最后采购价
-
-
-
-
- {{itemInfo.finalPurchasePrice}}
-
-
-
-
- 安全库存天数
-
-
-
-
- {{itemInfo.safetyStockDays}}
-
-
-
-
- 是否原厂
-
-
-
-
- {{itemInfo.isOriginalFactory}}
-
-
-
-
- 是否库存警戒
-
-
-
-
- {{itemInfo.isInventoryAlert}}
-
-
-
-
- 库存警戒上线
-
-
-
-
- {{itemInfo.inventoryAlertUpperLimit}}
-
-
-
-
- 库存警戒下线
-
-
-
-
- {{itemInfo.inventoryAlertLowerLimit}}
-
-
-
-
-
-
- 成本价
-
-
-
-
- {{itemInfo.costPrice}}
-
-
-
-
- 吊牌价
+
+ 标准进价
+
+ {{itemInfo.standardPurchasePrice}}
-
-
- {{itemInfo.tagPrice}}
-
-
-
-
- 销售单价
+
+
+ 代理价
+
+ {{itemInfo.agencyPrice}}
-
-
- {{itemInfo.salesPrice}}
+
+
+ 折扣
+
+ {{itemInfo.discount}}
+
-
-
- 标准进价
-
-
-
-
- {{itemInfo.standardPurchasePrice}}
-
-
-
-
- 代理价
-
-
-
-
- {{itemInfo.agencyPrice}}
+
+
+ 最低零售价
+
+ {{itemInfo.minimumSalesPrice}}
-
-
- 折扣
+
+
+ 是否积分兑换
+
+
+ 是
+ 否
+
-
-
- {{itemInfo.discount}}
+
+
+ 积分数量
+
+ {{itemInfo.integralAmount}}
+
+
-
-
- 最低零售价
-
-
-
-
- {{itemInfo.minimumSalesPrice}}
-
-
-
-
- 是否积分兑换
-
-
-
-
- {{itemInfo.isIntegralExchange}}
+
+
+ 锁定销售价格
+
+
+ 是
+ 否
+
-
-
- 积分数量
+
+
+ 排序
+
+ {{itemInfo.sortNo}}
-
-
- {{itemInfo.integralAmount}}
+
+
+ 备注
+
+ {{itemInfo.remarks}}
+
-
-
- 规格图片
-
-
-
-
-
-
+
+ 规格图片
+
+
+
+
+
+
+
+
+
-
-
- 确 定
+ 关 闭
-
-
@@ -664,14 +447,7 @@
-
diff --git a/yxt-as-ui/src/views/goods/goods/index.vue b/yxt-as-ui/src/views/goods/goods/index.vue
index ffd2d1adcb..a1d9415088 100644
--- a/yxt-as-ui/src/views/goods/goods/index.vue
+++ b/yxt-as-ui/src/views/goods/goods/index.vue
@@ -67,7 +67,7 @@
-
+
@@ -230,8 +230,8 @@
this.$router.go(-1)
},
toRelevancy(row) {
- this.viewState = 3
- this.$refs['divadd'].showEdit(row)
+ this.viewState = 4
+ this.$refs['divinfo'].showEdit(row)
},
toRelevancyInfo(row) {
const tip = '请确认是否删除所选品牌?'
From a49a2a4358737c68d146e5a3e93f7613c1fe1cc4 Mon Sep 17 00:00:00 2001
From: guoxing <1369478551@qq.com>
Date: Wed, 8 May 2024 14:35:07 +0800
Subject: [PATCH 2/4] 1
---
yxt-as-ui/src/views/goods/brands/brandsAdd.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yxt-as-ui/src/views/goods/brands/brandsAdd.vue b/yxt-as-ui/src/views/goods/brands/brandsAdd.vue
index 79f461d2c9..526e4c6beb 100644
--- a/yxt-as-ui/src/views/goods/brands/brandsAdd.vue
+++ b/yxt-as-ui/src/views/goods/brands/brandsAdd.vue
@@ -3,7 +3,7 @@