Commit 0fc55843 authored by qinj's avatar qinj

Merge branch 'dev' of http://120.25.63.219:6088/rex/portalhtml into dev

parents 67220ca8 e362e088
import { project } from '@/api/customers'
const tableConfig = {
tableTitle: '收货地址',
url: project.searchUrl,
showPagination: false,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
Name: {
label: '联系人',
},
Phone: {
label: '电话'
},
Detail: {
label: '地址详细信息'
},
handle: {
label: '操作',
hideInFilter: true,
fixed: 'right',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
on: {
click: (e) => listeners.handleEdit(scope.row, scope.$index)
},
class: 'el-icon-edit',
props: {
type: 'text'
}
},
'编辑')
}
}
}
}
const formConfig = {
labelPosition: 'left',
submitBtnText: '保存',
formDesc: {
Name: {
type: 'input',
layout: 12,
label: '联系人'
},
Phone: {
label: '电话',
type: 'input',
layout: 12,
},
Detail: {
label: '地址详细信息',
type: 'input',
layout: 12,
},
}
}
export default {
tableConfig,
formConfig,
...project
}
<template>
<div>
<BusinessTable v-bind="constant"/>
</div>
</template>
<script>
import constant from './constant'
export default {
props: {
// addBtnStart: {
// type: Boolean,
// default: true
// },
objectID: {
type: String,
default: ''
}
},
data() {
return {
constant: {},
}
},
watch: {
objectID: {
handler(newVal) {
constant.tableConfig.initialParams = {
BusinessObjectID: newVal
}
this.constant = constant
},
immediate: true,
deep: true
}
},
created() {
// this.addBtnStart = this.$route.query.addBtnStart
// var config = JSON.parse(JSON.stringify(constant))
// config.tableConfig.columns.handle = {
// label: '操作',
// hideInFilter: true,
// fixed: 'right',
// renderItem: (h, scope, listeners) => {
// return h(
// 'el-button',
// {
// on: {
// click: (e) => listeners.handleEdit(scope.row, scope.$index)
// },
// props: {
// type: 'text'
// }
// },
// '编辑')
// }
// }
// config.tableConfig.tableTitle = '收货地址'
// 设置表单的初始搜索条件,该条件一般不会发生改变
// if (this.$attrs['form-data'] && this.$attrs['form-data'].BusinessObjectID) {
// config.tableConfig.initialParams = {
// BusinessObjectID: this.$attrs['form-data'].BusinessObjectID,
// }
// } else {
// config.tableConfig.url = ''
// }
// this.constant = config
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -12,6 +12,7 @@
@request-success="handleSuccess"
/>
</div>
<CustomerAddress :objectID='objectID' v-if="showAdress"/>
<PersonalInFo :addBtnStart='addBtnStart' :dedeleBtnStart="dedeleBtnStart" :type-code="typeCode" :searchUrl="searchUrl"/>
</div>
</template>
......@@ -19,14 +20,16 @@
<script>
import Title from '@/components/Title'
import { customerCreate, provinceSearch, citySearch, districtSearch, customerGetOne } from '@/api/customers';
import { qccGetOne } from '@/api/qcc'
import { qccGetOne, Customer } from '@/api/qcc';
import PersonalInFo from './conponents/personal-info'
import { uploadCode } from '@/api/upload'
import CustomerAddress from './conponents/customersAdd-adress'
export default {
components: {
Title,
PersonalInFo,
CustomerAddress,
customerCreate,
provinceSearch,
citySearch,
......@@ -42,6 +45,7 @@ export default {
title: '注册信息',
dedeleBtnStart: true,
objectID: '',
showAdress: false,
addBtnStart: true,
formData: {},
isShowSubmitBtn: false,
......@@ -214,7 +218,7 @@ export default {
type: 'input',
layout: 12,
label: '商务负责人姓名',
disabled: true
disabled: true,
},
ExtBusinessPhone_SDK: {
type: 'input',
......@@ -313,7 +317,9 @@ export default {
},
async getOneData() {
this.loading = true
// this.objectId = JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK
if (JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK !== '') {
this.objectID = JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK
this.searchUrl = '/file/search'
customerGetOne({ objectID: JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK }).then(res => {
// this.searchUrl = '/file/search'
......@@ -386,6 +392,8 @@ export default {
}
}
this.sections.push(show)
} else {
this.showAdress = true
}
this.formData = res.results[0]
this.addBtnStart = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment