/
home
/
henzagold
/
adminold
/
export
/
js
/
File Upload :
llllll
Current File: /home/henzagold/adminold/export/js/chunk-2d0e186f.6e46af63.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e186f"],{"7b8f":function(e,t,r){"use strict";r.r(t);r("7f7f");var s=function(){var e=this,t=e._self._c;return t("a-spin",{attrs:{type:"loading",spinning:e.loading}},[t("a-form",{attrs:{form:e.form}},[t("div",{staticClass:"grid grid-cols-1 md:grid-cols-3 gap-4"},[t("a-form-item",{attrs:{label:"عنوان"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title",{rules:[{required:!0,message:"لطفا مقدار را وارد کنید"}]}],expression:"['title',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}],},]"}],staticClass:"w-full"})],1),t("a-form-item",{attrs:{label:"نوع کاربر"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["type_send",{rules:[{required:!0,message:"لطفا مقدار را وارد کنید"}]}],expression:"['type_send',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}],},]"}],staticClass:"w-full ltr",on:{change:e.setShow}},e._l(e.types,(function(r,s){return t("a-select-option",{key:s,attrs:{value:s}},[e._v("\n "+e._s(r)+"\n ")])})),1)],1),e.showUser?t("a-form-item",{attrs:{label:"کاربر"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["customer_id",{rules:[{required:!0,message:"لطفا مقدار را وارد کنید"}]}],expression:"['customer_id',{rules: [{ required: true,message: 'لطفا مقدار را وارد کنید'}],},]"}],staticClass:"w-full ltr",attrs:{"filter-option":e.filterOption,"show-search":""}},[3==e.type?e._l(e.customers,(function(r,s){return t("a-select-option",{key:s,attrs:{value:r.id}},[e._v("\n "+e._s(r.id)+" "+e._s(r.name)+"\n ")])})):e._e(),5==e.type?e._l(e.users,(function(r,s){return t("a-select-option",{key:s,attrs:{value:r.id}},[e._v("\n "+e._s(r.id)+" "+e._s(r.name)+"\n ")])})):e._e()],2)],1):e._e(),t("a-form-item",{staticClass:"md:col-span-3",attrs:{label:"متن پیام"}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["note",{rules:[{required:!0,message:"مقدار را وارد نمایید"}]}],expression:"['note', { rules: [{ required: true, message: 'مقدار را وارد نمایید' }] }]"}],attrs:{"auto-size":{minRows:3,maxRows:5}}})],1)],1),t("a-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("\n ارسال\n ")])],1)],1)},n=[],a=(r("96cf"),r("1da1")),i=r("bb36"),o={name:"Notification",data:function(){return{loading:!1,form:this.$form.createForm(this,{name:"coordinated"}),created_at:null,users:[],customers:[],showUser:!1,type:void 0,types:{1:"کارشناسان فروش",2:"مشتریان عمده",3:"یک مشتری",4:"همه مشتریان",5:"یک مدیر",6:"همه مدیران"}}},methods:{setShow:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.type=t,5!=t){e.next=8;break}if(this.showUser=!0,!(this.users.length<=0)){e.next=6;break}return e.next=6,this.getUsers();case 6:e.next=16;break;case 8:if(3!=t){e.next=15;break}if(this.showUser=!0,!(this.customers.length<=0)){e.next=13;break}return e.next=13,this.getCustomers();case 13:e.next=16;break;case 15:this.showUser&&(this.showUser=!1);case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),submit:function(){var e=Object(a["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(),this.form.validateFields(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(t,s){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t){e.next=15;break}return e.prev=1,r.loading=!0,e.next=5,i["b"].post("/notify",s);case 5:r.form.resetFields(),r.$ntSet("نوتیفیکیشن مورد نظر با موفقیت ارسال شد"),e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](1),console.log(e.t0);case 12:return e.prev=12,r.loading=!1,e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,9,12,15]])})));return function(t,r){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),getUsers:function(){var e=Object(a["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,this.loading=!0,e.next=4,i["b"].post("/users/list");case 4:t=e.sent,r=t.data.rows,this.users=r,e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](0),console.log(e.t0);case 12:return e.prev=12,this.loading=!1,e.finish(12);case 15:case"end":return e.stop()}}),e,this,[[0,9,12,15]])})));function t(){return e.apply(this,arguments)}return t}(),getCustomers:function(){var e=Object(a["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,this.loading=!0,e.next=4,i["b"].post("/notify/customer");case 4:t=e.sent,r=t.data.rows,this.customers=r,e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](0),console.log(e.t0);case 12:return e.prev=12,this.loading=!1,e.finish(12);case 15:case"end":return e.stop()}}),e,this,[[0,9,12,15]])})));function t(){return e.apply(this,arguments)}return t}(),filterOption:function(e,t){return t.componentOptions.children[0].text.toLowerCase().indexOf(e.toLowerCase())>=0}}},u=o,c=r("2877"),l=Object(c["a"])(u,s,n,!1,null,"1dfa843f",null);t["default"]=l.exports}}]);
Copyright ©2k19 -
Hexid
|
Tex7ure