webpackJsonp([3],{"+QjM":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("QWrN"),s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys-box plan-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.back()}}},[e._v(e._s(e.config.cancelText))]),e._v(" "),0==e.approveState||2==e.approveState?a("el-button",{attrs:{type:"primary",disabled:e.isDisabled},on:{click:function(t){return e.tempSave()}}},[e._v("暂存\n ")]):e._e(),e._v(" "),0==e.approveState||2==e.approveState?a("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary",disabled:e.isDisabled},on:{click:function(t){return e.submitApprove()}}},[e._v("提交审批\n ")]):e._e(),e._v(" "),0==e.approveState||2==e.approveState?a("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary",disabled:e.isDisabled},on:{click:e.clear}},[e._v("新增\n ")]):e._e(),e._v(" "),3==e.approveState?a("el-button",{attrs:{type:"primary"},on:{click:e.print}},[e._v("打印")]):e._e()],1),e._v(" "),a("div",{staticClass:"sys-form"},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"form",staticClass:"company-form",attrs:{"label-width":"120px",rules:e.rules,model:e.formData.payApply}},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"申请日期",prop:"applicationDate"}},[a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",format:"yyyy-MM-dd",placeholder:"选择日期"},on:{change:function(t){return e.$forceUpdate()}},model:{value:e.formData.payApply.applicationDate,callback:function(t){e.$set(e.formData.payApply,"applicationDate",t)},expression:"formData.payApply.applicationDate"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"申请人",prop:"applicantName"}},[a("btn-input",{attrs:{valueText:e.formData.payApply.applicantName,valueId:e.formData.payApply.applicantId,chooseVisible:e.chooseUserVisible},on:{"update:valueText":function(t){return e.$set(e.formData.payApply,"applicantName",t)},"update:value-text":function(t){return e.$set(e.formData.payApply,"applicantName",t)},"update:valueId":function(t){return e.$set(e.formData.payApply,"applicantId",t)},"update:value-id":function(t){return e.$set(e.formData.payApply,"applicantId",t)},"update:chooseVisible":function(t){e.chooseUserVisible=t},"update:choose-visible":function(t){e.chooseUserVisible=t}}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"申请部门",prop:"applicantDeptName"}},[a("el-input",{attrs:{disabled:""},model:{value:e.formData.payApply.applicantDeptName,callback:function(t){e.$set(e.formData.payApply,"applicantDeptName",t)},expression:"formData.payApply.applicantDeptName"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"付款单位",prop:"supplierName"}},[a("btn-input",{attrs:{valueText:e.formData.payApply.supplierName,valueId:e.formData.payApply.supplierId,chooseVisible:e.chooseSupplierVisible},on:{"update:valueText":function(t){return e.$set(e.formData.payApply,"supplierName",t)},"update:value-text":function(t){return e.$set(e.formData.payApply,"supplierName",t)},"update:valueId":function(t){return e.$set(e.formData.payApply,"supplierId",t)},"update:value-id":function(t){return e.$set(e.formData.payApply,"supplierId",t)},"update:chooseVisible":function(t){e.chooseSupplierVisible=t},"update:choose-visible":function(t){e.chooseSupplierVisible=t}}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"付款日期",prop:"paymentDate"}},[a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",format:"yyyy-MM-dd",placeholder:"选择日期"},on:{change:function(t){return e.$forceUpdate()}},model:{value:e.formData.payApply.paymentDate,callback:function(t){e.$set(e.formData.payApply,"paymentDate",t)},expression:"formData.payApply.paymentDate"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"单据编号"}},[a("el-input",{attrs:{disabled:"",placeholder:"系统自动生成"},model:{value:e.formData.payApply.code,callback:function(t){e.$set(e.formData.payApply,"code",t)},expression:"formData.payApply.code"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"付款事由",prop:"paymentReason"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请输入付款事由(必填)"},model:{value:e.formData.payApply.paymentReason,callback:function(t){e.$set(e.formData.payApply,"paymentReason",t)},expression:"formData.payApply.paymentReason"}})],1)],1),e._v(" "),a("el-divider",{attrs:{"content-position":"left"}},[a("div",[e._v("关联单据")])]),e._v(" "),a("el-form",{ref:"formChild",attrs:{rules:e.rules}},[0==e.approveState||2==e.approveState?a("div",{staticClass:"sys-operate",staticStyle:{"margin-bottom":"10px"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.ChooseImportShow}},[e._v("新增")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.removePart()}}},[e._v("删除")])],1):e._e(),e._v(" "),a("el-table",{attrs:{data:e.formData.payApplyItemList,"show-summary":"","summary-method":e.getSummaries,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"},border:""},on:{"selection-change":e.handlePartChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"dueDate",label:"应付日期",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"payableAmount",label:"应付金额(元)",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"paidAmount",label:"已付金额(元)",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"unpaidAmount",label:"未付金额(元)",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"payAmount",align:"center",width:"180",label:"本次申请付款金额(元)","label-class-name":"required_head"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form-item",[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small","controls-position":"right"},model:{value:t.row.payAmount,callback:function(a){e.$set(t.row,"payAmount",a)},expression:"scope.row.payAmount"}})],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"remark",align:"center",width:"220",label:"备注"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autosize:{minRows:1},clearable:""},model:{value:t.row.remark,callback:function(a){e.$set(t.row,"remark",a)},expression:"scope.row.remark"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"sourceTypeName",label:"源单类型",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"sourceCode",label:"源单单号",align:"center","show-overflow-tooltip":""}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请简要填写备注内容"},model:{value:e.formData.payApply.remark,callback:function(t){e.$set(e.formData.payApply,"remark",t)},expression:"formData.payApply.remark"}})],1),e._v(" "),a("el-form-item",{staticClass:"remarkstyle",attrs:{label:"附件","label-width":"50px"}},[e.advanceQueryDialogVisible?a("upload",{attrs:{title:"",label_width:"0",attachment:e.uploadAttachment},on:{"update:attachment":function(t){e.uploadAttachment=t}}}):e._e()],1),e._v(" "),2==e.approveState||3==e.approveState?a("el-form-item",{attrs:{label:"审批流程:"}},[a("el-table",{attrs:{data:e.tableData2,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}}},e._l(e.formTableData2,function(e,t){return a("el-table-column",{key:t,attrs:{prop:e.prop_,label:e.title,sortable:e.sortAble,align:"center","show-overflow-tooltip":""}})}),1)],1):e._e(),e._v(" "),a("div",[a("span",{staticStyle:{"margin-right":"50px"}},[e._v("制单人:"+e._s(e.formData.payApply.createName))]),e._v(" "),a("span",[e._v("制单日期:"+e._s(e.formData.payApply.createTime))])])],1),e._v(" "),e.checkPrint?a("div",{staticClass:"prop-body"},[a("div",{staticClass:"prop-in-print"},[a("div",{ref:"print"},[a("div",{staticStyle:{"text-align":"center","font-size":"20px","font-weight":"bold","margin-bottom":"20px"}},[e._v("付款申请")]),e._v(" "),a("div",{staticStyle:{height:"75vh",overflow:"auto","page-break-after":"always"}},[a("div",[a("span",{staticStyle:{display:"inline-block",width:"150px","margin-right":"10%"}},[e._v("申请日期:"+e._s(e.formData.payApply.applicantName))]),e._v(" "),a("span",{staticStyle:{display:"inline-block",width:"150px","margin-right":"10%"}},[e._v("申请人:"+e._s(e.formData.payApply.applicantName))]),e._v(" "),a("span",[e._v("申请部门:"+e._s(e.formData.payApply.applicantDeptName))])]),e._v(" "),a("div",[a("span",{staticStyle:{display:"inline-block",width:"150px","margin-right":"10%"}},[e._v("付款单位:"+e._s(e.formData.payApply.supplierName))]),e._v(" "),a("span",[e._v("付款日期:"+e._s(e.formData.payApply.paymentDate))])]),e._v(" "),a("div",[a("span",[e._v("付款事由:"+e._s(e.formData.payApply.paymentReason))])]),e._v(" "),a("div",[a("table",{staticStyle:{"border-collapse":"collapse",width:"100%",border:"1px solid #EBEEF5","text-align":"center"},attrs:{border:"1"}},[e._m(0),e._v(" "),e._l(e.formData.payApplyItemList,function(t,i){return a("tr",{key:i},[a("td",{staticStyle:{padding:"10px 0"}},[e._v(e._s(t.dueDate))]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v(e._s(t.payableAmount))]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v(e._s(t.paidAmount))]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v(e._s(t.unpaidAmount))]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v(e._s(t.payAmount))]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v(e._s(t.remark))]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v(e._s(t.sourceTypeName))]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v(e._s(t.sourceCode))])])}),e._v(" "),a("tr",[a("td",{staticStyle:{padding:"10px 0"}},[e._v("合计")]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v(e._s(this.formData.payApply.totalPayableAmount))]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v(e._s(this.formData.payApply.totalPaidAmount))]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v(e._s(this.formData.payApply.totalUnpaidAmount))]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v(e._s(this.formData.payApply.totalPayAmount))]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}}),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}}),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}})])],2),e._v(" "),a("div",[a("span",[e._v("备注:"+e._s(e.formData.payApply.remark))])]),e._v(" "),a("div",[a("span",{staticStyle:{"margin-right":"50px"}},[e._v("制单人:"+e._s(e.formData.payApply.createName))]),e._v(" "),a("span",[e._v("制单日期:"+e._s(e.formData.payApply.createTime))])])])])])])]):e._e()],1),e._v(" "),a("DialogChooseSingleUser",{attrs:{visible:e.chooseUserVisible},on:{"update:visible":function(t){e.chooseUserVisible=t},change:e.getUser}}),e._v(" "),a("DialogChooseSalesContract",{attrs:{visible:e.chooseContractVisible,supplierName:e.formData.payApply.supplierName,supplierId:e.formData.payApply.supplierId},on:{"update:visible":function(t){e.chooseContractVisible=t},change:e.getSalesOutStock}}),e._v(" "),a("dialogChooseSingleSupplier",{attrs:{visible:e.chooseSupplierVisible},on:{"update:visible":function(t){e.chooseSupplierVisible=t},change:e.getSupplier}})],1)},staticRenderFns:[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("tr",[a("td",{staticStyle:{padding:"10px 0"}},[e._v("应付日期")]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v("应付金额(元)")]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v("已付金额(元)")]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v("未付金额(元)")]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v("本次申请付款金额")]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v("备注")]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v("源单类型")]),e._v(" "),a("td",{staticStyle:{padding:"10px 0"}},[e._v("源单单号")])])}]};var o=function(e){a("/im1"),a("s4q7")},r=a("VU/8")(i.a,s,!1,o,"data-v-eebfb768",null);t.default=r.exports},"/im1":function(e,t){},EGao:function(e,t,a){"use strict";var i=a("bzuE"),s={props:{id:{type:String,default:""},supplierId:"",supplierName:"",visible:{type:Boolean,default:!1}},watch:{visible:function(e,t){e!==t&&(e&&this.initData(),this.innerVisible=e,this.$nextTick(function(){this.$refs.tb.clearSelection()}))},innerVisible:function(e,t){e!==t&&this.$emit("update:visible",e)},sourceTypeId:function(e){205!=e&&296!=e&&271!=e||(this.sourceType=e,this.searchSubset())},time:function(e){e?(this.searchData_Subset.startTime=e[0],this.searchData_Subset.endTime=e[1]):(this.searchData_Subset.startTime="",this.searchData_Subset.endTime="")}},data:function(){return{subsetList:[],subsetAll:[],subsetTotal:0,searchData_Subset:{pageno:1,pagesize:5,isDialog:1,closeStatus:0,auditSign:179},time:"",contractDate:"",callBackData:[],innerVisible:this.visible,loading:!1,dialogLoading:!1,sourceTypeId:205,sourceType:205,deviceType:[{id:205,name:"采购订单"},{id:271,name:"委外合同"},{id:296,name:"其他应付"}],deviceDept:[],addVisible:!1,config:i.a}},computed:{},mounted:function(){},methods:{getRowKey:function(e){return e.itemId},clickRow:function(e){this.$refs.tb.toggleRowSelection(e)},initData:function(){this.searchSubset()},searchSubset:function(){var e=this;this.supplierId&&(this.searchData_Subset.supplierName=this.supplierName,this.searchData_Subset.supplierId=this.supplierId),this.dialogLoading=!0,this.time?(this.searchData_Subset.startTime=this.time[0],this.searchData_Subset.endTime=this.time[1]):(this.searchData_Subset.startTime="",this.searchData_Subset.endTime=""),205==this.sourceType?this.$api.paymentOrderAPI.contractPayList(this.searchData_Subset).then(function(t){e.dialogLoading=!1,0===t.code&&(console.log(t.data),e.subsetList=t.data?t.data.datas:[],e.subsetTotal=t.data?t.data.totalRows:0)}):296==this.sourceType?this.$api.paymentOrderAPI.listForIncoming(this.searchData_Subset).then(function(t){e.dialogLoading=!1,0===t.code&&(console.log(t),e.subsetList=t.data?t.data.datas:[],t.data.datas.forEach(function(t){e.$set(t,"dueDate",t.accrualDate),e.$set(t,"payAmount",t.receivablePayablesAmount),e.$set(t,"amountPaid",t.paidReceivedAmount?t.paidReceivedAmount:0),e.$set(t,"unpayAmount",t.noReceiptPaymentAmount),e.$set(t,"contractCode",t.code),e.$set(t,"supplierName",t.supplierClientName),e.$set(t,"payId",t.id),e.$set(t,"contractCode",t.code),e.$set(t,"thisSourceType",t.sourceType),e.$set(t,"thisSourceTypeName",t.sourceTypeName)}),e.subsetTotal=t.data?t.data.totalRows:0)}):this.$api.paymentOrderAPI.outsourcingPayList(this.searchData_Subset).then(function(t){e.dialogLoading=!1,0===t.code&&(console.log(t.data),e.subsetList=t.data?t.data.datas:[],t.data.datas.forEach(function(t){e.$set(t,"dueDate",t.payableDate),e.$set(t,"payAmount",t.payableAmount),e.$set(t,"amountPaid",t.paidAmount),e.$set(t,"unpayAmount",t.unpaidAmount),e.$set(t,"payId",t.itemId)}),e.subsetTotal=t.total?t.total.totalCount:0)})},ckSubsetAll:function(e){this.subsetAll=e},subsetSizeChange:function(e){this.searchData_Subset.pagesize=e,this.searchSubset()},subsetCurrentChange:function(e){this.searchData_Subset.pageno=e,this.searchSubset()},submit:function(e){var t=[];this.subsetAll.length>0&&this.subsetAll.forEach(function(e){t.push(e)}),this.$emit("change",t,this.sourceTypeId),this.innerVisible=!1},resetFields:function(){this.$refs.form&&this.$refs.form.resetFields()}}},o={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],attrs:{center:"",title:"导入关联单据",visible:e.innerVisible,width:"900px"},on:{"update:visible":function(t){e.innerVisible=t}}},[a("div",[a("el-form",{attrs:{inline:""}},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"源单类型"}},[a("el-select",{model:{value:e.sourceTypeId,callback:function(t){e.sourceTypeId=t},expression:"sourceTypeId"}},e._l(e.deviceType,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("div",{staticClass:"flex"},[a("el-form-item",{attrs:{label:"供应商"}},[a("el-input",{staticStyle:{width:"250px"},attrs:{placeholder:"请选择",readonly:""},model:{value:e.supplierName,callback:function(t){e.supplierName=t},expression:"supplierName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"应付日期"}},[a("el-date-picker",{attrs:{type:"datetimerange",format:"yyyy-MM-dd HH:mm:ss","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:e.time,callback:function(t){e.time=t},expression:"time"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.searchSubset()}}},[e._v("查询")])],1)],1)],1)],1),e._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.dialogLoading,expression:"dialogLoading"}],ref:"tb",attrs:{"row-key":e.getRowKey,data:e.subsetList,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"row-click":e.clickRow,"selection-change":e.ckSubsetAll}},[a("el-table-column",{attrs:{type:"selection","reserve-selection":!0,width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"contractCode",label:"单据编号",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"supplierName",label:"供应商",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"dueDate",label:"应付日期",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"payAmount",label:"应付金额(元)",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"amountPaid",label:"已付金额(元)",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"unpayAmount",label:"未付金额(元)",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"remarks",label:"备注",align:"center","show-overflow-tooltip":""}})],1)],1),e._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":e.searchData_Subset.pageno,"page-sizes":[5,10,20],"page-size":e.searchData_Subset.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.subsetTotal},on:{"update:currentPage":function(t){return e.$set(e.searchData_Subset,"pageno",t)},"update:current-page":function(t){return e.$set(e.searchData_Subset,"pageno",t)},"size-change":e.subsetSizeChange,"current-change":e.subsetCurrentChange}})],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary",size:"small",loading:e.loading},on:{click:function(t){return e.submit()}}},[e._v("确定")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){e.innerVisible=!1}}},[e._v(e._s(e.config.cancelText))])],1)])},staticRenderFns:[]},r=a("VU/8")(s,o,!1,null,null,null);t.a=r.exports},QWrN:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_slicedToArray__=__webpack_require__("d7EF"),__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_slicedToArray___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_slicedToArray__),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_promise__=__webpack_require__("//Fk"),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_promise___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_promise__),__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends__=__webpack_require__("Dd8w"),__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends__),__WEBPACK_IMPORTED_MODULE_3_vuex__=__webpack_require__("NYxO"),__WEBPACK_IMPORTED_MODULE_4__components_btnInput_vue__=__webpack_require__("ysqt"),__WEBPACK_IMPORTED_MODULE_5__components_System_tagMulitUsers__=__webpack_require__("HeHh"),__WEBPACK_IMPORTED_MODULE_6__components_System_dialogChooseSingleUser__=__webpack_require__("3MlD"),__WEBPACK_IMPORTED_MODULE_7__dialogChooseSalesContract__=__webpack_require__("EGao"),__WEBPACK_IMPORTED_MODULE_8__components_System_dialogChooseSingleSuppliers__=__webpack_require__("FnMF"),__WEBPACK_IMPORTED_MODULE_9_js_cookie__=__webpack_require__("lbHh"),__WEBPACK_IMPORTED_MODULE_9_js_cookie___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_js_cookie__),__WEBPACK_IMPORTED_MODULE_10__utils_config_js__=__webpack_require__("bzuE"),__WEBPACK_IMPORTED_MODULE_11__components_System_upload__=__webpack_require__("veZ4"),__WEBPACK_IMPORTED_MODULE_12__api_base_js__=__webpack_require__("Dod7"),__WEBPACK_IMPORTED_MODULE_13__utils_tools__=__webpack_require__("GKmE"),__WEBPACK_IMPORTED_MODULE_14__utils_conversion_js__=__webpack_require__("Xnfr"),__WEBPACK_IMPORTED_MODULE_15__components_DetailApproveFlow__=__webpack_require__("EB+w"),__WEBPACK_IMPORTED_MODULE_16__api_sendBeanApi__=__webpack_require__("loXm");__webpack_exports__.a={name:"schedule_pay_add",components:{SearchMulitUsers:__WEBPACK_IMPORTED_MODULE_5__components_System_tagMulitUsers__.a,DetailApproveFlow:__WEBPACK_IMPORTED_MODULE_15__components_DetailApproveFlow__.a,DialogChooseSingleUser:__WEBPACK_IMPORTED_MODULE_6__components_System_dialogChooseSingleUser__.a,DialogChooseSalesContract:__WEBPACK_IMPORTED_MODULE_7__dialogChooseSalesContract__.a,dialogChooseSingleSupplier:__WEBPACK_IMPORTED_MODULE_8__components_System_dialogChooseSingleSuppliers__.a,btnInput:__WEBPACK_IMPORTED_MODULE_4__components_btnInput_vue__.a,upload:__WEBPACK_IMPORTED_MODULE_11__components_System_upload__.a},data:function(){return{progressList:[],sourceTypeId:"",editId:"",fullscreenLoading:!1,auto_upload:!1,uploadUrl:__WEBPACK_IMPORTED_MODULE_12__api_base_js__.a.uploadUrl,ftpPrefix:__WEBPACK_IMPORTED_MODULE_12__api_base_js__.a.ftpPrefix,chooseUserVisible:!1,chooseContractVisible:!1,chooseSupplierVisible:!1,uploadAttachment:[],advanceQueryDialogVisible:!0,formData:{payApply:{applicationDate:"",applicantDeptId:"",applicantDeptName:"",applicantId:"",applicantName:"",supplierName:"",createBy:"",createName:"",createTime:""},payApplyItemList:[],targetList:[],uploadAttachment:[],deletetag_appearanceImage:[],totalNumber:0},rules:{paymentReason:[{required:!0,message:"请输入付款事由",trigger:"blur"}],totalNumber:[{required:!0,message:"请输入付款金额",trigger:"blur"}],applicationDate:[{required:!0,message:"请选择申请日期",trigger:"change"}],paymentDate:[{required:!0,message:"请选择付款日期",trigger:"change"}],applicantName:[{required:!0,message:"请选择申请人",trigger:"change"}],supplierName:[{required:!0,message:"请选择付款单位",trigger:"change"}],payAmount:[{required:!0,message:"本次付款必填",trigger:"change"}]},printTotal:{count:"",amount:""},typeList:[],initFileList:[],targetList:[],approveList:[],dialogImageUrl:"",dialogVisible:!1,loading:!1,isDisabled:!1,activities:[],commentList:[],showActivities:!1,checkPrint:!1,approveState:0,config:__WEBPACK_IMPORTED_MODULE_10__utils_config_js__.a,userId:0,uploadDisabled:!1,tableData2:[],formTableData2:[{title:"审批节点",prop_:"name",content:"销售订单审批",select:!0},{title:"审批人",prop_:"approveName",select:!0},{title:"审批时间",prop_:"approveTime",select:!0},{title:"审批状态",prop_:"approveState",select:!0},{title:"审批意见",prop_:"remark",select:!0,sortable:!0}]}},watch:{"formData.payApply.applicantName":function(e){e||(this.formData.payApply.applicantDeptId="",this.formData.payApply.applicantDeptName="")}},mounted:function(){this.$route.query.id?(this.editId=this.$route.query.id,this.$route.query.approveState&&(this.approveState=this.$route.query.approveState),this.getDetail()):(this.formData.payApply.applicantName=JSON.parse(__WEBPACK_IMPORTED_MODULE_9_js_cookie___default.a.get("userInfo")).name,this.formData.payApply.createName=JSON.parse(__WEBPACK_IMPORTED_MODULE_9_js_cookie___default.a.get("userInfo")).name,this.formData.payApply.createBy=JSON.parse(__WEBPACK_IMPORTED_MODULE_9_js_cookie___default.a.get("userInfo")).userId,this.formData.payApply.applicantId=JSON.parse(__WEBPACK_IMPORTED_MODULE_9_js_cookie___default.a.get("userInfo")).userId,this.userId=JSON.parse(__WEBPACK_IMPORTED_MODULE_9_js_cookie___default.a.get("userInfo")).userId,this.formData.payApply.applicantDeptName=JSON.parse(__WEBPACK_IMPORTED_MODULE_9_js_cookie___default.a.get("userInfo")).deptName,this.formData.payApply.applicantDeptId=JSON.parse(__WEBPACK_IMPORTED_MODULE_9_js_cookie___default.a.get("userInfo")).deptId,this.formData.payApply.applicationDate=Object(__WEBPACK_IMPORTED_MODULE_13__utils_tools__.b)(new Date),this.$set(this.formData.payApply,"paymentDate",Object(__WEBPACK_IMPORTED_MODULE_13__utils_tools__.b)(new Date)))},methods:__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends___default()({},Object(__WEBPACK_IMPORTED_MODULE_3_vuex__.d)({removeTagNav:"tagNav/removeTagNav"}),{getUser:function(e){e&&(this.formData.payApply.applicantName=e.name,this.formData.payApply.applicantId=e.id,this.formData.payApply.applicantDeptName=e.deptName,this.formData.payApply.applicantDeptId=e.deptId)},getSupplier:function(e){e?(this.$set(this.formData.payApply,"supplierId",e.id),this.$set(this.formData.payApply,"supplierName",e.name)):(this.$set(this.formData.payApply,"supplierId",""),this.$set(this.formData.payApply,"supplierName",""))},ChooseImportShow:function(){this.formData.payApply.supplierId?this.chooseContractVisible=!0:this.$message({message:"请先选择供应商",type:"warning"})},getSalesOutStock:function(e,t){var a=this;if(this.sourceTypeId||(this.sourceTypeId=t),e){var i=0;this.sourceTypeId!=t&&this.$set(this.formData,"payApplyItemList",[]),e.forEach(function(e){i+=e.payAmount-e.amountPaid,a.formData.amount=i,a.$set(e,"dueDate",e.dueDate.split(" ")[0]),a.$set(e,"payableAmount",e.payAmount),a.$set(e,"paidAmount",e.amountPaid),a.$set(e,"unpaidAmount",e.unpayAmount),a.$set(e,"sourceType",205==e.thisSourceType?0:271==e.thisSourceType?1:2),a.$set(e,"sourceTypeName",e.thisSourceTypeName),a.$set(e,"sourceCode",e.contractCode),a.$set(e,"sourceId",e.id),a.$set(e,"payAmount",0),a.formData.payApplyItemList.push(e)});var s={},o=this.formData.payApplyItemList.reduce(function(e,t){return!s[t.id]&&(s[t.id]=e.push(t)),e},[]);this.$set(this.formData,"payApplyItemList",o)}},removePart:function(){var e=this;if(this.chooseParts){var t=[],a=0;this.chooseParts.forEach(function(i){a+=i.payAmount-i.amountPaid,t.push(i.id);var s=e.formData.payApplyItemList.findIndex(function(e){if(e.id==i.id)return!0});e.formData.amount=e.formData.amount-a,e.formData.payApplyItemList.splice(s,1),e.itemIds=t})}},handlePartChange:function(e){this.chooseParts=e},submitApprove:function(){var e=this;this.$api.payApplyAPI.submitChange(this.formData).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.back()):e.$message({message:t.msg,type:"error"})})},getDetail:function(){var e=this;this.loading=!0,this.$api.payApplyAPI.detail(this.editId).then(function(t){if(0===t.code&&(e.formData=t.data,e.tableData2=t.data.progressList,e.loading=!1,t.data.uploadAttachment&&t.data.uploadAttachment.length>0))for(var a=0;a1)for(var l=0;l