diff --git a/src/views/purchase/cert/supCertSearch.vue b/src/views/purchase/cert/supCertSearch.vue index e163f010..9be69074 100644 --- a/src/views/purchase/cert/supCertSearch.vue +++ b/src/views/purchase/cert/supCertSearch.vue @@ -3,8 +3,8 @@ - - + + + + @@ -31,8 +97,8 @@ - + @row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"> + + - - + + + + @@ -117,8 +336,8 @@ - + highlight-current-row border @row-click="(row) => executeFuc(row,'0',tableObj2.handleChangeFuc)"> + + - - + + + + @@ -215,7 +588,7 @@ - + + { if (res.code === 20000) { //查询全部详情id @@ -652,24 +1126,24 @@ export default { let url = window.URL.createObjectURL( new Blob(binaryData, {type: "application/pdf"}) ); - this.loading = false; + _this.loading = false; window.open(url);//打开新标签页,预览pdf。 }) } }) } else { - this.loading = false; - this.$message.error(res.message); + _this.loading = false; + _this.$message.error(res.message); } }).catch((error) => { - this.loading = false; - this.$message.error(error.message); + _this.loading = false; + _this.$message.error(error.message); }) }, //生产企业打印 - printSupCertManufacturerPdf(row) { + printSupCertManufacturerPdf(_this,row) { let query = {id: 2}; - this.loading = true; + _this.loading = true; verifyTemplateFile(query).then((res) => { if (res.code === 20000) { //查询全部详情id @@ -693,25 +1167,25 @@ export default { let url = window.URL.createObjectURL( new Blob(binaryData, {type: "application/pdf"}) ); - this.loading = false; + _this.loading = false; window.open(url);//打开新标签页,预览pdf。 }) } }) } else { - this.loading = false; - this.$message.error(res.message); + _this.loading = false; + _this.$message.error(res.message); } }).catch((error) => { - this.loading = false; - this.$message.error(error.message); + _this.loading = false; + _this.$message.error(error.message); }) }, //生产产品打印 - printSupCertProductionPdf(row) { + printSupCertProductionPdf(_this,row) { let query = {id: 3}; - this.loading = true; + _this.loading = true; verifyTemplateFile(query).then((res) => { if (res.code === 20000) { //查询全部详情id @@ -736,20 +1210,29 @@ export default { let url = window.URL.createObjectURL( new Blob(binaryData, {type: "application/pdf"}) ); - this.loading = false; + _this.loading = false; window.open(url);//打开新标签页,预览pdf。 }) } }) } else { - this.loading = false; - this.$message.error(res.message); + _this.loading = false; + _this.$message.error(res.message); } }).catch((error) => { - this.loading = false; - this.$message.error(error.message); + _this.loading = false; + _this.$message.error(error.message); }) }, + executeFuc(row,type,clickFuc,value){ + return executeFuc(this,row,type,clickFuc,value); + }, + executeEval(row,expression,defaultRet){ + if(expression){ + return eval(expression); + } + return defaultRet; + } }, components: { @@ -760,7 +1243,28 @@ export default { mounted() { }, created() { - this.getList(); + getHead("supCertSearch-1","1").then((re) => { + // 处理返回的数据 + this.tableObj = re.data; + this.tableHeader = re.data.tableList; + this.queryList = re.data.queryList; + this.fromList = re.data.fromList; + this.getList(); + }); + getHead("supCertSearch-2","1").then((re) => { + // 处理返回的数据 + this.tableObj2 = re.data; + this.tableHeader2 = re.data.tableList; + this.queryList2 = re.data.queryList; + this.fromList2 = re.data.fromList; + }); + getHead("supCertSearch-3","1").then((re) => { + // 处理返回的数据 + this.tableObj3= re.data; + this.tableHeader3 = re.data.tableList; + this.queryList3 = re.data.queryList; + this.fromList3 = re.data.fromList; + }); }, };