|
@@ -14,53 +14,20 @@
|
|
|
@currentChange="pageHandle"
|
|
|
@sizeChange="sizeChange"
|
|
|
:operationsDefaultLength="6"
|
|
|
- :insertSlotArr="[7]"
|
|
|
+ :isAdd="true"
|
|
|
+ @add="openPopup"
|
|
|
>
|
|
|
- <div slot="OI7">
|
|
|
- <el-table-column
|
|
|
- width="140"
|
|
|
- label="保护期止"
|
|
|
- align="center"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <template v-if="scope.row.report_state === '1' && scope.row.report_step === '1'">
|
|
|
- <div v-if="+new Date() > +new Date(scope.row.lock_at)">
|
|
|
- <div style="color: #f00">{{scope.row.lock_at}}</div>
|
|
|
- <el-tag type="danger" size="mini">已过期</el-tag>
|
|
|
- </div>
|
|
|
- <div v-else-if="(+new Date(scope.row.lock_at) - +new Date()) < 86400000">
|
|
|
- <div style="color: #e6a23c">{{scope.row.lock_at}}</div>
|
|
|
- <el-tag type="warning" size="mini">1天内过期</el-tag>
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- <div>{{scope.row.lock_at}}</div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <div>{{scope.row.lock_at}}</div>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </div>
|
|
|
</table-list>
|
|
|
- <!-- :isAdd="true"
|
|
|
- @add="openPopup" -->
|
|
|
<popup-edit
|
|
|
:isShow="isDtlShow"
|
|
|
:curObj="curObj"
|
|
|
@close="closePopup"
|
|
|
/>
|
|
|
- <index-record
|
|
|
- :isShow="isQShow"
|
|
|
- :curObj="curObj"
|
|
|
- @close="closeQPopup"
|
|
|
- />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import { arrToObj } from '@/utils'
|
|
|
-import SearchForm from './components/searchForm/Index'
|
|
|
-import IndexRecord from './components/popup/IndexRecord'
|
|
|
+import SearchForm from './components/searchForm/My'
|
|
|
import PopupEdit from './components/popup/IndexEdit'
|
|
|
import baseTable from '_m/baseTable.js'
|
|
|
export default {
|
|
@@ -68,7 +35,6 @@ export default {
|
|
|
components: {
|
|
|
SearchForm,
|
|
|
PopupEdit,
|
|
|
- IndexRecord,
|
|
|
},
|
|
|
provide() {
|
|
|
return {
|
|
@@ -78,7 +44,7 @@ export default {
|
|
|
mixins: [baseTable],
|
|
|
data() {
|
|
|
return {
|
|
|
- apiStr: 'cust.admreportlist',
|
|
|
+ apiStr: 'cust.admcustomerlist',
|
|
|
searchForm: null,
|
|
|
isDtlShow: false,
|
|
|
curObj: {},
|
|
@@ -89,9 +55,7 @@ export default {
|
|
|
computed: {
|
|
|
tableData2() {
|
|
|
const arr = [...this.tableData]
|
|
|
- arr.map(item => {
|
|
|
- item.newRecord = `${item.record_estate_name ? item.record_estate_name : '-'}${item.record_protect_at && item.record_protect_at !== '1970-01-01' ? '(' + item.record_protect_at + ')' : ''}-${item.record_remark ? item.record_remark : ''}`
|
|
|
- })
|
|
|
+ arr.map(item => {})
|
|
|
return arr
|
|
|
}
|
|
|
},
|
|
@@ -101,41 +65,23 @@ export default {
|
|
|
rows: [
|
|
|
{ label: '姓名', prop: 'name' },
|
|
|
{ label: '电话', prop: 'phone' },
|
|
|
- { label: '客户状态', prop: 'report_state', type: 'tag', tags: arrToObj(this.$dictData.report_state ), tagTypeObj: {'1': 'success', '2': 'warning', '3': 'danger'}},
|
|
|
- { label: '报备进度', prop: 'report_step', type: 'tag', tags: arrToObj(this.$dictData.report_step ), tagTypeObj: {'1': 'info', '2': 'success', '3': 'success'} },
|
|
|
- { label: '报备楼盘', prop: 'estate_name'},
|
|
|
- { label: '报备时间', prop: 'create_at' },
|
|
|
{ label: '性别', prop: 'sex', type: 'tag', tags: arrToObj(this.$dictData.sex), tagTypeObj: {'male': 'primary', 'female': 'danger'} },
|
|
|
- { label: '备注', prop: 'remark', fullShow: true },
|
|
|
- { label: '报备人', prop: 'create_by' },
|
|
|
- { label: '操作', width: 90, type: 'handle2', operations:
|
|
|
+ { label: '备注', prop: 'demand', fullShow: true, minWidth: 200, align: 'left' },
|
|
|
+ { label: '创建人', prop: 'create_by' },
|
|
|
+ { label: '创建时间', prop: 'create_at' },
|
|
|
+ { label: '操作', width: 120, type: 'handle2', operations:
|
|
|
[
|
|
|
- { label: '报备详情', func: this.openQPopup, btnType: 'primary' },
|
|
|
- // { label: '修改状态', func: this.openPopup, btnType: 'warning' },
|
|
|
- // { label: '删除', func: this.delHandle, btnType: 'danger' },
|
|
|
+ { label: '编辑', func: this.openPopup, btnType: 'primary' },
|
|
|
+ { label: '删除', func: this.delHandle, btnType: 'danger' },
|
|
|
]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- openQPopup (row) {
|
|
|
- if (row && row.id) {
|
|
|
- this.curObj = row
|
|
|
- } else {
|
|
|
- this.curObj = {}
|
|
|
- }
|
|
|
- this.isQShow = true
|
|
|
- },
|
|
|
- closeQPopup (obj) {
|
|
|
- this.isQShow = false
|
|
|
- if (obj) {
|
|
|
- this.fetchData()
|
|
|
- }
|
|
|
- },
|
|
|
delHandle(row) {
|
|
|
this.$msg(`您确定要删除该客户吗?`, 'confirm', () => {
|
|
|
- this.$api.user.admcustomerdel({
|
|
|
+ this.$api.cust.admcustomerdel({
|
|
|
id: row.id
|
|
|
}).then(data => {
|
|
|
this.$msgs(`已删除!`)
|