yrik 4 lat temu
rodzic
commit
adb7ed4c8e
1 zmienionych plików z 71 dodań i 63 usunięć
  1. 71 63
      ruoyi-ui/src/views/under/index.vue

+ 71 - 63
ruoyi-ui/src/views/under/index.vue

@@ -165,58 +165,17 @@
         <div class="nvestor">
           <p>引荐方 <i>*</i></p>
         </div>
-        <div
-          v-for="(item, index) in queryParams.referralList"
-          :key="index"
-          v-if="queryParams.referralList !== null"
-        >
-          <el-form-item label="引荐单位:" prop="sysDeptIdse">
-            <el-cascader
-                v-model="valuess"
-                :options="typeOptionstwoss"
-                @change="handleChangess"></el-cascader>
-          </el-form-item>
-          <el-form-item label="投资分配额:" prop="investmentAllcocation">
-            <el-input
-              v-model.number="item.investmentAllcocation"
-              placeholder="输入数字"
-              clearable
-              size="small"
-              style="width: 98px"
-              @keyup.enter.native="handleQuery"
-            />
-            <span class="souu">%</span>
-          </el-form-item>
-          <el-form-item label="引荐方联系人:" prop="referral">
-            <el-input
-              v-model="item.referral"
-              placeholder="请输入"
-              clearable
-              size="small"
-              style="width: 98px"
-              @keyup.enter.native="handleQuery"
-            />
-          </el-form-item>
 
-          <el-form-item label="引荐方联系方式:" prop="referralPhone">
-            <el-input
-              v-model="item.referralPhone"
-              placeholder="请输入联系方式"
-              clearable
-              size="small"
-              style="width: 153px"
-              @keyup.enter.native="handleQuery"
-            />
-          </el-form-item>
-        </div>
-        <div v-if="queryParams.referralList == null">
-          <el-form-item label="引荐单位:" prop="sysDeptIdrt">
+        <!-- <div v-if="queryParams.referralList == null" > -->
+          <el-form-item label="引荐单位:" prop="sysDeptId">
             <el-cascader
+               v-model="queryParams.referralList[0].sysDeptId"
                :show-all-levels="false"
                :options="typeOptionstwo"
+               @change="handleChange"
                 ></el-cascader>
           </el-form-item>
-          <el-form-item label="投资分配额:" prop="investmentAllcocation">
+          <el-form-item label="投资分配额:" class="fenpe" prop="investmentAllcocation">
             <el-input
               v-model="queryParams.referralList[0].investmentAllcocation"
               placeholder="输入数字"
@@ -250,12 +209,14 @@
           </el-form-item>
           <el-form-item label="引荐单位:" prop="sysDeptId">
             <el-cascader
+                :show-all-levels = "false"
+                v-model="queryParams.referralList[1].sysDeptId"
                 :options="typeOptionstwo"
                 @change="handleChangete"></el-cascader>
           </el-form-item>
-          <el-form-item label="投资分配额:" prop="investmentAllcocation">
+          <el-form-item label="投资分配额:" class="fenpe" prop="investmentAllcocation">
             <el-input
-              v-model="queryParams.referralList[0].investmentAllcocation"
+              v-model="queryParams.referralList[1].investmentAllcocation"
               placeholder="输入数字"
               clearable
               size="small"
@@ -264,9 +225,9 @@
             />
             <span class="souu">%</span>
           </el-form-item>
-          <el-form-item label="引荐方联系人:" prop="referral">
+          <el-form-item label="引荐方联系人:" prop="referral" >
             <el-input
-              v-model="queryParams.referralList[0].referral"
+              v-model="queryParams.referralList[1].referral"
               placeholder="请输入"
               clearable
               size="small"
@@ -285,7 +246,7 @@
               @keyup.enter.native="handleQuery"
             />
           </el-form-item>
-        </div>
+        <!-- </div> -->
         <div class="nvestor">
           <p>项目基本信息 <i>*</i></p>
         </div>
@@ -315,6 +276,7 @@
         </el-form-item>
         <div class="lage_div">
           <span>项目主营产品</span>
+        </div>
           <el-form-item label="产品名称:" prop="productName" class="maneg_lar">
             <el-input
               v-model="queryParams.productName"
@@ -325,7 +287,7 @@
               @keyup.enter.native="handleQuery"
             />
           </el-form-item>
-        </div>
+        <!-- </div> -->
         <el-form-item
           label="设计产能:"
           prop="productQty"
@@ -873,13 +835,18 @@ export default {
     console.log(this.queryParams);
   },
   methods: {
-    handleChange(){
-
+    handleChange(value){
+      //0
+      this.queryParams.referralList[0].sysDeptId = value.pop()
+      console.log(value)
     },
-    handleChangete(){
-
+    handleChangete(value){
+      this.queryParams.referralList[1].sysDeptId = value.pop()
+      //1
+    console.log(value)
     },
-    handleChangess(){
+    handleChangess(value){
+     console.log(value)
 
     },
     //审核
@@ -1012,17 +979,38 @@ export default {
 
             // }
           }
+          if(this.queryParams.referralList.length ==1){
+            this.queryParams.referralList = [
+              {
+                bmProjectId: this.bmProjectId,
+                sysDeptId: response.data.referralList[0].sysDeptId,
+                investmentAllcocation: response.data.referralList[0].investmentAllcocation,
+                referral: response.data.referralList[0].referral,
+                referralPhone: response.data.referralList[0].referralPhone,
+              },
+              {
+                bmProjectId: this.bmProjectId,
+                sysDeptId: "",
+                investmentAllcocation: "",
+                referral: "",
+                referralPhone: "",
+              },
+            ];
+          }
           // this.queryParams.phone = 987
           console.log(this.queryParams, 98755);
           // this.queryParams = this.queryParams.bmProjectId
           this.fileListhye = []
-          this.fileListhye = this.queryParams.attachment.split(",");
-          for (var i = 0; i < this.fileListhye.length; i++) {
-            this.fileList.push({
-              name: this.fileListhye[i],
-              url: this.fileListhye[i],
-            });
+          if(this.queryParams.attachment !== null){
+            this.fileListhye = this.queryParams.attachment.split(",");
+            for (var i = 0; i < this.fileListhye.length; i++) {
+              this.fileList.push({
+                name: this.fileListhye[i],
+                url: this.fileListhye[i],
+              });
+            }
           }
+
           // this.fileList.push({name:this.queryParams.attachment,url:this.queryParams.attachment})
         }
 
@@ -1239,6 +1227,8 @@ export default {
     },
     // 暂存接口
     emporary() {
+      console.log(this.queryParams)
+
       this.$refs["queryParams"].validate((valid) => {
         if (valid) {
           if (this.sbuen == 1) {
@@ -1249,6 +1239,13 @@ export default {
               this.$router.go(-1);
             });
           } else {
+              // if(this.queryParams.referralList[0].sysDeptId !== ''){
+              //   this.queryParams.referralList[0].sysDeptId = this.queryParams.referralList[0].sysDeptId.pop()
+              //   console.log(this.queryParams.referralList[0].sysDeptId)
+              // }
+              // if(this.queryParams.referralList[1].sysDeptId !== ''){
+              //   this.queryParams.referralList[1].sysDeptId = this.queryParams.referralList[1].sysDeptId.pop()
+              // }
             // this.queryParams.bmProjectId = this.bmProjectId
             console.log(this.queryParams, 87);
             addConfigalking(this.queryParams).then((response) => {
@@ -1356,6 +1353,7 @@ export default {
   }
 }
 .manager_form {
+  margin-top: 30px;
   .manager_lab {
     .el-form-item__label {
       width: 145px !important;
@@ -1399,11 +1397,21 @@ export default {
       width: 140px !important;
     }
   }
+  .yijeu{
+    .el-form-item__label {
+      width: 90px !important;
+    }
+  }
   .maget_tyty {
     .el-form-item__label {
       width: 140px !important;
     }
   }
+  .fenpe{
+    .el-form-item__label {
+      width: 90px !important;
+    }
+  }
   .forieu {
     border: 1px solid #dcdfe6;
     border-radius: 4px;