瀏覽代碼

续约申请

Karsa 7 月之前
父節點
當前提交
90a79f208d

+ 123 - 0
src/components/imgPreview.vue

@@ -0,0 +1,123 @@
+<script setup>
+import { ref, watch } from 'vue'
+
+const props = defineProps({
+		arr:{
+			type:Array,
+		},
+		isPreview:{
+			type:Boolean
+		},
+		actIndex:{
+			type:Number
+		},
+		isShowToggle: {
+			type:Boolean
+		}
+})
+const emit = defineEmits(['close','togglePre'])
+
+const list = ref(props.arr||[])
+const currtIndex = ref(props.actIndex||0)
+
+watch(
+  () =>props.arr,
+  (newval) => {
+    list.value = newval
+  }
+)
+
+watch(
+  () =>props.actIndex,
+  (newval) => {
+    currtIndex.value = newval
+  }
+)
+
+function close() {
+  emit('close')
+}
+
+function turnLeft() {
+  emit('togglePre',1)
+}
+
+function turnRight() {
+  emit('togglePre',2)
+}
+</script>
+<template>
+  <transition name="fade" mode="out-in">
+		<div v-if="isPreview" class="imgPreview_container_dask">
+			<span class="close_btn" @click="close"></span>
+			<div class="img_container">
+				<img :src="list[currtIndex]" class="img">
+			</div>
+			<template v-if="isShowToggle">
+				<span class="arrow_btn arrow_left" @click="turnLeft"></span>
+				<span class="arrow_btn arrow_right" @click="turnRight"></span>
+			</template>
+		</div>
+	</transition>
+</template>
+<style scoped lang="scss">
+.imgPreview_container_dask {
+	position: fixed;
+	top: 0;
+	right: 0;
+	bottom: 0;
+	left: 0;
+	z-index: 9999;
+	background: rgba($color: #000000, $alpha: 0.8);
+	.close_btn {
+		width: 65px;
+		height: 65px;
+		position: absolute;
+		right: 60px;
+		top: 30px;
+		background: url('~@/assets/img/cus_m/pre_close.png') no-repeat 100%;
+		background-size: cover;
+		cursor: pointer;
+		&:hover {
+			opacity: 0.6;
+		}
+	}
+	.arrow_btn {
+		width: 62px;
+		height: 110px;
+		position: absolute;
+		top: 50%;
+		transform: translateY(-50%);
+		cursor: pointer;
+		&.arrow_left {
+			left: 54px;
+			background: url('~@/assets/img/cus_m/pre_left.png') no-repeat 100%;
+			background-size: cover;
+			&:hover {
+				opacity: 0.6;
+			}
+		}
+		&.arrow_right {
+			right: 54px;
+			background: url('~@/assets/img/cus_m/pre_right.png') no-repeat 100%;
+			background-size: cover;
+			&:hover {
+				opacity: 0.6;
+			}
+		}
+	}
+	.img_container {
+		position: absolute;
+		left: 50%;
+		top: 50%;
+		transform: translate(-50%,-50%);
+		max-height: 100vh;
+		overflow: hidden;
+		overflow-y: auto;
+		.img {
+			max-width: 1200px;
+			height: auto;
+		}
+	}
+}
+</style>

+ 13 - 12
src/router/modules/customRoutes.js

@@ -186,18 +186,19 @@ export default [
           keepAlive: false,
         },
       },
-      // // 服务更新差分为 续约申请和补充协议其中 权益无补充协议
-      // {
-      //   path: "updateCustom",
-      //   name: "续约申请",
-      //   component: () => import("@/views/custom_manage/customList/updateServe.vue"),
-      //   hidden: true,
-      //   meta: {
-      //     pathFrom: "customList",
-      //     pathName: "客户列表",
-      //     keepAlive: false,
-      //   },
-      // },
+      // 服务更新差分为 续约申请和补充协议其中 权益无补充协议
+      {
+        path: "updateCustom",
+        name: "updateCustom",
+        component: () => import("@/views/custom_manage/custom/updateServe.vue"),
+        hidden: true,
+        meta: {
+          title: '续约申请',
+          pathFrom: "customList",
+          pathName: "客户列表",
+          keepAlive: false,
+        },
+      },
       // {
       //   path: "addAgreement",
       //   name: "补充协议",

+ 2 - 2
src/views/custom_manage/components/ContractInfo.vue

@@ -142,7 +142,7 @@ async function handleSubmit() {
       <div>
         <img
           width="15"
-          src="../../../assets/img/cus_m/man.png"
+          src="@/assets/img/cus_m/man.png"
           alt=""
           style="margin-right: 15px"
         /><span>{{ props.initData.type }}</span>
@@ -285,7 +285,7 @@ async function handleSubmit() {
           </div>
         </div>
         <div v-else style="text-align: center; padding: 50px 0 200px 0">
-          <img width="135" src="../../../assets/img/cus_m/nodata.png" alt="" />
+          <img width="135" src="@/assets/img/cus_m/nodata.png" alt="" />
           <p style="font-size: 14px; color: #aab4cc">暂无结果</p>
         </div>
       </div>

+ 11 - 19
src/views/custom_manage/custom/components/Contactdialog.vue

@@ -117,6 +117,8 @@ const userRule = {
   ],
 }
 
+const userFormIndeterminacy = ref('')
+
 watch(
   () => props.isAddContact,
   (nval) => {
@@ -124,9 +126,9 @@ watch(
 
     getPhoneCode()
     if (props.userForm.Source) {
-      this.userFormIndeterminacy = props.userForm.Source
+      userFormIndeterminacy.value = props.userForm.Source
     } else {
-      props.userForm.Source = this.userFormIndeterminacy || 'add_user'
+      props.userForm.Source = userFormIndeterminacy.value || 'add_user'
     }
   }
 )
@@ -229,7 +231,6 @@ function getCompany(query) {
 const btnLoading = ref(false)
 /* 保存 */
 function saveUser() {
-  
   userFormRef.value.validate((valid, key) => {
     if (valid) {
       btnLoading.value=true;
@@ -308,7 +309,6 @@ function saveUser() {
 }
 
 function saveUserFicc() {
-     
   if (ProductName.value == '权益' && !props.userForm.mail && !props.userForm.tel1) {
     ElMessage.warning("至少输入一个手机号或邮箱");
     return;
@@ -321,19 +321,9 @@ function saveUserFicc() {
     ElMessage.warning("至少输入一个手机号或邮箱");
     return;
   } else {
-    var num = 0;
-    userFormRef.value.validateField(
-      ["name", "sex", "tel1", "desiger", "carte"],
-      (emailError) => {
-        if (!emailError) {
-          num += 1;
-        } else {
-          return false;
-        }
-      }
-    );
 
-    if (num === 5) {
+    userFormRef.value.validate(valid => {
+      if(!valid) return 
       btnLoading.value=true;
       if (props.title == "新增联系人") {
         customInterence
@@ -405,7 +395,8 @@ function saveUserFicc() {
             btnLoading.value=false
           });
       }
-    }
+    })
+
   }
 }
 
@@ -549,6 +540,7 @@ function fileSelected() {
       class="concact_dialog"
       center
       width="900px"
+      draggable
     >
       <template #header>
         <div
@@ -593,7 +585,7 @@ function fileSelected() {
           </el-input>
         </el-form-item>
         <el-form-item label="性别" prop="sex" style="width: 370px">
-          <el-radio-group v-model="userForm.sex" size="medium">
+          <el-radio-group v-model="userForm.sex" size="default">
             <el-radio :label="1" style="width: 50px">男</el-radio>
             <el-radio :label="2" style="width: 50px; margin-left: 0"
               >女</el-radio
@@ -746,7 +738,7 @@ function fileSelected() {
           />
           <el-button
             type="primary"
-            size="medium"
+            size="default"
             @click="clickinput"
             v-if="!userForm.carte"
             >点击上传</el-button

+ 2 - 2
src/views/custom_manage/custom/components/ContractInfo.vue

@@ -151,7 +151,7 @@ function formateYear(start, end) {
     >
       <template #header>
         <div>
-          <img width="15" src="../../../assets/img/cus_m/man.png" alt="" style="margin-right: 15px" /><span>{{ initData.type }}</span>
+          <img width="15" src="@/assets/img/cus_m/man.png" alt="" style="margin-right: 15px" /><span>{{ initData.type }}</span>
         </div>
       </template>
 
@@ -230,7 +230,7 @@ function formateYear(start, end) {
             </div>
           </div>
           <div v-else style="text-align:center;padding:50px 0 200px 0">
-            <img width="135" src="../../../assets/img/cus_m/nodata.png" alt="">
+            <img width="135" src="@/assets/img/cus_m/nodata.png" alt="">
             <p style="font-size:14px;color:#AAB4CC">暂无结果</p>
           </div>
         </div>

+ 334 - 0
src/views/custom_manage/custom/components/raiPermissionbox.vue

@@ -0,0 +1,334 @@
+<script setup>
+import { ref } from 'vue'
+
+const props = defineProps({
+  data:{
+    required:true,
+    type:Object
+  },
+  formData:{ //formData.qyBigServeCheck  0-无 1- 70万 2- 45万
+    required:true,
+    type:Object
+  },
+  hasNoChild:{
+    type:Boolean,
+    default:false
+  }
+})
+const emit = defineEmits([])
+
+// 套餐选中
+function bigServeCheck(value,itB,item){
+  // console.log(value,item);
+  props.formData.qyBigServeCheck = value?getQyBigServeCheckNumber(itB.PermissionName):0
+  item.ItemsBig.map(itB => itB.isIndeterminate=false)
+  if(value){
+    // 策略
+    item.CheckList= [...new Set([...item.CheckList,23,30])]
+  }else{
+    item.CheckList = item.CheckList.filter(t => ![23,30].includes(t))
+  }
+  if(props.hasNoChild){
+    // 没有主客观
+    if(value){
+      item.CheckList= [...new Set([...item.CheckList,22, 21, 20, 19])]
+    }else{
+      item.CheckList = item.CheckList.filter(t => ![22, 21, 20, 19].includes(t))
+    }
+    // 设置升级禁用状态
+    item.ItemsUp.map(u =>{
+      u.disabled=value
+    })
+  }else{
+    item.Items.map(ele =>{
+      if(ele.Child){
+        ele.Checked=value
+        handleItemCheck(ele,item)
+      }
+    })
+  }
+}
+
+// 医药、消费、科技、智造(有主客观)选中
+function handleItemCheck(it,item){
+
+  it.isIndeterminate=false
+  let childIds=it.Child.map(t => t.ChartPermissionId)
+  if(it.Checked){
+    item.CheckList= [...new Set([...item.CheckList,...childIds])]
+  }else{
+    item.CheckList = item.CheckList.filter(t => !childIds.includes(t))
+  }
+  handleQYChecked(it,item)
+}
+
+
+function handleQYChecked(it,item){
+  // console.log(it,item);
+  let count=0
+  if(it.Child){
+    // 有主客观
+    it.Child.map(t => {
+      if(item.CheckList.includes(t.ChartPermissionId)) count++
+    })
+    it.Checked=count==2
+    it.isIndeterminate=count==1
+  }
+  if(props.hasNoChild){
+    if(item.CheckList.includes(it.ChartPermissionId)) count++
+  }
+  // 设置升级套餐的禁用
+  let changeItem=item.ItemsUp.find(itUp => itUp.PermissionName.includes(it.PermissionName))
+  if(changeItem) changeItem.disabled=count!=0
+  // 设置大套餐的状态
+  let bigServeCheckNum
+  if(props.formData.qyBigServeCheck){
+    //qyBigServeCheck有值就作用在对应的大套餐
+    bigServeCheckNum=props.formData.qyBigServeCheck==1?1:0
+  }else{
+    // 默认作用在45万上 原本有状态的话,就作用在有状态的大套餐
+    bigServeCheckNum= item.ItemsBig[1].isIndeterminate || item.ItemsBig[1].Checked?1:0
+  }
+  // 正式服 各行业的客观的chartPermissionId和测试服的不一样
+  let allChartPermissionIds=process.env.NODE_ENV === 'production'?[22,39,21,38,20,37,19,36,23,30]:[22,37,21,36,20,35,19,34,23,30]
+  
+  let bigServeItems=props.hasNoChild?[22,21,20,19,23,30]:allChartPermissionIds
+  if(bigServeItems.every(t => item.CheckList.includes(t))){
+    item.ItemsBig[bigServeCheckNum].Checked=true
+    props.formData.qyBigServeCheck=getQyBigServeCheckNumber(item.ItemsBig[bigServeCheckNum].PermissionName)
+  }else{
+    item.ItemsBig[bigServeCheckNum].Checked=false
+    props.formData.qyBigServeCheck=0
+  }
+  item.ItemsBig[bigServeCheckNum].isIndeterminate=
+  bigServeItems.some(t =>item.CheckList.includes(t)) && (!item.ItemsBig[bigServeCheckNum].Checked)
+}
+
+function handleUpdateChecked(value,name,item){
+  let isDisabled = item.ItemsUp.some(itU => item.CheckList.includes(itU.ChartPermissionId))
+  // 设置大套餐禁用
+  item.ItemsBig.map(itb => itb.disabled=isDisabled)
+  // 设置基础套餐禁用
+  item.Items.find(its => name.includes(its.PermissionName)).disabled=value
+}
+
+function handlePrivateChecked(value,itP,item){
+  if(![20032,20031,31].includes(itP.ChartPermissionId)) return 
+  // 买方严选的互斥
+  item.ItemsPrivate.forEach(itPri => {
+    if([20032,20031,31].includes(itPri.ChartPermissionId)&&itP.ChartPermissionId!=itPri.ChartPermissionId && value){
+        itPri.disabled =true
+    }else {
+        itPri.disabled =false
+    }
+  })
+}
+
+function equityGroupDisabled(item){
+  return item.some(key=> key>100000);
+}
+
+
+function getQyBigServeCheckNumber(permissionName){
+  return permissionName.includes('70')?1:2
+}
+
+
+const  minus_sign_val = ref('')
+// 只允许输入数字和删除键
+function validateInteger() {
+  minus_sign_val.value = minus_sign_val.value .replace(/[^0-9]/g, '');
+
+  // 如果输入不为空,则转换为整数
+  if (minus_sign_val.value  !== '') {
+    minus_sign_val.value  = parseInt(minus_sign_val.value, 10);
+  }
+}
+
+
+function init() {
+   // 回显
+  if(props.data.CheckList && props.data.CheckList.length>0){
+    props.data.Items.map(item =>{
+      if(item.Child){
+        item.Child.map(t =>{
+          handleQYChecked(item,props.data)
+        })
+      }else{
+        handleQYChecked(item,props.data)
+      }
+    })
+    props.data.ItemsPrivate.map(itP =>{
+      let flag = props.data.CheckList.includes(itP.ChartPermissionId)
+      handlePrivateChecked(flag,itP,props.data)
+    })
+    props.data.ItemsUp.map(itU =>{
+      let flag = props.data.CheckList.includes(itU.ChartPermissionId)
+      handleUpdateChecked(flag,itU.PermissionName,props.data)
+    })
+  }
+}
+init()
+
+
+</script>
+<template>
+  <div class="rai-checkbox-content" id="rai-checkbox-content">
+    <div class="rai-checkbox-bigS-box">
+      <el-checkbox v-model="itB.Checked" v-for="itB in data.ItemsBig" :key="itB.PermissionName"
+      @change="(e)=>bigServeCheck(e,itB,data)"
+      :indeterminate="itB.isIndeterminate && !itB.disabled" class="bigS-item" 
+      :disabled="itB.disabled || (formData.qyBigServeCheck!=getQyBigServeCheckNumber(itB.PermissionName) && formData.qyBigServeCheck!=0)"
+      >{{itB.PermissionName}}</el-checkbox>
+    </div>
+    <div class="rai-checkbox-box">
+      <div class="rai-checkbox-main-container">
+        <div class="rai-checkbox-main-row">
+          <div class="rai-checkbox-item" v-for="it in data.Items" :key="it.ChartPermissionId" 
+          :style="{'width':it.ChartPermissionId==23?'84px':it.ChartPermissionId==30?'110px':'168px'}">
+            <template v-if="it.Child">
+              <el-checkbox :label="it.PermissionName" style="margin-right: 8px;" v-model="it.Checked"
+              @change="handleItemCheck(it,data)" :indeterminate="it.isIndeterminate" :disabled="it.disabled"></el-checkbox>
+              <el-checkbox-group v-model="data.CheckList" style="height: unset;" @change="handleQYChecked(it,data)" 
+              :disabled="it.disabled">
+                <div class="rai-checkbox-serve-box" >
+                  <el-checkbox :label="itChild.ChartPermissionId" v-for="itChild in it.Child" :key="itChild.ChartPermissionId"
+                  class="small-item" >{{ itChild.PermissionName }}</el-checkbox>
+                </div>
+              </el-checkbox-group>
+            </template>
+            <template v-else>
+              <el-checkbox-group v-model="data.CheckList" style="height: unset;margin-right: 8px;" @change="handleQYChecked(it,data)">
+                <el-checkbox :label="it.ChartPermissionId" :disabled="it.disabled">{{ it.PermissionName }}</el-checkbox>
+              </el-checkbox-group>
+            </template>
+          </div>
+        </div>
+        <el-checkbox-group v-model="data.CheckList" style="height: unset;">
+          <div class="rai-checkbox-upS-box" >
+            <el-checkbox :label="itU.ChartPermissionId" v-for="itU in data.ItemsUp" :key="itU.ChartPermissionId"
+            class="rai-checkbox-item upS-item" :disabled="itU.disabled" 
+            @change="(e) => handleUpdateChecked(e,itU.PermissionName,data)">{{ itU.PermissionName }}</el-checkbox>
+          </div>
+        </el-checkbox-group>
+      </div>
+      <div class="rai-checkbox-private-container">
+        <el-checkbox-group v-model="data.CheckList" style="height: unset;">
+          <div class="rai-checkbox-upS-box" >
+            <el-checkbox :label="itP.ChartPermissionId" v-for="(itP,inP) in data.ItemsPrivate" 
+            :key="itP.ChartPermissionId" :disabled="itP.disabled" :style="{'height':hasNoChild?'48px':'95px','width':itP.ChartPermissionId == 52 && data.CheckList.includes(52)? '220px' : itP.PermissionName.includes('研选')?'130px':'84px'}"
+            class="rai-checkbox-item upS-item" @change="e => handlePrivateChecked(e,itP,data)">
+            {{ itP.PermissionName }}
+            <p v-if="itP.ChartPermissionId == 31" class="checkbox-text">(30000元/年)</p>
+            <p v-if="itP.ChartPermissionId == 52" class="checkbox-text">(点/2000元)</p>
+            <input @click.stop @input="validateInteger" placeholder="请输入点数" style="margin-left:10px" v-if="itP.ChartPermissionId == 52 && data.CheckList.includes(52)" v-model="minus_sign_val" />
+            </el-checkbox>
+          </div>
+        </el-checkbox-group>
+        <div class="rai-checkbox-notice-box" v-if="data.ItemsUp.length>0">
+          <span class="rai-checkbox-notice" v-if="formData.qyBigServeCheck">
+            同时包含{{formData.qyBigServeCheck==2?"10":"16"}}次专项调研</span>
+          <p class="rai-checkbox-notice" v-if="equityGroupDisabled(data.CheckList)">同时包含升级行业各5次专项调研</p>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<style lang="scss" scoped>
+	.rai-checkbox-content {
+		// width: 100%;
+		// height: 160px;
+		padding: 20px 0 20px 20px;
+		border:1px dashed #aab4cc;
+		// display: flex;
+		.rai-checkbox-bigS-box{
+			display: flex;
+			.bigS-item{
+				display: inline-flex;
+				align-items: center;
+				padding: 4px 8px;
+				height: 22px;
+				margin:0 20px 20px 0;
+			}
+		}
+		.rai-checkbox-box{
+			display: flex;
+			// flex-wrap: wrap;
+			.rai-checkbox-main-container{
+				.rai-checkbox-main-row{
+					display: flex;
+					.small-item{
+						display: inline-flex;
+						align-items: center;
+						border: solid 1px #DCDFE6;
+						padding: 4px 12px;
+						height: 48px;
+						width: 84px;
+						margin-right: -1px;
+						margin-bottom:-1px;
+						&:first-child{
+							margin-top:-1px;
+						}
+					}
+				}
+			}
+			.rai-checkbox-private-container{
+				.rai-checkbox-notice-box{
+					display: flex;
+					align-items: center;
+					border: solid 1px #DCDFE6;
+          border-left: none;
+					height: 48px;
+					margin-right: -1px;
+					margin-left: -192px;
+					padding-left: 200px;
+					.rai-checkbox-notice {
+						color: #f00;
+					}
+				}
+			}
+			.rai-checkbox-upS-box{
+				display: flex;
+				.upS-item{
+          position: relative;
+					justify-content: flex-start;
+          .checkbox-text {
+            position: absolute;
+            font-size: 12px;
+            color: #999;
+            bottom: 15px;
+            left: 20px;
+          }
+          input {
+            width: 90px;
+            height: 30px;
+            border-radius: 4px;
+            padding-left: 10px;
+            border: 1px solid #dcdfe6;
+          }
+				}
+			}
+			.rai-checkbox-item{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				border: solid 1px #DCDFE6;
+				margin-bottom:-1px;
+				margin-right: -1px;
+				padding-left: 12px;
+				min-height: 48px;
+				width: 168px;
+				.rai-checkbox-serve-box{
+					display: flex;
+					flex-direction: column;
+					align-items: flex-start;
+					height: unset;
+				}
+			}
+		}
+
+		:deep(.el-checkbox){
+			color: #333333;
+		}
+	}
+</style>

+ 2 - 2
src/views/custom_manage/custom/customDetail.vue

@@ -31,7 +31,7 @@ import { customInterence,mychartInterface } from '@/api/api.js'
 								<span style="margin-right: 10px;">{{basicform.CompanyName}} </span>
 								<el-tooltip content="此客户存在长期且反复申请试用,但从未签约的情况,请谨慎领取" placement="top" :open-delay="500" 
 								v-if="RaiSellerRole && basicform.IsScrounge==1" >
-									<img width="16" style="cursor: pointer;vertical-align: text-top;" src="../../../assets/img/icons/warning_triangle_yellow.png" />
+									<img width="16" style="cursor: pointer;vertical-align: text-top;" src="@/assets/img/icons/warning_triangle_yellow.png" />
 								</el-tooltip>
 							</span>
 						</li>
@@ -635,7 +635,7 @@ import { customInterence,mychartInterface } from '@/api/api.js'
 			width="500px">
 			<div slot="title" style="display: flex; align-items: center; position: relative">
 				<img
-					src="../../../assets/img/icons/move.png"
+					src="@/assets/img/icons/move.png"
 					style="color: #fff; width: 16px; height: 16px; margin-right: 5px"/>
 				<span style="font-size: 16px">移动联系人</span>
 				<i

+ 9 - 7
src/views/custom_manage/custom/customSearch.vue

@@ -18,6 +18,7 @@ import { customInterence } from '@/api/api.js'
 import { useRouter,onBeforeRouteLeave, useRoute } from 'vue-router'
 import { Search,MoreFilled } from '@element-plus/icons-vue'
 import { ElMessageBox,ElMessage } from 'element-plus'
+import _ from 'lodash'
 import { useViewPermissionDia,useLookTrialDia,useCommunicaRecordDia,useChooseContractDia,useList,useAddTrialDia,useViewRemarkCustomDia,useCompleteInfoDia,useFreezeReasonDia } from "./hooks/customlistHook";
 import mPage from '@/components/mPage.vue'
 import permissionView from './components/premissionView.vue'
@@ -65,7 +66,8 @@ const {
   isAddTrial,
   addTryId,
   addTrialHandle,
-  closeAddTrial
+  closeAddTrial,
+  authList
 } = useAddTrialDia();//增开试用弹窗
 
 const {
@@ -454,7 +456,7 @@ function updateSale(item) {
 }
 /* 移动客户所属销售 */
 function saveMove() {
-  moveform.value.validate((valid) => {
+  moveformRef.value.validate((valid) => {
     if (valid) {
       customInterence.moveSale({
         CompanyType:moveform.companyType,
@@ -633,7 +635,7 @@ function researchDetailHandle(item) {
               <img
                 width="16"
                 style="cursor: pointer"
-                src="../../assets/img/icons/warning_triangle_yellow.png"
+                src="@/assets/img/icons/warning_triangle_yellow.png"
               />
             </el-tooltip>
           </template>
@@ -820,7 +822,7 @@ function researchDetailHandle(item) {
         </div>
       </template>
 
-			<el-form :model="moveform" :rules="moveRule" ref="moveform" label-width="100px" style="marginTop:15px;">
+			<el-form :model="moveform" :rules="moveRule" ref="moveformRef" label-width="100px" style="marginTop:15px;">
 				<el-form-item label="客户名称" prop="name">
 					<span style="fontSize:16px;">{{moveform.companyName}}</span>
 				</el-form-item>
@@ -868,7 +870,7 @@ function researchDetailHandle(item) {
 		center>
       <template #header>
         <div style="display:flex;align-items:center;">
-          <img src="../../assets/img/freeze-icon.png" alt="" width="16" style="margin-right:10px">
+          <img src="@/assets/img/freeze-icon.png" alt="" width="16" style="margin-right:10px">
           <span style="font-size:16px;">冻结</span>
         </div>
       </template>
@@ -898,8 +900,8 @@ function researchDetailHandle(item) {
 			class="self-dialog"
 		>
 			<div style="text-align:center;margin:30px 0 100px 0">
-				<img width="191" src="../../assets/img/cus_m/bzht.png" @click="handleContractModel('标准')" style="margin-right:80px;cursor: pointer;">
-				<img width="191" src="../../assets/img/cus_m/fbzht.png" @click="handleContractModel('非标准')" style="cursor: pointer;">
+				<img width="191" src="@/assets/img/cus_m/bzht.png" @click="handleContractModel('标准')" style="margin-right:80px;cursor: pointer;">
+				<img width="191" src="@/assets/img/cus_m/fbzht.png" @click="handleContractModel('非标准')" style="cursor: pointer;">
 				<p style="font-size:15px;color:#333;text-align:left;padding-left:100px;margin-top:30px">
 					注:<br>
 					系统生成合同请选择标准合同入口<br>

+ 3 - 3
src/views/custom_manage/custom/customShareList.vue

@@ -626,7 +626,7 @@ const {
               >
               <img
                 width="15"
-                src="../../../assets/img/icons/remark.png"
+                src="@/assets/img/icons/remark.png"
                 alt=""
                 v-if="
                   scope.row.RenewalReason ||
@@ -1195,13 +1195,13 @@ const {
       <div style="text-align: center; margin: 30px 0 100px 0">
         <img
           width="191"
-          src="../../../assets/img/cus_m/bzht.png"
+          src="@/assets/img/cus_m/bzht.png"
           @click="handleContractModel('标准')"
           style="margin-right: 80px; cursor: pointer"
         />
         <img
           width="191"
-          src="../../../assets/img/cus_m/fbzht.png"
+          src="@/assets/img/cus_m/fbzht.png"
           @click="handleContractModel('非标准')"
           style="cursor: pointer"
         />

+ 11 - 5
src/views/custom_manage/custom/hooks/customlistHook.js

@@ -310,6 +310,7 @@ export function useAddTrialDia() {
 	/* 增加试用 */
 	const isAddTrial = ref(false)//增加试用弹窗
 	const addTryId = ref('')//增开试用的id
+	const authList = ref([])
 
 	function addTrialHandle(item) {
 		authList.value = [];
@@ -337,7 +338,7 @@ export function useAddTrialDia() {
 
 				}
 			
-				authList = auth;
+				authList.value = auth;
 			}
 		})
 		addTryId.value = item.CompanyId;
@@ -516,7 +517,8 @@ export function useAddTrialDia() {
 		isAddTrial,
 		addTryId,
 		addTrialHandle,
-		closeAddTrial
+		closeAddTrial,
+		authList
 	}
 }
 
@@ -769,6 +771,11 @@ export function useCompleteInfoDia() {
 	const completeForm = ref({
 		show:false,
 	})//补全信息弹窗
+
+	const RoleType = computed(() => {
+		let type = localStorage.getItem('RoleType') || '';
+		return type;
+	})
 	
 	//获取客户详情判断基本信息是否完整 id 客户id type 1 跨部门 0 不是跨部门
 	async function getCustomerDetail(id,type){
@@ -800,12 +807,11 @@ export function useCompleteInfoDia() {
 				completeForm.value.show=false
 			}
 		}else{
-			let RoleType=RoleType.value
 			let IndustryId='',Source=';'
-			if(RoleType=='ficc'){
+			if(RoleType.value=='ficc'){
 				IndustryId=res.Data.FiccItem.IndustryId
 				Source=res.Data.FiccItem.Source
-			}else if(RoleType=='权益'){
+			}else if(RoleType.value=='权益'){
 				IndustryId=res.Data.RaiItem.IndustryId
 				Source=res.Data.RaiItem.Source
 			}

+ 4 - 2
src/views/custom_manage/custom/pickCustom.vue

@@ -250,7 +250,9 @@ function cancelConcatdia(type) {
       customInterence.Pick(params).then(res => {
         if(res.Ret === 200) {
           ElMessage.success(res.Msg);
-          $router.go(-2);
+          $router.replace({
+            path:'/customList'
+          })
         }
       })
     }else {
@@ -367,7 +369,7 @@ watch(
 							</el-form-item>
 						<el-form-item label="客户状态" prop="cuStatus">
 							<i style="color:#f00;fontSize:20px;position:absolute;left:-90px;top:10%;">*</i>
-							<el-radio-group v-model="pickForm.cuStatus" size="default">
+							<el-radio-group v-model="pickForm.cuStatus">
 								<el-radio border label="试用" style="width:184px;">试用(2个月)</el-radio>
 							</el-radio-group>
 						</el-form-item>

+ 889 - 3
src/views/custom_manage/custom/updateServe.vue

@@ -1,10 +1,896 @@
 <script setup>
-import { ref } from 'vue'
+import { computed, reactive, ref } from 'vue'
+import { ElMessage } from 'element-plus'
+import { useRouter, useRoute } from 'vue-router'
+import { customInterence } from '@/api/api.js'
+import imgPreview from '@/components/imgPreview.vue'
+import raiPermissionbox from './components/raiPermissionbox.vue'
+import $  from 'jquery'
+// import pdf from 'vue-pdf'
+
+const $router = useRouter()
+const $route = useRoute()
+
+const isRoleType = computed(() => {
+  return localStorage.getItem('RoleType')
+})
+
+const formRule = {
+  // contract_type:[
+  // 	{ required: true, message: '合同类型不能为空', trigger: 'blur' },
+  // ],
+  term:[
+    { required: true, message: '合同期限不能为空', trigger: 'blur' },
+  ],
+  amount:[
+    { required: true, message: '合同金额不能为空', trigger: 'blur' },
+    { type: 'number', message: '合同金额必须为数字'}
+  ],
+  payway:[
+    { required: true, message: '付款方式不能为空', trigger: 'change' },
+  ],
+  payfrom:[
+    { required: true, message: '付款渠道不能为空', trigger: 'blur' },
+  ],
+  imglist:[
+    { required: true, message: '合同附件不能为空', trigger: 'change' },
+  ]
+}
+
+/* 获取历史签约 */
+const dealList = ref([])//合同列表
+const isPreview = ref(false)//合同弹窗
+function getDealList() {
+  customInterence.historydeal({
+    CompanyId:companyInfo.CompanyId,
+    CompanyType:companyInfo.value.CompanyType
+  }).then(res => {
+    if(res.Ret === 200) {
+
+      res.Data.List&&res.Data.List.forEach(item=> {
+        item.StartDate = item.StartDate.replace(/-/g,'.')
+        item.EndDate = item.EndDate.replace(/-/g,'.')
+        item.PermissionList.forEach(auth => {
+          auth.CheckAll = auth.CheckList&&auth.CheckList.length===auth.Items.length?true:false
+        })
+      })
+      dealList.value = res.Data.List || []
+    }
+  })
+}
+/* 查看历史签约 */
+function previewHistory() {
+  isPreview.value = true
+}
+
+
+const companyInfo = ref(JSON.parse(sessionStorage.getItem('companyInfo')) || {})//客户基本信息
+const pickerOptions = ref({})
+const dataForm = reactive({
+  contract_type:$route.path=='/updateCustom'?'续约合同':'补充协议',
+  term:'',
+  amount:'',
+  payway:'',
+  payfrom:'',
+  imglist:[],
+  setmeal:'',
+  qyBigServeCheck:0
+})
+const timeDisable = ref(false)//是否能选择日期 补充协议不可选择日期
+const temContractData = ref({})// 最后一份有效合同详情数据
+/* 获取客户大于今天的最后一份有效合同详情 */
+async function getLastedContractInfo(){
+  let res=await customInterence.lastContractInfo({CompanyId:companyInfo.value.CompanyId})
+  if(res.Ret!=200) return
+  temContractData.value=res.Data
+  // 续约申请 
+  if($route.path=='/updateCustom'){
+    initUpdateTypeData()
+  }
+
+  // 补充协议
+  if($route.path=='/addAgreement'){
+    let today=formatDate(new Date())
+
+    // 找出权限中最晚截止的那个作为截至日期
+    let timearr=temContractData.value.map(item=> item.EndDate)
+    let maxTime=Math.max.apply(null, timearr.map(item => (new Date(item)).getTime()));
+    
+    let endDate=formatDate(new Date(maxTime))
+    dataForm.term=[today,endDate]
+    timeDisable.value=true
+  }
+  
+}
+// 续约申请处理数据
+function initUpdateTypeData() {
+  	let RoleType=companyInfo.value.CompanyType
+    if(RoleType=='ficc'){
+      // FICC:续约合同的起始日期需要在权限中最大的时间
+      // 找出权限中最晚截止的那个作为截至日期
+      let timearr=temContractData.value.map(item=> item.EndDate)
+      let maxTime=Math.max.apply(null, timearr.map(item => (new Date(item)).getTime()));
+      let endDate=formatDate(new Date(maxTime))
+      pickerOptions={
+        disabledDate(time) {
+          return time.getTime() < new Date(endDate).getTime();
+        }
+      }
+    }
+}
+// 格式化时间
+function formatDate(date){
+  let year=date.getFullYear()
+  let month=date.getMonth()+1
+  let day=date.getDate()
+  return `${year}-${month<10?'0'+month:month}-${day<10?'0'+day:day}`
+}
+
+
+//选择时间 权益:续约合同期限与上一份合同期限有重叠时,不能勾选同一行业.
+		// 选择的时间和temContractData 中的时间比较 然后格式化权限选择列表
+function dateChange(){
+  if(parseInt((new Date() - new Date(dataForm.term[1]))/(1000*3600*24)) > 0) {
+    ElMessage.error('结束日期不能小于今天!')
+    dataForm.term = []
+    return
+  }
+}
+
+function setSelectPerDisabled(data){
+  const arr=data.Items?data.Items.filter(_e=>_e.IsPublic==1):[]
+  return ($route.path=='/updateCustom'&&arr.length==data.Items.length) || data.disabled
+}
+
+
+//套餐的选择
+function setmealChange(){
+  if(dataForm.setmeal == '1'){
+    authList.value.forEach(item => {
+      if(item.ClassifyName != '市场策略') {
+        item.Items.forEach(key => {
+          item.CheckList.push(key.ChartPermissionId)
+          key.Checked = true
+          key.disabled = true
+        })
+        item.isIndeterminate = false
+        item.checkAll = true
+        item.disabled = true	
+      }
+    })
+  } else {
+
+      authList.value.forEach(item => {
+        if(item.ClassifyName == '宏观经济') {
+          item.CheckList = [1]
+          item.isIndeterminate = true
+          item.disabled=false
+          item.Items[1].disabled=false
+          item.Items[0].disabled=false
+        }else {
+          item.Items.forEach(key => {		
+          item.CheckList = []
+          key.Checked = false
+          key.disabled = false
+        })
+        item.isIndeterminate = false
+        item.checkAll = false
+        item.disabled = false	
+        }
+    })
+    ElMessage.warning('请勾选品种')
+  }
+}
+
+
+const hasNoChild = ref(false)
+const authList = ref([])//权限列表
+function getLastContract() {
+  customInterence.reapplyDetail({
+    CompanyApprovalId:parseInt(companyInfo.value.CompanyApprovalId)
+  }).then(res => {
+    if(res.Ret === 200) {
+      /* 处理日期 */
+      let date_arr = [];
+      date_arr.push(res.Data.Item.StartDate);
+      date_arr.push(res.Data.Item.EndDate);
+
+        dataForm.term=date_arr,
+        dataForm.contract_type= res.Data.Item.ContractType,
+        dataForm.amount=res.Data.Item.Money,
+        dataForm.payway=res.Data.Item.PayMethod,
+        dataForm.payfrom=res.Data.Item.PayChannel,
+        dataForm.imglist=res.Data.Item.ImgUrl.split('#'),//合同列表图片
+        dataForm.qyBigServeCheck=res.Data.Item.RaiPackageType
+
+      /* 处理权限列表 */
+      let newArr = [];
+      if(companyInfo.value.CompanyType == '权益' || isRoleType.value== '权益') {
+        res.Data.Item.PermissionList[0].Items.map(item => {
+          item.disabled=item.isIndeterminate=false								
+          if(item.ChartPermissionId==22 && (!item.Child)) hasNoChild=true
+        })
+        /* 处理数据把复选框 拆分成三个*/
+        res.Data.Item.PermissionList.length&&res.Data.Item.PermissionList.forEach(item => {
+        let arr = item.Items.filter(key=> [22,21,20,19,23,30].includes(key.ChartPermissionId))
+        let ItemsPrivate = item.Items.filter(key=> [29,31,52,20031,20032,53,54,138,62].includes(key.ChartPermissionId))
+        let ItemsUp = item.Items.filter(key=> key.PermissionName.includes('升级'))
+        let ItemsBig = item.Items.filter(key=> key.ChartPermissionId==0)
+          let obj = {
+            ...item,
+            Items:arr,
+            ItemsPrivate,
+            ItemsUp,
+            ItemsBig
+          }
+          newArr.push(obj)
+        })
+      } else {
+        res.Data.Item.PermissionList.forEach(item => {
+          item.Items=item.Items.map(item2=>{
+            return{
+              ...item2,
+              disabled:false
+            }
+          })
+          let obj = {
+            checkAll:item.CheckList&&item.CheckList.length===item.Items.length?true:false,
+            isIndeterminate:item.CheckList&&item.CheckList.length>0 && item.CheckList.length<item.Items.length,
+            ...item,
+          }
+          newArr.push(obj)
+        })
+      }
+      authList.value = newArr;
+    }
+  })
+}
+/* 获取基本权限信息 */
+function getAuthBasic() {
+  customInterence.authList({
+    IsShowYanXuanKouDian:true,
+  }).then(res => {
+    if(res.Ret === 200) {
+      let newArr = [];
+      if(companyInfo.value.CompanyType == '权益' || isRoleType.value== '权益') {
+        res.Data.List[0].Items.map(item => {
+          item.disabled=item.isIndeterminate=false								
+          if(item.ChartPermissionId==22 && (!item.Child)) hasNoChild.value=true
+        })
+        /* 处理数据把复选框 拆分成三个*/
+        res.Data.List.length&&res.Data.List.forEach(item => {
+        let arr = item.Items.filter(key=> [22,21,20,19,23,30].includes(key.ChartPermissionId))
+        let ItemsPrivate = item.Items.filter(key=> [29,31,52,20031,20032,53,54,138,62].includes(key.ChartPermissionId))
+        let ItemsUp = item.Items.filter(key=> key.PermissionName.includes('升级'))
+        let ItemsBig = item.Items.filter(key=> key.ChartPermissionId==0)
+          let obj = {
+            ...item,
+            Items:arr,
+            ItemsPrivate,
+            ItemsUp,
+            ItemsBig
+          }
+          newArr.push(obj)
+        })
+      }else {
+      res.Data.List.length&&res.Data.List.forEach(item => {
+        item.Items=item.Items||[]
+        const temarr=item.Items?item.Items.filter(_e=>_e.IsPublic==1):[]
+        item.Items=item.Items.map(item2=>{
+          return{
+            ...item2,
+            disabled:false
+          }
+        })
+        let obj = {
+          checkAll:item.Items.length>0?temarr.length==item.Items.length:false,
+          isIndeterminate:item.Items.length>0?temarr.length==item.Items.length?false:item.Items.some(_e=>_e.IsPublic==1):false,
+          ...item,
+        }
+        newArr.push(obj)
+      })
+      }
+      authList.value = newArr;
+    }
+  })
+}
+$route.query.isReapply?getLastContract():getAuthBasic();
+
+
+
+// 权益 续约合同判断
+// 1、勾选同行业,判断选择的期限,是否与已存在的合同期限重叠:
+// 有重叠则提示:同行业有重叠的合同期限,请核实后再提交
+// 没有重叠,则提交成功,两份合同独立执行
+// 2、勾选不同行业,直接提交成功,提交成功后,
+// 若期限有重叠,新开新的行业,使用期限按照合同期限,列表中的服务期限按照合同期限加总
+// 若期限无重叠,两份合同独立执行,列表中的服务期限按照执行时的合同期限
+// 2023-02-21 修改只需判断勾选行业的服务期限与本行业是否有重叠,无需判断勾选行业与其余行业是否有期限重叠
+function handleValidate(e){
+  let validate=true
+  const newtemContractData=[]//把所有的都加上升级 id加100000
+  temContractData.value.forEach(item=>{
+    newtemContractData.push(item)
+    newtemContractData.push({...item,ChartPermissionId:100000+item.ChartPermissionId,PermissionName:item.PermissionName+'(升级)'})
+  })
+  const time1=new Date(dataForm.term[0]).getTime() //选择的开始时间
+  const time2=new Date(dataForm.term[1]).getTime() //选择的结束时间
+  if(companyInfo.value.CompanyType=='权益' &&$route.path=='/updateCustom'){
+    let count=0
+    newtemContractData.forEach(item=>{
+      let flag=e.indexOf(item.ChartPermissionId)
+      if(flag!=-1){
+        const time3=new Date(item.StartDate).getTime()// 上份合同的开始时间
+        const time4=new Date(item.EndDate).getTime()// 上份合同的结束时间
+        if(time1>time4||time2<time3){
+          console.log(item.ChartPermissionId,'没重叠');
+        }else{
+          count++
+        }
+      }
+    })
+    if(count>0){
+      validate=false
+    }
+   
+  }
+  return validate
+}
+
+/* 提交 */
+const dataFormRef = ref(null)
+const raiPermissionboxRef = ref(null)
+function saveHandle() {
+  if(!dataForm.value.contract_type) {
+    ElMessage.warning('合同类型不能为空!')
+  }else {
+    dataFormRef.value.validate((valid) => {
+      if (valid) {
+        /* 处理权限列表 */
+        let checkArr = [];
+        authList.value.forEach(item => {
+          if(item.CheckList.length) {
+            checkArr.push(item.CheckList)
+          }
+        })
+        if(!checkArr.length && companyInfo.value.CompanyType === '权益') {
+          ElMessage.warning('请选择权限!');
+          return
+        }
+        // 判断
+        let flag=handleValidate(checkArr.flat(2))
+        if(!flag){
+          ElMessage.warning('同行业有重叠的合同期限,请核实后再提交')
+          return false
+        }
+        const hasFiftyTwo = checkArr.flat(2).includes(52);
+        const hasMinusSignVal = companyInfo.value.CompanyType === '权益' ? raiPermissionboxRef.value.minus_sign_val : 0	
+        if(hasFiftyTwo && !hasMinusSignVal) return ElMessage.error('请输入研选扣点数')
+        
+        let PermissionIds = checkArr.flat(2).join(',');
+        let params = {
+          CompanyId:companyInfo.value.CompanyId,
+          CompanyApprovalId:companyInfo.value.CompanyApprovalId?parseInt(companyInfo.value.CompanyApprovalId):0,
+          CompanyType:companyInfo.value.CompanyType,
+          ContractType: dataForm.contract_type,
+          StartDate:dataForm.term[0],
+          EndDate:dataForm.term[1],
+          ImgUrl:dataForm.imglist.join('#'),
+          Money:Number(dataForm.amount),
+          PayChannel:dataForm.payfrom,
+          PayMethod:dataForm.payway,
+          PermissionIds:PermissionIds,
+          PackageType:Number(dataForm.setmeal),
+          RaiPackageType:dataForm.qyBigServeCheck||0,
+          Points:hasMinusSignVal||0
+        }
+
+        console.log(params);
+      
+        customInterence.Update(params).then(res => {
+          if(res.Ret === 200) {
+            ElMessage.success('更新成功!')
+
+            cancelHandle()
+          }
+        })
+      }
+    })
+  }
+}
+/* 取消返回 */
+function cancelHandle() {
+
+  $router.push({path:`/${$route.meta.pathFrom}`})
+}
+
+
+/* 选择全选或取消全选 */
+function handleCheckAll(item,type) {
+  if(type=='auth'){
+    //获取公有的id合集
+    let publicIds=[]
+
+    
+    let ids = item.Items.map(item =>{
+      if(item.IsPublic==1){
+        publicIds.push(item.ChartPermissionId)
+      }
+      return item.ChartPermissionId
+    })
+    item.CheckList = item.checkAll ? ids : publicIds;	
+    item.isIndeterminate = publicIds.length>0&&!item.checkAll?true:false;
+    return
+  }
+  // 取到所有的子菜单id
+  let ids = item.Items.map(item =>{
+    return item.ChartPermissionId
+  })
+  item.CheckList = item.checkAll ? ids : [];	
+  item.isIndeterminate = false;
+}
+/* 复选框組选中时 */
+function handleChecked(item) {
+  let len = item.CheckList.length;
+  if(companyInfo.value.CompanyType === '权益' || isRoleType.value=== '权益') {
+    /* 获取大套餐行业并且判断 value里面有没有包含 大套餐的全部id*/
+    let isCheckAllTrue = item.Items.filter(key=> ![31,29].includes(key.ChartPermissionId)&& !key.PermissionName.includes('升级')).every(val => item.CheckList.includes(val.ChartPermissionId)) 
+    item.checkAll = isCheckAllTrue;
+    item.isIndeterminate = len > 0 && !isCheckAllTrue
+  }else{
+  item.checkAll = len === item.Items.length;
+  item.isIndeterminate = len > 0 && len < item.Items.length;
+  }
+}
+
+
+/* 预览 */
+const isPreviewimg = ref(false)
+const	preAct = ref("")
+const	isShowToggle = ref(false)//是否显示切换
+function preview(id,index,img) {
+  // $('#'+id).click()
+  if(img.indexOf('.pdf') == -1) {
+    preAct.value = index;
+    /* 是否显示左右切换 */
+    let bol = dataForm.imglist.some(item => {
+      return item.indexOf('.pdf') != -1
+    })
+    // 有pdf或图片只有一张
+    if(bol || dataForm.imglist.length<=1) {
+      isShowToggle.value = false
+    }else {
+      isShowToggle.value = true
+    }
+    isPreviewimg.value = true;
+  }else {
+    window.open(img)
+  }
+}
+function closePreview() {
+  isPreviewimg.value = false;
+}
+function togglePre(type) {
+  if(type==1) {
+    preAct.value--;
+    if(preAct.value < 0) {
+      preAct.value = dataForm.imglist.length-1;
+    }
+  }else {
+    preAct.value++;
+    if(preAct.value > dataForm.imglist.length-1) {
+      preAct.value = 0;
+    }
+  }
+}
+
+
+
+const img_replace = ref('')//重新上传的img
+function clickinput(index){  //上传模拟点击
+  img_replace.value = '';
+  if(index) {
+    img_replace.value = index
+  }
+  $("#file").click();
+}
+function fileSelected(){  //选择文件上传
+    if( document.getElementById('file').files[0] ){
+      let hostfile = document.getElementById('file').files[0];
+    
+        let size = Math.floor(hostfile.size / 1024 / 1024);
+      if( size>200 ){
+            ElMessage.error('上传文件大小不能大于200M!');
+            hostfile = {};
+            return false
+      }
+      if( hostfile.name.toLowerCase().includes('.png') || hostfile.name.toLowerCase().includes('.jpg') || hostfile.name.toLowerCase().includes('.jpeg') || hostfile.name.toLowerCase().includes('.pdf') ){
+          let form = new FormData();
+          form.append('file',hostfile);  //hostfile.name
+      
+      customInterence.upload(form).then((res) => {
+        if( res.Ret === 200 ){
+          /* 是替换还是新增 */
+          if(img_replace.value) {
+            dataForm.imglist.splice(img_replace.value-1,1,res.Data.ResourceUrl)
+          }else {
+            if(dataForm.imglist.length >= 4) {
+              ElMessage.warning('最多上传4张')
+            }else {
+              dataForm.imglist.push(res.Data.ResourceUrl)
+            }
+          }
+        }
+        
+        $("#file").val('');
+        hostfile = {};
+      });
+    }else{
+      ElMessage.error('上传文件格式不正确!');
+    }
+  } 
+}
+
+
+
+
+
 
 </script>
 <template>
-  <div></div>
+  <div class="updateServer_container">
+		<div class="card_cont">
+			<div class="btn_top">
+				<span style="fontSize:14px;color:#409EFF;cursor:pointer" @click="previewHistory">历史签约</span>
+			</div>
+			<div class="info">
+				<h3 class="tit">客户信息</h3>
+				<ul class="info_list">
+					<li>
+						客户名称:{{companyInfo.CompanyName}}
+					</li>
+					<li>
+						社会信用码:{{companyInfo.CreditCode}}
+					</li>
+					<li>
+						地址:{{companyInfo.Address||''}}
+					</li>
+					<li>
+						客户类型:{{companyInfo.CompanyType}}
+					</li>
+					<li>
+						客户状态:{{companyInfo.Status}}
+					</li>
+					<li>
+						客户来源:{{companyInfo.Source}}
+					</li>
+					<li>
+						行业:{{companyInfo.IndustryName}}
+					</li>
+					<li>
+						所属销售:{{companyInfo.SellerName}}
+					</li>
+					<li>
+						备注:{{companyInfo.Reasons}}
+					</li>
+				</ul>
+			</div>
+		</div>
+		<div class="card_cont">
+			<div class="apply_info">
+				<h3 style="fontSize:16px;">{{$route.path=='/updateCustom'?'续约申请':'补充协议'}}</h3>
+				<div class="info_cont">
+					<el-form 
+					@submit.prevent 
+					inline 
+					:model="dataForm" 
+					:rules="formRule"
+					hide-required-asterisk
+					ref="dataFormRef" 
+					label-width="100px"
+					class="demo-ruleForm">
+						<el-form-item label="选择合同类型" prop="contract_type" style="width:70%;padding-left:25px;">
+							<!-- <i style="color:#f00;fontSize:20px;position:absolute;left:-114px;top:10%;">*</i> -->
+							<el-radio label="续约合同" v-model="dataForm.contract_type" v-if="$route.path=='/updateCustom'">续约合同</el-radio>
+							<el-radio label="补充协议" v-model="dataForm.contract_type" v-else>补充协议</el-radio>
+						</el-form-item>
+						<el-form-item label="合同期限" prop="term" style="marginRight:60px;">
+							<i style="color:#f00;fontSize:20px;position:absolute;left:-90px;top:10%;">*</i>
+							<el-date-picker
+							:disabled="timeDisable"
+							v-model="dataForm.term"
+							type="daterange"
+							range-separator="至"
+							start-placeholder="开始日期"
+							end-placeholder="结束日期"
+							@change="dateChange"
+							value-format="yyyy-MM-dd"
+							:picker-options="pickerOptions"
+							style="width:400px;">
+							</el-date-picker>
+						</el-form-item>
+						<el-form-item label="合同金额" prop="amount" style="marginRight:60px;">
+							<i style="color:#f00;fontSize:20px;position:absolute;left:-90px;top:10%;">*</i>
+							<el-input 
+							v-model.number="dataForm.amount"
+							placeholder="请输入金额"
+							style="width:400px"
+							clearable></el-input>
+							<span style="color:#666;">元</span>
+						</el-form-item>
+						<el-form-item label="付款方式" prop="payway" style="marginRight:60px;">
+							<i style="color:#f00;fontSize:20px;position:absolute;left:-90px;top:10%;">*</i>
+							<el-select v-model="dataForm.payway" placeholder="请选择付款方式" style="width:400px;" clearable>
+								<el-option
+								v-for="item in ['月付','季付','半年付','年付','两年付','三年付']"
+								:key="item"
+								:label="item"
+								:value="item">
+								</el-option>
+							</el-select>
+						</el-form-item>
+						<el-form-item label="付款渠道" prop="payfrom">
+							<i style="color:#f00;fontSize:20px;position:absolute;left:-90px;top:10%;">*</i>
+							<el-input 
+							v-model="dataForm.payfrom"
+							placeholder="填写代支付的渠道名称,没有可以填无"
+							style="width:400px"
+							clearable></el-input>
+						</el-form-item>
+						<el-form-item label="套餐类型" prop="setmeal"  style="display:block;" :rules="{ required: true, message: '请选择套餐',trigger: 'change' }" v-if="companyInfo.CompanyType=='ficc' || isRoleType== 'ficc'">
+							<i style="color:#f00;fontSize:20px;position:absolute;left:-90px;top:10%;">*</i>
+							 <el-radio-group v-model="dataForm.setmeal" @change="setmealChange">
+								<el-radio :label="1">大套餐</el-radio>
+								<el-radio :label="2">小套餐</el-radio>
+							</el-radio-group>
+						</el-form-item>
+						<el-form-item class="textarea_item" style="width:97%;paddingLeft:26px;" prop="CheckList">
+							<label style="display:block;marginBottom:10px;fontSize:16px;position:relative;color:#666;">
+								<i style="color:#f00;fontSize:20px;position:absolute;left:-15px;top:10%;">*</i>
+								权限设置
+							</label>
+							<template  v-if="companyInfo.CompanyType=='权益' || isRoleType== '权益'">
+								<raiPermissionbox  ref="raiPermissionboxRef" v-for="item in authList" :key="item.ClassifyName" :data="item" :formData="dataForm"
+								:hasNoChild="hasNoChild"></raiPermissionbox>
+							</template>
+							<ul v-else class="menu_lists" style="width:100%">
+								<li v-for="item in authList" :key="item.ClassifyName" class="menu_item">
+									<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" :disabled="setSelectPerDisabled(item)" @change="handleCheckAll(item,'auth')" style="marginRight:30px;fontWeight:bold;minWidth:90px;">{{item.ClassifyName+':'}}</el-checkbox>
+									<el-checkbox-group v-model="item.CheckList" @change="handleChecked(item)">
+										<el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item" :disabled="list.disabled||($route.path=='/updateCustom'&&list.IsPublic==1)">{{list.PermissionName}}</el-checkbox>
+									</el-checkbox-group>
+								</li>
+							</ul>
+						</el-form-item>
+						<el-form-item prop="imglist" style="width:97%;paddingLeft:26px;" class="textarea_item">
+							<label style="display:block;marginBottom:10px;fontSize:16px;position:relative;color:#666;">
+								<i style="color:#f00;fontSize:20px;position:absolute;left:-15px;top:10%;">*</i>
+								上传合同附件<span style="fontSize:12px;color:#f00;">(建议上传盖章后的合同,支持png、jpg、pdf格式)</span>
+								<input type="file" name="file" @change="fileSelected()" id="file" class="true-file" style="display:none;">	
+								<el-button type="primary" size="small" @click="clickinput('')" style="marginLeft:20px;">点击上传</el-button>
+							</label>
+							<ul class="img_cont">
+								<li v-for="(img,index) in dataForm.imglist" :key="img" class="img_item">
+
+									<pdf ref="pdf" :src="img" style="width:240px;height:180px;overflow:hidden" v-if="img.indexOf('.pdf')!=-1" @click="preview('img'+index,index,img)"></pdf>
+									<el-image :src="img" alt="" style="background:#aaa;width:240px;height:180px;" :id="'img'+index" v-else @click="preview('img'+index,index,img)"/>
+									<i class="el-icon-zoom-in" style="position:absolute;right:12px;top:12px;color:#fff;" @click="preview('img'+index,index,img)"></i>
+									<span style="position:absolute;right:12px;bottom:12px;color:#409EFF;fontSize:16px;cursor:pointer;" @click.stop="clickinput(index+1)">重新上传</span>
+								</li>
+							</ul>
+						</el-form-item>
+					</el-form>
+				</div>
+			</div>
+			<div class="bot_cont">
+				<div style="display:flex;justify-content:center;margin:80px 0 30px;">
+					<el-button type="primary" style="width:80px;marginRight:24px;" @click="saveHandle">提交</el-button>
+					<el-button type="primary" plain style="width:80px;" @click="cancelHandle">取消</el-button>
+				</div>
+			</div>
+		</div>
+		<!-- 历史签约弹窗 -->
+		<el-dialog
+      v-model="isPreview"
+      :modal-append-to-body='false'
+      :show-close="false"
+      class="update_dialog"
+      center
+      top="7vh"
+      width="60%"
+    >
+      <template #header>
+        <div style="display:flex;alignItems:center;">
+          <span style="fontSize:16px;color:#333;fontWeight:bold;">历史签约</span>
+        </div>
+      </template>
+			<template v-if="dealList.length">
+				<div v-for="(item,index) in dealList" :key="index" class="history_item">
+					<el-tag style="margin-bottom:30px;" size="small">合同编号:{{item.ContractCode}}</el-tag>
+					<ul class="detail_item">
+						<li>
+							<span style="min-width:300px;marginRight:260px;display:inline-block;">合同期限:{{item.StartDate+'-'+item.EndDate}}</span>
+							<span>合同金额:{{item.Money}}元</span>
+						</li>
+						<li>
+							<span style="min-width:300px;marginRight:260px;display:inline-block;">付款方式:{{item.PayMethod}}</span>
+							<span>付款渠道:{{item.PayChannel}}</span>
+						</li>
+						<li class="textarea_item" style="width:97%;">
+							<label style="display:block;marginBottom:20px;fontSize:16px;position:relative;">
+								权限设置
+							</label>	
+							<ul class="menu_lists">
+								<li v-for="auth in item.PermissionList" :key="auth.ClassifyName" class="menu_item">
+									<el-checkbox :indeterminate="auth.CheckList.length>0&&auth.CheckList.length<auth.Items.length" v-model="auth.CheckAll" disabled @change="handleCheckAll(item)" style="marginRight:30px;fontWeight:bold;">{{auth.ClassifyName+':'}}</el-checkbox>
+									<el-checkbox-group v-model="auth.CheckList" @change="handleChecked(item)" disabled>
+										<el-checkbox v-for="list in auth.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item">{{list.PermissionName}}</el-checkbox>
+									</el-checkbox-group>
+								</li>
+							</ul>	
+						</li>
+					</ul>
+				</div>
+			</template>
+			<span v-else>暂无历史合同</span>
+		</el-dialog>
+		<!-- 图片预览 -->
+		<imgPreview
+		:isShowToggle="isShowToggle"
+		:isPreview="isPreviewimg" 
+		:arr="dataForm.imglist" 
+		:actIndex="preAct"
+		@close="closePreview"
+		@togglePre="togglePre"></imgPreview>	
+	</div>
 </template>
 <style scoped lang="scss">
-
+.updateServer_container {
+	min-width: 1570px;
+	*{
+		box-sizing: border-box;
+	}
+	/* reset */
+	:deep(.el-collapse) {
+		border: none;
+    .el-collapse-item__header {
+      display: block;
+      border: none;
+      font-size: 16px;
+      color: #333;
+      font-weight: bold;
+      position: relative;
+    }
+    .el-collapse-item__content {
+      padding-left: 30px;
+    }
+    .el-collapse-item__wrap {
+      border: none;
+      margin-top: 20px;
+    }
+	}
+	:deep(.el-form-item) {
+		margin-bottom: 30px;
+	}
+	:deep(.el-form-item .el-checkbox-group) {
+		height: 40px;
+	}
+	:deep(.textarea_item .el-form-item__content) {
+		width: 100%;
+	}
+	/*  */
+	.card_cont {
+		margin-bottom: 20px;
+		border: 1px solid #ECECEC;
+		padding: 30px;
+		background: #fff;
+		border-radius: 4px;
+		box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
+		.btn_top {
+			display: flex;
+			justify-content: flex-end;
+		}
+		.info {
+			margin-top: 10px;
+			font-size: 16px;
+			color: #666;
+			.tit {
+				color: #333;
+				font-size: 16px;
+				margin-bottom: 30px;
+			}
+			.info_list {
+				display: flex;
+				flex-wrap: wrap;
+				padding-left: 50px;
+				padding-bottom: 20px;
+				li {
+					margin-right: 113px;
+					margin-bottom: 20px;
+					min-width: 250px;
+				}
+			}
+		}
+		.info_cont {
+			padding-left: 30px;
+			margin-top: 30px;
+		}
+		.img_cont {
+			width: 100%;
+			display: flex;
+			flex-wrap: wrap;
+			.img_item {
+				position: relative;
+				margin-right: 23px;
+				&:last-child {
+					margin-right: 0;
+				}
+			}
+		}
+	}
+	.menu_lists {
+		padding: 40px 18px;
+		border: 1px dashed #AAB4CC;
+		border-radius: 4px;
+		.menu_item {
+			display: flex;
+			// align-items: center;
+			margin-bottom: 40px;
+			&:last-child {
+				margin-bottom: 0;
+			}
+			.list_item {
+				margin-right: 30px;
+				&:last-child {
+					margin-right: 0;
+				}
+			}
+		}
+	}
+	.update_dialog {
+		max-height: 810px;
+		min-height: 200px;
+		// overflow: hidden;
+		overflow-y: auto;
+		.el-dialog__header {
+			background: #fff;
+		}
+		.el-dialog__body {
+			padding: 30px 50px !important;
+		}
+		.history_item {
+			margin-bottom: 60px;
+			.detail_item {
+				font-size: 16px;
+				color: #666;
+				li {
+					margin-bottom: 30px;
+					&:last-child {
+						margin-bottom: 0;
+					}
+				}
+			}
+		}
+		.menu_lists {
+			padding: 20px 18px;
+			border: 1px dashed #AAB4CC;
+			border-radius: 4px;
+			.menu_item {
+				display: flex;
+				// align-items: center;
+				margin-bottom: 20px;
+				&:last-child {
+					margin-bottom: 0;
+				}
+				.list_item {
+					margin-right: 30px;
+					margin-bottom: 5px;
+					&:last-child {
+						margin-right: 0;
+					}
+				}
+			}
+		}
+	}
+}
 </style>

+ 6 - 6
src/views/custom_manage/etaTrial/questionnaireOption.vue

@@ -207,15 +207,15 @@ function submit(){
     <div class="questionnaire-title" style="margin-bottom: 32px;">
       {{ optionList[0]&&optionList[0].Options[0] }}
       <div class="question-setting-zone">
-        <img src="../../../assets/img/icons/edit-blue.png" @click="editTitle" />
+        <img src="@/assets/img/icons/edit-blue.png" @click="editTitle" />
       </div>
     </div>
     <div class="question-row"  v-for="(item,index) in optionList.slice(1)" :key="index">
       <div class="questionnaire-title">
         <span style="color: #C54322;" v-show="item.IsMust==1">*</span>{{index+1}}.{{ item.Question }}
         <div class="question-setting-zone">
-          <img src="../../../assets/img/icons/edit-blue.png" @click="editQusetion(item,index)" />
-          <img src="../../../assets/img/icons/delete-red.png" @click="deleteQusetion(item,index)" />
+          <img src="@/assets/img/icons/edit-blue.png" @click="editQusetion(item,index)" />
+          <img src="@/assets/img/icons/delete-red.png" @click="deleteQusetion(item,index)" />
         </div>
       </div>
       <div class="questionnaire-options">
@@ -230,7 +230,7 @@ function submit(){
     </div>
     <div class="add-sty">
       <span @click="addQusetion">
-        <img src="../../../assets/img/set_m/add_ico.png" />
+        <img src="@/assets/img/set_m/add_ico.png" />
         添加题目
       </span>
     </div>
@@ -285,13 +285,13 @@ function submit(){
                   </div>
                 </template>
               </el-input>
-              <img src="../../../assets/img/icons/delete-red.png" v-show="questionForm.Options.length>2"
+              <img src="@/assets/img/icons/delete-red.png" v-show="questionForm.Options.length>2"
               style="margin-left: 18px;width: 16px;cursor: pointer;" @click="deleteAnswer(ansInd)"/>
             </div>
           </el-form-item>
           <div class="add-sty" style="margin-top:0 ;">
             <span @click="addAnswer">
-              <img src="../../../assets/img/set_m/add_ico.png" />
+              <img src="@/assets/img/set_m/add_ico.png" />
               添加选项
             </span>
           </div>