Bladeren bron

团组合同修改

liuhj 3 maanden geleden
bovenliggende
commit
971d0d5773
2 gewijzigde bestanden met toevoegingen van 117 en 8 verwijderingen
  1. 65 3
      src/components/OP/OPgroup.vue
  2. 52 5
      src/components/OP/RequestAccess.vue

+ 65 - 3
src/components/OP/OPgroup.vue

@@ -1,10 +1,18 @@
 <template>
     <div v-loading="fullscreenLoading">
-        <el-dialog top="35vh" width="640px" title="文件下载" :visible.sync="contractVisible" :close-on-click-modal="false">
-            <el-button @click="DownGroupContractFile(hetonggroupId, 1)" type="primary">预付款80%合同</el-button>
+        <el-dialog top="35vh" width="578px" title="文件下载" :visible.sync="contractVisible" :close-on-click-modal="false">
+            <!-- <el-button @click="DownGroupContractFile(hetonggroupId, 1)" type="primary">预付款80%合同</el-button>
             <el-button @click="DownGroupContractFile(hetonggroupId, 2)" type="primary">团组结束后付款合同</el-button>
             <el-button @click="GroupQuotationsFileDown(hetonggroupId)" type="primary">报价单(收款单)</el-button>
-            <el-button @click="GroupQuotationsDetailFileDown(hetonggroupId)" type="primary">报价细项单</el-button>
+            <el-button @click="GroupQuotationsDetailFileDown(hetonggroupId)" type="primary">报价细项单</el-button> -->
+            <div class="group-htbtn">
+                <el-button v-if="Governmentsign" @click="DownGroupContractFile(hetonggroupId, 4)" type="primary">85%(政府团-预付款及尾款结算合同)</el-button>
+                <el-button v-if="Governmentsign" @click="DownGroupContractFile(hetonggroupId, 6)" type="primary">100%(政府团-出访前结算合同)</el-button>
+                <el-button v-if="Governmentsign" @click="DownGroupContractFile(hetonggroupId, 5)" type="primary">100%(政府团-归国后结算合同)</el-button>
+                <el-button v-if="Enterprisesign" @click="DownGroupContractFile(hetonggroupId, 3)" type="primary">100%(企业团-出访前结算合同)</el-button>
+                <el-button v-if="Conferencesign" @click="DownGroupContractConferenceFile(hetonggroupId, 1)" type="primary">100%(会务服务合同)</el-button>
+                <div style="text-align: center;"  v-if="!Governmentsign&&!Enterprisesign&&!Conferencesign">暂无合同下载</div>
+            </div>
         </el-dialog>
         <el-dialog top="35vh" width="400px" title="团组清单下载" :visible.sync="groupVisible" :close-on-click-modal="false">
             <el-date-picker style="width:100%;" v-model="downloadtime" type="daterange" align="right" unlink-panels
@@ -252,6 +260,10 @@ export default {
             notificationVisible:false,
             stepOperationTime:'',
             timeID:'',
+
+            Governmentsign:false,
+            Enterprisesign:false,
+            Conferencesign:false,
         }
     },
     activated() {
@@ -416,6 +428,36 @@ export default {
 
             })
         },
+        //合同下载
+        DownGroupContractConferenceFile(val, vals) {
+            var url = "/api/Groups/DownGroupContractConferenceFile"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data: {
+                    groupId: val,
+                    fileType: vals,
+                    userId: that.userid,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'success',
+                    });
+                    window.open(res.data.data.url);
+                    that.contractVisible = false;
+                } else {
+                    that.$message.error(res.data.msg);
+                    that.contractVisible = false;
+                }
+
+            })
+        },
         //报价word
         GroupQuotationsFileDown(val) {
             var url = "/api/Groups/GroupQuotationsFileDown"
@@ -554,6 +596,16 @@ export default {
             })
         },
         contracton(val) {
+            this.Governmentsign=false;
+            this.Enterprisesign=false;
+            this.Conferencesign=false;
+            if (val.teamType.includes("政府")) {
+                this.Governmentsign=true;
+            }else if(val.teamType.includes("企业")){
+                this.Enterprisesign=true;
+            }else if (val.teamType.includes("会务")) {
+                this.Conferencesign=true;
+            }
             this.hetonggroupId = 0;
             this.hetonggroupId = val.id;
             this.contractVisible = true
@@ -825,4 +877,14 @@ export default {
     text-align: right;
     margin-top: 30px;
 }
+.group-htbtn .el-button{
+    margin: 0;
+    margin-bottom: 10px;
+    width: 265px;
+}
+.group-htbtn{
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap;
+}
 </style>

+ 52 - 5
src/components/OP/RequestAccess.vue

@@ -84,7 +84,8 @@
                     <el-button type="primary" size="small" @click="InvitationAIFileGenerator">下载文件</el-button>
                     <!-- <el-button type="primary" size="small" @click="InvitationAIGenerateEmail">AI生成邮件</el-button> -->
                     <el-button type="primary" size="small" @click="InvitationAIGenerateEmailStream">AI生成邮件</el-button>
-                    <el-button type="primary" size="small" @click="InvitationAISeedEmail">发送邮件</el-button>
+                    <!-- <el-button type="primary" size="small" @click="InvitationAISeedEmail">发送邮件</el-button> -->
+                    <el-button type="primary" size="small" @click="InvitationAISeedEmailStream">发送邮件</el-button>
                 </div>
             </div>
         </div>
@@ -143,10 +144,11 @@
                                 <div>时间:{{ item.date }}</div>
                                 <div>内容:{{ item.description }}</div>
                                 <div>
-                                    链接:<el-link type="primary" :href="item.url" target="_blank">{{ item.url }}</el-link>
+                                    <div>链接:</div>
+                                    <el-link type="primary" :href="item.url" target="_blank">{{ item.url }}</el-link>
                                 </div>
                             </div>
-                            <el-button slot="reference" type="primary" @click="scope.row" size="mini">查看</el-button>
+                            <el-button slot="reference" type="primary" size="mini">查看</el-button>
                         </el-popover>
                         <div v-else>
                             暂无信息
@@ -254,7 +256,6 @@ export default {
         onEditorReady(editor) {},
         // 值发生变化
         onEditorChange(editor) {
-            console.log(editor);
             // this.contents = editor.text;
         },
 
@@ -626,6 +627,52 @@ export default {
                 }
             );
         },
+        //流式(发送邮件)
+        InvitationAISeedEmailStream() {
+            var guids=[];
+            for (let i = 0; i < this.multipleSelection.length; i++) {
+                guids.push(this.multipleSelection[i].guid);
+            }
+            if (guids.length==0) {
+                this.$message({
+                    type: 'error',
+                    message: '请选择需要发送的邮件!'
+                });
+                return;
+            }
+            this.RequestAccessLoading = true;
+            var url = "http://132.232.92.186:8888/api/Resource/InvitationAISeedEmailStream"
+            this.loadingtext = '';
+            var that = this
+            this.abortController = streamRequestPOST(
+                url,
+                {
+                    id: that.Id,
+                    currUserId: that.userid,
+                    guids:guids
+                },
+                (data) => {
+                    that.loadingtext = data.message;
+                    if (data.progress != -1) {
+                        if (data.progress === 100) {
+                            // that.RequestAccessLoading=false;
+                            that.$message({
+                                message: data.message,
+                                type: 'success',
+                            });
+                            that.loadingtext='正在加载';
+                            that.InvitationAIItemByName();
+                        }
+                    } else {
+                        that.RequestAccessLoading = false;
+                        that.$message({
+                            type: 'error',
+                            message: data.message
+                        });
+                    }
+                }
+            );
+        },
         //流式(AI重新搜索公务方/机构(续写))
         InvitationAICompleteTextStream() {
             this.RequestAccessLoading=true;
@@ -659,7 +706,7 @@ export default {
                     }
                  });
         },
-        //流式(生成邮件)
+        //AI重新搜索公务方/机构(覆盖)
         InvitationAISearchStreamProgress() {
             this.RequestAccessLoading = true;
             var url = "http://132.232.92.186:8888/api/Resource/InvitationAISearchStreamProgress"