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