12 |
- "use strict";(self["webpackChunkscproject"]=self["webpackChunkscproject"]||[]).push([[614],{66052:function(e,l,t){t.r(l),t.d(l,{default:function(){return d}});var a=function(){var e=this,l=e._self._c;return l("div",[e._m(0),l("hr"),l("div",{staticClass:"Apply1"},[l("div",{staticClass:"inpInterval"},[e._v("活动名称")]),l("el-select",{staticStyle:{width:"30%"},attrs:{placeholder:"请选择"},model:{value:e.projectName,callback:function(l){e.projectName=l},expression:"projectName"}},e._l(e.projectFilter,(function(e){return l("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})})),1)],1),e._m(1),l("hr"),l("table",{staticClass:"table",attrs:{border:"1",cellspacing:"0"}},[e._m(2),e._l(e.fundList,(function(t,a){return l("tr",{key:a},[l("td",{attrs:{colspan:"2"}},[e._v(e._s(t.fundName))]),l("td",[e._v(" "+e._s(t.budget)+" ")]),l("td",[e._v(" "+e._s(t.havePaid)+" ")]),l("td",{staticStyle:{"background-color":"rgb(234, 252, 186)"}},[l("el-input",{staticStyle:{width:"100%"},attrs:{type:"number",autosize:"",resize:"none",onkeypress:"return (/[\\d]/.test(String.fromCharCode(event.keyCode)))",placeholder:"请填写金额(元)"},model:{value:t.thisApply,callback:function(l){e.$set(t,"thisApply",l)},expression:"item.thisApply"}})],1),l("td",[e._v(" "+e._s(t.budget-t.havePaid-t.thisApply)+" ")]),l("td",{staticStyle:{"box-sizing":"border-box",padding:"0 10px"},attrs:{colspan:"3"}},[e._v(" "+e._s(t.remark)+" ")])])})),l("tr",[l("td",[e._v("事由")]),l("td",{staticClass:"textLeft",attrs:{colspan:"10"}},[l("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autosize:{minRows:6,maxRows:20},resize:"none",placeholder:"请输入事由"},model:{value:e.intro,callback:function(l){e.intro=l},expression:"intro"}})],1)]),l("tr",e._l(9,(function(e,t){return l("td",{key:t,staticStyle:{border:"none"}})})),0)],2),l("div",{staticClass:"baseBtn"},[l("div",{staticClass:"blockWidth"},[l("el-button",{attrs:{type:"primary"},on:{click:e.download}},[e._v("生成表单")]),l("el-button",{attrs:{type:"primary"},on:{click:e.submitData}},[e._v("提交")])],1)]),l("el-dialog",{staticClass:"pageSubmitData",attrs:{title:"生成Excel",visible:e.downLoadExcelDig,width:"600px"},on:{"update:visible":function(l){e.downLoadExcelDig=l}}},[l("span",{staticClass:"deleteContent"},[e._v("确定生成Excel?")]),l("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[l("el-button",{staticClass:"AllDialogBtn",attrs:{type:"primary"},on:{click:e.downLoadExcel}},[e._v("确认")]),l("el-button",{staticClass:"AllDialogBtn",on:{click:function(l){e.downLoadExcelDig=!1}}},[e._v("取消")])],1)]),l("el-dialog",{staticClass:"pageSubmitData",attrs:{title:"提交",visible:e.submitDataDig,width:"600px"},on:{"update:visible":function(l){e.submitDataDig=l}}},[l("span",{staticClass:"deleteContent"},[e._v("确定提交?")]),l("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[l("el-button",{staticClass:"AllDialogBtn",attrs:{type:"primary"},on:{click:e.submitAll}},[e._v("确认")]),l("el-button",{staticClass:"AllDialogBtn",on:{click:function(l){e.submitDataDig=!1}}},[e._v("取消")])],1)])],1)},s=[function(){var e=this,l=e._self._c;return l("div",{staticClass:"pAHeader"},[l("div",{staticClass:"pAHeader1"},[e._v("个人创客资金申请")])])},function(){var e=this,l=e._self._c;return l("div",{staticClass:"tabTit"},[l("div",[l("p",[e._v("经费支出类别(单位:元)")])])])},function(){var e=this,l=e._self._c;return l("tr",[l("td",{attrs:{colspan:"2"}},[e._v("经济支出类别")]),l("td",[e._v("预算")]),l("td",[e._v("已支付")]),l("td",[e._v("本次申请")]),l("td",[e._v("余额")]),l("td",{attrs:{colspan:"3"}},[e._v("备注")])])}],u=(t(57658),t(16079)),i=t(11057),C=t(42851),r={components:{BeUpload:i.Z},data(){return{projectFilter:[],projectName:"",downLoadExcelDig:!1,submitDataDig:!1,allFund:"",fundList:[{fundName:"小型仪器设备费",budget:"",havePaid:0,thisApply:"",remark:"项目开展所需的小型专用仪器设备、工具、配件购置或租赁费用。"},{fundName:"材料费",budget:"",havePaid:0,thisApply:"",remark:"项目开展需消耗的各种原材料、辅助材料等低值易耗品的采购费用。"},{fundName:"测试化验加工费",budget:"",havePaid:0,thisApply:"",remark:"项目开展过程中支付给外单位的检验、测试、化验、计算、分析及加工费等费用。"},{fundName:"项目协作费",budget:"",havePaid:0,thisApply:"",remark:"按合同规定支付给协作单位的费用"},{fundName:"项目成功鉴定费",budget:"",havePaid:0,thisApply:"",remark:"学术会务费、评审费、鉴定费、成果集制作费等费用。"},{fundName:"参展参赛费",budget:"",havePaid:0,thisApply:"",remark:"参加创客展会、竞赛等所需的报名费、展位费、布展费、宣传推广费及差旅费等费用。"},{fundName:"创客交流活动费",budget:"",havePaid:0,thisApply:"",remark:"创客交流活动中支付给校外专家的指导费、咨询费、授课费等费用。"},{fundName:"知识产权事务费",budget:"",havePaid:0,thisApply:"",remark:"论文版面费、专利及其他知识产权事务等费用。"}],intro:"",tit:"",ty:""}},methods:{getData(){let e={uid:this.$store.state.userInfo.userid,type:1};this.ajax.get(this.$store.state.api+"/SelectMakerFundSelects",e).then((e=>{let l=e.data[0];this.projectFilter=l}),(e=>{console.log(e)}))},getFundData(){let e={uid:this.$store.state.userInfo.userid,aid:this.projectName};this.ajax.get(this.$store.state.api+"/selectMarkerFundData",e).then((e=>{console.log(e.data);let l=JSON.parse(e.data[0][0]["fund"]);this.fundList[0].budget=l.device,this.fundList[1].budget=l.Material,this.fundList[2].budget=l.processing,this.fundList[3].budget=l.Collaboration,this.fundList[4].budget=l.APPRAISAL,this.fundList[5].budget=l.entery,this.fundList[6].budget=l.activities,this.fundList[7].budget=l.Transaction,this.tit=e.data[0][0].title,this.ty=e.data[0][0].type,this.fundList.forEach((e=>{e.havePaid=0})),e["data"][1].filter((e=>{null==e.actualuse&&(e.actualuse=e.applyfund)}));let t=e["data"][1].filter((e=>null!=e.actualuse));t&&t.forEach((e=>{let l=JSON.parse(e["actualuse"]);this.fundList[0]["havePaid"]+=Number(l["device"]),this.fundList[1]["havePaid"]+=Number(l["Material"]),this.fundList[2]["havePaid"]+=Number(l["processing"]),this.fundList[3]["havePaid"]+=Number(l["Collaboration"]),this.fundList[4]["havePaid"]+=Number(l["APPRAISAL"]),this.fundList[5]["havePaid"]+=Number(l["entery"]),this.fundList[6]["havePaid"]+=Number(l["activities"]),this.fundList[7]["havePaid"]+=Number(l["Transaction"])})),this.allFund=e.data[0][0]["money"]}),(e=>{console.log(e)}))},download(){if(!this.projectName)return this.$message.error("请选择活动名称");let e=this.fundList.filter((e=>""==e.thisApply));if(8==e.length)return this.$message.error("请填写本次申请金额");this.downLoadExcelDig=!0},downLoadExcel(){(0,C.A)(this.fundList,this.intro,this.tit,this.ty),this.downLoadExcelDig=!1},submitData(){if(!this.projectName)return this.$message.error("请选择活动名称");let e=this.fundList.filter((e=>""==e.thisApply));if(8==e.length)return this.$message.error("请填写本次申请金额");let l=[this.fundList[0].thisApply,this.fundList[1].thisApply,this.fundList[2].thisApply,this.fundList[3].thisApply,this.fundList[4].thisApply,this.fundList[5].thisApply,this.fundList[6].thisApply,this.fundList[7].thisApply],t=[this.fundList[0].havePaid,this.fundList[1].havePaid,this.fundList[2].havePaid,this.fundList[3].havePaid,this.fundList[4].havePaid,this.fundList[5].havePaid,this.fundList[6].havePaid,this.fundList[7].havePaid],a=l.reduce(((e,l,t,a)=>e+1*l),0),s=t.reduce(((e,l,t,a)=>e+1*l),0);if(a+s>this.allFund)return this.$message.error("申请金额已大于预算");this.submitDataDig=!0},submitAll(){(0,u.Z)("ZJ").then((e=>{let l={uid:this.$store.state.userInfo.userid,aid:this.projectName,fNo:e,intro:this.intro,f:JSON.stringify({device:this.fundList[0].thisApply,Material:this.fundList[1].thisApply,processing:this.fundList[2].thisApply,Collaboration:this.fundList[3].thisApply,APPRAISAL:this.fundList[4].thisApply,entery:this.fundList[5].thisApply,activities:this.fundList[6].thisApply,Transaction:this.fundList[7].thisApply})};this.ajax.post(this.$store.state.api+"/insertFundApply",l).then((e=>{console.log(e),1==e.data?(this.$message.success("提交成功"),this.submitDataDig=!1,this.$router.push("/makerfund")):this.$message.error("提交失败")}),(e=>{console.log(e)}))}))}},watch:{projectName:{handler(){this.getFundData()}}},mounted(){this.getData()}},g=r,o=t(43736),n=(0,o.Z)(g,a,s,!1,null,"e7decea0",null),d=n.exports},42851:function(e,l,t){t.d(l,{A:function(){return g},G:function(){return o}});t(99611);var a=t(24973),s=t.n(a),u=t(66154),i=t.n(u),C=t(750),r=t.n(C);t(41401);function g(e,l,t,a){r().getBinaryContent("file/学校创客专项资金使用申请表 (1).xlsx",((u,C)=>{if(u)return void console.error(u);const r=new(s().Workbook);r.xlsx.load(C).then((()=>{let s=r.getWorksheet(1);return s.getCell("G2").value=`项目类型: 个人创客 ${1==a?"√":"□"} 创客活动 ${0==a?"√":"□"} `,s.getCell("G3").value=`项目名称:${t}`,s.getCell("C7").value=e[0].budget,s.getCell("D7").value=e[0].havePaid,s.getCell("E7").value=e[0].thisApply,s.getCell("G7").value=e[0].remark,s.getCell("C8").value=e[1].budget,s.getCell("D8").value=e[1].havePaid,s.getCell("E8").value=e[1].thisApply,s.getCell("G8").value=e[1].remark,s.getCell("C9").value=e[2].budget,s.getCell("D9").value=e[2].havePaid,s.getCell("E9").value=e[2].thisApply,s.getCell("G9").value=e[2].remark,s.getCell("C10").value=e[3].budget,s.getCell("D10").value=e[3].havePaid,s.getCell("E10").value=e[3].thisApply,s.getCell("G10").value=e[3].remark,s.getCell("C13").value=e[4].budget,s.getCell("D13").value=e[4].havePaid,s.getCell("E13").value=e[4].thisApply,s.getCell("G13").value=e[4].remark,s.getCell("C14").value=e[5].budget,s.getCell("D14").value=e[5].havePaid,s.getCell("E14").value=e[5].thisApply,s.getCell("G14").value=e[5].remark,s.getCell("C15").value=e[6].budget,s.getCell("D15").value=e[6].havePaid,s.getCell("E15").value=e[6].thisApply,s.getCell("G15").value=e[6].remark,s.getCell("C16").value=e[7].budget,s.getCell("D16").value=e[7].havePaid,s.getCell("E16").value=e[7].thisApply,s.getCell("G16").value=e[7].remark,s.getCell("B18").value=l,s.getCell("B18").alignment={vertical:"top",horizontal:"left"},s.getCell("F7").value={formula:"C7-D7-E7",result:s.getCell("C7")-s.getCell("D7")-s.getCell("E7")},s.getCell("F8").value={formula:"C8-D8-E8",result:s.getCell("C8")-s.getCell("D8")-s.getCell("E8")},s.getCell("F9").value={formula:"C9-D9-E9",result:s.getCell("C9")-s.getCell("D9")-s.getCell("E9")},s.getCell("F10").value={formula:"C10-D10-E10",result:s.getCell("C10")-s.getCell("D10")-s.getCell("E10")},s.getCell("F11").value={formula:"C11-D11-E11",result:s.getCell("C11")-s.getCell("D11")-s.getCell("E11")},s.getCell("C6").value={formula:"SUM(C7:C11)",result:1*s.getCell("C7")+1*s.getCell("C8")+1*s.getCell("C9")+1*s.getCell("C10")+1*s.getCell("C11")},s.getCell("D6").value={formula:"SUM(D7:D11)",result:1*s.getCell("D7")+1*s.getCell("D8")+1*s.getCell("D9")+1*s.getCell("D10")+1*s.getCell("D11")},s.getCell("E6").value={formula:"SUM(E7:E11)",result:1*s.getCell("E7")+1*s.getCell("E8")+1*s.getCell("E9")+1*s.getCell("E10")+1*s.getCell("E11")},s.getCell("F6").value={formula:"C6-D6-E6",result:1*s.getCell("C6")-1*s.getCell("D6")-1*s.getCell("E6")},s.getCell("F13").value={formula:"C13-D13-E13",result:s.getCell("C13")-s.getCell("D13")-s.getCell("E13")},s.getCell("F14").value={formula:"C14-D14-E14",result:s.getCell("C14")-s.getCell("D14")-s.getCell("E14")},s.getCell("F15").value={formula:"C15-D15-E15",result:s.getCell("C15")-s.getCell("D15")-s.getCell("E15")},s.getCell("F16").value={formula:"C16-D16-E16",result:s.getCell("C16")-s.getCell("D16")-s.getCell("E16")},s.getCell("F17").value={formula:"C17-D17-E17",result:s.getCell("C17")-s.getCell("D17")-s.getCell("E17")},s.getCell("C12").value={formula:"SUM(C13:C17)",result:1*s.getCell("C13")+1*s.getCell("C14")+1*s.getCell("C15")+1*s.getCell("C16")+1*s.getCell("C17")},s.getCell("D12").value={formula:"SUM(D13:D17)",result:1*s.getCell("D13")+1*s.getCell("D14")+1*s.getCell("D15")+1*s.getCell("D16")+1*s.getCell("D17")},s.getCell("E12").value={formula:"SUM(E13:E17)",result:1*s.getCell("E13")+1*s.getCell("E14")+1*s.getCell("E15")+1*s.getCell("E16")+1*s.getCell("E17")},s.getCell("F12").value={formula:"C12-D12-E12",result:1*s.getCell("C12")-1*s.getCell("D12")-1*s.getCell("E12")},s.getCell("C5").value={formula:"SUM(C6+C12)",result:1*s.getCell("C6")+1*s.getCell("C12")},s.getCell("D5").value={formula:"SUM(D6+D12)",result:1*s.getCell("D6")+1*s.getCell("D12")},s.getCell("E5").value={formula:"SUM(E6+E12)",result:1*s.getCell("E6")+1*s.getCell("E12")},s.getCell("F5").value={formula:"SUM(F6+F12)",result:1*s.getCell("F6")+1*s.getCell("F12")},r.xlsx.writeBuffer()})).then((e=>{const l=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});i().saveAs(l,"学校创客专项资金使用申请表.xlsx")}))}))}function o(e,l,t,a){r().getBinaryContent("file/附件 5 :学校创客专项资金使用申请表.xlsx",((u,C)=>{if(u)return void console.error(u);const r=new(s().Workbook);r.xlsx.load(C).then((()=>{let s=r.getWorksheet(1);return s.getCell("G2").value=`项目类型: 个人创客 ${1==a?"√":"□"} 创客活动 ${0==a?"√":"□"} `,s.getCell("G3").value=`项目名称:${t}`,s.getCell("C7").value=e[0].budget,s.getCell("D7").value=e[0].havePaid,s.getCell("E7").value=e[0].thisApply,s.getCell("F7").value=e[0].actualuse,s.getCell("H7").value=e[0].remark,s.getCell("C8").value=e[1].budget,s.getCell("D8").value=e[1].havePaid,s.getCell("E8").value=e[1].thisApply,s.getCell("F8").value=e[1].actualuse,s.getCell("H8").value=e[1].remark,s.getCell("C9").value=e[2].budget,s.getCell("D9").value=e[2].havePaid,s.getCell("E9").value=e[2].thisApply,s.getCell("F9").value=e[2].actualuse,s.getCell("H9").value=e[2].remark,s.getCell("C10").value=e[3].budget,s.getCell("D10").value=e[3].havePaid,s.getCell("E10").value=e[3].thisApply,s.getCell("F10").value=e[3].actualuse,s.getCell("H10").value=e[3].remark,s.getCell("C13").value=e[4].budget,s.getCell("D13").value=e[4].havePaid,s.getCell("E13").value=e[4].thisApply,s.getCell("F13").value=e[4].actualuse,s.getCell("H13").value=e[4].remark,s.getCell("C14").value=e[5].budget,s.getCell("D14").value=e[5].havePaid,s.getCell("E14").value=e[5].thisApply,s.getCell("F14").value=e[5].actualuse,s.getCell("H14").value=e[5].remark,s.getCell("C15").value=e[6].budget,s.getCell("D15").value=e[6].havePaid,s.getCell("E15").value=e[6].thisApply,s.getCell("F15").value=e[6].actualuse,s.getCell("H15").value=e[6].remark,s.getCell("C16").value=e[7].budget,s.getCell("D16").value=e[7].havePaid,s.getCell("E16").value=e[7].thisApply,s.getCell("F16").value=e[7].actualuse,s.getCell("H16").value=e[7].remark,s.getCell("B18").value=l,s.getCell("B18").alignment={vertical:"top",horizontal:"left"},s.getCell("G7").value={formula:"C7-D7-F7",result:s.getCell("C7")-s.getCell("D7")-s.getCell("F7")},s.getCell("G8").value={formula:"C8-D8-F8",result:s.getCell("C8")-s.getCell("D8")-s.getCell("F8")},s.getCell("G9").value={formula:"C9-D9-F9",result:s.getCell("C9")-s.getCell("D9")-s.getCell("F9")},s.getCell("G10").value={formula:"C10-D10-F10",result:s.getCell("C10")-s.getCell("D10")-s.getCell("F10")},s.getCell("G11").value={formula:"C11-D11-F11",result:s.getCell("C11")-s.getCell("D11")-s.getCell("F11")},s.getCell("C6").value={formula:"SUM(C7:C11)",result:1*s.getCell("C7")+1*s.getCell("C8")+1*s.getCell("C9")+1*s.getCell("C10")+1*s.getCell("C11")},s.getCell("D6").value={formula:"SUM(D7:D11)",result:1*s.getCell("D7")+1*s.getCell("D8")+1*s.getCell("D9")+1*s.getCell("D10")+1*s.getCell("D11")},s.getCell("E6").value={formula:"SUM(E7:E11)",result:1*s.getCell("E7")+1*s.getCell("E8")+1*s.getCell("E9")+1*s.getCell("E10")+1*s.getCell("E11")},s.getCell("F6").value={formula:"SUM(F7:F11)",result:1*s.getCell("F7")+1*s.getCell("F8")+1*s.getCell("F9")+1*s.getCell("F10")+1*s.getCell("F11")},s.getCell("G6").value={formula:"C6-D6-F6",result:1*s.getCell("C6")-1*s.getCell("D6")-1*s.getCell("F6")},s.getCell("G13").value={formula:"C13-D13-F13",result:s.getCell("C13")-s.getCell("D13")-s.getCell("F13")},s.getCell("G14").value={formula:"C14-D14-F14",result:s.getCell("C14")-s.getCell("D14")-s.getCell("F14")},s.getCell("G15").value={formula:"C15-D15-F15",result:s.getCell("C15")-s.getCell("D15")-s.getCell("F15")},s.getCell("G16").value={formula:"C16-D16-F16",result:s.getCell("C16")-s.getCell("D16")-s.getCell("F16")},s.getCell("G17").value={formula:"C17-D17-F17",result:s.getCell("C17")-s.getCell("D17")-s.getCell("F17")},s.getCell("C12").value={formula:"SUM(C13:C17)",result:1*s.getCell("C13")+1*s.getCell("C14")+1*s.getCell("C15")+1*s.getCell("C16")+1*s.getCell("C17")},s.getCell("D12").value={formula:"SUM(D13:D17)",result:1*s.getCell("D13")+1*s.getCell("D14")+1*s.getCell("D15")+1*s.getCell("D16")+1*s.getCell("D17")},s.getCell("E12").value={formula:"SUM(E13:E17)",result:1*s.getCell("E13")+1*s.getCell("E14")+1*s.getCell("E15")+1*s.getCell("E16")+1*s.getCell("E17")},s.getCell("F12").value={formula:"SUM(F13:F17)",result:1*s.getCell("F13")+1*s.getCell("F14")+1*s.getCell("F15")+1*s.getCell("F16")+1*s.getCell("F17")},s.getCell("G12").value={formula:"C12-D12-F12",result:1*s.getCell("C12")-1*s.getCell("D12")-1*s.getCell("F12")},s.getCell("C5").value={formula:"SUM(C6+C12)",result:1*s.getCell("C6")+1*s.getCell("C12")},s.getCell("D5").value={formula:"SUM(D6+D12)",result:1*s.getCell("D6")+1*s.getCell("D12")},s.getCell("E5").value={formula:"SUM(E6+E12)",result:1*s.getCell("E6")+1*s.getCell("E12")},s.getCell("F5").value={formula:"SUM(F6+F12)",result:1*s.getCell("F6")+1*s.getCell("F12")},s.getCell("G5").value={formula:"SUM(G6+G12)",result:1*s.getCell("G6")+1*s.getCell("G12")},r.xlsx.writeBuffer()})).then((e=>{const l=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});i().saveAs(l,"学校创客专项资金使用申请表.xlsx")}))}))}},16079:function(e,l,t){t.d(l,{Z:function(){return i}});var a=t(36890),s=t(26125);const u={XM:"/getProjectNo",CX:"/getProjectNo",CY:"/getProjectNo",SJ:"/getProjectNo",HD:"/getActivityNo",ZJ:"/getFundNo"};function i(e="XM"){return new Promise(((l,t)=>{a.Z.get(s.Z.state.api+u[e],{uid:s.Z.state.userInfo.userid,type:e}).then((t=>{if(console.log(t["data"]),0==t["data"][0].length||null==t["data"][0][0]["No"])return l(`${e}0000001`);let a=t["data"][0][0]["No"],s=parseInt(a.slice(-7)),u=s+1,i=`${e}${u.toString().padStart(7,"0")}`;l(i)}))}))}}}]);
- //# sourceMappingURL=614.1d2319b1.js.map
|