|
@@ -0,0 +1,398 @@
|
|
|
|
|
+<!-- @desc:注册 @auth:常皓宁 @time:2024/8/5 13:04 -->
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="main-div" ref="mainDiv">
|
|
|
|
|
+ <!--加载中-->
|
|
|
|
|
+ <!-- 基本信息-->
|
|
|
|
|
+ <loading :loading="loading" v-if="!modalVisible"></loading>
|
|
|
|
|
+ <DkCollapse @on-change="changeCollapse" ref="collapse">
|
|
|
|
|
+ <DkPanel prop="essentialInformation">
|
|
|
|
|
+ <!-- 下拉区域 -->
|
|
|
|
|
+ <DkForm slot="content" ref="formInline" v-model="formData" :labelMaxWords=6>
|
|
|
|
|
+ <!--企业名称-->
|
|
|
|
|
+ <DkFormItem :required="true" prop="cpName">
|
|
|
|
|
+ <InputPop ref="cpName" v-model="formData.cpName"/>
|
|
|
|
|
+ </DkFormItem>
|
|
|
|
|
+ <!--负责人-->
|
|
|
|
|
+ <DkFormItem :required="true" prop="cpManager">
|
|
|
|
|
+ <InputPop ref="cpManager" v-model="formData.cpManager"/>
|
|
|
|
|
+ </DkFormItem>
|
|
|
|
|
+ <!--联系电话-->
|
|
|
|
|
+ <DkFormItem :required="true" prop="cpPhone">
|
|
|
|
|
+ <InputPop ref="cpPhone" v-model="formData.cpPhone" :telephone="true"/>
|
|
|
|
|
+ </DkFormItem>
|
|
|
|
|
+ <!--结束日期-->
|
|
|
|
|
+ <DkFormItem prop="endDate" :required="true" :data-type="$config.dataType.date">
|
|
|
|
|
+ <DatePickerPop v-model="formData.endDate" transfer
|
|
|
|
|
+ :placeholder="$t('inputWords',{'search-name':$t('endDate')})"
|
|
|
|
|
+ type="date" :short-cut-flag="true"/>
|
|
|
|
|
+ </DkFormItem>
|
|
|
|
|
+ <!--公司规模-->
|
|
|
|
|
+ <DkFormItem prop="cpSize">
|
|
|
|
|
+ <InputNumberPop ref="cpSize" v-model="formData.cpSize"/>
|
|
|
|
|
+ </DkFormItem>
|
|
|
|
|
+ <!--门店规模-->
|
|
|
|
|
+ <DkFormItem prop="shopSize">
|
|
|
|
|
+ <InputNumberPop ref="shopSize" v-model="formData.shopSize"/>
|
|
|
|
|
+ </DkFormItem>
|
|
|
|
|
+ <!--沟通反馈-->
|
|
|
|
|
+ <DkFormItem prop="feedback">
|
|
|
|
|
+ <InputPop ref="feedback" v-model="formData.feedback"/>
|
|
|
|
|
+ </DkFormItem>
|
|
|
|
|
+ </DkForm>
|
|
|
|
|
+ </DkPanel>
|
|
|
|
|
+ </DkCollapse>
|
|
|
|
|
+ <!-- 套餐信息-->
|
|
|
|
|
+ <DkCollapse @on-change="changeCollapse" ref="activity">
|
|
|
|
|
+ <DkPanel prop="activityInformation">
|
|
|
|
|
+ <DkForm slot="content" ref="formInline" v-model="activityTableForm">
|
|
|
|
|
+ <!--套餐-->
|
|
|
|
|
+ <div style="width: 100%;height: auto;margin-bottom: 15px;margin-top: 15px; margin-left: 20px;">
|
|
|
|
|
+ <div style="display:flex;flex-wrap: wrap;">
|
|
|
|
|
+ <div :class="(curentAdItem && curentAdItem.itemId == item.itemId)?'func-card-selected':'func-card'"
|
|
|
|
|
+ v-for="(item, index) in activityTable" :key="item.itemId" @click="chooseAdItem(item)">
|
|
|
|
|
+ <!-- 标题 -->
|
|
|
|
|
+ <div class="card-title">{{ item.activityItemName }}</div>
|
|
|
|
|
+ <!-- 价格-->
|
|
|
|
|
+ <div class="card-price">¥{{ item.stdPrice }}</div>
|
|
|
|
|
+ <!-- 描述-->
|
|
|
|
|
+ <div class="card-desc">{{ item.activityItemDescribe }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!--用户数-->
|
|
|
|
|
+ <div class="card-class" v-if="proFlag">
|
|
|
|
|
+ <!--用户数量-->
|
|
|
|
|
+ <div slot="title" style="display: flex;margin-left: 10px;color: #e00808">
|
|
|
|
|
+ <div>用户数量</div>
|
|
|
|
|
+ <div style="font-size: 10px;">(包含手机和电脑授权)</div>
|
|
|
|
|
+ <InputNumberPop style="width: 200px;margin-left: 10px;" v-model="staffCount.maxNum"
|
|
|
|
|
+ @on-change="(e)=>changeStaffCount(e,'all')"></InputNumberPop>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <span style="width: 100%;margin-left: 10px;">额外购买授权</span>
|
|
|
|
|
+
|
|
|
|
|
+ <!--手机用户数-->
|
|
|
|
|
+ <div slot="title" style="display: flex;margin-left: 10px;color: #e00808">
|
|
|
|
|
+ <div>手机端授权</div>
|
|
|
|
|
+ <div v-if="curentAdItem && curentAdItem.wxPrice" style="display: flex;font-size: 10px;">
|
|
|
|
|
+ <div style="font-size: 10px;margin-left: 2.5px;color: #e00808;height: 25px;">
|
|
|
|
|
+ (¥{{ curentAdItem.wxPrice }}/个)
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <InputNumberPop style="width: 200px;margin-left: 10px;" v-model="staffCount.wxMaxNum"
|
|
|
|
|
+ @on-change="(e)=>changeStaffCount(e,'wx')"></InputNumberPop>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!--电脑用户数-->
|
|
|
|
|
+ <div slot="title" style="display: flex;margin-left: 10px;color: #e00808">
|
|
|
|
|
+ <div>电脑端授权</div>
|
|
|
|
|
+ <div v-if="curentAdItem && curentAdItem.webPrice" style="display: flex;font-size: 10px;">
|
|
|
|
|
+ <div style="font-size: 10px;margin-left: 2.5px;color: #e00808;height: 20px;">
|
|
|
|
|
+ (¥{{ curentAdItem.webPrice }}/个)
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <InputNumberPop style="width: 200px;margin-left: 10px;" v-model="staffCount.webMaxNum"
|
|
|
|
|
+ @on-change="(e)=>changeStaffCount(e,'web')"></InputNumberPop>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!--合计-->
|
|
|
|
|
+ <div class="summary-class" v-if="proFlag && curentAdItem">
|
|
|
|
|
+ <div class="summary-item-class">订单详情:</div>
|
|
|
|
|
+ <div class="summary-item-class">{{ summaryInfo.amountInfo }}</div>
|
|
|
|
|
+ <div class="summary-item-class">截止日期:{{ summaryInfo.endDate }}</div>
|
|
|
|
|
+ <div class="summary-item-class" v-if="staffCount.maxNum || staffCount.webMaxNum || staffCount.wxMaxNum">
|
|
|
|
|
+ {{ summaryInfo.staffInfo }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="summary-item-class" style="display: flex;justify-content: flex-end;"
|
|
|
|
|
+ v-if="staffCount.maxNum || staffCount.webMaxNum || staffCount.wxMaxNum">
|
|
|
|
|
+ 折合
|
|
|
|
|
+ <div style="font-size: 14px;left: 5px;font-weight: bold;height: 45px;color: #FF7B1A">
|
|
|
|
|
+ {{ summaryInfo.priceInfo }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ /天/授权
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </DkForm>
|
|
|
|
|
+ </DkPanel>
|
|
|
|
|
+ </DkCollapse>
|
|
|
|
|
+
|
|
|
|
|
+ <span style="font-size: 16px;font-weight: bold;">
|
|
|
|
|
+ 注册须知:
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span style="display: flex;padding-top: 10px;">
|
|
|
|
|
+ 用于登录系统时显示公司信息。
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span style="display: flex">
|
|
|
|
|
+ 联系电话:用于登录系统。
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span style="display: flex">
|
|
|
|
|
+ 公司规模及门店规模:用于开通系统配置基础档案。
|
|
|
|
|
+ </span>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 下部分按钮区域-->
|
|
|
|
|
+ <DkSaveButton ref="saveButton" :loading="loading" @save="save" @close="close"></DkSaveButton>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+import {formMixin} from "@/mixins/form";
|
|
|
|
|
+
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: 'register',
|
|
|
|
|
+ components: {},
|
|
|
|
|
+ mixins: [formMixin],
|
|
|
|
|
+
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ activityTableForm: {},
|
|
|
|
|
+ activityTable: [],//功能
|
|
|
|
|
+ proFlag: false,
|
|
|
|
|
+ curentAdItem: {},
|
|
|
|
|
+ summaryInfo: {},
|
|
|
|
|
+ staffCount: {
|
|
|
|
|
+ maxNum: 1,
|
|
|
|
|
+ webMaxNum: 0,
|
|
|
|
|
+ wxMaxNum: 0
|
|
|
|
|
+ },
|
|
|
|
|
+ buyBeginDate: null,
|
|
|
|
|
+ formData: {
|
|
|
|
|
+ cpId: null,
|
|
|
|
|
+ cpName: null,
|
|
|
|
|
+ cpManager: null,
|
|
|
|
|
+ cpPhone: null,
|
|
|
|
|
+ cpSize: null,
|
|
|
|
|
+ shopSize: null,
|
|
|
|
|
+ feedback: null,
|
|
|
|
|
+ webMaxNum: null,
|
|
|
|
|
+ wxMaxNum: null,
|
|
|
|
|
+ endDate: null,
|
|
|
|
|
+ },
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 参数赋值
|
|
|
|
|
+ * @author : 常皓宁
|
|
|
|
|
+ * @date : 2024/8/7 10:09
|
|
|
|
|
+ */
|
|
|
|
|
+ setParams() {
|
|
|
|
|
+ this.formData.gradeCode = 'PRO'
|
|
|
|
|
+ this.params = {...this.formData}
|
|
|
|
|
+ if (this.formData.endDate) {
|
|
|
|
|
+ this.params.endDate = this.formData.endDate.format('yyyy-MM-dd')
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : desc
|
|
|
|
|
+ * @author : 常皓宁
|
|
|
|
|
+ * @date : 2024/4/30 14:17
|
|
|
|
|
+ */
|
|
|
|
|
+ saveData() {
|
|
|
|
|
+ return this.excute(this.$service.companyService, this.$service.companyService.insertCompany, this.params)
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 查询活动
|
|
|
|
|
+ * @author : 周兴
|
|
|
|
|
+ * @date : 2024/4/1
|
|
|
|
|
+ */
|
|
|
|
|
+ getActivity() {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ appCode: 'CP-WXP',
|
|
|
|
|
+ activityTypeList: ['活动分类-版本', '活动分类-功能'],
|
|
|
|
|
+ gradeCode: 'PRO',
|
|
|
|
|
+ }
|
|
|
|
|
+ this.excute(this.$service.outhActivityService, this.$service.outhActivityService.selectActivityItems, params).then(res => {
|
|
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
|
|
+ this.activityTable = res.data;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$Message.warning(res.message)
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 选择套餐
|
|
|
|
|
+ * @author : 常皓宁
|
|
|
|
|
+ * @date : 2024/8/7 11:14
|
|
|
|
|
+ */
|
|
|
|
|
+ chooseAdItem(item) {
|
|
|
|
|
+ this.proFlag = true
|
|
|
|
|
+ let summaryInfo = this.summaryInfo
|
|
|
|
|
+ // 计算截止日期
|
|
|
|
|
+ let months = item.validLong + item.extraLong
|
|
|
|
|
+ let endDate = new Date(this.buyBeginDate).addMonths(months)
|
|
|
|
|
+ summaryInfo.endDate = endDate.toDateStr();
|
|
|
|
|
+ this.curentAdItem = item
|
|
|
|
|
+ this.summaryInfo = summaryInfo
|
|
|
|
|
+ // 计算金额
|
|
|
|
|
+ this.countSummaryAmount(item);
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 修改用户数
|
|
|
|
|
+ * @author : 周兴
|
|
|
|
|
+ * @date : 2024/4/1
|
|
|
|
|
+ */
|
|
|
|
|
+ changeStaffCount(e, type) {
|
|
|
|
|
+ let staffCount = this.staffCount
|
|
|
|
|
+ if (type == 'wx') {
|
|
|
|
|
+ staffCount.wxMaxNum = e
|
|
|
|
|
+ } else if (type == 'web') {
|
|
|
|
|
+ staffCount.webMaxNum = e
|
|
|
|
|
+ } else {
|
|
|
|
|
+ staffCount.maxNum = e
|
|
|
|
|
+ }
|
|
|
|
|
+ this.staffCount = staffCount
|
|
|
|
|
+ // 计算金额
|
|
|
|
|
+ this.countSummaryAmount();
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 计算金额
|
|
|
|
|
+ * @author : 周兴
|
|
|
|
|
+ * @date : 2024/4/1
|
|
|
|
|
+ */
|
|
|
|
|
+ countSummaryAmount() {
|
|
|
|
|
+ let item = this.curentAdItem;
|
|
|
|
|
+ let staffCount = this.staffCount;
|
|
|
|
|
+ let summaryInfo = this.summaryInfo
|
|
|
|
|
+ let amount = 0;
|
|
|
|
|
+ // 先清空
|
|
|
|
|
+ summaryInfo.amountInfo = '';
|
|
|
|
|
+ // 共通用户
|
|
|
|
|
+ if (staffCount.maxNum) {
|
|
|
|
|
+ summaryInfo.amountInfo = item.stdPrice + '(打包价格)*' + staffCount.maxNum
|
|
|
|
|
+ amount += item.stdPrice * staffCount.maxNum
|
|
|
|
|
+ }
|
|
|
|
|
+ // 手机端用户
|
|
|
|
|
+ if (staffCount.wxMaxNum) {
|
|
|
|
|
+ if (summaryInfo.amountInfo) {
|
|
|
|
|
+ summaryInfo.amountInfo += ' + '
|
|
|
|
|
+ }
|
|
|
|
|
+ summaryInfo.amountInfo += item.wxPrice + '(手机端价格)*' + staffCount.wxMaxNum
|
|
|
|
|
+ amount += item.wxPrice * staffCount.wxMaxNum
|
|
|
|
|
+ }
|
|
|
|
|
+ // 电脑端用户
|
|
|
|
|
+ if (staffCount.webMaxNum) {
|
|
|
|
|
+ if (summaryInfo.amountInfo) {
|
|
|
|
|
+ summaryInfo.amountInfo += ' + '
|
|
|
|
|
+ }
|
|
|
|
|
+ summaryInfo.amountInfo += item.webPrice + '(电脑端价格)*' + staffCount.webMaxNum
|
|
|
|
|
+ amount += item.webPrice * staffCount.webMaxNum
|
|
|
|
|
+ }
|
|
|
|
|
+ if (summaryInfo.amountInfo) {
|
|
|
|
|
+ summaryInfo.amountInfo += ' = ' + amount + '(元)'
|
|
|
|
|
+ summaryInfo.amount = amount;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.summaryInfo = summaryInfo
|
|
|
|
|
+ // 统计两端用户数
|
|
|
|
|
+ this.countStaffInfo();
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 统计电脑端和手机端的用户数
|
|
|
|
|
+ * @author : 周兴
|
|
|
|
|
+ * @date : 2024/4/1
|
|
|
|
|
+ */
|
|
|
|
|
+ countStaffInfo() {
|
|
|
|
|
+ let summaryInfo = this.summaryInfo;
|
|
|
|
|
+ let staffCount = this.staffCount;
|
|
|
|
|
+ if (!staffCount) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ let webNum = staffCount.webMaxNum + staffCount.maxNum
|
|
|
|
|
+ let wxNum = staffCount.wxMaxNum + staffCount.maxNum
|
|
|
|
|
+ summaryInfo.staffInfo = '可配置手机端授权' + wxNum + '个;电脑端授权' + webNum + '个(包含当前用户)'
|
|
|
|
|
+ summaryInfo.webMaxNum = webNum
|
|
|
|
|
+ summaryInfo.wxMaxNum = wxNum
|
|
|
|
|
+ let buyBeginDate = new Date(this.buyBeginDate);
|
|
|
|
|
+ summaryInfo.buyBeginDate = buyBeginDate.toDateStr();
|
|
|
|
|
+ summaryInfo.extendDays = Math.ceil(Math.abs(new Date(summaryInfo.endDate).getTime() - buyBeginDate.getTime()) / (1000 * 3600 * 24));
|
|
|
|
|
+ // 计算一授权一天的单价
|
|
|
|
|
+ let price = (summaryInfo.amount / (webNum + wxNum) / summaryInfo.extendDays).toFixed(2);
|
|
|
|
|
+ summaryInfo.priceInfo = price
|
|
|
|
|
+ this.summaryInfo = summaryInfo
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 加载数据
|
|
|
|
|
+ * @author : 常皓宁
|
|
|
|
|
+ * @date : 2024/4/30 9:02
|
|
|
|
|
+ */
|
|
|
|
|
+ initData() {
|
|
|
|
|
+ this.getActivity()
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+.func-card-selected {
|
|
|
|
|
+ margin: 15px 1.15%;
|
|
|
|
|
+ width: 10.5%;
|
|
|
|
|
+ height: 100px;
|
|
|
|
|
+ background: #FCF0DD;
|
|
|
|
|
+ border-radius: 19px;
|
|
|
|
|
+ border: 3px solid #CE9965;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.func-card {
|
|
|
|
|
+ margin: 15px 1.15%;
|
|
|
|
|
+ width: 10.5%;
|
|
|
|
|
+ height: 100px;
|
|
|
|
|
+ background: #EEEEEE;
|
|
|
|
|
+ border-radius: 19px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.card-title {
|
|
|
|
|
+ margin-top: 10px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ color: #1B365D;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.card-desc {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ color: #95A8CB;
|
|
|
|
|
+ font-size: 11px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.card-price {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ color: #FF7B1A;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.card-class {
|
|
|
|
|
+ margin: 0 30px;
|
|
|
|
|
+ border-radius: 16px;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.summary-class {
|
|
|
|
|
+ margin: 0 30px;
|
|
|
|
|
+ margin-top: 30px;
|
|
|
|
|
+ padding: 10px 20px;
|
|
|
|
|
+ border-radius: 16px;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ color: #CE9965;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.summary-item-class {
|
|
|
|
|
+ margin: 8px 0;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|