Commit 726d4d10 authored by 华国豪's avatar 华国豪 🙄

1

parent f1283f08
...@@ -156,7 +156,7 @@ table { border-collapse:collapse; border-spacing:0; } ...@@ -156,7 +156,7 @@ table { border-collapse:collapse; border-spacing:0; }
.font-color-link{ .font-color-link{
color: #2362fb!important; color: #2362fb!important;
} }
.font-color-link:hover{ .font-color-link:hover,.underline:hover{
text-decoration: underline; text-decoration: underline;
} }
.font-color-success{ .font-color-success{
......
...@@ -527,6 +527,7 @@ export default { ...@@ -527,6 +527,7 @@ export default {
CustomerId: { CustomerId: {
handler(val, oldVal){ handler(val, oldVal){
this.GetContactByCustomerID() this.GetContactByCustomerID()
this.GetLogPageList()
}, },
deep:true deep:true
} }
......
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
<MoneyBack /> <MoneyBack />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="附件" name="8"> <el-tab-pane label="附件" name="8">
<Enclosure /> <Enclosure :ID='CustomerId' :type='1'/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="操作记录" name="9"> <el-tab-pane label="操作记录" name="9">
<Record v-if="activeName === '9'" :CustomerId="CustomerId"/> <Record v-if="activeName === '9'" :CustomerId="CustomerId"/>
...@@ -146,7 +146,7 @@ import TeamMembers from "./TeamMembers"; ...@@ -146,7 +146,7 @@ import TeamMembers from "./TeamMembers";
import Business from "./Business"; import Business from "./Business";
import Agreement from "./Agreement"; import Agreement from "./Agreement";
import MoneyBack from "./MoneyBack"; import MoneyBack from "./MoneyBack";
import Enclosure from "./Enclosure"; import Enclosure from "../clueManagement/Enclosure";
import Record from "./Record"; import Record from "./Record";
export default { export default {
components: { components: {
......
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
<MoneyBack /> <MoneyBack />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="附件" name="8"> <el-tab-pane label="附件" name="8">
<Enclosure /> <Enclosure v-if="activeName === '8'" :ID='BusinessId' :type='2'/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="操作记录" name="9"> <el-tab-pane label="操作记录" name="9">
<Record v-if="activeName === '9'" /> <Record v-if="activeName === '9'" />
...@@ -312,7 +312,7 @@ import TeamMembers from "./TeamMembers"; ...@@ -312,7 +312,7 @@ import TeamMembers from "./TeamMembers";
import Business from "../assembly/Business"; import Business from "../assembly/Business";
import Agreement from "../assembly/Agreement"; import Agreement from "../assembly/Agreement";
import MoneyBack from "../assembly/MoneyBack"; import MoneyBack from "../assembly/MoneyBack";
import Enclosure from "../assembly/Enclosure"; import Enclosure from "../clueManagement/Enclosure";
import Record from "./Record"; import Record from "./Record";
export default { export default {
components: { components: {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<div class="add-Enclosure"> <div class="add-Enclosure">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
:file-list="fileList" :limit="9" :http-request="uploadImg2" :multiple="true" :file-list="fileList" :limit="1" :http-request="uploadImg2" :multiple="true"
:show-file-list="false" action=""> :show-file-list="false" action="">
<el-button icon="el-icon-plus" class="crm-btn query-btn crm-btn-mini margin-right0">上传附件</el-button> <el-button icon="el-icon-plus" class="crm-btn query-btn crm-btn-mini margin-right0">上传附件</el-button>
</el-upload> </el-upload>
...@@ -22,34 +22,32 @@ ...@@ -22,34 +22,32 @@
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
row-class-name="font-size-12"> row-class-name="font-size-12">
<el-table-column fixed type="selection" width="40"></el-table-column>
<el-table-column <el-table-column
prop="ContactName" prop="FileName"
label="附件名称" label="附件名称"
show-overflow-tooltip> show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="ContactPhone" prop="CreateSrt"
label="附件大小"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="ContactDutyStr"
label="上传人" label="上传人"
show-overflow-tooltip> show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="ContactDutyStr" prop="CreateTime"
label="上传时间" label="上传时间"
show-overflow-tooltip> show-overflow-tooltip>
<template slot-scope="scope">
<span class="cfont-color-info">{{scope.row.CreateTime.replace('T', ' ')}}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="IsFirstContact" prop="IsFirstContact"
label="操作" label="操作"
width="100"
show-overflow-tooltip> show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span class="cp font-color-link">预览</span> <span class="font-color-link cp" style="padding-right: 10px;" @click="previewFile(scope.row.FileURL)">预览</span>
<span class="cp font-color-warning">删除</span> <span class="font-color-warning cp underline" v-if="scope.row.FileUploadType" @click="deleteItem(scope.row.ID)">删除</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -57,27 +55,75 @@ ...@@ -57,27 +55,75 @@
</template> </template>
<script> <script>
export default { export default {
props:{ props:['ID', 'type'],
},
data() { data() {
return { return {
loading: false, loading: false,
fileList: [] fileList: [],
msg: {
pageIndex: 1,
pageSize: 10,
FileSoureId: 0,
FileSoureType: 1
},
fileMsg: {
FileName: '',
FileURL: '',
FileSoureId: '',
FileSoureType: ''
}
}; };
},watch:{ },watch:{
}, },
mounted() { mounted() {
this.msg.FileSoureId = this.ID
this.msg.FileSoureType = this.type
this.fileMsg.FileSoureId = this.ID
this.fileMsg.FileSoureType = this.type
this.getList() this.getList()
}, },
methods: { methods: {
getList(){ getList(){
// this.apipost('', {}, res=>{ this.loading = true
// if (res.data.resultCode == 1) { this.apipost('/api/Customer/GetCustomerFilePage', this.msg, res=>{
// this.fileList = res.data.data.pageData if (res.data.resultCode == 1) {
// } this.fileList = res.data.data.pageData
// }) this.loading = false
}
})
},
AddCustomerFile(){
this.apipost('/api/Customer/AddCustomerFile', this.fileMsg, res=>{
if (res.data.resultCode == 1) {
this.msg.pageIndex = 1
this.getList()
}
})
},
// 删除
deleteItem(id){
this.$confirm('确定删除此附件,删除后不可恢复', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('/api/Customer/DelCustomerFile', {IDs: id}, res=>{
if (res.data.resultCode == 1) {
this.msg.pageIndex = 1
this.getList()
this.$message.success('删除成功')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
previewFile(file) {
window.open(file, "_blank");
}, },
// 上传附件 // 上传附件
uploadImg2(file) { uploadImg2(file) {
...@@ -86,7 +132,10 @@ export default { ...@@ -86,7 +132,10 @@ export default {
newArr.push(file.file); newArr.push(file.file);
let path = "/Upload/Temporary/"; let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => { this.UploadSelfFileT(path, newArr, x => {
this.getList() this.fileMsg.FileURL = this.domainManager().ViittoFileUrl + x.data.FilePath
this.fileMsg.FileName = file.file.name
this.AddCustomerFile()
this.$message.success('上传成功')
}); });
}, },
} }
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<Details v-if="activeName === '2'" :detailsData="detailsData"/> <Details v-if="activeName === '2'" :detailsData="detailsData"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="附件" name="8"> <el-tab-pane label="附件" name="8">
<Enclosure /> <Enclosure v-if="activeName === '8'" :ID='CustomerId' :type='1'/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="操作记录" name="9"> <el-tab-pane label="操作记录" name="9">
<Record v-if="activeName === '9'" :CustomerId="CustomerId"/> <Record v-if="activeName === '9'" :CustomerId="CustomerId"/>
......
...@@ -266,22 +266,6 @@ ...@@ -266,22 +266,6 @@
<div class="genjin" v-if="type === 1"> <div class="genjin" v-if="type === 1">
<el-form :model="FollowUpMsg" ref="form" class="MyEditForm" > <el-form :model="FollowUpMsg" ref="form" class="MyEditForm" >
<el-row :gutter="40" style="margin-bottom: 10px;"> <el-row :gutter="40" style="margin-bottom: 10px;">
<el-col :span="6">
<div class="MyEditForm-item">
<el-form-item label="选择联系人" class="label-pad-left">
<el-select
filterable
v-model="FollowUpMsg.ContactId" @change="changeContact" placeholder="请选择">
<el-option
v-for="item in ContactList"
:label='item.ContactName'
:value='item.ID'
:key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</div>
</el-col>
<el-col :span="6"> <el-col :span="6">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="跟进方式" class="label-pad-left"> <el-form-item label="跟进方式" class="label-pad-left">
...@@ -365,10 +349,6 @@ ...@@ -365,10 +349,6 @@
<span>附件</span> <span>附件</span>
</div> </div>
</el-upload> </el-upload>
<div class="ctrl-btn">
<i class="iconfont iconguanlianbg"></i>
<span>关联商机</span>
</div>
<!-- <div> <!-- <div>
<i class="iconfont iconkehu"></i> <i class="iconfont iconkehu"></i>
<span>关联联系人</span> <span>关联联系人</span>
...@@ -434,17 +414,10 @@ ...@@ -434,17 +414,10 @@
</div> </div>
</div> </div>
</template> </template>
<div v-if="addContactsShow">
<addContacts :ID="CustomerId" @addContactsOk="addContactsOk"/>
</div>
</div> </div>
</template> </template>
<script> <script>
import addContacts from "../dialogModel/addContacts";
export default { export default {
components: {
addContacts
},
props:{ props:{
CustomerId: { CustomerId: {
type: Number, type: Number,
...@@ -471,17 +444,15 @@ export default { ...@@ -471,17 +444,15 @@ export default {
content: '默认样式的节点', content: '默认样式的节点',
timestamp: '2018-04-03 20:46' timestamp: '2018-04-03 20:46'
}], }],
addContactsShow: false,
fileList: [], fileList: [],
autosize: { autosize: {
minRows: 4 minRows: 4
}, },
ContactList: [],
type: 1, type: 1,
FollowUpMsg: { FollowUpMsg: {
ID: 0, ID: 0,
CustomerId: '', CustomerId: '',
ContactId: '', ContactId: 0,
ContactName: '', ContactName: '',
BusinessId: 0, BusinessId: 0,
BusinessName: '', BusinessName: '',
...@@ -499,9 +470,6 @@ export default { ...@@ -499,9 +470,6 @@ export default {
},{ },{
id: 2, id: 2,
name: '创建任务', name: '创建任务',
},{
id: 3,
name: '创建联系人',
},{ },{
id: 4, id: 4,
name: '创建商机', name: '创建商机',
...@@ -526,16 +494,13 @@ export default { ...@@ -526,16 +494,13 @@ export default {
},watch:{ },watch:{
CustomerId: { CustomerId: {
handler(val, oldVal){ handler(val, oldVal){
this.GetContactByCustomerID() this.GetLogPageList()
}, },
deep:true deep:true
} }
}, },
mounted() { mounted() {
let $this = this let $this = this
this.MsgBus.$on('closeaddContacts', function (){
$this.addContactsShow = false
})
document document
.getElementById("activity") .getElementById("activity")
.addEventListener("scroll", function() { .addEventListener("scroll", function() {
...@@ -545,7 +510,6 @@ export default { ...@@ -545,7 +510,6 @@ export default {
$this.GetLogPageList(1) $this.GetLogPageList(1)
} }
}); });
this.GetContactByCustomerID()
this.GetFollowUpTypeEnum() this.GetFollowUpTypeEnum()
this.GetLogPageList() this.GetLogPageList()
}, },
...@@ -594,7 +558,7 @@ export default { ...@@ -594,7 +558,7 @@ export default {
}) })
}) })
} }
this.apipost('/api/Customer/CreateContactFollowUp', this.FollowUpMsg, res=>{ this.apipost('/api/Customer/CreateNewContactFollowUp', this.FollowUpMsg, res=>{
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.$message.success(res.data.message) this.$message.success(res.data.message)
this.fjList = [] this.fjList = []
...@@ -602,7 +566,7 @@ export default { ...@@ -602,7 +566,7 @@ export default {
this.FollowUpMsg = { this.FollowUpMsg = {
ID: 0, ID: 0,
CustomerId: '', CustomerId: '',
ContactId: '', ContactId: 0,
ContactName: '', ContactName: '',
BusinessId: 0, BusinessId: 0,
BusinessName: '', BusinessName: '',
...@@ -615,17 +579,6 @@ export default { ...@@ -615,17 +579,6 @@ export default {
} }
}) })
}, },
changeContact(id){
this.ContactList.map(x=>{
if (x.ID === id) {
this.FollowUpMsg.ContactId = x.ID
this.FollowUpMsg.ContactName = x.ContactName
}
})
},
addContactsOk(){
this.GetContactByCustomerID()
},
//删除附件 //删除附件
deleteFile(index){ deleteFile(index){
let str = index === -1 ? '是否全部删除?' : '是否删除' let str = index === -1 ? '是否全部删除?' : '是否删除'
...@@ -697,22 +650,9 @@ export default { ...@@ -697,22 +650,9 @@ export default {
}); });
}); });
}, },
GetContactByCustomerID(){
if(this.CustomerId === 0) return
this.apipost('/api/Customer/GetContactByCustomerID', {CustomerId: this.CustomerId}, res=>{
if (res.data.resultCode == 1) {
let data = res.data.data
this.ContactList = data
}
})
},
ChangeType(param){ ChangeType(param){
if(param.id === 3) {
this.addContactsShow = true
} else if (param.id < 3) {
this.type = param.id this.type = param.id
} }
} }
}
} }
</script> </script>
\ No newline at end of file
<style>
</style>
<template>
<div class="Enclosure">
Enclosure
</div>
</template>
<script>
export default {
props:{
},
data() {
return {
};
},watch:{
},
mounted() {
},
methods: {
}
}
</script>
\ No newline at end of file
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<template> <template>
<el-dialog @closed="closedDialog" :modal="false" :visible.sync="dialogTableVisible" :close-on-click-modal="false" class="addContacts"> <el-dialog @closed="closedDialog" :modal="false" :visible.sync="dialogTableVisible" :close-on-click-modal="false" class="addContacts">
<div class="add-tit" slot="title"> <div class="add-tit" slot="title">
<p><span></span>新建联系人</p> <p><span></span>{{name}}</p>
<span icon="el-icon-close"></span> <span icon="el-icon-close"></span>
</div> </div>
<div class="form-box" > <div class="form-box" >
...@@ -127,12 +127,7 @@ ...@@ -127,12 +127,7 @@
</template> </template>
<script> <script>
export default { export default {
props:{ props: ['ID', 'name'],
ID: {
type: Number,
default: 0
}
},
data() { data() {
return { return {
dialogTableVisible: true, dialogTableVisible: true,
...@@ -179,6 +174,15 @@ export default { ...@@ -179,6 +174,15 @@ export default {
$this.dialogTableVisible = true $this.dialogTableVisible = true
},50) },50)
this.getCustomerList() this.getCustomerList()
if (this.ID!==0) {
this.apipost('/api/Customer/GetAllContactModel', {Id: this.ID}, res=>{
if (res.data.resultCode == 1) {
let data = res.data.data
this.form = data
this.loading = true
}
})
}
}, },
methods: { methods: {
getCustomerList(){ getCustomerList(){
......
...@@ -66,20 +66,16 @@ ...@@ -66,20 +66,16 @@
<div class="drawer-header"> <div class="drawer-header">
<div class="left"> <div class="left">
<img src="../../assets/img/cust/kehu2.png" alt=""> <img src="../../assets/img/cust/kehu2.png" alt="">
<p>{{detailsData.CustomerName}}</p> <p>{{detailsData.ContactName}}</p>
</div> </div>
<div class="right"> <div class="right">
<el-button class="crm-btn query-btn" @click="editCust">编辑</el-button> <el-button class="crm-btn query-btn" @click="editCust">编辑</el-button>
<el-button class="crm-btn easy-btn iconfont iconwancheng">更改成交状态</el-button>
<el-dropdown @command="handleCommand" style="top: 1px;"> <el-dropdown @command="handleCommand" style="top: 1px;">
<el-button class="crm-btn crm-btn-more easy-btn margin-right0"> <el-button class="crm-btn crm-btn-more easy-btn margin-right0">
<i class="iconfont icongengduo"></i> <i class="iconfont icongengduo"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="z"><i class="iconfont iconplus-transfer"></i> 转移</el-dropdown-item> <el-dropdown-item command="z"><i class="iconfont iconplus-transfer"></i> 转移</el-dropdown-item>
<el-dropdown-item command="g"><i class="iconfont icongonghaiguanli"></i> 放入公海</el-dropdown-item>
<el-dropdown-item command="s"><i class="iconfont iconsuoguan"></i> 锁定</el-dropdown-item>
<el-dropdown-item command="j"><i class="iconfont iconsuokai"></i> 解锁</el-dropdown-item>
<el-dropdown-item command="d"><i class="iconfont icondelete"></i> 删除</el-dropdown-item> <el-dropdown-item command="d"><i class="iconfont icondelete"></i> 删除</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
...@@ -97,7 +93,7 @@ ...@@ -97,7 +93,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<span class="info-lable">负责人:</span><span>{{detailsData.Contact}}</span> <span class="info-lable">负责人:</span><span>{{detailsData.PersonChargeStr}}</span>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<span class="info-lable">更新时间:</span><span>{{detailsData.UpdateTime ? detailsData.UpdateTime.replace('T', ' ') : ''}}</span> <span class="info-lable">更新时间:</span><span>{{detailsData.UpdateTime ? detailsData.UpdateTime.replace('T', ' ') : ''}}</span>
...@@ -116,7 +112,7 @@ ...@@ -116,7 +112,7 @@
<Business /> <Business />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="附件" name="8"> <el-tab-pane label="附件" name="8">
<Enclosure /> <Enclosure :ID='CustomerId' :type='3'/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="操作记录" name="9"> <el-tab-pane label="操作记录" name="9">
<Record v-if="activeName === '9'" :CustomerId="CustomerId"/> <Record v-if="activeName === '9'" :CustomerId="CustomerId"/>
...@@ -130,7 +126,7 @@ ...@@ -130,7 +126,7 @@
import Activity from "./Activity"; import Activity from "./Activity";
import Details from "./Details"; import Details from "./Details";
import Business from "./Business"; import Business from "./Business";
import Enclosure from "./Enclosure"; import Enclosure from "../clueManagement/Enclosure";
import Record from "./Record"; import Record from "./Record";
export default { export default {
components: { components: {
...@@ -171,36 +167,9 @@ export default { ...@@ -171,36 +167,9 @@ export default {
}, },
methods: { methods: {
init(){ init(){
this.apipost('/api/Customer/GetAllCustmersModel', {CustomerId: this.CustomerId}, res=>{ this.apipost('/api/Customer/GetAllContactModel', {Id: this.CustomerId}, res=>{
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data let data = res.data.data
if(!data.HousePhotos){
data.HousePhotos = []
}
if(!data.BusinessCardPhotos){
data.BusinessCardPhotos = []
}
if(!data.Images){
data.Images = []
}
if(!data.CustomerSourceType){
data.CustomerSourceType = ''
}
if(!data.CustomerSource){
data.CustomerSource = ''
}
if(!data.Province){
data.Province = ''
}
if(!data.Country){
data.Country = ''
}
if(!data.City){
data.City = ''
}
if(!data.District){
data.District = ''
}
this.detailsData = data this.detailsData = data
this.loading = true this.loading = true
} }
...@@ -215,7 +184,7 @@ export default { ...@@ -215,7 +184,7 @@ export default {
}, },
handleClick(tab, event) {}, handleClick(tab, event) {},
editCust(){ editCust(){
this.$emit('editCustS', 1) this.$emit('editCustbusiness', 1)
}, },
handleClose(done) { handleClose(done) {
done(); done();
......
...@@ -201,6 +201,7 @@ ...@@ -201,6 +201,7 @@
<el-button class="add-box-btn add-box-cancel" @click="transferVisible = false">取 消</el-button> <el-button class="add-box-btn add-box-cancel" @click="transferVisible = false">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 客户信息抽屉 -->
<el-drawer <el-drawer
:with-header="false" :with-header="false"
size='70%' size='70%'
...@@ -209,13 +210,14 @@ ...@@ -209,13 +210,14 @@
:before-close="handleClose"> :before-close="handleClose">
<customerInfoBox :CustomerId="CustomerId" @transferS="transfer" @watersS="waters" @editCustS="editCust"/> <customerInfoBox :CustomerId="CustomerId" @transferS="transfer" @watersS="waters" @editCustS="editCust"/>
</el-drawer> </el-drawer>
<!-- 联系人抽屉 -->
<el-drawer <el-drawer
:with-header="false" :with-header="false"
size='70%' size='70%'
:visible.sync="drawer2" :visible.sync="drawer2"
direction="rtl" direction="rtl"
:before-close="handleClose"> :before-close="handleClose">
<ContactsInfoBox :BusinessId="BusinessId" :BusinessIdCustomerId="BusinessIdCustomerId" @transferS="transfer" @watersS="waters" @editCustbusiness="editCustbusiness"/> <ContactsInfoBox :CustomerId="BusinessId" @transferS="transfer" @watersS="waters" @editCustbusiness="editCustbusiness"/>
</el-drawer> </el-drawer>
<!-- 编辑客户 --> <!-- 编辑客户 -->
<div v-if="dialogCustomerVisible"> <div v-if="dialogCustomerVisible">
......
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