yxk_pc_mdh/gyhl/static/js/55.f3b15c85634ad4bd34b7.js

1 line
27 KiB
JavaScript

webpackJsonp([55],{NfA0:function(t,e,i){"use strict";var a=i("S8x/"),o=(i("TExn"),i("bzuE")),s={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(t,e){Object(a.a)(t,this.printForm,this.printTotal,this.printDirection)},deep:!0}}},l={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"print_content",style:{width:t.pageWidth+"px"}},[i("div",{staticClass:"print_top"},[i("div",{staticClass:"head_out"},[i("h1",{staticStyle:{"text-align":"center"}},[t._v("库存调拨单")]),t._v(" "),t.printDetail?i("div",{staticClass:"head2"},[i("div",{staticClass:"head2_item"},[t._v("调拨日期:"+t._s(t.printDetail.allotTime))]),t._v(" "),i("div",{staticClass:"head2_item"},[t._v("单据编号:"+t._s(t.printDetail.allotCode))])]):t._e()]),t._v(" "),i("div",{staticClass:"table_content"})]),t._v(" "),i("div",{staticClass:"footer_out"},[i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:5}},[t._v("制单人:"+t._s(t.printDetail.createByName))]),t._v(" "),i("el-col",{attrs:{span:7}},[t._v("制单时间:"+t._s(t.printDetail.createTimePrint))]),t._v(" "),i("el-col",{attrs:{span:5}},[t._v("审核人:"+t._s(t.printDetail.auditorName))]),t._v(" "),i("el-col",{attrs:{span:7}},[t._v("审核时间:"+t._s(t.printDetail.auditTimePrint))])],1)],1)])},staticRenderFns:[]},n=i("VU/8")(s,l,!1,null,null,null);e.a=n.exports},as5C:function(t,e){},jUVs: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__warehouse_allot_printAllot_vue__=__webpack_require__("NfA0"),__WEBPACK_IMPORTED_MODULE_5_vuex__=__webpack_require__("NYxO"),__WEBPACK_IMPORTED_MODULE_6__components_System_dialogChooseSingleUser__=__webpack_require__("3MlD"),__WEBPACK_IMPORTED_MODULE_7__components_Dialog_dialogChooseSingleStock__=__webpack_require__("rfXi"),__WEBPACK_IMPORTED_MODULE_8__components_System_dialogChooseParts_vue__=__webpack_require__("CdUU"),__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,printAllot:__WEBPACK_IMPORTED_MODULE_4__warehouse_allot_printAllot_vue__.a,dialogChooseParts:__WEBPACK_IMPORTED_MODULE_8__components_System_dialogChooseParts_vue__.a,DialogChooseSingleUser:__WEBPACK_IMPORTED_MODULE_6__components_System_dialogChooseSingleUser__.a,dialogChooseSingleStock:__WEBPACK_IMPORTED_MODULE_7__components_Dialog_dialogChooseSingleStock__.a,dialogChooseSingleLocation:__WEBPACK_IMPORTED_MODULE_2__components_System_dialogChooseSingleLocation__.a},data:function(){return{formData:{allotTime:"",allotUserName:"",allotUser:""},auditStatus:"",config:__WEBPACK_IMPORTED_MODULE_9__utils_config_js__.a,btnDisabled:!0,itemIds:[],fac_type_list:[],fac_location_list:[],warehouseRow:"",allotId:"",availableCount:0,totalCount:0,model:{rules:{sellUnitPrice:{required:!0,message:"单价必填",trigger:"change"},count:{required:!0,message:"入库数量必填",trigger:"change"},inFacility:{required:!0,message:"仓库必填",trigger:"change"}},childList:[]},ChooseLocationVisible:!1,btnOtherDisabled:!0,btnDelDisabled:!1,chooseOperatorVisible:!1,ChooseMaterielVisible:!1,chooseClientrVisible:!1,ChooseStockVisible:!1,ChooseConsumingStockVisible:!1,chooseUserVisible:!1,loading:!1,isDisabled:!1,materielId:"",currentIndex:"",ruleForm:{allotTime:[{required:!0,message:"请选择调拨时间",trigger:"change"}],allotUserName:[{required:!0,message:"请选择调拨人",trigger:"change"}]},printTotal:{count:"",amount:""},printList:[],printDetail:{allotTime:"",allotCode:""},printForm:[{title:"物料代码",prop_:"materielSerialNo"},{title:"物料名称",prop_:"materielName"},{title:"规格型号",prop_:"specification"},{title:"辅助单位",prop_:"supportUomName"},{title:"批号",prop_:"batch"},{title:"调拨数量(辅助单位)",prop_:"subQuoteCount"},{title:"调出仓库",prop_:"outFacilityName"},{title:"调出库位",prop_:"outLocationName"},{title:"调入仓库",prop_:"inFacilityName"},{title:"调入库位",prop_:"inLocationName"}]}},mounted:function(){if(this.initialize(),this.$route.query.id)this.formData.id=this.$route.query.id,this.allotId=this.$route.query.id;else{var t=new Date;this.$set(this.formData,"allotTime",t.getFullYear()+"-"+this.settime(t.getMonth()+1)+"-"+this.settime(t.getDate()))}this.allotId&&this.getDetail()},watch:{allotId:{handler:function(t,e){this.btnDelDisabled=""!=t&&void 0!=t}},model:{handler:function(t,e){var i=this;t.childList.forEach(function(t){void 0!=t.inFacility&&""!=t.inFacility||(i.$set(t,"inLocationName",""),i.$set(t,"inLocation",""))})},deep:!0}},methods:__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({},Object(__WEBPACK_IMPORTED_MODULE_5_vuex__.d)({removeTagNav:"tagNav/removeTagNav"}),{settime:function(t){return 1==t.toString().length?"0"+t.toString():t},initialize:function(){var t=this;this.$api.gylInventoryAPI.facilityList({pageno:1,pagesize:1e3,auditSign:179}).then(function(e){t.fac_type_list=e.data.datas?e.data.datas:""}).catch(function(t){console.log(t)}),this.$api.gylInventoryAPI.facilityLocationList({pageno:1,pagesize:1e3}).then(function(e){t.fac_location_list=e.data.datas?e.data.datas:""}).catch(function(t){console.log(t)})},getDetail:function(){var t=this,e=this;this.loading=!0,this.$nextTick().then(function(){t.$api.allotAPI.getDetail({id:t.allotId}).then(function(i){t.loading=!1,e.$set(e.formData,"auditStatus",i.allot.auditSign?i.allot.auditSign:""),e.auditStatus=t.formData.auditStatus,e.$set(e.formData,"allotUserName",i.allot.allotUserName?i.allot.allotUserName:""),e.$set(e.formData,"allotUser",i.allot.allotUser?i.allot.allotUser:""),e.$set(e.formData,"allotTime",i.allot.allotTime?i.allot.allotTime:""),e.$set(e.formData,"remarks",i.allot.remark?i.allot.remark:""),e.$set(e.formData,"deptId",i.allot.deptId?i.allot.deptId:""),e.$set(e.formData,"deptName",i.allot.deptName?i.allot.deptName:""),e.$set(e.formData,"reason",i.allot.reason?i.allot.reason:""),e.$set(e.formData,"createUserName",i.allot.createUserName?i.allot.createUserName:""),e.$set(e.formData,"createTime",i.allot.createTime?i.allot.createTime:""),e.$set(e.formData,"auditTime",i.allot.auditTime?i.allot.auditTime:""),e.$set(e.formData,"auditorName",i.allot.auditorName?i.allot.auditorName:""),e.model.childList=i.item,e.model.childList.forEach(function(i){e.$set(i,"btnName","已查询"),t.$set(i,"onlyId",i.materielId+"_"+Math.random()),i.materielSerialNo=i.materielSerialno?i.materielSerialno:"",i.availableCount=i.availableCount?i.availableCount:"",i.unitUomName=i.unitName?i.unitName:"",i.sellUnitPrice=i.price?i.price:0,i.newId=i.itemId?i.itemId:"",i.stockId=i.stockId?i.stockId:"",i.inFacility=i.inFacility?i.inFacility:"",e.$set(i,"inFacility",i.inFacility),e.$set(i,"inLocation",i.inLocation?i.inLocation:""),e.$set(i,"inLocationName",i.inLocationName?i.inLocationName:""),i.inLocation=i.inLocation?i.inLocation:"",i.inLocationName=i.inLocationName?i.inLocationName:"",i.inFacility=i.inFacility?i.inFacility:"",i.inLocation=i.inLocation?i.inLocation:""}),t.printDetail.createByName=t.formData.createUserName,t.printDetail.createTimePrint=Object(__WEBPACK_IMPORTED_MODULE_10__utils_tools__.i)(t.formData.createTime,"{y}-{m}-{d}"),t.printDetail.auditorName=t.formData.auditorName,t.printDetail.auditTimePrint=t.formData.auditTime?Object(__WEBPACK_IMPORTED_MODULE_10__utils_tools__.i)(t.formData.auditTime,"{y}-{m}-{d}"):"",t.printDetail.allotTime=/\d{4}-\d{1,2}-\d{1,2}/g.exec(i.allot.allotTime)[0],t.printDetail.allotCode=i.allot.allotCode,t.printList=JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(t.model.childList))})})},clear:function(){this.$route.query.id&&(this.formData.id=void 0,this.allotId=void 0),this.auditStatus="",this.model.childList=[],this.formData={},this.itemIds=[],this.$refs.form.resetFields();var t=new Date;this.$set(this.formData,"allotTime",t.getFullYear()+"-"+this.settime(t.getMonth()+1)+"-"+this.settime(t.getDate()))},changeWarehouse:function(t){this.$set(t,"inLocationName","选择仓位"),this.$set(t,"inLocation","")},chooseLocation:function(t){console.log(t),this.warehouseRow=t,this.ChooseLocationVisible=!0},getLocation:function(t){console.log(t),t?(this.$set(this.warehouseRow,"inLocation",t.id),this.$set(this.warehouseRow,"inLocationName",t.name)):(this.$set(this.warehouseRow,"inLocation",""),this.$set(this.warehouseRow,"inLocationName",""))},back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.push({path:"/warehouse/allot",query:{t:Date.now()}}),this.clear()},save:function(t){var e=this;this.$refs[t].validate(function(t){if(t){if(0==e.model.childList.length)return void e.$message({message:"请选择物料",type:"warning"});var i=void 0;if(e.$refs.formChild.validate(function(t,e){i=t}),!i)return void e.$message({message:"有必填项未填写",type:"warning"});var a=!0,o=!0;if(e.model.childList.forEach(function(t){t.stockId||(a=!1),t.facilityId==t.inFacility&&t.facilityLocationId==t.inLocation&&(o=!1)}),!a)return void e.$message({message:"请查询库存",type:"warning"});if(!o)return void e.$message.error("请选择不同库存或库位!");var s=!0;if(e.model.childList.forEach(function(t){t.subQuoteCount<=0&&(s=!1)}),!s)return void e.$message({message:"领用数量必须大于0",type:"warning"});var l=!0;if(e.model.childList.forEach(function(t){t.count>t.availableCount&&(l=!1)}),l)if(e.formData.id){var n=[];if(e.model.childList.forEach(function(t){var i={id:t.newId,stockId:t.stockId,count:t.count.toFixed(t.quantityAccuracy),supportUom:t.supportUom,convCoefficient:t.convCoefficient,subCount:t.subQuoteCount?t.subQuoteCount.toFixed(t.quantityAccuracy):0,price:t.sellUnitPrice.toFixed(t.priceAccuracy)};t.inFacility&&(i.inFacility=t.inFacility),t.inLocation&&(i.inLocation=t.inLocation),n.push(i),e.formData.item=__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(n)}),e.isDisabled)return;e.isDisabled=!0,e.$api.allotAPI.edit({id:e.formData.id,allotTime:e.formData.allotTime,allotUser:e.formData.allotUser,remark:e.formData.remarks,body:e.formData.item,itemIds:e.itemIds,deptId:e.formData.deptId?e.formData.deptId:"",reason:e.formData.reason?e.formData.reason:""}).then(function(t){e.isDisabled=!1,0===t.code?e.$message({message:t.msg,type:"success"}):e.$message({message:t.msg,type:"error"})})}else{var r=[];if(e.model.childList.forEach(function(t){console.log(t);var i={stockId:t.stockId,count:t.count.toFixed(t.quantityAccuracy),supportUom:t.supportUom,convCoefficient:t.convCoefficient,subCount:t.subQuoteCount?t.subQuoteCount.toFixed(t.quantityAccuracy):0,price:t.sellUnitPrice.toFixed(t.priceAccuracy)};t.inFacility&&(i.inFacility=t.inFacility),t.inLocation&&(i.inLocation=t.inLocation),r.push(i),e.formData.item=__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(r)}),e.isDisabled)return;e.isDisabled=!0,e.$api.allotAPI.add({allotUser:e.formData.allotUser,allotTime:e.formData.allotTime,remark:e.formData.remarks,body:e.formData.item,itemIds:e.itemIds,deptId:e.formData.deptId?e.formData.deptId:"",reason:e.formData.reason?e.formData.reason:""}).then(function(t){e.isDisabled=!1,0===t.code?(e.$message({message:t.msg,type:"success"}),e.allotId=t.id,window.location.href=e.changeURLArg("id",t.id)):e.$message({message:t.msg,type:"error"})})}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},sum1:function(t,e,i){var a=t*e?t*e:0;return this.sellAmount=a,a=a.toFixed(__WEBPACK_IMPORTED_MODULE_9__utils_config_js__.a.amountFixedTo),this.$set(this.model.childList[i],"sellAmount",a),a},audit:function(){var t=this,e=this.formData.id;this.$confirm("确认审核吗?","提示",{type:"warning"}).then(function(){t.$api.allotAPI.audit({id:e}).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),t.getDetail()):t.$message({message:e.msg,type:"error"})})})},disAudit:function(){var t=this,e=this.formData.id;this.$confirm("确认反审核吗?","提示",{type:"warning"}).then(function(){t.$api.allotAPI.reverseAudit({id:e}).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),t.getDetail()):t.$message({message:e.msg,type:"error"})})})},getUser:function(t){t&&(this.formData.allotUserName=t.name,this.formData.allotUser=t.id,this.formData.deptName=t.deptName,this.formData.deptId=t.deptId)},getOperator:function(t){t&&(this.formData.operatorName=t.name,this.formData.operator=t.id)},getMateriel:function(t){var e=this;console.log(t),t&&t.forEach(function(t){e.$set(t,"btnName","查询"),e.$set(t,"subQuoteCount",0),e.$set(t,"count",0),delete t.convCoefficient,delete t.supportUomName,delete t.supportUom,e.$set(t,"sellUnitPrice",t.salePrice?t.salePrice:0),e.$set(t,"materielSerialNo",t.serialNo?t.serialNo:""),e.$set(t,"materielName",t.name?t.name:""),e.$set(t,"materielId",t.id),e.$set(t,"onlyId",t.id+"_"+Date.now()),e.model.childList.push(t)})},removePart:function(){var t=this;if(this.chooseParts){var e=[];this.chooseParts.forEach(function(i){console.log(i),e.push(i.itemId);var a=t.model.childList.findIndex(function(t){if(t.onlyId==i.onlyId&&t.id==i.id)return!0});t.model.childList.splice(a,1),t.itemIds=e})}},handlePartChange:function(t){this.chooseParts=t,console.log(this.chooseParts),this.setBtn(t)},setBtn:function(t){var e=!0,i=!0;t.length>0?(i=!1,1==t.length&&(e=!1)):(e=!0,i=!0),this.btnDelDisabled=i,this.btnOtherDisabled=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 t=document.getElementById("print_content").innerHTML;return document.body.innerHTML="<html><head><title>打印</title></head><body>"+t+"</body></html>",window.print(),window.location.reload(),!1})},getSummaries:function(t){for(var e=t.columns,i=t.data,a=0,o=0;o<i.length;o++)a+=i[o].count;this.printTotal.count=a;var s=0,l=0;if(i.length>1)for(var n=0;n<i.length;n++)n<i.length-1&&(s=i[n].subQuoteCount*i[n].unitPrice?i[n].subQuoteCount*i[n].unitPrice+i[n+1].subQuoteCount*i[n+1].unitPrice:0,l=i[n].subQuoteCount*i[n].sellUnitPrice?i[n].subQuoteCount*i[n].sellUnitPrice+i[n+1].subQuoteCount*i[n+1].sellUnitPrice:0);else 1==i.length&&(s=i[0].subQuoteCount*i[0].unitPrice?i[0].subQuoteCount*i[0].unitPrice:0,l=i[0].subQuoteCount*i[0].sellUnitPrice?i[0].subQuoteCount*i[0].sellUnitPrice:0);this.printTotal.amount=s,this.printTotal.sellAmount=l;for(var r=[],c=0,u=0;u<i.length;u++)i[u].subQuoteCount&&i[u].sellUnitPrice&&(c+=i[u].subQuoteCount*i[u].sellUnitPrice);return e.forEach(function(t,e){if(0!==e)if(10===e||13===e||15===e)if(15!==e){var a=i.map(function(e){return Number(e[t.property])});a.every(function(t){return isNaN(t)})?r[e]="":r[e]=a.reduce(function(t,e){var i=Number(e);return isNaN(i)?t:t+e},0)}else r[e]=c.toFixed(__WEBPACK_IMPORTED_MODULE_9__utils_config_js__.a.amountFixedTo);else r[e]="";else r[e]="合计"}),r},openDetails:function(t){this.ChooseStockVisible=!0,console.log(t),this.materielId=t.row.materielId,this.currentIndex=t.$index},getStock:function(t){console.log(t),t&&(this.$set(this.model.childList[this.currentIndex],"stockId",t.id),this.$set(this.model.childList[this.currentIndex],"batch",t.batch?t.batch:""),this.$set(this.model.childList[this.currentIndex],"outFacilityName",t.facilityName),this.$set(this.model.childList[this.currentIndex],"outLocationName",t.facilityLocationName?t.facilityLocationName:""),this.$set(this.model.childList[this.currentIndex],"availableCount",t.availableCount),this.$set(this.model.childList[this.currentIndex],"btnName","已查询"),this.$set(this.model.childList[this.currentIndex],"convCoefficient",t.convCoefficient),this.changeCount2(this.model.childList[this.currentIndex]),this.$set(this.model.childList[this.currentIndex],"supportUomName",t.supportUomName),this.$set(this.model.childList[this.currentIndex],"supportUom",t.supportUom),this.$set(this.model.childList[this.currentIndex],"facilityLocationId",t.facilityLocationId),this.$set(this.model.childList[this.currentIndex],"facilityId",t.facilityId))},changeCount2:function(t){isNaN(t.convCoefficient)||isNaN(t.subQuoteCount)?t.count=0:t.count=parseFloat((parseFloat(t.convCoefficient)*parseFloat(t.subQuoteCount)).toFixed(t.quantityAccuracy))}})}},mPix:function(t,e){},veNm:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i("jUVs"),o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"sys-box plan-box"},[i("div",{staticClass:"sys-operate"},[i("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.back()}}},[t._v(t._s(t.config.cancelText))]),t._v(" "),179!=t.auditStatus?i("el-button",{directives:[{name:"has",rawName:"v-has",value:"warehouse:allot:save",expression:"'warehouse:allot:save'"}],attrs:{type:"primary",disabled:t.isDisabled},on:{click:function(e){return t.save("form")}}},[t._v("保存")]):t._e(),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.clear}},[t._v("新增")]),t._v(" "),t.btnDelDisabled?i("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.print()}}},[t._v("打印")]):t._e(),t._v(" "),t.btnDelDisabled&&178==t.auditStatus?i("el-button",{directives:[{name:"has",rawName:"v-has",value:"warehouse:allot:audit",expression:"'warehouse:allot:audit'"}],attrs:{type:"primary"},on:{click:t.audit}},[t._v("审核")]):t._e(),t._v(" "),t.btnDelDisabled&&179==t.auditStatus?i("el-button",{directives:[{name:"has",rawName:"v-has",value:"warehouse:allot:disAudit",expression:"'warehouse:allot:disAudit'"}],attrs:{type:"primary"},on:{click:t.disAudit}},[t._v("反审核")]):t._e()],1),t._v(" "),i("div",{staticClass:"sys-form"},[i("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"form",attrs:{"label-width":"120px","inline-message":!0,model:t.formData,rules:t.ruleForm}},[i("div",{staticClass:"flex"},[i("el-form-item",{staticClass:"form-inline",attrs:{label:"调拨时间",prop:"allotTime"}},[i("el-date-picker",{attrs:{type:"date",format:"yyyy-MM-dd","range-separator":"—",placeholder:"选择日期","value-format":"yyyy-MM-dd",clearable:"",disabled:179==t.auditStatus},model:{value:t.formData.allotTime,callback:function(e){t.$set(t.formData,"allotTime",e)},expression:"formData.allotTime"}})],1),t._v(" "),i("el-form-item",{staticClass:"form-inline",attrs:{label:"调拨人",prop:"allotUserName"}},[i("btn-input",{attrs:{valueText:t.formData.allotUserName,valueId:t.formData.allotUser,chooseVisible:t.chooseUserVisible,showBtn:179!=t.auditStatus},on:{"update:valueText":function(e){return t.$set(t.formData,"allotUserName",e)},"update:value-text":function(e){return t.$set(t.formData,"allotUserName",e)},"update:valueId":function(e){return t.$set(t.formData,"allotUser",e)},"update:value-id":function(e){return t.$set(t.formData,"allotUser",e)},"update:chooseVisible":function(e){t.chooseUserVisible=e},"update:choose-visible":function(e){t.chooseUserVisible=e}}})],1),t._v(" "),i("el-form-item",{staticClass:"form-inline",attrs:{label:"部门"}},[i("el-input",{attrs:{readonly:""},model:{value:t.formData.deptName,callback:function(e){t.$set(t.formData,"deptName",e)},expression:"formData.deptName"}})],1),t._v(" "),i("el-form-item",{staticClass:"form-inline",attrs:{label:"调拨原因"}},[i("el-input",{attrs:{disabled:179==t.auditStatus,clearable:""},model:{value:t.formData.reason,callback:function(e){t.$set(t.formData,"reason",e)},expression:"formData.reason"}})],1)],1)]),t._v(" "),i("el-divider",{attrs:{"content-position":"left"}},[i("div",[t._v("物料列表")])]),t._v(" "),i("el-form",{ref:"formChild",attrs:{rules:t.model.rules,model:t.model}},[i("el-form-item",{staticClass:"childlist",attrs:{prop:"childList"}},[i("div",{staticClass:"sys-operate",staticStyle:{"margin-bottom":"10px"}},[179!=t.auditStatus?i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.ChooseMaterielVisible=!0}}},[t._v("新增")]):t._e(),t._v(" "),179!=t.auditStatus?i("el-button",{attrs:{type:"primary",disabled:t.btnDelDisabled},on:{click:function(e){return t.removePart()}}},[t._v("删除")]):t._e()],1),t._v(" "),i("el-table",{attrs:{data:t.model.childList,"show-summary":"","summary-method":t.getSummaries,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"},border:""},on:{"selection-change":t.handlePartChange}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"库存查询"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-link",{attrs:{type:"primary"},on:{click:function(i){return i.stopPropagation(),t.openDetails(e)}}},[t._v(t._s(e.row.btnName))])]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"materielName",label:"物料名称",align:"center","show-overflow-tooltip":""}}),t._v(" "),i("el-table-column",{attrs:{prop:"specification",align:"center","show-overflow-tooltip":"",label:"规格型号"}}),t._v(" "),i("el-table-column",{attrs:{prop:"batch",width:"120",align:"center",label:"批号","show-overflow-tooltip":""}}),t._v(" "),i("el-table-column",{attrs:{prop:"outFacilityName",align:"center","show-overflow-tooltip":"",label:"调出仓库"}}),t._v(" "),i("el-table-column",{attrs:{prop:"outLocationName",align:"center","show-overflow-tooltip":"",label:"调出仓位"}}),t._v(" "),i("el-table-column",{attrs:{prop:"inFacility",width:"120",align:"center",label:"调入仓库","show-overflow-tooltip":"","label-class-name":"required_head"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-form-item",{attrs:{prop:"childList."+e.$index+".inFacility",rules:t.model.rules.inFacility}},[i("el-select",{attrs:{clearable:"",placeholder:"仓库"},on:{change:function(i){return t.changeWarehouse(e.row)}},model:{value:e.row.inFacility,callback:function(i){t.$set(e.row,"inFacility",i)},expression:"scope.row.inFacility"}},t._l(t.fac_type_list,function(e){return i("el-option",{key:e.id,attrs:{disabled:179==t.auditStatus,label:e.name,value:e.id}})}),1)],1)]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"inLocationName",width:"120",align:"center",label:"调入仓位","show-overflow-tooltip":"","label-class-name":"required_head"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticStyle:{color:"#3a8ee6",cursor:"pointer"},on:{click:function(i){return t.chooseLocation(e.row)}}},[t._v(t._s(e.row.inLocationName))])]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"unitUomName",align:"center",label:"主计量单位","show-overflow-tooltip":""}}),t._v(" "),i("el-table-column",{attrs:{prop:"count",align:"center",label:"主单位数量","show-overflow-tooltip":""}}),t._v(" "),i("el-table-column",{attrs:{prop:"supportUomName",align:"center",label:"辅助单位","show-overflow-tooltip":""}}),t._v(" "),i("el-table-column",{attrs:{prop:"convCoefficient",align:"center",label:"换算系数"}}),t._v(" "),i("el-table-column",{attrs:{prop:"subQuoteCount",align:"center",width:"180",label:"数量","label-class-name":"required_head"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-form-item",{attrs:{prop:"childList."+e.$index+".count",rules:t.model.rules.count}},[i("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small",precision:e.row.quantityAccuracy,"controls-position":"right",disabled:179===t.auditStatus},on:{change:function(i){return t.changeCount2(e.row)}},model:{value:e.row.subQuoteCount,callback:function(i){t.$set(e.row,"subQuoteCount",i)},expression:"scope.row.subQuoteCount"}})],1)]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"sellUnitPrice",align:"center",width:"180",label:"单价(元)","label-class-name":"required_head"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-form-item",{attrs:{prop:"childList."+e.$index+".sellUnitPrice",rules:t.model.rules.sellUnitPrice}},[i("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small",precision:e.row.priceAccuracy,"controls-position":"right",disabled:179===t.auditStatus},model:{value:e.row.sellUnitPrice,callback:function(i){t.$set(e.row,"sellUnitPrice",i)},expression:"scope.row.sellUnitPrice"}})],1)]}}])}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"金额(元)",prop:"sellAmount",width:"140"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.sum1(e.row.subQuoteCount,e.row.sellUnitPrice,e.$index))+"\n ")]}}])})],1)],1),t._v(" "),i("el-form-item",{attrs:{label:"备注",prop:"remarks"}},[i("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请简要填写备注内容",disabled:179==t.auditStatus},model:{value:t.formData.remarks,callback:function(e){t.$set(t.formData,"remarks",e)},expression:"formData.remarks"}})],1)],1),t._v(" "),t.allotId?i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:5}},[t._v("制单人:"+t._s(t.formData.createUserName))]),t._v(" "),i("el-col",{attrs:{span:7}},[t._v("制单时间:"+t._s(t.formData.createTime))]),t._v(" "),i("el-col",{attrs:{span:5}},[t._v("审核人:"+t._s(t.formData.auditorName))]),t._v(" "),i("el-col",{attrs:{span:7}},[t._v("审核时间:"+t._s(t.formData.auditTime))])],1):t._e()],1),t._v(" "),i("DialogChooseSingleUser",{attrs:{visible:t.chooseUserVisible},on:{"update:visible":function(e){t.chooseUserVisible=e},change:t.getUser}}),t._v(" "),i("dialogChooseSingleStock",{attrs:{visible:t.ChooseStockVisible,materielId:t.materielId},on:{"update:visible":function(e){t.ChooseStockVisible=e},change:t.getStock}}),t._v(" "),i("dialogChooseParts",{attrs:{visible:t.ChooseMaterielVisible},on:{"update:visible":function(e){t.ChooseMaterielVisible=e},change:t.getMateriel}}),t._v(" "),i("dialogChooseSingleLocation",{attrs:{warehouseId:t.warehouseRow.inFacility,visible:t.ChooseLocationVisible},on:{"update:visible":function(e){t.ChooseLocationVisible=e},change:t.getLocation}}),t._v(" "),i("div",{staticStyle:{margin:"0 auto",display:"none"},attrs:{id:"print_content"}},[i("printAllot",{attrs:{printDetail:t.printDetail,printList:t.printList,printForm:t.printForm,printTotal:t.printTotal,printDirection:!0}})],1)],1)},staticRenderFns:[]};var s=function(t){i("mPix"),i("as5C")},l=i("VU/8")(a.a,o,!1,s,"data-v-4c5db83c",null);e.default=l.exports}});