diff --git a/src/api/merchant.js b/src/api/merchant.js index 6410fc7..5a391cc 100644 --- a/src/api/merchant.js +++ b/src/api/merchant.js @@ -228,6 +228,12 @@ export function updateStoreTypeApi(type, data) { export function merchantIsCloseApi(id, status) { return request.post(`system/merchant/close/${id}`, { status }) } +/** + * @description 商户列表 -- 退店开关 + */ +export function merchantIsLockApi(id, lock) { + return request.post(`system/merchant/lock/${id}`, { lock }) +} /** * @description 商户列表 -- 开启商户数 */ diff --git a/src/api/product.js b/src/api/product.js index bac1947..a50dced 100644 --- a/src/api/product.js +++ b/src/api/product.js @@ -157,6 +157,12 @@ export function categoryListApi(data) { export function exportProductApi(data) { return request.get(`store/product/export`, data) } +/** + * @description 导出用户操作记录 + */ +export function exportOperate(id = '0', data) { + return request.get(`store/product/export_operate/${id}`, data) +} /** * @description 商户分类 -- 列表 */ @@ -185,6 +191,12 @@ export function seckillProductDetailApi(id) { export function productStatusFirstApi(data) { return request.post(`store/product/status_first`, data) } +/** + * @description 商品审核 -- 初步审核 + */ +export function productStatusFirstTwoApi(data) { + return request.post(`store/product/status_first2`, data) +} /** * @description 商品审核 -- 二次审核 */ @@ -299,6 +311,18 @@ export function seckillChangeApi(id, status) { export function toVirtualSalesApi(id) { return request.get(`store/product/ficti/form/${id}`) } +/** + * @description 商品列表 -- 锁定/解锁 + */ +export function productLockApi(id) { + return request.get(`store/product/lock/form/${id}`) +} +/** + * @description 商品列表 -- 返回 + */ +export function productBackApi(id) { + return request.get(`store/product/back/form/${id}`) +} /** * @description 商品列表 -- 标记标记 */ @@ -491,6 +515,10 @@ export function productGetTempKeysApi() { export function batchesLabelsApi(data) { return request.post(`store/product/batch_labels`, data) } +/** 商品列表 -- 批量设置标记 */ +export function batchesTagNameApi(data) { + return request.post(`store/product/batch_tag_name`, data) +} /** 商品列表 -- 批量设置推荐 */ export function batchesRecommendApi(data) { return request.post(`store/product/batch_hot`, data) diff --git a/src/directive/el-drag-dialog/drag.js b/src/directive/el-drag-dialog/drag.js index 61550f2..14bcdc2 100644 --- a/src/directive/el-drag-dialog/drag.js +++ b/src/directive/el-drag-dialog/drag.js @@ -1,78 +1,83 @@ - +import { startDrag } from './drags.js' export default { bind(el, binding, vnode) { - const dialogHeaderEl = el.querySelector('.el-dialog__header') - const dragDom = el.querySelector('.el-dialog') - dialogHeaderEl.style.cssText += ';cursor:move;' - dragDom.style.cssText += ';top:0px;' + startDrag(el.querySelector('.el-dialog__header'), el.querySelector('.el-dialog'), binding.value); + // const dialogHeaderEl = el.querySelector('.el-dialog__header') + // var dialogBodyEl = '' + // const dragDom = el.querySelector('.el-dialog') + // dialogHeaderEl.style.cssText += ';cursor:move;' + // dragDom.style.cssText += ';top:0px;' - // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null); - const getStyle = (function () { - if (window.document.currentStyle) { - return (dom, attr) => dom.currentStyle[attr] - } else { - return (dom, attr) => getComputedStyle(dom, false)[attr] - } - })() + // // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null); + // const getStyle = (function () { + // if (window.document.currentStyle) { + // return (dom, attr) => dom.currentStyle[attr] + // } else { + // return (dom, attr) => getComputedStyle(dom, false)[attr] + // } + // })() - dialogHeaderEl.onmousedown = (e) => { - // 鼠标按下,计算当前元素距离可视区的距离 - const disX = e.clientX - dialogHeaderEl.offsetLeft - const disY = e.clientY - dialogHeaderEl.offsetTop + // dialogHeaderEl.onmousedown = (e) => { + // dialogBodyEl = el.querySelector('.el-dialog__body') + // dialogBodyEl.style.cssText += '-webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;' + // // 鼠标按下,计算当前元素距离可视区的距离 + // const disX = e.clientX - dialogHeaderEl.offsetLeft + // const disY = e.clientY - dialogHeaderEl.offsetTop - const dragDomWidth = dragDom.offsetWidth - const dragDomHeight = dragDom.offsetHeight + // const dragDomWidth = dragDom.offsetWidth + // const dragDomHeight = dragDom.offsetHeight - const screenWidth = document.body.clientWidth - const screenHeight = document.body.clientHeight + // const screenWidth = document.body.clientWidth + // const screenHeight = document.body.clientHeight - const minDragDomLeft = dragDom.offsetLeft - const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth + // const minDragDomLeft = dragDom.offsetLeft + // const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth - const minDragDomTop = dragDom.offsetTop - const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomHeight + // const minDragDomTop = dragDom.offsetTop + // const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomHeight - // 获取到的值带px 正则匹配替换 - let styL = getStyle(dragDom, 'left') - let styT = getStyle(dragDom, 'top') + // // 获取到的值带px 正则匹配替换 + // let styL = getStyle(dragDom, 'left') + // let styT = getStyle(dragDom, 'top') - if (styL.includes('%')) { - styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100) - styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100) - } else { - styL = +styL.replace(/\px/g, '') - styT = +styT.replace(/\px/g, '') - } + // if (styL.includes('%')) { + // styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100) + // styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100) + // } else { + // styL = +styL.replace(/\px/g, '') + // styT = +styT.replace(/\px/g, '') + // } - document.onmousemove = function (e) { - // 通过事件委托,计算移动的距离 - let left = e.clientX - disX - let top = e.clientY - disY + // document.onmousemove = function (e) { + // // 通过事件委托,计算移动的距离 + // let left = e.clientX - disX + // let top = e.clientY - disY - // 边界处理 - if (-(left) > minDragDomLeft) { - left = -minDragDomLeft - } else if (left > maxDragDomLeft) { - left = maxDragDomLeft - } + // // 边界处理 + // if (-(left) > minDragDomLeft) { + // left = -minDragDomLeft + // } else if (left > maxDragDomLeft) { + // left = maxDragDomLeft + // } - if (-(top) > minDragDomTop) { - top = -minDragDomTop - } else if (top > maxDragDomTop) { - top = maxDragDomTop - } + // if (-(top) > minDragDomTop) { + // top = -minDragDomTop + // } else if (top > maxDragDomTop) { + // top = maxDragDomTop + // } - // 移动当前元素 - dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;` + // // 移动当前元素 + // dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;` - // emit onDrag event - vnode.child.$emit('dragDialog') - } + // // emit onDrag event + // vnode.child.$emit('dragDialog') + // } - document.onmouseup = function (e) { - document.onmousemove = null - document.onmouseup = null - } - } + // document.onmouseup = function (e) { + // dialogBodyEl.style.cssText = '' + // document.onmousemove = null + // document.onmouseup = null + // } + // } } } diff --git a/src/directive/el-drag-dialog/drags.js b/src/directive/el-drag-dialog/drags.js new file mode 100644 index 0000000..27dac79 --- /dev/null +++ b/src/directive/el-drag-dialog/drags.js @@ -0,0 +1,106 @@ +/** + * 拖拽移动 + * @param {elementObjct} bar 鼠标点击控制拖拽的元素 + * @param {elementObjct} target 移动的元素 + * @param {function} callback 移动后的回调 + */ +export function startDrag(bar, target, callback) { + var params = { + top: 0, + left: 0, + currentX: 0, + currentY: 0, + flag: false, + cWidth: 0, + cHeight: 0, + tWidth: 0, + tHeight: 0 + }; + + // 给拖动块添加样式 + bar.style.cursor = 'move'; + + // 获取相关CSS属性 + // o是移动对象 + // var getCss = function (o, key) { + // return o.currentStyle ? o.currentStyle[key] : document.defaultView.getComputedStyle(o, false)[key]; + // }; + + bar.onmousedown = function (event) { + // 按下时初始化params + var e = event ? event : window.event; + params = { + top: target.offsetTop, + left: target.offsetLeft, + currentX: e.clientX, + currentY: e.clientY, + flag: true, + cWidth: document.body.clientWidth, + cHeight: document.body.clientHeight, + tWidth: target.offsetWidth, + tHeight: target.offsetHeight + }; + + // 给被拖动块初始化样式 + target.style.margin = 0; + target.style.top = params.top + 'px'; + target.style.left = params.left + 'px'; + + if (!event) { + // 防止IE文字选中 + bar.onselectstart = function () { + return false; + } + } + + document.onmousemove = function (event) { + // 防止文字选中 + window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty(); + + var e = event ? event : window.event; + if (params.flag) { + var nowX = e.clientX; + var nowY = e.clientY; + // 差异距离 + var disX = nowX - params.currentX; + var disY = nowY - params.currentY; + // 最终移动位置 + var zLeft = 0; + var zTop = 0; + + zLeft = parseInt(params.left) + disX; + // 限制X轴范围 + if (zLeft <= -parseInt(params.tWidth / 2)) { + zLeft = -parseInt(params.tWidth / 2); + } + if (zLeft >= params.cWidth - parseInt(params.tWidth * 0.5)) { + zLeft = params.cWidth - parseInt(params.tWidth * 0.5); + } + + zTop = parseInt(params.top) + disY; + // 限制Y轴范围 + if (zTop <= 0) { + zTop = 0; + } + if (zTop >= params.cHeight - parseInt(params.tHeight * 0.5)) { + zTop = params.cHeight - parseInt(params.tHeight * 0.5); + } + + // 执行移动 + target.style.left = zLeft + 'px'; + target.style.top = zTop + 'px'; + } + + if (typeof callback == "function") { + callback(zLeft, zTop); + } + } + + document.onmouseup = function () { + params.flag = false; + document.onmousemove = null; + document.onmouseup = null; + }; + }; +} + diff --git a/src/filters/commFilter.js b/src/filters/commFilter.js index bf39785..1000dbc 100644 --- a/src/filters/commFilter.js +++ b/src/filters/commFilter.js @@ -166,7 +166,7 @@ export function cancelOrderStatusFilter(status) { export function orderPayType(type) { const typeMap = { - '0': '消费券支付', + '0': '余额支付', '1': '微信支付', '2': '小程序', '3': '微信支付', diff --git a/src/router/modules/product.js b/src/router/modules/product.js index 7f40f05..40fd289 100644 --- a/src/router/modules/product.js +++ b/src/router/modules/product.js @@ -87,6 +87,15 @@ const productRouter = }, component: () => import('@/views/product/priceDescription/index.vue') }, + { + path: 'operate', + name: 'operate', + meta: { + title: '商品操作日志', + noCache: true + }, + component: () => import('@/views/product/operate/index.vue') + }, { path: 'band', name: 'ProductBand', diff --git a/src/views/accounts/receipt/index.vue b/src/views/accounts/receipt/index.vue index 6f5c4a8..bca4054 100644 --- a/src/views/accounts/receipt/index.vue +++ b/src/views/accounts/receipt/index.vue @@ -1,9 +1,19 @@ diff --git a/src/views/merchant/application/index.vue b/src/views/merchant/application/index.vue index 71936b3..a67fcc4 100644 --- a/src/views/merchant/application/index.vue +++ b/src/views/merchant/application/index.vue @@ -16,7 +16,7 @@ - + - - - + + + + 搜索 重置 diff --git a/src/views/merchant/list/index.vue b/src/views/merchant/list/index.vue index e3c680d..bfb8a96 100644 --- a/src/views/merchant/list/index.vue +++ b/src/views/merchant/list/index.vue @@ -1,7 +1,13 @@ - + diff --git a/src/views/order/list/index.vue b/src/views/order/list/index.vue index a9addd1..e628c45 100644 --- a/src/views/order/list/index.vue +++ b/src/views/order/list/index.vue @@ -105,7 +105,7 @@ class="selWidth" @change="getList(1),getCardList()" > - + diff --git a/src/views/order/refund/index.vue b/src/views/order/refund/index.vue index 1b1b3bf..b6ead9d 100644 --- a/src/views/order/refund/index.vue +++ b/src/views/order/refund/index.vue @@ -74,7 +74,7 @@ class="selWidth" @change="getList(1)" > - + diff --git a/src/views/product/operate/index.vue b/src/views/product/operate/index.vue new file mode 100644 index 0000000..e5ec665 --- /dev/null +++ b/src/views/product/operate/index.vue @@ -0,0 +1,237 @@ + + + + + diff --git a/src/views/product/productExamine/index.vue b/src/views/product/productExamine/index.vue index 90b845f..83c3409 100644 --- a/src/views/product/productExamine/index.vue +++ b/src/views/product/productExamine/index.vue @@ -1,35 +1,100 @@ - - + + +
- +
- - - + + + - + - + - +
- -
+ +
- - 备注:5星为最高推荐级别,1星为最低推荐级别,设置后会在商城商品列表、搜索商品列表中体现。 + + 备注:5星为最高推荐级别,1星为最低推荐级别,设置后会在商城商品列表、搜索商品列表中体现。 - - {{ item.name }} + + {{ item.name }} - + - + -
-
- - - -
-
-
-
- -
-
+
+
+ + + +
+
+
+
+
- +
+
+ - + - - 提交 + + 提交 - +
- +
- - - - - + + + - 取消 - 提交 + 取消 + 提交 @@ -362,8 +716,17 @@ > - - {{ item.name }} + + {{ item.name }} @@ -384,7 +747,6 @@ diff --git a/src/views/product/productExamine/info.vue b/src/views/product/productExamine/info.vue index 65c9ded..d69a2e5 100644 --- a/src/views/product/productExamine/info.vue +++ b/src/views/product/productExamine/info.vue @@ -2,75 +2,118 @@ -
- 店铺名称:{{ projectData.merchant&&projectData.merchant.mer_name }} - 入驻企业名称:{{ projectData.merchant&&projectData.merchant.ext.com&&projectData.merchant.ext.com.name }} - 店铺联系人: {{ projectData.merchant&&projectData.merchant.real_name }} - - 营业执照: -
- -
-
- - 联系人电话:{{ projectData.merchant&&projectData.merchant.service_phone }} - 上传拒绝原因:{{ projectData.refusal }} +
+ 店铺名称:{{ + projectData.merchant && projectData.merchant.mer_name + }} + 入驻企业名称:{{ + projectData.merchant && + projectData.merchant.ext.com && + projectData.merchant.ext.com.name + }} + 店铺联系人: + {{ projectData.merchant && projectData.merchant.real_name }} + + 营业执照: +
+ +
+
+ 联系人电话:{{ + projectData.merchant && projectData.merchant.service_phone + }} + 上传拒绝原因:{{ projectData.refusal }}
- 商品id:{{ projectData.product_id }} - 商品名称:{{ projectData.store_name }} - 平台分类:{{ projectData.storeCategory?projectData.storeCategory.cate_name:'' }} - - 商品关键字:{{ projectData.keyword }} - 商品单位:{{ projectData.unit_name }} - - 商品分类: - - - - - 商品简介:{{ projectData.store_info }} - 商品备注:{{ projectData.remark }} - 是否惠美乡村:{{ projectData.is_huimei?'是':'否' }} - - 商品封面图: -
- -
-
+ 商品id:{{ projectData.product_id }} + 商品名称:{{ projectData.store_name }} + 平台分类:{{ + projectData.storeCategory ? projectData.storeCategory.cate_name : "" + }} + + 商品关键字:{{ projectData.keyword }} + 商品单位:{{ projectData.unit_name }} + + 商品分类: + + - + + 商品简介:{{ projectData.store_info }} + 商品备注:{{ projectData.remark }} + 是否惠美乡村:{{ projectData.is_huimei ? "是" : "否" }} + + 商品封面图: +
+ +
+
- +
- 运费模板:{{ projectData.temp?projectData.temp.name:'' }} - 运费说明:{{ projectData.temp?projectData.temp.info:'' }} + 运费模板:{{ projectData.temp ? projectData.temp.name : "" }} + 运费说明:{{ projectData.temp ? projectData.temp.info : "" }} - + 主图视频: - + - 商品轮播图: + 商品轮播图:
@@ -84,239 +127,352 @@
- 商品名称: + 商品名称: - 国产 - 进口 + 国产 + 进口 -
- 生产企业名称:{{ qualification.production_name }} - -
生产营业执照:
-
-
- {{ item.name }} -
- +
+ 生产企业名称:{{ qualification.production_name }} + +
生产营业执照:
+
+
+ {{ item.name }} +
+ +
-
- - -
生产许可证:
-
-
- {{ item.name }} -
- + + +
生产许可证:
+
+
+ {{ item.name }} +
+ +
-
- - -
商标注册证:
-
-
- {{ item.name }} -
- + + +
商标注册证:
+
+
+ {{ item.name }} +
+ +
-
- - -
销售授权及品牌方营业执照:
-
-
- {{ item.name }} -
- + + +
销售授权及品牌方营业执照:
+
+
+ {{ item.name }} +
+ +
-
- - -
商品检测报告及备案:
-
-
- {{ item.name }} -
- + + +
商品检测报告及备案:
+
+
+ {{ item.name }} +
+ +
-
- - -
助农文件及其他资质:
-
-
- {{ item.name }} -
- + + +
助农文件及其他资质:
+
+
+ {{ item.name }} +
+ +
-
- -
-
- 进口/企业境内总代企业名称: {{ qualification.import_name }} - -
生产营业执照:
-
-
- {{ item.name }} -
- + +
+
+ 进口/企业境内总代企业名称: {{ qualification.import_name }} + +
生产营业执照:
+
+
+ {{ item.name }} +
+ +
-
- - -
销售授权及其他:
-
-
- {{ item.name }} -
- + + +
销售授权及其他:
+
+
+ {{ item.name }} +
+ +
-
- - -
海关检验检疫证书及报关单:
-
-
- {{ item.name }} -
- + + +
海关检验检疫证书及报关单:
+
+
+ {{ item.name }} +
+ +
-
- - -
产品外包装实物图:
-
-
- {{ item.name }} -
- + + +
产品外包装实物图:
+
+
+ {{ item.name }} +
+ +
-
- - -
其他资质:
-
-
- {{ item.name }} -
- + + +
其他资质:
+
+
+ {{ item.name }} +
+ +
-
- -
- + +
+ 商品详情: -
+
商品排序:{{ projectData.sort }} 商品推荐: - {{ item.name }} + {{ item.name }} - + 服务保障: - - {{index+1}}. {{item.value.guarantee_name}}; + + {{ index + 1 }}. {{ item.value.guarantee_name }}; - 商品规格:{{ projectData.spec_type === 0 ? '单规格' : '多规格' }} - 佣金设置:{{ projectData.extension_type === 0 ? '默认设置' : '单独设置' }} + 商品规格:{{ + projectData.spec_type === 0 ? "单规格" : "多规格" + }} + 佣金设置:{{ + projectData.extension_type === 0 ? "默认设置" : "单独设置" + }} 商品规格: - +