liujq 4 vuotta sitten
vanhempi
commit
ee62ec9bec

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/index.html


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/chunk-091f6622.831af1b2.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/chunk-20b9c376.ea500408.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/chunk-703472c8.26133b79.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/chunk-e61afeb4.54e6e72f.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/app.3147ac8d.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/app.89be33e7.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/chunk-07fc91a6.e9d7ac51.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/chunk-091f6622.f7e9d15c.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/chunk-20b9c376.1dce7255.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/chunk-26ec3452.a978a4c1.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/chunk-703472c8.2b0c5081.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/chunk-797afc06.a6f5736a.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/chunk-99416556.2ba60a0c.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/chunk-e61afeb4.7ded6214.js


+ 30 - 0
src/api/house.js

@@ -136,4 +136,34 @@ export default {
   admestatelotterychange: params => { // 摇号 - 摇号公示变更
     return getRequestNoSort('/adm/estate/lottery/change', params, 'loading')
   },
+  admestatelottery2detail: params => { // 摇号期数 - 详情
+    return getRequestNoSort('/adm/estate/lottery2/detail', params, 'loading')
+  },
+  admestatelottery2add: params => { // 摇号期数 - 添加
+    return getRequestNoSort('/adm/estate/lottery2/add', params, 'loading')
+  },
+  admestatelottery2del: params => { // 摇号期数 - 删除
+    return getRequestNoSort('/adm/estate/lottery2/del', params, 'loading')
+  },
+  admestatelottery2edit: params => { // 摇号期数 - 编辑
+    return getRequestNoSort('/adm/estate/lottery2/edit', params, 'loading')
+  },
+  admestatelottery2list: params => { // 摇号期数 -列表
+    return getRequest('/adm/estate/lottery2/list', params)
+  },
+  admestatehousearealist: params => { // 摇号期数 - 楼盘户型图列表
+    return getRequest('/adm/estate/house/area/list', params)
+  },
+  admestatelotterypriceedit: params => { // 一房一价 - 编辑
+    return getRequestNoSort('/adm/estate/lottery/price/edit', params, 'loading')
+  },
+  admestatelotterypriceadd: params => { // 一房一价 - 添加
+    return getRequestNoSort('/adm/estate/lottery/price/add', params, 'loading')
+  },
+  admestatelotterypricedel: params => { // 一房一价 - 删除
+    return getRequestNoSort('/adm/estate/lottery/price/del', params, 'loading')
+  },
+  admestatelotterypricelist: params => { // 一房一价 - 列表
+    return getRequestNoSort('/adm/estate/lottery/price/list', params, 'loading')
+  },
 }

+ 3 - 0
src/api/other.js

@@ -55,6 +55,9 @@ export default {
   admactivitybuyinglaunchlist: params => { // 助力活动- 列表
     return getRequest('/adm/activity/buying/launch/list', params)
   },
+  admactivitybuyinglaunchedit: params => { // 助力活动 - 标记已助力
+    return getRequestNoSort('/adm/activity/buying/launch/edit', params, 'loading')
+  },
   admactivitybuyingjoinlist: params => { // 助力活动- 列表参与列表
     return getRequest('/adm/activity/buying/join/list', params)
   },

+ 1 - 1
src/views/house/components/popup/DiscountGroupJoin.vue

@@ -2,7 +2,7 @@
   <div>
     <el-drawer
       :show-close="false"
-      :title="curObj.id ? '编辑楼盘摇号信息' : '新增楼盘摇号信息'"
+      :title="curObj.nickname + '的助力人'"
       :wrapper-closable="false"
       :close-on-press-escape="false"
       :visible.sync="isShow"

+ 4 - 3
src/views/house/components/popup/HelpRule.vue

@@ -70,9 +70,9 @@ export default {
     getDef() {
       const params = {...this.tagObj}
       this.formData = [
-        { label: '是否开启', key: 'is_open', rules: 1, type: 'select', options: this.$dictData.sys_yesno },
-        { label: '规则', key: 'rule', type: 'textarea' },
-        { label: '截止时间', key: 'end_at', class: 'c-2', type: 'datePicker', type2: 'date' },
+        { label: '是否开启', key: 'is_open', class: 'c-2', rules: 1, type: 'select', options: this.$dictData.sys_yesno },
+        { label: '截止时间', key: 'end_at', class: 'c-2', rules: 1, type: 'datePicker', type2: 'date' },
+        { label: '规则简述', key: 'rule', type: 'textarea', rules: 1 },
         { label: '助力人数', key: 'option_req', class: 'c-2', type: 'inputFont', appendFont: '人', rules: 
           [
             {
@@ -86,6 +86,7 @@ export default {
             }
           ]
         },
+        { label: '图700*1248', key: 'rule_img', class: 'c-2', type: 'uploads', rules: 1 },
       ]
       this.setDefaultValue(params)
     },

+ 114 - 16
src/views/house/components/popup/LotteryEdit.vue

@@ -10,7 +10,7 @@
       custom-class="xl-drawer"
       direction="rtl"
     >
-      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="110px" :insertSlotArr="[0]">
+      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="110px" :insertSlotArr="[0,4]">
         <div slot="OI0" class="scoped-other-form">
           <div class="scoped-img-area">
             <div class="sia-title">项目图</div>
@@ -31,6 +31,31 @@
             </el-upload>
           </div>
         </div>
+        <div slot="OI4">
+          <div class="scoped-img-area">
+            <div class="sia-title">一房一价图</div>
+            <div class="sia-op" v-for="(imgsrc,index) in houseImg" :key="index">
+              <img class="img" :src="imgsrc" alt="img">
+              <span class="close" @click="houseImgDel(index)"></span>
+            </div>
+            <el-upload
+              class="sia-img"
+              :action="`${domainUrl}/adm/upload/cloudpub`"
+              :data="{logic_type: 'estate', token}"
+              name="upload"
+              :show-file-list="false"
+              :on-success="houseImgSuccess"
+              :before-upload="imgUploadBefore"
+              >
+              <i class="el-icon-plus icon" />
+            </el-upload>
+          </div>
+          <div class="scoped-price-area">
+            <div class="spa-title">一房一价表</div>
+            <div class="spa-label" @click="openRPPopup('edit')">编辑</div>
+            <div class="spa-label" @click="openRPPopup('add')">添加</div>
+          </div>
+        </div>
         <div slot="otherItem" class="scoped-other-form">
           <div class="scoped-img-area">
             <div class="sia-title">摇号结果图</div>
@@ -59,11 +84,20 @@
         </div>
       </div>
     </el-drawer>
+    <room-price
+      :isShow="isRPShow"
+      :curObj="cObj"
+      :type="priceType"
+      @close="closeRPPopup"
+    />
   </div>
 </template>
 <script>
+import RoomPrice from './RoomPrice'
 export default {
-  components: { },
+  components: {
+    RoomPrice
+  },
   mixins,
   props: {
     isShow: Boolean,
@@ -80,7 +114,10 @@ export default {
       loading: true,
       cObj: {},
       infoImg: [],
+      houseImg: [],
       lotteryImg: [],
+      isRPShow: false,
+      priceType: 'add'
     }
   },
   watch: {
@@ -88,16 +125,32 @@ export default {
       if (val) {
         this.infoImg = []
         this.lotteryImg = []
-        this.$api.house.admestatelotterydetail({estate_id: this.curObj.estate_id}).then(res => {
-          this.cObj = res || {}
-          if (res.info_img) this.infoImg = res.info_img.split(',')
-          if (res.lottery_img) this.lotteryImg = res.lottery_img.split(',')
+        this.houseImg = []
+        if (this.curObj.id) {
+          this.$api.house.admestatelottery2detail({id: this.curObj.id}).then(res => {
+            this.cObj = res || {}
+            if (res.info_img) this.infoImg = res.info_img.split(',')
+            if (res.lottery_img) this.lotteryImg = res.lottery_img.split(',')
+            if (res.house_img) this.houseImg = res.house_img.split(',')
+            this.getDef()
+          })
+        } else {
           this.getDef()
-        })
+        }
       }
     },
   },
   methods: {
+    openRPPopup(str) {
+      this.isRPShow = true
+      this.priceType = str
+    },
+    closeRPPopup(obj) {
+      this.isRPShow = false
+      if (obj) {
+        this.fetchData()
+      }
+    },
     comImgDel (str, index) {
       let cImg = this[str]
       cImg.splice(index, 1)
@@ -115,6 +168,13 @@ export default {
     lotteryImgSuccess(res, file) {
       this.comImgSuccess('lotteryImg', res)
     },
+    houseImgDel (index) {
+      this.houseImg.splice(index, 1)
+      this.houseImg = [...this.houseImg]
+    },
+    houseImgSuccess(res, file) {
+      this.comImgSuccess('houseImg', res)
+    },
     infoImgDel (index) {
       this.infoImg.splice(index, 1)
       this.infoImg = [...this.infoImg]
@@ -134,12 +194,14 @@ export default {
       return isJPGPNG && isLt2M
     },
     getDef() {
-      const params = { ...this.cObj }
+      let params = { ...this.cObj }
+      params.time = params.lottery_time.split('至')
       this.formData = [
-        { label: '摇号期数', key: 'a' },
-        { label: '摇号中标题', key: 'under_way' },
-        { label: '摇号中时间', key: 'test', type: 'datePicker' },
-        { label: '摇号结果标题', key: 'result' },
+        { label: '摇号期数', key: 'batch', rules: 1 },
+        { label: '排序', key: 'sort' },
+        { label: '摇号中的标题', key: 'under_way' },
+        { label: '摇号中的日期', key: 'time', type: 'datePicker', rules: 1 },
+        { label: '摇号结果的标题', key: 'lottery_res' },
       ]
       this.setDefaultValue(params)
     },
@@ -148,8 +210,6 @@ export default {
         this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
           if (valid) {
             const oldform = this.$refs.ruleForm.baseForm
-            console.log(oldform)
-            return
             const newForm = { ...oldform }
             if (this.curObj.estate_id) {
               newForm.estate_id = this.curObj.estate_id
@@ -157,10 +217,21 @@ export default {
             if (this.infoImg && this.infoImg.length > 0) {
               newForm.info_img = this.infoImg.join(',')
             }
+            if (this.houseImg && this.houseImg.length > 0) {
+              newForm.house_img = this.houseImg.join(',')
+            }
             if (this.lotteryImg && this.lotteryImg.length > 0) {
               newForm.lottery_img = this.lotteryImg.join(',')
             }
-            let apiStr = 'admestatelotterychange'
+            newForm.lottery_time = newForm.time[0] + '至' + newForm.time[1]
+            delete newForm.time
+            // console.log(newForm)
+            // return
+            let apiStr = 'admestatelottery2add'
+            if (this.curObj.id) {
+              apiStr = 'admestatelottery2edit'
+              newForm.id = this.curObj.id
+            }
             this.$api.house[apiStr](newForm).then(data => {
               this.$msgs(newForm.id ? '编辑成功' : '新增成功')
               this.$emit('close', newForm)
@@ -178,7 +249,9 @@ export default {
 <style lang="scss" scoped>
 @import '../../../../styles/libEdit.scss';
 .lib-edit {
+  width: 100%;
   padding-top: 0;
+  padding-bottom: 100px;
   ::v-deep .el-form-item {
     margin-bottom: 10px;
   }
@@ -189,7 +262,6 @@ export default {
 
 .scoped-img-area {
   padding-left: 20px;
-  margin-bottom: 20px;
   .sia-title {
     font-size: 12px;
     padding-bottom: 10px;
@@ -249,4 +321,30 @@ export default {
     }
   }
 }
+
+.scoped-price-area {
+  padding: 20px 0 100px;
+  width: 100%;
+  .spa-title {
+    display: inline-block;
+    vertical-align: middle;
+    font-size: 14px;
+    color: #666;
+    font-weight: bold;
+    width: 110px;
+    text-align: right;
+    box-sizing: border-box;
+    padding-right: 12px;
+  }
+  .spa-label {
+    font-size: 14px;
+    display: inline-block;
+    vertical-align: middle;
+    text-decoration: underline;
+    color: #0c78b1;
+    font-weight: bold;
+    cursor: pointer;
+    margin-right: 20px;
+  }
+}
 </style>

+ 22 - 16
src/views/house/components/popup/LotteryList.vue

@@ -49,7 +49,7 @@ export default {
   inject: ['parentData'],
   data() {
     return {
-      apiStr: 'house.admpricelist',
+      apiStr: 'house.admestatelottery2list',
       searchForm: {},
       noCreated: true,
       isLEShow: false,
@@ -58,7 +58,7 @@ export default {
   },
   computed: {
     tableData2() {
-      const arr = [...this.tableData, {a: '第一期', b1: '2021-05-20', b2: '2021-06-10', c: '#12栋共计192套'}]
+      const arr = [...this.tableData]
       arr.map(item => {
       })
       return arr
@@ -67,15 +67,15 @@ export default {
   mounted() {
     this.listConfig = {
       rows: [
-        { label: '期数', prop: 'a'},
-        { label: '摇号中标题', prop: 'c'},
-        { label: '开始时间', prop: 'b1'},
-        { label: '结束时间', prop: 'b2'},
-        { label: '摇号结果标题', prop: 'd'},
+        { label: '期数', prop: 'batch'},
+        { label: '排序', prop: 'sort' },
+        { label: '摇号中标题', prop: 'under_way'},
+        { label: '摇号时间', prop: 'lottery_time'},
+        { label: '摇号结果标题', prop: 'lottery_res'},
         { label: '操作', width: 120, type: 'handle2', operations:
           [
             { label: '编辑', func: this.openLEPopup, btnType: 'primary' },
-            { label: '删除', func: this.delHandle, btnType: 'danger' },
+            // { label: '删除', func: this.delHandle, btnType: 'danger' },
           ]
         }
       ]
@@ -84,16 +84,20 @@ export default {
   watch: {
     isShow: function(val) {
       if (val) {
-        // this.$api.house.admestatelotterydetail({estate_id: this.curObj.estate_id}).then(res => {
+        // this.$api.house.admestatelottery2list({estate_id: this.curObj.estate_id}).then(res => {
         //   console.log(res)
         // })
+        this.searchForm = {
+          estate_id: this.curObj.estate_id
+        }
+        this.fetchData()
       }
     },
   },
   methods: {
     delHandle(row) {
       this.$msg(`您确定要删除该楼盘吗?`, 'confirm', () => {
-        this.$api.house.admpricedel({
+        this.$api.house.admestatelottery2del({
           id: row.id,
         }).then(data => {
           this.$msgs(`已删除!`)
@@ -102,12 +106,14 @@ export default {
       }, null, true)
     },
     openLEPopup(row) {
-      this.cObj = {...this.curObj}
-      // if (row && row.id) {
-      //   this.cObj = row
-      // } else {
-      //   this.cObj = {}
-      // }
+      let cObj = {
+        estate_id: this.curObj.estate_id
+      }
+      if (row && row.id) {
+        this.cObj = {...cObj, ...row}
+      } else {
+        this.cObj = {...cObj}
+      }
       this.isLEShow = true
     },
     closeLEPopup(obj) {

+ 274 - 0
src/views/house/components/popup/RoomPrice.vue

@@ -0,0 +1,274 @@
+<template>
+  <div>
+    <el-drawer
+      :show-close="false"
+      :title="type === 'edit' ? '编辑一房一价' : '新增一房一价'"
+      :wrapper-closable="false"
+      :close-on-press-escape="false"
+      :visible.sync="isShow"
+      size="960px"
+      custom-class="xl-drawer"
+      direction="rtl"
+    >
+      <div v-if="this.type === 'add'" class="scoped-top">
+        <base-form slot="content" ref="ruleForm" :data="searchData" :noLabel="false" labelWidth="100px">
+          <div slot="footer">
+            <el-button icon="el-icon-Plus" class="xl-form-btn bgc1" @click="batchAdd">批量添加</el-button>
+          </div>
+        </base-form>
+      </div>
+      <table-list
+        :list-loading="listLoading"
+        :data="tableData2"
+        :columns="listConfig"
+        :current-page="currentPage"
+        :page-size="-1"
+      />
+      <div class="xl-form">
+        <div class="xl-form-footer fixed" style="width:960px;padding-top: 20px;border-top: 1px solid #dcdcdc;right:0;">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button v-if="this.type === 'add'" class="xl-form-btn t1" @click="close('confirm')">保存</el-button>
+        </div>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import baseTable from '_m/baseTable.js'
+export default {
+  components: {},
+  mixins: [...mixins, baseTable],
+  props: {
+    isShow: Boolean,
+    curObj: Object,
+    type: String,
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      apiStr: 'house.admpricelist',
+      searchForm: {},
+      noCreated: true,
+      isLEShow: false,
+      cObj: {},
+      searchData: [],
+      roomAreaList: [],
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData]
+      arr.map(item => {
+        if (this.type === 'add') item.noCan = true
+      })
+      return arr
+    }
+  },
+  mounted() {
+    this.getDef()
+    this.listConfig = {
+      rows: [
+        { label: '楼栋', prop: 'building_num', type: 'input', width: '100px'},
+        { label: '层高', prop: 'floor_height', type: 'input', width: '60px'},
+        { label: '楼层', prop: 'storey', type: 'input', width: '60px'},
+        { label: '房号', prop: 'room', type: 'input', width: '60px'},
+        { label: '建筑面积(㎡)', prop: 'built', type: 'input', width: '80px'},
+        { label: '套内面积(㎡)', prop: 'space', type: 'input', width: '80px'},
+        { label: '毛坯单价(元/㎡)', prop: 'blank', type: 'input', width: '90px'},
+        { label: '装修单价(元/㎡)', prop: 'decoration', type: 'input', width: '90px'},
+        { label: '户型名', prop: 'house_type', type: 'input', width: '120px'},
+        { label: '户型图', prop: 'houseImg', type: 'img'},
+        { label: '操作', width: 120, type: 'handle2', operations:
+          [
+            { label: '保存', func: this.saveHandle, btnType: 'primary', hide: 'noCan' },
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        if (this.type === 'edit') {
+          this.getData()
+        }
+        this.getDef()
+        this.$api.house.admestatehousearealist({estate_id: this.curObj.estate_id}).then(res => {
+          const list = res.list || []
+          const htObj = arrToObj(this.$dictData.house_type)
+          const ptObj = arrToObj(this.$dictData.product_type)
+          list.map(item => {
+            item.key = `${htObj[item.house_type]}${item.area}㎡-${ptObj[item.product_type]}`
+            item.key2 = `${htObj[item.house_type]}`
+            item.val = item.id
+          })
+          this.roomAreaList = [...list]
+        })
+      }
+    },
+  },
+  methods: {
+    getData () {
+      this.$api.house.admestatelotterypricelist({estate_id: this.curObj.estate_id}).then(res => {
+        let list = res.list || []
+        list.map(item => {
+          item.houseImg = item.house_img + '_adm0'
+        })
+        this.tableData = [...list]
+      })
+    },
+    saveHandle (row) {
+      this.$api.house.admestatelotterypriceedit(row).then(res => {
+        this.getData()
+        this.$msgs('更新成功~')
+      })
+    },
+    getDef (str) {
+      if (str === 'col') {
+        let params = {...this.$refs.ruleForm.baseForm}
+        let addArr = []
+        const colArr = new Array(Number(params.batchCol)).fill({i: "add"})
+        colArr.forEach((item, itemIndex) => {
+          addArr.push({ label: `${itemIndex + 1}-建筑面积(㎡)`, key: `${itemIndex + 1}-built` })
+          addArr.push({ label: `${itemIndex + 1}-套内面积(㎡)`, key: `${itemIndex + 1}-space` })
+          addArr.push({ label: `${itemIndex + 1}-户型`, key: `${itemIndex + 1}-HT`, type: 'select', options: this.roomAreaList})
+        })
+        this.searchData = [
+          { label: '每层户数', key: 'batchCol', changeHandle: this.colChange },
+          { label: '多少层', key: 'batchRow' },
+          { label: '楼栋名', key: 'building_num' },
+          { label: '层高', key: 'floor_height' },
+          { label: '装修单价', key: 'decoration' },
+          ...addArr,
+        ]
+        this.setDefaultValue(params, 'searchData')
+      } else {
+        this.searchData = [
+          { label: '每层户数', key: 'batchCol', changeHandle: this.colChange },
+          { label: '多少层', key: 'batchRow' },
+          { label: '楼栋名', key: 'building_num' },
+          { label: '层高', key: 'floor_height' },
+          { label: '装修单价', key: 'decoration' },
+        ]
+      }
+    },
+    colChange (val) {
+      this.getDef('col')
+    },
+    batchAdd () {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      let curArr = [...this.tableData]
+      let newArr = new Array(Number(newForm.batchRow) * Number(newForm.batchCol)).fill({
+        ...newForm
+      })
+      newArr.forEach((n, i) => {
+        let rowIndex = Math.floor(i / newForm.batchCol) + 1
+        let colIndex = Math.floor(i % newForm.batchCol) + 1
+        let built = ''
+        let space = ''
+        let house_type = ''
+        let house_img = ''
+        let houseImg = ''
+        for (let f in newForm) {
+          if (f.indexOf(colIndex + '-built') > -1) {
+            built = newForm[f]
+          }
+          if (f.indexOf(colIndex + '-HT') > -1) {
+            this.roomAreaList.forEach(ra => {
+              if (newForm[f] === ra.id) {
+                house_type = ra.key2
+                houseImg = ra.pri_image + '_adm0'
+                house_img = ra.pri_image
+              }
+            })
+          }
+          if (f.indexOf(colIndex + '-space') > -1) {
+            space = newForm[f]
+          }
+        }
+        curArr.push({
+          ...n,
+          storey: rowIndex,
+          room: `${rowIndex}0${colIndex}`,
+          built,
+          space,
+          house_type,
+          house_img,
+          houseImg,
+          blank: 10000 + parseInt(Math.random() * 1000)
+        })
+      })
+      this.tableData = [...curArr]
+      this.setDefaultValue({}, 'searchData')
+    },
+    delHandle(row) {
+      this.$msg(`您确定要删除该楼盘吗?`, 'confirm', () => {
+        if (this.type === 'add') {
+          let arr = [...this.tableData]
+          let cIndex = ''
+          arr.map((item, index) => {
+            if (item.randomId === row.randomId) {
+              cIndex = index
+            }
+          })
+          arr.splice(cIndex, 1)
+          this.tableData = [...arr]
+        } else {
+          this.$api.house.admestatelotterypricedel({id: row.id}).then(res => {
+            this.$msgs('删除成功~')
+            this.getData()
+          })
+        }
+      }, null, true)
+    },
+    close(str) {
+      if (str === 'confirm') {
+        let curArr = [...this.tableData]
+        let newArr = []
+        curArr.map(item => {
+          newArr.push({
+            blank: item.blank,
+            building_num: item.building_num,
+            built: item.built,
+            decoration: item.decoration,
+            floor_height: item.floor_height,
+            house_type: item.house_type,
+            room: item.room,
+            space: item.space,
+            storey: item.storey,
+            house_img: item.house_img,
+          })
+        })
+        let params = {
+          estate_id: this.curObj.estate_id,
+          lottery_id: this.curObj.id,
+          data: JSON.stringify(newArr)
+        }
+        let apiStr = 'admestatelotterypriceadd'
+        this.$api.house[apiStr](params).then(data => {
+          this.$msgs(params.lottery_id ? '编辑成功' : '新增成功')
+          this.tableData = []
+          this.$emit('close', newForm)
+        })
+      } else {
+        this.$emit('close')
+        this.tableData = []
+        this.setDefaultValue()
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+::v-deep .xl-table-box {
+  padding-bottom: 50px;
+}
+::v-deep .el-form-item {
+  &:nth-child(5) {
+    margin-right: 300px;
+  }
+}
+</style>

+ 1 - 0
src/views/house/components/searchForm/DiscountGroup.vue

@@ -28,6 +28,7 @@ export default {
           remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
         },
         { label: 'hash', key: 'hash' },
+        { label: '状态', key: 'status', type: 'select', options: this.$dictData.buying_status},
       ]
       this.setDefaultValue(params, 'searchData')
     },

+ 15 - 19
src/views/house/discountGroup.vue

@@ -52,22 +52,7 @@ export default {
     tableData2() {
       const arr = [...this.tableData]
       arr.map(item => {
-        item.pri_image = this.IMadd(item.pri_image)
-        const metro_type = item.metro_type ? item.metro_type.split(',') : []
-        const metroTypeName = metro_type.map(v => {
-          return arrToObj(this.$dictData.metro_type)[v]
-        })
-        item.metroTypeName = metroTypeName.join(',')
-        const product_type = item.product_type ? item.product_type.split(',') : []
-        const productTypeName = product_type.map(v => {
-          return arrToObj(this.$dictData.product_type)[v]
-        })
-        item.productTypeName = productTypeName.join(',')
-        const metro_line = item.metro_line ? item.metro_line.split(',') : []
-        const metroLineName = metro_line.map(v => {
-          return arrToObj(this.$dictData.metro_line)[v]
-        })
-        item.metroLineName = metroLineName.join(',')
+        if (Number(item.status) !== 2) item.noCan = true
       })
       return arr
     }
@@ -79,13 +64,14 @@ export default {
         { label: '楼盘名称', prop: 'estate_name', minWidth: 150, align: 'left' },
         { label: '助力人', prop: 'avatar', type: 'img' },
         { label: '昵称', prop: 'nickname'},
+        { label: '状态', prop: 'status', type: 'tag', tags: arrToObj(this.$dictData.buying_status), tagTypeObj: {'1': 'info', '2': 'success', '3': 'danger'} },
         { label: '手机号', prop: 'phone' },
         { label: 'hash', prop: 'hash' },
         { label: '发起时间', prop: 'create_at' },
-        { label: '操作', width: 120, type: 'handle2', operations:
+        { label: '操作', width: 220, type: 'handle2', operations:
           [
-            { label: '已助力人', func: this.openDJPopup, btnType: 'primary' },
-            // { label: '删除', func: this.delHandle, btnType: 'danger' },
+            { label: '已助用户', func: this.openDJPopup, btnType: 'primary' },
+            { label: '标记使用', func: this.markUsedHandle, btnType: 'warning', hide: 'noCan' },
           ]
         }
       ]
@@ -106,6 +92,16 @@ export default {
         this.fetchData()
       }
     },
+    markUsedHandle(row) {
+      this.$msg(`您确定要将此优惠标记为已使用吗?`, 'confirm', () => {
+        this.$api.other.admactivitybuyinglaunchedit({
+          id: row.id,
+        }).then(data => {
+          this.$msgs(`已标记!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
     delHandle(row) {
       this.$msg(`您确定要删除该楼盘吗?`, 'confirm', () => {
         this.$api.house.admestaterecyclepurge({

+ 1 - 1
src/views/house/index.vue

@@ -124,7 +124,7 @@ export default {
             { label: '楼盘动态', func: this.openNews, btnType: 'info' },
             { label: '历史成交价', func: this.openPrice, btnType: 'info' },
             { label: '模块主题', func: this.openTHEPopup, btnType: 'info' },
-            { label: '助力团购', func: this.openHRPopup, btnType: 'warning' },
+            { label: '助力规则', func: this.openHRPopup, btnType: 'warning' },
             { label: '删除', func: this.delHandle, btnType: 'danger' },
           ]
         }

+ 4 - 3
src/views/house/theme.vue

@@ -35,8 +35,9 @@
 import { arrToObj } from '@/utils'
 import SearchForm from './components/searchForm/Theme'
 import PopupEdit from './components/popup/ThemeEdit'
-import LotteryEdit from './components/popup/LotteryEdit2'
-// import LotteryEdit from './components/popup/LotteryList'
+// import LotteryEdit from './components/popup/LotteryEdit2'
+import LotteryEdit from './components/popup/LotteryList'
+// import LotteryEdit from './components/popup/RoomPrice'
 import baseTable from '_m/baseTable.js'
 export default {
   name: 'old',
@@ -53,7 +54,7 @@ export default {
   mixins: [baseTable],
   data() {
     const mtArr = this.$dictData.module_type || []
-    const curNavVal = mtArr.length > 0 ? mtArr[0].val : ''
+    const curNavVal = mtArr.length > 0 ? mtArr[5].val : ''
     return {
       apiStr: 'house.admestatemodulelist',
       searchForm: {},

+ 1 - 1
src/views/user/components/searchForm/Index.vue

@@ -16,7 +16,7 @@ export default {
   data() {
     return {
       searchData: [
-        { label: '账号', key: 'username' },
+        { label: '手机号', key: 'phone' },
         { label: '昵称', key: 'nickname' },
       ]
     }

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä