(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6aba0"],{DNkW:function(t,o,e){var s=e("93I4"),i=Math.floor;t.exports=function(t){return!s(t)&&isFinite(t)&&i(t)===t}},"GW1+":function(t,o,e){"use strict";var s=e("mxV5"),i=e.n(s);o.a=function(t){return new i.a(t)}},dXIc:function(t,o,e){"use strict";e.r(o);var s=e("dWSf"),i={name:"storage-check-profit-loss",components:{yrtSelector:e("vh95").a},mixins:[s.a],data:function(){return{selectorConfig:{title:"物料选择器",width:"1000px",visible:!1,router:"/selector/s-product-selector"},actionField:{},dialogFormVisible:!1,form:{checked:!1},formLabelWidth:"120px",msgList:[],intervalHandler:null,storageAdjustSwitch:!1,tipsMsg:null,btnAdjustsubmit:!1,statusValueList:[{status:"已复盘",bgColor:"#00ff99",color:"black"},{status:"新建",bgColor:"#ffff66",color:"#000"},{status:"已调整",bgColor:"#00ffff",color:"#000"},{status:"用户取消",bgColor:"#c53e3a",color:"#fff"}]}},activated:function(){this.common.hasSaaSAuth("库存盘点",this.$refs.container)},methods:{setStatusBgColor:function(t){var o=this.statusValueList.find(function(o){return o.status===t}),e="#fffff";return o&&(e=o.bgColor),e},setStatusColor:function(t){var o=this.statusValueList.find(function(o){return o.status===t}),e="#fffff";return o&&(e=o.color),{border:0,color:e}},detailButtonClick:function(t){switch(t){case"add":this.selectorConfig.visible=!0;break;case"exportPositionName":this.exportPositionName();break;case"exportList":this.exportList()}},onSelected:function(t){this.editor.addDetailDataRow(t),this.selectorConfig.visible=!1},copySaleOrder:function(t){var o=this,e={return_Id:t.return_Id},s=this.dataList;this.common.ajax("/api/purchase/return/copySaleOrder",e,function(t){o.common.showMsg(t),t.result&&s.loadData()},s)},createProfitLoss:function(){this.dialogFormVisible=!0},adjustsubmit:function(){var t=this,o=this,e=this.dataList,s={selectIDs:this.editor.formData.profitLoss_Id};this.common.ajax("/api/storage/check/startSorting",s,function(s){o.common.showMsg(s),s.msg&&(t.dialogOrderMerge=!1,t.editorOptions.config.visible=!1,e.loadData())},e)},getMsg:function(){var t=this;this.common.ajax("/api/storage/check/getThreadMsg",{},function(o){if(t.msgList.push(o.state),2===o.statusCode)return window.clearInterval(t.intervalHandler),void(t.intervalHandler=null);t.intervalHandler=window.setTimeout(t.getMsg,1e4)})},confirmsubmit:function(){var t=this,o=this.editor;o.formData.profitLoss_Id||this.$message({message:"Id不能为空",type:"warning"});var e=this.editor.detailFields[0].subTableView,s="";this.editor.formData[e].rows.forEach(function(t){s&&(s+=","),s+=t.product_Id}),s||this.$message({type:"error",message:"请选择要复盘的数据"});var i=!0===this.form.checked?1:0,r={profitLoss_Id:o.formData.profitLoss_Id,product_Ids:s,isBlind:i};this.common.ajax("/api/storage/check/reCheck",r,function(o){t.common.showMsg(o),o.result&&(t.$message({type:"success",message:o.msg}),t.dialogFormVisible=!1)})},onEditLoadAfter:function(t){var o=t.statusText;"新建"===o?(this.$set(this.btnReadOnly,"createProfitLoss",!1),this.$set(this.btnReadOnly,"changeAdjust",!1),this.editorOptions.config.disabled=!1):"已复盘"===o?(this.$set(this.btnReadOnly,"createProfitLoss",!0),this.$set(this.btnReadOnly,"changeAdjust",!1),this.editorOptions.config.disabled=!1):"已调整"===o&&(this.$set(this.btnReadOnly,"createProfitLoss",!0),this.$set(this.btnReadOnly,"changeAdjust",!0),this.editorOptions.config.disabled=!0)},getStorageAdjustConfig:function(){var t=this,o=this.editor;this.common.ajax("/api/storage/check/getStorageAdjustConfig",{},function(e){e.result&&(t.storageAdjustSwitch=e.msg,"False"!==t.storageAdjustSwitch?"已复盘"===o.formData.statusText?t.tipsMsg="点击分拣开始分拣调整库存!":(t.tipsMsg="需要先进行复盘,才允许调整库存!",t.$message.error("需要先进行复盘,才允许调整库存!"),t.btnAdjustsubmit=!0):t.tipsMsg="点击确定开始分拣调整库存!")})},exportList:function(){var t=this,o={ids:this.editor.formData.profitLoss_Id};this.common.ajax("/api/storage/check/exportlossList",o,function(o){if(t.common.showMsg(o),o.result){var e=t.common.domain+"/api/common/download?url="+o.data.url;window.open(e)}},!0)},exportPositionName:function(){var t=this,o={ids:this.editor.formData.profitLoss_Id};this.common.ajax("/api/storage/check/exportPositionName",o,function(o){if(t.common.showMsg(o),o.result){var e=t.common.domain+"/api/common/download?url="+o.data.url;window.open(e)}},!0)}}},r=e("KHd+"),a=Object(r.a)(i,function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{ref:"container",staticClass:"page-list-container"},[e("yrt-data-list",{ref:t.dataListRef,attrs:{"editor-ref":t.editorRef,"data-options":t.dataOptions,fields:t.dataListOptions.fields,buttons:t.dataListOptions.buttons,"button-click":t.buttonClick,"action-field":t.actionField,"data-list-selections":t.dataListSelections,"auth-nodes":t.authNodes},on:{"update:fields":function(o){return t.$set(t.dataListOptions,"fields",o)},"update:dataListSelections":function(o){t.dataListSelections=o},"update:data-list-selections":function(o){t.dataListSelections=o}},scopedSlots:t._u([{key:"common-column-slot",fn:function(o){var s=o.row,i=o.col;return["statusText"==i.prop?[e("el-tag",{staticClass:"cursor-pointer",style:t.setStatusColor(s[i.prop]),attrs:{color:t.setStatusBgColor(s[i.prop])}},[t._v("\n "+t._s(s[i.prop])+"\n ")])]:"sortingStatus"==i.prop?[[1==s[i.prop]?e("el-tag",{staticStyle:{color:"black",border:"0"},attrs:{color:"#ffff33"}},[t._v("\n "+t._s(t.$refs[t.dataListRef].translateText(i.prop,s[i.prop],i.dropdown_Id))+"\n ")]):2==s[i.prop]?e("el-tag",{staticStyle:{color:"black",border:"0"},attrs:{color:"#00ff99"}},[t._v("\n "+t._s(t.$refs[t.dataListRef].translateText(i.prop,s[i.prop],i.dropdown_Id))+"\n ")]):3==s[i.prop]?e("el-tag",{staticStyle:{color:"#fff",border:"0"},attrs:{color:"#ff0000"}},[t._v("\n "+t._s(t.$refs[t.dataListRef].translateText(i.prop,s[i.prop],i.dropdown_Id))+"\n ")]):5==s[i.prop]?e("el-tag",{staticStyle:{color:"#fff",border:"0"},attrs:{color:"#6699FF"}},[t._v("\n "+t._s(t.$refs[t.dataListRef].translateText(i.prop,s[i.prop],i.dropdown_Id))+"\n ")]):e("span",[t._v("\n "+t._s(s[i.prop])+"\n ")])]]:i.prop==t.dataOptions.linkColumn?[e("el-link",{attrs:{type:"primary"},nativeOn:{click:function(o){t.linkEditor(s[t.dataOptions.idField])}}},[t._v(t._s(s[i.prop]))])]:i.dropdown_Id>0?[t._v("\n "+t._s(t.$refs[t.dataListRef].translateText(i.prop,s[i.prop],i.dropdown_Id))+"\n ")]:[["date","datetime"].indexOf(i.dataType)>=0&&i.formatter?[t._v("\n "+t._s(t.common.formatDate(s[i.prop],i.formatter))+"\n ")]:["byte","int32","int64","decimal","double"].indexOf(i.dataType)>=0&&i.formatter?[t._v("\n "+t._s(t.common.formatNumber(s[i.prop],i.formatter))+"\n ")]:[t._v("\n "+t._s(s[i.prop])+"\n ")]]]}}])}),t._v(" "),e("yrt-editor",t._b({ref:t.editorRef,attrs:{"data-list-ref":t.dataListRef,"data-options":t.dataOptions,action:t.editorOptions.action,top:t.editorOptions.top,"btn-read-only":t.btnReadOnly,visible:t.editorOptions.config.visible,"detail-button-click":t.detailButtonClick,"auth-nodes":t.authNodes},on:{"update:action":function(o){return t.$set(t.editorOptions,"action",o)},"update:top":function(o){return t.$set(t.editorOptions,"top",o)},"update:visible":function(o){return t.$set(t.editorOptions.config,"visible",o)},"on-edit-load-after":t.onEditLoadAfter},scopedSlots:t._u([{key:"footer-button-region",fn:function(o){var s=o.formData,i=o.details;return[e("el-button",{attrs:{disabled:t.btnReadOnly.createProfitLoss,type:"success",icon:"el-icon-yrt-pan"},nativeOn:{click:function(o){return t.createProfitLoss(s,i)}}},[t._v("生成复盘单")]),t._v(" "),e("el-button",{attrs:{disabled:t.btnReadOnly.changeAdjust,type:"success",icon:"el-icon-yrt-pan"},nativeOn:{click:function(o){return t.adjustsubmit(s,i)}}},[t._v("调整库存")])]}}])},"yrt-editor",t.editorOptions,!1)),t._v(" "),e("el-dialog",{attrs:{visible:t.dialogFormVisible,width:"20%",title:"生成复盘单"},on:{"update:visible":function(o){t.dialogFormVisible=o}}},[e("el-form",{attrs:{model:t.form}},[e("el-form-item",{attrs:{"label-width":t.formLabelWidth,label:"是否盲盘"}},[e("el-checkbox",{model:{value:t.form.checked,callback:function(o){t.$set(t.form,"checked",o)},expression:"form.checked"}})],1)],1),t._v(" "),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(o){t.dialogFormVisible=!1}}},[t._v("取 消")]),t._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:t.confirmsubmit}},[t._v("确 定")])],1)],1),t._v(" "),e("yrt-selector",{ref:"selector-dialog",attrs:{config:t.selectorConfig,visible:t.selectorConfig.visible},on:{"update:visible":function(o){return t.$set(t.selectorConfig,"visible",o)},onSelected:t.onSelected}})],1)},[],!1,null,null,null);a.options.__file="profit-loss.vue";o.default=a.exports},h5AQ:function(t,o,e){e("hRZT"),t.exports=e("WEpk").Number.isInteger},hRZT:function(t,o,e){var s=e("Y7ZC");s(s.S,"Number",{isInteger:e("DNkW")})},ql3t:function(t,o,e){t.exports={default:e("h5AQ"),__esModule:!0}},yaWU:function(t,o,e){"use strict";e.d(o,"a",function(){return s});var s={bind:function(t,o,e){t.children[2].onscroll=function(o){var e=t.children[3];e&&e.classList.contains("el-table__footer-wrapper")&&(e.scrollLeft=o.target.scrollLeft)}},update:function(t,o,e){}}}}]);
|