/
home
/
liman
/
panel
/
js
/
File Upload :
llllll
Current File: //home/liman/panel/js/4936-legacy.01188170.js
(self["webpackChunkliman"]=self["webpackChunkliman"]||[]).push([[4936],{10721:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return f}});var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("sedmed-form",{attrs:{items:e.fromItems,"initial-value":e.initialValue,"select-options":e.formOptions,okText:(e.id?"ویرایش":"ثبت")+" نوع قابل معاوضه "},on:{create:e.create,update:e.update}})},a=[],i=n(37703),o=(n(49955),n(89058)),s=n(11179),c={name:"addEditNegotiable-type",components:{SedmedForm:o.Z},data:function(){return{fromItems:{name:{label:"نام",decorator:[{defaultKey:"required"}]},slug:{label:"کد slug",decorator:[{defaultKey:"required"},{defaultKey:"username"}]},negotiable:{label:"قابل معاوضه",custom:{type:"select",options:"negotiable",options_mode:"list",options_key:{val:"id",display:"name"}}}},negotiable:[]}},computed:{formOptions:function(){return{negotiable:this.negotiable}}},methods:{getNegotiable:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.$store.commit("setLoading",!0),t.next=4,e.$axios.post("/negotiable/table");case 4:n=t.sent,r=n.data.rows,e.negotiable=r[0],t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.log(t.t0);case 12:return t.prev=12,e.$store.commit("setLoading",!1),t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,9,12,15]])})))()}},created:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getNegotiable();case 2:case"end":return t.stop()}}),t)})))()},mixins:[s.Z]},u=c,l=n(38e3),m=(0,l.Z)(u,r,a,!1,null,"69d047f4",null),f=m.exports},11179:function(e,t,n){"use strict";var r=n(37703);n(49955),n(49966),n(97244),n(776),n(50098);t["Z"]={data:function(){return{initialValue:void 0,model:void 0,view:!1}},computed:{id:function(){return this.$route.params.id},restfull:function(){return this.$route.meta.restfull},restfullPath:function(){return this.$route.meta.restfullPath||this.$route.meta.restfull},customRoute:function(){return this.$route.meta.isCustomRoute}},created:function(){var e=this;return(0,r.Z)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,n(18847)("./".concat(e.restfull,"Tbl"));case 2:if(r=t.sent,e.model=r.default,!e.id||e.customRoute){t.next=7;break}return t.next=7,e.getData();case 7:if(!(e.initialValue&&e.initialValue.city&&e.initialValue.province)){t.next=10;break}return t.next=10,e.getCities(e.initialValue.province);case 10:case"end":return t.stop()}}),t)})))()},methods:{getData:function(){var e=arguments,t=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){var r,a,i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=e.length>0&&void 0!==e[0]?e[0]:void 0,n.prev=1,t.$store.commit("setLoading",!0),n.next=5,t.$axios.get("/".concat(t.restfullPath,"/").concat(r||t.id,"/"));case 5:a=n.sent,i=a.data,i&&i.city&&i.city.id&&i.city.parent&&i.city.parent.id?t.initialValue=Object.assign(i,{province:i.city.parent.id,city:i.city.id}):t.initialValue=i,n.next=13;break;case 10:n.prev=10,n.t0=n["catch"](1),console.log(n.t0);case 13:return n.prev=13,t.$store.commit("setLoading",!1),n.finish(13);case 16:case"end":return n.stop()}}),n,null,[[1,10,13,16]])})))()},update:function(e){var t=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,t.$store.commit("setLoading",!0),n.next=4,t.$axios.patch("/".concat(t.restfullPath,"/").concat(t.id,"/"),e);case 4:return t.$ntSuccess("اطلاعات با موفقیت آپدیت شد"),n.next=7,t.$router.push({name:"".concat(t.restfull,"_list")});case 7:n.next=12;break;case 9:n.prev=9,n.t0=n["catch"](0),console.log(n.t0);case 12:return n.prev=12,t.$store.commit("setLoading",!1),n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[0,9,12,15]])})))()},create:function(e){var t=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,t.$store.commit("setLoading",!0),n.next=4,t.$axios.post("/".concat(t.restfullPath,"/"),e);case 4:return t.$ntSuccess("اطلاعات با موفقیت ثبت شد"),n.next=7,t.$router.push({name:"".concat(t.restfull,"_list")});case 7:n.next=12;break;case 9:n.prev=9,n.t0=n["catch"](0),console.log(n.t0);case 12:return n.prev=12,t.$store.commit("setLoading",!1),n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[0,9,12,15]])})))()},toEdit:function(e){window.open("/".concat(this.restfull,"/edit/").concat(e),"_blank").focus()},setInitialValue:function(e){this.initialValue=e,this.view=!0},toView:function(e){var t=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.getData(e);case 2:t.view=!0;case 3:case"end":return n.stop()}}),n)})))()},deleteItem:function(e){var t=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,t.$store.commit("setLoading",!0),n.next=4,t.$axios.delete("/".concat(t.restfullPath,"/").concat(e,"/"));case 4:return t.$ntSuccess("آیتم با موفقیت حذف شد"),n.next=7,t.$refs["".concat(t.restfull,"Tbl")].fetch();case 7:n.next=12;break;case 9:n.prev=9,n.t0=n["catch"](0),console.log(n.t0);case 12:return n.prev=12,t.$store.commit("setLoading",!1),n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[0,9,12,15]])})))()}}}},18847:function(e,t,n){var r={"./brandTbl":[79989,4660],"./categoryTbl":[22881,2881],"./constantTbl":[77041,7041],"./customerTbl":[61003,1003],"./documentTbl":[1370,1370],"./factorTbl":[13159,3159],"./negotiable-typeTbl":[47429,7429],"./negotiableTbl":[2941,2941],"./orderTbl":[56730,6730],"./porsantTbl":[45693,5693],"./porterTbl":[63685,3685],"./productTbl":[44740,4740],"./sasheTbl":[45868,5868],"./userTbl":[66896,6896]};function a(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],a=t[0];return n.e(t[1]).then((function(){return n(a)}))}a.keys=function(){return Object.keys(r)},a.id=18847,e.exports=a}}]); //# sourceMappingURL=4936-legacy.01188170.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure