Browse Source

协议上传状态查询接口20220519

mashengyi 2 years ago
parent
commit
cd7a762d21
1 changed files with 72 additions and 0 deletions
  1. 72 0
      src/views/customer/Customer.vue

+ 72 - 0
src/views/customer/Customer.vue

@@ -246,6 +246,17 @@
             </template>
           </el-table-column>
            <el-table-column
+            prop="contractStatus"
+            label="协议查询接口状态"
+            width="120"
+            show-overflow-tooltip>
+             <template slot-scope="scope">
+              <span v-if="scope.row.contractStatus == 1" style="color: red">协议上传失败</span>
+              <span v-else-if="scope.row.contractStatus == 2" style="color: blue">协议上传成功,审批中</span>
+              <span v-else-if="scope.row.contractStatus == 3" style="color: green">备案成功</span>
+            </template>
+          </el-table-column>
+           <el-table-column
             prop="interType"
             label="对接方式"
             show-overflow-tooltip>
@@ -337,6 +348,9 @@
           </el-row>
         </el-form>
         <div slot="footer" class="dialog-footer">
+          <el-button @click="contractStatusFail" type="danger">协议上传失败</el-button>
+          <el-button @click="contractStatusProcess" type="warning">协议上传成功,审批中</el-button>
+          <el-button @click="contractStatusSuccess" type="success">备案成功</el-button>
           <el-button @click="contractDownload" v-show="customerRec.lowerFileName" type="primary">下游文件下载</el-button>
           <el-button @click="contractAdd" type="primary">协议上传</el-button>
         </div>
@@ -1082,6 +1096,64 @@ import XLSX from "xlsx";
                     });
                   }
           },
+
+            async contractStatusFail(){
+              
+             const response = await this.$http.post(`customer/contractStatusFail`, this.customerRec);
+                  if(response.data.code === 0) {
+                    this.loadData();
+                    this.recInfoList(this.customerRec)
+                    this.changeStatus = false;
+                    this.$message({
+                      type: 'success',
+                      message: '协议上传失败状态操作完成'
+                    });
+                  }else {
+                    this.$message({
+                      type: 'error',
+                      message: '协议上传失败状态操作错误'+response.data.msg
+                    });
+                  }
+          },
+
+           async contractStatusProcess(){
+              
+             const response = await this.$http.post(`customer/contractStatusProcess`, this.customerRec);
+                  if(response.data.code === 0) {
+                    this.loadData();
+                    this.recInfoList(this.customerRec)
+                    this.changeStatus = false;
+                    this.$message({
+                      type: 'success',
+                      message: '协议上传成功,审批中状态操作完成'
+                    });
+                  }else {
+                    this.$message({
+                      type: 'error',
+                      message: '协议上传成功,审批中状态操作错误'+response.data.msg
+                    });
+                  }
+          },
+
+           async contractStatusSuccess(){
+              
+             const response = await this.$http.post(`customer/contractStatusSuccess`, this.customerRec);
+                  if(response.data.code === 0) {
+                    this.loadData();
+                    this.recInfoList(this.customerRec)
+                    this.changeStatus = false;
+                    this.$message({
+                      type: 'success',
+                      message: '备案成功状态操作完成'
+                    });
+                  }else {
+                    this.$message({
+                      type: 'error',
+                      message: '备案成功状态操作错误'+response.data.msg
+                    });
+                  }
+          },
+
           contractDownload(){
             const token = sessionStorage.getItem('token');
             window.open(hostUrl+'customer/contractDownload?customerRecId='+this.customerRec['id']+'&token='+token);