/
home
/
henzagold
/
admin_report
/
js
/
File Upload :
llllll
Current File: //home/henzagold/admin_report/js/chunk-04c9d24c.d5f5211e.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-04c9d24c"],{"0003":function(t,e,a){},2672:function(t,e,a){"use strict";a("0003")},3309:function(t,e,a){"use strict";a("7f7f");var n=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"page-user-view"}},[e("div",{attrs:{id:"user-data"}},[e("vx-card",{staticClass:"mb-base",attrs:{title:"اطلاعات مشتری"}},[e("div",{staticClass:"vx-row"},[e("div",{staticClass:"vx-col",attrs:{id:"avatar-col"}},[e("div",{staticClass:"img-container mb-4"},[e("img",{staticClass:"rounded w-full",attrs:{src:t.user_data.avatar,alt:""}})])]),e("div",{staticClass:"vx-col flex-1",attrs:{id:"account-info-col-1"}},[e("table",{staticClass:"flex flex-row"},[e("tr",{staticClass:"flex flex-col px-8"},[e("td",{staticClass:"font-semibold"},[t._v("نام")]),e("td",[t._v(t._s(t.user_data.name))])]),e("tr",{staticClass:"flex flex-col px-8"},[e("td",{staticClass:"font-semibold"},[t._v("کد ملی")]),e("td",[t._v("اشکانی")])]),e("tr",{staticClass:"flex flex-col px-8"},[e("td",{staticClass:"font-semibold"},[t._v("تلفن همراه")]),e("td",[t._v(t._s(t.user_data.reciver_fixed_phone))])]),e("tr",{staticClass:"flex flex-col px-8"},[e("td",{staticClass:"font-semibold"},[t._v("وضعیت")]),e("td",[t._v("فعال")])])]),e("div",{staticClass:"w-full p-6"},[e("div",{staticClass:"font-semibold"},[t._v("آدرس")]),e("div",[t._v(t._s(t.user_data.address))])])]),e("div",{staticClass:"vx-col flex-1",attrs:{id:"account-info-col-2"}},[e("table")]),e("div",{staticClass:"vx-col w-full flex",attrs:{id:"account-manage-buttons"}},[e("vs-button",{staticClass:"mr-4",attrs:{"icon-pack":"feather",icon:"icon-edit"}},[t._v("ویرایش")]),e("APopconfirm",{attrs:{placement:"top","ok-text":"بله","cancel-text":"خیر"},on:{confrim:function(){}}},[e("template",{slot:"title"},[e("span",[t._v("مطمئنی؟")])]),e("vs-button",{attrs:{type:"border",color:"danger","icon-pack":"feather",icon:"icon-trash"}},[t._v("\n غیر فعال کردن مشتری\n ")])],2)],1)])])],1)])},r=[],s=a("4faa"),i={name:"CustomerView",data:function(){return{user_data:null,browserStatistics:[{title:"فروش هفته جاری",percent:"5",value:"1500000",ratio:50},{title:"فروش هفته گذشته",percent:"4",value:"12000000",ratio:75},{title:"فروش ماه گذشته",percent:"10",value:"125000000",ratio:42}],user_not_found:!1}},computed:{userAddress:function(){var t="";for(var e in this.user_data.location)t+="".concat(e," ");return t}},methods:{confirmDeleteRecord:function(){this.$vs.dialog({type:"confirm",color:"danger",title:"Confirm Delete",text:'You are about to delete "'.concat(this.user_data.username,'"'),accept:this.deleteRecord,acceptText:"Delete"})},deleteRecord:function(){this.$router.push({name:"app-user-list"}),this.showDeleteSuccess()},showDeleteSuccess:function(){this.$vs.notify({color:"success",title:"User Deleted",text:"The selected user was successfully deleted"})}},created:function(){var t=this;s["a"].isRegistered||(this.$store.registerModule("userManagement",s["a"]),s["a"].isRegistered=!0),this.$store.dispatch("userManagement/fetchUser",3).then((function(e){t.user_data=e.data,console.log("user_data",t.user_data)})).catch((function(e){404!==e.response.status?console.error(e):t.user_not_found=!0}))}},o=i,c=(a("2672"),a("2877")),l=Object(c["a"])(o,n,r,!1,null,null,null);e["a"]=l.exports},"4faa":function(t,e,a){"use strict";var n={users:[]},r=(a("20d6"),{SET_USERS:function(t,e){t.users=e},REMOVE_RECORD:function(t,e){var a=t.users.findIndex((function(t){return t.id===e}));t.users.splice(a,1)}}),s=a("bb36"),i={fetchUsers:function(t){var e=t.commit;return new Promise((function(t,a){s["b"].get("/api/user-management/users").then((function(a){e("SET_USERS",a.data),t(a)})).catch((function(t){a(t)}))}))},fetchUser:function(t,e){return new Promise((function(t,a){s["b"].get("user/profile/".concat(e)).then((function(e){t(e)})).catch((function(t){a(t)}))}))},removeRecord:function(t,e){var a=t.commit;return new Promise((function(t,n){s["b"].delete("/api/user-management/users/".concat(e)).then((function(n){a("REMOVE_RECORD",e),t(n)})).catch((function(t){n(t)}))}))}},o={};e["a"]={isRegistered:!1,namespaced:!0,state:n,mutations:r,actions:i,getters:o}},6073:function(t,e,a){},bf79:function(t,e,a){"use strict";a("6073")},fd50:function(t,e,a){"use strict";a.r(e);var n=a("ade3"),r=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"page-user-list"}},[e("vx-card",{ref:"filterCard",staticClass:"vx-card",attrs:{removeCardAction:!1,title:"لیست محصولات"}},[e("div",[e("XTable",{ref:"tblProducts",attrs:{model:t.cols},scopedSlots:t._u([{key:"op",fn:function(a){a.text;var r=a.record;return e("div",{},[e("ATooltip",[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("ویرایش")]),e("FeatherIcon",{staticClass:"cursor-pointer mx-1",attrs:{icon:"EditIcon",svgClasses:"h-6 w-6 text-primary"},on:{click:function(e){return t.toEdit(r.id)}}})],1),e("ATooltip",[e("a-popconfirm",{attrs:{placement:"top","ok-text":"بله","cancel-text":"خیر"},on:{confirm:function(e){return t.setNew(r.id)}}},[e("template",{slot:"title"},[e("p",[t._v("آیا مطمئن به محصول جدید محصول مورد نظر هستید ؟")])]),e("FeatherIcon",{staticClass:"cursor-pointer mx-1",attrs:Object(n["a"])({icon:"StarIcon",svgClasses:"h-6 w-6"},"svgClasses","".concat(r.is_new?"text-success":""))})],2),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("محصول جدید")])],1),e("ATooltip",[e("a-popconfirm",{attrs:{placement:"top","ok-text":"بله","cancel-text":"خیر"},on:{confirm:function(e){return t.confirmDelete(r.id)}}},[e("template",{slot:"title"},[e("p",[t._v("آیا مطمئن به حذف محصول مورد نظر هستید ؟")])]),e("FeatherIcon",{staticClass:"cursor-pointer mx-1",attrs:{icon:"TrashIcon",svgClasses:"h-6 w-6 text-danger"}})],2),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("حذف")])],1)],1)}},{key:"image",fn:function(t){t.text;var n=t.record;return n.image?e("div",{},[e("img",{staticStyle:{"object-fit":"scale-down"},attrs:{width:"90px",height:"90px",src:n.image.src}})]):e("div",{},[e("img",{staticStyle:{"object-fit":"scale-down"},attrs:{width:"90px",height:"90px",src:a("529b")}})])}},{key:"omde_price",fn:function(a){var n=a.text;a.record;return e("div",{},[t._v("\n "+t._s(t._f("priceUnit")(n))+"\n ")])}},{key:"new",fn:function(a){var n=a.text;a.record;return e("div",{},[n?e("a-tag",{attrs:{color:"green"}},[t._v("جدید")]):[t._v("-")]],2)}},{key:"age",fn:function(a){var n=a.text;a.record;return e("div",{},[t._v("\n "+t._s(n)+"\n ")])}},{key:"gender",fn:function(a){var n=a.text;a.record;return e("div",{},[t._v("\n "+t._s(3==n?"هر دو":2==n?"پسرانه":1==n?"دخترانه":"-")+"\n ")])}}],null,!0)})],1)])],1)},s=[],i=(a("96cf"),a("1da1")),o=a("4a7a"),c=a.n(o),l=a("04c5"),u=a("e0d2"),d=new u["b"]("/admin/product/table","لیست محصولات");d.add(new u["a"]("id","کد").filterNumber()),d.add(new u["a"]("image","تصویر محصول").renderSlot("image").noSort()),d.add(new u["a"]("title","نام محصول").filterText()),d.add(new u["a"]("product_code","کد محصول").filterText()),d.add(new u["a"]("brand_product.title","برند").filterText()),d.add(new u["a"]("count","موجودی").filterText()),d.add(new u["a"]("is_create","محصول جدید").filterText().renderSlot("new")),d.add(new u["a"]("gender","جنسیت").renderSlot("gender").hidden().filterSelect({1:"دخترانه",2:"پسرانه",3:"هردو"})),d.add(new u["a"]("omde_price","قیمت").renderSlot("omde_price").filterText()),d.add(new u["a"]("action","عملیات").renderSlot("op").noSort());var f=d,p=a("ff6e"),v=a("3309"),m={components:{CustomerView:v["a"],vSelect:c.a,FeatherIcon:l["a"],XTable:p["a"]},data:function(){return{filterType:"all",filterSts:"all",tempVariant:[],tempProduct:void 0,detailsPopup:!1,variantLoading:!1,productLoading:!1,variantPopup:!1,typeOptions:[{label:"همگی",value:"all"},{label:"مشتری",value:"active"},{label:"عمده ای",value:"deactivated"},{label:"تک فروشی",value:"blocked"}],statusOptions:[{label:"همگی",value:"all"},{label:"فعال",value:"active"},{label:"غیر فعال",value:"deactivated"}],gridApi:null,cols:null,gridOptions:{},defaultColDef:{sortable:!0,resizable:!0,suppressMenu:!0},components:{}}},methods:{showVariantModal:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(e){var a,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.tempProduct=e,this.tempVariant=[],this.variantLoading=!0,this.variantPopup=!0,t.next=6,oapi.post("get/variants",{id:e.id});case 6:a=t.sent,n=a.data,this.variantLoading=!1,this.tempVariant=n;case 10:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),showProductModal:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.tempProduct=e,this.productLoading=!1,this.detailsPopup=!0;case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),toEdit:function(t){window.open("/admin/apps/product/edit/".concat(t),"_blank").focus()},toEditVariant:function(t){this.$router.push({name:"variant-edit",params:{id:t}})},confirmDelete:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(e){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.$http.delete("admin/product/"+e);case 3:a=t.sent,a.data,this.$refs.tblProducts.fetch(null),t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),console.log(t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})));function e(e){return t.apply(this,arguments)}return e}(),setNew:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(e){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.$http.get("admin/product/new/"+e);case 3:a=t.sent,a.data,this.$refs.tblProducts.fetch(null),t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),console.log(t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})));function e(e){return t.apply(this,arguments)}return e}()},mounted:function(){},created:function(){this.cols=f}},h=m,x=(a("bf79"),a("2877")),_=Object(x["a"])(h,r,s,!1,null,null,null);e["default"]=_.exports}}]); //# sourceMappingURL=chunk-04c9d24c.d5f5211e.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure