|
|
|
@ -207,10 +207,10 @@ const throttledHandleConsumeFormt = _.throttle(handleConsumeForm, 5000, { |
|
|
|
<template> |
|
|
|
<div class="userAndform"> |
|
|
|
<div class="left"> |
|
|
|
<el-form :model="consumeForm" :rules="rules" ref="formRef" label-width="auto" style="min-width: 420px" |
|
|
|
<el-form :model="consumeForm" :rules="rules" ref="formRef" label-width="auto" style="max-width: 600px" |
|
|
|
class="add-form"> |
|
|
|
<el-form-item prop="jwcode" label="精网号" label-position="left"> |
|
|
|
<el-input v-model="consumeForm.jwcode" style="width: 200px" /> |
|
|
|
<el-input v-model="consumeForm.jwcode" style="width: 220px" /> |
|
|
|
<el-button type="primary" @click="getUser(consumeForm.jwcode)" style="margin-left: 20px">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="permanentBean" label="付费金豆" label-position="left"> |
|
|
|
@ -223,43 +223,45 @@ const throttledHandleConsumeFormt = _.throttle(handleConsumeForm, 5000, { |
|
|
|
<el-input v-model="consumeForm.remark" style="width: 300px" :rows="5" maxlength="100" show-word-limit |
|
|
|
type="textarea" /> |
|
|
|
</el-form-item> |
|
|
|
<el-button @click="deleteConsumeForm" style="margin-left: 280px" type="success">重置</el-button> |
|
|
|
<el-button type="primary" :disabled="addDisabled" @click="handleConsumeForm"> 提交 </el-button> |
|
|
|
<el-button @click="deleteConsumeForm" style="margin-left: 8.5vw;margin-top:1vw" type="success">重置</el-button> |
|
|
|
<el-button type="primary" :disabled="addDisabled" @click="handleConsumeForm" style="margin-top:1vw"> 提交 |
|
|
|
</el-button> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 客户信息栏 --> |
|
|
|
<div class="right"> |
|
|
|
<!-- 客户信息栏 --> |
|
|
|
<el-card v-if="user.jwcode" class="customer-info"> |
|
|
|
<el-form :model="user" label-width="auto" label-position="left"> |
|
|
|
<el-text size="large" style="margin-left: 7vw">客户信息</el-text> |
|
|
|
<!-- 第一行:姓名 + 当前付费金豆 --> |
|
|
|
<div style="margin-top: 0.5vw;display:flex;"> |
|
|
|
<p style="width:6vw;">姓名:</p> |
|
|
|
<p style="color: #2fa1ff;width:6vw;">{{ user.name }}</p> |
|
|
|
<p style="width:7vw;">当前付费金豆:</p> |
|
|
|
<p v-if="!isNaN(Number(user.permanentBean))" style="color: #2fa1ff;">{{ Number(user.permanentBean) }}</p> |
|
|
|
<!-- 如果不是有效的数字,显示默认值 --> |
|
|
|
<p v-else></p> |
|
|
|
</div> |
|
|
|
<el-form :model="user" label-width="auto" label-position="left"> |
|
|
|
<el-text size="large" style="margin-left: 7vw">客户信息</el-text> |
|
|
|
<!-- 第一行:姓名 + 当前付费金豆 --> |
|
|
|
<div style="margin-top: 0.5vw;display:flex;"> |
|
|
|
<p style="width:6vw;">姓名:</p> |
|
|
|
<p style="color: #2fa1ff;width:6vw;">{{ user.name }}</p> |
|
|
|
<p style="width:7vw;">当前付费金豆:</p> |
|
|
|
<p v-if="!isNaN(Number(user.permanentBean))" style="color: #2fa1ff;">{{ Number(user.permanentBean) }}</p> |
|
|
|
<!-- 如果不是有效的数字,显示默认值 --> |
|
|
|
<p v-else></p> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 第二行:精网号 + 免费金豆 --> |
|
|
|
<div style="display:flex;margin-top: 2vw;"> |
|
|
|
<p style="width:6vw;">精网号:</p> |
|
|
|
<p style="color: #2fa1ff;width:6vw;">{{ user.jwcode }}</p> |
|
|
|
<p style="width:7vw;">当前免费金豆:</p> |
|
|
|
<p v-if="user.freeBean !== undefined" style="color: #2fa1ff;">{{ user.freeBean }}</p> |
|
|
|
</div> |
|
|
|
<!-- 第二行:精网号 + 免费金豆 --> |
|
|
|
<div style="display:flex"> |
|
|
|
<p style="width:6vw;">精网号:</p> |
|
|
|
<p style="color: #2fa1ff;width:6vw;">{{ user.jwcode }}</p> |
|
|
|
<p style="width:7vw;">当前免费金豆:</p> |
|
|
|
<p v-if="user.freeBean !== undefined" style="color: #2fa1ff;">{{ user.freeBean }}</p> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 第三行:消费次数 + 所属门店 --> |
|
|
|
<div style="display:flex;margin-top: 2vw;"> |
|
|
|
<p style="width:6vw;">所属门店:</p> |
|
|
|
<p style="color: #2fa1ff;width:6vw;">{{ user.market }}</p> |
|
|
|
<p style="width:7vw;">消耗金豆总数:</p> |
|
|
|
<p style="color: #2fa1ff;" v-if="user.consumeSum != null">{{ user.consumeSum }}</p> |
|
|
|
<p style="color: #2fa1ff;" v-else>{{ 0 }}</p> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
</el-card> |
|
|
|
<!-- 第三行:消费次数 + 所属门店 --> |
|
|
|
<div style="display:flex"> |
|
|
|
<p style="width:6vw;">所属门店:</p> |
|
|
|
<p style="color: #2fa1ff;width:6vw;">{{ user.market }}</p> |
|
|
|
<p style="width:7vw;">消耗金豆总数:</p> |
|
|
|
<p style="color: #2fa1ff;" v-if="user.consumeSum != null">{{ user.consumeSum }}</p> |
|
|
|
<p style="color: #2fa1ff;" v-else>{{ 0 }}</p> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -268,13 +270,14 @@ const throttledHandleConsumeFormt = _.throttle(handleConsumeForm, 5000, { |
|
|
|
width: 80vw; |
|
|
|
height: 80vh; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
|
|
|
|
.left { |
|
|
|
width: 35%; |
|
|
|
width: 35vw; |
|
|
|
height: 80vh; |
|
|
|
display: flex; |
|
|
|
|
|
|
|
.add-form { |
|
|
|
width: 40vw; |
|
|
|
margin-top: 5vh; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -282,7 +285,7 @@ const throttledHandleConsumeFormt = _.throttle(handleConsumeForm, 5000, { |
|
|
|
.right { |
|
|
|
flex: 1; |
|
|
|
display: flex; |
|
|
|
margin-left: 10%; |
|
|
|
float: left; |
|
|
|
|
|
|
|
.customer-info { |
|
|
|
width: 35vw; |
|
|
|
@ -293,12 +296,4 @@ const throttledHandleConsumeFormt = _.throttle(handleConsumeForm, 5000, { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
p { |
|
|
|
margin: 0px; |
|
|
|
} |
|
|
|
|
|
|
|
.el-form-item { |
|
|
|
margin-left: 5vw; |
|
|
|
} |
|
|
|
</style> |