webpackJsonp([125],{Mt5M:function(t,e){},d5ml:function(t,e){},iwwq:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("tdUu"),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(" "),-1===t.approveState||0===t.approveState||2===t.approveState?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_contract:save",expression:"'outsourcing:outsourcing_contract:save'"}],attrs:{type:"primary",disabled:t.isDisabled},on:{click:t.save}},[t._v("暂存")]):t._e(),t._v(" "),0===t.approveState?a("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"},{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_contract:save",expression:"'outsourcing:outsourcing_contract:save'"}],attrs:{type:"primary",disabled:t.isDisabled},on:{click:t.submitApprove}},[t._v("提交审批")]):t._e(),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.new_save}},[t._v("新增")]),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.editId&&0==t.closeStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_contract:close",expression:"'outsourcing:outsourcing_contract:close'"}],attrs:{type:"primary"},on:{click:t.close}},[t._v(t._s(t.config.closeContractText))]):t.editId&&1==t.closeStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_contract:disClose",expression:"'outsourcing:outsourcing_contract:disClose'"}],attrs:{type:"primary"},on:{click:t.disClose}},[t._v(t._s(t.config.openContractText))]):t._e(),t._v(" "),t.editId&&t.canChange?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_contract:change",expression:"'outsourcing:outsourcing_contract:change'"}],attrs:{type:"primary"},on:{click:t.change}},[t._v("变更")]):t._e(),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(),t._v(" "),179==t.auditStatus&&1!=t.closeStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_contract:closeLine",expression:"'outsourcing:outsourcing_contract:closeLine'"}],attrs:{type:"primary",disabled:t.btnDelDisabled},on:{click:function(e){return t.closeLine()}}},[t._v("行关闭")]):t._e(),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.associatedDocument}},[t._v("关联单据")])],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",{staticClass:"remarkstyle",attrs:{label:"备注",prop:"remarks","label-width":"50px"}},[a("div",{staticClass:"sys-operate mb"},[a("el-button",{attrs:{type:"primary",size:"small",disabled:179==t.auditStatus},on:{click:function(e){t.chooseClauseVisible=!0}}},[t._v("条款选择")])],1),t._v(" "),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("ChooseClause",{attrs:{visible:t.chooseClauseVisible},on:{"update:visible":function(e){t.chooseClauseVisible=e},change:t.getClause}}),t._v(" "),a("dialogChooseSingleSupplier",{attrs:{visible:t.chooseSupplierVisible,dataForm:t.formData,isAdd:!0},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 s=function(t){a("Mt5M"),a("d5ml")},r=a("VU/8")(o.a,i,!1,s,"data-v-4dffd5f0",null);e.default=r.exports},tdUu: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_Dialog_dialogChooseParts_vue__=__webpack_require__("5zN6"),__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_IMPORTED_MODULE_21__components_Dialog_dialogChooseClause__=__webpack_require__("RFai");__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_Dialog_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,ChooseClause:__WEBPACK_IMPORTED_MODULE_21__components_Dialog_dialogChooseClause__.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,remarks:""},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,chooseClauseVisible:!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;if(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)}),this.$route.query.counitsId){var e=this.$route.query.counitsId;this.$api.supplierAPI.groupDetail(e).then(function(e){if(0===e.code){var a=e.data;t.$set(t.formData,"supplierId",a.id),t.$set(t.formData,"supplierName",a.name),t.$set(t.formData,"purchasePersonName",a.belongSalesmanName?a.belongSalesmanName:t.userInfo.name),t.$set(t.formData,"purchasePerson",a.belongSalesman?a.belongSalesman:t.userInfo.userId),t.$set(t.formData,"deptName",a.belongDeptName?a.belongDeptName:t.userInfo.deptName),t.$set(t.formData,"deptId",a.belongDept?a.belongDept:t.userInfo.deptId)}}).catch(function(t){console.log(t)})}},methods:__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({},Object(__WEBPACK_IMPORTED_MODULE_7_vuex__.d)({removeTagNav:"tagNav/removeTagNav"}),{associatedDocument:function(){this.$router.push({path:"/outsourcing/outsourcing_contract_associatedDocument",query:{id:this.editId,clientName:this.formData.supplierName,contractCode:this.formData.contractCode,t:Date.now()}})},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=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;a0){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 s=!0;if(265==t.formData.contractType&&t.model.childList.forEach(function(t){t.bomId||(s=!1)}),s){var r=!0,n=0;if(t.model2.childList.forEach(function(t){n+=t.payableAmount,t.payableAmount0),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="打印"+t+"",window.print(),window.location.reload(),!1})},printNew:function(t){var e=void 0;10184===t.id?(this.printDirection=0,e=""):10185===t.id?(this.printDirection=1,e=""):10186===t.id&&(this.printDirection=2,e=""),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="打印"+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