Commit 16b5bea2 authored by qinj's avatar qinj

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

parents 2de7e94e ed0df3ea
...@@ -168,7 +168,7 @@ export function ProcessApproval(data){ ...@@ -168,7 +168,7 @@ export function ProcessApproval(data){
// 客户项目信息 // 客户项目信息
export const project = { export const project = {
createUrl: '/address/create', createUrl: '/address/createByCustomer',
searchUrl: '/address/search', searchUrl: '/address/search',
detailUrl: '/address/getOne', detailUrl: '/address/getOne',
updateUrl: '/address/update', updateUrl: '/address/update',
......
...@@ -137,8 +137,8 @@ export default { ...@@ -137,8 +137,8 @@ export default {
this.loading = true this.loading = true
const formData = this.$translateToC4CData(this.formData) const formData = this.$translateToC4CData(this.formData)
if (this.dialogTitle === this.desc.add) { if (this.dialogTitle === this.desc.add) {
const accountID = this.$route.query.objectID || this.tableConfig.initialParams.objectID const BusinessObjectID = this.$route.query.objectID || this.tableConfig.initialParams.objectID
formData.accountID = accountID formData.businessObjectID = BusinessObjectID
this.$request(this.createUrl, [formData]).then(res => { this.$request(this.createUrl, [formData]).then(res => {
this.formData.objectID = res.results[0] this.formData.objectID = res.results[0]
if (this.tableConfig.url) { if (this.tableConfig.url) {
......
...@@ -66,9 +66,9 @@ export default { ...@@ -66,9 +66,9 @@ export default {
externalLink: '外链', externalLink: '外链',
profile: '个人中心', profile: '个人中心',
customers: '代理商', customers: '代理商管理',
potentialCustomers: '省级代理商管理', potentialCustomers: '省级代理商',
regularCustomers: '城市级代理商管理', regularCustomers: '城市级代理商',
enterpriseCustomers: '企业客户', enterpriseCustomers: '企业客户',
products: '产品', products: '产品',
......
...@@ -13,12 +13,11 @@ const customersRouter = { ...@@ -13,12 +13,11 @@ const customersRouter = {
icon: 'user' icon: 'user'
}, },
children: [ children: [
// 总代理商管理
{ {
path: '/overview', path: '/overview',
component: () => import('@/views/customers/customers-overview'), component: () => import('@/views/customers/customers-overview'),
name: 'CustomersOverview', name: 'CustomersOverview',
meta: { title: '总代理商管理' } meta: { title: '总代理商' }
}, },
// 添加新代理商 // 添加新代理商
{ {
......
...@@ -24,7 +24,8 @@ export default { ...@@ -24,7 +24,8 @@ export default {
}, },
data() { data() {
return { return {
typeCode: uploadCode.customer typeCode: uploadCode.customer,
objectId: 'aaaaaa'
} }
}, },
watch: { watch: {
...@@ -44,6 +45,16 @@ export default { ...@@ -44,6 +45,16 @@ export default {
immediate: true, immediate: true,
deep: true deep: true
} }
},
created() {
// 设置表单的初始搜索条件,该条件一般不会发生改变
if (this.$attrs['form-data'] && this.$attrs['form-data'].BusinessObjectID) {
config.tableConfig.initialParams = {
BusinessObjectID: this.$attrs['form-data'].BusinessObjectID,
}
} else {
config.tableConfig.url = ''
}
} }
} }
</script> </script>
......
...@@ -43,11 +43,35 @@ export default { ...@@ -43,11 +43,35 @@ export default {
} }
}, },
created() { created() {
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 = '收货地址'
// 设置表单的初始搜索条件,该条件一般不会发生改变 // 设置表单的初始搜索条件,该条件一般不会发生改变
constant.tableConfig.initialParams = { if (this.$attrs['form-data'] && this.$attrs['form-data'].BusinessObjectID) {
BusinessObjectID: this.$route.query.objectID config.tableConfig.initialParams = {
BusinessObjectID: this.$attrs['form-data'].BusinessObjectID,
} }
this.constant = constant } else {
config.tableConfig.url = ''
}
this.constant = config
} }
} }
</script> </script>
......
...@@ -12,11 +12,8 @@ ...@@ -12,11 +12,8 @@
@request-success="handleSuccess" @request-success="handleSuccess"
/> />
</div> </div>
<customerAddAddress :addBtnStart='addBtnStart' :objectId='objectId'/> <customerAddAddress :addBtnStart='addBtnStart' :objectId='objectId' :form-data="$attrs['form-data']"/>
<customerAddAccessory :addBtnStart='addBtnStart' :objectId='objectId'/> <customerAddAccessory :addBtnStart='addBtnStart' :objectId='objectId' :form-data="$attrs['form-data']"/>
<!-- <div class="btn">
<el-button type="primary">提交保存</el-button>
</div> -->
</div> </div>
</template> </template>
...@@ -25,9 +22,7 @@ import Title from '@/components/Title' ...@@ -25,9 +22,7 @@ import Title from '@/components/Title'
import { customerCreate, provinceSearch, citySearch, districtSearch } from '@/api/customers'; import { customerCreate, provinceSearch, citySearch, districtSearch } from '@/api/customers';
import customerAddAddress from './components/customersAdd-adress/index' import customerAddAddress from './components/customersAdd-adress/index'
import customerAddAccessory from './components/customersAdd-accessory/index' import customerAddAccessory from './components/customersAdd-accessory/index'
// import dictionary from '@/api/dictionary' // import constant from '@/components/ExportBtn/constant';
import path from 'path';
export default { export default {
components: { components: {
...@@ -45,13 +40,12 @@ export default { ...@@ -45,13 +40,12 @@ export default {
addBtnStart: false, addBtnStart: false,
objectId: '', objectId: '',
formData: {}, formData: {},
province: [],
sections: [ sections: [
{ {
title: '基本信息', title: '基本信息',
formDesc: { formDesc: {
Name: { Name: {
type: 'input', type: 'lov',
label: '公司企称', label: '公司企称',
layout: 24, layout: 24,
code: 'qcc', code: 'qcc',
...@@ -217,12 +211,15 @@ export default { ...@@ -217,12 +211,15 @@ export default {
ExtSocialUnifiedCreditCode_SDK: { required: true, message: '名称必填' }, ExtSocialUnifiedCreditCode_SDK: { required: true, message: '名称必填' },
ExtRegisteredCapital_SDK: {required: true, message: '名称必填' }, ExtRegisteredCapital_SDK: {required: true, message: '名称必填' },
ExtCorporateName_SDK: { required: true, message: '名称必填' }, ExtCorporateName_SDK: { required: true, message: '名称必填' },
ExtProvinceCode_SDK: { required: true, message: '名称必填' },
ExtDistrictCode_SDK: {required: true, message: '名称必填' },
ExtCityCode_SDK: { required: true, message: '名称必填' },
} }
} }
}, },
methods: { methods: {
handleSubmit (data) { handleSubmit (data) {
data.extCustomerType_SDK = '101'
console.log(data) console.log(data)
// this.addBtnStart = true // this.addBtnStart = true
customerCreate(this.paramsToFormData(data)).then(res => { customerCreate(this.paramsToFormData(data)).then(res => {
......
...@@ -10,43 +10,39 @@ const tableConfig = { ...@@ -10,43 +10,39 @@ const tableConfig = {
align: 'center' align: 'center'
}, },
columns: { columns: {
Title: {
label: '标题' CreateOn_SDK: {
},
TypeCode: {
label: '类型',
value: 'TypeCodeText'
},
CreateName: {
label: '创建人'
},
CreateOn: {
label: '创建时间' label: '创建时间'
}, },
Note: { FileName: {
label: '备注' label: '文件名'
},
URL: {
label: '附件'
}, },
handle: { handle: {
label: '操作', label: '操作',
hideInFilter: true, hideInFilter: true,
fixed: 'right', fixed: 'right',
renderItem: (h, scope, listeners) => { renderItem: (h, scope, listeners) => {
return h( return h('div', [
'el-button', // h('el-button', {
{ // on: {
// click: (e) => listeners.handleEdit(scope.row, 'edit')
// },
// props: {
// icon: 'el-icon-edit-outline',
// type: 'text'
// }
// }, '编辑'),
h('el-button', {
on: { on: {
click: (e) => listeners.handleEdit(scope.row, scope.$index) click: (e) => listeners.handleDownload(scope.row, 'takeEffect')
}, },
class: 'el-icon-edit',
props: { props: {
icon: 'el-icon-circle-check',
type: 'text' type: 'text'
} }
}, '下载'),
])
}, },
'编辑')
}
} }
} }
} }
...@@ -56,27 +52,27 @@ const formConfig = { ...@@ -56,27 +52,27 @@ const formConfig = {
isShowBackBtn: false, isShowBackBtn: false,
isShowSubmitBtn: false, isShowSubmitBtn: false,
formDesc: { formDesc: {
Title: { // Title: {
type: 'input', // type: 'input',
label: '标题', // label: '标题',
layout: 24 // layout: 24
}, // },
TypeCode: { // TypeCode: {
vif: false, // vif: false,
label: '类型' // label: '类型'
}, // },
Path: { // Path: {
vif: false, // vif: false,
label: '编码' // label: '编码'
}, // },
TypeCode: { // TypeCode: {
vif: false, // vif: false,
label: '类型' // label: '类型'
}, // },
Note: { // Note: {
label: '备注', // label: '备注',
type: 'textarea' // type: 'textarea'
}, // },
FileDetails: { FileDetails: {
label: '附件' label: '附件'
} }
......
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
constant.formConfig.formDesc.Path.default = this.path constant.formConfig.formDesc.Path.default = this.path
this.tableListeners = { this.tableListeners = {
handleEdit: this.handleEdit, handleEdit: this.handleEdit,
handleDelete: this.handleDelete handleDownload: this.handleDownload
} }
}, },
methods: { methods: {
...@@ -171,9 +171,9 @@ export default { ...@@ -171,9 +171,9 @@ export default {
formData.path = this.path formData.path = this.path
} }
if (!this.formData.ObjectID) { if (!this.formData.ObjectID) {
const accountID = const businessObjectID =
this.$route.query.objectID || this.tableConfig.initialParams.objectID this.$route.query.objectID || this.tableConfig.initialParams.objectID
formData.append('accountID', accountID) formData.append('businessObjectID', businessObjectID)
formData.delete('objectID') formData.delete('objectID')
this.loading = true this.loading = true
this.$request(file.createUrl, formData).then(() => { this.$request(file.createUrl, formData).then(() => {
...@@ -215,6 +215,9 @@ export default { ...@@ -215,6 +215,9 @@ export default {
} }
) )
}) })
},
handleDownload(row) {
window.open(row.FileURL)
} }
} }
} }
......
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