From 05be7640b5a94e0838a2aa3a204ff387da47c672 Mon Sep 17 00:00:00 2001
From: 15820893422 <1978476055@qq.com>
Date: Thu, 11 Apr 2024 20:03:26 +0800
Subject: [PATCH] add
---
.env.development | 4 +-
src/api/product.js | 6 +
src/views/product/Reviews/index.vue | 83 ++++++++++-
src/views/product/addProduct/index.vue | 93 ++++++++----
src/views/product/productList/editAttr.vue | 140 +++++++++++++++++--
src/views/product/productList/proDetails.vue | 18 +++
6 files changed, 309 insertions(+), 35 deletions(-)
diff --git a/.env.development b/.env.development
index fb66c88..bddf448 100644
--- a/.env.development
+++ b/.env.development
@@ -2,11 +2,11 @@
ENV = 'development'
# base api
-VUE_APP_BASE_API = 'http://192.168.1.199:8080'
+VUE_APP_BASE_API = 'http://192.168.1.131:8080'
# VUE_APP_BASE_API = 'https://plus.hwms.shop'
# socket 连接地址
-VUE_APP_WS_URL = 'ws://192.168.1.199:8080'
+VUE_APP_WS_URL = 'ws://192.168.1.131:8080'
# VUE_APP_WS_URL = 'ws://plus.hwms.shop'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
diff --git a/src/api/product.js b/src/api/product.js
index 996c156..5f658f5 100644
--- a/src/api/product.js
+++ b/src/api/product.js
@@ -39,6 +39,12 @@ export function storeCategoryDeleteApi(id) {
export function storeCategoryStatusApi(id, status) {
return request.post(`store/category/status/${id}`, { status })
}
+/**
+ * @description 导出订单
+ */
+export function exportReplytApi(data) {
+ return request.get(`store/reply/export`, data)
+}
/**
* @description 属性规则 -- 列表
*/
diff --git a/src/views/product/Reviews/index.vue b/src/views/product/Reviews/index.vue
index 1683757..06fa616 100644
--- a/src/views/product/Reviews/index.vue
+++ b/src/views/product/Reviews/index.vue
@@ -32,6 +32,54 @@
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 导出列表
// +----------------------------------------------------------------------
-import { reviewLstApi, reviewReplyApi, reviewsSort ,destoryApi} from '@/api/product'
+import { exportReplytApi,reviewLstApi, reviewReplyApi, reviewsSort ,destoryApi} from '@/api/product'
import timeOptions from '@/utils/timeOptions';
+import createWorkBook from '@/utils/newToExcel.js'
export default {
data() {
return {
@@ -216,6 +266,13 @@ export default {
{ value: 1, label: '已回复' },
{ value: 0, label: '未回复' }
],
+ productScoreList: [
+ { value: 1, label: '1' },
+ { value: 2, label: '2' },
+ { value: 3, label: '3' },
+ { value: 4, label: '4' },
+ { value: 5, label: '5' }
+ ],
orderDatalist: null
}
},
@@ -223,6 +280,30 @@ export default {
this.getList(1)
},
methods: {
+ async exports() {
+ let excelData = JSON.parse(JSON.stringify(this.tableFrom)), data = []
+ excelData.page = 1
+ let pageCount = 1
+ let lebData = {};
+ for (let i = 0; i < pageCount; i++) {
+ lebData = await this.downData(excelData)
+ pageCount = Math.ceil(lebData.count/excelData.limit)
+ if (lebData.export.length) {
+ data = data.concat(lebData.export)
+ excelData.page++
+ }
+ }
+ createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename);
+ return
+ },
+ /**订单列表 */
+ downData(excelData) {
+ return new Promise((resolve, reject) => {
+ exportReplytApi(excelData).then((res) => {
+ return resolve(res.data)
+ })
+ })
+ },
/**重置 */
searchReset(){
this.timeVal = []
diff --git a/src/views/product/addProduct/index.vue b/src/views/product/addProduct/index.vue
index 2ce43a3..14ac03d 100644
--- a/src/views/product/addProduct/index.vue
+++ b/src/views/product/addProduct/index.vue
@@ -50,6 +50,8 @@
@@ -1134,7 +1137,7 @@
-
+
@@ -1412,7 +1415,7 @@
type="number"
size="small"
class="priceBox"
- :disabled="formThead[iii].title === '成本价'"
+ :disabled="formThead[iii].title === '成本价'||formThead[iii].title === '占比'||formThead[iii].title === '成长值'"
controls-position="right"
/>
@@ -1568,7 +1571,7 @@
-
+
@@ -1632,12 +1635,12 @@
"
:span="24"
>
-
+
{
- item.response && this.formValidate.qualification[name].push({ ...item,url: res.data.src,type:item.raw.type});
+ item.response && arr.push({ ...item,url: item.response.data.src,type:item.raw.type})
})
+ this.formValidate.qualification[name] = arr
}
}
},
@@ -3333,7 +3346,7 @@ export default {
this.$set(item, 'inputVisible', true)
},
virtualbtn(id, type) {
- if (this.$route.params.id) {
+ if (this.virStatus) {
return this.$message.warning('商品类型不能切换!')
}
this.formValidate.audit_type = id
@@ -3391,6 +3404,8 @@ export default {
ot_price: null,
svip_price: null,
stock: null,
+ proportion:0.6,
+ growth:0,
bar_code: '',
weight: null,
volume: null,
@@ -3415,6 +3430,8 @@ export default {
bar_code: '',
weight: null,
volume: null,
+ proportion:0.6,
+ growth:0,
gist_url:''
}
}
@@ -3446,6 +3463,8 @@ export default {
},
// 批量添加
batchAdd() {
+ let attr = this.oneFormBatch[0]
+ if(+attr.ot_price{
+ return !(+item.ot_price{
+ return item.gist_url
+ })
+ if(!url) return this.$message.error("规格设置-多规格依据链接必选填写");
+ } else {
+ let attr = this.OneattrValue[0]
+ if(+attr.ot_price {
if (valid) {
this.currentTab = (Number(this.currentTab) + 1).toString();
@@ -3747,8 +3781,19 @@ export default {
this.$store.dispatch("settings/setEdit", false);
this.onChangeGroup();
if (this.formValidate.spec_type === 1) {
+ let mode = this.ManyAttrValue.every(item=>{
+ return !(+item.ot_price{
+ return item.gist_url
+ })
+ if(!url) return this.$message.error("规格设置-多规格依据链接必选填写");
this.formValidate.attrValue = this.ManyAttrValue;
} else {
+ let attr = this.OneattrValue[0]
+ if(+attr.ot_price
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
@@ -161,7 +220,7 @@
提交
-
+
-->
@@ -184,6 +243,7 @@ import {
freeTrialApi
} from '@/api/product'
import { roterPre } from "@/settings";
+import ueditorFrom from '@/components/ueditorFrom'
const defaultObj = {
store_name: '',
cate_id: '',
@@ -247,7 +307,7 @@ const objTitle = {
}
export default {
name: 'editAttr',
- components: {},
+ components: {ueditorFrom},
data() {
return {
product_id: '',
@@ -329,6 +389,59 @@ export default {
},
methods: {
+ handleRemove(i) {
+ this.formValidate.slider_image.splice(i, 1);
+ },
+ // 移动
+ handleDragStart(e, item) {
+ this.dragging = item;
+ },
+ handleDragEnd(e, item) {
+ this.dragging = null;
+ },
+ handleDragOver(e) {
+ e.dataTransfer.dropEffect = "move";
+ },
+ handleDragEnter(e, item) {
+ e.dataTransfer.effectAllowed = "move";
+ if (item === this.dragging) {
+ return;
+ }
+ const newItems = [...this.formValidate.slider_image];
+ const src = newItems.indexOf(this.dragging);
+ const dst = newItems.indexOf(item);
+ newItems.splice(dst, 0, ...newItems.splice(src, 1));
+ this.formValidate.slider_image = newItems;
+ },
+ // 点击商品图
+ modalPicTap(tit, num, i) {
+ const _this = this;
+ const attr = [];
+ this.$modalUpload(function(img) {
+ if (tit === "1" && !num) {
+ _this.formValidate.image = img[0];
+ _this.OneattrValue[0].image = img[0];
+ }
+ if (tit === "2" && !num) {
+ img.map(item => {
+ attr.push(item.attachment_src);
+ _this.formValidate.slider_image.push(item);
+ if (_this.formValidate.slider_image.length > 10) {
+ _this.formValidate.slider_image.length = 10;
+ }
+ });
+ }
+ if (tit === "1" && num === "dan") {
+ _this.OneattrValue[0].image = img[0];
+ }
+ if (tit === "1" && num === "duo") {
+ _this.ManyAttrValue[i].image = img[0];
+ }
+ if (tit === "1" && num === "pi") {
+ _this.oneFormBatch[0].image = img[0];
+ }
+ }, tit);
+ },
batchDel() {
this.oneFormBatch = [
{
@@ -471,7 +584,10 @@ export default {
attr: info.attr || [],
attrValue: info.attrValue,
mer_cate_id: info.mer_cate_id,
- spec_type: info.spec_type
+ spec_type: info.spec_type,
+ slider_image: info.slider_image,
+ content: info.content,
+ store_info: info.store_info
}
if (this.formValidate.spec_type === 0) {
this.OneattrValue = info.attrValue
@@ -540,11 +656,19 @@ export default {
.priceBox {
width: 80px;
}
+.btndel {
+ position: absolute;
+ z-index: 1;
+ width: 20px !important;
+ height: 20px !important;
+ left: 46px;
+ top: -4px;
+}
.pictrue {
- width: 50px;
- height: 50px;
+ width: 60px;
+ height: 60px;
border: 1px dotted rgba(0, 0, 0, 0.1);
- display: inline-block;
+ margin-right: 10px;
position: relative;
cursor: pointer;
img {
diff --git a/src/views/product/productList/proDetails.vue b/src/views/product/productList/proDetails.vue
index 080079e..9215ead 100644
--- a/src/views/product/productList/proDetails.vue
+++ b/src/views/product/productList/proDetails.vue
@@ -431,6 +431,24 @@
+
+ 生产许可证:
+
+
商标注册证: