(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-5b08"],{Mcbo:function(t,e,a){"use strict";var r=a("pEXj");a.n(r).a},hjPX:function(t,e,a){"use strict";a.r(e);var r=a("14Xm"),n=a.n(r),o=a("D3Ub"),i=a.n(o),c=a("7Qib"),u=a("xMja"),d={name:"addProduct",data:function(){return{name:"",code:"",type:"",tableKey:0,listLoading:!1,pageSize:10,recordTotal:0,currentPage:1,pageTotal:0,searchContent:"",passList:[],productList:[],productFormVisible:!1}},created:function(){this.getProductData()},methods:{selectProduct:function(){this.productFormVisible=!0},getProductData:function(){var t=this;return i()(n.a.mark(function e(){var a,r;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.listLoading=!0,(a={}).pageIndex=t.currentPage,a.pageSize=t.pageSize,e.next=6,Object(u.o)(a,t.name,t.code,t.type);case 6:"200"===(r=e.sent).data.code&&(t.recordTotal=r.data.result.totalCount,t.pageSize=r.data.result.pageSize,t.pageTotal=Object(c.a)(r.data.result.total,r.data.result.size),t.currentPage=r.data.result.pageIndex,t.productList=r.data.result.result),t.listLoading=!1;case 9:case"end":return e.stop()}},e,t)}))()},giveProduct:function(){this.$emit("giveProduct",this.passList),this.productFormVisible=!1},searchData:function(){this.getProductData()},handleSizeChange:function(t){this.pageSize=t,this.currentPage=1,this.getProductData()},handleCurrentChange:function(t){this.currentPage=t,this.getProductData()},handleSelectionChange:function(t){this.passList=t},getRowKey:function(t){return t.id}}},s=(a("Mcbo"),a("KHd+")),l=Object(s.a)(d,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{visible:t.productFormVisible,"append-to-body":"","close-on-click-modal":!1,width:"70%"},on:{"update:visible":function(e){t.productFormVisible=e}}},[a("div",{staticClass:"app-container"},[a("div",{staticClass:"filter-container"},[a("div",{staticStyle:{display:"block","padding-top":"10px"}},[a("div",{staticClass:"carrier_search"},[a("span",[t._v("产品名称:")]),t._v(" "),a("el-input",{staticClass:"product_input",model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})],1),t._v(" "),a("div",{staticClass:"carrier_search"},[a("span",[t._v("流向码:")]),t._v(" "),a("el-input",{staticClass:"product_input",model:{value:t.code,callback:function(e){t.code=e},expression:"code"}})],1),t._v(" "),a("div",{staticClass:"carrier_search"},[a("span",[t._v("类别:")]),t._v(" "),a("el-input",{staticClass:"product_input",model:{value:t.type,callback:function(e){t.type=e},expression:"type"}})],1),t._v(" "),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary"},on:{click:function(e){t.searchData()}}},[t._v("查询")])],1)]),t._v(" "),a("div",{staticClass:"table_content"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],key:t.tableKey,staticStyle:{width:"100%"},attrs:{data:t.productList,border:"",fit:"","row-key":t.getRowKey,"highlight-current-row":""},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{"reserve-selection":!0,type:"selection",width:"55"}}),t._v(" "),a("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"60"}}),t._v(" "),a("el-table-column",{attrs:{label:"类别",prop:"type",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"名称",prop:"name",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"级别",prop:"level",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"包装方式",prop:"packing",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"规格",prop:"specification",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"数量",prop:"boxNumber",align:"center"}})],1),t._v(" "),a("br"),t._v(" "),a("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.recordTotal>0,expression:"recordTotal>0"}],staticStyle:{float:"right"},attrs:{"current-page":t.currentPage,"page-sizes":[10,20,30,50],"page-size":t.pageSize,total:t.recordTotal,layout:"total, sizes, prev, pager, next, jumper",background:""},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}}),t._v(" "),a("br")],1),t._v(" "),a("div",{staticStyle:{"margin-top":"40px"},attrs:{align:"right"}},[a("el-button",{on:{click:function(e){t.productFormVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.giveProduct()}}},[t._v("选择")])],1)])])},[],!1,null,"f85c3af6",null);l.options.__file="addProduct.vue";e.default=l.exports},pEXj:function(t,e,a){},xMja:function(t,e,a){"use strict";a.d(e,"n",function(){return o}),a.d(e,"c",function(){return i}),a.d(e,"b",function(){return c}),a.d(e,"q",function(){return u}),a.d(e,"d",function(){return d}),a.d(e,"g",function(){return s}),a.d(e,"p",function(){return l}),a.d(e,"k",function(){return p}),a.d(e,"j",function(){return h}),a.d(e,"a",function(){return b}),a.d(e,"r",function(){return g}),a.d(e,"e",function(){return f}),a.d(e,"f",function(){return m}),a.d(e,"m",function(){return v}),a.d(e,"h",function(){return j}),a.d(e,"o",function(){return O}),a.d(e,"i",function(){return _}),a.d(e,"l",function(){return y});var r=a("X4fA"),n=a("t3Un");function o(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/info",method:"get",params:t||{}})}function i(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/add",method:"post",data:t})}function c(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/addNew",method:"post",data:t})}function u(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/update",method:"post",data:t})}function d(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/delete",method:"post",data:t})}function s(){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/enterprise/manufacturerTree",method:"get"})}function l(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/setThreshold",method:"post",data:t})}function p(){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/getThreshold",method:"get"})}function h(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/categorise?name="+t,method:"get"})}function b(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/addCategory",method:"post",data:t})}function g(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/editCategory",method:"post",data:t})}function f(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/delCategory",method:"post",data:t})}function m(){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/majorTree",method:"get"})}function v(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/secondaryTree?major="+t,method:"get"})}function j(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/permitLevelTree?secondary="+t,method:"get"})}function O(t,e,a,o){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/info?name="+e+"&code="+a+"&type="+o,method:"get",params:t||{}})}function _(t){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/get?directionCode="+t,method:"get"})}function y(t,e){return Object(n.a)({headers:{Authorization:Object(r.a)()},url:"http://39.104.85.193:4105/product/gets?directionCode="+t+"&endCode="+e,method:"get"})}}}]);
|