yxk_pc_mdh/gyhl/static/js/39.10e2f8666744e9162c56.js

1 line
38 KiB
JavaScript

webpackJsonp([39],{"0YRM":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_btnInput_vue__=__webpack_require__("ysqt"),__WEBPACK_IMPORTED_MODULE_4__components_System_dialogChooseSingleSuppliers__=__webpack_require__("FnMF"),__WEBPACK_IMPORTED_MODULE_5__outsourcingReturn_printOutsourcingReturn_vue__=__webpack_require__("FK+H"),__WEBPACK_IMPORTED_MODULE_6_vuex__=__webpack_require__("NYxO"),__WEBPACK_IMPORTED_MODULE_7__components_System_dialogChooseSingleUser__=__webpack_require__("3MlD"),__WEBPACK_IMPORTED_MODULE_8__outsourcingReturn_dialogImportoutSourcing__=__webpack_require__("N+kR"),__WEBPACK_IMPORTED_MODULE_9__utils_config_js__=__webpack_require__("bzuE"),__WEBPACK_IMPORTED_MODULE_10__utils_tools__=__webpack_require__("GKmE");__webpack_exports__.a={inject:["reload"],components:{btnInput:__WEBPACK_IMPORTED_MODULE_3__components_btnInput_vue__.a,printOutsourcingReturn:__WEBPACK_IMPORTED_MODULE_5__outsourcingReturn_printOutsourcingReturn_vue__.a,dialogImportoutSourcing:__WEBPACK_IMPORTED_MODULE_8__outsourcingReturn_dialogImportoutSourcing__.a,DialogChooseSingleUser:__WEBPACK_IMPORTED_MODULE_7__components_System_dialogChooseSingleUser__.a,dialogChooseSingleLocation:__WEBPACK_IMPORTED_MODULE_2__components_System_dialogChooseSingleLocation__.a,dialogChooseSingleSupplier:__WEBPACK_IMPORTED_MODULE_4__components_System_dialogChooseSingleSuppliers__.a},data:function(){return{printDirection:1,printTypeList:[],formData:{outTime:"",operatorName:"",operator:"",supplierId:"",supplierName:""},auditStatus:"",config:__WEBPACK_IMPORTED_MODULE_9__utils_config_js__.a,btnDisabled:!0,itemIds:[],fac_type_list:[],fac_location_list:[],warehouseRow:"",returnMaterielId:"",availableCount:0,totalCount:0,model:{rules:{count:{required:!0,message:"退回数量必填",trigger:"change"}},childList:[]},btnOtherDisabled:!0,btnDelDisabled:!1,isDisabled:!1,chooseSupplierVisible:!1,chooseOperatorVisible:!1,ChooseMaterielVisible:!1,chooseClientrVisible:!1,ChooseStockVisible:!1,ChooseoutSourcingVisible:!1,chooseUserVisible:!1,ChooseLocationVisible:!1,loading:!1,materielId:"",currentIndex:"",ruleForm:{supplierName:[{required:!0,message:"请选择供应商",trigger:"change"}],outTime:[{required:!0,message:"请选择出库时间",trigger:"change"}],operatorName:[{required:!0,message:"请选择退料人",trigger:"change"}]},printTotal:{count:"",amount:""},printList:[],printDetail:{deptName:"",inOutTime:"",outCode:""},printForm:[{title:"物料代码",prop_:"materielSerialNo"},{title:"物料名称",prop_:"materielName"},{title:"规格型号",prop_:"specification"},{title:"辅助单位",prop_:"supportUomName"},{title:"批号",prop_:"batch"},{title:"退料数量(辅助单位)",prop_:"subQuoteCount"},{title:"单价",prop_:"unitPrice"},{title:"金额",prop_:"amount"},{title:"仓库",prop_:"warehouseName"},{title:"库位",prop_:"warehLocationName"}]}},mounted:function(){if(this.initialize(),this.getPrintTypeList(),this.$route.query.id)this.formData.id=this.$route.query.id,this.returnMaterielId=this.$route.query.id;else{var e=new Date;this.$set(this.formData,"outTime",e.getFullYear()+"-"+this.settime(e.getMonth()+1)+"-"+this.settime(e.getDate()))}this.returnMaterielId&&this.getDetail()},watch:{returnMaterielId:{handler:function(e,t){this.btnDelDisabled=""!=e&&void 0!=e}},formData:{handler:function(e,t){""==e.operator&&(this.formData.deptName="",this.formData.deptId="")},deep:!0},model:{handler:function(e,t){e.childList.forEach(function(e){void 0!=e.facId&&""!=e.facId||(e.locationName="",e.locationId="")})},deep:!0}},methods:__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({},Object(__WEBPACK_IMPORTED_MODULE_6_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){})},ChooseImportShow:function(){this.formData.supplierId?this.ChooseoutSourcingVisible=!0:this.$message({message:"请先选择供应商",type:"warning"})},getSupplier:function(e){e?(this.$set(this.formData,"supplierId",e.id),this.$set(this.formData,"supplierName",e.name)):(this.$set(this.formData,"supplierId",""),this.$set(this.formData,"supplierName",""))},changeCount:function(e){if(e.error_count){for(var t=0,a=0;a<this.model.childList.length;a++)e.error_count&&e.sourceId==this.model.childList[a].sourceId&&(t=parseFloat(t)+parseFloat(this.model.childList[a].count));parseFloat(e.sourceCount)>=t&&this.model.childList.forEach(function(t){t.sourceId==e.sourceId&&delete t.error_count})}},settime:function(e){return 1==e.toString().length?"0"+e.toString():e},changeWarehouse:function(e){console.log(e.facId),this.$set(e,"locationName","选择仓位"),this.$set(e,"locationId","")},chooseLocation:function(e){this.warehouseRow=e,this.ChooseLocationVisible=!0},getLocation:function(e){this.$set(this.warehouseRow,"locationId",e.id),this.$set(this.warehouseRow,"locationName",e.name)},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)})},getDetail:function(){var e=this,t=this;this.loading=!0,this.$nextTick().then(function(){e.$api.returnMaterielAPI.getDtailOfOtherIn({inHeadIds:e.returnMaterielId}).then(function(a){e.loading=!1,t.$set(t.formData,"auditStatus",a.data.deatilOfhead.auditSign?a.data.deatilOfhead.auditSign:""),t.auditStatus=e.formData.auditStatus,t.$set(t.formData,"deptName",a.data.deatilOfhead.deptName?a.data.deatilOfhead.deptName:""),t.$set(t.formData,"supplierName",a.data.deatilOfhead.sourceCompanyName?a.data.deatilOfhead.sourceCompanyName:""),t.$set(t.formData,"supplierId",a.data.deatilOfhead.sourceCompany?a.data.deatilOfhead.sourceCompany:""),t.$set(t.formData,"deptId",a.data.deatilOfhead.deptId?a.data.deatilOfhead.deptId:""),t.$set(t.formData,"operatorName",a.data.deatilOfhead.operatorName?a.data.deatilOfhead.operatorName:""),t.$set(t.formData,"operator",a.data.deatilOfhead.operator?a.data.deatilOfhead.operator:""),t.$set(t.formData,"outTime",a.data.deatilOfhead.inOutTime?a.data.deatilOfhead.inOutTime:""),t.$set(t.formData,"remarks",a.data.deatilOfhead.remarks?a.data.deatilOfhead.remarks:""),t.$set(t.formData,"createUserName",a.data.deatilOfhead.crateByName?a.data.deatilOfhead.crateByName:""),t.$set(t.formData,"createTime",a.data.deatilOfhead.createTime?a.data.deatilOfhead.createTime:""),t.$set(t.formData,"auditTime",a.data.deatilOfhead.auditTime?a.data.deatilOfhead.auditTime:""),t.$set(t.formData,"auditorName",a.data.deatilOfhead.auditorName?a.data.deatilOfhead.auditorName:""),t.model.childList=a.data.deatilOfBody,t.model.childList.forEach(function(a){e.$set(a,"onlyId",a.materielId+"_"+Math.random()),a.materielSerialNo=a.serialno?a.serialno:"",a.materielName=a.proName?a.proName:"",a.unitUomName=a.unitName?a.unitName:"",a.returnReason=a.returnReason?a.returnReason:"",a.sellUnitPrice=a.unitPrice?a.unitPrice:0,t.$set(a,"unitPrice",a.unitPrice?a.unitPrice:0),t.$set(a,"amount",a.amount?a.amount:0),a.materielId=a.materielId?a.materielId:"",a.newId=a.id?a.id:"",a.stockId=a.stockId?a.stockId:"",a.thisSourceTypeName=a.sourceTypeName?a.sourceTypeName:"",t.$set(a,"facId",a.warehouse?a.warehouse:""),t.$set(a,"facName",a.warehouseName?a.warehouseName:""),t.$set(a,"locationId",a.warehLocation?a.warehLocation:""),t.$set(a,"locationName",a.warehLocationName?a.warehLocationName:""),a.code=a.sourceCode?a.sourceCode:"",a.sourceId=a.sourceId?a.sourceId:"",a.thisSourceType=a.sourceType?a.sourceType:""}),e.printDetail.deptName=a.data.deatilOfhead.deptName,e.printDetail.createByName=e.formData.createUserName,e.printDetail.createTimePrint=Object(__WEBPACK_IMPORTED_MODULE_10__utils_tools__.i)(e.formData.createTime,"{y}-{m}-{d}"),e.printDetail.auditorName=e.formData.auditorName,e.printDetail.auditTimePrint=Object(__WEBPACK_IMPORTED_MODULE_10__utils_tools__.i)(e.formData.auditTime,"{y}-{m}-{d}"),e.printDetail.inOutTime=/\d{4}-\d{1,2}-\d{1,2}/g.exec(a.data.deatilOfhead.inOutTime)[0],e.printDetail.inheadCode=a.data.deatilOfhead.inheadCode,e.printList=JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(e.model.childList))})})},clear:function(){this.$route.query.id&&(this.formData.id=void 0,this.returnMaterielId=void 0),this.auditStatus="",this.model.childList=[],this.formData={},this.itemIds=[],this.$refs.form.resetFields();var e=new Date;this.$set(this.formData,"outTime",e.getFullYear()+"-"+this.settime(e.getMonth()+1)+"-"+this.settime(e.getDate()))},back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.push({path:"/outsourcing/outsourcing_outsourcingReturn_index",query:{t:Date.now()}}),this.clear()},save:function(e){var t=this,a=void 0;this.$refs.formChild.validate(function(e,t){a=e}),this.$refs[e].validate(function(e){if(e){if(0==t.model.childList.length)return void t.$message({message:"请选择物料",type:"warning"});if(!a)return void t.$message({message:"有必填项未填写",type:"warning"});var i=!0;if(t.model.childList.forEach(function(e){e.subQuoteCount<=0&&(i=!1)}),!i)return void t.$message({message:"退回数量必须大于0",type:"warning"});if(t.formData.id){var o=[];if(t.model.childList.forEach(function(e){var a={id:e.newId,stockId:e.stockId,materielId:e.materielId,count:e.count.toFixed(e.quantityAccuracy),supportUom:e.supportUom,convCoefficient:e.convCoefficient,backCount:e.subQuoteCount?e.subQuoteCount.toFixed(e.quantityAccuracy):0,unitPrice:e.sellUnitPrice.toFixed(e.priceAccuracy),amount:e.sellAmount,sourceId:e.sourceId,sourceType:e.thisSourceType,sourceCode:e.code,returnReason:e.returnReason?e.returnReason:""};e.facId&&(a.warehouse=e.facId),e.locationId&&""!=e.locationId&&(a.warehLocation=e.locationId),e.batch&&""!=e.batch&&(a.batch=e.batch),o.push(a),t.formData.item=__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(o)}),t.isDisabled)return;t.isDisabled=!0,t.$api.outsourcingReturnAPI.saveAndChange({id:t.formData.id,sourceCompany:t.formData.supplierId,inOutTime:t.formData.outTime,operator:t.formData.operator,deptId:t.formData.deptId,remarks:t.formData.remarks,bodyDetail:t.formData.item,itemIds:t.itemIds}).then(function(e){t.isDisabled=!1,0===e.code?t.$message({message:e.msg,type:"success"}):500===e.code&&e.data?(t.$message({message:e.msg,type:"error"}),t.model.childList.forEach(function(a){a.sourceId&&a.sourceId==e.data.sourceId&&(t.$set(a,"error_count",!0),t.$set(a,"sourceCount",e.data.sourceCount))})):t.$message({message:e.msg,type:"error"})})}else{var r=[];if(t.model.childList.forEach(function(e){var a={stockId:e.stockId,materielId:e.materielId,count:e.count.toFixed(e.quantityAccuracy),supportUom:e.supportUom,convCoefficient:e.convCoefficient,backCount:e.subQuoteCount?e.subQuoteCount.toFixed(e.quantityAccuracy):0,unitPrice:e.sellUnitPrice.toFixed(e.priceAccuracy),amount:e.sellAmount,sourceId:e.sourceId,sourceType:e.thisSourceType,sourceCode:e.code,returnReason:e.returnReason?e.returnReason:""};e.facId&&(a.warehouse=e.facId),e.locationId&&""!=e.locationId&&(a.warehLocation=e.locationId),e.batch&&""!=e.batch&&(a.batch=e.batch),r.push(a),t.formData.item=__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(r)}),t.isDisabled)return;t.isDisabled=!0,t.$api.outsourcingReturnAPI.saveAndChange({operator:t.formData.operator,sourceCompany:t.formData.supplierId,deptId:t.formData.deptId,inOutTime:t.formData.outTime,remarks:t.formData.remarks,bodyDetail:t.formData.item}).then(function(e){t.isDisabled=!1,0===e.code?(t.$message({message:e.msg,type:"success"}),t.returnMaterielId=e.inHeadId,window.location.href=t.changeURLArg("id",e.inHeadId)):500===e.code&&e.data?(t.$message({message:e.msg,type:"error"}),t.model.childList.forEach(function(a){a.sourceId&&a.sourceId==e.data.sourceId&&(t.$set(a,"error_count",!0),t.$set(a,"sourceCount",e.data.sourceCount))})):t.$message({message:e.msg,type:"error"})})}}})},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},sum1:function(e,t,a){if(e&&t){var i=e*t;return this.sellAmount=i,i=i.toFixed(__WEBPACK_IMPORTED_MODULE_9__utils_config_js__.a.amountFixedTo),this.$set(this.model.childList[a],"sellAmount",i),i}return 0},sum2:function(e,t,a){if(!t||!e)return 0;var i=e*t;return this.sellAmount=i,i=i.toFixed(__WEBPACK_IMPORTED_MODULE_9__utils_config_js__.a.amountFixedTo),this.$set(this.model.childList[a],"amount",i),i},audit:function(){var e=this,t=this.formData.id;this.$confirm("确认审核吗?","提示",{type:"warning"}).then(function(){e.$api.outsourcingReturnAPI.audit({id:t}).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getDetail()):e.$message({message:t.msg,type:"error"})})})},disAudit:function(){var e=this,t=this.formData.id;this.$confirm("确认反审核吗?","提示",{type:"warning"}).then(function(){e.$api.outsourcingReturnAPI.reverseAudit({id:t}).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getDetail()):e.$message({message:t.msg,type:"error"})})})},getUser:function(e){e&&(this.formData.operatorName=e.name,this.formData.operator=e.id,this.formData.deptName=e.deptName,this.formData.deptId=e.deptId)},getOperator:function(e){e&&(this.formData.operatorName=e.name,this.formData.operator=e.id)},getoutSourcing:function(e){var t=this;console.log(e),e&&e.forEach(function(e){t.$set(e,"availableCount",e.count),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,"sellUnitPrice",e.unitPrice?e.unitPrice:0),t.$set(e,"sellAmount",0),t.$set(e,"materielSerialNo",e.materielSerialNo?e.materielSerialNo:""),t.$set(e,"materielName",e.materielName?e.materielName:""),t.$set(e,"materielId",e.materielId),t.$set(e,"sourceId",e.itemId),t.$set(e,"thisSourceTypeName",e.thisSourceTypeName?e.thisSourceTypeName:""),t.$set(e,"thisSourceType",e.thisSourceType?e.thisSourceType:""),t.$set(e,"code",e.outCode?e.outCode:""),t.$set(e,"onlyId",e.id+"_"+Date.now()),delete e.id,t.model.childList.push(e)})},removePart:function(){var e=this;if(this.chooseParts){var t=[];this.chooseParts.forEach(function(a){t.push(a.id);var i=e.model.childList.findIndex(function(e){if(e.onlyId==a.onlyId&&e.id==a.id)return!0});e.model.childList.splice(i,1),e.itemIds=t})}},handlePartChange:function(e){this.chooseParts=e,console.log(this.chooseParts),this.setBtn(e)},setBtn:function(e){var t=!0,a=!0;e.length>0?(a=!1,1==e.length&&(t=!1)):(t=!0,a=!0),this.btnDelDisabled=a,this.btnOtherDisabled=t},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})},getSummaries:function(e){for(var t=e.columns,a=e.data,i=0,o=0;o<a.length;o++)i+=a[o].count;this.printTotal.count=i;var r=0,s=0;if(a.length>1)for(var n=0;n<a.length;n++)n<a.length-1&&a[n].subQuoteCount&&(a[n].unitPrice&&(r=a[n].subQuoteCount*a[n].unitPrice+a[n+1].subQuoteCount*a[n+1].unitPrice),a[n].sellUnitPrice&&(s=a[n].subQuoteCount*a[n].sellUnitPrice+a[n+1].subQuoteCount*a[n+1].sellUnitPrice));else 1==a.length&&a[0].subQuoteCount&&(a[0].unitPrice&&(r=a[0].subQuoteCount*a[0].unitPrice),a[0].sellUnitPrice&&(s=a[0].subQuoteCount*a[0].sellUnitPrice));this.printTotal.amount=r.toFixed(__WEBPACK_IMPORTED_MODULE_9__utils_config_js__.a.amountFixedTo),this.printTotal.sellAmount=s.toFixed(__WEBPACK_IMPORTED_MODULE_9__utils_config_js__.a.amountFixedTo);for(var l=[],u=0,c=0;c<a.length;c++)a[c].subQuoteCount&&a[c].sellUnitPrice&&(u+=a[c].subQuoteCount*a[c].sellUnitPrice);return t.forEach(function(e,t){if(0!==t)if(5===t||8===t||13===t)if(13!==t){var i=a.map(function(t){return Number(t[e.property])});i.every(function(e){return isNaN(e)})?l[t]="":l[t]=i.reduce(function(e,t){var a=Number(t);return isNaN(a)?e:e+t},0)}else l[t]=u.toFixed(__WEBPACK_IMPORTED_MODULE_9__utils_config_js__.a.amountFixedTo);else l[t]="";else l[t]="合计"}),l},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)}})}},"2mHM":function(e,t){},EUpV:function(e,t){},EXOQ:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("0YRM"),o={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys-box plan-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.back()}}},[e._v(e._s(e.config.cancelText))]),e._v(" "),179!=e.auditStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_outsourcingReturn:save",expression:"'outsourcing:outsourcing_outsourcingReturn:save'"}],attrs:{type:"primary",disabled:e.isDisabled},on:{click:function(t){return e.save("form")}}},[e._v("保存")]):e._e(),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.clear}},[e._v("新增")]),e._v(" "),a("el-dropdown",{staticStyle:{"margin-left":"10px","margin-right":"10px"},on:{command:e.printNew}},[a("el-button",{attrs:{type:"primary"}},[e._v("\n 打印"),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.printTypeList,function(t,i){return a("el-dropdown-item",{key:i,attrs:{command:t}},[e._v(e._s(t.name)+"\n ")])}),1)],1),e._v(" "),e.btnDelDisabled&&178==e.auditStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_outsourcingReturn:audit",expression:"'outsourcing:outsourcing_outsourcingReturn:audit'"}],attrs:{type:"primary"},on:{click:e.audit}},[e._v("审核")]):e._e(),e._v(" "),e.btnDelDisabled&&179==e.auditStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"outsourcing:outsourcing_outsourcingReturn:disAudit",expression:"'outsourcing:outsourcing_outsourcingReturn:disAudit'"}],attrs:{type:"primary"},on:{click:e.disAudit}},[e._v("反审核")]):e._e()],1),e._v(" "),a("div",{staticClass:"sys-form"},[a("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}},[a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{prop:"supplierName",label:"供应商"}},[a("btn-input",{attrs:{valueText:e.formData.supplierName,valueId:e.formData.supplierId,chooseVisible:e.chooseSupplierVisible,showBtn:179!=e.auditStatus},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,"supplierId",t)},"update:value-id":function(t){return e.$set(e.formData,"supplierId",t)},"update:chooseVisible":function(t){e.chooseSupplierVisible=t},"update:choose-visible":function(t){e.chooseSupplierVisible=t}}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"退料时间",prop:"outTime"}},[a("el-date-picker",{attrs:{type:"date",format:"yyyy-MM-dd","range-separator":"—",placeholder:"选择日期","value-format":"yyyy-MM-dd",clearable:"",disabled:179==e.auditStatus},model:{value:e.formData.outTime,callback:function(t){e.$set(e.formData,"outTime",t)},expression:"formData.outTime"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"退料人",prop:"operatorName"}},[a("btn-input",{attrs:{valueText:e.formData.operatorName,valueId:e.formData.operator,chooseVisible:e.chooseUserVisible,showBtn:179!=e.auditStatus},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(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"部门"}},[a("el-input",{attrs:{readonly:""},model:{value:e.formData.deptName,callback:function(t){e.$set(e.formData,"deptName",t)},expression:"formData.deptName"}})],1)],1)]),e._v(" "),a("el-divider",{attrs:{"content-position":"left"}},[a("div",[e._v("关联单据")])]),e._v(" "),a("el-form",{ref:"formChild",attrs:{rules:e.model.rules,model:e.model}},[a("el-form-item",{staticClass:"childlist",attrs:{prop:"childList"}},[a("div",{staticClass:"sys-operate",staticStyle:{"margin-bottom":"10px"}},[179!=e.auditStatus?a("el-button",{attrs:{type:"primary"},on:{click:e.ChooseImportShow}},[e._v("新增")]):e._e(),e._v(" "),179!=e.auditStatus?a("el-button",{attrs:{type:"primary",disabled:e.btnDelDisabled},on:{click:function(t){return e.removePart()}}},[e._v("删除")]):e._e()],1),e._v(" "),a("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}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"materielSerialNo",label:"物料代码",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"materielName",label:"物料名称",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"specification",align:"center","show-overflow-tooltip":"",label:"规格型号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"unitUomName",align:"center",label:"主计量单位","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"count",align:"center",label:"主单位数量","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"supportUomName",align:"center",label:"辅助单位","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"convCoefficient",align:"center",label:"换算系数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"subQuoteCount",align:"center",width:"180",label:"退回数量","label-class-name":"required_head"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form-item",{class:t.row.error_count?"error_count":"",attrs:{prop:"childList."+t.$index+".count",rules:e.model.rules.count}},[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small",precision:t.row.quantityAccuracy,"controls-position":"right",disabled:179==e.auditStatus},on:{change:function(a){return e.changeCount2(t.row)}},model:{value:t.row.subQuoteCount,callback:function(a){e.$set(t.row,"subQuoteCount",a)},expression:"scope.row.subQuoteCount"}})],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"facId",width:"120",align:"center",label:"仓库","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form-item",{attrs:{prop:"childList."+t.$index+".facId"}},[a("el-select",{attrs:{clearable:"",placeholder:"仓库"},on:{change:function(a){return e.changeWarehouse(t.row)}},model:{value:t.row.facId,callback:function(a){e.$set(t.row,"facId",a)},expression:"scope.row.facId"}},e._l(e.fac_type_list,function(t){return a("el-option",{key:t.id,attrs:{disabled:179==e.auditStatus,label:t.name,value:t.id}})}),1)],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"locationName",width:"120",align:"center",label:"仓位","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticStyle:{color:"#3a8ee6",cursor:"pointer"},on:{click:function(a){return e.chooseLocation(t.row)}}},[e._v(e._s(t.row.locationName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"batch",width:"120",align:"center",label:"批号","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"sellUnitPrice",align:"center",width:"180",label:"单价(元)"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small",precision:t.row.priceAccuracy,"controls-position":"right",disabled:179==e.auditStatus},model:{value:t.row.sellUnitPrice,callback:function(a){e.$set(t.row,"sellUnitPrice",a)},expression:"scope.row.sellUnitPrice"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"金额(元)",prop:"sellAmount",width:"140"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.sum1(t.row.subQuoteCount,t.row.sellUnitPrice,t.$index))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"退料原因",width:"120",prop:"returnReason"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{attrs:{type:"textarea",autosize:{minRows:1},clearable:"",disabled:179==e.auditStatus},model:{value:t.row.returnReason,callback:function(a){e.$set(t.row,"returnReason",a)},expression:"scope.row.returnReason"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"thisSourceTypeName",align:"center",label:"源单类型",width:"120px"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.thisSourceTypeName?a("div",{staticStyle:{color:"#3a8ee6"}},[e._v(e._s(t.row.thisSourceTypeName))]):a("div",{staticStyle:{color:"#3a8ee6"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"code","show-overflow-tooltipalign":"",label:"源单单号"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticStyle:{color:"#3a8ee6"}},[e._v(e._s(t.row.code))])]}}])})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"remarks"}},[a("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.returnMaterielId?a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:5}},[e._v("制单人:"+e._s(e.formData.createUserName))]),e._v(" "),a("el-col",{attrs:{span:7}},[e._v("制单时间:"+e._s(e.formData.createTime))]),e._v(" "),a("el-col",{attrs:{span:5}},[e._v("审核人:"+e._s(e.formData.auditorName))]),e._v(" "),a("el-col",{attrs:{span:7}},[e._v("审核时间:"+e._s(e.formData.auditTime))])],1):e._e()],1),e._v(" "),a("dialogChooseSingleLocation",{attrs:{warehouseId:e.warehouseRow.facId,visible:e.ChooseLocationVisible},on:{"update:visible":function(t){e.ChooseLocationVisible=t},change:e.getLocation}}),e._v(" "),a("dialogChooseSingleSupplier",{attrs:{visible:e.chooseSupplierVisible},on:{"update:visible":function(t){e.chooseSupplierVisible=t},change:e.getSupplier}}),e._v(" "),a("DialogChooseSingleUser",{attrs:{visible:e.chooseUserVisible},on:{"update:visible":function(t){e.chooseUserVisible=t},change:e.getUser}}),e._v(" "),a("dialogImportoutSourcing",{attrs:{visible:e.ChooseoutSourcingVisible,supplierId:e.formData.supplierId,supplierName:e.formData.supplierName},on:{"update:visible":function(t){e.ChooseoutSourcingVisible=t},change:e.getoutSourcing}}),e._v(" "),a("div",{staticStyle:{margin:"0 auto",display:"none"},attrs:{id:"print_content"}},[a("printOutsourcingReturn",{attrs:{printDetail:e.printDetail,printList:e.printList,printForm:e.printForm,printTotal:e.printTotal,printDirection:e.printDirection}})],1)],1)},staticRenderFns:[]};var r=function(e){a("EUpV"),a("2mHM")},s=a("VU/8")(i.a,o,!1,r,"data-v-05c1f21b",null);t.default=s.exports},"FK+H":function(e,t,a){"use strict";var i=a("2QJe"),o=(a("TExn"),a("bzuE")),r={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{pageHeight:"",pageWidth:"",config:o.a}},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)},watch:{printList:{handler:function(e,t){Object(i.a)(e,this.printForm,this.printTotal,this.printDirection)},deep:!0}}},s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"print_content",style:{width:e.pageWidth+"px"}},[a("div",{staticClass:"print_top"},[a("div",{staticClass:"head_out"},[a("h1",{staticStyle:{"text-align":"center"}},[e._v("委外退料单")]),e._v(" "),e.printDetail?a("div",{staticClass:"head2"},[a("div",{staticClass:"head2_item"},[e._v("部门:"+e._s(e.printDetail.deptName))]),e._v(" "),a("div",{staticClass:"head2_item"},[e._v("退回日期:"+e._s(e.printDetail.inOutTime))]),e._v(" "),a("div",{staticClass:"head2_item"},[e._v("单据编号:"+e._s(e.printDetail.inheadCode))])]):e._e()]),e._v(" "),a("div",{staticClass:"table_content"})]),e._v(" "),a("div",{staticClass:"footer_out"},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:5}},[e._v("制单人:"+e._s(e.printDetail.createByName))]),e._v(" "),a("el-col",{attrs:{span:7}},[e._v("制单时间:"+e._s(e.printDetail.createTimePrint))]),e._v(" "),a("el-col",{attrs:{span:5}},[e._v("审核人:"+e._s(e.printDetail.auditorName))]),e._v(" "),a("el-col",{attrs:{span:7}},[e._v("审核时间:"+e._s(e.printDetail.auditTimePrint))])],1)],1)])},staticRenderFns:[]},n=a("VU/8")(r,s,!1,null,null,null);t.a=n.exports},"N+kR":function(e,t,a){"use strict";var i=a("GKmE"),o={name:"dialogChooseFeedingItem",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{pickerOptions0:{disabledDate:function(e){}},sourceTypeList:[{name:"委外出库",id:1}],sourceTypeId:1,subsetList:[],subsetAll:[],subsetTotal:0,searchData_Subset:{pageno:1,pagesize:5,name:"",auditSign:179,isOutsourcingReturn:1},callBackData:[],innerVisible:this.visible,loading:!1,dialogLoading:!1,feedingList:[],addVisible:!1,period:""}},mounted:function(){var e=this;this.$api.outsourcingAPI.stockStockAnalysisTime().then(function(t){0===t.code&&t.period&&(e.period=t.period,e.searchData_Subset.startTime=t.period,e.pickerOptions0={disabledDate:function(e){var a=t.period;return e.getTime()<Date.parse(new Date(a))}})})},computed:{},methods:{getRowKey:function(e){return e.id+"_"+e.materielId},clickRow:function(e){this.$refs.tb.toggleRowSelection(e)},getList:function(){var e=this;console.log(this.supplierId),this.supplierId&&(this.searchData_Subset.supplierId=this.supplierId,this.searchData_Subset.supplierName=this.supplierName),this.dialogLoading=!0,this.searchData_Subset.createTime0&&(this.searchData_Subset.startTime=Object(i.b)(this.searchData_Subset.createTime0[0]),this.searchData_Subset.endTime=Object(i.b)(this.searchData_Subset.createTime0[1])),this.searchData_Subset.storageType=276,this.$api.outsourcingAPI.outsourcingStockOutDialog(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()}}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],attrs:{center:"",title:"选择委外出库",visible:e.innerVisible,width:"950px"},on:{"update:visible":function(t){e.innerVisible=t}}},[a("div",[a("el-form",{attrs:{inline:""}},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"源单类型",clearable:""}},[a("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 a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-input",{staticStyle:{width:"220px"},attrs:{placeholder:"供应商",clearable:"",disabled:""},model:{value:e.supplierName,callback:function(t){e.supplierName=t},expression:"supplierName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"单据时间"}},[a("el-date-picker",{staticStyle:{width:"280px"},attrs:{type:"datetimerange",format:"yyyy-MM-dd HH:mm:ss","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间","picker-options":e.pickerOptions0},model:{value:e.searchData_Subset.createTime0,callback:function(t){e.$set(e.searchData_Subset,"createTime0",t)},expression:"searchData_Subset.createTime0"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.searchSubset}},[e._v("查询")])],1)],1)],1),e._v(" "),a("div",{staticClass:"sys-table"},[a("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}},[a("el-table-column",{attrs:{type:"selection","reserve-selection":!0,width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"outTime",label:"单据时间",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"materielSerialNo",label:"物料代码",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"materielName",label:"物料名称",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"specification",label:"规格型号",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"unitPrice",label:"单价",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"amount",label:"金额",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"batch",label:"批号",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"outCode",label:"单据编号",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"unitUomName",label:"主计量单位",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"count",label:"领用数量(主单位)",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"quoteCount",label:"可执行数量(主单位)",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"supportUomName",label:"辅助单位",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"outCount",label:"领用数量(辅助单位)",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"subQuoteCount",label:"可执行数量(辅助单位)",align:"center","show-overflow-tooltip":""}})],1)],1),e._v(" "),a("div",{staticClass:"sys-pagination"},[a("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(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:function(t){return e.submit()}}},[e._v("确定")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.innerVisible=!1}}},[e._v("关闭")])],1)])},staticRenderFns:[]},s=a("VU/8")(o,r,!1,null,null,null);t.a=s.exports}});