webpackJsonp([319],{KoWT:function(t,e){},PbYN:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("mvHQ"),i=a.n(s),l=a("Dd8w"),o=a.n(l),n=a("ysqt"),r=a("NYxO"),c=a("OG67"),h=(a("t4zo"),a("bzuE")),u={components:{btnInput:n.a,dialogChooseSingleParts:c.a},data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:20},config:h.a,accountNumberList:[],settlementTypeList:[],tableData:[],paymentReceivedIds:[],btndisable:!0,prDate:"",dialogTitle:"",time:"",selectDeptId:"",formDataTime:"",auditSignList:[],companyList:[],createByList:[],depOptions:[],formData:{},usingList:[],typeList:[],btnDelDisabled:!0,btnOtherDisabled:!0,chooseClientrVisible:!1,dialogLoading:!1,chooseUserVisible:!1,chooseMaterielVisible:!1,columnSetDialogVisible:!1,advanceQueryDialogVisible:!1,chooseSupplierVisible:!1,columnSetDialogTitle:"设置显示字段列表",tableId:"smartManufacturing_productionBatch1_table",pictLoading:!1,showTableColumnsDefault:[{title:"追溯方向",prop_:"way",select:!0},{title:"单据类型",prop_:"typeName",select:!0},{title:"物料代码",prop_:"serialNo",select:!0},{title:"物料名称",prop_:"materielName",select:!0},{title:"规格型号",prop_:"specification",select:!0},{title:"计量单位",prop_:"unitUomName",select:!0},{title:"批号",prop_:"batch",select:!0},{title:"数量",prop_:"count",select:!0},{title:"单据日期",prop_:"time",select:!0}],showTableColumns:[{title:"追溯方向",prop_:"way",select:!0},{title:"单据类型",prop_:"typeName",select:!0},{title:"物料代码",prop_:"serialNo",select:!0},{title:"物料名称",prop_:"materielName",select:!0},{title:"规格型号",prop_:"specification",select:!0},{title:"计量单位",prop_:"unitUomName",select:!0},{title:"批号",prop_:"batch",select:!0},{title:"数量",prop_:"count",select:!0},{title:"单据日期",prop_:"time",select:!0}],showTableColumnsTemp:[],formTableData:[]}},created:function(){var t=this;document.onkeydown=function(e){"Enter"===e.key&&t.search()}},computed:o()({},Object(r.c)({userInfo:"user/getUserInfo"})),mounted:function(){this.showTableColumns=JSON.parse(i()(this.showTableColumns)),this.showTableColumnsTemp=JSON.parse(i()(this.showTableColumns)),this.getShowColumns()},methods:{productionBatchGetOut:function(){this.$api.smartManufacturingAPI.productionBatchGetOut(this.search_data).then(function(t){console.log(t)})},getPart:function(t){console.log(t),t?(this.$set(this.search_data,"materielSerialNo",t.serialNo),this.$set(this.search_data,"materielId",t.id)):(this.$set(this.search_data,"materielSerialNo",""),this.$set(this.search_data,"materielId",""))},search:function(){this.search_data.startTime&&this.search_data.endTime&&this.search_data.materielSerialNo?(this.search_data.pageno=1,this.getList()):this.$message({message:"查询时必须选择物料和时间",type:"warning"})},handleSizeChange:function(t){this.search_data.pagesize=t,this.getList()},handleCurrentChange:function(t){this.search_data.pageno=t,this.getList()},getList:function(){var t=this;this.pictLoading=!0,this.$api.smartManufacturingAPI.productionBatch(this.search_data).then(function(e){t.pictLoading=!1,e.data?(t.total=e.total,t.tableData=e.data?e.data:[],t.tableData.forEach(function(t){t.time=/\d{4}-\d{1,2}-\d{1,2}/g.exec(t.time)}),t.tableData.forEach(function(t){"in"==t.way&&(t.way="来源"),"out"==t.way&&(t.way="去向")})):(t.total=0,t.tableData=[])}).catch(function(t){console.log(t)})},addClass:function(t){t.row,t.column;var e=t.rowIndex;t.columnIndex;return"1"===this.tableData[e].sign?"background-color:#E6F7FF":"end"===this.tableData[e].sign?"background-color:#FFF9E8":void 0},showColumnSetDialog:function(){this.columnSetDialogVisible=!0,this.showTableColumnsTemp=JSON.parse(i()(this.showTableColumns))},toUp:function(t){if(0==t.$index)return!1;for(var e=void 0,a=0;a0?this.btndisable=!1:this.btndisable=!0},deep:!0}}},d={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"sys-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary",disabled:t.btndisable},on:{click:t.productionBatchGetOut}},[t._v("导出")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.showColumnSetDialog}},[t._v(t._s(t.config.configureBtnName))])],1),t._v(" "),a("div",{staticClass:"sys-search"},[a("el-form",{staticClass:"form_item_search_out",attrs:{inline:""}},[a("div",{staticClass:"form_item_input_out"},[a("el-form-item",{staticClass:"form_item-inline is-required",staticStyle:{width:"33%"},attrs:{label:"产品编号"}},[a("btn-input",{attrs:{valueText:t.search_data.materielSerialNo,valueId:t.search_data.materielId,chooseVisible:t.chooseMaterielVisible},on:{"update:valueText":function(e){return t.$set(t.search_data,"materielSerialNo",e)},"update:value-text":function(e){return t.$set(t.search_data,"materielSerialNo",e)},"update:valueId":function(e){return t.$set(t.search_data,"materielId",e)},"update:value-id":function(e){return t.$set(t.search_data,"materielId",e)},"update:chooseVisible":function(e){t.chooseMaterielVisible=e},"update:choose-visible":function(e){t.chooseMaterielVisible=e}}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"批号"}},[a("el-input",{attrs:{placeholder:"请输入批号"},model:{value:t.search_data.batch,callback:function(e){t.$set(t.search_data,"batch",e)},expression:"search_data.batch"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline is-required",staticStyle:{width:"33%"},attrs:{label:"时间"}},[a("el-date-picker",{attrs:{type:"daterange",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:t.time,callback:function(e){t.time=e},expression:"time"}})],1)],1),t._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.search()}}},[t._v("查询")])],1)],1)])],1),t._v(" "),a("div",{staticClass:"sys-table"},[t.formTableData.length>0?a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.pictLoading,expression:"pictLoading"}],ref:"tb",attrs:{border:"",id:"out-table","cell-style":t.addClass,data:t.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}}},t._l(t.formTableData,function(t,e){return a("el-table-column",{key:e,attrs:{prop:t.prop_,label:t.title,align:"center","show-overflow-tooltip":""}})}),1):t._e()],1),t._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":t.search_data.pageno,"page-sizes":t.pageSizes,"page-size":t.search_data.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),a("el-dialog",{attrs:{title:t.columnSetDialogTitle,center:"",visible:t.columnSetDialogVisible,width:"531px","before-close":t.handleClose},on:{"update:visible":function(e){t.columnSetDialogVisible=e}}},[a("el-table",{key:Math.random(),staticStyle:{width:"100%"},attrs:{border:"",data:t.showTableColumns,"max-height":"350"}},[a("el-table-column",{attrs:{prop:"title",label:"列表名称",width:"180",fixed:""}}),t._v(" "),a("el-table-column",{attrs:{prop:"select",label:"是否显示",width:"180"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{model:{value:e.row.select,callback:function(a){t.$set(e.row,"select",a)},expression:"scope.row.select"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.toUp(e)}}},[t._v("前移")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.toDown(e)}}},[t._v("后移")])]}}])})],1),t._v(" "),a("el-row",{staticClass:"row-bg",staticStyle:{"margin-top":"10px"},attrs:{type:"flex",justify:"center"}},[a("el-col",{attrs:{span:6}},[a("el-button",{attrs:{type:"primary",size:"middle"},on:{click:t.saveAndCloseColumnSetDialog}},[t._v("完成")])],1),t._v(" "),a("el-col",{attrs:{span:6}},[a("el-button",{attrs:{type:"primary",size:"middle"},on:{click:t.toDefault}},[t._v("恢复默认")])],1)],1)],1),t._v(" "),a("dialogChooseSingleParts",{attrs:{visible:t.chooseMaterielVisible,isLot:1},on:{"update:visible":function(e){t.chooseMaterielVisible=e},change:t.getPart}})],1)},staticRenderFns:[]};var m=a("VU/8")(u,d,!1,function(t){a("KoWT")},"data-v-7d816f29",null);e.default=m.exports}});