Kaynağa Gözat

Merge branch 'dev' of http://159.75.201.17:3000/zwq/tuanfeng-pc-admin into dev

GuYun-D 8 ay önce
ebeveyn
işleme
151af779cb

+ 22 - 22
src/views/active/combinationActivityConfiguration/components/EditModal.vue

@@ -46,8 +46,8 @@
         </el-select>
       </el-form-item>
       <el-form-item
-        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1)" label="关联佣金配置"
-        prop="ruleId"
+        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1)"
+        label="关联佣金配置" prop="ruleId"
       >
         <el-select v-model="formData.ruleId" clearable size="mini" placeholder="请选择关联佣金配置" filterable>
           <el-option
@@ -66,23 +66,23 @@
         </el-select>
       </el-form-item>
       <el-form-item
-        v-if="[1, 2, 3, 4, 5, 6, 7].includes(formData.configType) && (formData.joinRole === 1)" label="参与值"
-        prop="joinMoney"
+        v-if="[1, 2, 3, 4, 5, 6, 7].includes(formData.configType) && (formData.joinRole === 1) && (formData.joinRule === 1)"
+        label="固定分配佣金总额" prop="commissionPrice"
       >
-        <el-input v-model="formData.joinMoney" placeholder="请输入商家参与活动金额或价格比例" style="width: 250px;">
+        <el-input v-model="formData.commissionPrice" placeholder="请输入固定分配佣金总额" style="width: 250px;">
           <template #append>
-            <div v-if="formData.joinRule === 1">元</div>
-            <div v-else-if="formData.joinRule === 2">%</div>
+            <div>元</div>
           </template>
         </el-input>
       </el-form-item>
       <el-form-item
-        v-if="[1, 2, 3, 4, 5, 6, 7].includes(formData.configType) && (formData.joinRole === 1)" label="固定分配佣金总额"
-        prop="commissionPrice"
+        v-if="[1, 2, 3, 4, 5, 6, 7].includes(formData.configType) && (formData.joinRole === 1)" label="参与值"
+        prop="joinMoney"
       >
-        <el-input v-model="formData.commissionPrice" placeholder="请输入固定分配佣金总额" style="width: 250px;">
+        <el-input v-model="formData.joinMoney" placeholder="请输入商家参与活动金额或价格比例" style="width: 250px;">
           <template #append>
-            <div>元</div>
+            <div v-if="formData.joinRule === 1">元</div>
+            <div v-else-if="formData.joinRule === 2">%</div>
           </template>
         </el-input>
       </el-form-item>
@@ -102,12 +102,12 @@
         label="是否发送卡包" prop="isCardHolder"
       >
         <el-radio-group v-model="formData.isCardHolder">
-          <el-radio :label="1">是</el-radio>
-          <el-radio :label="0">否</el-radio>
+          <el-radio :label="true">是</el-radio>
+          <el-radio :label="false">否</el-radio>
         </el-radio-group>
       </el-form-item>
       <el-form-item
-        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && (formData.isCardHolder === 1)"
+        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && formData.isCardHolder"
         label="卡券类型" prop="cardType"
       >
         <el-select v-model="formData.cardType" clearable size="mini" placeholder="请选择卡券类型">
@@ -117,7 +117,7 @@
         </el-select>
       </el-form-item>
       <el-form-item
-        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && (formData.isCardHolder === 1)"
+        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && formData.isCardHolder"
         label="卡券类型规则" prop="cardRule"
       >
         <el-radio-group v-model="formData.cardRule">
@@ -126,7 +126,7 @@
         </el-radio-group>
       </el-form-item>
       <el-form-item
-        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && (formData.isCardHolder === 1)"
+        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && formData.isCardHolder"
         label="卡包价格规则" prop="cardMoney"
       >
         <el-input v-model="formData.cardMoney" placeholder="请输入卡包价格规则" style="width: 250px;">
@@ -141,7 +141,7 @@
         </el-input>
       </el-form-item>
       <el-form-item
-        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && (formData.isCardHolder === 1)"
+        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && formData.isCardHolder"
         label="卡券发放数量" prop="cardNum"
       >
         <el-input v-model="formData.cardNum" placeholder="请输入卡券发放数量" style="width: 200px;">
@@ -151,7 +151,7 @@
         </el-input>
       </el-form-item>
       <el-form-item
-        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && (formData.isCardHolder === 1)"
+        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && formData.isCardHolder"
         label="卡券有效期" prop="cardEffectiveTime"
       >
         <el-input v-model="formData.cardEffectiveTime" placeholder="请输入卡券有效期" style="width: 200px;">
@@ -161,7 +161,7 @@
         </el-input>
       </el-form-item>
       <el-form-item
-        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && (formData.isCardHolder === 1)"
+        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && formData.isCardHolder"
         label="卡券使用范围" prop="cardRange"
       >
         <el-select v-model="formData.cardRange" clearable size="mini" placeholder="请选择卡券使用范围">
@@ -170,7 +170,7 @@
         </el-select>
       </el-form-item>
       <el-form-item
-        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && (formData.isCardHolder === 1) && (formData.cardRange === 1)"
+        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && formData.isCardHolder && (formData.cardRange === 1)"
         label="卡券指定区域" prop="cardRange"
       >
         <el-cascader
@@ -180,7 +180,7 @@
         <div v-if="String(formData.cardJson)">已选ID:{{ formData.cardJson }}</div>
       </el-form-item>
       <el-form-item
-        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && (formData.isCardHolder === 1)"
+        v-if="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(formData.configType) && (formData.joinRole === 1) && formData.isCardHolder"
         label="业务json字段" prop="cardBusinessFields"
       >
         <el-input
@@ -331,7 +331,7 @@ export default {
           joinRule: res.data.joinRule || '',
           roleType: res.data.roleType || '',
           joinMoney: (res.data.joinRule === 2) && (typeof res.data.joinMoney === 'number') ? res.data.joinMoney * 100 : res.data.joinMoney,
-          commissionPrice: '',
+          commissionPrice: res.data.commissionPrice || '',
           ruleId: res.data.ruleId || '',
           isCardHolder: res.data.isCardHolder,
           cardType: res.data.cardType || '',

+ 0 - 578
src/views/member/memberList/details.vue

@@ -1,578 +0,0 @@
-<template>
-  <el-dialog title="详情" width="80%" :visible.sync="visible" :close-on-click-modal="false" @close="closeModalDetail">
-    <div class="custom_info_page">
-      <h2>客户信息</h2>
-      <div class="custom_info">
-        <div class="info_item">
-          <img :src="userObj.headImage" alt>
-        </div>
-        <div class="info_item">
-          <ul>
-            <li v-for="(item, index) in infoList" :key="index">
-              <p>
-                <span>{{ item.name }} :</span>
-                <span>{{ item.value }}</span>
-              </p>
-            </li>
-          </ul>
-        </div>
-      </div>
-      <div class="custom_tag">
-        <h2>客户标签</h2>
-        <div class="Tag">
-          <p v-for="(item, index) in tagList" :key="index">{{ item.tagName }}</p>
-          <p @click="addTag">贴标签</p>
-        </div>
-      </div>
-      <div class="custom_data">
-        <h2>消费数据</h2>
-        <div class="data_list">
-          <p>
-            <span>
-              下 单 数:
-              <font>{{ userObj.orders }}</font>
-            </span>
-            支付成功数:
-            <font>{{ userObj.pays }}</font>
-          </p>
-          <p>
-            <span>
-              售后次数:
-              <font>{{ userObj.afters }}</font>
-            </span>
-            售后单数:
-            <font>{{ userObj.afterOrders }}</font>
-          </p>
-        </div>
-        <div class="tab_list">
-          <p
-            v-for="(item, index) in tabList" :key="index" :class="[ { active: componentName === item.componentName } ]"
-            @click="changeTab(item)"
-          >
-            {{ item.tabName }}
-          </p>
-        </div>
-      </div>
-      <div v-if="componentName === 'order'">
-        <el-form :inline="true" :model="userForm" class="demo-form-inline">
-          <el-form-item label="订单编号">
-            <el-input v-model="userForm.orderFormid" maxlength="20" placeholder="请输入订单编号" />
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" plain @click="searchOrders">查询</el-button>
-          </el-form-item>
-        </el-form>
-        <el-table
-          :data="userObj.orderList" border :header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
-          style="width: 100%"
-        >
-          <el-table-column prop="orderFormid" label="订单编号" />
-          <el-table-column prop="shopName" label="店铺名称" />
-          <el-table-column prop="products" label="商品数量">
-            <template slot-scope="scope">
-              <span>{{ scope.row.products }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column prop="price" label="订单金额(元)" />
-          <el-table-column label="状态">
-            <template slot-scope="scope">
-              <span v-if="scope.row.state === 1">待付款</span>
-              <span v-if="scope.row.state === 2">待发货</span>
-              <span v-if="scope.row.state === 3">待收货</span>
-              <span v-if="scope.row.state === 4">已完成</span>
-              <span v-if="scope.row.state === 5">已关闭</span>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <div v-if="componentName === 'comment'">
-        <el-table
-          :data="userObj.comments" border :header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
-          style="width: 100%"
-        >
-          <el-table-column prop="shopName" label="店铺名称" />
-          <el-table-column prop="productName" label="商品名称" />
-          <el-table-column prop="comments" label="评论">
-            <template slot-scope="scope">
-              <el-button type="text" @click="seeComment(scope.row.commentId)">查看</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <div v-if="componentName === 'addressInfo'">
-        <el-table
-          :data="userObj.receives" border :header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
-          style="width: 100%"
-        >
-          <el-table-column prop="receiveName" label="姓名" />
-          <el-table-column prop="receivePhone" label="电话" />
-          <el-table-column prop="receiveAdress" label="地址">
-            <template slot-scope="scope">
-              <span>{{ scope.row.receiveAdress }}{{ scope.row.address }}</span>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <!-- *************对话框开始************* -->
-      <!-- 打标签 -->
-      <el-dialog
-        title="选择标签" :visible.sync="addFormDialog" width="30%" append-to-body
-        center
-        :close-on-click-modal="false"
-      >
-        <div>
-          <!-- 表单搜索 -->
-          <el-form :inline="true" :model="tipsForm" class="demo-form-inline">
-            <el-form-item label="标签名称">
-              <el-input v-model="tipsForm.labelName" maxlength="20" placeholder="请输入标签名称" />
-            </el-form-item>
-            <el-form-item>
-              <el-button @click="searchTips">查询</el-button>
-            </el-form-item>
-            <el-form-item>
-              <el-button type="text" @click="runTips">管理标签</el-button>
-            </el-form-item>
-          </el-form>
-          <!-- 多选 -->
-          <el-checkbox-group v-model="checkList">
-            <el-checkbox
-              v-for="(item, index) in tipsList" :key="index" class="checkBoxStyle"
-              :label="item.buyerLabelId"
-            >
-              {{ item.labelName }}
-            </el-checkbox>
-          </el-checkbox-group>
-        </div>
-        <template #footer>
-          <span class="dialog-footer">
-            <el-button @click="addFormDialog = false">取 消</el-button>
-            <el-button type="primary" @click="saveTips">确定</el-button>
-          </span>
-        </template>
-      </el-dialog>
-      <!-- 查看评论弹框 -->
-      <el-dialog
-        title="评论详情" :visible.sync="comDialogVisible" :close-on-click-modal="false" :before-close="handleClose"
-        width="60%" center :append-to-body="true"
-      >
-        <div class="pinStyle">
-          <div class="comment">
-            <div class="com_left">评论:</div>
-            <div class="com_right">{{ commentDetails.comment }}</div>
-          </div>
-          <div v-if="commentDetails.images.length != 0" class="comment_imgList">
-            <div class="img_left">图片:</div>
-            <div class="imgList">
-              <el-image
-                v-for="(item, index) in commentDetails.images" :key="index" :src="item"
-                :preview-src-list="commentDetails.images"
-              />
-            </div>
-          </div>
-          <div class="comment">
-            <div v-if="commentDetails.addComment != ''" class="com_left">追评:</div>
-            <div class="com_right">{{ commentDetails.addComment }}</div>
-          </div>
-          <div v-if="commentDetails.addImages.length != 0" class="comment_imgList">
-            <div class="img_left">图片</div>
-            <div class="imgList">
-              <el-image
-                v-for="(item, index) in commentDetails.addImages" :key="index" :src="item"
-                :preview-src-list="commentDetails.addImages"
-              />
-            </div>
-          </div>
-        </div>
-        <template #footer>
-          <span class="dialog-footer">
-            <el-button v-if="comState" @click="toShow">允许展示</el-button>
-            <el-button v-else @click="noneShow">隐藏</el-button>
-            <el-button type="primary" @click="delCom">删除</el-button>
-          </span>
-        </template>
-      </el-dialog>
-    </div>
-    <template #footer>
-      <div class="dialog-footer">
-        <el-button type="text" @click="doCancel">取消</el-button>
-        <el-button type="primary" @click="doSubmit">确认</el-button>
-      </div>
-    </template>
-  </el-dialog>
-</template>
-
-<script>
-import { customerMageGetById, getLabels, customerSaveUserLabel } from '@/api/customerMage'
-import { commentSysGetById, commentSysUpdate, commentSysDelete, commentAllow } from '@/api/comment'
-export default {
-  name: 'Details',
-  data() {
-    return {
-      visible: false,
-      infoList: [
-        { name: '用户昵称', value: '', fields: 'name' },
-        { name: '手 机 号', value: '', fields: 'phone' },
-        { name: '性  别', value: '', fields: 'sex' },
-        { name: '注册时间', value: '', fields: 'createTime' },
-        { name: '生   日', value: '', fields: 'birthday' }
-      ],
-      tagList: [],
-      tabList: [
-        { tabName: 'TA的订单', componentName: 'order' },
-        { tabName: 'TA的评论', componentName: 'comment' },
-        { tabName: 'TA的收货地址', componentName: 'addressInfo' }
-      ],
-      componentName: 'order',
-      customData: {},
-      dialog: {},
-      user: '',
-      userObj: {},
-      tipsForm: {
-        labelName: ''
-      },
-      userForm: {
-        orderFormid: ''
-      },
-      checkList: [],
-      tipsList: [],
-      comDialogVisible: false,
-      commentDetails: { images: [], addImages: [] },
-      commentId: '',
-      comState: 1 // 是否隐藏 1-是 0-否
-    }
-  },
-  // created () {
-  //   this.user = this.$route.params
-  //   console.log(this.user)
-  //   this.getUser(this.user)
-  // },
-  methods: {
-    // 允许展示
-    async toShow() {
-      const res = await commentAllow({
-        commentId: this.commentId,
-        state: 1
-      })
-      if (res.code === '') {
-        this.$message.success('成功')
-        this.comDialogVisible = false
-        this.comState = 0
-        this.getUser(this.user)
-      }
-    },
-    // 隐藏
-    async noneShow() {
-      const res = await commentSysUpdate({
-        commentId: this.commentId,
-        state: 0
-      })
-      if (res.code === '') {
-        this.comState = 1
-        this.$message.success('隐藏成功')
-        this.comDialogVisible = false
-        this.getUser(this.user)
-      }
-    },
-    // 删除
-    async delCom() {
-      const res = await commentSysDelete({
-        commentId: this.commentId
-      })
-      if (res.code === '') {
-        this.$message.success('删除成功')
-        this.comDialogVisible = false
-        this.getUser(this.user)
-      }
-    },
-    // 评论详情
-    async seeComment(commentId) {
-      this.comDialogVisible = true
-      const res = await commentSysGetById({ commentId })
-      this.commentId = commentId
-      this.commentDetails = res.data
-    },
-    handleClose() {
-      this.comDialogVisible = false
-    },
-    closeModalDetail() {
-      this.comState = 1
-      this.componentName = 'order'
-    },
-    // 查询订单
-    searchOrders() {
-      this.user.orderFormid = this.userForm.orderFormid
-      this.getUser(this.user)
-    },
-    // 查询标签
-    searchTips() {
-      console.log(this.tipsForm)
-      this.getSelect({ labelName: this.tipsForm.labelName })
-    },
-    // 跳转标签页面
-    runTips() {
-      this.$router.push({
-        path: '/member/tips'
-      })
-    },
-    changeTab(item) {
-      this.componentName = item.componentName
-    },
-    // 客户详情
-    async getUser(obj) {
-      this.user = obj
-      const res = await customerMageGetById({
-        buyerUserId: obj.buyerUserId,
-        orderFormid: obj.orderFormid
-      })
-      this.userObj = res.data
-      this.visible = true
-      this.getInfoList(this.userObj)
-    },
-    // 获取客户信息
-    getInfoList(ob) {
-      this.infoList.map((item) => {
-        // console.log(item)
-        item.value = ob[item.fields] || ''
-        if (item.fields === 'sex') {
-          item.value = item.value === '1' ? '男' : '女'
-        }
-      })
-    },
-    // 初始化查询所有标签
-    async getSelect(name) {
-      const res = await getLabels(name)
-      this.tipsList = res.data
-    },
-    doCancel() {
-      this.visible = false
-    },
-    doSubmit() {
-      this.visible = false
-      this.$emit('success')
-    }
-  }
-}
-</script>
-
-<style lang='scss' scoped>
-// 评论详情
-.comment_manage_page {
-	padding: 20px;
-}
-
-.pinStyle {
-	.comment {
-		margin-bottom: 20px;
-		display: flex;
-		align-items: center;
-
-		.com_left {
-			font-size: 20px;
-			color: #333333;
-			margin-right: 20px;
-		}
-
-		.com_right {
-			font-size: 18px;
-			color: #333333;
-		}
-	}
-
-	.comment_imgList {
-		display: flex;
-		margin-bottom: 20px;
-		align-items: flex-start;
-
-		.img_left {
-			font-size: 20px;
-			color: #333333;
-			margin-right: 20px;
-			width: 60px;
-		}
-
-		.imgList {
-			display: flex;
-			justify-content: flex-start;
-			align-items: center;
-			flex-wrap: wrap;
-
-			.el-image {
-				width: 200px;
-				height: 134px;
-				border-radius: 4px;
-				margin-right: 20px;
-				margin-bottom: 20px;
-			}
-		}
-	}
-
-	// .line {
-	//   width: 890px;
-	//   height: 1px;
-	//   background: #e0e5eb;
-	//   margin: 0 auto;
-	//   margin-bottom: 33px;
-	// }
-	// .addComment {
-	//   font-size: 20px;
-	//   color: #ff7911;
-	//   margin-bottom: 20px;
-	// }
-}
-
-//
-h2 {
-	font-size: 24px;
-	font-weight: 500;
-	position: relative;
-
-	&::before {
-		content: "";
-		height: 24px;
-		width: 4px;
-		background-color: #3a68f2;
-		position: absolute;
-		left: -10px;
-		top: 2px;
-		display: block;
-	}
-}
-
-.custom_info_page {
-	margin-top: 20px;
-	padding: 20px 100px;
-	background-color: #fff;
-	min-height: 500px;
-
-	.custom_info {
-		margin-bottom: 30px;
-		display: flex;
-		align-items: center;
-
-		.info_item {
-			&:nth-child(1) {
-				height: 180px;
-				width: 100px;
-
-				img {
-					width: 100px;
-					height: 100px;
-					border-radius: 50px;
-					text-align: center;
-					margin-top: 40px;
-				}
-			}
-
-			&:nth-child(2) {
-				margin-left: 100px;
-
-				ul {
-					overflow: hidden;
-					list-style: none;
-
-					li {
-						float: left;
-						width: 50%;
-
-						p {
-							font-size: 16px;
-							color: #333;
-							line-height: 40px;
-
-							span:nth-child(2) {
-								color: #666;
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	.custom_tag {
-		margin-bottom: 30px;
-
-		.Tag {
-			padding-top: 20px;
-		}
-
-		p {
-			display: inline-block;
-			background-color: #d8e1fc;
-			font-size: 16px;
-			color: #333;
-			text-align: center;
-			// margin-right: 20px;
-			border-radius: 4px;
-			padding: 8px 15px;
-
-			&:last-child {
-				background-color: #fff;
-				color: #3a68f2;
-
-				&:hover {
-					cursor: pointer;
-				}
-			}
-		}
-	}
-
-	.custom_data {
-		.data_list {
-			padding: 20px 0 40px 0;
-
-			p {
-				font-size: 16px;
-				line-height: 40px;
-
-				font {
-					color: #666;
-				}
-
-				span {
-					display: inline-block;
-					width: 200px;
-				}
-			}
-		}
-
-		.tab_list {
-			overflow: hidden;
-			margin-bottom: 20px;
-
-			p {
-				float: left;
-				padding: 0 50px;
-				font-size: 16px;
-				border: 1px #e0e5eb solid;
-				box-sizing: border-box;
-				color: #999999;
-				height: 48px;
-				line-height: 48px;
-
-				&:nth-child(-n + 2) {
-					border-right: 0;
-				}
-
-				&:nth-child(1) {
-					border-radius: 4px 0 0 4px;
-				}
-
-				&:nth-child(3) {
-					border-radius: 0 4px 4px 0;
-				}
-
-				&:hover {
-					cursor: pointer;
-				}
-			}
-
-			.active {
-				background-color: #3a68f2;
-				color: #fff;
-				border: 0;
-			}
-		}
-	}
-}
-</style>