소스 검색

8.17 11:46

Tartarus 2 년 전
부모
커밋
f468775019
4개의 변경된 파일118개의 추가작업 그리고 59개의 파일을 삭제
  1. 0 2
      src/views/contracts/addnewbill_bak.vue
  2. 38 24
      src/views/contracts/detail.vue
  3. 11 8
      src/views/contracts/index.vue
  4. 69 25
      src/views/supplierAcceptor/index.vue

+ 0 - 2
src/views/contracts/addnewbill_bak.vue

xqd
@@ -137,11 +137,9 @@
               v-for="val in acceptorName"
               :key="val"
               :label="val"
-
               :value="val"
               @click.native="getRate(index)"
             />
-
           </el-select>
         </el-form-item>
         <!-- 服务费率 -->

+ 38 - 24
src/views/contracts/detail.vue

xqd xqd xqd xqd
@@ -215,7 +215,7 @@
               v-if="contract.status != 0 && scope.row.draftStatus == 0"
               type="danger"
               style="margin-right: 15px; cursor: pointer"
-              @click="deleted(scope.row.id)"
+              @click="deleted(scope.row.id,scope.row.status)"
               >删除</el-tag
             >
           </template>
@@ -734,6 +734,7 @@
 					id
 				}) => id);
 				let status=Array.from(this.multipleSelection,({draftStatus})=>draftStatus)
+				let Auditstatus=Array.from(this.multipleSelection,({status})=>status)
 				if(status.includes(1)){
 					this.$message({
 						type:'error',
@@ -744,6 +745,11 @@
 						type:'error',
 						message:'请选择数据'
 					})
+				}else if(Auditstatus.includes(1)){
+					this.$message({
+						type:'error',
+						message:"不能删除审核状态为通过的汇票"
+					})
 				}else{
 					this.$request({
 						url: "/api/Contract/contractDraft/manager",
@@ -796,29 +802,37 @@
 					}
 				});
 			},
-			deleted(id) {
-				this.$request({
-					url: "/api/Contract/contractDraft/manager",
-					method: "post",
-					data: {
-						ids: [id],
-						operateType: 1,
-					},
-				}).then((res) => {
-					if (res.code === 200) {
-						this.$message({
-							type: "success",
-							message: res.msg,
-						});
-						this.getData();
-					} else {
-						this.$message({
-							type: "error",
-							message: "提交失败",
-						});
-						this.getData();
-					}
-				});
+			deleted(id,status) {
+				if(status===1){
+					this.$message({
+						type:'error',
+						message:"不能删除审核状态为通过的汇票"
+					})
+				}else{
+					this.$request({
+						url: "/api/Contract/contractDraft/manager",
+						method: "post",
+						data: {
+							ids: [id],
+							operateType: 1,
+						},
+					}).then((res) => {
+						if (res.code === 200) {
+							this.$message({
+								type: "success",
+								message: res.msg,
+							});
+							this.getData();
+						} else {
+							this.$message({
+								type: "error",
+								message: "提交失败",
+							});
+							this.getData();
+						}
+					});
+				}
+				
 			},
 			back() {
 				this.$router.go(-1);

+ 11 - 8
src/views/contracts/index.vue

xqd xqd
@@ -348,10 +348,13 @@ export default {
     this.checked = this.$store.state.user.checked;
 	
 	//显示合同状态为正常的数据
-	this.formData.contractStatus = 2;
-	this.currentPage = 1;
-	this.searchForm = { ...this.formData };
-	this.getData(this.searchForm);
+	// this.formData.contractStatus = 2;
+	// this.currentPage = 1;
+	// this.searchForm = { ...this.formData };
+	// this.getData(this.searchForm);
+	
+	// 获取所有数据
+	this.getData()
 	
     //是否显示供应商查询
     this.getSupplierName();
@@ -565,17 +568,17 @@ export default {
     deleted() {
 			const ids = Array.from(this.multipleSelection, ({ id }) => id);
 			let status=Array.from(this.multipleSelection,({contractStatus})=>contractStatus)
-			let draftStatus=Array.from(this.multipleSelection,({draftStatus})=>draftStatus)
-			console.log(draftStatus)
+			let Auditstatus=Array.from(this.multipleSelection,({status})=>status)
+			console.log(Auditstatus)
 			if(status.includes(1)){
 				this.$message({
 					type: 'error',
 					message: '不能删除合同状态已是删除状态的数据'
 				})
-			}else if(draftStatus.includes(2)){
+			}else if(Auditstatus.includes(1)){
 				this.$message({
 					type: 'error',
-					message: '不能删除汇票状态为成功的数据'
+					message: '不能删除合同审核状态为成功的数据'
 				})
 			}else if(ids==""){
 				this.$message({

+ 69 - 25
src/views/supplierAcceptor/index.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -38,7 +38,7 @@
 		<el-button type="primary" @click="successes" v-permission="['admin', 'salesman']">审核通过</el-button>
 		<el-button type="primary" @click="failed" v-permission="['admin', 'salesman']">审核不通过</el-button>
         <el-button type="danger" @click="deleteStatuses">删除</el-button>
-        <el-button type="primary" @click="dialogVisible2 = true"  v-permission="['supplier']"
+        <el-button type="primary" @click="getAcceptor"  v-permission="['supplier']"
           >新增承兑人</el-button
         >
         <el-button type="primary" @click="batchExports">导出</el-button>
@@ -50,7 +50,32 @@
 
     <!-- 弹窗新增承兑人 -->
     <el-dialog title="新增承兑人" :visible.sync="dialogVisible2" width="500px">
+		<!-- <el-card class="box-card">
+		  <div slot="header" class="clearfix">
+		    <span>卡片名称</span>
+		   <el-select v-model="form.select" filterable multiple  placeholder="请选择承兑人">
+		     <el-option
+		       v-for="item in acceptorList"
+		       :key="item.id"
+		       :label="item.name"
+		       :value="item.id"
+			   @change="getAcceptor"
+		     />
+		   </el-select>
+		  </div>
+		  
+		</el-card> -->
       <el-form ref="form" :model="form" label-width="100px">
+				<el-form-item label="承兑人">
+				  <el-select v-model="form.acceptorIds" filterable multiple  placeholder="请选择承兑人">
+				    <el-option
+				      v-for="item in acceptorList"
+				      :key="item.id"
+				      :label="item.name"
+				      :value="item.id"
+				    />
+				  </el-select>
+				</el-form-item>
         <el-form-item>
           <el-button @click="dialogVisible2 = false">取 消</el-button>
           <el-button type="primary" @click="addAcceptor">确认添加</el-button>
@@ -170,6 +195,7 @@
 <script>
 import { dataConversionUtil } from "../../utils/Excel.js";
 import { getSupplierAcceptor } from "@/api/supplierAcceptor";
+import { getAcceptorSearch } from "@/api/acceptor";
 export default {
   filters: {
     statusFilter(status) {
@@ -196,14 +222,12 @@ export default {
 		supplierId:"" ,//供应商ID
 		supplierName:'', //供应商名称
       },
+			//承兑人列表
+			acceptorList:'',
       // 新增承兑人数据
       form: {
-        name: "",
-        bankAccount: "",
-        bankNo: "",
-        bankName: "",
-        serviceRate: "",
-        interest: "",
+	   supplierId:'',
+	   acceptorIds:[],
       },
       /* 当前页数 */
       currentPage: 1,
@@ -258,11 +282,13 @@ export default {
     };
   },
   mounted() {
-		this.roleId=this.$store.state.user.userInfo.roleId;
-		console.log(this.roleId,"id")
+	this.roleId=this.$store.state.user.userInfo.roleId;
     this.checked = this.$store.state.user.checked;
 	// 获取供应商列表传递的供应商id
 	this.formData.supplierId=this.$route.params.id
+	// 获取供应商id
+	this.form.supplierId=this.$store.state.user.userInfo.id
+	
 	if(this.formData.supplierId==""){
 		this.getAllList()
 	}else{
@@ -290,9 +316,38 @@ export default {
         this.total = res.data.total;
       });
     },
-
+		
+		// 获取承兑人列表
+		getAcceptor(searchForm={}){
+			this.dialogVisible2=true
+			  const params = {
+			    pageIndex: this.currentPage,
+			    pageSize: this.pagesize,
+			  };
+			  getAcceptorSearch({
+			    ...params,
+			    ...searchForm,
+			  }).then((res) => {
+					this.acceptorList = res.data.result
+			  });
+			},
+		
+		
     addAcceptor() {
-
+		this.$request({
+			url:'/api/SupplierAcceptor',
+			method:'post',
+			data:this.form
+		}).then(res=>{
+			if(res.code===200){
+				this.$message({
+					type:'success',
+					message:"添加成功!"
+				})
+			}
+		})
+		this.dialogVisible2=false
+		this.getAllList()
     },
 
 	// 批量审核成功
@@ -438,17 +493,11 @@ export default {
 	// 批量删除
 	deleteStatuses(){
 		let ids=Array.from(this.multipleSelection,({id})=>id)
-		let status=Array.from(this.multipleSelection,({status})=>status)
 		if(ids==""){
 			this.$message({
 				type: 'error',
 				message: '请选择数据'
 			})
-		}else if(status.includes(1)){
-			this.$message({
-				type:'error',
-				message:'不能删除审核通过的数据'
-			})
 		}else{
 			this.$confirm('您确定要删除吗?','提示', {
 			          confirmButtonText: '确定',
@@ -487,13 +536,8 @@ export default {
 		
 	},
 	// 单个删除
-    deleteStatus(id,status) {
-	  if(status==1){
-		  this.$message({
-		    type: "error",
-		    message: "不能删除审核通过的数据",
-		  });
-	  }else{
+    deleteStatus(id) {
+	  
 		  this.$confirm('您确定要删除吗?','提示', {
 		            confirmButtonText: '确定',
 		  		  cancelButtonText: '取消',
@@ -525,7 +569,7 @@ export default {
 		  	}); 
 		  })
 		  
-	  }
+	  
      
     },
     /* 输入承兑人状态查询 */