/
home
/
liman
/
panel
/
js
/
File Upload :
llllll
Current File: /home/liman/panel/js/563-legacy.d64cc350.js
(self["webpackChunkliman"]=self["webpackChunkliman"]||[]).push([[563],{3345:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return p}});var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("sedmed-form",{attrs:{items:e.fromItems,"initial-value":e.initialValue,"select-options":e.formOptions,okText:(e.id?"ویرایش":"ثبت")+" کارشناس فروش "},on:{create:e.create,update:e.update,change_province:e.getCities}})},i=[],a=r(37703),o=(r(49955),r(44231)),c=r(24688),s=r(45525),u=r(11179),l={name:"addEditPorter",components:{SedmedForm:s.Z},data:function(){return{fromItems:Object.assign(Object.assign({},c),{aria:{label:"منطقه",decorator:[{defaultKey:"required"}]},credit:{label:"اعتبار",custom:{type:"number",min:0}},province:{label:"استان",decorator:[],getEvent:!0,custom:{type:"select",options:"province",options_mode:"list",options_key:{val:"id",display:"name"},filterOption:!0,search:!0}},city:{label:"شهر",decorator:[],custom:{type:"select",options:"city",options_mode:"list",options_key:{val:"id",display:"name"},filterOption:!0,search:!0}},address:{label:"آدرس",decorator:[],custom:{type:"textarea",autoSize:{minRows:3,maxRows:5}},cls:"md:col-span-3"}})}},mixins:[o.Z,u.Z],computed:{formOptions:function(){return{province:this.province,city:this.cities}}},created:function(){var e=this;return(0,a.Z)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getProvince();case 2:case"end":return t.stop()}}),t)})))()}},m=l,d=r(38e3),f=(0,d.Z)(m,n,i,!1,null,"77220013",null),p=f.exports},44231:function(e,t,r){"use strict";var n=r(37703);r(49955);t["Z"]={data:function(){return{province:[],cities:[]}},methods:{getProvince:function(){var e=this;return(0,n.Z)(regeneratorRuntime.mark((function t(){var r,n;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.$caxios.post("/utility/province/table",{limit:2e3,filters:[{field:"level",value:1}]});case 4:r=t.sent,n=r.data.rows,e.province=n[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]])})))()},getCities:function(e){var t=this;return(0,n.Z)(regeneratorRuntime.mark((function r(){var n,i;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(r.prev=0,!e){r.next=8;break}return t.$store.commit("setLoading",!0),r.next=5,t.$caxios.post("/utility/province/table",{filters:[{field:"parent",value:e}],limit:2e3});case 5:n=r.sent,i=n.data.rows,t.cities=i[0];case 8:r.next=13;break;case 10:r.prev=10,r.t0=r["catch"](0),console.log(r.t0);case 13:return r.prev=13,t.$store.commit("setLoading",!1),r.finish(13);case 16:case"end":return r.stop()}}),r,null,[[0,10,13,16]])})))()}}}},11179:function(e,t,r){"use strict";var n=r(37703);r(49955),r(49966),r(97244),r(776),r(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,n.Z)(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,r(18847)("./".concat(e.restfull,"Tbl"));case 2:if(n=t.sent,e.model=n.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,n.Z)(regeneratorRuntime.mark((function r(){var n,i,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:void 0,r.prev=1,t.$store.commit("setLoading",!0),r.next=5,t.$axios.get("/".concat(t.restfullPath,"/").concat(n||t.id,"/"));case 5:i=r.sent,a=i.data,a&&a.city&&a.city.id&&a.city.parent&&a.city.parent.id?t.initialValue=Object.assign(a,{province:a.city.parent.id,city:a.city.id}):t.initialValue=a,r.next=13;break;case 10:r.prev=10,r.t0=r["catch"](1),console.log(r.t0);case 13:return r.prev=13,t.$store.commit("setLoading",!1),r.finish(13);case 16:case"end":return r.stop()}}),r,null,[[1,10,13,16]])})))()},update:function(e){var t=this;return(0,n.Z)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,t.$store.commit("setLoading",!0),r.next=4,t.$axios.patch("/".concat(t.restfullPath,"/").concat(t.id,"/"),e);case 4:return t.$ntSuccess("اطلاعات با موفقیت آپدیت شد"),r.next=7,t.$router.push({name:"".concat(t.restfull,"_list")});case 7:r.next=12;break;case 9:r.prev=9,r.t0=r["catch"](0),console.log(r.t0);case 12:return r.prev=12,t.$store.commit("setLoading",!1),r.finish(12);case 15:case"end":return r.stop()}}),r,null,[[0,9,12,15]])})))()},create:function(e){var t=this;return(0,n.Z)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,t.$store.commit("setLoading",!0),r.next=4,t.$axios.post("/".concat(t.restfullPath,"/"),e);case 4:return t.$ntSuccess("اطلاعات با موفقیت ثبت شد"),r.next=7,t.$router.push({name:"".concat(t.restfull,"_list")});case 7:r.next=12;break;case 9:r.prev=9,r.t0=r["catch"](0),console.log(r.t0);case 12:return r.prev=12,t.$store.commit("setLoading",!1),r.finish(12);case 15:case"end":return r.stop()}}),r,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,n.Z)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,t.getData(e);case 2:t.view=!0;case 3:case"end":return r.stop()}}),r)})))()},deleteItem:function(e){var t=this;return(0,n.Z)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,t.$store.commit("setLoading",!0),r.next=4,t.$axios.delete("/".concat(t.restfullPath,"/").concat(e,"/"));case 4:return t.$ntSuccess("آیتم با موفقیت حذف شد"),r.next=7,t.$refs["".concat(t.restfull,"Tbl")].fetch();case 7:r.next=12;break;case 9:r.prev=9,r.t0=r["catch"](0),console.log(r.t0);case 12:return r.prev=12,t.$store.commit("setLoading",!1),r.finish(12);case 15:case"end":return r.stop()}}),r,null,[[0,9,12,15]])})))()}}}},18847:function(e,t,r){var n={"./brandTbl":[54660,660],"./categoryTbl":[22881,881],"./customerTbl":[61003,3],"./documentTbl":[1370,370],"./factorTbl":[13159,159],"./negotiable-typeTbl":[47429,429],"./negotiableTbl":[2941,941],"./porterTbl":[63685,685],"./productTbl":[44740,740],"./userTbl":[66896,896]};function i(e){if(!r.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],i=t[0];return r.e(t[1]).then((function(){return r(i)}))}i.keys=function(){return Object.keys(n)},i.id=18847,e.exports=i},24688:function(e){"use strict";e.exports=JSON.parse('{"first_name":{"label":"نام","decorator":[{"defaultKey":"required"},{"defaultKey":"fa"}]},"last_name":{"label":"نام خانوادگی","decorator":[{"defaultKey":"required"},{"defaultKey":"fa"}]},"mobile":{"label":"تلفن همراه","decorator":[{"defaultKey":"required"},{"defaultKey":"mobile"}]}}')}}]); //# sourceMappingURL=563-legacy.d64cc350.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure