/
home
/
henzagold
/
adminold
/
export
/
js
/
File Upload :
llllll
Current File: //home/henzagold/adminold/export/js/chunk-5f50646a.132cb589.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5f50646a"],{"04ec":function(e,t,r){},4666:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e._self._c;return t("vx-card",{ref:"filterCard",staticClass:"vx-card",attrs:{removeCardAction:!1,title:e.is_branch?"لیست مشتریان":"لیست مشتریان تک فروشی"}},[t("div",[t("XTable",{ref:"tbl",attrs:{model:e.model},scopedSlots:e._u([{key:"op",fn:function(r){r.text;var n=r.record;return[t("ATooltip",[t("span",{attrs:{slot:"title"},slot:"title"},[e._v("ویرایش")]),t("FeatherIcon",{staticClass:"cursor-pointer mx-1",attrs:{icon:"EditIcon",svgClasses:"h-6 w-6 text-primary"},on:{click:function(t){return e.toEdit(n.id)}}})],1),e.$hasPermission("wallet.charge")&&!e.is_branch?t("ATooltip",[t("span",{attrs:{slot:"title"},slot:"title"},[e._v("شارژ کیف پول")]),t("FeatherIcon",{staticClass:"cursor-pointer mx-1",staticStyle:{color:"#d48806"},attrs:{icon:"CreditCardIcon",svgClasses:"h-6 w-6"},on:{click:function(t){return e.toCharge(n.id)}}})],1):e._e(),e.$hasPermission("wallet.charge")?t("ATooltip",[t("span",{attrs:{slot:"title"},slot:"title"},[e._v("مشاهده اطلاعات")]),t("FeatherIcon",{staticClass:"cursor-pointer mx-1",attrs:{icon:"EyeIcon",svgClasses:"h-6 w-6 text-success"},on:{click:function(t){return e.toView(n.id)}}})],1):e._e()]}},{key:"branch",fn:function(t,r){return[e._v("\n "+e._s(e.setBranch(t.record.branch_id))+"\n ")]}}])})],1),e.$hasPermission("wallet.charge")?t("AModal",{attrs:{forceRender:!0,footer:null,title:"شارژ کیف پول"},model:{value:e.showChargeForm,callback:function(t){e.showChargeForm=t},expression:"showChargeForm"}},[t("a-spin",{attrs:{spinning:e.loading}},[t("a-form",{attrs:{form:e.form}},[t("div",{staticClass:"grid grid-cols-1 md:grid-cols-2 gap-4 items-end"},[t("a-form-item",{staticClass:"hidden",attrs:{label:"شماره مشتری"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["customer_id",{rules:[{required:!0,message:"لطفا مقدار را وارد کنید"}]}],expression:"['customer_id',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}]}]"}],staticClass:"w-full hide-counter"})],1),t("a-form-item",{attrs:{label:"میزان شارژ"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["value",{rules:[{required:!0,message:"لطفا مقدار را وارد کنید"}]}],expression:"['value',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}]}]"}],staticClass:"w-full hide-counter"})],1),t("a-popconfirm",{staticStyle:{"margin-bottom":"24px"},attrs:{title:"آیا از شارژ کیف پول مطمعن هستید؟","ok-text":"بله","cancel-text":"خیر"},on:{confirm:e.chargeWallet,cancel:function(t){e.form.resetFields(),e.showChargeForm=!1}}},[t("a-button",{attrs:{type:"primary"}},[e._v("\n ثبت\n ")])],1)],1)])],1)],1):e._e()],1)},a=[],o=(r("7f7f"),r("7514"),r("96cf"),r("1da1")),i=r("ff6e"),s=r("e0d2"),c=new s["b"]("https://henzagold.com/oapi/admin/single-customer","لیست مشتریان تک");c.add(new s["a"]("id","کد").filterNumber()),c.add(new s["a"]("fname","نام").filterText()),c.add(new s["a"]("lname","نام خانوادگی").filterText().noSort()),c.add(new s["a"]("phone","تلفن تماس").filterText().noSort()),c.add(new s["a"]("email","ایمیل").filterText().noSort()),c.add(new s["a"]("branch_id","نام شعبه").filterText().noSort().renderSlot("branch")),c.add(new s["a"]("op","عملیات").noSort().renderSlot("op"));var l=c,u=r("04c5"),d=r("bb36"),h=r("ed08"),m={components:{XTable:i["a"],FeatherIcon:u["a"]},data:function(){return{model:l,showChargeForm:!1,loading:!1,listBranches:[],form:this.$form.createForm(this,{name:"coordinated"})}},methods:{toEdit:function(e){var t=this.is_branch?"/branch":"/admin";window.open("".concat(t,"/singleCustomer/edit/").concat(e),"_blank").focus()},toView:function(e){var t=this.is_branch?"/branch":"/admin";window.open("".concat(t,"/singleCustomer/view/").concat(e),"_blank").focus()},toCharge:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.form.setFieldsValue({customer_id:t}),this.showChargeForm=!0;case 2:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),chargeWallet:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){var r=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.preventDefault();try{this.loading=!0,this.form.validateFields(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t){e.next=7;break}return e.next=3,Object(d["b"])({method:"post",url:"/wallet/charge",headers:{},data:n});case 3:return r.$ntSet(),r.form.resetFields(),e.next=7,r.$router.push("/wallet");case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}())}catch(t){console.log(t),this.$ntSetError("خطا در ثبت اطلاعات.")}finally{this.loading=!1}case 2:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),getBranch:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d["b"].get("branch/list");case 3:t=e.sent,r=t.data,this.listBranches=r,e.next=11;break;case 8:throw e.prev=8,e.t0=e["catch"](0),new Error(e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),setBranch:function(e){if(null!==e){var t=this.listBranches.find((function(t){return t.id===e}));if(void 0!==t)return t.name}}},computed:{is_branch:function(){return Object(h["a"])()}},mounted:function(){this.getBranch()}},f=m,p=(r("7104"),r("2877")),w=Object(p["a"])(f,n,a,!1,null,null,null);t["default"]=w.exports},7104:function(e,t,r){"use strict";r("04ec")}}]); //# sourceMappingURL=chunk-5f50646a.132cb589.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure