liujq 4 tahun lalu
induk
melakukan
d2179250cb

File diff ditekan karena terlalu besar
+ 0 - 0
dist/index.html


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/css/chunk-69c0c3f8.ef473020.css


+ 0 - 0
dist/static/css/chunk-42cddb37.ecb0d1c3.css → dist/static/css/chunk-87c98c7a.8b1c8da0.css


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/app.b2682f3d.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-4d01b1d5.46b8c7b8.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-69c0c3f8.d99c0c22.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-87c98c7a.7e3dd6a4.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-a7bc4c8e.415445bc.js


+ 42 - 9
src/views/house/components/popup/IndexEdit.vue

@@ -14,12 +14,10 @@
       <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="110px" :insertSlotArr="[23,24]">
         <div slot="OI23" class="scoped-product">
           <div class="sp-item" v-for="(product, one) in productData" :key="one">
-            <div class="sp-title">({{product.indexSort}}){{product.product_type_name}}
-              <!-- <div class="scoped-sp-box">
-                <el-input placeholder="排序数字" v-model="product.indexSort">
-                  <el-button slot="append">确定</el-button>
-                </el-input>
-              </div> -->
+            <div class="sp-title">{{product.product_type_name}}
+              <div class="scoped-sp-box" @click="openPtPopup(product, one)">
+                修改类型
+              </div>
             </div>
             <div class="sp-content">
               <div class="sc-input">
@@ -94,13 +92,22 @@
       </div>
     </el-drawer>
     <handle-map :is-show="isShowMap" @close="closeMap" />
+    <pt-edit
+      :isShow="isPtShow"
+      :curObj="ptObj"
+      @close="closePtPopup"
+     />
   </div>
 </template>
 <script>
 import { arrToObj } from '@/utils'
 import handleMap from '@/components/Common/Map'
+import PtEdit from './ProductTypeEdit'
 export default {
-  components: { handleMap },
+  components: {
+    handleMap,
+    PtEdit,
+  },
   mixins,
   props: {
     isShow: Boolean,
@@ -119,6 +126,8 @@ export default {
       isShowMap: false,
       productData: [],
       tempImgIndex: [0, 0, 0],
+      ptObj: {},
+      isPtShow: false,
     }
   },
   watch: {
@@ -138,7 +147,6 @@ export default {
             this.cObj = curData || {}
             let productData = curData.area_data || []
             productData.map((one, oneIndex) =>{
-              one.indexSort = oneIndex + 1
               one.product_type_name = arrToObj(this.$dictData.product_type)[one.product_type_val]
               let houseTypeList = one.house_type_list || []
               one.house_type_list_val = []
@@ -159,6 +167,31 @@ export default {
     },
   },
   methods: {
+    closePtPopup (bcData) {
+      this.isPtShow = false
+      if (bcData) {
+        let productData = [...this.productData]
+        let cObj = productData[bcData.index]
+        cObj.product_type_val = bcData.ptVal
+        cObj.product_type_name = bcData.ptName
+        productData[bcData.index] = cObj
+        this.productData = [...productData]
+        let params = {...this.$refs.ruleForm.baseForm}
+        let curPt = [...params.product_type]
+        curPt[bcData.index] = bcData.ptVal
+        params.product_type = curPt
+        this.setDefaultValue(params)
+      }
+    },
+    openPtPopup (row, index) {
+      // console.log(row)
+      // console.log(index)
+      this.isPtShow = true
+      this.ptObj = {
+        row,
+        index
+      }
+    },
     houseTypeChange (one) {
       let productData = [...this.productData]
       let tempList = []
@@ -342,7 +375,7 @@ export default {
               if (!pOne.stairs_rate) pOne.stairs_rate = ''
             })
             if (pFlag) {
-              this.$msg('请输入完整的产品最高单价、最低单价、户型图!')
+              this.$msg('请输入完整的产品价、户型图!')
               return
             }
             if (productData.length === 0) {

+ 82 - 0
src/views/house/components/popup/ProductTypeEdit.vue

@@ -0,0 +1,82 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="'编辑产品类型'"
+      :fullscreen="false"
+      width="400px"
+      custom-class="xl-dialog"
+      center
+    >
+      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="110px">
+        <div slot="footer" style="padding-top: 20px;">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
+        </div>
+      </base-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      cObj: {},
+      isShowMap: false
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        this.getDef()
+      }
+    },
+  },
+  methods: {
+    getDef() {
+      let params = { ...this.curObj.row }
+      params.ptVal = params.product_type_val
+      params.ptName = params.product_type_name
+      this.formData = [
+        { label: '产品类型', key: 'ptVal', type: 'select', options: this.$dictData.product_type, changeHandle: this.ptChange},
+      ]
+      this.setDefaultValue(params)
+      this.cObj = {...params}
+    },
+    ptChange (row, item, op) {
+      this.cObj.ptName = op.key
+    },
+    close(str) {
+      if (str === 'confirm') {
+        this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
+          if (valid) {
+            const oldform = this.$refs.ruleForm.baseForm
+            let newForm = { ...oldform }
+            newForm.ptName = this.cObj.ptName
+            newForm.index = this.curObj.index
+            this.$emit('close', newForm)
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.setDefaultValue()
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini