(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-3585"],{LS6i:function(t,e,r){"use strict";r.r(e);var o=r("xMja"),n=["A级","B级","C级","D级"],a={name:"productThreshold",data:function(){return{form:{explosiveContent:"",boxNumber:"",levels:[]},levels:n,checkedLevels:[]}},mounted:function(){this.getProductThreshold()},methods:{onSubmit:function(){var t=this,e={};e.explosiveContent=this.form.explosiveContent,e.boxNumber=this.form.boxNumber;var r="";this.checkedLevels.forEach(function(t){r+=t,r+=","}),e.levels=r,Object(o.m)(e).then(function(e){console.log(e),t.getProductThreshold()})},getProductThreshold:function(){var t=this;Object(o.j)().then(function(e){var r=e.data.result;t.form.explosiveContent=r.explosivecontent,t.form.boxNumber=r.boxnumber,t.checkedLevels=r.levels})}}},u=(r("ZujK"),r("ZrdR")),i=Object(u.a)(a,function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container"},[r("h2",{staticStyle:{"text-align":"center"}},[t._v("产品阈值设置")]),t._v(" "),r("el-divider"),t._v(" "),r("el-form",{ref:"form",attrs:{model:t.form,"label-width":"150px"}},[r("el-form-item",{attrs:{label:"产品含药量限制"}},[r("el-input",{staticStyle:{width:"500px"},attrs:{type:"number"},model:{value:t.form.explosiveContent,callback:function(e){t.$set(t.form,"explosiveContent",e)},expression:"form.explosiveContent"}},[t._v(">")])],1),t._v(" "),r("el-form-item",{attrs:{label:"产品箱数上限"}},[r("el-input",{staticStyle:{width:"500px"},attrs:{type:"number"},model:{value:t.form.boxNumber,callback:function(e){t.$set(t.form,"boxNumber",e)},expression:"form.boxNumber"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"限制产品级别"}},[r("el-checkbox-group",{attrs:{max:3},model:{value:t.checkedLevels,callback:function(e){t.checkedLevels=e},expression:"checkedLevels"}},t._l(t.levels,function(e){return r("el-checkbox",{key:e,attrs:{label:e}},[t._v(t._s(e))])}))],1),t._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("保存")])],1)],1)],1)},[],!1,null,"001358e5",null);i.options.__file="productThreshold.vue";e.default=i.exports},P0nf:function(t,e,r){},ZujK:function(t,e,r){"use strict";var o=r("P0nf");r.n(o).a},xMja:function(t,e,r){"use strict";r.d(e,"l",function(){return a}),r.d(e,"c",function(){return u}),r.d(e,"b",function(){return i}),r.d(e,"n",function(){return c}),r.d(e,"d",function(){return h}),r.d(e,"g",function(){return d}),r.d(e,"m",function(){return s}),r.d(e,"j",function(){return l}),r.d(e,"i",function(){return f}),r.d(e,"a",function(){return p}),r.d(e,"o",function(){return b}),r.d(e,"e",function(){return m}),r.d(e,"f",function(){return v}),r.d(e,"k",function(){return j}),r.d(e,"h",function(){return g});var o=r("X4fA"),n=r("t3Un");function a(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/info",method:"get",params:t||{}})}function u(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/add",method:"post",data:t})}function i(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/addNew",method:"post",data:t})}function c(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/update",method:"post",data:t})}function h(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/delete",method:"post",data:t})}function d(){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/enterprise/manufacturerTree",method:"get"})}function s(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/setThreshold",method:"post",data:t})}function l(){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/getThreshold",method:"get"})}function f(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/categorise?name="+t,method:"get"})}function p(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/addCategory",method:"post",data:t})}function b(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/editCategory",method:"post",data:t})}function m(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/delCategory",method:"post",data:t})}function v(){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/majorTree",method:"get"})}function j(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/secondaryTree?major="+t,method:"get"})}function g(t){return Object(n.a)({headers:{Authorization:Object(o.a)()},url:"http://222.92.213.21:8006/zhongtai/product/permitLevelTree?secondary="+t,method:"get"})}}}]);