Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4357a18d
authored
Mar 22, 2022
by
wuwx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改创建商品时选择顺序体验性问题
1 parent
3f668448
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
195 additions
and
345 deletions
src/views/productGroup/editProduct.vue
src/views/productGroup/editProduct.vue
View file @
4357a18
...
...
@@ -5,24 +5,12 @@
<el-tab-pane
label=
"基本信息"
name=
"basicInfo"
></el-tab-pane>
<el-tab-pane
label=
"评价信息"
name=
"afterOrder"
></el-tab-pane>
</el-tabs>
<div
v-show=
"
(routeInfo.addOrEdit == '1')
|| (['2', '3'].includes(routeInfo.addOrEdit + '') && activeName == 'basicInfo')"
class=
"container edit-container"
>
<div
v-show=
"
routeInfo.addOrEdit == '1'
|| (['2', '3'].includes(routeInfo.addOrEdit + '') && activeName == 'basicInfo')"
class=
"container edit-container"
>
<div
class=
"flex"
>
<div
class=
"home-set-form flex-grow"
>
<div
v-for=
"(item, index) in externalFormList"
:key=
"index"
>
<p
class=
"edit-title"
>
{{
item
.
title
}}
</p>
<glsx-combi-form
class=
"edit-form-container m-b-60"
ref=
"editFormRef"
:labelWidth=
"labelWidth"
:isEdit=
"isEdit"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"item.editChildRef"
:formObj=
"editForm"
:formData=
"item.editFormData"
:formRules=
"item.editRule"
@
handleImgDelete=
"handleFormImgDelete"
>
<glsx-combi-form
class=
"edit-form-container m-b-60"
ref=
"editFormRef"
:labelWidth=
"labelWidth"
:isEdit=
"isEdit"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"item.editChildRef"
:formObj=
"editForm"
:formData=
"item.editFormData"
:formRules=
"item.editRule"
@
handleImgDelete=
"handleFormImgDelete"
>
<template
slot=
"businessType"
slot-scope=
"scope"
>
<el-checkbox-group
v-model=
"editForm.businessType"
>
<el-checkbox
:disabled=
"routeInfo.addOrEdit == 3"
v-for=
"value in scope.scope.businessTypeList"
:key=
"value.businessType"
:label=
"value.businessType"
>
{{
value
.
businessTypeName
}}
</el-checkbox>
...
...
@@ -45,48 +33,25 @@
<p
class=
"edit-tips"
>
格式建议mp4,大小不超过50M
</p>
</
template
>
<div
:style=
"{ 'margin-left': labelWidth }"
slot=
"descImgs"
slot-scope=
"scope"
>
<div
v-for=
"(subItem, subIndex) in editForm[scope.scope.name]"
:key=
"subIndex"
class=
"flex"
>
<div
v-for=
"(subItem, subIndex) in editForm[scope.scope.name]"
:key=
"subIndex"
class=
"flex"
>
<!-- 上传图片 -->
<div
class=
"banner-upload-box"
>
<div
class=
"p-t-12"
>
<div
class=
"flex"
>
<div
v-show=
"!subItem.content"
class=
"activity-img img-w-h"
style=
"margin-bottom: 11px;"
>
<div
v-show=
"!subItem.content"
class=
"activity-img img-w-h"
style=
"margin-bottom: 11px;"
>
<div
class=
"add"
>
+
</div>
<span
class=
"number"
>
上传
</span>
<input
type=
"file"
style=
"opacity: 0;"
ref=
"file"
class=
"activity-img img-w-h"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
@
change=
"e => handleImgChange(e, subIndex)"
/>
<input
type=
"file"
style=
"opacity: 0;"
ref=
"file"
class=
"activity-img img-w-h"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
@
change=
"e => handleImgChange(e, subIndex)"
/>
</div>
<div
v-show=
"!subItem.content"
>
<el-button
type=
"text"
class=
"el-icon-delete"
@
click=
"handleEmptyDelete(subIndex)"
></el-button>
<el-button
type=
"text"
class=
"el-icon-delete"
@
click=
"handleEmptyDelete(subIndex)"
></el-button>
</div>
</div>
<span
v-show=
"subItem.content"
class=
"muti-imgs"
>
<img
class=
"img-w-h"
:src=
"subItem.content"
/>
<span
class=
"img-btns"
>
<span
class=
"btn-item"
>
<i
v-if=
"!isDisabled"
class=
"el-icon-delete"
@
click=
"handleImgDelete(scope.scope.name, subIndex)"
></i>
<i
v-if=
"!isDisabled"
class=
"el-icon-delete"
@
click=
"handleImgDelete(scope.scope.name, subIndex)"
></i>
<i
class=
"el-icon-zoom-in"
@
click=
"handleImgLook(subItem.content)"
></i>
</span>
</span>
...
...
@@ -97,41 +62,41 @@
</div>
</div>
<
template
slot=
"association"
>
<el-button
type=
"default"
@
click=
"dialogTableVisible = true"
v-if=
"routeInfo.addOrEdit !== 3"
>
+选择
</el-button>
<glsx-dialog
title=
"选择优惠券"
:isVisible
.
sync=
"dialogTableVisible"
width=
"50%"
@
confirmDialog=
"associationConfirm"
@
closeDialog=
"associationCancel"
>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData"
>
<span
slot=
"footer"
class=
"footer-btns"
>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</span>
</glsx-combi-form>
<GLTable
ref=
"coupon"
:hasNum=
"false"
:getListApi=
"getListApi"
:searchForm=
"associationTableSearchForm"
:tableParams=
"associationTableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"associationBeforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"association"
slot-scope=
"scope"
class=
"association"
>
<el-radio
:label=
"scope.scope.id"
v-model=
"radio"
@
change
.
native=
"getCurrentRow()"
></el-radio>
</div>
</GLTable>
<!-- 表格区域 end -->
<!--
<div
class=
"associationBtn"
>
<el-button
type=
"default"
@
click=
"dialogTableVisible = true"
v-if=
"routeInfo.addOrEdit !== 3"
>
+选择
</el-button>
<glsx-dialog
title=
"选择优惠券"
:isVisible
.
sync=
"dialogTableVisible"
width=
"50%"
@
confirmDialog=
"associationConfirm"
@
closeDialog=
"associationCancel"
>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData"
>
<span
slot=
"footer"
class=
"footer-btns"
>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</span>
</glsx-combi-form>
<GLTable
ref=
"coupon"
:hasNum=
"false"
:getListApi=
"getListApi"
:searchForm=
"associationTableSearchForm"
:tableParams=
"associationTableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"associationBeforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"association"
slot-scope=
"scope"
class=
"association"
>
<el-radio
:label=
"scope.scope.id"
v-model=
"radio"
@
change
.
native=
"getCurrentRow()"
></el-radio>
</div>
</GLTable>
<!-- 表格区域 end -->
<!--
<div
class=
"associationBtn"
>
<el-button
type=
"primary"
@
click=
"associationConfirm"
>
确定
</el-button>
<el-button
type=
"default"
@
click=
"associationCancel"
>
取消
</el-button>
</div>
-->
</glsx-dialog>
<div
class=
"association-X"
v-if=
"editForm.relatedCouponId"
>
<div
class=
"associationRow"
>
<span
class=
"associationLists"
>
名称
</span>
<span
class=
"associationLists"
>
优惠卷类型
</span>
<span
class=
"associationLists"
>
使用途径
</span>
<span
class=
"associationLists"
v-if=
"routeInfo.addOrEdit !== 3"
>
操作
</span>
</div>
<div
class=
"associationRow"
style=
"background:white;"
>
<el-tooltip
effect=
"dark"
:content=
"editForm.relatedCouponName"
placement=
"bottom"
>
<span
class=
"associationLists-X"
>
{{
editForm
.
relatedCouponName
}}
</span>
</el-tooltip>
<span
class=
"associationLists-X"
>
{{
editForm
.
relatedDiscountType
}}
</span>
<span
class=
"associationLists-X"
>
{{
editForm
.
relatedUseChannel
}}
</span>
<span
class=
"associationLists"
v-if=
"routeInfo.addOrEdit !== 3"
><el-button
type=
"text"
@
click=
"del()"
>
删除
</el-button></span>
</div>
</div>
</glsx-dialog>
<div
class=
"association-X"
v-if=
"editForm.relatedCouponId"
>
<div
class=
"associationRow"
>
<span
class=
"associationLists"
>
名称
</span>
<span
class=
"associationLists"
>
优惠卷类型
</span>
<span
class=
"associationLists"
>
使用途径
</span>
<span
class=
"associationLists"
v-if=
"routeInfo.addOrEdit !== 3"
>
操作
</span>
</div>
<div
class=
"associationRow"
style=
"background:white;"
>
<el-tooltip
effect=
"dark"
:content=
"editForm.relatedCouponName"
placement=
"bottom"
>
<span
class=
"associationLists-X"
>
{{
editForm
.
relatedCouponName
}}
</span>
</el-tooltip>
<span
class=
"associationLists-X"
>
{{
editForm
.
relatedDiscountType
}}
</span>
<span
class=
"associationLists-X"
>
{{
editForm
.
relatedUseChannel
}}
</span>
<span
class=
"associationLists"
v-if=
"routeInfo.addOrEdit !== 3"
><el-button
type=
"text"
@
click=
"del()"
>
删除
</el-button></span>
</div>
</div>
</
template
>
<
template
slot=
"proSpecsBtn"
>
<el-button
:disabled=
"isDisabled"
type=
"default"
@
click=
"handleSpecsEdit(1)"
>
+添加规格项目
</el-button>
...
...
@@ -142,27 +107,15 @@
<span
class=
"specs-title"
>
规格名:
</span>
<span
class=
"specs-item"
>
{{ subItem.specificationName }}
</span>
<div
style=
"position: absolute; right: 10px; top: 10px;"
>
<el-button
v-show=
"!isDisabled"
type=
"text"
@
click=
"handleSpecsEdit(2, subItem, subIndex)"
>
编辑
</el-button>
<el-button
v-show=
"!isDisabled"
type=
"text"
@
click=
"handleSpecsDelete(subIndex)"
>
删除
</el-button>
<el-button
v-show=
"!isDisabled"
type=
"text"
@
click=
"handleSpecsEdit(2, subItem, subIndex)"
>
编辑
</el-button>
<el-button
v-show=
"!isDisabled"
type=
"text"
@
click=
"handleSpecsDelete(subIndex)"
>
删除
</el-button>
</div>
</div>
<div
class=
"flex"
>
<span
style=
"width: 56px;"
>
规格值:
</span>
<div
style=
"width: calc(100% - 56px);"
>
<div>
<span
class=
"specs-item"
v-for=
"(n, idx) in subItem.specificationValueList"
:key=
"idx"
>
{{ n.specificationValue }}
</span>
<span
class=
"specs-item"
v-for=
"(n, idx) in subItem.specificationValueList"
:key=
"idx"
>
{{ n.specificationValue }}
</span>
</div>
</div>
</div>
...
...
@@ -174,11 +127,7 @@
<table
class=
"table-spesc"
>
<tbody>
<tr
style=
"padding: 17px 0; background: #F4F6FC; box-shadow: 0px 1px 5px 0px rgba(38, 38, 38, 0.1);"
>
<td
:style=
"{ width: specsWidth }"
v-for=
"(subItem, subIndex) in specificationDetailList"
:key=
"subIndex"
>
{{ subItem.specificationName }}
</td>
<td
:style=
"{ width: specsWidth }"
v-for=
"(subItem, subIndex) in specificationDetailList"
:key=
"subIndex"
>
{{ subItem.specificationName }}
</td>
<td
:style=
"{ width: specsWidth }"
>
零售价(元)
</td>
<td
:style=
"{ width: specsWidth }"
>
库存(件)
</td>
</tr>
...
...
@@ -187,66 +136,21 @@
<div
style=
"max-height: 400px; overflow: scroll;"
>
<table
class=
"table-spesc"
>
<tbody>
<tr
style=
"border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;"
v-for=
"(subItem, subIndex) in nameToValSpecsList"
:key=
"subIndex"
>
<td
:style=
"{ width: specsWidth }"
v-for=
"(n, idx) in subItem.specsValueList"
:key=
"idx"
:title=
"n"
>
{{ n }}
</td>
<tr
style=
"border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;"
v-for=
"(subItem, subIndex) in nameToValSpecsList"
:key=
"subIndex"
>
<td
:style=
"{ width: specsWidth }"
v-for=
"(n, idx) in subItem.specsValueList"
:key=
"idx"
:title=
"n"
>
{{ n }}
</td>
<td
:style=
"{ width: specsWidth }"
>
<div
v-if=
"routeInfo.groupOrStore == 1"
>
<el-input
:disabled=
"isDisabled"
:class=
"{ 'border-red': (!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted }"
placeholder=
"零售价"
v-model=
"subItem.retailPrice"
@
input
.
native=
"e => handleRetailPriceInput(e, subIndex)"
@
blur=
"handleRetailPriceBlur"
>
<el-popover
v-show=
"(!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted"
slot=
"suffix"
placement=
"top"
title
width=
"90"
trigger=
"hover"
:content=
"!(subItem.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'"
>
<el-input
:disabled=
"isDisabled"
:class=
"{ 'border-red': (!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted }"
placeholder=
"零售价"
v-model=
"subItem.retailPrice"
@
input
.
native=
"e => handleRetailPriceInput(e, subIndex)"
@
blur=
"handleRetailPriceBlur"
>
<el-popover
v-show=
"(!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted"
slot=
"suffix"
placement=
"top"
title
width=
"90"
trigger=
"hover"
:content=
"!(subItem.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'"
>
<i
class=
"el-icon-warning color-red"
slot=
"reference"
></i>
</el-popover>
</el-input>
</div>
<el-input
:disabled=
"isDisabled"
v-else
placeholder=
"零售价"
v-model=
"subItem.retailPrice"
@
input
.
native=
"e => handleRetailPriceInput(e, subIndex)"
@
blur=
"handleRetailPriceBlur"
></el-input>
<el-input
:disabled=
"isDisabled"
v-else
placeholder=
"零售价"
v-model=
"subItem.retailPrice"
@
input
.
native=
"e => handleRetailPriceInput(e, subIndex)"
@
blur=
"handleRetailPriceBlur"
></el-input>
</td>
<td
:style=
"{ width: specsWidth }"
>
<el-input
:disabled=
"isDisabled"
placeholder=
"库存"
v-model=
"subItem.stock"
:class=
"{ 'border-red': !(subItem.stock + '') && submitted }"
@
input
.
native=
"e => handleStockInput(e, subIndex)"
>
<el-popover
v-show=
"!(subItem.stock + '') && submitted"
slot=
"suffix"
placement=
"top"
title
width=
"90"
trigger=
"hover"
content=
"库存是必填项"
>
<el-input
:disabled=
"isDisabled"
placeholder=
"库存"
v-model=
"subItem.stock"
:class=
"{ 'border-red': !(subItem.stock + '') && submitted }"
@
input
.
native=
"e => handleStockInput(e, subIndex)"
>
<el-popover
v-show=
"!(subItem.stock + '') && submitted"
slot=
"suffix"
placement=
"top"
title
width=
"90"
trigger=
"hover"
content=
"库存是必填项"
>
<i
class=
"el-icon-warning color-red"
slot=
"reference"
></i>
</el-popover>
</el-input>
...
...
@@ -267,30 +171,12 @@
<p
class=
"edit-tips"
>
作为货源供给门店的价格
</p>
</
template
>
<div
slot=
"selectMerchant"
slot-scope=
"scope"
class=
"select-merchant"
>
<el-button
:disabled=
"isDisabled"
type=
"default"
@
click=
"handleRelateStoreClose(scope)"
>
{{ editForm.supplyMerchantList.length ? '更换门店' : '+选择门店' }}
</el-button>
<el-button
:disabled=
"isDisabled"
type=
"default"
@
click=
"handleRelateStoreClose(scope)"
>
{{ editForm.supplyMerchantList.length ? '更换门店' : '+选择门店' }}
</el-button>
</div>
<div
slot=
"merchantTable"
class=
"select-merchant"
:style=
"{ 'margin-left': labelWidth, width: `calc(100% - ${labelWidth} - 10px )` }"
>
<GLTable
v-show=
"editForm.supplyMerchantList.length"
ref=
"merchantTableRef"
:hasPage=
"false"
:tableParams=
"tableParams"
:tableData=
"editForm.supplyMerchantList"
>
<div
slot=
"merchantTable"
class=
"select-merchant"
:style=
"{ 'margin-left': labelWidth, width: `calc(100% - ${labelWidth} - 10px )` }"
>
<GLTable
v-show=
"editForm.supplyMerchantList.length"
ref=
"merchantTableRef"
:hasPage=
"false"
:tableParams=
"tableParams"
:tableData=
"editForm.supplyMerchantList"
>
<span
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
:disabled=
"isDisabled"
type=
"text"
@
click=
"handleMerchantDelete(scope)"
>
删除
</el-button>
<el-button
:disabled=
"isDisabled"
type=
"text"
@
click=
"handleMerchantDelete(scope)"
>
删除
</el-button>
</span>
</GLTable>
</div>
...
...
@@ -303,11 +189,7 @@
<div
class=
"wechant-back"
>
<div
class=
"wechat-inner-box"
>
<div
class=
"wechant-banner-img img-w-h"
>
<img
v-if=
"!wechatImgList.length"
class=
"inner-img"
src=
"@/assets/product-default.png"
/>
<img
v-if=
"!wechatImgList.length"
class=
"inner-img"
src=
"@/assets/product-default.png"
/>
<el-carousel
v-else
height=
"250px"
>
<el-carousel-item
v-for=
"item in wechatImgList"
:key=
"item"
>
<video
v-if=
"item.resType == 3"
class=
"inner-img"
:src=
"item.content"
></video>
...
...
@@ -317,14 +199,14 @@
<div>
<div
class=
"inner-block"
style=
"margin-bottom: 4px;"
>
<span
v-show=
"!specificationDetailList.length"
>
<span
class=
"price"
>
¥{{
editForm.retailPrice
}}
</span>
<span
class=
"price"
>
¥{{
editForm.retailPrice
}}
</span>
</span>
<span
v-show=
"specificationDetailList.length"
>
<span
class=
"price"
>
¥{{
minRetailPrice
}}
</span>
<span
class=
"price"
>
¥{{
minRetailPrice
}}
</span>
<span
v-show=
"specificationDetailList.length > 1"
>
起
</span>
</span>
<span
class=
"old"
v-show=
"editForm.originalPrice"
>
¥{{
editForm.originalPrice
}}
</span>
<p
class=
"good-name one-line-ellipsis"
>
{{
editForm.goodsName
}}
</p>
<span
class=
"old"
v-show=
"editForm.originalPrice"
>
¥{{
editForm.originalPrice
}}
</span>
<p
class=
"good-name one-line-ellipsis"
>
{{
editForm.goodsName
}}
</p>
<p>
<span
class=
"txt-tips"
>
剩余:
</span>
<span
class=
"txt-tips"
style=
"margin-left: 20px;"
>
销售:0
</span>
...
...
@@ -333,7 +215,7 @@
<div
class=
"inner-block"
style=
"margin-bottom: 8px;"
>
<div
class=
"line"
v-if=
"nameToValSpecsList.length"
>
<span
class=
"line-label"
>
已选
</span>
<span
class=
"line-txt"
>
{{
nameToValSpecsList[0].specificationData
}}
</span>
<span
class=
"line-txt"
>
{{
nameToValSpecsList[0].specificationData
}}
</span>
</div>
<div
class=
"line"
style=
"display: flex;"
>
<span
class=
"line-label"
>
配送
</span>
...
...
@@ -345,13 +227,13 @@
<div
class=
"line"
>
<span
class=
"line-label"
>
运费
</span>
<span
v-show=
"editForm.deliveryType == 1"
class=
"line-txt"
>
免运费
</span>
<span
v-show=
"editForm.deliveryType == 2"
class=
"line-txt"
>
{{
editForm.expressFee
}}元
</span>
<span
v-show=
"editForm.deliveryType == 2"
class=
"line-txt"
>
{{
editForm.expressFee
}}元
</span>
</div>
</div>
<div
class=
"inner-block"
style=
"margin-bottom: 0;"
>
<div
style=
"word-wrap: break-word;padding-bottom: 8px;"
>
{{
editForm.describeTxt
}}
</div>
<div
style=
"word-wrap: break-word;padding-bottom: 8px;"
>
{{
editForm.describeTxt
}}
</div>
<div
v-for=
"(item, index) in editForm.descImgList"
:key=
"index"
>
<img
class=
"inner-img"
v-show=
"item.content"
:src=
"item.content"
>
<img
class=
"inner-img"
v-show=
"item.content"
:src=
"item.content"
/
>
</div>
</div>
</div>
...
...
@@ -365,79 +247,32 @@
</div>
<comment-detail
v-show=
"['2', '3'].includes(routeInfo.addOrEdit + '') && activeName == 'afterOrder'"
:goodsId=
"routeInfo.id"
></comment-detail>
<div
class=
"footer"
:style=
"{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<el-button
v-if=
"
(routeInfo.addOrEdit == '1')
|| (routeInfo.addOrEdit == '2' && activeName == 'basicInfo')"
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
v-if=
"
routeInfo.addOrEdit == '1'
|| (routeInfo.addOrEdit == '2' && activeName == 'basicInfo')"
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"default"
@
click=
"handleCancel"
>
取消
</el-button>
</div>
<el-dialog
:visible
.
sync=
"isImgVisible"
>
<img
class=
"dialog-img"
width=
"100%"
:src=
"dialogImageUrl"
alt
/>
</el-dialog>
<glsx-dialog
title=
"规格"
:isVisible
.
sync=
"isSpescVisible"
width=
"70%"
@
confirmDialog=
"handleSpescConfirm"
@
closeDialog=
"handleSpescClose"
>
<glsx-dialog
title=
"规格"
:isVisible
.
sync=
"isSpescVisible"
width=
"70%"
@
confirmDialog=
"handleSpescConfirm"
@
closeDialog=
"handleSpescClose"
>
<el-form
label-width=
"120px"
:model=
"spescEditForm"
:rules=
"spescRules"
ref=
"spescRef"
>
<el-form-item
label=
"规格名:"
prop=
"specificationName"
>
<el-input
class=
"w-320"
:size=
"size"
maxlength=
"10"
v-model=
"spescEditForm.specificationName"
placeholder=
"请输入规格名"
></el-input>
<el-input
class=
"w-320"
:size=
"size"
maxlength=
"10"
v-model=
"spescEditForm.specificationName"
placeholder=
"请输入规格名"
></el-input>
</el-form-item>
<el-form-item
label=
"规格值:"
prop=
"specificationValueList"
>
<el-tag
style=
"margin-right: 10px;"
v-for=
"(tag, i) in spescEditForm.specificationValueList"
:key=
"i"
closable
:type=
"tag.type"
@
close=
"handleSpescDelete(tag)"
>
{{ tag.specificationValue }}
</el-tag>
<el-input
class=
"input-new-tag"
v-if=
"specsInputVisible"
v-model=
"spescInputVal"
ref=
"saveSpescInput"
maxlength=
"30"
:size=
"size"
@
keyup
.
enter
.
native=
"handleInputConfirm"
@
blur=
"handleInputConfirm"
></el-input>
<el-tag
style=
"margin-right: 10px;"
v-for=
"(tag, i) in spescEditForm.specificationValueList"
:key=
"i"
closable
:type=
"tag.type"
@
close=
"handleSpescDelete(tag)"
>
{{ tag.specificationValue }}
</el-tag>
<el-input
class=
"input-new-tag"
v-if=
"specsInputVisible"
v-model=
"spescInputVal"
ref=
"saveSpescInput"
maxlength=
"30"
:size=
"size"
@
keyup
.
enter
.
native=
"handleInputConfirm"
@
blur=
"handleInputConfirm"
></el-input>
<el-button
v-else
class=
"button-new-tag"
size=
"small"
@
click=
"showInput"
>
+ 规格值
</el-button>
</el-form-item>
</el-form>
</glsx-dialog>
<relate-store-dialog
v-if=
"relateStoreVisible"
ref=
"relateStore"
:relateStoreVisible=
"relateStoreVisible"
:storeApi=
"storeApi"
:storeSearchForm=
"storeSearchForm"
:storeSelected=
"selectedList"
@
handleRelateStoreConfirm=
"handleRelateStoreConfirm"
@
handleRelateStoreClose=
"handleRelateStoreClose"
>
<relate-store-dialog
v-if=
"relateStoreVisible"
ref=
"relateStore"
:relateStoreVisible=
"relateStoreVisible"
:storeApi=
"storeApi"
:storeSearchForm=
"storeSearchForm"
:storeSelected=
"selectedList"
@
handleRelateStoreConfirm=
"handleRelateStoreConfirm"
@
handleRelateStoreClose=
"handleRelateStoreClose"
>
<el-row
slot
>
<el-form
:model=
"storeSearchForm"
ref=
"relate"
:inline=
"true"
label-width=
"90px"
>
<el-form-item
label=
"商户ID:"
prop=
"merchantId"
>
<el-input
:size=
"size"
v-model
.
trim=
"storeSearchForm.merchantId"
placeholder=
"请输入商户ID"
clearable
></el-input>
<el-input
:size=
"size"
v-model
.
trim=
"storeSearchForm.merchantId"
placeholder=
"请输入商户ID"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"门店名称:"
prop=
"merchantName"
>
<el-input
:size=
"size"
v-model
.
trim=
"storeSearchForm.merchantName"
placeholder=
"请输入门店名称"
clearable
></el-input>
<el-input
:size=
"size"
v-model
.
trim=
"storeSearchForm.merchantName"
placeholder=
"请输入门店名称"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearchStore"
>
搜索
</el-button>
...
...
@@ -456,20 +291,20 @@ export default {
data
()
{
return
{
dialogTableVisible
:
false
,
radio
:
""
,
radio
:
''
,
templateSelection
:
[],
associationList
:[],
relatedDiscountType
:
''
,
associationList
:
[],
relatedDiscountType
:
''
,
// associationUseChannel:'',
// associationShow: false,
// 关联优惠券表格
searchForm
:
{
couponName
:
''
,
directionalFlag
:
3
,
directionalFlag
:
3
,
status
:
2
,
discountTypes
:
[
2
,
3
,
4
]
},
associationTableSearchForm
:
{
status
:
2
,
directionalFlag
:
3
},
associationTableSearchForm
:
{
status
:
2
,
directionalFlag
:
3
},
// 搜索
searchFormData
:
[
{
...
...
@@ -477,29 +312,29 @@ export default {
name
:
'couponName'
,
type
:
'input'
,
maxlength
:
20
}
,
}
],
getListApi
:
this
.
$apis
.
couponManage
.
getMerchantListApi
,
associationTableParams
:
{
listName
:
'list'
,
tableOption
:
false
,
tableColumns
:
[
{
{
prop
:
'association'
,
addHtml
:
'association'
,
width
:
'100'
width
:
'100'
},
{
label
:
'序号'
,
prop
:
'num'
,
width
:
'100'
label
:
'序号'
,
prop
:
'num'
,
width
:
'100'
},
{
label
:
'名称'
,
prop
:
'couponName'
,
line
:
2
},
{
{
label
:
'优惠券类型'
,
prop
:
'discountType'
,
formatter
:
cellValue
=>
{
...
...
@@ -516,12 +351,12 @@ export default {
}
return
useChannel
}
}
,
}
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
associationBaseData
:
{
// 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务
associationBaseData
:
{
// 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务
discountTypeList
:
[
{
confId
:
'2'
,
...
...
@@ -536,7 +371,7 @@ export default {
confName
:
'兑换券'
}
],
useChannelList
:
[
useChannelList
:
[
{
confId
:
'1'
,
confName
:
'线上商品'
...
...
@@ -546,7 +381,7 @@ export default {
confName
:
'到店核销'
}
]
},
},
size
:
'small'
,
footerLeft
:
'0'
,
footerWidth
:
'0'
,
...
...
@@ -617,11 +452,11 @@ export default {
// 表单
editForm
:
{
businessType
:
[],
businessTypeList
:[],
relatedCouponName
:
''
,
relatedDiscountType
:
''
,
relatedUseChannel
:
''
,
relatedCouponId
:
''
,
businessTypeList
:
[],
relatedCouponName
:
''
,
relatedDiscountType
:
''
,
relatedUseChannel
:
''
,
relatedCouponId
:
''
,
goodsName
:
''
,
goodsImage
:
''
,
goodsDetailImageList
:
[],
...
...
@@ -719,14 +554,14 @@ export default {
})
}
},
{
{
label
:
'业务类型'
,
name
:
'businessType'
,
addHtml
:
'businessType'
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
isDisabled
:
false
,
businessTypeList
:[]
businessTypeList
:
[]
// handleRadioChange: val => {
// this.handleTypeChange(val)
// }
...
...
@@ -779,7 +614,7 @@ export default {
label
:
'关联优惠券'
,
name
:
''
,
addHtml
:
'association'
}
,
}
// {
// label: '',
// name: '',
...
...
@@ -976,13 +811,30 @@ export default {
// 运费
'editForm.expressFee'
(
newValue
,
oldValue
)
{
this
.
editForm
.
expressFee
=
limitPrice
(
newValue
,
oldValue
,
5
,
2
,
0
,
100000
)
},
// 判断配送发货状态
'editForm.relatedCouponName'
(
newValue
,
oldValue
)
{
if
(
newValue
)
{
let
inx
=
this
.
externalFormList
[
2
].
editFormData
.
findIndex
(
val
=>
val
.
name
==
'deliveryType'
)
this
.
externalFormList
[
2
].
editFormData
[
inx
].
optionList
.
map
(
val
=>
{
if
(
val
.
confId
==
2
)
return
(
val
.
isDisabled
=
true
)
})
this
.
editForm
.
deliveryType
=
1
this
.
handleTypeChange
(
this
.
editForm
.
deliveryType
)
}
else
{
let
inx
=
this
.
externalFormList
[
2
].
editFormData
.
findIndex
(
val
=>
val
.
name
==
'deliveryType'
)
this
.
externalFormList
[
2
].
editFormData
[
inx
].
optionList
.
map
(
val
=>
{
if
(
val
.
confId
==
2
)
return
(
val
.
isDisabled
=
false
)
})
this
.
editForm
.
deliveryType
=
2
this
.
handleTypeChange
(
this
.
editForm
.
deliveryType
)
}
}
},
created
()
{
this
.
routeInfo
=
this
.
$route
.
query
this
.
businessGetBusinessTypeById
();
this
.
businessGetBusinessTypeById
()
},
mounted
()
{
...
...
@@ -1003,40 +855,38 @@ export default {
methods
:
{
businessGetBusinessTypeById
()
{
this
.
$apis
.
proManage
.
getBusinessTypeByIdApi
({}).
then
(
res
=>
{
console
.
log
(
'res'
,
res
);
var
idx
=
this
.
externalFormList
[
0
].
editFormData
.
findIndex
(
subItem
=>
subItem
.
name
==
'businessType'
)
this
.
externalFormList
[
0
].
editFormData
[
idx
].
businessTypeList
=
res
;
}
)
this
.
$apis
.
proManage
.
getBusinessTypeByIdApi
({}).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
var
idx
=
this
.
externalFormList
[
0
].
editFormData
.
findIndex
(
subItem
=>
subItem
.
name
==
'businessType'
)
this
.
externalFormList
[
0
].
editFormData
[
idx
].
businessTypeList
=
res
})
},
del
()
{
this
.
associationShow
=
false
this
.
editForm
.
relatedCouponId
=
''
this
.
editForm
.
relatedCouponName
=
''
this
.
editForm
.
relatedDiscountType
=
''
this
.
editForm
.
relatedUseChannel
=
''
},
associationConfirm
()
{
this
.
dialogTableVisible
=
false
this
.
associationShow
=
true
this
.
editForm
.
relatedUseChannel
=
''
this
.
editForm
.
relatedCouponId
=
this
.
associationList
[
0
].
id
this
.
editForm
.
relatedCouponName
=
this
.
associationList
[
0
].
couponName
this
.
editForm
.
relatedDiscountType
=
this
.
associationBaseData
.
discountTypeList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
discountType
).
confName
if
(
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
useChannel
))
this
.
editForm
.
relatedUseChannel
=
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
useChannel
).
confName
},
del
(){
this
.
associationShow
=
false
;
this
.
editForm
.
relatedCouponId
=
''
;
this
.
editForm
.
relatedCouponName
=
''
;
this
.
editForm
.
relatedDiscountType
=
''
;
this
.
editForm
.
relatedUseChannel
=
''
;
},
associationConfirm
(){
this
.
dialogTableVisible
=
false
;
this
.
associationShow
=
true
;
this
.
editForm
.
relatedUseChannel
=
''
;
this
.
editForm
.
relatedCouponId
=
this
.
associationList
[
0
].
id
;
this
.
editForm
.
relatedCouponName
=
this
.
associationList
[
0
].
couponName
;
this
.
editForm
.
relatedDiscountType
=
this
.
associationBaseData
.
discountTypeList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
discountType
).
confName
;
if
(
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
useChannel
))
this
.
editForm
.
relatedUseChannel
=
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
useChannel
).
confName
;
},
associationCancel
(){
this
.
dialogTableVisible
=
false
;
},
getCurrentRow
(){
//获取选中数据
associationCancel
()
{
this
.
dialogTableVisible
=
false
},
getCurrentRow
()
{
//获取选中数据
// this.radio
let
inx
=
this
.
templateSelection
.
findIndex
(
value
=>
value
.
id
==
this
.
radio
)
;
this
.
associationList
.
pop
()
;
this
.
associationList
.
push
(
this
.
templateSelection
[
inx
])
;
console
.
log
(
'this.associationList'
,
this
.
associationList
);
let
inx
=
this
.
templateSelection
.
findIndex
(
value
=>
value
.
id
==
this
.
radio
)
this
.
associationList
.
pop
()
this
.
associationList
.
push
(
this
.
templateSelection
[
inx
])
console
.
log
(
'this.associationList'
,
this
.
associationList
)
},
getBaseDate
()
{
return
new
Promise
(
resolve
=>
{
...
...
@@ -1373,7 +1223,7 @@ export default {
// 获取商品信息
getInfo
()
{
this
.
$apis
.
proManage
.
getProInfoApi
({
id
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
console
.
log
(
'res'
,
res
);
console
.
log
(
'res'
,
res
)
this
.
editForm
=
{
...
res
,
goodsVideo
:
res
.
goodsVideo
||
''
,
...
...
@@ -1384,15 +1234,15 @@ export default {
supplyPrice
:
res
.
supplyPrice
?
(
res
.
supplyPrice
/
100
).
toFixed
(
2
)
:
''
,
describeTxt
:
''
,
descImgList
:
[],
businessType
:[]
businessType
:
[]
}
this
.
editForm
.
businessType
=
this
.
editForm
.
businessTypeList
.
filter
(
item
=>
item
.
isChoose
==
1
).
map
(
item
=>
item
.
businessType
)
console
.
log
(
this
.
editForm
)
if
(
res
.
relatedCoupon
)
{
this
.
editForm
.
relatedCouponId
=
res
.
relatedCoupon
.
id
;
this
.
editForm
.
relatedCouponName
=
res
.
relatedCoupon
.
couponName
;
this
.
editForm
.
relatedDiscountType
=
this
.
associationBaseData
.
discountTypeList
.
find
(
item
=>
item
.
confId
==
res
.
relatedCoupon
.
discountType
).
confName
;;
this
.
editForm
.
relatedUseChannel
=
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
res
.
relatedCoupon
.
useChannel
).
confName
;
if
(
res
.
relatedCoupon
)
{
this
.
editForm
.
relatedCouponId
=
res
.
relatedCoupon
.
id
this
.
editForm
.
relatedCouponName
=
res
.
relatedCoupon
.
couponName
this
.
editForm
.
relatedDiscountType
=
this
.
associationBaseData
.
discountTypeList
.
find
(
item
=>
item
.
confId
==
res
.
relatedCoupon
.
discountType
).
confName
this
.
editForm
.
relatedUseChannel
=
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
res
.
relatedCoupon
.
useChannel
).
confName
}
// 是否需要安装
this
.
editForm
.
install
=
this
.
editForm
.
install
||
'Y'
...
...
@@ -1415,7 +1265,7 @@ export default {
this
.
handleTypeChange
(
this
.
editForm
.
deliveryType
)
this
.
getWechatImgList
()
// console.log(this.editForm)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
})
})
...
...
@@ -1535,7 +1385,7 @@ export default {
}
// 业务类型
params
.
businessTypeList
=
params
.
businessType
if
(
!
params
.
businessTypeList
)
{
if
(
!
params
.
businessTypeList
)
{
delete
params
.
businessTypeList
}
else
{
var
idx
=
this
.
externalFormList
[
0
].
editFormData
.
findIndex
(
subItem
=>
subItem
.
name
==
'businessType'
)
...
...
@@ -1583,7 +1433,7 @@ export default {
if
(
params
[
item
])
{
params
[
item
]
=
(
this
.
editForm
[
item
]
*
100
).
toFixed
(
0
)
}
if
(
item
==
'expressFee'
&&
this
.
editForm
.
deliveryType
!=
2
)
{
if
(
item
==
'expressFee'
&&
this
.
editForm
.
deliveryType
!=
2
)
{
params
.
expressFee
=
''
}
})
...
...
@@ -1621,12 +1471,13 @@ export default {
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
cancelJump
()
})
.
catch
(()
=>
{})
.
then
(()
=>
{
this
.
cancelJump
()
})
.
catch
(()
=>
{})
}
else
{
this
.
cancelJump
()
this
.
cancelJump
()
}
},
getParams
()
{
...
...
@@ -1635,31 +1486,30 @@ export default {
},
// 关联优惠券请求
associationBeforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
this
.
associationTableSearchForm
=
this
.
getParams
()
// delete this.tableSearchForm.createDate
resolve
()
})
},
setTableFinishFun
()
{
let
num
=
0
;
let
pageSize
=
Number
(
this
.
$refs
.
coupon
[
0
].
page
.
pageSize
);
let
pageNum
=
Number
(
this
.
$refs
.
coupon
[
0
].
page
.
pageNum
);
let
sum
=
(
pageSize
*
(
pageNum
-
1
));
setTableFinishFun
()
{
let
num
=
0
let
pageSize
=
Number
(
this
.
$refs
.
coupon
[
0
].
page
.
pageSize
)
let
pageNum
=
Number
(
this
.
$refs
.
coupon
[
0
].
page
.
pageNum
)
let
sum
=
pageSize
*
(
pageNum
-
1
)
// console.log(pageSize,pageNum);
this
.
$refs
.
coupon
[
0
].
data
.
forEach
(
val
=>
{
if
(
num
<=
pageSize
)
val
.
num
=
++
num
;
if
(
pageNum
>
1
)
val
.
num
=
++
sum
;
})
// console.log('this.$refs.coupon',this.$refs.coupon[0])
this
.
$refs
.
coupon
[
0
].
data
.
forEach
(
val
=>
{
if
(
num
<=
pageSize
)
val
.
num
=
++
num
if
(
pageNum
>
1
)
val
.
num
=
++
sum
})
// console.log('this.$refs.coupon',this.$refs.coupon[0])
//接收到的数据为空
this
.
templateSelection
=
this
.
$refs
.
coupon
[
0
].
data
;
this
.
templateSelection
=
this
.
$refs
.
coupon
[
0
].
data
// this.$refs.coupon[0].data.length ? (this.$refs.coupon[0].tableHeightValues = '') : this.$refs.coupon[0].setTableHeightFun()
},
handleSearch
()
{
handleSearch
()
{
this
.
$refs
.
coupon
[
0
].
refreshTable
()
},
}
}
}
</
script
>
...
...
@@ -1719,12 +1569,12 @@ export default {
left
:
19px
;
width
:
253px
;
height
:
413px
;
background-color
:
#
F7F7F
7
;
background-color
:
#
f7f7f
7
;
overflow-y
:
scroll
;
overflow-x
:
hidden
;
}
.edit-pro
.wechat-container
.inner-block
{
background-color
:
#
FFFFFF
;
background-color
:
#
ffffff
;
padding
:
6px
11px
;
}
.edit-pro
.wechat-container
.price
{
...
...
@@ -1795,9 +1645,9 @@ export default {
.edit-pro
.sepce-box
{
position
:
relative
;
padding
:
30px
34px
;
color
:
#3
A3A3A
;
background
:
#
F7F7F
7
;
border
:
1px
solid
#
DCDFE
6
;
color
:
#3
a3a3a
;
background
:
#
f7f7f
7
;
border
:
1px
solid
#
dcdfe
6
;
margin-bottom
:
10px
;
}
.edit-pro
.sepce-box
.specs-title
{
...
...
@@ -1805,7 +1655,7 @@ export default {
line-height
:
60px
;
}
.edit-pro
.sepce-box
.specs-item
{
background
:
#
E6E9FF
;
background
:
#
e6e9ff
;
border-radius
:
4px
;
padding
:
9px
16px
;
color
:
#717171
;
...
...
@@ -1828,13 +1678,13 @@ export default {
}
.marketing.edit-pro
.el-tabs__item
{
background
:
#
F4F6FC
!important
;
border
:
1px
solid
#
F4F6FC
!important
;
background
:
#
f4f6fc
!important
;
border
:
1px
solid
#
f4f6fc
!important
;
}
.marketing.edit-pro
.el-tabs__item.is-active
{
background
:
#
FFFFFF
!important
;
border
:
1px
solid
#
FFFFFF
!important
;
background
:
#
ffffff
!important
;
border
:
1px
solid
#
ffffff
!important
;
}
.edit-pro
.association
.el-radio__label
{
display
:
none
;
...
...
@@ -1845,22 +1695,22 @@ export default {
bottom
:
26px
;
}
.association-X
{
width
:
670px
;
height
:
108px
;
border
:
1px
solid
#EEE
;
margin-top
:
10px
;
width
:
670px
;
height
:
108px
;
border
:
1px
solid
#eee
;
margin-top
:
10px
;
}
.association-X
.associationRow
{
display
:
flex
;
height
:
54px
;
background
:
#
F4F6FC
;
background
:
#
f4f6fc
;
align-items
:
center
;
justify-content
:
center
;
}
.association-X
.associationRow
.associationLists
{
display
:
block
;
white-space
:
nowrap
;
overflow
:
hidden
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
flex
:
1
;
text-align
:
center
;
...
...
@@ -1871,8 +1721,8 @@ export default {
}
.association-X
.associationRow
.associationLists-X
{
display
:
block
;
white-space
:
nowrap
;
overflow
:
hidden
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
flex
:
1
;
text-align
:
center
;
...
...
@@ -1882,7 +1732,7 @@ export default {
.marketing
.footer-btns
{
float
:
none
!important
;
}
.el-checkbox__input.is-checked
+
.el-checkbox__label
{
color
:
#606266
;
.el-checkbox__input.is-checked
+
.el-checkbox__label
{
color
:
#606266
;
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment