Commit 4357a18d by wuwx

修改创建商品时选择顺序体验性问题

1 parent 3f668448
...@@ -5,24 +5,12 @@ ...@@ -5,24 +5,12 @@
<el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane> <el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane>
<el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane> <el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane>
</el-tabs> </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="flex">
<div class="home-set-form flex-grow"> <div class="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index"> <div v-for="(item, index) in externalFormList" :key="index">
<p class="edit-title">{{ item.title }}</p> <p class="edit-title">{{ item.title }}</p>
<glsx-combi-form <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">
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"> <template slot="businessType" slot-scope="scope">
<el-checkbox-group v-model="editForm.businessType"> <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> <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 @@ ...@@ -45,48 +33,25 @@
<p class="edit-tips">格式建议mp4,大小不超过50M</p> <p class="edit-tips">格式建议mp4,大小不超过50M</p>
</template> </template>
<div :style="{ 'margin-left': labelWidth }" slot="descImgs" slot-scope="scope"> <div :style="{ 'margin-left': labelWidth }" slot="descImgs" slot-scope="scope">
<div <div v-for="(subItem, subIndex) in editForm[scope.scope.name]" :key="subIndex" class="flex">
v-for="(subItem, subIndex) in editForm[scope.scope.name]"
:key="subIndex"
class="flex"
>
<!-- 上传图片 --> <!-- 上传图片 -->
<div class="banner-upload-box"> <div class="banner-upload-box">
<div class="p-t-12"> <div class="p-t-12">
<div class="flex"> <div class="flex">
<div <div v-show="!subItem.content" class="activity-img img-w-h" style="margin-bottom: 11px;">
v-show="!subItem.content"
class="activity-img img-w-h"
style="margin-bottom: 11px;"
>
<div class="add">+</div> <div class="add">+</div>
<span class="number">上传</span> <span class="number">上传</span>
<input <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)" />
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>
<div v-show="!subItem.content"> <div v-show="!subItem.content">
<el-button <el-button type="text" class="el-icon-delete" @click="handleEmptyDelete(subIndex)"></el-button>
type="text"
class="el-icon-delete"
@click="handleEmptyDelete(subIndex)"
></el-button>
</div> </div>
</div> </div>
<span v-show="subItem.content" class="muti-imgs"> <span v-show="subItem.content" class="muti-imgs">
<img class="img-w-h" :src="subItem.content" /> <img class="img-w-h" :src="subItem.content" />
<span class="img-btns"> <span class="img-btns">
<span class="btn-item"> <span class="btn-item">
<i <i v-if="!isDisabled" class="el-icon-delete" @click="handleImgDelete(scope.scope.name, subIndex)"></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> <i class="el-icon-zoom-in" @click="handleImgLook(subItem.content)"></i>
</span> </span>
</span> </span>
...@@ -98,7 +63,7 @@ ...@@ -98,7 +63,7 @@
</div> </div>
<template slot="association"> <template slot="association">
<el-button type="default" @click="dialogTableVisible = true" v-if="routeInfo.addOrEdit !== 3">+选择</el-button> <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-dialog title="选择优惠券" :isVisible.sync="dialogTableVisible" width="50%" @confirmDialog="associationConfirm" @closeDialog="associationCancel">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns"> <span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
...@@ -124,11 +89,11 @@ ...@@ -124,11 +89,11 @@
</div> </div>
<div class="associationRow" style="background:white;"> <div class="associationRow" style="background:white;">
<el-tooltip effect="dark" :content="editForm.relatedCouponName" placement="bottom"> <el-tooltip effect="dark" :content="editForm.relatedCouponName" placement="bottom">
<span class="associationLists-X">{{editForm.relatedCouponName}}</span> <span class="associationLists-X">{{ editForm.relatedCouponName }}</span>
</el-tooltip> </el-tooltip>
<span class="associationLists-X">{{editForm.relatedDiscountType}}</span> <span class="associationLists-X">{{ editForm.relatedDiscountType }}</span>
<span class="associationLists-X">{{editForm.relatedUseChannel}}</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> <span class="associationLists" v-if="routeInfo.addOrEdit !== 3"><el-button type="text" @click="del()">删除</el-button></span>
</div> </div>
</div> </div>
...@@ -142,27 +107,15 @@ ...@@ -142,27 +107,15 @@
<span class="specs-title">规格名:</span> <span class="specs-title">规格名:</span>
<span class="specs-item">{{ subItem.specificationName }}</span> <span class="specs-item">{{ subItem.specificationName }}</span>
<div style="position: absolute; right: 10px; top: 10px;"> <div style="position: absolute; right: 10px; top: 10px;">
<el-button <el-button v-show="!isDisabled" type="text" @click="handleSpecsEdit(2, subItem, subIndex)">编辑</el-button>
v-show="!isDisabled" <el-button v-show="!isDisabled" type="text" @click="handleSpecsDelete(subIndex)">删除</el-button>
type="text"
@click="handleSpecsEdit(2, subItem, subIndex)"
>编辑</el-button>
<el-button
v-show="!isDisabled"
type="text"
@click="handleSpecsDelete(subIndex)"
>删除</el-button>
</div> </div>
</div> </div>
<div class="flex"> <div class="flex">
<span style="width: 56px;">规格值:</span> <span style="width: 56px;">规格值:</span>
<div style="width: calc(100% - 56px);"> <div style="width: calc(100% - 56px);">
<div> <div>
<span <span class="specs-item" v-for="(n, idx) in subItem.specificationValueList" :key="idx">{{ n.specificationValue }}</span>
class="specs-item"
v-for="(n, idx) in subItem.specificationValueList"
:key="idx"
>{{ n.specificationValue }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -174,11 +127,7 @@ ...@@ -174,11 +127,7 @@
<table class="table-spesc"> <table class="table-spesc">
<tbody> <tbody>
<tr style="padding: 17px 0; background: #F4F6FC; box-shadow: 0px 1px 5px 0px rgba(38, 38, 38, 0.1);"> <tr style="padding: 17px 0; background: #F4F6FC; box-shadow: 0px 1px 5px 0px rgba(38, 38, 38, 0.1);">
<td <td :style="{ width: specsWidth }" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">{{ subItem.specificationName }}</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>
<td :style="{ width: specsWidth }">库存(件)</td> <td :style="{ width: specsWidth }">库存(件)</td>
</tr> </tr>
...@@ -187,66 +136,21 @@ ...@@ -187,66 +136,21 @@
<div style="max-height: 400px; overflow: scroll;"> <div style="max-height: 400px; overflow: scroll;">
<table class="table-spesc"> <table class="table-spesc">
<tbody> <tbody>
<tr <tr style="border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;" v-for="(subItem, subIndex) in nameToValSpecsList" :key="subIndex">
style="border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;" <td :style="{ width: specsWidth }" v-for="(n, idx) in subItem.specsValueList" :key="idx" :title="n">{{ n }}</td>
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 }"> <td :style="{ width: specsWidth }">
<div v-if="routeInfo.groupOrStore == 1"> <div v-if="routeInfo.groupOrStore == 1">
<el-input <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">
:disabled="isDisabled" <el-popover v-show="(!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted" slot="suffix" placement="top" title width="90" trigger="hover" :content="!(subItem.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'">
: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> <i class="el-icon-warning color-red" slot="reference"></i>
</el-popover> </el-popover>
</el-input> </el-input>
</div> </div>
<el-input <el-input :disabled="isDisabled" v-else placeholder="零售价" v-model="subItem.retailPrice" @input.native="e => handleRetailPriceInput(e, subIndex)" @blur="handleRetailPriceBlur"></el-input>
:disabled="isDisabled"
v-else
placeholder="零售价"
v-model="subItem.retailPrice"
@input.native="e => handleRetailPriceInput(e, subIndex)"
@blur="handleRetailPriceBlur"
></el-input>
</td> </td>
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<el-input <el-input :disabled="isDisabled" placeholder="库存" v-model="subItem.stock" :class="{ 'border-red': !(subItem.stock + '') && submitted }" @input.native="e => handleStockInput(e, subIndex)">
:disabled="isDisabled" <el-popover v-show="!(subItem.stock + '') && submitted" slot="suffix" placement="top" title width="90" trigger="hover" content="库存是必填项">
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> <i class="el-icon-warning color-red" slot="reference"></i>
</el-popover> </el-popover>
</el-input> </el-input>
...@@ -267,30 +171,12 @@ ...@@ -267,30 +171,12 @@
<p class="edit-tips">作为货源供给门店的价格</p> <p class="edit-tips">作为货源供给门店的价格</p>
</template> </template>
<div slot="selectMerchant" slot-scope="scope" class="select-merchant"> <div slot="selectMerchant" slot-scope="scope" class="select-merchant">
<el-button <el-button :disabled="isDisabled" type="default" @click="handleRelateStoreClose(scope)">{{ editForm.supplyMerchantList.length ? '更换门店' : '+选择门店' }}</el-button>
:disabled="isDisabled"
type="default"
@click="handleRelateStoreClose(scope)"
>{{ editForm.supplyMerchantList.length ? '更换门店' : '+选择门店' }}</el-button>
</div> </div>
<div <div slot="merchantTable" class="select-merchant" :style="{ 'margin-left': labelWidth, width: `calc(100% - ${labelWidth} - 10px )` }">
slot="merchantTable" <GLTable v-show="editForm.supplyMerchantList.length" ref="merchantTableRef" :hasPage="false" :tableParams="tableParams" :tableData="editForm.supplyMerchantList">
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"> <span slot="auth-button" slot-scope="scope">
<el-button <el-button :disabled="isDisabled" type="text" @click="handleMerchantDelete(scope)">删除</el-button>
:disabled="isDisabled"
type="text"
@click="handleMerchantDelete(scope)"
>删除</el-button>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -303,11 +189,7 @@ ...@@ -303,11 +189,7 @@
<div class="wechant-back"> <div class="wechant-back">
<div class="wechat-inner-box"> <div class="wechat-inner-box">
<div class="wechant-banner-img img-w-h"> <div class="wechant-banner-img img-w-h">
<img <img v-if="!wechatImgList.length" class="inner-img" src="@/assets/product-default.png" />
v-if="!wechatImgList.length"
class="inner-img"
src="@/assets/product-default.png"
/>
<el-carousel v-else height="250px"> <el-carousel v-else height="250px">
<el-carousel-item v-for="item in wechatImgList" :key="item"> <el-carousel-item v-for="item in wechatImgList" :key="item">
<video v-if="item.resType == 3" class="inner-img" :src="item.content"></video> <video v-if="item.resType == 3" class="inner-img" :src="item.content"></video>
...@@ -317,14 +199,14 @@ ...@@ -317,14 +199,14 @@
<div> <div>
<div class="inner-block" style="margin-bottom: 4px;"> <div class="inner-block" style="margin-bottom: 4px;">
<span v-show="!specificationDetailList.length"> <span v-show="!specificationDetailList.length">
<span class="price">¥{{editForm.retailPrice}}</span> <span class="price">¥{{ editForm.retailPrice }}</span>
</span> </span>
<span v-show="specificationDetailList.length"> <span v-show="specificationDetailList.length">
<span class="price">¥{{minRetailPrice}}</span> <span class="price">¥{{ minRetailPrice }}</span>
<span v-show="specificationDetailList.length > 1">起</span> <span v-show="specificationDetailList.length > 1">起</span>
</span> </span>
<span class="old" v-show="editForm.originalPrice">¥{{editForm.originalPrice}}</span> <span class="old" v-show="editForm.originalPrice">¥{{ editForm.originalPrice }}</span>
<p class="good-name one-line-ellipsis">{{editForm.goodsName}}</p> <p class="good-name one-line-ellipsis">{{ editForm.goodsName }}</p>
<p> <p>
<span class="txt-tips">剩余:</span> <span class="txt-tips">剩余:</span>
<span class="txt-tips" style="margin-left: 20px;">销售:0</span> <span class="txt-tips" style="margin-left: 20px;">销售:0</span>
...@@ -333,7 +215,7 @@ ...@@ -333,7 +215,7 @@
<div class="inner-block" style="margin-bottom: 8px;"> <div class="inner-block" style="margin-bottom: 8px;">
<div class="line" v-if="nameToValSpecsList.length"> <div class="line" v-if="nameToValSpecsList.length">
<span class="line-label">已选</span> <span class="line-label">已选</span>
<span class="line-txt">{{nameToValSpecsList[0].specificationData}}</span> <span class="line-txt">{{ nameToValSpecsList[0].specificationData }}</span>
</div> </div>
<div class="line" style="display: flex;"> <div class="line" style="display: flex;">
<span class="line-label">配送</span> <span class="line-label">配送</span>
...@@ -345,13 +227,13 @@ ...@@ -345,13 +227,13 @@
<div class="line"> <div class="line">
<span class="line-label">运费</span> <span class="line-label">运费</span>
<span v-show="editForm.deliveryType == 1" class="line-txt">免运费</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> </div>
<div class="inner-block" style="margin-bottom: 0;"> <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"> <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> </div>
</div> </div>
...@@ -365,79 +247,32 @@ ...@@ -365,79 +247,32 @@
</div> </div>
<comment-detail v-show="['2', '3'].includes(routeInfo.addOrEdit + '') && activeName == 'afterOrder'" :goodsId="routeInfo.id"></comment-detail> <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' }"> <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> <el-button type="default" @click="handleCancel">取消</el-button>
</div> </div>
<el-dialog :visible.sync="isImgVisible"> <el-dialog :visible.sync="isImgVisible">
<img class="dialog-img" width="100%" :src="dialogImageUrl" alt /> <img class="dialog-img" width="100%" :src="dialogImageUrl" alt />
</el-dialog> </el-dialog>
<glsx-dialog <glsx-dialog title="规格" :isVisible.sync="isSpescVisible" width="70%" @confirmDialog="handleSpescConfirm" @closeDialog="handleSpescClose">
title="规格"
:isVisible.sync="isSpescVisible"
width="70%"
@confirmDialog="handleSpescConfirm"
@closeDialog="handleSpescClose"
>
<el-form label-width="120px" :model="spescEditForm" :rules="spescRules" ref="spescRef"> <el-form label-width="120px" :model="spescEditForm" :rules="spescRules" ref="spescRef">
<el-form-item label="规格名:" prop="specificationName"> <el-form-item label="规格名:" prop="specificationName">
<el-input <el-input class="w-320" :size="size" maxlength="10" v-model="spescEditForm.specificationName" placeholder="请输入规格名"></el-input>
class="w-320"
:size="size"
maxlength="10"
v-model="spescEditForm.specificationName"
placeholder="请输入规格名"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="规格值:" prop="specificationValueList"> <el-form-item label="规格值:" prop="specificationValueList">
<el-tag <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>
style="margin-right: 10px;" <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>
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-button v-else class="button-new-tag" size="small" @click="showInput">+ 规格值</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</glsx-dialog> </glsx-dialog>
<relate-store-dialog <relate-store-dialog v-if="relateStoreVisible" ref="relateStore" :relateStoreVisible="relateStoreVisible" :storeApi="storeApi" :storeSearchForm="storeSearchForm" :storeSelected="selectedList" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose">
v-if="relateStoreVisible"
ref="relateStore"
:relateStoreVisible="relateStoreVisible"
:storeApi="storeApi"
:storeSearchForm="storeSearchForm"
:storeSelected="selectedList"
@handleRelateStoreConfirm="handleRelateStoreConfirm"
@handleRelateStoreClose="handleRelateStoreClose"
>
<el-row slot> <el-row slot>
<el-form :model="storeSearchForm" ref="relate" :inline="true" label-width="90px"> <el-form :model="storeSearchForm" ref="relate" :inline="true" label-width="90px">
<el-form-item label="商户ID:" prop="merchantId"> <el-form-item label="商户ID:" prop="merchantId">
<el-input <el-input :size="size" v-model.trim="storeSearchForm.merchantId" placeholder="请输入商户ID" clearable></el-input>
:size="size"
v-model.trim="storeSearchForm.merchantId"
placeholder="请输入商户ID"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="门店名称:" prop="merchantName"> <el-form-item label="门店名称:" prop="merchantName">
<el-input <el-input :size="size" v-model.trim="storeSearchForm.merchantName" placeholder="请输入门店名称" clearable></el-input>
:size="size"
v-model.trim="storeSearchForm.merchantName"
placeholder="请输入门店名称"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button :size="size" type="primary" @click="handleSearchStore">搜索</el-button> <el-button :size="size" type="primary" @click="handleSearchStore">搜索</el-button>
...@@ -456,20 +291,20 @@ export default { ...@@ -456,20 +291,20 @@ export default {
data() { data() {
return { return {
dialogTableVisible: false, dialogTableVisible: false,
radio:"", radio: '',
templateSelection: [], templateSelection: [],
associationList:[], associationList: [],
relatedDiscountType:'', relatedDiscountType: '',
// associationUseChannel:'', // associationUseChannel:'',
// associationShow: false, // associationShow: false,
// 关联优惠券表格 // 关联优惠券表格
searchForm: { searchForm: {
couponName: '', couponName: '',
directionalFlag:3, directionalFlag: 3,
status: 2, status: 2,
discountTypes: [2, 3, 4] discountTypes: [2, 3, 4]
}, },
associationTableSearchForm: {status:2,directionalFlag:3}, associationTableSearchForm: { status: 2, directionalFlag: 3 },
// 搜索 // 搜索
searchFormData: [ searchFormData: [
{ {
...@@ -477,7 +312,7 @@ export default { ...@@ -477,7 +312,7 @@ export default {
name: 'couponName', name: 'couponName',
type: 'input', type: 'input',
maxlength: 20 maxlength: 20
}, }
], ],
getListApi: this.$apis.couponManage.getMerchantListApi, getListApi: this.$apis.couponManage.getMerchantListApi,
associationTableParams: { associationTableParams: {
...@@ -487,12 +322,12 @@ export default { ...@@ -487,12 +322,12 @@ export default {
{ {
prop: 'association', prop: 'association',
addHtml: 'association', addHtml: 'association',
width:'100' width: '100'
}, },
{ {
label:'序号', label: '序号',
prop:'num', prop: 'num',
width:'100' width: '100'
}, },
{ {
label: '名称', label: '名称',
...@@ -516,7 +351,7 @@ export default { ...@@ -516,7 +351,7 @@ export default {
} }
return useChannel return useChannel
} }
}, }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
...@@ -617,11 +452,11 @@ export default { ...@@ -617,11 +452,11 @@ export default {
// 表单 // 表单
editForm: { editForm: {
businessType: [], businessType: [],
businessTypeList:[], businessTypeList: [],
relatedCouponName:'', relatedCouponName: '',
relatedDiscountType:'', relatedDiscountType: '',
relatedUseChannel:'', relatedUseChannel: '',
relatedCouponId:'', relatedCouponId: '',
goodsName: '', goodsName: '',
goodsImage: '', goodsImage: '',
goodsDetailImageList: [], goodsDetailImageList: [],
...@@ -726,7 +561,7 @@ export default { ...@@ -726,7 +561,7 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
isDisabled: false, isDisabled: false,
businessTypeList:[] businessTypeList: []
// handleRadioChange: val => { // handleRadioChange: val => {
// this.handleTypeChange(val) // this.handleTypeChange(val)
// } // }
...@@ -779,7 +614,7 @@ export default { ...@@ -779,7 +614,7 @@ export default {
label: '关联优惠券', label: '关联优惠券',
name: '', name: '',
addHtml: 'association' addHtml: 'association'
}, }
// { // {
// label: '', // label: '',
// name: '', // name: '',
...@@ -976,13 +811,30 @@ export default { ...@@ -976,13 +811,30 @@ export default {
// 运费 // 运费
'editForm.expressFee'(newValue, oldValue) { 'editForm.expressFee'(newValue, oldValue) {
this.editForm.expressFee = limitPrice(newValue, oldValue, 5, 2, 0, 100000) 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() { created() {
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
this.businessGetBusinessTypeById(); this.businessGetBusinessTypeById()
}, },
mounted() { mounted() {
...@@ -1003,40 +855,38 @@ export default { ...@@ -1003,40 +855,38 @@ export default {
methods: { methods: {
businessGetBusinessTypeById() { businessGetBusinessTypeById() {
this.$apis.proManage.getBusinessTypeByIdApi({}).then( this.$apis.proManage.getBusinessTypeByIdApi({}).then(res => {
res => { console.log('res', res)
console.log('res',res);
var idx = this.externalFormList[0].editFormData.findIndex(subItem => subItem.name == 'businessType') var idx = this.externalFormList[0].editFormData.findIndex(subItem => subItem.name == 'businessType')
this.externalFormList[0].editFormData[idx].businessTypeList = res; this.externalFormList[0].editFormData[idx].businessTypeList = res
} })
) },
}, del() {
del(){ this.associationShow = false
this.associationShow = false; this.editForm.relatedCouponId = ''
this.editForm.relatedCouponId = ''; this.editForm.relatedCouponName = ''
this.editForm.relatedCouponName = ''; this.editForm.relatedDiscountType = ''
this.editForm.relatedDiscountType = ''; this.editForm.relatedUseChannel = ''
this.editForm.relatedUseChannel = ''; },
}, associationConfirm() {
associationConfirm(){ this.dialogTableVisible = false
this.dialogTableVisible = false; this.associationShow = true
this.associationShow = true; this.editForm.relatedUseChannel = ''
this.editForm.relatedUseChannel = ''; this.editForm.relatedCouponId = this.associationList[0].id
this.editForm.relatedCouponId = this.associationList[0].id; this.editForm.relatedCouponName = this.associationList[0].couponName
this.editForm.relatedCouponName = this.associationList[0].couponName; this.editForm.relatedDiscountType = this.associationBaseData.discountTypeList.find(item => item.confId == this.associationList[0].discountType).confName
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
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() {
associationCancel(){ this.dialogTableVisible = false
this.dialogTableVisible = false; },
}, getCurrentRow() {
getCurrentRow(){
//获取选中数据 //获取选中数据
// this.radio // this.radio
let inx = this.templateSelection.findIndex(value => value.id == this.radio); let inx = this.templateSelection.findIndex(value => value.id == this.radio)
this.associationList.pop(); this.associationList.pop()
this.associationList.push(this.templateSelection[inx]); this.associationList.push(this.templateSelection[inx])
console.log('this.associationList',this.associationList); console.log('this.associationList', this.associationList)
}, },
getBaseDate() { getBaseDate() {
return new Promise(resolve => { return new Promise(resolve => {
...@@ -1373,7 +1223,7 @@ export default { ...@@ -1373,7 +1223,7 @@ export default {
// 获取商品信息 // 获取商品信息
getInfo() { getInfo() {
this.$apis.proManage.getProInfoApi({ id: this.routeInfo.id }).then(res => { this.$apis.proManage.getProInfoApi({ id: this.routeInfo.id }).then(res => {
console.log('res',res); console.log('res', res)
this.editForm = { this.editForm = {
...res, ...res,
goodsVideo: res.goodsVideo || '', goodsVideo: res.goodsVideo || '',
...@@ -1384,15 +1234,15 @@ export default { ...@@ -1384,15 +1234,15 @@ export default {
supplyPrice: res.supplyPrice ? (res.supplyPrice / 100).toFixed(2) : '', supplyPrice: res.supplyPrice ? (res.supplyPrice / 100).toFixed(2) : '',
describeTxt: '', describeTxt: '',
descImgList: [], descImgList: [],
businessType:[] businessType: []
} }
this.editForm.businessType = this.editForm.businessTypeList.filter(item => item.isChoose == 1).map(item => item.businessType) this.editForm.businessType = this.editForm.businessTypeList.filter(item => item.isChoose == 1).map(item => item.businessType)
console.log(this.editForm) console.log(this.editForm)
if(res.relatedCoupon) { if (res.relatedCoupon) {
this.editForm.relatedCouponId = res.relatedCoupon.id; this.editForm.relatedCouponId = res.relatedCoupon.id
this.editForm.relatedCouponName = res.relatedCoupon.couponName; this.editForm.relatedCouponName = res.relatedCoupon.couponName
this.editForm.relatedDiscountType = this.associationBaseData.discountTypeList.find(item => item.confId == res.relatedCoupon.discountType).confName;; 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.relatedUseChannel = this.associationBaseData.useChannelList.find(item => item.confId == res.relatedCoupon.useChannel).confName
} }
// 是否需要安装 // 是否需要安装
this.editForm.install = this.editForm.install || 'Y' this.editForm.install = this.editForm.install || 'Y'
...@@ -1415,7 +1265,7 @@ export default { ...@@ -1415,7 +1265,7 @@ export default {
this.handleTypeChange(this.editForm.deliveryType) this.handleTypeChange(this.editForm.deliveryType)
this.getWechatImgList() this.getWechatImgList()
// console.log(this.editForm) // console.log(this.editForm)
this.$nextTick(()=>{ this.$nextTick(() => {
this.editStatus = false this.editStatus = false
}) })
}) })
...@@ -1535,7 +1385,7 @@ export default { ...@@ -1535,7 +1385,7 @@ export default {
} }
// 业务类型 // 业务类型
params.businessTypeList = params.businessType params.businessTypeList = params.businessType
if(!params.businessTypeList) { if (!params.businessTypeList) {
delete params.businessTypeList delete params.businessTypeList
} else { } else {
var idx = this.externalFormList[0].editFormData.findIndex(subItem => subItem.name == 'businessType') var idx = this.externalFormList[0].editFormData.findIndex(subItem => subItem.name == 'businessType')
...@@ -1583,7 +1433,7 @@ export default { ...@@ -1583,7 +1433,7 @@ export default {
if (params[item]) { if (params[item]) {
params[item] = (this.editForm[item] * 100).toFixed(0) params[item] = (this.editForm[item] * 100).toFixed(0)
} }
if(item == 'expressFee' && this.editForm.deliveryType != 2) { if (item == 'expressFee' && this.editForm.deliveryType != 2) {
params.expressFee = '' params.expressFee = ''
} }
}) })
...@@ -1621,7 +1471,8 @@ export default { ...@@ -1621,7 +1471,8 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { })
.then(() => {
this.cancelJump() this.cancelJump()
}) })
.catch(() => {}) .catch(() => {})
...@@ -1642,24 +1493,23 @@ export default { ...@@ -1642,24 +1493,23 @@ export default {
}) })
}, },
setTableFinishFun() { setTableFinishFun() {
let num = 0; let num = 0
let pageSize = Number(this.$refs.coupon[0].page.pageSize); let pageSize = Number(this.$refs.coupon[0].page.pageSize)
let pageNum = Number(this.$refs.coupon[0].page.pageNum); let pageNum = Number(this.$refs.coupon[0].page.pageNum)
let sum = (pageSize*(pageNum - 1)); let sum = pageSize * (pageNum - 1)
// console.log(pageSize,pageNum); // console.log(pageSize,pageNum);
this.$refs.coupon[0].data.forEach(val => { this.$refs.coupon[0].data.forEach(val => {
if(num <= pageSize) val.num = ++num; if (num <= pageSize) val.num = ++num
if(pageNum > 1) val.num = ++sum; if (pageNum > 1) val.num = ++sum
}) })
// console.log('this.$refs.coupon',this.$refs.coupon[0]) // 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() // this.$refs.coupon[0].data.length ? (this.$refs.coupon[0].tableHeightValues = '') : this.$refs.coupon[0].setTableHeightFun()
}, },
handleSearch() { handleSearch() {
this.$refs.coupon[0].refreshTable() this.$refs.coupon[0].refreshTable()
}, }
} }
} }
</script> </script>
...@@ -1719,12 +1569,12 @@ export default { ...@@ -1719,12 +1569,12 @@ export default {
left: 19px; left: 19px;
width: 253px; width: 253px;
height: 413px; height: 413px;
background-color: #F7F7F7; background-color: #f7f7f7;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
} }
.edit-pro .wechat-container .inner-block { .edit-pro .wechat-container .inner-block {
background-color: #FFFFFF; background-color: #ffffff;
padding: 6px 11px; padding: 6px 11px;
} }
.edit-pro .wechat-container .price { .edit-pro .wechat-container .price {
...@@ -1795,9 +1645,9 @@ export default { ...@@ -1795,9 +1645,9 @@ export default {
.edit-pro .sepce-box { .edit-pro .sepce-box {
position: relative; position: relative;
padding: 30px 34px; padding: 30px 34px;
color: #3A3A3A; color: #3a3a3a;
background: #F7F7F7; background: #f7f7f7;
border: 1px solid #DCDFE6; border: 1px solid #dcdfe6;
margin-bottom: 10px; margin-bottom: 10px;
} }
.edit-pro .sepce-box .specs-title { .edit-pro .sepce-box .specs-title {
...@@ -1805,7 +1655,7 @@ export default { ...@@ -1805,7 +1655,7 @@ export default {
line-height: 60px; line-height: 60px;
} }
.edit-pro .sepce-box .specs-item { .edit-pro .sepce-box .specs-item {
background: #E6E9FF; background: #e6e9ff;
border-radius: 4px; border-radius: 4px;
padding: 9px 16px; padding: 9px 16px;
color: #717171; color: #717171;
...@@ -1828,13 +1678,13 @@ export default { ...@@ -1828,13 +1678,13 @@ export default {
} }
.marketing.edit-pro .el-tabs__item { .marketing.edit-pro .el-tabs__item {
background: #F4F6FC !important; background: #f4f6fc !important;
border: 1px solid #F4F6FC !important; border: 1px solid #f4f6fc !important;
} }
.marketing.edit-pro .el-tabs__item.is-active { .marketing.edit-pro .el-tabs__item.is-active {
background: #FFFFFF !important; background: #ffffff !important;
border: 1px solid #FFFFFF !important; border: 1px solid #ffffff !important;
} }
.edit-pro .association .el-radio__label { .edit-pro .association .el-radio__label {
display: none; display: none;
...@@ -1847,13 +1697,13 @@ export default { ...@@ -1847,13 +1697,13 @@ export default {
.association-X { .association-X {
width: 670px; width: 670px;
height: 108px; height: 108px;
border: 1px solid #EEE; border: 1px solid #eee;
margin-top: 10px; margin-top: 10px;
} }
.association-X .associationRow { .association-X .associationRow {
display: flex; display: flex;
height: 54px; height: 54px;
background: #F4F6FC; background: #f4f6fc;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
...@@ -1882,7 +1732,7 @@ export default { ...@@ -1882,7 +1732,7 @@ export default {
.marketing .footer-btns { .marketing .footer-btns {
float: none !important; float: none !important;
} }
.el-checkbox__input.is-checked+.el-checkbox__label { .el-checkbox__input.is-checked + .el-checkbox__label {
color: #606266; color: #606266;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!