1 line
37 KiB
JavaScript
1 line
37 KiB
JavaScript
webpackJsonp([41],{"1C/4":function(e,t){},"848q":function(e,t){},k0Ur:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i("nMsJ"),o={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"sys-box plan-box"},[i("div",{staticClass:"sys-operate"},[i("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.back()}}},[e._v(e._s(e.config.cancelText))]),e._v(" "),178!=e.auditStatus&&e.editId?e._e():i("el-button",{directives:[{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_inStock:save",expression:"'outsourcing:outsourcing_inStock:save'"}],attrs:{type:"primary",disabled:e.isDisabled},on:{click:e.save}},[e._v("保存\n ")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.new_save}},[e._v("新增")]),e._v(" "),i("el-dropdown",{staticStyle:{"margin-left":"10px","margin-right":"10px"},on:{command:e.printNew}},[i("el-button",{attrs:{type:"primary"}},[e._v("\n 打印"),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.printTypeList,function(t,a){return i("el-dropdown-item",{key:a,attrs:{command:t}},[e._v(e._s(t.name)+"\n ")])}),1)],1),e._v(" "),e.editId&&178==e.auditStatus?i("el-button",{directives:[{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_inStock:audit",expression:"'outsourcing:outsourcing_inStock:audit'"}],attrs:{type:"primary"},on:{click:function(t){return e.auditStatusChange()}}},[e._v("审核\n ")]):e.editId&&179==e.auditStatus?i("el-button",{directives:[{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_inStock:reverseAudit",expression:"'outsourcing:outsourcing_inStock:reverseAudit'"}],attrs:{type:"primary"},on:{click:function(t){return e.reverseAuditChange()}}},[e._v("反审核\n ")]):e._e()],1),e._v(" "),i("div",{staticClass:"sys-form"},[i("el-form",{ref:"form",attrs:{"label-width":"120px",model:e.formData,rules:e.ruleForm}},[i("div",{staticClass:"flex"},[i("el-form-item",{staticClass:"form-inline",attrs:{label:"供应商",prop:"supplierName"}},[i("btn-input",{attrs:{valueText:e.formData.supplierName,valueId:e.formData.sourceCompany,chooseVisible:e.chooseSupplierVisible,showBtn:179!=e.auditStatus&&0==e.purchaseType||!e.editId&&1==e.purchaseType&&0==e.model.childList.length||1==e.purchaseType&&0==e.model.childList.length},on:{"update:valueText":function(t){return e.$set(e.formData,"supplierName",t)},"update:value-text":function(t){return e.$set(e.formData,"supplierName",t)},"update:valueId":function(t){return e.$set(e.formData,"sourceCompany",t)},"update:value-id":function(t){return e.$set(e.formData,"sourceCompany",t)},"update:chooseVisible":function(t){e.chooseSupplierVisible=t},"update:choose-visible":function(t){e.chooseSupplierVisible=t}}})],1),e._v(" "),i("el-form-item",{staticClass:"form-inline",attrs:{label:"入库日期",prop:"inOutTime"}},[i("el-date-picker",{staticStyle:{width:"100%"},attrs:{disabled:!(178==e.auditStatus||!e.editId),type:"date",placeholder:"选择入库日期",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd"},model:{value:e.formData.inOutTime,callback:function(t){e.$set(e.formData,"inOutTime",t)},expression:"formData.inOutTime"}})],1),e._v(" "),i("el-form-item",{staticClass:"form-inline",attrs:{label:"入库员",prop:"operatorName"}},[i("btn-input",{attrs:{valueText:e.formData.operatorName,valueId:e.formData.operator,chooseVisible:e.chooseUserVisible,showBtn:178==e.auditStatus||!e.editId},on:{"update:valueText":function(t){return e.$set(e.formData,"operatorName",t)},"update:value-text":function(t){return e.$set(e.formData,"operatorName",t)},"update:valueId":function(t){return e.$set(e.formData,"operator",t)},"update:value-id":function(t){return e.$set(e.formData,"operator",t)},"update:chooseVisible":function(t){e.chooseUserVisible=t},"update:choose-visible":function(t){e.chooseUserVisible=t}}})],1),e._v(" "),i("el-form-item",{staticClass:"form-inline",attrs:{label:"入库单号"}},[i("el-input",{attrs:{disabled:"",placeholder:"自动生成"},model:{value:e.formData.inheadCode,callback:function(t){e.$set(e.formData,"inheadCode",t)},expression:"formData.inheadCode"}})],1),e._v(" "),i("el-form-item")],1)]),e._v(" "),i("el-divider",{attrs:{"content-position":"left"}},[e._v("关联单据")]),e._v(" "),i("el-form",{ref:"formChild",attrs:{rules:e.model.rules,model:e.model}},[i("el-form-item",{staticClass:"childlist",attrs:{prop:"childList"}},[178!=e.auditStatus&&e.editId?e._e():i("div",{staticClass:"sys-operate",staticStyle:{"margin-bottom":"10px"}},[i("el-button",{attrs:{type:"primary"},on:{click:e.ChooseImportShow}},[e._v("导入关联单据")]),e._v(" "),i("el-button",{attrs:{type:"primary",disabled:e.btnDelDisabled},on:{click:function(t){return e.removePart()}}},[e._v("删除")])],1),e._v(" "),i("el-table",{attrs:{data:e.model.childList,"show-summary":"","summary-method":e.getSummaries,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"},border:""},on:{"selection-change":e.handlePartChange}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{prop:"serialNo",label:"物料代码",align:"center","show-overflow-tooltip":"","label-class-name":"required_head"}}),e._v(" "),i("el-table-column",{attrs:{prop:"materielName",label:"物料名称",align:"center","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"specification",align:"center","show-overflow-tooltip":"",label:"规格型号"}}),e._v(" "),i("el-table-column",{attrs:{prop:"batch",align:"center",width:"120",label:"批次"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-input",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{disabled:!(178==e.auditStatus||!e.editId)||0==t.row.isLot,size:"small","controls-position":"right"},model:{value:t.row.batch,callback:function(i){e.$set(t.row,"batch",i)},expression:"scope.row.batch"}})]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"unitUomName",align:"center",label:"主计量单位","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"count",align:"center",label:"主单位数量","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"supportUomName",align:"center",label:"辅助单位","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"convCoefficient",align:"center",label:"换算系数"}}),e._v(" "),i("el-table-column",{attrs:{prop:"subQuoteCount",align:"center",width:"180",label:"入库数量"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-form-item",{class:t.row.error_count?"error_count":"",attrs:{"label-class-name":"required_head"}},[i("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,disabled:!(178==e.auditStatus||!e.editId),size:"small",precision:t.row.quantityAccuracy,"controls-position":"right"},on:{change:function(i){return e.changeCount2(t.row)}},model:{value:t.row.subQuoteCount,callback:function(i){e.$set(t.row,"subQuoteCount",i)},expression:"scope.row.subQuoteCount"}})],1)]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"warehouse",align:"center",label:"仓库","label-class-name":"required_head",width:"150px"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-form-item",{attrs:{prop:"childList."+t.$index+".warehouse",rules:e.model.rules.warehouse}},[i("el-select",{attrs:{clearable:"",placeholder:"仓库",disabled:!(178==e.auditStatus||!e.editId)},on:{change:function(i){return e.changeWarehouse(t.row)}},model:{value:t.row.warehouse,callback:function(i){e.$set(t.row,"warehouse",i)},expression:"scope.row.warehouse"}},e._l(e.fac_type_list,function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"warehLocationName",align:"center",label:"仓位",width:"150px"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{staticStyle:{color:"#3a8ee6",cursor:"pointer"},on:{click:function(i){return e.chooseLocation(t.row,t.$index)}}},[e._v("\n "+e._s(t.row.warehLocationName)+"\n ")])]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"unitPrice",align:"center",width:"140",label:"单价(元)"}}),e._v(" "),i("el-table-column",{attrs:{align:"center",label:"金额(元)",width:"140",prop:"amount"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.sum1(t.row.subQuoteCount,t.row.unitPrice,t.$index))+"\n ")]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"sourceTypeName",align:"center",label:"源单类型",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.sourceTypeName?i("div",{staticStyle:{color:"#3a8ee6"}},[e._v(e._s(t.row.sourceTypeName))]):i("div",{staticStyle:{color:"#3a8ee6"}})]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"sourceCode",align:"center","show-overflow-tooltipalign":"",label:"源单单号"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{staticStyle:{color:"#3a8ee6"}},[e._v(e._s(t.row.sourceCode))])]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"cost",width:"140",align:"center","show-overflow-tooltipalign":"",label:"材料成本(元)"}}),e._v(" "),i("el-table-column",{attrs:{prop:"expense",width:"140",align:"center","show-overflow-tooltipalign":"",label:"加工费用(元)"}})],1)],1),e._v(" "),i("el-form-item",{attrs:{label:"备注",prop:"remarks"}},[i("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请简要填写备注内容",disabled:!(178==e.auditStatus||!e.editId)},model:{value:e.formData.remarks,callback:function(t){e.$set(e.formData,"remarks",t)},expression:"formData.remarks"}})],1)],1),e._v(" "),e.editId?i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:5}},[e._v("制单人:"+e._s(e.headDetail.createByName))]),e._v(" "),i("el-col",{attrs:{span:7}},[e._v("制单时间:"+e._s(e.headDetail.createTime))]),e._v(" "),179==e.initiate_auditStatus?i("el-col",{attrs:{span:5}},[e._v("审核人:"+e._s(e.headDetail.auditorName))]):e._e(),e._v(" "),179==e.initiate_auditStatus?i("el-col",{attrs:{span:7}},[e._v("审核时间:"+e._s(e.headDetail.auditTime))]):e._e()],1):e._e()],1),e._v(" "),i("dialogImportOutsourcingInstock",{attrs:{visible:e.ChooseImport,supplierName:e.formData.supplierName,supplierId:e.formData.supplierId},on:{"update:visible":function(t){e.ChooseImport=t},change:e.getImport}}),e._v(" "),i("dialogChooseSingleLocation",{attrs:{warehouseId:e.warehouseRow.warehouse,visible:e.ChooseLocationVisible,dataForm:e.formData,childList:e.model.childList,childListIndex:e.childListIndex},on:{"update:visible":function(t){e.ChooseLocationVisible=t},change:e.getLocation}}),e._v(" "),i("dialogChooseParts",{attrs:{visible:e.ChooseMaterielVisible},on:{"update:visible":function(t){e.ChooseMaterielVisible=t},change:e.getMateriel}}),e._v(" "),i("dialogChooseSingleUser",{attrs:{visible:e.chooseUserVisible},on:{"update:visible":function(t){e.chooseUserVisible=t},change:e.getUser}}),e._v(" "),i("dialogChooseSingleSupplier",{attrs:{visible:e.chooseSupplierVisible},on:{"update:visible":function(t){e.chooseSupplierVisible=t},change:e.getSupplier}}),e._v(" "),i("div",{staticStyle:{margin:"0 auto",display:"none"},attrs:{id:"print_content"}},[i("printOutsourcingInstock",{attrs:{printDetail:e.printDetail,printList:e.printList,printForm:e.printForm,printTotal:e.printTotal,printDirection:e.printDirection}})],1)],1)},staticRenderFns:[]};var s=function(e){i("1C/4"),i("848q")},r=i("VU/8")(a.a,o,!1,s,"data-v-14e40348",null);t.default=r.exports},mvYD:function(e,t,i){"use strict";var a=i("GKmE"),o={props:{id:{type:String,default:""},supplierId:{},supplierName:"",visible:{type:Boolean,default:!1},enableMultiFeeding:{type:Boolean,default:!1}},watch:{visible:function(e,t){e!==t&&(e&&this.getList(),this.innerVisible=e,this.$nextTick(function(){this.$refs.tb.clearSelection()}))},innerVisible:function(e,t){e!==t&&this.$emit("update:visible",e)}},data:function(){return{sourceTypeList:[{name:"委外合同",id:1}],sourceTypeId:1,subsetList:[],subsetAll:[],subsetTotal:0,searchData_Subset:{pageno:1,pagesize:5,name:"",auditSign:179,closeStatus:0},callBackData:[],innerVisible:this.visible,loading:!1,dialogLoading:!1,feedingList:[],addVisible:!1}},mounted:function(){},computed:{},methods:{getRowKey:function(e){return e.outsourcingContractId},getSummaries:function(e){var t=e.columns,i=e.data,a=[];return t.forEach(function(e,t){if(0!==t)if(7==t){var o=i.map(function(t){return Number(t[e.property])});o.every(function(e){return isNaN(e)})?a[t]="":a[t]=o.reduce(function(e,t){var i=Number(t);return isNaN(i)?e:e+t},0)}else a[t]="";else a[t]="合计"}),a},clickRow:function(e){this.$refs.tb.toggleRowSelection(e)},getList:function(){var e=this;this.supplierName&&(this.searchData_Subset.supplierName=this.supplierName),this.supplierId&&(this.searchData_Subset.supplierId=this.supplierId),this.dialogLoading=!0,this.searchData_Subset.createTime?(this.searchData_Subset.createStartTime=Object(a.b)(this.searchData_Subset.createTime[0]),this.searchData_Subset.createEndTime=Object(a.b)(this.searchData_Subset.createTime[1])):(this.searchData_Subset.createStartTime="",this.searchData_Subset.createEndTime=""),this.$api.outsourcingAPI.outsourcingContractDialog(this.searchData_Subset).then(function(t){e.dialogLoading=!1,0===t.code&&(e.subsetList=t.data?t.data.datas:[],e.subsetTotal=t.data?t.data.totalRows:0)})},searchSubset:function(){this.searchData_Subset.pageno=1,this.getList()},ckSubsetAll:function(e){this.subsetAll=e},subsetSizeChange:function(e){this.searchData_Subset.pagesize=e,this.getList()},subsetCurrentChange:function(e){this.searchData_Subset.pageno=e,this.getList()},submit:function(e){var t=[];this.subsetAll.length>0&&this.subsetAll.forEach(function(e){t.push(e)}),this.$emit("change",t),this.innerVisible=!1},resetFields:function(){this.$refs.form&&this.$refs.form.resetFields()}}},s={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],attrs:{center:"",title:"导入关联单据",visible:e.innerVisible,width:"1000px"},on:{"update:visible":function(t){e.innerVisible=t}}},[i("div",[i("el-form",{attrs:{inline:""}},[i("el-form-item",{staticClass:"form-inline",attrs:{label:"源单类型",clearable:""}},[i("el-select",{staticStyle:{width:"150px"},attrs:{clearable:"",placeholder:"请选择"},model:{value:e.sourceTypeId,callback:function(t){e.sourceTypeId=t},expression:"sourceTypeId"}},e._l(e.sourceTypeList,function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),i("el-form-item",{attrs:{label:""}},[i("el-input",{staticStyle:{width:"250px"},attrs:{placeholder:"供应商模糊查询",clearable:"",disabled:""},model:{value:e.supplierName,callback:function(t){e.supplierName=t},expression:"supplierName"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"单据时间"}},[i("el-date-picker",{staticStyle:{width:"220px"},attrs:{type:"daterange",format:"yyyy-MM-dd","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:e.searchData_Subset.createTime,callback:function(t){e.$set(e.searchData_Subset,"createTime",t)},expression:"searchData_Subset.createTime"}})],1),e._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary"},on:{click:e.searchSubset}},[e._v("查询")])],1)],1)],1),e._v(" "),i("div",{staticClass:"sys-table"},[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.dialogLoading,expression:"dialogLoading"}],ref:"tb",attrs:{"row-key":e.getRowKey,data:e.subsetList,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"row-click":e.clickRow,"selection-change":e.ckSubsetAll}},[i("el-table-column",{attrs:{type:"selection","reserve-selection":!0,width:"55",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{prop:"createTime","show-overflow-tooltip":"",label:"单据时间",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{prop:"contractCode",label:"单据编号",align:"center","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"supplierContractCode",label:"供应商合同编号",align:"center","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"supplierName",label:"供应商",align:"center","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"materielSerialNo",label:"物料代码",align:"center","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"materielName",label:"物料名称",align:"center","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"specification",label:"规格型号",align:"center","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"unitUomName",label:"主计量单位",align:"center","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"count",label:"数量(主单位)",align:"center","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"quoteCount",label:"可执行数量(主单位)",align:"center","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"supportUomName",label:"辅助单位",align:"center","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"processCount",label:"数量(辅助单位)",align:"center","show-overflow-tooltip":""}}),e._v(" "),i("el-table-column",{attrs:{prop:"subQuoteCount",label:"可执行数量(辅助单位)",align:"center","show-overflow-tooltip":""}})],1)],1),e._v(" "),i("div",{staticClass:"sys-pagination"},[i("el-pagination",{attrs:{"current-page":e.searchData_Subset.pageno,"page-sizes":[5,10,20],"page-size":e.searchData_Subset.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.subsetTotal},on:{"update:currentPage":function(t){return e.$set(e.searchData_Subset,"pageno",t)},"update:current-page":function(t){return e.$set(e.searchData_Subset,"pageno",t)},"size-change":e.subsetSizeChange,"current-change":e.subsetCurrentChange}})],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:function(t){return e.submit()}}},[e._v("确定")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(t){e.innerVisible=!1}}},[e._v("关闭")])],1)])},staticRenderFns:[]},r=i("VU/8")(o,s,!1,null,null,null);t.a=r.exports},nMsJ:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify__=__webpack_require__("mvHQ"),__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify__),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_assign__=__webpack_require__("woOf"),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_assign___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_assign__),__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_slicedToArray__=__webpack_require__("d7EF"),__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_slicedToArray___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_slicedToArray__),__WEBPACK_IMPORTED_MODULE_3_babel_runtime_core_js_promise__=__webpack_require__("//Fk"),__WEBPACK_IMPORTED_MODULE_3_babel_runtime_core_js_promise___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_core_js_promise__),__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_dialogChooseSingleSuppliers__=__webpack_require__("FnMF"),__WEBPACK_IMPORTED_MODULE_10__components_System_dialogChooseSingleLocation__=__webpack_require__("tiiE"),__WEBPACK_IMPORTED_MODULE_11__components_System_dialogChooseParts_vue__=__webpack_require__("CdUU"),__WEBPACK_IMPORTED_MODULE_12__inStock_printOutsourcingInstock_vue__=__webpack_require__("nuFk"),__WEBPACK_IMPORTED_MODULE_13__inStock_dialogImportOutsourcingInstock__=__webpack_require__("mvYD"),__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_exports__.a={inject:["reload"],components:{btnInput:__WEBPACK_IMPORTED_MODULE_6__components_btnInput_vue__.a,dialogChooseSingleLocation:__WEBPACK_IMPORTED_MODULE_10__components_System_dialogChooseSingleLocation__.a,dialogChooseParts:__WEBPACK_IMPORTED_MODULE_11__components_System_dialogChooseParts_vue__.a,dialogChooseSingleUser:__WEBPACK_IMPORTED_MODULE_8__components_System_dialogChooseSingleUser__.a,dialogChooseSingleSupplier:__WEBPACK_IMPORTED_MODULE_9__components_System_dialogChooseSingleSuppliers__.a,printOutsourcingInstock:__WEBPACK_IMPORTED_MODULE_12__inStock_printOutsourcingInstock_vue__.a,dialogImportOutsourcingInstock:__WEBPACK_IMPORTED_MODULE_13__inStock_dialogImportOutsourcingInstock__.a},data:function(){return{printDirection:1,printTypeList:[],userInfo:"",purchaseType:1,config:__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a,editId:"",auditStatus:"",initiate_auditStatus:"",itemIds:[],formData:{inOutTime:Object(__WEBPACK_IMPORTED_MODULE_5__utils_tools_js__.c)(),supplierName:"",supplierId:""},fac_type_list:[],fac_location_list:[],warehouseRow:"",ChooseImport:!1,isDisabled:!1,ruleForm:{supplierName:[{required:!0,message:"请选择供应商",trigger:"change"}],inOutTime:[{required:!0,message:"请选择入库时间",trigger:"change"}],operatorName:[{required:!0,message:"请选择入库员",trigger:"change"}],payAccount:[{required:!0,message:"请填写付款账号",trigger:"blur"}]},model:{rules:{warehouse:{required:!0,message:"仓库必填",trigger:"change"}},childList:[]},ChooseMaterielVisible:!1,chooseUserVisible:!1,chooseSupplierVisible:!1,ChooseLocationVisible:!1,btnDelDisabled:!0,headDetail:{},printTotal:{count:"",amount:""},printList:[],printDetail:{supplierName:"",inOutTime:"",inheadCode:"",createByName:"",createTime:"",auditorName:"",auditTime:""},printForm:[{title:"物料代码",prop_:"serialNo"},{title:"物料名称",prop_:"materielName"},{title:"规格型号",prop_:"specification"},{title:"单位",prop_:"unitUomName"},{title:"批号",prop_:"batch"},{title:"数量",prop_:"count"},{title:"单价",prop_:"unitPrice"},{title:"金额",prop_:"amount"},{title:"仓库",prop_:"warehouseName"},{title:"仓位",prop_:"warehLocationName"}],childListIndex:-1}},computed:__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({},Object(__WEBPACK_IMPORTED_MODULE_7_vuex__.c)({})),mounted:function(){var e=this;this.userInfo=JSON.parse(__WEBPACK_IMPORTED_MODULE_15_js_cookie___default.a.get("userInfo")),this.editId=this.$route.query.id,this.editId?this.getDetail():(this.$set(this.formData,"operatorName",this.userInfo.name),this.$set(this.formData,"operator",this.userInfo.userId),this.$set(this.formData,"deptName",this.userInfo.deptName)),this.initialize(),this.getPrintTypeList(),this.$route.query.dataForm&&(this.formData=JSON.parse(this.$route.query.dataForm),this.$route.query.childList&&(this.$route.query.childList=JSON.parse(this.$route.query.childList),this.$route.query.childList.forEach(function(t){e.model.childList.push(t)})))},methods:__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({},Object(__WEBPACK_IMPORTED_MODULE_7_vuex__.d)({removeTagNav:"tagNav/removeTagNav"}),{getPrintTypeList:function(){var e=this;this.$api.dictAPI.getDictsByType("print_type").then(function(t){0===t.code&&(e.printTypeList=t.datas)}).catch(function(e){})},sum1:function(e,t,i){if(!t||!e)return 0;var a=e*t;return a=a.toFixed(2),this.$set(this.model.childList[i],"amount",a),a},changeCount:function(e){if(e.error_count){for(var t=0,i=0;i<this.model.childList.length;i++)e.error_count&&e.sourceId==this.model.childList[i].sourceId&&(t=parseFloat(t)+parseFloat(this.model.childList[i].count));parseFloat(e.sourceCount)>=t&&this.model.childList.forEach(function(t){t.sourceId==e.sourceId&&delete t.error_count})}},back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.push({path:"/outsourcing/outsourcing_inStock_index",query:{t:Date.now()}})},initialize:function(){var e=this,t=[this.$api.gylInventoryAPI.facilityList({pageno:1,pagesize:1e3,auditSign:179}),this.$api.gylInventoryAPI.facilityLocationList({pageno:1,pagesize:1e3})];__WEBPACK_IMPORTED_MODULE_3_babel_runtime_core_js_promise___default.a.all(t).then(function(t){var i=__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_slicedToArray___default()(t,2),a=i[0],o=i[1];0===a.code&&(e.fac_type_list=a.data.datas,e.set_defaultFacility()),0===o.code&&(e.fac_location_list=o.data.datas)}).catch(function(e){console.log(e)})},ChooseImportShow:function(){this.formData.sourceCompany?this.ChooseImport=!0:this.$message({message:"请先选择供应商",type:"warning"})},chooseLocation:function(e,t){this.warehouseRow=e,this.childListIndex=t,this.ChooseLocationVisible=!0},changeWarehouse:function(e){this.$set(e,"warehLocationName","选择仓位"),this.$set(e,"warehLocation","")},getUser:function(e){e?(this.$set(this.formData,"operatorName",e.name),this.$set(this.formData,"operator",e.id),this.$set(this.formData,"deptName",e.deptName)):(this.$set(this.formData,"operatorName",""),this.$set(this.formData,"operator",""),this.$set(this.formData,"deptId",""))},getSupplier:function(e){e?(this.$set(this.formData,"sourceCompany",e.id),this.$set(this.formData,"supplierName",e.name)):(this.$set(this.formData,"sourceCompany",""),this.$set(this.formData,"supplierName",""))},getSummaries:function(e){for(var t=e.columns,i=e.data,a=0,o=0;o<i.length;o++)a+=i[o].count;this.printTotal.count=a.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.countFixedTo);for(var s=0,r=0;r<i.length;r++)s+i[r].subQuoteCount*i[r].unitPrice&&(s+=i[r].subQuoteCount*i[r].unitPrice);this.printTotal.amount=s.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo);for(var n=[],l=0,u=0;u<i.length;u++)i[u].subQuoteCount&&i[u].unitPrice&&(l+=i[u].subQuoteCount*i[u].unitPrice);return t.forEach(function(e,t){if(0!==t)if(6===t||9===t||13===t)if(13!==t){var a=i.map(function(t){return Number(t[e.property])});a.every(function(e){return isNaN(e)})?n[t]="":n[t]=a.reduce(function(e,t){var i=Number(t);return isNaN(i)?e:e+t},0)}else n[t]=l.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo);else n[t]="";else n[t]="合计"}),n},setPriceAll:function(e,t){return e&&t?(parseFloat(e)*parseFloat(t)).toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo):0},getLocation:function(e){this.$set(this.warehouseRow,"warehLocation",e.id),this.$set(this.warehouseRow,"warehLocationName",e.name)},getMateriel:function(e){var t=this;e&&e.forEach(function(e){t.$set(e,"count",0),t.$set(e,"unitPrice",e.salePrice?e.salePrice:0),t.$set(e,"materielName",e.name?e.name:0),t.$set(e,"materielId",e.id),t.$set(e,"warehouse",e.defaultFacilityId),t.$set(e,"warehLocation",e.defaultLocationId),t.$set(e,"warehLocationName",e.defaultLocationName),t.$set(e,"onlyId",e.id+"_"+Math.random()),delete e.id,t.model.childList.push(e)})},getImport:function(e){var t=this;e&&e.forEach(function(e){delete e.amount,t.$set(e,"subQuoteCount",e.subQuoteCount?e.subQuoteCount:0),t.$set(e,"count",e.convCoefficient?parseFloat((e.subQuoteCount*e.convCoefficient).toFixed(e.quantityAccuracy)):0),t.$set(e,"unitPrice",0),t.$set(e,"materielName",e.materielName),t.$set(e,"serialNo",e.materielSerialNo),t.$set(e,"materielId",e.materielId),t.$set(e,"onlyId",e.id+"_"+Math.random()),t.$set(e,"sourceId",e.id),t.$set(e,"sourceCode",e.contractCode),e.thisSourceType&&(t.$set(e,"sourceTypeName",e.thisSourceTypeName?e.thisSourceTypeName:""),t.$set(e,"sourceType",e.thisSourceType)),delete e.id,t.model.childList.push(e)})},getDetail:function(){var e=this;this.$api.outsourcingAPI.outsourcingInStockGetDtailOfOtherIn({inHeadIds:this.editId}).then(function(t){0===t.code?(e.formData=__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_assign___default()({},t.data.deatilOfhead),e.auditStatus=e.formData.auditSign,e.initiate_auditStatus=e.formData.auditSign,e.model.childList=t.data.deatilOfBody,e.model.childList.forEach(function(t){e.$set(t,"onlyId",t.materielId+"_"+Math.random()),e.$set(t,"serialNo",t.serialno),e.$set(t,"materielName",t.proName),e.$set(t,"unitUomName",t.unitName)}),e.$set(e.formData,"supplierName",t.data.deatilOfhead.sourceCompanyName),e.purchaseType=t.data.deatilOfhead.purchaseType,e.printDetail.supplierName=t.data.deatilOfhead.sourceCompanyName,e.printDetail.inOutTime=t.data.deatilOfhead.inOutTime.split(" ")[0],e.printDetail.inheadCode=t.data.deatilOfhead.inheadCode,e.printDetail.createByName=t.data.deatilOfhead.crateByName,e.printDetail.createTime=t.data.deatilOfhead.createTime,e.printDetail.auditorName=t.data.deatilOfhead.auditorName,e.printDetail.auditTime=t.data.deatilOfhead.auditTime,e.printList=JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(e.model.childList)),e.set_defaultFacility(),e.$set(e.headDetail,"createByName",t.data.deatilOfhead.crateByName),e.$set(e.headDetail,"createTime",t.data.deatilOfhead.createTime),e.$set(e.headDetail,"auditorName",t.data.deatilOfhead.auditorName),e.$set(e.headDetail,"auditTime",t.data.deatilOfhead.auditTime)):e.$message({message:t.msg,type:"error"})})},set_defaultFacility:function(e,t){var i=this;this.fac_type_list.length>0&&this.printList.length>0&&this.printList.forEach(function(e){i.fac_type_list.forEach(function(t){e.id==t.id&&i.$set(e,"warehouseName",t.name)})})},auditStatusChange:function(){var e=this;this.$confirm("确定审核吗?","提示",{type:"warning"}).then(function(){e.$api.outsourcingAPI.outsourcingInStockAuditStatusChange({inHeadId:e.editId}).then(function(t){0===t.code?(e.$message({type:"success",message:"审核成功!"}),e.getDetail()):e.$message({message:t.msg,type:"error"})})}).catch(function(){e.$message({type:"info",message:"已取消"})})},reverseAuditChange:function(){var e=this;this.$confirm("确定反审核吗?","提示",{type:"warning"}).then(function(){e.$api.outsourcingAPI.outsourcingInStockReverseAuditChange({inHeadId:e.editId}).then(function(t){0===t.code?(e.$message({type:"success",message:"反审核成功!"}),e.getDetail()):e.$message({message:t.msg,type:"error"})})}).catch(function(){e.$message({type:"info",message:"已取消"})})},save:function(){var e=this,t=void 0;this.$refs.formChild.validate(function(e,i){t=e});var i=[];this.model.childList.forEach(function(t){var a={materielId:t.materielId,count:t.count.toFixed(t.quantityAccuracy),supportUom:t.supportUom,convCoefficient:t.convCoefficient,inCount:t.subQuoteCount?t.subQuoteCount.toFixed(t.quantityAccuracy):0,unitPrice:t.unitPrice?t.unitPrice.toFixed(t.priceAccuracy):0,amount:e.setPriceAll(t.subQuoteCount,t.unitPrice),cost:t.cost?t.cost:0,expense:t.expense?t.expense:0};t.batch&&(a.batch=t.batch),t.warehouse&&(a.warehouse=t.warehouse),t.warehLocation&&(a.warehLocation=t.warehLocation),t.sourceId&&(a.sourceId=t.sourceId,a.sourceType=t.sourceType?t.sourceType:"",a.sourceCode=t.sourceCode?t.sourceCode:""),t.id&&(a.id=t.id),i.push(a)});var a={sourceCompany:this.formData.sourceCompany?this.formData.sourceCompany:"",inOutTime:this.formData.inOutTime,operator:this.formData.operator,purchaseType:this.purchaseType,payAccount:this.formData.payAccount,bodyDetail:__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(i),itemIds:this.itemIds,remarks:this.formData.remarks?this.formData.remarks:""};this.editId&&(a.id=this.editId),this.$refs.form.validate(function(o){if(!o)return!1;if(0!=i.length)if(t){var s=!0;if(e.model.childList.forEach(function(e){e.subQuoteCount<=0&&(s=!1)}),s){var r=!0;e.model.childList.forEach(function(e){1!=e.isLot||e.batch||(r=!1)}),r?e.isDisabled||(e.isDisabled=!0,e.$api.outsourcingAPI.outsourcingInStockSaveAndChange(a).then(function(t){e.isDisabled=!1,0===t.code?(e.editId?e.getDetail():(e.editId=t.inHeadId,window.location.href=e.changeURLArg("id",t.inHeadId)),e.$message({message:t.msg,type:"success"})):500===t.code&&t.data?(e.$message({message:t.msg,type:"error"}),e.model.childList.forEach(function(i){i.sourceId&&i.sourceId==t.data.sourceId&&(e.$set(i,"error_count",!0),e.$set(i,"sourceCount",t.data.sourceCount))})):e.$message({message:t.msg,type:"error"})})):e.$message({message:"有批次管理的一定要填写批次",type:"warning"})}else e.$message({message:"入库数量必须大于0",type:"warning"})}else e.$message({message:"有必填项未填写",type:"warning"});else e.$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(){this.formData={inOutTime:Object(__WEBPACK_IMPORTED_MODULE_5__utils_tools_js__.c)()},this.$set(this.formData,"operatorName",this.userInfo.name),this.$set(this.formData,"operator",this.userInfo.userId),this.auditStatus="",this.initiate_auditStatus="",this.model.childList=[],this.itemIds=[],this.headDetail={},this.purchaseType=1,this.editId&&(this.editId=void 0),this.$refs.form.resetFields()},removePart:function(){var e=this;this.chooseParts&&this.chooseParts.forEach(function(t){var i=e.model.childList.findIndex(function(i){if(i.onlyId==t.onlyId)return i.id&&e.itemIds.push(i.id),!0});e.model.childList.splice(i,1)})},setBtn:function(e){var t=!0;t=!(e.length>0),this.btnDelDisabled=t},handlePartChange:function(e){this.chooseParts=e,this.setBtn(e)},print:function(){document.getElementById("print_content").style.display="block",this.printList=JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(this.printList)),this.$nextTick(function(){var e=document.getElementById("print_content").innerHTML;return document.body.innerHTML="<html><head><title>打印</title></head><body>"+e+"</body></html>",window.print(),window.location.reload(),!1})},printNew:function(e){var t=void 0;10184===e.id?(this.printDirection=0,t="<style>@page{size: 794px 1123px;}</style></body></html>"):10185===e.id?(this.printDirection=1,t="<style>@page{size: 794px 562px;}</style></body></html>"):10186===e.id&&(this.printDirection=2,t="<style>@page{size: 794px 475px;}</style></body></html>"),document.getElementById("print_content").style.display="block",this.printList=JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(this.printList)),this.$nextTick(function(){var e=document.getElementById("print_content").innerHTML;return document.body.innerHTML="<html><head><title>打印</title><style>@page:right{@bottom-left {content: 'ces'}}</style></head><body>"+e+t,window.print(),window.location.reload(),!1})},changeCount2:function(e){isNaN(e.convCoefficient)||isNaN(e.subQuoteCount)?e.count=0:e.count=parseFloat((parseFloat(e.convCoefficient)*parseFloat(e.subQuoteCount)).toFixed(e.quantityAccuracy)),this.changeCount(e)}}),watch:{purchaseType:function(e){this.editId||(this.model.childList=[],this.itemIds=[])},model:{handler:function(e,t){var i=this;e.childList.forEach(function(e){void 0!=e.warehouse&&""!=e.warehouse||(i.$set(e,"warehLocationName",""),i.$set(e,"warehLocation",""))})},deep:!0}}}},nuFk:function(e,t,i){"use strict";var a=i("bzuE"),o=i("2QJe"),s=(i("TExn"),{name:"",props:{printDetail:{type:Object,default:{}},printList:{type:Array,default:[]},printForm:{type:Array,default:[]},printTotal:{type:Object,default:{}},printDirection:{type:Number,default:1}},data:function(){return{config:a.a,pageHeight:"",pageWidth:"",numAll:""}},component:{},mounted:function(){0===this.printDirection?(this.pageHeight=this.config.printHeightDirection0,this.pageWidth=this.config.printWidthDirection0):1===this.printDirection?(this.pageHeight=this.config.printHeightDirection1,this.pageWidth=this.config.printWidthDirection1):2===this.printDirection&&(this.pageHeight=this.config.printHeightDirection2,this.pageWidth=this.config.printWidthDirection2)},methods:{},watch:{printList:{handler:function(e,t){Object(o.a)(e,this.printForm,this.printTotal,this.printDirection)},deep:!0}}}),r={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"print_content",style:{width:e.pageWidth+"px"}},[i("div",{staticClass:"print_top"},[i("div",{staticClass:"head_out"},[i("h1",{staticStyle:{"text-align":"center"}},[e._v("委外入库单")]),e._v(" "),e.printDetail?i("div",{staticClass:"head1"},[i("div",{staticClass:"head1_left"},[i("div",[e._v("供应商:"+e._s(e.printDetail.supplierName))]),e._v(" "),i("div",[e._v("入库日期:"+e._s(e.printDetail.inOutTime))])]),e._v(" "),i("div",{staticClass:"head1_right"},[i("div",[e._v("单据编号:"+e._s(e.printDetail.inheadCode))])])]):e._e()]),e._v(" "),i("div",{staticClass:"table_content"})]),e._v(" "),i("div",{staticClass:"footer_out"},[i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:5}},[e._v("制单人:"+e._s(e.printDetail.createByName))]),e._v(" "),i("el-col",{attrs:{span:7}},[e._v("制单时间:"+e._s(e.printDetail.createTime))]),e._v(" "),i("el-col",{attrs:{span:5}},[e._v("审核人:"+e._s(e.printDetail.auditorName))]),e._v(" "),i("el-col",{attrs:{span:7}},[e._v("审核时间:"+e._s(e.printDetail.auditTime))])],1)],1)])},staticRenderFns:[]},n=i("VU/8")(s,r,!1,null,null,null);t.a=n.exports}}); |