Commit 25bdf1cf by 陈婉清

Merge branch 'chenwq_dev_v2.9.0' into 'v2.9.0'

表单改版

See merge request !325
2 parents 215181ca c7e9448d
......@@ -717,3 +717,86 @@ html {
vertical-align: middle;
margin-right: 8px;
}
// ----------------------
.gl-form-page {
.ml12 {
margin-left: 12px;
}
.ml20 {
margin-left: 20px;
}
.mr12 {
margin-right: 12px;
}
.mr24 {
margin-right: 24px;
}
.mb10 {
margin-bottom: 10px;
}
.mb12 {
margin-bottom: 12px;
}
.mb20 {
margin-bottom: 20px;
}
.w136 {
width: 136px !important;
}
.w154 {
width: 154px !important;
}
.w284 {
width: 284px !important;
}
.w432 {
width: 432px !important;
}
.w580 {
width: 580px !important;
}
.w728 {
width: 728px !important;
}
.el-form {
.el-form-item {
&:last-child {
margin-bottom: 0;
}
margin-bottom: 20px;
}
.el-form-item__label {
padding: 0;
width: 154px;
}
.el-button--medium {
padding: 10px 20px;
font-size: 14px;
border-radius: 4px;
}
.el-input {
width: 432px;
}
.el-textarea {
width: 580px !important;
}
.el-select {
width: 432px;
margin-right: 12px;
.el-input {
width: 432px;
}
.el-input--small .el-input__inner {
height: 32px;
line-height: 32px;
}
}
.el-date-editor {
width: 432px;
}
.welcome-box {
width: 580px;
}
}
}
\ No newline at end of file
<!-- 搜索 -->
<template>
<div class="glsx-combi-form">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<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">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
......@@ -9,9 +9,10 @@
<el-popover placement="top" width="200" trigger="hover" :content="item.tips">
<img slot="reference" class="tips-icon" src="./images/icon-tip.png" />
</el-popover>
:
</span>
<span v-else-if="!item.isHide && item.label && !item.tips" slot="label">
<span class="combi-form-label" :style="{ width: item.labelWidth ? item.labelWidth + labelPaddingRight + 'px' : '', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}</span>
<span class="combi-form-label" :style="{ width: item.labelWidth || labelWidth }">{{ item.label }}:</span>
</span>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span>
......@@ -138,7 +139,7 @@ export default {
},
defaultWidth: {
type: String,
default: '215px'
default: '432px'
},
formRef: {
type: String,
......@@ -151,7 +152,7 @@ export default {
labelWidth: {
type: Number,
// 默认是四个字符长度
default: 56
default: 154
},
labelPaddingRight: {
type: Number,
......@@ -415,7 +416,7 @@ export default {
display: inline-block;
width: 14px;
height: 14px;
margin-right: 12px;
margin-right: 0px !important;
vertical-align: middle;
cursor: pointer;
}
......
......@@ -3,7 +3,7 @@
<div class="edit-classify 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" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="selectProBtn" slot-scope="scope" class="select-pro">
<el-button type="default" @click="handleMutiProClose(scope)">{{ editForm.goodsRefList.length ? '更换商品' : '+选择商品' }}</el-button>
</div>
......
......@@ -5,7 +5,7 @@
<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" defaultWidth="320px" :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="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' }">
<p>
<img class="img-120" :src="editForm[scope.scope.name]" />
......
......@@ -3,7 +3,7 @@
<div class="edit-car 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" defaultWidth="320px" :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="labelWidth" :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>
......
......@@ -61,11 +61,11 @@
</div>
<!-- 快递信息 -->
<GLDialog v-if="isExpressVisible" title="输入快递信息" mode="small" okText="确定" cancelText="取消" :visible.sync="isExpressVisible" @onOk="handleExpressConfirm" @onCancel="handleExpressClose">
<glsx-combi-form class="small-content" ref="expressRef" labelWidth="100px" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="expressForm" :formData="expressFormData" :formRules="expressRules"></glsx-combi-form>
<glsx-combi-form class="small-content" ref="expressRef" defaultWidth="284px" :isBlock="true" :isEdit="isEdit" :formRef="editChildRef" :formObj="expressForm" :formData="expressFormData" :formRules="expressRules"></glsx-combi-form>
</GLDialog>
<!-- 订单核销 -->
<GLDialog v-if="isWriteOffVisible" title="订单核销(请确保用户到店后核销,避免引起不必要问题)" mode="small" okText="确定" cancelText="取消" :visible.sync="isWriteOffVisible" @onOk="handleWriteOffConfirm" @onCancel="handleWriteOffClose">
<glsx-combi-form class="small-content" ref="writeOffRef" labelWidth="100px" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="writeOffForm" :formData="writeOffFormData" :formRules="writeOffRules"></glsx-combi-form>
<glsx-combi-form class="small-content" ref="writeOffRef" defaultWidth="284px" :isBlock="true" :formRef="editChildRef" :formObj="writeOffForm" :formData="writeOffFormData" :formRules="writeOffRules"></glsx-combi-form>
</GLDialog>
<!-- 退款审核 -->
<GLDialog v-if="isExamineVisible" bigTitle="退款审核" mode="big" :visible.sync="isExamineVisible" @onOk="handleExamineConfirm" @onCancel="handleExamineClose">
......@@ -94,7 +94,7 @@
</el-radio-group>
</el-form-item>
<template v-if="orderInfo.refundType == 1 && examineForm.isAllowed == '1'">
<glsx-combi-form ref="examineRef" :isEdit="isEdit" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="examineForm" :formData="examineFormData" :formRules="examineRules"></glsx-combi-form>
<glsx-combi-form ref="examineRef" :isEdit="isEdit" defaultWidth="284px" :isBlock="true" :formRef="editChildRef" :formObj="examineForm" :formData="examineFormData" :formRules="examineRules"></glsx-combi-form>
</template>
</el-form>
</GLDialog>
......
......@@ -3,7 +3,7 @@
<div class="edit-share 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" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="selectPro" slot-scope="scope">
<el-button type="primary" @click="handleRelateProClose(scope)">{{ editForm.goodsId ? '更换' : '请选择' }}</el-button>
<div class="m-t-10" v-show="editForm.goodsId">
......
......@@ -10,7 +10,7 @@
<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" :isEdit="isEdit" :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>
......@@ -516,7 +516,7 @@ export default {
serviceDesc: ''
},
isEdit: true,
labelWidth: '144px',
labelWidth: '154px',
externalFormList: [
{
title: '基本信息',
......
......@@ -4,9 +4,9 @@
<div class="sop-base-info">
<div class="container m-b-20">
<p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :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="labelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="startDate">
<el-input class="w-320" :placeholder="!editForm.eventList.length ? '设置营销事件后自动补充' : editForm.startDate + (editForm.endDate ? ' - ' + editForm.endDate : '')" disabled></el-input>
<el-input class="w432" :placeholder="!editForm.eventList.length ? '设置营销事件后自动补充' : editForm.startDate + (editForm.endDate ? ' - ' + editForm.endDate : '')" disabled></el-input>
</div>
<div slot="customerInfoList" slot-scope="scope">
<div v-if="!scope.scope.isDisabled">
......
......@@ -3,7 +3,7 @@
<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" defaultWidth="320px" :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="labelWidth" :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>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!