Commit f389742e by chenwq

表单改版

1 parent 9342148e
...@@ -110,8 +110,8 @@ html { ...@@ -110,8 +110,8 @@ html {
position: relative; position: relative;
} }
.marketing .wechat-container .w-100-per { .marketing .w-100-per {
width: 100%; width: 100% !important;
} }
.marketing .wechat-container .wechat-box { .marketing .wechat-container .wechat-box {
...@@ -131,6 +131,12 @@ html { ...@@ -131,6 +131,12 @@ html {
margin-top: 20px; margin-top: 20px;
} }
.marketing .form-sub-block {
width: 686px;
background: #f9f9f9;
padding: 20px;
}
.marketing .f-right { .marketing .f-right {
float: right; float: right;
} }
...@@ -229,11 +235,6 @@ html { ...@@ -229,11 +235,6 @@ html {
cursor: pointer; cursor: pointer;
} }
.marketing .w-100-percent,
.marketing .img-w-100 {
width: 100%;
}
.marketing .img-36 { .marketing .img-36 {
width: 36px; width: 36px;
height: 36px; height: 36px;
...@@ -304,7 +305,7 @@ html { ...@@ -304,7 +305,7 @@ html {
} }
.marketing .m-l-10 { .marketing .m-l-10 {
margin-left: 10px; margin-left: 10px !important;
} }
.marketing .m-l-20 { .marketing .m-l-20 {
...@@ -329,6 +330,10 @@ html { ...@@ -329,6 +330,10 @@ html {
padding-left: 40px; padding-left: 40px;
} }
.marketing .p-0 {
padding: 0;
}
.marketing .circle { .marketing .circle {
display: inline-block; display: inline-block;
width: 6px; width: 6px;
...@@ -343,11 +348,11 @@ html { ...@@ -343,11 +348,11 @@ html {
} }
.marketing .txt-green { .marketing .txt-green {
color: #61CC43; color: #61cc43;
} }
.marketing .txt-orange { .marketing .txt-orange {
color: #FB8F28; color: #fb8f28;
} }
.marketing .txt-blue { .marketing .txt-blue {
...@@ -799,4 +804,4 @@ html { ...@@ -799,4 +804,4 @@ html {
width: 580px; width: 580px;
} }
} }
}
\ No newline at end of file \ No newline at end of file
}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div :class="['glsx-combi-form', isEdit ? 'gl-form-page' : '']"> <div :class="['glsx-combi-form', isEdit ? 'gl-form-page' : '']">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block ml20"> <el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block ml20">
<template v-for="(item, index) in formData"> <template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name"> <el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label"> <span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span> <span class="tips-label">{{ item.label }}</span>
<el-popover placement="top" width="200" trigger="hover" :content="item.tips"> <el-popover placement="top" width="200" trigger="hover" :content="item.tips">
...@@ -150,14 +150,14 @@ export default { ...@@ -150,14 +150,14 @@ export default {
default: false default: false
}, },
labelWidth: { labelWidth: {
type: Number, type: String,
// 默认是四个字符长度 // 默认是四个字符长度
default: 154 default: '154px'
},
labelPaddingRight: {
type: Number,
default: 15
}, },
// labelPaddingRight: {
// type: Number,
// default: 15
// },
formData: { formData: {
type: Array, type: Array,
default: () => [] default: () => []
...@@ -421,7 +421,7 @@ export default { ...@@ -421,7 +421,7 @@ export default {
cursor: pointer; cursor: pointer;
} }
.glsx-combi-form .combi-form-label { .glsx-combi-form .combi-form-label {
display: inline-block; /* display: inline-block; */
box-sizing: border-box; box-sizing: border-box;
} }
/* 图片上传 */ /* 图片上传 */
......
...@@ -27,6 +27,7 @@ Vue.config.productionTip = false ...@@ -27,6 +27,7 @@ Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
Vue.prototype.size = 'small' Vue.prototype.size = 'small'
Vue.prototype.setMinHeight = setMinHeight Vue.prototype.setMinHeight = setMinHeight
Vue.prototype.defaultLabelWidth = '154px'
start() start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
......
...@@ -7,14 +7,17 @@ ...@@ -7,14 +7,17 @@
<div slot="selectProBtn" slot-scope="scope" class="select-pro"> <div slot="selectProBtn" slot-scope="scope" class="select-pro">
<el-button type="default" @click="handleMutiProClose(scope)">{{ editForm.goodsRefList.length ? '更换商品' : '+选择商品' }}</el-button> <el-button type="default" @click="handleMutiProClose(scope)">{{ editForm.goodsRefList.length ? '更换商品' : '+选择商品' }}</el-button>
</div> </div>
<div slot="proTable" class="select-pro" style="padding-left: 20px"> <div slot="proTable" class="select-pro" :style="{ 'margin-left': defaultLabelWidth, width: `calc(100% - ${defaultLabelWidth} )` }">
<GLTable v-show="editForm.goodsRefList.length" :hasPage="false" :tableParams="tableParams" :tableData="editForm.goodsRefList"> <GLTable v-show="editForm.goodsRefList.length" :hasPage="false" :tableParams="tableParams" :tableData="editForm.goodsRefList">
<template slot="goodsImage" slot-scope="scope"> <div slot="goodsImage" class="table-image" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" /> <el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
</template> <img class="table-popover-img" :src="scope.scope.goodsImage" />
<span slot="auth-button" slot-scope="scope"> <img class="img-60 pointer" slot="reference" :src="scope.scope.goodsImage" />
<el-button type="text" @click="handleProDelete(scope)">删除</el-button> </el-popover>
<el-button type="text" @click="handleProTop(scope)">置顶</el-button> </div>
<span slot="customBtn" slot-scope="scope">
<el-button class="p-0" type="text" @click="handleProDelete(scope)">删除</el-button>
<el-button class="p-0 m-l-10" type="text" @click="handleProTop(scope)">置顶</el-button>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -94,7 +97,6 @@ export default { ...@@ -94,7 +97,6 @@ export default {
], ],
// 门店表格 // 门店表格
tableParams: { tableParams: {
tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '缩略图', label: '缩略图',
...@@ -103,11 +105,20 @@ export default { ...@@ -103,11 +105,20 @@ export default {
}, },
{ {
label: '商品名称', label: '商品名称',
prop: 'productName' prop: 'productName',
formatter: cellValue => {
return cellValue.productName || cellValue.goodsName || '--'
}
}, },
{ {
label: '零售价', label: '零售价',
prop: 'retailPrice' prop: 'retailPrice'
},
{
label: '操作',
prop: '',
width: '120px',
addHtml: 'customBtn'
} }
] ]
} }
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<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 class="edit-form-container m-b-60" ref="editFormRef" :isEdit="isEdit" :labelWidth="labelWidth" :isBlock="true" :formRef="item.editChildRef" :formObj="editForm" :formData="item.editFormData" :formRules="item.editRule"> <glsx-combi-form class="edit-form-container m-b-60" ref="editFormRef" :isEdit="isEdit" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="item.editChildRef" :formObj="editForm" :formData="item.editFormData" :formRules="item.editRule">
<div slot="merchantQrcode" slot-scope="scope" :style="{ 'margin-left': labelWidth, width: '120px', 'text-align': 'center' }"> <div slot="merchantQrcode" slot-scope="scope" :style="{ 'margin-left': defaultLabelWidth, width: '120px', 'text-align': 'center' }">
<p> <p>
<img class="img-120" :src="editForm[scope.scope.name]" /> <img class="img-120" :src="editForm[scope.scope.name]" />
</p> </p>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<template slot="bannerBtn"> <template slot="bannerBtn">
<el-button type="primary" :size="size" @click="handleBannerAdd">新增banner</el-button> <el-button type="primary" :size="size" @click="handleBannerAdd">新增banner</el-button>
</template> </template>
<div :style="{ 'margin-left': labelWidth }" slot="bannerList" slot-scope="scope"> <div :style="{ 'margin-left': defaultLabelWidth }" slot="bannerList" 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="banner-upload-box">
...@@ -136,9 +136,6 @@ ...@@ -136,9 +136,6 @@
<el-checkbox v-for="(item, index) in baseData.clueList" :label="item.confId" :key="index">{{ item.confName }}</el-checkbox> <el-checkbox v-for="(item, index) in baseData.clueList" :label="item.confId" :key="index">{{ item.confName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<!-- <div slot="serviceTable" :style="{ 'margin-left': labelWidth, width: `calc(100% - ${labelWidth} )` }">
<GLTable v-show="editForm.customerServerUserId" :hasPage="false" :tableParams="tableParams" :tableData="customerServerList"></GLTable>
</div> -->
<div class="approval" slot="customerServerUserId"> <div class="approval" slot="customerServerUserId">
<el-radio v-model="editForm.customerServerType" :label="1"> <el-radio v-model="editForm.customerServerType" :label="1">
<el-select style="width: 320px" v-model="editForm.customerServerUserId" :disabled="editForm.customerServerType == 2" :clearable="true" :placeholder="'请选择在线客服'" :no-data-text="'无数据'" @change="selectAddAttr"> <el-select style="width: 320px" v-model="editForm.customerServerUserId" :disabled="editForm.customerServerType == 2" :clearable="true" :placeholder="'请选择在线客服'" :no-data-text="'无数据'" @change="selectAddAttr">
...@@ -322,7 +319,6 @@ export default { ...@@ -322,7 +319,6 @@ export default {
{ confId: '2', confName: '图文介绍' }, { confId: '2', confName: '图文介绍' },
{ confId: '3', confName: '视频介绍' } { confId: '3', confName: '视频介绍' }
], ],
labelWidth: '144px',
isEdit: true, isEdit: true,
externalFormList: [ externalFormList: [
{ {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<p class="edit-tips">作为商品详情页顶部展示</p> <p class="edit-tips">作为商品详情页顶部展示</p>
<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': defaultLabelWidth }" 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="banner-upload-box">
...@@ -63,26 +63,6 @@ ...@@ -63,26 +63,6 @@
</div> </div>
<template slot="association"> <template slot="association">
<el-button type="default" :disabled="specificationDetailList.length" @click="dialogTableVisible = true" v-if="routeInfo.addOrEdit !== 3">+选择</el-button> <el-button type="default" :disabled="specificationDetailList.length" @click="dialogTableVisible = true" v-if="routeInfo.addOrEdit !== 3">+选择</el-button>
<GLDialog bigTitle="选择优惠券" mode="big" :visible.sync="dialogTableVisible" @onOk="associationConfirm" @onCancel="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>
<!-- <GLButton class="default-blue-btn" style="float: right; margin-bottom: 10px;" :size="size" fn="创建优惠券" @click="handleJumpCoupon">创建优惠券</GLButton> -->
<el-button class="default-blue-btn" style="float: right; margin: 0 10px 10px 0;" :size="size" @click="handleJumpCoupon">创建优惠券</el-button>
<GLTable ref="coupon" :hasNum="false" :getListApi="getListApi" :searchForm="searchForm" :tableParams="associationTableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="association" slot-scope="scope" class="association">
<el-radio :label="scope.scope.id" v-model="associationRadio" @change.native="getCouponInfo()"></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> -->
</GLDialog>
<div class="association-X" v-if="editForm.relatedCouponId"> <div class="association-X" v-if="editForm.relatedCouponId">
<div class="associationRow"> <div class="associationRow">
<span class="associationLists">名称</span> <span class="associationLists">名称</span>
...@@ -105,7 +85,7 @@ ...@@ -105,7 +85,7 @@
<template slot="proSpecsBtn"> <template slot="proSpecsBtn">
<el-button :disabled="editForm.relatedCouponId || isDisabled" type="default" @click="handleSpecsEdit(1)">+添加规格项目</el-button> <el-button :disabled="editForm.relatedCouponId || isDisabled" type="default" @click="handleSpecsEdit(1)">+添加规格项目</el-button>
</template> </template>
<div slot="proSpecs" :style="{ 'margin-left': labelWidth }"> <div slot="proSpecs" :style="{ 'margin-left': defaultLabelWidth }">
<div class="sepce-box" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex"> <div class="sepce-box" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">
<div> <div>
<span class="specs-title">规格名:</span> <span class="specs-title">规格名:</span>
...@@ -126,8 +106,8 @@ ...@@ -126,8 +106,8 @@
</div> </div>
</div> </div>
<div slot="specsDetail" class="flex"> <div slot="specsDetail" class="flex">
<span class="spesc-label" :style="{ width: labelWidth }">规格明细:</span> <span class="spesc-label" :style="{ width: defaultLabelWidth }">规格明细:</span>
<div :style="{ width: `calc(100% - ${labelWidth} )` }"> <div :style="{ width: `calc(100% - ${defaultLabelWidth} )` }">
<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);">
...@@ -144,16 +124,16 @@ ...@@ -144,16 +124,16 @@
<td :style="{ width: specsWidth }" v-for="(n, idx) in subItem.specsValueList" :key="idx" :title="n">{{ n }}</td> <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 && editForm.takeType == '1'"> <div v-if="routeInfo.groupOrStore == 1 && editForm.takeType == '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-input :disabled="isDisabled" :class="{ 'w-100-per': true, '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-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 :disabled="isDisabled" v-else placeholder="零售价" v-model="subItem.retailPrice" @input.native="e => handleRetailPriceInput(e, subIndex)" @blur="handleRetailPriceBlur"></el-input> <el-input :disabled="isDisabled" class="w-100-per" 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 :disabled="isDisabled" placeholder="库存" v-model="subItem.stock" :class="{ 'border-red': !(subItem.stock + '') && submitted }" @input.native="e => handleStockInput(e, subIndex)"> <el-input :disabled="isDisabled" placeholder="库存" v-model="subItem.stock" :class="{ 'w-100-per': true, '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-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>
...@@ -185,12 +165,12 @@ ...@@ -185,12 +165,12 @@
<span class="mode-radio">{{ n.confName }}</span> <span class="mode-radio">{{ n.confName }}</span>
<span class="mode-radio radio-tip-txt" @click.stop.prevent="e => handleCancelBubble(e)">{{ scope.scope.tipObj[n.confId] }}</span> <span class="mode-radio radio-tip-txt" @click.stop.prevent="e => handleCancelBubble(e)">{{ scope.scope.tipObj[n.confId] }}</span>
</div> </div>
<el-form-item v-show="n.confId == '0'" prop="takeFee" label="分润比例:"> <el-form-item v-show="n.confId == '0'" prop="takeFee" label="分润比例:" class="form-sub-block">
<el-input v-model="editForm.takeFee" :disabled="isDisabled || editForm[scope.scope.name] != '0'" placeholder="请输入分润比例"><span slot="append">%</span></el-input> <el-input v-model="editForm.takeFee" :disabled="isDisabled || editForm[scope.scope.name] != '0'" placeholder="请输入分润比例"><span slot="suffix">%</span></el-input>
<p class="edit-tips">此商品由门店帮卖货后获得的分成比例</p> <p class="edit-tips">此商品由门店帮卖货后获得的分成比例</p>
</el-form-item> </el-form-item>
<el-form-item v-show="n.confId == '1'" prop="supplyPrice" label="供货价:"> <el-form-item v-show="n.confId == '1'" prop="supplyPrice" label="供货价:" class="form-sub-block">
<el-input v-model="editForm.supplyPrice" :disabled="isDisabled || editForm[scope.scope.name] != '1'" placeholder="请输入供货价"><span slot="append">元</span></el-input> <el-input v-model="editForm.supplyPrice" :disabled="isDisabled || editForm[scope.scope.name] != '1'" placeholder="请输入供货价"><span slot="suffix">元</span></el-input>
<p class="edit-tips">作为货源供给门店的价格</p> <p class="edit-tips">作为货源供给门店的价格</p>
</el-form-item> </el-form-item>
</el-radio> </el-radio>
...@@ -209,7 +189,7 @@ ...@@ -209,7 +189,7 @@
</div> </div>
<el-button :disabled="isDisabled" v-show="editForm.takeAllMerchant == '0'" type="default" @click="handleRelateStoreClose(scope)">{{ editForm.supplyMerchantList.length ? '更换门店' : '+选择门店' }}</el-button> <el-button :disabled="isDisabled" v-show="editForm.takeAllMerchant == '0'" type="default" @click="handleRelateStoreClose(scope)">{{ editForm.supplyMerchantList.length ? '更换门店' : '+选择门店' }}</el-button>
</div> </div>
<div slot="merchantTable" class="select-merchant" v-show="editForm.takeAllMerchant == '0'" :style="{ 'margin-left': labelWidth, width: `calc(100% - ${labelWidth} - 10px )` }"> <div slot="merchantTable" class="select-merchant" v-show="editForm.takeAllMerchant == '0'" :style="{ 'margin-left': defaultLabelWidth, width: `calc(100% - ${defaultLabelWidth} - 10px )` }">
<GLTable v-show="editForm.supplyMerchantList.length" ref="merchantTableRef" :tableParams="tableParams" :tableData="editForm.supplyMerchantList" :hasPage="false"> <GLTable v-show="editForm.supplyMerchantList.length" ref="merchantTableRef" :tableParams="tableParams" :tableData="editForm.supplyMerchantList" :hasPage="false">
<span slot="auth-button" slot-scope="scope"> <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>
...@@ -289,6 +269,20 @@ ...@@ -289,6 +269,20 @@
<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>
<GLDialog bigTitle="选择优惠券" mode="big" :visible.sync="dialogTableVisible" @onOk="associationConfirm" @onCancel="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>
<!-- <GLButton class="default-blue-btn" style="float: right; margin-bottom: 10px;" :size="size" fn="创建优惠券" @click="handleJumpCoupon">创建优惠券</GLButton> -->
<el-button class="default-blue-btn" style="float: right; margin: 0 10px 10px 0;" :size="size" @click="handleJumpCoupon">创建优惠券</el-button>
<GLTable ref="coupon" :hasNum="false" :getListApi="getListApi" :searchForm="searchForm" :tableParams="associationTableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="association" slot-scope="scope" class="association">
<el-radio :label="scope.scope.id" v-model="associationRadio" @change.native="getCouponInfo()"></el-radio>
</div>
</GLTable>
</GLDialog>
<GLDialog title="规格" mode="mid" :visible.sync="isSpescVisible" @onOk="handleSpescConfirm" @onCancel="handleSpescClose"> <GLDialog title="规格" mode="mid" :visible.sync="isSpescVisible" @onOk="handleSpescConfirm" @onCancel="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">
...@@ -516,7 +510,6 @@ export default { ...@@ -516,7 +510,6 @@ export default {
serviceDesc: '' serviceDesc: ''
}, },
isEdit: true, isEdit: true,
labelWidth: '154px',
externalFormList: [ externalFormList: [
{ {
title: '基本信息', title: '基本信息',
...@@ -639,7 +632,7 @@ export default { ...@@ -639,7 +632,7 @@ export default {
rows: 5, rows: 5,
maxlength: '200', maxlength: '200',
style: { style: {
'margin-left': '144px' 'margin-left': this.defaultLabelWidth
} }
}, },
{ {
...@@ -1615,15 +1608,15 @@ export default { ...@@ -1615,15 +1608,15 @@ 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.page.pageSize)
let pageNum = Number(this.$refs.coupon[0].page.pageNum) let pageNum = Number(this.$refs.coupon.page.pageNum)
let sum = pageSize * (pageNum - 1) let sum = pageSize * (pageNum - 1)
this.$refs.coupon[0].data.forEach(val => { this.$refs.coupon.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
}) })
//接收到的数据为空 //接收到的数据为空
this.templateSelection = this.$refs.coupon[0].data this.templateSelection = this.$refs.coupon.data
}, },
handleSearch() { handleSearch() {
this.$refs.coupon[0].refreshTable() this.$refs.coupon[0].refreshTable()
...@@ -1673,7 +1666,6 @@ export default { ...@@ -1673,7 +1666,6 @@ export default {
} }
.edit-pro .take-good-mode-block { .edit-pro .take-good-mode-block {
display: flex; display: flex;
align-items: center;
} }
.edit-pro .mode-radio { .edit-pro .mode-radio {
height: 32px; height: 32px;
...@@ -1681,7 +1673,8 @@ export default { ...@@ -1681,7 +1673,8 @@ export default {
margin-right: 8px; margin-right: 8px;
} }
.edit-pro .take-good-mode-block .el-radio__input { .edit-pro .take-good-mode-block .el-radio__input {
height: 86px; height: 100px;
margin-top: 10px;
} }
.edit-pro .take-good-mode-block .radio-tip-txt { .edit-pro .take-good-mode-block .radio-tip-txt {
color: #999999; color: #999999;
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
<div class="edit-zone marketing edit-box"> <div class="edit-zone marketing edit-box">
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ title }}</p> <p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="labelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="selectMerchant" slot-scope="scope" class="select-merchant"> <div slot="selectMerchant" slot-scope="scope" class="select-merchant">
<el-button type="default" @click="handleRelateStoreClose(scope)">{{ editForm.merchantList.length ? '更换门店' : '+选择门店' }}</el-button> <el-button type="default" @click="handleRelateStoreClose(scope)">{{ editForm.merchantList.length ? '更换门店' : '+选择门店' }}</el-button>
</div> </div>
<div slot="merchantTable" :style="{ 'margin-left': labelWidth, width: `calc(100% - ${labelWidth} )` }"> <div slot="merchantTable" :style="{ 'margin-left': defaultLabelWidth, width: `calc(100% - ${defaultLabelWidth} )` }">
<GLTable v-show="editForm.merchantList.length" ref="warehousListRef" :hasPage="false" :tableParams="tableParams" :tableData="editForm.merchantList"> <GLTable v-show="editForm.merchantList.length" ref="warehousListRef" :hasPage="false" :tableParams="tableParams" :tableData="editForm.merchantList">
<span slot="auth-button" slot-scope="scope"> <span slot="customBtn" slot-scope="scope">
<el-button type="text" @click="handleMerchantDelete(scope)">删除</el-button> <el-button class="p-0" type="text" @click="handleMerchantDelete(scope)">删除</el-button>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -35,10 +35,6 @@ ...@@ -35,10 +35,6 @@
<el-button @click="handleCancel" size="medium">取消</el-button> <el-button @click="handleCancel" size="medium">取消</el-button>
<el-button type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button> <el-button type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button>
</GLFooter> </GLFooter>
<!-- <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div> -->
</div> </div>
</template> </template>
...@@ -60,7 +56,6 @@ export default { ...@@ -60,7 +56,6 @@ export default {
id: '' id: ''
}, },
editStatus: false, editStatus: false,
labelWidth: '144px',
editForm: { editForm: {
// 专区类型(1发现频道,2商城专区) // 专区类型(1发现频道,2商城专区)
zoneType: '2', zoneType: '2',
...@@ -120,11 +115,15 @@ export default { ...@@ -120,11 +115,15 @@ export default {
selectedList: [], selectedList: [],
// 门店表格 // 门店表格
tableParams: { tableParams: {
tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '门店名称', label: '门店名称',
prop: 'merchantName' prop: 'merchantName'
},
{
label: '操作',
prop: '',
addHtml: 'customBtn'
} }
] ]
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!