/
home
/
liman
/
panel
/
js
/
File Upload :
llllll
Current File: //home/liman/panel/js/9023-legacy.22576c9c.js
(self["webpackChunkliman"]=self["webpackChunkliman"]||[]).push([[9023],{73227:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return d}});var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("x-table",{ref:"negotiableTbl",attrs:{model:t.model},scopedSlots:t._u([{key:"type",fn:function(e){var n=e.text;return[t._v(t._s(t.showType(n)))]}},{key:"operator",fn:function(e){var n=e.record;return r("div",{staticClass:"grid grid-cols-1 md:grid-cols-4 gap-4"},[r("a-tooltip",[r("template",{slot:"title"},[t._v(" نمایش جزئیات ")]),r("span",{on:{click:function(e){return t.toView(n.id)}}},[r("Icon",{staticClass:"size-25 cursor-pointer",attrs:{icon:"ion:list"}})],1)],2),r("a-tooltip",[r("template",{slot:"title"},[t._v(" نمایش لیست انواع ")]),r("span",{on:{click:function(e){return t.toShowTypes(n.id)}}},[r("Icon",{staticClass:"size-25 cursor-pointer text-warning",attrs:{icon:"ion:menu-outline"}})],1)],2),r("a-tooltip",[r("template",{slot:"title"},[t._v(" ویرایش ")]),r("a-popconfirm",{attrs:{title:"آیتم ویرایش شود؟","ok-text":"بله","cancel-text":"خیر"},on:{confirm:function(e){return t.toEdit(n.id)}}},[r("Icon",{class:"size-24 cursor-pointer text-success",attrs:{icon:"ion:create-outline"}})],1)],2),r("a-tooltip",[r("template",{slot:"title"},[t._v(" حذف ")]),r("a-popconfirm",{attrs:{title:"آیتم حذف شود؟","ok-text":"بله","cancel-text":"خیر"},on:{confirm:function(e){return t.deleteItem(n.id)}}},[r("Icon",{class:"size-24 cursor-pointer text-danger",attrs:{icon:"ion:trash-outline"}})],1)],2)],1)}}])}),t.initialValue?r("a-modal",{attrs:{footer:null},model:{value:t.view,callback:function(e){t.view=e},expression:"view"}},[r("a-descriptions",{attrs:{title:"اطلاعات",column:{xxl:3,md:2,xs:1}}},[r("a-descriptions-item",{attrs:{label:"شناسه"}},[t._v(" "+t._s(t.initialValue.id||"-")+" ")]),r("a-descriptions-item",{attrs:{label:"نام"}},[t._v(" "+t._s(t.initialValue.name||"-")+" ")]),r("a-descriptions-item",{attrs:{label:"کد slug"}},[t._v(" "+t._s(t.initialValue.slug||"-")+" ")]),r("a-descriptions-item",{attrs:{label:"نوع"}},[t._v(" "+t._s(t.showType(t.initialValue.type))+" ")]),r("a-descriptions-item",{attrs:{label:"آیکون",span:2}},[r("img",{attrs:{src:t.initialValue.icon||n(17178)}})]),r("a-descriptions-item",{attrs:{label:"توضیحات",span:2}},[t._v(" "+t._s(t.initialValue.description||"-")+" ")])],1),t.initialValue.types.length>0?[r("h5",[t._v("انواع "+t._s(t.initialValue.name))]),t._l(t.initialValue.types,(function(e){return r("a-descriptions",{key:e.id,attrs:{column:{xxl:3,md:2,xs:1}}},[r("div",{staticClass:"flex",attrs:{slot:"title"},slot:"title"},[t._v(" "+t._s(e.name)+" "),r("span",{on:{click:function(n){return t.toEditNegotiableType(e.id)}}},[r("Icon",{class:"ml-2 size-24 cursor-pointer text-success",attrs:{icon:"ion:create-outline"}})],1)]),r("a-descriptions-item",{attrs:{label:"شناسه"}},[t._v(" "+t._s(e.id||"-")+" ")]),r("a-descriptions-item",{attrs:{label:"کد slug"}},[t._v(" "+t._s(e.slug||"-")+" ")])],1)}))]:t._e()],2):t._e()],1)},i=[],a=n(37703),s=(n(37217),n(49966),n(92206),n(49955),n(66790)),o=n(11179),c={mixins:[o.Z],name:"negotiableList",methods:{toEditNegotiableType:function(t){window.open("/negotiable-type/edit/".concat(t),"_blank").focus()},toShowTypes:function(t){var e=this;return(0,a.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$router.push({name:"negotiable-type_by_id",params:{id:t}});case 2:case"end":return n.stop()}}),n)})))()},showType:function(t){var e=this.$store.state.negotiableTypes.find((function(e){return e.id==t}));return e?e.name:"-"}},components:{XTable:s.Z}},l=c,u=n(38e3),p=(0,u.Z)(l,r,i,!1,null,null,null),d=p.exports},11179:function(t,e,n){"use strict";var r=n(37703);n(49955),n(49966),n(97244),n(776),n(50098);e["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 t=this;return(0,r.Z)(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,n(18847)("./".concat(t.restfull,"Tbl"));case 2:if(r=e.sent,t.model=r.default,!t.id||t.customRoute){e.next=7;break}return e.next=7,t.getData();case 7:if(!(t.initialValue&&t.initialValue.city&&t.initialValue.province)){e.next=10;break}return e.next=10,t.getCities(t.initialValue.province);case 10:case"end":return e.stop()}}),e)})))()},methods:{getData:function(){var t=arguments,e=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){var r,i,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=t.length>0&&void 0!==t[0]?t[0]:void 0,n.prev=1,e.$store.commit("setLoading",!0),n.next=5,e.$axios.get("/".concat(e.restfullPath,"/").concat(r||e.id,"/"));case 5:i=n.sent,a=i.data,a&&a.city&&a.city.id&&a.city.parent&&a.city.parent.id?e.initialValue=Object.assign(a,{province:a.city.parent.id,city:a.city.id}):e.initialValue=a,n.next=13;break;case 10:n.prev=10,n.t0=n["catch"](1),console.log(n.t0);case 13:return n.prev=13,e.$store.commit("setLoading",!1),n.finish(13);case 16:case"end":return n.stop()}}),n,null,[[1,10,13,16]])})))()},update:function(t){var e=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,e.$store.commit("setLoading",!0),n.next=4,e.$axios.patch("/".concat(e.restfullPath,"/").concat(e.id,"/"),t);case 4:return e.$ntSuccess("اطلاعات با موفقیت آپدیت شد"),n.next=7,e.$router.push({name:"".concat(e.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,e.$store.commit("setLoading",!1),n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[0,9,12,15]])})))()},create:function(t){var e=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,e.$store.commit("setLoading",!0),n.next=4,e.$axios.post("/".concat(e.restfullPath,"/"),t);case 4:return e.$ntSuccess("اطلاعات با موفقیت ثبت شد"),n.next=7,e.$router.push({name:"".concat(e.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,e.$store.commit("setLoading",!1),n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[0,9,12,15]])})))()},toEdit:function(t){window.open("/".concat(this.restfull,"/edit/").concat(t),"_blank").focus()},setInitialValue:function(t){this.initialValue=t,this.view=!0},toView:function(t){var e=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,e.getData(t);case 2:e.view=!0;case 3:case"end":return n.stop()}}),n)})))()},deleteItem:function(t){var e=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,e.$store.commit("setLoading",!0),n.next=4,e.$axios.delete("/".concat(e.restfullPath,"/").concat(t,"/"));case 4:return e.$ntSuccess("آیتم با موفقیت حذف شد"),n.next=7,e.$refs["".concat(e.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,e.$store.commit("setLoading",!1),n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[0,9,12,15]])})))()}}}},18847:function(t,e,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 i(t){if(!n.o(r,t))return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=r[t],i=e[0];return n.e(e[1]).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=18847,t.exports=i}}]); //# sourceMappingURL=9023-legacy.22576c9c.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure