You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1 lines
16 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7eb0ddc6"],{"1a86":function(t,e,a){"use strict";e.a={data:function(){return{isSearch:!1,total:null}},created:function(){},methods:{handleSizeChange:function(t){this.queryInfo.pageSize=t,this.initTable()},handleCurrentChange:function(t){this.queryInfo.pageNum=t,this.initTable()},searchClick:function(){this.isSearch=!this.isSearch}}}},"26f6":function(t,e,a){"use strict";a.r(e);a("a4d3"),a("e01a"),a("4de4"),a("4160"),a("a630"),a("b0c0"),a("3ca3"),a("159b"),a("cca6");var n=a("5530"),i=a("dd85"),l=a("fa7d"),o=a("1a86"),c=a("2f62"),r={name:"RuleSet",mixins:[o.a],data:function(){return{fileuploadDialg:!1,remarkUpdateDialg:!1,chooseInvoice:{},invoiceRemark:"",invoiceId:0,dataIndex:"",tableData:[],uploadDialog:!1,uploadOption:{invoiceId:null,files:[],type:"",description:""},rate:0,queryInfo:{pageSize:10,pageNo:1,pageNum:1},fileOptionsFilter:[{label:"已处理",id:1},{label:"异常",id:2},{label:"未处理",id:0},{label:"退票",id:4},{label:"暂挂",id:5}],invoiceTType:"2",type:"",fileOptions:[],com:"",companyList:[]}},created:function(){this.colorArr=["#909399","#67c23a","#f56c6c","#e6a23c","#e6a23c","#e6a23c"],this.attOptions=[{label:"销货清单",value:"销货清单"},{label:"合同",value:"合同"},{label:"订单",value:"订单"},{label:"验收单",value:"验收单"},{label:"其他",value:"其他"}]},mounted:function(){this.initTable(),this.getExpenseList()},watch:{},methods:Object(n.a)(Object(n.a)({},Object(c.b)({supplierExpenseList:"supplier/supplierExpenseList"})),{},{confirmSave:function(){var t=this,e=Object.assign({});e.id=this.invoiceId,e.desc=this.invoiceRemark,e.status=this.chooseInvoice.status,Object(i.j)(e).then((function(e){200==e.status?(t.$message.success("修改成功"),t.remarkUpdateDialg=!1):(t.$message.error(e.message),t.remarkUpdateDialg=!1)})).catch((function(e){t.$message.error(e.message)}))},searchRes:function(){this.initTable()},exportSearch:function(){var t=Object.assign({},this.queryInfo);t.dataStart=Object(l.c)(t.dataStart,!0),t.dataEnd=Object(l.c)(t.dataEnd,!0),t.invoiceStart=Object(l.c)(t.invoiceStart,!0),t.invoiceEnd=Object(l.c)(t.invoiceEnd,!0),this.$file.downloadFile("api/manager/corInvoice/export",t,"export")},reset:function(){this.queryInfo={pageSize:10,pageNo:1,pageNum:1}},comChange:function(t){var e=this;Object(i.cb)({name:""}).then((function(t){e.companyList=t.result,e.companyList.forEach((function(t){t.label=t.name,t.value=t.id})),1==e.companyList.length&&(e.com=e.companyList[0].code)}))},remoteMethod:function(t){var e=this;Object(i.cb)({name:t}).then((function(t){e.companyList=t.result,e.companyList.forEach((function(t){t.label=t.name,t.value=t.id})),1==e.companyList.length&&(e.com=e.companyList[0].code)}))},goElectronicInvoice:function(t){this.invoiceRemark=t.desc,this.invoiceId=t.id,this.remarkUpdateDialg=!0,this.chooseInvoice=t},getExpenseList:function(){var t=this;this.supplierExpenseList().then((function(e){t.fileOptions=e.result.filter((function(t){return t.id<4})),t.fileOptions.forEach((function(t){t.label=t.name,t.value=t.id})),1==t.fileOptions.length&&(t.type=t.fileOptions[0].code)}))},chooseFile:function(){""!=this.com?this.$refs.export.click():this.$message.error("请选择组织")},initTable:function(){var t=this,e=Object.assign({},this.queryInfo);e.invoiceStart=Object(l.c)(e.invoiceStart,!0),e.invoiceEnd=Object(l.c)(e.invoiceEnd,!0),Object(i.D)(e).then((function(e){200==e.status&&(t.tableData=e.result.data,t.total=e.result.pagination.total)})).catch((function(e){t.$message.error(e.message)}))},showUploadDialog1:function(t){this.uploadOption.invoiceId=t.id,this.uploadDialog=!this.uploadDialog},handleProgress:function(t){this.rate=Math.floor(t.loaded/t.total*100)},uploadAvater3:function(t){var e=this,a=Object.assign({},this.uploadOption),n=a.type,i=a.description,l=new FormData;Array.from(t).forEach((function(t){l.append("files",t)})),l.append("invoiceId",this.uploadOption.invoiceId),l.append("type",n),l.append("description",i),this.$file.uploadFile(l,"api/manager/supplier/invoice-attachment",this.handleProgress).then((function(t){200==t.status&&(e.$message.success("导入文件成功!"),e.rate=0,e.uploadDialog=!1)})).catch((function(t){e.$message.error(t.message)}))},uploadAvater:function(t){var e=this,a=t.target.files,n=new FormData;Array.from(a).forEach((function(t){n.append("files",t)})),n.append("type",this.type),n.append("com",this.com),n.append("invoiceType",this.invoiceTType),this.$file.uploadFile(n,"api/manager/corInvoice/upload").then((function(a){200==a.status&&(t.target.value=[],e.$message.success("导入文件成功!"),e.fileuploadDialg=!1,e.initTable())})).catch((function(a){t.target.value=[],e.$message.error(a.message)}))}})},s=(a("cbb3"),a("2877")),p=Object(s.a)(r,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"RuleSet"},[a("div",{staticClass:"SupplierInvoice h100 bgfff"},[a("div",{staticClass:"bgc p-left-2"},[a("div",{staticClass:"d-flex a-center m-bottom-1"},[a("FeesInput",{attrs:{santakLabel:"发票号码",fieldName:"number",field:"queryInfo",width:"200","label-width":"100",defaultValue:t.queryInfo.number}}),a("OptionsSelect",{attrs:{defaultValue:t.queryInfo.status,fieldName:"status",field:"queryInfo",labelValue:"发票状态",options:t.fileOptionsFilter,width:"200","label-width":"100"}}),a("div",{staticClass:"more-dialog-item"},[a("span",{staticClass:"p-right-1 h100",staticStyle:{display:"inline-block"}},[t._v("发票日期起 ")]),a("el-date-picker",{staticStyle:{width:"12.5rem !important"},attrs:{type:"date",placeholder:"选择日期"},model:{value:t.queryInfo.invoiceStart,callback:function(e){t.$set(t.queryInfo,"invoiceStart",e)},expression:"queryInfo.invoiceStart"}})],1),a("div",{staticClass:"more-dialog-item",staticStyle:{"margin-left":"20px"}},[a("span",{staticClass:"p-right-1 h100",staticStyle:{display:"inline-block"}},[t._v("发票日期止 ")]),a("el-date-picker",{staticStyle:{width:"12.5rem !important"},attrs:{type:"date",clearable:!1,placeholder:"选择日期"},model:{value:t.queryInfo.invoiceEnd,callback:function(e){t.$set(t.queryInfo,"invoiceEnd",e)},expression:"queryInfo.invoiceEnd"}})],1),a("div",{staticClass:"d-flex",staticStyle:{"margin-left":"50px"}},[a("FeesButton",{attrs:{text:"搜索",icon:"el-icon-search"},on:{buttonClick:t.searchRes}}),a("FeesButton",{attrs:{text:"重置",icon:"el-icon-refresh"},on:{buttonClick:t.reset}})],1)],1)]),a("div",{staticClass:"bg-fff p-x-2 h100",staticStyle:{"min-height":"500px"}},[a("div",{staticClass:"m-bottom-2 p-top-1 d-flex"},[a("FeesButton",{attrs:{text:"发票导入",icon:"el-icon-upload2",dataUpdateDialog:""},on:{buttonClick:function(e){t.fileuploadDialg=!t.fileuploadDialg}}}),a("FeesButton",{attrs:{text:"导出搜索",icon:"el-icon-download"},on:{buttonClick:t.exportSearch}})],1),a("div",{},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,stripe:"",border:""}},[a("el-table-column",{attrs:{type:"selection",width:"36"}}),a("el-table-column",{attrs:{label:"操作",fixed:"",width:"140","header-align":"center",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"text-color cursor",on:{click:function(a){return t.showUploadDialog1(e.row)}}},[t._v(" 附件 ")]),a("span",{staticClass:"text-color cursor",on:{click:function(a){return t.goElectronicInvoice(e.row)}}},[t._v(" 备注 ")])]}}])}),a("el-table-column",{attrs:{prop:"buyer",label:"公司名称","header-align":"center",width:"200",align:"center"}}),a("el-table-column",{attrs:{prop:"ticketCodeStr",label:"发票类型",width:"160",align:"center","header-align":"center"}}),a("el-table-column",{attrs:{prop:"seller",label:"销售方",width:"240","header-align":"center",align:"center"}}),a("el-table-column",{attrs:{prop:"code",label:"发票代码",width:"120",align:"center"}}),a("el-table-column",{attrs:{prop:"number",label:"发票号码",width:"100",align:"center"}}),a("el-table-column",{attrs:{prop:"date",label:"发票日期",align:"center","header-align":"center",width:"140"}}),a("el-table-column",{attrs:{prop:"pretaxAmount",label:"金额",width:"120","header-align":"center",align:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.pretaxAmount)+" ")]}}])}),a("el-table-column",{attrs:{prop:"tax",label:"税额",width:"100","header-align":"center",align:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.tax)+" ")]}}])}),a("el-table-column",{attrs:{prop:"total",label:"总金额",width:"120","header-align":"center",align:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.total)+" ")]}}])}),a("el-table-column",{attrs:{prop:"status",label:"状态",width:"80",align:"center","header-align":"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{style:{color:t.colorArr[e.row.status]}},[t._v(" "+t._s(e.row.statusStr)+" ")])]}}])}),a("el-table-column",{attrs:{prop:"isSend",label:"发送状态",width:"80",align:"center","header-align":"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.isSend?a("div",{staticStyle:{color:"#909399"}},[t._v(" 未发送 ")]):1==e.row.isSend?a("div",{staticStyle:{color:"#67c23a"}},[t._v(" 已发送 ")]):t._e()]}}])}),a("el-table-column",{attrs:{prop:"details",label:"发票内容",width:"180","header-align":"center"}}),a("el-table-column",{attrs:{prop:"po",label:"NPO",width:"180","header-align":"left"}}),a("el-table-column",{attrs:{prop:"remark",label:"备注",width:"220","header-align":"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-popover",{attrs:{placement:"top",width:300,trigger:"hover",content:e.row.remark},scopedSlots:t._u([{key:"reference",fn:function(){return[a("span",{staticClass:"ellipsis"},[t._v(t._s(e.row.remark))])]},proxy:!0}],null,!0)})]}}])}),a("el-table-column",{attrs:{prop:"postingDate",label:"入账日期",width:"140","header-align":"left"}}),a("el-table-column",{attrs:{prop:"deductTime",label:"抵扣时间",width:"140",align:"center","header-align":"center"}}),a("el-table-column",{attrs:{prop:"deductStatus",label:"抵扣状态",width:"80",align:"center","header-align":"center"}}),a("el-table-column",{attrs:{prop:"updateDate",label:"更新日期",width:"140",align:"center","header-align":"center"}}),a("el-table-column",{attrs:{prop:"createDate",label:"创建日期",align:"center","header-align":"center",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.row.createDate,placement:"top-start"}},[a("div",[t._v(t._s(e.row.createDate))])])]}}])},[t._v(" Tooltip ")]),a("el-table-column",{attrs:{prop:"fileName",label:"文件名称",width:"200"}}),a("el-table-column",{attrs:{prop:"operator",label:"操作人"}}),a("el-table-column",{attrs:{prop:"ownerName",label:"归属人"}})],1)],1),a("div",{staticClass:"m-y-1"},[a("el-pagination",{attrs:{background:"","current-page":t.queryInfo.pageNo,"page-size":t.queryInfo.pageSize,"page-sizes":[10,20,30,50],layout:" prev, pager, next,total, sizes, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange,"update:currentPage":function(e){return t.$set(t.queryInfo,"pageNo",e)},"update:current-page":function(e){return t.$set(t.queryInfo,"pageNo",e)}}})],1),a("el-dialog",{attrs:{title:"发票导入",visible:t.fileuploadDialg,width:"400px"},on:{"update:visible":function(e){t.fileuploadDialg=e}}},[a("div",{staticClass:"d-flex a-center"},[a("div",{staticStyle:{width:"100px","text-align":"right"}},[t._v("发票类型:")]),a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.invoiceTType,callback:function(e){t.invoiceTType=e},expression:"invoiceTType"}},[a("el-option",{attrs:{label:"形式发票",value:"1"}}),a("el-option",{attrs:{label:"纸质发票",value:"0"}}),a("el-option",{attrs:{label:"电子发票",value:"2"}})],1)],1),a("div",{staticClass:"d-flex a-center m-top-2"},[a("div",{staticStyle:{width:"100px","text-align":"right"}},[t._v("费用类别:")]),a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},t._l(t.fileOptions,(function(t){return a("el-option",{key:t.code,attrs:{label:t.name,value:t.code}})})),1)],1),a("div",{staticClass:"d-flex a-center m-top-2"},[a("div",{staticStyle:{width:"100px","text-align":"right"}},[t._v("组织:")]),a("el-select",{attrs:{placeholder:"请输入关键词",filterable:"",remote:"","remote-method":t.remoteMethod},on:{focus:t.comChange},model:{value:t.com,callback:function(e){t.com=e},expression:"com"}},t._l(t.companyList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.name,value:t.code}})})),1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("div",{staticClass:"upload",on:{click:t.chooseFile}},[a("i",{staticClass:"el-icon-upload"}),a("div",[t._v("只能上传pdf和ofd格式的文件哦!")])]),a("input",{ref:"export",staticStyle:{display:"none"},attrs:{type:"file",name:"",multiple:""},on:{change:function(e){return t.uploadAvater(e)}}}),a("input",{ref:"export1",staticStyle:{display:"none"},attrs:{type:"file",name:"",accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",multiple:""},on:{change:function(e){return t.uploadAvater1(e)}}})])]),a("el-dialog",{attrs:{title:"修改",visible:t.remarkUpdateDialg,width:"600px"},on:{"update:visible":function(e){t.remarkUpdateDialg=e}}},[a("div",{staticClass:"d-flex a-center"},[a("el-input",{attrs:{type:"textarea",rows:2,placeholder:"修改备注内容",autosize:{minRows:2,maxRows:8}},model:{value:t.invoiceRemark,callback:function(e){t.invoiceRemark=e},expression:"invoiceRemark"}})],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.remarkUpdateDialg=!1}}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.confirmSave}},[t._v("确定")])],1)])],1)]),a("el-dialog",{attrs:{visible:t.uploadDialog,title:"上传附件"},on:{"update:visible":function(e){t.uploadDialog=e}}},[a("div",{staticClass:"d-flex a-center m-bottom-2"},[a("div",{staticStyle:{width:"100px","text-align":"right"}},[t._v("附件类型:")]),a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.uploadOption.type,callback:function(e){t.$set(t.uploadOption,"type",e)},expression:"uploadOption.type"}},t._l(t.attOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("div",{staticClass:"d-flex a-center m-bottom-2"},[a("div",{staticStyle:{width:"100px","text-align":"right"}},[t._v("附件说明:")]),a("el-input",{attrs:{type:"textarea"},model:{value:t.uploadOption.description,callback:function(e){t.$set(t.uploadOption,"description",e)},expression:"uploadOption.description"}})],1),a("Upload",{attrs:{title:"导入",multiple:"",accept:""},on:{change:t.uploadAvater3}}),a("el-progress",{attrs:{percentage:t.rate}})],1)],1)}),[],!1,null,"d1791e56",null);e.default=p.exports},cbb3:function(t,e,a){"use strict";var n=a("f37e");a.n(n).a},f37e:function(t,e,a){},fa7d:function(t,e,a){"use strict";a.d(e,"c",(function(){return n})),a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return l}));a("99af"),a("ac1f"),a("4d90"),a("5319");function n(t,e){if(""==t||!t)return"";var a=new Date(t),n=a.getFullYear(),i=a.getMonth()+1+"";i=i.padStart(2,0);var l=a.getDate()+"";l=l.padStart(2,0);var o=a.getHours()+"";o=o.padStart(2,0);var c=a.getMinutes()+"",r=a.getSeconds()+"";return c=c.padStart(2,0),r=r.padStart(2,0),"nyrsf"==e?"".concat(n,"-").concat(i,"-").concat(l," ").concat(o,":").concat(c):"month"==e?"".concat(n,"-").concat(i):"nowtime"==e?"".concat(n,"-").concat(i,"-").concat(l," ").concat(o,":").concat(c,":").concat(r):e?"".concat(n,"-").concat(i,"-").concat(l):"".concat(n,"年-").concat(i,"月-").concat(l,"日 ").concat(o,":").concat(c,":").concat(r)}function i(t){var e=new Date(t),a=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return"".concat(a,"年").concat(n,"月").concat(i,"日")}function l(t){return t.replace(/(\d{4})年(\d{1,2})月(\d{1,2})日/,(function(t,e,a,n){return"".concat(e,"-").concat(a.padStart(2,"0"),"-").concat(n.padStart(2,"0"))}))}}}]);