webpackJsonp([122],{E30c:function(t,e){},LxA8:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("kPMA"),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-button",{attrs:{type:"primary"},on:{click:t.change}},[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("el-input",{attrs:{placeholder:"供应商",clearable:"",readonly:""},model:{value:t.formData.supplierName,callback:function(e){t.$set(t.formData,"supplierName",e)},expression:"formData.supplierName"}},[178!=t.auditStatus&&t.editId?t._e():a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){t.chooseSupplierVisible=!0}},slot:"append"})],1)],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"采购员",prop:"purchasePersonName"}},[a("el-input",{attrs:{placeholder:"采购员",readonly:""},model:{value:t.formData.purchasePersonName,callback:function(e){t.$set(t.formData,"purchasePersonName",e)},expression:"formData.purchasePersonName"}},[178!=t.auditStatus&&t.editId?t._e():a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){t.chooseUserVisible=!0}},slot:"append"})],1)],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"合同类型",clearable:""}},[a("el-select",{attrs:{disabled:"",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:{readonly:"",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:{readonly:"",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:"自动生成",readonly:""},model:{value:t.formData.contractCode,callback:function(e){t.$set(t.formData,"contractCode",e)},expression:"formData.contractCode"}})],1)],1)]),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("el-input",{attrs:{readonly:""},model:{value:e.row.bomSerialNo,callback:function(a){t.$set(e.row,"bomSerialNo",a)},expression:"scope.row.bomSerialNo"}},[178!=t.auditStatus&&t.editId?t._e():a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(a){return t.showBom(e.row,e.$index)}},slot:"append"})],1)]}}])}),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||t.canChange)},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:e.row.quantityAccuracy,"controls-position":"right",disabled:!(178===t.auditStatus||!t.editId||t.canChange)},on:{change:function(a){return t.changeCount2(e.row)}},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||t.canChange),size:"small","controls-position":"right"},on:{change:function(a){return t.changeCount2(e.row)}},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||t.canChange),size:"small","controls-position":"right"},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:{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,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:"taxAmount",align:"center",width:"140",label:"含税金额(元)","label-class-name":"required_head"},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,"taxAmount")))])]}}])}),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,"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,"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,"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 HH:mm:ss","value-format":"yyyy-MM-dd HH:mm:ss",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",label:"行关闭状态","show-overflow-tooltip":""}}),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||t.canChange),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||t.canChange),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:"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)],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},on:{"update:visible":function(e){t.chooseBomVisible=e},change:t.getBom}}),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:!0},on:{"update:printDetail":function(e){t.printDetail=e},"update:print-detail":function(e){t.printDetail=e}}})],1)],1)},staticRenderFns:[]};var s=function(t){a("E30c"),a("VIyh")},r=a("VU/8")(o.a,i,!1,s,"data-v-67736e9e",null);e.default=r.exports},VIyh:function(t,e){},kPMA: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_vuex__=__webpack_require__("NYxO"),__WEBPACK_IMPORTED_MODULE_7__components_System_dialogChooseSingleUser__=__webpack_require__("3MlD"),__WEBPACK_IMPORTED_MODULE_8__components_System_dialogChooseSingleBom__=__webpack_require__("Pzdv"),__WEBPACK_IMPORTED_MODULE_9__components_System_dialogChooseSingleSuppliers__=__webpack_require__("FnMF"),__WEBPACK_IMPORTED_MODULE_10__components_System_dialogChooseParts_vue__=__webpack_require__("CdUU"),__WEBPACK_IMPORTED_MODULE_11__contract_dialogImportOutsourcingContract__=__webpack_require__("IH/o"),__WEBPACK_IMPORTED_MODULE_12__contract_printOutsourcingContract_vue__=__webpack_require__("Em+a"),__WEBPACK_IMPORTED_MODULE_13__utils_config_js__=__webpack_require__("bzuE"),__WEBPACK_IMPORTED_MODULE_14__components_UnitSelect__=__webpack_require__("Sd19"),__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_exports__.a={inject:["reload"],components:{dialogChooseParts:__WEBPACK_IMPORTED_MODULE_10__components_System_dialogChooseParts_vue__.a,dialogChooseSingleUser:__WEBPACK_IMPORTED_MODULE_7__components_System_dialogChooseSingleUser__.a,dialogChooseSingleSupplier:__WEBPACK_IMPORTED_MODULE_9__components_System_dialogChooseSingleSuppliers__.a,printOutsourcingContract:__WEBPACK_IMPORTED_MODULE_12__contract_printOutsourcingContract_vue__.a,dialogImportOutsourcingContract:__WEBPACK_IMPORTED_MODULE_11__contract_dialogImportOutsourcingContract__.a,dialogChooseSingleBom:__WEBPACK_IMPORTED_MODULE_8__components_System_dialogChooseSingleBom__.a,unitSelect:__WEBPACK_IMPORTED_MODULE_14__components_UnitSelect__.a},data:function(){return{addTyp:0,userInfo:"",config:__WEBPACK_IMPORTED_MODULE_13__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)(),contractType:265},currentChildIndex:"",chooseBomVisible:!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:[]},childListLoading:!1,truelabel:1,falselabel:0,ChooseImport:!1,ChooseMaterielVisible:!1,chooseUserVisible:!1,chooseSupplierVisible:!1,btnDelDisabled:!0,btnDelDisabled2:!0,headDetail:{},printDetail:{unit_name0:"",address0:"",company_phone0:"",unit_name:"",address:"",company_phone:""},printTotal:{count:"",amount:""},printList:[],printForm:[{title:"物料代码",prop_:"serialNo"},{title:"物料名称",prop_:"materielName"},{title:"规格型号",prop_:"specification"},{title:"单位",prop_:"unitUomName"},{title:"加工数量",prop_:"count"},{title:"加工单价",prop_:"unitPrice"},{title:"金额",prop_:"amount"},{title:"交货日期",prop_:"deliveryDate"}],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_6_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.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.name,t.printDetail.address0=e.address,t.printDetail.company_phone0=e.mobile)})},methods:__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({},Object(__WEBPACK_IMPORTED_MODULE_6_vuex__.d)({removeTagNav:"tagNav/removeTagNav"}),{changeCount:function(t){if(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})}},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){t.childListLoading=!1,0===e.code&&(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.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:"")}),t.model2.childList=e.outsourcingContractPayList,t.model2.childList.forEach(function(e){t.$set(e,"onlyId",e.id+"_"+Math.random())}),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[0].unit_name,t.printDetail.address=e.data[0].address,t.printDetail.company_phone=e.data[0].company_phone,t.$forceUpdate())}).catch(function(t){}))})}).catch(function(e){t.childListLoading=!1})},showBom:function(t,e){this.currentChildIndex=e,this.chooseBomVisible=!0},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,"supplierId",""),this.$set(this.formData,"supplierName",""))},getSummaries:function(t){for(var e=t.columns,a=t.data,o=0,i=0;i0),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})},changeCount2:function(t){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:{closeStatus:function(t){0==t&&179==this.auditStatus?this.canChange=!0:1==t&&(this.canChange=!1)},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)}}}}});