Commit f389742e by chenwq

表单改版

1 parent 9342148e
......@@ -110,8 +110,8 @@ html {
position: relative;
}
.marketing .wechat-container .w-100-per {
width: 100%;
.marketing .w-100-per {
width: 100% !important;
}
.marketing .wechat-container .wechat-box {
......@@ -131,6 +131,12 @@ html {
margin-top: 20px;
}
.marketing .form-sub-block {
width: 686px;
background: #f9f9f9;
padding: 20px;
}
.marketing .f-right {
float: right;
}
......@@ -229,11 +235,6 @@ html {
cursor: pointer;
}
.marketing .w-100-percent,
.marketing .img-w-100 {
width: 100%;
}
.marketing .img-36 {
width: 36px;
height: 36px;
......@@ -304,7 +305,7 @@ html {
}
.marketing .m-l-10 {
margin-left: 10px;
margin-left: 10px !important;
}
.marketing .m-l-20 {
......@@ -329,6 +330,10 @@ html {
padding-left: 40px;
}
.marketing .p-0 {
padding: 0;
}
.marketing .circle {
display: inline-block;
width: 6px;
......@@ -343,11 +348,11 @@ html {
}
.marketing .txt-green {
color: #61CC43;
color: #61cc43;
}
.marketing .txt-orange {
color: #FB8F28;
color: #fb8f28;
}
.marketing .txt-blue {
......@@ -799,4 +804,4 @@ html {
width: 580px;
}
}
}
\ No newline at end of file
}
......@@ -3,7 +3,7 @@
<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">
<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 class="tips-label">{{ item.label }}</span>
<el-popover placement="top" width="200" trigger="hover" :content="item.tips">
......@@ -150,14 +150,14 @@ export default {
default: false
},
labelWidth: {
type: Number,
type: String,
// 默认是四个字符长度
default: 154
},
labelPaddingRight: {
type: Number,
default: 15
default: '154px'
},
// labelPaddingRight: {
// type: Number,
// default: 15
// },
formData: {
type: Array,
default: () => []
......@@ -421,7 +421,7 @@ export default {
cursor: pointer;
}
.glsx-combi-form .combi-form-label {
display: inline-block;
/* display: inline-block; */
box-sizing: border-box;
}
/* 图片上传 */
......
......@@ -27,6 +27,7 @@ Vue.config.productionTip = false
Vue.prototype.$apis = apis
Vue.prototype.size = 'small'
Vue.prototype.setMinHeight = setMinHeight
Vue.prototype.defaultLabelWidth = '154px'
start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
......
......@@ -7,14 +7,17 @@
<div slot="selectProBtn" slot-scope="scope" class="select-pro">
<el-button type="default" @click="handleMutiProClose(scope)">{{ editForm.goodsRefList.length ? '更换商品' : '+选择商品' }}</el-button>
</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">
<template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" />
</template>
<span slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleProDelete(scope)">删除</el-button>
<el-button type="text" @click="handleProTop(scope)">置顶</el-button>
<div slot="goodsImage" class="table-image" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.goodsImage" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.goodsImage" />
</el-popover>
</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>
</GLTable>
</div>
......@@ -94,7 +97,6 @@ export default {
],
// 门店表格
tableParams: {
tableOption: true,
tableColumns: [
{
label: '缩略图',
......@@ -103,11 +105,20 @@ export default {
},
{
label: '商品名称',
prop: 'productName'
prop: 'productName',
formatter: cellValue => {
return cellValue.productName || cellValue.goodsName || '--'
}
},
{
label: '零售价',
prop: 'retailPrice'
},
{
label: '操作',
prop: '',
width: '120px',
addHtml: 'customBtn'
}
]
}
......
......@@ -5,8 +5,8 @@
<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" :isEdit="isEdit" :labelWidth="labelWidth" :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' }">
<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': defaultLabelWidth, width: '120px', 'text-align': 'center' }">
<p>
<img class="img-120" :src="editForm[scope.scope.name]" />
</p>
......@@ -15,7 +15,7 @@
<template slot="bannerBtn">
<el-button type="primary" :size="size" @click="handleBannerAdd">新增banner</el-button>
</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 class="banner-upload-box">
......@@ -136,9 +136,6 @@
<el-checkbox v-for="(item, index) in baseData.clueList" :label="item.confId" :key="index">{{ item.confName }}</el-checkbox>
</el-checkbox-group>
</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">
<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">
......@@ -322,7 +319,6 @@ export default {
{ confId: '2', confName: '图文介绍' },
{ confId: '3', confName: '视频介绍' }
],
labelWidth: '144px',
isEdit: true,
externalFormList: [
{
......
......@@ -3,14 +3,14 @@
<div class="edit-zone marketing edit-box">
<div class="container edit-container">
<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">
<el-button type="default" @click="handleRelateStoreClose(scope)">{{ editForm.merchantList.length ? '更换门店' : '+选择门店' }}</el-button>
</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">
<span slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleMerchantDelete(scope)">删除</el-button>
<span slot="customBtn" slot-scope="scope">
<el-button class="p-0" type="text" @click="handleMerchantDelete(scope)">删除</el-button>
</span>
</GLTable>
</div>
......@@ -35,10 +35,6 @@
<el-button @click="handleCancel" size="medium">取消</el-button>
<el-button type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button>
</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>
</template>
......@@ -60,7 +56,6 @@ export default {
id: ''
},
editStatus: false,
labelWidth: '144px',
editForm: {
// 专区类型(1发现频道,2商城专区)
zoneType: '2',
......@@ -120,11 +115,15 @@ export default {
selectedList: [],
// 门店表格
tableParams: {
tableOption: true,
tableColumns: [
{
label: '门店名称',
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!