/
home
/
henzagold
/
adminold
/
export
/
js
/
File Upload :
llllll
Current File: //home/henzagold/adminold/export/js/chunk-2d22891e.3fc8c15f.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22891e"],{da6a:function(t,e,r){"use strict";r.r(e);r("6762"),r("2fdb"),r("7f7f");var a=function(){var t=this,e=t._self._c;return e("vx-card",[e("a-spin",{attrs:{spinning:t.loading}},[e("div",{staticClass:"grid gap-4 grid-cols-1 md:grid-cols-3"},[e("a-form-item",{attrs:{label:"نوع نمایش"}},[e("a-select",{staticClass:"w-full",on:{change:t.getData},model:{value:t.mode,callback:function(e){t.mode=e},expression:"mode"}},[e("a-select-option",{attrs:{value:"title"}},[t._v("\n عنوان مسیر\n ")]),e("a-select-option",{attrs:{value:"customer/all"}},[t._v("\n تمام مشتریان\n ")]),e("a-select-option",{attrs:{value:"customer/id"}},[t._v("\n یک مشتری\n ")])],1)],1),"customer/id"===t.mode?e("a-form-item",{attrs:{label:"مشتری"}},[e("a-select",{staticClass:"w-full",attrs:{"show-search":"","filter-option":t.filterOption},on:{change:t.getData},model:{value:t.customer,callback:function(e){t.customer=e},expression:"customer"}},t._l(t.customer_list,(function(r){return e("a-select-option",{key:r.id,attrs:{value:r.id}},[t._v("\n "+t._s(r.name)+"\n ")])})),1)],1):t._e(),"customer/id"===t.mode?e("a-form-item",{staticClass:"flex flex-col justify-end"},[e("a-input",{attrs:{disabled:""}},[e("div",{attrs:{slot:"prefix"},slot:"prefix"},[t._v("آخرین بازدید:")]),e("div",{attrs:{slot:"suffix"},slot:"suffix"},[t._v(t._s(this.lastSeen.ago?this.lastSeen.ago:""))])])],1):t._e()],1),"customer/id"===t.mode?e("a-form",{attrs:{form:t.formDate}},[e("div",{staticClass:"grid gap-4 grid-cols-1 md:grid-cols-3 mb-5"},[e("div",[e("DateInput",{attrs:{field:"start_at",displayFormat:"jYYYY/jMM/jDD",format:"YYYY-MM-DD",label:"تاریخ شروع",options:{rules:[{required:!1,message:"تاریخ شروع را وارد نمایید"}]}}})],1),e("div",[e("DateInput",{attrs:{field:"end_at",displayFormat:"jYYYY/jMM/jDD",format:"YYYY-MM-DD",label:"تاریخ پایان",options:{rules:[{required:!1,message:"تاریخ پایان را وارد نمایید"}]}}})],1),e("div",{staticClass:"flex justify-start items-center"},[e("vs-button",{staticClass:"mr-4 py-2 mt-3",on:{click:t.handleSubmit}},[t._v("جستجو")])],1)])]):t._e(),e("a-table",{attrs:{columns:t.cols,"data-source":t.dataSource,bordered:""},scopedSlots:t._u([{key:"row",fn:function(r,a,n){return e("div",{},[t._v(t._s(n+1))])}},{key:"product",fn:function(r,a,n){return e("div",{},[t._v(t._s(a.title&&a.title.includes("تک-محصول")&&a.product.title?a.product.title:null))])}}])})],1)],1)},n=[],s=(r("96cf"),r("1da1")),o=r("bb36"),i=r("e133"),c={name:"index",data:function(){return{dataSource:[],customer_list:[],mode:"title",customer:null,loading:!1,formDate:this.$form.createForm(this,{name:"coordinated"}),lastSeen:[]}},components:{DateInput:i["a"]},computed:{cols:function(){var t=[{title:"ردیف",dataIndex:"time",key:"time",scopedSlots:{customRender:"row"}}];return"customer/all"!==this.mode?t.push({title:"عنوان",dataIndex:"title",key:"title"}):t.push({title:"مشتری",dataIndex:"customer",key:"customer",children:[{title:"شناسه",dataIndex:"customer.id",key:"customer.id"},{title:"نام",dataIndex:"customer.name",key:"customer.name"},{title:"موبایل",dataIndex:"customer.mobile",key:"customer.mobile"}]}),t.push({title:"زمان",dataIndex:"time",key:"time"}),t.push({title:"نام محصول",dataIndex:"title",key:"title",scopedSlots:{customRender:"product"}}),t}},methods:{handleSubmit:function(){var t=this;this.formDate.validateFields(function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(r,a){var n,s,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t.loading=!0,n="customer/id"!==t.mode?"log/".concat(t.mode):t.customer?"log/customer/".concat(t.customer):void 0,e.next=5,o["b"].post(n,a);case 5:s=e.sent,i=s.data,t.dataSource=i,e.next=14;break;case 10:e.prev=10,e.t0=e["catch"](0),console.log(e.t0),t.$ntSetError("خطا در دریافت اطلاعات");case 14:return e.prev=14,t.loading=!1,e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[0,10,14,17]])})));return function(t,r){return e.apply(this,arguments)}}())},filterOption:function(t,e){return e.componentOptions.children[0].text.toLowerCase().indexOf(t.toLowerCase())>=0},getData:function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(){var e,r,a,n,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,this.loading=!0,e="customer/id"!==this.mode?"log/".concat(this.mode):this.customer?"log/customer/".concat(this.customer):void 0,!e){t.next=16;break}return t.next=6,o["b"].post(e);case 6:if(r=t.sent,a=r.data,this.dataSource=a,console.log(a.map((function(t){return null!==t.product?t:null}))),"customer/id"!==this.mode){t.next=16;break}return t.next=13,o["b"].get("log/ago/".concat(this.customer));case 13:n=t.sent,s=n.data,this.lastSeen=s;case 16:t.next=22;break;case 18:t.prev=18,t.t0=t["catch"](0),console.log(t.t0),this.$ntSetError("خطا در دریافت اطلاعات");case 22:return t.prev=22,this.loading=!1,t.finish(22);case 25:case"end":return t.stop()}}),t,this,[[0,18,22,25]])})));function e(){return t.apply(this,arguments)}return e}(),getCustomerList:function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,this.loading=!0,t.next=4,o["b"].get("/log/list/customer");case 4:e=t.sent,r=e.data,this.customer_list=r,t.next=13;break;case 9:t.prev=9,t.t0=t["catch"](0),console.log(t.t0),this.$ntSetError("خطا در دریافت اطلاعات");case 13:return t.prev=13,this.loading=!1,t.finish(13);case 16:case"end":return t.stop()}}),t,this,[[0,9,13,16]])})));function e(){return t.apply(this,arguments)}return e}()},created:function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.getData();case 2:return t.next=4,this.getCustomerList();case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},u=c,l=r("2877"),d=Object(l["a"])(u,a,n,!1,null,"04da5ffc",null);e["default"]=d.exports}}]);
Copyright ©2k19 -
Hexid
|
Tex7ure