cxmo 1 жил өмнө
parent
commit
6d784a6953

+ 5 - 1
src/api/api.js

@@ -70,6 +70,9 @@ import {businessTripInterence} from './modules/businessTrip'
 
 import {reportVarietyENInterence} from './modules/reportVariety'
 
+//商家管理
+import {businessCustomInterence} from './modules/businessCustom'
+
 export {
   dataBaseInterface,
   mychartInterface,
@@ -106,7 +109,8 @@ export {
   nationalInterface,
   cloudDiskInterface,
   businessTripInterence,
-  reportVarietyENInterence
+  reportVarietyENInterence,
+  businessCustomInterence
 };
 
 //老接口 研报 ppt等

+ 108 - 0
src/api/modules/businessCustom.js

@@ -0,0 +1,108 @@
+/**
+ * 商家管理api
+ */
+import http from "@/api/http.js"
+
+export const businessCustomInterence = {
+    /**
+     * 获取商家列表
+     * @param Keyword String关键字
+     * @param SellerIds String 销售ID(多选),英文逗号拼接
+     * @param SigningStatus Integer 签约状态: 1-首次签约; 2-续约中; 3-已终止
+     * @param Province String 省份(多选),英文逗号拼接
+     * @param City String 城市(多选),英文逗号拼接
+     * @param SortParam Integer 排序字段: 1-签约时间; 2-到期时间; 3-创建时间; 4-用户上限
+     * @param SortType Integer 排序类型: 1-正序; 2-倒序
+     * @param PageSize Integer 每页数据量
+     * @param CurrentIndex Integer 页码
+     * @returns 
+     */
+    getBusinessList:(params)=>{
+        return http.get('/eta_business/page_list',params)
+    },
+    /**
+     * 获取商家签约列表
+     * @param EtaBusinessId Integer 商家ID
+     */
+    getContractList:(params)=>{
+        return http.get('/eta_business/contract_list',params)
+    },
+    /**
+     * 获取操作日志列表
+     * @param EtaBusinessId Integer 商家ID
+     */
+    getTimeLineList:(params)=>{
+        return http.get('/eta_business/operate_record_list',params)
+    },
+    /**
+     * 获取商家详情
+     * @param EtaBusinessId Integer 商家ID
+     */
+    getBusinessDetail:(params)=>{
+        return http.get('/eta_business/detail',params)
+    },
+    /**
+     * 添加续约
+     * @param EtaBusinessId Integer 商家ID
+     * @param SigningTime String 签约时间
+     * @param ExpiredTime String 到期时间
+     * @returns 
+     */
+    addNewContract:(params)=>{
+        return http.post('/eta_business/signing',params)
+    },
+    /**
+     * 修改销售
+     * @param EtaBusinessId Integer 商家ID
+     * @param SellerId Integer 销售ID
+     * @param SellerName String 销售名称
+     */
+    changeBusinessSeller:(params)=>{
+        return http.post('/eta_business/move_seller',params)
+    },
+    /**
+     * 启用禁用商家
+     * @param EtaBusinessId Integer 商家ID
+     */
+    changeBusinessStatus:(params)=>{
+        return http.post('/eta_business/enable',params)
+    },
+    /**
+     * 编辑商家
+     * @param EtaBusinessId Integer 商家ID
+     * @param Province String 省份
+     * @param City String 城市
+     * @param Leader String 决策人姓名
+     * @param IndustryId Integer 行业ID
+     * @param IndustryName String 行业名称
+     * @param CapitalScale String 资金规模
+     * @param ResearchTeamSize String 研究团队规模
+     * @param UserMax Integer 用户上限
+     */
+    editBusiness:(params)=>{
+        return http.post('/eta_business/edit',params)
+    },
+    /**
+     * 添加商家
+     * @param BusinessName String 商家名称
+     * @param CreditCode String 社会信用码
+     * @param RegionType String 所属区域:国内;海外
+     * @param Province String 省份
+     * @param City String 城市
+     * @param SellerId Integer 销售ID
+     * @param SellerName String 销售姓名
+     * @param Leader String 决策人姓名
+     * @param IndustryId Integer 行业ID
+     * @param IndustryName String 行业名称
+     * @param CapitalScale String 资金规模
+     * @param ResearchTeamSize String 研究团队规模
+     * @param UserMax Integer 用户上限
+     * @param SigningTime String 签约时间(IsCheck为false时必填)
+     * @param ExpiredTime String 到期时间(IsCheck为false时必填)
+     * @param IsCheck Boolean 是否仅校验,为true时校验参数但不实际新增
+     * @returns 
+     */
+    addBusiness:(params)=>{
+        return http.post('/eta_business/add',params)
+    }
+}

+ 36 - 0
src/routes/modules/customRoutes.js

@@ -380,6 +380,42 @@ export default [
 				component: () => import('@/views/ficc_manage/apply/applyList.vue'),
 				hidden: false,
 			},
+      {
+        path:'businessETAList',
+        name:"商家管理",
+        component: () => import('@/views/business_ETA_manage/businessList.vue'),
+				hidden: false,
+      },
+      {
+        path:'addETABusiness',
+        name:"新增商家",
+        component: () => import('@/views/business_ETA_manage/addBusiness.vue'),
+				hidden: false,
+        meta:{
+          pathFrom: "businessETAList",
+          pathName: "商家管理",
+        }
+      },
+      {
+        path:'editETABusiness',
+        name:"编辑商家",
+        component: () => import('@/views/business_ETA_manage/businessEdit.vue'),
+				hidden: false,
+        meta:{
+          pathFrom: "businessETAList",
+          pathName: "商家管理",
+        }
+      },
+      {
+        path:'businessETADetail',
+        name:"商家详情",
+        component: () => import('@/views/business_ETA_manage/businessDetail.vue'),
+				hidden: false,
+        meta:{
+          pathFrom: "businessETAList",
+          pathName: "商家管理",
+        }
+      }
     ],
   },
 ];

+ 458 - 0
src/views/business_ETA_manage/addBusiness.vue

@@ -0,0 +1,458 @@
+<template>
+    <div class="add-business">
+        <!-- 自定义步骤条 -->
+        <Steps 
+            :activeStep="step"
+            :allowStepClick="false"
+        />
+        <div class="first-step-form-wrap" v-show="step===1">
+            <el-form 
+                :model="firstFormData" 
+                :rules="rules"
+                ref="firstFormEl" 
+                label-width="120px"
+                inline
+                class="first-step-form"
+            >
+                <div class="form-line">
+                    <el-form-item label="所属区域" prop="areaType">
+                        <el-radio-group v-model="firstFormData.areaType">
+                            <el-radio label="国内" border>国内</el-radio>
+                            <el-radio label="海外" border>海外</el-radio>
+                        </el-radio-group>
+                    </el-form-item>
+                    <el-form-item label="商家名称" prop="name">
+                        <autocomplete
+                            ref="auto"
+                            v-model="firstFormData.name"
+                            :fetch-suggestions="callbackHandle"
+                            placeholder="请输入商家名称"
+                            @blur="checkCompany"
+                            @select="customNameSelect"
+                            @focus="checkCompanyfocus"
+                            :disabled='inquireSuccess'
+                            clearable
+                            value-key="value"
+                            style="width:360px"
+                            :popper-class="isCheck?'el-autocomplete-none':'el-autocomplete-suggestion-data-entry'"
+                            class="autocomplete-input"
+                        >
+                            <span 
+                                v-if="firstFormData.name.length > 3" 
+                                style="color:#409EFF;cursor: pointer;" slot="suffix"  
+                                @click="$refs.auto.search(firstFormData.name)"
+                            > 查询</span>
+                            <template slot-scope="scope">
+                                <div v-if="scope.item.KeyNo">{{scope.item.Name}}</div>
+                                <div v-else style="text-align:center">暂无数据</div>		 
+                            </template>
+                        </autocomplete>
+                        <!-- <el-input placeholder="请输入商家名称" v-model="firstFormData.name"/> -->
+                    </el-form-item>
+                </div>
+                <div class="form-line">
+                    <el-form-item label="社会信用码" prop="creditCode">
+                        <el-input disabled placeholder="请输入社会信用码" v-model="firstFormData.creditCode"/>
+                    </el-form-item>
+                    <el-form-item label="商家地址" prop="address">
+                        <el-cascader 
+                            v-model="firstFormData.address"
+                            :props="locationProps"
+                            clearable 
+                            :options="locationOptions"  
+                            @change="selectRegion" 
+                            placeholder="请选择客户地址" 
+                        />
+                    </el-form-item>
+                </div>
+                <div class="form-line">
+                    <el-form-item label="决策人" prop="decisionMaker">
+                        <el-input placeholder="请输入决策人" v-model="firstFormData.decisionMaker"/>
+                    </el-form-item>
+                    <el-form-item label="研究团队规模" prop="teamSize">
+                        <el-select 
+                            v-model="firstFormData.teamSize" 
+                            placeholder="请选择研究团队规模"
+                            clearable
+                        >
+                            <el-option
+                                v-for="item in teamSizeOpts"
+                                :key="item.val"
+                                :label="item.label"
+                                :value="item.val">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </div>
+                <div class="form-line">
+                    <el-form-item label="资金规模" prop="fundsize">
+                        <el-input placeholder="请输入资金规模" v-model="firstFormData.fundsize"/>
+                    </el-form-item>
+                    <el-form-item label="所属行业" prop="industry">
+                        <el-select 
+                            v-model="firstFormData.industry" 
+                            placeholder="请选择行业" 
+                            clearable
+                        >
+                            <el-option
+                                v-for="item in tradeArr"
+                                :key="item.IndustryId"
+                                :label="item.IndustryName"
+                                :value="item.IndustryId">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </div>
+                <div class="form-line">
+                    <el-form-item label="用户上限" prop="userMax">
+                        <el-input type="number" placeholder="请输入用户上限" v-model="firstFormData.userMax"/>
+                    </el-form-item>
+                    <el-form-item label="所属销售" prop="saller">
+                        <el-cascader
+                            ref="cascader"
+                            v-model="firstFormData.saller"
+                            :options="salesArr"
+                            :show-all-levels="false"
+                            :props="{
+                                expandTrigger: 'hover',
+                                children: 'Child',
+                                emitPath: false,
+                                label:'AdminName',
+                                value:'AdminId',
+                            }"
+                            filterable
+                            clearable
+                            placeholder="请选择销售"
+                        />
+                    </el-form-item>
+                </div>
+                
+            </el-form>
+        </div>
+        <div class="second-step-form-wrap" v-show="step===2">
+            <el-form 
+                :model="secondFormData" 
+                :rules="rules"
+                ref="secondFormEl" 
+                label-width="120px"
+                inline
+                class="second-step-form"
+            >
+                <div class="form-line">
+                    <el-form-item label="签约日期" prop="signDate">
+                        <el-date-picker
+                            v-model="secondFormData.signDate"
+                            type="date"
+                            placeholder="选择日期"
+                            value-format="yyyy-MM-dd"
+                        />
+                    </el-form-item>
+                    <el-form-item label="到期日期" prop="expirationDate">
+                        <el-date-picker
+                            v-model="secondFormData.expirationDate"
+                            type="date"
+                            placeholder="选择日期"
+                            value-format="yyyy-MM-dd"
+                        />
+                    </el-form-item>
+                </div>
+                
+            </el-form>
+        </div>
+
+        <div class="btns-box">
+            <el-button style="width:80px" type="primary" v-show="step===1" @click="handleStepSecond">下一步</el-button>
+            <el-button style="width:80px" type="primary" v-show="step===1" plain @click="$router.back()">取消</el-button>
+            <el-button style="width:80px" type="primary" v-show="step===2" plain @click="step--">上一步</el-button>
+            <el-button style="width:80px" type="primary" v-show="step===2" @click="handleAddBusiness">保存</el-button>
+        </div>
+    </div>
+</template>
+
+<script>
+import { customInterence,roadshowInterence,businessCustomInterence } from '@/api/api.js'
+import autocomplete from "@/components/autocomplete.vue";
+import Steps from "./components/Steps.vue";
+import {locationOptions} from "@/views/custom_manage/customList/location"
+export default {
+    components: {autocomplete,Steps},
+    data() {
+        return {
+            /* 城市地址数据 */
+            locationOptions,
+            locationProps:{
+                value:'name',
+                children:'city',
+                label:'name'
+            },
+
+            /* 自动输入社会信用码 */
+            isCheckCompanyInfo:false, 
+			checkCompanyfocusIs:false,
+			inquireSuccess:false,
+            nameRepeat:false,
+			codeRepeat:false,
+            isCheck:false,//检查客户弹窗
+			repeatId:'',//重复公司id
+			repeatName:'',//重复公司类型
+
+            salesArr:[],//销售员数据
+            tradeArr:[],//行业数据
+            step:1,//第几步
+
+            /* 研究团队规模数据 */
+            teamSizeOpts:[
+                {
+                    val:'50人及以下',
+                    label:'50人及以下'
+                },
+                {
+                    val:'200人及以下',
+                    label:'200人及以下'
+                },
+                {
+                    val:'超过200人',
+                    label:'超过200人'
+                }
+            ],
+            
+            rules:{
+                areaType:[{ required: true, message: '请选择所属区域', trigger: 'change' },],
+                name:[{ required: true, message: '请输入商家名称', trigger: 'blur' },],
+                creditCode:[{ required: true, message: '请输入社会信用码', trigger: 'blur' },],
+                address:[{ required: true, message: '请选择商家地址', trigger: 'change' },],
+                decisionMaker:[{required: true, message: '请输入决策人', trigger: 'blur' },],
+                teamSize:[{required: true, message: '请选择研究团队规模', trigger: 'change' },],
+                industry:[{required: true, message: '请选择所属行业', trigger: 'change' },],
+                userMax:[{required: true, message: '请输入用户上限', trigger: 'blur' },],
+                signDate:[{required: true, message: '请选择签署日期', trigger: 'change' },],
+                expirationDate:[{required: true, message: '请选择签署日期', trigger: 'change' },],
+                saller:[{required: true, message: '请选择所属销售', trigger: 'change' },],
+            },
+
+            /* 表单初始值 */
+            firstFormData:{
+                areaType:'国内',
+                name:'',
+                creditCode:'',
+                address:'',
+                decisionMaker:'',
+                teamSize:'',
+                fundsize:'',
+                industry:'',
+                userMax:'',
+                saller:''
+            },
+            secondFormData:{
+                signDate:'',
+                expirationDate:''
+            }
+        }
+    },
+    watch:{
+        'firstFormData.areaType':{
+            handler(newVal){
+                console.log('watch?',newVal)
+                if(newVal==='海外'){
+                    this.firstFormData.creditCode = 'HZ' + new Date().getTime()
+                    this.firstFormData.address = ['海外','其他市']
+                    this.selectRegion(['海外','其他市'])
+                }else{
+                    this.firstFormData.creditCode = ''
+                    this.firstFormData.address = []
+                }
+            }
+        }
+    },
+    created() {
+        this.getIndustry()
+        this.getSale()
+    },
+    methods: {
+        normalizingParams(params){
+            const cascaderNodes = this.$refs.cascader.getCheckedNodes({leafOnly:true})
+            const IndustryName = this.tradeArr.find(item=>item.IndustryId===params.industry).IndustryName
+            return {
+                BusinessName:params.name,
+                CreditCode:params.creditCode,
+                RegionType:params.areaType,
+                Province:params.province,
+                City:params.city,
+                SellerId:Number(cascaderNodes[0]?cascaderNodes[0].value:0),
+                SellerName:cascaderNodes[0]?cascaderNodes[0].label:'',
+                Leader:params.decisionMaker,
+                IndustryId:Number(params.industry),
+                IndustryName:IndustryName,
+                CapitalScale:params.fundsize,
+                ResearchTeamSize:params.teamSize,
+                UserMax:Number(params.userMax),
+                SigningTime:params.signDate||'',
+                ExpiredTime:params.expirationDate||''
+            }
+        },
+        //跳转到第二步
+        handleStepSecond(){
+            this.$refs.firstFormEl.validate((valid)=>{
+                if(valid){
+                    const params = this.normalizingParams(this.firstFormData)
+                    businessCustomInterence.addBusiness({
+                        IsCheck:true,
+                        ...params
+                    }).then(res=>{
+                        if(res.Ret!==200) return 
+                        this.step++
+                    })
+                    
+                }
+            })
+        },
+        //保存商家
+        handleAddBusiness(){
+            this.$refs.secondFormEl.validate((valid)=>{
+                if(valid){
+                    const params = this.normalizingParams({...this.firstFormData,...this.secondFormData})
+                    businessCustomInterence.addBusiness({
+                        IsCheck:false,
+                        ...params
+                    }).then(res=>{
+                        if(res.Ret!==200) return 
+                        this.$message.success('添加成功')
+                        this.$router.push('/businessETAList')
+                    })
+                }
+            })
+        },
+
+        async callbackHandle(data,cb) {
+            if (data) {
+                this.isCheckCompanyInfo =true
+                cb([]);
+                let res = await customInterence.companyQccSearch({ KeyWord: data});
+                if (res.Ret === 200) {
+                    this.isCheckCompanyInfo =false;
+                    if (res.Data && res.Data.length > 0) {
+                        let arr = res.Data.map((item) => {
+                            return { value:item.Name, ...item };
+                        });
+                        cb(arr);
+                    }else{
+                        cb([{}]);
+                        // this.checkCompany()
+                    }	
+                }	
+            }
+		},
+
+        checkCompanyfocus(){
+			this.checkCompanyfocusIs =true;
+			setTimeout(() => {
+			    this.checkCompanyfocusIs =false;
+			},500)
+		},
+
+        //选中后增加社会信用码
+		customNameSelect(value) {
+			this.firstFormData.creditCode = value.CreditCode
+			//this.inquireSuccess = true;
+			setTimeout(async()=>{
+				this.checkCompany()
+			},10)
+		},
+
+        /* 客户名称/信用码失焦时校验客户名称是否存在 存在就提示 */
+		checkCompany() {	
+			setTimeout(()=>{
+                if(this.checkCompanyfocusIs) return
+                if((!this.firstFormData.name && !this.firstFormData.creditCode) || (this.isCheckCompanyInfo && this.firstFormData.name)) return
+                    customInterence.checkCompanyInfo({
+                        CompanyName:this.firstFormData.name,
+                        CreditCode:this.firstFormData.creditCode
+                    }).then(res =>{
+                        if(res.Ret === 200){
+                            if(res.Data.RepeatStatus > 0) {
+                                this.repeatId = res.Data.CompanyId;
+                                this.repeatName = res.Data.ProductName;
+                                this.nameRepeat = res.Data.RepeatStatus
+                                this.codeRepeat = res.Data.Status
+                                this.isCheck = true;
+                            }else {
+                                this.nameRepeat = 0
+                                this.isCheck = false;
+                            }
+                        }
+                    })
+			},500)
+		},
+
+        selectRegion(e){
+            this.firstFormData.province=e[0]
+            this.firstFormData.city=e[1]
+        },
+        /* 根据类型获取行业 */
+		getIndustry() {
+			customInterence.getindustry({
+				Classify:'ficc'
+			}).then(res => {
+				if(res.Ret === 200) {
+					this.tradeArr = res.Data.List || [];
+				}
+			})
+		},
+        /* 获取销售 */
+        async getSale() {
+            const res = await roadshowInterence.getSellerList();
+            if(res.Ret!==200) return 
+            this.salesArr = res.Data.List||[]
+            this.salesArr = this.salesArr.map(i=>{
+                if(!i.AdminName){
+                    i.AdminName = i.GroupName
+                }
+                if(!i.AdminId){
+                    i.AdminId = i.GroupId
+                }
+                return i
+            })
+        },
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.add-business{
+    padding:30px;
+    box-sizing: border-box;
+    background-color: #fff;
+    min-width: 1100px;
+    height: calc(100vh - 120px);
+    .first-step-form-wrap,.second-step-form-wrap{
+        margin-top:60px;
+        border-top: 1px solid #DCDCDC;
+        width:70%;
+    }
+    .el-form{
+        .form-line{
+            margin:30px 0;
+            border-bottom: 1px solid #DCDCDC;
+            .el-input,.el-select,.el-cascader,.el-radio-group{
+                width:360px;
+            }
+            .el-radio-group{
+                display: flex;
+                justify-content: space-between;
+                .el-radio{
+                    width: 165px;
+                    text-align: center;
+                }
+            }
+        }
+    }
+}
+.btns-box{
+    position: fixed;
+    left: 50%;
+    bottom: 100px;
+    transform: translateX(-50%);
+    width: 200px;
+    z-index: 99;
+}
+</style>

+ 359 - 0
src/views/business_ETA_manage/businessDetail.vue

@@ -0,0 +1,359 @@
+<template>
+    <div class="business-detail-wrap">
+        <div class="business-detail">
+            <Steps 
+                :activeStep="step"
+                :stepsArr="stepsArr"
+                @changeActiveStep="changeActiveStep"
+            />
+            <div class="first-step-form-wrap" v-show="step===1">
+                <el-form 
+                    :model="firstFormData" 
+                    ref="firstFormEl" 
+                    label-width="120px"
+                    inline
+                    :rules="rules"
+                    :disabled="true"
+                    class="first-step-form"
+                >
+                    <div class="form-line">
+                        <el-form-item label="商家名称" prop="BusinessName">
+                            <el-input disabled placeholder="请输入商家名称" v-model="firstFormData.BusinessName"/>
+                        </el-form-item>
+                        <el-form-item label="商家ID" prop="BusinessCode">
+                            <el-input disabled placeholder="请输入商家ID" v-model="firstFormData.BusinessCode"/>
+                        </el-form-item>
+                    </div>
+                    <div class="form-line">
+                        <el-form-item label="所属区域" prop="RegionType">
+                            <el-radio-group v-model="firstFormData.RegionType" disabled>
+                                <el-radio label="国内" border>国内</el-radio>
+                                <el-radio label="海外" border>海外</el-radio>
+                            </el-radio-group>
+                        </el-form-item>
+                        <el-form-item label="商家地址" prop="address">
+                            <el-cascader 
+                                v-model="firstFormData.address"
+                                :props="locationProps"
+                                clearable 
+                                :options="locationOptions"  
+                                @change="selectRegion" 
+                                placeholder="请选择客户地址" 
+                            />
+                        </el-form-item>
+                    </div>
+                    <div class="form-line">
+                        <el-form-item label="社会信用码" prop="CreditCode">
+                            <el-input disabled placeholder="请输入社会信用码" v-model="firstFormData.CreditCode"/>
+                        </el-form-item>
+                        <el-form-item label="研究团队规模" prop="ResearchTeamSize">
+                            <el-select 
+                                v-model="firstFormData.ResearchTeamSize" 
+                                placeholder="请选择研究团队规模"
+                                clearable
+                            >
+                                <el-option
+                                    v-for="item in teamSizeOpts"
+                                    :key="item.val"
+                                    :label="item.label"
+                                    :value="item.val">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div class="form-line">
+                        <el-form-item label="决策人" prop="Leader">
+                            <el-input placeholder="请输入决策人" v-model="firstFormData.Leader"/>
+                        </el-form-item>
+                        <el-form-item label="所属行业" prop="IndustryId">
+                            <el-select 
+                                v-model="firstFormData.IndustryId" 
+                                placeholder="请选择行业" 
+                                clearable
+                            >
+                                <el-option
+                                    v-for="item in tradeArr"
+                                    :key="item.IndustryId"
+                                    :label="item.IndustryName"
+                                    :value="item.IndustryId">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div class="form-line">
+                        <el-form-item label="资金规模" prop="CapitalScale">
+                            <el-input placeholder="请输入资金规模" v-model="firstFormData.CapitalScale"/>
+                        </el-form-item>
+                        <el-form-item label="用户上限" prop="UserMax">
+                            <el-input type="number" placeholder="请输入用户上限" v-model="firstFormData.UserMax"/>
+                        </el-form-item>
+                    </div>
+                    <div class="form-line">
+                        <el-form-item label="所属销售" prop="SellerName">
+                            <el-input disabled placeholder="请输入销售" v-model="firstFormData.SellerName"/>
+                        </el-form-item>
+                    </div>
+                    
+                </el-form>
+            </div>
+            <div class="second-step-form-wrap" v-show="step===2">
+                <el-table :data="recordData" border>
+                    <el-table-column
+                        v-for="item in tableColOpts"
+                        :key="item.key"
+                        :prop="item.key"
+                        :label="item.label"
+                        align="center"
+                    >
+                    </el-table-column>
+                </el-table>
+            </div>
+        </div>
+        <div class="business-other">
+            <div class="btn-wrap">
+                    <el-button type="primary" @click="$router.push({
+                        path:'/editETABusiness',
+                        query:{
+                            id:firstFormData.EtaBusinessId
+                        }
+                    })">编辑</el-button>
+            </div>
+            <div class="time-line-wrap">
+                <el-timeline>
+                    <el-timeline-item
+                        v-for="(activity, index) in activities"
+                        :key="index"
+                        color="#409EFF" 
+                        :timestamp="activity.CreateTime">
+                        <template slot="dot">
+                            <div class="dot-wrap">
+                                <div class="dot-inner"></div>
+                            </div>
+                        </template>
+                        {{activity.OperationRemark}}
+                    </el-timeline-item>
+                </el-timeline>
+            </div>
+        </div>
+
+        <!-- 添加续约 -->
+        <el-dialog
+            title="添加续约"
+            :visible.sync="showRenewal"
+            :modal-append-to-body="false"
+            :close-on-click-modal="false"
+            @closed="showRenewal=false"
+            width="580px"
+        >
+            <AddRenewal 
+                @addRenewal="handleAddRenewal"
+                @close="showRenewal=false"/>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import { customInterence , businessCustomInterence} from '@/api/api.js'
+import Steps from "./components/Steps.vue";
+import AddRenewal from "./components/AddRenewal";
+import {locationOptions} from "@/views/custom_manage/customList/location"
+export default {
+    components: {Steps,AddRenewal},
+    data() {
+        return {
+            locationOptions,
+            locationProps:{
+                value:'name',
+                children:'city',
+                label:'name'
+            },
+
+            step:1,//第几步
+            teamSizeOpts:[
+                {
+                    val:'50人及以下',
+                    label:'50人及以下'
+                },
+                {
+                    val:'200人及以下',
+                    label:'200人及以下'
+                },
+                {
+                    val:'超过200人',
+                    label:'超过200人'
+                }
+            ],
+            tradeArr:[],
+            firstFormData:{
+                RegionType:'',//1国内 2国外
+                BusinessName:'',
+                CreditCode:'',
+                Address:'',
+                Leader:'',
+                ResearchTeamSize:'',
+                CapitalScale:'',
+                IndustryId:'',
+                UserMax:'',
+                SellerId:'',
+            },
+            rules:{
+                address:[{ required: true, message: '请选择商家地址', trigger: 'change' },],
+                decisionMaker:[{required: true, message: '请输入决策人', trigger: 'blur' },],
+                teamSize:[{required: true, message: '请选择研究团队规模', trigger: 'change' },],
+                industry:[{required: true, message: '请选择所属行业', trigger: 'change' },],
+                userMax:[{required: true, message: '请输入用户上限', trigger: 'blur' },],
+                saller:[{required: true, message: '请选择所属销售', trigger: 'change' },],
+            },
+            recordData:[],
+            tableColOpts:[
+                {
+                    label:'签约时间',
+                    key:'SigningTime'
+                },{
+                    label:'到期时间',
+                    key:'ExpiredTime'
+                },{
+                    label:'到期天数',
+                    key:'ExpireDay'
+                }
+            ],
+            activities:[],
+        }
+    },
+    created() {
+        this.getIndustry()
+        this.getBusinessDetail()
+    },
+    methods: {
+        selectRegion(e){
+            this.firstFormData.province=e[0]
+            this.firstFormData.city=e[1]
+        },
+        /* 根据类型获取行业 */
+		getIndustry() {
+			customInterence.getindustry({
+				Classify:'ficc'
+			}).then(res => {
+				if(res.Ret === 200) {
+					this.tradeArr = res.Data.List || [];
+				}
+			})
+		},
+        changeActiveStep(index){
+            this.step = index + 1
+        },
+        // 获取商家详情
+        getBusinessDetail(){
+            //query id
+            businessCustomInterence.getBusinessDetail({
+                EtaBusinessId:Number(this.$route.query.id)
+            }).then(res=>{
+                if(res.Ret !== 200)return 
+                this.firstFormData = res.Data||{}
+                this.firstFormData.address = [res.Data.Province||'',res.Data.City||'']
+            })
+            //获取签约详情
+            this.getTableData(Number(this.$route.query.id))
+            //获取操作日志列表
+            this.getTimeLineData(Number(this.$route.query.id))
+        },
+        // 获取签约详情
+        getTableData(id){
+            businessCustomInterence.getContractList({
+                EtaBusinessId:id
+            }).then(res=>{
+                if(res.Ret !== 200) return 
+                this.recordData = res.Data||[]
+            })
+        },
+
+        // 获取操作日志详情
+        getTimeLineData(id){
+            businessCustomInterence.getTimeLineList({
+                EtaBusinessId:id
+            }).then(res=>{
+                if(res.Ret!==200) return 
+                this.activities = res.Data||[]
+            })
+        },
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.business-detail-wrap{
+    display: flex;
+    background-color: #fff;
+    min-width: 1100px;
+    min-height: calc(100vh - 120px);
+    padding:30px;
+    box-sizing: border-box;
+    gap:10%;
+    .business-detail{
+        width:70%;
+        .first-step-form-wrap,.second-step-form-wrap{
+            margin-top:60px;
+            border-top: 1px solid #DCDCDC;
+        }
+        .el-form{
+            .form-line{
+                margin:30px 0;
+                border-bottom: 1px solid #DCDCDC;
+                .el-input,.el-select,.el-cascader,.el-radio-group{
+                    width:360px;
+                }
+                .el-radio-group{
+                    display: flex;
+                    justify-content: space-between;
+                    .el-radio{
+                        width: 165px;
+                        text-align: center;
+                    }
+                }
+            }
+        }
+        .el-table{
+            margin-top: 30px;
+        }
+    }
+    .business-other{
+        flex: 1;
+        .btn-wrap{
+            display: flex;
+            gap:30px;
+            .el-button{
+                flex:1;
+            }
+        }
+        .time-line-wrap{
+            margin-top:30px;
+            border:1px solid #DCDFE6;
+            border-radius: 4px;
+            box-sizing: border-box;
+            padding: 30px;
+            max-height: calc(100vh - 250px);
+            overflow-y: auto;
+            .dot-wrap{
+                width:12px;
+                height:12px;
+                border:6px solid #fff;
+                background-color: #3385FF;
+                position: absolute;
+                left:-6px;
+                top:0;
+                border-radius: 50%;
+                .dot-inner{
+                    position: absolute;
+                    left:3px;
+                    top:3px;
+                    width:6px;
+                    height: 6px;
+                    border-radius: 50%;
+                    background-color: #fff;
+                }
+            }
+        }
+    }
+}
+
+</style>

+ 391 - 0
src/views/business_ETA_manage/businessEdit.vue

@@ -0,0 +1,391 @@
+<template>
+    <div class="business-detail-wrap">
+        <div class="business-detail">
+            <Steps 
+                :activeStep="step"
+                :stepsArr="stepsArr"
+                @changeActiveStep="changeActiveStep"
+            />
+            <div class="first-step-form-wrap" v-show="step===1">
+                <el-form 
+                    :model="firstFormData" 
+                    ref="firstFormEl" 
+                    label-width="120px"
+                    inline
+                    :rules="rules"
+                    class="first-step-form"
+                >
+                    <div class="form-line">
+                        <el-form-item label="商家名称" prop="BusinessName">
+                            <el-input disabled placeholder="请输入商家名称" v-model="firstFormData.BusinessName"/>
+                        </el-form-item>
+                        <el-form-item label="商家ID" prop="BusinessCode">
+                            <el-input disabled placeholder="请输入商家ID" v-model="firstFormData.BusinessCode"/>
+                        </el-form-item>
+                    </div>
+                    <div class="form-line">
+                        <el-form-item label="所属区域" prop="RegionType">
+                            <el-radio-group v-model="firstFormData.RegionType" disabled>
+                                <el-radio label="国内" border>国内</el-radio>
+                                <el-radio label="海外" border>海外</el-radio>
+                            </el-radio-group>
+                        </el-form-item>
+                        <el-form-item label="商家地址" prop="address">
+                            <el-cascader 
+                                v-model="firstFormData.address"
+                                :props="locationProps"
+                                clearable 
+                                :options="locationOptions"  
+                                @change="selectRegion" 
+                                placeholder="请选择客户地址" 
+                            />
+                        </el-form-item>
+                    </div>
+                    <div class="form-line">
+                        <el-form-item label="社会信用码" prop="CreditCode">
+                            <el-input disabled placeholder="请输入社会信用码" v-model="firstFormData.CreditCode"/>
+                        </el-form-item>
+                        <el-form-item label="研究团队规模" prop="ResearchTeamSize">
+                            <el-select 
+                                v-model="firstFormData.ResearchTeamSize" 
+                                placeholder="请选择研究团队规模"
+                                clearable
+                            >
+                                <el-option
+                                    v-for="item in teamSizeOpts"
+                                    :key="item.val"
+                                    :label="item.label"
+                                    :value="item.val">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div class="form-line">
+                        <el-form-item label="决策人" prop="Leader">
+                            <el-input placeholder="请输入决策人" v-model="firstFormData.Leader"/>
+                        </el-form-item>
+                        <el-form-item label="所属行业" prop="IndustryId">
+                            <el-select 
+                                v-model="firstFormData.IndustryId" 
+                                placeholder="请选择行业" 
+                                clearable
+                            >
+                                <el-option
+                                    v-for="item in tradeArr"
+                                    :key="item.IndustryId"
+                                    :label="item.IndustryName"
+                                    :value="item.IndustryId">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div class="form-line">
+                        <el-form-item label="资金规模" prop="CapitalScale">
+                            <el-input placeholder="请输入资金规模" v-model="firstFormData.CapitalScale"/>
+                        </el-form-item>
+                        <el-form-item label="用户上限" prop="UserMax">
+                            <el-input type="number" placeholder="请输入用户上限" v-model="firstFormData.UserMax"/>
+                        </el-form-item>
+                    </div>
+                    <div class="form-line">
+                        <el-form-item label="所属销售" prop="SellerName">
+                            <el-input disabled placeholder="请输入销售" v-model="firstFormData.SellerName"/>
+                        </el-form-item>
+                    </div>
+                </el-form>
+            </div>
+            <div class="second-step-form-wrap" v-show="step===2">
+                <el-table :data="recordData" border>
+                    <el-table-column
+                        v-for="item in tableColOpts"
+                        :key="item.key"
+                        :prop="item.key"
+                        :label="item.label"
+                        align="center"
+                    >
+                    </el-table-column>
+                </el-table>
+                <el-button type="text" @click="showRenewal=true">添加续约</el-button>
+            </div>
+        </div>
+        <div class="business-other">
+            <div class="btn-wrap">
+                <el-button type="primary" @click="handleSaveDetail">保存</el-button>
+                <el-button type="primary" plain @click="$router.push('/businessETAList')">取消</el-button>
+            </div>
+            <div class="time-line-wrap">
+                <el-timeline>
+                    <el-timeline-item
+                        v-for="(activity, index) in activities"
+                        :key="index"
+                        color="#409EFF" 
+                        :timestamp="activity.CreateTime">
+                        <template slot="dot">
+                            <div class="dot-wrap">
+                                <div class="dot-inner"></div>
+                            </div>
+                        </template>
+                        {{activity.OperationRemark}}
+                    </el-timeline-item>
+                </el-timeline>
+            </div>
+        </div>
+
+        <!-- 添加续约 -->
+        <el-dialog
+            title="添加续约"
+            :visible.sync="showRenewal"
+            :modal-append-to-body="false"
+            :close-on-click-modal="false"
+            @closed="showRenewal=false"
+            width="580px"
+        >
+            <AddRenewal 
+                @addRenewal="handleAddRenewal"
+                @close="showRenewal=false"/>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import { customInterence , businessCustomInterence} from '@/api/api.js'
+import Steps from "./components/Steps.vue";
+import AddRenewal from "./components/AddRenewal";
+import {locationOptions} from "@/views/custom_manage/customList/location"
+export default {
+    components: {Steps,AddRenewal},
+    data() {
+        return {
+            locationOptions,
+            locationProps:{
+                value:'name',
+                children:'city',
+                label:'name'
+            },
+
+            step:1,//第几步
+            teamSizeOpts:[
+                {
+                    val:'50人及以下',
+                    label:'50人及以下'
+                },
+                {
+                    val:'200人及以下',
+                    label:'200人及以下'
+                },
+                {
+                    val:'超过200人',
+                    label:'超过200人'
+                }
+            ],
+            tradeArr:[],
+            firstFormData:{
+                RegionType:'',//1国内 2国外
+                BusinessName:'',
+                CreditCode:'',
+                Address:'',
+                Leader:'',
+                ResearchTeamSize:'',
+                CapitalScale:'',
+                IndustryId:'',
+                UserMax:'',
+                SellerId:'',
+                Province:'',
+                City:''
+            },
+            rules:{
+                address:[{ required: true, message: '请选择商家地址', trigger: 'change' },],
+                decisionMaker:[{required: true, message: '请输入决策人', trigger: 'blur' },],
+                teamSize:[{required: true, message: '请选择研究团队规模', trigger: 'change' },],
+                industry:[{required: true, message: '请选择所属行业', trigger: 'change' },],
+                userMax:[{required: true, message: '请输入用户上限', trigger: 'blur' },],
+                saller:[{required: true, message: '请选择所属销售', trigger: 'change' },],
+            },
+            recordData:[],
+            tableColOpts:[
+                {
+                    label:'签约时间',
+                    key:'SigningTime'
+                },{
+                    label:'到期时间',
+                    key:'ExpiredTime'
+                },{
+                    label:'到期天数',
+                    key:'ExpireDay'
+                }
+            ],
+            activities:[],
+            showRenewal:false,
+        }
+    },
+    created() {
+        this.getIndustry()
+        this.getBusinessDetail()
+    },
+    methods: {
+        selectRegion(e){
+            this.firstFormData.Province=e[0]
+            this.firstFormData.City=e[1]
+        },
+        /* 根据类型获取行业 */
+		getIndustry() {
+			customInterence.getindustry({
+				Classify:'ficc'
+			}).then(res => {
+				if(res.Ret === 200) {
+					this.tradeArr = res.Data.List || [];
+				}
+			})
+		},
+        changeActiveStep(index){
+            this.step = index + 1
+        },
+        // 获取商家详情
+        getBusinessDetail(){
+            //query id
+            businessCustomInterence.getBusinessDetail({
+                EtaBusinessId:Number(this.$route.query.id)
+            }).then(res=>{
+                if(res.Ret !== 200)return 
+                this.firstFormData = res.Data||{}
+                this.firstFormData.address = [res.Data.Province||'',res.Data.City||'']
+            })
+            //获取签约详情
+            this.getTableData(Number(this.$route.query.id))
+            //获取操作日志列表
+            this.getTimeLineData(Number(this.$route.query.id))
+        },
+        // 获取签约详情
+        getTableData(id){
+            businessCustomInterence.getContractList({
+                EtaBusinessId:id
+            }).then(res=>{
+                if(res.Ret !== 200) return 
+                this.recordData = res.Data||[]
+            })
+        },
+
+        // 获取操作日志详情
+        getTimeLineData(id){
+            businessCustomInterence.getTimeLineList({
+                EtaBusinessId:id
+            }).then(res=>{
+                if(res.Ret!==200) return 
+                this.activities = res.Data||[]
+            })
+        },
+        // 保存商家
+        handleSaveDetail(){
+            const {EtaBusinessId,CapitalScale,
+                   address,Leader,IndustryId,
+                   ResearchTeamSize,UserMax} = this.firstFormData
+            const IndustryName = this.tradeArr.find(item=>item.IndustryId===IndustryId).IndustryName
+            businessCustomInterence.editBusiness({
+                EtaBusinessId,Leader,
+                IndustryName,CapitalScale,
+                ResearchTeamSize,
+                IndustryId:Number(IndustryId),
+                UserMax:Number(UserMax),
+                Province:address[0],
+                City:address[1]
+            }).then(res=>{
+                if(res.Ret!==200) return
+                this.$message.success('保存成功')
+                this.getBusinessDetail()
+            })
+        },
+        //添加续约
+        handleAddRenewal({signDate,expirationDate}){
+            businessCustomInterence.addNewContract({
+                EtaBusinessId:Number(this.$route.query.id),
+                SigningTime:signDate,
+                ExpiredTime:expirationDate
+            }).then(res=>{
+                if(res.Ret!==200) return 
+                this.$message.success('添加续约成功')
+                this.showRenewal=false
+                this.getTableData(Number(this.$route.query.id))
+                this.getTimeLineData(Number(this.$route.query.id))
+            })
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.business-detail-wrap{
+    display: flex;
+    background-color: #fff;
+    min-width: 1100px;
+    min-height: calc(100vh - 120px);
+    padding:30px;
+    box-sizing: border-box;
+    gap:10%;
+    .business-detail{
+        width:70%;
+        .first-step-form-wrap,.second-step-form-wrap{
+            margin-top:60px;
+            border-top: 1px solid #DCDCDC;
+        }
+        .el-form{
+            .form-line{
+                margin:30px 0;
+                border-bottom: 1px solid #DCDCDC;
+                .el-input,.el-select,.el-cascader,.el-radio-group{
+                    width:360px;
+                }
+                .el-radio-group{
+                    display: flex;
+                    justify-content: space-between;
+                    .el-radio{
+                        width: 165px;
+                        text-align: center;
+                    }
+                }
+            }
+        }
+        .el-table{
+            margin-top: 30px;
+        }
+    }
+    .business-other{
+        flex: 1;
+        .btn-wrap{
+            display: flex;
+            gap:30px;
+            .el-button{
+                flex:1;
+            }
+        }
+        .time-line-wrap{
+            margin-top:30px;
+            border:1px solid #DCDFE6;
+            border-radius: 4px;
+            box-sizing: border-box;
+            padding: 30px;
+            max-height: calc(100vh - 250px);
+            overflow-y: auto;
+            .dot-wrap{
+                width:12px;
+                height:12px;
+                border:6px solid #fff;
+                background-color: #3385FF;
+                position: absolute;
+                left:-6px;
+                top:0;
+                border-radius: 50%;
+                .dot-inner{
+                    position: absolute;
+                    left:3px;
+                    top:3px;
+                    width:6px;
+                    height: 6px;
+                    border-radius: 50%;
+                    background-color: #fff;
+                }
+            }
+        }
+    }
+}
+
+</style>

+ 488 - 0
src/views/business_ETA_manage/businessList.vue

@@ -0,0 +1,488 @@
+<template>
+    <div class="business-ETA-list">
+        <div class="top-filter-box">
+            <div>
+                <el-button type="primary" @click="$router.push('/addETABusiness')">新增</el-button>
+                <el-input
+                    placeholder="商家名称/社会信用码/商家ID"
+                    v-model="search_txt"
+                    @input="changeSelectOptions('search')"
+                    clearable
+                    style="maxWidth:500px;float:right">
+                    <i slot="prefix" class="el-input__icon el-icon-search"></i>
+                </el-input>
+            </div>
+            
+        </div>
+        <div class="table-wrap">
+            <div class="select-wrap">
+                <el-select 
+                    v-model="trade" 
+                    placeholder="请选择行业" 
+                    clearable 
+                    @change="changeSelectOptions('trade')"
+                >
+                    <el-option
+                        v-for="item in tradeArr"
+                        :key="item.IndustryId"
+                        :label="item.IndustryName"
+                        :value="item.IndustryId">
+                    </el-option>
+                </el-select>
+                <el-cascader
+                    ref="cascader"
+                    v-model="sales"
+                    :options="salesArr"
+                    :show-all-levels="false"
+                    :props="{
+                        expandTrigger: 'hover',
+                        children: 'Child',
+                        emitPath: false,
+                        label:'AdminName',
+                        value:'AdminId',
+                        multiple:true
+                    }"
+                    collapse-tags
+                    filterable
+                    clearable
+                    placeholder="请选择销售"
+                    @change="changeSelectOptions('sales')"
+                />
+                <el-cascader 
+                    v-model="valueLocation" 
+                    collapse-tags 
+                    :props="locationProps" 
+                    clearable 
+                    :options="locationOptions"  
+                    @change="changeSelectOptions('location')" 
+                    placeholder="请选择客户地址" 
+                />
+                <el-select 
+                    v-model="signStatus" 
+                    placeholder="请选择签约状态" 
+                    clearable
+                    @change="changeSelectOptions('signStatus')"
+                >
+                    <el-option
+                        v-for="item in signStatusOpts"
+                        :key="item.val"
+                        :label="item.label"
+                        :value="item.val">
+                    </el-option>
+                </el-select>
+            </div>
+            <el-table
+                    ref="userTable"
+                    :data="tableData"
+                    v-loading="isTableLoadding"
+                    element-loading-text="数据加载中..."
+                    @sort-change="sortChangeHandle"
+                    border
+                >
+                    <el-table-column
+                        v-for="item in tableColOpts"
+                        :key="item.key"
+                        :prop="item.key"
+                        :label="item.label"
+                        align="center"
+                        :sortable="item.sort"
+                    >
+                        <template slot-scope="scope">
+                            <span v-if="item.key==='SigningStatus'">
+                                {{signStatusOpts[scope.row.SigningStatus - 1].label}}{{!scope.row.Enable?'(禁用)':''}}
+                            </span>
+                            <span v-else-if="item.key==='BusinessName'" class="link" @click="handleShowDetail(scope.row)">
+                                {{ scope.row.BusinessName }}
+                            </span>
+                            <span v-else>{{scope.row[item.key]}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="操作"
+                        align="center"
+                    >
+                        <template slot-scope="scope">
+                            <div class="table-opt-btns">
+                                <span @click="handleEdit(scope.row)">编辑</span>
+                                <span @click="handleShowRenewal(scope.row)">添加续约</span>
+                                <el-dropdown 
+                                    size="medium" 
+                                    placement="bottom-start" 
+                                    @command="itemclickHandle($event,scope.row)"
+                                >
+                                    <span class="el-dropdown-link">
+                                        <i class="el-icon-more el-icon--right"></i>
+                                        <el-dropdown-menu slot="dropdown">
+                                            <el-dropdown-item command="modifySale">修改销售</el-dropdown-item>
+                                            <el-dropdown-item command="disable">{{scope.row.Enable?'禁用':'启用'}}</el-dropdown-item>
+                                        </el-dropdown-menu>
+                                    </span>
+                                </el-dropdown>
+                            </div>
+                        </template>
+                    
+                    </el-table-column>
+            </el-table>
+            <div style="text-align:right;margin-top:20px">
+                <el-pagination 
+                        layout="total,prev,pager,next,jumper" 
+                        background 
+                        :current-page="page"
+                        @current-change="handleCurrentChange"
+                        :page-size="pageSize"
+                        :total="total"
+                        style="display: inline-block"
+                    />
+            </div>
+        </div>
+
+        <!-- 添加续约 -->
+        <el-dialog
+            title="添加续约"
+            :visible.sync="showRenewal"
+            :modal-append-to-body="false"
+            :close-on-click-modal="false"
+            @closed="showRenewal=false"
+            width="580px"
+        >
+            <AddRenewal 
+                @addRenewal="handleAddRenewal"
+                @close="showRenewal=false"/>
+        </el-dialog>
+
+        <!-- 修改销售 -->
+        <el-dialog
+            title="修改销售"
+            :visible.sync="showModifySaller"
+            :modal-append-to-body="false"
+            :close-on-click-modal="false"
+            @closed="showRenewal=false"
+            width="580px"
+        >
+            <ModifySaller 
+                :salesArr="salesArr"
+                :data="modifyData"
+                @modifySaller="handleModifySaller"
+                @close="showModifySaller=false"/>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import { customInterence ,businessCustomInterence , roadshowInterence} from '@/api/api.js'
+import {locationOptions} from "@/views/custom_manage/customList/location"
+import AddRenewal from './components/AddRenewal.vue'
+import ModifySaller from './components/ModifySaller.vue'
+export default {
+    components:{AddRenewal,ModifySaller},
+    data() {
+        return {
+            /* dialog */
+            showRenewal:false,//显示添加续约
+            showModifySaller:false,//显示修改销售
+            modifyData:{},//当前操作的商家数据
+
+            /* select options */
+            search_txt:'',
+            trade:'',
+            tradeArr:[],
+            sales:[],
+            salesArr:[],//销售
+            locationOptions,
+            valueLocation:[],
+            provinceValue:'',
+            cityValue:'',
+            locationProps:{
+                multiple: true,
+                value:'name',
+                children:'city',
+                label:'name'
+            },
+            signStatus:'',
+            signStatusOpts:[
+                {
+                    label:'首次签约',
+                    val:1
+                },
+                {
+                    label:'续约中',
+                    val:2
+                },
+                {
+                    label:'已终止',
+                    val:3
+                }
+            ],
+            /* sort options */
+            sortParam:0,
+            sortType:0,
+
+            /* table */
+            tableColOpts:[
+                {
+                    label:'商家名称',
+                    key:'BusinessName'
+                },
+                {
+                    label:'商家ID',
+                    key:'BusinessCode'
+                },
+                {
+                    label:'商家地址',
+                    key:'Address'
+                },
+                {
+                    label:'销售',
+                    key:'SellerName'
+                },
+                {
+                    label:'签约状态',
+                    key:'SigningStatus'
+                },
+                {
+                    label:'最新签约时间',
+                    key:'SigningTime',
+                    sort:true
+                },
+                {
+                    label:'到期时间',
+                    key:'ExpiredTime',
+                    sort:true
+                },
+                {
+                    label:'创建时间',
+                    key:'CreateTime',
+                    sort:true
+                },
+                {
+                    label:'用户上限',
+                    key:'UserMax',
+                    sort:true
+                },
+                
+            ],
+            tableData:[],
+            isTableLoadding:false,
+            page:1,
+            pageSize:20,
+            total:0,
+        }
+    },
+    created() {
+        this.getIndustry()
+        this.getSale()
+        this.getBusinessList()
+    },
+    methods: {
+        // 筛选项改变
+        changeSelectOptions(option){
+            if(option === 'location'){
+                const provinceArr = []
+                const cityArr = []
+                this.valueLocation.forEach(item=>{
+                        // 省
+                        provinceArr.push(item[0])
+                        // 市
+                        cityArr.push(item[1])
+                })
+                //provinceArr需要去重
+                this.provinceValue = [...new Set(provinceArr)].join(',')
+                this.cityValue = cityArr.join(',')
+                this.page = 1;
+            }
+            this.getBusinessList()
+        },
+        // 表格排序方式改变
+        sortChangeHandle(params){
+            const sortParamMap = {
+                'SigningTime':1,//签约时间
+                'ExpiredTime':2,//到期时间
+                'CreateTime':3,//创建时间
+                'UserMax':4,//用户上限
+            }
+            this.sortParam = sortParamMap[params.prop]
+            this.sortType = params.order === 'ascending' ? 1 :params.order === 'descending' ? 2 : 0
+            this.page = 1
+            this.getBusinessList()
+        },
+        // 获取表格数据
+        getBusinessList(){
+            this.isTableLoadding = true
+            businessCustomInterence.getBusinessList({
+                Keyword:this.search_txt,
+                SellerIds:this.sales.join(','),
+                SigningStatus:Number(this.signStatus),
+                Province:this.provinceValue,
+                City:this.cityValue,
+                IndustryId:Number(this.trade),
+                PageSize:this.pageSize,
+                CurrentIndex:this.page,
+                SortParam:this.sortParam,
+                SortType:this.sortType
+            }).then(res=>{
+                if(res.Ret!==200) return 
+                this.tableData = res.Data.List
+                this.total = res.Data.Paging.Totals
+                this.isTableLoadding = false
+            })
+        },
+        // 去详情
+        handleShowDetail(data){
+            this.$router.push({
+                path:'/businessETADetail',
+                query:{
+                    id:data.EtaBusinessId
+                }
+            })
+        },
+        // 前去编辑
+        handleEdit(data){
+            this.$router.push({
+                path:'/editETABusiness',
+                query:{
+                    id:data.EtaBusinessId
+                }
+            })
+        },
+
+        // 显示添加续约
+        handleShowRenewal(e){
+            this.modifyData = e
+            this.showRenewal=true
+        },
+        // 商家添加续约
+        handleAddRenewal({signDate,expirationDate}){
+            businessCustomInterence.addNewContract({
+                EtaBusinessId:this.modifyData.EtaBusinessId,
+                SigningTime:signDate,
+                ExpiredTime:expirationDate
+            }).then(res=>{
+                if(res.Ret!==200) return 
+                this.$message.success('添加续约成功')
+                this.showRenewal=false
+                this.getBusinessList()
+            })
+        },
+        // 商家修改销售
+        handleModifySaller({saller,sallerName}){
+            businessCustomInterence.changeBusinessSeller({
+                EtaBusinessId:this.modifyData.EtaBusinessId,
+                SellerId:saller,
+                SellerName:sallerName
+            }).then(res=>{
+                if(res.Ret!==200) return 
+                this.$message.success('修改销售成功')
+                this.showModifySaller = false
+                this.getBusinessList()
+            })
+        },
+        // 启用禁用商家
+        changeBusinessStatus(data){
+            businessCustomInterence.changeBusinessStatus({
+                EtaBusinessId:data.EtaBusinessId
+            }).then(res=>{
+                if(res.Ret!==200) return 
+                this.$message.success(`${data.Enable?'禁用':'启用'}成功`)
+                this.getBusinessList()
+            })
+        },
+
+        // 操作栏 折叠起来的按钮
+        itemclickHandle(type,data){
+            if(type==='modifySale'){
+                this.modifyData = data
+                this.showModifySaller=true
+            }else if (type==='disable'){
+                this.changeBusinessStatus(data)
+            }
+        },
+
+        /* 根据类型获取行业 */
+		getIndustry() {
+			customInterence.getindustry({
+				Classify:'ficc'
+			}).then(res => {
+				if(res.Ret === 200) {
+					this.tradeArr = res.Data.List || [];
+				}
+			})
+		},
+        /* 获取销售 */
+        async getSale() {
+            const res = await roadshowInterence.getSellerList();
+            if(res.Ret!==200) return 
+            this.salesArr = res.Data.List||[]
+            this.salesArr = this.salesArr.map(i=>{
+                if(!i.AdminName){
+                    i.AdminName = i.GroupName
+                }
+                if(!i.AdminId){
+                    i.AdminId = i.GroupId
+                }
+                return i
+            })
+		},
+        handleCurrentChange(page){
+            this.page = page
+            this.getBusinessList()
+        }
+    },
+}
+</script>
+<style lang="scss">
+.business-ETA-list{
+    .top-filter-box{
+        .el-cascader__search-input {
+            min-width: 30px;
+        }
+    } 
+}
+
+</style>
+<style lang="scss" scoped>
+.top-filter-box{
+    border: 1px solid #ECECEC;
+    padding: 20px 30px;
+    background: #fff;
+    border-radius: 4px;
+    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
+}
+.table-wrap{
+    margin-top: 30px;
+    border: 1px solid #ECECEC;
+    padding: 20px 30px;
+    background: #fff;
+    border-radius: 4px;
+    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
+    .select-wrap{
+        display: flex;
+        gap:20px;
+        align-items: center;
+        margin-bottom: 20px;
+        .el-select,.el-cascader{
+            width:240px;
+        }
+    }
+    .link{
+        color:#4099ef;
+        cursor: pointer;
+        &:hover{
+            text-decoration: underline;
+        }
+        
+    }
+}
+.table-opt-btns{
+    color:#4099ef;
+    display:flex;
+    align-content: center;
+    justify-content: center;
+    align-items: center;
+    span{
+        margin: 0 3px;
+        cursor: pointer;
+    }
+}
+
+
+</style>

+ 77 - 0
src/views/business_ETA_manage/components/AddRenewal.vue

@@ -0,0 +1,77 @@
+<template>
+    <div class="add-renewal-wrap">
+        <el-form 
+            :model="ruleForm" 
+            :rules="rules" 
+            ref="ruleForm" 
+            label-width="100px" 
+            class="demo-ruleForm"
+        >
+            <el-form-item label="签约时间" prop="signDate">
+                <el-date-picker
+                    v-model="ruleForm.signDate"
+                    type="date"
+                    placeholder="选择日期"
+                    value-format="yyyy-MM-dd"
+                />
+            </el-form-item>
+            <el-form-item label="到期时间" prop="expirationDate">
+                <el-date-picker
+                    v-model="ruleForm.expirationDate"
+                    type="date"
+                    placeholder="选择日期"
+                    value-format="yyyy-MM-dd"
+                />
+            </el-form-item>
+            <div style="text-align:center;margin:30px 0">
+                <el-button type="primary" plain @click="handleClose">取消</el-button>
+                <el-button type="primary" @click="handleSave">保存</el-button>
+            </div>
+        </el-form>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            rules:{
+                signDate:[{required: true, message: '请选择签署日期', trigger: 'change' },],
+                expirationDate:[{required: true, message: '请选择签署日期', trigger: 'change' },],
+            },
+            ruleForm:{
+                signDate:'',
+                expirationDate:''
+            }
+        }
+    },
+    methods: {
+        handleSave(){
+            this.$refs.ruleForm.validate((valid)=>{
+                if(valid){
+                    const flag=this.$moment(this.ruleForm.signDate).isBefore(this.ruleForm.expirationDate);
+                    if(!flag){
+                        this.$message.warning('到期时间不得早于签约时间')
+                        return
+                    }
+                    this.$emit('addRenewal',this.ruleForm)
+                    this.initForm()
+                }
+            })
+        },
+        initForm(){
+            this.ruleForm.signDate = ''
+            this.ruleForm.expirationDate = ''
+            this.$refs.ruleForm.resetFields();
+        },
+        handleClose(){
+            this.initForm()
+            this.$emit('close')
+        }
+    },
+}
+</script>
+
+<style>
+
+</style>

+ 95 - 0
src/views/business_ETA_manage/components/ModifySaller.vue

@@ -0,0 +1,95 @@
+<template>
+    <div class="modify-saller-wrap">
+        <el-form 
+            :model="ruleForm" 
+            :rules="rules" 
+            ref="ruleForm" 
+            label-width="100px" 
+            class="demo-ruleForm"
+        >
+            <el-form-item label="商家名称">
+                <span>{{data.BusinessName||''}}</span>
+            </el-form-item>
+            <el-form-item label="当前销售">
+                <span>{{data.SellerName||''}}</span>
+            </el-form-item>
+            <el-form-item label="移至销售" prop="saller">
+                <el-cascader
+                    ref="cascader"
+                    v-model="ruleForm.saller"
+                    :options="salesArr"
+                    :show-all-levels="false"
+                    :props="{
+                        expandTrigger: 'hover',
+                        children: 'Child',
+                        emitPath: false,
+                        label:'AdminName',
+                        value:'AdminId',
+                    }"
+                    collapse-tags
+                    filterable
+                    clearable
+                    placeholder="请选择销售"
+                />
+            </el-form-item>
+            <div style="text-align:center;margin:30px 0">
+                <el-button type="primary" plain @click="handleClose">取消</el-button>
+                <el-button type="primary" @click="handleSave">保存</el-button>
+            </div>
+        </el-form>
+    </div>
+</template>
+
+<script>
+export default {
+    props:{
+        salesArr:{ //销售数据
+            type:Array,
+            default:()=>{return []}
+        },
+        data:{ //正在编辑的数据
+            type:Object,
+            default:()=>{return {}}
+        }
+    },
+    data() {
+        return {
+            salesArr:[],
+            rules:{
+                saller:[{required: true, message: '请选择所属销售', trigger: 'change' },],
+            },
+            ruleForm:{
+                saller:''
+            }
+        }
+    },
+    created() {},
+    methods: {
+        handleSave(){
+            this.$refs.ruleForm.validate((valid)=>{
+                if(valid){
+                    const cascaderNodes = this.$refs.cascader.getCheckedNodes({leafOnly:true})
+                    this.$emit('modifySaller',{
+                        saller:Number(cascaderNodes[0]?cascaderNodes[0].value:0),
+                        sallerName:cascaderNodes[0]?cascaderNodes[0].label:''
+                    })
+                    this.initForm()
+
+                }
+            })
+        },
+        initForm(){
+            this.ruleForm.saller = ''
+            this.$refs.ruleForm.resetFields();
+        },
+        handleClose(){
+            this.initForm()
+            this.$emit('close')
+        },
+    },
+}
+</script>
+
+<style>
+
+</style>

+ 106 - 0
src/views/business_ETA_manage/components/Steps.vue

@@ -0,0 +1,106 @@
+<template>
+    <div class="step-wrap">
+        <div class="step-item" :class="{'active':activeStep===index+1}"
+            v-for="(step,index) in stepsArr" :key="index"
+            @click="changeActiveStep(index)">
+            <div class="step-line"></div>
+            <div class="step-icon" v-if="(activeStep<=index+1)||allowStepClick">{{index+1}}</div>
+            <div class="step-icon finished" v-else><i class="el-icon-check"></i></div>
+            <div class="step-text">{{step.text}}</div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    props:{
+        allowStepClick:{ //是否允许点击切换步骤
+            type:Boolean,
+            default:true
+        },
+        activeStep:{ //激活的步骤
+            type:Number,
+            default:0
+        },
+        stepsArr:{ //步骤数组
+            type:Array,
+            default:()=>{
+                return [
+                    {
+                        text:'基础信息'
+                    },{
+                        text:'签约信息'
+                    }
+                ]
+            }
+        }
+    },
+    data() {
+        return {
+
+        };
+    },
+    methods: {
+        changeActiveStep(index){
+            if(!this.allowStepClick) return 
+            this.$emit('changeActiveStep',index)
+        }
+    },
+};
+</script>
+
+<style scoped lang="scss">
+.step-wrap{
+    display: flex;
+    .step-item{
+        position: relative;
+        display: flex;
+        align-items: center;
+        gap:16px;
+        color:rgba(0, 0, 0, 0.4);
+        cursor: pointer;
+        .step-line{
+            flex: 1;
+            height:2px;
+            background-color: #DCDCDC;
+            min-width: 270px;
+        }
+        .step-icon{
+            width:24px;
+            height:24px;
+            border-radius: 50%;
+            border:2px solid rgba(0, 0, 0, 0.4);
+            text-align: center;
+            line-height: 24px;
+            font-size: 16px;
+            &.finished{
+                border-color: #3385FF;
+                i{
+                    color:#3385FF;
+                    font-weight: bold;
+                }
+            }
+        }
+        .step-text{
+            margin-right: 16px;
+        }
+        &:first-child{
+            .step-line{
+                display: none;
+            }
+        }
+
+        &.active{
+            color:#3385FF;
+            .step-icon{
+                background-color: #3385FF;
+                color:#fff;
+                border-color: transparent;
+            }
+            .step-line{
+                background-color: #3385FF;
+            }
+        }
+    }
+}
+</style>