|
@@ -1,110 +1,95 @@
|
|
|
<template>
|
|
|
<div class="follow" style="margin-right:10px">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- @click="followBtn"
|
|
|
- :disabled="disabled"
|
|
|
- >跟进</el-button>
|
|
|
- <el-dialog title="线索跟进" append-to-body :visible.sync="dialogVisible" width="900" :before-close="handleClose">
|
|
|
- <el-form :model="param" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm"
|
|
|
- label-position="right">
|
|
|
- <el-row :gutter="10">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="跟进时间" label-position="right" label-width="100px">
|
|
|
- <!-- <el-input :value="getNowDate()" size="small" disabled></el-input> -->
|
|
|
- <el-date-picker
|
|
|
- v-model="timer"
|
|
|
- type="date"
|
|
|
- format="yyyy-MM-dd HH:mm:ss"
|
|
|
- disabled
|
|
|
- size="small">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="本次跟进方式" label-width="130px" label-position="right" prop="followupmode">
|
|
|
+ <el-button size="mini" @click="followBtn" :disabled="disabled">跟进</el-button>
|
|
|
+ <el-drawer title="线索跟进" append-to-body :visible.sync="dialogVisible" size="30%" :before-close="handleClose">
|
|
|
+ <div class="drawer__panel">
|
|
|
+ <el-form :model="param" :rules="rules" ref="ruleForm" label-width="110px" class="demo-ruleForm"
|
|
|
+ label-position="right">
|
|
|
+ <el-form-item label="跟进时间">
|
|
|
+ <el-date-picker v-model="timer" type="date" format="yyyy-MM-dd HH:mm:ss" disabled size="small">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="本次跟进方式" prop="followupmode">
|
|
|
<el-select v-model="param.followupmode" placeholder="请选择方式" size="small">
|
|
|
- <el-option label="当面拜访" value="当面拜访"></el-option>
|
|
|
- <el-option label="电话沟通" value="电话沟通"></el-option>
|
|
|
+ <el-option v-for="(item,index) in followTypeList" :key="index" :label="item.value" :value="item.value">
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="本次跟进结果" label-width="110px" label-position="right" prop="logtype">
|
|
|
- <el-radio-group v-model="param.logtype">
|
|
|
- <el-radio label="跟进">跟进</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" v-if="param.logtype == '丢单'">
|
|
|
- <el-form-item label="已购买商品" prop="competitor" label-width="200px">
|
|
|
- <el-input v-model="param.competitor" size="small"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="跟进内容" prop="content" v-if="param.logtype == '跟进'">
|
|
|
- <el-input type="textarea" v-model="param.content" size="small"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="丢单原因" prop="content" v-if="param.logtype == '丢单'">
|
|
|
- <el-input type="textarea" v-model="param.content" size="small"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="添加备注" prop="content" v-if="param.logtype == '成交'">
|
|
|
- <el-input type="textarea" v-model="param.content" size="small"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="无效原因" prop="content" v-if="param.logtype == '无效'">
|
|
|
- <el-input type="textarea" v-model="param.content" size="small"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="dialogVisible = false" size="small">取 消</el-button>
|
|
|
- <el-button type="primary" @click="followAction" size="small">确 定</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
+ <!-- <el-form-item label="本次跟进结果" prop="logtype">
|
|
|
+ <el-radio-group v-model="param.logtype">
|
|
|
+ <el-radio label="跟进">跟进</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item label="跟进内容" prop="content" v-if="param.logtype == '跟进'">
|
|
|
+ <el-input type="textarea" v-model="param.content" size="small"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <upload
|
|
|
+ ref="upload"
|
|
|
+ :folderid="folderid"
|
|
|
+ @onSuccess="onSuccess"
|
|
|
+ :bindData="bindData"
|
|
|
+ type="button">
|
|
|
+ </upload>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="fixed__btn__panel">
|
|
|
+ <el-button size="small" @click="dialogVisible = false" class="normal-btn-width">取 消</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="followAction" class="normal-btn-width" :loading="loading">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-drawer>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { log } from '@antv/g2plot/lib/utils';
|
|
|
+import upload from './upload'
|
|
|
export default {
|
|
|
+ components:{upload},
|
|
|
name: '',
|
|
|
data () {
|
|
|
return {
|
|
|
+ loading:false,
|
|
|
+ bindData:{},
|
|
|
+ folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
|
|
|
param: {
|
|
|
- "sat_orderclueid":0,
|
|
|
+ "sat_orderclueid": 4,
|
|
|
"content": "",
|
|
|
"followupmode": "", //当面拜访、电话沟通
|
|
|
- "logtype": '跟进', //跟进、成交、丢单、无效
|
|
|
- "competitor": ""
|
|
|
+ "logtype": "跟进", //跟进、成交、丢单、无效
|
|
|
+ "competitor": "",
|
|
|
+ "latitude":"",//经度,可选
|
|
|
+ "longitude":"",//纬度,可选
|
|
|
+ "address":"",//解析地址,
|
|
|
+ "sat_ordercluefollowuplogid":0//传0新增
|
|
|
},
|
|
|
- timer:new Date(),
|
|
|
+ timer: new Date(),
|
|
|
rules: {
|
|
|
- content:[
|
|
|
- {required:true,message:'内容不能为空',trigger:'blur'},
|
|
|
+ content: [
|
|
|
+ { required: true, message: '内容不能为空', trigger: 'blur' },
|
|
|
],
|
|
|
- followupmode:[
|
|
|
- {required:true,message:'内容不能为空',trigger:'blur'},
|
|
|
+ followupmode: [
|
|
|
+ { required: true, message: '内容不能为空', trigger: 'blur' },
|
|
|
],
|
|
|
- logtype:[
|
|
|
- {required:true,message:'内容不能为空',trigger:'blur'},
|
|
|
+ logtype: [
|
|
|
+ { required: true, message: '内容不能为空', trigger: 'blur' },
|
|
|
],
|
|
|
- competitor:[
|
|
|
- {required:true,message:'内容不能为空',trigger:'blur'},
|
|
|
+ competitor: [
|
|
|
+ { required: true, message: '内容不能为空', trigger: 'blur' },
|
|
|
],
|
|
|
},
|
|
|
- time:'',
|
|
|
+ time: '',
|
|
|
dialogVisible: false,
|
|
|
+ followTypeList: []
|
|
|
}
|
|
|
},
|
|
|
props: {
|
|
|
detailInfo: {
|
|
|
- default() {
|
|
|
+ default () {
|
|
|
return []
|
|
|
}
|
|
|
},
|
|
|
position: {
|
|
|
- type:String
|
|
|
+ type: String
|
|
|
},
|
|
|
updataList: {
|
|
|
type: Function
|
|
@@ -114,70 +99,68 @@ export default {
|
|
|
},
|
|
|
disabled: Boolean
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ dialogVisible(val) {
|
|
|
+ if (!val) {
|
|
|
+ this.$refs['ruleForm'].resetFields()
|
|
|
+ this.$refs.upload.fileLinkList = []
|
|
|
+ this.$refs.upload.fileList = []
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
computed: {
|
|
|
},
|
|
|
created () {
|
|
|
+ this.getFollowType()
|
|
|
},
|
|
|
methods: {
|
|
|
+ async getFollowType () {
|
|
|
+ let res = await this.$store.dispatch('optiontypeselect', 'followupmode')
|
|
|
+ this.followTypeList = res.data
|
|
|
+ },
|
|
|
followBtn () {
|
|
|
this.dialogVisible = true
|
|
|
- this.param = Object.assign({},this.param,this.detailInfo)
|
|
|
- console.log(this.param);
|
|
|
},
|
|
|
- handleClose() {
|
|
|
+ handleClose () {
|
|
|
this.dialogVisible = false
|
|
|
},
|
|
|
- followAction() {
|
|
|
- this.$refs.ruleForm.validate( async val => {
|
|
|
- if(!val) return this.$notify({
|
|
|
- title:'提示',
|
|
|
- message:'请按照要求填写信息',
|
|
|
- type:'warning'
|
|
|
- })
|
|
|
+ followAction () {
|
|
|
+ this.$refs.ruleForm.validate(async val => {
|
|
|
+ if (!val) return
|
|
|
this.param.sat_orderclueid = this.detailInfo.sat_orderclueid
|
|
|
let res = await this.$api.requested({
|
|
|
- "classname": "saletool.orderclue.web.orderclue",
|
|
|
- "method": "addFollowUpLog",
|
|
|
+ "id":20221208100602,
|
|
|
"content": this.param
|
|
|
})
|
|
|
- this.tool.showMessage(res,() => {
|
|
|
+ this.bindData = {
|
|
|
+ "ownertable": 'sat_ordercluefollowuplog',
|
|
|
+ "ownerid": res.data.sat_ordercluefollowuplogid,
|
|
|
+ "usetype": 'default',
|
|
|
+ }
|
|
|
+ this.loading = true
|
|
|
+ this.$refs['upload'].toUpload(() => {
|
|
|
+ this.loading = false
|
|
|
+ this.$emit('onSuccess')
|
|
|
this.dialogVisible = false
|
|
|
- this.$emit('updataList')
|
|
|
- this.$refs.ruleForm.resetFields()
|
|
|
+ console.log('上传完成');
|
|
|
+
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ onSuccess () {
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
- /deep/.el-form-item__content{
|
|
|
- margin-left: 0 !important;
|
|
|
- }
|
|
|
-
|
|
|
- .follow {
|
|
|
- display: inline-block;
|
|
|
- }
|
|
|
- /deep/.el-dialog__body {
|
|
|
- padding-bottom: 0;
|
|
|
- }
|
|
|
- /deep/.el-dialog__footer {
|
|
|
- display: flex;
|
|
|
- justify-content: space-around;
|
|
|
- padding-top: 0;
|
|
|
- }
|
|
|
- /deep/.el-form-item {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- }
|
|
|
- /deep/.el-select {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
- /deep/.el-form-item {
|
|
|
- margin-bottom: 5px;
|
|
|
- }
|
|
|
- /deep/.dialog-footer span {
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
+
|
|
|
+.follow {
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
+/deep/.el-input,.el-select {
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
</style>
|