|
@@ -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) {
|