(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6ad7"],{Cvtp:function(e,t,o){"use strict";o.r(t);var i=o("P2sY"),n=o.n(i),s={name:"storage-check-create-check",components:{},mixins:[o("dWSf").a],data:function(){return{id:"",name:"",isdifference:!1,checkTypeList:[],actionField:"",dialogFormVisible:!1,storage_Id:null,consignor_Id:null,storageName:null,consignorName:null,form:{checkType:"常规盘",input:"",name:"",region:"",date1:"",date2:"",delivery:!1,type:[],resource:"",desc:"",checked:!1},formLabelWidth:"120px",storageList:[],consignorList:[],fixedWhere:{}}},computed:{},created:function(){this.loadCheckType()},activated:function(){this.common.hasSaaSAuth("库存盘点",this.$refs.container)},methods:{onLoadDropdownAfter:function(e){this.storageList=e.dropdown31,this.consignorList=e.dropdown797},currentSel:function(e){this.isdifference=!1,"动态盘"===e&&(this.isdifference=!0)},confirmsubmit:function(){var e=this,t=this.storage_Id,o=this.consignor_Id,i=this.getWhere(),s=this.form.checkType,r=this.form.input,a=this.dataListSelections.map(function(e){return e.productPosition_Id}),c=!0===this.form.checked?1:0;if(r||(r=0),s)if("动态盘"!==s||r){var l={storage_Id:t,consignor_Id:o,checkType:s,diffDate:r,IsBlind:c,ids:a,idField:"productPosition_Id"};l=n()(l,i);var d=this.dataList;this.common.ajax("/api/storage/check/storageCheck",l,function(t){e.common.showMsg(t),t.result&&d.loadData()},d),this.dialogFormVisible=!1}else this.$message({showClose:!0,message:"请输入差异天数",type:"error"});else this.$message({showClose:!0,message:"请输入盘点类型",type:"error"})},getWhere:function(){var e=this.storage_Id,t=this.consignor_Id,o=this.dataList.getAllWhere(),i={};return e&&(i.storage_Id=e),t&&(i.consignor_Id=t),{fixedWhere:i,where:o}},loadCheckType:function(){var e=this;this.common.ajax("/api/storage/check/dropdown",{},function(t){t.result&&(e.checkTypeList=t.data)})},inventoryting:function(){var e=this;this.storage_Id?this.consignor_Id?(this.consignorName=this.consignorList.find(function(t){return t.consignor_Id===e.consignor_Id}).consignorName,this.dialogFormVisible=!0):this.$message.error("请选择货主"):this.$message.error("请选择仓库")},onSelectChange:function(){var e=this,t={};this.storage_Id&&(this.storageName=this.storageList.find(function(t){return t.storage_Id===e.storage_Id}).storageName,t.storage_Id=this.storage_Id),this.consignor_Id&&(this.consignorName=this.consignorList.find(function(t){return t.consignor_Id===e.consignor_Id}).consignorName,t.consignor_Id=this.consignor_Id),this.fixedWhere=t,this.$nextTick(function(){e.dataList.loadData()})},onSuperReset:function(){this.storage_Id=null,this.consignor_Id=null}}},r=o("KHd+"),a=Object(r.a)(s,function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{ref:"container",staticClass:"page-list-container"},[o("yrt-data-list",{ref:e.dataListRef,attrs:{"editor-ref":e.editorRef,"data-options":e.dataOptions,fields:e.dataListOptions.fields,buttons:e.dataListOptions.buttons,"button-click":e.buttonClick,"data-list-selections":e.dataListSelections,"auth-nodes":e.authNodes,"fixed-where":e.fixedWhere},on:{"update:fields":function(t){return e.$set(e.dataListOptions,"fields",t)},"update:dataListSelections":function(t){e.dataListSelections=t},"update:data-list-selections":function(t){e.dataListSelections=t},"on-load-dropdown-after":e.onLoadDropdownAfter,"on-super-reset":e.onSuperReset}},[o("template",{slot:"button-tool2-slot"},[o("el-select",{staticClass:"w-150",attrs:{placeholder:"请选择仓库"},on:{change:e.onSelectChange},model:{value:e.storage_Id,callback:function(t){e.storage_Id=t},expression:"storage_Id"}},e._l(e.storageList,function(e,t){return o("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1),e._v(" "),o("el-select",{staticClass:"w-150",attrs:{placeholder:"请选择货主"},on:{change:e.onSelectChange},model:{value:e.consignor_Id,callback:function(t){e.consignor_Id=t},expression:"consignor_Id"}},e._l(e.consignorList,function(e,t){return o("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1),e._v(" "),o("el-button",{attrs:{type:"primary"},nativeOn:{click:function(t){return e.inventoryting()}}},[e._v("生成盘点单")])],1)],2),e._v(" "),o("el-dialog",{attrs:{visible:e.dialogFormVisible,title:"生成盘点数据",width:"500px"},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[o("el-form",{attrs:{model:e.form,"label-width":e.formLabelWidth}},[o("el-form-item",{staticClass:"no-margin",attrs:{label:"仓库名称"}},[e._v("\n "+e._s(e.storageName)+"\n ")]),e._v(" "),o("el-form-item",{staticClass:"margin-bottom-10",attrs:{label:"货主"}},[e._v("\n "+e._s(e.consignorName)+"\n ")]),e._v(" "),o("el-form-item",{attrs:{label:"盘点类型"}},[o("el-select",{attrs:{filterable:"",clearable:"",placeholder:"请选择盘点类型"},on:{change:e.currentSel},model:{value:e.form.checkType,callback:function(t){e.$set(e.form,"checkType",t)},expression:"form.checkType"}},e._l(e.checkTypeList,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e.name}})}),1)],1),e._v(" "),o("el-form-item",{attrs:{label:"是否盲盘"}},[o("el-checkbox",{model:{value:e.form.checked,callback:function(t){e.$set(e.form,"checked",t)},expression:"form.checked"}})],1),e._v(" "),e.isdifference?o("el-form-item",{staticStyle:{width:"320px"},attrs:{label:"差异天数"}},[o("el-input",{attrs:{disabled:!e.isdifference,type:"text",placeholder:"请输天数"},model:{value:e.form.input,callback:function(t){e.$set(e.form,"input",t)},expression:"form.input"}})],1):e._e()],1),e._v(" "),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:e.confirmsubmit}},[e._v("确 定")])],1)],1)],1)},[],!1,null,null,null);a.options.__file="create-check.vue";t.default=a.exports},DNkW:function(e,t,o){var i=o("93I4"),n=Math.floor;e.exports=function(e){return!i(e)&&isFinite(e)&&n(e)===e}},"GW1+":function(e,t,o){"use strict";var i=o("mxV5"),n=o.n(i);t.a=function(e){return new n.a(e)}},h5AQ:function(e,t,o){o("hRZT"),e.exports=o("WEpk").Number.isInteger},hRZT:function(e,t,o){var i=o("Y7ZC");i(i.S,"Number",{isInteger:o("DNkW")})},ql3t:function(e,t,o){e.exports={default:o("h5AQ"),__esModule:!0}},yaWU:function(e,t,o){"use strict";o.d(t,"a",function(){return i});var i={bind:function(e,t,o){e.children[2].onscroll=function(t){var o=e.children[3];o&&o.classList.contains("el-table__footer-wrapper")&&(o.scrollLeft=t.target.scrollLeft)}},update:function(e,t,o){}}}}]);
|