소스 검색

fix:修改bug

wuguojie 1 년 전
부모
커밋
9e970f32cc

+ 2 - 1
src/api/modules/institution.ts

@@ -15,7 +15,8 @@ const institutionApi = (axiosInstance: ApiInstance) => ({
   institutionEdit: (data: institutionData) => axiosInstance.post('/dept/update', data, {}),
   //删除
   institutionDel: (data: institutionData) => axiosInstance.post('/dept/delete', data, {}),
-
+  // 批量删除
+  batchDeleteDept: (data: any) => axiosInstance.post('/dept/batchDeleteDept', data, {}),
   //设置机构负责人
   setDeptLeader: (data: institutionData) => axiosInstance.post('/dept/setDeptLeader', data, {}),
 

+ 4 - 3
src/components/DialogSetDeptLeader/index.vue

@@ -62,8 +62,8 @@
             <div style="display: flex; flex-direction: column">
               <el-radio
                 v-for="item in userList"
-                :key="item.id"
-                :value="item.id"
+                :key="item.userId"
+                :value="item.userId"
                 style="margin-bottom: 15px"
               >
                 <p style="margin: 0">{{ item.name }}</p>
@@ -103,6 +103,7 @@ const props = defineProps<{
   deptIds: Array<[]>;
   deptList: Array<tableType>;
   title: string;
+  deptSelected: string;
 }>();
 
 interface ListItem {
@@ -138,7 +139,7 @@ const list = ref<ListItem[]>([]);
 const options = ref<ListItem[]>([]);
 const userId = ref<string>("");
 const loading = ref(false);
-const treeReId=ref<string>("");
+const treeReId=ref<string>(props.deptSelected);
 
 const emits=defineEmits(["closeDialog",'cancelDialog']);
 

+ 294 - 270
src/views/additionalOrder/additional/index.vue

@@ -2740,323 +2740,347 @@ const uploadImage = async (file, type) => {
         xszFront.value = result.downloadUrl
         xszFrontFile.value = files
         xszFrontResult.value = result
-        if(xszFront.value&&xszBack.value) {
+        // if(xszFront.value&&xszBack.value) {
+        //
+        // }
           const fileParams = new FormData()
           fileParams.append('image1', xszFrontFile.value)
-          fileParams.append('image2', xszBackFile.value)
+          if(xszBackFile.value) {
+              fileParams.append('image2', xszBackFile.value)
+          }
           api.additionalApi.drivingPermit(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              let data = res.data.carInfo
-              carForm.value.licenseNo = data.plateNo // 车牌号
-              carForm.value.vinNo = data.vin // 车架号
-              carForm.value.brandName = data.backOcrID // 品牌型号
-              carForm.value.engineNo = data.engine // 发动机
-              // carForm.value.carYear = data.carYear // 年款
-              carForm.value.seatCount = data.approvedPassengersCapacity // 座位数
-              carForm.value.completeKerbMass = data.unladenMass // 整备质量
-              carForm.value.limitLoad = data.limitLoad // 核定载质量
-              // carForm.value.displacement = data.displacement // 排量
-              carForm.value.powerScale = data.powerScale // 功率
-              // carForm.value.purchasePrice = data.purchasePrice // 新车购置价
-              carForm.value.carNatureCode = data.useNature // 使用性质
-              carForm.value.vehicleUseCode = data.vehicleUse // 车辆用途
-              carForm.value.carTypeCode = data.category // 车辆类型
-              carForm.value.energyTypeCode = carForm.value.licenseNo.length == 8?'1': '0' // 能源种类
-              carForm.value.registerDate = data.registerDate // 注册日期
-              carForm.value.issueDate = data.issueDate // 发证日期
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+              if(res.code == 200) {
+                  let data = res.data.carInfo
+                  carForm.value.licenseNo = data.plateNo // 车牌号
+                  carForm.value.vinNo = data.vin // 车架号
+                  carForm.value.brandName = data.backOcrID // 品牌型号
+                  carForm.value.engineNo = data.engine // 发动机
+                  // carForm.value.carYear = data.carYear // 年款
+                  carForm.value.seatCount = data.approvedPassengersCapacity // 座位数
+                  carForm.value.completeKerbMass = data.unladenMass // 整备质量
+                  carForm.value.limitLoad = data.limitLoad // 核定载质量
+                  // carForm.value.displacement = data.displacement // 排量
+                  carForm.value.powerScale = data.powerScale // 功率
+                  // carForm.value.purchasePrice = data.purchasePrice // 新车购置价
+                  carForm.value.carNatureCode = data.useNature // 使用性质
+                  carForm.value.vehicleUseCode = data.vehicleUse // 车辆用途
+                  carForm.value.carTypeCode = data.category // 车辆类型
+                  carForm.value.energyTypeCode = carForm.value.licenseNo.length == 8?'1': '0' // 能源种类
+                  carForm.value.registerDate = data.registerDate // 注册日期
+                  carForm.value.issueDate = data.issueDate // 发证日期
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'xszb':
         xszBack.value = result.downloadUrl
         xszBackFile.value = files
         xszBackResult.value = result
-        if(xszFront.value&&xszBack.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', xszFrontFile.value)
-          fileParams.append('image2', xszBackFile.value)
-          api.additionalApi.drivingPermit(fileParams).then((res: any) => {
-            let data = res.data.carInfo
-            carForm.value.licenseNo = data.plateNo
-            carForm.value.vinNo = data.vin
-            carForm.value.brandName = data.backOcrID
-            carForm.value.engineNo = data.engine
-            // carForm.value.carYear = data.backOcrID
-            carForm.value.seatCount = data.approvedPassengersCapacity
-            carForm.value.completeKerbMass = data.unladenMass
-            carForm.value.limitLoad = data.limitLoad
-            // carForm.value.displacement = data.backOcrID
-            // carForm.value.powerScale = data.backOcrID
-            // carForm.value.purchasePrice = data.backOcrID
-            carForm.value.carNatureCode = data.useNature
-            carForm.value.vehicleUseCode = data.vehicleUse
-            carForm.value.carTypeCode = data.category
-            carForm.value.energyTypeCode = carForm.value.licenseNo.length == 8?'1': '0'
-            carForm.value.registerDate =
-              data.registerDate.substring(0, 4) +
-              "-" +
-              data.registerDate.substring(4, 6) +
-              "-" +
-              data.registerDate.substring(6, 8);
-            carForm.value.issueDate =
-              data.issueDate.substring(0, 4) +
-              "-" +
-              data.issueDate.substring(4, 6) +
-              "-" +
-              data.issueDate.substring(6, 8);
-            api.additionalApi.vinSearch(data.vin).then((sub: any) => {
-              if(res.code == 200) {
+        // if(xszFront.value&&xszBack.value) {
+        //
+        // }
+          const fileParams1 = new FormData()
+          if(xszFrontFile.value) {
+              fileParams1.append('image1', xszFrontFile.value)
+          }
+          fileParams1.append('image2', xszBackFile.value)
+          api.additionalApi.drivingPermit(fileParams1).then((res: any) => {
+              let data = res.data.carInfo
+              carForm.value.licenseNo = data.plateNo
+              carForm.value.vinNo = data.vin
+              carForm.value.brandName = data.backOcrID
+              carForm.value.engineNo = data.engine
+              // carForm.value.carYear = data.backOcrID
+              carForm.value.seatCount = data.approvedPassengersCapacity
+              carForm.value.completeKerbMass = data.unladenMass
+              carForm.value.limitLoad = data.limitLoad
+              // carForm.value.displacement = data.backOcrID
+              // carForm.value.powerScale = data.backOcrID
+              // carForm.value.purchasePrice = data.backOcrID
+              carForm.value.carNatureCode = data.useNature
+              carForm.value.vehicleUseCode = data.vehicleUse
+              carForm.value.carTypeCode = data.category
+              carForm.value.energyTypeCode = carForm.value.licenseNo.length == 8?'1': '0'
+              carForm.value.registerDate =
+                  data.registerDate.substring(0, 4) +
+                  "-" +
+                  data.registerDate.substring(4, 6) +
+                  "-" +
+                  data.registerDate.substring(6, 8);
+              carForm.value.issueDate =
+                  data.issueDate.substring(0, 4) +
+                  "-" +
+                  data.issueDate.substring(4, 6) +
+                  "-" +
+                  data.issueDate.substring(6, 8);
+              api.additionalApi.vinSearch(data.vin).then((sub: any) => {
+                  if(res.code == 200) {
 
-              } else {
-                ElMessage({
-                  message: res.msg,
-                  type: 'warning'
-                })
-              }
-            })
+                  } else {
+                      ElMessage({
+                          message: res.msg,
+                          type: 'warning'
+                      })
+                  }
+              })
           })
-        }
         break;
       case 'sfzf':
         sfzFront.value = result.downloadUrl
         sfzFrontFile.value = files
         sfzFrontResult.value = result
-        if(sfzFrontFile.value&&sfzBackFile.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', sfzFrontFile.value)
-          fileParams.append('image2', sfzBackFile.value)
-          api.additionalApi.idCard(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              const data = res.data.customerInfo
-              owerForm.value.name = data.name
-              owerForm.value.mobile = data.mobile
-              owerForm.value.addr = data.addr
-              owerForm.value.identifyNumber = data.identifyNumber
-              owerForm.value.identifyValidDate =
-                data.identifyValidDate.substring(0, 4) +
-                "-" +
-                data.identifyValidDate.substring(4, 6) +
-                "-" +
-                data.identifyValidDate.substring(6, 8);
-              owerForm.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                data.identifyValidEndDate.substring(0, 4) +
-                "-" +
-                data.identifyValidEndDate.substring(4, 6) +
-                "-" +
-                data.identifyValidEndDate.substring(6, 8):''
-              owerForm.value.age = getAgeByIdCard(data.identifyNumber)
-              owerForm.value.gender = data.identifyIssuedCom
-              owerForm.value.email = data.email
-                console.log('识别的结果', owerForm.value)
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(sfzFrontFile.value&&sfzBackFile.value) {
+        //
+        // }
+          const fileParams2 = new FormData()
+          fileParams2.append('image1', sfzFrontFile.value)
+          if(sfzBackFile.value) {
+              fileParams2.append('image2', sfzBackFile.value)
+          }
+          api.additionalApi.idCard(fileParams2).then((res: any) => {
+              if(res.code == 200) {
+                  const data = res.data.customerInfo
+                  owerForm.value.name = data.name
+                  owerForm.value.mobile = data.mobile
+                  owerForm.value.addr = data.addr
+                  owerForm.value.identifyNumber = data.identifyNumber
+                  owerForm.value.identifyValidDate =
+                      data.identifyValidDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidDate.substring(6, 8);
+                  owerForm.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
+                      data.identifyValidEndDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidEndDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidEndDate.substring(6, 8):''
+                  owerForm.value.age = getAgeByIdCard(data.identifyNumber)
+                  owerForm.value.gender = data.identifyIssuedCom
+                  owerForm.value.email = data.email
+                  console.log('识别的结果', owerForm.value)
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'sfzb':
         sfzBack.value = result.downloadUrl
         sfzBackFile.value = files
         sfzBackResult.value = result
-        if(sfzFrontFile.value&&sfzBackFile.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', sfzFrontFile.value)
-          fileParams.append('image2', sfzBackFile.value)
-          api.additionalApi.idCard(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              const data = res.data.customerInfo
-              owerForm.value.name = data.name
-              owerForm.value.mobile = data.mobile
-              owerForm.value.addr = data.addr
-              owerForm.value.identifyNumber = data.identifyNumber
-              owerForm.value.identifyValidDate =
-                data.identifyValidDate.substring(0, 4) +
-                "-" +
-                data.identifyValidDate.substring(4, 6) +
-                "-" +
-                data.identifyValidDate.substring(6, 8);
-              owerForm.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                data.identifyValidEndDate.substring(0, 4) +
-                "-" +
-                data.identifyValidEndDate.substring(4, 6) +
-                "-" +
-                data.identifyValidEndDate.substring(6, 8): ''
-              owerForm.value.age = getAgeByIdCard(data.identifyNumber)
-              owerForm.value.gender = data.identifyIssuedCom
-              owerForm.value.email = data.email
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(sfzFrontFile.value&&sfzBackFile.value) {
+        //
+        // }
+          const fileParams3 = new FormData()
+          if(sfzFrontFile.value) {
+              fileParams3.append('image1', sfzFrontFile.value)
+          }
+          fileParams3.append('image2', sfzBackFile.value)
+          api.additionalApi.idCard(fileParams3).then((res: any) => {
+              if(res.code == 200) {
+                  const data = res.data.customerInfo
+                  owerForm.value.name = data.name
+                  owerForm.value.mobile = data.mobile
+                  owerForm.value.addr = data.addr
+                  owerForm.value.identifyNumber = data.identifyNumber
+                  owerForm.value.identifyValidDate =
+                      data.identifyValidDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidDate.substring(6, 8);
+                  owerForm.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
+                      data.identifyValidEndDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidEndDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidEndDate.substring(6, 8): ''
+                  owerForm.value.age = getAgeByIdCard(data.identifyNumber)
+                  owerForm.value.gender = data.identifyIssuedCom
+                  owerForm.value.email = data.email
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'sfzf1':
         sfz1Front.value = result.downloadUrl
         sfz1FrontFile.value = files
         sfz1FrontResult.value = result
-        if(sfz1FrontFile.value&&sfz1BackFile.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', sfz1FrontFile.value)
-          fileParams.append('image2', sfz1BackFile.value)
-          api.additionalApi.idCard(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              const data = res.data.customerInfo
-              ower1Form.value.name = data.name
-              ower1Form.value.mobile = data.mobile
-              ower1Form.value.addr = data.addr
-              ower1Form.value.identifyNumber = data.identifyNumber
-              ower1Form.value.identifyValidDate =
-                data.identifyValidDate.substring(0, 4) +
-                "-" +
-                data.identifyValidDate.substring(4, 6) +
-                "-" +
-                data.identifyValidDate.substring(6, 8);
-              ower1Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                data.identifyValidEndDate.substring(0, 4) +
-                "-" +
-                data.identifyValidEndDate.substring(4, 6) +
-                "-" +
-                data.identifyValidEndDate.substring(6, 8): ''
-              ower1Form.value.age = getAgeByIdCard(data.identifyNumber)
-              ower1Form.value.gender = data.identifyIssuedCom
-              ower1Form.value.email = data.email
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(sfz1FrontFile.value&&sfz1BackFile.value) {
+        //
+        // }
+          const fileParams4 = new FormData()
+          fileParams4.append('image1', sfz1FrontFile.value)
+          if(sfz1BackFile.value) {
+              fileParams4.append('image2', sfz1BackFile.value)
+          }
+          api.additionalApi.idCard(fileParams4).then((res: any) => {
+              if(res.code == 200) {
+                  const data = res.data.customerInfo
+                  ower1Form.value.name = data.name
+                  ower1Form.value.mobile = data.mobile
+                  ower1Form.value.addr = data.addr
+                  ower1Form.value.identifyNumber = data.identifyNumber
+                  ower1Form.value.identifyValidDate =
+                      data.identifyValidDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidDate.substring(6, 8);
+                  ower1Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
+                      data.identifyValidEndDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidEndDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidEndDate.substring(6, 8): ''
+                  ower1Form.value.age = getAgeByIdCard(data.identifyNumber)
+                  ower1Form.value.gender = data.identifyIssuedCom
+                  ower1Form.value.email = data.email
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'sfzb1':
         sfz1Back.value = result.downloadUrl
         sfz1BackFile.value = files
         sfz1BackResult.value = result
-        if(sfz1FrontFile.value&&sfz1BackFile.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', sfz1FrontFile.value)
-          fileParams.append('image2', sfz1BackFile.value)
-          api.additionalApi.idCard(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              const data = res.data.customerInfo
-              ower1Form.value.name = data.name
-              ower1Form.value.mobile = data.mobile
-              ower1Form.value.addr = data.addr
-              ower1Form.value.identifyNumber = data.identifyNumber
-              ower1Form.value.identifyValidDate =
-                data.identifyValidDate.substring(0, 4) +
-                "-" +
-                data.identifyValidDate.substring(4, 6) +
-                "-" +
-                data.identifyValidDate.substring(6, 8);
-              ower1Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                data.identifyValidEndDate.substring(0, 4) +
-                "-" +
-                data.identifyValidEndDate.substring(4, 6) +
-                "-" +
-                data.identifyValidEndDate.substring(6, 8):''
-              ower1Form.value.age = getAgeByIdCard(data.identifyNumber)
-              ower1Form.value.gender = data.identifyIssuedCom
-              ower1Form.value.email = data.email
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(sfz1FrontFile.value&&sfz1BackFile.value) {
+        //
+        // }
+          const fileParams5 = new FormData()
+          if(sfz1FrontFile.value) {
+              fileParams5.append('image1', sfz1FrontFile.value)
+          }
+          fileParams5.append('image2', sfz1BackFile.value)
+          api.additionalApi.idCard(fileParams5).then((res: any) => {
+              if(res.code == 200) {
+                  const data = res.data.customerInfo
+                  ower1Form.value.name = data.name
+                  ower1Form.value.mobile = data.mobile
+                  ower1Form.value.addr = data.addr
+                  ower1Form.value.identifyNumber = data.identifyNumber
+                  ower1Form.value.identifyValidDate =
+                      data.identifyValidDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidDate.substring(6, 8);
+                  ower1Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
+                      data.identifyValidEndDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidEndDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidEndDate.substring(6, 8):''
+                  ower1Form.value.age = getAgeByIdCard(data.identifyNumber)
+                  ower1Form.value.gender = data.identifyIssuedCom
+                  ower1Form.value.email = data.email
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'sfzf2':
         sfz2Front.value = result.downloadUrl
         sfz2FrontFile.value = files
         sfz2FrontResult.value = result
-        if(sfz2FrontFile.value&&sfz2BackFile.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', sfz2FrontFile.value)
-          fileParams.append('image2', sfz2BackFile.value)
-          api.additionalApi.idCard(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              const data = res.data.customerInfo
-              ower2Form.value.name = data.name
-              ower2Form.value.mobile = data.mobile
-              ower2Form.value.addr = data.addr
-              ower2Form.value.identifyNumber = data.identifyNumber
-              ower2Form.value.identifyValidDate =
-                data.identifyValidDate.substring(0, 4) +
-                "-" +
-                data.identifyValidDate.substring(4, 6) +
-                "-" +
-                data.identifyValidDate.substring(6, 8);
-              ower2Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                data.identifyValidEndDate.substring(0, 4) +
-                "-" +
-                data.identifyValidEndDate.substring(4, 6) +
-                "-" +
-                data.identifyValidEndDate.substring(6, 8):''
-              ower2Form.value.age = getAgeByIdCard(data.identifyNumber)
-              ower2Form.value.gender = data.identifyIssuedCom
-              ower2Form.value.email = data.email
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(sfz2FrontFile.value&&sfz2BackFile.value) {
+        //
+        // }
+          const fileParams6 = new FormData()
+          fileParams6.append('image1', sfz2FrontFile.value)
+          if(sfz2BackFile.value) {
+              fileParams6.append('image2', sfz2BackFile.value)
+          }
+          api.additionalApi.idCard(fileParams6).then((res: any) => {
+              if(res.code == 200) {
+                  const data = res.data.customerInfo
+                  ower2Form.value.name = data.name
+                  ower2Form.value.mobile = data.mobile
+                  ower2Form.value.addr = data.addr
+                  ower2Form.value.identifyNumber = data.identifyNumber
+                  ower2Form.value.identifyValidDate =
+                      data.identifyValidDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidDate.substring(6, 8);
+                  ower2Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
+                      data.identifyValidEndDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidEndDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidEndDate.substring(6, 8):''
+                  ower2Form.value.age = getAgeByIdCard(data.identifyNumber)
+                  ower2Form.value.gender = data.identifyIssuedCom
+                  ower2Form.value.email = data.email
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'sfzb2':
         sfz2Back.value = result.downloadUrl
         sfz2BackFile.value = files
         sfz2BackResult.value = result
-        if(sfz2FrontFile.value&&sfz2BackFile.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', sfz2FrontFile.value)
-          fileParams.append('image2', sfz2BackFile.value)
-          api.additionalApi.idCard(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              const data = res.data.customerInfo
-              ower2Form.value.name = data.name
-              ower2Form.value.mobile = data.mobile
-              ower2Form.value.addr = data.addr
-              ower2Form.value.identifyNumber = data.identifyNumber
-              ower2Form.value.identifyValidDate =
-                data.identifyValidDate.substring(0, 4) +
-                "-" +
-                data.identifyValidDate.substring(4, 6) +
-                "-" +
-                data.identifyValidDate.substring(6, 8);
-              ower2Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                data.identifyValidEndDate.substring(0, 4) +
-                "-" +
-                data.identifyValidEndDate.substring(4, 6) +
-                "-" +
-                data.identifyValidEndDate.substring(6, 8): ''
-              ower2Form.value.age = getAgeByIdCard(data.identifyNumber)
-              ower2Form.value.gender = data.identifyIssuedCom
-              ower2Form.value.email = data.email
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(sfz2FrontFile.value&&sfz2BackFile.value) {
+        //
+        // }
+          const fileParams7 = new FormData()
+          if(sfz2FrontFile.value) {
+              fileParams7.append('image1', sfz2FrontFile.value)
+          }
+          fileParams7.append('image2', sfz2BackFile.value)
+          api.additionalApi.idCard(fileParams7).then((res: any) => {
+              if(res.code == 200) {
+                  const data = res.data.customerInfo
+                  ower2Form.value.name = data.name
+                  ower2Form.value.mobile = data.mobile
+                  ower2Form.value.addr = data.addr
+                  ower2Form.value.identifyNumber = data.identifyNumber
+                  ower2Form.value.identifyValidDate =
+                      data.identifyValidDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidDate.substring(6, 8);
+                  ower2Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
+                      data.identifyValidEndDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidEndDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidEndDate.substring(6, 8): ''
+                  ower2Form.value.age = getAgeByIdCard(data.identifyNumber)
+                  ower2Form.value.gender = data.identifyIssuedCom
+                  ower2Form.value.email = data.email
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 4:
         jqPolicyName.value = result.fileName

+ 21 - 0
src/views/externalAgreement/agreement/agreementIndex.vue

@@ -30,6 +30,7 @@
           </el-dropdown>
         </template>
         <template v-slot:operation="scope">
+            <el-button type="primary" link @click="agreementEdit(scope.operationData.id)">编辑</el-button>
           <el-button type="primary" link @click="agreemenUpdate(scope.operationData)"> 详情
           </el-button>
           <el-dropdown placement="bottom-start" trigger="click">
@@ -40,6 +41,7 @@
               <el-dropdown-menu>
                 <el-dropdown-item @click="enable(scope.operationData.id)">启用</el-dropdown-item>
                 <el-dropdown-item @click="disable(scope.operationData.id)">禁用</el-dropdown-item>
+                  <el-dropdown-item @click="agreemenCopy(scope.operationData.id)">复制协议</el-dropdown-item>
                 <el-dropdown-item @click="del(scope.operationData.id)">删除</el-dropdown-item>
                 <el-dropdown-item @click="batchAuthorization(scope.operationData.id)">协议授权</el-dropdown-item>
               </el-dropdown-menu>
@@ -315,6 +317,16 @@ function getUncheckedIds(data: any[]): string[] {
   return ids;
 }
 
+//编辑跳转
+const agreementEdit = (id) => {
+    router.push({
+        name: 'ExternalagreementAdd',
+        query: {
+            id: id
+        }
+    })
+}
+
 function agreemenUpdate(item: any) {
   router.push({
     name: 'ExternalAgreementDetails',
@@ -364,6 +376,15 @@ const disable = (value: string) => {
 const enable = (value: string) => {
   sysUpAndDown('0', [value]);
 }
+//复制协议
+const agreemenCopy = (id:string) => {
+    router.push({
+        name: 'AgreementCopy',
+        query: {
+            id: id
+        }
+    })
+}
 const del = (value: string) => {
   ElMessageBox.confirm(
     '确定要删除该协议吗,删除后,该协议不在支持报价出单,并且已核保待缴费,待支付的订单,都将失效,请确认是否删除?',

+ 8 - 8
src/views/insurancePolicy/index.vue

@@ -873,29 +873,29 @@
                         <el-row :gutter="20">
                           <el-col :span="6" class="quoteFlex">
                             救援
-                            <el-select size="small" style="width: 80px; margin: 0 10px">
-                              <el-option label="1" value="1"></el-option>
+                            <el-select v-model="scope.row.projectList[productIndex].rescue" :disabled="scope.row.projectList[productIndex].schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
+                                <el-option label="1" value="1"></el-option>
                             </el-select>
                           </el-col>
                           <el-col :span="6" class="quoteFlex">
                             检测
-                            <el-select size="small" style="width: 80px; margin: 0 10px">
-                              <el-option label="1" value="1"></el-option>
+                            <el-select v-model="scope.row.projectList[productIndex].detection" :disabled="scope.row.projectList[productIndex].schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
+                                <el-option label="1" value="1"></el-option>
                             </el-select>
                           </el-col>
                           <el-col :span="6" class="quoteFlex">
                             代驾
-                            <el-select size="small" style="width: 80px; margin: 0 10px">
-                              <el-option label="1" value="1"></el-option>
+                            <el-select v-model="scope.row.projectList[productIndex].driver" :disabled="scope.row.projectList[productIndex].schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
+                                <el-option label="1" value="1"></el-option>
                             </el-select>
                           </el-col>
                           <el-col :span="6" class="quoteFlex">
                             送检
-                            <el-select size="small" style="width: 80px; margin: 0 10px">
-                              <el-option label="1" value="1"></el-option>
+                            <el-select v-model="scope.row.projectList[productIndex].inspect" :disabled="scope.row.projectList[productIndex].schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
+                                <el-option label="1" value="1"></el-option>
                             </el-select>
                           </el-col>

+ 320 - 296
src/views/insurancePolicy/modules/recognition.vue

@@ -601,184 +601,196 @@ const uploadImage = async (file, type) => {
         xszFrontResult.value = result
         xszFront.value = result.downloadUrl
         xszFrontFile.value = files
-        if(xszFront.value&&xszBack.value) {
+        // if(xszFront.value&&xszBack.value) {
+        //
+        // }
           const fileParams = new FormData()
           fileParams.append('image1', xszFrontFile.value)
-          fileParams.append('image2', xszBackFile.value)
+          if(xszBackFile.value) {
+              fileParams.append('image2', xszBackFile.value)
+          }
           api.additionalApi.drivingPermit(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              let data = res.data.carInfo
-              carForm.value.licenseNo = data.plateNo // 车牌号
-              carForm.value.vinNo = data.vin // 车架号
-              carForm.value.carOwner = data.carOwner // 所有人
-              carForm.value.address = data.address // 住址
-              carForm.value.brandName = data.backOcrID // 品牌型号
-              carForm.value.engineNo = data.engine // 发动机
-              // carForm.value.carYear = data.carYear // 年款
-              carForm.value.seatCount = data.approvedPassengersCapacity // 座位数
-              carForm.value.completeKerbMass = data.unladenMass // 整备质量
-              carForm.value.grossMass = data.grossMass // 总质量
-              carForm.value.limitLoad = data.limitLoad // 核定载质量
-              // carForm.value.displacement = data.displacement // 排量
-              carForm.value.powerScale = data.powerScale // 功率
-              // carForm.value.purchasePrice = data.purchasePrice // 新车购置价
-              carForm.value.carNatureCode = data.useNature // 使用性质
-              carForm.value.vehicleUseCode = data.vehicleUse // 车辆用途
-              carForm.value.carTypeCode = data.category // 车辆类型
-              carForm.value.energyTypeCode = data.energyTypeCode // 能源种类
-              carForm.value.plateType = data.plateType
-              carForm.value.registerDate = // 注册日期
-                data.registerDate.substring(0, 4) +
-                "-" +
-                data.registerDate.substring(4, 6) +
-                "-" +
-                data.registerDate.substring(6, 8);
-              carForm.value.issueDate = // 发证日期
-                data.issueDate.substring(0, 4) +
-                "-" +
-                data.issueDate.substring(4, 6) +
-                "-" +
-                data.issueDate.substring(6, 8);
-              carForm.value.overallDimensions = data.overallDimensions // 外廓尺寸
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+              if(res.code == 200) {
+                  let data = res.data.carInfo
+                  carForm.value.licenseNo = data.plateNo // 车牌号
+                  carForm.value.vinNo = data.vin // 车架号
+                  carForm.value.carOwner = data.carOwner // 所有人
+                  carForm.value.address = data.address // 住址
+                  carForm.value.brandName = data.backOcrID // 品牌型号
+                  carForm.value.engineNo = data.engine // 发动机
+                  // carForm.value.carYear = data.carYear // 年款
+                  carForm.value.seatCount = data.approvedPassengersCapacity // 座位数
+                  carForm.value.completeKerbMass = data.unladenMass // 整备质量
+                  carForm.value.grossMass = data.grossMass // 总质量
+                  carForm.value.limitLoad = data.limitLoad // 核定载质量
+                  // carForm.value.displacement = data.displacement // 排量
+                  carForm.value.powerScale = data.powerScale // 功率
+                  // carForm.value.purchasePrice = data.purchasePrice // 新车购置价
+                  carForm.value.carNatureCode = data.useNature // 使用性质
+                  carForm.value.vehicleUseCode = data.vehicleUse // 车辆用途
+                  carForm.value.carTypeCode = data.category // 车辆类型
+                  carForm.value.energyTypeCode = data.energyTypeCode // 能源种类
+                  carForm.value.plateType = data.plateType
+                  carForm.value.registerDate = // 注册日期
+                      data.registerDate.substring(0, 4) +
+                      "-" +
+                      data.registerDate.substring(4, 6) +
+                      "-" +
+                      data.registerDate.substring(6, 8);
+                  carForm.value.issueDate = // 发证日期
+                      data.issueDate.substring(0, 4) +
+                      "-" +
+                      data.issueDate.substring(4, 6) +
+                      "-" +
+                      data.issueDate.substring(6, 8);
+                  carForm.value.overallDimensions = data.overallDimensions // 外廓尺寸
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'xszb':
         xszBackResult.value = result
         xszBack.value = result.downloadUrl
         xszBackFile.value = files
-        if(xszFront.value&&xszBack.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', xszFrontFile.value)
-          fileParams.append('image2', xszBackFile.value)
-          api.additionalApi.drivingPermit(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              let data = res.data.carInfo
-              carForm.value.licenseNo = data.plateNo // 车牌号
-              carForm.value.vinNo = data.vin // 车架号
-              carForm.value.carOwner = data.carOwner // 所有人
-              carForm.value.brandName = data.backOcrID // 品牌型号
-              carForm.value.engineNo = data.engine // 发动机
-              // carForm.value.carYear = data.carYear // 年款
-              carForm.value.seatCount = data.approvedPassengersCapacity // 座位数
-              carForm.value.completeKerbMass = data.unladenMass // 整备质量
-              carForm.value.limitLoad = data.limitLoad // 核定载质量
-              // carForm.value.displacement = data.displacement // 排量
-              carForm.value.powerScale = data.powerScale // 功率
-              // carForm.value.purchasePrice = data.purchasePrice // 新车购置价
-              carForm.value.carNatureCode = data.useNature // 使用性质
-              carForm.value.vehicleUseCode = data.vehicleUse // 车辆用途
-              carForm.value.carTypeCode = data.category // 车辆类型
-              carForm.value.energyTypeCode = data.energyTypeCode // 能源种类
-              carForm.value.plateType = data.plateType
-              carForm.value.registerDate = // 注册日期
-                data.registerDate.substring(0, 4) +
-                "-" +
-                data.registerDate.substring(4, 6) +
-                "-" +
-                data.registerDate.substring(6, 8);
-              carForm.value.issueDate = // 发证日期
-                data.issueDate.substring(0, 4) +
-                "-" +
-                data.issueDate.substring(4, 6) +
-                "-" +
-                data.issueDate.substring(6, 8);
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(xszFront.value&&xszBack.value) {
+        //
+        // }
+          const fileParams1 = new FormData()
+          if(xszFrontFile.value) {
+              fileParams1.append('image1', xszFrontFile.value)
+          }
+          fileParams1.append('image2', xszBackFile.value)
+          api.additionalApi.drivingPermit(fileParams1).then((res: any) => {
+              if(res.code == 200) {
+                  let data = res.data.carInfo
+                  carForm.value.licenseNo = data.plateNo // 车牌号
+                  carForm.value.vinNo = data.vin // 车架号
+                  carForm.value.carOwner = data.carOwner // 所有人
+                  carForm.value.brandName = data.backOcrID // 品牌型号
+                  carForm.value.engineNo = data.engine // 发动机
+                  // carForm.value.carYear = data.carYear // 年款
+                  carForm.value.seatCount = data.approvedPassengersCapacity // 座位数
+                  carForm.value.completeKerbMass = data.unladenMass // 整备质量
+                  carForm.value.limitLoad = data.limitLoad // 核定载质量
+                  // carForm.value.displacement = data.displacement // 排量
+                  carForm.value.powerScale = data.powerScale // 功率
+                  // carForm.value.purchasePrice = data.purchasePrice // 新车购置价
+                  carForm.value.carNatureCode = data.useNature // 使用性质
+                  carForm.value.vehicleUseCode = data.vehicleUse // 车辆用途
+                  carForm.value.carTypeCode = data.category // 车辆类型
+                  carForm.value.energyTypeCode = data.energyTypeCode // 能源种类
+                  carForm.value.plateType = data.plateType
+                  carForm.value.registerDate = // 注册日期
+                      data.registerDate.substring(0, 4) +
+                      "-" +
+                      data.registerDate.substring(4, 6) +
+                      "-" +
+                      data.registerDate.substring(6, 8);
+                  carForm.value.issueDate = // 发证日期
+                      data.issueDate.substring(0, 4) +
+                      "-" +
+                      data.issueDate.substring(4, 6) +
+                      "-" +
+                      data.issueDate.substring(6, 8);
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'sfzf':
         sfzFrontResult.value = result
         sfzFront.value = result.downloadUrl
         sfzFrontFile.value = files
-        if(sfzFrontFile.value&&sfzBackFile.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', sfzFrontFile.value)
-          fileParams.append('image2', sfzBackFile.value)
-          api.additionalApi.idCard(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              const data = res.data.customerInfo
-              owerForm.value.name = data.name
-              owerForm.value.mobile = data.mobile
-              owerForm.value.addr = data.addr
-              owerForm.value.identifyNumber = data.identifyNumber
-              owerForm.value.identifyValidDate =
-                data.identifyValidDate.substring(0, 4) +
-                "-" +
-                data.identifyValidDate.substring(4, 6) +
-                "-" +
-                data.identifyValidDate.substring(6, 8);
-              owerForm.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                data.identifyValidEndDate.substring(0, 4) +
-                "-" +
-                data.identifyValidEndDate.substring(4, 6) +
-                "-" +
-                data.identifyValidEndDate.substring(6, 8):''
-              owerForm.value.age = getAgeByIdCard(data.identifyNumber)
-              owerForm.value.gender = data.identifyIssuedCom
-              owerForm.value.email = data.email
-              owerForm.value.nation = data.nation
-              owerForm.value.birthday = `${data.identifyNumber.substring(6, 10)}-${data.identifyNumber.substring(10, 12)}-${data.identifyNumber.substring(12, 14)}`
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(sfzFrontFile.value&&sfzBackFile.value) {
+        //
+        // }
+          const fileParams2 = new FormData()
+          fileParams2.append('image1', sfzFrontFile.value)
+          if(sfzBackFile.value) {
+              fileParams2.append('image2', sfzBackFile.value)
+          }
+          api.additionalApi.idCard(fileParams2).then((res: any) => {
+              if(res.code == 200) {
+                  const data = res.data.customerInfo
+                  owerForm.value.name = data.name
+                  owerForm.value.mobile = data.mobile
+                  owerForm.value.addr = data.addr
+                  owerForm.value.identifyNumber = data.identifyNumber
+                  owerForm.value.identifyValidDate =
+                      data.identifyValidDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidDate.substring(6, 8);
+                  owerForm.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
+                      data.identifyValidEndDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidEndDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidEndDate.substring(6, 8):''
+                  owerForm.value.age = getAgeByIdCard(data.identifyNumber)
+                  owerForm.value.gender = data.identifyIssuedCom
+                  owerForm.value.email = data.email
+                  owerForm.value.nation = data.nation
+                  owerForm.value.birthday = `${data.identifyNumber.substring(6, 10)}-${data.identifyNumber.substring(10, 12)}-${data.identifyNumber.substring(12, 14)}`
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'sfzb':
         sfzBackResult.value = result
         sfzBack.value = result.downloadUrl
         sfzBackFile.value = files
-        if(sfzFrontFile.value&&sfzBackFile.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', sfzFrontFile.value)
-          fileParams.append('image2', sfzBackFile.value)
-          api.additionalApi.idCard(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              const data = res.data.customerInfo
-              owerForm.value.name = data.name
-              owerForm.value.mobile = data.mobile
-              owerForm.value.addr = data.addr
-              owerForm.value.identifyNumber = data.identifyNumber
-              owerForm.value.identifyValidDate =
-                data.identifyValidDate.substring(0, 4) +
-                "-" +
-                data.identifyValidDate.substring(4, 6) +
-                "-" +
-                data.identifyValidDate.substring(6, 8);
-              owerForm.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                data.identifyValidEndDate.substring(0, 4) +
-                "-" +
-                data.identifyValidEndDate.substring(4, 6) +
-                "-" +
-                data.identifyValidEndDate.substring(6, 8): ''
-              owerForm.value.age = getAgeByIdCard(data.identifyNumber)
-              owerForm.value.gender = data.identifyIssuedCom
-              owerForm.value.email = data.email
-              owerForm.value.nation = data.nation
-              owerForm.value.birthday = `${data.identifyNumber.substring(6, 10)}-${data.identifyNumber.substring(10, 12)}-${data.identifyNumber.substring(12, 14)}`
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(sfzFrontFile.value&&sfzBackFile.value) {
+        //
+        // }
+          const fileParams3 = new FormData()
+          if(sfzFrontFile.value) {
+              fileParams3.append('image1', sfzFrontFile.value)
+          }
+          fileParams3.append('image2', sfzBackFile.value)
+          api.additionalApi.idCard(fileParams3).then((res: any) => {
+              if(res.code == 200) {
+                  const data = res.data.customerInfo
+                  owerForm.value.name = data.name
+                  owerForm.value.mobile = data.mobile
+                  owerForm.value.addr = data.addr
+                  owerForm.value.identifyNumber = data.identifyNumber
+                  owerForm.value.identifyValidDate =
+                      data.identifyValidDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidDate.substring(6, 8);
+                  owerForm.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
+                      data.identifyValidEndDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidEndDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidEndDate.substring(6, 8): ''
+                  owerForm.value.age = getAgeByIdCard(data.identifyNumber)
+                  owerForm.value.gender = data.identifyIssuedCom
+                  owerForm.value.email = data.email
+                  owerForm.value.nation = data.nation
+                  owerForm.value.birthday = `${data.identifyNumber.substring(6, 10)}-${data.identifyNumber.substring(10, 12)}-${data.identifyNumber.substring(12, 14)}`
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'yyzz':
         yyzzFrontResult.value = result
@@ -804,83 +816,89 @@ const uploadImage = async (file, type) => {
         tbrFrontResult.value = result
         tbrFront.value = result.downloadUrl
         tbrFrontFile.value = files
-        if(tbrFrontFile.value&&tbrBackFile.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', tbrFrontFile.value)
-          fileParams.append('image2', tbrBackFile.value)
-          api.additionalApi.idCard(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              const data = res.data.customerInfo
-              ower1Form.value.name = data.name
-              ower1Form.value.mobile = data.mobile
-              ower1Form.value.addr = data.addr
-              ower1Form.value.identifyNumber = data.identifyNumber
-              ower1Form.value.identifyValidDate =
-                data.identifyValidDate.substring(0, 4) +
-                "-" +
-                data.identifyValidDate.substring(4, 6) +
-                "-" +
-                data.identifyValidDate.substring(6, 8);
-              ower1Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                data.identifyValidEndDate.substring(0, 4) +
-                "-" +
-                data.identifyValidEndDate.substring(4, 6) +
-                "-" +
-                data.identifyValidEndDate.substring(6, 8):''
-              ower1Form.value.age = getAgeByIdCard(data.identifyNumber)
-              ower1Form.value.gender = data.identifyIssuedCom
-              ower1Form.value.email = data.email
-              ower1Form.value.nation = data.nation
-              ower1Form.value.birthday = `${data.identifyNumber.substring(6, 10)}-${data.identifyNumber.substring(10, 12)}-${data.identifyNumber.substring(12, 14)}`
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(tbrFrontFile.value&&tbrBackFile.value) {
+        //
+        // }
+          const fileParams4 = new FormData()
+          fileParams4.append('image1', tbrFrontFile.value)
+          if(tbrBackFile.value) {
+              fileParams4.append('image2', tbrBackFile.value)
+          }
+          api.additionalApi.idCard(fileParams4).then((res: any) => {
+              if(res.code == 200) {
+                  const data = res.data.customerInfo
+                  ower1Form.value.name = data.name
+                  ower1Form.value.mobile = data.mobile
+                  ower1Form.value.addr = data.addr
+                  ower1Form.value.identifyNumber = data.identifyNumber
+                  ower1Form.value.identifyValidDate =
+                      data.identifyValidDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidDate.substring(6, 8);
+                  ower1Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
+                      data.identifyValidEndDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidEndDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidEndDate.substring(6, 8):''
+                  ower1Form.value.age = getAgeByIdCard(data.identifyNumber)
+                  ower1Form.value.gender = data.identifyIssuedCom
+                  ower1Form.value.email = data.email
+                  ower1Form.value.nation = data.nation
+                  ower1Form.value.birthday = `${data.identifyNumber.substring(6, 10)}-${data.identifyNumber.substring(10, 12)}-${data.identifyNumber.substring(12, 14)}`
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'tbrb':
         tbrBackResult.value = result
         tbrBack.value = result.downloadUrl
         tbrBackFile.value = files
-        if(tbrFrontFile.value&&tbrBackFile.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', tbrFrontFile.value)
-          fileParams.append('image2', tbrBackFile.value)
-          api.additionalApi.idCard(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              const data = res.data.customerInfo
-              ower1Form.value.name = data.name
-              ower1Form.value.mobile = data.mobile
-              ower1Form.value.addr = data.addr
-              ower1Form.value.identifyNumber = data.identifyNumber
-              ower1Form.value.identifyValidDate =
-                data.identifyValidDate.substring(0, 4) +
-                "-" +
-                data.identifyValidDate.substring(4, 6) +
-                "-" +
-                data.identifyValidDate.substring(6, 8);
-              ower1Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                data.identifyValidEndDate.substring(0, 4) +
-                "-" +
-                data.identifyValidEndDate.substring(4, 6) +
-                "-" +
-                data.identifyValidEndDate.substring(6, 8): ''
-              ower1Form.value.age = getAgeByIdCard(data.identifyNumber)
-              ower1Form.value.gender = data.identifyIssuedCom
-              ower1Form.value.email = data.email
-              ower1Form.value.nation = data.nation
-              ower1Form.value.birthday = `${data.identifyNumber.substring(6, 10)}-${data.identifyNumber.substring(10, 12)}-${data.identifyNumber.substring(12, 14)}`
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(tbrFrontFile.value&&tbrBackFile.value) {
+        //
+        // }
+          const fileParams5 = new FormData()
+          if(tbrFrontFile.value) {
+              fileParams5.append('image1', tbrFrontFile.value)
+          }
+          fileParams5.append('image2', tbrBackFile.value)
+          api.additionalApi.idCard(fileParams5).then((res: any) => {
+              if(res.code == 200) {
+                  const data = res.data.customerInfo
+                  ower1Form.value.name = data.name
+                  ower1Form.value.mobile = data.mobile
+                  ower1Form.value.addr = data.addr
+                  ower1Form.value.identifyNumber = data.identifyNumber
+                  ower1Form.value.identifyValidDate =
+                      data.identifyValidDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidDate.substring(6, 8);
+                  ower1Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
+                      data.identifyValidEndDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidEndDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidEndDate.substring(6, 8): ''
+                  ower1Form.value.age = getAgeByIdCard(data.identifyNumber)
+                  ower1Form.value.gender = data.identifyIssuedCom
+                  ower1Form.value.email = data.email
+                  ower1Form.value.nation = data.nation
+                  ower1Form.value.birthday = `${data.identifyNumber.substring(6, 10)}-${data.identifyNumber.substring(10, 12)}-${data.identifyNumber.substring(12, 14)}`
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'tbryyzz':
         tbryyzzFrontResult.value = result
@@ -906,83 +924,89 @@ const uploadImage = async (file, type) => {
         bbrFrontResult.value = result
         bbrFront.value = result.downloadUrl
         bbrFrontFile.value = files
-        if(bbrFrontFile.value&&bbrBackFile.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', bbrFrontFile.value)
-          fileParams.append('image2', bbrBackFile.value)
-          api.additionalApi.idCard(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              const data = res.data.customerInfo
-              ower2Form.value.name = data.name
-              ower2Form.value.mobile = data.mobile
-              ower2Form.value.addr = data.addr
-              ower2Form.value.identifyNumber = data.identifyNumber
-              ower2Form.value.identifyValidDate =
-                data.identifyValidDate.substring(0, 4) +
-                "-" +
-                data.identifyValidDate.substring(4, 6) +
-                "-" +
-                data.identifyValidDate.substring(6, 8);
-              ower2Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                data.identifyValidEndDate.substring(0, 4) +
-                "-" +
-                data.identifyValidEndDate.substring(4, 6) +
-                "-" +
-                data.identifyValidEndDate.substring(6, 8):''
-              ower2Form.value.age = getAgeByIdCard(data.identifyNumber)
-              ower2Form.value.gender = data.identifyIssuedCom
-              ower2Form.value.email = data.email
-              ower2Form.value.nation = data.nation
-              ower2Form.value.birthday = `${data.identifyNumber.substring(6, 10)}-${data.identifyNumber.substring(10, 12)}-${data.identifyNumber.substring(12, 14)}`
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(bbrFrontFile.value&&bbrBackFile.value) {
+        //
+        // }
+          const fileParams6 = new FormData()
+          fileParams6.append('image1', bbrFrontFile.value)
+          if(bbrBackFile.value) {
+              fileParams6.append('image2', bbrBackFile.value)
+          }
+          api.additionalApi.idCard(fileParams6).then((res: any) => {
+              if(res.code == 200) {
+                  const data = res.data.customerInfo
+                  ower2Form.value.name = data.name
+                  ower2Form.value.mobile = data.mobile
+                  ower2Form.value.addr = data.addr
+                  ower2Form.value.identifyNumber = data.identifyNumber
+                  ower2Form.value.identifyValidDate =
+                      data.identifyValidDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidDate.substring(6, 8);
+                  ower2Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
+                      data.identifyValidEndDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidEndDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidEndDate.substring(6, 8):''
+                  ower2Form.value.age = getAgeByIdCard(data.identifyNumber)
+                  ower2Form.value.gender = data.identifyIssuedCom
+                  ower2Form.value.email = data.email
+                  ower2Form.value.nation = data.nation
+                  ower2Form.value.birthday = `${data.identifyNumber.substring(6, 10)}-${data.identifyNumber.substring(10, 12)}-${data.identifyNumber.substring(12, 14)}`
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'bbrb':
         bbrBackResult.value = result
         bbrBack.value = result.downloadUrl
         bbrBackFile.value = files
-        if(bbrFrontFile.value&&bbrBackFile.value) {
-          const fileParams = new FormData()
-          fileParams.append('image1', bbrFrontFile.value)
-          fileParams.append('image2', bbrBackFile.value)
-          api.additionalApi.idCard(fileParams).then((res: any) => {
-            if(res.code == 200) {
-              const data = res.data.customerInfo
-              ower2Form.value.name = data.name
-              ower2Form.value.mobile = data.mobile
-              ower2Form.value.addr = data.addr
-              ower2Form.value.identifyNumber = data.identifyNumber
-              ower2Form.value.identifyValidDate =
-                data.identifyValidDate.substring(0, 4) +
-                "-" +
-                data.identifyValidDate.substring(4, 6) +
-                "-" +
-                data.identifyValidDate.substring(6, 8);
-              ower2Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
-                data.identifyValidEndDate.substring(0, 4) +
-                "-" +
-                data.identifyValidEndDate.substring(4, 6) +
-                "-" +
-                data.identifyValidEndDate.substring(6, 8): ''
-              ower2Form.value.age = getAgeByIdCard(data.identifyNumber)
-              ower2Form.value.gender = data.identifyIssuedCom
-              ower2Form.value.email = data.email
-              ower2Form.value.nation = data.nation
-              ower2Form.value.birthday = `${data.identifyNumber.substring(6, 10)}-${data.identifyNumber.substring(10, 12)}-${data.identifyNumber.substring(12, 14)}`
-            } else {
-              ElMessage({
-                message: res.msg,
-                type: 'warning'
-              })
-            }
+        // if(bbrFrontFile.value&&bbrBackFile.value) {
+        //
+        // }
+          const fileParams7 = new FormData()
+          if(bbrFrontFile.value) {
+              fileParams7.append('image1', bbrFrontFile.value)
+          }
+          fileParams7.append('image2', bbrBackFile.value)
+          api.additionalApi.idCard(fileParams7).then((res: any) => {
+              if(res.code == 200) {
+                  const data = res.data.customerInfo
+                  ower2Form.value.name = data.name
+                  ower2Form.value.mobile = data.mobile
+                  ower2Form.value.addr = data.addr
+                  ower2Form.value.identifyNumber = data.identifyNumber
+                  ower2Form.value.identifyValidDate =
+                      data.identifyValidDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidDate.substring(6, 8);
+                  ower2Form.value.identifyValidEndDate = data.identifyValidEndDate?data.identifyValidEndDate==='长期'?'9999-12-31':
+                      data.identifyValidEndDate.substring(0, 4) +
+                      "-" +
+                      data.identifyValidEndDate.substring(4, 6) +
+                      "-" +
+                      data.identifyValidEndDate.substring(6, 8): ''
+                  ower2Form.value.age = getAgeByIdCard(data.identifyNumber)
+                  ower2Form.value.gender = data.identifyIssuedCom
+                  ower2Form.value.email = data.email
+                  ower2Form.value.nation = data.nation
+                  ower2Form.value.birthday = `${data.identifyNumber.substring(6, 10)}-${data.identifyNumber.substring(10, 12)}-${data.identifyNumber.substring(12, 14)}`
+              } else {
+                  ElMessage({
+                      message: res.msg,
+                      type: 'warning'
+                  })
+              }
           })
-        }
         break;
       case 'bbryyzz':
         bbryyzzFrontResult.value = result

+ 1 - 1
src/views/operationManagement/channel.vue

@@ -45,7 +45,7 @@
             </template>
           </el-table-column>
           <el-table-column label="手机号" prop="mobile" width="150"></el-table-column>
-          <el-table-column label="工号" prop="userId" width="200"></el-table-column>
+          <el-table-column label="工号" prop="workNumber" width="200"></el-table-column>
           <el-table-column label="类型" prop="typeAttr" width="100">
             <template #default="scope">
               {{ scope.row.typeAttr == '1'?'个代':scope.row.typeAttr == '3'?'渠道':scope.row.typeAttr == '2'?'团队':scope.row.typeAttr == '4'?'电销组': '' }}

+ 2 - 2
src/views/operationManagement/modules/allocation.vue

@@ -76,7 +76,7 @@ const handleFilter = (e) => {
 let checkedKeys = ref([])
 let selectedIds = ref([])
 let selectType = ref('')
-const initCheckedKeys = (id, type, ids) => {
+const initCheckedKeys = (id, type, ids, leaderId) => {
   checkedKeys.value = [id]
   if(type == 'all') {
     selectedIds.value = []
@@ -85,7 +85,7 @@ const initCheckedKeys = (id, type, ids) => {
   }
   selectType.value = type
   initUser(id)
-  radioValue.value = ''
+  radioValue.value = leaderId?leaderId:''
 }
 
 // 搜索过滤

+ 2 - 2
src/views/operationManagement/operation.vue

@@ -109,7 +109,7 @@
       <el-table-column type="selection" width="55"></el-table-column>
       <el-table-column label="姓名" prop="name" width="80"></el-table-column>
       <el-table-column label="手机号" prop="mobile" width="150"></el-table-column>
-      <el-table-column label="工号" prop="userId" width="200"></el-table-column>
+      <el-table-column label="工号" prop="workNumber" width="200"></el-table-column>
       <el-table-column label="类型" prop="typeAttr" width="100">
         <template #default="scope">
           {{ scope.row.typeAttr == '1'?'个代':scope.row.typeAttr == '3'?'渠道':scope.row.typeAttr == '2'?'团队':scope.row.typeAttr == '4'?'电销组': '' }}
@@ -635,7 +635,7 @@ const tableDataCommand = (scope, e) => {
     case '分配管理人':
       allocationShow.value = true
       nextTick(() => {
-        AllocationRef.value.initCheckedKeys(scope.row.deptId, selectType.value, [scope.row.id])
+        AllocationRef.value.initCheckedKeys(scope.row.deptId, selectType.value, [scope.row.id], scope.row.leaderId)
       })
       break;
   }

+ 1 - 1
src/views/operationManagement/team.vue

@@ -45,7 +45,7 @@
             </template>
           </el-table-column>
           <el-table-column label="手机号" prop="mobile" width="150"></el-table-column>
-          <el-table-column label="工号" prop="userId" width="200"></el-table-column>
+          <el-table-column label="工号" prop="workNumber" width="200"></el-table-column>
           <el-table-column label="类型" prop="typeAttr" width="100">
             <template #default="scope">
               {{ scope.row.typeAttr == '1'?'个代':scope.row.typeAttr == '3'?'渠道':scope.row.typeAttr == '2'?'团队':scope.row.typeAttr == '4'?'电销组': '' }}

+ 1 - 1
src/views/operationManagement/telemarketing.vue

@@ -45,7 +45,7 @@
             </template>
           </el-table-column>
           <el-table-column label="手机号" prop="mobile" width="150"></el-table-column>
-          <el-table-column label="工号" prop="userId" width="200"></el-table-column>
+          <el-table-column label="工号" prop="workNumber" width="200"></el-table-column>
           <el-table-column label="类型" prop="typeAttr" width="100">
             <template #default="scope">
               {{ scope.row.typeAttr == '1'?'个代':scope.row.typeAttr == '3'?'渠道':scope.row.typeAttr == '2'?'团队':scope.row.typeAttr == '4'?'电销组': '' }}

+ 32 - 2
src/views/personnel/institutionManage.vue

@@ -46,7 +46,7 @@
               </el-button>
               <template #dropdown>
                 <el-dropdown-menu>
-                  <el-dropdown-item>删除</el-dropdown-item>
+                  <el-dropdown-item @click="betchDel">删除</el-dropdown-item>
                   <el-dropdown-item v-on:click="manySetDeptUser()">设置负责人</el-dropdown-item>
                 </el-dropdown-menu>
               </template>
@@ -87,6 +87,7 @@
     :dialogVisible="deptDialogVisible"
       :dept-list="tableData"
       :dept-ids="deptIdList"
+      :dept-selected = "deptSelected"
       :title="'设置负责人'"
       @close-dialog="confirmCharge"
       @cancel-dialog="deptDialogVisible=false"
@@ -123,12 +124,41 @@ const defaultProps = {
 //设置负责人弹框
 const deptDialogVisible=ref(false)
 const deptIdList=ref([])
+let deptSelected = ref('')
 function setDeptUser(item:any){
-
+  deptSelected.value = item.leaderId
   deptIdList.value=[item.id]
   deptDialogVisible.value=true
 }
 
+// 批量删除
+const betchDel = () => {
+    ElMessageBox({
+        title: '提示',
+        message: '确认要删除当前数据吗?',
+        confirmButtonText: "确认",
+        cancelButtonText: "取消",
+        type: "warning",
+        center:true
+    }).then((action) => {
+        if(action === 'confirm') {
+            api.institutionApi
+                .batchDeleteDept({
+                    deptIds: checkTableIdList.value,
+                })
+                .then((res) => {
+                    if(res.code == 200) {
+                        ElMessage.success("操作成功");
+                        getInstitutionList(); //机构列表
+                    }
+                });
+        }
+    })
+        .catch(() => {
+            ElMessage.warning("用户取消操作");
+        });
+}
+
 //批量设置负责人
 
 function manySetDeptUser(){

+ 140 - 47
src/views/personnel/modules/addOperation.vue

@@ -63,55 +63,85 @@
               </el-col>
             </el-row>
             <el-row :gutter="24">
-              <el-col :span="12">
-                <el-form-item prop="deptId" label="所属机构">
-                  <!-- <el-select v-model="operationForm.deptId" placeholder="请选择所属机构">
-                    <el-option key="1" value="机构1"></el-option>
-                  </el-select> -->
-                  <el-cascader
-                    clearable
-                    style="width: 100%"
-                    v-model="operationForm.deptId"
-                    :options="tableData"
-                    :props="tableProps"
-                    @change="deptChange"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item prop="identity" label="证件号">
-                  <el-input
-                    v-model.trim="operationForm.identity"
-                    placeholder="请填写身份证号"
-                  ></el-input>
-                </el-form-item>
-              </el-col>
+                <el-col :span="12">
+                    <el-form-item prop="isAddSalesman" label="同时添加为业务员">
+                        <el-select v-model="operationForm.isAddSalesman">
+                            <el-option label="是" value="1" key="1"></el-option>
+                            <el-option label="否" value="0" key="0"></el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                    <el-form-item prop="typeAttr" label="业务员类型">
+                        <el-select v-model="operationForm.typeAttr" placeholder="请选择业务员类型" @change="typeAttrChange">
+                            <el-option key="1" value="1" label="个代"></el-option>
+                            <el-option key="2" value="3" label="渠道"></el-option>
+                            <el-option key="3" value="2" label="团队"></el-option>
+                            <el-option key="4" value="4" label="电销组"></el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
             </el-row>
             <el-row :gutter="24">
-              <el-col :span="12">
-                <el-form-item prop="identityTimeStart" label="证件有效期始">
-                  <el-date-picker
-                    v-model="operationForm.identityTimeStart"
-                    type="date"
-                    placeholder="请选择"
-                    value-format="YYYY-MM-DD"
-                    :disabled-date="disabledDateStart"
-                    style="width: 100%"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item prop="identityTimeEnd" label="证件有效期止">
-                  <el-date-picker
-                    v-model="operationForm.identityTimeEnd"
-                    type="date"
-                    placeholder="请选择"
-                    value-format="YYYY-MM-DD"
-                    :disabled-date="disabledDateEnd"
-                    style="width: 100%"
-                  />
-                </el-form-item>
-              </el-col>
+                <el-col :span="12">
+                    <el-form-item prop="organizationId" label="所属团队" v-if="operationForm.typeAttr!='1'">
+                        <el-select v-model="operationForm.organizationId" placeholder="请选择所属团队" @change="handleDeptChange">
+                            <el-option v-for="item in teamList" :key="item.id" :value="item.id" :label="item.name"></el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                    <el-form-item prop="deptId" label="所属机构">
+                        <!-- <el-select v-model="operationForm.deptId" placeholder="请选择所属机构">
+                          <el-option key="1" value="机构1"></el-option>
+                        </el-select> -->
+                        <el-cascader
+                          :disabled="operationForm.typeAttr!='1'"
+                          clearable
+                          style="width: 100%"
+                          v-model="operationForm.deptId"
+                          :options="tableData"
+                          :props="tableProps"
+                          @change="deptChange"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row :gutter="24">
+                <el-col :span="12">
+                    <el-form-item prop="identity" label="证件号">
+                        <el-input
+                                v-model.trim="operationForm.identity"
+                                placeholder="请填写身份证号"
+                        ></el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                    <el-form-item prop="identityTimeStart" label="证件有效期始">
+                        <el-date-picker
+                                v-model="operationForm.identityTimeStart"
+                                type="date"
+                                placeholder="请选择"
+                                value-format="YYYY-MM-DD"
+                                :disabled-date="disabledDateStart"
+                                style="width: 100%"
+                        />
+                    </el-form-item>
+                </el-col>
+            </el-row>
+            <el-row :gutter="24">
+                <el-col :span="12">
+                    <el-form-item prop="identityTimeEnd" label="证件有效期止">
+                        <el-date-picker
+                                v-model="operationForm.identityTimeEnd"
+                                type="date"
+                                placeholder="请选择"
+                                value-format="YYYY-MM-DD"
+                                :disabled-date="disabledDateEnd"
+                                style="width: 100%"
+                        />
+                    </el-form-item>
+                </el-col>
             </el-row>
           </template>
         </el-descriptions-item>
@@ -951,6 +981,9 @@ let operationForm = ref<OperationFormProps>({
   salaryLevel: "",
   bankCardId: "",
   bankName: "",
+  isAddSalesman: '',
+  typeAttr: '',
+  organizationId: ''
 });
 // 添加/编辑业务员表单校验
 const operationRules = ref<FormRules>({
@@ -995,7 +1028,67 @@ const operationRules = ref<FormRules>({
   referrerNumber: [
     { required: true, trigger: "blur", message: "请填写推荐人工号" },
   ],
+  isAddSalesman: [
+      { required: true, trigger: "change", message: "请选择" }
+  ],
+  typeAttr: [
+      { required: true, trigger: "change", message: "请选择" }
+  ],
+  organizationId: [
+      { required: true, trigger: "change", message: "请选择" }
+  ],
 });
+
+const typeAttrChange = async (e) => {
+    operationForm.value.organization = ''
+    operationForm.value.leaderId = ''
+    operationForm.value.leaderNumber = ''
+    operationForm.value.referrerId = ''
+    operationForm.value.referrerNumber = ''
+    operationForm.value.organizationId = ''
+    if(e != '6') {
+        initTeamData(e==='5'?'1':e==='8'?'2':e==='7'?'3':'')
+    } else {
+        institutionList();
+    }
+}
+// 团队数据
+let teamList = ref([])
+const initTeamData = async (e) => {
+    const { code, data, msg } = await api.teamApi.teamList({
+        attribute: e,
+        param: ''
+    })
+    if(code == 200) {
+        teamList.value = data
+    } else {
+        ElMessage({
+            message: msg,
+            type: 'warning'
+        })
+    }
+}
+// 团队切换
+const handleDeptChange = (e) => {
+    const obj = teamList.value.find(item => item.id == e)
+    operationForm.value.organization = obj.deptName
+    operationForm.value.deptId = obj.deptId
+}
+// 获取机构数据
+let deptOption = ref([])
+const institutionList = () => {
+    api.institutionApi.institutionList({ name: '', system: '' }).then(res => {
+        if(res?.code == 200) {
+            deptOption.value = res.data
+        } else {
+            ElMessage({
+                message: res.msg,
+                type: 'warning'
+            })
+        }
+    })
+}
+
 // 身份证人像面
 let IDCardFrontName = ref("");
 let IDCardFront = ref("");

+ 2 - 2
src/views/personnel/modules/editInstitution.vue

@@ -103,9 +103,9 @@
             >
               <el-option
                 v-for="item in memberList"
-                :key="item.id"
+                :key="item.userId"
                 :label="item.name"
-                :value="item.id"
+                :value="item.userId"
               />
             </el-select>
           </el-form-item>

+ 1 - 0
src/views/quoteConfig/agreement/agreementCopy.vue

@@ -171,6 +171,7 @@ const detailsInfo = () => {
       agreementInfo.value = res.data.agreement;
       authDeptlength.value = res.data.dept.length;
     } else {
+
     }
   });
 }

+ 10 - 0
src/views/quoteConfig/agreement/agreementIndex.vue

@@ -30,6 +30,7 @@
           </el-dropdown>
         </template>
         <template v-slot:operation="scope">
+            <el-button type="primary" link @click="agreementEdit(scope.operationData.id)">编辑</el-button>
             <el-button type="primary" link @click="agreemenUpdate(scope.operationData)"> 详情
             </el-button>
           <el-dropdown placement="bottom-start" trigger="click">
@@ -339,6 +340,15 @@ function getUncheckedIds(data: any[]): string[] {
 
   return ids;
 }
+//编辑跳转
+const agreementEdit = (id) => {
+    router.push({
+        name: 'AgreementAdd',
+        query: {
+            id: id
+        }
+    })
+}
 
 function agreemenUpdate(item: any) {
   router.push({