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;a0),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="打印"+e+"",window.print(),window.location.reload(),!1})},getSummaries:function(e){for(var t=e.columns,i=e.data,a=0,o=0;o1)for(var s=0;s