You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
7.0 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package1/inventory/gategoryLow"],{"16e5":function(t,e,i){},"3e08":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return s})),i.d(e,"a",(function(){return o}));var o={uIcon:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(i.bind(null,"1608"))},uModal:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uview-ui/components/u-modal/u-modal")]).then(i.bind(null,"9e1e"))},uniPopup:function(){return i.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(i.bind(null,"2864"))},uniEasyinput:function(){return i.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(i.bind(null,"5fa6"))}},n=function(){var t=this,e=t.$createElement,i=(t._self._c,t.__map(t.goodsList,(function(e,i){var o=t.__get_orig(e),n=t._f("sliceMsg")(e.attributeList);return{$orig:o,f0:n}})));t._isMounted||(t.e0=function(e){t.show=!1},t.e1=function(e){return t.$refs.inputDialog.close()},t.e2=function(t){return this.$refs.carPopup.close()},t.e3=function(t){this.show=!0}),t.$mp.data=Object.assign({},{$root:{l0:i}})},s=[]},"614a":function(t,e,i){"use strict";var o=i("16e5"),n=i.n(o);n.a},bbb2:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={data:function(){return{show:!1,inputVal:"",typeModel:"",editItem:{},delItems:{},isOpenId:"",attrList:[],openIndex:"",delType:"",dialogTit:"输入分类名",categoryId:"",goodsList:[],categoryText:""}},computed:{},filters:{sliceMsg:function(t){var e="";if("string"==typeof t){var i=JSON.parse(t);for(var o in i)e+=i[o]+"/"}return e}},onLoad:function(t){this.categoryId=t.id,this.getGategoryList(t.id)},methods:{getGategoryList:function(){var t=this,e=[];this.tui.request("/app/productAttribute/selectByCategoryId","POST",{categoryId:this.categoryId},!1,!0).then((function(i){200==i.code?(e=i.result,i.result.length>0&&e.forEach((function(e){t.tui.request("/app/productAttributeValue/selectByAttributeId","get",{id:e.id},!1,!0).then((function(i){200==i.code?(e.attributeValue=i.result,t.$forceUpdate()):t.tui.toast(res.message)})).catch((function(t){}))}))):t.tui.toast(res.message)})).catch((function(t){})),this.$forceUpdate(),setTimeout((function(){t.attrList=e}),1e3)},getTypeToNum:function(){var t=this,e=this;this.tui.request("/app/stock/getlistByAttributeList","post",{categoryId:this.categoryId,attributeList:this.delItems.attributeName||this.delItems.value},!1,!0).then((function(i){200==i.code&&(""!=i.result?(t.goodsList=i.result,t.$refs.carPopup.open("bottom")):e.show=!0)})).catch((function(t){}))},inputDialogToggle:function(t,e,i){this.typeModel=t,"edit"==t?(this.inputVal=e.categoryName,this.editItem=e):"add"==t||"attrAdd"==t||"attrValAdd"==t?(this.inputVal="",this.isOpenId=e,"add"==t||"attrAdd"==t?this.dialogTit="输入分类名":"attrValAdd"==t&&(this.dialogTit="输入属性值")):"attrEdit"==t&&(this.inputVal=e.attributeName,this.editItem=e),this.$refs.inputDialog.open("bottom")},handleBlur:function(t){this.categoryText=t.detail.value},dialogInputConfirm:function(e){var i=this;switch(this.typeModel){case"add":this.tui.request("/app/productCategory/save","post",{categoryName:this.categoryText},!1,!0).then((function(e){200==e.code?(i.getGategoryList(),t.showToast({title:"添加成功",icon:"none"})):t.showToast({title:"添加失败",icon:"none"})})).catch((function(t){}));break;case"edit":this.tui.request("/app/productCategory/edit","post",{categoryName:this.categoryText,id:this.editItem.id},!1,!0).then((function(e){200==e.code?(i.getGategoryList(),t.showToast({title:"修改成功",icon:"none"})):t.showToast({title:"修改失败",icon:"none"})})).catch((function(t){}));break;case"attrAdd":for(var o=0;o<this.attrList.length;o++)if(this.attrList[o].attributeName==e)return void t.showToast({title:"请勿重复添加",icon:"none"});this.tui.request("/app/productAttribute/save","post",{attributeName:this.categoryText,categoryId:this.isOpenId},!1,!0).then((function(e){200==e.