/
home
/
liman
/
panel
/
js
/
File Upload :
llllll
Current File: //home/liman/panel/js/9943.cf4d7d9f.js
(self["webpackChunkliman"]=self["webpackChunkliman"]||[]).push([[9943],{31099:function(t,i,e){"use strict";e.r(i),e.d(i,{default:function(){return d}});var s=function(){var t=this,i=t.$createElement,s=t._self._c||i;return s("div",[s("x-table",{ref:"customerTbl",attrs:{model:t.model},scopedSlots:t._u([{key:"operator",fn:function(i){var e=i.record;return s("div",{staticClass:"grid grid-cols-1 md:grid-cols-3 gap-4"},[s("a-tooltip",[s("template",{slot:"title"},[t._v(" نمایش جزئیات ")]),s("span",{on:{click:function(i){t.getNegotiableByType("metal"),t.getNegotiableByType("currency"),t.toView(e.user)}}},[s("Icon",{staticClass:"size-25 cursor-pointer",attrs:{icon:"ion:list"}})],1)],2),s("a-tooltip",[s("template",{slot:"title"},[t._v(" ویرایش ")]),s("a-popconfirm",{attrs:{title:"آیتم ویرایش شود؟","ok-text":"بله","cancel-text":"خیر"},on:{confirm:function(i){return t.toEdit(e.user)}}},[s("Icon",{class:"size-24 cursor-pointer text-success",attrs:{icon:"ion:create-outline"}})],1)],2),s("a-tooltip",[s("template",{slot:"title"},[t._v(" حذف ")]),s("a-popconfirm",{attrs:{title:"آیتم حذف شود؟","ok-text":"بله","cancel-text":"خیر"},on:{confirm:function(i){return t.deleteItem(e.user)}}},[s("Icon",{class:"size-24 cursor-pointer text-danger",attrs:{icon:"ion:trash-outline"}})],1)],2)],1)}}])}),t.initialValue?s("a-modal",{attrs:{footer:null},model:{value:t.view,callback:function(i){t.view=i},expression:"view"}},[s("a-descriptions",{attrs:{title:"اطلاعات تماس",column:{xxl:3,md:2,xs:1}}},[s("a-descriptions-item",{attrs:{label:"نام"}},[t._v(" "+t._s(t.initialValue.first_name||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"نام خانوادگی"}},[t._v(" "+t._s(t.initialValue.last_name||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"ایمیل"}},[t._v(" "+t._s(t.initialValue.email||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"شماره تلفن"}},[t._v(" "+t._s(t.initialValue.mobile||"-")+" ")])],1),s("a-descriptions",{attrs:{title:"اطلاعات فروشگاه",column:{xxl:3,md:2,xs:1}}},[s("a-descriptions-item",{attrs:{label:"نام فروشگاه"}},[t._v(" "+t._s(t.initialValue.shop_name||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"منطقه"}},[t._v(" "+t._s(t.initialValue.aria||"-")+" ")])],1),s("a-descriptions",{attrs:{title:"اطلاعات حساب کاربری",column:{xxl:3,md:2,xs:1}}},[s("a-descriptions-item",{attrs:{label:"سقف بدهی"}},[t._v(" "+t._s(t.initialValue.max_debt||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"سقف مدت"}},[t._v(" "+t._s(t.initialValue.max_period||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"شماره اقتصادی"}},[t._v(" "+t._s(t.initialValue.economical_number||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"شماره ثبت"}},[t._v(" "+t._s(t.initialValue.registration_number||"-")+" ")])],1),s("a-descriptions",{attrs:{title:"اطلاعات تکمیلی",column:{xxl:3,md:2,xs:1}}},[s("a-descriptions-item",{attrs:{label:"آیدی اینستاگرام"}},[t._v(" "+t._s(t.initialValue.instagram||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"آیدی تلگرام"}},[t._v(" "+t._s(t.initialValue.telegram||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"آیدی واتس اپ"}},[t._v(" "+t._s(t.initialValue.whatsapp||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"آدرس سایت"}},[t._v(" "+t._s(t.initialValue.web_url||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"نوع ارز اول"}},[t._v(" "+t._s(t.showCurrency(t.initialValue.first_currency)||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"نوع ارز دوم"}},[t._v(" "+t._s(t.showCurrency(t.initialValue.second_currency)||"-")+" ")]),s("a-descriptions-item",{attrs:{label:"جنس فلز"}},[t._v(" "+t._s(t.showMetal(t.initialValue.metal)||"-")+" ")])],1),s("a-descriptions",{attrs:{title:"مدارک",column:{xxl:3,md:2,xs:1}}},[s("a-descriptions-item",{attrs:{label:"تصویر کارت ملی"}},[s("img",{attrs:{src:t.initialValue.national_card_img||e(17178)}})]),s("a-descriptions-item",{attrs:{label:"تصویر جواز"}},[s("img",{attrs:{src:t.initialValue.license_img||e(17178)}})]),s("a-descriptions-item",{attrs:{label:"تصویر سند یا اجاره نامه"}},[s("img",{attrs:{src:t.initialValue.doc_img||e(17178)}})])],1)],1):t._e()],1)},a=[],l=e(66790),n=e(43431),o=e(11179),r={mixins:[n.Z,o.Z],name:"customerList",components:{XTable:l.Z}},c=r,u=e(38e3),m=(0,u.Z)(c,s,a,!1,null,null,null),d=m.exports},43431:function(t,i){"use strict";i["Z"]={data(){return{negoTypes:{currency:1,metal:2,stone:3,negotiable:4},negotiable:[],stone:[],metal:[],currency:[]}},methods:{async getNegotiableByType(t){try{this.$store.commit("setLoading",!0);const{data:{rows:i}}=await this.$axios.post("/negotiable/table",{filters:[{field:"type",op:"like",value:this.negoTypes[t]}],limit:2e3});this[t]=i[0]}catch(i){console.log(i)}finally{this.$store.commit("setLoading",!1)}},showCurrency(t){const i=this.currency.find((i=>i.id==t));return i&&i.name?i.name:"نا معتبر"},showMetal(t){const i=this.metal.find((i=>i.id==t));return i&&i.name?i.name:"نا معتبر"},showStone(t){const i=this.stone.find((i=>i.id==t));return i&&i.name?i.name:"نا معتبر"},showNegotiable(t){const i=this.negotiable.find((i=>i.id==t));return i&&i.name?i.name:"نا معتبر"}}}},11179:function(t,i,e){"use strict";i["Z"]={data(){return{initialValue:void 0,model:void 0,view:!1}},computed:{id(){return this.$route.params.id},restfull(){return this.$route.meta.restfull},restfullPath(){return this.$route.meta.restfullPath||this.$route.meta.restfull},customRoute(){return this.$route.meta.isCustomRoute}},async created(){const t=await e(18847)(`./${this.restfull}Tbl`);this.model=t.default,this.id&&!this.customRoute&&await this.getData(),this.initialValue&&this.initialValue.city&&(await this.getProvince(),this.initialValue.province&&await this.getCities(this.initialValue.province))},methods:{async getData(t){try{this.$store.commit("setLoading",!0);const{data:i}=await this.$axios.get(`/${this.restfullPath}/${t||this.id}/`);i&&i.city&&i.city.id&&i.city.parent&&i.city.parent.id?this.initialValue=Object.assign(i,{province:i.city.parent.id,city:i.city.id}):this.initialValue=i}catch(i){console.log(i)}finally{this.$store.commit("setLoading",!1)}},async update(t){try{this.$store.commit("setLoading",!0),await this.$axios.patch(`/${this.restfullPath}/${this.id}/`,t),this.$ntSuccess("اطلاعات با موفقیت آپدیت شد"),await this.$router.push({name:`${this.restfull}_list`})}catch(i){console.log(i)}finally{this.$store.commit("setLoading",!1)}},async create(t){try{this.$store.commit("setLoading",!0),await this.$axios.post(`/${this.restfullPath}/`,t),this.$ntSuccess("اطلاعات با موفقیت ثبت شد"),await this.$router.push({name:`${this.restfull}_list`})}catch(i){console.log(i)}finally{this.$store.commit("setLoading",!1)}},toEdit(t){window.open(`/${this.restfull}/edit/${t}`,"_blank").focus()},setInitialValue(t){this.initialValue=t,this.view=!0},async toView(t){await this.getData(t),this.view=!0},async deleteItem(t){try{this.$store.commit("setLoading",!0),await this.$axios.delete(`/${this.restfullPath}/${t}/`),this.$ntSuccess("آیتم با موفقیت حذف شد"),await this.$refs[`${this.restfull}Tbl`].fetch()}catch(i){console.log(i)}finally{this.$store.commit("setLoading",!1)}}}}},18847:function(t,i,e){var s={"./brandTbl":[54660,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(t){if(!e.o(s,t))return Promise.resolve().then((function(){var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}));var i=s[t],a=i[0];return e.e(i[1]).then((function(){return e(a)}))}a.keys=function(){return Object.keys(s)},a.id=18847,t.exports=a}}]); //# sourceMappingURL=9943.cf4d7d9f.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure