text: webpackJsonp([1],{"0T9L":function(t,e){},"0pOR":function(t,e){},"1e2O":function(t,e,r){t.exports=r.p+"img/flower-card.b11b0c2.jpeg"},"2WO5":function(t,e,r){t.exports=r.p+"img/ชา กาแฟ และโกโก้.c3a5ad5.jpeg"},"2lOS":function(t,e){},"2oNb":function(t,e,r){t.exports=r.p+"img/หัตถกรรม.474219e.jpeg"},"3+hF":function(t,e,r){t.exports=r.p+"img/login-logo.649db65.jpeg"},"34Nt":function(t,e,r){t.exports=r.p+"img/fruitree.4a08213.jpeg"},"3m5l":function(t,e){},"4BYA":function(t,e,r){t.exports=r.p+"img/content-1.0074234.jpeg"},"4uZN":function(t,e,r){t.exports=r.p+"img/corn-card.44809d5.jpeg"},"5HHC":function(t,e,r){t.exports=r.p+"img/flower-card-2.33493d6.jpeg"},"5S8a":function(t,e,r){t.exports=r.p+"img/พืชท้องถิ่น.2a53b31.jpeg"},"6seM":function(t,e,r){t.exports=r.p+"img/ปศุสัตว์ และประมงค์.25cb886.jpeg"},"7zck":function(t,e){},"8ZCl":function(t,e,r){t.exports=r.p+"img/ผัก.650141f.jpeg"},"9D+C":function(t,e,r){t.exports=r.p+"img/dryfood-card.cb244d2.jpeg"},"9iO8":function(t,e,r){t.exports=r.p+"img/flower-card-3.d1b1128.jpeg"},AIOO:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAADQAAAA0AF5Y8+UAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAIpQTFRF////AAD/RliVSVeSSFyQRlmTRleRSFmWR1qSSFmUR1mTR1iUSFqSR1qTR1mUR1mTSFiSR1iTR1iUR1mTR1qTRlmUR1mUR1qSR1qTRlmTR1mTRliTRlmTR1mTR1iTR1mTR1qTR1mTR1mTRlmTR1mTR1mTR1mTR1mTR1mUR1mTRlmTR1mTR1mTR1mTDzUfHgAAAC10Uk5TAAEdIycoLC42OVNdYG9wdnyChZCXmJ2iqLXCx9LV2+Dh4uPk5ebn8PL09vz+lXQN5AAAAJhJREFUKM910scSwjAMRdEbSCAU04LpmN6t//89VsnISfx2mrN5I4nEOC+1eGcSjLTG4NrB4dvBE4y/5bCf9Y4iIgF8cwA2DZgSgQ6QTmavOryBrBw0nIBRDMZN2NsFMLDWfkLoUmYVg20IaQWHEHbFHMiLYt1o9WxvJfKIwT0GtwDUoa4KvD7tRYHTz3BWYFDvUy3RO5P8AZLpTyodVpEmAAAAAElFTkSuQmCC"},BkM8:function(t,e,r){t.exports=r.p+"img/slider2.b3a6509.jpg"},"DM+Z":function(t,e,r){t.exports=r.p+"img/deal1.34dd409.jpg"},DPYr:function(t,e,r){t.exports=r.p+"img/dried.72ef03e.jpeg"},DkYy:function(t,e,r){t.exports=r.p+"img/content.1ca1ad2.jpeg"},EYnv:function(t,e){},GTGI:function(t,e,r){t.exports=r.p+"img/ผักและสมุนไพร.d5de866.jpeg"},IX1A:function(t,e,r){t.exports=r.p+"img/deal4.4bb1400.jpg"},K9np:function(t,e,r){t.exports=r.p+"img/fruit.8a698a2.jpeg"},L9eN:function(t,e,r){t.exports=r.p+"img/fruit-3.619ad35.jpeg"},LRJd:function(t,e,r){t.exports=r.p+"img/ผลไม้.8a698a2.jpeg"},LaW6:function(t,e,r){t.exports=r.p+"img/vega-card-2.a051bc9.jpeg"},MKGl:function(t,e,r){t.exports=r.p+"img/vega-card.2468c28.jpeg"},N9tS:function(t,e,r){t.exports=r.p+"img/localplant.fc03c0d.jpeg"},NHnr:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=r("7+uW"),o=r("3EgV"),i=r.n(o);r("7zck"),r("Ui3i");a.default.use(i.a);var s=new i.a({theme:{themes:{light:{primary:"#2D3753",secondary:"#2D3753",accent:"#3AE3D6",error:"#f44336",info:"#074d66",success:"#7a904a",warning:"#f78012"}}}}),n={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("router-view")],1)},staticRenderFns:[]},l=r("VU/8")({name:"App"},n,!1,null,null,null).exports,c=r("FMNc"),d=r.n(c),u=r("/ocq"),m=r("mtWM"),p=r.n(m),v={data:function(){return{newsPage:1,page:1,sugProductPage:1,perPageNews:8,perPage:3,slideShowImg:[],contentsData:[],newsContent:[],newsProduct:[],suggestProduct:[],items:[{title:"Click Me"},{title:"Click Me"},{title:"Click Me"},{title:"Click Me 2"}],argiItems:[],activeBtn:1,colors:["indigo","warning","pink darken-2","red lighten-1","deep-purple accent-4"],slides:["First","Second","Third","Fourth","Fifth"]}},computed:{visiblePages:function(){return this.contentsData.slice((this.page-1)*this.perPage,this.page*this.perPage)},visibleNewsPages:function(){return this.newsContent.slice((this.newsPage-1)*this.perPage,this.newsPage*this.perPage)},visibleNewsProductPages:function(){return this.suggestProduct.slice((this.sugProductPage-1)*this.perPageNews,this.sugProductPage*this.perPageNews)}},methods:{productDetail:function(t){this.$router.push({name:"ProductDetail",params:{idProductOfMemberMk:t}})},getContentFirstPage:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/content/getContentFirstPage.php").then(function(e){e.data.content.length>0&&(console.log(e.data),t.contentsData=e.data.content,t.contentsData=t.contentsData.filter(function(t,e){return"แนะนำผลผลิต"===t.contentTypeTitle&&"1"===t.contentPublish}),t.contentsData.map(function(t){return t.contentImg="https://farmtd.hrdi.or.th/farmdd/admin/upload/"+t.contentImg}),t.contentsData.reverse(),console.log("getContentFirstPage",t.contentsData))}).catch(function(t){console.log(t)})},getContent:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/content/getContent.php").then(function(e){e.data.content.length>0&&(t.newsContent=e.data.content.filter(function(t){return"ข่าวประชาสัมพันธ์"===t.contentTypeTitle&&"1"===t.contentPublish})),t.newsContent.map(function(t,e){t.contentImg="https://farmtd.hrdi.or.th/farmdd/admin/upload/"+t.contentImg}),t.newsContent.reverse(),console.log("newsContent",t.newsContent)}).catch(function(t){console.log(t)})},getTypeOfArgi:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getAllTypeOfArgiTD.php").then(function(e){e.data.typeOfArgi.length>0&&(t.argiItems=e.data.typeOfArgi,t.argiItems=t.argiItems.filter(function(t,e){return null!==t.nameTypeOfArgi_MK}),console.log("getAllTypeOfArgiTD",t.argiItems))}).catch(function(t){console.log(t)})},getNewProduct:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/product/getNewProduct.php").then(function(e){0!==e.data.productMk&&(t.newsProduct=e.data.productMk,console.log("newsProduct",t.newsProduct))}).catch(function(t){console.log(t)})},getSuggestProduct:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/product/getSuggestProduct.php").then(function(e){0!==e.data.suggestProduct&&(t.suggestProduct=e.data.suggestProduct,console.log("suggestProduct",t.suggestProduct))}).catch(function(t){console.log(t)})},getSlideShowImg:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/slideshow/getAllSlideShow.php").then(function(e){t.slideShowImg=e.data.slideShowImg}).catch(function(t){console.log(t)})}},mounted:function(){this.getContent(),this.getContentFirstPage(),this.getTypeOfArgi(),this.getNewProduct(),this.getSuggestProduct(),this.getSlideShowImg()}},h={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("v-carousel",{attrs:{cycle:""}},t._l(t.slideShowImg,function(t,e){return a("v-carousel-item",{key:e,attrs:{src:t.imgTitle,"reverse-transition":"fade-transition",transition:"fade-transition"}})}),1),t._v(" "),a("div",{staticClass:"light-green lighten-5 pa-5"},[a("v-container",[a("v-row",{attrs:{"no-gutters":""}},[a("v-col",{attrs:{cols:12}},[a("v-card-text",{attrs:{tile:"",outlined:""}},[a("v-card-title",[a("h3",[t._v("สินค้าใหม่")])]),t._v(" "),a("v-divider"),t._v(" "),a("div",{staticClass:"row"},t._l(t.newsProduct,function(e){return a("v-flex",{key:e.idProductOfMemberMk,staticClass:"lg5-custom pa-3",attrs:{md3:""}},[a("v-hover",{attrs:{"open-delay":"200"},scopedSlots:t._u([{key:"default",fn:function(r){var o=r.hover;return[a("v-card",{attrs:{elevation:o?16:2,height:"100%"}},[a("v-img",{staticClass:"white--text align",attrs:{src:e.titleImg,height:"200px"}}),t._v(" "),a("v-card-text",[a("v-row",{attrs:{justify:"center"}},[a("h4",{staticClass:"text-center grey--text text--darken-4"},[t._v(" "+t._s(e.nameArgi))])])],1),t._v(" "),a("div",{staticClass:"text-center"},[a("v-btn",{staticClass:"ma-2",attrs:{outlined:"",color:"info"},on:{click:function(r){return t.productDetail(e.idProductOfMemberMk)}}},[t._v("\n                        ดูรายละเอียด\n                      ")])],1)],1)]}}],null,!0)})],1)}),1)],1)],1)],1)],1)],1),t._v(" "),a("div",[a("v-container",[a("v-row",{attrs:{"no-gutters":""}},[a("v-col",{attrs:{cols:12}},[a("v-card-text",{attrs:{tile:"",outlined:""}},[a("v-card-title",[a("h3",[t._v("สินค้าแนะนำ")])]),t._v(" "),a("v-divider"),t._v(" "),a("div",{staticClass:"row"},t._l(t.visibleNewsProductPages,function(e){return a("v-flex",{key:e.idProductOfMemberMk,staticClass:"lg5-custom pa-3",attrs:{md3:""}},[a("v-hover",{attrs:{"open-delay":"200"},scopedSlots:t._u([{key:"default",fn:function(r){var o=r.hover;return[a("v-card",{attrs:{elevation:o?16:2,height:"100%"}},[a("v-img",{staticClass:"white--text align",attrs:{src:e.titleImg,height:"200px"}}),t._v(" "),a("v-card-text",[a("v-row",{attrs:{justify:"center"}},[a("h4",{staticClass:"text-center grey--text text--darken-4"},[t._v(" "+t._s(e.nameArgi))])])],1),t._v(" "),a("div",{staticClass:"text-center"},[a("v-btn",{staticClass:"ma-2",attrs:{outlined:"",color:"info"},on:{click:function(r){return t.productDetail(e.idProductOfMemberMk)}}},[t._v("\n                        ดูรายละเอียด\n                      ")])],1)],1)]}}],null,!0)})],1)}),1)],1)],1)],1),t._v(" "),a("div",{staticClass:"text-center mb-3"},[a("v-pagination",{attrs:{length:Math.ceil(t.suggestProduct.length/t.perPageNews)},model:{value:t.sugProductPage,callback:function(e){t.sugProductPage=e},expression:"sugProductPage"}})],1)],1)],1),t._v(" "),a("div",{staticClass:"light-green lighten-5 pa-5 mt-5"},[a("v-container",[a("v-row",{attrs:{"no-gutters":""}},[a("v-col",{attrs:{cols:12}},[a("v-card-text",{attrs:{tile:"",outlined:""}},[a("v-card-title",[a("h3",[t._v("หมวดสินค้าหลัก")])]),t._v(" "),a("v-divider"),t._v(" "),a("div",{staticClass:"row"},t._l(t.argiItems,function(e,o){return a("v-flex",{key:o,staticClass:"lg5-custom pa-3",attrs:{md4:""}},[a("v-hover",{attrs:{"open-delay":"200"},scopedSlots:t._u([{key:"default",fn:function(o){var i=o.hover;return[a("v-card",{attrs:{elevation:i?16:2}},[a("v-img",{staticClass:"white--text align",attrs:{src:r("jBLA")("./"+e.nameTypeOfArgi_MK+".jpeg"),height:"200px"}}),t._v(" "),a("v-card-text",[a("v-row",{attrs:{justify:"center"}},[a("h2",{staticClass:"green--text"},[t._v(" "+t._s(e.nameTypeOfArgi_MK))])])],1),t._v(" "),a("div",{staticClass:"text-center"},[a("v-btn",{staticClass:"ma-2",attrs:{to:{name:"TypeList",params:{idTypeOfArgi:e.idTypeOfArgi,nameTypeOfArgi:e.nameTypeOfArgi_MK}},outlined:"",color:"info"}},[t._v("\n                        ดูเพิ่มเติม\n                      ")])],1)],1)]}}],null,!0)})],1)}),1)],1)],1)],1)],1)],1),t._v(" "),a("v-container",[a("v-row",{attrs:{"no-gutters":""}},[a("v-col",{attrs:{cols:12}},[a("v-card-text",{attrs:{tile:"",outlined:""}},[a("v-card-title",[a("h3",[t._v("ข่าวประชาสัมพันธ์")])]),t._v(" "),a("v-divider"),t._v(" "),a("div",{staticClass:"row"},t._l(t.visibleNewsPages,function(e){return a("v-flex",{key:e.contentId,staticClass:"lg5-custom pa-3",attrs:{md4:""}},[a("v-hover",{attrs:{"open-delay":"200"},scopedSlots:t._u([{key:"default",fn:function(r){var o=r.hover;return[a("v-card",{attrs:{elevation:o?16:2,height:"100%"}},[a("v-img",{staticClass:"white--text align",attrs:{src:e.contentImg,height:"200px"}}),t._v(" "),a("v-card-text",[a("v-row",{attrs:{justify:"center"}},[a("h4",{staticClass:"text-center grey--text text--darken-4"},[t._v(" "+t._s(e.contentTitle))])])],1),t._v(" "),a("div",{staticClass:"text-center"},[a("v-btn",{staticClass:"ma-2",attrs:{to:{name:"Post",params:{id:e.contentId}},outlined:"",color:"info"}},[t._v("\n                      อ่านเพิ่มเติม\n                    ")])],1)],1)]}}],null,!0)})],1)}),1)],1)],1)],1)],1),t._v(" "),a("div",{staticClass:"text-center mb-3"},[a("v-pagination",{attrs:{length:Math.ceil(t.newsContent.length/t.perPage)},model:{value:t.newsPage,callback:function(e){t.newsPage=e},expression:"newsPage"}})],1),t._v(" "),a("div",{staticClass:"light-green lighten-5 pa-5 mt-5"},[a("v-container",[a("v-row",{attrs:{"no-gutters":""}},[a("v-col",{attrs:{cols:12}},[a("v-card-text",{attrs:{tile:"",outlined:""}},[a("v-card-title",[a("h3",[t._v("แนะนำผลผลิต")])]),t._v(" "),a("v-divider"),t._v(" "),a("div",{staticClass:"row"},t._l(t.visiblePages,function(e){return a("v-flex",{key:e.contentId,staticClass:"lg5-custom pa-3",attrs:{md4:""}},[a("v-hover",{attrs:{"open-delay":"200"},scopedSlots:t._u([{key:"default",fn:function(r){var o=r.hover;return[a("v-card",{attrs:{elevation:o?16:2,height:"100%"}},[a("v-img",{staticClass:"white--text align",attrs:{src:e.contentImg,height:"200px"}}),t._v(" "),a("v-card-text",[a("v-row",{attrs:{justify:"center"}},[a("h4",{staticClass:"text-center grey--text text--darken-4"},[t._v(" "+t._s(e.contentTitle))])])],1),t._v(" "),a("div",{staticClass:"text-center"},[a("v-btn",{staticClass:"ma-2",attrs:{to:{name:"Post",params:{id:e.contentId}},outlined:"",color:"info"}},[t._v("\n                        อ่านเพิ่มเติม\n                      ")])],1)],1)]}}],null,!0)})],1)}),1)],1)],1)],1)],1),t._v(" "),a("div",{staticClass:"text-center mb-3"},[a("v-pagination",{attrs:{length:Math.ceil(t.contentsData.length/t.perPage)},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)],1)],1)},staticRenderFns:[]};var f=r("VU/8")(v,h,!1,function(t){r("pon8")},null,null).exports,g=r("Gu7T"),b=r.n(g),_=r("bOdI"),y=r.n(_),x={data:function(){var t;return t={isLoading:!1,page:1,perPage:12,productName:"",baseUrl:"https://farmtd.hrdi.or.th/farmdd/admin/api/",productMk:[],cloneProductMk:[],countType:{first:0,second:0,third:0,fourth:0,fifth:0},typeItemsSelected:0,range:[0,1e3],select:"ตัวกรองการค้นหา",options:["ตัวกรองการค้นหา","ราคา: ต่ำ ถึง สูง","ราคา: สูง ถึง ต่ำ"],typeItems:[]},y()(t,"page",1),y()(t,"breadcrums",[{text:"แสดงสินค้าจากประเภทเกษตรกร",disabled:!1,href:"#"},{text:"ทั้งหมด",disabled:!1,href:"#"}]),y()(t,"month",[]),y()(t,"min",null),y()(t,"max",null),t},computed:{visibleContentPages:function(){return this.productMk.slice((this.page-1)*this.perPage,this.page*this.perPage)},checkProductSize:function(){if(0===this.productMk.length)return!0},filterProductsByRange:function(){var t=this;return console.log(working),this.productMk.filter(function(e){return e.priceBegin>0&&e.priceEnd<t.range?e:""})}},methods:{productDetail:function(t){this.$router.push({name:"ProductDetail",params:{idProductOfMemberMk:t}})},filterMonth:function(t){var e=this;console.log(this.month),this.productMk=[].concat(b()(this.cloneProductMk)),0===this.typeItemsSelected||"0"===this.typeItemsSelected?(t.map(function(t,r){e.productMk=e.productMk.filter(function(e){return e.monthOfProduct.split(",").sort().includes(t)})}),this.isLoading=!1):t.map(function(t,r){e.productMk=e.productMk.filter(function(r){return r.monthOfProduct.split(",").sort().includes(t)&&parseInt(r.idTypeOfSellerMk)===e.typeItemsSelected})}),console.log(this.productMk)},filterName:function(t){this.productMk=[].concat(b()(this.cloneProductMk)),this.productMk=this.productMk.filter(function(e){return t===e.nameArgi}),this.productMk=this.productMk.filter(function(e){return t===e.nameArgi})},filterRange:function(){var t=this;this.productMk=[].concat(b()(this.cloneProductMk)),console.log(this.typeItemsSelected),0===this.typeItemsSelected||"0"===this.typeItemsSelected?this.productMk=this.productMk.filter(function(e){if(e.idTypeOfSellerMk)return parseInt(e.priceBegin)>=t.min&&parseInt(e.priceEnd)<=t.max}):this.productMk=this.productMk.filter(function(e){if(e.idTypeOfSellerMk)return parseInt(e.priceBegin)>=t.min&&parseInt(e.priceEnd)<=t.max&&parseInt(e.idTypeOfSellerMk)===t.typeItemsSelected})},farmerFilter:function(t){switch(this.page=1,this.month=[],parseInt(t)){case 0:this.breadcrums[1].text="ทั้งหมด";break;case 1:this.breadcrums[1].text="เกษตรกรรายเดี่ยว";break;case 2:this.breadcrums[1].text="วิสาหกิจชุมชน";break;case 3:this.breadcrums[1].text="สหกรณ์";break;case 4:this.breadcrums[1].text="กลุ่มเกษตรกร";break;case 4:this.breadcrums[1].text="กลุ่มไม่เป็นทางการ"}if(this.select="ตัวกรองการค้นหา",this.min=0,this.mix=0,"0"===t)return this.productMk=[].concat(b()(this.cloneProductMk));this.productMk=[].concat(b()(this.cloneProductMk)),this.productMk=this.productMk.filter(function(e){return parseInt(e.idTypeOfSellerMk)===t})},sortByPrice:function(t){"ราคา: ต่ำ ถึง สูง"===t&&this.productMk.sort(function(t,e){return parseFloat(t.priceEnd)-parseFloat(e.priceEnd)}),"ราคา: สูง ถึง ต่ำ"===t&&this.productMk.sort(function(t,e){return parseFloat(e.priceEnd)-parseFloat(t.priceEnd)})},getAllProduct:function(){var t=this;this.isLoading=!0,p.a.get(this.baseUrl+"/product/getAllProduct.php").then(function(e){0!==e.data.productMk&&(e.data.productMk.reverse(),t.productMk=e.data.productMk,t.cloneProductMk=e.data.productMk,console.log("productMk",t.productMk),t.productMk.map(function(e,r){switch(e.idTypeOfSellerMk){case"1":console.log("True"),t.countType.first++;break;case"2":t.countType.second++;break;case"3":t.countType.third++;break;case"4":t.countType.fourth++;break;case"5":t.countType.fifth++}}),t.isLoading=!1,console.log("countType",t.countType))}).catch(function(t){console.log(t)})},getTypeOfSeller:function(){var t=this;p.a.get(this.baseUrl+"/member/getTypeOfSeller.php").then(function(e){0!==e.data.sellerType&&(t.typeItems=e.data.sellerType,t.typeItems.unshift({idTypeOfSellerMk:"0",nameTypeOfSeller:"แสดงทุกประเภท"}),console.log("typeItems",t.typeItems))}).catch(function(t){console.log(t)})}},mounted:function(){this.getAllProduct(),this.getTypeOfSeller()}},k={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("v-container",[r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-3 col-sm-3 col-xs-12"},[r("v-card",{attrs:{outlined:""}},[r("v-card-title",{staticClass:"green darken-1 white--text"},[t._v("ประเภทเกษตรกร")]),t._v(" "),r("v-divider"),t._v(" "),void 0,t._v(" "),r("v-list",[r("v-list-item-group",{attrs:{color:"primary"},on:{change:function(e){return t.farmerFilter(t.typeItemsSelected)}},model:{value:t.typeItemsSelected,callback:function(e){t.typeItemsSelected=e},expression:"typeItemsSelected"}},t._l(t.typeItems,function(e,a){return r("v-list-item",{key:a,attrs:{value:e.idTypeOfSellerMk}},[r("v-list-item-content",[r("v-list-item-title",{staticClass:"pa-3"},[r("v-row",{attrs:{cols:"12"}},[t._v("\n                      "+t._s(e.nameTypeOfSeller)),r("v-spacer"),t._v("\n                      "+t._s("เกษตรกรรายเดี่ยว"===e.nameTypeOfSeller?"("+t.countType.first+")":"วิสาหกิจชุมชน"===e.nameTypeOfSeller?"("+t.countType.second+")":"สหกรณ์"===e.nameTypeOfSeller?"("+t.countType.third+")":"กลุ่มเกษตรกร"===e.nameTypeOfSeller?"("+t.countType.fourth+")":"กลุ่มไม่เป็นทางการ"===e.nameTypeOfSeller?"("+t.countType.fifth+")":"")+"\n                    ")],1)],1)],1)],1)}),1)],1),t._v(" "),r("v-divider"),t._v(" "),r("v-card-title",{staticClass:"green darken-1 white--text"},[t._v("เงื่อนไขการค้นหา")]),t._v(" "),r("v-card-title",[t._v("ช่วงราคา")]),t._v(" "),r("v-row",{staticClass:"pa-2",attrs:{dense:""}},[r("v-col",{attrs:{cols:"12",sm:"5"}},[r("v-text-field",{attrs:{label:"ขั้นต่ำ",outlined:"",dense:""},on:{keyup:function(e){return t.filterRange()}},model:{value:t.min,callback:function(e){t.min=e},expression:"min"}})],1),t._v(" "),r("v-col",{attrs:{cols:"12",sm:"2"}},[r("p",{staticClass:"pt-2 text-center"},[t._v("ถึง")])]),t._v(" "),r("v-col",{attrs:{cols:"12",sm:"5"}},[r("v-text-field",{attrs:{label:"สูงสุด",outlined:"",dense:""},on:{keyup:function(e){return t.filterRange()}},model:{value:t.max,callback:function(e){t.max=e},expression:"max"}})],1)],1),t._v(" "),r("v-container",{staticClass:"pt-0",attrs:{fluid:""}}),t._v(" "),r("v-divider"),t._v(" "),r("v-card-title",{staticClass:"pb-0"},[t._v("ค้นหาสินค้าในเดือน")]),t._v(" "),r("v-container",{staticClass:"pt-0 pa-4",attrs:{fluid:""}},[r("v-row",[r("v-col",{attrs:{cols:"12",sm:"4",md:"4"}},[r("v-checkbox",{attrs:{label:"ม.ค.",value:"1","hide-details":""},on:{change:function(e){return t.filterMonth(t.month)}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}}),t._v(" "),r("v-checkbox",{attrs:{label:"เม.ย.",value:"4","hide-details":""},on:{change:function(e){return t.filterMonth(t.month)}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),r("v-col",{attrs:{cols:"12",sm:"4",md:"4"}},[r("v-checkbox",{attrs:{label:"ก.พ.",value:"2","hide-details":""},on:{change:function(e){return t.filterMonth(t.month)}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}}),t._v(" "),r("v-checkbox",{attrs:{label:"พ.ค.",value:"5","hide-details":""},on:{change:function(e){return t.filterMonth(t.month)}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),r("v-col",{attrs:{cols:"12",sm:"4",md:"4"}},[r("v-checkbox",{attrs:{label:"มี.ค.",value:"3","hide-details":""},on:{change:function(e){return t.filterMonth(t.month)}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}}),t._v(" "),r("v-checkbox",{attrs:{label:"มิ.ย.",value:"6","hide-details":""},on:{change:function(e){return t.filterMonth(t.month)}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),r("v-col",{attrs:{cols:"12",sm:"4",md:"4"}},[r("v-checkbox",{attrs:{label:"ก.ค.",value:"7","hide-details":""},on:{change:function(e){return t.filterMonth(t.month)}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}}),t._v(" "),r("v-checkbox",{attrs:{label:"ต.ค.",value:"10","hide-details":""},on:{change:function(e){return t.filterMonth(t.month)}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),r("v-col",{attrs:{cols:"12",sm:"4",md:"4"}},[r("v-checkbox",{attrs:{label:"ส.ค.",value:"8",color:"indigo","hide-details":""},on:{change:function(e){return t.filterMonth(t.month)}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}}),t._v(" "),r("v-checkbox",{attrs:{label:"พ.ย.",value:"11","hide-details":""},on:{change:function(e){return t.filterMonth(t.month)}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),r("v-col",{attrs:{cols:"12",sm:"4",md:"4"}},[r("v-checkbox",{attrs:{label:"ก.ย.",value:"9","hide-details":""},on:{change:function(e){return t.filterMonth(t.month)}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}}),t._v(" "),r("v-checkbox",{attrs:{label:"ธ.ค.",value:"12","hide-details":""},on:{change:function(e){return t.filterMonth(t.month)}},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1)],1)],1)],2)],1),t._v(" "),r("div",{staticClass:"col-md-9 col-sm-9 col-xs-12"},[r("v-row",{attrs:{dense:""}},[r("v-col",{staticClass:"pl-6 pt-6",attrs:{cols:"12",sm:"8"}}),t._v(" "),r("v-col",{attrs:{cols:"12",sm:"4"}},[r("v-text-field",{attrs:{label:"ค้นหาสินค้าจากชื่อ",dense:""},on:{keypress:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.show(e)}},scopedSlots:t._u([{key:"append",fn:function(){return[r("v-btn",{staticClass:"ma-0",attrs:{depressed:"",tile:"",color:"primary"},on:{click:function(e){return t.filterName(t.productName)}}},[r("v-icon",[t._v("mdi-magnify")])],1)]},proxy:!0}]),model:{value:t.productName,callback:function(e){t.productName=e},expression:"productName"}}),t._v(" "),r("v-select",{staticClass:"pa-0",staticStyle:{"margin-bottom":"-20px"},attrs:{items:t.options,outlined:"",dense:""},on:{change:function(e){return t.sortByPrice(t.select)}},model:{value:t.select,callback:function(e){t.select=e},expression:"select"}})],1)],1),t._v(" "),r("v-breadcrumbs",{staticClass:"pb-1 body-1 font-weight-bold",attrs:{items:t.breadcrums}}),t._v(" "),r("v-divider"),t._v(" "),r("div",{staticClass:"row text-center"},[t.checkProductSize&&!t.isLoading?r("v-row",{staticClass:"pa-5",attrs:{justify:"center"}},[r("h1",[t._v("ไม่พบข้อมูล...")])]):t._e(),t._v(" "),t.isLoading?r("v-row",{staticClass:"pa-5",attrs:{justify:"center"}},[r("v-progress-circular",{attrs:{size:200,color:"primary",indeterminate:""}})],1):t._e(),t._v(" "),t._l(t.visibleContentPages,function(e,a){return r("div",{key:a,staticClass:"col-md-4 col-sm-6 col-xs-12"},[r("v-hover",{scopedSlots:t._u([{key:"default",fn:function(a){var o=a.hover;return[r("v-card",{staticClass:"mx-auto",attrs:{color:"grey lighten-4","max-width":"600",height:"100%"}},[r("v-img",{staticClass:"white--text align-end",attrs:{"aspect-ratio":16/9,height:"200px",src:e.titleImg,"lazy-src":e.titleImg},scopedSlots:t._u([{key:"placeholder",fn:function(){return[r("v-row",{staticClass:"fill-height ma-0",attrs:{align:"center",justify:"center"}},[r("v-progress-circular",{attrs:{indeterminate:"",color:"grey lighten-5"}})],1)]},proxy:!0}],null,!0)},[t._v(" "),r("v-expand-transition",[o?r("div",{staticClass:"d-flex transition-fast-in-fast-out white darken-4 v-card--reveal display-3",staticStyle:{height:"100%"}},[o?r("v-btn",{attrs:{color:"primary",outlined:""},on:{click:function(r){return t.productDetail(e.idProductOfMemberMk)}}},[t._v("รายละเอียด")]):t._e()],1):t._e()])],1),t._v(" "),r("v-card-text",{staticClass:"pa-0"},[r("v-row",{attrs:{cols:"12",justify:"center"}},[r("v-card-title",{staticClass:"indigo--text text--darken-4 font-weight-black"},[t._v("\n                      "+t._s(e.nameArgi)+"\n                    ")])],1),t._v(" "),r("v-card-subtitle",{staticClass:"font-weight-bold pt-0"},[r("h4",[t._v(t._s(e.groupName))])]),t._v(" "),r("v-row",{attrs:{justify:"center"}},[r("v-chip",{staticClass:"body-2 green white--text mb-1"},[r("h5",[t._v(t._s(e.nameTypeOfArgi))])])],1),t._v(" "),r("v-row",{attrs:{justify:"center"}},[r("span",{staticClass:"body-1 font-weight-black pa-1"},[t._v(t._s(e.priceBegin===e.priceEnd?"฿"+e.priceEnd:"฿"+e.priceBegin+" - ฿"+e.priceEnd)+" / "+t._s(e.nameUnit))])])],1)],1)]}}],null,!0)})],1)})],2),t._v(" "),r("div",{staticClass:"text-center mt-12"},[r("v-pagination",{attrs:{length:Math.ceil(t.productMk.length/t.perPage)},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)],1)])])],1)},staticRenderFns:[]};var w=r("VU/8")(x,k,!1,function(t){r("ZHaB")},null,null).exports,F={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("v-container",[a("div",{staticClass:"row"},[a("div",{staticClass:"col-md-5 col-sm-5 col-xs-12"},[a("v-carousel",[a("v-carousel-item",{attrs:{src:r("fRiH")}}),t._v(" "),a("v-carousel-item",{attrs:{src:r("BkM8")}}),t._v(" "),a("v-carousel-item",{attrs:{src:r("uAlE")}}),t._v(" "),a("v-carousel-item",{attrs:{src:r("NSMX")}})],1)],1),t._v(" "),a("div",{staticClass:"col-md-7 col-sm-7 col-xs-12"},[a("v-breadcrumbs",{staticClass:"pb-0",attrs:{items:t.breadcrums}}),t._v(" "),a("div",{staticClass:"pl-6"},[a("p",{staticClass:"display-1 mb-0"},[t._v("Modern Black T-Shirt")]),t._v(" "),a("v-card-actions",{staticClass:"pa-0"},[a("p",{staticClass:"headline font-weight-light pt-3"},[t._v("$65.00 "),a("del",{staticClass:"subtitle-1 font-weight-thin"},[t._v("$80.00")])]),t._v(" "),a("v-spacer"),t._v(" "),a("v-rating",{attrs:{"background-color":"warning lighten-3",color:"warning",dense:""},model:{value:t.rating,callback:function(e){t.rating=e},expression:"rating"}}),t._v(" "),a("span",{staticClass:"body-2\tfont-weight-thin"},[t._v(" 25 REVIEWS")])],1),t._v(" "),a("p",{staticClass:"subtitle-1 font-weight-thin"},[t._v("\n            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nisl tincidunt eget nullam non. Tincidunt arcu non sodales neque sodales ut etiam. Lectus arcu bibendum at varius vel pharetra. Morbi tristique senectus et netus et malesuada.\n          ")]),t._v(" "),a("p",{staticClass:"title"},[t._v("SIZE")]),t._v(" "),a("v-radio-group",{attrs:{row:""},model:{value:t.row,callback:function(e){t.row=e},expression:"row"}},[a("v-radio",{attrs:{label:"XS",value:"XS"}}),t._v(" "),a("v-radio",{attrs:{label:"S",value:"s"}}),t._v(" "),a("v-radio",{attrs:{label:"M",value:"m"}}),t._v(" "),a("v-radio",{attrs:{label:"L",value:"l"}}),t._v(" "),a("v-radio",{attrs:{label:"XL",value:"xl"}})],1),t._v(" "),a("p",{staticClass:"title"},[t._v("ITEMS")]),t._v(" "),a("v-text-field",{staticStyle:{width:"100px"},attrs:{outlined:"",value:1,dense:""}}),t._v(" "),a("v-btn",{staticClass:"primary white--text",attrs:{outlined:"",tile:"",dense:""}},[a("v-icon",[t._v("mdi-cart")]),t._v(" ADD TO CART")],1),t._v(" "),a("v-btn",{staticClass:"ml-4",attrs:{outlined:"",tile:""}},[t._v("ADD TO WISHLIST")])],1)],1)]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-sm-12 col-xs-12 col-md-12"},[a("v-tabs",[a("v-tab",[t._v("Description")]),t._v(" "),a("v-tab",[t._v("Materials")]),t._v(" "),a("v-tab",[t._v("REVIEWS")]),t._v(" "),a("v-tab-item",[a("p",{staticClass:"pt-10 subtitle-1 font-weight-thin"},[t._v("\n              Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et\n              dolore magna aliqua. Ultricies mi eget mauris pharetra et. Vel pretium lectus quam id leo in vitae turpis\n              massa. Orci dapibus ultrices in iaculis nunc. At auctor urna nunc id cursus metus. Integer feugiat\n              scelerisque varius morbi enim nunc. Aliquam sem et tortor consequat id porta nibh venenatis cras.\n              Pellentesque pulvinar pellentesque habitant morbi tristique senectus et netus. Malesuada nunc vel risus\n              commodo viverra maecenas. Neque volutpat ac tincidunt vitae semper quis.\n            ")])]),t._v(" "),a("v-tab-item",[a("p",{staticClass:"pt-10 subtitle-1 font-weight-thin"},[t._v("\n              Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et\n              dolore magna aliqua. Ultricies mi eget mauris pharetra et. Vel pretium lectus quam id leo in vitae turpis\n              massa. Orci dapibus ultrices in iaculis nunc. At auctor urna nunc id cursus metus. Integer feugiat\n              scelerisque varius morbi enim nunc. Aliquam sem et tortor consequat id porta nibh venenatis cras.\n              Pellentesque pulvinar pellentesque habitant morbi tristique senectus et netus. Malesuada nunc vel risus\n              commodo viverra maecenas. Neque volutpat ac tincidunt vitae semper quis.\n            ")])]),t._v(" "),a("v-tab-item",[a("v-list",{attrs:{"three-line":"true",avatar:"true"}},[a("v-list-item-group",{attrs:{color:"primary"},model:{value:t.item,callback:function(e){t.item=e},expression:"item"}},t._l(t.items,function(e,r){return a("v-list-item",{key:r,attrs:{inactive:"true"}},[a("v-list-item-avatar",[a("v-img",{attrs:{src:e.avatar}})],1),t._v(" "),a("v-list-item-content",[a("v-list-item-title",{domProps:{innerHTML:t._s(e.title)}}),a("v-rating",{attrs:{"background-color":"warning lighten-3",color:"warning",dense:""},model:{value:t.rating,callback:function(e){t.rating=e},expression:"rating"}}),t._v(" "),a("v-list-item-subtitle",{domProps:{innerHTML:t._s(e.subtitle)}})],1)],1)}),1)],1)],1)],1),t._v(" "),a("v-card-text",{staticClass:"pa-0 pt-4",attrs:{tile:"",outlined:""}},[a("p",{staticClass:"subtitle-1 font-weight-light pt-3 text-center"},[t._v("YOU MIGHT ALSO LIKE")]),t._v(" "),a("v-divider"),t._v(" "),a("div",{staticClass:"row text-center"},[a("div",{staticClass:"col-md-2 col-sm-4 col-xs-12 text-center"},[a("v-hover",{attrs:{"open-delay":"200"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.hover;return[a("v-card",{attrs:{elevation:o?16:2}},[a("v-img",{staticClass:"white--text align-end",attrs:{height:"200px",src:r("DM+Z")}},[a("v-card-title",[t._v("Bags & Purses ")])],1),t._v(" "),a("v-card-text",{staticClass:"text--primary text-center"},[a("div",[t._v("Upto 60% + Extra 10%")]),t._v(" "),a("div",[t._v("Baggit, Zara, Fossil")])]),t._v(" "),a("div",{staticClass:"text-center"},[a("v-btn",{staticClass:"ma-2",attrs:{outlined:"",color:"info"}},[t._v("\n                      Explore\n                    ")])],1)],1)]}}])})],1),t._v(" "),a("div",{staticClass:"col-md-2 col-sm-4 col-xs-12 text-center"},[a("v-hover",{attrs:{"open-delay":"200"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.hover;return[a("v-card",{attrs:{elevation:o?16:2}},[a("v-img",{staticClass:"white--text align-end",attrs:{height:"200px",src:r("uMNc")}},[a("v-card-title",[t._v("T-Shirt ")])],1),t._v(" "),a("v-card-text",{staticClass:"text--primary text-center"},[a("div",[t._v("Upto 50%")]),t._v(" "),a("div",[t._v("Zara, Selected, Celio")])]),t._v(" "),a("div",{staticClass:"text-center"},[a("v-btn",{staticClass:"ma-2",attrs:{outlined:"",color:"info"}},[t._v("\n                      Explore\n                    ")])],1)],1)]}}])})],1),t._v(" "),a("div",{staticClass:"col-md-2 col-sm-4 col-xs-12 text-center"},[a("v-hover",{attrs:{"open-delay":"200"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.hover;return[a("v-card",{attrs:{elevation:o?16:2}},[a("v-img",{staticClass:"white--text align-end",attrs:{height:"200px",src:r("kx0P")}},[a("v-card-title",[t._v("Jeans ")])],1),t._v(" "),a("v-card-text",{staticClass:"text--primary text-center"},[a("div",[t._v("Upto 60% + Extra 10%")]),t._v(" "),a("div",[t._v("Jack & Jones, Levis")])]),t._v(" "),a("div",{staticClass:"text-center"},[a("v-btn",{staticClass:"ma-2",attrs:{outlined:"",color:"info"}},[t._v("\n                      Explore\n                    ")])],1)],1)]}}])})],1),t._v(" "),a("div",{staticClass:"col-md-2 col-sm-4 col-xs-12 text-center"},[a("v-hover",{attrs:{"open-delay":"200"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.hover;return[a("v-card",{attrs:{elevation:o?16:2}},[a("v-img",{staticClass:"white--text align-end",attrs:{height:"200px",src:r("jYSa")}},[a("v-card-title",[t._v("Shirts ")])],1),t._v(" "),a("v-card-text",{staticClass:"text--primary text-center"},[a("div",[t._v("Upto 60% + Extra 10%")]),t._v(" "),a("div",[t._v("Nike, Adidas, Puma")])]),t._v(" "),a("div",{staticClass:"text-center"},[a("v-btn",{staticClass:"ma-2",attrs:{outlined:"",color:"info"}},[t._v("\n                      Explore\n                    ")])],1)],1)]}}])})],1),t._v(" "),a("div",{staticClass:"col-md-2 col-sm-4 col-xs-12 text-center"},[a("v-hover",{attrs:{"open-delay":"200"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.hover;return[a("v-card",{attrs:{elevation:o?16:2}},[a("v-img",{staticClass:"white--text align-end",attrs:{height:"200px",src:r("IX1A")}},[a("v-card-title",[t._v("Shoes ")])],1),t._v(" "),a("v-card-text",{staticClass:"text--primary text-center"},[a("div",[t._v("Upto 60% + Extra 10%")]),t._v(" "),a("div",[t._v("Nike, Adidas, Puma")])]),t._v(" "),a("div",{staticClass:"text-center"},[a("v-btn",{staticClass:"ma-2",attrs:{outlined:"",color:"info"}},[t._v("\n                      Explore\n                    ")])],1)],1)]}}])})],1),t._v(" "),a("div",{staticClass:"col-md-2 col-sm-4 col-xs-12 text-center"},[a("v-hover",{attrs:{"open-delay":"200"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.hover;return[a("v-card",{attrs:{elevation:o?16:2}},[a("v-img",{staticClass:"white--text align-end",attrs:{height:"200px",src:r("pqEl")}},[a("v-card-title",[t._v("Jackets ")])],1),t._v(" "),a("v-card-text",{staticClass:"text--primary text-center"},[a("div",[t._v("Upto 60% + Extra 10%")]),t._v(" "),a("div",[t._v("Nike, Adidas, Puma")])]),t._v(" "),a("div",{staticClass:"text-center"},[a("v-btn",{staticClass:"ma-2",attrs:{outlined:"",color:"info"}},[t._v("\n                      Explore\n                    ")])],1)],1)]}}])})],1)])],1)],1)])]),t._v(" "),a("v-card",{staticClass:"accent"},[a("v-container",[a("v-row",{attrs:{"no-gutters":""}},[a("v-col",{staticClass:"col-12 col-md-4 col-sm-12"},[a("v-row",[a("v-col",{staticClass:"col-12 col-sm-3 pr-4 hidden-sm-only",attrs:{align:"right"}},[a("v-icon",{staticClass:"display-2"},[t._v("mdi-truck")])],1),t._v(" "),a("v-col",{staticClass:"col-12 col-sm-9 pr-4"},[a("h3",{staticClass:"font-weight-light"},[t._v("FREE SHIPPING & RETURN")]),t._v(" "),a("p",{staticClass:"font-weight-thin"},[t._v("Free Shipping over $300")])])],1)],1),t._v(" "),a("v-col",{staticClass:"col-12 col-md-4 col-sm-12"},[a("v-row",[a("v-col",{staticClass:"col-12 col-sm-3 pr-4",attrs:{align:"right"}},[a("v-icon",{staticClass:"display-2"},[t._v("mdi-cash-usd")])],1),t._v(" "),a("v-col",{staticClass:"col-12 col-sm-9 pr-4"},[a("h3",{staticClass:"font-weight-light"},[t._v("MONEY BACK GUARANTEE")]),t._v(" "),a("p",{staticClass:"font-weight-thin"},[t._v("30 Days Money Back Guarantee")])])],1)],1),t._v(" "),a("v-col",{staticClass:"col-12 col-md-4 col-sm-12"},[a("v-row",[a("v-col",{staticClass:"col-12 col-sm-3 pr-4",attrs:{align:"right"}},[a("v-icon",{staticClass:"display-2"},[t._v("mdi-headset")])],1),t._v(" "),a("v-col",{staticClass:"col-12 col-sm-9 pr-4"},[a("h3",{staticClass:"font-weight-light"},[t._v("020-800-456-747")]),t._v(" "),a("p",{staticClass:"font-weight-thin"},[t._v("24/7 Available Support")])])],1)],1)],1)],1)],1)],1)},staticRenderFns:[]},C=r("VU/8")({data:function(){return{rating:4.5,breadcrums:[{text:"Home",disabled:!1,href:"breadcrumbs_home"},{text:"Clothing",disabled:!1,href:"breadcrumbs_clothing"},{text:"T-Shirts",disabled:!0,href:"breadcrumbs_shirts"}],item:5,items:[{avatar:"https://cdn.vuetifyjs.com/images/lists/1.jpg",title:"Lorem ipsum dolor?",subtitle:"<span class='text--primary'>Ali Connors</span> &mdash; Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nisl tincidunt eget nullam non. Tincidunt arcu non sodales neque sodales ut etiam. Lectus arcu bibendum at varius vel pharetra. Morbi tristique senectus et netus et malesuada.\n\n"},{avatar:"https://cdn.vuetifyjs.com/images/lists/2.jpg",title:'Lorem ipsum dolor <span class="grey--text text--lighten-1">4</span>',subtitle:"<span class='text--primary'>to Alex, Scott, Jennifer</span> &mdash; Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore"},{avatar:"https://cdn.vuetifyjs.com/images/lists/3.jpg",title:"Lorem ipsum dolor",subtitle:"<span class='text--primary'>Sandra Adams</span> &mdash; Lorem ipsum dolor sit amet, consectetur adipiscing elit"},{avatar:"https://cdn.vuetifyjs.com/images/lists/4.jpg",title:"Lorem ipsum dolor",subtitle:""},{avatar:"https://cdn.vuetifyjs.com/images/lists/5.jpg",title:"Lorem ipsum dolor",subtitle:"<span class='text--primary'>Britta Holt</span> &mdash; Lorem ipsum dolor sit amet, consectetur adipiscing elit"}]}}},F,!1,null,null,null).exports,A={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("v-container",[a("p",{staticClass:"display-3 font-weight-light\ttext-center pa-4"},[t._v("Read About Fashion")]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-md-4 col-sm-4 col-xs-12"},[a("v-card",{staticClass:"mx-auto",attrs:{"max-width":"400",outlined:"",tile:"",href:"/post"}},[a("v-img",{staticClass:"white--text align-end",attrs:{height:"400px",src:r("BkM8")}},[a("v-card-title",[t._v("Top 10 Fashion of the Week")])],1),t._v(" "),a("v-card-subtitle",{staticClass:"pb-0"},[t._v("Lorem ipsum")]),t._v(" "),a("v-card-text",{staticClass:"text--primary"},[a("div",[t._v("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nibh venenatis cras sed felis eget velit aliquet sagittis id. Enim praesent elementum facilisis leo vel fringilla est ullamcorper.\n\n              ")])]),t._v(" "),a("v-card-actions",[a("v-btn",{attrs:{color:"orange",text:""}},[t._v("\n                Read More\n              ")])],1)],1)],1),t._v(" "),a("div",{staticClass:"col-md-4 col-sm-3 col-xs-12"},[a("v-card",{staticClass:"mx-auto",attrs:{"max-width":"400",outlined:"",tile:"",href:"/post"}},[a("v-img",{staticClass:"white--text align-end",attrs:{height:"400px",src:r("uAlE")}},[a("v-card-title",[t._v("Best brands for fashion")])],1),t._v(" "),a("v-card-subtitle",{staticClass:"pb-0"},[t._v("Lorem ipsum")]),t._v(" "),a("v-card-text",{staticClass:"text--primary"},[a("div",[t._v("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nibh venenatis cras sed felis eget velit aliquet sagittis id. Enim praesent elementum facilisis leo vel fringilla est ullamcorper.\n\n              ")])]),t._v(" "),a("v-card-actions",[a("v-btn",{attrs:{color:"orange",text:""}},[t._v("\n                Read More\n              ")])],1)],1)],1),t._v(" "),a("div",{staticClass:"col-md-4 col-sm-3 col-xs-12"},[a("v-card",{staticClass:"mx-auto",attrs:{"max-width":"400",outlined:"",tile:"",href:"/post"}},[a("v-img",{staticClass:"white--text align-end",attrs:{height:"400px",src:r("fRiH")}},[a("v-card-title",[t._v("Fashion Tips & Tricks")])],1),t._v(" "),a("v-card-subtitle",{staticClass:"pb-0"},[t._v("Lorem ipsum")]),t._v(" "),a("v-card-text",{staticClass:"text--primary"},[a("div",[t._v("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nibh venenatis cras sed felis eget velit aliquet sagittis id. Enim praesent elementum facilisis leo vel fringilla est ullamcorper.\n\n              ")])]),t._v(" "),a("v-card-actions",[a("v-btn",{attrs:{color:"orange",text:""}},[t._v("\n                Read More\n              ")])],1)],1)],1)])])],1)},staticRenderFns:[]},T=r("VU/8")(null,A,!1,null,null,null).exports,O={data:function(){return{paramsId:0,error:{isError:!1,errorMsg:""},uri:"",marketName:"",marketType:"",showCard:{showVega:!1,showMeat:!1},isTaiMarket:!1,taiFunction:!1,isCornerMarket:!1,isSriMarket:!1,cornerFunction:!1,isLoad:!1,product:[],search:"",vegaSelect:["ตลาดผลไม้ฤดูกาล","ตลาดผลไม้รวม","ตลาดส้ม","ตลาดแตงโม","ลานผัก","ตลาดผลไม้นานาชาติ และตลาดคอนเทนเนอร์","ลานผัก (โซนผักปลีก)","ตลาดผัก"],meatSelect:["ตลาดสด","ตลาดปลาน้ำจืด","ตลาดอาหารทะเล"],riceSelect:["ตลาดข้าวสาร"],fieldSelect:["ตลาดพืซไร่"],dryFoodSelect:["ตลาดอาหารแห้ง","ตลาดสินค้าเบ็ดเตล็ด"],plantSelect:["ตลาดต้นไม้","ตลาดดอกไม้","ตลาดสัตว์เลี้ยง"],headerProps:{sortByText:"Custom sort by"},headers:[]}},methods:{getColor:function(t){return"-"===t.charAt(0)?"red":"0.00"===t.substring(0,4)?"grey":"green"},checkDif:function(t){return"-"===t.charAt(0)?"mdi-arrow-down":"0.00"===t.substring(0,4)?"mdi-minus":"mdi-arrow-up"},getProductData:function(t,e){var r=this;this.product=[],this.headers=[{text:"ชื่อสินค้า",value:"post_title"},{text:"ราคา / กิโลกรัม",value:"range_value"},{text:"ราคาเพิ่ม / ลด",value:"priceDif"}],this.uri=t,this.marketName=e,""!==this.uri&&(this.isTaiMarket=!1,this.showCard.showVega=!1,this.isCornerMarket=!1,this.taiFunction=!0,this.cornerFunction=!1,p.a.get(this.uri).then(function(t){r.product=t.data.posts,t.data.posts.map(function(t,e){r.product[e].post_title=t.post_title.substring(10),r.product[e].range_value=r.product[e].acf.recent_price.low_price.concat(" - ").concat(r.product[e].acf.recent_price.high_price.concat(" บาท")),r.product[e].priceDif=(100*t.acf.recent_price.difference).toFixed(2).concat(" %")}),r.isLoad=!1,console.log(r.product)}).catch(function(t){t&&(r.isLoad=!1)}))},showTable:function(){switch(this.isLoad=!0,this.marketName){case"ตลาดผลไม้ฤดูกาล":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=7324&per_page=500","ตลาดไท > ตลาดผลไม้ฤดูกาล");break;case"ตลาดผลไม้รวม":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=7326&per_page=500","ตลาดไท > ตลาดผลไม้รวม");break;case"ตลาดส้ม":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=7331&per_page=500","ตลาดไท > ตลาดส้ม");break;case"ตลาดแตงโม":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=7334&per_page=500","ตลาดไท > ตลาดแตงโม");break;case"ลานผัก":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=4951&per_page=500","ตลาดไท > ลานผัก");break;case"ตลาดผลไม้นานาชาติ และตลาดคอนเทนเนอร์":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=7318&per_page=500","ตลาดไท > ตลาดผลไม้นานาชาติ และตลาดคอนเทนเนอร์");break;case"ลานผัก (โซนผักปลีก)":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=7306&per_page=500","ลานผัก (โซนผักปลีก)");break;case"ตลาดผัก":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=7310&per_page=500","ตลาดผัก");break;case"ตลาดสด":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=10132&per_page=500","ตลาดสด");break;case"ตลาดปลาน้ำจืด":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=10133&per_page=500","ตลาดปลาน้ำจืด");break;case"ตลาดอาหารทะเล":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=10134&per_page=500","ตลาดอาหารทะเล");break;case"ตลาดข้าวสาร":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=7353&per_page=500","ตลาดข้าวสาร");break;case"ตลาดข้าวสาร":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=7324&per_page=500","ตลาดข้าวสาร");break;case"ตลาดพืซไร่":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=7364&per_page=500","ตลาดพืซไร่");break;case"ตลาดอาหารแห้ง":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=10135&per_page=500","ตลาดอาหารแห้ง");break;case"ตลาดสินค้าเบ็ดเตล็ด":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=10136&per_page=500","ตลาดสินค้าเบ็ดเตล็ด");break;case"ตลาดต้นไม้":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=7375&per_page=500","ตลาดต้นไม้");break;case"ตลาดดอกไม้":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=7398&per_page=500","ตลาดดอกไม้");break;case"ตลาดสัตว์เลี้ยง":this.getProductData("https://cms.talaadthai.com/wp-json/tlt/v1/products_from_subcat_id?id=10130&per_page=500","ตลาดสัตว์เลี้ยง")}},showCornerTable:function(t){if(this.cornerFunction=!0,this.isLoad=!0,this.isCornerMarket=!1,this.taiFunction=!1,this.product=[],this.headers=[{text:"รูปสินค้า",value:"img"},{text:"ราคาสินค้าวันที่",value:"price_date"},{text:"ชื่อสินค้า",value:"post_title"},{text:"ใหญ่",value:"priceL"},{text:"กลาง",value:"priceM"},{text:"เล็ก",value:"priceS"}],"ผัก"===t){this.getCornerData({fromRow:1,selectedMarket:[],selectedProductGroup:[1],sortOrder:"PriceL desc",toRow:500})}else if("ผลไม้"===t){this.getCornerData({fromRow:1,selectedMarket:[],selectedProductGroup:[2],sortOrder:"PriceL desc",toRow:500})}else if("พืซไร่"===t){this.getCornerData({fromRow:1,selectedMarket:[],selectedProductGroup:[3],sortOrder:"PriceL desc",toRow:500})}else if("ของแห้งของดอง"===t){this.getCornerData({fromRow:1,selectedMarket:[],selectedProductGroup:[4],sortOrder:"PriceL desc",toRow:500})}else if("ของสดของชำ"===t){this.getCornerData({fromRow:1,selectedMarket:[],selectedProductGroup:[5],sortOrder:"PriceL desc",toRow:500})}else{if("ดอกไม้สังฆภัณฑ์"!==t)return;this.getCornerData({fromRow:1,selectedMarket:[],selectedProductGroup:[6],sortOrder:"PriceL desc",toRow:500})}},getCornerData:function(t){var e=this;p.a.post("https://www.simummuangmarket.com/api/product/frontend/search",t).then(function(t){e.product=t.data.data,t.data.data.map(function(t,r){e.product[r].post_title=t.ProductNameTH,null!=t.PriceL?e.product[r].priceL=t.PriceL+"".concat(" Bath / "+t.UnitNameTH):e.product[r].priceL="-",null!=t.PriceM?e.product[r].priceM=t.PriceM+"".concat(" Bath / "+t.UnitNameTH):e.product[r].priceM="-",null!=t.PriceS?e.product[r].priceS=t.PriceS+"".concat(" Bath / "+t.UnitNameTH):e.product[r].priceS="-",null!=t.PriceDate?e.product[r].price_date=t.PriceDate.replace(/T.*/,"").split("-").reverse().join("/"):e.product[r].price_date="-",null===t.LargeImageUrl?e.product[r].img="https://www.simummuangmarket.com/img/img-default.png":e.product[r].img="https://www.simummuangmarket.com"+t.LargeImageUrl}),console.log(e.product),e.isLoad=!1}).catch(function(t){t&&(e.isLoad=!1)})},showSriTable:function(t){var e=this;switch(this.cornerFunction=!1,this.isLoad=!0,this.isSriMarket=!1,this.taiFunction=!1,this.product=[],this.headers=[{text:"ชื่อสินค้า",value:"post_title"},{text:"ราคาสินค้า",value:"price"},{text:"หน่วยสินค้า",value:"priceDesc"}],t){case"ผัก":this.paramsId=1;break;case"ผักพืซไร่เมืองหนาว":this.paramsId=2;break;case"ผลไม้":this.paramsId=3;break;case"ผลไม้พืซไร่":this.paramsId=4;break;case"ไม้ดอกไม้ประดับ":this.paramsId=5}p.a.get("https://hrdi-api.herokuapp.com/vegatable/"+this.paramsId).then(function(t){console.log(t.data),e.product=t.data,e.product=[].concat(b()(t.data.filter(function(t){return!t.includes("00")&&"กิโลกรัม"!==t&&"กำ"!==t&&"หัว"!==t&&"ลูก"!==t&&"ร้อยละ"!==t&&"แพ็ค"!==t&&"หวี"!==t&&"กล่อง"!==t}))).map(function(t,e){return{post_title:t}}),t.data.filter(function(t){return t.includes("00")}).map(function(t,r){e.product[r].price=t}),t.data.filter(function(t){return!t.includes("00")&&"กิโลกรัม"===t||"กำ"===t||"หัว"===t||"ลูก"===t||"ร้อยละ"===t||"ร้อยละ"===t||"แพ็ค"===t||"หวี"===t||"กล่อง"===t}).map(function(t,r){e.product[r].priceDesc=t}),e.isLoad=!1})},toggleCard:function(t){switch(t){case"isTaiMarket":this.isTaiMarket=!this.isTaiMarket,this.isCornerMarket=!1,this.isSriMarket=!1;break;case"isCornerMarket":this.isTaiMarket=!1,this.isCornerMarket=!this.isCornerMarket,this.isSriMarket=!1;break;case"isSriMarket":this.isTaiMarket=!1,this.isCornerMarket=!1,this.isSriMarket=!this.isSriMarket}}},created:function(){}},M={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("v-container",{staticClass:"mt-0"},[a("h1",{staticClass:"font-weight-light text-center pa-4"},[t._v("สถานการณ์ราคาผลผลิต")]),t._v(" "),a("v-row",{attrs:{align:"center",cols:"12"}},[a("v-btn",{staticClass:"ml-1",on:{click:function(e){return t.toggleCard("isTaiMarket")}}},[a("v-icon",{staticClass:"mr-1"},[t._v("mdi-store")]),t._v(" ตลาดไท\n      ")],1),t._v(" "),a("v-btn",{staticClass:"ml-1",on:{click:function(e){return t.toggleCard("isCornerMarket")}}},[a("v-icon",{staticClass:"mr-1"},[t._v("mdi-store")]),t._v("ตลาดสี่มุมเมือง\n      ")],1),t._v(" "),a("v-btn",{staticClass:"ml-1",on:{click:function(e){return t.toggleCard("isSriMarket")}}},[a("v-icon",{staticClass:"mr-1"},[t._v("mdi-store")]),t._v("ตลาดศรีเมือง\n      ")],1)],1),t._v(" "),t.isTaiMarket?a("v-row",{staticClass:"pa-5 col-md-12",attrs:{align:"center",justify:"center"}},[a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("W4HE"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ผักและผลไม้\n        ")]),t._v(" "),a("v-col",[a("v-select",{attrs:{items:t.vegaSelect,label:"เลือกสินค้า"},on:{change:function(e){return t.showTable()}},model:{value:t.marketName,callback:function(e){t.marketName=e},expression:"marketName"}})],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("PQwa"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          เนื้อสัตว์ ปลา & อาหารทะเล\n        ")]),t._v(" "),a("v-col",[a("v-select",{attrs:{items:t.meatSelect,label:"เลือกสินค้า"},on:{change:function(e){return t.showTable()}},model:{value:t.marketName,callback:function(e){t.marketName=e},expression:"marketName"}})],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("qG1N"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ตลาดข้าวสาร\n        ")]),t._v(" "),a("v-col",[a("v-select",{attrs:{items:t.riceSelect,label:"เลือกสินค้า"},on:{change:function(e){return t.showTable()}},model:{value:t.marketName,callback:function(e){t.marketName=e},expression:"marketName"}})],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("4uZN"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ตลาดพืซไร่\n        ")]),t._v(" "),a("v-col",[a("v-select",{attrs:{items:t.fieldSelect,label:"เลือกสินค้า"},on:{change:function(e){return t.showTable()}},model:{value:t.marketName,callback:function(e){t.marketName=e},expression:"marketName"}})],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("9D+C"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          อาหารแห้ง & สินค้าเบ็ดเตล็ด\n        ")]),t._v(" "),a("v-col",[a("v-select",{attrs:{items:t.dryFoodSelect,label:"เลือกสินค้า"},on:{change:function(e){return t.showTable()}},model:{value:t.marketName,callback:function(e){t.marketName=e},expression:"marketName"}})],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("1e2O"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ดอกไม้ ต้นไม้ & สัตว์เลี้ยง\n        ")]),t._v(" "),a("v-col",[a("v-select",{attrs:{items:t.plantSelect,label:"เลือกสินค้า"},on:{change:function(e){return t.showTable()}},model:{value:t.marketName,callback:function(e){t.marketName=e},expression:"marketName"}})],1)],1)],1):t._e(),t._v(" "),t.isCornerMarket?a("v-row",{staticClass:"pa-5 col-md-12",attrs:{align:"center",justify:"center"}},[a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("LaW6"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ผัก\n        ")]),t._v(" "),a("v-col",[a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.showCornerTable("ผัก")}}},[t._v("\n            เลือกสินค้า\n          ")])],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("K9np"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ผลไม้\n        ")]),t._v(" "),a("v-col",[a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.showCornerTable("ผลไม้")}}},[t._v("\n            เลือกสินค้า\n          ")])],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("wsk5"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          พืซไร่\n        ")]),t._v(" "),a("v-col",[a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.showCornerTable("พืซไร่")}}},[t._v("\n            เลือกสินค้า\n          ")])],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("DPYr"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ของแห้งของดอง\n        ")]),t._v(" "),a("v-col",[a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.showCornerTable("ของแห้งของดอง")}}},[t._v("\n            เลือกสินค้า\n          ")])],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("xgfO"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ของสดของชำ\n        ")]),t._v(" "),a("v-col",[a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.showCornerTable("ของสดของชำ")}}},[t._v("\n            เลือกสินค้า\n          ")])],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("5HHC"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ดอกไม้สังฆภัณฑ์\n        ")]),t._v(" "),a("v-col",[a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.showCornerTable("ดอกไม้สังฆภัณฑ์")}}},[t._v("\n            เลือกสินค้า\n          ")])],1)],1)],1):t._e(),t._v(" "),t.isSriMarket?a("v-row",{staticClass:"pa-5 col-md-12",attrs:{justify:"center"}},[a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("j/kf"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ผัก\n        ")]),t._v(" "),a("v-col",[a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.showSriTable("ผัก")}}},[t._v("\n            เลือกสินค้า\n          ")])],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("s3/3"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ผักพืซไร่เมืองหนาว\n        ")]),t._v(" "),a("v-col",[a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.showSriTable("ผักพืซไร่เมืองหนาว")}}},[t._v("\n            เลือกสินค้า\n          ")])],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("s2z8"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ผลไม้\n        ")]),t._v(" "),a("v-col",[a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.showSriTable("ผลไม้")}}},[t._v("\n            เลือกสินค้า\n          ")])],1)],1),t._v(" "),a("v-card",{staticClass:"ml-2 mt-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("L9eN"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ผลไม้พืซไร่\n        ")]),t._v(" "),a("v-col",[a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.showSriTable("ผลไม้พืซไร่")}}},[t._v("\n            เลือกสินค้า\n          ")])],1)],1),t._v(" "),a("v-card",{staticClass:"mt-2 ml-2",attrs:{"max-width":"300"}},[a("v-img",{attrs:{src:r("9iO8"),height:"200px"}}),t._v(" "),a("v-card-title",[t._v("\n          ไม้ดอกไม้ประดับ\n        ")]),t._v(" "),a("v-col",[a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.showSriTable("ผลไม้พืซไร่")}}},[t._v("\n            เลือกสินค้า\n          ")])],1)],1)],1):t._e(),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-lg-12 mb-5"},[a("v-card",[a("v-card-title",[a("v-spacer"),t._v(" "),a("p"),t._v(" "),a("v-text-field",{attrs:{"append-icon":"mdi-magnify",label:"Search","single-line":"","hide-details":""},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),a("v-data-table",{attrs:{headers:t.headers,search:t.search,items:t.product,loading:t.isLoad,"loading-text":"กำลังค้นหา..."},scopedSlots:t._u([t.cornerFunction?{key:"item.img",fn:function(e){var r=e.item;return[a("div",{staticClass:"p-2"},[r.img?a("v-img",{attrs:{src:r.img,alt:r.post_title,width:"250px",height:"250px"}}):t._e()],1)]}}:null,t.taiFunction?{key:"item.priceDif",fn:function(e){var r=e.item;return[a("v-chip",{attrs:{color:t.getColor(r.priceDif),dark:""}},[a("v-icon",{staticClass:"mr-1",attrs:{"aria-hidden":"false"}},[t._v("\n                  "+t._s(t.checkDif(r.priceDif))+"\n                ")]),t._v("\n                "+t._s(r.priceDif)+"\n              ")],1)]}}:null,{key:"no-data",fn:function(){return[t._v("\n              ไม่พบข้อมูล\n            ")]},proxy:!0}],null,!0)})],1)],1)])],1)],1)},staticRenderFns:[]};var N=r("VU/8")(O,M,!1,function(t){r("0pOR")},null,null).exports,P={data:function(){return{editorConfig:{},contentData:[]}},methods:{toThaiDateString:function(t){var e=t.getFullYear()+543,r=["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม.","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"][t.getMonth()];return t.getDate()+" "+r+" "+e+" "+t.getHours().toString().padStart(2,"0")+":"+t.getMinutes().toString().padStart(2,"0")+":"+t.getSeconds().toString().padStart(2,"0")+" น."}},mounted:function(){var t=this,e=this.$route.params.id;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/content/getContentById.php?contentId="+e).then(function(e){if(console.log(e),e.data.content.length>0){var r=new Date(e.data.content[0].contentTime);t.contentData=e.data.content[0],t.contentData.contentTime=t.toThaiDateString(r),console.log(t.contentData)}}).catch(function(t){console.log(t)})},created:function(){}},I={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-container",[r("p",{staticClass:"display-1 font-weight-light\ttext-center pa-4 pb-0"},[t._v(t._s(t.contentData.contentTitle))]),t._v(" "),r("p",{staticClass:"overline text-center"},[t._v("By "),r("b",[t._v(t._s(t.contentData.contentWriter))]),t._v(" | "+t._s(t.contentData.contentTime))]),t._v(" "),r("v-container",{attrs:{fluid:""}},[r("v-row",[r("v-col",{staticClass:"content",attrs:{md:"12",lg:"12"},domProps:{innerHTML:t._s(t.contentData.contentBody)}})],1)],1)],1)},staticRenderFns:[]};var S=r("VU/8")(P,I,!1,function(t){r("hMNy")},null,null).exports,U={data:function(){return{month:[],baseUrl:"https://farmtd.hrdi.or.th/farmdd/admin/api/",productMk:[],productImgMk:[],sellerUser:[],area:{},areaText:""}},methods:{getProductImg:function(t){var e=this,r=new FormData;r.append("idProductOfMemberMk",t),p.a.post(this.baseUrl+"/product/getProductImg.php",r).then(function(t){console.log(t),0!==t.data.productImgMk&&(e.productImgMk=t.data.productImgMk,e.productImgMk.shift(),console.log("productImgMk",e.productImgMk))}).catch(function(t){console.log(t)})},getProductDetail:function(t){var e=this,r=new FormData;r.append("idProductOfMemberMk",t),p.a.post(this.baseUrl+"/product/getProductDetail.php",r).then(function(t){0!==t.data.productMk&&(e.productMk=t.data.productMk[0],e.month=e.productMk.monthOfProduct.split(","),console.log(e.month),console.log("productMk",e.productMk))}).then(function(){e.getSellerInfo()}).catch(function(t){console.log(t)})},getSellerInfo:function(){var t=this;console.log(this.productMk.idSellerMember);var e=new FormData;e.append("idSellerMember",this.productMk.idSellerMember),p.a.post(this.baseUrl+"/product/postFindSellerMk.php",e).then(function(e){0!==e.data.sellerUser&&(t.sellerUser=e.data.sellerUser[0],console.log("sellerUser",t.sellerUser))}).then(function(){t.getAllArea()}).catch(function(t){console.log(t)})},getAllArea:function(){var t=this;p.a.get(this.baseUrl+"/getAllArea.php").then(function(e){if(0!==e.data.area){var r=e.data.area.filter(function(e,r){return e.idArea===t.sellerUser.vLinkAreaDetailId_MK});t.area={idArea:r[0].areaName,areaName:r[0].areaName},console.log("area",t.area)}}).catch(function(t){console.log(t)})}},mounted:function(){var t=localStorage.idProductOfMemberMk;this.getProductDetail(t),this.getProductImg(t)},created:function(){}},B={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-container",[a("p",{staticClass:"display-1 indigo--text text--darken-4 font-weight-bold\ttext-center pt-4 mb-0"},[t._v(" "+t._s(t.productMk.nameArgi)+" ")]),t._v(" "),a("p",{staticClass:"overline text-center"},[t._v("หมวด "+t._s(t.productMk.nameTypeOfArgiMk))]),t._v(" "),a("v-divider"),t._v(" "),a("v-container",{staticClass:"pt-0",attrs:{fluid:""}},[a("v-row",[a("v-col",{staticClass:"d-flex child-flex pb-0",attrs:{cols:"6"}},[a("v-img",{attrs:{"max-height":"550","max-width":"550",src:t.productMk.titleImg,"lazy-src":t.productMk.imgTitle},scopedSlots:t._u([{key:"placeholder",fn:function(){return[a("v-row",{staticClass:"fill-height ma-0",attrs:{align:"center",justify:"center"}},[a("v-progress-circular",{attrs:{indeterminate:"",color:"grey lighten-5"}})],1)]},proxy:!0}])})],1),t._v(" "),a("v-col",{attrs:{cols:"6"}},[a("v-row",[a("h2",{staticClass:"indigo--text text--darken-4 mx-auto"},[t._v("เดือนที่มีสินค้า")])]),t._v(" "),a("v-row",{attrs:{justify:"center"}},[a("v-card",{attrs:{flat:""}},[a("v-card-text",[a("v-container",{staticClass:"pa-0",attrs:{fluid:""}},[a("v-row",{attrs:{cols:"12",justify:"center"}},[a("v-col",[a("h3",[t._v("มค")]),t._v(" "),a("v-checkbox",{attrs:{color:"green accent-4",value:"1","hide-details":"",readonly:""},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),a("v-col",[a("h3",[t._v("กพ")]),t._v(" "),a("v-checkbox",{attrs:{color:"green accent-4",value:"2","hide-details":"",readonly:""},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),a("v-col",[a("h3",[t._v("มีค")]),t._v(" "),a("v-checkbox",{attrs:{color:"green accent-4",value:"3","hide-details":"",readonly:""},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),a("v-col",[a("h3",[t._v("เมย")]),t._v(" "),a("v-checkbox",{attrs:{color:"green accent-4",value:"4","hide-details":"",readonly:""},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),a("v-col",[a("h3",[t._v("พค")]),t._v(" "),a("v-checkbox",{attrs:{color:"green accent-4",value:"5","hide-details":"",readonly:""},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),a("v-col",[a("h3",[t._v("มิ.ย.")]),t._v(" "),a("v-checkbox",{attrs:{color:"green accent-4",value:"6","hide-details":"",readonly:""},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1)],1),t._v(" "),a("v-row",{attrs:{cols:"12",justify:"center"}},[a("v-col",[a("h3",[t._v("กค")]),t._v(" "),a("v-checkbox",{attrs:{color:"green accent-4",value:"7","hide-details":"",readonly:""},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),a("v-col",[a("h3",[t._v("สค")]),t._v(" "),a("v-checkbox",{attrs:{color:"green accent-4",value:"8","hide-details":"",readonly:""},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),a("v-col",[a("h3",[t._v("กย")]),t._v(" "),a("v-checkbox",{attrs:{color:"green accent-4",value:"9","hide-details":"",readonly:""},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),a("v-col",[a("h3",[t._v("ตค")]),t._v(" "),a("v-checkbox",{attrs:{color:"green accent-4",value:"10","hide-details":"",readonly:""},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),a("v-col",[a("h3",[t._v("พย")]),t._v(" "),a("v-checkbox",{attrs:{color:"green accent-4",value:"11","hide-details":"",readonly:""},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1),t._v(" "),a("v-col",[a("h3",[t._v("ธค")]),t._v(" "),a("v-checkbox",{attrs:{color:"green accent-4",value:"12","hide-details":"",readonly:""},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}})],1)],1)],1)],1)],1)],1),t._v(" "),a("v-divider"),t._v(" "),a("v-row",{staticClass:"mt-2"},[a("h2",{staticClass:"indigo--text text--darken-4 mx-auto"},[t._v("รายละเอียดสินค้า")])]),t._v(" "),a("v-row",{staticClass:"pa-5 body-1",attrs:{cols:"12"}},[a("v-col",{attrs:{cols:"12"}},[a("p",{staticClass:"body-1 font-weight-medium"},[t._v(t._s(t.productMk.detailOfProduct))])]),t._v(" "),a("v-row",{staticClass:"pa-2",attrs:{cols:"12"}},[a("v-col",[a("h3",{staticClass:"indigo--text text--darken-4"},[t._v("สายพันธ์ ")]),t._v(" "),a("h3",{staticClass:"green--text text--accent-4"},[t._v(t._s(t.productMk.speciesName||"-"))])]),t._v(" "),a("v-col",[a("h3",{staticClass:"indigo--text text--darken-4"},[t._v("มาตรฐาน ")]),t._v(" "),a("h3",{staticClass:"green--text text--accent-4"},[t._v(t._s(t.productMk.codeGrade||"-"))])])],1),t._v(" "),a("v-col",{attrs:{cols:"12"}},[a("h3",{staticClass:"indigo--text text--darken-4"},[t._v("ราคา ")]),t._v(" "),a("h2",{staticClass:"green--text text--accent-4"},[t._v(t._s(t.productMk.priceBegin===t.productMk.priceEnd?"฿"+t.productMk.priceEnd:"฿"+t.productMk.priceBegin+" - ฿"+t.productMk.priceEnd)+" / "+t._s(t.productMk.nameUnit))])])],1),t._v(" "),a("v-divider")],1),t._v(" "),a("v-row",t._l(t.productImgMk,function(e,r){return a("v-col",{key:r,staticClass:"d-flex child-flex",attrs:{cols:"1"}},[a("v-img",{attrs:{src:e.imgTitle,"lazy-src":e.imgTitle},scopedSlots:t._u([{key:"placeholder",fn:function(){return[a("v-row",{staticClass:"fill-height ma-0",attrs:{align:"center",justify:"center"}},[a("v-progress-circular",{attrs:{indeterminate:"",color:"grey lighten-5"}})],1)]},proxy:!0}],null,!0)})],1)}),1),t._v(" "),a("v-row",{staticClass:"mt-2"},[a("h2",{staticClass:"indigo--text text--darken-4 mx-auto"},[t._v("จัดจำหน่ายโดย")]),t._v(" "),a("v-col",{attrs:{cols:"12"}},[a("p",{staticClass:"body-1 font-weight-medium"},[a("span",{staticClass:"font-weight-bold"},[t._v("ประเภทองค์กร :")]),t._v(" "+t._s(t.sellerUser.nameTypeOfSeller))]),t._v(" "),a("p",{staticClass:"body-1 font-weight-medium"},[a("span",{staticClass:"font-weight-bold"},[t._v("ชื่อองค์กร :")]),t._v(" "+t._s(t.sellerUser.groupName||"-"))]),t._v(" "),a("p",{staticClass:"body-1 font-weight-medium"},[a("span",{staticClass:"font-weight-bold"},[t._v("ชื่อ :")]),t._v(" "+t._s(t.sellerUser.firstName+" "+t.sellerUser.lastName))]),t._v(" "),a("p",{staticClass:"body-1 font-weight-medium"},[a("span",{staticClass:"font-weight-bold"},[t._v("ที่อยู่ :")]),t._v(" บ้านเลขที่ "+t._s(t.sellerUser.address||"-")+"\n            หมู่ "+t._s(t.sellerUser.moo||"-")+" ตำบล "+t._s(t.sellerUser.tamName||"-")+" จังหวัด "+t._s(t.sellerUser.provName||"-")+" "+t._s(t.sellerUser.postCode||" ")+" ")]),t._v(" "),a("p",{staticClass:"body-1 font-weight-medium"},[a("span",{staticClass:"font-weight-bold"},[t._v("พื้นที่โครงการ :")]),t._v(" "+t._s(t.area.areaName))]),t._v(" "),a("v-row",{attrs:{cols:"12"}},[a("v-col",[a("v-img",{attrs:{width:"24",src:r("AIOO")}}),t._v(" "),a("p",{staticClass:"body-1 font-weight-medium"},[t._v(t._s(t.sellerUser.facebookName||"-"))])],1)],1)],1)],1)],1)],1)],1)},staticRenderFns:[]},R=r("VU/8")(U,B,!1,null,null,null).exports,L={data:function(){return{page:1,perPage:6,contentType:[],contentData:[],productContent:[],selection:0}},computed:{visibleContentPages:function(){return this.contentData.slice((this.page-1)*this.perPage,this.page*this.perPage)}},methods:{toThaiDateString:function(t){var e=t.getFullYear()+543,r=["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม.","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"][t.getMonth()];return t.getDate()+" "+r+" "+e+" "+t.getHours().toString().padStart(2,"0")+":"+t.getMinutes().toString().padStart(2,"0")+":"+t.getSeconds().toString().padStart(2,"0")+" น."}},mounted:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/content/getContent.php").then(function(e){if(e.data.content.length>0){var r=e.data.content.filter(function(t){return"0"!==t.contentPublish});t.contentData=r,r.map(function(e,r){t.contentData[r].contentImg="https://farmtd.hrdi.or.th/farmdd/admin/upload/"+e.contentImg}),t.contentData=t.contentData.filter(function(t){return"แนะนำผลผลิต"===t.contentTypeTitle}),t.contentData.reverse(),console.log(t.contentData)}}).catch(function(t){console.log(t)})}},j={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("v-container",[r("p",{staticClass:"display-1 font-weight-light\ttext-center"}),t._v(" "),r("div",{staticClass:"row"},t._l(t.visibleContentPages,function(e){return r("div",{key:e.id,staticClass:"col-md-4 col-sm-4 col-md-4"},[r("v-hover",{scopedSlots:t._u([{key:"default",fn:function(a){var o=a.hover;return[r("v-card",{staticClass:"mx-auto",attrs:{"max-width":"400",height:"100%",elevation:o?16:2}},[r("v-img",{staticClass:"white--text align-end",attrs:{height:"300px","max-width":"400",src:e.contentImg},on:{click:function(r){return t.$router.push({name:"Post",params:{id:e.contentId,page:1}})}}}),t._v(" "),r("v-card-title",{staticClass:"font-weight-bold"},[t._v("\n              "+t._s(e.contentTitle)+"\n            ")]),t._v(" "),r("v-card-actions",[r("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(r){return t.$router.push({name:"Post",params:{id:e.contentId,page:1}})}}},[t._v("\n                ดูเพิ่มเติม\n              ")])],1)],1)]}}],null,!0)})],1)}),0),t._v(" "),r("div",{staticClass:"text-center mb-5"},[r("v-pagination",{attrs:{length:Math.ceil(t.contentData.length/t.perPage)},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}})],1)])],1)},staticRenderFns:[]},D=r("VU/8")(L,j,!1,null,null,null).exports,E={data:function(){return{drawer:!1,group:null,isMobile:!1,loginItem:{},items:[{title:"หน้าแรก",icon:"mdi-home"},{title:"ค้นหาเกษตรกร & สินค้า",icon:"mdi-account-supervisor"},{title:"ค้นหาแหล่งสินค้า",icon:"mdi-shopping"},{title:"สถานการณ์ราคาผลผลิต",icon:"mdi-store"},{title:"แนะนำผลผลิต",icon:"mdi-fruit-cherries"},{title:"เกี่ยวกับเรา",icon:"mdi-information"}],activeBtn:1}},computed:{},watch:{group:function(){this.drawer=!1}},methods:{goToPage:function(t){switch(t){case"หน้าแรก":this.$router.push({name:"Home"});break;case"ค้นหาเกษตรกร & สินค้า":this.$router.push({name:"Shop"});break;case"ค้นหาแหล่งสินค้า":this.$router.push({name:"FindProduct"});break;case"สถานการณ์ราคาผลผลิต":this.$router.push({name:"Market"});break;case"แนะนำผลผลิต":this.$router.push({name:"Content",params:{id:"1"}});break;case"เกี่ยวกับเรา":this.$router.push({name:"AboutUs"})}console.log(t)},logout:function(){localStorage.clear(),this.$router.push({name:"Login"})}},mounted:function(){this.loginItem=localStorage,console.log("storageData",this.loginItem)}},q={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-app",{attrs:{id:"inspire"}},[r("v-sheet",{staticClass:"overflow-hidden"},[r("v-navigation-drawer",{attrs:{absolute:"",temporary:""},model:{value:t.drawer,callback:function(e){t.drawer=e},expression:"drawer"}},[t.loginItem.user?r("v-list-item",[r("v-list-item-content",[r("router-link",{staticClass:"mr-3 mb-1",staticStyle:{"text-decoration":"none"},attrs:{to:"/userprofile"}},[r("v-list-item-title",[t._v(t._s(t.loginItem.firstName+" "+t.loginItem.lastName))])],1)],1)],1):t._e(),t._v(" "),r("v-divider"),t._v(" "),r("v-list",{attrs:{dense:""}},t._l(t.items,function(e){return r("v-list-item",{key:e.title,attrs:{link:""}},[r("v-list-item-icon",[r("v-icon",[t._v(t._s(e.icon))])],1),t._v(" "),r("v-list-item-content",[r("v-list-item-title",{on:{click:function(r){return t.goToPage(e.title)}}},[t._v(t._s(e.title))])],1)],1)}),1)],1)],1),t._v(" "),r("v-app-bar",{attrs:{"clipped-left":t.$vuetify.breakpoint.lgAndUp,app:"",color:"info",dark:""}},[t.$vuetify.breakpoint.xsOnly?r("v-app-bar-nav-icon",{on:{click:function(e){e.stopPropagation(),t.drawer=!t.drawer}}}):t._e(),t._v(" "),r("v-toolbar-title",{staticStyle:{width:"350px"}},[r("router-link",{staticClass:"white--text",staticStyle:{"text-decoration":"none"},attrs:{to:"/"}},[t._v("\n        ของดีบนดอย Online\n      ")])],1),t._v(" "),r("v-spacer"),t._v(" "),!t.loginItem.user&&t.$vuetify.breakpoint.smAndUp?r("div",[r("v-icon",{staticClass:"mr-1"},[t._v("mdi-account-circle")]),t._v(" "),r("router-link",{staticStyle:{"text-decoration":"none"},attrs:{to:"/login"}},[r("span",{staticClass:"white--text"},[t._v("เข้าสู่ระบบ")])])],1):t._e(),t._v(" "),!t.loginItem.user&&t.$vuetify.breakpoint.xsOnly?r("v-row",{attrs:{col:"12"}},[r("router-link",{staticStyle:{"text-decoration":"none"},attrs:{to:"/login"}},[r("v-icon",{staticClass:"ml-2 mt-1"},[t._v("mdi-account-circle")]),t._v(" "),r("span",{staticClass:"white--text"},[t._v("Login")])],1)],1):t._e(),t._v(" "),t.loginItem.user&&t.$vuetify.breakpoint.smAndUp?r("v-row",{attrs:{align:"end"}},[r("v-spacer"),t._v(" "),r("v-icon",{staticClass:"mr-1 mb-1"},[t._v("mdi-account-circle")]),t._v(" "),r("router-link",{staticClass:"mr-3 mb-1",staticStyle:{"text-decoration":"none"},attrs:{to:"/userprofile"}},[r("span",{staticClass:"white--text"},[t._v(" "+t._s(t.loginItem.firstName+" "+t.loginItem.lastName))])]),t._v(" "),r("v-btn",{staticClass:"mx-2",attrs:{fab:"",dark:"",small:"",color:"error"},on:{click:t.logout}},[r("v-icon",[t._v("mdi-logout")])],1)],1):t._e(),t._v(" "),t.loginItem.user&&t.$vuetify.breakpoint.xsOnly?r("v-row",{attrs:{align:"end"}},[r("v-spacer"),t._v(" "),r("v-btn",{staticClass:"mx-2",attrs:{fab:"",dark:"",small:"",color:"error"},on:{click:t.logout}},[r("v-icon",[t._v("mdi-logout")])],1)],1):t._e()],1),t._v(" "),r("v-content",[t.$vuetify.breakpoint.smAndUp?r("v-bottom-navigation",{staticStyle:{"overflow-x":"scroll"},attrs:{value:t.activeBtn,color:"primary",horizontal:"","active-class":"active"}},[r("v-btn",{staticClass:"body-2 font-weight-bold",attrs:{to:"/"}},[t._v("หน้าแรก")]),t._v(" "),r("v-btn",{staticClass:"body-2 font-weight-bold",attrs:{to:"/shop"}},[r("span",[t._v("ค้นหาเกษตรกร & สินค้า")])]),t._v(" "),r("v-btn",{staticClass:"body-2 font-weight-bold",attrs:{to:"/findproduct"}},[r("span",[t._v("ค้นหาแหล่งสินค้า")])]),t._v(" "),r("v-btn",{staticClass:"body-2 font-weight-bold",attrs:{to:"/market"}},[r("span",[t._v("สถานการณ์ราคาผลผลิต")])]),t._v(" "),r("v-btn",{staticClass:"body-2 font-weight-bold",attrs:{to:"/content/1"}},[r("span",[t._v("แนะนำผลผลิต")])]),t._v(" "),r("v-btn",{staticClass:"body-2 font-weight-bold",attrs:{to:"/aboutus"}},[r("span",[t._v("เกี่ยวกับเรา")])])],1):t._e()],1),t._v(" "),r("router-view"),t._v(" "),r("v-footer",{attrs:{padless:!0}},[r("v-card",{staticClass:"info white--text text-center",attrs:{flat:"",tile:"",width:"100%"}},[r("v-card-text",[r("v-btn",{staticClass:"mx-4 white--text",attrs:{to:"/",icon:""}},[r("v-icon",{attrs:{size:"24px"}},[t._v("mdi-home")])],1),t._v(" "),r("v-btn",{staticClass:"mx-4 white--text",attrs:{to:"/shop",icon:""}},[r("v-icon",{attrs:{size:"24px"}},[t._v("mdi-account-supervisor")])],1),t._v(" "),r("v-btn",{staticClass:"mx-4 white--text",attrs:{to:"/findproduct",icon:""}},[r("v-icon",{attrs:{size:"24px"}},[t._v("mdi-shopping")])],1),t._v(" "),r("v-btn",{staticClass:"mx-4 white--text",attrs:{to:"/market",icon:""}},[r("v-icon",{attrs:{size:"24px"}},[t._v("mdi-store")])],1),t._v(" "),r("v-btn",{staticClass:"mx-4 white--text",attrs:{to:"/content/1",icon:""}},[r("v-icon",{attrs:{size:"24px"}},[t._v("mdi-fruit-cherries")])],1),t._v(" "),r("v-btn",{staticClass:"mx-4 white--text",attrs:{to:"/aboutus",icon:""}},[r("v-icon",{attrs:{size:"24px"}},[t._v("mdi-information")])],1)],1),t._v(" "),r("v-card-text",{staticClass:"white--text pt-0"}),t._v(" "),r("v-divider"),t._v(" "),r("v-card-text",{staticClass:"white--text"},[t._v("\n        "+t._s((new Date).getFullYear())+" — "),r("strong",[t._v("ของดีบนดอย Online")]),t._v(" "),r("v-row",{staticClass:"mt-2",attrs:{justify:"center"}},[r("v-icon",{staticClass:"white--text mr-1 mb-1 ml-2",attrs:{size:"24px"}},[t._v("mdi-home")]),t._v("ที่อยู่: 65 หมู่ 1 ถ.สุเทพ ต.สุเทพ อ.เมือง จ.เชียงใหม่ 50200\n          "),r("v-icon",{staticClass:"white--text mr-1 mb-1 ml-2",attrs:{size:"24px"}},[t._v("mdi-phone")]),t._v("โทรศัพท์: 053-328496-8\n        ")],1),t._v(" "),r("v-row",{attrs:{justify:"center"}},[r("v-icon",{staticClass:"white--text mr-1 mb-1 ml-2",attrs:{size:"24px"}},[t._v("mdi-fax")]),t._v("โทรสาร: 053-328494, 053-328229\n          "),r("v-icon",{staticClass:"white--text mr-1 mb-1 ml-2",attrs:{size:"24px"}},[t._v("mdi-email")]),t._v("info@hrdi.or.th\n        ")],1)],1)],1)],1)],1)},staticRenderFns:[]};var $=r("VU/8")(E,q,!1,function(t){r("3m5l")},"data-v-1c3939ff",null).exports,z=r("mvHQ"),V=r.n(z),H={data:function(){return{valid:!1,login:{username:"",password:""},isEmtyp:!1,usernameRules:[function(t){return!!t||"Username is required"}],passwordRules:[function(t){return!!t||"Password is required"}]}},methods:{checkLogin:function(){var t=this;if(this.isEmtyp=!1,""!==this.login.username&&null!==this.login.username&&void 0!==this.login.username)if(""!==this.login.password&&null!==this.login.password&&void 0!==this.login.password){var e=new FormData;e.append("username",this.login.username),e.append("password",this.login.password);var r={};e.forEach(function(t,e){console.log(t),r[e]=t}),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/postUserLogin.php",V()(r)).then(function(e){"0"===e.data.user[0].statusOfMember?t.$swal.fire({icon:"warning",title:"กรุณารอการยืนยันสมาชิกจากผู้ดูแลระบบ",showConfirmButton:!0,allowOutsideClick:!1}).then(function(){}):e.data.user.length>0&&("Buyer"===e.data.user[0].typeOfMember||"Normal"===e.data.user[0].typeOfMember?(localStorage.idMember=e.data.user[0].idBuyerMember,localStorage.user=e.data.user[0].username,localStorage.jwt=e.data.jwt,localStorage.firstName=e.data.user[0].firstName,localStorage.lastName=e.data.user[0].lastName,localStorage.typeOfMember=e.data.user[0].typeOfMember,t.$swal.fire({icon:"success",title:"เข้าสู่ระบบสำเร็จ",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"Home"})})):(localStorage.idMember=e.data.user[0].idSellerMember,localStorage.user=e.data.user[0].username,localStorage.jwt=e.data.jwt,localStorage.firstName=e.data.user[0].firstName,localStorage.lastName=e.data.user[0].lastName,localStorage.typeOfMember=e.data.user[0].typeOfMember,t.$swal.fire({icon:"success",title:"เข้าสู่ระบบสำเร็จ",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"Home"})})))}).catch(function(e){t.$swal.fire({icon:"error",title:"เกิดข้อผิดพลาด",text:"ไม่สามารถ Login ได้",showConfirmButton:!1,timer:1500}).then(function(){t.isEmtyp=!0})})}else this.isEmtyp=!0;else this.isEmtyp=!0}}},Y={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-container",{attrs:{fluid:"","fill-height":""}},[a("v-layout",{attrs:{"align-center":"","justify-center":""}},[a("v-flex",{attrs:{sm12:"",md9:"",lg8:""}},[a("v-toolbar",{attrs:{dark:"",color:"primary"}},[a("v-toolbar-title",[t._v("ของดีบนดอย Login")])],1),t._v(" "),a("v-container",{staticClass:"grey lighten-5"},[t.isEmtyp?a("v-alert",{attrs:{type:"error",color:"red lighten-1"}},[t._v("\n          ไม่สามารถเข้าสู่ระบบได้ กรุณาตรวจสอบ Username หรือ Password\n        ")]):t._e(),t._v(" "),a("v-row",{attrs:{"no-gutters":""}},[a("v-col",{attrs:{cols:"12",sm:"6",md:"5"}},[a("v-card",[a("v-img",{staticClass:"white--text",attrs:{height:"300px",src:r("3+hF")}})],1)],1),t._v(" "),a("v-col",{attrs:{cols:"12",md:"4"}},[a("v-card-text",[a("v-form",[a("v-text-field",{attrs:{"prepend-icon":"mdi-account",name:"login",label:"Login",type:"text",rules:t.usernameRules},model:{value:t.login.username,callback:function(e){t.$set(t.login,"username",e)},expression:"login.username"}}),t._v(" "),a("v-text-field",{attrs:{id:"password","prepend-icon":"mdi-lock",name:"password",label:"Password",type:"password",rules:t.passwordRules},model:{value:t.login.password,callback:function(e){t.$set(t.login,"password",e)},expression:"login.password"}})],1)],1),t._v(" "),a("v-row",{staticClass:"ml-2"},[a("v-col",[a("router-link",{attrs:{to:"/login"}},[t._v("\n                  ลืมรหัสผ่าน\n                ")])],1)],1),t._v(" "),a("v-row",{staticClass:"ml-1",attrs:{justify:"center"}},[a("v-card-actions",[a("v-btn",{staticClass:"mr-1",attrs:{color:"primary"},on:{click:function(e){return e.preventDefault(),t.checkLogin(e)}}},[a("v-icon",[t._v("mdi-login")]),t._v("เข้าสู่ระบบ\n                ")],1),t._v(" "),a("v-btn",{staticClass:"ml-1",attrs:{color:"primary",to:"/register"}},[a("v-icon",[t._v("mdi-pen")]),t._v("สมัครสมาชิก\n                ")],1),t._v(" "),a("v-spacer")],1)],1)],1),t._v(" "),a("v-col",{attrs:{justify:"center",cols:"12",md:"3"}},[a("v-card-text",[a("v-row",{attrs:{cols:"12",justify:"center"}},[a("v-icon",{staticClass:"mr-1"},[t._v("mdi-account-details")]),t._v(" "),a("h3",[t._v("ขั้นตอนการสมัครสมาชิก")])],1),t._v(" "),a("v-row",{attrs:{justify:"center"}},[a("ol",{staticClass:"mt-3 font-weight-bold body-2"},[a("li",[t._v('คลิกเมนู "สมัครสมาชิก"')]),t._v(" "),a("li",{staticClass:"mt-1"},[t._v("เลือกประเภทสมาชิก ที่ต้องการสมัคร")]),t._v(" "),a("li",{staticClass:"mt-1"},[t._v('คลิกปุ่ม "ยอมรับข้อตกลง"')]),t._v(" "),a("li",{staticClass:"mt-1"},[t._v("กรอกข้อมูล")]),t._v(" "),a("li",{staticClass:"mt-1"},[t._v('คลิกปุ่ม "ยืนยันการสมัครสมาชิก"')]),t._v(" "),a("li",{staticClass:"mt-1"},[t._v("รอผู้ดูแลระบบ อนุมัติ")]),t._v(" "),a("li",{staticClass:"mt-1"},[t._v("เข้าสู่ระบบ")])])])],1)],1)],1)],1)],1)],1)],1)},staticRenderFns:[]};var K=r("VU/8")(H,Y,!1,function(t){r("2lOS")},"data-v-da801816",null).exports,J=r("ifoU"),G=r.n(J),X={data:function(){return{imagePreviewURL:null,isFormValid:!1,confirmPassword:"",buyerForm:{prefix:"",firstName:"",lastName:"",username:"",phoneNumber:"",email:"",idCard:"",password:"",img:[],provinceCode:"",typeOfMember:"",amphurCode:"",tambolCode:"",lineId:"",postcode:"",facebookName:"",address:"",moo:"",road:"",questionOfVisit:"",questionOfObjective:""},sellerForm:{idTypeOfSeller:"",prefix:"",firstName:"",lastName:"",username:"",phoneNumber:"",email:"",idCard:"",gender:"",password:"",vProvinceId:"",vLinkAreaDetailId:"",productType:[],postcode:"",address:"",img:[],moo:"",road:"",tambolCode:"",ampCode:"",zipcode:"",groupName:"",shopName:"",brandName:"",lineId:"",facebookName:""},isRegisForm:{buyer:!1,seller1:!1},isAgree:"",valid:!1,userType:"",isType:!0,isShowPolicy:!1,policy:{showBuyerPolicy:!1,showSellerPolicy:!1,title:"",titleColor:"",ruleTitle:"",firstRule:"",secRule:"",thirdRule:"",fourthRule:"",fifthRule:"",sixthRule:"",seventhRule:"",eigthRule:"",ninethRule:"",footer:""},prefix:[],area:[],sellType:[],amphur:[],tambol:[],province:[{provinceName:""}],targetName:[],targetFilter:[],allProvince:[],buyerAmphur:[],buyerTambol:[],isUsernameExist:!1,showEtc:{visit:!1,objective:!1},firstNameRules:[function(t){return!!t||"กรุณากรอกชื่อ"}],lastNameRules:[function(t){return!!t||"กรุณากรอกนามสกุล"}],imgRules:[function(t){return!!t||"กรุณาเลือกรูปภาพประจำตัว"},function(t){return!t||t.size<3e6||"ขนาดรูปภาพไม่สามารถเกิน 3 MB!"}],emailRules:[function(t){return/.+@.+/.test(t)||"อีเมลต้องอยู่ในรูปแบบที่ถูกต้อง"}],phoneRules:[function(t){return!t.length<10||"หมายเลขโทรศัพท์ต้องมีจำนวน 10 หลัก"},function(t){return!!t||"กรุณากรอกหมายเลขโทรศัพท์"}],passwordRules:[function(t){return!!t||"กรุณากรอกรหัสผ่าน"},function(t){return/[A-Z]+/.test(t)||"ต้องมีตัวอักษรตัวใหญ่ในรหัสผ่าน"},function(t){return/[0-9]/g.test(t)||"ตัองมีตัวเลขในรหัสผ่าน"},function(t){return t.length>=6||"รหัสผ่านต้องมีอย่างน้อย 6 ตัว"},function(t){return/^[a-zA-Z0-9äöüÄÖÜ]*$/.test(t)||"ไม่อนุญาตให้ใช้ตัวอักษรพิเศษ"},function(t){return(t||"").indexOf(" ")<0||"ไม่อนุญาตให้ใช้รหัสผ่านที่มีช่องว่าง"}]}},methods:{previewImg:function(t){var e=t;this.sellerForm.img=e,this.buyerForm.img=e,e?(this.imagePreviewURL=URL.createObjectURL(e),URL.revokeObjectURL(e)):this.imagePreviewURL=null},findTumbolByAmpCode:function(t,e){var r=this;this.tambol=[],p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getTumbolByAmpProv.php?provinceId="+e+"&ampId="+t).then(function(t){t.data.tambol.length>0&&(r.tambol=t.data.tambol),console.log("getTumbolByAmpProv",r.tambol)})},getAmphurByProvince:function(t){var e=this;this.amphur=[],this.tambol=[],p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getAmphurById.php?provinceId="+t).then(function(t){t.data.amphur.length>0&&(e.amphur=t.data.amphur),console.log("getAmphurById",e.amphur)})},questionBuyer:function(t){this.showEtc.visit="อื่น ๆ"===t},checkUsername:function(t){var e=this;this.isUsernameExist=!1;var r=new FormData;r.append("username",t);var a={};r.forEach(function(t,e){a[e]=t}),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/checkUsername.php",V()(a)).then(function(t){t.data.username[0].username.length>0&&(e.isUsernameExist=!0)})},questionObjBuyer:function(t){this.showEtc.objective="อื่น ๆ"===t},findAreaByProvince:function(t){var e=this;this.getAmphurByProvince(t),p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getVLinkTargetById.php?provinceId="+t).then(function(t){console.log("vTargetDetail",t.data.vTargetDetail),t.data.vTargetDetail.length>0&&(e.targetName=[].concat(b()(new G.a(t.data.vTargetDetail.map(function(t){return[t.targetName,t]})).values())),e.getArea())})},getArea:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getAllArea.php").then(function(e){t.targetName=t.targetName.map(function(t){return t.targetId}),console.log("targetName",t.targetName),e.data.area.length>0&&(t.area=e.data.area),t.targetFilter=e.data.area.filter(function(e){return t.targetName.includes(e.idArea)}),console.log("targetFilter",t.targetFilter)})},checkLoginType:function(t){this.isType=!1,this.isShowPolicy=!0,"Buyer"===t&&(this.policy={showBuyerPolicy:!0,showSellerPolicy:!1,title:"ผู้ซื้อ",titleColor:"indigo--text",ruleTitle:"ผู้ขอสมัครสมาชิกซึ่งต่อไปนี้จะเรียกว่า ผู้สมัคร และเวบของดีบนดอยออนไลน์ ซึ่งอยู่ภายใต้การดูแลของสถาบันวิจัยและพัฒนาพื้นที่สูง ต่อไปนี้จะเรียกว่า สถาบันฯ กรุณาอ่านข้อตกลงด้านล่างนี้โดยละเอียด เพื่อรักษาสิทธิประโยชน์ในการเป็นสมาชิกของท่านตามเงื่อนไขดังนี้",firstRule:"1. การสมัครสมาชิก เวบของดีบนดอยออนไลน์ ไม่ต้องเสียค่าใช้จ่ายใดใดทั้งสิ้น",secRule:"2. ผู้สมัครจะต้องกรอกข้อมูลรายละเอียดต่างๆ ตามจริงให้ครบถ้วนเพื่อผลประโยชน์แก่ตัวผู้สมัคร หากตรวจพบว่า ข้อมูลของผู้สมัครไม่เป็นความจริง ทางสถาบันจะขอระงับการใช้งานของผู้สมัครโดยไม่ต้องแจ้งให้ทราบล่วงหน้า",thirdRule:"3. ผู้ใดแอบอ้างหรือการกระทำใดใด อันเป็นการละเมิดสิทธิส่วนบุคคล โดยใช้ข้อมูลของผู้อื่นมาแอบอ้างสมัครเป็นสมาชิก เพื่อให้ได้มาซึ่งการเป็นสมาชิก ถือเป็นความผิดต้องได้รับโทษตามกฏหมายที่กำหนดไว้",fourthRule:"4. ข้อมูลส่วนบุคคลของผู้สมัครที่ได้ลงทะเบียนหรือผ่านการใช้งานของเวบไซด์ ของดีบนดอยออนไลน์ ทั้งหมดนั้น ผู้สมัครยอมรับและตกลงว่าเป็นสิทธิของสถาบันฯ ซึ่งผู้สมัครต้องอนุญาตให้สถาบัน ใช้ข้อมูลของผู้สมัครสมาชิกในงานที่เกี่ยวข้องกับการส่งเสริมอาชีพแก่เกษตรกรบนพื้นที่สูง",fifthRule:"5. ทางเว็บของดีบนดอยออนไลน์ ขอรับรองว่าจะเก็บข้อมูลของผู้สมัครไว้เป็นความลับอย่างดีที่สุด โดยจะไม่นำไปเผยแพร่ที่ใด และหรือเพื่อประโยชน์ทางการค้าหรือประโยชน์ทางด้านอื่นใดโดยไม่ได้รับอนุญาต นอกจากจะได้รับหมายศาลหรือหนังสือทางราชการ ซึ่งขึ้นอยู่กับดุลยพินิชของสถาบันวิจัยและพัฒนาพื้นที่สูง",sixthRule:"6. ผู้สมัครควรปฏิบัติตามข้อกำหนดและเงื่อนไขการให้บริการของเวบไซด์ของดีบนดอยออนไลน์ โดยเคร่งครัด เพื่อความปลอดภัยในข้อมูลส่วนบุคคลของผู้สมัคร ในกรณีข้อมูลส่วนบุคคลดังกล่าวถูกโจรกรรมโดยวิธีการทางอิเล็กทรอนิกส์ หรือสูญหาย เสียหายอันเนื่องมาจากเหตุสุดวิสัย หรือไม่ว่ากรณีใดใดทั้งสิ้น ทางสถาบันขอสงวนสิทธิ์ในการปฏิเสธความรับผิดชอบจากเหตุดังกล่าวทั้งหมด",seventhRule:"7. ผู้สมัครจะต้องรักษารหัสผ่าน หรือชื่อเข้าใช้งานในระบบเป็นความลับ และหากมีผู้อื่นสามารถเข้าใช้งานจากชื่อของผู้สมัครได้ ทางสถาบัน จะไม่รับผิดชอบใดใดทั้งสิ้น",eigthRule:"8. ผู้สมัครยินยอมให้สถาบันฯ ตรวจสอบข้อมูลส่วนตัว และ หรือข้อมูลอื่นใดที่ผู้สมัครระบุในการสมัครสมาชิก หากสถาบันฯ ตรวจสอบพบว่า ข้อมูลที่ท่านให้ไม่ชัดเจน และหรือเป็นเท็จ ทางสถาบันฯ มีสิทธิ์ในการยกเลิกสมาชิกของผู้สมัครได้",footer:'ข้าพเจ้าผู้สมัคร ได้อ่านเงื่อนไขการสมัครแล้ว และยินยอมให้สถาบันฯ ตรวจสอบข้อมูลส่วนตัว และ/หรือข้อมูลใดที่ผู้สมัครระบุในการสมัครสมาชิก ถ้าผู้สมัครตกลงยินยอมผูกพันและปฏิบัติตามข้อตกลงและเงื่อนไขต่างๆ ตามที่ระบุไว้ในข้อตกลงดังกล่าว รวมทั้งข้อตกลงและเงื่อนไขอื่นๆที่ทางสถาบันฯ เห็นสมควร แต่ถ้าไม่ตกลง กรุณากด "ไม่ยอมรับ" เพื่อกลับไปยังหน้าหลัก'}),"Seller"===t&&(this.policy={showBuyerPolicy:!1,showSellerPolicy:!0,title:"ผู้ขาย",titleColor:"pink--text",ruleTitle:"ผู้ขอสมัครสมาชิกซึ่งต่อไปนี้จะเรียกว่า ผู้สมัคร และเวบของดีบนดอยออนไลน์ ซึ่งอยู่ภายใต้การดูแลของสถาบันวิจัยและพัฒนาพื้นที่สูง ต่อไปนี้จะเรียกว่า สถาบันฯ กรุณาอ่านข้อตกลงด้านล่างนี้โดยละเอียด เพื่อรักษาสิทธิประโยชน์ในการเป็นสมาชิกของท่านตามเงื่อนไขดังนี้",firstRule:"1. ผู้มีสิทธิ์สมัครสมาชิกสำหรับขายสินค้าและผลผลิต ต้องเป็นเกษตรกรที่อยู่ในขอบเขตพื้นที่ส่งเสริมของสถาบันวิจัยและพัฒนาพื้นที่สูงเท่านั้น",secRule:"2. การสมัครสมาชิก เวบของดีบนดอยออนไลน์ ไม่่ต้องเสียค่าใช้จ่ายใดๆทั้งสิ้น",thirdRule:"3. ผู้สมัครจะต้องกรอกข้อมูลรายละเอียดต่างๆ ตามจริงให้ครบถ้วนเพื่อผลประโยชน์แก่ตัวผู้สมัคร หากตรวจพบว่า ข้อมูลของผู้สมัครไม่เป็นความจริง ทางสถาบันจะขอระงับการใช้งานของผู้สมัครโดยไม่ต้องแจ้งให้ทราบล่วงหน้า",fourthRule:"4. ผู้ใดแอบอ้างหรือกระทำการใดใด อันเป็นการละเมิดสิทธิส่วนบุคคล โดยใช้ข้อมูลของผู้อื่นมาแอบอ้างเป็นสมาชิก เพื่อให้ได้มาซึ่งสิทธิการเป็นสมาชิก ถือเป็นความผิดต้องได้รับโทษตามที่กฏหมายกำหนดไว้",fifthRule:"5. ข้อมูลส่วนบุคคลของผู้สมัครที่ได้ลงทะเบียนหรือผ่านการใช้งานของเวบไซด์ของ ของดีบนดอยออนไลน์ ทั้งหมดนั้น ผู้สมัครยอมรับและตกลงว่าเป็นสิทธิของสถาบันฯ ซึ่งผู้สมัครต้องอนุญาตให้สถาบัน ใช้ข้อมูลของผู้สมัครสมาชิกในงานที่เกี่ยวข้องกับการส่งเสริมอาชีพแก่เกษตรกรบนพื่นที่สูง",sixthRule:"6. ทางเว็บของดีบนดอยออนไลน์ ขอรับรองว่าจะเก็บข้อมูลของผู้สมัครไว้เป็นความลับอย่างดีที่สุด โดยจะไม่นำไปเผยแพร่ที่ใด และหรือเพื่อประโยชน์ทางการค้าหรือประโยชน์ทางด้านอื่นใดโดยไม่ได้รับอนุญาต นอกจากจะได้รับหมายศาลหรือหนังสือทางราชการ ซึ่งขึ้นอยู่กับดุลยพินิชของสถาบันวิจัยและพัฒนาพื้นที่สูง",seventhRule:"7. ผู้สมัครควรปฏิบัติตามข้อกำหนดและเงื่อนไขการให้บริการของเวบไซด์ของดีบนดอยออนไลน์ โดยเคร่งครัด เพื่อความปลอดภัยในข้อมูลส่วนบุคคลของผู้สมัคร ในกรณีข้อมูลส่วนบุคคลดังกล่าวถูกโจรกรรมโดยวิธีการทางอิเล็กทรอนิกส์ หรือสูญหาย เสียหายอันเนื่องมาจากเหตุสุดวิสัย หรือไม่ว่ากรณีใดใดทั้งสิ้น ทางสถาบันขอสงวนสิทธิ์ในการปฏิเสธความรับผิดชอบจากเหตุดังกล่าวทั้งหมด",eigthRule:"8. ผู้สมัครจะต้องรักษารหัสผ่าน หรือชื่อเข้าใช้งานในระบบเป็นความลับ และหากมีผู้อื่นสามารถเข้าใช้งานจากชื่อของผู้สมัครได้ ทางสถาบัน จะไม่รับผิดชอบใดใดทั้งสิ้น",ninethRule:"9. ผู้สมัครยินยอมให้สถาบันฯ ตรวจสอบข้อมูลส่วนตัว และ หรือข้อมูลอื่นใดที่ผู้สมัครระบุในการสมัครสมาชิก หากสถาบันฯ ตรวจสอบพบว่า ข้อมูลที่ท่านให้ไม่ชัดเจน และหรือเป็นเท็จ ทางสถาบันฯ มีสิทธิ์ในการยกเลิกสมาชิกของผู้สมัครได้",footer:'ข้าพเจ้าผู้สมัคร ได้อ่านเงื่อนไขการสมัครแล้ว และยินยอมให้สถาบันฯ ตรวจสอบข้อมูลส่วนตัว และ/หรือข้อมูลใดที่ผู้สมัครระบุในการสมัครสมาชิก ถ้าผู้สมัครตกลงยินยอมผูกพันและปฏิบัติตามข้อตกลงและเงื่อนไขต่างๆ ตามที่ระบุไว้ในข้อตกลงดังกล่าว รวมทั้งข้อตกลงและเงื่อนไขอื่นๆที่ทางสถาบันฯ เห็นสมควร แต่ถ้าไม่ตกลง กรุณากด "ไม่ยอมรับ" เพื่อกลับไปยังหน้าหลัก'},console.log(this.policy))},checkBuyerRegister:function(){var t=this;if(console.log(this.buyerForm),""!==this.buyerForm.prefix&&null!==this.buyerForm.prefix&&void 0!==this.buyerForm.prefix)if(""!==this.buyerForm.firstName&&null!==this.buyerForm.firstName&&void 0!==this.buyerForm.firstName)if(""!==this.buyerForm.lastName&&null!==this.buyerForm.lastName&&void 0!==this.buyerForm.lastName){var e=new FormData;e.append("address",this.buyerForm.address),e.append("amphurCode",this.buyerForm.amphurCode),e.append("email",this.buyerForm.email),e.append("facebookName",this.buyerForm.facebookName),e.append("firstName",this.buyerForm.firstName),e.append("idCard",this.buyerForm.idCard),e.append("firstName",this.buyerForm.firstName),e.append("gender",this.buyerForm.gender),e.append("img",this.buyerForm.img),e.append("typeOfMember",this.buyerForm.typeOfMember),e.append("postcode",this.buyerForm.postcode),e.append("lastName",this.buyerForm.lastName),e.append("lineId",this.buyerForm.lineId),e.append("moo",this.buyerForm.moo),e.append("password",this.buyerForm.password),e.append("phoneNumber",this.buyerForm.phoneNumber),e.append("prefix",this.buyerForm.prefix),e.append("provinceCode",this.buyerForm.provinceCode),e.append("questionOfObjective",this.buyerForm.questionOfObjective),e.append("questionOfVisit",this.buyerForm.questionOfVisit),e.append("road",this.buyerForm.road),e.append("tambolCode",this.buyerForm.tambolCode),e.append("username",this.buyerForm.username);var r={};e.forEach(function(t,e){console.log(t),r[e]=t}),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/postAddBuyerMember.php",e,{headers:{"Content-Type":"multipart/form-data"}}).then(function(e){"True"===e.data?t.$swal.fire({icon:"success",title:"สมัครสมาชิกทั่วไปสำเร็จ",text:"รอแอดมินตรวจสอบข้อมูลเพื่อยืนยันการสมัครสมาชิก",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"Login"})}):t.$swal.fire({icon:"error",title:"เกิดข้อผิดพลาด",text:"ไม่สามารถสมัครสมาชิกได้",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"Login"})})})}else this.alertCheck("กรุณากรอกนามสกุล");else this.alertCheck("กรุณากรอกชื่อ");else this.alertCheck("กรุณาเลือกคำนำหน้า")},acceptPolicyCheck:function(t,e){console.log(t),t&&"Unaccecpt"!==t&&null!==t?(this.isShowPolicy=!1,t&&"Buyer"===e&&(this.isRegisForm={buyer:!0,seller1:!1},console.log(this.isRegisForm)),t&&"Seller"===e&&(this.isRegisForm={buyer:!1,seller1:!0})):this.$swal.fire({icon:"warning",title:"กรุณาตรวจสอบ",text:"กรุณายอมรับข้อตกลง",allowOutsideClick:!1})},checkSellerRegister:function(){var t=this;if(console.log(this.sellerForm),""!==this.sellerForm.prefix&&null!==this.sellerForm.prefix&&void 0!==this.sellerForm.prefix)if(""!==this.sellerForm.firstName&&null!==this.sellerForm.firstName&&void 0!==this.sellerForm.firstName)if(""!==this.sellerForm.lastName&&null!==this.sellerForm.lastName&&void 0!==this.sellerForm.lastName){var e=new FormData;e.append("address",this.sellerForm.address),e.append("ampCode",this.sellerForm.ampCode),e.append("brandName",this.sellerForm.brandName),e.append("tambolCode",this.sellerForm.tambolCode),e.append("email",this.sellerForm.email),e.append("facebookName",this.sellerForm.facebookName),e.append("firstName",this.sellerForm.firstName),e.append("gender",this.sellerForm.gender),e.append("groupName",this.sellerForm.groupName),e.append("idCard",this.sellerForm.idCard),e.append("idTypeOfSeller",this.sellerForm.idTypeOfSeller),e.append("lastName",this.sellerForm.lastName),e.append("lineId",this.sellerForm.lineId),e.append("postcode",this.buyerForm.postcode),e.append("moo",this.sellerForm.moo),e.append("img",this.sellerForm.img),e.append("password",this.sellerForm.password),e.append("phoneNumber",this.sellerForm.phoneNumber),e.append("prefix",this.sellerForm.prefix),e.append("productType",this.sellerForm.productType),e.append("road",this.sellerForm.road),e.append("shopName",this.sellerForm.shopName),e.append("username",this.sellerForm.username),e.append("vLinkAreaDetailId",this.sellerForm.vLinkAreaDetailId),e.append("vProvinceId",this.sellerForm.vProvinceId),e.append("zipcode",this.sellerForm.zipcode);var r={};e.forEach(function(t,e){console.log(t),r[e]=t}),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/postAddSellerMember.php",e,{headers:{"Content-Type":"multipart/form-data"}}).then(function(e){"True"===e.data?t.$swal.fire({icon:"success",title:"สมัครสมาชิกสำหรับผู้ขายสำเร็จ",text:"รอแอดมินตรวจสอบข้อมูลเพื่อยืนยันการสมัครสมาชิก",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"Login"})}):t.$swal.fire({icon:"error",title:"เกิดข้อผิดพลาด",text:"ไม่สามารถสมัครสมาชิกได้",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"Login"})})})}else this.alertCheck("กรุณากรอกนามสกุล");else this.alertCheck("กรุณากรอกชื่อ");else this.alertCheck("กรุณาเลือกคำนำหน้า")},alertCheck:function(t){this.$swal.fire({icon:"warning",title:t,allowOutsideClick:!1})},findTambolBuyer:function(t,e){var r=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getBuyerTambol.php?provinceId="+t+"&amphurId="+e).then(function(t){t.data.buyerTambol.length>0&&(r.buyerTambol=t.data.buyerTambol),console.log("getBuyerTambol",r.buyerTambol)})},findAmphurBuyer:function(t){var e=this;this.buyerAmphur=[],p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getBuyerAmphur.php?provinceId="+t).then(function(t){e.buyerAmphur=t.data.buyerAmphur,console.log("getBuyerAmphur",e.buyerAmphur)})},getPrefix:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getPrefix.php").then(function(e){t.prefix=e.data.prefix,console.log("prefix",t.prefix)})},getProvince:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getVLinkProvince.php").then(function(e){e.data.vLinkProvince.length>0&&(t.province=[].concat(b()(new G.a(e.data.vLinkProvince.map(function(t){return[t.provinceId,t]})).values()))),t.province=t.province.filter(function(t,e){return"เลย"!==t.provinceName&&"ลำปาง"!==t.provinceName&&"แพร่"!==t.provinceName}),console.log("province",t.province)})},seller2Revert:function(){this.isRegisForm={seller1:!0,seller2:!1,seller3:!1}},getSellerType:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getSellerType.php").then(function(e){t.sellType=e.data.sellType,console.log("sellType",t.sellType)})},getAllProvince:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getAllprovince.php").then(function(e){e.data.allProvince.length>0&&(t.allProvince=e.data.allProvince),console.log("getAllprovince",t.allProvince)})}},mounted:function(){this.getPrefix(),this.getProvince(),this.getSellerType(),this.getAllProvince()}},Z={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-container",{attrs:{fluid:"","fill-height":""}},[a("v-layout",{attrs:{"align-center":"","justify-center":""}},[a("v-flex",{attrs:{xs12:"",sm8:"",lg10:""}},[t.isType?a("v-row",{staticClass:"pa-5",attrs:{justify:"space-between"}},[a("v-card",{staticClass:"elevation-12 mb-5",attrs:{"max-width":"350"}},[a("v-toolbar",{attrs:{dark:"",color:"primary"}},[a("v-toolbar-title",[t._v("สมาชิกทั่วไป / ผู้เข้ามาซื้อสินค้า")])],1),t._v(" "),a("v-col",{staticClass:"md-6"},[a("v-img",{staticClass:"white--text align-end",attrs:{id:"rounded",height:"300px",src:r("3+hF")}})],1),t._v(" "),a("v-card-actions",[a("router-link",{attrs:{to:"register"}}),t._v(" "),a("v-spacer"),t._v(" "),a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.checkLoginType("Buyer")}}},[a("v-icon",{staticClass:"mr-1"},[t._v("mdi-pen")]),t._v("สมัครสมาชิกทั่วไป\n            ")],1)],1),t._v(" "),a("v-row",{staticClass:"pa-3"},[a("ul",{staticClass:"font-weight-bold body-1"},[a("li",{staticClass:"mt-1"},[t._v("สามารถซื้อสินค้า และติดต่อเกษตรกรแต่ละร้านค้าได้")]),t._v(" "),a("li",{staticClass:"mt-1"},[t._v("รับข่าวสารสิทธิพิเศษจากทางเวบไซด์")])])])],1),t._v(" "),a("v-card",{staticClass:"elevation-12 mb-5",attrs:{"max-width":"350"}},[a("v-toolbar",{attrs:{dark:"",color:"primary"}},[a("v-toolbar-title",[t._v("สมาชิกผู้ขายสินค้า")])],1),t._v(" "),a("v-col",{staticClass:"md-6"},[a("v-img",{staticClass:"white--text align-end",attrs:{id:"rounded",height:"300px",src:r("3+hF")}})],1),t._v(" "),a("v-card-actions",[a("router-link",{attrs:{to:"register"}}),t._v(" "),a("v-spacer"),t._v(" "),a("v-btn",{attrs:{block:"",color:"primary"},on:{click:function(e){return t.checkLoginType("Seller")}}},[a("v-icon",{staticClass:"mr-1"},[t._v("mdi-pen")]),t._v("สมาชิกผู้ขายสินค้า\n            ")],1)],1),t._v(" "),a("v-row",{staticClass:"pa-3"},[a("ul",{staticClass:"font-weight-bold body-1"},[a("li",{staticClass:"mt-1"},[t._v("สามารถนำสินค้ามาแนะนำและลงขายบนหน้าเวบได้")]),t._v(" "),a("li",{staticClass:"mt-1"},[t._v("รับข่าวสารสิทธิพิเศษจากทางเวบไซด์")])])])],1),t._v(" "),a("v-card",{staticClass:"elevation-12 mb-5",attrs:{"max-width":"350"}},[a("v-toolbar",{staticClass:"border",attrs:{light:"",rounded:"",color:"grey lighten-4"}},[a("v-toolbar-title",{staticClass:"font-weight-black"},[t._v("ผู้เยี่ยมชมไม่ได้สมัครสมาชิก")])],1),t._v(" "),a("v-col",{staticClass:"md-6"},[a("v-img",{staticClass:"white--text align-end",attrs:{id:"rounded",height:"300px",src:r("3+hF")}})],1),t._v(" "),a("v-row",{staticClass:"pa-3"},[a("ul",{staticClass:"font-weight-bold body-1"},[a("li",{staticClass:"mt-1"},[t._v("สามารถค้นหาข้อมูลสินค้า แต่ไม่สามารถติดต่อเกษตรกรเพื่อซื้อสินค้าได้")]),t._v(" "),a("li",{staticClass:"mt-1"},[t._v("ไม่สามารถลงขายสินค้าได้")])])])],1)],1):t._e(),t._v(" "),t.isShowPolicy?a("p",{staticClass:"display-2 font-weight-light\ttext-center mt-5 mb-0"},[t._v(" เงื่อนไขการสมัครสมาชิกสำหรับ\n        "),a("span",{class:[t.policy.titleColor]},[t._v(t._s(t.policy.title))])]):t._e(),t._v(" "),t.isShowPolicy?a("v-row",{staticClass:"pa-5",attrs:{justify:"center"}},[t.policy.showBuyerPolicy?a("v-card",{staticClass:"elevation-12 mb-5"},[a("v-row",{staticClass:"pa-5"},[a("h3",[t._v(t._s(t.policy.ruleTitle))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.firstRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.secRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.thirdRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.fourthRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.fifthRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.sixthRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.seventhRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.eigthRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"red--text text--darken-1"},[t._v(t._s(t.policy.footer))])]),t._v(" "),a("v-row",{attrs:{justify:"center"}},[a("v-radio-group",{staticClass:"font-weight-black",attrs:{row:""},model:{value:t.isAgree,callback:function(e){t.isAgree=e},expression:"isAgree"}},[a("v-radio",{attrs:{label:"ไม่ยอมรับ (Unaccept)",value:"Unaccecpt"}}),t._v(" "),a("v-radio",{attrs:{label:"ยอมรับ (Accept)",value:"Accept"}})],1)],1),t._v(" "),a("v-row",{attrs:{justify:"center"}},[a("v-card-actions",[a("router-link",{attrs:{to:"register"}}),t._v(" "),a("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.acceptPolicyCheck(t.isAgree,"Buyer")}}},[t._v("ตกลง (OK)")]),t._v(" "),a("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.$router.push({name:"Home"})}}},[t._v("ยกเลิก (Cancel)")])],1)],1)],1):t._e(),t._v(" "),t.policy.showSellerPolicy?a("v-card",{staticClass:"elevation-12 mb-5"},[a("v-row",{staticClass:"pa-5"},[a("h3",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.ruleTitle))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.firstRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.secRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.thirdRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.fourthRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.fifthRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.sixthRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.seventhRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.eigthRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"font-weight-light"},[t._v(t._s(t.policy.ninethRule))])]),t._v(" "),a("v-row",{staticClass:"pa-5"},[a("h4",{staticClass:"red--text text--darken-1"},[t._v(t._s(t.policy.footer))])]),t._v(" "),a("v-row",{attrs:{justify:"center"}},[a("v-radio-group",{staticClass:"font-weight-black",attrs:{row:""},model:{value:t.isAgree,callback:function(e){t.isAgree=e},expression:"isAgree"}},[a("v-radio",{attrs:{label:"ไม่ยอมรับ (Unaccept)",value:"Unaccecpt"}}),t._v(" "),a("v-radio",{attrs:{label:"ยอมรับ (Accept)",value:"Accept"}})],1)],1),t._v(" "),a("v-row",{attrs:{justify:"center"}},[a("v-card-actions",[a("router-link",{attrs:{to:"register"}}),t._v(" "),a("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.acceptPolicyCheck(t.isAgree,"Seller")}}},[t._v("ตกลง (OK)")]),t._v(" "),a("v-btn",{attrs:{color:"primary"},on:{click:function(e){return t.$router.push({name:"Home"})}}},[t._v("ยกเลิก (Cancel)")])],1)],1)],1):t._e()],1):t._e(),t._v(" "),t.isRegisForm.buyer?a("v-row",{attrs:{justify:"center"}},[a("v-form",{model:{value:t.isFormValid,callback:function(e){t.isFormValid=e},expression:"isFormValid"}},[a("v-card",{ref:"form"},[a("v-toolbar",{attrs:{dark:"",color:"primary"}},[a("v-toolbar-title",[t._v("สมัครสมาชิกสำหรับสมาชิกทั่วไป / ผู้เข้ามาซื้อสินค้า")])],1),t._v(" "),a("v-card-text",[a("v-col",{attrs:{cols:"12"}},[a("v-row",[a("v-col",[a("v-select",{attrs:{"prepend-icon":"mdi-account-box","item-text":"prefixNameTh","item-value":"idPrefix",items:t.prefix,rules:[function(t){return!!t||"กรุณาเลือกคำนำหน้า"}],label:"คำนำหน้า*",required:""},model:{value:t.buyerForm.prefix,callback:function(e){t.$set(t.buyerForm,"prefix",e)},expression:"buyerForm.prefix"}},[t._v("*")])],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-account",name:"firstName",label:"ชื่อ*",type:"text",rules:t.firstNameRules},model:{value:t.buyerForm.firstName,callback:function(e){t.$set(t.buyerForm,"firstName",e)},expression:"buyerForm.firstName"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{name:"lastName",label:"นามสกุล*",type:"text",rules:t.lastNameRules},model:{value:t.buyerForm.lastName,callback:function(e){t.$set(t.buyerForm,"lastName",e)},expression:"buyerForm.lastName"}})],1)],1),t._v(" "),a("v-row",{attrs:{md:"12",fluid:""}},[a("v-col",{staticClass:"mr-0",attrs:{md:"6"}},[a("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("เพศ*")]),t._v(" "),a("v-radio-group",{attrs:{row:"",rules:[function(t){return!!t||"กรุณาระบุเพศ"}]},model:{value:t.buyerForm.gender,callback:function(e){t.$set(t.buyerForm,"gender",e)},expression:"buyerForm.gender"}},[a("v-radio",{attrs:{label:"ชาย",value:"ชาย"}}),t._v(" "),a("v-radio",{attrs:{label:"หญิง",value:"หญิง"}})],1)],1)],1),t._v(" "),a("v-row",{attrs:{align:"center",justify:"center"}},[t.imagePreviewURL?a("v-img",{staticClass:"grey lighten-2 mb-2",attrs:{src:t.imagePreviewURL,"lazy-src":t.imagePreviewURL,"aspect-ratio":"1","max-width":"500","max-height":"300"},scopedSlots:t._u([{key:"placeholder",fn:function(){return[a("v-row",{staticClass:"fill-height ma-0",attrs:{align:"center",justify:"center"}},[a("v-progress-circular",{attrs:{indeterminate:"",color:"grey lighten-5"}})],1)]},proxy:!0}],null,!1,4034393411)}):t._e()],1),t._v(" "),a("v-file-input",{attrs:{rules:t.imgRules,accept:"image/png, image/jpeg, image/bmp",placeholder:"เลือกรูปภาพประจำตัว",label:"รูปภาพโปรไฟล์","prepend-icon":"mdi-camera"},on:{change:t.previewImg},model:{value:t.buyerForm.img,callback:function(e){t.$set(t.buyerForm,"img",e)},expression:"buyerForm.img"}}),t._v(" "),a("v-text-field",{attrs:{"prepend-icon":"mdi-account-outline",type:"text",rules:[!t.isUsernameExist||"Username ถูกใช้งานไปแล้ว",function(t){return!!t||"กรุณากรอก Username"}],label:"Username*",required:""},on:{keyup:function(e){return t.checkUsername(t.buyerForm.username)}},model:{value:t.buyerForm.username,callback:function(e){t.$set(t.buyerForm,"username",e)},expression:"buyerForm.username"}}),t._v(" "),a("v-row",{attrs:{md:"6"}},[a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-lock",type:"password",counter:"",rules:t.passwordRules,label:"รหัสผ่าน*",required:""},model:{value:t.buyerForm.password,callback:function(e){t.$set(t.buyerForm,"password",e)},expression:"buyerForm.password"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-lock",type:"password",counter:"",rules:[t.buyerForm.password===t.confirmPassword||"รหัสผ่านไม่ตรงกัน",function(t){return!!t||"กรุณายืนยันรหัสผ่าน"}],label:"ยืนยันรหัสผ่าน*",required:""},model:{value:t.confirmPassword,callback:function(e){t.confirmPassword=e},expression:"confirmPassword"}})],1)],1),t._v(" "),a("v-row",{attrs:{md:"12"}},[a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-email",type:"email",label:"อีเมล"},model:{value:t.buyerForm.email,callback:function(e){t.$set(t.buyerForm,"email",e)},expression:"buyerForm.email"}})],1)],1),t._v(" "),a("v-row",{attrs:{md:"6"}},[a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-phone",counter:"",rules:t.phoneRules,label:"หมายเลขโทรศัพท์*",required:""},model:{value:t.buyerForm.phoneNumber,callback:function(e){t.$set(t.buyerForm,"phoneNumber",e)},expression:"buyerForm.phoneNumber"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-account-details",counter:"",maxlength:"13",label:"หมายเลขบัตรประชาชน"},model:{value:t.buyerForm.idCard,callback:function(e){t.$set(t.buyerForm,"idCard",e)},expression:"buyerForm.idCard"}})],1)],1),t._v(" "),a("v-row",{attrs:{md:"6"}},[a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-phone-plus",type:"text",label:"ไลน์ไอดี",required:""},model:{value:t.buyerForm.lineId,callback:function(e){t.$set(t.buyerForm,"lineId",e)},expression:"buyerForm.lineId"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-facebook",type:"text",label:"Facebook",required:""},model:{value:t.buyerForm.facebookName,callback:function(e){t.$set(t.buyerForm,"facebookName",e)},expression:"buyerForm.facebookName"}})],1)],1),t._v(" "),a("v-row",{attrs:{md:"6"}},[a("v-col",[a("v-text-field",{attrs:{label:"บ้านเลขที่",type:"text"},model:{value:t.buyerForm.address,callback:function(e){t.$set(t.buyerForm,"address",e)},expression:"buyerForm.address"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{label:"หมู่ (ถ้ามี)",type:"text"},model:{value:t.buyerForm.moo,callback:function(e){t.$set(t.buyerForm,"moo",e)},expression:"buyerForm.moo"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{label:"ถนน",type:"text"},model:{value:t.buyerForm.road,callback:function(e){t.$set(t.buyerForm,"road",e)},expression:"buyerForm.road"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{label:"รหัสไปรณีย์",type:"text"},model:{value:t.buyerForm.postcode,callback:function(e){t.$set(t.buyerForm,"postcode",e)},expression:"buyerForm.postcode"}})],1)],1),t._v(" "),a("v-row",{attrs:{md:"4"}},[a("v-col",[a("v-select",{attrs:{"prepend-icon":"mdi-map-marker-circle","item-text":"name","item-value":"code",items:t.allProvince,rules:[function(t){return!!t||"กรุณาเลือกจังหวัด"}],label:"จังหวัด*",required:""},on:{change:function(e){return t.findAmphurBuyer(t.buyerForm.provinceCode)}},model:{value:t.buyerForm.provinceCode,callback:function(e){t.$set(t.buyerForm,"provinceCode",e)},expression:"buyerForm.provinceCode"}})],1),t._v(" "),a("v-col",[a("v-select",{attrs:{"item-text":"ampT","item-value":"ampCode",items:t.buyerAmphur,rules:[function(t){return!!t||"กรุณาเลือกอำเภอ"}],label:"อำเภอ*",required:""},on:{change:function(e){return t.findTambolBuyer(t.buyerForm.provinceCode,t.buyerForm.amphurCode)}},model:{value:t.buyerForm.amphurCode,callback:function(e){t.$set(t.buyerForm,"amphurCode",e)},expression:"buyerForm.amphurCode"}})],1),t._v(" "),a("v-col",[a("v-select",{attrs:{"item-text":"tamT","item-value":"tamCode",items:t.buyerTambol,rules:[function(t){return!!t||"กรุณาเลือกตำบล"}],label:"ตำบล*",required:""},model:{value:t.buyerForm.tambolCode,callback:function(e){t.$set(t.buyerForm,"tambolCode",e)},expression:"buyerForm.tambolCode"}})],1)],1),t._v(" "),a("v-row",{attrs:{md:"12",fluid:""}},[a("v-col",{staticClass:"mr-0",attrs:{md:"6"}},[a("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("ประเภทสมาชิก*")]),t._v(" "),a("v-radio-group",{attrs:{row:"",rules:[function(t){return!!t||"กรุณาเลือกประเภทสมาชิก"}]},model:{value:t.buyerForm.typeOfMember,callback:function(e){t.$set(t.buyerForm,"typeOfMember",e)},expression:"buyerForm.typeOfMember"}},[a("v-radio",{attrs:{label:"สมาชิกทั่วไป",value:"Normal"}}),t._v(" "),a("v-radio",{attrs:{label:"สมาชิกผู้ซื้อ",value:"Buyer"}})],1)],1)],1),t._v(" "),a("v-row",{attrs:{md:"12",fluid:""}},[a("v-col",{staticClass:"mr-0",attrs:{md:"6"}},[a("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("คุณรู้จักเวบไซด์ของดีบนดอยได้อย่างไร*")]),t._v(" "),a("v-radio-group",{attrs:{rules:[function(t){return!!t||"กรุณาเลือกตัวเลือก"}]},on:{change:function(e){return t.questionBuyer(t.buyerForm.questionOfVisit)}},model:{value:t.buyerForm.questionOfVisit,callback:function(e){t.$set(t.buyerForm,"questionOfVisit",e)},expression:"buyerForm.questionOfVisit"}},[a("v-radio",{attrs:{label:"ค้นหาจาก Google",value:"ค้นหาจาก Google"}}),t._v(" "),a("v-radio",{attrs:{label:"เข้ามาในเวบไซด์ของสถาบันวิจัยและพัฒนาพื้นที่สูง",value:"เข้ามาในเวบไซด์ของสถาบันวิจัยและพัฒนาพื้นที่สูง"}}),t._v(" "),a("v-radio",{attrs:{label:"เพื่อน / คนรู้จักแนะ",value:"เพื่อน / คนรู้จักแนะ"}}),t._v(" "),a("v-radio",{attrs:{label:"อื่น ๆ",value:"อื่น ๆ"}})],1),t._v(" "),t.showEtc.visit?a("v-text-field",{attrs:{outlined:"",type:"text",label:"เหตุผลอื่นๆ",rules:[function(t){return!!t||"กรุณากรอกเหตุผล"}]},model:{value:t.buyerForm.questionOfVisit,callback:function(e){t.$set(t.buyerForm,"questionOfVisit",e)},expression:"buyerForm.questionOfVisit"}}):t._e()],1),t._v(" "),a("v-col",{attrs:{md:"6"}},[a("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("วัตถุประสงค์ที่สมัครสมาชิก*")]),t._v(" "),a("v-radio-group",{attrs:{rules:[function(t){return!!t||"กรุณาเลือกตัวเลือก"}]},on:{change:function(e){return t.questionObjBuyer(t.buyerForm.questionOfObjective)}},model:{value:t.buyerForm.questionOfObjective,callback:function(e){t.$set(t.buyerForm,"questionOfObjective",e)},expression:"buyerForm.questionOfObjective"}},[a("v-radio",{attrs:{label:"เข้ามาเยี่ยมชม",value:"เข้ามาเยี่ยมชม"}}),t._v(" "),a("v-radio",{attrs:{label:"เข้ามาซื้อผลผลิต",value:"เข้ามาซื้อผลผลิต"}}),t._v(" "),a("v-radio",{attrs:{label:"เข้ามาอ่าน ติดตามข้อมูลข่าวสาร",value:"เข้ามาอ่าน ติดตามข้อมูลข่าวสาร"}}),t._v(" "),a("v-radio",{attrs:{label:"อื่น ๆ",value:"อื่น ๆ"}}),t._v(" "),t.showEtc.objective?a("v-text-field",{staticClass:"mt-3",attrs:{outlined:"",type:"text",label:"เหตุผลอื่นๆ",rules:[function(t){return!!t||"กรุณากรอกเหตุผล"}]},model:{value:t.buyerForm.questionOfObjective,callback:function(e){t.$set(t.buyerForm,"questionOfObjective",e)},expression:"buyerForm.questionOfObjective"}}):t._e()],1)],1)],1)],1)],1),t._v(" "),a("v-card-actions",[a("v-btn",{attrs:{block:"",color:"primary",disabled:!t.isFormValid},on:{click:t.checkBuyerRegister}},[t._v("ยืนยันสมัครสมาชิก")])],1)],1)],1)],1):t._e(),t._v(" "),t.isRegisForm.seller1?a("v-row",{attrs:{justify:"center"}},[a("v-form",{model:{value:t.isFormValid,callback:function(e){t.isFormValid=e},expression:"isFormValid"}},[a("v-card",{ref:"form"},[a("v-toolbar",{attrs:{dark:"",color:"primary"}},[a("v-toolbar-title",[t._v("สมัครสมาชิกสำหรับผู้ขายสินค้า")])],1),t._v(" "),a("v-card-text",[a("v-col",{attrs:{cols:"12"}},[a("v-row",{attrs:{md:"4"}},[a("v-col",[a("v-select",{attrs:{"prepend-icon":"mdi-account-box","item-text":"prefixNameTh","item-value":"idPrefix",items:t.prefix,rules:[function(t){return!!t||"กรุณาเลือกคำนำหน้า"}],label:"คำนำหน้า*",required:""},model:{value:t.sellerForm.prefix,callback:function(e){t.$set(t.sellerForm,"prefix",e)},expression:"sellerForm.prefix"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-account",name:"firstName",label:"ชื่อ*",type:"text",rules:t.firstNameRules},model:{value:t.sellerForm.firstName,callback:function(e){t.$set(t.sellerForm,"firstName",e)},expression:"sellerForm.firstName"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{name:"lastName",label:"นามสกุล*",type:"text",rules:t.lastNameRules},model:{value:t.sellerForm.lastName,callback:function(e){t.$set(t.sellerForm,"lastName",e)},expression:"sellerForm.lastName"}})],1)],1),t._v(" "),a("v-row",{attrs:{md:"12",fluid:""}},[a("v-col",{staticClass:"mr-0",attrs:{md:"6"}},[a("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("เพศ*")]),t._v(" "),a("v-radio-group",{attrs:{row:"",rules:[function(t){return!!t||"กรุณาระบุเพศ"}]},model:{value:t.sellerForm.gender,callback:function(e){t.$set(t.sellerForm,"gender",e)},expression:"sellerForm.gender"}},[a("v-radio",{attrs:{label:"ชาย",value:"ชาย"}}),t._v(" "),a("v-radio",{attrs:{label:"หญิง",value:"หญิง"}})],1)],1)],1),t._v(" "),a("v-row",{attrs:{align:"center",justify:"center"}},[t.imagePreviewURL?a("v-img",{staticClass:"grey lighten-2 mb-2",attrs:{src:t.imagePreviewURL,"lazy-src":t.imagePreviewURL,"aspect-ratio":"1","max-width":"500","max-height":"300"},scopedSlots:t._u([{key:"placeholder",fn:function(){return[a("v-row",{staticClass:"fill-height ma-0",attrs:{align:"center",justify:"center"}},[a("v-progress-circular",{attrs:{indeterminate:"",color:"grey lighten-5"}})],1)]},proxy:!0}],null,!1,4034393411)}):t._e()],1),t._v(" "),a("v-file-input",{attrs:{rules:t.imgRules,accept:"image/png, image/jpeg, image/bmp",placeholder:"เลือกรูปภาพประจำตัว",label:"รูปภาพโปรไฟล์","prepend-icon":"mdi-camera"},on:{change:t.previewImg},model:{value:t.sellerForm.img,callback:function(e){t.$set(t.sellerForm,"img",e)},expression:"sellerForm.img"}}),t._v(" "),a("v-text-field",{attrs:{"prepend-icon":"mdi-account-outline",type:"text",rules:[!t.isUsernameExist||"Username ถูกใช้งานไปแล้ว",function(t){return!!t||"กรุณากรอก Username"}],label:"Username*",required:""},on:{keyup:function(e){return t.checkUsername(t.sellerForm.username)}},model:{value:t.sellerForm.username,callback:function(e){t.$set(t.sellerForm,"username",e)},expression:"sellerForm.username"}}),t._v(" "),a("v-row",{attrs:{md:"6"}},[a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-lock",type:"password",counter:"",rules:t.passwordRules,label:"รหัสผ่าน*",required:""},model:{value:t.sellerForm.password,callback:function(e){t.$set(t.sellerForm,"password",e)},expression:"sellerForm.password"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-lock",type:"password",counter:"",rules:[t.sellerForm.password===t.confirmPassword||"รหัสผ่านไม่ตรงกัน",function(t){return!!t||"กรุณายืนยันรหัสผ่าน"}],label:"ยืนยันรหัสผ่าน*",required:""},model:{value:t.confirmPassword,callback:function(e){t.confirmPassword=e},expression:"confirmPassword"}})],1)],1),t._v(" "),a("v-row",{attrs:{md:"12"}},[a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-email",type:"email",label:"อีเมล"},model:{value:t.sellerForm.email,callback:function(e){t.$set(t.sellerForm,"email",e)},expression:"sellerForm.email"}})],1)],1),t._v(" "),a("v-row",{attrs:{md:"6"}},[a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-phone",counter:"",rules:t.phoneRules,label:"หมายเลขโทรศัพท์*",required:""},model:{value:t.sellerForm.phoneNumber,callback:function(e){t.$set(t.sellerForm,"phoneNumber",e)},expression:"sellerForm.phoneNumber"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-account-details",counter:"",maxlength:"13",label:"หมายเลขบัตรประชาชน"},model:{value:t.sellerForm.idCard,callback:function(e){t.$set(t.sellerForm,"idCard",e)},expression:"sellerForm.idCard"}})],1)],1),t._v(" "),a("v-row",{attrs:{md:"6"}},[a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-phone-plus",type:"text",label:"ไลน์ไอดี",required:""},model:{value:t.sellerForm.lineId,callback:function(e){t.$set(t.sellerForm,"lineId",e)},expression:"sellerForm.lineId"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{"prepend-icon":"mdi-facebook",type:"text",label:"Facebook"},model:{value:t.sellerForm.facebookName,callback:function(e){t.$set(t.sellerForm,"facebookName",e)},expression:"sellerForm.facebookName"}})],1)],1),t._v(" "),a("v-container",{staticClass:"my-0",attrs:{fluid:""}},[a("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("ที่อยู่")]),t._v(" "),a("v-row",{attrs:{md:"6"}},[a("v-col",[a("v-text-field",{attrs:{label:"บ้านเลขที่",type:"text"},model:{value:t.sellerForm.address,callback:function(e){t.$set(t.sellerForm,"address",e)},expression:"sellerForm.address"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{label:"หมู่ (ถ้ามี)",type:"text"},model:{value:t.sellerForm.moo,callback:function(e){t.$set(t.sellerForm,"moo",e)},expression:"sellerForm.moo"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{label:"ถนน",type:"text"},model:{value:t.sellerForm.road,callback:function(e){t.$set(t.sellerForm,"road",e)},expression:"sellerForm.road"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{label:"รหัสไปรณีย์",type:"text"},model:{value:t.sellerForm.postcode,callback:function(e){t.$set(t.sellerForm,"postcode",e)},expression:"sellerForm.postcode"}})],1)],1),t._v(" "),a("v-row",{attrs:{md:"4"}},[a("v-col",[a("v-select",{attrs:{"prepend-icon":"mdi-map-marker-circle","item-text":"provinceName","item-value":"provinceId",items:t.province,rules:[function(t){return!!t||"กรุณาเลือกจังหวัด"}],label:"จังหวัด*",required:""},on:{change:function(e){return t.findAreaByProvince(t.sellerForm.vProvinceId)}},model:{value:t.sellerForm.vProvinceId,callback:function(e){t.$set(t.sellerForm,"vProvinceId",e)},expression:"sellerForm.vProvinceId"}})],1),t._v(" "),a("v-col",[a("v-select",{attrs:{"item-text":"ampT","item-value":"ampCode",items:t.amphur,rules:[function(t){return!!t||"กรุณาเลือกอำเภอ"}],label:"อำเภอ*",required:""},on:{change:function(e){return t.findTumbolByAmpCode(t.sellerForm.ampCode,t.sellerForm.vProvinceId)}},model:{value:t.sellerForm.ampCode,callback:function(e){t.$set(t.sellerForm,"ampCode",e)},expression:"sellerForm.ampCode"}})],1),t._v(" "),a("v-col",[a("v-select",{attrs:{"item-text":"tamT","item-value":"tamCode",items:t.tambol,rules:[function(t){return!!t||"กรุณาเลือกตำบล"}],label:"ตำบล*",required:""},model:{value:t.sellerForm.tambolCode,callback:function(e){t.$set(t.sellerForm,"tambolCode",e)},expression:"sellerForm.tambolCode"}})],1)],1),t._v(" "),a("v-select",{attrs:{"prepend-icon":"mdi-map-marker-circle","item-text":"areaName","item-value":"idArea",items:t.targetFilter,rules:[function(t){return!!t||"กรุณาเลือกศูนย์"}],label:"ชื่อศูนย์*",required:""},model:{value:t.sellerForm.vLinkAreaDetailId,callback:function(e){t.$set(t.sellerForm,"vLinkAreaDetailId",e)},expression:"sellerForm.vLinkAreaDetailId"}})],1),t._v(" "),a("v-select",{attrs:{"prepend-icon":"mdi-basket","item-text":"nameTypeOfSeller","item-value":"idTypeOfSeller",items:t.sellType,rules:[function(t){return!!t||"กรุณาเลือกลักษณะการจ่ายสินค้า"}],label:"ลักษณะการจำหน่ายสินค้า*",required:""},model:{value:t.sellerForm.idTypeOfSeller,callback:function(e){t.$set(t.sellerForm,"idTypeOfSeller",e)},expression:"sellerForm.idTypeOfSeller"}}),t._v(" "),a("v-text-field",{attrs:{label:"ชื่อกลุ่ม (ถ้ามี)",type:"text"},model:{value:t.sellerForm.groupName,callback:function(e){t.$set(t.sellerForm,"groupName",e)},expression:"sellerForm.groupName"}}),t._v(" "),a("v-row",{attrs:{md:"6"}},[a("v-col",[a("v-text-field",{attrs:{label:"ชื่อร้าน (ถ้ามี)",type:"text"},model:{value:t.sellerForm.shopName,callback:function(e){t.$set(t.sellerForm,"shopName",e)},expression:"sellerForm.shopName"}})],1),t._v(" "),a("v-col",[a("v-text-field",{attrs:{label:"ชื่อตราสินค้า (ถ้ามี)",type:"text"},model:{value:t.sellerForm.brandName,callback:function(e){t.$set(t.sellerForm,"brandName",e)},expression:"sellerForm.brandName"}})],1)],1),t._v(" "),a("v-container",{attrs:{fluid:""}},[a("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("ชนิดสินค้าที่ต้องการจำหน่าย (เลือกได้มากกว่า 1 ชนิด)*")]),t._v(" "),a("v-row",[a("v-col",{attrs:{cols:"12",sm:"4",md:"4"}},[a("v-checkbox",{attrs:{label:"ข้าวและธัญพืซ",value:"ข้าวและธัญพืซ"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}}),t._v(" "),a("v-checkbox",{attrs:{label:"ผักและสมุนไพร",value:"ผักและสมุนไพร"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}}),t._v(" "),a("v-checkbox",{attrs:{label:"ผลไม้",value:"ผลไม้"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}})],1),t._v(" "),a("v-col",{attrs:{cols:"12",sm:"4",md:"4"}},[a("v-checkbox",{attrs:{label:"ไม้ดอกไม้ประดับ",value:"ไม้ดอกไม้ประดับ"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}}),t._v(" "),a("v-checkbox",{attrs:{label:"ผลิตภัณฑ์แปรรูป",value:"ผลิตภัณฑ์แปรรูป"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}}),t._v(" "),a("v-checkbox",{attrs:{label:"ชา กาแฟ และโกโก้",value:"ชา กาแฟ และโกโก้"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}})],1),t._v(" "),a("v-col",{attrs:{cols:"12",sm:"4",md:"4"}},[a("v-checkbox",{attrs:{label:"หัตถกรรม",value:"หัตถกรรม"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}}),t._v(" "),a("v-checkbox",{attrs:{label:"พืซท้องถิ่น",value:"พืซท้องถิ่น"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}}),t._v(" "),a("v-checkbox",{attrs:{label:"ปศุสัตว์ และประมง",value:"ปศุสัตว์ และประมง"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}})],1)],1)],1)],1)],1),t._v(" "),a("v-card-actions",[a("v-btn",{attrs:{block:"",color:"primary",disabled:!t.isFormValid},on:{click:t.checkSellerRegister}},[t._v("ยืนยันสมัครสมาชิก")])],1)],1)],1)],1):t._e()],1)],1)],1)},staticRenderFns:[]};var Q=r("VU/8")(X,Z,!1,function(t){r("0T9L")},"data-v-d0b1e1ce",null).exports,W={data:function(){return{aboutContent:[]}},methods:{getAboutUs:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/aboutus/getAboutUs.php").then(function(e){t.aboutContent=e.data.aboutus[0],console.log(t.aboutContent)})}},mounted:function(){this.getAboutUs()}},tt={render:function(){var t=this.$createElement,e=this._self._c||t;return e("v-container",[e("p",{staticClass:"display-3 font-weight-bold text-center pa-4",staticStyle:{color:"#074d66"}},[this._v(this._s(this.aboutContent.aboutTitle))]),this._v(" "),e("v-container",{attrs:{fluid:""}},[e("v-row",[e("v-col",{staticClass:"content",attrs:{md:"12",lg:"12"},domProps:{innerHTML:this._s(this.aboutContent.aboutBody)}})],1)],1)],1)},staticRenderFns:[]};var et=r("VU/8")(W,tt,!1,function(t){r("kapU")},null,null).exports,rt=r("nrd6"),at=r("iI18"),ot={components:{LMap:at.a,LTileLayer:at.d,LMarker:at.b,LTooltip:at.e,LPopup:at.c},data:function(){return{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",zoom:5.5,center:[17.87,100.9925],bounds:null,showAmount:!0,showDetails:!1,isShowListProduct:!1,selectedItem:1,productByArea:[],productMk:[],nameTypeOfArgiMk:"",nameOfArgi:"",area:[],markers:[],pane:"Test",productByArgi:[],productByArgiList:[]}},methods:{productDetail:function(t){this.$router.push({name:"ProductDetail",params:{idProductOfMemberMk:t}})},backFromArea:function(){this.zoomUpdated(5.5),this.showAmount=!1,this.showDetails=!0,this.isShowListProduct=!1},showProduct:function(t,e,r,a){var o=this;console.log(r,a);var i={lat:r,lng:a};this.$refs.productMap.mapObject.flyTo(i,12);var s=new FormData;s.append("idSellerMember",t),s.append("idAgri",e),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/map/getProductFromArea.php",s).then(function(t){o.showDetails=!1,o.isShowListProduct=!0,o.productByArea=t.data.productByArea,console.log("productByArea",o.productByArea)}).catch(function(t){console.log(t)})},itemClick:function(t,e){this.nameOfArgi=e,this.getProductByArgi(t),this.showAmount=!1,this.showDetails=!0},back:function(){this.showAmount=!0,this.showDetails=!1},zoomUpdated:function(t){this.zoom=t},centerUpdated:function(t){this.center=t},boundsUpdated:function(t){this.bounds=t},getProductByArgi:function(t){var e=this;this.zoomUpdated(5.5);var r=new FormData;r.append("idAgri",t),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/map/getProductByArgi.php",r).then(function(t){0!==t.data.productByArgi&&(e.productByArgi=t.data.productByArgi,e.productByArgiList=e.productByArgi.filter(function(t,e,r){return r.findIndex(function(e){return e.idSellerMember===t.idSellerMember&&e.idSellerMember===t.idSellerMember})===e}),console.log("productByArgi",e.productByArgi),console.log("productByArgiList",e.productByArgiList),e.markers=e.productByArgiList.map(function(t,e){return{id:e,position:{lat:parseFloat(t.lat),lng:parseFloat(t.long)},tooltip:t.areaName,idArea:t.idArea,idAgri:t.idAgri,idSellerMember:t.idSellerMember,areaName:t.areaName,visible:!0,lat:parseFloat(t.lat),lng:parseFloat(t.long)}}),console.log("markers",e.markers))}).catch(function(t){console.log(t)})},productByType:function(){var t=this,e=new FormData;e.append("idTypeOfArgi",this.$route.params.idTypeOfArgi),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/map/getProductByType.php",e).then(function(e){0!==e.data.productMk&&(t.productMk=e.data.productMk,t.productMk=t.productMk.filter(function(t,e,r){return r.findIndex(function(e){return e.nameArgi===t.nameArgi&&e.nameArgi===t.nameArgi})===e}),console.log("productMk",t.productMk))}).catch(function(t){console.log(t)})}},mounted:function(){this.nameTypeOfArgiMk=this.$route.params.nameTypeOfArgi,this.productByType()}},it={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-container",{attrs:{fluid:"","fill-height":""}},[r("v-layout",{attrs:{"align-center":"","justify-center":""}},[r("v-flex",{staticClass:"pa-5",attrs:{sm12:"",md9:"",lg12:""}},[r("v-row",{attrs:{cols:"12"}},[t.showAmount?r("v-col",{attrs:{cols:"12"}},[r("v-card",{staticClass:"mx-auto",attrs:{tile:""}},[r("v-toolbar",{attrs:{color:"primary",dark:""}},[r("v-icon",{staticClass:"mr-2"},[t._v("mdi-barn")]),t._v(" "),r("v-toolbar-title",[t._v("สินค้าประเภท "+t._s(t.nameTypeOfArgiMk))])],1),t._v(" "),r("v-list",[r("v-list-item-group",{attrs:{color:"primary"}},t._l(t.productMk,function(e){return r("v-list-item",{key:e.idAgri,on:{click:function(r){return t.itemClick(e.idAgri,e.nameArgi)}}},[r("v-list-item-content",[r("v-list-item-title",{domProps:{textContent:t._s(e.nameArgi)}})],1)],1)}),1)],1)],1)],1):t._e(),t._v(" "),t.showDetails?r("v-row",{attrs:{md:"12"}},[r("v-col",{attrs:{cols:"12"}},[r("l-map",{ref:"productMap",staticStyle:{"z-index":"0",height:"500px",width:"100%"},attrs:{zoom:t.zoom,center:t.center},on:{"update:zoom":t.zoomUpdated,"update:center":t.centerUpdated,"update:bounds":t.boundsUpdated}},[r("l-tile-layer",{attrs:{url:t.url}}),t._v(" "),t._l(t.markers,function(e){return r("l-marker",{key:e.id,attrs:{visible:e.visible,"lat-lng":e.position,icon:e.icon},on:{"update:latLng":function(r){return t.$set(e,"position",r)},"update:lat-lng":function(r){return t.$set(e,"position",r)},click:function(r){return t.showProduct(e.idSellerMember,e.idAgri,e.lat,e.lng)}}},[r("l-tooltip",{attrs:{content:e.tooltip,options:{permanent:!0}}})],1)})],2)],1),t._v(" "),r("v-col",{attrs:{cols:"12"}},[r("v-card",{staticClass:"mx-auto",attrs:{tile:""}},[r("v-toolbar",{attrs:{color:"primary",dark:""}},[r("v-icon",{staticClass:"mr-2",on:{click:t.back}},[t._v("mdi-arrow-left-thick")]),t._v(" "),r("v-toolbar-title",[t._v("รายชื่อศูนย์ ["+t._s(t.nameOfArgi||"-")+"]")])],1),t._v(" "),r("v-simple-table",{scopedSlots:t._u([{key:"default",fn:function(){return[r("thead",[r("tr",[r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ชื่อกลุ่ม")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("จังหวัด")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ชื่อศูนย์")])])])]),t._v(" "),r("tbody",t._l(t.productByArgiList,function(e,a){return r("tr",{key:a,staticStyle:{cursor:"pointer"},on:{click:function(r){t.showProduct(e.idSellerMember,e.idAgri,parseFloat(e.lat),parseFloat(e.long))}}},[r("td",[t._v(t._s(e.groupName||"-"))]),t._v(" "),r("td",[t._v(t._s(e.provinceName))]),t._v(" "),r("td",[t._v(t._s(e.areaName))])])}),0)]},proxy:!0}],null,!1,554285963)})],1)],1)],1):t._e(),t._v(" "),t.isShowListProduct?r("v-row",{attrs:{cols:"12"}},[r("v-col",{attrs:{cols:"12"}},[r("l-map",{ref:"productMap",staticStyle:{"z-index":"0",height:"500px",width:"100%"},attrs:{zoom:t.zoom,center:t.center},on:{"update:zoom":t.zoomUpdated,"update:center":t.centerUpdated,"update:bounds":t.boundsUpdated}},[r("l-tile-layer",{attrs:{url:t.url}}),t._v(" "),t._l(t.markers,function(e){return r("l-marker",{key:e.id,attrs:{visible:e.visible,"lat-lng":e.position,icon:e.icon},on:{"update:latLng":function(r){return t.$set(e,"position",r)},"update:lat-lng":function(r){return t.$set(e,"position",r)},click:function(r){return t.showProduct(e.idSellerMember,e.idAgri,e.lat,e.lng,e.areaName)}}},[r("l-tooltip",{attrs:{content:e.tooltip,options:{permanent:!0}}})],1)})],2)],1),t._v(" "),r("v-col",{attrs:{cols:"12"}},[r("v-col",[r("v-card",{staticClass:"mx-auto",attrs:{tile:""}},[r("v-toolbar",{attrs:{color:"primary",dark:""}},[r("v-icon",{staticClass:"mr-2",on:{click:function(e){return t.backFromArea()}}},[t._v("mdi-arrow-left-thick")]),t._v(" "),r("v-toolbar-title",[t._v("สินค้าภายในพื้นที่")])],1),t._v(" "),r("v-simple-table",{staticClass:"pa-5",scopedSlots:t._u([{key:"default",fn:function(){return[r("thead",[r("tr",[r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("รูปสินค้า")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ชื่อสินค้า")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("สายพันธ์")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("รายละเอียดสินค้า")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ราคา")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ชื่อกลุ่ม")])])])]),t._v(" "),r("tbody",t._l(t.productByArea,function(e,a){return r("tr",{key:a,staticStyle:{cursor:"pointer"},on:{click:function(r){return t.productDetail(e.idProductOfMemberMk)}}},[r("td",[r("v-img",{attrs:{width:"100",height:"100",src:e.titleImg,"lazy-src":e.titleImg}})],1),t._v(" "),r("td",[t._v(" "+t._s(e.nameArgi))]),t._v(" "),r("td",[t._v(t._s(e.speciesName||"-"))]),t._v(" "),r("td",[t._v(t._s(e.detailOfProduct||"-"))]),t._v(" "),r("td",[t._v(t._s(e.priceBegin===e.priceEnd?"฿"+e.priceEnd:"฿"+e.priceBegin+" - ฿"+e.priceEnd)+" / "+t._s(e.nameUnit))]),t._v(" "),r("td",[t._v(t._s(e.groupName))])])}),0)]},proxy:!0}],null,!1,3543433648)})],1)],1)],1)],1):t._e()],1)],1)],1)],1)},staticRenderFns:[]},st=r("VU/8")(ot,it,!1,null,null,null).exports,nt={data:function(){return{baseUrl:"https://farmtd.hrdi.or.th/farmdd/admin/api/",productMk:[],page:1,perPage:6,contentType:[],contentData:[],newsContent:[],filterImg:[],productContent:[],argiItems:[],selection:0}},computed:{visiblePages:function(){return this.newsContent.slice((this.page-1)*this.perPage,this.page*this.perPage)},visibleContentPages:function(){return this.productContent.slice((this.page-1)*this.perPage,this.page*this.perPage)}},methods:{getTypeOfArgi:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getAllTypeOfArgiTD.php").then(function(e){e.data.typeOfArgi.length>0&&(t.argiItems=e.data.typeOfArgi,t.argiItems=t.argiItems.filter(function(t,e){return null!==t.nameTypeOfArgi_MK}),console.log("getAllTypeOfArgiTD",t.argiItems))}).catch(function(t){console.log(t)})},toThaiDateString:function(t){var e=t.getFullYear()+543,r=["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม.","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"][t.getMonth()];return t.getDate()+" "+r+" "+e+" "+t.getHours().toString().padStart(2,"0")+":"+t.getMinutes().toString().padStart(2,"0")+":"+t.getSeconds().toString().padStart(2,"0")+" น."}},mounted:function(){this.getTypeOfArgi()}},lt={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("v-container",[a("v-row",{attrs:{"no-gutters":""}},[a("v-col",{attrs:{cols:12}},[a("v-card-text",{attrs:{tile:"",outlined:""}},[a("v-card-title",[a("h3",[t._v("หมวดสินค้าหลัก")])]),t._v(" "),a("v-divider"),t._v(" "),a("div",{staticClass:"row"},t._l(t.argiItems,function(e,o){return a("v-flex",{key:o,staticClass:"lg5-custom pa-3",attrs:{md4:""}},[a("v-hover",{attrs:{"open-delay":"200"},scopedSlots:t._u([{key:"default",fn:function(o){var i=o.hover;return[a("v-card",{attrs:{elevation:i?16:2}},[a("v-img",{staticClass:"white--text align",attrs:{src:r("jBLA")("./"+e.nameTypeOfArgi_MK+".jpeg"),height:"200px"}}),t._v(" "),a("v-card-text",[a("v-row",{attrs:{justify:"center"}},[a("h2",{staticClass:"green--text"},[t._v(" "+t._s(e.nameTypeOfArgi_MK))])])],1),t._v(" "),a("div",{staticClass:"text-center"},[a("v-btn",{staticClass:"ma-2",attrs:{to:{name:"TypeList",params:{idTypeOfArgi:e.idTypeOfArgi,nameTypeOfArgi:e.nameTypeOfArgi_MK}},outlined:"",color:"info"}},[t._v("\n                      ดูเพิ่มเติม\n                    ")])],1)],1)]}}],null,!0)})],1)}),1)],1)],1)],1),t._v(" "),t._l(t.filterImg,function(t,e){return a("div",{key:e,staticClass:"col-md-3 col-sm-6 col-xs-12"},[a("v-img",{attrs:{height:"200px",src:t.imgTitle}})],1)})],2)],1)},staticRenderFns:[]},ct=r("VU/8")(nt,lt,!1,null,null,null).exports,dt={props:["file"],data:function(){return{dataUrl:null}},created:function(){var t=this,e=new FileReader;e.addEventListener("load",function(){t.dataUrl=e.result},!1),e.readAsDataURL(this.file)}},ut={render:function(){var t=this.$createElement,e=this._self._c||t;return e("v-col",{attrs:{md:"4"}},[this.dataUrl?e("v-img",{attrs:{src:this.dataUrl,alt:this.file.name}}):this._e()],1)},staticRenderFns:[]},mt=r("VU/8")(dt,ut,!1,null,null,null).exports,pt={components:{imgPreview:mt},data:function(){var t;return t={imagePreviewURL:"",isLoading:!1,isFormValid:!1,showContent:{seller:!1,buyer:!1,product:!1},activeBtn:0,typeOfArgi:[],argiTd:[],mini:!1,drawer:!0,userInfo:[],productMk:[],groupName:""},y()(t,"isLoading",!1),y()(t,"baseUrl","https://farmtd.hrdi.or.th/farmdd/admin/api/"),t},computed:{cardWidth:function(){return this.mini?56:256}},methods:{editProduct:function(t){this.$router.push({name:"EditProduct",params:{idProductOfMemberMk:t}})},errMsg:function(t){this.$swal.fire({icon:"info",title:t,showConfirmButton:!0,allowOutsideClick:!1}),this.remove(this.productForm.img.length-1)},findProductName:function(t){this.productByArgiType=[],this.productByArgiType=this.argiTd.filter(function(e){return e.TypeOfArgiIdTypeOfArgi===t}),console.log("productByArgiType",this.productByArgiType)},showAddProduct:function(){this.showContent={seller:!1,buyer:!1,product:!0}},getUserInfo:function(){var t=this,e=new FormData;e.append("username",localStorage.user),"Seller"===localStorage.typeOfMember?(e.append("table","SellerMember_MK"),p.a.post(this.baseUrl+"member/postFindSellerInfo.php",e).then(function(e){0!==e.data.sellerUser&&(t.userInfo=e.data.sellerUser[0],t.userInfo.sellerImg="https://farmtd.hrdi.or.th/farmdd/admin/upload/profile/"+e.data.sellerUser[0].sellerImg,t.showContent.seller=!0,console.log("userInfo",t.userInfo))}).catch(function(t){console.log(t)})):p.a.post(this.baseUrl+"member/postFindUserInfo.php",e).then(function(e){0!==e.data.buyerUser&&(t.userInfo=e.data.buyerUser[0],t.userInfo.buyerImg="https://farmtd.hrdi.or.th/farmdd/admin/upload/profile/"+e.data.buyerUser[0].buyerImg,t.showContent.buyer=!0,console.log("userInfo",t.userInfo))}).catch(function(t){console.log(t)})},checkLogin:function(){""!==localStorage.idMember&&null!==localStorage.idMember&&void 0!==localStorage.idMember||this.$router.push({name:"Login"})},showUserProfile:function(){this.showContent.product=!1,"Seller"===localStorage.typeOfMember?this.showContent.seller=!0:this.showContent.buyer=!0},productMember:function(){var t=this,e=localStorage.idMember,r=new FormData;r.append("idSellerMemberMk",e),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/product/getProductBySeller.php",r).then(function(e){t.productMk=e.data.productMk,(t.groupName=""!==t.productMk[0].groupName)&&(t.groupName=t.productMk[0].groupName),console.log("productMk",t.productMk)}).catch(function(t){console.log(t)})}},mounted:function(){this.checkLogin(),this.getUserInfo(),this.productMember()},created:function(){}},vt={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-container",{staticClass:"ma-0 d-flex flex-row align-start pa-0 align-stretch",attrs:{fluid:""}},[t.$vuetify.breakpoint.xsOnly?r("v-container",{attrs:{fluid:""}},[r("v-bottom-navigation",{staticStyle:{"overflow-x":"scroll"},attrs:{value:t.activeBtn,color:"primary","active-class":"active",horizontal:""}},[r("v-btn",{staticClass:"body-2 font-weight-bold",on:{click:function(e){return t.showUserProfile()}}},[r("span",{staticClass:"mt-1"},[t._v("ข้อมูลสมาชิก")])]),t._v(" "),r("v-btn",{staticClass:"body-2 font-weight-bold",on:{click:function(e){return t.showAddProduct()}}},[r("span",{staticClass:"mt-1"},[t._v("สินค้า")])])],1),t._v(" "),t.showContent.seller?r("v-col",[r("v-container",{staticClass:"mr-auto",attrs:{fluid:""}},[r("v-card",{staticClass:"mx-auto",attrs:{"max-width":"500"}},[r("v-layout",{attrs:{column:"","align-center":""}},[r("v-avatar",{staticClass:"my-3",attrs:{size:"150"}},[r("img",{attrs:{src:t.userInfo.sellerImg}})]),t._v(" "),r("v-card-text",{staticClass:"headline text-md-center py-0"},[t._v(t._s(t.userInfo.firstName+t.userInfo.lastName))]),t._v(" "),r("v-card-text",{staticClass:"text-md-center pt-1 pb-4"},[t._v(t._s(t.userInfo.nameTypeOfSeller))])],1),t._v(" "),r("v-card-text",{staticClass:"text--primary text-center ma-2"},[r("v-row",[r("v-col",[t._v("เลขบัตรประชาชน : "+t._s(t.userInfo.idCard||"-"))]),t._v(" "),r("v-col",[t._v("หมายเลขโทรศัพท์ "+t._s(t.userInfo.phoneNumber||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("จังหวัด "+t._s(t.userInfo.provinceName||"-"))]),t._v(" "),r("v-col",[t._v("อำเภอ "+t._s(t.userInfo.amphurName||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("หมู่ "+t._s(t.userInfo.moo||"-"))]),t._v(" "),r("v-col",[t._v("ถนน "+t._s(t.userInfo.road||"-"))]),t._v(" "),r("v-col",[t._v("ตำบล "+t._s(t.userInfo.tambolName||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("พื้นที่โครงการ "+t._s(t.userInfo.areaName||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("ประเภทสินค้า "+t._s(t.userInfo.productType||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("สถานะสมาชิก : "+t._s("1"===t.userInfo.statusOfMember?"ได้รับการยืนยันแล้ว":"ยังไม่ได้รับการยืนยัน"))])],1)],1),t._v(" "),r("v-card-actions",[r("v-btn",{attrs:{color:"orange",text:"",to:"/editseller"}},[t._v("\n              แก้ไขข้อมูล\n            ")])],1)],1)],1)],1):t._e(),t._v(" "),t.showContent.buyer?r("v-col",[r("v-container",{staticClass:"mr-auto",attrs:{fluid:""}},[r("v-card",{staticClass:"mx-auto",attrs:{"max-width":"400"}},[r("v-layout",{attrs:{column:"","align-center":""}},[r("v-avatar",{staticClass:"my-3",attrs:{size:"150"}},[r("img",{attrs:{src:t.userInfo.buyerImg}})]),t._v(" "),r("v-card-text",{staticClass:"headline text-md-center py-0"},[t._v(t._s(t.userInfo.firstName+" "+t.userInfo.lastName))]),t._v(" "),r("v-card-text",{staticClass:"text-md-center pt-1 pb-4"},[t._v(t._s("Normal"===t.userInfo.typeOfMember?"สมาชิกทั่วไป":"สมาชิกผู้ซื้อ"))])],1),t._v(" "),r("v-card-text",{staticClass:"text--primary text-center ma-2"},[r("v-row",[r("v-col",[t._v("เลขบัตรประชาชน : "+t._s(t.userInfo.idCard||"-"))]),t._v(" "),r("v-col",[t._v("หมายเลขโทรศัพท์ "+t._s(t.userInfo.phoneNumber||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("จังหวัด "+t._s(t.userInfo.provinceName||"-"))]),t._v(" "),r("v-col",[t._v("อำเภอ "+t._s(t.userInfo.amphurName||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("หมู่ "+t._s(t.userInfo.moo||"-"))]),t._v(" "),r("v-col",[t._v("ถนน "+t._s(t.userInfo.road||"-"))]),t._v(" "),r("v-col",[t._v("ตำบล "+t._s(t.userInfo.tambolName||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("พื้นที่โครงการ "+t._s(t.userInfo.areaName||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("ประเภทสินค้า "+t._s(t.userInfo.productType||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("สถานะสมาชิก : "+t._s("1"===t.userInfo.productType?"ได้รับการยืนยันแล้ว":"ยังไม่ได้รับการยืนยัน"))])],1)],1),t._v(" "),r("v-card-actions",[r("v-btn",{attrs:{color:"orange",text:"",to:"/editprofile"}},[t._v("\n              แก้ไขข้อมูล\n            ")])],1)],1)],1)],1):t._e(),t._v(" "),t.showContent.product?r("v-row",{staticClass:"mt-3 mx-auto"},[r("v-btn",{attrs:{dark:"",color:"green",to:"addproduct"}},[t._v("เพิ่มสินค้า")]),t._v(" "),r("v-container",{attrs:{fluid:""}},[r("v-card",{staticClass:"mx-auto",attrs:{tile:""}},[r("v-toolbar",{attrs:{color:"primary",dark:""}},[r("v-toolbar-title",[t._v("สินค้าที่ขาย")])],1),t._v(" "),r("v-simple-table",{staticClass:"pa-5",scopedSlots:t._u([{key:"default",fn:function(){return[r("thead",[r("tr",[r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("รูปสินค้า")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ชื่อสินค้า")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ชื่อองค์กร")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ราคา")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ประเภทสินค้า")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ประเภทผู้ขาย")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("แก้ไขสินค้า")])])])]),t._v(" "),r("tbody",t._l(t.productMk,function(e,a){return r("tr",{key:a},[r("td",[r("v-img",{attrs:{width:"100",height:"100",src:e.titleImg,"lazy-src":e.titleImg}})],1),t._v(" "),r("td",[t._v(" "+t._s(e.nameArgi))]),t._v(" "),r("td",[t._v(" "+t._s(e.groupName))]),t._v(" "),r("td",[t._v(t._s(e.priceBegin===e.priceEnd?"฿"+e.priceEnd:"฿"+e.priceBegin+" - ฿"+e.priceEnd)+" / "+t._s(e.nameUnit))]),t._v(" "),r("td",[t._v(" "+t._s(e.nameTypeOfArgi))]),t._v(" "),r("td",[t._v(" "+t._s(e.nameTypeOfSeller))]),t._v(" "),r("td",[r("v-btn",{attrs:{color:"primary"},on:{click:function(r){return t.editProduct(e.idProductOfMemberMk)}}},[t._v("แก้ไขสินค้า")])],1)])}),0)]},proxy:!0}],null,!1,3350524845)})],1)],1)],1):t._e()],1):t._e(),t._v(" "),t.$vuetify.breakpoint.smAndUp?r("v-row",{attrs:{cols:"12"}},[r("v-col",{staticClass:"ma-0 pt-0 pb-0",attrs:{md:"2"}},[r("v-card",{attrs:{tile:"",height:"1200",width:"200"}},[r("v-navigation-drawer",{staticClass:"pa-1",attrs:{color:"primary",absolute:"",permanent:"",left:"","mini-variant":t.mini,dark:""},on:{"update:miniVariant":function(e){t.mini=e},"update:mini-variant":function(e){t.mini=e}},scopedSlots:t._u([{key:"prepend",fn:function(){return[r("v-list-item",{staticClass:"px-2"},[r("v-list-item-avatar",[r("img",{attrs:{src:t.userInfo.sellerImg?t.userInfo.sellerImg:t.userInfo.buyerImg}})]),t._v(" "),r("v-list-item-content",[r("v-list-item-title",[t._v(t._s(t.userInfo.firstName))])],1),t._v(" "),r("v-btn",{attrs:{icon:""},on:{click:function(e){e.stopPropagation(),t.mini=!t.mini}}},[r("v-icon",[t._v("mdi-chevron-left")])],1)],1)]},proxy:!0}],null,!1,2585266617),model:{value:t.drawer,callback:function(e){t.drawer=e},expression:"drawer"}},[t._v(" "),r("v-divider"),t._v(" "),r("v-list",[r("v-list-item",{on:{click:function(e){return t.showUserProfile()}}},[r("v-list-item-icon",[r("v-icon",[t._v("mdi-account-box")])],1),t._v(" "),r("v-list-item-content",[r("v-list-item-title",[t._v("ข้อมูลสมาชิก")])],1)],1),t._v(" "),r("v-list-item",{attrs:{link:""},on:{click:function(e){return t.showAddProduct()}}},[r("v-list-item-icon",[r("v-icon",[t._v("mdi-basket")])],1),t._v(" "),r("v-list-item-content",[r("v-list-item-title",[t._v("สินค้า")])],1)],1)],1)],1)],1)],1),t._v(" "),t.showContent.seller?r("v-col",[r("v-container",{staticClass:"mr-auto",attrs:{fluid:""}},[r("v-card",{staticClass:"mx-auto",attrs:{"max-width":"500"}},[r("v-layout",{attrs:{column:"","align-center":""}},[r("v-avatar",{staticClass:"my-3",attrs:{size:"150"}},[r("img",{attrs:{src:t.userInfo.sellerImg}})]),t._v(" "),r("v-card-text",{staticClass:"headline text-md-center py-0"},[t._v(t._s(t.userInfo.firstName+t.userInfo.lastName))]),t._v(" "),r("v-card-text",{staticClass:"text-md-center pt-1 pb-4"},[t._v(t._s(t.userInfo.nameTypeOfSeller))])],1),t._v(" "),r("v-card-text",{staticClass:"text--primary text-center ma-2"},[r("v-row",[r("v-col",[t._v("เลขบัตรประชาชน : "+t._s(t.userInfo.idCard||"-"))]),t._v(" "),r("v-col",[t._v("หมายเลขโทรศัพท์ "+t._s(t.userInfo.phoneNumber||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("จังหวัด "+t._s(t.userInfo.provinceName||"-"))]),t._v(" "),r("v-col",[t._v("อำเภอ "+t._s(t.userInfo.amphurName||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("หมู่ "+t._s(t.userInfo.moo||"-"))]),t._v(" "),r("v-col",[t._v("ถนน "+t._s(t.userInfo.road||"-"))]),t._v(" "),r("v-col",[t._v("ตำบล "+t._s(t.userInfo.tambolName||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("พื้นที่โครงการ "+t._s(t.userInfo.areaName||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("ประเภทสินค้า "+t._s(t.userInfo.productType||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("สถานะสมาชิก : "+t._s("1"===t.userInfo.statusOfMember?"ได้รับการยืนยันแล้ว":"ยังไม่ได้รับการยืนยัน"))])],1)],1),t._v(" "),r("v-card-actions",[r("v-btn",{attrs:{color:"orange",text:"",to:"/editseller"}},[t._v("\n              แก้ไขข้อมูล\n            ")])],1)],1)],1)],1):t._e(),t._v(" "),t.showContent.buyer?r("v-col",[r("v-container",{staticClass:"mr-auto",attrs:{fluid:""}},[r("v-card",{staticClass:"mx-auto",attrs:{"max-width":"400"}},[r("v-layout",{attrs:{column:"","align-center":""}},[r("v-avatar",{staticClass:"my-3",attrs:{size:"150"}},[r("img",{attrs:{src:t.userInfo.buyerImg}})]),t._v(" "),r("v-card-text",{staticClass:"headline text-md-center py-0"},[t._v(t._s(t.userInfo.firstName+" "+t.userInfo.lastName))]),t._v(" "),r("v-card-text",{staticClass:"text-md-center pt-1 pb-4"},[t._v(t._s("Normal"===t.userInfo.typeOfMember?"สมาชิกทั่วไป":"สมาชิกผู้ซื้อ"))])],1),t._v(" "),r("v-card-text",{staticClass:"text--primary text-center ma-2"},[r("v-row",[r("v-col",[t._v("เลขบัตรประชาชน : "+t._s(t.userInfo.idCard||"-"))]),t._v(" "),r("v-col",[t._v("หมายเลขโทรศัพท์ "+t._s(t.userInfo.phoneNumber||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("จังหวัด "+t._s(t.userInfo.provinceName||"-"))]),t._v(" "),r("v-col",[t._v("อำเภอ "+t._s(t.userInfo.amphurName||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("หมู่ "+t._s(t.userInfo.moo||"-"))]),t._v(" "),r("v-col",[t._v("ถนน "+t._s(t.userInfo.road||"-"))]),t._v(" "),r("v-col",[t._v("ตำบล "+t._s(t.userInfo.tambolName||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("พื้นที่โครงการ "+t._s(t.userInfo.areaName||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("ประเภทสินค้า "+t._s(t.userInfo.productType||"-"))])],1),t._v(" "),r("v-row",[r("v-col",[t._v("สถานะสมาชิก : "+t._s("1"===t.userInfo.productType?"ได้รับการยืนยันแล้ว":"ยังไม่ได้รับการยืนยัน"))])],1)],1),t._v(" "),r("v-card-actions",[r("v-btn",{attrs:{color:"orange",text:"",to:"/editprofile"}},[t._v("\n              แก้ไขข้อมูล\n            ")])],1)],1)],1)],1):t._e(),t._v(" "),t.showContent.product?r("v-col",{staticClass:"mt-3 mx-auto",attrs:{cols:"8"}},[r("v-btn",{attrs:{dark:"",color:"green",to:"addproduct"}},[t._v("เพิ่มสินค้า")]),t._v(" "),r("v-container",{staticClass:"mr-auto",attrs:{fluid:""}},[r("v-card",{staticClass:"mx-auto",attrs:{tile:""}},[r("v-toolbar",{attrs:{color:"primary",dark:""}},[r("v-toolbar-title",[t._v("สินค้าที่ขาย")])],1),t._v(" "),r("v-simple-table",{staticClass:"pa-5",scopedSlots:t._u([{key:"default",fn:function(){return[r("thead",[r("tr",[r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("รูปสินค้า")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ชื่อสินค้า")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ชื่อองค์กร")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ราคา")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ประเภทสินค้า")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("ประเภทผู้ขาย")])]),t._v(" "),r("th",{staticClass:"text-left font-weight-black indigo--text text--darken-3"},[r("h3",[t._v("แก้ไขสินค้า")])])])]),t._v(" "),r("tbody",t._l(t.productMk,function(e,a){return r("tr",{key:a},[r("td",[r("v-img",{attrs:{width:"100",height:"100",src:e.titleImg,"lazy-src":e.titleImg}})],1),t._v(" "),r("td",[t._v(" "+t._s(e.nameArgi))]),t._v(" "),r("td",[t._v(" "+t._s(e.groupName))]),t._v(" "),r("td",[t._v(t._s(e.priceBegin===e.priceEnd?"฿"+e.priceEnd:"฿"+e.priceBegin+" - ฿"+e.priceEnd)+" / "+t._s(e.nameUnit))]),t._v(" "),r("td",[t._v(" "+t._s(e.nameTypeOfArgi))]),t._v(" "),r("td",[t._v(" "+t._s(e.nameTypeOfSeller))]),t._v(" "),r("td",[r("v-btn",{attrs:{color:"primary"},on:{click:function(r){return t.editProduct(e.idProductOfMemberMk)}}},[t._v("แก้ไขสินค้า")])],1)])}),0)]},proxy:!0}],null,!1,3350524845)})],1)],1)],1):t._e()],1):t._e()],1)},staticRenderFns:[]},ht=r("VU/8")(pt,vt,!1,null,null,null).exports;var ft,gt={data:function(){var t;return t={imagePreviewURL:null,isFormValid:!1,prefix:[],confirmPassword:"",isUsernameExist:!1,buyerForm:{prefix:"",firstName:"",lastName:"",username:"",phoneNumber:"",email:"",idCard:"",password:"",img:[],provinceCode:"",typeOfMember:"",amphurCode:"",tambolCode:"",lineId:"",postcode:"",facebookName:"",address:"",moo:"",road:"",questionOfVisit:"",questionOfObjective:""},targetName:[],targetFilter:[],allProvince:[],buyerAmphur:[],buyerTambol:[],showEtc:{visit:!1,objective:!1}},y()(t,"isUsernameExist",!1),y()(t,"baseUrl","https://farmtd.hrdi.or.th/farmdd/admin/api/"),y()(t,"firstNameRules",[function(t){return!!t||"กรุณากรอกชื่อ"}]),y()(t,"lastNameRules",[function(t){return!!t||"กรุณากรอกนามสกุล"}]),y()(t,"emailRules",[function(t){return/.+@.+/.test(t)||"อีเมลต้องอยู่ในรูปแบบที่ถูกต้อง"}]),y()(t,"phoneRules",[function(t){return!t.length<10||"หมายเลขโทรศัพท์ต้องมีจำนวน 10 หลัก"},function(t){return!!t||"กรุณากรอกหมายเลขโทรศัพท์"},function(t){return/^0[0-9]{9}/.test(t)||"หมายเลขโทรศัพท์ต้องอยู่ในรูปแบบที่ถูกต้อง"}]),y()(t,"passwordRules",[function(t){return!!t||"กรุณากรอกรหัสผ่าน"},function(t){return/[A-Z]+/.test(t)||"ต้องมีตัวอักษรตัวใหญ่ในรหัสผ่าน"},function(t){return/[0-9]/g.test(t)||"ตัองมีตัวเลขในรหัสผ่าน"},function(t){return t.length>=6||"รหัสผ่านต้องมีอย่างน้อย 6 ตัว"},function(t){return/^[a-zA-Z0-9äöüÄÖÜ]*$/.test(t)||"ไม่อนุญาตให้ใช้ตัวอักษรพิเศษ"},function(t){return(t||"").indexOf(" ")<0||"ไม่อนุญาตให้ใช้รหัสผ่านที่มีช่องว่าง"}]),t},methods:{checkUsername:function(t){var e=this;this.isUsernameExist=!1;var r=new FormData;r.append("username",t);var a={};r.forEach(function(t,e){a[e]=t}),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/checkUsername.php",V()(a)).then(function(t){t.data.username[0].username.length>0&&(e.isUsernameExist=!0)})},previewImg:function(t){var e=t;this.buyerForm.img=e,e?(this.imagePreviewURL=URL.createObjectURL(e),URL.revokeObjectURL(e)):this.imagePreviewURL=null},submitForm:function(){var t=this;if(console.log(this.buyerForm),""!==this.buyerForm.prefix)if(""!==this.buyerForm.firstName)if(""!==this.buyerForm.lastName)if(""!==this.buyerForm.gender)if(""!==this.buyerForm.username)if(this.buyerForm.username.indexOf(" ")>=0&&console.log("ไม่อนุญาติให้มีช่องว่างในรหัสผ่าน"),""!==this.buyerForm.password)if(""!==this.buyerForm.confirmPassword)if(""!==this.buyerForm.email)if(""!==this.buyerForm.phoneNumber)if(""!==this.buyerForm.provinceCode)if(""!==this.buyerForm.amphurCode)if(""!==this.buyerForm.tambolCode)if(""!==this.buyerForm.questionOfVisit&&""!==this.buyerForm.questionOfObjective){var e=new FormData;e.append("address",this.buyerForm.address),e.append("amphurCode",this.buyerForm.amphurCode),e.append("email",this.buyerForm.email),e.append("facebookName",this.buyerForm.facebookName),e.append("firstName",this.buyerForm.firstName),e.append("idCard",this.buyerForm.idCard),e.append("firstName",this.buyerForm.firstName),e.append("gender",this.buyerForm.gender),e.append("img",this.buyerForm.img),e.append("typeOfMember",this.buyerForm.typeOfMember),e.append("lastName",this.buyerForm.lastName),e.append("lineId",this.buyerForm.lineId),e.append("moo",this.buyerForm.moo),e.append("postcode",this.buyerForm.postcode),e.append("password",this.buyerForm.password),e.append("phoneNumber",this.buyerForm.phoneNumber),e.append("statusOfMember",this.buyerForm.statusOfMember),e.append("prefix",this.buyerForm.prefix),e.append("provinceCode",this.buyerForm.provinceCode),e.append("questionOfObjective",this.buyerForm.questionOfObjective),e.append("questionOfVisit",this.buyerForm.questionOfVisit),e.append("road",this.buyerForm.road),e.append("tambolCode",this.buyerForm.tambolCode),e.append("username",this.buyerForm.username);var r={};e.forEach(function(t,e){console.log(t),r[e]=t}),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/member/postUpdateBuyer.php",e,{headers:{"Content-Type":"multipart/form-data"}}).then(function(e){"True"===e.data?(console.log(e),t.$swal.fire({icon:"success",title:"แก้ไขสมาชิกทั่วไป / ผู้ซื้อสำเร็จ",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"UserProfile"})})):t.$swal.fire({icon:"error",title:"เกิดข้อผิดพลาด",text:"ไม่สามารถแก้ไขสมาชิกได้",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"UserProfile"})})})}else this.errAlert("กรุณาเลือกเหตุผล");else this.errAlert("กรุณาเลือกตำบล");else this.errAlert("กรุณาเลือกอำเภอ");else this.errAlert("กรุณาเลือกจังหวัด");else this.errAlert("กรุณากรอกหมายเลขโทรศัพท์");else this.errAlert("กรุณากรอกอีเมล");else this.errAlert("กรุณายืนยัน Password");else this.errAlert("กรุณากรอก Password");else this.errAlert("กรุณากรอก Username");else this.errAlert("กรุณากรอกเพศ");else this.errAlert("กรุณากรอกนามสกุล");else this.errAlert("กรุณากรอกชื่อ");else this.errAlert("กรุณาเลือกคำนำหน้า")},getPrefix:function(){var t=this;p.a.get(this.baseUrl+"getPrefix.php").then(function(e){t.prefix=e.data.prefix,console.log("prefix",t.prefix)})},checkLogin:function(){""!==localStorage.idMember&&null!==localStorage.idMember&&void 0!==localStorage.idMember||this.$router.push({name:"Login"})},questionBuyer:function(t){this.showEtc.visit="อื่น ๆ"===t},questionObjBuyer:function(t){this.showEtc.objective="อื่น ๆ"===t},onFileChange:function(t){var e=t.target.files[0];this.buyerForm.img=e,this.url=URL.createObjectURL(e)},errAlert:function(t){this.$swal.fire({icon:"info",title:t,showConfirmButton:!0,allowOutsideClick:!1})},findAmphurBuyer:function(t){var e=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getBuyerAmphur.php?provinceId="+t).then(function(t){t.data.buyerAmphur.length>0&&(e.buyerAmphur=t.data.buyerAmphur,e.buyerAmphurOption=e.buyerAmphur.map(function(t){return{value:t.ampCode,text:t.ampT}})),console.log("getBuyerAmphur",e.buyerAmphur)})},getAllProvince:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getAllprovince.php").then(function(e){e.data.allProvince.length>0&&(t.allProvince=e.data.allProvince,t.provinceOption=t.allProvince.map(function(t){return{value:t.code,text:t.name}})),console.log("getAllprovince",t.allProvince)})},findTambolBuyer:function(t,e){var r=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getBuyerTambol.php?provinceId="+t+"&amphurId="+e).then(function(t){t.data.buyerTambol.length>0&&(r.buyerTambol=t.data.buyerTambol,r.buyerTambolOption=r.buyerTambol.map(function(t){return{value:t.tamCode,text:t.tamT}})),console.log("getBuyerTambol",r.buyerTambol)})},getUserInfo:function(){var t=this,e=new FormData;e.append("username",localStorage.user),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/member/postBuyerFromId.php",e).then(function(e){0!==e.data.buyerUser[0]&&(t.imagePreviewURL="https://farmtd.hrdi.or.th/farmdd/admin/upload/profile/"+e.data.buyerUser[0].buyerImg,t.confirmPassword=e.data.buyerUser[0].pass,t.buyerForm={prefix:e.data.buyerUser[0].idPrefix,firstName:e.data.buyerUser[0].firstName,lastName:e.data.buyerUser[0].lastName,username:e.data.buyerUser[0].username,phoneNumber:e.data.buyerUser[0].phoneNumber,email:e.data.buyerUser[0].email,idCard:e.data.buyerUser[0].idCard,password:e.data.buyerUser[0].pass,gender:e.data.buyerUser[0].gender,provinceCode:e.data.buyerUser[0].provinceCode,typeOfMember:e.data.buyerUser[0].typeOfMember,statusOfMember:e.data.buyerUser[0].statusOfMember,amphurCode:e.data.buyerUser[0].ampCode,postcode:e.data.buyerUser[0].postCode,tambolCode:e.data.buyerUser[0].tamCode,lineId:e.data.buyerUser[0].lineID,facebookName:e.data.buyerUser[0].facebookName,address:e.data.buyerUser[0].address,moo:e.data.buyerUser[0].moo,road:e.data.buyerUser[0].road,questionOfVisit:e.data.buyerUser[0].questionOfVisit,questionOfObjective:e.data.buyerUser[0].questionOfObjective},t.findAmphurBuyer(t.buyerForm.provinceCode),t.findTambolBuyer(t.buyerForm.provinceCode,t.buyerForm.amphurCode),"ค้นหาจาก Google"!==t.buyerForm.questionOfVisit&&"เข้ามาในเวบไซด์ของสถาบันวิจัยและพัฒนาพื้นที่สูง"!==t.buyerForm.questionOfVisit&&"เพื่อน / คนรู้จักแนะนำ"!==t.buyerForm.questionOfVisit&&(t.showEtc.visit=!0),"เข้ามาเยี่ยมชม"!==t.buyerForm.questionOfObjective&&"เข้ามาซื้อผลผลิต"!==t.buyerForm.questionOfObjective&&"เข้ามาอ่าน ติดตามข้อมูลข่าวสาร"!==t.buyerForm.questionOfObjective&&(t.showEtc.objective=!0),console.log("postBuyerFromId",e.data.buyerUser[0]),console.log("buyerForm",t.buyerForm))}).catch(function(t){console.log(t)})}},mounted:function(){this.checkLogin(),this.getPrefix(),this.getAllProvince(),this.getUserInfo()},created:function(){}},bt={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-container",{attrs:{fluid:"","fill-height":""}},[r("v-layout",{attrs:{"align-center":"","justify-center":""}},[r("v-flex",{attrs:{xs12:"",sm8:"",lg10:""}},[r("v-row",{attrs:{justify:"center"}},[r("v-form",{model:{value:t.isFormValid,callback:function(e){t.isFormValid=e},expression:"isFormValid"}},[r("v-card",{ref:"form"},[r("v-toolbar",{attrs:{dark:"",color:"primary"}},[r("v-toolbar-title",[t._v("สมัครสมาชิกสำหรับสมาชิกทั่วไป / ผู้ซื้อ")])],1),t._v(" "),r("v-card-text",[r("v-col",{attrs:{cols:"12"}},[r("v-row",[r("v-col",[r("v-select",{attrs:{"prepend-icon":"mdi-account-box","item-text":"prefixNameTh","item-value":"idPrefix",items:t.prefix,rules:[function(t){return!!t||"กรุณาเลือกคำนำหน้า"}],label:"คำนำหน้า*",required:""},model:{value:t.buyerForm.prefix,callback:function(e){t.$set(t.buyerForm,"prefix",e)},expression:"buyerForm.prefix"}},[t._v("*")])],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-account",name:"firstName",label:"ชื่อ*",type:"text",rules:t.firstNameRules},model:{value:t.buyerForm.firstName,callback:function(e){t.$set(t.buyerForm,"firstName",e)},expression:"buyerForm.firstName"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{name:"lastName",label:"นามสกุล*",type:"text",rules:t.lastNameRules},model:{value:t.buyerForm.lastName,callback:function(e){t.$set(t.buyerForm,"lastName",e)},expression:"buyerForm.lastName"}})],1)],1),t._v(" "),r("v-row",{attrs:{md:"12",fluid:""}},[r("v-col",{staticClass:"mr-0",attrs:{md:"6"}},[r("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("เพศ*")]),t._v(" "),r("v-radio-group",{attrs:{row:"",rules:[function(t){return!!t||"กรุณาระบุเพศ"}]},model:{value:t.buyerForm.gender,callback:function(e){t.$set(t.buyerForm,"gender",e)},expression:"buyerForm.gender"}},[r("v-radio",{attrs:{label:"ชาย",value:"ชาย"}}),t._v(" "),r("v-radio",{attrs:{label:"หญิง",value:"หญิง"}})],1)],1)],1),t._v(" "),r("v-row",{attrs:{align:"center",justify:"center"}},[t.imagePreviewURL?r("v-img",{staticClass:"grey lighten-2 mb-2",attrs:{src:t.imagePreviewURL,"lazy-src":t.imagePreviewURL,"aspect-ratio":"1","max-width":"500","max-height":"300"},scopedSlots:t._u([{key:"placeholder",fn:function(){return[r("v-row",{staticClass:"fill-height ma-0",attrs:{align:"center",justify:"center"}},[r("v-progress-circular",{attrs:{indeterminate:"",color:"grey lighten-5"}})],1)]},proxy:!0}],null,!1,4034393411)}):t._e()],1),t._v(" "),r("v-file-input",{attrs:{accept:"image/png, image/jpeg, image/bmp",placeholder:"เลือกรูปภาพประจำตัว",label:"รูปภาพโปรไฟล์","prepend-icon":"mdi-camera"},on:{change:t.previewImg},model:{value:t.buyerForm.img,callback:function(e){t.$set(t.buyerForm,"img",e)},expression:"buyerForm.img"}}),t._v(" "),r("v-text-field",{attrs:{"prepend-icon":"mdi-account-outline",type:"text",rules:[!t.isUsernameExist||"Username ถูกใช้งานไปแล้ว",function(t){return!!t||"กรุณากรอก Username"}],label:"Username*",required:""},on:{keyup:function(e){return t.checkUsername(t.buyerForm.username)}},model:{value:t.buyerForm.username,callback:function(e){t.$set(t.buyerForm,"username",e)},expression:"buyerForm.username"}}),t._v(" "),r("v-row",{attrs:{md:"6"}},[r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-lock",type:"password",counter:"",rules:t.passwordRules,label:"รหัสผ่าน*",required:""},model:{value:t.buyerForm.password,callback:function(e){t.$set(t.buyerForm,"password",e)},expression:"buyerForm.password"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-lock",type:"password",counter:"",rules:[t.buyerForm.password===t.confirmPassword||"รหัสผ่านไม่ตรงกัน",function(t){return!!t||"กรุณายืนยันรหัสผ่าน"}],label:"ยืนยันรหัสผ่าน*",required:""},model:{value:t.confirmPassword,callback:function(e){t.confirmPassword=e},expression:"confirmPassword"}})],1)],1),t._v(" "),r("v-row",{attrs:{md:"12"}},[r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-email",type:"email",label:"อีเมล",required:""},model:{value:t.buyerForm.email,callback:function(e){t.$set(t.buyerForm,"email",e)},expression:"buyerForm.email"}})],1)],1),t._v(" "),r("v-row",{attrs:{md:"6"}},[r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-phone",counter:"",maxlength:"10",rules:t.phoneRules,label:"หมายเลขโทรศัพท์*",required:""},model:{value:t.buyerForm.phoneNumber,callback:function(e){t.$set(t.buyerForm,"phoneNumber",e)},expression:"buyerForm.phoneNumber"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-account-details",counter:"",maxlength:"13",label:"หมายเลขบัตรประชาชน",required:""},model:{value:t.buyerForm.idCard,callback:function(e){t.$set(t.buyerForm,"idCard",e)},expression:"buyerForm.idCard"}})],1)],1),t._v(" "),r("v-row",{attrs:{md:"6"}},[r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-phone-plus",type:"text",label:"ไลน์ไอดี",required:""},model:{value:t.buyerForm.lineId,callback:function(e){t.$set(t.buyerForm,"lineId",e)},expression:"buyerForm.lineId"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-facebook",type:"text",label:"Facebook",required:""},model:{value:t.buyerForm.facebookName,callback:function(e){t.$set(t.buyerForm,"facebookName",e)},expression:"buyerForm.facebookName"}})],1)],1),t._v(" "),r("v-row",{attrs:{md:"6"}},[r("v-col",[r("v-text-field",{attrs:{label:"บ้านเลขที่",type:"text"},model:{value:t.buyerForm.address,callback:function(e){t.$set(t.buyerForm,"address",e)},expression:"buyerForm.address"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{label:"หมู่ (ถ้ามี)",type:"text"},model:{value:t.buyerForm.moo,callback:function(e){t.$set(t.buyerForm,"moo",e)},expression:"buyerForm.moo"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{label:"ถนน",type:"text"},model:{value:t.buyerForm.road,callback:function(e){t.$set(t.buyerForm,"road",e)},expression:"buyerForm.road"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{label:"รหัสไปรณีย์",type:"text"},model:{value:t.buyerForm.postcode,callback:function(e){t.$set(t.buyerForm,"postcode",e)},expression:"buyerForm.postcode"}})],1)],1),t._v(" "),r("v-row",{attrs:{md:"4"}},[r("v-col",[r("v-select",{attrs:{"prepend-icon":"mdi-map-marker-circle","item-text":"name","item-value":"code",items:t.allProvince,rules:[function(t){return!!t||"กรุณาเลือกจังหวัด"}],label:"จังหวัด*",required:""},on:{change:function(e){return t.findAmphurBuyer(t.buyerForm.provinceCode)}},model:{value:t.buyerForm.provinceCode,callback:function(e){t.$set(t.buyerForm,"provinceCode",e)},expression:"buyerForm.provinceCode"}})],1),t._v(" "),r("v-col",[r("v-select",{attrs:{"item-text":"ampT","item-value":"ampCode",items:t.buyerAmphur,rules:[function(t){return!!t||"กรุณาเลือกอำเภอ"}],label:"อำเภอ*",required:""},on:{change:function(e){return t.findTambolBuyer(t.buyerForm.provinceCode,t.buyerForm.amphurCode)}},model:{value:t.buyerForm.amphurCode,callback:function(e){t.$set(t.buyerForm,"amphurCode",e)},expression:"buyerForm.amphurCode"}})],1),t._v(" "),r("v-col",[r("v-select",{attrs:{"item-text":"tamT","item-value":"tamCode",items:t.buyerTambol,rules:[function(t){return!!t||"กรุณาเลือกตำบล"}],label:"ตำบล*",required:""},model:{value:t.buyerForm.tambolCode,callback:function(e){t.$set(t.buyerForm,"tambolCode",e)},expression:"buyerForm.tambolCode"}})],1)],1),t._v(" "),r("v-row",{attrs:{md:"12",fluid:""}},[r("v-col",{staticClass:"mr-0",attrs:{md:"6"}},[r("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("ประเภทสมาชิก*")]),t._v(" "),r("v-radio-group",{attrs:{row:"",rules:[function(t){return!!t||"กรุณาเลือกประเภทสมาชิก"}]},model:{value:t.buyerForm.typeOfMember,callback:function(e){t.$set(t.buyerForm,"typeOfMember",e)},expression:"buyerForm.typeOfMember"}},[r("v-radio",{attrs:{label:"สมาชิกทั่วไป",value:"Normal"}}),t._v(" "),r("v-radio",{attrs:{label:"สมาชิกผู้ซื้อ",value:"Buyer"}})],1)],1)],1),t._v(" "),r("v-row",{attrs:{md:"12",fluid:""}},[r("v-col",{staticClass:"mr-0",attrs:{md:"6"}},[r("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("คุณรู้จักเวบไซด์ของดีบนดอยได้อย่างไร*")]),t._v(" "),r("v-radio-group",{attrs:{rules:[function(t){return!!t||"กรุณาเลือกตัวเลือก"}]},on:{change:function(e){return t.questionBuyer(t.buyerForm.questionOfVisit)}},model:{value:t.buyerForm.questionOfVisit,callback:function(e){t.$set(t.buyerForm,"questionOfVisit",e)},expression:"buyerForm.questionOfVisit"}},[r("v-radio",{attrs:{label:"ค้นหาจาก Google",value:"ค้นหาจาก Google"}}),t._v(" "),r("v-radio",{attrs:{label:"เข้ามาในเวบไซด์ของสถาบันวิจัยและพัฒนาพื้นที่สูง",value:"เข้ามาในเวบไซด์ของสถาบันวิจัยและพัฒนาพื้นที่สูง"}}),t._v(" "),r("v-radio",{attrs:{label:"เพื่อน / คนรู้จักแนะ",value:"เพื่อน / คนรู้จักแนะ"}}),t._v(" "),r("v-radio",{attrs:{label:"อื่น ๆ",value:"อื่น ๆ"}})],1),t._v(" "),t.showEtc.visit?r("v-text-field",{attrs:{outlined:"",type:"text",label:"เหตุผลอื่นๆ",rules:[function(t){return!!t||"กรุณากรอกเหตุผล"}]},model:{value:t.buyerForm.questionOfVisit,callback:function(e){t.$set(t.buyerForm,"questionOfVisit",e)},expression:"buyerForm.questionOfVisit"}}):t._e()],1),t._v(" "),r("v-col",{attrs:{md:"6"}},[r("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("วัตถุประสงค์ที่สมัครสมาชิก*")]),t._v(" "),r("v-radio-group",{attrs:{rules:[function(t){return!!t||"กรุณาเลือกตัวเลือก"}]},on:{change:function(e){return t.questionObjBuyer(t.buyerForm.questionOfObjective)}},model:{value:t.buyerForm.questionOfObjective,callback:function(e){t.$set(t.buyerForm,"questionOfObjective",e)},expression:"buyerForm.questionOfObjective"}},[r("v-radio",{attrs:{label:"เข้ามาเยี่ยมชม",value:"เข้ามาเยี่ยมชม"}}),t._v(" "),r("v-radio",{attrs:{label:"เข้ามาซื้อผลผลิต",value:"เข้ามาซื้อผลผลิต"}}),t._v(" "),r("v-radio",{attrs:{label:"เข้ามาอ่าน ติดตามข้อมูลข่าวสาร",value:"เข้ามาอ่าน ติดตามข้อมูลข่าวสาร"}}),t._v(" "),r("v-radio",{attrs:{label:"อื่น ๆ",value:"อื่น ๆ"}}),t._v(" "),t.showEtc.objective?r("v-text-field",{staticClass:"mt-3",attrs:{outlined:"",type:"text",label:"เหตุผลอื่นๆ",rules:[function(t){return!!t||"กรุณากรอกเหตุผล"}]},model:{value:t.buyerForm.questionOfObjective,callback:function(e){t.$set(t.buyerForm,"questionOfObjective",e)},expression:"buyerForm.questionOfObjective"}}):t._e()],1)],1)],1)],1)],1),t._v(" "),r("v-card-actions",[r("v-btn",{attrs:{block:"",color:"primary",disabled:!t.isFormValid},on:{click:t.submitForm}},[t._v("ยืนยันการแก้ไข")])],1)],1)],1)],1)],1)],1)],1)},staticRenderFns:[]},_t=r("VU/8")(gt,bt,!1,null,null,null).exports,yt={data:function(){var t;return t={imagePreviewURL:null,isFormValid:!1,checkboxOptions:[{text:"ข้าวและธัญพืซ",value:"ข้าวและธัญพืซ"},{text:"ผักและสมุนไพร",value:"ผักและสมุนไพร"},{text:"ผลไม้",value:"ผลไม้"}],checkboxOptions2:[{text:"ไม้ดอกไม้ประดับ",value:"ไม้ดอกไม้ประดับ"},{text:"ผลิตภัณฑ์แปรรูป",value:"ผลิตภัณฑ์แปรรูป"},{text:"ชา กาแฟ และโกโก้",value:"ชา กาแฟ และโกโก้"}],checkboxOptions3:[{text:"หัตถกรรม",value:"หัตถกรรม"},{text:"พืซท้องถิ่น",value:"พืซท้องถิ่น"},{text:"ปศุสัตว์ และประมง",value:"ปศุสัตว์ และประมง"}],confirmPassword:"",isDisabled:!1,url:null,isUsernameExist:!1,passwordMsg:"",targetFilter:[],sellerForm:{idTypeOfSeller:"",prefix:"",firstName:"",lastName:"",username:"",phoneNumber:"",email:"",idCard:"",gender:"",password:"",vProvinceId:"",vLinkAreaDetailId:"",productType:[],address:"",img:[],postcode:"",moo:"",road:"",tambolCode:"",ampCode:"",zipcode:"",statusOfMember:"",groupName:"",shopName:"",brandName:"",lineId:"",facebookName:""},allProvince:[],provinceOption:[],buyerAmphur:[],buyerAmphurOption:[],buyerTambol:[],area:[],sellType:[],amphur:[],tambol:[],province:[]},y()(t,"province",[{provinceName:""}]),y()(t,"buyerTambolOption",[]),y()(t,"vLinkAreaDetailIdOption",[]),y()(t,"idTypeOfSellerdOption",[]),y()(t,"sellType",[]),y()(t,"tambolOption",[]),y()(t,"ampOption",[]),y()(t,"genderOption",[{text:"ชาย",value:"ชาย"},{text:"หญิง",value:"หญิง"}]),y()(t,"qovOption",[{text:"ค้นหาจาก Google",value:"ค้นหาจาก Google"},{text:"เข้ามาในเวบไซด์ของสถาบันวิจัยและพัฒนาพื้นที่สูง",value:"เข้ามาในเวบไซด์ของสถาบันวิจัยและพัฒนาพื้นที่สูง"},{text:"เพื่อน / คนรู้จักแนะนำ",value:"เพื่อน / คนรู้จักแนะนำ"},{text:"อื่น ๆ",value:"อื่น ๆ"}]),y()(t,"objOption",[{text:"เข้ามาเยี่ยมชม",value:"เข้ามาเยี่ยมชม"},{text:"เข้ามาซื้อผลผลิต",value:"เข้ามาซื้อผลผลิต"},{text:"เข้ามาอ่าน ติดตามข้อมูลข่าวสาร",value:"เข้ามาอ่าน ติดตามข้อมูลข่าวสาร"},{text:"อื่น ๆ",value:"อื่น ๆ"}]),y()(t,"prefix",[]),y()(t,"firstNameRules",[function(t){return!!t||"กรุณากรอกชื่อ"}]),y()(t,"lastNameRules",[function(t){return!!t||"กรุณากรอกนามสกุล"}]),y()(t,"emailRules",[function(t){return/.+@.+/.test(t)||"อีเมลต้องอยู่ในรูปแบบที่ถูกต้อง"}]),y()(t,"phoneRules",[function(t){return!t.length<10||"หมายเลขโทรศัพท์ต้องมีจำนวน 10 หลัก"},function(t){return!!t||"กรุณากรอกหมายเลขโทรศัพท์"},function(t){return/^0[0-9]{9}/.test(t)||"หมายเลขโทรศัพท์ต้องอยู่ในรูปแบบที่ถูกต้อง"}]),y()(t,"passwordRules",[function(t){return!!t||"กรุณากรอกรหัสผ่าน"},function(t){return/[A-Z]+/.test(t)||"ต้องมีตัวอักษรตัวใหญ่ในรหัสผ่าน"},function(t){return/[0-9]/g.test(t)||"ตัองมีตัวเลขในรหัสผ่าน"},function(t){return t.length>=6||"รหัสผ่านต้องมีอย่างน้อย 6 ตัว"},function(t){return/^[a-zA-Z0-9äöüÄÖÜ]*$/.test(t)||"ไม่อนุญาตให้ใช้ตัวอักษรพิเศษ"},function(t){return(t||"").indexOf(" ")<0||"ไม่อนุญาตให้ใช้รหัสผ่านที่มีช่องว่าง"}]),t},methods:(ft={previewImg:function(t){var e=t;this.buyerForm.img=e,e?(this.imagePreviewURL=URL.createObjectURL(e),URL.revokeObjectURL(e)):this.imagePreviewURL=null},findTumbolByAmpCode:function(t,e){var r=this;this.tambol=[],p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getTumbolByAmpProv.php?provinceId="+e+"&ampId="+t).then(function(t){t.data.tambol.length>0&&(r.tambol=t.data.tambol,console.log("ampOption",r.ampOption)),console.log("getTumbolByAmpProv",r.tambol)})},findAmphurBuyer:function(t){var e=this;this.buyerAmphur=[],p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getBuyerAmphur.php?provinceId="+t).then(function(t){e.buyerAmphur=t.data.buyerAmphur,console.log("getBuyerAmphur",e.buyerAmphur)})},getSellerType:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getSellerType.php").then(function(e){t.sellType=e.data.sellType,t.idTypeOfSellerdOption=t.sellType.map(function(t){return{value:t.idTypeOfSeller,text:t.nameTypeOfSeller}}),console.log("sellType",t.sellType)})},getProvince:function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getVLinkProvince.php").then(function(e){e.data.vLinkProvince.length>0&&(t.province=[].concat(b()(new G.a(e.data.vLinkProvince.map(function(t){return[t.provinceId,t]})).values()))),t.province=t.province.filter(function(t,e){return"เลย"!==t.provinceName&&"ลำปาง"!==t.provinceName&&"แพร่"!==t.provinceName}),t.provinceOption=t.province.map(function(t){return{value:t.provinceId,text:t.provinceName}}),console.log("province",t.province)})},findAreaByProvince:function(t){var e=this;this.getAmphurByProvince(t),p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getVLinkTargetById.php?provinceId="+t).then(function(t){console.log("vTargetDetail",t.data.vTargetDetail),t.data.vTargetDetail.length>0&&(e.targetName=[].concat(b()(new G.a(t.data.vTargetDetail.map(function(t){return[t.targetName,t]})).values())),e.getArea())})},getAmphurByProvince:function(t){var e=this;this.amphur=[],this.tambol=[],p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getAmphurById.php?provinceId="+t).then(function(t){t.data.amphur.length>0&&(e.amphur=t.data.amphur,e.ampOption=t.data.amphur.map(function(t){return{value:t.ampCode,text:t.ampT}})),console.log("getAmphurById",e.amphur)})}},y()(ft,"findTumbolByAmpCode",function(t,e){var r=this;this.tambol=[],p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getTumbolByAmpProv.php?provinceId="+e+"&ampId="+t).then(function(t){t.data.tambol.length>0&&(r.tambol=t.data.tambol,r.tambolOption=t.data.tambol.map(function(t){return{value:t.tamCode,text:t.tamT}})),console.log("getTumbolByAmpProv",r.tambol)})}),y()(ft,"checkUsername",function(t){var e=this;this.isUsernameExist=!1;var r=new FormData;r.append("username",t);var a={};r.forEach(function(t,e){a[e]=t}),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/checkUsername.php",V()(a)).then(function(t){t.data.username[0].username.length>0&&(e.isUsernameExist=!0)})}),y()(ft,"onFileChange",function(t){var e=t.target.files[0];this.sellerForm.img=e,this.url=URL.createObjectURL(e)}),y()(ft,"errAlert",function(t){this.$swal.fire({icon:"info",title:t,showConfirmButton:!0,allowOutsideClick:!1})}),y()(ft,"getPrefix",function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getPrefix.php").then(function(e){t.prefix=e.data.prefix,console.log(t.prefix)})}),y()(ft,"submitForm",function(){var t=this;if(console.log(this.sellerForm),""!==this.sellerForm.prefix)if(""!==this.sellerForm.firstName)if(""!==this.sellerForm.lastName)if(""!==this.sellerForm.gender)if(""!==this.sellerForm.img)if(""!==this.sellerForm.username)if(this.sellerForm.username.indexOf(" ")>=0&&console.log("ไม่อนุญาติให้มีช่องว่างในรหัสผ่าน"),""!==this.sellerForm.password)if(""!==this.sellerForm.confirmPassword)if(""!==this.sellerForm.phoneNumber)if(""!==this.sellerForm.vProvinceId)if(""!==this.sellerForm.ampCode)if(""!==this.sellerForm.tambolCode)if(""!==this.sellerForm.vLinkAreaDetailId)if(""!==this.sellerForm.idTypeOfSeller)if(0!==this.sellerForm.productType.length){var e=new FormData;e.append("address",this.sellerForm.address),e.append("ampCode",this.sellerForm.ampCode),e.append("brandName",this.sellerForm.brandName),e.append("tambolCode",this.sellerForm.tambolCode),e.append("email",this.sellerForm.email),e.append("facebookName",this.sellerForm.facebookName),e.append("firstName",this.sellerForm.firstName),e.append("gender",this.sellerForm.gender),e.append("groupName",this.sellerForm.groupName),e.append("idCard",this.sellerForm.idCard),e.append("idTypeOfSeller",this.sellerForm.idTypeOfSeller),e.append("lastName",this.sellerForm.lastName),e.append("lineId",this.sellerForm.lineId),e.append("moo",this.sellerForm.moo),e.append("img",this.sellerForm.img),e.append("password",this.sellerForm.password),e.append("postcode",this.sellerForm.postcode),e.append("phoneNumber",this.sellerForm.phoneNumber),e.append("prefix",this.sellerForm.prefix),e.append("productType",this.sellerForm.productType),e.append("statusOfMember",this.sellerForm.statusOfMember),e.append("road",this.sellerForm.road),e.append("shopName",this.sellerForm.shopName),e.append("username",this.sellerForm.username),e.append("vLinkAreaDetailId",this.sellerForm.vLinkAreaDetailId),e.append("vProvinceId",this.sellerForm.vProvinceId),e.append("zipcode",this.sellerForm.zipcode);var r={};e.forEach(function(t,e){console.log(t),r[e]=t}),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/member/postUpdateSeller.php",e,{headers:{"Content-Type":"multipart/form-data"}}).then(function(e){"True"===e.data?t.$swal.fire({icon:"success",title:"แก้ไขข้อมูลผู้ขายสำเร็จ",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"UserProfile"})}):t.$swal.fire({icon:"error",title:"เกิดข้อผิดพลาด",text:"ไม่สามารถแก้ไขสมาชิกได้",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"UserProfile"})})})}else this.errAlert("กรุณาเลือกชนิดสินค้าที่ต้องการจำหน่าย");else this.errAlert("กรุณาเลือกประเภทการจำหน่ายสินค้า");else this.errAlert("กรุณาเลือกชื่อศูนย์");else this.errAlert("กรุณาเลือกตำบล");else this.errAlert("กรุณาเลือกอำเภอ");else this.errAlert("กรุณาเลือกจังหวัด");else this.errAlert("กรุณากรอกหมายเลขโทรศัพท์");else this.errAlert("กรุณายืนยัน Password");else this.errAlert("กรุณากรอก Password");else this.errAlert("กรุณากรอก Username");else this.errAlert("กรุณาเลือกรูปภาพ");else this.errAlert("กรุณากรอกเพศ");else this.errAlert("กรุณากรอกนามสกุล");else this.errAlert("กรุณากรอกชื่อ");else this.errAlert("กรุณาเลือกคำนำหน้า")}),y()(ft,"findAmphurBuyer",function(t){var e=this;this.buyerAmphur=[],p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getBuyerAmphur.php?provinceId="+t).then(function(t){e.buyerAmphur=t.data.buyerAmphur,e.buyerAmphurOption=e.buyerAmphur.map(function(t){return{value:t.ampCode,text:t.ampT}}),console.log("getBuyerAmphur",e.buyerAmphur)})}),y()(ft,"findTambolBuyer",function(t,e){var r=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getBuyerTambol.php?provinceId="+t+"&amphurId="+e).then(function(t){t.data.buyerTambol.length>0&&(r.buyerTambol=t.data.buyerTambol,r.buyerTambolOption=r.buyerTambol.map(function(t){return{value:t.tamCode,text:t.tamT}})),console.log("getBuyerTambol",r.buyerTambol)})}),y()(ft,"getArea",function(){var t=this;p.a.get("https://farmtd.hrdi.or.th/farmdd/admin/api/getAllArea.php").then(function(e){t.targetName=t.targetName.map(function(t){return t.targetId}),console.log("targetName",t.targetName),e.data.area.length>0&&(t.area=e.data.area),t.targetFilter=e.data.area.filter(function(e){return t.targetName.includes(e.idArea)}),t.vLinkAreaDetailIdOption=t.targetFilter.map(function(t){return{value:t.idArea,text:t.areaName}}),console.log("targetFilter",t.targetFilter)})}),y()(ft,"getSellerFromId",function(){var t=this,e=new FormData;e.append("username",localStorage.user),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/member/postSellerFromId.php",e).then(function(e){if(0!==e.data.sellerUser[0]){var r=e.data.sellerUser[0];t.url="https://farmtd.hrdi.or.th/farmdd/admin/upload/profile/"+e.data.sellerUser[0].sellerImg,t.confirmPassword=r.password,t.sellerForm={idTypeOfSeller:r.idTypeOfSeller_MK,prefix:r.idPrefix,firstName:r.firstName,lastName:r.lastName,username:r.username,phoneNumber:r.phoneNumber,email:r.email,idCard:r.idCard,gender:r.gender,password:r.password,vProvinceId:r.vProvinceId_MK,vLinkAreaDetailId:r.vLinkAreaDetailId_MK,productType:r.productType.split(","),address:r.address,statusOfMember:r.statusOfMember,img:[],postcode:r.postCode,moo:r.moo,road:r.road,tambolCode:r.tambolCode,ampCode:r.ampCode,zipcode:r.postCode,groupName:r.groupName,shopName:r.shopName,brandName:r.brandName,lineId:r.lineID,facebookName:r.facebookName},t.findAreaByProvince(t.sellerForm.vProvinceId),t.findTumbolByAmpCode(t.sellerForm.tambolCode,t.sellerForm.vProvinceId),console.log("sellerForm",t.sellerForm)}}).catch(function(t){console.log(t)})}),ft),mounted:function(){var t=new URLSearchParams(window.location.search);this.sellerForm.username=t.get("username"),this.getSellerFromId(),this.getPrefix(),this.getProvince(),this.getArea(),this.getSellerType()}},xt={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-container",{attrs:{fluid:"","full-height":""}},[r("v-layout",{attrs:{"align-center":"","justify-center":""}},[r("v-flex",{attrs:{xs12:"",sm8:"",lg10:""}},[r("v-row",{attrs:{justify:"center"}},[r("v-form",{model:{value:t.isFormValid,callback:function(e){t.isFormValid=e},expression:"isFormValid"}},[r("v-card",{ref:"form"},[r("v-toolbar",{attrs:{dark:"",color:"primary"}},[r("v-toolbar-title",[t._v("แก้ไขข้อมูลสมาชิกผู้ขายสินค้า")])],1),t._v(" "),r("v-card-text",[r("v-col",{attrs:{cols:"12"}},[r("v-row",{attrs:{md:"4"}},[r("v-col",[r("v-select",{attrs:{"prepend-icon":"mdi-account-box","item-text":"prefixNameTh","item-value":"idPrefix",items:t.prefix,rules:[function(t){return!!t||"กรุณาเลือกคำนำหน้า"}],label:"คำนำหน้า*",required:""},model:{value:t.sellerForm.prefix,callback:function(e){t.$set(t.sellerForm,"prefix",e)},expression:"sellerForm.prefix"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-account",name:"firstName",label:"ชื่อ*",type:"text",rules:t.firstNameRules},model:{value:t.sellerForm.firstName,callback:function(e){t.$set(t.sellerForm,"firstName",e)},expression:"sellerForm.firstName"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{name:"lastName",label:"นามสกุล*",type:"text",rules:t.lastNameRules},model:{value:t.sellerForm.lastName,callback:function(e){t.$set(t.sellerForm,"lastName",e)},expression:"sellerForm.lastName"}})],1)],1),t._v(" "),r("v-row",{attrs:{md:"12",fluid:""}},[r("v-col",{staticClass:"mr-0",attrs:{md:"6"}},[r("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("เพศ*")]),t._v(" "),r("v-radio-group",{attrs:{row:"",rules:[function(t){return!!t||"กรุณาระบุเพศ"}]},model:{value:t.sellerForm.gender,callback:function(e){t.$set(t.sellerForm,"gender",e)},expression:"sellerForm.gender"}},[r("v-radio",{attrs:{label:"ชาย",value:"ชาย"}}),t._v(" "),r("v-radio",{attrs:{label:"หญิง",value:"หญิง"}})],1)],1)],1),t._v(" "),r("v-row",{attrs:{align:"center",justify:"center"}},[t.imagePreviewURL?r("v-img",{staticClass:"grey lighten-2 mb-2",attrs:{src:t.imagePreviewURL,"lazy-src":t.imagePreviewURL,"aspect-ratio":"1","max-width":"500","max-height":"300"},scopedSlots:t._u([{key:"placeholder",fn:function(){return[r("v-row",{staticClass:"fill-height ma-0",attrs:{align:"center",justify:"center"}},[r("v-progress-circular",{attrs:{indeterminate:"",color:"grey lighten-5"}})],1)]},proxy:!0}],null,!1,4034393411)}):t._e()],1),t._v(" "),r("v-file-input",{attrs:{accept:"image/png, image/jpeg, image/bmp",placeholder:"เลือกรูปภาพประจำตัว",label:"รูปภาพโปรไฟล์","prepend-icon":"mdi-camera"},on:{change:t.previewImg},model:{value:t.sellerForm.img,callback:function(e){t.$set(t.sellerForm,"img",e)},expression:"sellerForm.img"}}),t._v(" "),r("v-text-field",{attrs:{"prepend-icon":"mdi-account-outline",type:"text",rules:[!t.isUsernameExist||"Username ถูกใช้งานไปแล้ว",function(t){return!!t||"กรุณากรอก Username"}],label:"Username*",required:""},on:{keyup:function(e){return t.checkUsername(t.sellerForm.username)}},model:{value:t.sellerForm.username,callback:function(e){t.$set(t.sellerForm,"username",e)},expression:"sellerForm.username"}}),t._v(" "),r("v-row",{attrs:{md:"6"}},[r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-lock",type:"password",counter:"",rules:t.passwordRules,label:"รหัสผ่าน*",required:""},model:{value:t.sellerForm.password,callback:function(e){t.$set(t.sellerForm,"password",e)},expression:"sellerForm.password"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-lock",type:"password",counter:"",rules:[t.sellerForm.password===t.confirmPassword||"รหัสผ่านไม่ตรงกัน",function(t){return!!t||"กรุณายืนยันรหัสผ่าน"}],label:"ยืนยันรหัสผ่าน*",required:""},model:{value:t.confirmPassword,callback:function(e){t.confirmPassword=e},expression:"confirmPassword"}})],1)],1),t._v(" "),r("v-row",{attrs:{md:"12"}},[r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-email",type:"email",rules:t.emailRules,label:"อีเมล",required:""},model:{value:t.sellerForm.email,callback:function(e){t.$set(t.sellerForm,"email",e)},expression:"sellerForm.email"}})],1)],1),t._v(" "),r("v-row",{attrs:{md:"6"}},[r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-phone",counter:"",label:"หมายเลขโทรศัพท์",required:""},model:{value:t.sellerForm.phoneNumber,callback:function(e){t.$set(t.sellerForm,"phoneNumber",e)},expression:"sellerForm.phoneNumber"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-account-details",counter:"",maxlength:"13",label:"หมายเลขบัตรประชาชน"},model:{value:t.sellerForm.idCard,callback:function(e){t.$set(t.sellerForm,"idCard",e)},expression:"sellerForm.idCard"}})],1)],1),t._v(" "),r("v-row",{attrs:{md:"6"}},[r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-phone-plus",type:"text",label:"ไลน์ไอดี",required:""},model:{value:t.sellerForm.lineId,callback:function(e){t.$set(t.sellerForm,"lineId",e)},expression:"sellerForm.lineId"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{"prepend-icon":"mdi-facebook",type:"text",label:"Facebook"},model:{value:t.sellerForm.facebookName,callback:function(e){t.$set(t.sellerForm,"facebookName",e)},expression:"sellerForm.facebookName"}})],1)],1),t._v(" "),r("v-container",{staticClass:"my-0",attrs:{fluid:""}},[r("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("ที่อยู่")]),t._v(" "),r("v-row",{attrs:{md:"6"}},[r("v-col",[r("v-text-field",{attrs:{label:"บ้านเลขที่",type:"text"},model:{value:t.sellerForm.address,callback:function(e){t.$set(t.sellerForm,"address",e)},expression:"sellerForm.address"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{label:"หมู่ (ถ้ามี)",type:"text"},model:{value:t.sellerForm.moo,callback:function(e){t.$set(t.sellerForm,"moo",e)},expression:"sellerForm.moo"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{label:"ถนน",type:"text"},model:{value:t.sellerForm.road,callback:function(e){t.$set(t.sellerForm,"road",e)},expression:"sellerForm.road"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{label:"รหัสไปรณีย์",type:"text"},model:{value:t.sellerForm.postcode,callback:function(e){t.$set(t.sellerForm,"postcode",e)},expression:"sellerForm.postcode"}})],1)],1),t._v(" "),r("v-row",{attrs:{md:"4"}},[r("v-col",[r("v-select",{attrs:{"prepend-icon":"mdi-map-marker-circle","item-text":"provinceName","item-value":"provinceId",items:t.province,rules:[function(t){return!!t||"กรุณาเลือกจังหวัด"}],label:"จังหวัด*",required:""},on:{change:function(e){return t.findAreaByProvince(t.sellerForm.vProvinceId)}},model:{value:t.sellerForm.vProvinceId,callback:function(e){t.$set(t.sellerForm,"vProvinceId",e)},expression:"sellerForm.vProvinceId"}})],1),t._v(" "),r("v-col",[r("v-select",{attrs:{"item-text":"ampT","item-value":"ampCode",items:t.amphur,rules:[function(t){return!!t||"กรุณาเลือกอำเภอ"}],label:"อำเภอ*",required:""},on:{change:function(e){return t.findTumbolByAmpCode(t.sellerForm.ampCode,t.sellerForm.vProvinceId)}},model:{value:t.sellerForm.ampCode,callback:function(e){t.$set(t.sellerForm,"ampCode",e)},expression:"sellerForm.ampCode"}})],1),t._v(" "),r("v-col",[r("v-select",{attrs:{"item-text":"tamT","item-value":"tamCode",items:t.tambol,rules:[function(t){return!!t||"กรุณาเลือกตำบล"}],label:"ตำบล*",required:""},model:{value:t.sellerForm.tambolCode,callback:function(e){t.$set(t.sellerForm,"tambolCode",e)},expression:"sellerForm.tambolCode"}})],1)],1),t._v(" "),r("v-select",{attrs:{"prepend-icon":"mdi-map-marker-circle","item-text":"areaName","item-value":"idArea",items:t.targetFilter,rules:[function(t){return!!t||"กรุณาเลือกศูนย์"}],label:"ชื่อศูนย์*",required:""},model:{value:t.sellerForm.vLinkAreaDetailId,callback:function(e){t.$set(t.sellerForm,"vLinkAreaDetailId",e)},expression:"sellerForm.vLinkAreaDetailId"}})],1),t._v(" "),r("v-select",{attrs:{"prepend-icon":"mdi-basket","item-text":"nameTypeOfSeller","item-value":"idTypeOfSeller",items:t.sellType,rules:[function(t){return!!t||"กรุณาเลือกลักษณะการจ่ายสินค้า"}],label:"ลักษณะการจำหน่ายสินค้า*",required:""},model:{value:t.sellerForm.idTypeOfSeller,callback:function(e){t.$set(t.sellerForm,"idTypeOfSeller",e)},expression:"sellerForm.idTypeOfSeller"}}),t._v(" "),r("v-text-field",{attrs:{label:"ชื่อกลุ่ม (ถ้ามี)",type:"text"},model:{value:t.sellerForm.groupName,callback:function(e){t.$set(t.sellerForm,"groupName",e)},expression:"sellerForm.groupName"}}),t._v(" "),r("v-row",{attrs:{md:"6"}},[r("v-col",[r("v-text-field",{attrs:{label:"ชื่อร้าน (ถ้ามี)",type:"text"},model:{value:t.sellerForm.shopName,callback:function(e){t.$set(t.sellerForm,"shopName",e)},expression:"sellerForm.shopName"}})],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{label:"ชื่อตราสินค้า (ถ้ามี)",type:"text"},model:{value:t.sellerForm.brandName,callback:function(e){t.$set(t.sellerForm,"brandName",e)},expression:"sellerForm.brandName"}})],1)],1),t._v(" "),r("v-container",{attrs:{fluid:""}},[r("p",{staticClass:"font-weight-black grey--text text--darken-4"},[t._v("ชนิดสินค้าที่ต้องการจำหน่าย (เลือกได้มากกว่า 1 ชนิด)*")]),t._v(" "),r("v-row",[r("v-col",{attrs:{cols:"12",sm:"4",md:"4"}},[r("v-checkbox",{attrs:{label:"ข้าวและธัญพืซ",value:"ข้าวและธัญพืซ"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}}),t._v(" "),r("v-checkbox",{attrs:{label:"ผักและสมุนไพร",value:"ผักและสมุนไพร"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}}),t._v(" "),r("v-checkbox",{attrs:{label:"ผลไม้",value:"ผลไม้"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}})],1),t._v(" "),r("v-col",{attrs:{cols:"12",sm:"4",md:"4"}},[r("v-checkbox",{attrs:{label:"ไม้ดอกไม้ประดับ",value:"ไม้ดอกไม้ประดับ"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}}),t._v(" "),r("v-checkbox",{attrs:{label:"ผลิตภัณฑ์แปรรูป",value:"ผลิตภัณฑ์แปรรูป"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}}),t._v(" "),r("v-checkbox",{attrs:{label:"ชา กาแฟ และโกโก้",value:"ชา กาแฟ และโกโก้"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}})],1),t._v(" "),r("v-col",{attrs:{cols:"12",sm:"4",md:"4"}},[r("v-checkbox",{attrs:{label:"หัตถกรรม",value:"หัตถกรรม"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}}),t._v(" "),r("v-checkbox",{attrs:{label:"พืซท้องถิ่น",value:"พืซท้องถิ่น"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}}),t._v(" "),r("v-checkbox",{attrs:{label:"ปศุสัตว์ และประมง",value:"ปศุสัตว์ และประมง"},model:{value:t.sellerForm.productType,callback:function(e){t.$set(t.sellerForm,"productType",e)},expression:"sellerForm.productType"}})],1)],1)],1)],1)],1),t._v(" "),r("v-card-actions",[r("v-btn",{attrs:{block:"",color:"primary",disabled:!t.isFormValid},on:{click:t.submitForm}},[t._v("ยืนยันการแก้ไข")])],1)],1)],1)],1)],1)],1)],1)},staticRenderFns:[]},kt=r("VU/8")(yt,xt,!1,null,null,null).exports,wt={components:{LMap:at.a,LTileLayer:at.d,LMarker:at.b,LPopup:at.c,LTooltip:at.e},data:function(){return{month:[],baseUrl:"https://farmtd.hrdi.or.th/farmdd/admin/api/",productMk:[],productImgMk:[],sellerUser:[],selection:"มกราคม",monthTags:[{id:1,monthName:"มกราคม",isDiabled:!0},{id:2,monthName:"กุมพาพันธ์",isDiabled:!0},{id:3,monthName:"มีนาคม",isDiabled:!0},{id:4,monthName:"เมษายน",isDiabled:!0},{id:5,monthName:"พฤษภาคม",isDiabled:!0},{id:6,monthName:"มิถุนายน",isDiabled:!0},{id:7,monthName:"กรกฎาคม",isDiabled:!0},{id:8,monthName:"สิงหาคม",isDiabled:!0},{id:9,monthName:"กันยายน",isDiabled:!0},{id:10,monthName:"ตุลาคม",isDiabled:!0},{id:11,monthName:"พฤศจิกายน",isDiabled:!0},{id:12,monthName:"ธันวาคม",isDiabled:!0}],area:{},areaText:"",url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",zoom:6.5,center:[0,0],bounds:null,showAmount:!0,showDetails:!1,selectedItem:1,target:{},markers:[{id:null,position:{lat:null,lng:null},tooltip:null,visible:!0}]}},methods:{mapLink:function(){window.open("http://maps.google.com/?q="+this.target.lat+","+this.target.long+","+this.area.areaName,"_blank")},zoomUpdated:function(t){this.zoom=t},centerUpdated:function(t){this.center=t},boundsUpdated:function(t){this.bounds=t},getProductImg:function(t){var e=this,r=new FormData;r.append("idProductOfMemberMk",t),p.a.post(this.baseUrl+"/product/getProductImg.php",r).then(function(t){0!==t.data.productImgMk&&(e.productImgMk=t.data.productImgMk,e.productImgMk.shift(),console.log("productImgMk",e.productImgMk))}).catch(function(t){console.log(t)})},getProductDetail:function(t){var e=this,r=new FormData;r.append("idProductOfMemberMk",t),p.a.post(this.baseUrl+"/product/getProductDetail.php",r).then(function(t){if(0!==t.data.productMk){e.productMk=t.data.productMk[0];var r=e.productMk.monthOfProduct.split(",").map(function(t){return parseInt(t,10)});r.sort(function(t,e){return t-e}),e.monthTags.map(function(t,e){r.map(function(e){e===t.id&&(t.isDiabled=!1)})}),console.log("monthTags",e.monthTags),console.log("productMk",e.productMk)}}).then(function(){e.getSellerInfo()}).catch(function(t){console.log(t)})},getSellerInfo:function(){var t=this;console.log(this.productMk.idSellerMember);var e=new FormData;e.append("idSellerMember",this.productMk.idSellerMember),p.a.post(this.baseUrl+"/product/postFindSellerMk.php",e).then(function(e){0!==e.data.sellerUser&&(t.sellerUser=e.data.sellerUser[0],console.log("sellerUser",t.sellerUser))}).then(function(){t.getAllArea()}).catch(function(t){console.log(t)})},getAllArea:function(){var t=this;p.a.get(this.baseUrl+"/getAllArea.php").then(function(e){if(0!==e.data.area){var r=e.data.area.filter(function(e,r){return e.idArea===t.sellerUser.vLinkAreaDetailId_MK});t.area={idArea:r[0].idArea,areaName:r[0].areaName,targetName:r[0].targetName},console.log("area",t.area)}}).then(function(e){t.getUserLL()}).catch(function(t){console.log(t)})},getUserLL:function(){var t=this,e=new FormData;e.append("idArea",this.area.idArea),p.a.post(this.baseUrl+"/product/getUserLL.php",e).then(function(e){if(0!==e.data.targetLL){t.target=e.data.targetLL[0];var r=parseFloat(e.data.targetLL[0].lat),a=parseFloat(e.data.targetLL[0].long);console.log("targetLL",t.target),t.center[0]=r,t.center[1]=a,t.markers[0].id=t.target.idArea,t.markers[0].position={lat:r,lng:a},t.markers[0].tooltip=t.target.targetName,console.log("marker",t.markers[0]),t.centerUpdated(t.markers[0].position)}}).catch(function(t){console.log(t)})}},mounted:function(){var t=this.$route.params.idProductOfMemberMk;this.getProductDetail(t),this.getProductImg(t)},created:function(){}},Ft={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-container",{attrs:{fluid:"","fill-height":""}},[a("v-layout",{attrs:{"align-center":"","justify-center":""}},[a("v-flex",{attrs:{xs12:"",sm8:"",lg10:""}},[a("p",{staticClass:"display-1 indigo--text text--darken-4 font-weight-bold\ttext-center pt-4 mb-0"},[t._v(" "+t._s(t.productMk.nameArgi)+" ")]),t._v(" "),a("p",{staticClass:"overline text-center mt-2"},[t._v("หมวด "+t._s(t.productMk.nameTypeOfArgiMk))]),t._v(" "),a("v-btn",{staticClass:"mb-3",attrs:{outlined:""},on:{click:function(e){return t.$router.go(-1)}}},[t._v("ย้อนกลับ")]),t._v(" "),a("v-divider"),t._v(" "),a("v-row",[a("v-col",{staticClass:"d-flex child-flex pb-0",attrs:{cols:"6"}},[a("v-img",{attrs:{"max-height":"550","max-width":"550",src:t.productMk.titleImg,"lazy-src":t.productMk.imgTitle},scopedSlots:t._u([{key:"placeholder",fn:function(){return[a("v-row",{staticClass:"fill-height ma-0",attrs:{align:"center",justify:"center"}},[a("v-progress-circular",{attrs:{indeterminate:"",color:"grey lighten-5"}})],1)]},proxy:!0}])})],1),t._v(" "),a("v-col",{attrs:{cols:"6"}},[a("v-row",[a("h2",{staticClass:"indigo--text text--darken-4"},[t._v("เดือนที่มีสินค้า")])]),t._v(" "),a("v-row",{attrs:{justify:"space-around"}},[a("v-col",{attrs:{cols:"12",sm:"10",md:"12"}},t._l(t.monthTags,function(e){return a("v-chip",{key:e.id,staticClass:"ma-2 green darken-1 white--text",attrs:{disabled:e.isDiabled,readonly:""}},[t._v("\n                "+t._s(e.monthName)+"\n              ")])}),1)],1),t._v(" "),a("v-divider"),t._v(" "),a("v-row",{staticClass:"mt-2"},[a("h2",{staticClass:"indigo--text text--darken-4"},[t._v("รายละเอียดสินค้า")])]),t._v(" "),a("v-row",{staticClass:"pa-5 body-1",attrs:{cols:"12"}},[a("v-col",{attrs:{cols:"12"}},[a("p",{staticClass:"body-1 font-weight-medium"},[t._v(t._s(t.productMk.detailOfProduct))])]),t._v(" "),a("v-row",{staticClass:"pa-2",attrs:{cols:"12"}},[a("v-col",[a("h3",{staticClass:"indigo--text text--darken-4"},[t._v("สายพันธ์ ")]),t._v(" "),a("h3",{staticClass:"body-1 font-weight-medium mt-1"},[t._v(t._s(t.productMk.speciesName||"-"))])]),t._v(" "),a("v-col",[a("h3",{staticClass:"indigo--text text--darken-4"},[t._v("มาตรฐาน ")]),t._v(" "),a("h3",{staticClass:"body-1 font-weight-medium mt-1"},[t._v(t._s(t.productMk.codeGrade||"-"))])])],1),t._v(" "),a("v-col",{attrs:{cols:"12"}},[a("h3",{staticClass:"indigo--text text--darken-4"},[t._v("ราคา ")]),t._v(" "),a("h2",{staticClass:"body-1 font-weight-medium mt-1"},[t._v(t._s(t.productMk.priceBegin===t.productMk.priceEnd?"฿"+t.productMk.priceEnd:"฿"+t.productMk.priceBegin+" - ฿"+t.productMk.priceEnd)+" / "+t._s(t.productMk.nameUnit))])])],1),t._v(" "),a("v-divider")],1)],1),t._v(" "),a("v-row",{staticClass:"mt-0 pa-0"},t._l(t.productImgMk,function(e,r){return a("v-col",{key:r,staticClass:"d-flex child-flex",attrs:{cols:"2"}},[a("v-img",{attrs:{src:e.imgTitle,"lazy-src":e.imgTitle},scopedSlots:t._u([{key:"placeholder",fn:function(){return[a("v-row",{staticClass:"fill-height ma-0",attrs:{align:"center",justify:"center"}},[a("v-progress-circular",{attrs:{indeterminate:"",color:"grey lighten-5"}})],1)]},proxy:!0}],null,!0)})],1)}),1),t._v(" "),a("v-divider"),t._v(" "),a("v-row",{staticClass:"mt-2",attrs:{justify:"center",cols:"12"}},[a("v-col",{staticClass:"mx-auto pa-5",attrs:{cols:"6"}},[a("h2",{staticClass:"indigo--text text--darken-4 mx-auto mb-3"},[t._v("จัดจำหน่ายโดย")]),t._v(" "),a("p",{staticClass:"body-1 font-weight-medium"},[a("span",{staticClass:"font-weight-bold indigo--text text--darken-4"},[t._v("ประเภทองค์กร :")]),t._v(" "+t._s(t.sellerUser.nameTypeOfSeller))]),t._v(" "),a("p",{staticClass:"body-1 font-weight-medium"},[a("span",{staticClass:"font-weight-bold indigo--text text--darken-4"},[t._v("ชื่อองค์กร :")]),t._v(" "+t._s(t.sellerUser.groupName||"-"))]),t._v(" "),a("p",{staticClass:"body-1 font-weight-medium"},[a("span",{staticClass:"font-weight-bold indigo--text text--darken-4"},[t._v("ชื่อ :")]),t._v(" "+t._s(t.sellerUser.firstName+" "+t.sellerUser.lastName))]),t._v(" "),a("p",{staticClass:"body-1 font-weight-medium"},[a("span",{staticClass:"font-weight-bold indigo--text text--darken-4"},[t._v("ที่อยู่ :")]),t._v(" บ้านเลขที่ "+t._s(t.sellerUser.address||"-")+"\n            หมู่ "+t._s(t.sellerUser.moo||"-")+" ตำบล "+t._s(t.sellerUser.tamName||"-")+" จังหวัด "+t._s(t.sellerUser.provName||"-")+" "+t._s(t.sellerUser.postCode||" ")+" ")]),t._v(" "),a("p",{staticClass:"body-1 font-weight-medium"},[a("span",{staticClass:"font-weight-bold indigo--text text--darken-4"},[t._v("พื้นที่โครงการ :")]),t._v(" "+t._s(t.area.areaName))]),t._v(" "),a("v-row",{attrs:{cols:"12"}},[a("v-col",{attrs:{cols:"12"}},[a("v-img",{attrs:{width:"24",src:r("AIOO")}}),t._v(" "),a("p",{staticClass:"body-1 font-weight-medium"},[t._v(t._s(t.sellerUser.facebookName||"-"))])],1),t._v(" "),a("v-col",[a("v-img",{attrs:{width:"24",src:r("pufY")}}),t._v(" "),a("p",{staticClass:"body-1 font-weight-medium"},[t._v(t._s(t.sellerUser.lineName||"-"))])],1)],1)],1),t._v(" "),a("v-col",{attrs:{cols:"6"}},[a("v-row",[a("h2",{staticClass:"indigo--text text--darken-4 mx-auto"},[t._v("พื้นที่สินค้า")])]),t._v(" "),a("div",{staticStyle:{height:"500px",width:"100%"}},[a("l-map",{attrs:{zoom:t.zoom,center:t.center},on:{"update:zoom":t.zoomUpdated,"update:center":t.centerUpdated,"update:bounds":t.boundsUpdated}},[a("l-tile-layer",{attrs:{url:t.url}}),t._v(" "),t._l(t.markers,function(e){return a("l-marker",{key:e.id,attrs:{visible:e.visible,"lat-lng":e.position,icon:e.icon},on:{"update:latLng":function(r){return t.$set(e,"position",r)},"update:lat-lng":function(r){return t.$set(e,"position",r)},click:function(e){return t.mapLink()}}},[a("l-tooltip",{attrs:{content:e.tooltip,options:{permanent:!0}}})],1)})],2)],1)],1)],1),t._v(" "),a("v-divider")],1)],1)],1)},staticRenderFns:[]},Ct=r("VU/8")(wt,Ft,!1,null,null,null).exports,At={components:{imgPreview:mt},data:function(){return{isFormValid:!1,isLoading:!1,formStep:{step1:!0,step2:!1},typeOfArgi:[],productForm:{idTypeOfArgi:"",idAgri:"",speciesArgi:"",detailOfProduct:"",sizeOfProduct:"",unit:"",priceBegin:"",idSellerMember:"",priceEnd:"",monthOfProduct:[],typeOfStand:"",madeByOrder:"",imgCurFiles:[],img:[]},productByArgiType:[],speciesItem:[],unitMk:[],monthOfYear:[],typeOfStand:[],userInfo:[],argiTd:[],baseUrl:"https://farmtd.hrdi.or.th/farmdd/admin/api/"}},methods:{getTypeOFStand:function(){var t=this;p.a.get(this.baseUrl+"product/getTypeOfStand.php").then(function(e){t.typeOfStand=e.data.typeOfStand,console.log("gettypeOfStand",t.typeOfStand)}).catch(function(t){console.log(t)})},getArgiTd:function(){var t=this;p.a.get(this.baseUrl+"product/getArgiTd.php").then(function(e){t.argiTd=e.data.argiTd,console.log("getArgiTd",t.argiTd)}).catch(function(t){console.log(t)})},submitForm:function(){var t=this;if(this.productForm.img.length>5)this.errMsg("ไม่สามาถเพิ่มรูปภาพได้เกิน 5 รูป");else{null===this.productForm.speciesArgi&&(this.productForm.speciesArgi=0),this.isLoading=!0,this.isFormValid=!0;var e=new FormData;e.append("idTypeOfArgi",this.productForm.idTypeOfArgi),e.append("detailOfProduct",this.productForm.detailOfProduct),e.append("idSellerMember",this.productForm.idSellerMember),e.append("idAgri",this.productForm.idAgri),e.append("madeByOrder",this.productForm.madeByOrder),e.append("monthOfProduct",this.productForm.monthOfProduct),e.append("priceBegin",this.productForm.priceBegin),e.append("priceEnd",this.productForm.priceEnd),e.append("sizeOfProduct",this.productForm.sizeOfProduct),e.append("speciesArgi",this.productForm.speciesArgi),e.append("typeOfStand",this.productForm.typeOfStand),e.append("titleImg",this.productForm.img[0].name),e.append("unit",this.productForm.unit);for(var r=0;r<this.productForm.img.length;r++){var a=this.productForm.img[r];e.append("img["+r+"]",a),console.log(a)}p.a.post(this.baseUrl+"product/postAddProduct.php",e,{maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(function(e){console.log(e),"True"===e.data&&(t.isLoading=!1,t.$swal.fire({icon:"success",title:"เพิ่มสินค้าสำเร็จ",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"Home"})}))}).catch(function(e){e&&t.$swal.fire({icon:"error",title:"เกิดข้อผิดพลาด",text:"ไม่สามารถเพิ่มสินค้าได้",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"Home"})})})}},getMonthOfYear:function(){var t=this;p.a.get(this.baseUrl+"product/getMonthOfYear.php").then(function(e){t.monthOfYear=e.data.monthOfYear,console.log("getMonthOfYear",t.monthOfYear)}).catch(function(t){console.log(t)})},getUnitMk:function(){var t=this;p.a.get(this.baseUrl+"product/getUnitMk.php").then(function(e){t.unitMk=e.data.unitMk,console.log("unitMk",t.unitMk)}).catch(function(t){console.log(t)})},findSpecies:function(){var t=this,e=new FormData;e.append("agriId",this.productForm.idAgri),p.a.post(this.baseUrl+"product/postSpeciesByArgi.php",e).then(function(e){e.data.species&&(t.speciesItem=e.data.species,0===t.speciesItem.length&&(t.speciesItem[0]={agriId:t.productForm.idAgri,speciesId:0,speciesName:"ไม่มี"}),console.log("speciesItem",t.speciesItem))}).catch(function(t){console.log(t)})},findProductName:function(t){this.productByArgiType=[],this.productByArgiType=this.argiTd.filter(function(e){return e.TypeOfArgiIdTypeOfArgi===t}),console.log("productByArgiType",this.productByArgiType)},getTypeOfArgi:function(){var t=this;p.a.get(this.baseUrl+"product/getTypeArgi.php").then(function(e){0!==e.data.typeOfArgi&&(t.typeOfArgi=e.data.typeOfArgi,t.typeOfArgi=t.typeOfArgi.filter(function(t){return null!==t.nameTypeOfArgiMk}),console.log("typeOfArgi",t.typeOfArgi))}).catch(function(t){console.log(t)})},inputChanged:function(t){console.log("change",t),this.productForm.img=[].concat(b()(this.productForm.imgCurFiles),b()(this.productForm.img))},remove:function(t){this.productForm.img.splice(t,1),this.productForm.imgCurFiles.splice(t,1)},formStep2:function(){this.productForm.idSellerMember=localStorage.idMember,console.log(this.productForm),this.formStep.step1&&(this.formStep.step1=!1,this.formStep.step2=!0)}},mounted:function(){this.getTypeOfArgi(),this.getArgiTd(),this.getUnitMk(),this.getMonthOfYear(),this.getTypeOFStand()}},Tt={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-container",{attrs:{fluid:"","fill-height":""}},[r("v-layout",{attrs:{"align-center":"","justify-center":""}},[r("v-flex",{attrs:{xs12:"",sm8:"",lg10:""}},[r("v-container",{staticClass:"mr-auto",attrs:{fluid:""}},[r("v-layout",{attrs:{column:"","align-center":""}},[r("v-row",{attrs:{justify:"center"}},[r("v-form",{model:{value:t.isFormValid,callback:function(e){t.isFormValid=e},expression:"isFormValid"}},[t.formStep.step1?r("v-card",{ref:"form",attrs:{"max-width":"1000"}},[r("v-toolbar",{attrs:{dark:"",color:"primary"}},[r("v-icon",{staticClass:"mr-2",on:{click:function(e){return t.$router.go(-1)}}},[t._v("mdi-arrow-left-thick")]),t._v(" "),r("v-toolbar-title",[t._v("เพิ่มสินค้า")])],1),t._v(" "),r("v-card-text",[r("v-col",{attrs:{cols:"12"}},[r("v-row",[r("v-col",[r("v-select",{attrs:{"prepend-icon":"mdi-format-list-bulleted-type","item-text":"nameTypeOfArgiMk","item-value":"idTypeOfArgi",items:t.typeOfArgi,rules:[function(t){return!!t||"กรุณาเลือกหมวดผลผลิต"}],label:"หมวดผลผลิต*",required:""},on:{change:function(e){return t.findProductName(t.productForm.idTypeOfArgi)}},model:{value:t.productForm.idTypeOfArgi,callback:function(e){t.$set(t.productForm,"idTypeOfArgi",e)},expression:"productForm.idTypeOfArgi"}},[t._v("*")])],1),t._v(" "),r("v-col",[r("v-select",{attrs:{"item-text":"nameArgi","item-value":"idAgri",items:t.productByArgiType,rules:[function(t){return!!t||"กรุณาเลือกชื่อผลผลิต"}],label:"ชื่อผลผลิต*",required:""},on:{change:function(e){return t.findSpecies(t.productForm.idAgri)}},model:{value:t.productForm.idAgri,callback:function(e){t.$set(t.productForm,"idAgri",e)},expression:"productForm.idAgri"}},[t._v("*")])],1),t._v(" "),r("v-col",[r("v-select",{attrs:{"item-text":"speciesName","item-value":"speciesId",items:t.speciesItem,label:"สายพันธ์",required:""},model:{value:t.productForm.speciesArgi,callback:function(e){t.$set(t.productForm,"speciesArgi",e)},expression:"productForm.speciesArgi"}},[t._v("*")])],1)],1),t._v(" "),r("v-row",[r("v-col",[r("span",{staticClass:"body-2 font-weight-bold"},[t._v("รายละเอียดสินค้า")]),t._v(" "),r("v-textarea",{attrs:{rules:[function(t){return!!t||"กรุณากรอกรายละเอียดสินค้า"}],type:"text",outlined:"",rows:"2s"},model:{value:t.productForm.detailOfProduct,callback:function(e){t.$set(t.productForm,"detailOfProduct",e)},expression:"productForm.detailOfProduct"}})],1)],1),t._v(" "),r("v-row",[r("v-col",[r("span",{staticClass:"body-2 font-weight-bold"},[t._v("ขนาดบรรจุ")]),t._v(" "),r("v-text-field",{attrs:{type:"text",outlined:"",dense:""},model:{value:t.productForm.sizeOfProduct,callback:function(e){t.$set(t.productForm,"sizeOfProduct",e)},expression:"productForm.sizeOfProduct"}})],1),t._v(" "),r("v-col",[r("span",{staticClass:"body-2 font-weight-bold"},[t._v("หน่วย*")]),t._v(" "),r("v-select",{attrs:{"item-text":"nameUnit","item-value":"idUnit",items:t.unitMk,rules:[function(t){return!!t||"กรุณาเลือกหน่วย"}],outlined:"",dense:"",required:""},model:{value:t.productForm.unit,callback:function(e){t.$set(t.productForm,"unit",e)},expression:"productForm.unit"}},[t._v("*")])],1),t._v(" "),r("v-col",[r("span",{staticClass:"body-2 font-weight-bold"},[t._v("ราคาเริ่มต้น")]),t._v(" "),r("v-text-field",{attrs:{rules:[function(t){return!!t||"กรุณากรอกราคาเริ่มต้น"}],type:"number",number:"",outlined:"",dense:""},model:{value:t.productForm.priceBegin,callback:function(e){t.$set(t.productForm,"priceBegin",e)},expression:"productForm.priceBegin"}})],1),t._v(" "),r("v-col",[r("span",{staticClass:"body-2 font-weight-bold"},[t._v("ราคาสิ้นสุด")]),t._v(" "),r("v-text-field",{attrs:{rules:[function(t){return!!t||"กรุณากรอกราคาสิ้นสุด"}],type:"number",number:"",outlined:"",dense:""},model:{value:t.productForm.priceEnd,callback:function(e){t.$set(t.productForm,"priceEnd",e)},expression:"productForm.priceEnd"}})],1)],1),t._v(" "),r("v-row",[r("span",{staticClass:"body-1 font-weight-bold"},[t._v("ช่วงเวลาที่เก็บเกี่ยวผลผลิต")]),t._v(" "),r("div",{staticClass:"mr-4 ml-4 whiteback userGroupHeight"},[r("v-layout",{attrs:{row:"",wrap:""}},t._l(t.monthOfYear,function(e,a){return r("v-flex",{key:a,attrs:{xs4:""}},[r("v-checkbox",{attrs:{light:"",label:e.monthName,value:e.monthId},model:{value:t.productForm.monthOfProduct,callback:function(e){t.$set(t.productForm,"monthOfProduct",e)},expression:"productForm.monthOfProduct"}})],1)}),1)],1)]),t._v(" "),r("v-row",[r("v-col",[r("v-select",{attrs:{"prepend-icon":"mdi-format-list-bulleted-type","item-text":"nameTypeOfStand","item-value":"idTypeOfStand",items:t.typeOfStand,rules:[function(t){return!!t||"กรุณาเลือกมาตรฐานผลผลิต"}],label:"มาตรฐานผลผลิต*",required:""},model:{value:t.productForm.typeOfStand,callback:function(e){t.$set(t.productForm,"typeOfStand",e)},expression:"productForm.typeOfStand"}},[t._v("*")])],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{label:"การผลิตตามออเดอร์",type:"text"},model:{value:t.productForm.madeByOrder,callback:function(e){t.$set(t.productForm,"madeByOrder",e)},expression:"productForm.madeByOrder"}})],1)],1)],1)],1),t._v(" "),r("v-card-actions",[r("v-btn",{attrs:{block:"",color:"primary",disabled:!t.isFormValid},on:{click:function(e){return t.formStep2()}}},[t._v("ถัดไป")])],1)],1):t._e(),t._v(" "),t.formStep.step2?r("v-card",{ref:"form",attrs:{width:"600","max-width":"1000"}},[r("v-toolbar",{attrs:{dark:"",color:"primary"}},[r("v-toolbar-title",[t._v("เพิ่มสินค้า")])],1),t._v(" "),r("v-card-text",[t.isLoading?r("v-col",{attrs:{cols:"12"}},[r("v-row",{attrs:{justify:"center"}},[r("v-progress-circular",{attrs:{size:350,color:"primary",indeterminate:""}})],1)],1):t._e(),t._v(" "),t.isLoading?t._e():r("v-col",{attrs:{cols:"12"}},[r("v-row",[r("v-col",{attrs:{cols:"12"}},[r("v-file-input",{ref:"file",attrs:{type:"file",accept:"image/*","small-chips":"","show-size":"",clearable:"",label:"เพิ่มรูปภาพ",multiple:"",dense:"",counter:""},on:{change:t.inputChanged},scopedSlots:t._u([{key:"selection",fn:function(e){var a=e.text,o=e.index;return[r("v-chip",{attrs:{small:"","text-color":"white",color:"#295671",close:""},on:{"click:close":function(e){return t.remove(o)}}},[t._v("\n                              "+t._s(a)+"\n                            ")])]}}],null,!1,2481944520),model:{value:t.productForm.imgCurFiles,callback:function(e){t.$set(t.productForm,"imgCurFiles",e)},expression:"productForm.imgCurFiles"}}),t._v(" "),r("span",{staticClass:"mb-2 body-2 font-weight-bold"},[t._v("รูปสินค้า (สูงสุด 5 รูป)")]),t._v(" "),r("v-row")],1)],1),t._v(" "),t.productForm.img.length?r("div",[r("h5",[t._v("รูปสินค้าที่เลือก")]),t._v(" "),t._l(t.productForm.img,function(e,a){return r("v-chip",{key:a,staticClass:"mr-1",on:{click:function(e){return t.remove(a)}}},[t._v("\n                        "+t._s(e.name)),r("v-icon",{staticClass:"ml-2"},[t._v("mdi-backspace-outline")])],1)}),t._v(" "),r("v-row",t._l(t.productForm.img,function(t){return r("img-preview",{key:t.name,attrs:{file:t}})}),1)],2):t._e()],1)],1),t._v(" "),r("v-card-actions",[r("v-btn",{attrs:{block:"",color:"primary",disabled:!t.isFormValid},on:{click:function(e){return t.submitForm()}}},[t._v("ยืนยันการเพิ่มสินค้า")])],1)],1):t._e()],1)],1)],1)],1)],1)],1)],1)},staticRenderFns:[]},Ot=r("VU/8")(At,Tt,!1,null,null,null).exports,Mt=r("BO1k"),Nt=r.n(Mt),Pt={components:{imgPreview:mt},data:function(){return{isFormValid:!1,isLoading:!1,formStep:{step1:!0,step2:!1},typeOfArgi:[],productForm:{idTypeOfArgi:"",idAgri:"",speciesArgi:"",detailOfProduct:"",sizeOfProduct:"",unit:"",priceBegin:"",idSellerMember:"",priceEnd:"",monthOfProduct:[],typeOfStand:"",madeByOrder:"",imgCurFiles:[],img:[]},productByArgiType:[],speciesItem:[],unitMk:[],monthOfYear:[],typeOfStand:[],userInfo:[],argiTd:[],image_list:[],oldImg:[],baseUrl:"https://farmtd.hrdi.or.th/farmdd/admin/api/"}},methods:{previewMultiImage:function(t){var e=this,r=t.target,a=r.files.length,o=0;if(r.files)for(;a--;){var i=new FileReader;i.onload=function(t){e.preview_list.push(t.target.result)},this.productForm.img.push(r.files[o]),this.image_list.push(r.files[o]),i.readAsDataURL(r.files[o]),o++}console.log(this.productForm.img)},deleteOldImg:function(t){var e=this;1!==this.oldImg.length?this.$swal.fire({title:"ต้องการลบรูปสินค้าหรือไม่ ?",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"ยืนยัน",cancelButtonText:"ยกเลิก"}).then(function(r){if(r.isConfirmed){var a=new FormData;a.append("productImgId",t),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/product/postDeleteImgProduct.php",a).then(function(t){e.$swal.fire({icon:"success",title:"ลบรูปภาพสินค้าสำเร็จ",showConfirmButton:!1,timer:1e3}).then(function(t){e.getProductImg()})}).catch(function(t){e.$swal.fire({icon:"error",title:"เกิดข้อผิดพลาด",showConfirmButton:!1,timer:1500}).then(function(t){window.location.reload()})})}}):this.errAlert("ต้องมีรูปภาพอย่างน้อย 1 รูป")},getTypeOFStand:function(){var t=this;p.a.get(this.baseUrl+"product/getTypeOfStand.php").then(function(e){t.typeOfStand=e.data.typeOfStand,console.log("gettypeOfStand",t.typeOfStand)}).catch(function(t){console.log(t)})},getArgiTd:function(){var t=this;p.a.get(this.baseUrl+"product/getArgiTd.php").then(function(e){t.argiTd=e.data.argiTd,console.log("getArgiTd",t.argiTd)}).then(function(e){t.getProductDetail()}).catch(function(t){console.log(t)})},submitForm:function(){var t=this;this.isFormValid=!0,null===this.productForm.speciesArgi&&(this.productForm.speciesArgi=0);var e=new FormData;if(e.append("idTypeOfArgi",this.productForm.idTypeOfArgi),e.append("detailOfProduct",this.productForm.detailOfProduct),e.append("idSellerMember",this.productForm.idSellerMember),e.append("idProductOfMemberMk",this.productForm.idProductOfMemberMk),e.append("idAgri",this.productForm.idAgri),e.append("madeByOrder",this.productForm.madeByOrder),e.append("monthOfProduct",this.productForm.monthOfProduct),e.append("priceBegin",this.productForm.priceBegin),e.append("priceEnd",this.productForm.priceEnd),e.append("sizeOfProduct",this.productForm.sizeOfProduct),e.append("speciesArgi",this.productForm.speciesArgi),e.append("typeOfStand",this.productForm.typeOfStand),e.append("unit",this.productForm.unit),this.productForm.img.length>0){if(this.productForm.img.length>5||this.productForm.img.length+this.oldImg.length>5)return void this.errAlert("ไม่สามาถเพิ่มรูปภาพได้เกิน 5 รูป");e.append("titleImg",this.productForm.img[0].name);for(var r=0,a=0;a<this.productForm.img.length;a++){var o=this.productForm.img[a];r+=o.size,e.append("img["+a+"]",o),console.log(o)}if(r>8e6)return console.log(this.oldImg),void this.errAlert("ขนาดไฟล์รวมกันห้ามเกิน 8 MB")}else e.append("titleImg",this.oldImg[0].imgName);var i=!0,s=!1,n=void 0;try{for(var l,c=Nt()(e.entries());!(i=(l=c.next()).done);i=!0){var d=l.value;console.log(d[0],d[1])}}catch(t){s=!0,n=t}finally{try{!i&&c.return&&c.return()}finally{if(s)throw n}}this.isLoading=!0,p.a.post(this.baseUrl+"product/postUpdateProduct.php",e,{maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(function(e){console.log(e),"True"===e.data&&(t.isLoading=!1,t.$swal.fire({icon:"success",title:"แก้ไขสินค้าสำเร็จ",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"Home"})}))}).catch(function(e){e&&t.$swal.fire({icon:"error",title:"เกิดข้อผิดพลาด",text:"ไม่สามารถเพิ่มสินค้าได้",showConfirmButton:!1,timer:2e3}).then(function(){t.$router.push({name:"Home"})})})},errAlert:function(t){this.$swal.fire({icon:"info",title:t,showConfirmButton:!0,allowOutsideClick:!1})},getMonthOfYear:function(){var t=this;p.a.get(this.baseUrl+"product/getMonthOfYear.php").then(function(e){t.monthOfYear=e.data.monthOfYear,console.log("getMonthOfYear",t.monthOfYear)}).catch(function(t){console.log(t)})},getUnitMk:function(){var t=this;p.a.get(this.baseUrl+"product/getUnitMk.php").then(function(e){t.unitMk=e.data.unitMk,console.log("unitMk",t.unitMk)}).catch(function(t){console.log(t)})},findSpecies:function(){var t=this,e=new FormData;e.append("agriId",this.productForm.idAgri),p.a.post(this.baseUrl+"product/postSpeciesByArgi.php",e).then(function(e){e.data.species&&(t.speciesItem=e.data.species,0===t.speciesItem.length&&(t.speciesItem[0]={agriId:t.productForm.idAgri,speciesId:0,speciesName:"ไม่มี"}),console.log("speciesItem",t.speciesItem))}).catch(function(t){console.log(t)})},findProductName:function(t){this.productByArgiType=[],this.productByArgiType=this.argiTd.filter(function(e){return e.TypeOfArgiIdTypeOfArgi===t}),console.log("productByArgiType",this.productByArgiType)},getTypeOfArgi:function(){var t=this;p.a.get(this.baseUrl+"product/getTypeArgi.php").then(function(e){0!==e.data.typeOfArgi&&(t.typeOfArgi=e.data.typeOfArgi,t.typeOfArgi=t.typeOfArgi.filter(function(t){return null!==t.nameTypeOfArgiMk}),console.log("typeOfArgi",t.typeOfArgi))}).catch(function(t){console.log(t)})},inputChanged:function(t){console.log("change",t),this.productForm.img=[].concat(b()(this.productForm.imgCurFiles),b()(this.productForm.img))},remove:function(t){this.productForm.img.splice(t,1),this.productForm.imgCurFiles.splice(t,1)},formStep2:function(){this.productForm.idSellerMember=localStorage.idMember,console.log(this.productForm),this.formStep.step1&&(this.formStep.step1=!1,this.formStep.step2=!0)},getProductDetail:function(){var t=this,e=new FormData;e.append("idProductOfMemberMk",this.productForm.idProductOfMemberMk),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/product/getProductDetail.php",e).then(function(e){0!==e.data.productMk.length&&(console.log(e.data.productMk),t.productForm=e.data.productMk[0],t.productForm.typeOfStand=e.data.productMk[0].idTypeOfStand,t.productForm.suggestOption=e.data.productMk[0].suggestSta,t.productForm.monthOfProduct=e.data.productMk[0].monthOfProduct.split(","),t.productForm.img=[],""!==t.productForm.speciesArgi&&t.findSpecies(),""!==t.productForm.idTypeOfArgi&&t.findProductName(t.productForm.idTypeOfArgi),console.log("productDetail",t.productForm))}).then(function(){t.getProductImg()}).catch(function(t){console.log(t)})},getProductImg:function(){var t=this,e=new FormData;e.append("idProductOfMemberMk",this.productForm.idProductOfMemberMk),p.a.post("https://farmtd.hrdi.or.th/farmdd/admin/api/product/getProductImg.php",e).then(function(e){t.oldImg=e.data.productImgMk,console.log("oldImg",t.oldImg)})}},mounted:function(){this.productForm.idProductOfMemberMk=this.$route.params.idProductOfMemberMk,this.getTypeOfArgi(),this.getArgiTd(),this.getUnitMk(),this.getMonthOfYear(),this.getTypeOFStand()}},It={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-container",{attrs:{fluid:"","fill-height":""}},[r("v-layout",{attrs:{"align-center":"","justify-center":""}},[r("v-flex",{attrs:{xs12:"",sm8:"",lg10:""}},[r("v-container",{staticClass:"mr-auto",attrs:{fluid:""}},[r("v-layout",{attrs:{column:"","align-center":""}},[r("v-row",{attrs:{justify:"center"}},[r("v-form",{model:{value:t.isFormValid,callback:function(e){t.isFormValid=e},expression:"isFormValid"}},[t.formStep.step1?r("v-card",{ref:"form",attrs:{"max-width":"1000"}},[r("v-toolbar",{attrs:{dark:"",color:"primary"}},[r("v-icon",{staticClass:"mr-2",on:{click:function(e){return t.$router.go(-1)}}},[t._v("mdi-arrow-left-thick")]),t._v(" "),r("v-toolbar-title",[t._v("เพิ่มสินค้า")])],1),t._v(" "),r("v-card-text",[r("v-col",{attrs:{cols:"12"}},[r("v-row",[r("v-col",[r("v-select",{attrs:{"prepend-icon":"mdi-format-list-bulleted-type","item-text":"nameTypeOfArgiMk","item-value":"idTypeOfArgi",items:t.typeOfArgi,rules:[function(t){return!!t||"กรุณาเลือกหมวดผลผลิต"}],label:"หมวดผลผลิต*",required:""},on:{change:function(e){return t.findProductName(t.productForm.idTypeOfArgi)}},model:{value:t.productForm.idTypeOfArgi,callback:function(e){t.$set(t.productForm,"idTypeOfArgi",e)},expression:"productForm.idTypeOfArgi"}},[t._v("*")])],1),t._v(" "),r("v-col",[r("v-select",{attrs:{"item-text":"nameArgi","item-value":"idAgri",items:t.productByArgiType,rules:[function(t){return!!t||"กรุณาเลือกชื่อผลผลิต"}],label:"ชื่อผลผลิต*",required:""},on:{change:function(e){return t.findSpecies(t.productForm.idAgri)}},model:{value:t.productForm.idAgri,callback:function(e){t.$set(t.productForm,"idAgri",e)},expression:"productForm.idAgri"}},[t._v("*")])],1),t._v(" "),r("v-col",[r("v-select",{attrs:{"item-text":"speciesName","item-value":"speciesId",items:t.speciesItem,label:"สายพันธ์",required:""},model:{value:t.productForm.speciesArgi,callback:function(e){t.$set(t.productForm,"speciesArgi",e)},expression:"productForm.speciesArgi"}},[t._v("*")])],1)],1),t._v(" "),r("v-row",[r("v-col",[r("span",{staticClass:"body-2 font-weight-bold"},[t._v("รายละเอียดสินค้า")]),t._v(" "),r("v-textarea",{attrs:{rules:[function(t){return!!t||"กรุณากรอกรายละเอียดสินค้า"}],type:"text",outlined:"",rows:"2s"},model:{value:t.productForm.detailOfProduct,callback:function(e){t.$set(t.productForm,"detailOfProduct",e)},expression:"productForm.detailOfProduct"}})],1)],1),t._v(" "),r("v-row",[r("v-col",[r("span",{staticClass:"body-2 font-weight-bold"},[t._v("ขนาดบรรจุ")]),t._v(" "),r("v-text-field",{attrs:{type:"text",outlined:"",dense:""},model:{value:t.productForm.sizeOfProduct,callback:function(e){t.$set(t.productForm,"sizeOfProduct",e)},expression:"productForm.sizeOfProduct"}})],1),t._v(" "),r("v-col",[r("span",{staticClass:"body-2 font-weight-bold"},[t._v("หน่วย*")]),t._v(" "),r("v-select",{attrs:{"item-text":"nameUnit","item-value":"idUnit",items:t.unitMk,rules:[function(t){return!!t||"กรุณาเลือกหน่วย"}],outlined:"",dense:"",required:""},model:{value:t.productForm.unit,callback:function(e){t.$set(t.productForm,"unit",e)},expression:"productForm.unit"}},[t._v("*")])],1),t._v(" "),r("v-col",[r("span",{staticClass:"body-2 font-weight-bold"},[t._v("ราคาเริ่มต้น")]),t._v(" "),r("v-text-field",{attrs:{rules:[function(t){return!!t||"กรุณากรอกราคาเริ่มต้น"}],type:"number",number:"",outlined:"",dense:""},model:{value:t.productForm.priceBegin,callback:function(e){t.$set(t.productForm,"priceBegin",e)},expression:"productForm.priceBegin"}})],1),t._v(" "),r("v-col",[r("span",{staticClass:"body-2 font-weight-bold"},[t._v("ราคาสิ้นสุด")]),t._v(" "),r("v-text-field",{attrs:{rules:[function(t){return!!t||"กรุณากรอกราคาสิ้นสุด"}],type:"number",number:"",outlined:"",dense:""},model:{value:t.productForm.priceEnd,callback:function(e){t.$set(t.productForm,"priceEnd",e)},expression:"productForm.priceEnd"}})],1)],1),t._v(" "),r("v-row",[r("span",{staticClass:"body-1 font-weight-bold"},[t._v("ช่วงเวลาที่เก็บเกี่ยวผลผลิต")]),t._v(" "),r("div",{staticClass:"mr-4 ml-4 whiteback userGroupHeight"},[r("v-layout",{attrs:{row:"",wrap:""}},t._l(t.monthOfYear,function(e,a){return r("v-flex",{key:a,attrs:{xs4:""}},[r("v-checkbox",{attrs:{light:"",label:e.monthName,value:e.monthId},model:{value:t.productForm.monthOfProduct,callback:function(e){t.$set(t.productForm,"monthOfProduct",e)},expression:"productForm.monthOfProduct"}})],1)}),1)],1)]),t._v(" "),r("v-row",[r("v-col",[r("v-select",{attrs:{"prepend-icon":"mdi-format-list-bulleted-type","item-text":"nameTypeOfStand","item-value":"idTypeOfStand",items:t.typeOfStand,rules:[function(t){return!!t||"กรุณาเลือกมาตรฐานผลผลิต"}],label:"มาตรฐานผลผลิต*",required:""},model:{value:t.productForm.typeOfStand,callback:function(e){t.$set(t.productForm,"typeOfStand",e)},expression:"productForm.typeOfStand"}},[t._v("*")])],1),t._v(" "),r("v-col",[r("v-text-field",{attrs:{label:"การผลิตตามออเดอร์",type:"text"},model:{value:t.productForm.madeByOrder,callback:function(e){t.$set(t.productForm,"madeByOrder",e)},expression:"productForm.madeByOrder"}})],1)],1)],1)],1),t._v(" "),r("v-card-actions",[r("v-btn",{attrs:{block:"",color:"primary",disabled:!t.isFormValid},on:{click:function(e){return t.formStep2()}}},[t._v("ถัดไป")])],1)],1):t._e(),t._v(" "),t.formStep.step2?r("v-card",{ref:"form",attrs:{width:"600","max-width":"1000"}},[r("v-toolbar",{attrs:{dark:"",color:"primary"}},[r("v-toolbar-title",[t._v("เพิ่มสินค้า")])],1),t._v(" "),r("v-card-text",[t.isLoading?r("v-col",{attrs:{cols:"12"}},[r("v-row",{attrs:{justify:"center"}},[r("v-progress-circular",{attrs:{size:350,color:"primary",indeterminate:""}})],1)],1):t._e(),t._v(" "),t.isLoading?t._e():r("v-col",{attrs:{cols:"12"}},[r("v-row",[r("v-col",{attrs:{cols:"12"}},[r("v-file-input",{ref:"file",attrs:{type:"file",accept:"image/*","small-chips":"","show-size":"",clearable:"",label:"เพิ่มรูปภาพ",multiple:"",dense:"",counter:""},on:{change:t.inputChanged},scopedSlots:t._u([{key:"selection",fn:function(e){var a=e.text,o=e.index;return[r("v-chip",{attrs:{small:"","text-color":"white",color:"#295671",close:""},on:{"click:close":function(e){return t.remove(o)}}},[t._v("\n                              "+t._s(a)+"\n                            ")])]}}],null,!1,2481944520),model:{value:t.productForm.imgCurFiles,callback:function(e){t.$set(t.productForm,"imgCurFiles",e)},expression:"productForm.imgCurFiles"}}),t._v(" "),r("span",{staticClass:"mb-2 body-2 font-weight-bold"},[t._v("รูปสินค้า (สูงสุด 5 รูป)")]),t._v(" "),r("v-row")],1)],1),t._v(" "),r("v-row",{attrs:{cols:"12"}},t._l(t.oldImg,function(e,a){return r("v-col",{key:a,staticClass:"mr-1",on:{click:function(r){return t.deleteOldImg(e.productImgId)}}},[r("v-row",[r("img",{key:a,attrs:{src:e.imgTitle,width:"100",height:"100"}})]),t._v(" "),r("v-row",[r("v-chip",[t._v("\n                            (รูปเดิม) "+t._s(e.imgName)),r("v-icon",{staticClass:"ml-2"},[t._v("mdi-backspace-outline")])],1)],1)],1)}),1),t._v(" "),t.productForm.img.length?r("div",[r("h5",[t._v("รูปสินค้าที่เลือก")]),t._v(" "),t._l(t.productForm.img,function(e,a){return r("v-chip",{key:a,staticClass:"mr-1",on:{click:function(e){return t.remove(a)}}},[t._v("\n                        "+t._s(e.name)),r("v-icon",{staticClass:"ml-2"},[t._v("mdi-backspace-outline")])],1)}),t._v(" "),r("v-row",t._l(t.productForm.img,function(t){return r("img-preview",{key:t.name,attrs:{file:t}})}),1)],2):t._e()],1)],1),t._v(" "),r("v-card-actions",[r("v-btn",{attrs:{block:"",color:"primary",disabled:!t.isFormValid},on:{click:function(e){return t.submitForm()}}},[t._v("ยืนยันการเพิ่มสินค้า")])],1)],1):t._e()],1)],1)],1)],1)],1)],1)],1)},staticRenderFns:[]},St=r("VU/8")(Pt,It,!1,null,null,null).exports;a.default.use(u.a);var Ut=new u.a({mode:"hash",linkActiveClass:"active",base:"/farmdd",routes:[{path:"/",component:$,children:[{path:"/",component:f,name:"Home"},{path:"/shop",component:w,name:"Shop"},{path:"/addproduct",component:Ot,name:"AddProduct"},{path:"/editproduct/:idProductOfMemberMk",component:St,name:"EditProduct"},{path:"/editprofile",component:_t,name:"EditProfile"},{path:"/editprofile",component:_t,name:"EditProfile"},{path:"/product",component:C,name:"Product"},{path:"/market",component:N,name:"Market"},{path:"/blog",component:T,name:"Blog"},{path:"/aboutus",component:et,name:"AboutUs"},{path:"/userprofile",component:ht,name:"UserProfile"},{path:"/editseller",component:kt,name:"EditSeller"},{path:"/findproduct",component:ct,name:"FindProduct"},{path:"/typelist/:idTypeOfArgi/:nameTypeOfArgi",component:st,name:"TypeList"},{path:"/content/:page",component:D,name:"Content"},{path:"/productdetail/:idProductOfMemberMk",component:Ct,name:"ProductDetail"},{path:"/post/:id",component:S,name:"Post"},{path:"/register",component:Q,name:"Register"},{path:"/cart",component:R,name:"Cart"},{path:"/login",component:K,name:"Login"}]}]}),Bt=r("hz7P");r("UdIB"),r("EYnv");delete rt.Icon.Default.prototype._getIconUrl,rt.Icon.Default.mergeOptions({iconRetinaUrl:r("qXhe"),iconUrl:r("TJ5S"),shadowUrl:r("wkq0")}),a.default.component("l-map",at.a),a.default.component("l-tile-layer",at.d),a.default.component("l-marker",at.b),a.default.use(d.a),a.default.use(Bt.a),a.default.config.productionTip=!1,new a.default({el:"#app",router:Ut,vuetify:s,components:{App:l},template:"<App/>"})},NSMX:function(t,e,r){t.exports=r.p+"img/slider1.8a3a968.jpg"},Ot1l:function(t,e,r){t.exports=r.p+"img/field.c9a9c0d.jpeg"},PQwa:function(t,e,r){t.exports=r.p+"img/meat-card.cfed864.jpeg"},RDci:function(t,e,r){t.exports=r.p+"img/slide-1.7c2f5d3.jpeg"},TJ5S:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII="},UdIB:function(t,e){},W4HE:function(t,e,r){t.exports=r.p+"img/vega-card.2468c28.jpeg"},XXIg:function(t,e,r){t.exports=r.p+"img/ข้าวและธัญพืช.44809d5.jpeg"},ZHaB:function(t,e){},fRiH:function(t,e,r){t.exports=r.p+"img/slider4.0e80ba7.jpg"},ffJP:function(t,e,r){t.exports=r.p+"img/travel.17131eb.jpeg"},hMNy:function(t,e){},"j/kf":function(t,e,r){t.exports=r.p+"img/vega-card-3.da279ce.jpeg"},jBLA:function(t,e,r){var a={"./content-1.jpeg":"4BYA","./content.jpeg":"DkYy","./field.jpeg":"Ot1l","./fruitree.jpeg":"34Nt","./localplant.jpeg":"N9tS","./login-logo.jpeg":"3+hF","./slide-1.jpeg":"RDci","./travel.jpeg":"ffJP","./vega-card.jpeg":"MKGl","./vegatables1.jpeg":"zmdf","./ข้าวและธัญพืช.jpeg":"XXIg","./ชา กาแฟ และโกโก้.jpeg":"2WO5","./ปศุสัตว์ และประมงค์.jpeg":"6seM","./ผลิตภัณฑ์แปรรูป.jpeg":"m/As","./ผลไม้.jpeg":"LRJd","./ผัก.jpeg":"8ZCl","./ผักและสมุนไพร.jpeg":"GTGI","./พืชท้องถิ่น.jpeg":"5S8a","./หัตถกรรม.jpeg":"2oNb","./ไม้ดอกไม้ประดับ.jpeg":"mlUp"};function o(t){return r(i(t))}function i(t){var e=a[t];if(!(e+1))throw new Error("Cannot find module '"+t+"'.");return e}o.keys=function(){return Object.keys(a)},o.resolve=i,t.exports=o,o.id="jBLA"},jYSa:function(t,e,r){t.exports=r.p+"img/5.983bddd.jpg"},kapU:function(t,e){},kx0P:function(t,e,r){t.exports=r.p+"img/deal3.e9d6c61.jpg"},"m/As":function(t,e,r){t.exports=r.p+"img/ผลิตภัณฑ์แปรรูป.6a0f299.jpeg"},mlUp:function(t,e,r){t.exports=r.p+"img/ไม้ดอกไม้ประดับ.0efeda6.jpeg"},pon8:function(t,e){},pqEl:function(t,e,r){t.exports=r.p+"img/3.6bb2983.jpg"},pufY:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAC7AAAAuwGdWYJhAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAASlQTFRFAMIAAsICA8MDBMYEBcYFCcQJC8ULDMUMDsgOD8YPEMYQEsYSFMcUFMoUFscWF8gXF8oXGMgYH8wfI80jJ84nKs8qLc0tLs0uNM40OdA5OtA6O9A7QtJCQtRCR9VHStZKUtZSUthSVdZVVdhVVtdWWddZYtliYttiZNxkZ9tnZ9xnaN1ocd9xct9ydeB1eN94eeF5e997hOKEheKFh+SHiuSKk+aTluaWnemdn+ifoemhoumipOqkqeqpqeupq+urr+2vsOywse6xsu2ytO20tO60te21ue65vPC8w/HDxPHEyvLKzPPMzvPOz/TP0/XT1fXV1/XX1/bX2vfa3ffd4fjh5vnm6Pro6frp6/rr7fvt8fzx9f31+P34+v76/P78/f/9/v/+////qVDaCQAAAMhJREFUGBm1wXc3QnEAx+GvGVFWwkW2BmWFCJGRLQ0rpT7v/0Vwzu+e3Hvq355HHeG1ZofUIph5489HZkpOY+k6tsapX039Tzg8emTrusAlJ5sF71CulviuvJznYVrGDiwU2bjuuT3Yn4ykYFfGDYQKxLIDE4lkIJKCOxmHECoQy46f9SYDl0W4krEGYd/K9v0Smyfzo3FYl+Et4/I1KNtMDadFNS1/8m9LDsNHVYx6VG59c3s/QGVVrR5oHI+ojddnS235u9URv8YHQmbtGLByAAAAAElFTkSuQmCC"},qG1N:function(t,e,r){t.exports=r.p+"img/rice-card.936e5aa.jpeg"},qXhe:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg=="},s2z8:function(t,e,r){t.exports=r.p+"img/fruit-2.6776c77.jpeg"},"s3/3":function(t,e,r){t.exports=r.p+"img/vega-card-4.53f7db3.jpeg"},uAlE:function(t,e,r){t.exports=r.p+"img/slider3.6f27a30.jpg"},uMNc:function(t,e,r){t.exports=r.p+"img/deal2.01628a5.jpg"},wkq0:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC"},wsk5:function(t,e,r){t.exports=r.p+"img/field-card.55e41d6.jpeg"},xgfO:function(t,e,r){t.exports=r.p+"img/fresh.eb1ab26.png"},zmdf:function(t,e,r){t.exports=r.p+"img/vegatables1.8a47871.jpeg"}},["NHnr"]);
  //# sourceMappingURL=app.4be46cf70d765696ab72.js.map