yxk_pc_mdh/gyhl/static/js/53.dab7d453d858384e3a1c.js

1 line
23 KiB
JavaScript

webpackJsonp([53],{"2HwI":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i("MMuC"),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",{directives:[{name:"has",rawName:"v-has",value:"warehouse:inventory:saveWin",expression:"'warehouse:inventory:saveWin'"}],attrs:{type:"primary"},on:{click:function(t){return e.save("form")}}},[e._v("保存")]),e._v(" "),e.btnDelDisabled?i("el-button",{directives:[{name:"has",rawName:"v-has",value:"warehouse:inventory:auditWin",expression:"'warehouse:inventory:auditWin'"}],attrs:{type:"primary"},on:{click:e.audit}},[e._v("审核")]):e._e()],1),e._v(" "),i("div",{staticClass:"sys-form"},[i("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"form",attrs:{"label-width":"120px","inline-message":!0,model:e.formData,rules:e.ruleForm}},[i("div",{staticClass:"flex"},[i("el-form-item",{staticClass:"dialog-form-inline",attrs:{label:"入库时间",prop:"inTime"}},[i("el-date-picker",{staticStyle:{width:"194px"},attrs:{type:"date",format:"yyyy-MM-dd","range-separator":"—",placeholder:"选择日期","value-format":"yyyy-MM-dd",clearable:"",disabled:179==e.auditStatus},model:{value:e.formData.inTime,callback:function(t){e.$set(e.formData,"inTime",t)},expression:"formData.inTime"}})],1)],1)]),e._v(" "),i("el-form",[i("el-form-item",{staticClass:"childlist",attrs:{prop:"childList"}},[i("div",{staticClass:"sys-operate",staticStyle:{"margin-bottom":"10px"}},[i("el-button",{attrs:{type:"primary"},on:{click:function(t){e.chooseMaterielVisible=!0}}},[e._v("新增")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.removePart()}}},[e._v("删除")])],1),e._v(" "),i("el-table",{attrs:{data:e.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:"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:"unitName",align:"center","show-overflow-tooltip":"",label:"主计量单位"}}),e._v(" "),i("el-table-column",{attrs:{prop:"profitLoss",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:"profitLossSupport",align:"center",width:"140",label:"入库数量","label-class-name":"required_head"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,disabled:1==t.row.notEditable||1==t.row.isInventory,size:"small","controls-position":"right"},on:{change:function(i){return e.changeCount(t.row,t.$index)}},model:{value:t.row.profitLossSupport,callback:function(i){e.$set(t.row,"profitLossSupport",i)},expression:"scope.row.profitLossSupport"}})]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"materielPrice",align:"center",width:"180",label:"单价(元)"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small","controls-position":"right"},on:{change:function(i){return e.changeTaxUnitPrice(t.row,t.$index)}},model:{value:t.row.materielPrice,callback:function(i){e.$set(t.row,"materielPrice",i)},expression:"scope.row.materielPrice"}})]}}])}),e._v(" "),i("el-table-column",{attrs:{align:"center",width:"180",label:"入库金额(元)",prop:"proAmount"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small","controls-position":"right"},on:{change:function(i){return e.changeTaxAmount(t.row,t.$index)}},model:{value:t.row.proAmount,callback:function(i){e.$set(t.row,"proAmount",i)},expression:"scope.row.proAmount"}})]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"batch",width:"120",align:"center",label:"批次"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-input",{staticStyle:{width:"100%"},attrs:{disabled:1==t.row.notEditable||0==t.row.isLot||1==t.row.isInventory,clearable:""},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:"warehouse",width:"120",align:"center",label:"仓库","show-overflow-tooltip":"","label-class-name":"required_head"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-form-item",{attrs:{prop:"childList."+t.$index+".warehouse"}},[i("el-select",{attrs:{clearable:"",placeholder:"仓库"},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(t){return i("el-option",{key:t.id,attrs:{disabled:179==e.auditStatus,label:t.name,value:t.id}})}),1)],1)]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"warehLocationName",width:"120",align:"center",label:"仓位","show-overflow-tooltip":""},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)}}},[e._v(e._s(t.row.warehLocationName))])]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"sourceTypeName",align:"center",label:"源单类型",width:"120px"},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","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))])]}}])})],1)],1),e._v(" "),i("el-form-item",{attrs:{label:"备注",prop:"remarks"}},[i("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请简要填写备注内容",disabled:179==e.auditStatus},model:{value:e.formData.remarks,callback:function(t){e.$set(e.formData,"remarks",t)},expression:"formData.remarks"}})],1)],1),e._v(" "),e.winStockId?i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:5}},[e._v("制单人:"+e._s(e.formData.createUserName))]),e._v(" "),i("el-col",{attrs:{span:7}},[e._v("制单时间:"+e._s(e.formData.createTime))]),e._v(" "),i("el-col",{attrs:{span:5}},[e._v("审核人:"+e._s(e.formData.auditorName))]),e._v(" "),i("el-col",{attrs:{span:7}},[e._v("审核时间:"+e._s(e.formData.auditTime))])],1):e._e()],1),e._v(" "),i("dialogChooseSingleLocation",{attrs:{warehouseId:e.warehouseRow.warehouse,visible:e.ChooseLocationVisible},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("div",{staticStyle:{margin:"0 auto",display:"none"},attrs:{id:"print_content"}},[i("printOtherStock",{attrs:{printDetail:e.printDetail,printList:e.printList,printForm:e.printForm,printTotal:e.printTotal,printDirection:!0}})],1)],1)},staticRenderFns:[]};var r=function(e){i("aBDI"),i("Jr4+")},n=i("VU/8")(a.a,o,!1,r,"data-v-10b29310",null);t.default=n.exports},"Jr4+":function(e,t){},MMuC: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_helpers_extends__=__webpack_require__("Dd8w"),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__),__WEBPACK_IMPORTED_MODULE_2__components_System_dialogChooseSingleLocation__=__webpack_require__("tiiE"),__WEBPACK_IMPORTED_MODULE_3__components_System_dialogChooseParts_vue__=__webpack_require__("CdUU"),__WEBPACK_IMPORTED_MODULE_4__components_System_dialogChooseSingleSuppliers__=__webpack_require__("FnMF"),__WEBPACK_IMPORTED_MODULE_5__warehouse_otherStock_printOtherStock_vue__=__webpack_require__("UtlJ"),__WEBPACK_IMPORTED_MODULE_6_vuex__=__webpack_require__("NYxO"),__WEBPACK_IMPORTED_MODULE_7__utils_config_js__=__webpack_require__("bzuE");__webpack_exports__.a={components:{printOtherStock:__WEBPACK_IMPORTED_MODULE_5__warehouse_otherStock_printOtherStock_vue__.a,dialogChooseSingleSupplier:__WEBPACK_IMPORTED_MODULE_4__components_System_dialogChooseSingleSuppliers__.a,dialogChooseParts:__WEBPACK_IMPORTED_MODULE_3__components_System_dialogChooseParts_vue__.a,dialogChooseSingleLocation:__WEBPACK_IMPORTED_MODULE_2__components_System_dialogChooseSingleLocation__.a},data:function(){return{formData:{},sourceTypeName:"",sourceType:"",sourceCode:"",sourceId:"",auditStatus:"",winStockId:"",selectDeptId:"",chooseParts:[],depOptions:[],itemIds:[],materielIdList:[],childList:[],fac_type_list:[],fac_location_list:[],warehouseRow:"",config:__WEBPACK_IMPORTED_MODULE_7__utils_config_js__.a,btnDisabled:!0,btnDelDisabled:!1,chooseMaterielVisible:!1,chooseSupplierVisible:!1,ChooseLocationVisible:!1,loading:!1,ruleForm:{inTime:[{required:!0,message:"请选择入库时间",trigger:"change"}]},printTotal:{count:"",amount:""},printList:[],printDetail:{sourceCompanyName:"",inOutTime:"",inheadCode:""},printForm:[{title:"物料代码",prop_:"serialno"},{title:"物料名称",prop_:"materielName"},{title:"规格型号",prop_:"specification"},{title:"单位",prop_:"unitName"},{title:"批号",prop_:"batch"},{title:"数量",prop_:"count"},{title:"单价",prop_:"unitPrice"},{title:"金额",prop_:"amount"},{title:"仓库",prop_:"warehouseName"},{title:"库位",prop_:"warehLocationName"}]}},mounted:function(){var e=new Date;this.$set(this.formData,"inTime",e.getFullYear()+"-"+this.settime(e.getMonth()+1)+"-"+this.settime(e.getDate())),this.initialize(),this.$route.query.id?(this.formData.id=this.$route.query.id,this.winStockId=this.$route.query.id,this.getDetail()):(this.planId=this.$route.query.planId,this.getDetail1())},watch:{winStockId:{handler:function(e,t){this.btnDelDisabled=""!=e&&void 0!=e}},childList:{handler:function(e,t){e.forEach(function(e){void 0!=e.warehouse&&""!=e.warehouse||(e.warehLocationName="",e.warehLocation="")})},deep:!0}},methods:__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({},Object(__WEBPACK_IMPORTED_MODULE_6_vuex__.d)({removeTagNav:"tagNav/removeTagNav"}),{settime:function(e){return 1==e.toString().length?"0"+e.toString():e},removePart:function(){var e=this;if(this.chooseParts){var t=[];this.chooseParts.forEach(function(i){t.push(i.id);var a=e.childList.findIndex(function(e){if(e.onlyId==i.onlyId&&e.id==i.id)return!0});e.childList.splice(a,1),e.itemIds=t})}},changeCount:function(e,t){isNaN(e.convCoefficient)||isNaN(e.profitLossSupport)?e.profitLoss=0:e.profitLoss=parseFloat((parseFloat(e.convCoefficient)*parseFloat(e.profitLossSupport)).toFixed(__WEBPACK_IMPORTED_MODULE_7__utils_config_js__.a.countFixedTo)),this.$set(e,"proAmount",parseFloat((parseFloat(e.profitLossSupport)*parseFloat(e.materielPrice)).toFixed(__WEBPACK_IMPORTED_MODULE_7__utils_config_js__.a.amountFixedTo))),console.log(e.proAmount)},changeTaxUnitPrice:function(e){e.materielPrice=e.materielPrice.toFixed(e.priceAccuracy),e.proAmount=parseFloat((e.profitLossSupport*e.materielPrice).toFixed(__WEBPACK_IMPORTED_MODULE_7__utils_config_js__.a.amountFixedTo))},changeTaxAmount:function(e){e.materielPrice=parseFloat((parseFloat(e.proAmount)/parseFloat(e.profitLossSupport)).toFixed(e.priceAccuracy)),e.proAmount=e.proAmount.toFixed(__WEBPACK_IMPORTED_MODULE_7__utils_config_js__.a.amountFixedTo)},getMateriel:function(e){var t=this;if(e){for(var i=!0,a=0;a<this.materielIdList.length;a++)for(var o=0;o<e.length;o++)if(this.materielIdList[a]==e[o].id)return this.$message.warning("选择的物料不要和生成的盘盈单的物料一样,请核对后再添加"),void(i=!1);1==i&&(console.log(e),e.forEach(function(e){t.$set(e,"profitLoss",""),t.$set(e,"code",t.sourceCode),t.$set(e,"documentTypeId",t.sourceType),t.$set(e,"itemId",t.sourceId),t.$set(e,"sourceId",t.sourceId),t.$set(e,"sourceType",t.sourceType),t.$set(e,"sourceTypeName",t.sourceTypeName),t.$set(e,"sourceCode",t.sourceCode),t.$set(e,"materielPrice",""),t.$set(e,"materielSerialNo",e.serialNo?e.serialNo:""),t.$set(e,"materielName",e.name?e.name:""),t.$set(e,"materielId",e.id),t.$set(e,"unitName",e.unitUomName),t.$set(e,"onlyId",e.id+"_"+Date.now()),t.childList.push(e)}))}},changeWarehouse:function(e){this.$set(e,"warehLocationName","选择仓位"),this.$set(e,"warehLocation","")},chooseLocation:function(e){this.warehouseRow=e,this.ChooseLocationVisible=!0},getLocation:function(e){this.$set(this.warehouseRow,"warehLocation",e.id),this.$set(this.warehouseRow,"warehLocationName",e.name)},sum1:function(e,t,i){if(0!=t&&0!=e){var a=e*t;return a=a.toFixed(__WEBPACK_IMPORTED_MODULE_7__utils_config_js__.a.amountFixedTo),this.$set(this.childList[i],"amount",a),a}},getDetail1:function(){var e=this,t=this;this.loading=!0,this.$nextTick().then(function(){e.$api.inventoryAPI.buildWinStock({planId:e.planId}).then(function(i){console.log(i),e.loading=!1,0==i.code?(t.childList=i.BodyData,t.childList.forEach(function(e){t.$set(e,"sourceId",e.itemId),t.$set(e,"sourceType",e.documentTypeId),t.$set(e,"sourceCode",e.code),t.$set(e,"sourceTypeName",e.documentTypeName),t.$set(e,"notEditable",1),t.$set(e,"isInventory",1),t.$set(e,"onlyId",e.materielId+"_"+Math.random()),t.materielIdList.push(e.materielId)}),console.log(t.materielIdList),t.sourceId=t.childList[0].itemId,t.sourceType=t.childList[0].documentTypeId,t.sourceTypeName=t.childList[0].documentTypeName,t.sourceCode=t.childList[0].code):e.$message({message:i.msg,type:"error"})})})},save:function(e){var t=this;this.$refs[e].validate(function(e){if(e){if(0==t.childList.length)return void t.$message({message:"没有盘盈数据,无法再次生成",type:"warning"});var i=!0;if(t.childList.forEach(function(e){1!=e.isLot||e.batch||(i=!1)}),!i)return void t.$message({message:"有批次管理的一定要填写批次",type:"warning"});var a=!0;if(t.childList.forEach(function(e){e.warehouse||(a=!1)}),!a)return void t.$message({message:"请选择仓库",type:"warning"});if(t.formData.id){var o=[];t.childList.forEach(function(e){console.log(e);var i={id:e.newId?e.newId:"",materielId:e.materielId,count:e.count,inCount:e.profitLossSupport.toFixed(__WEBPACK_IMPORTED_MODULE_7__utils_config_js__.a.countFixedTo),supportUom:e.supportUom,convCoefficient:e.convCoefficient,unitPrice:e.unitPrice,amount:e.amount,warehouse:e.warehouse?e.warehouse:"",isInventory:e.isInventory?e.isInventory:0};e.batch&&""!=e.batch&&(i.batch=e.batch),e.warehLocation&&""!=e.warehLocation&&(i.warehLocation=e.warehLocation),o.push(i),t.formData.item=__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(o)}),t.$api.otherStockAPI.saveAndChange({id:t.formData.id,inOutTime:t.formData.inTime,remarks:t.formData.remarks?t.formData.remarks:"",bodyDetail:t.formData.item,itemIds:t.itemIds}).then(function(e){0===e.code?t.$message({message:e.msg,type:"success"}):t.$message({message:e.msg,type:"error"})})}else{var r=[];t.childList.forEach(function(e){console.log(e);var i={materielId:e.materielId,count:e.profitLoss.toFixed(__WEBPACK_IMPORTED_MODULE_7__utils_config_js__.a.countFixedTo),inCount:e.profitLossSupport.toFixed(__WEBPACK_IMPORTED_MODULE_7__utils_config_js__.a.countFixedTo),supportUom:e.supportUom,convCoefficient:e.convCoefficient,unitPrice:e.materielPrice,amount:e.proAmount,warehouse:e.warehouse?e.warehouse:"",sourceType:e.documentTypeId,sourceCode:e.code,sourceId:e.itemId,isInventory:e.isInventory?e.isInventory:0};e.batch&&""!=e.batch&&(i.batch=e.batch),e.warehLocation&&""!=e.warehLocation&&(i.warehLocation=e.warehLocation),r.push(i),t.formData.item=__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(r),console.log(t.formData.item)}),t.$api.otherStockAPI.saveAndChange({inOutTime:t.formData.inTime,remarks:t.formData.remarks?t.formData.remarks:"",bodyDetail:t.formData.item}).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),t.winStockId=e.inHeadId,console.log(e.inHeadId),t.$set(t.formData,"id",e.inHeadId),window.location.href=t.changeURLArg("id",e.inHeadId)):t.$message({message:e.msg,type:"error"})})}}})},getDetail:function(){var e=this,t=this;this.loading=!0,this.$nextTick().then(function(){e.$api.otherStockAPI.getDtailOfOtherIn({inHeadIds:e.winStockId}).then(function(i){e.loading=!1,t.formData.id=i.data.deatilOfhead.id,t.$set(t.formData,"auditStatus",i.data.deatilOfhead.auditSign?i.data.deatilOfhead.auditSign:""),t.auditStatus=e.formData.auditStatus,t.$set(t.formData,"inTime",i.data.deatilOfhead.inOutTime?i.data.deatilOfhead.inOutTime:""),t.$set(t.formData,"remarks",i.data.deatilOfhead.remarks?i.data.deatilOfhead.remarks:""),t.$set(t.formData,"createUserName",i.data.deatilOfhead.crateByName?i.data.deatilOfhead.crateByName:""),t.$set(t.formData,"createTime",i.data.deatilOfhead.createTime?i.data.deatilOfhead.createTime:""),t.$set(t.formData,"auditTime",i.data.deatilOfhead.auditTime?i.data.deatilOfhead.auditTime:""),t.$set(t.formData,"auditorName",i.data.deatilOfhead.auditorName?i.data.deatilOfhead.auditorName:""),t.childList=i.data.deatilOfBody,t.childList.forEach(function(e){e.serialno=e.serialno?e.serialno:"",e.materielName=e.proName?e.proName:"",e.specification=e.specification?e.specification:"",e.materielPrice=e.unitPrice?e.unitPrice:0,e.proAmount=e.amount?e.amount:0,e.profitLoss=e.count?e.count:0,e.profitLossSupport=e.subQuoteCount?e.subQuoteCount:0,e.materielId=e.materielId?e.materielId:"",e.newId=e.id?e.id:"",e.sourceId=e.sourceId?e.sourceId:"",e.sourceType=e.sourceType?e.sourceType:""}),e.printDetail.sourceCompanyName=i.data.deatilOfhead.sourceCompanyName,e.printDetail.inOutTime=i.data.deatilOfhead.inOutTime,e.printDetail.inheadCode=i.data.deatilOfhead.inheadCode,e.printList=JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(e.childList))})})},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},audit:function(){var e=this,t=this.winStockId;this.$confirm("确认审核吗?","提示",{type:"warning"}).then(function(){e.$api.otherStockAPI.auditStatusChange({inHeadId:t}).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.$router.push({path:"/warehouse/inventory",query:{t:Date.now()}})):e.$message({message:t.msg,type:"error"})})})},disAudit:function(){var e=this,t=this.formData.id;this.$confirm("确认反审核吗?","提示",{type:"warning"}).then(function(){e.$api.otherStockAPI.reverseAuditChange({inHeadId:t}).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getDetail()):e.$message({message:t.msg,type:"error"})})})},handlePartChange:function(e){this.chooseParts=e,this.setBtn(e)},setBtn:function(e){var t=!0;t=!(e.length>0),this.btnDelDisabled=t},initialize:function(){var e=this;this.$api.gylInventoryAPI.facilityList({pageno:1,pagesize:1e3,auditSign:179}).then(function(t){e.fac_type_list=t.data.datas?t.data.datas:""}).catch(function(e){console.log(e)}),this.$api.gylInventoryAPI.facilityLocationList({pageno:1,pagesize:1e3}).then(function(t){e.fac_location_list=t.data.datas?t.data.datas:""}).catch(function(e){console.log(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})},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;var r=0,n=0;if(i.length>1)for(var s=0;s<i.length;s++)s<i.length-1&&(r=i[s].count*i[s].unitPrice+i[s+1].count*i[s+1].unitPrice,n=i[s].count*i[s].sellUnitPrice+i[s+1].count*i[s+1].sellUnitPrice);else 1==i.length&&(r=i[0].count*i[0].unitPrice,n=i[0].count*i[0].sellUnitPrice);this.printTotal.amount=r,this.printTotal.sellAmount=n;for(var l=[],c=0;c<i.length;c++)i[c].count&&i[c].unitPrice&&i[c].count*i[c].unitPrice;return t.forEach(function(e,t){if(0!==t)if(4===t||7===t||9===t){var a=i.map(function(t){return Number(t[e.property])});a.every(function(e){return isNaN(e)})?l[t]="":l[t]=a.reduce(function(e,t){var i=Number(t);return isNaN(i)?e:e+t},0)}else l[t]="";else l[t]="合计"}),l}})}},UtlJ:function(e,t,i){"use strict";var a=i("S8x/"),o=(i("TExn"),i("bzuE")),r={name:"",props:{printDetail:{type:Object,default:{}},printList:{type:Array,default:[]},printForm:{type:Array,default:[]},printTotal:{type:Object,default:{}},printDirection:{type:Boolean,default:!0}},data:function(){return{pageHeight:"",pageWidth:"",config:o.a}},component:{},mounted:function(){this.printDirection?(this.pageHeight=this.config.printHeightDirection0,this.pageWidth=this.config.printWidthDirection0):(this.pageHeight=this.config.printHeightDirection1,this.pageWidth=this.config.printWidthDirection1)},watch:{printList:{handler:function(e,t){Object(a.a)(e,this.printForm,this.printTotal,this.printDirection)},deep:!0}}},n={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:"head2"},[i("div",{staticClass:"head2_item"},[e._v("供应商:"+e._s(e.printDetail.sourceCompanyName))]),e._v(" "),i("div",{staticClass:"head2_item"},[e._v("入库日期:"+e._s(e.printDetail.inOutTime))]),e._v(" "),i("div",{staticClass:"head2_item"},[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:8}},[e._v("制单人:"+e._s(e.printDetail.createByName))]),e._v(" "),i("el-col",{attrs:{span:8}},[e._v("制单时间:"+e._s(e.printDetail.createTimePrint))]),e._v(" "),i("el-col",{attrs:{span:5}},[e._v("保管员:")])],1)],1)])},staticRenderFns:[]},s=i("VU/8")(r,n,!1,null,null,null);t.a=s.exports},aBDI:function(e,t){}});