1 line
50 KiB
JavaScript
1 line
50 KiB
JavaScript
webpackJsonp([123],{"9Hky":function(t,e){},MzFz:function(t,e){},bgdx: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_core_js_json_stringify__=__webpack_require__("mvHQ"),__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_json_stringify___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_json_stringify__),__WEBPACK_IMPORTED_MODULE_3_babel_runtime_core_js_object_assign__=__webpack_require__("woOf"),__WEBPACK_IMPORTED_MODULE_3_babel_runtime_core_js_object_assign___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_core_js_object_assign__),__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__=__webpack_require__("Dd8w"),__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__),__WEBPACK_IMPORTED_MODULE_5__utils_tools_js__=__webpack_require__("GKmE"),__WEBPACK_IMPORTED_MODULE_6__components_btnInput_vue__=__webpack_require__("ysqt"),__WEBPACK_IMPORTED_MODULE_7_vuex__=__webpack_require__("NYxO"),__WEBPACK_IMPORTED_MODULE_8__components_System_dialogChooseSingleUser__=__webpack_require__("3MlD"),__WEBPACK_IMPORTED_MODULE_9__components_System_dialogChooseSingleBom__=__webpack_require__("Pzdv"),__WEBPACK_IMPORTED_MODULE_10__components_System_dialogChooseSingleSuppliers__=__webpack_require__("FnMF"),__WEBPACK_IMPORTED_MODULE_11__components_System_dialogChooseParts_vue__=__webpack_require__("CdUU"),__WEBPACK_IMPORTED_MODULE_12__contract_dialogImportOutsourcingContract__=__webpack_require__("IH/o"),__WEBPACK_IMPORTED_MODULE_13__contract_printOutsourcingContract_vue__=__webpack_require__("Em+a"),__WEBPACK_IMPORTED_MODULE_14__utils_config_js__=__webpack_require__("bzuE"),__WEBPACK_IMPORTED_MODULE_15_js_cookie__=__webpack_require__("lbHh"),__WEBPACK_IMPORTED_MODULE_15_js_cookie___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15_js_cookie__),__WEBPACK_IMPORTED_MODULE_16__components_System_upload__=__webpack_require__("veZ4"),__WEBPACK_IMPORTED_MODULE_17__components_UnitSelect__=__webpack_require__("Sd19"),__WEBPACK_IMPORTED_MODULE_18__utils_tools__=__webpack_require__("GKmE"),__WEBPACK_IMPORTED_MODULE_19__api_sendBeanApi__=__webpack_require__("loXm"),__WEBPACK_IMPORTED_MODULE_20__components_DetailApproveFlow__=__webpack_require__("EB+w");__webpack_exports__.a={inject:["reload"],components:{DetailApproveFlow:__WEBPACK_IMPORTED_MODULE_20__components_DetailApproveFlow__.a,btnInput:__WEBPACK_IMPORTED_MODULE_6__components_btnInput_vue__.a,dialogChooseParts:__WEBPACK_IMPORTED_MODULE_11__components_System_dialogChooseParts_vue__.a,dialogChooseSingleUser:__WEBPACK_IMPORTED_MODULE_8__components_System_dialogChooseSingleUser__.a,dialogChooseSingleSupplier:__WEBPACK_IMPORTED_MODULE_10__components_System_dialogChooseSingleSuppliers__.a,printOutsourcingContract:__WEBPACK_IMPORTED_MODULE_13__contract_printOutsourcingContract_vue__.a,dialogImportOutsourcingContract:__WEBPACK_IMPORTED_MODULE_12__contract_dialogImportOutsourcingContract__.a,dialogChooseSingleBom:__WEBPACK_IMPORTED_MODULE_9__components_System_dialogChooseSingleBom__.a,upload:__WEBPACK_IMPORTED_MODULE_16__components_System_upload__.a,unitSelect:__WEBPACK_IMPORTED_MODULE_17__components_UnitSelect__.a},data:function(){return{printDirection:1,printTypeList:[],progressList:[],approveState:-1,proId:"",proName:"",addTyp:0,userInfo:"",config:__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a,editId:"",auditStatus:"",initiate_auditStatus:"",closeStatus:"",canChange:!1,itemIds:[],payIds:[],formData:{invoicedAmount:0,uninvoicedAmount:0,contractDate:Object(__WEBPACK_IMPORTED_MODULE_5__utils_tools_js__.c)(),supplierName:"",supplierId:"",contractType:265},currentChildIndex:"",chooseBomVisible:!1,isDisabled:!1,chooseParts:[],chooseParts2:[],contractTypeList:[],ruleForm:{supplierName:[{required:!0,message:"请选择供应商",trigger:"change"}],purchasePersonName:[{required:!0,message:"请选择采购员",trigger:"change"}],deptName:[{required:!1,message:"请选择采购部门",trigger:"change"}],contractExpireDate:[{required:!0,message:"请选择合同有效期",trigger:"change"}],contractDate:[{required:!0,message:"请选择合同日期",trigger:"change"}]},model:{rules:{count:{required:!0,message:"加工数量必填",trigger:"change"},taxUnitPrice:{required:!0,message:"含税单价必填",trigger:"change"},taxAmount:{required:!0,message:"含税金额必填",trigger:"change"},taxRate:{required:!0,message:"税率必填",trigger:"change"}},childList:[]},model2:{rules:{payableDate:{required:!0,message:"应付日期必填",trigger:"change"}},childList:[]},rulesForm1:{closeReason:[{required:!0,message:"关闭原因必填",trigger:"blur"}]},formData1:{},uploadAttachment:[],contentAssocList:[],childListLoading:!1,currentIndex:0,truelabel:1,falselabel:0,advanceQueryDialogVisible:!0,ChooseImport:!1,ChooseMaterielVisible:!1,chooseUserVisible:!1,dialogLoading1:!1,dialogVisible:!1,chooseSupplierVisible:!1,btnDelDisabled:!0,btnDelDisabled2:!0,headDetail:{},printDetail:{unit_name0:"",address0:"",company_phone0:"",unit_name:"",address:"",company_phone:"",remarks:[]},printTotal:{count:"",amount:""},printList:[],printForm:[{title:"物料代码",prop_:"serialNo"},{title:"物料名称",prop_:"materielName"},{title:"规格型号",prop_:"specification"},{title:"辅助单位",prop_:"materielSupportUomName"},{title:"加工数量",prop_:"subQuoteCount"},{title:"加工单价",prop_:"taxUnitPrice"},{title:"金额",prop_:"taxAmount"},{title:"交货日期",prop_:"deliveryDatePrint"}],printTotal2:{payableAmount:""},printList2:[],printForm2:[{title:"应付日期",prop_:"payableDate"},{title:"应付金额",prop_:"payableAmount"},{title:"已付金额",prop_:"paidAmount"},{title:"未付金额",prop_:"unpaidAmount"},{title:"备注",prop_:"remarks"}]}},computed:__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({},Object(__WEBPACK_IMPORTED_MODULE_7_vuex__.c)({})),mounted:function(){var t=this;this.userInfo=JSON.parse(__WEBPACK_IMPORTED_MODULE_15_js_cookie___default.a.get("userInfo")),this.editId=this.$route.query.id,this.initialize(),this.getPrintTypeList(),this.editId?this.getDetail():(this.$set(this.formData,"purchasePersonName",this.userInfo.name),this.$set(this.formData,"purchasePerson",this.userInfo.userId),this.$set(this.formData,"deptName",this.userInfo.deptName),this.$set(this.formData,"deptId",this.userInfo.deptId)),"change"==this.$route.query.from&&(this.canChange=!0),this.$api.companyAPI.detail().then(function(e){0===e.code&&(t.printDetail.unit_name0=e.result.name,t.printDetail.address0=e.result.address,t.printDetail.company_phone0=e.result.mobile)})},methods:__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({},Object(__WEBPACK_IMPORTED_MODULE_7_vuex__.d)({removeTagNav:"tagNav/removeTagNav"}),{getPrintTypeList:function(){var t=this;this.$api.dictAPI.getDictsByType("print_type").then(function(e){0===e.code&&(t.printTypeList=e.datas)}).catch(function(t){})},submitApprove:function(){var t=this;if(this.$route.query.id){var e={mainId:this.$route.query.id,dataType:4};__WEBPACK_IMPORTED_MODULE_19__api_sendBeanApi__.a.submitApprove(e).then(function(e){0===e.code?t.$message.success("操作成功!"):t.$message.error(e.msg),t.getDetail()}).catch(function(t){console.log(t)})}},getCurrentId:function(t){this.proId=t.proId,this.proName=t.proName},closeLine:function(){this.itemIds=[],this.formData1={},this.dialogVisible=!0,void 0!==this.$refs.form1&&this.$refs.form1.resetFields()},save1:function(t){var e=this;this.$refs[t].validate(function(t){if(t){if(e.chooseParts){var a=[];e.chooseParts.forEach(function(t){a.push(t.id);var o=e.model.childList.findIndex(function(e){if(e.id==t.id)return!0});e.model.childList.splice(o,1),e.itemIds=a})}e.$api.outsourcingAPI.closeLine({ids:e.itemIds,closeReason:e.formData1.closeReason}).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.dialogVisible=!1,e.getDetail()):e.$message({message:t.msg,type:"error"})}).catch(function(t){e.$message({message:res.msg,type:"success"})})}})},changeCount:function(t){if(t.subQuoteCount&&t.taxUnitPrice?t.taxAmount=parseFloat((parseFloat(t.subQuoteCount)*parseFloat(t.taxUnitPrice)).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo)):t.taxAmount=0,t.error_count){for(var e=0,a=0;a<this.model.childList.length;a++)t.error_count&&t.sourceId==this.model.childList[a].sourceId&&(e=parseFloat(e)+parseFloat(this.model.childList[a].count));parseFloat(t.sourceCount)>=e&&this.model.childList.forEach(function(e){e.sourceId==t.sourceId&&delete e.error_count})}},changeTaxAmount:function(t){t.subQuoteCount&&t.taxAmount?(t.taxUnitPrice=parseFloat((parseFloat(t.taxAmount)/parseFloat(t.subQuoteCount)).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.priceFixedTo)),t.unitPrice=parseFloat((parseFloat(t.taxUnitPrice)/(1+t.taxRate/100)).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.priceFixedTo))):t.taxUnitPrice=0},changeTaxUnitPrice:function(t){t.subQuoteCount&&t.taxUnitPrice?(t.unitPrice=parseFloat((t.taxUnitPrice/(1+t.taxRate/100)).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.priceFixedTo)),t.taxAmount=parseFloat((t.subQuoteCount*t.taxUnitPrice).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo))):(t.unitPrice=0,t.taxAmount=0)},back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.push({path:"/outsourcing/outsourcing_contract_index",query:{t:Date.now()}})},getDetail:function(){var t=this;this.childListLoading=!0,this.$nextTick().then(function(){t.$api.outsourcingAPI.outsourcingContractDetail({outsourcingContractId:t.editId}).then(function(e){if(t.childListLoading=!1,0===e.code){if(t.formData=__WEBPACK_IMPORTED_MODULE_3_babel_runtime_core_js_object_assign___default()({},e.outsourcingContract),t.formData.invoicedAmount=t.formData.invoicedAmount?t.formData.invoicedAmount:0,t.formData.uninvoicedAmount=t.formData.uninvoicedAmount?t.formData.uninvoicedAmount:0,t.auditStatus=t.formData.auditSign,t.initiate_auditStatus=t.formData.auditSign,t.closeStatus=t.formData.closeStatus,t.$set(t.headDetail,"createByName",e.outsourcingContract.createByName),t.$set(t.headDetail,"createTime",e.outsourcingContract.createTime),t.$set(t.headDetail,"auditorName",e.outsourcingContract.auditorName),t.$set(t.headDetail,"auditTime",e.outsourcingContract.auditTime),t.$set(t.headDetail,"contractCode",e.outsourcingContract.contractCode),t.$set(t.headDetail,"closeStatusName",e.outsourcingContract.closeStatusName),t.approveState=e.outsourcingContract.approveState,0!==t.approveState&&(t.progressList=e.progressList),t.model.childList=e.outsourcingContractItemList,t.model.childList.forEach(function(e){t.$set(e,"onlyId",e.materielId+"_"+Math.random()),t.$set(e,"serialNo",e.materielSerialNo?e.materielSerialNo:""),e.deliveryDatePrint=Object(__WEBPACK_IMPORTED_MODULE_18__utils_tools__.i)(e.deliveryDate,"{y}-{m}-{d}")}),t.model2.childList=e.outsourcingContractPayList,t.model2.childList.forEach(function(e){t.$set(e,"onlyId",e.id+"_"+Math.random())}),e.uploadAttachment&&e.uploadAttachment.length>0){t.fileDocList=[];for(var a=0;a<e.uploadAttachment.length;a++){var o={fileName:e.uploadAttachment[a].fileName,filePath:e.uploadAttachment[a].filePath};t.uploadAttachment.push(o)}}t.printList=JSON.parse(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_json_stringify___default()(t.model.childList)),t.printList2=JSON.parse(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_json_stringify___default()(t.model2.childList)),t.printDetail.contractDate=e.outsourcingContract.contractDate.split(" ")[0],t.printDetail.contractExpireDate=e.outsourcingContract.contractExpireDate.split(" ")[0],t.printDetail.contractCode=e.outsourcingContract.contractCode,t.$api.supplierAPI.groupDetail(t.formData.supplierId).then(function(e){0==e.code&&(t.printDetail.unit_name=e.data.unit_name,t.printDetail.address=e.data.address,t.printDetail.company_phone=e.data.company_phone,t.$forceUpdate())}).catch(function(t){})}})}).catch(function(e){t.childListLoading=!1})},getUser:function(t){t?(this.$set(this.formData,"purchasePersonName",t.name),this.$set(this.formData,"purchasePerson",t.id),this.$set(this.formData,"deptName",t.deptName),this.$set(this.formData,"deptId",t.deptId)):(this.$set(this.formData,"purchasePersonName",""),this.$set(this.formData,"purchasePerson",""),this.$set(this.formData,"deptId",""))},getSupplier:function(t){t?(this.$set(this.formData,"supplierId",t.id),this.$set(this.formData,"supplierName",t.name),this.$set(this.formData,"purchasePersonName",t.belongSalesmanName?t.belongSalesmanName:this.userInfo.name),this.$set(this.formData,"purchasePerson",t.belongSalesman?t.belongSalesman:this.userInfo.userId),this.$set(this.formData,"deptName",t.belongDeptName?t.belongDeptName:this.userInfo.deptName),this.$set(this.formData,"deptId",t.belongDept?t.belongDept:this.userInfo.deptId)):(this.$set(this.formData,"supplierId",""),this.$set(this.formData,"supplierName",""))},getSummaries:function(t){for(var e=t.columns,a=t.data,o=0,i=0;i<a.length;i++)o+=a[i].count;this.printTotal.count=o.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.countFixedTo);for(var r=0,s=0;s<a.length;s++)parseFloat(a[s].taxUnitPrice)*parseFloat(a[s].subQuoteCount)&&(r+=parseFloat(a[s].taxUnitPrice)*parseFloat(a[s].subQuoteCount));this.formData.uninvoicedAmount=(r-this.formData.invoicedAmount).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo),this.printTotal.taxAmount=r.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo);for(var n=0,l=0;l<a.length;l++)parseFloat(a[l].subQuoteCount)*(parseFloat(a[l].taxUnitPrice)/(1+parseFloat(a[l].taxRate)/100))&&(n+=parseFloat(a[l].subQuoteCount)*(parseFloat(a[l].taxUnitPrice)/(1+parseFloat(a[l].taxRate)/100)));this.printTotal.amount=n.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo);for(var _=0,c=0;c<a.length;c++)parseFloat(a[c].subQuoteCount)*(parseFloat(a[c].taxUnitPrice)/(1+parseFloat(a[c].taxRate)/100))*(parseFloat(a[c].taxRate)/100)&&(_+=parseFloat(a[c].subQuoteCount)*(parseFloat(a[c].taxUnitPrice)/(1+parseFloat(a[c].taxRate)/100))*(parseFloat(a[c].taxRate)/100));this.printTotal.taxes=_.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo);var u=[];return e.forEach(function(t,e){if(13!==e)if(16!==e)if(17!==e)if(0!==e)if(8===e||11===e||13===e||16===e||17===e){var o=a.map(function(e){return Number(e[t.property])});o.every(function(t){return isNaN(t)})?u[e]="":u[e]=o.reduce(function(t,e){var a=Number(e);return isNaN(a)?t:t+e},0),8!==e&&11!==e||u[e]&&(u[e]=u[e].toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.countFixedTo))}else u[e]="";else u[e]="合计";else u[e]=_.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo);else u[e]=n.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo);else u[e]=r.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo)}),u},getSummaries2:function(t){for(var e=this,a=t.columns,o=t.data,i=[],r=0,s=0;s<o.length;s++)r+=parseFloat(parseFloat(o[s].payableAmount)-parseFloat(o[s].paidAmount));return a.forEach(function(t,a){if(0!==a)if(2==a||3==a||4==a)if(4!=a){for(var s=0,n=0;n<o.length;n++)s+=o[n].payableAmount;e.printTotal2.payableAmount=s.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo);var l=o.map(function(e){return Number(e[t.property])});l.every(function(t){return isNaN(t)})?i[a]="":i[a]=l.reduce(function(t,e){var a=Number(e);return isNaN(a)?t:t+e},0),2!=a||i[a]&&(i[a]=i[a].toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo))}else i[a]=r.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo);else i[a]="";else i[a]="合计"}),i},setCalculate:function(t,e,a,o,i){return t&&e?"unitPrice"==i?(parseFloat(e)/(1+parseFloat(a)/100)).toFixed(o):"taxAmount"==i?(parseFloat(e)*parseFloat(t)).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo):"amount"==i?(parseFloat(t)*(parseFloat(e)/(1+parseFloat(a)/100))).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo):"taxes"==i?(parseFloat(t)*(parseFloat(e)/(1+parseFloat(a)/100))*(parseFloat(a)/100)).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo):void 0:0},setCalculateunpaidAmount:function(t,e){return(parseFloat(t)-parseFloat(e)).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo)},getMateriel:function(t){var e=this;t&&t.forEach(function(t){e.$set(t,"isCheck",0),e.$set(t,"taxUnitPrice",0),e.$set(t,"count",0),e.$set(t,"materielName",t.name?t.name:0),e.$set(t,"materielId",t.id),e.$set(t,"onlyId",t.id+"_"+Date.now()),e.$set(t,"taxRate",t.taxPercent?t.taxPercent:0),delete t.id,e.model.childList.push(t),e.addTyp=1})},getBom:function(t){console.log(t),t&&(this.$set(this.model.childList[this.currentChildIndex],"bomSerialNo",t.bomSerialno),this.$set(this.model.childList[this.currentChildIndex],"bomId",t.bomId))},addChild2:function(){var t={payableAmount:0,paidAmount:0,unpaidAmount:0,onlyId:Date.now()};this.model2.childList.push(t)},getImport:function(t){var e=this;t&&t.forEach(function(t){var a="",o="",i="";t.materielName?(a=t.materielName,o=t.materielSerialNo,i=t.code,t.count):t.materialName&&(a=t.materialName,o=t.materialSerialNo,i=t.feedingNo,t.availableCount),e.$set(t,"taxRate",t.taxRate?t.taxRate:0),e.$set(t,"isCheck",0),e.$set(t,"deliveryDate",""),e.$set(t,"taxUnitPrice",t.taxUnitPrice?t.taxUnitPrice:0),e.$set(t,"subQuoteCount",t.subQuoteCount?t.subQuoteCount:0),e.$set(t,"count",t.convCoefficient?parseFloat((t.subQuoteCount*t.convCoefficient).toFixed(t.quantityAccuracy)):0),e.$set(t,"materielName",a),e.$set(t,"serialNo",o),e.$set(t,"materielId",t.materielId),e.$set(t,"onlyId",t.id+"_"+Date.now()),e.$set(t,"sourceId",t.id),e.$set(t,"sourceCode",i),t.thisSourceType&&(e.$set(t,"sourceTypeName",t.thisSourceTypeName?t.thisSourceTypeName:""),e.$set(t,"sourceType",t.thisSourceType)),delete t.id,e.model.childList.push(t),e.addTyp=2})},initialize:function(){var t=this;__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_promise___default.a.all([this.$api.gylCommonAPI.getDictsByType({type:"outsourcing_contract_type"})]).then(function(e){var a=__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_slicedToArray___default()(e,1)[0];0===a.code&&(t.contractTypeList=a.datas)}).catch(function(t){})},auditStatusChange:function(){var t=this;this.$confirm("确定审核吗?","提示",{type:"warning"}).then(function(){t.$api.outsourcingAPI.outsourcingContractAudit({id:t.editId}).then(function(e){0===e.code?(t.$message({type:"success",message:"审核成功!"}),t.getDetail()):t.$message({message:e.msg,type:"error"})})}).catch(function(){t.$message({type:"info",message:"已取消"})})},reverseAuditChange:function(){var t=this;this.$confirm("确定反审核吗?","提示",{type:"warning"}).then(function(){t.$api.outsourcingAPI.outsourcingContractReverseAudit({id:t.editId}).then(function(e){0===e.code?(t.$message({type:"success",message:"反审核成功!"}),t.getDetail()):t.$message({message:e.msg,type:"error"})})}).catch(function(){t.$message({type:"info",message:"已取消"})})},close:function(){var t=this;this.$confirm("确定"+this.config.closeContractText+"吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(function(){t.$api.outsourcingAPI.outsourcingContractClose({id:t.editId}).then(function(e){0===e.code?(t.$message({type:"success",message:e.msg}),t.getDetail()):t.$message({message:e.msg,type:"error"})})}).catch(function(){t.$message({type:"info",message:"已取消"})})},disClose:function(){var t=this;this.$confirm("确定"+this.config.openContractText+"吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(function(){t.$api.outsourcingAPI.outsourcingContractReverseClose({id:t.editId}).then(function(e){0===e.code?(t.$message({type:"success",message:e.msg}),t.getDetail()):t.$message({message:e.msg,type:"error"})})}).catch(function(){t.$message({type:"info",message:"已取消"})})},change:function(){this.$router.push({path:"/outsourcing/outsourcing_contract_toAlteration",query:{t:Date.now(),id:this.editId,from:"change"}})},save:function(){var t=this,e=void 0,a=void 0;this.$refs.formChild.validate(function(t,a){e=t}),this.$refs.formChild2.validate(function(t,e){a=t}),this.$refs.form.validate(function(o){if(!o)return!1;if(null!=t.uploadAttachment&&t.uploadAttachment.length>0){var i=[];t.uploadAttachment.forEach(function(t){var e={fileName:t.fileName,filePath:t.filePath};i.push(e)}),t.contentAssocList=__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_json_stringify___default()(i),console.log(t.contentAssocList)}if(0!=t.model.childList.length)if(0!=t.model2.childList.length)if(e&&a){var r=!0;if(265==t.formData.contractType&&t.model.childList.forEach(function(t){t.bomId||(r=!1)}),r){var s=!0,n=0;if(t.model2.childList.forEach(function(t){n+=t.payableAmount,t.payableAmount<parseFloat(t.paidAmount)&&(s=!1)}),s)if(n==t.printTotal.taxAmount)if(t.printTotal.taxAmount<t.formData.invoicedAmount)t.$message({message:"含税总金额不能小于已开票金额",type:"warning"});else{var l=!0;if(t.model.childList.forEach(function(t){t.subQuoteCount<=0&&(l=!1)}),l){var _=[];t.model.childList.forEach(function(e){var a={materielId:e.materielId,isCheck:e.isCheck?e.isCheck:0,isQuota:e.isQuota?e.isQuota:0,count:e.count.toFixed(e.quantityAccuracy),supportUom:e.materielSupportUom,convCoefficient:e.materielConv,processCount:e.subQuoteCount.toFixed(e.quantityAccuracy),taxUnitPrice:e.taxUnitPrice.toFixed(e.priceAccuracy),taxRate:e.taxRate.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.taxRateFixedTo),taxAmount:Number(e.taxAmount).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo),unitPrice:t.setCalculate(e.subQuoteCount,e.taxUnitPrice,e.taxRate,e.priceAccuracy,"unitPrice"),amount:t.setCalculate(e.subQuoteCount,e.taxUnitPrice,e.taxRate,"amount"),taxes:t.setCalculate(e.subQuoteCount,e.taxUnitPrice,e.taxRate,"taxes"),deliveryDate:e.deliveryDate?e.deliveryDate:"",remarks:e.remarks?e.remarks:""};e.bomId&&(a.bomId=e.bomId),e.sourceId&&(a.sourceId=e.sourceId,a.sourceType=e.sourceType?e.sourceType:"",a.sourceCode=e.sourceCode?e.sourceCode:""),e.id&&(a.id=e.id),_.push(a)});var c=[];t.model2.childList.forEach(function(t){var e={payableAmount:t.payableAmount.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo),paidAmount:t.paidAmount.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo),unpaidAmount:(parseFloat(t.payableAmount)-parseFloat(t.paidAmount)).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo),remarks:t.remarks?t.remarks:"",paymentTerm:t.paymentTerm?t.paymentTerm:""};t.payableDate&&(e.payableDate=t.payableDate),t.id&&(e.id=t.id),c.push(e)});var u={uninvoicedAmount:t.formData.uninvoicedAmount,purchasePerson:t.formData.purchasePerson,supplierId:t.formData.supplierId?t.formData.supplierId:"",contractType:t.formData.contractType,contractExpireDate:t.formData.contractExpireDate,contractDate:t.formData.contractDate,bodyItem:__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_json_stringify___default()(_),bodyPay:__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_json_stringify___default()(c),itemIds:t.itemIds,payIds:t.payIds,uploadAttachment:t.contentAssocList,supplierContractCode:t.formData.supplierContractCode?t.formData.supplierContractCode:"",remarks:t.formData.remarks?t.formData.remarks:""};t.editId&&(u.id=t.editId),t.isDisabled||(t.isDisabled=!0,t.$api.outsourcingAPI.outsourcingContractAddOrUpdate(u).then(function(e){t.isDisabled=!1,0===e.code?(t.editId||(t.editId=e.id,window.location.href=t.changeURLArg("id",e.id)),t.getDetail(),t.$message({message:e.msg,type:"success"})):500===e.code&&e.data?(t.$message({message:e.msg,type:"error"}),t.model.childList.forEach(function(a){a.sourceId&&a.sourceId==e.data.sourceId&&(t.$set(a,"error_count",!0),t.$set(a,"sourceCount",e.data.sourceCount))})):t.$message({message:e.msg,type:"error"})}))}else t.$message({message:"加工数量必须大于0",type:"warning"})}else t.$message({message:"含税总金额必须等于应付总金额",type:"warning"});else t.$message({message:"应付金额不能小于已付金额",type:"warning"})}else t.$message({message:"合同类型为产品委外时,BOM编号必填",type:"warning"})}else t.$message({message:"有必填项未填写",type:"warning"});else t.$message({message:"请添加合同付款条件",type:"warning"});else t.$message({message:"请添加物料",type:"warning"})})},changeURLArg:function changeURLArg(arg,arg_val){var url=window.location.href,pattern=arg+"=([^&]*)",replaceText=arg+"="+arg_val;if(url.match(pattern)){var tmp="/("+arg+"=)([^&]*)/gi";return tmp=url.replace(eval(tmp),replaceText),tmp}return url.match("[?]")?url+"&"+replaceText:url+"?"+replaceText},new_save:function(){var t=this;this.advanceQueryDialogVisible=!1,this.$nextTick(function(){t.uploadAttachment=[],t.contentAssocList=[],t.formData={invoicedAmount:0,uninvoicedAmount:0,contractDate:Object(__WEBPACK_IMPORTED_MODULE_5__utils_tools_js__.c)(),contractType:265},t.$set(t.formData,"purchasePersonName",t.userInfo.name),t.$set(t.formData,"purchasePerson",t.userInfo.userId),t.$set(t.formData,"deptName",t.userInfo.deptName),t.$set(t.formData,"deptId",t.userInfo.deptId),t.$set(t.formData,"invoicedAmount",0),t.$set(t.formData,"uninvoicedAmount",0),t.$set(t.formData,"contractDate",Object(__WEBPACK_IMPORTED_MODULE_5__utils_tools_js__.c)()),t.headDetail={},t.auditStatus="",t.initiate_auditStatus="",t.model.childList=[],t.model2.childList=[],t.itemIds=[],t.payIds=[],t.editId&&(t.editId=void 0),t.$refs.form.resetFields(),t.advanceQueryDialogVisible=!0})},lookChange:function(){this.$router.push({path:"/outsourcing/outsourcing_contract_alteration",query:{t:Date.now(),id:this.editId}})},removePart:function(){var t=this;this.chooseParts&&this.chooseParts.forEach(function(e){var a=t.model.childList.findIndex(function(a){if(a.onlyId==e.onlyId)return a.id&&t.itemIds.push(a.id),!0});t.model.childList.splice(a,1)})},removePart2:function(){var t=this;this.chooseParts2&&this.chooseParts2.forEach(function(e){var a=t.model2.childList.findIndex(function(a){if(a.onlyId==e.onlyId)return a.id&&t.payIds.push(a.id),!0});t.model2.childList.splice(a,1)})},setBtn:function(t){var e=!0;e=!(t.length>0),this.btnDelDisabled=e},setBtn2:function(t){var e=!0;e=!(t.length>0),this.btnDelDisabled2=e},handlePartChange:function(t){this.chooseParts=t,this.setBtn(t)},handlePartChange2:function(t){this.chooseParts2=t,this.setBtn2(t)},print:function(){document.getElementById("print_content").style.display="block",this.printList=JSON.parse(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_json_stringify___default()(this.printList)),this.printList2=JSON.parse(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_json_stringify___default()(this.printList2)),this.$nextTick(function(){var t=document.getElementById("print_content").innerHTML;return document.body.innerHTML="<html><head><title>打印</title></head><body>"+t+"</body></html>",window.print(),window.location.reload(),!1})},printNew:function(t){var e=void 0;10184===t.id?(this.printDirection=0,e="<style>@page{size: 794px 1123px;}</style></body></html>"):10185===t.id?(this.printDirection=1,e="<style>@page{size: 794px 562px;}</style></body></html>"):10186===t.id&&(this.printDirection=2,e="<style>@page{size: 794px 475px;}</style></body></html>"),document.getElementById("print_content").style.display="block",this.printList=JSON.parse(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_json_stringify___default()(this.printList)),this.$nextTick(function(){var t=document.getElementById("print_content").innerHTML;return document.body.innerHTML="<html><head><title>打印</title><style>@page:right{@bottom-left {content: 'ces'}}</style></head><body>"+t+e,window.print(),window.location.reload(),!1})},changeCount2:function(t,e){e&&this.$message({message:"你已改变系数,库存可能会出现主辅单位数量和系数冲突,请确认后再修改!",type:"warning",duration:4e3}),isNaN(t.materielConv)||isNaN(t.subQuoteCount)?t.count=0:t.count=parseFloat((parseFloat(t.materielConv)*parseFloat(t.subQuoteCount)).toFixed(t.quantityAccuracy)),this.changeCount(t)},getValue:function(t){this.model.childList[t.index].materielSupportUom=t.value}}),watch:{formData:{handler:function(t,e){if(t)for(var a=t.remarks.split("\n"),o=0;o<a.length;o++)this.printDetail.remarks[o]=a[o]},deep:!0},closeStatus:function(t){0==t&&179==this.auditStatus?this.canChange=!0:1==t&&(this.canChange=!1)},currentIndex:function(t){this.currentChildIndex=t},auditStatus:function(t,e){if(179==t&&0==this.closeStatus){var a=new Date;if(178==e){var o=a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()+" "+a.getHours()+":"+a.getMinutes()+":"+a.getSeconds();this.headDetail.auditorName=this.userInfo.name,this.headDetail.auditTime=o}this.canChange=!0}else 178==t&&(this.canChange=!1)}}}},wniM:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("bgdx"),i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"sys-box plan-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.back()}}},[t._v(t._s(t.config.cancelText))]),t._v(" "),a("el-dropdown",{staticStyle:{"margin-left":"10px","margin-right":"10px"},on:{command:t.printNew}},[a("el-button",{attrs:{type:"primary"}},[t._v("\n 打印"),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.printTypeList,function(e,o){return a("el-dropdown-item",{key:o,attrs:{command:e}},[t._v(t._s(e.name)+"\n ")])}),1)],1),t._v(" "),t.auditStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_contract:lookChange",expression:"'outsourcing:outsourcing_contract:lookChange'"}],attrs:{type:"primary"},on:{click:t.lookChange}},[t._v("变更记录")]):t._e()],1),t._v(" "),a("div",{staticClass:"sys-form"},[a("el-form",{ref:"form",attrs:{"label-width":"120px",model:t.formData,rules:t.ruleForm}},[a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"供应商",prop:"supplierName"}},[a("btn-input",{attrs:{valueText:t.formData.supplierName,valueId:t.formData.supplierId,chooseVisible:t.chooseSupplierVisible,showBtn:178==t.auditStatus||!t.editId},on:{"update:valueText":function(e){return t.$set(t.formData,"supplierName",e)},"update:value-text":function(e){return t.$set(t.formData,"supplierName",e)},"update:valueId":function(e){return t.$set(t.formData,"supplierId",e)},"update:value-id":function(e){return t.$set(t.formData,"supplierId",e)},"update:chooseVisible":function(e){t.chooseSupplierVisible=e},"update:choose-visible":function(e){t.chooseSupplierVisible=e}}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"采购员",prop:"purchasePersonName"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formData.purchasePersonName,callback:function(e){t.$set(t.formData,"purchasePersonName",e)},expression:"formData.purchasePersonName"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"采购部门",prop:"deptName"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formData.deptName,callback:function(e){t.$set(t.formData,"deptName",e)},expression:"formData.deptName"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"合同类型",clearable:""}},[a("el-select",{attrs:{disabled:!(178==t.auditStatus||!t.editId),placeholder:"请选择"},model:{value:t.formData.contractType,callback:function(e){t.$set(t.formData,"contractType",e)},expression:"formData.contractType"}},t._l(t.contractTypeList,function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"合同日期",prop:"contractDate"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{disabled:!(178==t.auditStatus||!t.editId),type:"date",placeholder:"选择合同日期",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd"},model:{value:t.formData.contractDate,callback:function(e){t.$set(t.formData,"contractDate",e)},expression:"formData.contractDate"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"合同有效期",prop:"contractExpireDate"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{disabled:!(178==t.auditStatus||!t.editId),type:"date",placeholder:"选择合同有效期",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd"},model:{value:t.formData.contractExpireDate,callback:function(e){t.$set(t.formData,"contractExpireDate",e)},expression:"formData.contractExpireDate"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"合同编号"}},[a("el-input",{attrs:{placeholder:"自动生成",disabled:""},model:{value:t.formData.contractCode,callback:function(e){t.$set(t.formData,"contractCode",e)},expression:"formData.contractCode"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"供应商合同编号"}},[a("el-input",{attrs:{disabled:!(178==t.auditStatus||!t.editId)},model:{value:t.formData.supplierContractCode,callback:function(e){t.$set(t.formData,"supplierContractCode",e)},expression:"formData.supplierContractCode"}})],1)],1)]),t._v(" "),a("el-divider",{attrs:{"content-position":"left"}},[t._v("物料列表")]),t._v(" "),a("el-form",{ref:"formChild",attrs:{rules:t.model.rules,model:t.model}},[178!=t.auditStatus&&t.editId?t._e():a("div",{staticClass:"sys-operate",staticStyle:{"margin-bottom":"10px"}},[a("el-button",{attrs:{type:"primary",disabled:0!=t.addTyp&&1!=t.addTyp&&0!=t.model.childList.length},on:{click:function(e){t.ChooseMaterielVisible=!0}}},[t._v("新增")]),t._v(" "),a("el-button",{attrs:{type:"primary",disabled:0!=t.addTyp&&2!=t.addTyp&&0!=t.model.childList.length},on:{click:function(e){t.ChooseImport=!0}}},[t._v("导入关联单据")]),t._v(" "),a("el-button",{attrs:{type:"primary",disabled:t.btnDelDisabled},on:{click:function(e){return t.removePart()}}},[t._v("删除")])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.childListLoading,expression:"childListLoading"}],attrs:{data:t.model.childList,"show-summary":"","summary-method":t.getSummaries,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"},border:""},on:{"selection-change":t.handlePartChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"serialNo",label:"物料代码",align:"center","show-overflow-tooltip":"","label-class-name":"required_head"}}),t._v(" "),a("el-table-column",{attrs:{prop:"materielName",label:"物料名称",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"specification",align:"center","show-overflow-tooltip":"",label:"规格型号"}}),t._v(" "),a("el-table-column",{staticClass:"form-inline",attrs:{label:"是否检验",prop:"isCheck",width:"60"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-checkbox",{staticClass:"child_check",attrs:{disabled:!(178==t.auditStatus||!t.editId),"true-label":t.truelabel,"false-label":t.falselabel},model:{value:e.row.isCheck,callback:function(a){t.$set(e.row,"isCheck",a)},expression:"scope.row.isCheck"}})]}}])}),t._v(" "),a("el-table-column",{staticClass:"form-inline",attrs:{label:"BOM编号",prop:"bomSerialNo",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("btn-input",{attrs:{valueText:e.row.bomSerialNo,valueId:e.row.bomId,proId:e.row.materielId,proName:e.row.materielName,chooseVisible:t.chooseBomVisible,currentIndex:t.currentChildIndex,index:e.$index,showBtn:178==t.auditStatus||!t.editId},on:{"update:valueText":function(a){return t.$set(e.row,"bomSerialNo",a)},"update:value-text":function(a){return t.$set(e.row,"bomSerialNo",a)},"update:valueId":function(a){return t.$set(e.row,"bomId",a)},"update:value-id":function(a){return t.$set(e.row,"bomId",a)},"update:proId":function(a){return t.$set(e.row,"materielId",a)},"update:pro-id":function(a){return t.$set(e.row,"materielId",a)},"update:proName":function(a){return t.$set(e.row,"materielName",a)},"update:pro-name":function(a){return t.$set(e.row,"materielName",a)},"update:chooseVisible":function(e){t.chooseBomVisible=e},"update:choose-visible":function(e){t.chooseBomVisible=e},"update:currentIndex":function(e){t.currentChildIndex=e},"update:current-index":function(e){t.currentChildIndex=e},getCurrentId:t.getCurrentId}})]}}])}),t._v(" "),a("el-table-column",{staticClass:"form-inline",attrs:{label:"是否限额发料",prop:"isQuota",width:"60"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-checkbox",{staticClass:"child_check",attrs:{disabled:!(178==t.auditStatus||!t.editId),"true-label":t.truelabel,"false-label":t.falselabel},model:{value:e.row.isQuota,callback:function(a){t.$set(e.row,"isQuota",a)},expression:"scope.row.isQuota"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"unitUomName",align:"center","show-overflow-tooltip":"",label:"主计量单位"}}),t._v(" "),a("el-table-column",{attrs:{prop:"count",align:"center",width:"180",label:"主单位数量","label-class-name":"required_head"}}),t._v(" "),a("el-table-column",{attrs:{prop:"supportUom",align:"center",width:"140","show-overflow-tooltip":"",label:"辅助单位"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("unitSelect",{attrs:{unitUom:e.row.materielSupportUom,index:e.$index,disabled:!(178===t.auditStatus||!t.editId)},on:{getValue:t.getValue}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"convCoefficient",align:"center",width:"140",label:"换算系数"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small",precision:5,"controls-position":"right",disabled:!(178===t.auditStatus||!t.editId)},on:{change:function(a){return t.changeCount2(e.row,!0)}},model:{value:e.row.materielConv,callback:function(a){t.$set(e.row,"materielConv",a)},expression:"scope.row.materielConv"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"subQuoteCount",align:"center",width:"180",label:"加工数量","label-class-name":"required_head"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form-item",{class:e.row.error_count?"error_count":"",attrs:{prop:"childList."+e.$index+".count",rules:t.model.rules.count}},[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,disabled:!(178===t.auditStatus||!t.editId),size:"small",precision:e.row.quantityAccuracy,"controls-position":"right"},on:{change:function(a){return t.changeCount2(e.row,!1)}},model:{value:e.row.subQuoteCount,callback:function(a){t.$set(e.row,"subQuoteCount",a)},expression:"scope.row.subQuoteCount"}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"taxUnitPrice",align:"center",width:"180",label:"含税单价(元)","label-class-name":"required_head"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form-item",{attrs:{prop:"childList."+e.$index+".taxUnitPrice",rules:t.model.rules.taxUnitPrice}},[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,disabled:!(178==t.auditStatus||!t.editId),size:"small",precision:e.row.priceAccuracy,"controls-position":"right"},on:{change:function(a){return t.changeTaxUnitPrice(e.row)}},model:{value:e.row.taxUnitPrice,callback:function(a){t.$set(e.row,"taxUnitPrice",a)},expression:"scope.row.taxUnitPrice"}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"taxAmount",align:"center",width:"140",label:"含税金额(元)","label-class-name":"required_head"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form-item",{attrs:{prop:"childList."+e.$index+".taxAmount",rules:t.model.rules.taxAmount}},[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,disabled:!(178==t.auditStatus||!t.editId),size:"small","controls-position":"right"},on:{change:function(a){return t.changeTaxAmount(e.row)}},model:{value:e.row.taxAmount,callback:function(a){t.$set(e.row,"taxAmount",a)},expression:"scope.row.taxAmount"}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",width:"120",label:"税率(%)","label-class-name":"required_head"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form-item",{attrs:{prop:"childList."+e.$index+".taxRate",rules:t.model.rules.taxRate}},[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,max:100,disabled:!(178==t.auditStatus||!t.editId),size:"small","controls-position":"right"},model:{value:e.row.taxRate,callback:function(a){t.$set(e.row,"taxRate",a)},expression:"scope.row.taxRate"}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"unitPrice",align:"center",width:"140",label:"不含税单价(元)"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.setCalculate(e.row.subQuoteCount,e.row.taxUnitPrice,e.row.taxRate,e.row.priceAccuracy,"unitPrice")))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"amount",align:"center",width:"140",label:"不含税金额(元)"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.setCalculate(e.row.subQuoteCount,e.row.taxUnitPrice,e.row.taxRate,e.row.priceAccuracy,"amount")))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"taxes",align:"center",width:"140",label:"税额(元)"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.setCalculate(e.row.subQuoteCount,e.row.taxUnitPrice,e.row.taxRate,e.row.priceAccuracy,"taxes")))])]}}])}),t._v(" "),a("el-table-column",{staticClass:"form-inline",attrs:{label:"交货日期",prop:"deliveryDate",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form-item",[a("el-date-picker",{attrs:{disabled:!(178==t.auditStatus||!t.editId),format:"yyyy-MM-dd","value-format":"yyyy-MM-dd",type:"datetime",clearable:""},model:{value:e.row.deliveryDate,callback:function(a){t.$set(e.row,"deliveryDate",a)},expression:"scope.row.deliveryDate"}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"sourceTypeName",align:"center",label:"源单类型",width:"100px"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.sourceTypeName?a("div",{staticStyle:{color:"#3a8ee6"}},[t._v(t._s(e.row.sourceTypeName))]):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"sourceCode","show-overflow-tooltipalign":"",label:"源单单号"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticStyle:{color:"#3a8ee6"}},[t._v(t._s(e.row.sourceCode))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"remarks",align:"center",width:"200",label:"备注"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{disabled:!(178==t.auditStatus||!t.editId),size:"small"},model:{value:e.row.remarks,callback:function(a){t.$set(e.row,"remarks",a)},expression:"scope.row.remarks"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"closeStatusName",align:"center","show-overflow-tooltipalign":"",label:"行关闭状态"}}),t._v(" "),a("el-table-column",{attrs:{prop:"itemCloseTime",align:"center",label:"行关闭时间","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"itemCloseReason",align:"center",label:"行关闭原因","show-overflow-tooltip":""}})],1)],1),t._v(" "),a("el-divider"),t._v(" "),a("el-row",{attrs:{gutter:0}},[a("el-col",{attrs:{span:12}},[a("div",{staticClass:"grid-content bg-purple"},[t._v("已开票金额:"+t._s(t.formData.invoicedAmount)+"元")])]),t._v(" "),a("el-col",{attrs:{span:12}},[a("div",{staticClass:"grid-content bg-purple"},[t._v("未开票金额: "),a("span",{staticStyle:{color:"red"}},[t._v(t._s(t.formData.uninvoicedAmount))]),t._v("元")])])],1),t._v(" "),a("el-divider",{attrs:{"content-position":"left"}},[t._v("合同付款条件")]),t._v(" "),a("el-form",{ref:"formChild2",attrs:{rules:t.model2.rules,model:t.model2}},[a("el-form-item",{staticClass:"childlist"},[178!=t.auditStatus&&t.editId?t._e():a("div",{staticClass:"sys-operate",staticStyle:{"margin-bottom":"10px"}},[a("el-button",{attrs:{type:"primary"},on:{click:t.addChild2}},[t._v("新增")]),t._v(" "),a("el-button",{attrs:{type:"primary",disabled:t.btnDelDisabled2},on:{click:function(e){return t.removePart2()}}},[t._v("删除")])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.childListLoading,expression:"childListLoading"}],attrs:{data:t.model2.childList,"show-summary":"","summary-method":t.getSummaries2,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"},border:""},on:{"selection-change":t.handlePartChange2}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t._v(" "),a("el-table-column",{staticClass:"form-inline",attrs:{label:"应付日期",width:"210",prop:"payableDate","label-class-name":"required_head"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form-item",{attrs:{prop:"childList."+e.$index+".payableDate",rules:t.model2.rules.payableDate}},[a("el-date-picker",{staticStyle:{width:"190px"},attrs:{disabled:!(178==t.auditStatus||!t.editId),format:"yyyy-MM-dd HH:mm:ss","value-format":"yyyy-MM-dd HH:mm:ss",type:"datetime",clearable:""},model:{value:e.row.payableDate,callback:function(a){t.$set(e.row,"payableDate",a)},expression:"scope.row.payableDate"}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"payableAmount",align:"center",width:"150",label:"应付金额(元)"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,disabled:!(178==t.auditStatus||!t.editId),size:"small","controls-position":"right"},model:{value:e.row.payableAmount,callback:function(a){t.$set(e.row,"payableAmount",a)},expression:"scope.row.payableAmount"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"paidAmount",align:"center",width:"150",label:"已付金额(元)"}}),t._v(" "),a("el-table-column",{attrs:{prop:"unpaidAmount",align:"center",width:"150",label:"未付金额(元)"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t.setCalculateunpaidAmount(e.row.payableAmount,e.row.paidAmount)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"amountPaid",align:"center",width:"150",label:"付款方式"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{attrs:{disabled:!(178==t.auditStatus||!t.editId)},model:{value:e.row.paymentTerm,callback:function(a){t.$set(e.row,"paymentTerm",a)},expression:"scope.row.paymentTerm"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"remarks",align:"center",label:"备注"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{disabled:!(178==t.auditStatus||!t.editId),size:"small"},model:{value:e.row.remarks,callback:function(a){t.$set(e.row,"remarks",a)},expression:"scope.row.remarks"}})]}}])})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"remarks"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请简要填写备注内容",disabled:!(178==t.auditStatus||!t.editId)},model:{value:t.formData.remarks,callback:function(e){t.$set(t.formData,"remarks",e)},expression:"formData.remarks"}})],1),t._v(" "),a("el-form-item",{staticClass:"remarkstyle",attrs:{label:"附件"}},[t.advanceQueryDialogVisible?a("upload",{attrs:{title:"",label_width:"0",attachment:t.uploadAttachment},on:{"update:attachment":function(e){t.uploadAttachment=e}}}):t._e()],1),t._v(" "),t.progressList&&t.progressList.length?a("el-form-item",{attrs:{label:"审批流程"}},[a("DetailApproveFlow",{attrs:{tableList:t.progressList}})],1):t._e()],1),t._v(" "),t.editId?a("el-row",[a("el-col",{attrs:{span:4}},[t._v("制单人:"+t._s(t.headDetail.createByName))]),t._v(" "),a("el-col",{attrs:{span:6}},[t._v("制单时间:"+t._s(t.headDetail.createTime))]),t._v(" "),a("el-col",{attrs:{span:4}},[t._v("关闭状态:"+t._s(t.headDetail.closeStatusName))])],1):t._e(),t._v(" "),a("el-dialog",{attrs:{title:"关闭确认",center:"",visible:t.dialogVisible,width:"600px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.dialogLoading1,expression:"dialogLoading1"}],ref:"form1",staticClass:"company-form",attrs:{"label-width":"110px",model:t.formData1,rules:t.rulesForm1}},[a("el-form-item",{attrs:{prop:"closeReason",label:"关闭原因"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autosize:{minRows:1}},model:{value:t.formData1.closeReason,callback:function(e){t.$set(t.formData1,"closeReason",e)},expression:"formData1.closeReason"}})],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.save1("form1")}}},[t._v("保存")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v(t._s(t.config.cancelText))])],1)],1)],1),t._v(" "),a("dialogImportOutsourcingContract",{attrs:{visible:t.ChooseImport},on:{"update:visible":function(e){t.ChooseImport=e},change:t.getImport}}),t._v(" "),a("dialogChooseParts",{attrs:{visible:t.ChooseMaterielVisible},on:{"update:visible":function(e){t.ChooseMaterielVisible=e},change:t.getMateriel}}),t._v(" "),a("dialogChooseSingleBom",{attrs:{visible:t.chooseBomVisible,proId:t.proId,proName:t.proName},on:{"update:visible":function(e){t.chooseBomVisible=e},change:t.getBom,"update:proId":function(e){t.proId=e},"update:pro-id":function(e){t.proId=e}}}),t._v(" "),a("dialogChooseSingleUser",{attrs:{visible:t.chooseUserVisible},on:{"update:visible":function(e){t.chooseUserVisible=e},change:t.getUser}}),t._v(" "),a("dialogChooseSingleSupplier",{attrs:{visible:t.chooseSupplierVisible},on:{"update:visible":function(e){t.chooseSupplierVisible=e},change:t.getSupplier}}),t._v(" "),a("div",{staticStyle:{margin:"0 auto",display:"none"},attrs:{id:"print_content"}},[a("printOutsourcingContract",{attrs:{printDetail:t.printDetail,printList:t.printList,printForm:t.printForm,printTotal:t.printTotal,printList2:t.printList2,printForm2:t.printForm2,printTotal2:t.printTotal2,printDirection:t.printDirection},on:{"update:printDetail":function(e){t.printDetail=e},"update:print-detail":function(e){t.printDetail=e}}})],1)],1)},staticRenderFns:[]};var r=function(t){a("9Hky"),a("MzFz")},s=a("VU/8")(o.a,i,!1,r,"data-v-97529ea0",null);e.default=s.exports}}); |