Commit b3d38981 by 无尘

feat: 增加考勤组

parent 3b36fe6e
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.ac59d620ff7fe5a927dba35cd94f0985.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.a08b5a46f53c244963c1.js></script><script type=text/javascript src=./static/js/vendor.0000e68e65e4a9dc3840.js></script><script type=text/javascript src=./static/js/app.d2dca2485bfabbd8023a.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.7901f7260b58741969cc8ffa69de2568.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.c665671f31827d29132d.js></script><script type=text/javascript src=./static/js/vendor.0000e68e65e4a9dc3840.js></script><script type=text/javascript src=./static/js/app.a3d1562febd6adee6a98.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([14],{FFFL:function(e,t){e.exports="data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAADcCAYAAAAbWs+BAAAbLklEQVR4nO3d2XLjSJYm4B/7SnCRqCUyMrpresy6uq9q+v0foy/KrKcqayo2SVxAYl8c7nMBKlISIWVIIkGAPJ9ZmtIy0yJckfzlDsfx41KcFgKEkFbIhx4AIaeEAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIi9RDD+DUlKxCljPkBUNWMGQ5Q8kqcC5QcQHOOSRZgiLLUGQJmqrA0FWYhgpz81VTlUN/G+SNpDgtxKEHcezygsEPUiRZiSDKoaoKFFWBqihQVRmKLEOSJMiyBEmSIIQAFwKCC3AuwKoKjP3+l+casE0NY8+CodPPzD6hwO0JqzjWYYbFOkGaMZimDk1ToWsqFOXtK/mq4ihKhrJkyLIClqnibGhjODChvuPXJe2gwO0Yqzjmfozv8wimocGyDGiqClmWdv57cS5QMoY0zZHlBa7PBzgfOxS8DqPA7QjnAjM/xrdZANsy4djmu2ay16qqCnGSI0kzfJh6mE4cyNLuQ07ehwK3A4tVgn988+E6FhzbgKIcblODVRWSJEMUZ/jXD2OcjeyDjYVso8C9Q1FWuJmHCJICA9eGrnVnA6MsGYIwgefouDofQNdoZ7MLKHBvtAoz/O3zAt7AhutYhx7Os6I4hSQ4phMHQ9c89HBOHgXuDe6WEb7dhRgNXRiGdujh/KEsL7Bax/h4UT/bkcOhwL3St7sAs1WCyWgAtUcvoBmrsFyFmI5tfJh6hx7OyerOQ0cPfL0L4AcZzifDvWzz75OqKjifDLFYhQBAoTsQemHzk24XEearBOPRoHdhuyfLEiYjFzM/wc08PPRwThIF7icsVgm+z0Ocjb3ehu2eLMs4G3u4WURYrtNDD+fkUOD+QJQU+Mc3H+PRoNUX2fukKDLGQxe/fV0izctDD+ekHMcnaE+EAGZ+jPHQ7dQ7tl3QdQ1Dz8FsGR96KCeFAveCr3dr5CWHZRmHHspeOLaJOGP4ehcceigngwL3jCDOsVil8AbHXRrlbWa5OC0OPZSTQIF7xsyP4Q1sSEdeACxLEgYDm5aWLaHANXh4hu0U2JaBMC2xCmnXct8ocA1myxiDI19KPjVwLZrlWkCBe2K5TlBxHN2u5B8xdA1ZyRFE2aGHctQocE/M/LjT1f/75DomZj7NcvtEgXsgTgsUJYd+oo15TENHmJTIC3booRwtCtwDqzA7mY2S59iWjmVAmyf7QoHb4ELgdhHBNE47cKap4xu9CN8bCtxGmpVQVaVXZ9z2QVUUaJqKJKMay32gwG0kWXlyO5NNJEmCrqlUebInFLiNMM6h691vl9AGjQK3NxQ4AAKAH6TU2WpDVRUsVwmEoO4bu0aBQ93vQ5ZlyDL9cQD1eTlZlsEqfuihHB36hAHIcgZNVY6+UPlnKZsfPoxR4HaNAoe6oeuxnObeFVmWaIbbA/qUoX4HR7PbYxS4/aDAAbQ50ICe4faDAoe6dwlNcI9JkoSKArdzFDjUp55pkttGy+zdo8Chfl6hZeVjXAgoPe/B2UUUOFDgmgguet/0tosocABURQbnFLiHOOfQTryQex8ocABMQwVjFc1yD1ScQ1Xp47Fr9CeKunaw4pxmuY2qqmiG2xMKHAAJwNA1wVh16KF0AmMcA9uAStU3O0d/ohuOraMo6dAlABQlg23SUaV9oMBtuJaOgprnAADKksGxTrvVxL5Q4DYsQ0PJ6meXU8Y5R1GWcGwK3D5Q4DZUVcZoYCI/8fvS8qLEaGDR89ue0J/qA2PPQpqddmuBJMlxPjqtNu9tosA9MHQN5EUJVp3mbiVjFfKihOsc5314XUCBe0CSJPxy4SFJTrO/fhSn+PVqBCro2h8K3BPTsYM4yVGd2OYJYxXSrKDl5J5R4J6QZQnX5wNE0Wm1+47iFB8vPSpY3jMKXIOrcxdJmp1M5UlRMkgQuJi4hx7K0aPANZAkCR8vhwjC5NBDaUUQxJhOnEMP4yRQ4J5xMXFhmyrSLD/0UPYqilMMXQNnQ3p2awMF7gXTsYN1EB9tb4+iKBGECS7PaCnZFgrcC1xbx/XUw8IPju6sXFVx+OsIf/plAuNEL6A8BArcH7g6c3E2tOCvo0MPZaf8dYSrMxeT4Wler3woFLif8PFyCM/W4K+OI3TLVYiRa+DqfHDooZwcCtxP+vVqBNdSsQ76fen8KogxsDT8ejU89FBOEgXuFT5dj2AbCparsHfPdEII+KsQjqHg0/Xo0MM5WRS4V/p0PcLQ0bFYBr0pcmaswmIZwHN0CtuB0fbUG3y8HEJTFXyfBxh6Dkyju4c1s7zAah3jl4sBVZJ0gBSnRb/WRh0SRBlmfgzGJQxcq1OtwbkQCKMEmly/T/Rcc2e/thACQtQ3x0pS3YSpS997l1Hg3qmqOG7mIearFAPXgmUd9iyZEAJpmiOMM0zHNj5MB28OQ15WKAqGvKyQ5SXyosIqTOvjOw9/TSEgUB/g1TUFhq5CVWQYukrNiJ6gwO1InBaYLWNEaQnHNmGa7S8z06xAHKfwXAPTsfPqD3teMIRJgTgtkBcMSVZCVRQoigxVVaAqCiRZ+jGjSZK0me3qGY8LgaqqUFUcnHOwikNXZVimBs8x4DnGyV98SYHbsSDOMVvGSPISlmHAsoy9HnmpOEea5kizAq6lYTp2MHjFie00LxElBZbrBFleQddV6JoKRVWgqcq77j0XAigZAysZ8qL80S9l4lmwTA26dnqNZilwexIlBfwgxXwVQ9c0WJYBTVWgvrObsRAAqyqwkiHNChRlienYwcSzYL+itZ0fpFgGKeKkgK5rsEwdmqbu9VmMc448L5FmBUrGcDa0cTayT2rZSYHbM1bxHzOIH6QwdA2aptYX1ysyFFnaLNN+/3pPkgDORR0wVi/VirKEIkuwDQ3joQXH0n+6w5YAsFwlmPkxuAAs0zjI0heow5dmBZI0r2fmiYOBffy9VChwLQvjHHFaoGQcJavgB+nmeahpp69+RuKcYzp2YOgqHEuH+4aekX6Q4u9flrAsA45tQte68UZICIEsLxEnKYaOgenEgWUc74xHgTuw+82G+82HR/eJCAFZlqE9uMXmvsLlZ5d+aV5itoyxjnIMBjYMvbsf5jjJEMUpLicurs7do3zVQIF7B84FSlaBVRxFWSHNSzDGwYUA56IO0g5v5BEAojgHJOD//PnDH34g56sE//y+gjew4di7ew+3T5xzhHEKQ5UwHbtvms27jAL3SklaIE5LpHmJ+SqBLNfPYfXWuQpZln5smTcvE99HArBax/jzn85fPMf25XaNZZBh5DnQOrJ8fI00y7EOYvxy4R1VhQwF7g9UXCDNSizWCeK0AKsEdE2Fqio/ts/lFpc+YZRgYGu4fuZoTV4w3C4ixBnD0HN6vSxjrMIqiDByzaM53UCBe0acFgiiHN/nITRNhW3q0HS1fvl7oA9xnGTQFeDDhde4MxnGOWZ+jEpIcJ3jOFgqBLAKIrimio9Xw1Z/uO0DBe6JIMoxW8WI0xKmUb8/U5XDv6DN8xJlWeDXyyFMY3uJuFgn+H/fVhgP3YNt9e9TEMawdAXXU+/RJlLfUOA2/CDFzI9RMA7HOkxp1nOqimO2WOFPv0wwGmxvfvhBin988zEZe53Z7t+HMEphanULw742rD35wK03Ff95weE4Zie3zZd+iLOh2dgSIYhy/M8/5zibeJ0c+64FYQJLl3t7ru9kA3f/vJNkDI5jdvZMW7TZIm/6gOUFw5fbNWRF69SMvG/+un6m62Po+rsYfofbRYS/fV4CsoqzidfZsDFWIYzSZ/tG3i4icMgnFTYAGA9drOMCt4v+NXU63gV/g7yscDsPESYlzs+GnT8qEkQJPl56je/bvtyuEaYlJqPT7Lw1Hjr4erd+c6nboXT7E7dDqzDDf//PDXImMBkPOh+2LC9ganLjS9/lOsFinWI8PJ4Xwq+lKApGnoOZ368uat3+1O3I3TLCb1+XOBt7vXk/FYQJpuPtCzaEEJj5MUbecdYavoZlGUhzhu/z8NBD+WlHH7ivdwFu5hHOJ0MYPalCj5MM44HZ2Ifk2yyEkGTo1J4cAOB5Dr7PQqRZeeih/JSjDtyX2zVWYY6zs+G7D362RQiBOMkar4+K0wIzP8bApZtu7imyDG9g92ZpebSB+3oXwA8yjEdur8qB0qzA0DUaz4Tdh61P308bHNvEOi6wCrp/a+1RBu7rXYBlkGEy9nr1nCNE/d6t6dktyxnWUQ77DV3BhBBgrALf4VGhfRDAm+9WH7hWL2a5o3sQuF1EWKwSnE36V/5TlCUsoz7V/dTMj950po2xCv46AmMVJEmCbRnwBt1bkqZZjjBMwQWHpqkYDwev+v9n6BqCMEGY5J1u1XBUgVuFGb7NApyf9S9sAJCkOS4n22EoGcd8leJy+rrKCiEElqsQ1+cuzkYOOOe4mUdYBzGGXneuGM7yAqJi+LdfJzANFXfLCItViLPx63pquo6F2TLudOCOZklZlBVmfozxcNCJ6v7X4lwgz0t4zvYsNl/FcGzj1cvjPC/hWjouJi4UWYKmKvW5MsFRlGxXQ38XIQSCoH4F4tp1Q6QPUw+mJr96jJapI0wKZEU3vrcmRxO4m3kISHJvtv6fyvICY89sPHry7S54U/kZF6Lx3Nx07CAMkzeNc9eSNMfY234FoqoK+BuuerYtA4tVN763JkcRuJkfYx0XvXmp3STPy8b3bnFaQNfUN7VJ0HUV81WMpzdrnY1sWIaCLC/eOtydEEIgjNKtVyBFWbdU199w+sE09brGtKMbRL0PXMkqfL5ZdeqZ5LU4FyjKevn31DrMYLyxuFpVFNi2idvFdiVGPcsddhs9ilNcNLTFm/kxXMd6U/mdqij1Bkqc72qYO9X7wN3MI7iODa0nL7absKqCqatbrb+FAL7PQ5jv6Ew8cCx8m4WonizPPNfE0NWRpIf5YHLOEcXZ1kmIJCsx8+N3dRkzDQ3rKHvvEPei14ELkxzLIIXr9ncpCQBFUTZWvBclg6oo0NS3byYrigzHNnHTcJRlOnYQRelBbnMNoxTX54OtZ8yZH2PgvO/qL93QsFglnVxW9jpws2VdedG/FwCPFQVrvIAjTIqd1Ezeb5en+eN6Q9vSMRmarc9yjFVIkgxX549nt3WUYRVmsN/ZQ1NV6jscnn6/XdDbwK3DDHFawjqCw5clYzAbdlfDONvJrqssS3CfqcSYjl2EUdrqbBBGCT5eDbdmsZkf7+ylvKFr+Otvs538WrvU28AdSxFvfZeagNawQZDmbGdF17ZlwA8yRMnjnUnTUHE5cRDF7WygFAWDImPrnN9ynSDNq52dvte0uikve8OrhX3qZeCStECSs96+c3uIVRWEEFuVMaziyAsGWdrN/yJJkjb1htvPcpfnA8RJtrWxsg9h1HzO77evPrwd/gBVFRmSJLfyPb1GLwM3XyVvKuLtIsaqxg9gXtQbJrssUbNMA2FSYhU+3sFTZAkfpoO9z3J5XsLQZUyGj4N1t4xgmfpOz/jJsgxFkVGyame/5i70LnCcC8xXSWcb/7xWVfHGm0DzsoKyhy7Pnmu/OMuxPX5A69nt8VKSC4EvN+udPx5IsgRVkZEVFLh3WYUpTFPvfE+Sn9W0nASAivG9FGAbhoaiFFsbKBKAT1cjBNF+yqLSNIdr61uNbG8XERzH3PkBYQn1LEdLyncKovyoGp6KzR1wT3Eh9naWbzCw8M/vq61/Pp04UOV6Y2PXwoZzfqziuJmHcOx+v0d9jV4FruICy821vcdCCAGlaYbjfG+B01QVtmU09nWcjh2EO57l7nu0PH25fzsP4djmXlYr99eF8QO81H9JrwKX5SU0VTma5SRQl281BYtzgX0eVh+4Nr7eBVsnrCdDG6a+u8JmzgWihgLlNC8xWyV7LjiXDlJF85LefHIFgL/+NntTBXmnScBWOT92f5HjUz9KvubPzXK72bG8b4i0VaC8rAuU9/V9CmyW6x1rsdGbwDHGIcvH1x5OkqTGZY8s7/+n833JV/7kmW04MOE57y9srir+40TAQ0Gcww8z2NYer0He3JmuNDwfH1K3RvMCVlWQZamXp7lfIksSqoayKkVuDuJOf29ZguM8V/L1/sLmKE7xYTrYOskxW8bwXHuvS2YhNjOcQjPcm+SbMqc+9ip5iSRJjXWMsiQ1rTR3zrENLFYp4vTxM5tj6ZgMrTfPcoxVSNK8oYQrRZKXLVxAIsCf2ZA6pN4ELs0ZNFVp3ELvM0mSGlvDadrbWgy85fd33Xpp+dT9s9xbCpvDOMXHS2/rB+TMj3ZawvUcLsSmqKBbjyC9+fQWrOrcenwXFEVG0VANYWgqWNVOL0nbMhAk241UTUPFxcRBnLxuA6UsGWSIrdlt5sdgHK1sfNVF4bxz1xN3azQvEFxgr4v+A1FVBYt1srV81HUFVcUhRDuVEs+1C788cxHFrytsDhoKlLkQ+HyzbmV2A/Cj8W3Xfkh3azQv2GflxSHdFyjzJ8tKWZJgm1rjhso+GLqGvORbHa/qtnU/X9icFyV0VcbZ6EmB8qIuUG7rjgfGqk7eBd6bwAmx3xfBhyLLEmRZRsm2ZxDb1FC22D/SG9j4xzd/659fnrlI0vynCpvDhmu2WMXxbRa2en6xLBkcq3vvbHsUOEDqfTOFZpqqIsm2Kzs8x0BetNcmQNNUWA0lX5Ik4eOl94cvw9Msh2trGHuPq0fuFhFcZz8lXE2qiqNkVeMp+kPrT+AOPYA9MnQVYbIdOMfWUZas1e/dc61Nydfj3/Vi4kKWxLPdkAXqxkBPj9+keYnbZdxqgXJelJgMrc69EgB6FLhjpuna1nswANDUeuOkaHGWUxQFjm3irqmwefJ8x+Y4zjDxrK0C5brRk9Xqs1TdBa2bB5R7E7g2Ki8ORVXqZ7imLlOfrkbIGpab++Q6dVu9p6elz4Y2DE3eWuZyLhAn2yVcUVKXcL2nx+RrcS6QFyW8hi5oXdCbwGmqvLWTdywkSYKha1sNfoC6rjHLi1ar3mW5Lmx+9vjOk1kuSTNMxw6MJ3Wu97Nbm4qixMDWG0/Rd0FvAudYOoqCde64xa4YhoZ1uN0tWNcUDGwdecs9Fl3HxHyVbC11R56FoWsgTuqxlqzaPLs9nt38IEWUlrDMdmeaNCswHna3m1tvAjd0TeRF0equXZsMXUeclluV+wBwPnZab9Zad/myny35CsIEy1WIpR/g16vh1owy82MMWr74sao4srzAqOFSlK7oTeAURca/fZwgCJOjnOUkqb75xW+Y5YauCUVG63e6WZuSr6d9+i1Tw1/+fI0P5y7+839dbM1ucz9GyUTrJ/PjJMP19HU3p7atN4ED6gsozoYW1kH373J+C8sysHzmbrPpxEHcUrPWexKevztbliSMPavhAhKxadLb7rObEAJpluOsw8tJoGeBA4CPl0M4porVEYZOUxVwgcarlsaehSwv99rGrolp6MhLji+365/67z/friHJypvus3uPNCswHpid3Sy517vAAcCn6xEcQ8F8se5co8/3cmyz8blJliR8vBwiOMDNpeOhCz/M8O0uePG/+3yzRhiXrd/Vx7moe14+OZ3QRVKcFr19IJr5MT7frGFbxqZzb/dKed5itljjX66HGDY8/P/9yxKSrLZwgPMxzgX8dQjH1DAamDAN9cdp9TQrsQpTFExgOHRbL8BbhzEGloZfLryWf+fX63XggPoUwcJPsAxSFKyCpqrQdRWGrvX2sGqWF6jKEv/709nWvwvjHH/7ssT0fHSQBjlpmiPLC5SsghB18bWmKjBN/SDdsIuSYb5Y47/+40MvTpP0PnAPRUmBNCsRpTlWYQ5VkaHrGjRV2bRnkCHJUuc6OTVZrSNcjO2tYy4A8PUuQBAXGA0Pt4QSQmxa/O2/w9hLZos1fpkOGv+cuuioAvdQyTiKkiFKCiRZiSwvkeYMiiJDkWXIsgxZljYNQ6UfjUN/fMXv/wz3/76lsUtS/ULZX0X4y79fN25z//3LEpDVo7gf763WQQzbUPDpenToofy0bjV82CFNlaGpOpwHF9VXvK52Z6w+vsE2d7NxIR585RD3fy+AIMp+/ARv9we59OjLU9Oxg//7eQFdGx1VY9yflaQ5TF3uVdiAI57hdolvlk+ttNHC701MFUV+cfl7Mw8xW6U4Gw968fyyK2XJMF8G+Pd/PX/0A7UPjnaG2yW5XmPi2enmQK7OB2AVh7+KMBkPDj2cVjBWYemH+HQ17F3YgJ6+hyO/+3g5xMDWjrb65iHOBZarEB8uBjhvuMSyDyhwR+DT9Qi2oRx16KqKY+EHmI7srfZ7fUKBOxL3ofNX0dEVd9fPbGtMxzY+9ODl9ksocEfk0/UInqNh6YeN3Zz7KMsLLPwQv14OcX3e/+dU2qU8Qt/nIW4XEUaeC6ODnat+VhilkMExnTiNZW59RIE7Uqsww98+LzBw7daPyrxXxTnWQV0feT31Oteu/D0ocEesZBVu5hHWUQ7XtXpxVXOcZIjiFJdn7lEsIZ+iwJ0AP0gx82NUvD5QqnTwjr08LxFGCYaugYuJC9M4zlfEFLgTcruI8PUugG0ZsC2j9UOiTwkhkOcl4iSDqSuYjh0MB8fxrPYcCtyJuT/OtFgn4AIwjPpYTZt9QCrOkaY50qyAY6qYjl14bjf7SO4aBe6E+UGKIMrhhyk0TYVt1rPePoqhK87rW1GTDHnBcDFxMBqYvSzPeg8KHEFRVojTAn6QYhVmPw7wqqqyuU5LftUMKABUrAJjFVhVoSgZiqK+zWY6duDa+ta936eCAkce4UIginOEcY40Zwjj/Efgmr7WB1HrvzgX9a2tFUfFOTzHgGlocCwNjnW6IXuIAkdeVC8FOVj14OvmOqiq4r8HUJKgKDIMXYGuKdBV5STP6f2R49x7JTujyDIUXcZpbGnsH/0IIqRFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RF/x8qjTga7LYI7gAAAABJRU5ErkJggg=="},NajC:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("mvHQ"),r=a.n(i),l=a("Gu7T"),s=a.n(l),o=a("Ke24"),n=a("Ie7z"),c=a("c4uw"),d=a("vRJf"),u=a("P9l9"),m=a("Ch4/"),g=a("PI0u"),h={name:"use-record",props:{detailShow:{type:Boolean,default:!1},materialId:{type:String,default:""}},data:function(){return{customDialog:!1,activeName:"first",tableData:[],conditionObj:{searchInput:"",materialId:this.materialId},currentPage:1,pageSize:5,total:0}},methods:{toInput:Object(g.a)(function(e,t){this.currentPage=1,this.getTableList()},500),clearInput:function(){this.currentPage=1,this.getTableList()},handleSizeChange:function(e){this.pageSize=e,this.getTableList()},handleCurrentChange:function(e){this.currentPage=e,this.getTableList()},handleClose:function(e){e(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.$emit("hideDetailDialog")},getTableList:function(e){var t=this,a={materialId:t.conditionObj.materialId,imgTextTitle:t.conditionObj.searchInput||"",relatedType:4,pageNum:t.currentPage,pageSize:t.pageSize,brandId:t.activeBrand};Object(u.a)("/haoban-app-material-web/material-log",a).then(function(e){var a=e.data;if(1==a.errorCode)return t.tableData=a.result.list||[],t.total=a.result.total,!1;m.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{detailShow:function(e,t){this.customDialog=e},materialId:function(e,t){e&&(this.conditionObj.materialId=e,this.currentPage=1,this.getTableList())}},mounted:function(){this.customDialog=this.detailShow,this.materialId&&(this.conditionObj.materialId=this.materialId,this.currentPage=1,this.getTableList())}},f={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"show",rawName:"v-show",value:e.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:"记录",visible:e.customDialog,width:"739px","before-close":e.handleClose},on:{"update:visible":function(t){e.customDialog=t}}},[a("div",{staticClass:"edit-dialog-body"},[a("div",{staticClass:"m-b-20 flex"},[a("el-input",{staticClass:"w-203",attrs:{placeholder:"请输入标题","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.conditionObj.searchInput);var a}},model:{value:e.conditionObj.searchInput,callback:function(t){e.$set(e.conditionObj,"searchInput",t)},expression:"conditionObj.searchInput"}})],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,height:"332"}},[a("el-table-column",{attrs:{label:"发布人",width:"150","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.userName||"--")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"标题","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.phoneNumber||"--")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"发布时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToYmd")(t.row.createTime)))]),e._v(" "),a("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToHms")(t.row.createTime)))])]}}])})],1),e._v(" "),0!=e.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[20,40,60,80],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])],1)},staticRenderFns:[]};var p=a("VU/8")(h,f,!1,function(e){a("TjhY")},"data-v-28498945",null).exports,v=a("l46T"),I=a("Kkt8"),b=a("3E4D"),S={name:"chat-log",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},components:{commonDetailTop:o.a,vueSelectStore:n.a,vueSelectEmployee:c.a,materialPreview:d.a,useRecord:p,limitInput:v.a,limitTextarea:I.a},data:function(){return{activeBrand:this.brandId,activeGroup:this.activeGroupId,activeId:"2",topMenuData:[{id:"1",name:"图文素材",path:"/imageText?appIcon="+this.$route.query.appIcon},{id:"2",name:"选择图文"}],tableData:[],searchInput:"",selectType:"",treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1,openNextBool:!0},defaultSelection:[],changed:"",onlyPerson:!1,appScene:2,defaultStoreList:[],storeTreeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1},defaultImg:a("FFFL"),currentPage:1,pageSize:6,total:0,enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,userId:JSON.parse(localStorage.getItem("userInfo")).userId,formData:{materialId:"",imageTextWechatId:"",imageTextGicId:"",titleName:"",imageUrl:"",imageTextUrl:"",rangeList:[],materialTitle:"",materialContent:"",topFlag:!1},rules:{imageTextWechatId:[{required:!0,message:"请选择图文",trigger:"change"}],materialTitle:[{required:!0,message:"请请输入素材标题",trigger:"blur"}],materialContent:[{required:!0,message:"请请输入发送内容",trigger:"blur"}],rangeList:[{validator:function(e,t,a){if(""==t||!t.length)return a(new Error("请选择选择行政架构或门店架构"));a()},trigger:"change"}]},previewVisible:!1,materialPreviewData:{},detailShow:!1,imageTextWechatId:""}},methods:{showRecord:function(e){if(!e.useCount)return!1;this.detailShow=!0,this.imageTextWechatId=e.imageTextWechatId},hideDetailDialog:function(){this.detailShow=!1,this.imageTextWechatId=""},showPreviewDetail:function(e){this.materialPreviewData={materialTitle:e.titleName,materialContent:e.mediaUrl},this.previewVisible=!0},submitForm:function(e,t){var a=this;a.formData.rangeList=[].concat(s()(a.defaultStoreList),s()(a.defaultSelection)),a.$refs[e].validate(function(e){e&&a.postSaveCard(t)})},postSaveCard:function(e){var t=this,a=[];t.formData.rangeList.forEach(function(e){a.push({groupId:2==e.type?e.groupId:"",storeId:3==e.type?e.storeId:"",storeFlag:e.isStoreGroup})});var i={enterpriseId:t.enterpriseId,imageTextWechatId:t.formData.imageTextWechatId,imageTextGicId:t.formData.imageTextGicId,materialContent:t.formData.materialContent,imageTextUrl:t.formData.imageTextUrl,materialTitle:t.formData.materialTitle,rangeListStr:r()(a),topFlag:t.formData.topFlag?1:0,relatedType:1,brandId:t.brandId,userId:t.userId};Object(u.e)("/haoban-app-material-web/material-add",i).then(function(a){var i=a.data;1==i.errorCode&&(b.a.showmsg("新建成功","success"),e?(t.formData={materialId:"",imageTextWechatId:"",imageTextGicId:"",titleName:"",imageUrl:"",imageTextUrl:"",rangeList:[],materialTitle:"",materialContent:"",topFlag:!1},t.defaultStoreList=[],t.defaultSelection=[]):t.$router.push("/imageText?appIcon="+t.$route.query.appIcon)),m.a.errorMsg(i)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},previewData:function(e){var t=this;t.formData.rangeList=[].concat(s()(t.defaultStoreList),s()(t.defaultSelection)),t.$refs[e].validate(function(e){e&&(t.tableData.forEach(function(e){e.imageTextWechatId==t.formData.imageTextWechatId&&(t.formData.imageUrl=e.imageUrl,t.formData.titleName=e.titleName)}),t.materialPreviewData=t.formData,t.previewVisible=!0)})},toReturn:function(){this.$router.go(-1)},changeId:function(e,t){this.formData.imageTextWechatId=e,this.formData.imageTextGicId=t.imageTextId},toInput:Object(g.a)(function(e,t){this.currentPage=1,this.getTableList()},200),clearInput:function(){this.currentPage=1,this.getTableList()},showDialogLayer:function(e,t){return!this.$route.query.materialId&&(this.selectType=e,this.changed=e,"store"===e?(this.defaultStoreList=t,void(this.storeTreeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!1,openNextBool:!0})):(this.treeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!1,openNextBool:!0},void(this.defaultSelection=t)))},handleSelectedList:function(e){"store"===this.selectType?this.defaultStoreList=e:this.defaultSelection=e,this.formData.rangeList=[].concat(s()(this.defaultStoreList),s()(this.defaultSelection))},delDepart:function(e,t,a){if(this.$route.query.materialId)return!1;t.splice(e,1),this.formData.rangeList=[].concat(s()(this.defaultStoreList),s()(this.defaultSelection))},handleSizeChange:function(e){this.pageSize=e,this.getTableList()},handleCurrentChange:function(e){this.currentPage=e,this.getTableList()},getImageData:function(){var e=this,t={materialId:e.$route.query.materialId,brandId:e.brandId};Object(u.a)("/haoban-app-material-web/material-detail",t).then(function(t){var a=t.data;if(1==a.errorCode){var i=[],r=[];return a.result.rangeVOList&&a.result.rangeVOList.forEach(function(e){e.groupId=2==e.type?e.id:"",e.storeId=3==e.type?e.id:"",e.isStoreGroup=e.storeFlag,1==e.storeFlag?i.push(e):r.push(e)}),e.formData={materialId:a.result.materialId,imageTextWechatId:a.result.imageTextWechatId,imageTextUrl:a.result.imageTextUrl,titleName:"",imageUrl:"",materialTitle:a.result.materialTitle,materialContent:a.result.materialContent,topFlag:1==a.result.topFlag,rangeList:a.result.rangeVOList,createTime:a.result.createTime},e.defaultStoreList=i||[],e.defaultSelection=r||[],!1}m.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getTableList:function(e){var t=this,a={title:t.searchInput||"",pageNum:t.currentPage,pageSize:t.pageSize,brandId:t.activeBrand};Object(u.a)("/haoban-app-material-web/wechat-material-detail",a).then(function(e){var a=e.data;if(1==a.errorCode)return t.tableData=a.result.list||[],t.total=a.result.total,t.$route.query.materialId&&t.getImageData(),!1;m.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{brandId:function(e,t){e&&(this.activeBrand=e,this.getTableList())},activeGroupId:function(e,t){e&&(this.activeGroup=e)}},mounted:function(){this.$emit("showTab","1"),this.brandId&&this.getTableList()}},w={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"chat-log boder-box"},[a("common-detail-top",{attrs:{topMenuData:e.topMenuData,activeId:e.activeId}}),e._v(" "),a("div",{staticClass:"new-card-body"},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.formData,rules:e.rules,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"选择图文:",prop:"imageTextWechatId"}},[a("div",{staticClass:"search-div"},[a("el-input",{staticClass:"w-264",staticStyle:{width:"264px"},attrs:{placeholder:"请输入图文标题",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.searchInput);var a}},model:{value:e.searchInput,callback:function(t){e.searchInput=t},expression:"searchInput"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})])],1),e._v(" "),a("div",{staticClass:"chat-log-content boder-box m-t-20"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{label:"",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-radio",{attrs:{disabled:!!e.$route.query.materialId,label:t.row.imageTextWechatId},on:{change:function(a){e.changeId(a,t.row)}},model:{value:e.formData.imageTextWechatId,callback:function(t){e.$set(e.formData,"imageTextWechatId",t)},expression:"formData.imageTextWechatId"}},[e._v(e._s(""))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"imageUrl",label:"图片","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"cell"},[a("img",{staticClass:"img-40",attrs:{src:t.row.imageUrl?t.row.imageUrl:e.defaultImg,alt:""}})])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"titleName",label:"图文标题","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"cell color-1890ff cursor-pointer",on:{click:function(a){e.showPreviewDetail(t.row)}}},[e._v(e._s(t.row.titleName||"--"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"作者","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.authorName||"--")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"storeMode",label:"使用记录","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"cell color-1890ff cursor-pointer",on:{click:function(a){e.showRecord(t.row)}}},[e._v(e._s(t.row.useCount||"--"))])]}}])})],1),e._v(" "),0!=e.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,layout:" prev, pager, next",total:e.total},on:{"current-change":e.handleCurrentChange}})],1):e._e()],1)]),e._v(" "),a("el-form-item",{staticClass:"input-item is-required",attrs:{label:"发送范围:",prop:"rangeList"}},[a("div",{staticClass:"form-item-tip fonr-14 color-909399"},[e._v("下面两项可二选一,非全选。可选择行政架构或门店架构")]),e._v(" "),a("div",{staticClass:"flex"},[a("div",{staticClass:"flex-column item-cell-select inline-block "},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"240px"},on:{click:function(t){e.showDialogLayer("depart",e.defaultSelection)}}},[e.defaultSelection.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[e._v("请选择行政架构")]),e._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[e._l(e.defaultSelection,function(t,i){return[a("span",{key:i,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(i,e.defaultSelection,"depart")}}})])]})],2)])])])])]),e._v(" "),a("div",{staticClass:"flex m-t-20"},[a("div",{staticClass:"flex-column item-cell-select inline-block"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"240px"},on:{click:function(t){e.showDialogLayer("store",e.defaultStoreList)}}},[e.defaultStoreList.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[e._v("请选择门店架构")]),e._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[e._l(e.defaultStoreList,function(t,i){return[a("span",{key:i,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(i,e.defaultStoreList,"store")}}})])]})],2)])])])])])]),e._v(" "),a("el-form-item",{attrs:{label:"发送内容标题:",prop:"materialTitle"}},[a("limitInput",{attrs:{disflag:!!e.$route.query.materialId,inputWidth:320,inputValue:e.formData.materialTitle,holder:"请输入素材标题",getByType:"word",maxLength:15},on:{"update:inputValue":function(t){e.$set(e.formData,"materialTitle",t)}}})],1),e._v(" "),a("el-form-item",{attrs:{label:"发送内容:",prop:"materialContent"}},[a("limitTextarea",{attrs:{disInput:!!e.$route.query.materialId,inputWidth:320,inputValue:e.formData.materialContent,holder:"请输入素材内容",maxLength:1500},on:{"update:inputValue":function(t){e.$set(e.formData,"materialContent",t)}}})],1),e._v(" "),a("el-form-item",{attrs:{label:"更多设置:",prop:""}},[a("div",[a("el-checkbox",{attrs:{disabled:!!e.$route.query.materialId},model:{value:e.formData.topFlag,callback:function(t){e.$set(e.formData,"topFlag",t)},expression:"formData.topFlag"}},[e._v("置顶")])],1)]),e._v(" "),a("el-form-item",[a("el-button",{on:{click:e.toReturn}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.previewData("ruleForm")}}},[e._v("预览")]),e._v(" "),a("el-button",{attrs:{disabled:!!e.$route.query.materialId,type:"primary"},on:{click:function(t){e.submitForm("ruleForm")}}},[e._v("发布")]),e._v(" "),a("el-button",{attrs:{disabled:!!e.$route.query.materialId,type:"primary"},on:{click:function(t){e.submitForm("ruleForm","flag")}}},[e._v("发布并添加下一个")])],1)],1)],1)],1),e._v(" "),a("vue-select-employee",{attrs:{appScene:e.appScene,defaultSelection:e.defaultSelection,onlyPerson:e.onlyPerson,treeSet:e.treeSet,changed:e.changed},on:{handleSelectedList:e.handleSelectedList}}),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{currentBrand:e.activeGroup,appScene:e.appScene,treeSet:e.storeTreeSet,selectType:"group-store",defaultList:e.defaultStoreList},on:{handleSelectedList:e.handleSelectedList}}),e._v(" "),a("material-preview",{ref:"materialPreview",attrs:{materialPreviewData:e.materialPreviewData},model:{value:e.previewVisible,callback:function(t){e.previewVisible=t},expression:"previewVisible"}}),e._v(" "),a("use-record",{attrs:{materialId:e.imageTextWechatId,detailShow:e.detailShow},on:{hideDetailDialog:e.hideDetailDialog}})],1)},staticRenderFns:[]};var D=a("VU/8")(S,w,!1,function(e){a("qm9b")},"data-v-132bf8c0",null);t.default=D.exports},NoP7:function(e,t){},TjhY:function(e,t){},qm9b:function(e,t){},vRJf:function(e,t,a){"use strict";var i=a("mvHQ"),r=a.n(i),l={name:"material-preview",props:{value:{type:Boolean,default:function(){return!1}},materialPreviewData:{type:[Object,Array],default:function(){return{materialId:"",imageTextWechatId:"",imageTextGicId:"",titleName:"",imageUrl:"",rangeList:[],imgUrlList:[],materialTitle:"",materialContent:"",topFlag:!1}}}},directives:{htmlContent:{bind:function(e,t){e.innerHTML=t.value},update:function(e,t){e.innerHTML=t.value}}},data:function(){return{materialData:{materialId:"",imageTextWechatId:"",imageTextGicId:"",rangeList:[],imgUrlList:[],materialTitle:"",materialContent:"",topFlag:!1}}},methods:{closeDialog:function(){this.$emit("input",!1),this.$emit("closePre")}},watch:{value:function(e,t){this.materialData=JSON.parse(r()(this.materialPreviewData))},materialPreviewData:function(e,t){this.materialData=JSON.parse(r()(e))}},mounted:function(){this.materialData=JSON.parse(r()(this.materialPreviewData))}},s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.value?a("div",{staticClass:"qr-dialog-content",staticStyle:{opacity:"1"}},[a("div",{staticClass:"qr-mask",on:{click:function(t){return t.stopPropagation(),e.closeDialog(t)}}}),e._v(" "),a("div",{staticClass:"qr-dialog border-box"},[a("div",{staticClass:"qr-dialog-body border-box"},[a("h2",{staticClass:"font-20 color-222 text-left main-title"},[e._v(e._s(e.materialData.materialTitle))]),e._v(" "),a("div",{staticClass:"notice-date m-t-10 flex flex-space-between"},[a("div",{staticClass:"notice-date-left font-10 color-88949C"},[e._v(e._s(e._f("timeStampToYmd")(e.materialData.materialId?e.materialData.createTime:(new Date).getTime())))]),e._v(" "),a("div",{staticClass:"notice-date-right font-10 color-4d7fd0"})]),e._v(" "),a("div",{directives:[{name:"htmlContent",rawName:"v-htmlContent",value:e.materialData.materialContent,expression:"materialData.materialContent"}],staticClass:"notice-body border-box font-14 color-222"}),e._v(" "),e.materialData.imgUrlList&&e.materialData.imgUrlList.length?a("div",{staticClass:"img-list-wrap"},[a("ul",{staticClass:"flex flex-wrap"},e._l(e.materialData.imgUrlList,function(e,t){return a("li",{key:t+"img",staticClass:"border-box flex flex-align-center flex-pack-center"},[a("img",{attrs:{src:e.imgUrl,alt:""}})])}))]):e._e(),e._v(" "),e.materialData.imageTextWechatId?a("div",{staticClass:"image-text-link"},[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex-left-img flex flex-align-center flex-pack-center"},[a("img",{attrs:{src:e.materialData.imageUrl,alt:""}})]),e._v(" "),a("div",{staticClass:"flex-right-title border-box"},[a("div",{staticClass:"title-content font-14 color-606266"},[e._v(e._s(e.materialData.titleName))])])])]):e._e()])]),e._v(" "),a("div",{staticClass:"qr-dialog__hd"},[a("i",{staticClass:"el-icon-plus",on:{click:function(t){return t.stopPropagation(),e.closeDialog(t)}}})])]):e._e()},staticRenderFns:[]};var o=a("VU/8")(l,s,!1,function(e){a("NoP7")},"data-v-d6932054",null);t.a=o.exports}});
\ No newline at end of file
webpackJsonp([14],{FFFL:function(e,t){e.exports="data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAADcCAYAAAAbWs+BAAAbLklEQVR4nO3d2XLjSJYm4B/7SnCRqCUyMrpresy6uq9q+v0foy/KrKcqayo2SVxAYl8c7nMBKlISIWVIIkGAPJ9ZmtIy0yJckfzlDsfx41KcFgKEkFbIhx4AIaeEAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIiyhwhLSIAkdIi9RDD+DUlKxCljPkBUNWMGQ5Q8kqcC5QcQHOOSRZgiLLUGQJmqrA0FWYhgpz81VTlUN/G+SNpDgtxKEHcezygsEPUiRZiSDKoaoKFFWBqihQVRmKLEOSJMiyBEmSIIQAFwKCC3AuwKoKjP3+l+casE0NY8+CodPPzD6hwO0JqzjWYYbFOkGaMZimDk1ToWsqFOXtK/mq4ihKhrJkyLIClqnibGhjODChvuPXJe2gwO0Yqzjmfozv8wimocGyDGiqClmWdv57cS5QMoY0zZHlBa7PBzgfOxS8DqPA7QjnAjM/xrdZANsy4djmu2ay16qqCnGSI0kzfJh6mE4cyNLuQ07ehwK3A4tVgn988+E6FhzbgKIcblODVRWSJEMUZ/jXD2OcjeyDjYVso8C9Q1FWuJmHCJICA9eGrnVnA6MsGYIwgefouDofQNdoZ7MLKHBvtAoz/O3zAt7AhutYhx7Os6I4hSQ4phMHQ9c89HBOHgXuDe6WEb7dhRgNXRiGdujh/KEsL7Bax/h4UT/bkcOhwL3St7sAs1WCyWgAtUcvoBmrsFyFmI5tfJh6hx7OyerOQ0cPfL0L4AcZzifDvWzz75OqKjifDLFYhQBAoTsQemHzk24XEearBOPRoHdhuyfLEiYjFzM/wc08PPRwThIF7icsVgm+z0Ocjb3ehu2eLMs4G3u4WURYrtNDD+fkUOD+QJQU+Mc3H+PRoNUX2fukKDLGQxe/fV0izctDD+ekHMcnaE+EAGZ+jPHQ7dQ7tl3QdQ1Dz8FsGR96KCeFAveCr3dr5CWHZRmHHspeOLaJOGP4ehcceigngwL3jCDOsVil8AbHXRrlbWa5OC0OPZSTQIF7xsyP4Q1sSEdeACxLEgYDm5aWLaHANXh4hu0U2JaBMC2xCmnXct8ocA1myxiDI19KPjVwLZrlWkCBe2K5TlBxHN2u5B8xdA1ZyRFE2aGHctQocE/M/LjT1f/75DomZj7NcvtEgXsgTgsUJYd+oo15TENHmJTIC3booRwtCtwDqzA7mY2S59iWjmVAmyf7QoHb4ELgdhHBNE47cKap4xu9CN8bCtxGmpVQVaVXZ9z2QVUUaJqKJKMay32gwG0kWXlyO5NNJEmCrqlUebInFLiNMM6h691vl9AGjQK3NxQ4AAKAH6TU2WpDVRUsVwmEoO4bu0aBQ93vQ5ZlyDL9cQD1eTlZlsEqfuihHB36hAHIcgZNVY6+UPlnKZsfPoxR4HaNAoe6oeuxnObeFVmWaIbbA/qUoX4HR7PbYxS4/aDAAbQ50ICe4faDAoe6dwlNcI9JkoSKArdzFDjUp55pkttGy+zdo8Chfl6hZeVjXAgoPe/B2UUUOFDgmgguet/0tosocABURQbnFLiHOOfQTryQex8ocABMQwVjFc1yD1ScQ1Xp47Fr9CeKunaw4pxmuY2qqmiG2xMKHAAJwNA1wVh16KF0AmMcA9uAStU3O0d/ohuOraMo6dAlABQlg23SUaV9oMBtuJaOgprnAADKksGxTrvVxL5Q4DYsQ0PJ6meXU8Y5R1GWcGwK3D5Q4DZUVcZoYCI/8fvS8qLEaGDR89ue0J/qA2PPQpqddmuBJMlxPjqtNu9tosA9MHQN5EUJVp3mbiVjFfKihOsc5314XUCBe0CSJPxy4SFJTrO/fhSn+PVqBCro2h8K3BPTsYM4yVGd2OYJYxXSrKDl5J5R4J6QZQnX5wNE0Wm1+47iFB8vPSpY3jMKXIOrcxdJmp1M5UlRMkgQuJi4hx7K0aPANZAkCR8vhwjC5NBDaUUQxJhOnEMP4yRQ4J5xMXFhmyrSLD/0UPYqilMMXQNnQ3p2awMF7gXTsYN1EB9tb4+iKBGECS7PaCnZFgrcC1xbx/XUw8IPju6sXFVx+OsIf/plAuNEL6A8BArcH7g6c3E2tOCvo0MPZaf8dYSrMxeT4Wler3woFLif8PFyCM/W4K+OI3TLVYiRa+DqfHDooZwcCtxP+vVqBNdSsQ76fen8KogxsDT8ejU89FBOEgXuFT5dj2AbCparsHfPdEII+KsQjqHg0/Xo0MM5WRS4V/p0PcLQ0bFYBr0pcmaswmIZwHN0CtuB0fbUG3y8HEJTFXyfBxh6Dkyju4c1s7zAah3jl4sBVZJ0gBSnRb/WRh0SRBlmfgzGJQxcq1OtwbkQCKMEmly/T/Rcc2e/thACQtQ3x0pS3YSpS997l1Hg3qmqOG7mIearFAPXgmUd9iyZEAJpmiOMM0zHNj5MB28OQ15WKAqGvKyQ5SXyosIqTOvjOw9/TSEgUB/g1TUFhq5CVWQYukrNiJ6gwO1InBaYLWNEaQnHNmGa7S8z06xAHKfwXAPTsfPqD3teMIRJgTgtkBcMSVZCVRQoigxVVaAqCiRZ+jGjSZK0me3qGY8LgaqqUFUcnHOwikNXZVimBs8x4DnGyV98SYHbsSDOMVvGSPISlmHAsoy9HnmpOEea5kizAq6lYTp2MHjFie00LxElBZbrBFleQddV6JoKRVWgqcq77j0XAigZAysZ8qL80S9l4lmwTA26dnqNZilwexIlBfwgxXwVQ9c0WJYBTVWgvrObsRAAqyqwkiHNChRlienYwcSzYL+itZ0fpFgGKeKkgK5rsEwdmqbu9VmMc448L5FmBUrGcDa0cTayT2rZSYHbM1bxHzOIH6QwdA2aptYX1ysyFFnaLNN+/3pPkgDORR0wVi/VirKEIkuwDQ3joQXH0n+6w5YAsFwlmPkxuAAs0zjI0heow5dmBZI0r2fmiYOBffy9VChwLQvjHHFaoGQcJavgB+nmeahpp69+RuKcYzp2YOgqHEuH+4aekX6Q4u9flrAsA45tQte68UZICIEsLxEnKYaOgenEgWUc74xHgTuw+82G+82HR/eJCAFZlqE9uMXmvsLlZ5d+aV5itoyxjnIMBjYMvbsf5jjJEMUpLicurs7do3zVQIF7B84FSlaBVRxFWSHNSzDGwYUA56IO0g5v5BEAojgHJOD//PnDH34g56sE//y+gjew4di7ew+3T5xzhHEKQ5UwHbtvms27jAL3SklaIE5LpHmJ+SqBLNfPYfXWuQpZln5smTcvE99HArBax/jzn85fPMf25XaNZZBh5DnQOrJ8fI00y7EOYvxy4R1VhQwF7g9UXCDNSizWCeK0AKsEdE2Fqio/ts/lFpc+YZRgYGu4fuZoTV4w3C4ixBnD0HN6vSxjrMIqiDByzaM53UCBe0acFgiiHN/nITRNhW3q0HS1fvl7oA9xnGTQFeDDhde4MxnGOWZ+jEpIcJ3jOFgqBLAKIrimio9Xw1Z/uO0DBe6JIMoxW8WI0xKmUb8/U5XDv6DN8xJlWeDXyyFMY3uJuFgn+H/fVhgP3YNt9e9TEMawdAXXU+/RJlLfUOA2/CDFzI9RMA7HOkxp1nOqimO2WOFPv0wwGmxvfvhBin988zEZe53Z7t+HMEphanULw742rD35wK03Ff95weE4Zie3zZd+iLOh2dgSIYhy/M8/5zibeJ0c+64FYQJLl3t7ru9kA3f/vJNkDI5jdvZMW7TZIm/6gOUFw5fbNWRF69SMvG/+un6m62Po+rsYfofbRYS/fV4CsoqzidfZsDFWIYzSZ/tG3i4icMgnFTYAGA9drOMCt4v+NXU63gV/g7yscDsPESYlzs+GnT8qEkQJPl56je/bvtyuEaYlJqPT7Lw1Hjr4erd+c6nboXT7E7dDqzDDf//PDXImMBkPOh+2LC9ganLjS9/lOsFinWI8PJ4Xwq+lKApGnoOZ368uat3+1O3I3TLCb1+XOBt7vXk/FYQJpuPtCzaEEJj5MUbecdYavoZlGUhzhu/z8NBD+WlHH7ivdwFu5hHOJ0MYPalCj5MM44HZ2Ifk2yyEkGTo1J4cAOB5Dr7PQqRZeeih/JSjDtyX2zVWYY6zs+G7D362RQiBOMkar4+K0wIzP8bApZtu7imyDG9g92ZpebSB+3oXwA8yjEdur8qB0qzA0DUaz4Tdh61P308bHNvEOi6wCrp/a+1RBu7rXYBlkGEy9nr1nCNE/d6t6dktyxnWUQ77DV3BhBBgrALf4VGhfRDAm+9WH7hWL2a5o3sQuF1EWKwSnE36V/5TlCUsoz7V/dTMj950po2xCv46AmMVJEmCbRnwBt1bkqZZjjBMwQWHpqkYDwev+v9n6BqCMEGY5J1u1XBUgVuFGb7NApyf9S9sAJCkOS4n22EoGcd8leJy+rrKCiEElqsQ1+cuzkYOOOe4mUdYBzGGXneuGM7yAqJi+LdfJzANFXfLCItViLPx63pquo6F2TLudOCOZklZlBVmfozxcNCJ6v7X4lwgz0t4zvYsNl/FcGzj1cvjPC/hWjouJi4UWYKmKvW5MsFRlGxXQ38XIQSCoH4F4tp1Q6QPUw+mJr96jJapI0wKZEU3vrcmRxO4m3kISHJvtv6fyvICY89sPHry7S54U/kZF6Lx3Nx07CAMkzeNc9eSNMfY234FoqoK+BuuerYtA4tVN763JkcRuJkfYx0XvXmp3STPy8b3bnFaQNfUN7VJ0HUV81WMpzdrnY1sWIaCLC/eOtydEEIgjNKtVyBFWbdU199w+sE09brGtKMbRL0PXMkqfL5ZdeqZ5LU4FyjKevn31DrMYLyxuFpVFNi2idvFdiVGPcsddhs9ilNcNLTFm/kxXMd6U/mdqij1Bkqc72qYO9X7wN3MI7iODa0nL7absKqCqatbrb+FAL7PQ5jv6Ew8cCx8m4WonizPPNfE0NWRpIf5YHLOEcXZ1kmIJCsx8+N3dRkzDQ3rKHvvEPei14ELkxzLIIXr9ncpCQBFUTZWvBclg6oo0NS3byYrigzHNnHTcJRlOnYQRelBbnMNoxTX54OtZ8yZH2PgvO/qL93QsFglnVxW9jpws2VdedG/FwCPFQVrvIAjTIqd1Ezeb5en+eN6Q9vSMRmarc9yjFVIkgxX549nt3WUYRVmsN/ZQ1NV6jscnn6/XdDbwK3DDHFawjqCw5clYzAbdlfDONvJrqssS3CfqcSYjl2EUdrqbBBGCT5eDbdmsZkf7+ylvKFr+Otvs538WrvU28AdSxFvfZeagNawQZDmbGdF17ZlwA8yRMnjnUnTUHE5cRDF7WygFAWDImPrnN9ynSDNq52dvte0uikve8OrhX3qZeCStECSs96+c3uIVRWEEFuVMaziyAsGWdrN/yJJkjb1htvPcpfnA8RJtrWxsg9h1HzO77evPrwd/gBVFRmSJLfyPb1GLwM3XyVvKuLtIsaqxg9gXtQbJrssUbNMA2FSYhU+3sFTZAkfpoO9z3J5XsLQZUyGj4N1t4xgmfpOz/jJsgxFkVGyame/5i70LnCcC8xXSWcb/7xWVfHGm0DzsoKyhy7Pnmu/OMuxPX5A69nt8VKSC4EvN+udPx5IsgRVkZEVFLh3WYUpTFPvfE+Sn9W0nASAivG9FGAbhoaiFFsbKBKAT1cjBNF+yqLSNIdr61uNbG8XERzH3PkBYQn1LEdLyncKovyoGp6KzR1wT3Eh9naWbzCw8M/vq61/Pp04UOV6Y2PXwoZzfqziuJmHcOx+v0d9jV4FruICy821vcdCCAGlaYbjfG+B01QVtmU09nWcjh2EO57l7nu0PH25fzsP4djmXlYr99eF8QO81H9JrwKX5SU0VTma5SRQl281BYtzgX0eVh+4Nr7eBVsnrCdDG6a+u8JmzgWihgLlNC8xWyV7LjiXDlJF85LefHIFgL/+NntTBXmnScBWOT92f5HjUz9KvubPzXK72bG8b4i0VaC8rAuU9/V9CmyW6x1rsdGbwDHGIcvH1x5OkqTGZY8s7/+n833JV/7kmW04MOE57y9srir+40TAQ0Gcww8z2NYer0He3JmuNDwfH1K3RvMCVlWQZamXp7lfIksSqoayKkVuDuJOf29ZguM8V/L1/sLmKE7xYTrYOskxW8bwXHuvS2YhNjOcQjPcm+SbMqc+9ip5iSRJjXWMsiQ1rTR3zrENLFYp4vTxM5tj6ZgMrTfPcoxVSNK8oYQrRZKXLVxAIsCf2ZA6pN4ELs0ZNFVp3ELvM0mSGlvDadrbWgy85fd33Xpp+dT9s9xbCpvDOMXHS2/rB+TMj3ZawvUcLsSmqKBbjyC9+fQWrOrcenwXFEVG0VANYWgqWNVOL0nbMhAk241UTUPFxcRBnLxuA6UsGWSIrdlt5sdgHK1sfNVF4bxz1xN3azQvEFxgr4v+A1FVBYt1srV81HUFVcUhRDuVEs+1C788cxHFrytsDhoKlLkQ+HyzbmV2A/Cj8W3Xfkh3azQv2GflxSHdFyjzJ8tKWZJgm1rjhso+GLqGvORbHa/qtnU/X9icFyV0VcbZ6EmB8qIuUG7rjgfGqk7eBd6bwAmx3xfBhyLLEmRZRsm2ZxDb1FC22D/SG9j4xzd/659fnrlI0vynCpvDhmu2WMXxbRa2en6xLBkcq3vvbHsUOEDqfTOFZpqqIsm2Kzs8x0BetNcmQNNUWA0lX5Ik4eOl94cvw9Msh2trGHuPq0fuFhFcZz8lXE2qiqNkVeMp+kPrT+AOPYA9MnQVYbIdOMfWUZas1e/dc61Nydfj3/Vi4kKWxLPdkAXqxkBPj9+keYnbZdxqgXJelJgMrc69EgB6FLhjpuna1nswANDUeuOkaHGWUxQFjm3irqmwefJ8x+Y4zjDxrK0C5brRk9Xqs1TdBa2bB5R7E7g2Ki8ORVXqZ7imLlOfrkbIGpab++Q6dVu9p6elz4Y2DE3eWuZyLhAn2yVcUVKXcL2nx+RrcS6QFyW8hi5oXdCbwGmqvLWTdywkSYKha1sNfoC6rjHLi1ar3mW5Lmx+9vjOk1kuSTNMxw6MJ3Wu97Nbm4qixMDWG0/Rd0FvAudYOoqCde64xa4YhoZ1uN0tWNcUDGwdecs9Fl3HxHyVbC11R56FoWsgTuqxlqzaPLs9nt38IEWUlrDMdmeaNCswHna3m1tvAjd0TeRF0equXZsMXUeclluV+wBwPnZab9Zad/myny35CsIEy1WIpR/g16vh1owy82MMWr74sao4srzAqOFSlK7oTeAURca/fZwgCJOjnOUkqb75xW+Y5YauCUVG63e6WZuSr6d9+i1Tw1/+fI0P5y7+839dbM1ucz9GyUTrJ/PjJMP19HU3p7atN4ED6gsozoYW1kH373J+C8sysHzmbrPpxEHcUrPWexKevztbliSMPavhAhKxadLb7rObEAJpluOsw8tJoGeBA4CPl0M4porVEYZOUxVwgcarlsaehSwv99rGrolp6MhLji+365/67z/friHJypvus3uPNCswHpid3Sy517vAAcCn6xEcQ8F8se5co8/3cmyz8blJliR8vBwiOMDNpeOhCz/M8O0uePG/+3yzRhiXrd/Vx7moe14+OZ3QRVKcFr19IJr5MT7frGFbxqZzb/dKed5itljjX66HGDY8/P/9yxKSrLZwgPMxzgX8dQjH1DAamDAN9cdp9TQrsQpTFExgOHRbL8BbhzEGloZfLryWf+fX63XggPoUwcJPsAxSFKyCpqrQdRWGrvX2sGqWF6jKEv/709nWvwvjHH/7ssT0fHSQBjlpmiPLC5SsghB18bWmKjBN/SDdsIuSYb5Y47/+40MvTpP0PnAPRUmBNCsRpTlWYQ5VkaHrGjRV2bRnkCHJUuc6OTVZrSNcjO2tYy4A8PUuQBAXGA0Pt4QSQmxa/O2/w9hLZos1fpkOGv+cuuioAvdQyTiKkiFKCiRZiSwvkeYMiiJDkWXIsgxZljYNQ6UfjUN/fMXv/wz3/76lsUtS/ULZX0X4y79fN25z//3LEpDVo7gf763WQQzbUPDpenToofy0bjV82CFNlaGpOpwHF9VXvK52Z6w+vsE2d7NxIR585RD3fy+AIMp+/ARv9we59OjLU9Oxg//7eQFdGx1VY9yflaQ5TF3uVdiAI57hdolvlk+ttNHC701MFUV+cfl7Mw8xW6U4Gw968fyyK2XJMF8G+Pd/PX/0A7UPjnaG2yW5XmPi2enmQK7OB2AVh7+KMBkPDj2cVjBWYemH+HQ17F3YgJ6+hyO/+3g5xMDWjrb65iHOBZarEB8uBjhvuMSyDyhwR+DT9Qi2oRx16KqKY+EHmI7srfZ7fUKBOxL3ofNX0dEVd9fPbGtMxzY+9ODl9ksocEfk0/UInqNh6YeN3Zz7KMsLLPwQv14OcX3e/+dU2qU8Qt/nIW4XEUaeC6ODnat+VhilkMExnTiNZW59RIE7Uqsww98+LzBw7daPyrxXxTnWQV0feT31Oteu/D0ocEesZBVu5hHWUQ7XtXpxVXOcZIjiFJdn7lEsIZ+iwJ0AP0gx82NUvD5QqnTwjr08LxFGCYaugYuJC9M4zlfEFLgTcruI8PUugG0ZsC2j9UOiTwkhkOcl4iSDqSuYjh0MB8fxrPYcCtyJuT/OtFgn4AIwjPpYTZt9QCrOkaY50qyAY6qYjl14bjf7SO4aBe6E+UGKIMrhhyk0TYVt1rPePoqhK87rW1GTDHnBcDFxMBqYvSzPeg8KHEFRVojTAn6QYhVmPw7wqqqyuU5LftUMKABUrAJjFVhVoSgZiqK+zWY6duDa+ta936eCAkce4UIginOEcY40Zwjj/Efgmr7WB1HrvzgX9a2tFUfFOTzHgGlocCwNjnW6IXuIAkdeVC8FOVj14OvmOqiq4r8HUJKgKDIMXYGuKdBV5STP6f2R49x7JTujyDIUXcZpbGnsH/0IIqRFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RFFDhCWkSBI6RF/x8qjTga7LYI7gAAAABJRU5ErkJggg=="},NajC:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("mvHQ"),r=a.n(i),l=a("Gu7T"),s=a.n(l),o=a("Ke24"),n=a("Ie7z"),c=a("c4uw"),d=a("vRJf"),u=a("P9l9"),m=a("Ch4/"),g=a("PI0u"),h={name:"use-record",props:{detailShow:{type:Boolean,default:!1},materialId:{type:String,default:""}},data:function(){return{customDialog:!1,activeName:"first",tableData:[],conditionObj:{searchInput:"",materialId:this.materialId},currentPage:1,pageSize:5,total:0}},methods:{toInput:Object(g.a)(function(e,t){this.currentPage=1,this.getTableList()},500),clearInput:function(){this.currentPage=1,this.getTableList()},handleSizeChange:function(e){this.pageSize=e,this.getTableList()},handleCurrentChange:function(e){this.currentPage=e,this.getTableList()},handleClose:function(e){e(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.$emit("hideDetailDialog")},getTableList:function(e){var t=this,a={materialId:t.conditionObj.materialId,imgTextTitle:t.conditionObj.searchInput||"",relatedType:4,pageNum:t.currentPage,pageSize:t.pageSize,brandId:t.activeBrand};Object(u.a)("/haoban-app-material-web/material-log",a).then(function(e){var a=e.data;if(1==a.errorCode)return t.tableData=a.result.list||[],t.total=a.result.total,!1;m.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{detailShow:function(e,t){this.customDialog=e},materialId:function(e,t){e&&(this.conditionObj.materialId=e,this.currentPage=1,this.getTableList())}},mounted:function(){this.customDialog=this.detailShow,this.materialId&&(this.conditionObj.materialId=this.materialId,this.currentPage=1,this.getTableList())}},f={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"show",rawName:"v-show",value:e.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:"记录",visible:e.customDialog,width:"739px","before-close":e.handleClose},on:{"update:visible":function(t){e.customDialog=t}}},[a("div",{staticClass:"edit-dialog-body"},[a("div",{staticClass:"m-b-20 flex"},[a("el-input",{staticClass:"w-203",attrs:{placeholder:"请输入标题","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.conditionObj.searchInput);var a}},model:{value:e.conditionObj.searchInput,callback:function(t){e.$set(e.conditionObj,"searchInput",t)},expression:"conditionObj.searchInput"}})],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,height:"332"}},[a("el-table-column",{attrs:{label:"发布人",width:"150","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.userName||"--")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"标题","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.phoneNumber||"--")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"发布时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToYmd")(t.row.createTime)))]),e._v(" "),a("div",{staticClass:"color-606266 line-18"},[e._v(e._s(e._f("timeStampToHms")(t.row.createTime)))])]}}])})],1),e._v(" "),0!=e.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[20,40,60,80],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])],1)},staticRenderFns:[]};var p=a("VU/8")(h,f,!1,function(e){a("TjhY")},"data-v-28498945",null).exports,v=a("l46T"),I=a("Kkt8"),S=a("3E4D"),b={name:"chat-log",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},components:{commonDetailTop:o.a,vueSelectStore:n.a,vueSelectEmployee:c.a,materialPreview:d.a,useRecord:p,limitInput:v.a,limitTextarea:I.a},data:function(){return{activeBrand:this.brandId,activeGroup:this.activeGroupId,activeId:"2",topMenuData:[{id:"1",name:"图文素材",path:"/imageText?appIcon="+this.$route.query.appIcon},{id:"2",name:"选择图文"}],tableData:[],searchInput:"",selectType:"",treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1,openNextBool:!0},defaultSelection:[],changed:"",onlyPerson:!1,appScene:2,defaultStoreList:[],storeTreeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1},defaultImg:a("FFFL"),currentPage:1,pageSize:6,total:0,enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,userId:JSON.parse(localStorage.getItem("userInfo")).userId,formData:{materialId:"",imageTextWechatId:"",imageTextGicId:"",titleName:"",imageUrl:"",imageTextUrl:"",rangeList:[],materialTitle:"",materialContent:"",topFlag:!1},rules:{imageTextWechatId:[{required:!0,message:"请选择图文",trigger:"change"}],materialTitle:[{required:!0,message:"请请输入素材标题",trigger:"blur"}],materialContent:[{required:!0,message:"请请输入发送内容",trigger:"blur"}],rangeList:[{validator:function(e,t,a){if(""==t||!t.length)return a(new Error("请选择选择行政架构或门店架构"));a()},trigger:"change"}]},previewVisible:!1,materialPreviewData:{},detailShow:!1,imageTextWechatId:""}},methods:{showRecord:function(e){if(!e.useCount)return!1;this.detailShow=!0,this.imageTextWechatId=e.imageTextWechatId},hideDetailDialog:function(){this.detailShow=!1,this.imageTextWechatId=""},showPreviewDetail:function(e){window.open(e.mediaUrl)},submitForm:function(e,t){var a=this;a.formData.rangeList=[].concat(s()(a.defaultStoreList),s()(a.defaultSelection)),a.$refs[e].validate(function(e){e&&a.postSaveCard(t)})},postSaveCard:function(e){var t=this,a=[];t.formData.rangeList.forEach(function(e){a.push({groupId:2==e.type?e.groupId:"",storeId:3==e.type?e.storeId:"",storeFlag:e.isStoreGroup})});var i={enterpriseId:t.enterpriseId,imageTextWechatId:t.formData.imageTextWechatId,imageTextGicId:t.formData.imageTextGicId,materialContent:t.formData.materialContent,imageTextUrl:t.formData.imageTextUrl,materialTitle:t.formData.materialTitle,rangeListStr:r()(a),topFlag:t.formData.topFlag?1:0,relatedType:1,brandId:t.brandId,userId:t.userId};Object(u.e)("/haoban-app-material-web/material-add",i).then(function(a){var i=a.data;1==i.errorCode&&(S.a.showmsg("新建成功","success"),e?(t.formData={materialId:"",imageTextWechatId:"",imageTextGicId:"",titleName:"",imageUrl:"",imageTextUrl:"",rangeList:[],materialTitle:"",materialContent:"",topFlag:!1},t.defaultStoreList=[],t.defaultSelection=[]):t.$router.push("/imageText?appIcon="+t.$route.query.appIcon)),m.a.errorMsg(i)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},previewData:function(e){var t=this;t.formData.rangeList=[].concat(s()(t.defaultStoreList),s()(t.defaultSelection)),t.$refs[e].validate(function(e){e&&(t.tableData.forEach(function(e){e.imageTextWechatId==t.formData.imageTextWechatId&&(t.formData.imageUrl=e.imageUrl,t.formData.titleName=e.titleName,t.formData.mediaUrl=e.mediaUrl)}),t.materialPreviewData=t.formData,t.previewVisible=!0)})},toReturn:function(){this.$router.go(-1)},changeId:function(e,t){this.formData.imageTextWechatId=e,this.formData.imageTextGicId=t.imageTextId},toInput:Object(g.a)(function(e,t){this.currentPage=1,this.getTableList()},200),clearInput:function(){this.currentPage=1,this.getTableList()},showDialogLayer:function(e,t){return!this.$route.query.materialId&&(this.selectType=e,this.changed=e,"store"===e?(this.defaultStoreList=t,void(this.storeTreeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!1,openNextBool:!0})):(this.treeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!1,openNextBool:!0},void(this.defaultSelection=t)))},handleSelectedList:function(e){"store"===this.selectType?this.defaultStoreList=e:this.defaultSelection=e,this.formData.rangeList=[].concat(s()(this.defaultStoreList),s()(this.defaultSelection))},delDepart:function(e,t,a){if(this.$route.query.materialId)return!1;t.splice(e,1),this.formData.rangeList=[].concat(s()(this.defaultStoreList),s()(this.defaultSelection))},handleSizeChange:function(e){this.pageSize=e,this.getTableList()},handleCurrentChange:function(e){this.currentPage=e,this.getTableList()},getImageData:function(){var e=this,t={materialId:e.$route.query.materialId,brandId:e.brandId};Object(u.a)("/haoban-app-material-web/material-detail",t).then(function(t){var a=t.data;if(1==a.errorCode){var i=[],r=[];return a.result.rangeVOList&&a.result.rangeVOList.forEach(function(e){e.groupId=2==e.type?e.id:"",e.storeId=3==e.type?e.id:"",e.isStoreGroup=e.storeFlag,1==e.storeFlag?i.push(e):r.push(e)}),e.formData={materialId:a.result.materialId,imageTextWechatId:a.result.imageTextWechatId,imageTextUrl:a.result.imageTextUrl,titleName:"",imageUrl:"",materialTitle:a.result.materialTitle,materialContent:a.result.materialContent,topFlag:1==a.result.topFlag,rangeList:a.result.rangeVOList,createTime:a.result.createTime},e.defaultStoreList=i||[],e.defaultSelection=r||[],!1}m.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getTableList:function(e){var t=this,a={title:t.searchInput||"",pageNum:t.currentPage,pageSize:t.pageSize,brandId:t.activeBrand};Object(u.a)("/haoban-app-material-web/wechat-material-detail",a).then(function(e){var a=e.data;if(1==a.errorCode)return t.tableData=a.result.list||[],t.total=a.result.total,t.$route.query.materialId&&t.getImageData(),!1;m.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{brandId:function(e,t){e&&(this.activeBrand=e,this.getTableList())},activeGroupId:function(e,t){e&&(this.activeGroup=e)}},mounted:function(){this.$emit("showTab","1"),this.brandId&&this.getTableList()}},w={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"chat-log boder-box"},[a("common-detail-top",{attrs:{topMenuData:e.topMenuData,activeId:e.activeId}}),e._v(" "),a("div",{staticClass:"new-card-body"},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.formData,rules:e.rules,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"选择图文:",prop:"imageTextWechatId"}},[a("div",{staticClass:"search-div"},[a("el-input",{staticClass:"w-264",staticStyle:{width:"264px"},attrs:{placeholder:"请输入图文标题",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.searchInput);var a}},model:{value:e.searchInput,callback:function(t){e.searchInput=t},expression:"searchInput"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})])],1),e._v(" "),a("div",{staticClass:"chat-log-content boder-box m-t-20"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{label:"",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-radio",{attrs:{disabled:!!e.$route.query.materialId,label:t.row.imageTextWechatId},on:{change:function(a){e.changeId(a,t.row)}},model:{value:e.formData.imageTextWechatId,callback:function(t){e.$set(e.formData,"imageTextWechatId",t)},expression:"formData.imageTextWechatId"}},[e._v(e._s(""))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"imageUrl",label:"图片","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"cell"},[a("img",{staticClass:"img-40",attrs:{src:t.row.imageUrl?t.row.imageUrl:e.defaultImg,alt:""}})])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"titleName",label:"图文标题","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"cell color-1890ff cursor-pointer",on:{click:function(a){e.showPreviewDetail(t.row)}}},[e._v(e._s(t.row.titleName||"--"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"作者","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.authorName||"--")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"storeMode",label:"使用记录","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"cell color-1890ff cursor-pointer",on:{click:function(a){e.showRecord(t.row)}}},[e._v(e._s(t.row.useCount||"--"))])]}}])})],1),e._v(" "),0!=e.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,layout:" prev, pager, next",total:e.total},on:{"current-change":e.handleCurrentChange}})],1):e._e()],1)]),e._v(" "),a("el-form-item",{staticClass:"input-item is-required",attrs:{label:"发送范围:",prop:"rangeList"}},[a("div",{staticClass:"form-item-tip fonr-14 color-909399"},[e._v("下面两项可二选一,非全选。可选择行政架构或门店架构")]),e._v(" "),a("div",{staticClass:"flex"},[a("div",{staticClass:"flex-column item-cell-select inline-block "},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"240px"},on:{click:function(t){e.showDialogLayer("depart",e.defaultSelection)}}},[e.defaultSelection.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[e._v("请选择行政架构")]),e._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[e._l(e.defaultSelection,function(t,i){return[a("span",{key:i,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(i,e.defaultSelection,"depart")}}})])]})],2)])])])])]),e._v(" "),a("div",{staticClass:"flex m-t-20"},[a("div",{staticClass:"flex-column item-cell-select inline-block"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"240px"},on:{click:function(t){e.showDialogLayer("store",e.defaultStoreList)}}},[e.defaultStoreList.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[e._v("请选择门店架构")]),e._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[e._l(e.defaultStoreList,function(t,i){return[a("span",{key:i,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(i,e.defaultStoreList,"store")}}})])]})],2)])])])])])]),e._v(" "),a("el-form-item",{attrs:{label:"发送内容标题:",prop:"materialTitle"}},[a("limitInput",{attrs:{disflag:!!e.$route.query.materialId,inputWidth:320,inputValue:e.formData.materialTitle,holder:"请输入素材标题",getByType:"word",maxLength:15},on:{"update:inputValue":function(t){e.$set(e.formData,"materialTitle",t)}}})],1),e._v(" "),a("el-form-item",{attrs:{label:"发送内容:",prop:"materialContent"}},[a("limitTextarea",{attrs:{disInput:!!e.$route.query.materialId,inputWidth:320,inputValue:e.formData.materialContent,holder:"请输入素材内容",maxLength:1500},on:{"update:inputValue":function(t){e.$set(e.formData,"materialContent",t)}}})],1),e._v(" "),a("el-form-item",{attrs:{label:"更多设置:",prop:""}},[a("div",[a("el-checkbox",{attrs:{disabled:!!e.$route.query.materialId},model:{value:e.formData.topFlag,callback:function(t){e.$set(e.formData,"topFlag",t)},expression:"formData.topFlag"}},[e._v("置顶")])],1)]),e._v(" "),a("el-form-item",[a("el-button",{on:{click:e.toReturn}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.previewData("ruleForm")}}},[e._v("预览")]),e._v(" "),a("el-button",{attrs:{disabled:!!e.$route.query.materialId,type:"primary"},on:{click:function(t){e.submitForm("ruleForm")}}},[e._v("发布")]),e._v(" "),a("el-button",{attrs:{disabled:!!e.$route.query.materialId,type:"primary"},on:{click:function(t){e.submitForm("ruleForm","flag")}}},[e._v("发布并添加下一个")])],1)],1)],1)],1),e._v(" "),a("vue-select-employee",{attrs:{appScene:e.appScene,defaultSelection:e.defaultSelection,onlyPerson:e.onlyPerson,treeSet:e.treeSet,changed:e.changed},on:{handleSelectedList:e.handleSelectedList}}),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{currentBrand:e.activeGroup,appScene:e.appScene,treeSet:e.storeTreeSet,selectType:"group-store",defaultList:e.defaultStoreList},on:{handleSelectedList:e.handleSelectedList}}),e._v(" "),a("material-preview",{ref:"materialPreview",attrs:{materialPreviewData:e.materialPreviewData},model:{value:e.previewVisible,callback:function(t){e.previewVisible=t},expression:"previewVisible"}}),e._v(" "),a("use-record",{attrs:{materialId:e.imageTextWechatId,detailShow:e.detailShow},on:{hideDetailDialog:e.hideDetailDialog}})],1)},staticRenderFns:[]};var D=a("VU/8")(b,w,!1,function(e){a("qptH")},"data-v-2337866b",null);t.default=D.exports},TjhY:function(e,t){},qptH:function(e,t){},vRJf:function(e,t,a){"use strict";var i=a("mvHQ"),r=a.n(i),l={name:"material-preview",props:{value:{type:Boolean,default:function(){return!1}},materialPreviewData:{type:[Object,Array],default:function(){return{materialId:"",imageTextWechatId:"",imageTextGicId:"",titleName:"",imageUrl:"",mediaUrl:"",rangeList:[],imgUrlList:[],materialTitle:"",materialContent:"",topFlag:!1}}}},directives:{htmlContent:{bind:function(e,t){e.innerHTML=t.value},update:function(e,t){e.innerHTML=t.value}}},data:function(){return{materialData:{materialId:"",imageTextWechatId:"",imageTextGicId:"",rangeList:[],imgUrlList:[],mediaUrl:"",materialTitle:"",materialContent:"",topFlag:!1}}},methods:{toUrl:function(e){window.open(e)},closeDialog:function(){this.$emit("input",!1),this.$emit("closePre")}},watch:{value:function(e,t){this.materialData=JSON.parse(r()(this.materialPreviewData))},materialPreviewData:function(e,t){this.materialData=JSON.parse(r()(e))}},mounted:function(){this.materialData=JSON.parse(r()(this.materialPreviewData))}},s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.value?a("div",{staticClass:"qr-dialog-content",staticStyle:{opacity:"1"}},[a("div",{staticClass:"qr-mask",on:{click:function(t){return t.stopPropagation(),e.closeDialog(t)}}}),e._v(" "),a("div",{staticClass:"qr-dialog border-box"},[a("div",{staticClass:"qr-dialog-body border-box"},[a("h2",{staticClass:"font-20 color-222 text-left main-title"},[e._v(e._s(e.materialData.materialTitle))]),e._v(" "),a("div",{staticClass:"notice-date m-t-10 flex flex-space-between"},[a("div",{staticClass:"notice-date-left font-10 color-88949C"},[e._v(e._s(e._f("timeStampToYmd")(e.materialData.materialId?e.materialData.createTime:(new Date).getTime())))]),e._v(" "),a("div",{staticClass:"notice-date-right font-10 color-4d7fd0"})]),e._v(" "),a("div",{directives:[{name:"htmlContent",rawName:"v-htmlContent",value:e.materialData.materialContent,expression:"materialData.materialContent"}],staticClass:"notice-body border-box font-14 color-222"}),e._v(" "),e.materialData.imgUrlList&&e.materialData.imgUrlList.length?a("div",{staticClass:"img-list-wrap"},[a("ul",{staticClass:"flex flex-wrap"},e._l(e.materialData.imgUrlList,function(e,t){return a("li",{key:t+"img",staticClass:"border-box flex flex-align-center flex-pack-center"},[a("img",{attrs:{src:e.imgUrl,alt:""}})])}))]):e._e(),e._v(" "),e.materialData.imageTextWechatId?a("div",{staticClass:"image-text-link"},[a("div",{staticClass:"flex cursor-pointer",on:{click:function(t){e.toUrl(e.materialData.mediaUrl)}}},[a("div",{staticClass:"flex-left-img flex flex-align-center flex-pack-center"},[a("img",{attrs:{src:e.materialData.imageUrl,alt:""}})]),e._v(" "),a("div",{staticClass:"flex-right-title border-box"},[a("div",{staticClass:"title-content font-14 color-606266"},[e._v(e._s(e.materialData.titleName))])])])]):e._e()])]),e._v(" "),a("div",{staticClass:"qr-dialog__hd"},[a("i",{staticClass:"el-icon-plus",on:{click:function(t){return t.stopPropagation(),e.closeDialog(t)}}})])]):e._e()},staticRenderFns:[]};var o=a("VU/8")(l,s,!1,function(e){a("xELH")},"data-v-91610bd2",null);t.a=o.exports},xELH:function(e,t){}});
\ No newline at end of file
webpackJsonp([17],{"2lUv":function(t,e){},"7fkC":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("mvHQ"),r=a.n(i),l=a("Gu7T"),s=a.n(l),n=a("Ke24"),o=a("Ie7z"),c=a("c4uw"),m=a("vRJf"),u=a("l46T"),d=a("Kkt8"),g=a("//Fk"),p=a.n(g),f=a("DAYN"),h={name:"mult-upload-image",props:{projectName:{type:String,default:"haoban-manage-web"},disabled:{type:Boolean,default:!1},wxFlag:{type:String,default:"1"},imgRate:{type:String},actionUrl:{type:String,default:"/haoban-manage-web/upload-img"},maxImageLength:{type:Number,default:9},limitW:{type:Number},limitH:{type:Number},imageList:{type:Array,default:function(){return[]}}},data:function(){return{dragImageList:JSON.parse(r()(this.imageList)),fileDatas:[],initialImg:0,progress:0,pass:null,isEnlargeImage:!1,enlargeImage:""}},computed:{propStatus:function(){return this.pass?"success":!1===this.pass?"exception":"text"}},beforeMount:function(){},methods:{uploadUrl:function(){var t,e=window.location.origin,a=void 0;return t=this.wxFlag&&""!=this.wxFlag?"wxFlag="+this.wxFlag+"&":"",a="-1"!=e.indexOf("localhost")?"https://www.gicdev.com":e,this.upUrl=a+this.actionUrl+"?"+t+"requestProject="+this.projectName,this.upUrl},beforeAvatarUpload:function(t){var e=this,a=t.size/1024/1024<5;return a||e.$message.error("上传图片大小不能超过 5MB!"),a&&new p.a(function(a,i){var r=new FileReader;r.onload=function(t){var r=new Image;r.onload=function(){var t=this.width,r=this.height;e.imgRate&&""!==e.imgRate&&(Number(e.imgRate.split(":")[0])/Number(e.imgRate.split(":")[1])!=Number(t)/Number(r)&&(e.$message.error("上传图片比例不正确!"),i()));e.imgRate&&""!=e.imgRate||!e.limitW||!e.limitH||t===e.limitW||r===e.limitH||(e.$message.error("上传图片尺寸不正确!"),i()),a()},r.src=t.target.result},r.readAsDataURL(t)})},uploadOnProgress:function(t,e){t&&t.percent&&(this.progress=Math.floor(t.percent))},uploadOnChange:function(t,e){var a=this;"ready"===t.status?(a.pass=null,a.progress=0):"fail"===t.status&&a.$message.error("图片上传失败,请重试!"),a.fileDatas=e,console.log("fileList:",e,a.fileDatas),a.$nextTick(function(){var t=[];e.length&&e.forEach(function(e){t.push({imgUrl:e.response.result[0].qcloudImageUrl})}),a.$emit("uploadOnSuccess",t),a.pass=null,a.progress=0})},handleExceed:function(t,e){this.$message.warning("当前限制选择 9 个文件,本次选择了 "+t.length+" 个文件,共选择了 "+(t.length+e.length)+" 个文件")},uploadOnError:function(){this.$message.error("图片上传失败,请重试!")},previewImage:function(t){this.isEnlargeImage=!0,this.initialImg=t},deleteImage:function(t){this.$emit("deleteImage",t)},handleClose:function(t){t()},itemMoveEnd:function(t){this.$emit("sortImg",this.dragImageList)}},watch:{imageList:function(t,e){this.dragImageList=JSON.parse(r()(t))}},mounted:function(){this.dragImageList=JSON.parse(r()(this.imageList))},components:{draggable:a.n(f).a}},v={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"gic-upload__img"},[a("div",{staticClass:"gic-upload__img__drag"},[a("draggable",{staticClass:"drag-wrap",staticStyle:{display:"contents"},attrs:{options:{group:{name:"people",pull:!1,put:!0},sort:!0}},on:{end:t.itemMoveEnd},model:{value:t.dragImageList,callback:function(e){t.dragImageList=e},expression:"dragImageList"}},[a("transition-group",{attrs:{name:"slide-fade"}},t._l(t.imageList,function(e,i){return a("div",{key:i,class:["img-content",i>=6?"m-t-8":""]},[a("a",{staticClass:"item-img",attrs:{href:e.imgUrl}},[a("img",{attrs:{src:e.imgUrl,alt:"上传图片"}})]),t._v(" "),a("div",{staticClass:"upload-icon__btn"},[a("i",{staticClass:"el-icon-view",on:{click:function(e){t.previewImage(i)}}}),t._v(" "),a("i",{staticClass:"el-icon-delete",on:{click:function(e){t.deleteImage(i)}}})])])}))],1),t._v(" "),t.pass||0===t.progress?t._e():a("div",{class:["img-content","img-progress",t.imageList.length>=6?"m-t-8":""]},[a("el-progress",{staticClass:"gic-img-progress",staticStyle:{"line-height":"102px"},attrs:{width:102,percentage:t.progress,status:t.propStatus}})],1),t._v(" "),t.imageList&&t.imageList.length<t.maxImageLength?a("div",{class:["img-upload",t.imageList.length>=6?"m-t-8":""]},[a("el-upload",{staticClass:"loader",attrs:{disabled:t.disabled,multiple:"",accept:"image/jpg,image/jpeg,image/png,image/gif,image/bmp",action:t.uploadUrl(),"list-type":"picture-card",limit:9,"on-exceed":t.handleExceed,"on-change":t.uploadOnChange,"before-upload":t.beforeAvatarUpload,"on-error":t.uploadOnError,"on-progress":t.uploadOnProgress}},[a("i",{staticClass:"el-icon-plus gic-upload-btn"})])],1):t._e()],1),t._v(" "),a("el-dialog",{attrs:{title:"图片预览",visible:t.isEnlargeImage,"modal-append-to-body":!1,"before-close":t.handleClose,width:"520px"},on:{"update:visible":function(e){t.isEnlargeImage=e}}},[t.isEnlargeImage?a("el-carousel",{attrs:{trigger:"click","initial-index":t.initialImg,autoplay:!1,height:"500px"}},t._l(t.imageList,function(e,i){return a("el-carousel-item",{key:i,staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[a("img",{staticStyle:{"max-width":"480px","max-height":"500px"},attrs:{src:e.imgUrl},on:{click:function(e){t.isEnlargeImage=!1}}})])})):t._e()],1)],1)},staticRenderFns:[]};var I=a("VU/8")(h,v,!1,function(t){a("2lUv")},null,null).exports,b=a("P9l9"),S=a("3E4D"),_=a("Ch4/"),C=a("PI0u"),y={name:"chat-log",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},components:{commonDetailTop:n.a,vueSelectStore:o.a,vueSelectEmployee:c.a,materialPreview:m.a,limitInput:u.a,limitTextarea:d.a,multUploadImage:I},data:function(){return{activeBrand:this.brandId,activeGroup:this.activeGroupId,activeId:"2",topMenuData:[{id:"1",name:"纷享素材",path:"/enjoyMaterial?appIcon="+this.$route.query.appIcon},{id:"2",name:this.$route.query.materialId?"查看素材":"新建素材"}],searchInput:"",selectType:"",treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1,openNextBool:!0},defaultSelection:[],changed:"",onlyPerson:!1,appScene:2,defaultStoreList:[],storeTreeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1},currentPage:1,pageSize:6,total:0,enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,userId:JSON.parse(localStorage.getItem("userInfo")).userId,formData:{materialId:"",rangeList:[],imgUrlList:[],materialTitle:"",materialContent:"",topFlag:!1},rules:{materialTitle:[{required:!0,message:"请请输入素材标题",trigger:"blur"}],materialContent:[{required:!0,message:"请请输入发送内容",trigger:"blur"}],rangeList:[{validator:function(t,e,a){if(""==e||!e.length)return a(new Error("请选择选择行政架构或门店架构"));a()},trigger:"change"}],imgUrlList:[{required:!0,validator:function(t,e,a){if(""==e||!e.length)return a(new Error("请上传图片"));a()},trigger:"change"}]},previewVisible:!1,materialPreviewData:{}}},methods:{uploadOnSuccess:function(t){this.formData.imgUrlList=t,console.log("上传list:",t)},deleteImage:function(t){this.formData.imgUrlList.splice(t,1),console.log("删除list2:",this.formData.imgUrlList)},sortImg:function(t){this.formData.imgUrlList=t},submitForm:function(t,e){var a=this;a.formData.rangeList=[].concat(s()(a.defaultStoreList),s()(a.defaultSelection)),a.$refs[t].validate(function(t){t&&a.postSaveCard(e)})},postSaveCard:function(t){var e=this,a=[];e.formData.rangeList.forEach(function(t){a.push({groupId:2==t.type?t.groupId:"",storeId:3==t.type?t.storeId:"",storeFlag:t.isStoreGroup})});var i={enterpriseId:e.enterpriseId,imgListStr:r()(e.formData.imgUrlList),materialContent:e.formData.materialContent,materialTitle:e.formData.materialTitle,rangeListStr:r()(a),topFlag:e.formData.topFlag?1:0,relatedType:2,brandId:e.brandId,userId:e.userId};Object(b.e)("/haoban-app-material-web/material-add",i).then(function(a){var i=a.data;1==i.errorCode&&(S.a.showmsg("新建成功","success"),t?(e.formData={materialId:"",imgUrlList:[],materialTitle:"",materialContent:"",topFlag:!1},e.defaultStoreList=[],e.defaultSelection=[]):e.$router.push("/enjoyMaterial?appIcon="+e.$route.query.appIcon)),_.a.errorMsg(i)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},previewData:function(t){var e=this;e.formData.rangeList=[].concat(s()(e.defaultStoreList),s()(e.defaultSelection)),e.$refs[t].validate(function(t){t&&(e.materialPreviewData=e.formData,e.previewVisible=!0)})},closePre:function(){this.materialPreviewData={}},toReturn:function(){this.$router.go(-1)},changeId:function(t,e){this.formData.imageTextWechatId="",this.formData.imageTextGicId=e.imageTextId},toInput:Object(C.a)(function(t,e){this.currentPage=1,this.getTableList()},200),clearInput:function(){this.currentPage=1,this.getTableList()},showDialogLayer:function(t,e){return!this.$route.query.materialId&&(this.selectType=t,this.changed=t,"store"===t?(this.defaultStoreList=e,void(this.storeTreeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!1,openNextBool:!0})):(this.treeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!1,openNextBool:!0},void(this.defaultSelection=e)))},handleSelectedList:function(t){"store"===this.selectType?this.defaultStoreList=t:this.defaultSelection=t},delDepart:function(t,e,a){if(this.$route.query.materialId)return!1;e.splice(t,1)},getData:function(){var t=this,e={materialId:t.$route.query.materialId,brandId:t.brandId};Object(b.a)("/haoban-app-material-web/material-detail",e).then(function(e){var a=e.data;if(1==a.errorCode){var i=[],r=[];return a.result.rangeVOList&&a.result.rangeVOList.forEach(function(t){t.groupId=2==t.type?t.id:"",t.storeId=3==t.type?t.id:"",t.isStoreGroup=t.storeFlag,1==t.storeFlag?i.push(t):r.push(t)}),t.formData={materialId:a.result.materialId,imageTextWechatId:a.result.imageTextWechatId,materialTitle:a.result.materialTitle,materialContent:a.result.materialContent,topFlag:1==a.result.topFlag,imgUrlList:a.result.imgList,rangeList:a.result.rangeVOList,createTime:a.result.createTime},t.defaultStoreList=i||[],t.defaultSelection=r||[],!1}_.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{brandId:function(t,e){t&&(this.activeBrand=t,this.$route.query.materialId&&this.getData())},activeGroupId:function(t,e){t&&(this.activeGroup=t)}},mounted:function(){this.$emit("showTab","2"),this.brandId&&this.$route.query.materialId&&this.getData()}},L={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"chat-log boder-box"},[a("common-detail-top",{attrs:{topMenuData:t.topMenuData,activeId:t.activeId}}),t._v(" "),a("div",{staticClass:"new-card-body"},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.formData,rules:t.rules,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"发送内容标题:",prop:"materialTitle"}},[a("limitInput",{attrs:{disflag:!!t.$route.query.materialId,inputWidth:320,inputValue:t.formData.materialTitle,holder:"请输入素材标题",getByType:"word",maxLength:15},on:{"update:inputValue":function(e){t.$set(t.formData,"materialTitle",e)}}})],1),t._v(" "),a("el-form-item",{attrs:{label:"发送内容:",prop:"materialContent"}},[a("limitTextarea",{attrs:{disInput:!!t.$route.query.materialId,inputWidth:320,inputValue:t.formData.materialContent,holder:"请输入素材内容",maxLength:1500},on:{"update:inputValue":function(e){t.$set(t.formData,"materialContent",e)}}})],1),t._v(" "),a("el-form-item",{attrs:{label:"图片上传:",prop:"imgUrlList"}},[a("mult-upload-image",{attrs:{disabled:!!t.$route.query.materialId,imageList:t.formData.imgUrlList},on:{deleteImage:t.deleteImage,uploadOnSuccess:t.uploadOnSuccess,sortImg:t.sortImg}})],1),t._v(" "),a("el-form-item",{staticClass:"input-item is-required",attrs:{label:"发送范围:",prop:"rangeList"}},[a("div",{staticClass:"form-item-tip fonr-14 color-909399"},[t._v("下面两项可二选一,非全选。可选择行政架构或门店架构")]),t._v(" "),a("div",{staticClass:"flex"},[a("div",{staticClass:"flex-column item-cell-select inline-block "},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"240px"},on:{click:function(e){t.showDialogLayer("depart",t.defaultSelection)}}},[t.defaultSelection.length?t._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[t._v("请选择行政架构")]),t._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[t._l(t.defaultSelection,function(e,i){return[a("span",{key:i,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[t._v(t._s(e.name||e.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(e){e.stopPropagation(),t.delDepart(i,t.defaultSelection,"depart")}}})])]})],2)])])])])]),t._v(" "),a("div",{staticClass:"flex m-t-20"},[a("div",{staticClass:"flex-column item-cell-select inline-block"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"240px"},on:{click:function(e){t.showDialogLayer("store",t.defaultStoreList)}}},[t.defaultStoreList.length?t._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[t._v("请选择门店架构")]),t._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[t._l(t.defaultStoreList,function(e,i){return[a("span",{key:i,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[t._v(t._s(e.name||e.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(e){e.stopPropagation(),t.delDepart(i,t.defaultStoreList,"store")}}})])]})],2)])])])])])]),t._v(" "),a("el-form-item",{attrs:{label:"更多设置:",prop:""}},[a("div",[a("el-checkbox",{attrs:{disabled:!!t.$route.query.materialId},model:{value:t.formData.topFlag,callback:function(e){t.$set(t.formData,"topFlag",e)},expression:"formData.topFlag"}},[t._v("置顶")])],1)]),t._v(" "),a("el-form-item",[a("el-button",{on:{click:t.toReturn}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.previewData("ruleForm")}}},[t._v("预览")]),t._v(" "),a("el-button",{attrs:{disabled:!!t.$route.query.materialId,type:"primary"},on:{click:function(e){t.submitForm("ruleForm")}}},[t._v("发布")]),t._v(" "),a("el-button",{attrs:{disabled:!!t.$route.query.materialId,type:"primary"},on:{click:function(e){t.submitForm("ruleForm","flag")}}},[t._v("发布并添加下一个")])],1)],1)],1)],1),t._v(" "),a("vue-select-employee",{attrs:{appScene:t.appScene,defaultSelection:t.defaultSelection,onlyPerson:t.onlyPerson,treeSet:t.treeSet,changed:t.changed},on:{handleSelectedList:t.handleSelectedList}}),t._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{currentBrand:t.activeGroup,appScene:t.appScene,treeSet:t.storeTreeSet,selectType:"group-store",defaultList:t.defaultStoreList},on:{handleSelectedList:t.handleSelectedList}}),t._v(" "),a("material-preview",{ref:"materialPreview",attrs:{materialPreviewData:t.materialPreviewData},model:{value:t.previewVisible,callback:function(e){t.previewVisible=e},expression:"previewVisible"}})],1)},staticRenderFns:[]};var x=a("VU/8")(y,L,!1,function(t){a("8tOF")},"data-v-e7d3f764",null);e.default=x.exports},"8tOF":function(t,e){},NoP7:function(t,e){},vRJf:function(t,e,a){"use strict";var i=a("mvHQ"),r=a.n(i),l={name:"material-preview",props:{value:{type:Boolean,default:function(){return!1}},materialPreviewData:{type:[Object,Array],default:function(){return{materialId:"",imageTextWechatId:"",imageTextGicId:"",titleName:"",imageUrl:"",rangeList:[],imgUrlList:[],materialTitle:"",materialContent:"",topFlag:!1}}}},directives:{htmlContent:{bind:function(t,e){t.innerHTML=e.value},update:function(t,e){t.innerHTML=e.value}}},data:function(){return{materialData:{materialId:"",imageTextWechatId:"",imageTextGicId:"",rangeList:[],imgUrlList:[],materialTitle:"",materialContent:"",topFlag:!1}}},methods:{closeDialog:function(){this.$emit("input",!1),this.$emit("closePre")}},watch:{value:function(t,e){this.materialData=JSON.parse(r()(this.materialPreviewData))},materialPreviewData:function(t,e){this.materialData=JSON.parse(r()(t))}},mounted:function(){this.materialData=JSON.parse(r()(this.materialPreviewData))}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.value?a("div",{staticClass:"qr-dialog-content",staticStyle:{opacity:"1"}},[a("div",{staticClass:"qr-mask",on:{click:function(e){return e.stopPropagation(),t.closeDialog(e)}}}),t._v(" "),a("div",{staticClass:"qr-dialog border-box"},[a("div",{staticClass:"qr-dialog-body border-box"},[a("h2",{staticClass:"font-20 color-222 text-left main-title"},[t._v(t._s(t.materialData.materialTitle))]),t._v(" "),a("div",{staticClass:"notice-date m-t-10 flex flex-space-between"},[a("div",{staticClass:"notice-date-left font-10 color-88949C"},[t._v(t._s(t._f("timeStampToYmd")(t.materialData.materialId?t.materialData.createTime:(new Date).getTime())))]),t._v(" "),a("div",{staticClass:"notice-date-right font-10 color-4d7fd0"})]),t._v(" "),a("div",{directives:[{name:"htmlContent",rawName:"v-htmlContent",value:t.materialData.materialContent,expression:"materialData.materialContent"}],staticClass:"notice-body border-box font-14 color-222"}),t._v(" "),t.materialData.imgUrlList&&t.materialData.imgUrlList.length?a("div",{staticClass:"img-list-wrap"},[a("ul",{staticClass:"flex flex-wrap"},t._l(t.materialData.imgUrlList,function(t,e){return a("li",{key:e+"img",staticClass:"border-box flex flex-align-center flex-pack-center"},[a("img",{attrs:{src:t.imgUrl,alt:""}})])}))]):t._e(),t._v(" "),t.materialData.imageTextWechatId?a("div",{staticClass:"image-text-link"},[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex-left-img flex flex-align-center flex-pack-center"},[a("img",{attrs:{src:t.materialData.imageUrl,alt:""}})]),t._v(" "),a("div",{staticClass:"flex-right-title border-box"},[a("div",{staticClass:"title-content font-14 color-606266"},[t._v(t._s(t.materialData.titleName))])])])]):t._e()])]),t._v(" "),a("div",{staticClass:"qr-dialog__hd"},[a("i",{staticClass:"el-icon-plus",on:{click:function(e){return e.stopPropagation(),t.closeDialog(e)}}})])]):t._e()},staticRenderFns:[]};var n=a("VU/8")(l,s,!1,function(t){a("NoP7")},"data-v-d6932054",null);e.a=n.exports}});
\ No newline at end of file
webpackJsonp([17],{"2lUv":function(t,e){},"7fkC":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("mvHQ"),r=a.n(i),l=a("Gu7T"),s=a.n(l),n=a("Ke24"),o=a("Ie7z"),c=a("c4uw"),m=a("vRJf"),u=a("l46T"),d=a("Kkt8"),g=a("//Fk"),p=a.n(g),f=a("DAYN"),h={name:"mult-upload-image",props:{projectName:{type:String,default:"haoban-manage-web"},disabled:{type:Boolean,default:!1},wxFlag:{type:String,default:"1"},imgRate:{type:String},actionUrl:{type:String,default:"/haoban-manage-web/upload-img"},maxImageLength:{type:Number,default:9},limitW:{type:Number},limitH:{type:Number},imageList:{type:Array,default:function(){return[]}}},data:function(){return{dragImageList:JSON.parse(r()(this.imageList)),fileDatas:[],initialImg:0,progress:0,pass:null,isEnlargeImage:!1,enlargeImage:""}},computed:{propStatus:function(){return this.pass?"success":!1===this.pass?"exception":"text"}},beforeMount:function(){},methods:{uploadUrl:function(){var t,e=window.location.origin,a=void 0;return t=this.wxFlag&&""!=this.wxFlag?"wxFlag="+this.wxFlag+"&":"",a="-1"!=e.indexOf("localhost")?"https://www.gicdev.com":e,this.upUrl=a+this.actionUrl+"?"+t+"requestProject="+this.projectName,this.upUrl},beforeAvatarUpload:function(t){var e=this,a=t.size/1024/1024<5;return a||e.$message.error("上传图片大小不能超过 5MB!"),a&&new p.a(function(a,i){var r=new FileReader;r.onload=function(t){var r=new Image;r.onload=function(){var t=this.width,r=this.height;e.imgRate&&""!==e.imgRate&&(Number(e.imgRate.split(":")[0])/Number(e.imgRate.split(":")[1])!=Number(t)/Number(r)&&(e.$message.error("上传图片比例不正确!"),i()));e.imgRate&&""!=e.imgRate||!e.limitW||!e.limitH||t===e.limitW||r===e.limitH||(e.$message.error("上传图片尺寸不正确!"),i()),a()},r.src=t.target.result},r.readAsDataURL(t)})},uploadOnProgress:function(t,e){t&&t.percent&&(this.progress=Math.floor(t.percent))},uploadOnChange:function(t,e){var a=this;"ready"===t.status?(a.pass=null,a.progress=0):"fail"===t.status&&a.$message.error("图片上传失败,请重试!"),a.fileDatas=e,console.log("fileList:",e,a.fileDatas),a.$nextTick(function(){var t=[];e.length&&e.forEach(function(e){t.push({imgUrl:e.response.result[0].qcloudImageUrl})}),a.$emit("uploadOnSuccess",t),a.pass=null,a.progress=0})},handleExceed:function(t,e){this.$message.warning("当前限制选择 9 个文件,本次选择了 "+t.length+" 个文件,共选择了 "+(t.length+e.length)+" 个文件")},uploadOnError:function(){this.$message.error("图片上传失败,请重试!")},previewImage:function(t){this.isEnlargeImage=!0,this.initialImg=t},deleteImage:function(t){this.$emit("deleteImage",t)},handleClose:function(t){t()},itemMoveEnd:function(t){this.$emit("sortImg",this.dragImageList)}},watch:{imageList:function(t,e){this.dragImageList=JSON.parse(r()(t))}},mounted:function(){this.dragImageList=JSON.parse(r()(this.imageList))},components:{draggable:a.n(f).a}},v={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"gic-upload__img"},[a("div",{staticClass:"gic-upload__img__drag"},[a("draggable",{staticClass:"drag-wrap",staticStyle:{display:"contents"},attrs:{options:{group:{name:"people",pull:!1,put:!0},sort:!0}},on:{end:t.itemMoveEnd},model:{value:t.dragImageList,callback:function(e){t.dragImageList=e},expression:"dragImageList"}},[a("transition-group",{attrs:{name:"slide-fade"}},t._l(t.imageList,function(e,i){return a("div",{key:i,class:["img-content",i>=6?"m-t-8":""]},[a("a",{staticClass:"item-img",attrs:{href:e.imgUrl}},[a("img",{attrs:{src:e.imgUrl,alt:"上传图片"}})]),t._v(" "),a("div",{staticClass:"upload-icon__btn"},[a("i",{staticClass:"el-icon-view",on:{click:function(e){t.previewImage(i)}}}),t._v(" "),a("i",{staticClass:"el-icon-delete",on:{click:function(e){t.deleteImage(i)}}})])])}))],1),t._v(" "),t.pass||0===t.progress?t._e():a("div",{class:["img-content","img-progress",t.imageList.length>=6?"m-t-8":""]},[a("el-progress",{staticClass:"gic-img-progress",staticStyle:{"line-height":"102px"},attrs:{width:102,percentage:t.progress,status:t.propStatus}})],1),t._v(" "),t.imageList&&t.imageList.length<t.maxImageLength?a("div",{class:["img-upload",t.imageList.length>=6?"m-t-8":""]},[a("el-upload",{staticClass:"loader",attrs:{disabled:t.disabled,multiple:"",accept:"image/jpg,image/jpeg,image/png,image/gif,image/bmp",action:t.uploadUrl(),"list-type":"picture-card",limit:9,"on-exceed":t.handleExceed,"on-change":t.uploadOnChange,"before-upload":t.beforeAvatarUpload,"on-error":t.uploadOnError,"on-progress":t.uploadOnProgress}},[a("i",{staticClass:"el-icon-plus gic-upload-btn"})])],1):t._e()],1),t._v(" "),a("el-dialog",{attrs:{title:"图片预览",visible:t.isEnlargeImage,"modal-append-to-body":!1,"before-close":t.handleClose,width:"520px"},on:{"update:visible":function(e){t.isEnlargeImage=e}}},[t.isEnlargeImage?a("el-carousel",{attrs:{trigger:"click","initial-index":t.initialImg,autoplay:!1,height:"500px"}},t._l(t.imageList,function(e,i){return a("el-carousel-item",{key:i,staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[a("img",{staticStyle:{"max-width":"480px","max-height":"500px"},attrs:{src:e.imgUrl},on:{click:function(e){t.isEnlargeImage=!1}}})])})):t._e()],1)],1)},staticRenderFns:[]};var I=a("VU/8")(h,v,!1,function(t){a("2lUv")},null,null).exports,b=a("P9l9"),S=a("3E4D"),_=a("Ch4/"),L=a("PI0u"),C={name:"chat-log",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},components:{commonDetailTop:n.a,vueSelectStore:o.a,vueSelectEmployee:c.a,materialPreview:m.a,limitInput:u.a,limitTextarea:d.a,multUploadImage:I},data:function(){return{activeBrand:this.brandId,activeGroup:this.activeGroupId,activeId:"2",topMenuData:[{id:"1",name:"纷享素材",path:"/enjoyMaterial?appIcon="+this.$route.query.appIcon},{id:"2",name:this.$route.query.materialId?"查看素材":"新建素材"}],searchInput:"",selectType:"",treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1,openNextBool:!0},defaultSelection:[],changed:"",onlyPerson:!1,appScene:2,defaultStoreList:[],storeTreeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1},currentPage:1,pageSize:6,total:0,enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,userId:JSON.parse(localStorage.getItem("userInfo")).userId,formData:{materialId:"",rangeList:[],imgUrlList:[],materialTitle:"",materialContent:"",topFlag:!1},rules:{materialTitle:[{required:!0,message:"请请输入素材标题",trigger:"blur"}],materialContent:[{required:!0,message:"请请输入发送内容",trigger:"blur"}],rangeList:[{validator:function(t,e,a){if(""==e||!e.length)return a(new Error("请选择选择行政架构或门店架构"));a()},trigger:"change"}],imgUrlList:[{required:!0,validator:function(t,e,a){if(""==e||!e.length)return a(new Error("请上传图片"));a()},trigger:"change"}]},previewVisible:!1,materialPreviewData:{}}},methods:{uploadOnSuccess:function(t){this.formData.imgUrlList=t,console.log("上传list:",t)},deleteImage:function(t){this.formData.imgUrlList.splice(t,1),console.log("删除list2:",this.formData.imgUrlList)},sortImg:function(t){this.formData.imgUrlList=t},submitForm:function(t,e){var a=this;a.formData.rangeList=[].concat(s()(a.defaultStoreList),s()(a.defaultSelection)),a.$refs[t].validate(function(t){t&&a.postSaveCard(e)})},postSaveCard:function(t){var e=this,a=[];e.formData.rangeList.forEach(function(t){a.push({groupId:2==t.type?t.groupId:"",storeId:3==t.type?t.storeId:"",storeFlag:t.isStoreGroup})});var i={enterpriseId:e.enterpriseId,imgListStr:r()(e.formData.imgUrlList),materialContent:e.formData.materialContent,materialTitle:e.formData.materialTitle,rangeListStr:r()(a),topFlag:e.formData.topFlag?1:0,relatedType:2,brandId:e.brandId,userId:e.userId};Object(b.e)("/haoban-app-material-web/material-add",i).then(function(a){var i=a.data;1==i.errorCode&&(S.a.showmsg("新建成功","success"),t?(e.formData={materialId:"",imgUrlList:[],materialTitle:"",materialContent:"",topFlag:!1},e.defaultStoreList=[],e.defaultSelection=[]):e.$router.push("/enjoyMaterial?appIcon="+e.$route.query.appIcon)),_.a.errorMsg(i)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},previewData:function(t){var e=this;e.formData.rangeList=[].concat(s()(e.defaultStoreList),s()(e.defaultSelection)),e.$refs[t].validate(function(t){t&&(e.materialPreviewData=e.formData,e.previewVisible=!0)})},closePre:function(){this.materialPreviewData={}},toReturn:function(){this.$router.go(-1)},changeId:function(t,e){this.formData.imageTextWechatId="",this.formData.imageTextGicId=e.imageTextId},toInput:Object(L.a)(function(t,e){this.currentPage=1,this.getTableList()},200),clearInput:function(){this.currentPage=1,this.getTableList()},showDialogLayer:function(t,e){return!this.$route.query.materialId&&(this.selectType=t,this.changed=t,"store"===t?(this.defaultStoreList=e,void(this.storeTreeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!1,openNextBool:!0})):(this.treeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!1,openNextBool:!0},void(this.defaultSelection=e)))},handleSelectedList:function(t){"store"===this.selectType?this.defaultStoreList=t:this.defaultSelection=t},delDepart:function(t,e,a){if(this.$route.query.materialId)return!1;e.splice(t,1)},getData:function(){var t=this,e={materialId:t.$route.query.materialId,brandId:t.brandId};Object(b.a)("/haoban-app-material-web/material-detail",e).then(function(e){var a=e.data;if(1==a.errorCode){var i=[],r=[];return a.result.rangeVOList&&a.result.rangeVOList.forEach(function(t){t.groupId=2==t.type?t.id:"",t.storeId=3==t.type?t.id:"",t.isStoreGroup=t.storeFlag,1==t.storeFlag?i.push(t):r.push(t)}),t.formData={materialId:a.result.materialId,imageTextWechatId:a.result.imageTextWechatId,materialTitle:a.result.materialTitle,materialContent:a.result.materialContent,topFlag:1==a.result.topFlag,imgUrlList:a.result.imgList,rangeList:a.result.rangeVOList,createTime:a.result.createTime},t.defaultStoreList=i||[],t.defaultSelection=r||[],!1}_.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{brandId:function(t,e){t&&(this.activeBrand=t,this.$route.query.materialId&&this.getData())},activeGroupId:function(t,e){t&&(this.activeGroup=t)}},mounted:function(){this.$emit("showTab","2"),this.brandId&&this.$route.query.materialId&&this.getData()}},x={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"chat-log boder-box"},[a("common-detail-top",{attrs:{topMenuData:t.topMenuData,activeId:t.activeId}}),t._v(" "),a("div",{staticClass:"new-card-body"},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.formData,rules:t.rules,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"发送内容标题:",prop:"materialTitle"}},[a("limitInput",{attrs:{disflag:!!t.$route.query.materialId,inputWidth:320,inputValue:t.formData.materialTitle,holder:"请输入素材标题",getByType:"word",maxLength:15},on:{"update:inputValue":function(e){t.$set(t.formData,"materialTitle",e)}}})],1),t._v(" "),a("el-form-item",{attrs:{label:"发送内容:",prop:"materialContent"}},[a("limitTextarea",{attrs:{disInput:!!t.$route.query.materialId,inputWidth:320,inputValue:t.formData.materialContent,holder:"请输入素材内容",maxLength:1500},on:{"update:inputValue":function(e){t.$set(t.formData,"materialContent",e)}}})],1),t._v(" "),a("el-form-item",{attrs:{label:"图片上传:",prop:"imgUrlList"}},[a("mult-upload-image",{attrs:{disabled:!!t.$route.query.materialId,imageList:t.formData.imgUrlList},on:{deleteImage:t.deleteImage,uploadOnSuccess:t.uploadOnSuccess,sortImg:t.sortImg}})],1),t._v(" "),a("el-form-item",{staticClass:"input-item is-required",attrs:{label:"发送范围:",prop:"rangeList"}},[a("div",{staticClass:"form-item-tip fonr-14 color-909399"},[t._v("下面两项可二选一,非全选。可选择行政架构或门店架构")]),t._v(" "),a("div",{staticClass:"flex"},[a("div",{staticClass:"flex-column item-cell-select inline-block "},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"240px"},on:{click:function(e){t.showDialogLayer("depart",t.defaultSelection)}}},[t.defaultSelection.length?t._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[t._v("请选择行政架构")]),t._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[t._l(t.defaultSelection,function(e,i){return[a("span",{key:i,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[t._v(t._s(e.name||e.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(e){e.stopPropagation(),t.delDepart(i,t.defaultSelection,"depart")}}})])]})],2)])])])])]),t._v(" "),a("div",{staticClass:"flex m-t-20"},[a("div",{staticClass:"flex-column item-cell-select inline-block"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"240px"},on:{click:function(e){t.showDialogLayer("store",t.defaultStoreList)}}},[t.defaultStoreList.length?t._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[t._v("请选择门店架构")]),t._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[t._l(t.defaultStoreList,function(e,i){return[a("span",{key:i,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[t._v(t._s(e.name||e.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(e){e.stopPropagation(),t.delDepart(i,t.defaultStoreList,"store")}}})])]})],2)])])])])])]),t._v(" "),a("el-form-item",{attrs:{label:"更多设置:",prop:""}},[a("div",[a("el-checkbox",{attrs:{disabled:!!t.$route.query.materialId},model:{value:t.formData.topFlag,callback:function(e){t.$set(t.formData,"topFlag",e)},expression:"formData.topFlag"}},[t._v("置顶")])],1)]),t._v(" "),a("el-form-item",[a("el-button",{on:{click:t.toReturn}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.previewData("ruleForm")}}},[t._v("预览")]),t._v(" "),a("el-button",{attrs:{disabled:!!t.$route.query.materialId,type:"primary"},on:{click:function(e){t.submitForm("ruleForm")}}},[t._v("发布")]),t._v(" "),a("el-button",{attrs:{disabled:!!t.$route.query.materialId,type:"primary"},on:{click:function(e){t.submitForm("ruleForm","flag")}}},[t._v("发布并添加下一个")])],1)],1)],1)],1),t._v(" "),a("vue-select-employee",{attrs:{appScene:t.appScene,defaultSelection:t.defaultSelection,onlyPerson:t.onlyPerson,treeSet:t.treeSet,changed:t.changed},on:{handleSelectedList:t.handleSelectedList}}),t._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{currentBrand:t.activeGroup,appScene:t.appScene,treeSet:t.storeTreeSet,selectType:"group-store",defaultList:t.defaultStoreList},on:{handleSelectedList:t.handleSelectedList}}),t._v(" "),a("material-preview",{ref:"materialPreview",attrs:{materialPreviewData:t.materialPreviewData},model:{value:t.previewVisible,callback:function(e){t.previewVisible=e},expression:"previewVisible"}})],1)},staticRenderFns:[]};var y=a("VU/8")(C,x,!1,function(t){a("8tOF")},"data-v-e7d3f764",null);e.default=y.exports},"8tOF":function(t,e){},vRJf:function(t,e,a){"use strict";var i=a("mvHQ"),r=a.n(i),l={name:"material-preview",props:{value:{type:Boolean,default:function(){return!1}},materialPreviewData:{type:[Object,Array],default:function(){return{materialId:"",imageTextWechatId:"",imageTextGicId:"",titleName:"",imageUrl:"",mediaUrl:"",rangeList:[],imgUrlList:[],materialTitle:"",materialContent:"",topFlag:!1}}}},directives:{htmlContent:{bind:function(t,e){t.innerHTML=e.value},update:function(t,e){t.innerHTML=e.value}}},data:function(){return{materialData:{materialId:"",imageTextWechatId:"",imageTextGicId:"",rangeList:[],imgUrlList:[],mediaUrl:"",materialTitle:"",materialContent:"",topFlag:!1}}},methods:{toUrl:function(t){window.open(t)},closeDialog:function(){this.$emit("input",!1),this.$emit("closePre")}},watch:{value:function(t,e){this.materialData=JSON.parse(r()(this.materialPreviewData))},materialPreviewData:function(t,e){this.materialData=JSON.parse(r()(t))}},mounted:function(){this.materialData=JSON.parse(r()(this.materialPreviewData))}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.value?a("div",{staticClass:"qr-dialog-content",staticStyle:{opacity:"1"}},[a("div",{staticClass:"qr-mask",on:{click:function(e){return e.stopPropagation(),t.closeDialog(e)}}}),t._v(" "),a("div",{staticClass:"qr-dialog border-box"},[a("div",{staticClass:"qr-dialog-body border-box"},[a("h2",{staticClass:"font-20 color-222 text-left main-title"},[t._v(t._s(t.materialData.materialTitle))]),t._v(" "),a("div",{staticClass:"notice-date m-t-10 flex flex-space-between"},[a("div",{staticClass:"notice-date-left font-10 color-88949C"},[t._v(t._s(t._f("timeStampToYmd")(t.materialData.materialId?t.materialData.createTime:(new Date).getTime())))]),t._v(" "),a("div",{staticClass:"notice-date-right font-10 color-4d7fd0"})]),t._v(" "),a("div",{directives:[{name:"htmlContent",rawName:"v-htmlContent",value:t.materialData.materialContent,expression:"materialData.materialContent"}],staticClass:"notice-body border-box font-14 color-222"}),t._v(" "),t.materialData.imgUrlList&&t.materialData.imgUrlList.length?a("div",{staticClass:"img-list-wrap"},[a("ul",{staticClass:"flex flex-wrap"},t._l(t.materialData.imgUrlList,function(t,e){return a("li",{key:e+"img",staticClass:"border-box flex flex-align-center flex-pack-center"},[a("img",{attrs:{src:t.imgUrl,alt:""}})])}))]):t._e(),t._v(" "),t.materialData.imageTextWechatId?a("div",{staticClass:"image-text-link"},[a("div",{staticClass:"flex cursor-pointer",on:{click:function(e){t.toUrl(t.materialData.mediaUrl)}}},[a("div",{staticClass:"flex-left-img flex flex-align-center flex-pack-center"},[a("img",{attrs:{src:t.materialData.imageUrl,alt:""}})]),t._v(" "),a("div",{staticClass:"flex-right-title border-box"},[a("div",{staticClass:"title-content font-14 color-606266"},[t._v(t._s(t.materialData.titleName))])])])]):t._e()])]),t._v(" "),a("div",{staticClass:"qr-dialog__hd"},[a("i",{staticClass:"el-icon-plus",on:{click:function(e){return e.stopPropagation(),t.closeDialog(e)}}})])]):t._e()},staticRenderFns:[]};var n=a("VU/8")(l,s,!1,function(t){a("xELH")},"data-v-91610bd2",null);e.a=n.exports},xELH:function(t,e){}});
\ No newline at end of file
webpackJsonp([23],{"/8XM":function(t,e){},SB6x:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("Ke24"),n=a("joH8"),o=a("P9l9"),l=a("Ch4/"),s=a("3E4D"),r=a("PI0u"),c={name:"chat-log",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},components:{commonDetailTop:i.a,materialRecord:n.a},data:function(){var t=this;return{activeBrand:this.brandId,activeGroup:this.activeGroupId,activeId:"1",topMenuData:[{id:"1",name:"纷享素材"}],tableData:[],conditionObj:{searchInput:"",searchType:"1",storeGroup:[],dateRange:[]},choiceDateCopy:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}],onPick:function(e){var a=e.maxDate,i=e.minDate;t.choiceDateCopy=[i.getTime()],a&&(t.choiceDateCopy=[])},disabledDate:function(e){if(t.choiceDateCopy.length){var a=t.choiceDateCopy[0]-31536e6,i=t.choiceDateCopy[0]+31536e6;return e.getTime()<a||e.getTime()>i||e.getTime()>Date.now()-864e4}return e.getTime()>Date.now()-864e4}},currentPage:1,pageSize:20,total:0,detailShow:!1,materialId:""}},methods:{toInput:Object(r.a)(function(t,e){this.currentPage=1,this.getTableList()},500),clearInput:function(){this.currentPage=1,this.getTableList()},changeDate:function(t){t||(this.choiceDateCopy=[],this.conditionObj.dateRange=[]),this.getTableList()},toCreate:function(){this.$router.push("/newEnjoy")},toSetTop:function(t,e){var a=this;a.$confirm(0==e?"置顶后,该素材将出现在手机好办营销素材顶部,确认置顶该素材吗":"确定「取消置顶」该条素材吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postTop(t,e)})},postTop:function(t,e){var a=this,i={materialId:t,topFlag:0==e?1:0};Object(o.a)("/haoban-app-material-web/material-to-top",i).then(function(t){var i=t.data;1==i.errorCode?(0==e?s.a.showmsg("置顶成功","success"):s.a.showmsg("取消置顶成功","success"),a.currentPage=1,a.getTableList()):s.a.showmsg(i.message,"warning")}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},handleSizeChange:function(t){this.pageSize=t,this.getTableList()},handleCurrentChange:function(t){this.currentPage=t,this.getTableList()},showDetail:function(t,e){this.$router.push("/newEnjoy?materialId="+e.materialId+"&appIcon="+this.$route.query.appIcon)},showRecord:function(t,e){this.detailShow=!0,this.materialId=e.materialId},hideDetailDialog:function(){this.detailShow=!1,this.materialId=""},toDel:function(t,e){var a=this;a.$confirm("是否要删除该素材?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDel(e,t)}).catch(function(){})},postDel:function(t,e){var a=this,i={materialId:t.materialId};Object(o.e)("/haoban-app-material-web/material-del",i).then(function(t){var e=t.data;if(1==e.errorCode)return s.a.showmsg("删除成功","success"),void a.getTableList();l.a.errorMsg(e)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},getTableList:function(t){var e=this;e.conditionObj.dateRange||(e.conditionObj.dateRange=[]);var a={materialTitle:e.conditionObj.searchInput||"",startTimeStr:e.conditionObj.dateRange[0]||"",endTimeStr:e.conditionObj.dateRange[1]||"",relatedType:2,pageNum:e.currentPage,pageSize:e.pageSize,brandId:e.activeBrand};Object(o.a)("/haoban-app-material-web/material-page",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.tableData=a.result.list||[],e.total=a.result.total,!1;l.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(t,e){t&&(this.activeBrand=t,this.getTableList())},activeGroupId:function(t,e){t&&(this.activeGroup=t)}},mounted:function(){this.$emit("showTab","2"),this.brandId&&this.getTableList()}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"chat-log border-box"},[a("common-detail-top",{attrs:{topMenuData:t.topMenuData,activeId:t.activeId}}),t._v(" "),a("div",{staticClass:"chat-log-content border-box"},[a("div",{staticClass:"table-condition flex flex-space-between m-b-23"},[a("div",{staticClass:"table-condition-left"},[a("el-input",{staticClass:"w-264",attrs:{placeholder:"请输入标题",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.searchInput);var a}},model:{value:t.conditionObj.searchInput,callback:function(e){t.$set(t.conditionObj,"searchInput",e)},expression:"conditionObj.searchInput"}}),t._v(" "),a("el-date-picker",{staticClass:"m-l-10",attrs:{"prefix-icon":"el-icon-time","picker-options":t.pickerOptions,editable:!1,"value-format":"yyyy-MM-dd",type:"daterange",align:"right","unlink-panels":"","range-separator":"~","start-placeholder":"开始时间","end-placeholder":"结束时间"},on:{change:t.changeDate},model:{value:t.conditionObj.dateRange,callback:function(e){t.$set(t.conditionObj,"dateRange",e)},expression:"conditionObj.dateRange"}})],1),t._v(" "),a("div",{staticClass:"table-condition-right"},[a("el-button",{attrs:{type:"primary"},on:{click:t.toCreate}},[t._v("新建素材")])],1)]),t._v(" "),a("el-table",{ref:"multipleTable",staticClass:"select-table",style:{width:"100%",minHeight:t.tableH},attrs:{data:t.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"标题","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.materialTitle||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"图片"},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(e.row.imgList,function(t,e){return a("img",{key:e+"img",staticClass:"table-img",attrs:{src:t.imgUrl,alt:""}})})}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"点赞数","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.thumbsUpCount||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"转发数","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.tranferCount||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"发布时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"219",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.toSetTop(e.row.materialId,e.row.topFlag)}}},[t._v(t._s(1==e.row.topFlag?"取消置顶":"置顶"))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.showDetail(e.$index,e.row)}}},[t._v("查看")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.showRecord(e.$index,e.row)}}},[t._v("记录")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toDel(e.$index,e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),0!=t.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[20,40,60,80],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)],1),t._v(" "),a("material-record",{attrs:{materialId:t.materialId,detailShow:t.detailShow},on:{hideDetailDialog:t.hideDetailDialog}})],1)},staticRenderFns:[]};var d=a("VU/8")(c,u,!1,function(t){a("uHqF")},"data-v-715dbe28",null);e.default=d.exports},joH8:function(t,e,a){"use strict";var i=a("P9l9"),n=a("Ch4/"),o=a("PI0u"),l={name:"material-record",props:{detailShow:{type:Boolean,default:!1},materialId:{type:String,default:""}},data:function(){return{customDialog:!1,activeName:"first",tableData:[],conditionObj:{searchInput:"",materialId:this.materialId},currentPage:1,pageSize:5,total:0}},methods:{handleTab:function(){this.currentPage=1,this.getTableList()},toInput:Object(o.a)(function(t,e){this.currentPage=1,this.getTableList()},500),clearInput:function(){this.currentPage=1,this.getTableList()},handleSizeChange:function(t){this.pageSize=t,this.getTableList()},handleCurrentChange:function(t){this.currentPage=t,this.getTableList()},handleClose:function(t){t(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.$emit("hideDetailDialog")},getTableList:function(t){var e=this,a={materialId:e.conditionObj.materialId,imgTextTitle:e.conditionObj.searchInput||"",relatedType:"first"==e.activeName?2:1,pageNum:e.currentPage,pageSize:e.pageSize,brandId:e.activeBrand};Object(i.a)("/haoban-app-material-web/material-log",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.tableData=a.result.list||[],e.total=a.result.total,!1;n.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{detailShow:function(t,e){this.customDialog=t},materialId:function(t,e){t&&(this.conditionObj.materialId=t,this.currentPage=1,this.getTableList())}},mounted:function(){this.customDialog=this.detailShow,this.materialId&&(this.conditionObj.materialId=this.materialId,this.currentPage=1,this.getTableList())}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"show",rawName:"v-show",value:t.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:"记录",visible:t.customDialog,width:"739px","before-close":t.handleClose},on:{"update:visible":function(e){t.customDialog=e}}},[a("div",{staticClass:"edit-dialog-body"},[a("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleTab},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"点赞记录",name:"first"}},[a("div",{staticClass:"m-b-20 flex"},[a("el-input",{staticClass:"w-223",attrs:{placeholder:"请输入姓名/手机号/code","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.searchInput);var a}},model:{value:t.conditionObj.searchInput,callback:function(e){t.$set(t.conditionObj,"searchInput",e)},expression:"conditionObj.searchInput"}}),t._v(" "),a("span",{staticClass:"p-l-10 l-h-32"},[t._v("共"+t._s(t.total)+"条点赞记录")])],1),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,height:"332"}},[a("el-table-column",{attrs:{label:"点赞人",width:"150","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex flex-align-center flex-pack-center bg-82C5FF table-head-pic"},[e.row.headImg?a("img",{attrs:{src:e.row.headImg,alt:"img"}}):a("i",{staticClass:"iconfont icon-yewuduanmorentouxian"})]),t._v(" "),a("div",{staticClass:"flex flex-column apply-info"},[a("span",{staticClass:"text-ellipsis"},[t._v(t._s(e.row.userName))]),t._v(" "),a("span",{staticClass:"font-13 text-ellipsis"},[t._v(t._s(e.row.storeName))])])])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"手机号","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.phoneNumber||"--")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"点赞时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])})],1)],1),t._v(" "),a("el-tab-pane",{attrs:{label:"转发记录",name:"second"}},[a("div",{staticClass:"m-b-20 flex"},[a("el-input",{staticClass:"w-223",attrs:{placeholder:"请输入姓名/手机号/code","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.searchInput);var a}},model:{value:t.conditionObj.searchInput,callback:function(e){t.$set(t.conditionObj,"searchInput",e)},expression:"conditionObj.searchInput"}}),t._v(" "),a("span",{staticClass:"p-l-10 l-h-32"},[t._v("共"+t._s(t.total)+"条转发记录")])],1),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,height:"332"}},[a("el-table-column",{attrs:{label:"转发人",width:"150","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex flex-align-center flex-pack-center bg-82C5FF table-head-pic"},[e.row.headImg?a("img",{attrs:{src:e.row.headImg,alt:"img"}}):a("i",{staticClass:"iconfont icon-yewuduanmorentouxian"})]),t._v(" "),a("div",{staticClass:"flex flex-column apply-info"},[a("span",{staticClass:"text-ellipsis"},[t._v(t._s(e.row.userName))]),t._v(" "),a("span",{staticClass:"font-13 text-ellipsis"},[t._v(t._s(e.row.storeName))])])])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"手机号","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.phoneNumber||"--")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"转发时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])})],1)],1)],1),t._v(" "),0!=t.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[20,40,60,80],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)])],1)},staticRenderFns:[]};var r=a("VU/8")(l,s,!1,function(t){a("/8XM")},"data-v-66a1accb",null);e.a=r.exports},uHqF:function(t,e){}});
\ No newline at end of file
webpackJsonp([24],{"/8XM":function(t,e){},"0qiV":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("Ke24"),n=a("joH8"),o=a("P9l9"),l=a("Ch4/"),s=a("3E4D"),r=a("PI0u"),c={name:"chat-log",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},components:{commonDetailTop:i.a,materialRecord:n.a},data:function(){var t=this;return{activeBrand:this.brandId,activeGroup:this.activeGroupId,activeId:"1",topMenuData:[{id:"1",name:"图文素材"}],tableData:[],conditionObj:{searchInput:"",searchType:"1",storeGroup:[],dateRange:[]},choiceDateCopy:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}],onPick:function(e){var a=e.maxDate,i=e.minDate;t.choiceDateCopy=[i.getTime()],a&&(t.choiceDateCopy=[])},disabledDate:function(e){if(t.choiceDateCopy.length){var a=t.choiceDateCopy[0]-31536e6,i=t.choiceDateCopy[0]+31536e6;return e.getTime()<a||e.getTime()>i||e.getTime()>Date.now()-864e4}return e.getTime()>Date.now()-864e4}},currentPage:1,pageSize:20,total:0,detailShow:!1,materialId:""}},methods:{toInput:Object(r.a)(function(t,e){this.currentPage=1,this.getTableList()},500),clearInput:function(){this.currentPage=1,this.getTableList()},changeDate:function(t){t||(this.choiceDateCopy=[],this.conditionObj.dateRange=[]),this.getTableList()},toCreate:function(){this.$router.push("/newImageText?appIcon="+this.$route.query.appIcon)},toSetTop:function(t,e){var a=this;a.$confirm(0==e?"置顶后,该素材将出现在手机好办营销素材顶部,确认置顶该素材吗":"确定「取消置顶」该条素材吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postTop(t,e)})},postTop:function(t,e){var a=this,i={materialId:t,topFlag:0==e?1:0};Object(o.a)("/haoban-app-material-web/material-to-top",i).then(function(t){var i=t.data;1==i.errorCode?(0==e?s.a.showmsg("置顶成功","success"):s.a.showmsg("取消置顶成功","success"),a.currentPage=1,a.getTableList()):s.a.showmsg(i.message,"warning")}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},handleSizeChange:function(t){this.pageSize=t,this.getTableList()},handleCurrentChange:function(t){this.currentPage=t,this.getTableList()},toDel:function(t,e){var a=this;a.$confirm("是否要删除该素材?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDel(e,t)}).catch(function(){})},postDel:function(t,e){var a=this,i={materialId:t.materialId};Object(o.e)("/haoban-app-material-web/material-del",i).then(function(t){var e=t.data;if(1==e.errorCode)return s.a.showmsg("删除成功","success"),void a.getTableList();l.a.errorMsg(e)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},showDetail:function(t,e){this.$router.push("/newImageText?materialId="+e.materialId+"&appIcon="+this.$route.query.appIcon)},showRecord:function(t,e){this.detailShow=!0,this.materialId=e.materialId},hideDetailDialog:function(){this.detailShow=!1,this.materialId=""},getTableList:function(t){var e=this;e.conditionObj.dateRange||(e.conditionObj.dateRange=[]);var a={materialTitle:e.conditionObj.searchInput||"",startTimeStr:e.conditionObj.dateRange[0]||"",endTimeStr:e.conditionObj.dateRange[1]||"",relatedType:1,pageNum:e.currentPage,pageSize:e.pageSize,brandId:e.activeBrand};Object(o.a)("/haoban-app-material-web/material-page",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.tableData=a.result.list||[],e.total=a.result.total,!1;l.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(t,e){t&&(this.activeBrand=t,this.getTableList())},activeGroupId:function(t,e){t&&(this.activeGroup=t)}},mounted:function(){this.$emit("showTab","1"),this.brandId&&this.getTableList()}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"chat-log border-box"},[a("common-detail-top",{attrs:{topMenuData:t.topMenuData,activeId:t.activeId}}),t._v(" "),a("div",{staticClass:"chat-log-content border-box"},[a("div",{staticClass:"table-condition flex flex-space-between m-b-23"},[a("div",{staticClass:"table-condition-left"},[a("el-input",{staticClass:"w-264",attrs:{placeholder:"请输入标题",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.searchInput);var a}},model:{value:t.conditionObj.searchInput,callback:function(e){t.$set(t.conditionObj,"searchInput",e)},expression:"conditionObj.searchInput"}}),t._v(" "),a("el-date-picker",{staticClass:"m-l-10",attrs:{"prefix-icon":"el-icon-time","picker-options":t.pickerOptions,editable:!1,"value-format":"yyyy-MM-dd",type:"daterange",align:"right","unlink-panels":"","range-separator":"~","start-placeholder":"开始时间","end-placeholder":"结束时间"},on:{change:t.changeDate},model:{value:t.conditionObj.dateRange,callback:function(e){t.$set(t.conditionObj,"dateRange",e)},expression:"conditionObj.dateRange"}})],1),t._v(" "),a("div",{staticClass:"table-condition-right"},[a("el-button",{attrs:{type:"primary"},on:{click:t.toCreate}},[t._v("选择图文")])],1)]),t._v(" "),a("el-table",{ref:"multipleTable",staticClass:"select-table",style:{width:"100%",minHeight:t.tableH},attrs:{data:t.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"标题","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.materialTitle||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"图文"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"img-wrap border-box flex flex-align-center flex-pack-center"},[e.row.mainUrl?a("img",{attrs:{src:e.row.mainUrl,alt:""}}):t._e()]),t._v(" "),a("div",{staticClass:"article-title font-14 color-606266 p-l-10"},[t._v("\n "+t._s(e.row.imageTextTitle)+"\n ")])])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"点赞数","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.thumbsUpCount||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"转发数","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.tranferCount||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"发布时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"219"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.toSetTop(e.row.materialId,e.row.topFlag)}}},[t._v(t._s(1==e.row.topFlag?"取消置顶":"置顶"))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.showDetail(e.$index,e.row)}}},[t._v("查看")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.showRecord(e.$index,e.row)}}},[t._v("记录")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toDel(e.$index,e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),0!=t.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[20,40,60,80],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)],1),t._v(" "),a("material-record",{attrs:{materialId:t.materialId,detailShow:t.detailShow},on:{hideDetailDialog:t.hideDetailDialog}})],1)},staticRenderFns:[]};var d=a("VU/8")(c,u,!1,function(t){a("0uxX")},"data-v-6eb51ed4",null);e.default=d.exports},"0uxX":function(t,e){},joH8:function(t,e,a){"use strict";var i=a("P9l9"),n=a("Ch4/"),o=a("PI0u"),l={name:"material-record",props:{detailShow:{type:Boolean,default:!1},materialId:{type:String,default:""}},data:function(){return{customDialog:!1,activeName:"first",tableData:[],conditionObj:{searchInput:"",materialId:this.materialId},currentPage:1,pageSize:5,total:0}},methods:{handleTab:function(){this.currentPage=1,this.getTableList()},toInput:Object(o.a)(function(t,e){this.currentPage=1,this.getTableList()},500),clearInput:function(){this.currentPage=1,this.getTableList()},handleSizeChange:function(t){this.pageSize=t,this.getTableList()},handleCurrentChange:function(t){this.currentPage=t,this.getTableList()},handleClose:function(t){t(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.$emit("hideDetailDialog")},getTableList:function(t){var e=this,a={materialId:e.conditionObj.materialId,imgTextTitle:e.conditionObj.searchInput||"",relatedType:"first"==e.activeName?2:1,pageNum:e.currentPage,pageSize:e.pageSize,brandId:e.activeBrand};Object(i.a)("/haoban-app-material-web/material-log",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.tableData=a.result.list||[],e.total=a.result.total,!1;n.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{detailShow:function(t,e){this.customDialog=t},materialId:function(t,e){t&&(this.conditionObj.materialId=t,this.currentPage=1,this.getTableList())}},mounted:function(){this.customDialog=this.detailShow,this.materialId&&(this.conditionObj.materialId=this.materialId,this.currentPage=1,this.getTableList())}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"show",rawName:"v-show",value:t.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:"记录",visible:t.customDialog,width:"739px","before-close":t.handleClose},on:{"update:visible":function(e){t.customDialog=e}}},[a("div",{staticClass:"edit-dialog-body"},[a("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleTab},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"点赞记录",name:"first"}},[a("div",{staticClass:"m-b-20 flex"},[a("el-input",{staticClass:"w-223",attrs:{placeholder:"请输入姓名/手机号/code","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.searchInput);var a}},model:{value:t.conditionObj.searchInput,callback:function(e){t.$set(t.conditionObj,"searchInput",e)},expression:"conditionObj.searchInput"}}),t._v(" "),a("span",{staticClass:"p-l-10 l-h-32"},[t._v("共"+t._s(t.total)+"条点赞记录")])],1),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,height:"332"}},[a("el-table-column",{attrs:{label:"点赞人",width:"150","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex flex-align-center flex-pack-center bg-82C5FF table-head-pic"},[e.row.headImg?a("img",{attrs:{src:e.row.headImg,alt:"img"}}):a("i",{staticClass:"iconfont icon-yewuduanmorentouxian"})]),t._v(" "),a("div",{staticClass:"flex flex-column apply-info"},[a("span",{staticClass:"text-ellipsis"},[t._v(t._s(e.row.userName))]),t._v(" "),a("span",{staticClass:"font-13 text-ellipsis"},[t._v(t._s(e.row.storeName))])])])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"手机号","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.phoneNumber||"--")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"点赞时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])})],1)],1),t._v(" "),a("el-tab-pane",{attrs:{label:"转发记录",name:"second"}},[a("div",{staticClass:"m-b-20 flex"},[a("el-input",{staticClass:"w-223",attrs:{placeholder:"请输入姓名/手机号/code","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.searchInput);var a}},model:{value:t.conditionObj.searchInput,callback:function(e){t.$set(t.conditionObj,"searchInput",e)},expression:"conditionObj.searchInput"}}),t._v(" "),a("span",{staticClass:"p-l-10 l-h-32"},[t._v("共"+t._s(t.total)+"条转发记录")])],1),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,height:"332"}},[a("el-table-column",{attrs:{label:"转发人",width:"150","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex flex-align-center flex-pack-center bg-82C5FF table-head-pic"},[e.row.headImg?a("img",{attrs:{src:e.row.headImg,alt:"img"}}):a("i",{staticClass:"iconfont icon-yewuduanmorentouxian"})]),t._v(" "),a("div",{staticClass:"flex flex-column apply-info"},[a("span",{staticClass:"text-ellipsis"},[t._v(t._s(e.row.userName))]),t._v(" "),a("span",{staticClass:"font-13 text-ellipsis"},[t._v(t._s(e.row.storeName))])])])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"手机号","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.phoneNumber||"--")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"转发时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])})],1)],1)],1),t._v(" "),0!=t.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[20,40,60,80],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)])],1)},staticRenderFns:[]};var r=a("VU/8")(l,s,!1,function(t){a("/8XM")},"data-v-66a1accb",null);e.a=r.exports}});
\ No newline at end of file
webpackJsonp([25],{HZAJ:function(e,t){},"Ps+u":function(e,t){},estW:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("mvHQ"),l=a.n(s),o=a("Xxa5"),r=a.n(o),n=a("exGp"),i=a.n(n),c=a("P9l9"),u=a("3E4D"),d=a("PI0u"),m={name:"class-select",components:{},props:{workClassShow:{type:Boolean,default:!1},classesId:{type:String,default:""}},data:function(){return{enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,userId:JSON.parse(localStorage.getItem("userInfo")).userId,selClassesId:this.classesId,customDialog:!1,tableData:[],classesName:""}},methods:{toInput:Object(d.a)(function(e,t){this.getClassifyData()},500),clearInput:function(){this.currentPage=1,this.getClassifyData()},customConfirm:Object(d.a)(i()(r.a.mark(function e(){var t,a;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((t=this).customDialog=!1,t.selClassesId){e.next=5;break}return u.a.showmsg("请选择班次","warning"),e.abrupt("return",!1);case 5:a={},t.tableData.forEach(function(e){e.classesId==t.selClassesId&&(a=e)}),t.$emit("hideClassDialog",a),t.$nextTick(function(){t.selClassesId=""});case 9:case"end":return e.stop()}},e,this)})),300),handleClose:function(e){e(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){var e=this;e.customDialog=!1,e.$emit("hideClassDialog"),e.$nextTick(function(){e.selClassesId=""})},getClassifyData:function(){var e=this,t={enterpriseId:e.enterpriseId,classesName:e.classesName};Object(c.a)("/haoban-app-attence-web/attence-classes-list",t).then(function(t){var a=t.data;1==a.errorCode&&(a.result&&a.result.length&&a.result.forEach(function(e){e.classessTimesJson&&(e.classessTimesJson=JSON.parse(e.classessTimesJson))}),console.log(a.result),e.tableData=a.result||[])}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{workClassShow:function(e,t){this.customDialog=e},classesId:function(e){this.selClassesId=e||""}},mounted:function(){console.log(this.classesId),this.getClassifyData(),this.classesId?this.selClassesId=this.classesId:this.selClassesId="",this.customDialog=this.workClassShow}},p={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{staticClass:"edit-dialog",attrs:{title:"选择班次",visible:e.customDialog,width:"600px","before-close":e.handleClose},on:{"update:visible":function(t){e.customDialog=t}}},[a("div",{staticClass:"edit-dialog-body"},[a("div",{staticClass:"m-b-20"},[a("el-input",{staticClass:"w-264",staticStyle:{width:"264px"},attrs:{placeholder:"请输入班次名称","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.classesName);var a}},model:{value:e.classesName,callback:function(t){e.classesName=t},expression:"classesName"}})],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{label:"",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-radio",{attrs:{label:t.row.classesId},model:{value:e.selClassesId,callback:function(t){e.selClassesId=t},expression:"selClassesId"}},[e._v(e._s(""))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"imageUrl",label:"班次名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.classesName)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"titleName",label:"考勤时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.classessTimesJson,function(t,s){return a("div",{key:s+"time"},[e._v(e._s(t.startTime)+"-"+e._s(t.endTime))])})}}])})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){return t.stopPropagation(),e.customCancel(t)}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){t.stopPropagation(),e.customConfirm("ruleForm")}}},[e._v("确定")])],1)])},staticRenderFns:[]};var f,g=a("VU/8")(m,p,!1,function(e){a("HZAJ")},"data-v-65fbd61c",null).exports,v={name:"class-select",components:{},props:{mapShow:{type:Boolean,default:!1}},data:function(){var e=this;return{enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,userId:JSON.parse(localStorage.getItem("userInfo")).userId,selClassesId:this.classesId,customDialog:!1,ruleForm:{address:""},rules:{address:[{required:!0,message:"请选择考勤地点",trigger:"blur"}]},zoom:12,center:[120.12497,30.277155],address:"",plugin:[{pName:"ToolBar"}],events:{click:function(t){var a=t.lnglat,s=a.lng,l=a.lat;e.lng=s,e.lat=l,new AMap.Geocoder({radius:1e3,extensions:"all"}).getAddress([s,l],function(t,a){"complete"===t&&"OK"===a.info&&a&&a.regeocode&&(console.log(a),e.address=a.regeocode.formattedAddress,e.ruleForm.address=a.regeocode.formattedAddress,e.$nextTick())})}},lng:0,lat:0}},methods:{customConfirm:Object(d.a)((f=i()(r.a.mark(function e(t){var a;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=this,this.$refs[t].validate(function(e){e&&(a.customDialog=!1,a.$emit("hideMapDialog",{address:a.address,longitude:a.lng,latitude:a.lat}),a.$nextTick(function(){a.address="",a.ruleForm.address=""}))});case 2:case"end":return e.stop()}},e,this)})),function(e){return f.apply(this,arguments)}),300),handleClose:function(e){e(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){var e=this;e.customDialog=!1,e.$emit("hideMapDialog"),e.$nextTick(function(){e.address="",e.ruleForm.address=""})}},watch:{mapShow:function(e,t){this.customDialog=e}},mounted:function(){this.customDialog=this.mapShow}},h={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"show",rawName:"v-show",value:e.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:"考勤地点",visible:e.customDialog,width:"600px","before-close":e.handleClose},on:{"update:visible":function(t){e.customDialog=t}}},[a("div",{staticClass:"edit-dialog-body"},[a("div",{staticClass:"amap-page-container"},[a("el-amap",{staticClass:"amap-demo",attrs:{vid:"amapDemo",center:e.center,zoom:e.zoom,plugin:e.plugin,events:e.events}}),e._v(" "),a("div",{staticClass:"toolbar m-t-20"},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"详细地址:",prop:"address"}},[a("el-input",{model:{value:e.ruleForm.address,callback:function(t){e.$set(e.ruleForm,"address",t)},expression:"ruleForm.address"}})],1)],1)],1)],1)]),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){return t.stopPropagation(),e.customCancel(t)}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){t.stopPropagation(),e.customConfirm("ruleForm")}}},[e._v("确定")])],1)])],1)},staticRenderFns:[]};var _=a("VU/8")(v,h,!1,function(e){a("t8uh")},"data-v-22cc68a3",null).exports,D=a("Ke24"),y=a("l46T"),S=a("Ie7z"),b=a("c4uw"),w=a("Kkt8"),k={name:"workGroupSet",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},data:function(){return{projectName:"haoban-manage-web",topMenuData:[{id:"1",name:"考勤组管理",path:"/workSet?appIcon="+this.$route.query.appIcon},{id:"2",name:this.$route.query.attenceGroupId?"编辑考勤组":"新建考勤组",path:""}],classifyOptions:[],activeId:"2",activeBrand:this.brandId,activeGroup:this.activeGroupId,enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,userId:JSON.parse(localStorage.getItem("userInfo")).userId,ruleFormData:{attenceGroupId:"",attenceType:1,attenceRangeType:!1,attenceRangeStoreType:!1,adminList:[],storeList:[],noAttenceRangeType:!1,noAttenceRangeStoreType:!1,noAdminList:[],noStoreList:[],lawFreeFlag:!1,clockDistance:300,storeClockFlag:!1,gpsFlag:!1,distanceAddress:[],attenceRangeJson:[],sperialRangeJson:[{attenceDate:"",sperialType:""}],mustJson:[],noMustJson:[],attenceWorkJson:[{weekDay:"周一",workType:!1,classesName:"",classesId:"",classessTimesJson:""},{weekDay:"周二",workType:!1,classesName:"",classesId:"",classessTimesJson:""},{weekDay:"周三",workType:!1,classesName:"",classesId:"",classessTimesJson:""},{weekDay:"周四",workType:!1,classesName:"",classesId:"",classessTimesJson:""},{weekDay:"周五",workType:!1,classesName:"",classesId:"",classessTimesJson:""},{weekDay:"周六",workType:!1,classesName:"",classesId:"",classessTimesJson:""},{weekDay:"周日",workType:!1,classesName:"",classesId:"",classessTimesJson:""}],attenceClassesRangeJSON:[],classesJson:[]},rules:{attenceGroupName:[{required:!0,message:"请输入考勤组名称",trigger:"blur"}],content:[{required:!0,message:"请输入公告内容",trigger:"blur"}],sendType:[{required:!0,message:"请选择发送方式",trigger:"change"}]},wxFlag:1,actionUrl:"/haoban-manage-web/upload-img",datePickerBool:!1,dateValue:"",selectType:"",treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1,openNextBool:!0},defaultSelection:[],changed:"",onlyPerson:!1,appScene:2,defaultStoreList:[],storeTreeSet:{isSelectPerson:!0,dialogVisible:!1,isSingle:!1},defaultStoreBool:!1,saveDataBool:!0,showEffect:!1,workClassShow:!1,modIndex:"",modRow:{},showClassesFlag:!1,multipleSelection:[],distance:[{value:"50",label:"50米"}],mapShow:!1,rangeShow:!1}},methods:{editRange:function(e,t){this.rangeShow=!0},addMap:function(){this.mapShow=!0},hideMapDialog:function(e){if(console.log(e),this.mapShow=!1,!e)return!1;this.ruleFormData.distanceAddress.push({address:e.address,longitude:e.longitude,latitude:e.latitude})},delGps:function(e,t){this.ruleFormData.distanceAddress.splice(e,1)},showClasses:function(){this.workClassShow=!0},modClasses:function(e,t){console.log(t),this.modIndex=e,this.modRow=t,this.classesId=t.classesId||"",this.workClassShow=!0},hideClassDialog:function(e){if(this.workClassShow=!1,this.classesId="",!e)return!1;this.modRow.workType=!0;var t=JSON.parse(l()(e));this.modRow.classesName=t.classesName,this.modRow.classesId=t.classesId,this.modRow.classessTimesJson=t.classessTimesJson},handleSelectionChange:function(e){console.log(e),this.multipleSelection=e},selectBrandId:function(e,t){this.brandId=e},cancelSend:function(){var e=this;if(e.$route.query.attenceGroupId)return e.$router.go(-1),!1;e.$confirm("是否确认返回,返回后当前页面内容将丢失","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$router.go(-1)}).catch(function(){})},showDialogLayer:function(e,t){return!this.$route.query.attenceGroupId&&(this.selectType=e,this.changed=e,"store"===e?(this.defaultStoreList=t,void(this.storeTreeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0,openNextBool:!0})):(this.treeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0,openNextBool:!0},void(this.defaultSelection=t)))},handleSelectedList:function(e){"store"===this.selectType?(this.ruleFormData.storeStructor=e,this.defaultStoreList=e):(this.ruleFormData.adminStructor=e,this.defaultSelection=e),this.ruleFormData.sendArea=e},delDepart:function(e,t,a){if(this.$route.query.attenceGroupId)return!1;t.splice(e,1)},changeMyDate:function(){this.dateValue?this.saveDataBool=!0:this.datePickerBool=!0},changeSendType:function(e){"0"==e&&(this.saveDataBool=!0)},sendData:Object(d.a)(function(e){var t=this;t.ruleFormData.adminCheck||t.ruleFormData.storeCheck||(t.defaultStoreBool=!0,t.saveDataBool=!1),t.ruleFormData.adminCheck&&!t.ruleFormData.adminStructor.length&&(t.defaultStoreBool=!0,t.saveDataBool=!1),t.ruleFormData.storeCheck&&!t.ruleFormData.storeStructor.length&&(t.defaultStoreBool=!0,t.saveDataBool=!1),"1"!=t.ruleFormData.sendType||t.dateValue||(t.datePickerBool=!0,t.saveDataBool=!1),""!=t.$refs.tinymceWrap.tinymceHtml&&(t.ruleFormData.content=t.$refs.tinymceWrap.tinymceHtml);var a=[];t.ruleFormData.adminCheck&&t.ruleFormData.adminStructor.length&&(a=t.ruleFormData.adminStructor.map(function(e){return{id:e.id,name:e.name||e.label,type:e.type}}));var s=[];t.ruleFormData.storeCheck&&t.ruleFormData.storeStructor.length&&(s=t.ruleFormData.storeStructor.map(function(e){return{id:e.id,name:e.name||e.label,type:e.type}})),t.$refs[e].validate(function(e){if(!e)return!1;var o={adminCheck:t.ruleFormData.adminCheck?1:0,storeCheck:t.ruleFormData.storeCheck?1:0,adminStructor:l()(a),storeStructor:l()(s),receiveType:t.ruleFormData.receiveType,labelId:t.ruleFormData.labelId||"",title:t.ruleFormData.title,imgUrl:t.ruleFormData.imgUrl,content:t.ruleFormData.content,sendType:t.ruleFormData.sendType,sendTime:t.dateValue,brandId:t.brandId,userId:t.userId,enterpriseId:t.enterpriseId,pageTop:t.ruleFormData.pageTop?1:0,newSeeFlag:t.ruleFormData.newSeeFlag?1:0,watermarkFlag:t.ruleFormData.watermarkFlag?1:0};t.saveDataBool&&Object(c.e)("/haoban-app-attence-web/attence-add",o).then(function(e){var a=e.data;1==a.errorCode?(t.$message.success("编辑成功"),t.$router.go(-1)):t.$message.error(a.message)})})},500),getClassifyData:function(){var e=this,t={enterpriseId:e.enterpriseId};Object(c.a)("/haoban-app-attence-web/attence-classes-list",t).then(function(t){var a=t.data;1==a.errorCode&&(a.result.list&&a.result.list.length&&a.result.list.forEach(function(e){e.classessTimesJson&&(e.classessTimesJson=JSON.parse(e.classessTimesJson))}),e.classifyList=a.result.list||[])}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getGroupData:function(){var e=this,t={attenceGroupId:e.$route.query.attenceGroupId};Object(c.a)("/haoban-app-attence-web/attence-detail",t).then(function(t){var a=t.data;1==a.errorCode&&(a.result.adminCheck=0!=a.result.adminCheck,a.result.storeCheck=0!=a.result.storeCheck,a.result.adminStructor=a.result.adminStructor?JSON.parse(a.result.adminStructor):[],a.result.storeStructor=a.result.storeStructor?JSON.parse(a.result.storeStructor):[],e.defaultSelection=a.result.adminStructor,e.defaultStoreList=a.result.storeStructor,a.result.pageTop=!!a.result.pageTop,a.result.newSeeFlag=!!a.result.newSeeFlag,a.result.watermarkFlag=!!a.result.watermarkFlag,a.result.sendType=String(a.result.sendType),a.result.receiveType=String(a.result.receiveType),e.dateValue=Object(d.c)(a.result.sendTime),e.noticePreviewData=JSON.parse(l()(a.result)),e.ruleFormData=JSON.parse(l()(a.result)))}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},setDistance:function(){for(var e=1;e<11;e++)this.distance.push({value:100*e,label:100*e+"米"});this.distance.push({value:2e3,label:"2000米"})}},watch:{brandId:function(e,t){e&&(this.activeBrand=e,this.getClassifyData())},activeGroupId:function(e,t){e&&(this.activeGroup=e)}},components:{commonDetailTop:D.a,limitInput:y.a,limitTextarea:w.a,vueSelectStore:S.a,vueSelectEmployee:b.a,classSelect:g,mapSelect:_},mounted:function(){var e=this;e.setDistance(),e.$route.query.attenceGroupId&&e.$nextTick(function(){e.getNoticeData()})}},C={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"notice-list-wrap"},[a("div",{staticClass:"notice-list"},[a("common-detail-top",{attrs:{topMenuData:e.topMenuData,activeId:e.activeId}}),e._v(" "),a("el-form",{ref:"noteForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleFormData,rules:e.rules,"label-width":"120px"}},[a("el-form-item",{staticClass:"input-item",attrs:{label:"考勤组名称:",prop:"attenceGroupName"}},[a("limitInput",{attrs:{disflag:!!e.$route.query.attenceGroupId,inputWidth:286,inputValue:e.ruleFormData.attenceGroupName,holder:"请输入考勤组名称",getByType:"word",maxLength:15},on:{"update:inputValue":function(t){e.$set(e.ruleFormData,"attenceGroupName",t)}}})],1),e._v(" "),a("el-form-item",{staticClass:"input-item",attrs:{label:"参与考勤人员:",prop:""}},[a("div",{staticClass:"flex"},[a("el-checkbox",{attrs:{disabled:!!e.$route.query.attenceGroupId},model:{value:e.ruleFormData.attenceRangeType,callback:function(t){e.$set(e.ruleFormData,"attenceRangeType",t)},expression:"ruleFormData.attenceRangeType"}},[e._v("行政架构")]),e._v(" "),e.ruleFormData.attenceRangeType?a("div",{staticClass:"flex-column item-cell-select inline-block m-l-10"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"470px"},on:{click:function(t){e.showDialogLayer("depart",e.ruleFormData.adminList)}}},[e.ruleFormData.adminList.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[e._v("请选择行政架构")]),e._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[e._l(e.ruleFormData.adminList,function(t,s){return[a("span",{key:s,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(s,e.ruleFormData.adminList,"depart")}}})])]})],2)])])])]):e._e()],1),e._v(" "),a("div",{staticClass:"flex m-t-20"},[a("el-checkbox",{attrs:{disabled:!!e.$route.query.attenceGroupId},model:{value:e.ruleFormData.attenceRangeStoreType,callback:function(t){e.$set(e.ruleFormData,"attenceRangeStoreType",t)},expression:"ruleFormData.attenceRangeStoreType"}},[e._v("门店架构")]),e._v(" "),e.ruleFormData.attenceRangeStoreType?a("div",{staticClass:"flex-column item-cell-select inline-block m-l-10"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"330px"},on:{click:function(t){e.showDialogLayer("store",e.ruleFormData.storeList)}}},[e.ruleFormData.storeList.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[e._v("请选择门店架构")]),e._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[e._l(e.ruleFormData.storeList,function(t,s){return[a("span",{key:s,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(s,e.ruleFormData.storeList,"store")}}})])]})],2)])])])]):e._e()],1)]),e._v(" "),a("el-form-item",{staticClass:"input-item",attrs:{label:"考勤白名单:",prop:""}},[a("div",{staticClass:"flex"},[a("el-checkbox",{attrs:{disabled:!!e.$route.query.attenceGroupId},model:{value:e.ruleFormData.noAttenceRangeType,callback:function(t){e.$set(e.ruleFormData,"noAttenceRangeType",t)},expression:"ruleFormData.noAttenceRangeType"}},[e._v("行政架构")]),e._v(" "),e.ruleFormData.noAttenceRangeType?a("div",{staticClass:"flex-column item-cell-select inline-block m-l-10"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"470px"},on:{click:function(t){e.showDialogLayer("depart",e.ruleFormData.noAdminList)}}},[e.ruleFormData.noAdminList.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[e._v("请选择行政架构")]),e._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[e._l(e.ruleFormData.noAdminList,function(t,s){return[a("span",{key:s,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(s,e.ruleFormData.noAdminList,"depart")}}})])]})],2)])])])]):e._e()],1),e._v(" "),a("div",{staticClass:"flex m-t-20"},[a("el-checkbox",{attrs:{disabled:!!e.$route.query.attenceGroupId},model:{value:e.ruleFormData.noAttenceRangeStoreType,callback:function(t){e.$set(e.ruleFormData,"noAttenceRangeStoreType",t)},expression:"ruleFormData.noAttenceRangeStoreType"}},[e._v("门店架构")]),e._v(" "),e.ruleFormData.noAttenceRangeStoreType?a("div",{staticClass:"flex-column item-cell-select inline-block m-l-10"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"330px"},on:{click:function(t){e.showDialogLayer("store",e.ruleFormData.noStoreList)}}},[e.ruleFormData.noStoreList.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[e._v("请选择门店架构")]),e._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[e._l(e.ruleFormData.noStoreList,function(t,s){return[a("span",{key:s,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(s,e.ruleFormData.noStoreList,"store")}}})])]})],2)])])])]):e._e()],1)]),e._v(" "),a("el-form-item",{attrs:{label:"考勤类型:",prop:""}},[a("div",{staticClass:"work-type m-b-8"},[a("el-radio",{attrs:{label:1},model:{value:e.ruleFormData.attenceType,callback:function(t){e.$set(e.ruleFormData,"attenceType",t)},expression:"ruleFormData.attenceType"}},[e._v("固定时间上下班【所有人按照相同时间打卡】")]),e._v(" "),a("div",{staticClass:"line-h-15 font-14 color-909399"},[e._v("适用于:办公室等")])],1),e._v(" "),a("div",{staticClass:"work-type m-b-8"},[a("el-radio",{attrs:{label:2},model:{value:e.ruleFormData.attenceType,callback:function(t){e.$set(e.ruleFormData,"attenceType",t)},expression:"ruleFormData.attenceType"}},[e._v("排班时间上下班【不同人员根据各自排班打卡】")]),e._v(" "),a("div",{staticClass:"line-h-15 font-14 color-909399"},[e._v("适用于:工厂、门店等")])],1)]),e._v(" "),1==e.ruleFormData.attenceType?a("el-form-item",{attrs:{label:"工作日设置:",prop:""}},[a("div",{staticClass:"quick-set-table"},[a("el-table",{ref:"multipleTable",staticStyle:{width:"567px"},attrs:{data:e.ruleFormData.attenceWorkJson,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{width:"55"},scopedSlots:e._u([{key:"default",fn:function(e){}}])}),e._v(" "),a("el-table-column",{attrs:{label:"工作日",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.weekDay))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"排班时间段",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.workType?a("div",e._l(t.row.classessTimesJson,function(t,s){return a("div",{key:s+"time"},[e._v(e._s(t.startTime)+"-"+e._s(t.endTime))])})):a("div",[e._v("休息")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"address",label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){a.stopPropagation(),e.modClasses(t.$index,t.row)}}},[e._v("更改班次")])]}}])})],1)],1),e._v(" "),a("div",[a("el-checkbox",{model:{value:e.ruleFormData.lawFreeFlag,callback:function(t){e.$set(e.ruleFormData,"lawFreeFlag",t)},expression:"ruleFormData.lawFreeFlag"}},[e._v("法定节假日自动排休")])],1)]):e._e(),e._v(" "),2==e.ruleFormData.attenceType?a("el-form-item",{attrs:{label:"考勤班次:",prop:""}},[a("div",{staticClass:"tags-classes"},[a("div",{staticClass:"new-tag-schedule"},[a("div",{staticClass:"attend-type-classes"},[a("div",{staticClass:"attend-type-classes-display",attrs:{"data-spm-anchor-id":"0.0.0.i25.23964ce3NvNZUj"}},e._l(e.ruleFormData.classesJson,function(t,s){return a("div",{key:s,staticClass:"ant-tag ant-tag-blue"},[a("span",{staticClass:"ant-tag-text"},[e._v(e._s(t.classesName))]),e._v(" "),e._l(t.classessTimesJson,function(t,s){return a("span",{key:s+"time"},[e._v(e._s(t.startTime)+"-"+e._s(t.endTime))])})],2)}))])])])]):e._e(),e._v(" "),2==e.ruleFormData.attenceType?a("el-form-item",{attrs:{label:"排班周期:",prop:""}},[a("el-table",{staticStyle:{width:"567px"},attrs:{data:e.ruleFormData.attenceClassesRangeJSON,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"ranageName",label:"周期名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.ranageName))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"周期班次"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.classessTimesJson,function(t,s){return a("div",{key:s+"time"},[e._v(e._s(t.startTime)+"-"+e._s(t.endTime))])})}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"ranageName",label:"周期天数"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.ranageName))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"address",label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.editRange(t.$index,t.row)}}},[e._v("编辑")])]}}])})],1)],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"考勤方式:",prop:""}},[a("div",[a("el-checkbox",{model:{value:e.ruleFormData.gpsFlag,callback:function(t){e.$set(e.ruleFormData,"gpsFlag",t)},expression:"ruleFormData.gpsFlag"}},[e._v("GPS打卡")])],1),e._v(" "),a("div",{staticClass:"gps-body p-20 bg-f7f8fa",staticStyle:{width:"567px"}},[a("div",[e._v("根据工作地点考勤(可添加多个考勤地点)")]),e._v(" "),a("div",[a("el-button",{attrs:{type:"primary",plain:""},on:{click:e.addMap}},[e._v("添加考勤地点")]),e._v(" "),a("span",[e._v("有效范围")]),e._v(" "),a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.ruleFormData.clockDistance,callback:function(t){e.$set(e.ruleFormData,"clockDistance",t)},expression:"ruleFormData.clockDistance"}},e._l(e.distance,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1),e._v(" "),e.ruleFormData.distanceAddress.length?a("div",{staticClass:"m-t-20"},[a("el-table",{staticStyle:{width:"567px"},attrs:{data:e.ruleFormData.distanceAddress,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"name",label:"考勤地址"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.address))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"address",label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.delGps(t.$index,t.row)}}},[e._v("删除")])]}}])})],1)],1):e._e(),e._v(" "),a("div",[a("el-checkbox",{model:{value:e.ruleFormData.storeClockFlag,callback:function(t){e.$set(e.ruleFormData,"storeClockFlag",t)},expression:"ruleFormData.storeClockFlag"}},[e._v("根据门店地址经纬度自动配置")]),e._v(" "),a("p",{staticClass:"font-14 color-909399"},[e._v("如门店经纬度有误,请在通讯录修改门店相关信息,未设置门店打卡无须选择此项")])],1)])]),e._v(" "),a("el-form-item",[a("div",{staticClass:"btn-wrap"},[a("el-button",{attrs:{plain:""},on:{click:e.cancelSend}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{disabled:!!e.$route.query.attenceGroupId,type:"primary"},on:{click:function(t){e.showEffect=!0}}},[e._v("保存")])],1)])],1)],1),e._v(" "),a("vue-select-employee",{attrs:{appScene:e.appScene,defaultSelection:e.defaultSelection,onlyPerson:e.onlyPerson,treeSet:e.treeSet,changed:e.changed},on:{handleSelectedList:e.handleSelectedList}}),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{currentBrand:e.activeGroup,appScene:e.appScene,treeSet:e.storeTreeSet,selectType:"group-store",defaultList:e.defaultStoreList},on:{handleSelectedList:e.handleSelectedList}}),e._v(" "),a("el-dialog",{attrs:{title:"选择规则生效时间",visible:e.showEffect,width:"420px","before-close":e.handleClose},on:{"update:visible":function(t){e.showEffect=t}}},[a("span",[e._v("立即生效:今日考勤结果将按新规则重算")]),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.sendData("noteForm")}}},[e._v("明天生效")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.sendData("noteForm")}}},[e._v("立即生效")])],1)]),e._v(" "),a("class-select",{attrs:{workClassShow:e.workClassShow,classesId:e.classesId},on:{hideClassDialog:e.hideClassDialog}}),e._v(" "),a("map-select",{attrs:{mapShow:e.mapShow},on:{hideMapDialog:e.hideMapDialog}})],1)},staticRenderFns:[]};var F=a("VU/8")(k,C,!1,function(e){a("Ps+u")},"data-v-2d5b1a83",null);t.default=F.exports},t8uh:function(e,t){}});
\ No newline at end of file
webpackJsonp([23],{"738z":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i("3Xzz"),s=i("elmV"),n=i("P9l9"),l=i("O3H5"),o={name:"employee-io",components:{navCrumb:a.a,uploadExcelComponent:s.a,exportSet:l.a},data:function(){var t=window.location.origin;return-1!=t.indexOf("localhost")&&(t="http://www.gicdev.com"),{navpath:[{name:"首页",path:"/index"},{name:"通讯录",path:"/administrativeFrame"},{name:"员工档案",path:"/fileSet"},{name:"在职员工",path:"/employeeRecord"},{name:"导入员工档案",path:""}],windowH:window.screen.availHeight-180+"px",host:window.location.origin,type:"import",fileList:[],url:t+"/haoban-manage-web/record/record-template-file-upload",logList:[],loading:!0,pageSize:20,currentPage:1,total:0,tempList:[],dialogVisible:!1}},methods:{handleSizeChange:function(t){this.pageSize=t,this.getErrorNote()},handleCurrentChange:function(t){this.currentPage=t,this.getErrorNote()},resetList:function(t){this.fileList=[],"note"==t&&this.getErrorNote()},getErrorNote:function(){var t=this,e={departmentId:t.$route.query.departmentId,importCode:t.$route.query.importCode,pageNum:t.currentPage,pageSize:t.pageSize};Object(n.a)("/haoban-manage-web/record/find-error-log",e).then(function(e){1==e.data.errorCode?(t.total=e.data.result.totalCount,t.logList=e.data.result.result,t.formatData(e.data.result.template,e.data.result.page.result)):t.$message.error({message:e.data.message})}).catch(function(e){t.$message.error({message:e.message})})},formatData:function(t,e){var i=[];t.forEach(function(t){i.push({fieldCode:t.fieldCode,fieldName:t.fieldName})}),this.tempList=i,this.logList=e,this.loading=!1},beforeAvatarUpload:function(t){var e=t.name.lastIndexOf(".");if(e<0)return this.$message.error("文件格式不正确!"),!1;var i=t.name.substring(e+1,t.name.length),a=i.includes("xls")||i.includes("xlsx");return a||this.$message.error("文件格式必须为 xls 或 xlsx 格式!"),a},uploadSuccess:function(t,e){var i=this;1==t.errorCode?(i.fileList=[],i.$forceUpdate(),i.$message({message:t.message,type:"success"}),i.$nextTick(function(){i.fileList=[]})):i.$message.error(t.message)},submitUpload:function(t){this.$refs[t].submit()},handleRemove:function(t,e){this.fileList=[]},getChange:function(t,e){var i=e.length-1<0?0:e.length-1,a=t.name.lastIndexOf("."),s=t.name.substring(a+1,t.name.length);if(!(s.includes("xls")||s.includes("xlsx")))return this.$message.error("文件格式必须为 xls 或 xlsx 格式!"),this.fileList.splice(i,1),!1;this.fileList=[e[i]]},callExport:function(){this.dialogVisible=!0},cancelCho:function(){this.dialogVisible=!1}},beforeMount:function(){"note"==this.type&&this.getErrorNote(),this.$nextTick(function(){document.querySelector(".contact-wrap__body").style.overflow="hidden"})},beforeDestroy:function(){document.querySelector(".contact-wrap__body").style.overflow="auto"}},r={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"common-set-wrap record-io-wrap",style:{height:t.windowH}},[i("nav-crumb",{attrs:{navpath:t.navpath}}),t._v(" "),i("div",{staticClass:"right-content"},[i("div",{staticClass:"right-box"},[i("div",{staticClass:"io-container"},[t.dialogVisible?[i("export-set",{on:{cancelCho:t.cancelCho}})]:[t._m(0),t._v(" "),i("el-radio-group",{staticClass:"m-t-20",on:{change:t.resetList},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[i("el-radio-button",{attrs:{label:"import"}},[t._v("导入员工档案")]),t._v(" "),i("el-radio-button",{attrs:{label:"note"}},[t._v("错误记录")])],1),t._v(" "),"import"==t.type?i("div",{staticClass:"handle-area import"},[i("div",{staticClass:"step-div",staticStyle:{"margin-bottom":"90px","line-height":"32px"}},[i("span",{staticClass:"ft-large"},[t._v("①")]),t._v("下载模板\n "),i("a",{staticClass:"d-u-btn",attrs:{href:t.host+"/haoban-manage-web/record/export-record-template.json"}},[i("el-button",{attrs:{type:"primary"}},[t._v("下载"),i("i",{staticClass:"iconfont icon-icon_yunxiazai m-l-5"})])],1)]),t._v(" "),i("div",{staticClass:"step-div"},[i("span",{staticClass:"ft-large"},[t._v("②")]),t._v("上传员工档案\n "),i("div",{staticClass:"d-u-btn"},[i("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:t.url,multiple:!1,"file-list":t.fileList,"auto-upload":!1,"before-upload":t.beforeAvatarUpload,"on-success":t.uploadSuccess,"on-change":t.getChange,"on-remove":t.handleRemove}},[i("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),t._v(" "),i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("文件格式必须为xls或xlsx格式")])],1)],1)]),t._v(" "),i("div",{staticClass:"up-btn-div"},[i("el-button",{attrs:{type:"primary",disabled:0==t.fileList.length},on:{click:function(e){t.submitUpload("upload")}}},[t._v("上传")])],1)]):"export"==t.type?i("div",{staticClass:"handle-area import"},[i("div",{staticClass:"step-div",staticStyle:{"margin-bottom":"90px","line-height":"32px"}},[i("span",{staticClass:"ft-large"},[t._v("①")]),t._v("导出员工档案\n "),i("a",{staticClass:"d-u-btn"},[i("el-button",{attrs:{type:"primary"},on:{click:t.callExport}},[t._v("下载"),i("i",{staticClass:"iconfont icon-icon_yunxiazai m-l-5"})])],1)]),t._v(" "),i("div",{staticClass:"step-div"},[i("span",{staticClass:"ft-large"},[t._v("②")]),t._v("上传更新后的员工档案\n "),i("div",{staticClass:"d-u-btn"},[i("el-upload",{ref:"uploadEdit",staticClass:"upload-demo",attrs:{action:t.url,multiple:!1,"file-list":t.fileList,"auto-upload":!1,"on-success":t.uploadSuccess,"on-change":t.getChange}},[i("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),t._v(" "),i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("文件格式必须为xls或xlsx格式")])],1)],1)]),t._v(" "),i("div",{staticClass:"up-btn-div"},[i("el-button",{attrs:{type:"primary",disabled:0==t.fileList.length},on:{click:function(e){t.submitUpload("uploadEdit")}}},[t._v("上传")])],1)]):i("div",{staticClass:"error-log import"},[i("div",{staticClass:"title-area"},[t._m(1),t._v(" "),i("a",{attrs:{href:t.host+"/haoban-manage-web/record/error-log-export?importCode="+t.$route.query.importCode}},[i("el-button",{attrs:{type:"primary"}},[t._v("导出错误记录")])],1)]),t._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"m-t-20",staticStyle:{width:"100%"},attrs:{data:t.logList,height:"400"}},[i("el-table-column",{attrs:{type:"index",width:"50",label:"序号"}}),t._v(" "),i("el-table-column",{attrs:{width:"200",prop:"fieldValue",label:"字段值"}}),t._v(" "),i("el-table-column",{attrs:{width:"200",prop:"fieldName",label:"字段名"}}),t._v(" "),i("el-table-column",{attrs:{width:"200",prop:"failReason",label:"错误原因"}}),t._v(" "),t._l(t.tempList,function(t){return[i("el-table-column",{key:t.fieldCode,attrs:{width:"200",label:t.fieldName,prop:t.fieldCode}})]})],2),t._v(" "),t.logList.length?i("el-pagination",{staticClass:"pagination",attrs:{background:"","page-sizes":[20,40,60,80],"page-size":t.pageSize,"current-page":t.currentPage,layout:"total, sizes, prev, pager, next",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}}):t._e()],1)]],2)])]),t._v(" "),i("vue-gic-footer")],1)},staticRenderFns:[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{staticClass:"tip-area"},[i("li",{staticClass:"tip"},[t._v("\n 姓名必须和好办企业通讯录中的员工姓名保持一致,手机号必须为员工注册好办的手机号\n ")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("\n 员工档案导入时,直接以手机号去做匹配,通讯录中不存在的将无法导入(模板中配置的部门、职位、code,这些字段信息请保持与企业通讯录中一致,这几个字段的信息将不会修改通讯录的信息,直接取该成员对应的通讯录的字段信息)\n ")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("如果想要新增字段,可在后台档案设置中增加,再导入模板")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("字段类型为图片上传、多选的字段无法导入、导出")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("确保导入的表头字段和后台配置表头字段的名称一致(模板下载时间不可修改)")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("\n 由于数据量可能较大,每次最多导入2000条员工档案,若超过只取前2000条,可以分多次导入\n ")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"tip"},[this._v("导入总条数:0条,成功导入0条,"),e("span",{staticClass:"red"},[this._v("错误导入0条")])])}]};var c=i("VU/8")(o,r,!1,function(t){i("zcLw")},null,null);e.default=c.exports},O3H5:function(t,e,i){"use strict";var a=i("mvHQ"),s=i.n(a),n=i("P9l9"),l=i("DAYN"),o={name:"export-set",components:{draggable:i.n(l).a},data:function(){return{tempList:[],checkList:[],origin:[],checkAll:!1,isIndeterminate:!1,checkedList:[]}},methods:{deleteField:function(t){this.checkedList.splice(t,1);var e=this.checkedList.map(function(t){return t.fieldCode});this.origin.forEach(function(t,i){e.includes(t.fieldCode)?t.checked=!0:t.checked=!1}),this.checkHalf()},checkHalf:function(){if(0===this.checkedList.length)return this.isIndeterminate=!1,!1;this.checkedList.length===this.origin.length?this.isIndeterminate=!1:this.isIndeterminate=!0},checkThis:function(t){var e=this;t.checked?e.checkedList.push(t):e.checkedList.forEach(function(i,a){i.fieldCode===t.fieldCode&&e.checkedList.splice(a,1)}),e.checkHalf()},handleCheckAllChange:function(t){this.checkedList=[],this.origin.forEach(function(e,i){e.checked=t,t&&(e.order=i+1)}),t&&(this.checkedList=this.origin.slice(0)),this.checkHalf()},getTemplate:function(){var t=this;Object(n.a)("/haoban-manage-web/record/employee-find-template",{}).then(function(e){1==e.data.errorCode?t.formatTemplateList(e.data.result):t.$message.error({message:e.data.message})}).catch(function(e){t.$message.error({message:e.message})})},formatTemplateList:function(t){var e=[],i=[],a=t;t.forEach(function(t){t.title=t.fieldName,t.name=t.fieldName,t.checked=!1;var i=[];a.forEach(function(e){e.parentCode==t.fieldCode&&i.push(e)}),i.sort(function(t,e){return 1*t.sort-1*e.sort}),i.length>0&&(t.childrens=i),0==t.parentCode&&e.push(t)}),e.sort(function(t,e){return 1*t.sort-1*e.sort}),e.forEach(function(t){i=i.concat(t.childrens)}),this.origin=i,this.tempList=e},cancelCho:function(){this.origin.forEach(function(t){t.checked=!1}),this.$emit("cancelCho")},exportCho:function(){var t=[];this.checkedList.forEach(function(e){e.checked&&t.push({fieldCode:e.fieldCode,fieldName:e.fieldName})});s()(t);var e=window.location.origin;-1!=e.indexOf("localhost")&&(e="http://www.gicdev.com"),location.href=e+"/haoban-manage-web/record/define-export?exportTitleContent="+s()(t),this.$emit("cancelCho")}},beforeMount:function(){this.getTemplate()}},r={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"export-set-container"},[t._m(0),t._v(" "),i("div",{staticClass:"cho-list"},[i("draggable",{model:{value:t.checkedList,callback:function(e){t.checkedList=e},expression:"checkedList"}},[t._l(t.checkedList,function(e,a){return[e.checked?i("div",{key:e.fieldCode+a,staticClass:"cho"},[t._v(t._s(e.fieldName)+" "),i("i",{staticClass:"el-icon-circle-close",on:{click:function(e){t.deleteField(a)}}})]):t._e()]})],2)],1),t._v(" "),i("div",{staticClass:"cho-area"},[i("div",{staticClass:"title"},[t._v("选择需要导出的字段")]),t._v(" "),i("div",{staticClass:"cho-area-group"},[i("div",{staticClass:"group-div"},[i("div",{staticClass:"group-title"}),t._v(" "),i("ul",{staticClass:"group-son-list"},[i("el-checkbox",{attrs:{indeterminate:t.isIndeterminate},on:{change:t.handleCheckAllChange},model:{value:t.checkAll,callback:function(e){t.checkAll=e},expression:"checkAll"}},[t._v("全选")])],1)]),t._v(" "),t._l(t.tempList,function(e,a){return i("div",{key:e.fieldCode+a,staticClass:"group-div"},[i("div",{staticClass:"group-title"},[t._v(t._s(e.title))]),t._v(" "),i("ul",{staticClass:"group-son-list"},[t._l(t.origin,function(a){return[a.parentCode==e.fieldCode?i("li",{key:a.fieldCode},[i("el-checkbox",{key:a.fieldCode,attrs:{label:a.fieldName},on:{change:function(e){t.checkThis(a)}},model:{value:a.checked,callback:function(e){t.$set(a,"checked",e)},expression:"items.checked"}},[t._v(t._s(a.fieldName))])],1):t._e()]})],2)])})],2)]),t._v(" "),i("div",{staticClass:"handle-cho-btn"},[i("el-button",{staticClass:"export-btn",attrs:{type:"primary",disabled:t.checkedList.length<1},on:{click:t.exportCho}},[i("i",{staticClass:"iconfont icon-icon_yunxiazai p-r-6"}),t._v("导出")]),t._v(" "),i("el-button",{on:{click:t.cancelCho}},[t._v("取消")])],1)])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"title"},[this._v("已选择字段"),e("span",[this._v("导出的列表中将按顺序显示这些字段(可拖拽排序)")])])}]};var c=i("VU/8")(o,r,!1,function(t){i("fI5Z")},null,null);e.a=c.exports},fI5Z:function(t,e){},zcLw:function(t,e){}});
\ No newline at end of file
webpackJsonp([25],{"738z":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i("3Xzz"),s=i("elmV"),n=i("P9l9"),l=i("O3H5"),o={name:"employee-io",components:{navCrumb:a.a,uploadExcelComponent:s.a,exportSet:l.a},data:function(){var t=window.location.origin;return-1!=t.indexOf("localhost")&&(t="http://www.gicdev.com"),{navpath:[{name:"首页",path:"/index"},{name:"通讯录",path:"/administrativeFrame"},{name:"员工档案",path:"/fileSet"},{name:"在职员工",path:"/employeeRecord"},{name:"导入员工档案",path:""}],windowH:window.screen.availHeight-180+"px",host:window.location.origin,type:"import",fileList:[],url:t+"/haoban-manage-web/record/record-template-file-upload",logList:[],loading:!0,pageSize:20,currentPage:1,total:0,tempList:[],dialogVisible:!1}},methods:{handleSizeChange:function(t){this.pageSize=t,this.getErrorNote()},handleCurrentChange:function(t){this.currentPage=t,this.getErrorNote()},resetList:function(t){this.fileList=[],"note"==t&&this.getErrorNote()},getErrorNote:function(){var t=this,e={departmentId:t.$route.query.departmentId,importCode:t.$route.query.importCode,pageNum:t.currentPage,pageSize:t.pageSize};Object(n.a)("/haoban-manage-web/record/find-error-log",e).then(function(e){1==e.data.errorCode?(t.total=e.data.result.totalCount,t.logList=e.data.result.result,t.formatData(e.data.result.template,e.data.result.page.result)):t.$message.error({message:e.data.message})}).catch(function(e){t.$message.error({message:e.message})})},formatData:function(t,e){var i=[];t.forEach(function(t){i.push({fieldCode:t.fieldCode,fieldName:t.fieldName})}),this.tempList=i,this.logList=e,this.loading=!1},beforeAvatarUpload:function(t){var e=t.name.lastIndexOf(".");if(e<0)return this.$message.error("文件格式不正确!"),!1;var i=t.name.substring(e+1,t.name.length),a=i.includes("xls")||i.includes("xlsx");return a||this.$message.error("文件格式必须为 xls 或 xlsx 格式!"),a},uploadSuccess:function(t,e){var i=this;1==t.errorCode?(i.fileList=[],i.$forceUpdate(),i.$message({message:t.message,type:"success"}),i.$nextTick(function(){i.fileList=[]})):i.$message.error(t.message)},submitUpload:function(t){this.$refs[t].submit()},handleRemove:function(t,e){this.fileList=[]},getChange:function(t,e){var i=e.length-1<0?0:e.length-1,a=t.name.lastIndexOf("."),s=t.name.substring(a+1,t.name.length);if(!(s.includes("xls")||s.includes("xlsx")))return this.$message.error("文件格式必须为 xls 或 xlsx 格式!"),this.fileList.splice(i,1),!1;this.fileList=[e[i]]},callExport:function(){this.dialogVisible=!0},cancelCho:function(){this.dialogVisible=!1}},beforeMount:function(){"note"==this.type&&this.getErrorNote(),this.$nextTick(function(){document.querySelector(".contact-wrap__body").style.overflow="hidden"})},beforeDestroy:function(){document.querySelector(".contact-wrap__body").style.overflow="auto"}},r={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"common-set-wrap record-io-wrap",style:{height:t.windowH}},[i("nav-crumb",{attrs:{navpath:t.navpath}}),t._v(" "),i("div",{staticClass:"right-content"},[i("div",{staticClass:"right-box"},[i("div",{staticClass:"io-container"},[t.dialogVisible?[i("export-set",{on:{cancelCho:t.cancelCho}})]:[t._m(0),t._v(" "),i("el-radio-group",{staticClass:"m-t-20",on:{change:t.resetList},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[i("el-radio-button",{attrs:{label:"import"}},[t._v("导入员工档案")]),t._v(" "),i("el-radio-button",{attrs:{label:"note"}},[t._v("错误记录")])],1),t._v(" "),"import"==t.type?i("div",{staticClass:"handle-area import"},[i("div",{staticClass:"step-div",staticStyle:{"margin-bottom":"90px","line-height":"32px"}},[i("span",{staticClass:"ft-large"},[t._v("①")]),t._v("下载模板\n "),i("a",{staticClass:"d-u-btn",attrs:{href:t.host+"/haoban-manage-web/record/export-record-template.json"}},[i("el-button",{attrs:{type:"primary"}},[t._v("下载"),i("i",{staticClass:"iconfont icon-icon_yunxiazai m-l-5"})])],1)]),t._v(" "),i("div",{staticClass:"step-div"},[i("span",{staticClass:"ft-large"},[t._v("②")]),t._v("上传员工档案\n "),i("div",{staticClass:"d-u-btn"},[i("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:t.url,multiple:!1,"file-list":t.fileList,"auto-upload":!1,"before-upload":t.beforeAvatarUpload,"on-success":t.uploadSuccess,"on-change":t.getChange,"on-remove":t.handleRemove}},[i("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),t._v(" "),i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("文件格式必须为xls或xlsx格式")])],1)],1)]),t._v(" "),i("div",{staticClass:"up-btn-div"},[i("el-button",{attrs:{type:"primary",disabled:0==t.fileList.length},on:{click:function(e){t.submitUpload("upload")}}},[t._v("上传")])],1)]):"export"==t.type?i("div",{staticClass:"handle-area import"},[i("div",{staticClass:"step-div",staticStyle:{"margin-bottom":"90px","line-height":"32px"}},[i("span",{staticClass:"ft-large"},[t._v("①")]),t._v("导出员工档案\n "),i("a",{staticClass:"d-u-btn"},[i("el-button",{attrs:{type:"primary"},on:{click:t.callExport}},[t._v("下载"),i("i",{staticClass:"iconfont icon-icon_yunxiazai m-l-5"})])],1)]),t._v(" "),i("div",{staticClass:"step-div"},[i("span",{staticClass:"ft-large"},[t._v("②")]),t._v("上传更新后的员工档案\n "),i("div",{staticClass:"d-u-btn"},[i("el-upload",{ref:"uploadEdit",staticClass:"upload-demo",attrs:{action:t.url,multiple:!1,"file-list":t.fileList,"auto-upload":!1,"on-success":t.uploadSuccess,"on-change":t.getChange}},[i("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),t._v(" "),i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("文件格式必须为xls或xlsx格式")])],1)],1)]),t._v(" "),i("div",{staticClass:"up-btn-div"},[i("el-button",{attrs:{type:"primary",disabled:0==t.fileList.length},on:{click:function(e){t.submitUpload("uploadEdit")}}},[t._v("上传")])],1)]):i("div",{staticClass:"error-log import"},[i("div",{staticClass:"title-area"},[t._m(1),t._v(" "),i("a",{attrs:{href:t.host+"/haoban-manage-web/record/error-log-export?importCode="+t.$route.query.importCode}},[i("el-button",{attrs:{type:"primary"}},[t._v("导出错误记录")])],1)]),t._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"m-t-20",staticStyle:{width:"100%"},attrs:{data:t.logList,height:"400"}},[i("el-table-column",{attrs:{type:"index",width:"50",label:"序号"}}),t._v(" "),i("el-table-column",{attrs:{width:"200",prop:"fieldValue",label:"字段值"}}),t._v(" "),i("el-table-column",{attrs:{width:"200",prop:"fieldName",label:"字段名"}}),t._v(" "),i("el-table-column",{attrs:{width:"200",prop:"failReason",label:"错误原因"}}),t._v(" "),t._l(t.tempList,function(t){return[i("el-table-column",{key:t.fieldCode,attrs:{width:"200",label:t.fieldName,prop:t.fieldCode}})]})],2),t._v(" "),t.logList.length?i("el-pagination",{staticClass:"pagination",attrs:{background:"","page-sizes":[20,40,60,80],"page-size":t.pageSize,"current-page":t.currentPage,layout:"total, sizes, prev, pager, next",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}}):t._e()],1)]],2)])]),t._v(" "),i("vue-gic-footer")],1)},staticRenderFns:[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{staticClass:"tip-area"},[i("li",{staticClass:"tip"},[t._v("\n 姓名必须和好办企业通讯录中的员工姓名保持一致,手机号必须为员工注册好办的手机号\n ")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("\n 员工档案导入时,直接以手机号去做匹配,通讯录中不存在的将无法导入(模板中配置的部门、职位、code,这些字段信息请保持与企业通讯录中一致,这几个字段的信息将不会修改通讯录的信息,直接取该成员对应的通讯录的字段信息)\n ")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("如果想要新增字段,可在后台档案设置中增加,再导入模板")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("字段类型为图片上传、多选的字段无法导入、导出")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("确保导入的表头字段和后台配置表头字段的名称一致(模板下载时间不可修改)")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("\n 由于数据量可能较大,每次最多导入2000条员工档案,若超过只取前2000条,可以分多次导入\n ")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"tip"},[this._v("导入总条数:0条,成功导入0条,"),e("span",{staticClass:"red"},[this._v("错误导入0条")])])}]};var c=i("VU/8")(o,r,!1,function(t){i("zcLw")},null,null);e.default=c.exports},O3H5:function(t,e,i){"use strict";var a=i("mvHQ"),s=i.n(a),n=i("P9l9"),l=i("DAYN"),o={name:"export-set",components:{draggable:i.n(l).a},data:function(){return{tempList:[],checkList:[],origin:[],checkAll:!1,isIndeterminate:!1,checkedList:[]}},methods:{deleteField:function(t){this.checkedList.splice(t,1);var e=this.checkedList.map(function(t){return t.fieldCode});this.origin.forEach(function(t,i){e.includes(t.fieldCode)?t.checked=!0:t.checked=!1}),this.checkHalf()},checkHalf:function(){if(0===this.checkedList.length)return this.isIndeterminate=!1,!1;this.checkedList.length===this.origin.length?this.isIndeterminate=!1:this.isIndeterminate=!0},checkThis:function(t){var e=this;t.checked?e.checkedList.push(t):e.checkedList.forEach(function(i,a){i.fieldCode===t.fieldCode&&e.checkedList.splice(a,1)}),e.checkHalf()},handleCheckAllChange:function(t){this.checkedList=[],this.origin.forEach(function(e,i){e.checked=t,t&&(e.order=i+1)}),t&&(this.checkedList=this.origin.slice(0)),this.checkHalf()},getTemplate:function(){var t=this;Object(n.a)("/haoban-manage-web/record/employee-find-template",{}).then(function(e){1==e.data.errorCode?t.formatTemplateList(e.data.result):t.$message.error({message:e.data.message})}).catch(function(e){t.$message.error({message:e.message})})},formatTemplateList:function(t){var e=[],i=[],a=t;t.forEach(function(t){t.title=t.fieldName,t.name=t.fieldName,t.checked=!1;var i=[];a.forEach(function(e){e.parentCode==t.fieldCode&&i.push(e)}),i.sort(function(t,e){return 1*t.sort-1*e.sort}),i.length>0&&(t.childrens=i),0==t.parentCode&&e.push(t)}),e.sort(function(t,e){return 1*t.sort-1*e.sort}),e.forEach(function(t){i=i.concat(t.childrens)}),this.origin=i,this.tempList=e},cancelCho:function(){this.origin.forEach(function(t){t.checked=!1}),this.$emit("cancelCho")},exportCho:function(){var t=[];this.checkedList.forEach(function(e){e.checked&&t.push({fieldCode:e.fieldCode,fieldName:e.fieldName})});s()(t);var e=window.location.origin;-1!=e.indexOf("localhost")&&(e="http://www.gicdev.com"),location.href=e+"/haoban-manage-web/record/define-export?exportTitleContent="+s()(t),this.$emit("cancelCho")}},beforeMount:function(){this.getTemplate()}},r={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"export-set-container"},[t._m(0),t._v(" "),i("div",{staticClass:"cho-list"},[i("draggable",{model:{value:t.checkedList,callback:function(e){t.checkedList=e},expression:"checkedList"}},[t._l(t.checkedList,function(e,a){return[e.checked?i("div",{key:e.fieldCode+a,staticClass:"cho"},[t._v(t._s(e.fieldName)+" "),i("i",{staticClass:"el-icon-circle-close",on:{click:function(e){t.deleteField(a)}}})]):t._e()]})],2)],1),t._v(" "),i("div",{staticClass:"cho-area"},[i("div",{staticClass:"title"},[t._v("选择需要导出的字段")]),t._v(" "),i("div",{staticClass:"cho-area-group"},[i("div",{staticClass:"group-div"},[i("div",{staticClass:"group-title"}),t._v(" "),i("ul",{staticClass:"group-son-list"},[i("el-checkbox",{attrs:{indeterminate:t.isIndeterminate},on:{change:t.handleCheckAllChange},model:{value:t.checkAll,callback:function(e){t.checkAll=e},expression:"checkAll"}},[t._v("全选")])],1)]),t._v(" "),t._l(t.tempList,function(e,a){return i("div",{key:e.fieldCode+a,staticClass:"group-div"},[i("div",{staticClass:"group-title"},[t._v(t._s(e.title))]),t._v(" "),i("ul",{staticClass:"group-son-list"},[t._l(t.origin,function(a){return[a.parentCode==e.fieldCode?i("li",{key:a.fieldCode},[i("el-checkbox",{key:a.fieldCode,attrs:{label:a.fieldName},on:{change:function(e){t.checkThis(a)}},model:{value:a.checked,callback:function(e){t.$set(a,"checked",e)},expression:"items.checked"}},[t._v(t._s(a.fieldName))])],1):t._e()]})],2)])})],2)]),t._v(" "),i("div",{staticClass:"handle-cho-btn"},[i("el-button",{staticClass:"export-btn",attrs:{type:"primary",disabled:t.checkedList.length<1},on:{click:t.exportCho}},[i("i",{staticClass:"iconfont icon-icon_yunxiazai p-r-6"}),t._v("导出")]),t._v(" "),i("el-button",{on:{click:t.cancelCho}},[t._v("取消")])],1)])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"title"},[this._v("已选择字段"),e("span",[this._v("导出的列表中将按顺序显示这些字段(可拖拽排序)")])])}]};var c=i("VU/8")(o,r,!1,function(t){i("fI5Z")},null,null);e.a=c.exports},fI5Z:function(t,e){},zcLw:function(t,e){}});
\ No newline at end of file
webpackJsonp([24],{"3cHF":function(e,t){},Xwfy:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("woOf"),s=r.n(a),l=r("mvHQ"),i=r.n(l),o=r("gBtx"),n=r.n(o),c=r("3Xzz"),d=r("fZjL"),u=r.n(d),h={name:"set-permiss-data",components:{},props:{value:{type:[Object,Array],default:function(){return[]}},title:{type:String}},data:function(){return{defaultSelection:this.value||[]}},methods:{delCurrent:function(e,t){t.splice(e,1)},updateList:function(e){this.$emit("input",e)},handleSelectedList:function(e){},showSelector:function(){this.$emit("showSelect")}},watch:{value:function(e,t){this.defaultSelection=e}},mounted:function(){this.defaultSelection=this.value}},m={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"select-area"},[r("div",{staticClass:"setting-name",staticStyle:{"font-size":"14px",color:"#606266"}},[e._v("\n "+e._s(e.title)+"\n ")]),e._v(" "),r("ul",{staticClass:"particular-list"},[e._l(e.defaultSelection,function(t,a){return[1==t.type?r("li",{key:a+"_"+t.employeeClerkId,staticClass:"item person-item"},[r("div",{class:["img-wrap","flex","flex-align-center","flex-pack-center",t.headPic?"":"img-wrap-bg"]},[t.headPic?r("img",{attrs:{src:t.headPic,alt:"headPic"}}):r("i",{staticClass:"iconfont icon-yewuduanmorentouxian"}),e._v(" "),r("i",{staticClass:"el-icon-circle-close",on:{click:function(t){e.delCurrent(a,e.defaultSelection)}}})]),e._v(" "),r("p",{staticClass:"name"},[e._v(e._s(t.name||t.label))])]):e._e(),e._v(" "),2==t.type||3==t.type?r("li",{key:a+"_"+t.groupId,staticClass:"item group-item"},[e._v("\n "+e._s(t.name||t.label)+"\n "),r("i",{staticClass:"el-icon-circle-close",on:{click:function(t){e.delCurrent(a,e.defaultSelection)}}})]):e._e()]}),e._v(" "),r("li",{staticClass:"item J_add-btn flex flex-align-center flex-pack-center",on:{click:e.showSelector}},[r("i",{staticClass:"el-icon-plus"})])],2)])},staticRenderFns:[]};var f=r("VU/8")(h,m,!1,function(e){r("hNqT")},null,null).exports,p=r("c4uw"),v=r("Ie7z"),C=r("3E4D"),b=r("Ch4/"),g=r("PI0u"),k=r("P9l9"),S={name:"",props:{authData:{type:[Object,Array],default:function(){return{}}},permType:{type:[Number,String]}},data:function(){return{projectName:"",ruleForm:{radio:1,visibleAll:[],visibleStoreAll:[]},treeSet:{isSelectPerson:!0,dialogVisible:!1,isSingle:!1},treeData:{},defaultSelection:[],onlyPerson:!1,changed:"",defaultStoreList:[],storeTreeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1}}},beforeMount:function(){var e=window.location.origin;"-1"!=e.indexOf("localhost")?this.baseUrl="http://www.gicdev.com":this.baseUrl=e},methods:{changeRadio:function(e){this.ruleForm.visibleAll=[],this.ruleForm.visibleStoreAll=[]},submitForm:Object(g.a)(function(e){var t=this;t.$refs[e].validate(function(e){if(!e)return!1;var r={allowCherkIds:[],allowDepartIds:[],allowStoreIds:[],brandId:t.ruleForm.brandId,groupId:t.ruleForm.groupId,radio:t.ruleForm.radio};3!=t.ruleForm.radio||t.ruleForm.visibleAll.length||t.ruleForm.visibleStoreAll.length?(3==t.ruleForm.radio&&(t.ruleForm.visibleAll.forEach(function(e,t){e.hasOwnProperty("employeeClerkId")?r.allowCherkIds.push(e.employeeClerkId):e.hasOwnProperty("groupId")?r.allowDepartIds.push(e.groupId):1===n()(e.type)?r.allowCherkIds.push(e.id):2===n()(e.type)&&r.allowDepartIds.push(e.id)}),t.ruleForm.visibleStoreAll.forEach(function(e,t){e.hasOwnProperty("employeeClerkId")?r.allowCherkIds.push(e.employeeClerkId):e.hasOwnProperty("groupId")?r.allowDepartIds.push(e.groupId):e.hasOwnProperty("storeId")?r.allowStoreIds.push(e.storeId):1===n()(e.type)?r.allowCherkIds.push(e.id):2===n()(e.type)?r.allowDepartIds.push(e.id):3===n()(e.type)&&r.allowStoreIds.push(e.id)})),t.setStoreAuth(r,t.permType)):t.$message.error({duration:1e3,message:"请选择指定部门/人员"})})},400),setStoreAuth:function(e,t){var r=this,a={type:t,brandId:e.brandId,groupId:e.groupId,storeEmployeeAuth:e.radio,storeManagerAuth:e.radio,allowCherkIds:e.allowCherkIds.join(","),allowDepartIds:e.allowDepartIds.join(","),allowStoreIds:e.allowStoreIds.join(",")};Object(k.e)("/haoban-manage-web/brand/saveStoreAuth",a).then(function(e){var r=e.data;if(1==r.errorCode)return 2==t&&C.a.showmsg("保存成功","success"),!1;b.a.errorMsg(r)}).catch(function(e){r.$message.error({duration:1e3,message:e.message})})},handleAuthData:function(e){var t=this;u()(e).length&&(t.ruleForm.brandId=e.brandId,t.ruleForm.groupId=e.groupId,1===n()(t.permType)&&(t.ruleForm.radio=e.brandDTO.storeEmployeeAuth||1,e.employeeAuthList.length&&e.employeeAuthList.forEach(function(e,t){2===n()(e.type)&&(e.groupId=e.id),e.label=e.name}),t.ruleForm.visibleAll=[],t.ruleForm.visibleStoreAll=[],e.employeeAuthList.forEach(function(e,r){e.isStore?t.ruleForm.visibleStoreAll.push(e):t.ruleForm.visibleAll.push(e)}),t.defaultSelection=t.ruleForm.visibleAll,t.defaultStoreList=t.ruleForm.visibleStoreAll),2===n()(t.permType)&&(t.ruleForm.radio=e.brandDTO.storeManagerAuth||1,e.managerAuthList.length&&e.managerAuthList.forEach(function(e,t){2===n()(e.type)&&(e.groupId=e.id),e.label=e.name}),t.ruleForm.visibleAll=[],t.ruleForm.visibleStoreAll=[],e.managerAuthList.forEach(function(e,r){e.isStore?t.ruleForm.visibleStoreAll.push(e):t.ruleForm.visibleAll.push(e)}),t.defaultSelection=t.ruleForm.visibleAll,t.defaultStoreList=t.ruleForm.visibleStoreAll))},showSelect:function(e){if("store"===e)return this.defaultStoreList=this.ruleForm.visibleStoreAll,void(this.storeTreeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0});this.treeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0},this.defaultSelection=this.ruleForm.visibleAll},handleSelectedList:function(e){this.defaultSelection=e,this.ruleForm.visibleAll=e},handleSelectedStoreList:function(e){this.defaultStoreList=e,this.ruleForm.visibleStoreAll=e},getDepartData:function(e){var t=this;Object(k.e)("/haoban-manage-web/dept/deptListForCompany",{}).then(function(e){var r=e.data;if(1!=r.errorCode)b.a.errorMsg(r);else if(r.result){var a=[],s=[];1==e.data.errorCode&&(a=e.data.result.departmentList||[],s=e.data.result.searchList||[]),t.treeData={treeData:a,personData:s},t.$forceUpdate()}else t.$message.error({duration:1e3,message:"暂无数据"})}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{authData:function(e,t){this.handleAuthData(e)}},mounted:function(){this.handleAuthData(this.authData),this.getDepartData()},components:{setPermissData:f,vueSelectEmployee:p.a,vueSelectStore:v.a}},w={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"permiss-wrap"},[r("el-form",{ref:"ruleForm",attrs:{"label-width":"110px",model:e.ruleForm}},[r("el-radio-group",{on:{change:e.changeRadio},model:{value:e.ruleForm.radio,callback:function(t){e.$set(e.ruleForm,"radio",t)},expression:"ruleForm.radio"}},[r("el-form-item",{attrs:{label:1==e.permType?"店员可见权限":"店长可见权限"}},[r("el-radio",{attrs:{label:1}},[e._v("可见所有品牌门店架构和行政架构")])],1),e._v(" "),r("el-form-item",{attrs:{label:" "}},[r("el-radio",{attrs:{label:2}},[e._v("门店仅可见自己门店")])],1),e._v(" "),r("el-form-item",{attrs:{label:" "}},[r("el-radio",{attrs:{label:3}},[e._v("自定义可见权限")])],1),e._v(" "),3==e.ruleForm.radio?r("div",{staticClass:"permiss-child-cell"},[r("setPermissData",{attrs:{title:"允许行政架构可见"},on:{showSelect:function(t){e.showSelect("depart")}},model:{value:e.ruleForm.visibleAll,callback:function(t){e.$set(e.ruleForm,"visibleAll",t)},expression:"ruleForm.visibleAll"}}),e._v(" "),r("setPermissData",{attrs:{title:"允许门店架构可见"},on:{showSelect:function(t){e.showSelect("store")}},model:{value:e.ruleForm.visibleStoreAll,callback:function(t){e.$set(e.ruleForm,"visibleStoreAll",t)},expression:"ruleForm.visibleStoreAll"}})],1):e._e()],1)],1),e._v(" "),r("vue-select-employee",{attrs:{defaultSelection:e.defaultSelection,treeSet:e.treeSet,onlyPerson:e.onlyPerson,changed:e.changed},on:{handleSelectedList:e.handleSelectedList}}),e._v(" "),r("vue-select-store",{ref:"storeSelector",attrs:{treeSet:e.storeTreeSet,selectType:"all",defaultList:e.defaultStoreList},on:{handleSelectedList:e.handleSelectedStoreList}})],1)},staticRenderFns:[]};var A=r("VU/8")(S,w,!1,function(e){r("3cHF")},"data-v-31cbaac4",null).exports,I={name:"storePermission",data:function(){return{navpath:[{name:"首页",path:"/index"},{name:"设置",path:"/companyAddress"},{name:"通讯录信息",path:"/staffDetails"},{name:"门店权限设置",path:""}],activeName:"",brandList:[],switchList:{addName:"新增门店成员",addStoreClerkCheck:!1,delName:"删除门店成员",deleteStoreClerkCheck:!1,modName:"门店信息变更",storeInformationChangeCheck:!1,tranferClerkCheck:!1,tranferClerkName:"转移门店成员"}}},computed:{},methods:{toStoreAdd:function(){this.$router.push("/storeFrame")},handleClick:function(e,t){this.getStoreAuth(e.name,n()(e.index)),this.activeName=e.name},saveSwitch:Object(g.a)(function(){var e=JSON.parse(i()(this.switchList));e.addStoreClerkCheck=1==e.addStoreClerkCheck?1:0,e.deleteStoreClerkCheck=1==e.deleteStoreClerkCheck?1:0,e.storeInformationChangeCheck=1==e.storeInformationChangeCheck?1:0,e.tranferClerkCheck=1==e.tranferClerkCheck?1:0,this.setStoreAuth(e)},600),saveAll:Object(g.a)(function(){var e=this;if(3==e.$refs.clerkPermiss.ruleForm.radio&&!e.$refs.clerkPermiss.ruleForm.visibleAll.length&&!e.$refs.clerkPermiss.ruleForm.visibleStoreAll.length)return e.$message.error({duration:1e3,message:"请选择指定部门/人员"}),!1;if(3==e.$refs.clerkManagePermiss.ruleForm.radio&&!e.$refs.clerkManagePermiss.ruleForm.visibleAll.length&&!e.$refs.clerkManagePermiss.ruleForm.visibleStoreAll.length)return e.$message.error({duration:1e3,message:"请选择指定部门/人员"}),!1;e.$refs.clerkPermiss.submitForm("ruleForm");var t=setTimeout(function(){e.$refs.clerkManagePermiss.submitForm("ruleForm"),clearTimeout(t)},500)},500),setStoreAuth:function(e){var t=this,r={brandId:e.brandId,groupId:t.activeName,addStoreClerkCheck:e.addStoreClerkCheck,deleteStoreClerkCheck:e.deleteStoreClerkCheck,storeInformationChangeCheck:e.storeInformationChangeCheck,tranferClerkCheck:e.tranferClerkCheck};Object(k.e)("/haoban-manage-web/brand/saveStoreAuth",r).then(function(e){var t=e.data;1!=t.errorCode?b.a.errorMsg(t):C.a.showmsg("保存成功","success")}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},getStoreAuth:function(e,t){var r=this,a={groupId:e};Object(k.e)("/haoban-manage-web/brand/storeAuth",a).then(function(e){var t=e.data;if(1!=t.errorCode)b.a.errorMsg(t);else if(t.result){r.brandList.clerkData=t.result,r.brandList.managerData=t.result;var a=t.result.brandDTO;a.addStoreClerkCheck=1==a.addStoreClerkCheck,a.deleteStoreClerkCheck=1==a.deleteStoreClerkCheck,a.storeInformationChangeCheck=1==a.storeInformationChangeCheck,a.tranferClerkCheck=1==a.tranferClerkCheck,r.switchList=s()(r.switchList,a),r.$forceUpdate()}}).catch(function(e){r.$message.error({duration:1e3,message:e.message})})},getBrandData:function(){var e=this;Object(k.e)("/haoban-manage-web/brand/list",{}).then(function(t){var r=t.data;1!=r.errorCode?b.a.errorMsg(r):r.result&&r.result.length&&(e.brandList=r.result,e.activeName=r.result[0].groupId,e.getStoreAuth(r.result[0].groupId,0))}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},mounted:function(){this.getBrandData()},components:{navCrumb:c.a,setPermiss:A}},y={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"storePermission-wrap common-set-wrap"},[r("nav-crumb",{attrs:{navpath:e.navpath}}),e._v(" "),r("div",{staticClass:"right-content"},[r("div",{staticClass:"right-box",staticStyle:{background:"unset",padding:"0"}},[r("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[e._l(e.brandList,function(e,t){return[r("el-tab-pane",{key:"name"+t,attrs:{label:e.name,name:e.groupId}})]})],2),e._v(" "),r("div",{staticClass:"storePermission-title font-w-500"},[e._v("\n 门店成员通讯录可见权限\n ")]),e._v(" "),e.brandList.length?r("div",{staticClass:"bg-fff permiss-contain"},[r("set-permiss",{ref:"clerkPermiss",attrs:{permType:1,authData:e.brandList.clerkData}}),e._v(" "),r("div",{staticClass:"b-l"}),e._v(" "),r("set-permiss",{ref:"clerkManagePermiss",attrs:{permType:2,authData:e.brandList.managerData}}),e._v(" "),r("div",{staticClass:"switch-cell p-l-110 m-t-15"},[r("el-button",{attrs:{type:"primary"},on:{click:e.saveAll}},[e._v("保 存")])],1)],1):e._e(),e._v(" "),e.brandList.length?r("div",{staticClass:"storePermission-wrap-switch m-t-24"},[r("div",{staticClass:"storePermission-switch-title font-w-500"},[e._v("\n 门店信息变更是否需要审核\n ")]),e._v(" "),r("div",{staticClass:"storePermission-switch-body"},[r("div",{staticClass:"switch-cell"},[r("el-switch",{attrs:{"inactive-text":e.switchList.addName},model:{value:e.switchList.addStoreClerkCheck,callback:function(t){e.$set(e.switchList,"addStoreClerkCheck",t)},expression:"switchList.addStoreClerkCheck"}})],1),e._v(" "),r("div",{staticClass:"switch-cell"},[r("el-switch",{attrs:{"inactive-text":e.switchList.delName},model:{value:e.switchList.deleteStoreClerkCheck,callback:function(t){e.$set(e.switchList,"deleteStoreClerkCheck",t)},expression:"switchList.deleteStoreClerkCheck"}})],1),e._v(" "),r("div",{staticClass:"switch-cell"},[r("el-switch",{attrs:{"inactive-text":e.switchList.modName},model:{value:e.switchList.storeInformationChangeCheck,callback:function(t){e.$set(e.switchList,"storeInformationChangeCheck",t)},expression:"switchList.storeInformationChangeCheck"}})],1),e._v(" "),r("div",{staticClass:"switch-cell"},[r("el-switch",{attrs:{"inactive-text":e.switchList.tranferClerkName},model:{value:e.switchList.tranferClerkCheck,callback:function(t){e.$set(e.switchList,"tranferClerkCheck",t)},expression:"switchList.tranferClerkCheck"}})],1),e._v(" "),r("div",{staticClass:"switch-cell p-l-94"},[r("el-button",{attrs:{type:"primary"},on:{click:e.saveSwitch}},[e._v("保 存")])],1)])]):e._e(),e._v(" "),e.brandList.length?e._e():r("div",{staticClass:"no-brand-content p-20 bg-fff text-center p-t-185"},[r("p",{staticClass:"font-14 color-909399 m-b-10"},[e._v("请创建品牌后进行门店权限设置")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.toStoreAdd}},[e._v("马上新建品牌")])],1)],1)]),e._v(" "),r("vue-gic-footer")],1)},staticRenderFns:[]};var F=r("VU/8")(I,y,!1,function(e){r("mjac")},"data-v-7aae95ee",null);t.default=F.exports},hNqT:function(e,t){},mjac:function(e,t){}});
\ No newline at end of file
webpackJsonp([26],{"3cHF":function(e,t){},Xwfy:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("woOf"),s=r.n(a),l=r("mvHQ"),i=r.n(l),o=r("gBtx"),n=r.n(o),c=r("3Xzz"),d=r("fZjL"),u=r.n(d),h={name:"set-permiss-data",components:{},props:{value:{type:[Object,Array],default:function(){return[]}},title:{type:String}},data:function(){return{defaultSelection:this.value||[]}},methods:{delCurrent:function(e,t){t.splice(e,1)},updateList:function(e){this.$emit("input",e)},handleSelectedList:function(e){},showSelector:function(){this.$emit("showSelect")}},watch:{value:function(e,t){this.defaultSelection=e}},mounted:function(){this.defaultSelection=this.value}},m={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"select-area"},[r("div",{staticClass:"setting-name",staticStyle:{"font-size":"14px",color:"#606266"}},[e._v("\n "+e._s(e.title)+"\n ")]),e._v(" "),r("ul",{staticClass:"particular-list"},[e._l(e.defaultSelection,function(t,a){return[1==t.type?r("li",{key:a+"_"+t.employeeClerkId,staticClass:"item person-item"},[r("div",{class:["img-wrap","flex","flex-align-center","flex-pack-center",t.headPic?"":"img-wrap-bg"]},[t.headPic?r("img",{attrs:{src:t.headPic,alt:"headPic"}}):r("i",{staticClass:"iconfont icon-yewuduanmorentouxian"}),e._v(" "),r("i",{staticClass:"el-icon-circle-close",on:{click:function(t){e.delCurrent(a,e.defaultSelection)}}})]),e._v(" "),r("p",{staticClass:"name"},[e._v(e._s(t.name||t.label))])]):e._e(),e._v(" "),2==t.type||3==t.type?r("li",{key:a+"_"+t.groupId,staticClass:"item group-item"},[e._v("\n "+e._s(t.name||t.label)+"\n "),r("i",{staticClass:"el-icon-circle-close",on:{click:function(t){e.delCurrent(a,e.defaultSelection)}}})]):e._e()]}),e._v(" "),r("li",{staticClass:"item J_add-btn flex flex-align-center flex-pack-center",on:{click:e.showSelector}},[r("i",{staticClass:"el-icon-plus"})])],2)])},staticRenderFns:[]};var f=r("VU/8")(h,m,!1,function(e){r("hNqT")},null,null).exports,p=r("c4uw"),v=r("Ie7z"),C=r("3E4D"),b=r("Ch4/"),g=r("PI0u"),k=r("P9l9"),S={name:"",props:{authData:{type:[Object,Array],default:function(){return{}}},permType:{type:[Number,String]}},data:function(){return{projectName:"",ruleForm:{radio:1,visibleAll:[],visibleStoreAll:[]},treeSet:{isSelectPerson:!0,dialogVisible:!1,isSingle:!1},treeData:{},defaultSelection:[],onlyPerson:!1,changed:"",defaultStoreList:[],storeTreeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1}}},beforeMount:function(){var e=window.location.origin;"-1"!=e.indexOf("localhost")?this.baseUrl="http://www.gicdev.com":this.baseUrl=e},methods:{changeRadio:function(e){this.ruleForm.visibleAll=[],this.ruleForm.visibleStoreAll=[]},submitForm:Object(g.a)(function(e){var t=this;t.$refs[e].validate(function(e){if(!e)return!1;var r={allowCherkIds:[],allowDepartIds:[],allowStoreIds:[],brandId:t.ruleForm.brandId,groupId:t.ruleForm.groupId,radio:t.ruleForm.radio};3!=t.ruleForm.radio||t.ruleForm.visibleAll.length||t.ruleForm.visibleStoreAll.length?(3==t.ruleForm.radio&&(t.ruleForm.visibleAll.forEach(function(e,t){e.hasOwnProperty("employeeClerkId")?r.allowCherkIds.push(e.employeeClerkId):e.hasOwnProperty("groupId")?r.allowDepartIds.push(e.groupId):1===n()(e.type)?r.allowCherkIds.push(e.id):2===n()(e.type)&&r.allowDepartIds.push(e.id)}),t.ruleForm.visibleStoreAll.forEach(function(e,t){e.hasOwnProperty("employeeClerkId")?r.allowCherkIds.push(e.employeeClerkId):e.hasOwnProperty("groupId")?r.allowDepartIds.push(e.groupId):e.hasOwnProperty("storeId")?r.allowStoreIds.push(e.storeId):1===n()(e.type)?r.allowCherkIds.push(e.id):2===n()(e.type)?r.allowDepartIds.push(e.id):3===n()(e.type)&&r.allowStoreIds.push(e.id)})),t.setStoreAuth(r,t.permType)):t.$message.error({duration:1e3,message:"请选择指定部门/人员"})})},400),setStoreAuth:function(e,t){var r=this,a={type:t,brandId:e.brandId,groupId:e.groupId,storeEmployeeAuth:e.radio,storeManagerAuth:e.radio,allowCherkIds:e.allowCherkIds.join(","),allowDepartIds:e.allowDepartIds.join(","),allowStoreIds:e.allowStoreIds.join(",")};Object(k.e)("/haoban-manage-web/brand/saveStoreAuth",a).then(function(e){var r=e.data;if(1==r.errorCode)return 2==t&&C.a.showmsg("保存成功","success"),!1;b.a.errorMsg(r)}).catch(function(e){r.$message.error({duration:1e3,message:e.message})})},handleAuthData:function(e){var t=this;u()(e).length&&(t.ruleForm.brandId=e.brandId,t.ruleForm.groupId=e.groupId,1===n()(t.permType)&&(t.ruleForm.radio=e.brandDTO.storeEmployeeAuth||1,e.employeeAuthList.length&&e.employeeAuthList.forEach(function(e,t){2===n()(e.type)&&(e.groupId=e.id),e.label=e.name}),t.ruleForm.visibleAll=[],t.ruleForm.visibleStoreAll=[],e.employeeAuthList.forEach(function(e,r){e.isStore?t.ruleForm.visibleStoreAll.push(e):t.ruleForm.visibleAll.push(e)}),t.defaultSelection=t.ruleForm.visibleAll,t.defaultStoreList=t.ruleForm.visibleStoreAll),2===n()(t.permType)&&(t.ruleForm.radio=e.brandDTO.storeManagerAuth||1,e.managerAuthList.length&&e.managerAuthList.forEach(function(e,t){2===n()(e.type)&&(e.groupId=e.id),e.label=e.name}),t.ruleForm.visibleAll=[],t.ruleForm.visibleStoreAll=[],e.managerAuthList.forEach(function(e,r){e.isStore?t.ruleForm.visibleStoreAll.push(e):t.ruleForm.visibleAll.push(e)}),t.defaultSelection=t.ruleForm.visibleAll,t.defaultStoreList=t.ruleForm.visibleStoreAll))},showSelect:function(e){if("store"===e)return this.defaultStoreList=this.ruleForm.visibleStoreAll,void(this.storeTreeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0});this.treeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0},this.defaultSelection=this.ruleForm.visibleAll},handleSelectedList:function(e){this.defaultSelection=e,this.ruleForm.visibleAll=e},handleSelectedStoreList:function(e){this.defaultStoreList=e,this.ruleForm.visibleStoreAll=e},getDepartData:function(e){var t=this;Object(k.e)("/haoban-manage-web/dept/deptListForCompany",{}).then(function(e){var r=e.data;if(1!=r.errorCode)b.a.errorMsg(r);else if(r.result){var a=[],s=[];1==e.data.errorCode&&(a=e.data.result.departmentList||[],s=e.data.result.searchList||[]),t.treeData={treeData:a,personData:s},t.$forceUpdate()}else t.$message.error({duration:1e3,message:"暂无数据"})}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{authData:function(e,t){this.handleAuthData(e)}},mounted:function(){this.handleAuthData(this.authData),this.getDepartData()},components:{setPermissData:f,vueSelectEmployee:p.a,vueSelectStore:v.a}},w={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"permiss-wrap"},[r("el-form",{ref:"ruleForm",attrs:{"label-width":"110px",model:e.ruleForm}},[r("el-radio-group",{on:{change:e.changeRadio},model:{value:e.ruleForm.radio,callback:function(t){e.$set(e.ruleForm,"radio",t)},expression:"ruleForm.radio"}},[r("el-form-item",{attrs:{label:1==e.permType?"店员可见权限":"店长可见权限"}},[r("el-radio",{attrs:{label:1}},[e._v("可见所有品牌门店架构和行政架构")])],1),e._v(" "),r("el-form-item",{attrs:{label:" "}},[r("el-radio",{attrs:{label:2}},[e._v("门店仅可见自己门店")])],1),e._v(" "),r("el-form-item",{attrs:{label:" "}},[r("el-radio",{attrs:{label:3}},[e._v("自定义可见权限")])],1),e._v(" "),3==e.ruleForm.radio?r("div",{staticClass:"permiss-child-cell"},[r("setPermissData",{attrs:{title:"允许行政架构可见"},on:{showSelect:function(t){e.showSelect("depart")}},model:{value:e.ruleForm.visibleAll,callback:function(t){e.$set(e.ruleForm,"visibleAll",t)},expression:"ruleForm.visibleAll"}}),e._v(" "),r("setPermissData",{attrs:{title:"允许门店架构可见"},on:{showSelect:function(t){e.showSelect("store")}},model:{value:e.ruleForm.visibleStoreAll,callback:function(t){e.$set(e.ruleForm,"visibleStoreAll",t)},expression:"ruleForm.visibleStoreAll"}})],1):e._e()],1)],1),e._v(" "),r("vue-select-employee",{attrs:{defaultSelection:e.defaultSelection,treeSet:e.treeSet,onlyPerson:e.onlyPerson,changed:e.changed},on:{handleSelectedList:e.handleSelectedList}}),e._v(" "),r("vue-select-store",{ref:"storeSelector",attrs:{treeSet:e.storeTreeSet,selectType:"all",defaultList:e.defaultStoreList},on:{handleSelectedList:e.handleSelectedStoreList}})],1)},staticRenderFns:[]};var A=r("VU/8")(S,w,!1,function(e){r("3cHF")},"data-v-31cbaac4",null).exports,I={name:"storePermission",data:function(){return{navpath:[{name:"首页",path:"/index"},{name:"设置",path:"/companyAddress"},{name:"通讯录信息",path:"/staffDetails"},{name:"门店权限设置",path:""}],activeName:"",brandList:[],switchList:{addName:"新增门店成员",addStoreClerkCheck:!1,delName:"删除门店成员",deleteStoreClerkCheck:!1,modName:"门店信息变更",storeInformationChangeCheck:!1,tranferClerkCheck:!1,tranferClerkName:"转移门店成员"}}},computed:{},methods:{toStoreAdd:function(){this.$router.push("/storeFrame")},handleClick:function(e,t){this.getStoreAuth(e.name,n()(e.index)),this.activeName=e.name},saveSwitch:Object(g.a)(function(){var e=JSON.parse(i()(this.switchList));e.addStoreClerkCheck=1==e.addStoreClerkCheck?1:0,e.deleteStoreClerkCheck=1==e.deleteStoreClerkCheck?1:0,e.storeInformationChangeCheck=1==e.storeInformationChangeCheck?1:0,e.tranferClerkCheck=1==e.tranferClerkCheck?1:0,this.setStoreAuth(e)},600),saveAll:Object(g.a)(function(){var e=this;if(3==e.$refs.clerkPermiss.ruleForm.radio&&!e.$refs.clerkPermiss.ruleForm.visibleAll.length&&!e.$refs.clerkPermiss.ruleForm.visibleStoreAll.length)return e.$message.error({duration:1e3,message:"请选择指定部门/人员"}),!1;if(3==e.$refs.clerkManagePermiss.ruleForm.radio&&!e.$refs.clerkManagePermiss.ruleForm.visibleAll.length&&!e.$refs.clerkManagePermiss.ruleForm.visibleStoreAll.length)return e.$message.error({duration:1e3,message:"请选择指定部门/人员"}),!1;e.$refs.clerkPermiss.submitForm("ruleForm");var t=setTimeout(function(){e.$refs.clerkManagePermiss.submitForm("ruleForm"),clearTimeout(t)},500)},500),setStoreAuth:function(e){var t=this,r={brandId:e.brandId,groupId:t.activeName,addStoreClerkCheck:e.addStoreClerkCheck,deleteStoreClerkCheck:e.deleteStoreClerkCheck,storeInformationChangeCheck:e.storeInformationChangeCheck,tranferClerkCheck:e.tranferClerkCheck};Object(k.e)("/haoban-manage-web/brand/saveStoreAuth",r).then(function(e){var t=e.data;1!=t.errorCode?b.a.errorMsg(t):C.a.showmsg("保存成功","success")}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},getStoreAuth:function(e,t){var r=this,a={groupId:e};Object(k.e)("/haoban-manage-web/brand/storeAuth",a).then(function(e){var t=e.data;if(1!=t.errorCode)b.a.errorMsg(t);else if(t.result){r.brandList.clerkData=t.result,r.brandList.managerData=t.result;var a=t.result.brandDTO;a.addStoreClerkCheck=1==a.addStoreClerkCheck,a.deleteStoreClerkCheck=1==a.deleteStoreClerkCheck,a.storeInformationChangeCheck=1==a.storeInformationChangeCheck,a.tranferClerkCheck=1==a.tranferClerkCheck,r.switchList=s()(r.switchList,a),r.$forceUpdate()}}).catch(function(e){r.$message.error({duration:1e3,message:e.message})})},getBrandData:function(){var e=this;Object(k.e)("/haoban-manage-web/brand/list",{}).then(function(t){var r=t.data;1!=r.errorCode?b.a.errorMsg(r):r.result&&r.result.length&&(e.brandList=r.result,e.activeName=r.result[0].groupId,e.getStoreAuth(r.result[0].groupId,0))}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},mounted:function(){this.getBrandData()},components:{navCrumb:c.a,setPermiss:A}},y={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"storePermission-wrap common-set-wrap"},[r("nav-crumb",{attrs:{navpath:e.navpath}}),e._v(" "),r("div",{staticClass:"right-content"},[r("div",{staticClass:"right-box",staticStyle:{background:"unset",padding:"0"}},[r("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[e._l(e.brandList,function(e,t){return[r("el-tab-pane",{key:"name"+t,attrs:{label:e.name,name:e.groupId}})]})],2),e._v(" "),r("div",{staticClass:"storePermission-title font-w-500"},[e._v("\n 门店成员通讯录可见权限\n ")]),e._v(" "),e.brandList.length?r("div",{staticClass:"bg-fff permiss-contain"},[r("set-permiss",{ref:"clerkPermiss",attrs:{permType:1,authData:e.brandList.clerkData}}),e._v(" "),r("div",{staticClass:"b-l"}),e._v(" "),r("set-permiss",{ref:"clerkManagePermiss",attrs:{permType:2,authData:e.brandList.managerData}}),e._v(" "),r("div",{staticClass:"switch-cell p-l-110 m-t-15"},[r("el-button",{attrs:{type:"primary"},on:{click:e.saveAll}},[e._v("保 存")])],1)],1):e._e(),e._v(" "),e.brandList.length?r("div",{staticClass:"storePermission-wrap-switch m-t-24"},[r("div",{staticClass:"storePermission-switch-title font-w-500"},[e._v("\n 门店信息变更是否需要审核\n ")]),e._v(" "),r("div",{staticClass:"storePermission-switch-body"},[r("div",{staticClass:"switch-cell"},[r("el-switch",{attrs:{"inactive-text":e.switchList.addName},model:{value:e.switchList.addStoreClerkCheck,callback:function(t){e.$set(e.switchList,"addStoreClerkCheck",t)},expression:"switchList.addStoreClerkCheck"}})],1),e._v(" "),r("div",{staticClass:"switch-cell"},[r("el-switch",{attrs:{"inactive-text":e.switchList.delName},model:{value:e.switchList.deleteStoreClerkCheck,callback:function(t){e.$set(e.switchList,"deleteStoreClerkCheck",t)},expression:"switchList.deleteStoreClerkCheck"}})],1),e._v(" "),r("div",{staticClass:"switch-cell"},[r("el-switch",{attrs:{"inactive-text":e.switchList.modName},model:{value:e.switchList.storeInformationChangeCheck,callback:function(t){e.$set(e.switchList,"storeInformationChangeCheck",t)},expression:"switchList.storeInformationChangeCheck"}})],1),e._v(" "),r("div",{staticClass:"switch-cell"},[r("el-switch",{attrs:{"inactive-text":e.switchList.tranferClerkName},model:{value:e.switchList.tranferClerkCheck,callback:function(t){e.$set(e.switchList,"tranferClerkCheck",t)},expression:"switchList.tranferClerkCheck"}})],1),e._v(" "),r("div",{staticClass:"switch-cell p-l-94"},[r("el-button",{attrs:{type:"primary"},on:{click:e.saveSwitch}},[e._v("保 存")])],1)])]):e._e(),e._v(" "),e.brandList.length?e._e():r("div",{staticClass:"no-brand-content p-20 bg-fff text-center p-t-185"},[r("p",{staticClass:"font-14 color-909399 m-b-10"},[e._v("请创建品牌后进行门店权限设置")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.toStoreAdd}},[e._v("马上新建品牌")])],1)],1)]),e._v(" "),r("vue-gic-footer")],1)},staticRenderFns:[]};var F=r("VU/8")(I,y,!1,function(e){r("mjac")},"data-v-7aae95ee",null);t.default=F.exports},hNqT:function(e,t){},mjac:function(e,t){}});
\ No newline at end of file
webpackJsonp([26],{"/8XM":function(t,e){},Ipcz:function(t,e){},SB6x:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("Ke24"),n=a("joH8"),o=a("P9l9"),l=a("Ch4/"),s=a("3E4D"),r=a("PI0u"),c={name:"chat-log",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},components:{commonDetailTop:i.a,materialRecord:n.a},data:function(){var t=this;return{activeBrand:this.brandId,activeGroup:this.activeGroupId,activeId:"1",topMenuData:[{id:"1",name:"纷享素材"}],tableData:[],conditionObj:{searchInput:"",searchType:"1",storeGroup:[],dateRange:[]},choiceDateCopy:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}],onPick:function(e){var a=e.maxDate,i=e.minDate;t.choiceDateCopy=[i.getTime()],a&&(t.choiceDateCopy=[])},disabledDate:function(e){if(t.choiceDateCopy.length){var a=t.choiceDateCopy[0]-31536e6,i=t.choiceDateCopy[0]+31536e6;return e.getTime()<a||e.getTime()>i||e.getTime()>Date.now()-864e4}return e.getTime()>Date.now()-864e4}},currentPage:1,pageSize:20,total:0,detailShow:!1,materialId:""}},methods:{toInput:Object(r.a)(function(t,e){this.currentPage=1,this.getTableList()},500),clearInput:function(){this.currentPage=1,this.getTableList()},changeDate:function(t){t||(this.choiceDateCopy=[],this.conditionObj.dateRange=[]),this.getTableList()},toCreate:function(){this.$router.push("/newEnjoy")},toSetTop:function(t,e){var a=this;a.$confirm(0==e?"置顶后,该素材将出现在手机好办营销素材顶部,确认置顶该素材吗":"确定「取消置顶」该条素材吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postTop(t,e)})},postTop:function(t,e){var a=this,i={materialId:t,topFlag:0==e?1:0};Object(o.a)("/haoban-app-material-web/material-to-top",i).then(function(t){var i=t.data;1==i.errorCode?(0==e?s.a.showmsg("置顶成功","success"):s.a.showmsg("取消置顶成功","success"),a.currentPage=1,a.getTableList()):s.a.showmsg(i.message,"warning")}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},handleSizeChange:function(t){this.pageSize=t,this.getTableList()},handleCurrentChange:function(t){this.currentPage=t,this.getTableList()},showDetail:function(t,e){this.$router.push("/newEnjoy?materialId="+e.materialId+"&appIcon="+this.$route.query.appIcon)},showRecord:function(t,e){this.detailShow=!0,this.materialId=e.materialId},hideDetailDialog:function(){this.detailShow=!1,this.materialId=""},toDel:function(t,e){var a=this;a.$confirm("是否要删除该素材?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDel(e,t)}).catch(function(){})},postDel:function(t,e){var a=this,i={materialId:t.materialId};Object(o.e)("/haoban-app-material-web/material-del",i).then(function(t){var e=t.data;if(1==e.errorCode)return s.a.showmsg("删除成功","success"),void a.getTableList();l.a.errorMsg(e)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},getTableList:function(t){var e=this;e.conditionObj.dateRange||(e.conditionObj.dateRange=[]);var a={materialTitle:e.conditionObj.searchInput||"",startTimeStr:e.conditionObj.dateRange[0]||"",endTimeStr:e.conditionObj.dateRange[1]||"",relatedType:2,pageNum:e.currentPage,pageSize:e.pageSize,brandId:e.activeBrand};Object(o.a)("/haoban-app-material-web/material-page",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.tableData=a.result.list||[],e.total=a.result.total,!1;l.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(t,e){t&&(this.activeBrand=t,this.getTableList())},activeGroupId:function(t,e){t&&(this.activeGroup=t)}},mounted:function(){this.$emit("showTab","2"),this.brandId&&this.getTableList()}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"chat-log border-box"},[a("common-detail-top",{attrs:{topMenuData:t.topMenuData,activeId:t.activeId}}),t._v(" "),a("div",{staticClass:"chat-log-content border-box"},[a("div",{staticClass:"table-condition flex flex-space-between m-b-23"},[a("div",{staticClass:"table-condition-left"},[a("el-input",{staticClass:"w-264",attrs:{placeholder:"请输入标题",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.searchInput);var a}},model:{value:t.conditionObj.searchInput,callback:function(e){t.$set(t.conditionObj,"searchInput",e)},expression:"conditionObj.searchInput"}}),t._v(" "),a("el-date-picker",{staticClass:"m-l-10",attrs:{"prefix-icon":"el-icon-time","picker-options":t.pickerOptions,editable:!1,"value-format":"yyyy-MM-dd",type:"daterange",align:"right","unlink-panels":"","range-separator":"~","start-placeholder":"开始时间","end-placeholder":"结束时间"},on:{change:t.changeDate},model:{value:t.conditionObj.dateRange,callback:function(e){t.$set(t.conditionObj,"dateRange",e)},expression:"conditionObj.dateRange"}})],1),t._v(" "),a("div",{staticClass:"table-condition-right"},[a("el-button",{attrs:{type:"primary"},on:{click:t.toCreate}},[t._v("新建素材")])],1)]),t._v(" "),a("el-table",{ref:"multipleTable",staticClass:"select-table",style:{width:"100%",minHeight:t.tableH},attrs:{data:t.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"标题","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.materialTitle||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"图片"},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(e.row.imgUrlList,function(t,e){return a("img",{key:e+"img",staticClass:"table-img",attrs:{src:t.imgUrl,alt:""}})})}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"点赞数","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.thumbsUpCount||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"转发数","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.tranferCount||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"发布时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"219"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.toSetTop(e.row.materialId,e.row.topFlag)}}},[t._v(t._s(1==e.row.topFlag?"取消置顶":"置顶"))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.showDetail(e.$index,e.row)}}},[t._v("查看")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.showRecord(e.$index,e.row)}}},[t._v("记录")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toDel(e.$index,e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),0!=t.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[20,40,60,80],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)],1),t._v(" "),a("material-record",{attrs:{materialId:t.materialId,detailShow:t.detailShow},on:{hideDetailDialog:t.hideDetailDialog}})],1)},staticRenderFns:[]};var d=a("VU/8")(c,u,!1,function(t){a("Ipcz")},"data-v-0b08a583",null);e.default=d.exports},joH8:function(t,e,a){"use strict";var i=a("P9l9"),n=a("Ch4/"),o=a("PI0u"),l={name:"material-record",props:{detailShow:{type:Boolean,default:!1},materialId:{type:String,default:""}},data:function(){return{customDialog:!1,activeName:"first",tableData:[],conditionObj:{searchInput:"",materialId:this.materialId},currentPage:1,pageSize:5,total:0}},methods:{handleTab:function(){this.currentPage=1,this.getTableList()},toInput:Object(o.a)(function(t,e){this.currentPage=1,this.getTableList()},500),clearInput:function(){this.currentPage=1,this.getTableList()},handleSizeChange:function(t){this.pageSize=t,this.getTableList()},handleCurrentChange:function(t){this.currentPage=t,this.getTableList()},handleClose:function(t){t(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.$emit("hideDetailDialog")},getTableList:function(t){var e=this,a={materialId:e.conditionObj.materialId,imgTextTitle:e.conditionObj.searchInput||"",relatedType:"first"==e.activeName?2:1,pageNum:e.currentPage,pageSize:e.pageSize,brandId:e.activeBrand};Object(i.a)("/haoban-app-material-web/material-log",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.tableData=a.result.list||[],e.total=a.result.total,!1;n.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{detailShow:function(t,e){this.customDialog=t},materialId:function(t,e){t&&(this.conditionObj.materialId=t,this.currentPage=1,this.getTableList())}},mounted:function(){this.customDialog=this.detailShow,this.materialId&&(this.conditionObj.materialId=this.materialId,this.currentPage=1,this.getTableList())}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"show",rawName:"v-show",value:t.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:"记录",visible:t.customDialog,width:"739px","before-close":t.handleClose},on:{"update:visible":function(e){t.customDialog=e}}},[a("div",{staticClass:"edit-dialog-body"},[a("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleTab},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"点赞记录",name:"first"}},[a("div",{staticClass:"m-b-20 flex"},[a("el-input",{staticClass:"w-223",attrs:{placeholder:"请输入姓名/手机号/code","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.searchInput);var a}},model:{value:t.conditionObj.searchInput,callback:function(e){t.$set(t.conditionObj,"searchInput",e)},expression:"conditionObj.searchInput"}}),t._v(" "),a("span",{staticClass:"p-l-10 l-h-32"},[t._v("共"+t._s(t.total)+"条点赞记录")])],1),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,height:"332"}},[a("el-table-column",{attrs:{label:"点赞人",width:"150","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex flex-align-center flex-pack-center bg-82C5FF table-head-pic"},[e.row.headImg?a("img",{attrs:{src:e.row.headImg,alt:"img"}}):a("i",{staticClass:"iconfont icon-yewuduanmorentouxian"})]),t._v(" "),a("div",{staticClass:"flex flex-column apply-info"},[a("span",{staticClass:"text-ellipsis"},[t._v(t._s(e.row.userName))]),t._v(" "),a("span",{staticClass:"font-13 text-ellipsis"},[t._v(t._s(e.row.storeName))])])])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"手机号","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.phoneNumber||"--")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"点赞时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])})],1)],1),t._v(" "),a("el-tab-pane",{attrs:{label:"转发记录",name:"second"}},[a("div",{staticClass:"m-b-20 flex"},[a("el-input",{staticClass:"w-223",attrs:{placeholder:"请输入姓名/手机号/code","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.searchInput);var a}},model:{value:t.conditionObj.searchInput,callback:function(e){t.$set(t.conditionObj,"searchInput",e)},expression:"conditionObj.searchInput"}}),t._v(" "),a("span",{staticClass:"p-l-10 l-h-32"},[t._v("共"+t._s(t.total)+"条转发记录")])],1),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,height:"332"}},[a("el-table-column",{attrs:{label:"转发人",width:"150","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex flex-align-center flex-pack-center bg-82C5FF table-head-pic"},[e.row.headImg?a("img",{attrs:{src:e.row.headImg,alt:"img"}}):a("i",{staticClass:"iconfont icon-yewuduanmorentouxian"})]),t._v(" "),a("div",{staticClass:"flex flex-column apply-info"},[a("span",{staticClass:"text-ellipsis"},[t._v(t._s(e.row.userName))]),t._v(" "),a("span",{staticClass:"font-13 text-ellipsis"},[t._v(t._s(e.row.storeName))])])])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"手机号","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.phoneNumber||"--")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"转发时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])})],1)],1)],1),t._v(" "),0!=t.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[20,40,60,80],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)])],1)},staticRenderFns:[]};var r=a("VU/8")(l,s,!1,function(t){a("/8XM")},"data-v-66a1accb",null);e.a=r.exports}});
\ No newline at end of file
webpackJsonp([27],{"08l2":function(e,t){},estW:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("Gu7T"),o=a.n(s),l=a("mvHQ"),n=a.n(l),r=a("Xxa5"),i=a.n(r),c=a("exGp"),u=a.n(c),d=a("P9l9"),p=a("3E4D"),m=a("PI0u"),g={name:"class-select",components:{},props:{workClassShow:{type:Boolean,default:!1},classesId:{type:String,default:""}},data:function(){return{enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,userId:JSON.parse(localStorage.getItem("userInfo")).userId,selClassesId:this.classesId,customDialog:!1,tableData:[],classesName:""}},methods:{toInput:Object(m.a)(function(e,t){this.getClassifyData()},500),clearInput:function(){this.currentPage=1,this.getClassifyData()},customConfirm:Object(m.a)(u()(i.a.mark(function e(){var t,a;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((t=this).customDialog=!1,t.selClassesId){e.next=5;break}return p.a.showmsg("请选择班次","warning"),e.abrupt("return",!1);case 5:a={},t.tableData.forEach(function(e){e.classesId==t.selClassesId&&(a=e)}),t.$emit("hideClassDialog",a),t.$nextTick(function(){t.selClassesId=""});case 9:case"end":return e.stop()}},e,this)})),300),handleClose:function(e){e(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){var e=this;e.customDialog=!1,e.$emit("hideClassDialog"),e.$nextTick(function(){e.selClassesId=""})},getClassifyData:function(){var e=this,t={enterpriseId:e.enterpriseId,classesName:e.classesName};Object(d.a)("/haoban-app-attence-web/attence-classes-list",t).then(function(t){var a=t.data;1==a.errorCode&&(a.result&&a.result.length&&a.result.forEach(function(e){e.classessTimesJson&&(e.classessTimesJson=JSON.parse(e.classessTimesJson))}),e.tableData=a.result||[])}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{workClassShow:function(e,t){this.customDialog=e},classesId:function(e){this.selClassesId=e||""}},mounted:function(){this.getClassifyData(),this.classesId?this.selClassesId=this.classesId:this.selClassesId="",this.customDialog=this.workClassShow}},f={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{staticClass:"edit-dialog",attrs:{title:"选择班次",visible:e.customDialog,width:"600px","before-close":e.handleClose},on:{"update:visible":function(t){e.customDialog=t}}},[a("div",{staticClass:"edit-dialog-body"},[a("div",{staticClass:"m-b-20"},[a("el-input",{staticClass:"w-264",staticStyle:{width:"264px"},attrs:{placeholder:"请输入班次名称","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.classesName);var a}},model:{value:e.classesName,callback:function(t){e.classesName=t},expression:"classesName"}})],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{label:"",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-radio",{attrs:{label:t.row.classesId},model:{value:e.selClassesId,callback:function(t){e.selClassesId=t},expression:"selClassesId"}},[e._v(e._s(""))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"imageUrl",label:"班次名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.classesName)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"titleName",label:"考勤时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.classessTimesJson,function(t,s){return a("div",{key:s+"time"},[e._v(e._s(t.startTime)+"-"+e._s(t.endTime))])})}}])})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){return t.stopPropagation(),e.customCancel(t)}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){t.stopPropagation(),e.customConfirm("ruleForm")}}},[e._v("确定")])],1)])},staticRenderFns:[]};var h,v=a("VU/8")(g,f,!1,function(e){a("gqu5")},"data-v-7f1ae9d0",null).exports,_={name:"class-select",components:{},props:{mapShow:{type:Boolean,default:!1}},data:function(){var e=this;return{enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,userId:JSON.parse(localStorage.getItem("userInfo")).userId,selClassesId:this.classesId,customDialog:!1,ruleForm:{address:""},rules:{address:[{required:!0,message:"请选择考勤地点",trigger:"blur"}]},zoom:12,center:[120.12497,30.277155],address:"",plugin:[{pName:"ToolBar"}],events:{click:function(t){var a=t.lnglat,s=a.lng,o=a.lat;e.lng=s,e.lat=o,new AMap.Geocoder({radius:1e3,extensions:"all"}).getAddress([s,o],function(t,a){"complete"===t&&"OK"===a.info&&a&&a.regeocode&&(console.log(a),e.address=a.regeocode.formattedAddress,e.ruleForm.address=a.regeocode.formattedAddress,e.$nextTick())})}},lng:0,lat:0}},methods:{customConfirm:Object(m.a)((h=u()(i.a.mark(function e(t){var a;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=this,this.$refs[t].validate(function(e){e&&(a.customDialog=!1,a.$emit("hideMapDialog",{address:a.address,longitude:a.lng,latitude:a.lat}),a.$nextTick(function(){a.address="",a.ruleForm.address=""}))});case 2:case"end":return e.stop()}},e,this)})),function(e){return h.apply(this,arguments)}),300),handleClose:function(e){e(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){var e=this;e.customDialog=!1,e.$emit("hideMapDialog"),e.$nextTick(function(){e.address="",e.ruleForm.address=""})}},watch:{mapShow:function(e,t){this.customDialog=e}},mounted:function(){this.customDialog=this.mapShow}},S={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"show",rawName:"v-show",value:e.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:"考勤地点",visible:e.customDialog,width:"600px","before-close":e.handleClose},on:{"update:visible":function(t){e.customDialog=t}}},[a("div",{staticClass:"edit-dialog-body"},[a("div",{staticClass:"amap-page-container"},[a("el-amap",{staticClass:"amap-demo",attrs:{vid:"amapDemo",center:e.center,zoom:e.zoom,plugin:e.plugin,events:e.events}}),e._v(" "),a("div",{staticClass:"toolbar m-t-20"},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"详细地址:",prop:"address"}},[a("el-input",{model:{value:e.ruleForm.address,callback:function(t){e.$set(e.ruleForm,"address",t)},expression:"ruleForm.address"}})],1)],1)],1)],1)]),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){return t.stopPropagation(),e.customCancel(t)}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){t.stopPropagation(),e.customConfirm("ruleForm")}}},[e._v("确定")])],1)])],1)},staticRenderFns:[]};var y=a("VU/8")(_,S,!1,function(e){a("08l2")},"data-v-1e2f8b2a",null).exports,D=a("Ke24"),b=a("l46T"),w=a("Ie7z"),F=a("c4uw"),k=a("Kkt8"),C={name:"workGroupSet",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},data:function(){return{projectName:"haoban-manage-web",topMenuData:[{id:"1",name:"考勤组管理",path:"/workSet?appIcon="+this.$route.query.appIcon},{id:"2",name:this.$route.query.attenceGroupId?"编辑考勤组":"新建考勤组",path:""}],classifyOptions:[],activeId:"2",activeBrand:this.brandId,activeGroup:this.activeGroupId,enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,userId:JSON.parse(localStorage.getItem("userInfo")).userId,ruleFormData:{attenceGroupId:"",attenceType:1,attenceRangeType:!1,attenceRangeStoreType:!1,adminList:[],storeList:[],noAttenceRangeType:!1,noAttenceRangeStoreType:!1,noAdminList:[],noStoreList:[],lawFreeFlag:!1,clockDistance:300,storeClockFlag:!1,gpsFlag:!1,distanceAddress:[],attenceRangeJson:[],sperialRangeJson:[{attenceDate:"",sperialType:""}],mustJson:[],noMustJson:[],attenceWorkJson:[{weekDay:"周一",workType:!1,classesName:"",classesId:"",classessTimesJson:""},{weekDay:"周二",workType:!1,classesName:"",classesId:"",classessTimesJson:""},{weekDay:"周三",workType:!1,classesName:"",classesId:"",classessTimesJson:""},{weekDay:"周四",workType:!1,classesName:"",classesId:"",classessTimesJson:""},{weekDay:"周五",workType:!1,classesName:"",classesId:"",classessTimesJson:""},{weekDay:"周六",workType:!1,classesName:"",classesId:"",classessTimesJson:""},{weekDay:"周日",workType:!1,classesName:"",classesId:"",classessTimesJson:""}],attenceClassesRangeJSON:[],classesJson:[]},rules:{attenceGroupName:[{required:!0,message:"请输入考勤组名称",trigger:"blur"}],content:[{required:!0,message:"请输入公告内容",trigger:"blur"}],sendType:[{required:!0,message:"请选择发送方式",trigger:"change"}]},wxFlag:1,actionUrl:"/haoban-manage-web/upload-img",datePickerBool:!1,dateValue:"",mustType:"",selectNoType:"",treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1,openNextBool:!0},mustSelection:[],changed:"",onlyPerson:!1,appScene:1,mustStoreList:[],storeTreeSet:{isSelectPerson:!0,dialogVisible:!1,isSingle:!1},changedNo:"",noTreeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1,openNextBool:!0},noSelection:[],noStoreList:[],noStoreTreeSet:{isSelectPerson:!0,dialogVisible:!1,isSingle:!1},defaultStoreBool:!1,saveDataBool:!0,showEffect:!1,workClassShow:!1,modIndex:"",modRow:{},showClassesFlag:!1,multipleSelection:[],distance:[{value:"50",label:"50米"}],mapShow:!1,rangeShow:!1}},methods:{editRange:function(e,t){this.rangeShow=!0},addMap:function(){this.mapShow=!0},hideMapDialog:function(e){if(console.log(e),this.mapShow=!1,!e)return!1;this.ruleFormData.distanceAddress.push({address:e.address,longitude:e.longitude,latitude:e.latitude})},delGps:function(e,t){this.ruleFormData.distanceAddress.splice(e,1)},showClasses:function(){this.workClassShow=!0},modClasses:function(e,t){console.log(t),this.modIndex=e,this.modRow=t,this.classesId=t.classesId||"",this.workClassShow=!0},hideClassDialog:function(e){if(this.workClassShow=!1,this.classesId="",!e)return!1;this.modRow.workType=!0;var t=JSON.parse(n()(e));this.modRow.classesName=t.classesName,this.modRow.classesId=t.classesId,this.modRow.classessTimesJson=t.classessTimesJson},handleSelectionChange:function(e){this.multipleSelection=e},selectBrandId:function(e,t){this.brandId=e},cancelSend:function(){var e=this;if(e.$route.query.attenceGroupId)return e.$router.go(-1),!1;e.$confirm("是否确认返回,返回后当前页面内容将丢失","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$router.go(-1)}).catch(function(){})},showDialogMust:function(e,t){return!this.$route.query.attenceGroupId&&(this.mustType=e,this.changed=e,"store"===e?(this.nustStoreList=t,void(this.storeTreeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0,openNextBool:!0})):(this.treeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0,openNextBool:!0},void(this.nustSelection=t)))},showDialogNo:function(e,t){return!this.$route.query.attenceGroupId&&(this.selectNoType=e,this.changedNo=e,"store"===e?(this.noStoreList=t,void(this.noStoreTreeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0,openNextBool:!0})):(this.noTreeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0,openNextBool:!0},void(this.noSelection=t)))},handleMustList:function(e){console.log(e),"store"===this.mustType?(this.ruleFormData.storeList=e,this.mustStoreList=e):(this.ruleFormData.adminList=e,this.mustSelection=e)},handleNoList:function(e){console.log(e),"store"===this.selectNoType?(this.ruleFormData.noStoreList=e,this.noStoreList=e):(this.ruleFormData.noAdminList=e,this.noSelection=e)},delDepart:function(e,t,a){if(this.$route.query.attenceGroupId)return!1;t.splice(e,1)},changeMyDate:function(){this.dateValue?this.saveDataBool=!0:this.datePickerBool=!0},changeSendType:function(e){"0"==e&&(this.saveDataBool=!0)},sendData:Object(m.a)(function(e){var t=this,a=[];t.ruleFormData.attenceRangeType&&t.ruleFormData.adminList.length&&(a=t.ruleFormData.adminList.map(function(e){return{rangeType:1,storeFlag:0,id:e.id,name:e.name||e.label,type:e.type}}));var s=[];t.ruleFormData.attenceRangeStoreType&&t.ruleFormData.storeList.length&&(s=t.ruleFormData.storeList.map(function(e){return{rangeType:1,storeFlag:1,id:e.id,name:e.name||e.label,type:e.type}}));var l=[];t.ruleFormData.noAttenceRangeType&&t.ruleFormData.noAdminList.length&&(l=t.ruleFormData.noAdminList.map(function(e){return{rangeType:2,storeFlag:0,id:e.id,name:e.name||e.label,type:e.type}}));t.ruleFormData.noAttenceRangeStoreType&&t.ruleFormData.noStoreList.length&&(s=t.ruleFormData.noStoreList.map(function(e){return{rangeType:2,storeFlag:1,id:e.id,name:e.name||e.label,type:e.type}})),t.ruleFormData.attenceRangeJson=[].concat(o()(a),o()(s),o()(l),[]),console.log(t.ruleFormData),t.$refs[e].validate(function(e){if(!e)return!1;var a={attenceGroupId:t.ruleFormData.attenceGroupId,attenceType:t.ruleFormData.attenceType,attenceRangeType:t.ruleFormData.attenceRangeType?1:0,attenceRangeStoreType:t.ruleFormData.attenceRangeStoreType?1:0,noAttenceRangeType:t.ruleFormData.noAttenceRangeType?1:0,noAttenceRangeStoreType:t.ruleFormData.noAttenceRangeStoreType?1:0,lawFreeFlag:t.ruleFormData.lawFreeFlag?1:0,clockDistance:300,storeClockFlag:t.ruleFormData.storeClockFlag?1:0,gpsFlag:t.ruleFormData.gpsFlag?1:0,distanceAddress:n()(t.ruleFormData.distanceAddress),attenceRangeJson:n()(t.ruleFormData.attenceRangeJson),sperialRangeJson:[{attenceDate:"",sperialType:""}],attenceWorkJson:n()(t.ruleFormData.attenceWorkJson),attenceClassesRangeJSON:[],classesJson:n()(t.ruleFormData.classesJson)};t.saveDataBool&&Object(d.e)("/haoban-app-attence-web/attence-add",a).then(function(e){var a=e.data;1==a.errorCode?(t.$message.success("编辑成功"),t.$router.go(-1)):t.$message.error(a.message)})})},500),getClassifyData:function(){var e=this,t={enterpriseId:e.enterpriseId};Object(d.a)("/haoban-app-attence-web/attence-classes-list",t).then(function(t){var a=t.data;1==a.errorCode&&(a.result.list&&a.result.list.length&&a.result.list.forEach(function(e){e.classessTimesJson&&(e.classessTimesJson=JSON.parse(e.classessTimesJson))}),e.classifyList=a.result.list||[])}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getGroupData:function(){var e=this,t={attenceGroupId:e.$route.query.attenceGroupId};Object(d.a)("/haoban-app-attence-web/attence-detail",t).then(function(t){var a=t.data;1==a.errorCode&&(a.result.adminCheck=0!=a.result.adminCheck,a.result.storeCheck=0!=a.result.storeCheck,a.result.adminStructor=a.result.adminStructor?JSON.parse(a.result.adminStructor):[],a.result.storeStructor=a.result.storeStructor?JSON.parse(a.result.storeStructor):[],e.defaultSelection=a.result.adminStructor,e.defaultStoreList=a.result.storeStructor,a.result.pageTop=!!a.result.pageTop,a.result.newSeeFlag=!!a.result.newSeeFlag,a.result.watermarkFlag=!!a.result.watermarkFlag,a.result.sendType=String(a.result.sendType),a.result.receiveType=String(a.result.receiveType),e.dateValue=Object(m.c)(a.result.sendTime),e.noticePreviewData=JSON.parse(n()(a.result)),e.ruleFormData=JSON.parse(n()(a.result)))}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},setDistance:function(){for(var e=1;e<11;e++)this.distance.push({value:100*e,label:100*e+"米"});this.distance.push({value:2e3,label:"2000米"})}},watch:{brandId:function(e,t){e&&(this.activeBrand=e,this.getClassifyData())},activeGroupId:function(e,t){e&&(this.activeGroup=e)}},components:{commonDetailTop:D.a,limitInput:b.a,limitTextarea:k.a,vueSelectStore:w.a,vueSelectEmployee:F.a,classSelect:v,mapSelect:y},mounted:function(){var e=this;e.setDistance(),e.$route.query.attenceGroupId&&e.$nextTick(function(){e.getNoticeData()})}},T={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"notice-list-wrap"},[a("div",{staticClass:"notice-list"},[a("common-detail-top",{attrs:{topMenuData:e.topMenuData,activeId:e.activeId}}),e._v(" "),a("el-form",{ref:"noteForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleFormData,rules:e.rules,"label-width":"120px"}},[a("el-form-item",{staticClass:"input-item",attrs:{label:"考勤组名称:",prop:"attenceGroupName"}},[a("limitInput",{attrs:{disflag:!!e.$route.query.attenceGroupId,inputWidth:286,inputValue:e.ruleFormData.attenceGroupName,holder:"请输入考勤组名称",getByType:"word",maxLength:15},on:{"update:inputValue":function(t){e.$set(e.ruleFormData,"attenceGroupName",t)}}})],1),e._v(" "),a("el-form-item",{staticClass:"input-item",attrs:{label:"参与考勤人员:",prop:""}},[a("div",{staticClass:"flex"},[a("el-checkbox",{attrs:{disabled:!!e.$route.query.attenceGroupId},model:{value:e.ruleFormData.attenceRangeType,callback:function(t){e.$set(e.ruleFormData,"attenceRangeType",t)},expression:"ruleFormData.attenceRangeType"}},[e._v("行政架构")]),e._v(" "),e.ruleFormData.attenceRangeType?a("div",{staticClass:"flex-column item-cell-select inline-block m-l-10"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"470px"},on:{click:function(t){e.showDialogMust("depart",e.ruleFormData.adminList)}}},[e.ruleFormData.adminList.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[e._v("请选择行政架构")]),e._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[e._l(e.ruleFormData.adminList,function(t,s){return[a("span",{key:s,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(s,e.ruleFormData.adminList,"depart")}}})])]})],2)])])])]):e._e()],1),e._v(" "),a("div",{staticClass:"flex m-t-20"},[a("el-checkbox",{attrs:{disabled:!!e.$route.query.attenceGroupId},model:{value:e.ruleFormData.attenceRangeStoreType,callback:function(t){e.$set(e.ruleFormData,"attenceRangeStoreType",t)},expression:"ruleFormData.attenceRangeStoreType"}},[e._v("门店架构")]),e._v(" "),e.ruleFormData.attenceRangeStoreType?a("div",{staticClass:"flex-column item-cell-select inline-block m-l-10"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"470px"},on:{click:function(t){e.showDialogMust("store",e.ruleFormData.storeList)}}},[e.ruleFormData.storeList.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[e._v("请选择门店架构")]),e._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[e._l(e.ruleFormData.storeList,function(t,s){return[a("span",{key:s,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(s,e.ruleFormData.storeList,"store")}}})])]})],2)])])])]):e._e()],1)]),e._v(" "),a("el-form-item",{staticClass:"input-item",attrs:{label:"考勤白名单:",prop:""}},[a("div",{staticClass:"flex"},[a("el-checkbox",{attrs:{disabled:!!e.$route.query.attenceGroupId},model:{value:e.ruleFormData.noAttenceRangeType,callback:function(t){e.$set(e.ruleFormData,"noAttenceRangeType",t)},expression:"ruleFormData.noAttenceRangeType"}},[e._v("行政架构")]),e._v(" "),e.ruleFormData.noAttenceRangeType?a("div",{staticClass:"flex-column item-cell-select inline-block m-l-10"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"470px"},on:{click:function(t){e.showDialogNo("depart",e.ruleFormData.noAdminList)}}},[e.ruleFormData.noAdminList.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[e._v("请选择行政架构")]),e._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[e._l(e.ruleFormData.noAdminList,function(t,s){return[a("span",{key:s,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(s,e.ruleFormData.noAdminList,"depart")}}})])]})],2)])])])]):e._e()],1),e._v(" "),a("div",{staticClass:"flex m-t-20"},[a("el-checkbox",{attrs:{disabled:!!e.$route.query.attenceGroupId},model:{value:e.ruleFormData.noAttenceRangeStoreType,callback:function(t){e.$set(e.ruleFormData,"noAttenceRangeStoreType",t)},expression:"ruleFormData.noAttenceRangeStoreType"}},[e._v("门店架构")]),e._v(" "),e.ruleFormData.noAttenceRangeStoreType?a("div",{staticClass:"flex-column item-cell-select inline-block m-l-10"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"470px"},on:{click:function(t){e.showDialogNo("store",e.ruleFormData.noStoreList)}}},[e.ruleFormData.noStoreList.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10"},[e._v("请选择门店架构")]),e._v(" "),a("div",{staticClass:"el-select__tags"},[a("span",[e._l(e.ruleFormData.noStoreList,function(t,s){return[a("span",{key:s,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(s,e.ruleFormData.noStoreList,"store")}}})])]})],2)])])])]):e._e()],1)]),e._v(" "),a("el-form-item",{attrs:{label:"考勤类型:",prop:""}},[a("div",{staticClass:"work-type m-b-8"},[a("el-radio",{attrs:{label:1},model:{value:e.ruleFormData.attenceType,callback:function(t){e.$set(e.ruleFormData,"attenceType",t)},expression:"ruleFormData.attenceType"}},[e._v("固定时间上下班【所有人按照相同时间打卡】")]),e._v(" "),a("div",{staticClass:"line-h-15 font-14 color-909399"},[e._v("适用于:办公室等")])],1),e._v(" "),a("div",{staticClass:"work-type m-b-8"},[a("el-radio",{attrs:{label:2},model:{value:e.ruleFormData.attenceType,callback:function(t){e.$set(e.ruleFormData,"attenceType",t)},expression:"ruleFormData.attenceType"}},[e._v("排班时间上下班【不同人员根据各自排班打卡】")]),e._v(" "),a("div",{staticClass:"line-h-15 font-14 color-909399"},[e._v("适用于:工厂、门店等")])],1)]),e._v(" "),1==e.ruleFormData.attenceType?a("el-form-item",{attrs:{label:"工作日设置:",prop:""}},[a("div",{staticClass:"quick-set-table"},[a("el-table",{ref:"multipleTable",staticStyle:{width:"567px"},attrs:{data:e.ruleFormData.attenceWorkJson,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{width:"55"},scopedSlots:e._u([{key:"default",fn:function(e){}}])}),e._v(" "),a("el-table-column",{attrs:{label:"工作日",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.weekDay))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"排班时间段",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.workType?a("div",e._l(t.row.classessTimesJson,function(t,s){return a("div",{key:s+"time"},[e._v(e._s(t.startTime)+"-"+e._s(t.endTime))])})):a("div",[e._v("休息")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"address",label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){a.stopPropagation(),e.modClasses(t.$index,t.row)}}},[e._v("更改班次")])]}}])})],1)],1),e._v(" "),a("div",[a("el-checkbox",{model:{value:e.ruleFormData.lawFreeFlag,callback:function(t){e.$set(e.ruleFormData,"lawFreeFlag",t)},expression:"ruleFormData.lawFreeFlag"}},[e._v("法定节假日自动排休")])],1)]):e._e(),e._v(" "),2==e.ruleFormData.attenceType?a("el-form-item",{attrs:{label:"考勤班次:",prop:""}},[a("div",{staticClass:"tags-classes"},[a("div",{staticClass:"new-tag-schedule"},[a("div",{staticClass:"attend-type-classes"},[a("div",{staticClass:"attend-type-classes-display",attrs:{"data-spm-anchor-id":"0.0.0.i25.23964ce3NvNZUj"}},e._l(e.ruleFormData.classesJson,function(t,s){return a("div",{key:s,staticClass:"ant-tag ant-tag-blue"},[a("span",{staticClass:"ant-tag-text"},[e._v(e._s(t.classesName))]),e._v(" "),e._l(t.classessTimesJson,function(t,s){return a("span",{key:s+"time"},[e._v(e._s(t.startTime)+"-"+e._s(t.endTime))])})],2)}))])])])]):e._e(),e._v(" "),2==e.ruleFormData.attenceType?a("el-form-item",{attrs:{label:"排班周期:",prop:""}},[a("el-table",{staticStyle:{width:"567px"},attrs:{data:e.ruleFormData.attenceClassesRangeJSON,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"ranageName",label:"周期名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.ranageName))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"周期班次"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.classessTimesJson,function(t,s){return a("div",{key:s+"time"},[e._v(e._s(t.startTime)+"-"+e._s(t.endTime))])})}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"ranageName",label:"周期天数"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.ranageName))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"address",label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.editRange(t.$index,t.row)}}},[e._v("编辑")])]}}])})],1)],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"考勤方式:",prop:""}},[a("div",[a("el-checkbox",{model:{value:e.ruleFormData.gpsFlag,callback:function(t){e.$set(e.ruleFormData,"gpsFlag",t)},expression:"ruleFormData.gpsFlag"}},[e._v("GPS打卡")])],1),e._v(" "),a("div",{staticClass:"gps-body p-20 bg-f7f8fa",staticStyle:{width:"567px"}},[a("div",[e._v("根据工作地点考勤(可添加多个考勤地点)")]),e._v(" "),a("div",[a("el-button",{attrs:{type:"primary",plain:""},on:{click:e.addMap}},[e._v("添加考勤地点")]),e._v(" "),a("span",[e._v("有效范围")]),e._v(" "),a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.ruleFormData.clockDistance,callback:function(t){e.$set(e.ruleFormData,"clockDistance",t)},expression:"ruleFormData.clockDistance"}},e._l(e.distance,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1),e._v(" "),e.ruleFormData.distanceAddress.length?a("div",{staticClass:"m-t-20"},[a("el-table",{staticStyle:{width:"567px"},attrs:{data:e.ruleFormData.distanceAddress,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"name",label:"考勤地址"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.address))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"address",label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.delGps(t.$index,t.row)}}},[e._v("删除")])]}}])})],1)],1):e._e(),e._v(" "),a("div",[a("el-checkbox",{model:{value:e.ruleFormData.storeClockFlag,callback:function(t){e.$set(e.ruleFormData,"storeClockFlag",t)},expression:"ruleFormData.storeClockFlag"}},[e._v("根据门店地址经纬度自动配置")]),e._v(" "),a("p",{staticClass:"font-14 color-909399"},[e._v("如门店经纬度有误,请在通讯录修改门店相关信息,未设置门店打卡无须选择此项")])],1)])]),e._v(" "),a("el-form-item",[a("div",{staticClass:"btn-wrap"},[a("el-button",{attrs:{plain:""},on:{click:e.cancelSend}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{disabled:!!e.$route.query.attenceGroupId,type:"primary"},on:{click:function(t){e.showEffect=!0}}},[e._v("保存")])],1)])],1)],1),e._v(" "),a("vue-select-employee",{attrs:{appScene:e.appScene,defaultSelection:e.mustSelection,onlyPerson:e.onlyPerson,treeSet:e.treeSet,changed:e.changed},on:{handleSelectedList:e.handleMustList}}),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{appScene:e.appScene,treeSet:e.storeTreeSet,selectType:"all",defaultList:e.mustStoreList},on:{handleSelectedList:e.handleMustList}}),e._v(" "),a("vue-select-employee",{attrs:{appScene:e.appScene,defaultSelection:e.noSelection,onlyPerson:!0,treeSet:e.noTreeSet,changed:e.changedNo},on:{handleSelectedList:e.handleNoList}}),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{appScene:e.appScene,treeSet:e.noStoreTreeSet,selectType:"person",defaultList:e.noStoreList},on:{handleSelectedList:e.handleNoList}}),e._v(" "),a("el-dialog",{attrs:{title:"选择规则生效时间",visible:e.showEffect,width:"420px","before-close":e.handleClose},on:{"update:visible":function(t){e.showEffect=t}}},[a("span",[e._v("立即生效:今日考勤结果将按新规则重算")]),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.sendData("noteForm")}}},[e._v("明天生效")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.sendData("noteForm")}}},[e._v("立即生效")])],1)]),e._v(" "),a("class-select",{attrs:{workClassShow:e.workClassShow,classesId:e.classesId},on:{hideClassDialog:e.hideClassDialog}}),e._v(" "),a("map-select",{attrs:{mapShow:e.mapShow},on:{hideMapDialog:e.hideMapDialog}})],1)},staticRenderFns:[]};var I=a("VU/8")(C,T,!1,function(e){a("rpK6")},"data-v-19a5f39e",null);t.default=I.exports},gqu5:function(e,t){},rpK6:function(e,t){}});
\ No newline at end of file
webpackJsonp([27],{"1usg":function(t,e){},"33SU":function(t,e){},"AKs/":function(t,e){},ahzF:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s={name:"card-record-table",props:{tableData:{type:[Array,Object],default:function(){return[]}},activeTab:{type:[String,Number],default:function(){return"52"}}},data:function(){return{}},filters:{percenteNum:function(t){return t>0?Number(100*t).toFixed(2)+"%":Number(t).toFixed(2)+"%"}},methods:{toSendDetail:function(t,e,a){this.$router.push("/"+(1==a?"cardSendRecord":"cardGetRecord")+"?activeTab="+this.activeTab+"&appIcon="+this.$route.query.appIcon+"&coupCardId="+e.coupCardId)}}},o={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"card-record-table m-t-20"},[a("el-table",{ref:"multipleTable",staticClass:"select-table",staticStyle:{width:"calc(100% - 3px)"},attrs:{data:t.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"",label:"卡券名称","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.cardName)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"",width:"96"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"发送卡券数量,包含扫码发券数",placement:"right"}},[a("span",{staticStyle:{cursor:"pointer"}},[t._v("发送数量"),a("i",{staticClass:"el-icon-info font-12 color-606266"})])])]}},{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.issuingQuantity)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"领取数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.getedQuantity))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"领取率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t._f("percenteNum")(e.row.getedRate)))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"使用数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(e.row.usageQuantity))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"核销率"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("percenteNum")(e.row.verificationRate)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"销售额"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(e.row.saleAmount))])]}}])}),t._v(" "),a("el-table-column",{attrs:{width:"150"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"导购发送卡券的总人数统计,次日刷新",placement:"right"}},[a("span",{staticStyle:{cursor:"pointer"}},[t._v("导购发送卡券人数"),a("i",{staticClass:"el-icon-info font-12 color-606266"})])])]}},{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.sendMemberCount)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",width:"200",label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toSendDetail(e.$index,e.row,"1")}}},[t._v("发送记录")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toSendDetail(e.$index,e.row,"2")}}},[t._v("领取记录")])]}}])})],1)],1)},staticRenderFns:[]};var i=a("VU/8")(s,o,!1,function(t){a("AKs/")},"data-v-0698d03e",null).exports,r={name:"card-list-table",props:{tableData:{type:[Array,Object],default:function(){return[]}},activeTab:{type:[String,Number],default:function(){return"51"}}},data:function(){return{}},methods:{toDel:function(t,e){var a=this;a.$confirm("是否要删除选中的分类?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.$emit("delCard",e.coupCardId)}).catch(function(){})},toEdit:function(t,e){this.$router.push("/newCard?activeTab="+this.activeTab+"&appIcon="+this.$route.query.appIcon+"&coupCardId="+e.coupCardId)}}},l={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-table",{ref:"multipleTable",staticClass:"select-table",staticStyle:{width:"calc(100% - 3px)"},attrs:{data:t.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"",label:"卡券名称","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.cardName)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"卡券类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.cardType?a("span",[t._v("抵金券")]):t._e(),t._v(" "),1==e.row.cardType?a("span",[t._v("折扣券")]):t._e(),t._v(" "),2==e.row.cardType?a("span",[t._v("兑换券")]):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"有效期","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.effectDateString||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"库存"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(e.row.couponStock))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toEdit(e.$index,e.row)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toDel(e.$index,e.row)}}},[t._v("删除")])]}}])})],1)],1)},staticRenderFns:[]};var n=a("VU/8")(r,l,!1,function(t){a("33SU")},"data-v-552374d2",null).exports,c=a("P9l9"),d=a("Ch4/"),u=a("3E4D"),p=a("PI0u"),f={name:"online-chat",props:{brandId:{type:String,default:function(){return""}}},components:{cardRecordTable:i,cardListTable:n},data:function(){return{activeTab:"1",leftData:[{tabId:"1",tabName:"短信提醒"},{tabId:"2",tabName:"模板消息"},{tabId:"3",tabName:"图文"},{tabId:"4",tabName:"商品"},{tabId:"5",tabName:"卡券",children:[{tabId:"51",tabName:"卡券列表"},{tabId:"52",tabName:"卡券记录"}]}],chatData:{chatFlag:!1,isMessageRemind:!1,messageRemindTime:"",isTemplateMessage:!1,isImgMessage:!1,isGoodMessage:!1,isIntegralGoodMessage:!1},rules:{messageRemindTime:[{required:!0,message:"请选择时间",trigger:"blur"}]},templateName:"",articleList:[],pageSize:4,pageNum:1,total:0,activeName:"first",goodsList:[],pointList:[],cardCoupChatSwitch:!1,cardListData:[],cardRecordData:[]}},methods:{toNewCard:function(){this.$router.push("/newCard?activeTab="+this.activeTab+"&appIcon="+this.$route.query.appIcon)},delCard:function(t){this.delCardList(t)},toSendDetail:function(t,e,a){this.$router.push("/sendRecord?activeTab="+this.activeTab+"&tabType="+a+"&appIcon="+this.$route.query.appIcon+"&relatedId="+(e.id||e.goodId))},changeChatFlag:function(){this.postSave(this.brandId)},handleCurrentChange:function(t){this.pageNum=t,3==this.activeTab?this.getArticleList(this.brandId):4==this.activeTab?"first"==this.activeName?this.getGoodsList(this.brandId):this.getPointList(this.brandId):51==this.activeTab?this.getCardList(this.brandId):52==this.activeTab&&this.getCardRecord(this.brandId)},saveData:Object(p.a)(function(t){var e=this;e.$refs[t].validate(function(t){if(!t)return!1;e.postSave(e.brandId)})},500),postSave:function(t){var e=this;e.pageNum=1,e.chatData.isIntegralGoodMessage&&!e.chatData.isGoodMessage&&(e.activeName="second");var a={brandId:t,chatFlag:e.chatData.chatFlag?1:0,isMessageRemind:e.chatData.isMessageRemind?1:0,messageRemindTime:e.chatData.messageRemindTime,isTemplateMessage:e.chatData.isTemplateMessage?1:0,isImgMessage:e.chatData.isImgMessage?1:0,isGoodMessage:e.chatData.isGoodMessage?1:0,isIntegralGoodMessage:e.chatData.isIntegralGoodMessage?1:0,mainStoreFlag:e.chatData.mainStoreFlag,minorStoreFlag:e.chatData.minorStoreFlag,openCardStoreFlag:e.chatData.openCardStoreFlag,clerkSeeOtherFlag:e.chatData.clerkSeeOtherFlag,allowGuideContact:e.chatData.allowGuideContact,allowGuideMobile:e.chatData.allowGuideMobile,allowGuideMessage:e.chatData.allowGuideMessage,allowGuideOnlineChat:e.chatData.allowGuideOnlineChat,isSeeAuthMember:e.chatData.isSeeAuthMember};Object(c.e)("/haoban-app-member-web/customer/save-member-show-setting",a).then(function(a){var s=a.data;if(1==s.errorCode)return u.a.showmsg("保存成功","success"),3==e.activeTab&&e.chatData.isImgMessage&&e.getArticleList(t),void(4==e.activeTab&&(e.chatData.isGoodMessage&&e.getGoodsList(t),e.chatData.isIntegralGoodMessage&&e.getPointList(t),e.chatData.isIntegralGoodMessage&&!e.chatData.isGoodMessage&&(e.activeName="second"),e.chatData.isGoodMessage&&!e.chatData.isIntegralGoodMessage&&(e.activeName="first")));d.a.errorMsg(s)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},changeTab:function(t){if(t.children)return this.activeTab=t.children[0].tabId,this.getCardSet(this.brandId),!1;this.pageNum=1,this.activeTab=t.tabId,this.getChatSet(this.brandId),this.getCardSet(this.brandId)},handleTab:function(t,e){this.pageNum=1,"first"==t.name?this.getGoodsList(this.brandId):this.getPointList(this.brandId)},getTemplate:function(t){var e=this,a={brandId:t};Object(c.e)("/haoban-app-member-web/customer/find_message_template",a).then(function(t){var a=t.data;1!=a.errorCode?d.a.errorMsg(a):e.templateName=a.result||"--"}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getGoodsList:function(t){var e=this,a={pageSize:e.pageSize,pageNum:e.pageNum,brandId:t};Object(c.e)("/haoban-app-member-web/customer/find_good_list",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.goodsList=a.result.list||[],void("first"==e.activeName&&(e.total=a.result.total));e.goodsList=[],e.total=0,d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getPointList:function(t){var e=this,a={brandId:t,pageSize:e.pageSize,pageNum:e.pageNum};Object(c.e)("/haoban-app-member-web/customer/find_integal_good_list",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.pointList=a.result.list||[],void("second"==e.activeName&&(e.total=a.result.total));e.pointList=[],e.total=0,d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getArticleList:function(t){var e=this,a={brandId:t,pageSize:e.pageSize,pageNum:e.pageNum};Object(c.e)("/haoban-app-member-web/customer/find_img_list",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.articleList=a.result.list||[],void(e.total=a.result.total);e.articleList=[],e.total=0,d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},delCardList:function(t){var e=this,a={brandId:e.brandId,coupCardId:t};Object(c.e)("/haoban-app-member-web/cardCoupon/del-card-coup",a).then(function(t){var a=t.data;if(1==a.errorCode)return u.a.showmsg("删除成功","success"),void e.getCardList(e.brandId);d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getCardList:function(t){var e=this,a={brandId:t,pageSize:e.pageSize,pageNum:e.pageNum};Object(c.e)("/haoban-app-member-web/cardCoupon/find-card-page",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.cardListData=a.result.list||[],void(e.total=a.result.pageInfo.total);d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getCardRecord:function(t){var e=this,a={brandId:t,pageSize:e.pageSize,pageNum:e.pageNum};Object(c.e)("/haoban-app-member-web/cardCoupon/find-card-log-page",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.cardRecordData=a.result.list||[],void(e.total=a.result.pageInfo.total);d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},postSaveCard:function(t){var e=this,a={cardCoupChatSwitch:e.cardCoupChatSwitch?1:0,brandId:t};Object(c.e)("/haoban-app-member-web/customer/save-card-coup-setting",a).then(function(t){var a=t.data;if(1==a.errorCode)return u.a.showmsg("设置成功","success"),void(e.cardCoupChatSwitch&&e.getCardList(e.brandId));d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getCardSet:function(t){var e=this,a={brandId:t};Object(c.e)("/haoban-app-member-web/customer/find-card-coup-setting",a).then(function(t){var a=t.data;if(1==a.errorCode)return a.result.cardCoupChatSwitch=1==a.result.cardCoupChatSwitch,e.cardCoupChatSwitch=a.result.cardCoupChatSwitch,"51"==e.activeTab&&e.cardCoupChatSwitch&&(e.pageSize=4,e.getCardList(e.brandId)),void("52"==e.activeTab&&(e.pageSize=6,e.getCardRecord(e.brandId)));d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getChatSet:function(t){var e=this,a={brandId:t};Object(c.e)("/haoban-app-member-web/customer/find-online-chat-setting",a).then(function(a){var s=a.data;1!=s.errorCode?d.a.errorMsg(s):s.result&&(s.result.chatFlag=1==s.result.chatFlag,s.result.isMessageRemind=1==s.result.isMessageRemind,s.result.messageRemindTime=s.result.messageRemindTime,s.result.isTemplateMessage=1==s.result.isTemplateMessage,s.result.isImgMessage=1==s.result.isImgMessage,s.result.isGoodMessage=1==s.result.isGoodMessage,s.result.isIntegralGoodMessage=1==s.result.isIntegralGoodMessage,e.chatData=s.result,2==e.activeTab&&e.getTemplate(t),3==e.activeTab&&s.result.isImgMessage&&(e.pageSize=4,e.getArticleList(t)),4==e.activeTab&&(e.pageSize=3,s.result.isGoodMessage&&e.getGoodsList(t),s.result.isIntegralGoodMessage&&e.getPointList(t),s.result.isIntegralGoodMessage&&!s.result.isGoodMessage&&(e.activeName="second"),s.result.isGoodMessage&&!s.result.isIntegralGoodMessage&&(e.activeName="first")))}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(t,e){""!=t&&(this.getChatSet(t),this.getCardSet(t))}},mounted:function(){this.$emit("showTab","2"),""!=this.brandId&&(this.getChatSet(this.brandId),this.getCardSet(this.brandId)),""!=this.$route.query.activeTab&&(this.activeTab=this.$route.query.activeTab||"1")}},m={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"online-chat-content border-box"},[a("div",{staticClass:"online-chat-switch"},[a("span",{staticClass:"font-14 color-606266 p-r-18"},[t._v("在线沟通")]),a("el-switch",{attrs:{"active-text":"","inactive-text":""},on:{change:t.changeChatFlag},model:{value:t.chatData.chatFlag,callback:function(e){t.$set(t.chatData,"chatFlag",e)},expression:"chatData.chatFlag"}}),a("span",{staticClass:"p-l-10 font-12 color-909399"},[t._v("若小程序使用了GIC 好办客服功能,会员将无法在公众号联系导购")])],1),t._v(" "),a("div",{staticClass:"online-chat-body"},[a("div",{staticClass:"flex"},[a("div",{staticClass:"online-chat-left"},[a("ul",[t._l(t.leftData,function(e,s){return[a("li",{key:s+"left",class:["online-chat-left_li",t.activeTab==e.tabId?"active-li":""],on:{click:function(a){t.changeTab(e)}}},[t._v(t._s(e.tabName))]),t._v(" "),e.children&&e.children.length?a("ul",{key:s+"left1"},[t._l(e.children,function(e,s){return[a("li",{key:s+"left12",class:["online-chat-left_li child-li",t.activeTab==e.tabId?"active-li":""],on:{click:function(a){t.changeTab(e)}}},[t._v(t._s(e.tabName))])]})],2):t._e()]})],2)]),t._v(" "),a("div",{staticClass:"online-chat-right border-box"},[a("div",{staticClass:"online-chat-right_body"},[1==t.activeTab?a("div",{staticClass:"online-chat-message"},[a("el-form",{ref:"msgForm",staticClass:"demo-ruleForm",attrs:{model:t.chatData,rules:t.rules,"label-width":"70px"}},[a("el-form-item",{attrs:{label:"短信提醒",prop:"name"}},[a("el-switch",{attrs:{"active-text":"","inactive-text":""},on:{change:function(e){t.postSave(t.brandId)}},model:{value:t.chatData.isMessageRemind,callback:function(e){t.$set(t.chatData,"isMessageRemind",e)},expression:"chatData.isMessageRemind"}}),a("span",{staticClass:"font-14 color-909399 p-l-24"},[t._v("开启后,会员发送消息,超出10条后,即发送短信给导购,每日最多触发一条短信,短信计入商家计费中心")])],1),t._v(" "),t.chatData.isMessageRemind?a("el-form-item",{attrs:{label:"",prop:"messageRemindTime"}},[a("span",{staticClass:"font-14 color-606266 p-r-10"},[t._v("下发时间设置")]),a("el-time-select",{attrs:{"picker-options":{start:"00:00",step:"00:15",end:"23:59"},placeholder:"选择时间"},model:{value:t.chatData.messageRemindTime,callback:function(e){t.$set(t.chatData,"messageRemindTime",e)},expression:"chatData.messageRemindTime"}}),a("span",{staticClass:"font-14 color-909399 p-l-20"},[t._v("该事件设置将在当日生效")])],1):t._e(),t._v(" "),t.chatData.isMessageRemind?a("el-form-item",{attrs:{label:""}},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.saveData("msgForm")}}},[t._v("保存")])],1):t._e()],1)],1):t._e(),t._v(" "),2==t.activeTab?a("div",{staticClass:"online-chat-template"},[t._m(0),t._v(" "),a("div",{staticClass:"m-t-23"},[a("span",{staticClass:"font-14 color-303133"},[t._v("模板消息")]),a("el-switch",{staticClass:"m-l-20",attrs:{"active-text":"","inactive-text":""},on:{change:function(e){t.postSave(t.brandId)}},model:{value:t.chatData.isTemplateMessage,callback:function(e){t.$set(t.chatData,"isTemplateMessage",e)},expression:"chatData.isTemplateMessage"}}),a("span",{staticClass:"font-14 color-909399 p-l-24"},[t._v("仅支持专属导购对会员发送模板消息,每个会员每个自然月模板消息发送次数不超过三次。设置后立即生效。")])],1),t._v(" "),a("div",{staticClass:"m-t-23"},[a("span",{staticClass:"font-14 color-303133"},[t._v("模板名字:")]),t._v(t._s(t.templateName))])]):t._e(),t._v(" "),3==t.activeTab?a("div",{staticClass:"online-chat-article"},[t._m(1),t._v(" "),a("div",{staticClass:"m-t-20"},[a("span",{staticClass:"font-14 color-303133"},[t._v("图文")]),a("el-switch",{staticClass:"m-l-20",attrs:{"active-text":"","inactive-text":""},on:{change:function(e){t.postSave(t.brandId)}},model:{value:t.chatData.isImgMessage,callback:function(e){t.$set(t.chatData,"isImgMessage",e)},expression:"chatData.isImgMessage"}}),a("span",{staticClass:"font-14 color-909399 p-l-24"},[t._v("开启后,导购与会员聊天可发送GIC图文")])],1),t._v(" "),t.chatData.isImgMessage?a("div",{staticClass:"m-t-20 p-l-50"},[a("el-table",{ref:"multipleTable",staticClass:"select-table",staticStyle:{width:"calc(100% - 3px)"},attrs:{data:t.articleList,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"",label:"图片","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"img-wrap border-box flex flex-align-center flex-pack-center"},[e.row.img?a("img",{attrs:{src:e.row.img,alt:""}}):t._e()]),t._v(" "),a("div",{staticClass:"article-title font-14 color-606266 p-l-10"},[t._v("\n "+t._s(e.row.title)+"\n ")])])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"作者","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.authorName||"--"))]}}])}),t._v(" "),a("el-table-column",{scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"导购发送图文的总人数统计,次日刷新",placement:"right"}},[a("span",{staticStyle:{cursor:"pointer"}},[t._v("导购发送图文人数"),a("i",{staticClass:"el-icon-info font-12 color-606266"})])])]}},{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.pushCount)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toSendDetail(e.$index,e.row,"4")}}},[t._v("发送记录")])]}}])})],1),t._v(" "),0!=t.articleList.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{"current-page":t.pageNum,"page-size":t.pageSize,layout:"total, prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1):t._e()],1):t._e()]):t._e(),t._v(" "),4==t.activeTab?a("div",{staticClass:"online-chat-goods"},[t._m(2),t._v(" "),a("div",{staticClass:"m-t-20"},[a("span",{staticClass:"font-14 color-303133"},[t._v("达摩微商城")]),a("el-switch",{staticClass:"m-l-10",attrs:{"active-text":"","inactive-text":""},on:{change:function(e){t.postSave(t.brandId)}},model:{value:t.chatData.isGoodMessage,callback:function(e){t.$set(t.chatData,"isGoodMessage",e)},expression:"chatData.isGoodMessage"}}),a("span",{staticClass:"font-14 color-303133 p-l-40"},[t._v("积分商城")]),a("el-switch",{staticClass:"m-l-10",attrs:{"active-text":"","inactive-text":""},on:{change:function(e){t.postSave(t.brandId)}},model:{value:t.chatData.isIntegralGoodMessage,callback:function(e){t.$set(t.chatData,"isIntegralGoodMessage",e)},expression:"chatData.isIntegralGoodMessage"}})],1),t._v(" "),t.chatData.isGoodMessage||t.chatData.isIntegralGoodMessage?a("div",{staticClass:"m-t-20"},[a("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleTab},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[t.chatData.isGoodMessage?a("el-tab-pane",{attrs:{label:"达摩微商城",name:"first"}},[a("el-table",{ref:"multipleTable",staticClass:"select-table",staticStyle:{width:"calc(100% - 3px)"},attrs:{data:t.goodsList,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"",label:"商品信息","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"img-wrap flex flex-align-center flex-pack-center border-box"},[a("img",{attrs:{src:e.row.goodImg,alt:""}})]),t._v(" "),a("div",{staticClass:"article-title flex flex-column"},[a("p",{staticClass:"font-14 color-606266"},[t._v(t._s(e.row.goodName))]),t._v(" "),a("p",{staticClass:"font-12 color-909399"},[t._v(t._s(e.row.goodCode))])])])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"单价(元)"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.goodPrice))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"库存"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.stock||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"总销量"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.saleAmount))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"发布时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("timeStampToYmd")(e.row.publishTime)))]),t._v(" "),a("div",[t._v(t._s(t._f("timeStampToHms")(e.row.publishTime)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{width:"150"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"导购发送图文的总人数统计,次日刷新",placement:"right"}},[a("span",{staticStyle:{cursor:"pointer"}},[t._v("导购发送图文人数"),a("i",{staticClass:"el-icon-info font-12 color-606266"})])])]}},{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.pushCount)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toSendDetail(e.$index,e.row,"1")}}},[t._v("发送记录")])]}}])})],1)],1):t._e(),t._v(" "),t.chatData.isIntegralGoodMessage?a("el-tab-pane",{attrs:{label:"积分商城",name:"second"}},[a("el-table",{ref:"multipleTable",staticClass:"select-table",staticStyle:{width:"calc(100% - 3px)"},attrs:{data:t.pointList,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"",label:"商品信息","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"img-wrap border-box"},[a("img",{attrs:{src:e.row.goodImg,alt:""}})]),t._v(" "),a("div",{staticClass:"article-title flex flex-column"},[a("p",{staticClass:"font-14 color-606266"},[t._v(t._s(e.row.goodName))]),t._v(" "),a("p",{staticClass:"font-12 color-909399"},[t._v(t._s(e.row.goodCode))])])])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"积分费用"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.integral))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"现金费用"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.goodPrice))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"创建时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("timeStampToYmd")(e.row.publishTime)))]),t._v(" "),a("div",[t._v(t._s(t._f("timeStampToHms")(e.row.publishTime)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{width:"150"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"导购发送图文的总人数统计,次日刷新",placement:"right"}},[a("span",{staticStyle:{cursor:"pointer"}},[t._v("导购发送图文人数"),a("i",{staticClass:"el-icon-info font-12 color-606266"})])])]}},{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.pushCount)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toSendDetail(e.$index,e.row,"2")}}},[t._v("发送记录")])]}}])})],1)],1):t._e()],1),t._v(" "),0!=t.goodsList.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{"current-page":t.pageNum,"page-size":t.pageSize,layout:"total, prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1):t._e()],1):t._e()]):t._e(),t._v(" "),51==t.activeTab?a("div",{staticClass:"online-chat-card"},[t._m(3),t._v(" "),a("div",{staticClass:"m-t-20 m-b-20 flex flex-space-between"},[a("div",{staticClass:"card-top-left"},[a("span",{staticClass:"font-14 color-303133"},[t._v("卡券")]),a("el-switch",{staticClass:"m-l-20",attrs:{"active-text":"","inactive-text":""},on:{change:function(e){t.postSaveCard(t.brandId)}},model:{value:t.cardCoupChatSwitch,callback:function(e){t.cardCoupChatSwitch=e},expression:"cardCoupChatSwitch"}}),a("span",{staticClass:"font-14 color-909399 p-l-24"},[t._v("开启后,导购与会员聊天可发送GIC卡券")])],1),t._v(" "),a("div",{staticClass:"card-top-right"},[a("el-button",{attrs:{disabled:!t.cardCoupChatSwitch,type:"primary"},on:{click:t.toNewCard}},[t._v("新建卡券")])],1)]),t._v(" "),t.cardCoupChatSwitch?a("card-list-table",{attrs:{activeTab:t.activeTab,tableData:t.cardListData},on:{delCard:t.delCard}}):t._e(),t._v(" "),t.cardListData.length&&t.cardCoupChatSwitch?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{"current-page":t.pageNum,"page-size":t.pageSize,layout:"total, prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1):t._e()],1):t._e(),t._v(" "),52==t.activeTab?a("div",{staticClass:"online-chat-card_record"},[t._m(4),t._v(" "),a("card-record-table",{attrs:{activeTab:t.activeTab,tableData:t.cardRecordData}}),t._v(" "),t.cardRecordData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{"current-page":t.pageNum,"page-size":t.pageSize,layout:"total, prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1):t._e()],1):t._e()])])])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-alert el-alert--info",attrs:{role:"alert"}},[e("i",{staticClass:"el-alert__icon el-icon-info font-12 color-1890ff",staticStyle:{"align-self":"flex-start"}}),this._v(" "),e("div",{staticClass:"el-alert__content"},[e("span",{staticClass:"el-alert__title color-606266 font-14"},[this._v("配置说明:1.导购可在未和会员建立会话的情况下,发送消息给会员"),e("br"),this._v("\n 2.发送形式为模板消息,发送模板消息即表示发送了一条消息通知,并非建立主动会话"),e("br"),this._v("\n 3.频繁使用模板消息,可能导致微信封闭模板消息及会员取关率增加,请谨慎使用")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-alert el-alert--info",attrs:{role:"alert"}},[e("i",{staticClass:"el-alert__icon el-icon-info font-12 color-1890ff"}),this._v(" "),e("div",{staticClass:"el-alert__content"},[e("span",{staticClass:"el-alert__title color-606266 font-14"},[this._v("配置说明:选取微信营销素材库中的图文,配置后,导购可以选择对应的营销图文发送给会员")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-alert el-alert--info",attrs:{role:"alert"}},[e("i",{staticClass:"el-alert__icon el-icon-info font-12 color-1890ff"}),this._v(" "),e("div",{staticClass:"el-alert__content"},[e("span",{staticClass:"el-alert__title color-606266 font-14"},[this._v("配置说明:选取达摩微商城及积分商城中的商品,配置后,导购可以选择对应的商品发送给会员")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-alert el-alert--info",attrs:{role:"alert"}},[e("i",{staticClass:"el-alert__icon el-icon-info font-12 color-1890ff",staticStyle:{"align-self":"flex-start"}}),this._v(" "),e("div",{staticClass:"el-alert__content"},[e("span",{staticClass:"el-alert__title color-606266 font-14"},[this._v("选取GIC中卡券营销适用好办的卡券,配置后,导购可以选择对应的卡券发送给会员")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-alert el-alert--info",attrs:{role:"alert"}},[e("i",{staticClass:"el-alert__icon el-icon-info font-12 color-1890ff",staticStyle:{"align-self":"flex-start"}}),this._v(" "),e("div",{staticClass:"el-alert__content"},[e("span",{staticClass:"el-alert__title color-606266 font-14"},[this._v("当前卡券记录中发送数量、领取数量、领取率、使用数量、核销率、销售额为gic总体卡券记录,包含好办使用记录。后续更新将统计好办渠道卡券记录")])])])}]};var h=a("VU/8")(f,m,!1,function(t){a("1usg")},"data-v-31a27156",null);e.default=h.exports}});
\ No newline at end of file
webpackJsonp([28],{"1usg":function(t,e){},"33SU":function(t,e){},"AKs/":function(t,e){},ahzF:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s={name:"card-record-table",props:{tableData:{type:[Array,Object],default:function(){return[]}},activeTab:{type:[String,Number],default:function(){return"52"}}},data:function(){return{}},filters:{percenteNum:function(t){return t>0?Number(100*t).toFixed(2)+"%":Number(t).toFixed(2)+"%"}},methods:{toSendDetail:function(t,e,a){this.$router.push("/"+(1==a?"cardSendRecord":"cardGetRecord")+"?activeTab="+this.activeTab+"&appIcon="+this.$route.query.appIcon+"&coupCardId="+e.coupCardId)}}},o={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"card-record-table m-t-20"},[a("el-table",{ref:"multipleTable",staticClass:"select-table",staticStyle:{width:"calc(100% - 3px)"},attrs:{data:t.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"",label:"卡券名称","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.cardName)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"",width:"96"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"发送卡券数量,包含扫码发券数",placement:"right"}},[a("span",{staticStyle:{cursor:"pointer"}},[t._v("发送数量"),a("i",{staticClass:"el-icon-info font-12 color-606266"})])])]}},{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.issuingQuantity)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"领取数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.getedQuantity))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"领取率"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t._f("percenteNum")(e.row.getedRate)))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"使用数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(e.row.usageQuantity))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"核销率"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("percenteNum")(e.row.verificationRate)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"销售额"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(e.row.saleAmount))])]}}])}),t._v(" "),a("el-table-column",{attrs:{width:"150"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"导购发送卡券的总人数统计,次日刷新",placement:"right"}},[a("span",{staticStyle:{cursor:"pointer"}},[t._v("导购发送卡券人数"),a("i",{staticClass:"el-icon-info font-12 color-606266"})])])]}},{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.sendMemberCount)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",width:"200",label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toSendDetail(e.$index,e.row,"1")}}},[t._v("发送记录")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toSendDetail(e.$index,e.row,"2")}}},[t._v("领取记录")])]}}])})],1)],1)},staticRenderFns:[]};var i=a("VU/8")(s,o,!1,function(t){a("AKs/")},"data-v-0698d03e",null).exports,r={name:"card-list-table",props:{tableData:{type:[Array,Object],default:function(){return[]}},activeTab:{type:[String,Number],default:function(){return"51"}}},data:function(){return{}},methods:{toDel:function(t,e){var a=this;a.$confirm("是否要删除选中的分类?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.$emit("delCard",e.coupCardId)}).catch(function(){})},toEdit:function(t,e){this.$router.push("/newCard?activeTab="+this.activeTab+"&appIcon="+this.$route.query.appIcon+"&coupCardId="+e.coupCardId)}}},l={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-table",{ref:"multipleTable",staticClass:"select-table",staticStyle:{width:"calc(100% - 3px)"},attrs:{data:t.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"",label:"卡券名称","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.cardName)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"卡券类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.cardType?a("span",[t._v("抵金券")]):t._e(),t._v(" "),1==e.row.cardType?a("span",[t._v("折扣券")]):t._e(),t._v(" "),2==e.row.cardType?a("span",[t._v("兑换券")]):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"有效期","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.effectDateString||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"库存"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(e.row.couponStock))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toEdit(e.$index,e.row)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toDel(e.$index,e.row)}}},[t._v("删除")])]}}])})],1)],1)},staticRenderFns:[]};var n=a("VU/8")(r,l,!1,function(t){a("33SU")},"data-v-552374d2",null).exports,c=a("P9l9"),d=a("Ch4/"),u=a("3E4D"),p=a("PI0u"),f={name:"online-chat",props:{brandId:{type:String,default:function(){return""}}},components:{cardRecordTable:i,cardListTable:n},data:function(){return{activeTab:"1",leftData:[{tabId:"1",tabName:"短信提醒"},{tabId:"2",tabName:"模板消息"},{tabId:"3",tabName:"图文"},{tabId:"4",tabName:"商品"},{tabId:"5",tabName:"卡券",children:[{tabId:"51",tabName:"卡券列表"},{tabId:"52",tabName:"卡券记录"}]}],chatData:{chatFlag:!1,isMessageRemind:!1,messageRemindTime:"",isTemplateMessage:!1,isImgMessage:!1,isGoodMessage:!1,isIntegralGoodMessage:!1},rules:{messageRemindTime:[{required:!0,message:"请选择时间",trigger:"blur"}]},templateName:"",articleList:[],pageSize:4,pageNum:1,total:0,activeName:"first",goodsList:[],pointList:[],cardCoupChatSwitch:!1,cardListData:[],cardRecordData:[]}},methods:{toNewCard:function(){this.$router.push("/newCard?activeTab="+this.activeTab+"&appIcon="+this.$route.query.appIcon)},delCard:function(t){this.delCardList(t)},toSendDetail:function(t,e,a){this.$router.push("/sendRecord?activeTab="+this.activeTab+"&tabType="+a+"&appIcon="+this.$route.query.appIcon+"&relatedId="+(e.id||e.goodId))},changeChatFlag:function(){this.postSave(this.brandId)},handleCurrentChange:function(t){this.pageNum=t,3==this.activeTab?this.getArticleList(this.brandId):4==this.activeTab?"first"==this.activeName?this.getGoodsList(this.brandId):this.getPointList(this.brandId):51==this.activeTab?this.getCardList(this.brandId):52==this.activeTab&&this.getCardRecord(this.brandId)},saveData:Object(p.a)(function(t){var e=this;e.$refs[t].validate(function(t){if(!t)return!1;e.postSave(e.brandId)})},500),postSave:function(t){var e=this;e.pageNum=1,e.chatData.isIntegralGoodMessage&&!e.chatData.isGoodMessage&&(e.activeName="second");var a={brandId:t,chatFlag:e.chatData.chatFlag?1:0,isMessageRemind:e.chatData.isMessageRemind?1:0,messageRemindTime:e.chatData.messageRemindTime,isTemplateMessage:e.chatData.isTemplateMessage?1:0,isImgMessage:e.chatData.isImgMessage?1:0,isGoodMessage:e.chatData.isGoodMessage?1:0,isIntegralGoodMessage:e.chatData.isIntegralGoodMessage?1:0,mainStoreFlag:e.chatData.mainStoreFlag,minorStoreFlag:e.chatData.minorStoreFlag,openCardStoreFlag:e.chatData.openCardStoreFlag,clerkSeeOtherFlag:e.chatData.clerkSeeOtherFlag,allowGuideContact:e.chatData.allowGuideContact,allowGuideMobile:e.chatData.allowGuideMobile,allowGuideMessage:e.chatData.allowGuideMessage,allowGuideOnlineChat:e.chatData.allowGuideOnlineChat,isSeeAuthMember:e.chatData.isSeeAuthMember};Object(c.e)("/haoban-app-member-web/customer/save-member-show-setting",a).then(function(a){var s=a.data;if(1==s.errorCode)return u.a.showmsg("保存成功","success"),3==e.activeTab&&e.chatData.isImgMessage&&e.getArticleList(t),void(4==e.activeTab&&(e.chatData.isGoodMessage&&e.getGoodsList(t),e.chatData.isIntegralGoodMessage&&e.getPointList(t),e.chatData.isIntegralGoodMessage&&!e.chatData.isGoodMessage&&(e.activeName="second"),e.chatData.isGoodMessage&&!e.chatData.isIntegralGoodMessage&&(e.activeName="first")));d.a.errorMsg(s)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},changeTab:function(t){if(t.children)return this.activeTab=t.children[0].tabId,this.getCardSet(this.brandId),!1;this.pageNum=1,this.activeTab=t.tabId,this.getChatSet(this.brandId),this.getCardSet(this.brandId)},handleTab:function(t,e){this.pageNum=1,"first"==t.name?this.getGoodsList(this.brandId):this.getPointList(this.brandId)},getTemplate:function(t){var e=this,a={brandId:t};Object(c.e)("/haoban-app-member-web/customer/find_message_template",a).then(function(t){var a=t.data;1!=a.errorCode?d.a.errorMsg(a):e.templateName=a.result||"--"}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getGoodsList:function(t){var e=this,a={pageSize:e.pageSize,pageNum:e.pageNum,brandId:t};Object(c.e)("/haoban-app-member-web/customer/find_good_list",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.goodsList=a.result.list||[],void("first"==e.activeName&&(e.total=a.result.total));e.goodsList=[],e.total=0,d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getPointList:function(t){var e=this,a={brandId:t,pageSize:e.pageSize,pageNum:e.pageNum};Object(c.e)("/haoban-app-member-web/customer/find_integal_good_list",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.pointList=a.result.list||[],void("second"==e.activeName&&(e.total=a.result.total));e.pointList=[],e.total=0,d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getArticleList:function(t){var e=this,a={brandId:t,pageSize:e.pageSize,pageNum:e.pageNum};Object(c.e)("/haoban-app-member-web/customer/find_img_list",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.articleList=a.result.list||[],void(e.total=a.result.total);e.articleList=[],e.total=0,d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},delCardList:function(t){var e=this,a={brandId:e.brandId,coupCardId:t};Object(c.e)("/haoban-app-member-web/cardCoupon/del-card-coup",a).then(function(t){var a=t.data;if(1==a.errorCode)return u.a.showmsg("删除成功","success"),void e.getCardList(e.brandId);d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getCardList:function(t){var e=this,a={brandId:t,pageSize:e.pageSize,pageNum:e.pageNum};Object(c.e)("/haoban-app-member-web/cardCoupon/find-card-page",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.cardListData=a.result.list||[],void(e.total=a.result.pageInfo.total);d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getCardRecord:function(t){var e=this,a={brandId:t,pageSize:e.pageSize,pageNum:e.pageNum};Object(c.e)("/haoban-app-member-web/cardCoupon/find-card-log-page",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.cardRecordData=a.result.list||[],void(e.total=a.result.pageInfo.total);d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},postSaveCard:function(t){var e=this,a={cardCoupChatSwitch:e.cardCoupChatSwitch?1:0,brandId:t};Object(c.e)("/haoban-app-member-web/customer/save-card-coup-setting",a).then(function(t){var a=t.data;if(1==a.errorCode)return u.a.showmsg("设置成功","success"),void(e.cardCoupChatSwitch&&e.getCardList(e.brandId));d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getCardSet:function(t){var e=this,a={brandId:t};Object(c.e)("/haoban-app-member-web/customer/find-card-coup-setting",a).then(function(t){var a=t.data;if(1==a.errorCode)return a.result.cardCoupChatSwitch=1==a.result.cardCoupChatSwitch,e.cardCoupChatSwitch=a.result.cardCoupChatSwitch,"51"==e.activeTab&&e.cardCoupChatSwitch&&(e.pageSize=4,e.getCardList(e.brandId)),void("52"==e.activeTab&&(e.pageSize=6,e.getCardRecord(e.brandId)));d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getChatSet:function(t){var e=this,a={brandId:t};Object(c.e)("/haoban-app-member-web/customer/find-online-chat-setting",a).then(function(a){var s=a.data;1!=s.errorCode?d.a.errorMsg(s):s.result&&(s.result.chatFlag=1==s.result.chatFlag,s.result.isMessageRemind=1==s.result.isMessageRemind,s.result.messageRemindTime=s.result.messageRemindTime,s.result.isTemplateMessage=1==s.result.isTemplateMessage,s.result.isImgMessage=1==s.result.isImgMessage,s.result.isGoodMessage=1==s.result.isGoodMessage,s.result.isIntegralGoodMessage=1==s.result.isIntegralGoodMessage,e.chatData=s.result,2==e.activeTab&&e.getTemplate(t),3==e.activeTab&&s.result.isImgMessage&&(e.pageSize=4,e.getArticleList(t)),4==e.activeTab&&(e.pageSize=3,s.result.isGoodMessage&&e.getGoodsList(t),s.result.isIntegralGoodMessage&&e.getPointList(t),s.result.isIntegralGoodMessage&&!s.result.isGoodMessage&&(e.activeName="second"),s.result.isGoodMessage&&!s.result.isIntegralGoodMessage&&(e.activeName="first")))}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(t,e){""!=t&&(this.getChatSet(t),this.getCardSet(t))}},mounted:function(){this.$emit("showTab","2"),""!=this.brandId&&(this.getChatSet(this.brandId),this.getCardSet(this.brandId)),""!=this.$route.query.activeTab&&(this.activeTab=this.$route.query.activeTab||"1")}},m={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"online-chat-content border-box"},[a("div",{staticClass:"online-chat-switch"},[a("span",{staticClass:"font-14 color-606266 p-r-18"},[t._v("在线沟通")]),a("el-switch",{attrs:{"active-text":"","inactive-text":""},on:{change:t.changeChatFlag},model:{value:t.chatData.chatFlag,callback:function(e){t.$set(t.chatData,"chatFlag",e)},expression:"chatData.chatFlag"}}),a("span",{staticClass:"p-l-10 font-12 color-909399"},[t._v("若小程序使用了GIC 好办客服功能,会员将无法在公众号联系导购")])],1),t._v(" "),a("div",{staticClass:"online-chat-body"},[a("div",{staticClass:"flex"},[a("div",{staticClass:"online-chat-left"},[a("ul",[t._l(t.leftData,function(e,s){return[a("li",{key:s+"left",class:["online-chat-left_li",t.activeTab==e.tabId?"active-li":""],on:{click:function(a){t.changeTab(e)}}},[t._v(t._s(e.tabName))]),t._v(" "),e.children&&e.children.length?a("ul",{key:s+"left1"},[t._l(e.children,function(e,s){return[a("li",{key:s+"left12",class:["online-chat-left_li child-li",t.activeTab==e.tabId?"active-li":""],on:{click:function(a){t.changeTab(e)}}},[t._v(t._s(e.tabName))])]})],2):t._e()]})],2)]),t._v(" "),a("div",{staticClass:"online-chat-right border-box"},[a("div",{staticClass:"online-chat-right_body"},[1==t.activeTab?a("div",{staticClass:"online-chat-message"},[a("el-form",{ref:"msgForm",staticClass:"demo-ruleForm",attrs:{model:t.chatData,rules:t.rules,"label-width":"70px"}},[a("el-form-item",{attrs:{label:"短信提醒",prop:"name"}},[a("el-switch",{attrs:{"active-text":"","inactive-text":""},on:{change:function(e){t.postSave(t.brandId)}},model:{value:t.chatData.isMessageRemind,callback:function(e){t.$set(t.chatData,"isMessageRemind",e)},expression:"chatData.isMessageRemind"}}),a("span",{staticClass:"font-14 color-909399 p-l-24"},[t._v("开启后,会员发送消息,超出10条后,即发送短信给导购,每日最多触发一条短信,短信计入商家计费中心")])],1),t._v(" "),t.chatData.isMessageRemind?a("el-form-item",{attrs:{label:"",prop:"messageRemindTime"}},[a("span",{staticClass:"font-14 color-606266 p-r-10"},[t._v("下发时间设置")]),a("el-time-select",{attrs:{"picker-options":{start:"00:00",step:"00:15",end:"23:59"},placeholder:"选择时间"},model:{value:t.chatData.messageRemindTime,callback:function(e){t.$set(t.chatData,"messageRemindTime",e)},expression:"chatData.messageRemindTime"}}),a("span",{staticClass:"font-14 color-909399 p-l-20"},[t._v("该事件设置将在当日生效")])],1):t._e(),t._v(" "),t.chatData.isMessageRemind?a("el-form-item",{attrs:{label:""}},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.saveData("msgForm")}}},[t._v("保存")])],1):t._e()],1)],1):t._e(),t._v(" "),2==t.activeTab?a("div",{staticClass:"online-chat-template"},[t._m(0),t._v(" "),a("div",{staticClass:"m-t-23"},[a("span",{staticClass:"font-14 color-303133"},[t._v("模板消息")]),a("el-switch",{staticClass:"m-l-20",attrs:{"active-text":"","inactive-text":""},on:{change:function(e){t.postSave(t.brandId)}},model:{value:t.chatData.isTemplateMessage,callback:function(e){t.$set(t.chatData,"isTemplateMessage",e)},expression:"chatData.isTemplateMessage"}}),a("span",{staticClass:"font-14 color-909399 p-l-24"},[t._v("仅支持专属导购对会员发送模板消息,每个会员每个自然月模板消息发送次数不超过三次。设置后立即生效。")])],1),t._v(" "),a("div",{staticClass:"m-t-23"},[a("span",{staticClass:"font-14 color-303133"},[t._v("模板名字:")]),t._v(t._s(t.templateName))])]):t._e(),t._v(" "),3==t.activeTab?a("div",{staticClass:"online-chat-article"},[t._m(1),t._v(" "),a("div",{staticClass:"m-t-20"},[a("span",{staticClass:"font-14 color-303133"},[t._v("图文")]),a("el-switch",{staticClass:"m-l-20",attrs:{"active-text":"","inactive-text":""},on:{change:function(e){t.postSave(t.brandId)}},model:{value:t.chatData.isImgMessage,callback:function(e){t.$set(t.chatData,"isImgMessage",e)},expression:"chatData.isImgMessage"}}),a("span",{staticClass:"font-14 color-909399 p-l-24"},[t._v("开启后,导购与会员聊天可发送GIC图文")])],1),t._v(" "),t.chatData.isImgMessage?a("div",{staticClass:"m-t-20 p-l-50"},[a("el-table",{ref:"multipleTable",staticClass:"select-table",staticStyle:{width:"calc(100% - 3px)"},attrs:{data:t.articleList,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"",label:"图片","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"img-wrap border-box flex flex-align-center flex-pack-center"},[e.row.img?a("img",{attrs:{src:e.row.img,alt:""}}):t._e()]),t._v(" "),a("div",{staticClass:"article-title font-14 color-606266 p-l-10"},[t._v("\n "+t._s(e.row.title)+"\n ")])])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"作者","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.authorName||"--"))]}}])}),t._v(" "),a("el-table-column",{scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"导购发送图文的总人数统计,次日刷新",placement:"right"}},[a("span",{staticStyle:{cursor:"pointer"}},[t._v("导购发送图文人数"),a("i",{staticClass:"el-icon-info font-12 color-606266"})])])]}},{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.pushCount)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toSendDetail(e.$index,e.row,"4")}}},[t._v("发送记录")])]}}])})],1),t._v(" "),0!=t.articleList.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{"current-page":t.pageNum,"page-size":t.pageSize,layout:"total, prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1):t._e()],1):t._e()]):t._e(),t._v(" "),4==t.activeTab?a("div",{staticClass:"online-chat-goods"},[t._m(2),t._v(" "),a("div",{staticClass:"m-t-20"},[a("span",{staticClass:"font-14 color-303133"},[t._v("达摩微商城")]),a("el-switch",{staticClass:"m-l-10",attrs:{"active-text":"","inactive-text":""},on:{change:function(e){t.postSave(t.brandId)}},model:{value:t.chatData.isGoodMessage,callback:function(e){t.$set(t.chatData,"isGoodMessage",e)},expression:"chatData.isGoodMessage"}}),a("span",{staticClass:"font-14 color-303133 p-l-40"},[t._v("积分商城")]),a("el-switch",{staticClass:"m-l-10",attrs:{"active-text":"","inactive-text":""},on:{change:function(e){t.postSave(t.brandId)}},model:{value:t.chatData.isIntegralGoodMessage,callback:function(e){t.$set(t.chatData,"isIntegralGoodMessage",e)},expression:"chatData.isIntegralGoodMessage"}})],1),t._v(" "),t.chatData.isGoodMessage||t.chatData.isIntegralGoodMessage?a("div",{staticClass:"m-t-20"},[a("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleTab},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[t.chatData.isGoodMessage?a("el-tab-pane",{attrs:{label:"达摩微商城",name:"first"}},[a("el-table",{ref:"multipleTable",staticClass:"select-table",staticStyle:{width:"calc(100% - 3px)"},attrs:{data:t.goodsList,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"",label:"商品信息","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"img-wrap flex flex-align-center flex-pack-center border-box"},[a("img",{attrs:{src:e.row.goodImg,alt:""}})]),t._v(" "),a("div",{staticClass:"article-title flex flex-column"},[a("p",{staticClass:"font-14 color-606266"},[t._v(t._s(e.row.goodName))]),t._v(" "),a("p",{staticClass:"font-12 color-909399"},[t._v(t._s(e.row.goodCode))])])])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"单价(元)"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.goodPrice))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"库存"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.stock||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"总销量"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.saleAmount))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"发布时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("timeStampToYmd")(e.row.publishTime)))]),t._v(" "),a("div",[t._v(t._s(t._f("timeStampToHms")(e.row.publishTime)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{width:"150"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"导购发送图文的总人数统计,次日刷新",placement:"right"}},[a("span",{staticStyle:{cursor:"pointer"}},[t._v("导购发送图文人数"),a("i",{staticClass:"el-icon-info font-12 color-606266"})])])]}},{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.pushCount)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toSendDetail(e.$index,e.row,"1")}}},[t._v("发送记录")])]}}])})],1)],1):t._e(),t._v(" "),t.chatData.isIntegralGoodMessage?a("el-tab-pane",{attrs:{label:"积分商城",name:"second"}},[a("el-table",{ref:"multipleTable",staticClass:"select-table",staticStyle:{width:"calc(100% - 3px)"},attrs:{data:t.pointList,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"",label:"商品信息","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"img-wrap border-box"},[a("img",{attrs:{src:e.row.goodImg,alt:""}})]),t._v(" "),a("div",{staticClass:"article-title flex flex-column"},[a("p",{staticClass:"font-14 color-606266"},[t._v(t._s(e.row.goodName))]),t._v(" "),a("p",{staticClass:"font-12 color-909399"},[t._v(t._s(e.row.goodCode))])])])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"积分费用"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.integral))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"现金费用"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.goodPrice))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"创建时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("timeStampToYmd")(e.row.publishTime)))]),t._v(" "),a("div",[t._v(t._s(t._f("timeStampToHms")(e.row.publishTime)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{width:"150"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"导购发送图文的总人数统计,次日刷新",placement:"right"}},[a("span",{staticStyle:{cursor:"pointer"}},[t._v("导购发送图文人数"),a("i",{staticClass:"el-icon-info font-12 color-606266"})])])]}},{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.pushCount)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toSendDetail(e.$index,e.row,"2")}}},[t._v("发送记录")])]}}])})],1)],1):t._e()],1),t._v(" "),0!=t.goodsList.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{"current-page":t.pageNum,"page-size":t.pageSize,layout:"total, prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1):t._e()],1):t._e()]):t._e(),t._v(" "),51==t.activeTab?a("div",{staticClass:"online-chat-card"},[t._m(3),t._v(" "),a("div",{staticClass:"m-t-20 m-b-20 flex flex-space-between"},[a("div",{staticClass:"card-top-left"},[a("span",{staticClass:"font-14 color-303133"},[t._v("卡券")]),a("el-switch",{staticClass:"m-l-20",attrs:{"active-text":"","inactive-text":""},on:{change:function(e){t.postSaveCard(t.brandId)}},model:{value:t.cardCoupChatSwitch,callback:function(e){t.cardCoupChatSwitch=e},expression:"cardCoupChatSwitch"}}),a("span",{staticClass:"font-14 color-909399 p-l-24"},[t._v("开启后,导购与会员聊天可发送GIC卡券")])],1),t._v(" "),a("div",{staticClass:"card-top-right"},[a("el-button",{attrs:{disabled:!t.cardCoupChatSwitch,type:"primary"},on:{click:t.toNewCard}},[t._v("新建卡券")])],1)]),t._v(" "),t.cardCoupChatSwitch?a("card-list-table",{attrs:{activeTab:t.activeTab,tableData:t.cardListData},on:{delCard:t.delCard}}):t._e(),t._v(" "),t.cardListData.length&&t.cardCoupChatSwitch?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{"current-page":t.pageNum,"page-size":t.pageSize,layout:"total, prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1):t._e()],1):t._e(),t._v(" "),52==t.activeTab?a("div",{staticClass:"online-chat-card_record"},[t._m(4),t._v(" "),a("card-record-table",{attrs:{activeTab:t.activeTab,tableData:t.cardRecordData}}),t._v(" "),t.cardRecordData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{"current-page":t.pageNum,"page-size":t.pageSize,layout:"total, prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1):t._e()],1):t._e()])])])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-alert el-alert--info",attrs:{role:"alert"}},[e("i",{staticClass:"el-alert__icon el-icon-info font-12 color-1890ff",staticStyle:{"align-self":"flex-start"}}),this._v(" "),e("div",{staticClass:"el-alert__content"},[e("span",{staticClass:"el-alert__title color-606266 font-14"},[this._v("配置说明:1.导购可在未和会员建立会话的情况下,发送消息给会员"),e("br"),this._v("\n 2.发送形式为模板消息,发送模板消息即表示发送了一条消息通知,并非建立主动会话"),e("br"),this._v("\n 3.频繁使用模板消息,可能导致微信封闭模板消息及会员取关率增加,请谨慎使用")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-alert el-alert--info",attrs:{role:"alert"}},[e("i",{staticClass:"el-alert__icon el-icon-info font-12 color-1890ff"}),this._v(" "),e("div",{staticClass:"el-alert__content"},[e("span",{staticClass:"el-alert__title color-606266 font-14"},[this._v("配置说明:选取微信营销素材库中的图文,配置后,导购可以选择对应的营销图文发送给会员")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-alert el-alert--info",attrs:{role:"alert"}},[e("i",{staticClass:"el-alert__icon el-icon-info font-12 color-1890ff"}),this._v(" "),e("div",{staticClass:"el-alert__content"},[e("span",{staticClass:"el-alert__title color-606266 font-14"},[this._v("配置说明:选取达摩微商城及积分商城中的商品,配置后,导购可以选择对应的商品发送给会员")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-alert el-alert--info",attrs:{role:"alert"}},[e("i",{staticClass:"el-alert__icon el-icon-info font-12 color-1890ff",staticStyle:{"align-self":"flex-start"}}),this._v(" "),e("div",{staticClass:"el-alert__content"},[e("span",{staticClass:"el-alert__title color-606266 font-14"},[this._v("选取GIC中卡券营销适用好办的卡券,配置后,导购可以选择对应的卡券发送给会员")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-alert el-alert--info",attrs:{role:"alert"}},[e("i",{staticClass:"el-alert__icon el-icon-info font-12 color-1890ff",staticStyle:{"align-self":"flex-start"}}),this._v(" "),e("div",{staticClass:"el-alert__content"},[e("span",{staticClass:"el-alert__title color-606266 font-14"},[this._v("当前卡券记录中发送数量、领取数量、领取率、使用数量、核销率、销售额为gic总体卡券记录,包含好办使用记录。后续更新将统计好办渠道卡券记录")])])])}]};var h=a("VU/8")(f,m,!1,function(t){a("1usg")},"data-v-31a27156",null);e.default=h.exports}});
\ No newline at end of file
webpackJsonp([28],{"/8XM":function(t,e){},"0qiV":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("Ke24"),n=a("joH8"),o=a("P9l9"),l=a("Ch4/"),s=a("3E4D"),r=a("PI0u"),c={name:"chat-log",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},components:{commonDetailTop:i.a,materialRecord:n.a},data:function(){var t=this;return{activeBrand:this.brandId,activeGroup:this.activeGroupId,activeId:"1",topMenuData:[{id:"1",name:"图文素材"}],tableData:[],conditionObj:{searchInput:"",searchType:"1",storeGroup:[],dateRange:[]},choiceDateCopy:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}],onPick:function(e){var a=e.maxDate,i=e.minDate;t.choiceDateCopy=[i.getTime()],a&&(t.choiceDateCopy=[])},disabledDate:function(e){if(t.choiceDateCopy.length){var a=t.choiceDateCopy[0]-31536e6,i=t.choiceDateCopy[0]+31536e6;return e.getTime()<a||e.getTime()>i||e.getTime()>Date.now()-864e4}return e.getTime()>Date.now()-864e4}},currentPage:1,pageSize:20,total:0,detailShow:!1,materialId:""}},methods:{toInput:Object(r.a)(function(t,e){this.currentPage=1,this.getTableList()},500),clearInput:function(){this.currentPage=1,this.getTableList()},changeDate:function(t){t||(this.choiceDateCopy=[],this.conditionObj.dateRange=[]),this.getTableList()},toCreate:function(){this.$router.push("/newImageText?appIcon="+this.$route.query.appIcon)},toSetTop:function(t,e){var a=this;a.$confirm(0==e?"置顶后,该素材将出现在手机好办营销素材顶部,确认置顶该素材吗":"确定「取消置顶」该条素材吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postTop(t,e)})},postTop:function(t,e){var a=this,i={materialId:t,topFlag:0==e?1:0};Object(o.a)("/haoban-app-material-web/material-to-top",i).then(function(t){var i=t.data;1==i.errorCode?(0==e?s.a.showmsg("置顶成功","success"):s.a.showmsg("取消置顶成功","success"),a.currentPage=1,a.getTableList()):s.a.showmsg(i.message,"warning")}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},handleSizeChange:function(t){this.pageSize=t,this.getTableList()},handleCurrentChange:function(t){this.currentPage=t,this.getTableList()},toDel:function(t,e){var a=this;a.$confirm("是否要删除该素材?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDel(e,t)}).catch(function(){})},postDel:function(t,e){var a=this,i={materialId:t.materialId};Object(o.e)("/haoban-app-material-web/material-del",i).then(function(t){var e=t.data;if(1==e.errorCode)return s.a.showmsg("删除成功","success"),void a.getTableList();l.a.errorMsg(e)}).catch(function(t){a.$message.error({duration:1e3,message:t.message})})},showDetail:function(t,e){this.$router.push("/newImageText?materialId="+e.materialId+"&appIcon="+this.$route.query.appIcon)},showRecord:function(t,e){this.detailShow=!0,this.materialId=e.materialId},hideDetailDialog:function(){this.detailShow=!1,this.materialId=""},getTableList:function(t){var e=this;e.conditionObj.dateRange||(e.conditionObj.dateRange=[]);var a={materialTitle:e.conditionObj.searchInput||"",startTimeStr:e.conditionObj.dateRange[0]||"",endTimeStr:e.conditionObj.dateRange[1]||"",relatedType:1,pageNum:e.currentPage,pageSize:e.pageSize,brandId:e.activeBrand};Object(o.a)("/haoban-app-material-web/material-page",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.tableData=a.result.list||[],e.total=a.result.total,!1;l.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(t,e){t&&(this.activeBrand=t,this.getTableList())},activeGroupId:function(t,e){t&&(this.activeGroup=t)}},mounted:function(){this.$emit("showTab","1"),this.brandId&&this.getTableList()}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"chat-log border-box"},[a("common-detail-top",{attrs:{topMenuData:t.topMenuData,activeId:t.activeId}}),t._v(" "),a("div",{staticClass:"chat-log-content border-box"},[a("div",{staticClass:"table-condition flex flex-space-between m-b-23"},[a("div",{staticClass:"table-condition-left"},[a("el-input",{staticClass:"w-264",attrs:{placeholder:"请输入标题",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.searchInput);var a}},model:{value:t.conditionObj.searchInput,callback:function(e){t.$set(t.conditionObj,"searchInput",e)},expression:"conditionObj.searchInput"}}),t._v(" "),a("el-date-picker",{staticClass:"m-l-10",attrs:{"prefix-icon":"el-icon-time","picker-options":t.pickerOptions,editable:!1,"value-format":"yyyy-MM-dd",type:"daterange",align:"right","unlink-panels":"","range-separator":"~","start-placeholder":"开始时间","end-placeholder":"结束时间"},on:{change:t.changeDate},model:{value:t.conditionObj.dateRange,callback:function(e){t.$set(t.conditionObj,"dateRange",e)},expression:"conditionObj.dateRange"}})],1),t._v(" "),a("div",{staticClass:"table-condition-right"},[a("el-button",{attrs:{type:"primary"},on:{click:t.toCreate}},[t._v("选择图文")])],1)]),t._v(" "),a("el-table",{ref:"multipleTable",staticClass:"select-table",style:{width:"100%",minHeight:t.tableH},attrs:{data:t.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"标题","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.materialTitle||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"图文"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"img-wrap border-box flex flex-align-center flex-pack-center"},[e.row.imageTextUrl?a("img",{attrs:{src:e.row.imageTextUrl,alt:""}}):t._e()]),t._v(" "),a("div",{staticClass:"article-title font-14 color-606266 p-l-10"},[t._v("\n "+t._s(e.row.imageTextTitle)+"\n ")])])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"点赞数","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.thumbsUpCount||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"转发数","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.tranferCount||"--"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"发布时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"219"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.toSetTop(e.row.materialId,e.row.topFlag)}}},[t._v(t._s(1==e.row.topFlag?"取消置顶":"置顶"))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.showDetail(e.$index,e.row)}}},[t._v("查看")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.showRecord(e.$index,e.row)}}},[t._v("记录")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toDel(e.$index,e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),0!=t.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[20,40,60,80],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)],1),t._v(" "),a("material-record",{attrs:{materialId:t.materialId,detailShow:t.detailShow},on:{hideDetailDialog:t.hideDetailDialog}})],1)},staticRenderFns:[]};var d=a("VU/8")(c,u,!1,function(t){a("S5V/")},"data-v-05be2f20",null);e.default=d.exports},"S5V/":function(t,e){},joH8:function(t,e,a){"use strict";var i=a("P9l9"),n=a("Ch4/"),o=a("PI0u"),l={name:"material-record",props:{detailShow:{type:Boolean,default:!1},materialId:{type:String,default:""}},data:function(){return{customDialog:!1,activeName:"first",tableData:[],conditionObj:{searchInput:"",materialId:this.materialId},currentPage:1,pageSize:5,total:0}},methods:{handleTab:function(){this.currentPage=1,this.getTableList()},toInput:Object(o.a)(function(t,e){this.currentPage=1,this.getTableList()},500),clearInput:function(){this.currentPage=1,this.getTableList()},handleSizeChange:function(t){this.pageSize=t,this.getTableList()},handleCurrentChange:function(t){this.currentPage=t,this.getTableList()},handleClose:function(t){t(),this.hideDialog()},customCancel:function(){this.hideDialog()},hideDialog:function(){this.customDialog=!1,this.$emit("hideDetailDialog")},getTableList:function(t){var e=this,a={materialId:e.conditionObj.materialId,imgTextTitle:e.conditionObj.searchInput||"",relatedType:"first"==e.activeName?2:1,pageNum:e.currentPage,pageSize:e.pageSize,brandId:e.activeBrand};Object(i.a)("/haoban-app-material-web/material-log",a).then(function(t){var a=t.data;if(1==a.errorCode)return e.tableData=a.result.list||[],e.total=a.result.total,!1;n.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{detailShow:function(t,e){this.customDialog=t},materialId:function(t,e){t&&(this.conditionObj.materialId=t,this.currentPage=1,this.getTableList())}},mounted:function(){this.customDialog=this.detailShow,this.materialId&&(this.conditionObj.materialId=this.materialId,this.currentPage=1,this.getTableList())}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"show",rawName:"v-show",value:t.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:"记录",visible:t.customDialog,width:"739px","before-close":t.handleClose},on:{"update:visible":function(e){t.customDialog=e}}},[a("div",{staticClass:"edit-dialog-body"},[a("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleTab},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"点赞记录",name:"first"}},[a("div",{staticClass:"m-b-20 flex"},[a("el-input",{staticClass:"w-223",attrs:{placeholder:"请输入姓名/手机号/code","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.searchInput);var a}},model:{value:t.conditionObj.searchInput,callback:function(e){t.$set(t.conditionObj,"searchInput",e)},expression:"conditionObj.searchInput"}}),t._v(" "),a("span",{staticClass:"p-l-10 l-h-32"},[t._v("共"+t._s(t.total)+"条点赞记录")])],1),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,height:"332"}},[a("el-table-column",{attrs:{label:"点赞人",width:"150","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex flex-align-center flex-pack-center bg-82C5FF table-head-pic"},[e.row.headImg?a("img",{attrs:{src:e.row.headImg,alt:"img"}}):a("i",{staticClass:"iconfont icon-yewuduanmorentouxian"})]),t._v(" "),a("div",{staticClass:"flex flex-column apply-info"},[a("span",{staticClass:"text-ellipsis"},[t._v(t._s(e.row.userName))]),t._v(" "),a("span",{staticClass:"font-13 text-ellipsis"},[t._v(t._s(e.row.storeName))])])])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"手机号","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.phoneNumber||"--")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"点赞时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])})],1)],1),t._v(" "),a("el-tab-pane",{attrs:{label:"转发记录",name:"second"}},[a("div",{staticClass:"m-b-20 flex"},[a("el-input",{staticClass:"w-223",attrs:{placeholder:"请输入姓名/手机号/code","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.searchInput);var a}},model:{value:t.conditionObj.searchInput,callback:function(e){t.$set(t.conditionObj,"searchInput",e)},expression:"conditionObj.searchInput"}}),t._v(" "),a("span",{staticClass:"p-l-10 l-h-32"},[t._v("共"+t._s(t.total)+"条转发记录")])],1),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,height:"332"}},[a("el-table-column",{attrs:{label:"转发人",width:"150","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex flex-align-center flex-pack-center bg-82C5FF table-head-pic"},[e.row.headImg?a("img",{attrs:{src:e.row.headImg,alt:"img"}}):a("i",{staticClass:"iconfont icon-yewuduanmorentouxian"})]),t._v(" "),a("div",{staticClass:"flex flex-column apply-info"},[a("span",{staticClass:"text-ellipsis"},[t._v(t._s(e.row.userName))]),t._v(" "),a("span",{staticClass:"font-13 text-ellipsis"},[t._v(t._s(e.row.storeName))])])])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"手机号","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.phoneNumber||"--")+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"转发时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToYmd")(e.row.createTime)))]),t._v(" "),a("div",{staticClass:"color-606266 line-18"},[t._v(t._s(t._f("timeStampToHms")(e.row.createTime)))])]}}])})],1)],1)],1),t._v(" "),0!=t.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[20,40,60,80],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)])],1)},staticRenderFns:[]};var r=a("VU/8")(l,s,!1,function(t){a("/8XM")},"data-v-66a1accb",null);e.a=r.exports}});
\ No newline at end of file
webpackJsonp([39],{"0UFt":function(e,t){},"A/XQ":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s,r=a("Xxa5"),n=a.n(r),i=a("exGp"),o=a.n(i),l=a("mvHQ"),c=a.n(l),m=a("l46T"),u=a("P9l9"),f=a("Ch4/"),d=a("3E4D"),p=a("PI0u"),b={name:"create-work-class",components:{limitInput:m.a},props:{workClassShow:{type:Boolean,default:!1},classesId:{type:String,default:""}},data:function(){var e=this;return{enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,customDialog:!1,tableData:[],conditionObj:{searchInput:"",classesId:this.classesId},formData:{classesId:"",classesName:"",times:"1",classessTimesJson:[{startTime:"9:00",endTime:"18:00",allowStartBeginTime:"",forbidStartBeginTime:[],allowStartEndTime:"",forbidStartEndTime:[],allowEndStartTime:"",forbidEndStartTime:[],allowEndEndTime:"",forbidEndEndTime:[]}],clockType:!1,relaxFlag:!1,relaxStartDate:"12:00",relaxEndDate:"13:00",allowLateFlag:!1,moreLateFlag:!1,mostLateFlag:!1,allowLateDate:"30",moreLateDate:"35",mostLateDate:"60",lateRule:!1,lateRuleJson:[]},rules:{classesName:[{required:!0,message:"请输入班次名称",trigger:"blur"}],times:[{required:!0,validator:function(t,a,s){""===a?s(new Error("请设置次数")):e.formData.classessTimesJson.map(function(e){return e.startTime}).includes("")||e.formData.classessTimesJson.map(function(e){return e.endTime}).includes("")?s(new Error("请完善次数限制")):e.formData.clockType&&(e.formData.classessTimesJson.map(function(e){return e.allowStartBeginTime}).includes("")||e.formData.classessTimesJson.map(function(e){return e.allowStartEndTime}).includes("")||e.formData.classessTimesJson.map(function(e){return e.allowEndStartTime}).includes("")||e.formData.classessTimesJson.map(function(e){return e.allowEndEndTime}).includes(""))?s(new Error("请完善次数限制")):s()},trigger:"change"}]},maxLate:10}},methods:{checkNextFlag:function(e,t){var a=String(e).split(":"),s=String(t).split(":");return parseInt(a[0])>parseInt(s[0])||parseInt(a[0])>=parseInt(s[0])&&parseInt(a[1])>=parseInt(s[1])},changeTimes:function(e){if(1==e&&this.formData.classessTimesJson.length>=2&&this.formData.classessTimesJson.splice(1,2),2==e)if(this.formData.classessTimesJson.length>=2)this.formData.classessTimesJson.splice(2,1);else{var t=this.formData.classessTimesJson[0].endTime.split(":");this.formData.classessTimesJson.push({startTime:(1+Number(t[0])<24?1+Number(t[0]):1+Number(t[0])-24)+":"+t[1],endTime:(4+Number(t[0])<24?4+Number(t[0]):4+Number(t[0])-24)+":"+t[1],allowStartBeginTime:"",allowStartEndTime:"",allowEndStartTime:"",allowEndEndTime:""})}if(3==e)if(this.formData.classessTimesJson.length>=2){var a=this.formData.classessTimesJson[1].endTime.split(":");this.formData.classessTimesJson.push({startTime:(1+Number(a[0])<24?1+Number(a[0]):1+Number(a[0])-24)+":"+a[1],endTime:(4+Number(a[0])<24?4+Number(a[0]):4+Number(a[0])-24)+":"+a[1],allowStartBeginTime:"",allowStartEndTime:"",allowEndStartTime:"",allowEndEndTime:""})}else{var s=this.formData.classessTimesJson[0].endTime.split(":");this.formData.classessTimesJson.push({startTime:(1+Number(s[0])<24?1+Number(s[0]):1+Number(s[0])-24)+":"+s[1],endTime:(4+Number(s[0])<24?4+Number(s[0]):4+Number(s[0])-24)+":"+s[1],allowStartBeginTime:"",allowStartEndTime:"",allowEndStartTime:"",allowEndEndTime:""})}},hourTohm:function(e){var t=String(e)+":00";return String(e).includes(".")&&(t=String(e).split(".")[0]+":"+60*String(e).split(".")[1]/10),t},hmPlushm:function(e,t){var a=String(e),s=String(t),r=parseInt(a.split(":")[0])+parseInt(s.split(":")[0]),n=parseInt(a.split(":")[1])+parseInt(s.split(":")[1]);return n>=60&&(n-=60,r+=1),r>=24&&(r-=24),(r<10?"0"+r:r)+":"+(n<10?"0"+n:n)},hmMinuxhm:function(e,t){var a=String(e),s=String(t),r=parseInt(a.split(":")[0])-parseInt(s.split(":")[0]),n=parseInt(a.split(":")[1])-parseInt(s.split(":")[1]);return n<0&&(n+=60,r-=1),r<0&&(r+=24),(r<10?"0"+r:r)+":"+(n<10?"0"+n:n)},timeDifference:function(e,t){var a=e.split(":"),s=parseInt(60*a[0])+parseInt(a[1]),r=t.split(":"),n=parseInt(60*r[0])+parseInt(r[1]);return Number((n-s)/60).toFixed(1)},compareDate:function(e,t){var a=new Date,s=String(e).split(":"),r=String(t).split(":");return a.setHours(s[0],s[1])<a.setHours(r[0],r[1])},forbidStartBeginTime:function(e){var t=this;return o()(n.a.mark(function a(){var s,r,i,o,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.t0=s,a.t1=e.startTime,a.next=6,s.hourTohm(8);case 6:return a.t2=a.sent,a.next=9,a.t0.hmMinuxhm.call(a.t0,a.t1,a.t2);case 9:return i=a.sent,a.next=12,s.hmMinuxhm(e.startTime,"00:01");case 12:if(o=a.sent,l=parseInt(e.startTime.split(":")[0])-8,a.t3=l<0,!a.t3){a.next=19;break}return a.next=18,s.compareDate(i,e.endTime);case 18:a.t3=a.sent;case 19:if(!a.t3){a.next=23;break}return a.next=22,s.hmMinuxhm(e.endTime,"00:01");case 22:i=a.sent;case 23:return a.next=25,s.compareDate(e.startTime,e.endTime);case 25:if(a.t5=!a.sent,!a.t5){a.next=28;break}a.t5=l<0;case 28:if(a.t4=a.t5,!a.t4){a.next=33;break}return a.next=32,s.compareDate(i,e.endTime);case 32:a.t4=!a.sent;case 33:if(!a.t4){a.next=37;break}return a.next=36,s.hmPlushm(e.endTime,"00:01");case 36:i=a.sent;case 37:return a.next=39,s.compareDate(e.startTime,e.endTime);case 39:if(a.t7=!a.sent,!a.t7){a.next=42;break}a.t7=l>0;case 42:if(a.t6=a.t7,!a.t6){a.next=47;break}return a.next=46,s.compareDate(i,e.endTime);case 46:a.t6=a.sent;case 47:if(!a.t6){a.next=51;break}return a.next=50,s.hmPlushm(e.endTime,"00:01");case 50:i=a.sent;case 51:return a.next=53,s.compareDate(i,o);case 53:if(a.sent){a.next=57;break}return r.push([i+":00","23:59:00"].join("-")),r.push(["00:00:00",o+":00"].join("-")),a.abrupt("return",r);case 57:return a.abrupt("return",[[i+":00",o+":00"].join("-")]);case 58:case"end":return a.stop()}},a,t)}))()},forbidStartEndTime:function(e){var t=this;return o()(n.a.mark(function a(){var s,r,i,o,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.next=4,s.hmPlushm(e.startTime,"00:01");case 4:return i=a.sent,a.next=7,s.hmPlushm(e.startTime,"12:00");case 7:return o=a.sent,l=parseInt(e.startTime.split(":")[0])+12,a.next=11,s.compareDate(e.startTime,e.endTime);case 11:if(a.t1=a.sent,!a.t1){a.next=14;break}a.t1=l<24;case 14:if(a.t0=a.t1,!a.t0){a.next=19;break}return a.next=18,s.compareDate(e.endTime,o);case 18:a.t0=a.sent;case 19:if(!a.t0){a.next=23;break}return a.next=22,s.hmMinuxhm(e.endTime,"00:01");case 22:o=a.sent;case 23:return a.next=25,s.compareDate(e.startTime,e.endTime);case 25:if(a.t3=a.sent,!a.t3){a.next=28;break}a.t3=l>24;case 28:if(a.t2=a.t3,!a.t2){a.next=33;break}return a.next=32,s.compareDate(e.endTime,o);case 32:a.t2=!a.sent;case 33:if(!a.t2){a.next=37;break}return a.next=36,s.hmMinuxhm(e.endTime,"00:01");case 36:o=a.sent;case 37:return a.next=39,s.compareDate(e.startTime,e.endTime);case 39:if(a.t5=!a.sent,!a.t5){a.next=42;break}a.t5=l>24;case 42:if(a.t4=a.t5,!a.t4){a.next=47;break}return a.next=46,s.compareDate(e.endTime,o);case 46:a.t4=a.sent;case 47:if(!a.t4){a.next=51;break}return a.next=50,s.hmMinuxhm(e.endTime,"00:01");case 50:o=a.sent;case 51:return a.next=53,s.compareDate(i,o);case 53:if(a.sent){a.next=57;break}return r.push([i+":00","23:59:00"].join("-")),r.push(["00:00:00",o+":00"].join("-")),a.abrupt("return",r);case 57:return a.abrupt("return",[[i+":00",o+":00"].join("-")]);case 58:case"end":return a.stop()}},a,t)}))()},forbidEndStartTime:function(e){var t=this;return o()(n.a.mark(function a(){var s,r,i,o,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.next=4,s.hmMinuxhm(e.endTime,"08:00");case 4:return i=a.sent,a.next=7,s.hmMinuxhm(e.endTime,"00:01");case 7:return o=a.sent,l=parseInt(e.endTime.split(":")[0])-8,a.next=11,s.compareDate(e.startTime,e.endTime);case 11:if(a.t2=a.sent,!a.t2){a.next=14;break}a.t2=l<0;case 14:if(a.t1=a.t2,!a.t1){a.next=19;break}return a.next=18,s.compareDate(e.startTime,i);case 18:a.t1=a.sent;case 19:if(a.t0=a.t1,a.t0){a.next=32;break}return a.next=23,s.compareDate(e.startTime,e.endTime);case 23:if(a.t4=a.sent,!a.t4){a.next=26;break}a.t4=l>0;case 26:if(a.t3=a.t4,!a.t3){a.next=31;break}return a.next=30,s.compareDate(e.startTime,i);case 30:a.t3=!a.sent;case 31:a.t0=a.t3;case 32:if(!a.t0){a.next=36;break}return a.next=35,s.hmPlushm(e.startTime,"00:01");case 35:i=a.sent;case 36:return a.next=38,s.compareDate(e.startTime,e.endTime);case 38:if(a.t6=!a.sent,!a.t6){a.next=41;break}a.t6=l<0;case 41:if(a.t5=a.t6,!a.t5){a.next=46;break}return a.next=45,s.compareDate(e.startTime,i);case 45:a.t5=!a.sent;case 46:if(!a.t5){a.next=50;break}return a.next=49,s.hmPlushm(e.startTime,"00:01");case 49:i=a.sent;case 50:return a.next=52,s.compareDate(i,o);case 52:if(a.sent){a.next=56;break}return r.push([i+":00","23:59:00"].join("-")),r.push(["00:00:00",o+":00"].join("-")),a.abrupt("return",r);case 56:return a.abrupt("return",[[i+":00",o+":00"].join("-")]);case 57:case"end":return a.stop()}},a,t)}))()},forbidEndEndTime:function(e){var t=this;return o()(n.a.mark(function a(){var s,r,i,o,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.next=4,s.hmPlushm(e.endTime,"00:01");case 4:return i=a.sent,a.next=7,s.hmPlushm(e.endTime,"12:00");case 7:if(o=a.sent,l=parseInt(e.endTime.split(":")[0])+12,a.t0=l>24,!a.t0){a.next=14;break}return a.next=13,s.compareDate(e.startTime,o);case 13:a.t0=a.sent;case 14:if(!a.t0){a.next=18;break}return a.next=17,s.hmMinuxhm(e.startTime,"00:01");case 17:o=a.sent;case 18:return a.next=20,s.compareDate(e.startTime,e.endTime);case 20:if(a.t2=!a.sent,!a.t2){a.next=23;break}a.t2=l<24;case 23:if(a.t1=a.t2,!a.t1){a.next=28;break}return a.next=27,s.compareDate(e.startTime,o);case 27:a.t1=a.sent;case 28:if(!a.t1){a.next=32;break}return a.next=31,s.hmMinuxhm(e.startTime,"00:01");case 31:o=a.sent;case 32:return a.next=34,s.compareDate(i,o);case 34:if(a.sent){a.next=38;break}return r.push([i+":00","23:59:00"].join("-")),r.push(["00:00:00",o+":00"].join("-")),a.abrupt("return",r);case 38:return a.abrupt("return",[[i+":00",o+":00"].join("-")]);case 39:case"end":return a.stop()}},a,t)}))()},changeStart:function(e,t){var a=this;return o()(n.a.mark(function e(){var s;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=a,e.next=3,s.setLateHours();case 3:return e.next=5,s.forbidStartBeginTime(t);case 5:return t.forbidStartBeginTime=e.sent,e.next=8,s.forbidStartEndTime(t);case 8:return t.forbidStartEndTime=e.sent,e.next=11,s.forbidEndStartTime(t);case 11:return t.forbidEndStartTime=e.sent,e.next=14,s.forbidEndEndTime(t);case 14:t.forbidEndEndTime=e.sent,s.$forceUpdate();case 16:case"end":return e.stop()}},e,a)}))()},changeEnd:function(e,t){var a=this;return o()(n.a.mark(function e(){var s;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=a,e.next=3,s.setLateHours();case 3:return e.next=5,s.forbidStartBeginTime(t);case 5:return t.forbidStartBeginTime=e.sent,e.next=8,s.forbidStartEndTime(t);case 8:return t.forbidStartEndTime=e.sent,e.next=11,s.forbidEndStartTime(t);case 11:return t.forbidEndStartTime=e.sent,e.next=14,s.forbidEndEndTime(t);case 14:t.forbidEndEndTime=e.sent,s.$forceUpdate();case 16:case"end":return e.stop()}},e,a)}))()},setLateHours:function(){var e=this;return o()(n.a.mark(function t(){var a,s,r,i;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=10.5,r=(a=e).formData.classessTimesJson[0].startTime,i=a.formData.classessTimesJson[0].endTime,t.next=6,a.compareDate(r,i);case 6:if(!t.sent){t.next=12;break}return t.next=9,a.timeDifference(r,i);case 9:s=t.sent,t.next=23;break;case 12:return t.t0=Number,t.next=15,a.timeDifference(r,"24:00");case 15:return t.t1=t.sent,t.t2=(0,t.t0)(t.t1),t.t3=Number,t.next=20,a.timeDifference("00:00",i);case 20:t.t4=t.sent,t.t5=(0,t.t3)(t.t4),s=t.t2+t.t5;case 23:a.maxLate=s-.5,a.maxLate<1.5&&(a.formData.lateRule=!1,a.formData.lateRuleJson=[]),a.maxLate>=10.5&&(a.maxLate=10);case 26:case"end":return t.stop()}},t,e)}))()},setRangeData:function(){var e=this;return o()(n.a.mark(function t(){var a,s;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=(a=e).formData.classessTimesJson[0],t.next=4,a.forbidStartBeginTime(s);case 4:return s.forbidStartBeginTime=t.sent,t.next=7,a.forbidStartEndTime(s);case 7:return s.forbidStartEndTime=t.sent,t.next=10,a.forbidEndStartTime(s);case 10:return s.forbidEndStartTime=t.sent,t.next=13,a.forbidEndEndTime(s);case 13:s.forbidEndEndTime=t.sent,a.$forceUpdate();case 15:case"end":return t.stop()}},t,e)}))()},setDefaultRangeData:function(){var e=this;return o()(n.a.mark(function t(){var a,s;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=(a=e).formData.classessTimesJson[0],t.next=4,a.defaultForbidStartBeginTime(s);case 4:return s.forbidStartBeginTime=t.sent,t.next=7,a.defaultForbidStartEndTime(s);case 7:return s.forbidStartEndTime=t.sent,t.next=10,a.defaultForbidEndStartTime(s);case 10:return s.forbidEndStartTime=t.sent,t.next=13,a.forbidEndEndTime(s);case 13:s.forbidEndEndTime=t.sent,a.$forceUpdate();case 15:case"end":return t.stop()}},t,e)}))()},defaultForbidStartBeginTime:function(e){var t=this;return o()(n.a.mark(function a(){var s,r,i,o,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.t0=s,a.t1=e.startTime,a.next=6,s.hourTohm(4);case 6:return a.t2=a.sent,a.next=9,a.t0.hmMinuxhm.call(a.t0,a.t1,a.t2);case 9:return i=a.sent,a.next=12,s.hmMinuxhm(e.startTime,"00:01");case 12:if(o=a.sent,l=parseInt(e.startTime.split(":")[0])-4,a.t3=l<0,!a.t3){a.next=19;break}return a.next=18,s.compareDate(i,e.endTime);case 18:a.t3=a.sent;case 19:if(!a.t3){a.next=23;break}return a.next=22,s.hmMinuxhm(e.endTime,"00:01");case 22:i=a.sent;case 23:return a.next=25,s.compareDate(e.startTime,e.endTime);case 25:if(a.t5=!a.sent,!a.t5){a.next=28;break}a.t5=l<0;case 28:if(a.t4=a.t5,!a.t4){a.next=33;break}return a.next=32,s.compareDate(i,e.endTime);case 32:a.t4=!a.sent;case 33:if(!a.t4){a.next=37;break}return a.next=36,s.hmPlushm(e.endTime,"00:01");case 36:i=a.sent;case 37:return a.next=39,s.compareDate(e.startTime,e.endTime);case 39:if(a.t7=!a.sent,!a.t7){a.next=42;break}a.t7=l>0;case 42:if(a.t6=a.t7,!a.t6){a.next=47;break}return a.next=46,s.compareDate(i,e.endTime);case 46:a.t6=a.sent;case 47:if(!a.t6){a.next=51;break}return a.next=50,s.hmPlushm(e.endTime,"00:01");case 50:i=a.sent;case 51:return a.next=53,s.compareDate(i,o);case 53:if(a.sent){a.next=57;break}return r.push([i+":00","23:59:00"].join("-")),r.push(["00:00:00",o+":00"].join("-")),a.abrupt("return",r);case 57:return a.abrupt("return",[[i+":00",o+":00"].join("-")]);case 58:case"end":return a.stop()}},a,t)}))()},defaultForbidStartEndTime:function(e){var t=this;return o()(n.a.mark(function a(){var s,r,i,o,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.next=4,s.hmPlushm(e.startTime,"00:01");case 4:return i=a.sent,a.next=7,s.hmPlushm(e.startTime,"02:00");case 7:return o=a.sent,l=parseInt(e.startTime.split(":")[0])+2,a.next=11,s.compareDate(e.startTime,e.endTime);case 11:if(a.t1=a.sent,!a.t1){a.next=14;break}a.t1=l<24;case 14:if(a.t0=a.t1,!a.t0){a.next=19;break}return a.next=18,s.compareDate(e.endTime,o);case 18:a.t0=a.sent;case 19:if(!a.t0){a.next=23;break}return a.next=22,s.hmMinuxhm(e.endTime,"00:01");case 22:o=a.sent;case 23:return a.next=25,s.compareDate(e.startTime,e.endTime);case 25:if(a.t3=a.sent,!a.t3){a.next=28;break}a.t3=l>24;case 28:if(a.t2=a.t3,!a.t2){a.next=33;break}return a.next=32,s.compareDate(e.endTime,o);case 32:a.t2=!a.sent;case 33:if(!a.t2){a.next=37;break}return a.next=36,s.hmMinuxhm(e.endTime,"00:01");case 36:o=a.sent;case 37:return a.next=39,s.compareDate(e.startTime,e.endTime);case 39:if(a.t5=!a.sent,!a.t5){a.next=42;break}a.t5=l>24;case 42:if(a.t4=a.t5,!a.t4){a.next=47;break}return a.next=46,s.compareDate(e.endTime,o);case 46:a.t4=a.sent;case 47:if(!a.t4){a.next=51;break}return a.next=50,s.hmMinuxhm(e.endTime,"00:01");case 50:o=a.sent;case 51:return a.next=53,s.compareDate(i,o);case 53:if(a.sent){a.next=57;break}return r.push([i+":00","23:59:00"].join("-")),r.push(["00:00:00",o+":00"].join("-")),a.abrupt("return",r);case 57:return a.abrupt("return",[[i+":00",o+":00"].join("-")]);case 58:case"end":return a.stop()}},a,t)}))()},defaultForbidEndStartTime:function(e){var t=this;return o()(n.a.mark(function a(){var s,r,i,o,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.next=4,s.hmMinuxhm(e.endTime,"04:00");case 4:return i=a.sent,a.next=7,s.hmMinuxhm(e.endTime,"00:01");case 7:return o=a.sent,l=parseInt(e.endTime.split(":")[0])-4,a.next=11,s.compareDate(e.startTime,e.endTime);case 11:if(a.t2=a.sent,!a.t2){a.next=14;break}a.t2=l<0;case 14:if(a.t1=a.t2,!a.t1){a.next=19;break}return a.next=18,s.compareDate(e.startTime,i);case 18:a.t1=a.sent;case 19:if(a.t0=a.t1,a.t0){a.next=32;break}return a.next=23,s.compareDate(e.startTime,e.endTime);case 23:if(a.t4=a.sent,!a.t4){a.next=26;break}a.t4=l>0;case 26:if(a.t3=a.t4,!a.t3){a.next=31;break}return a.next=30,s.compareDate(e.startTime,i);case 30:a.t3=!a.sent;case 31:a.t0=a.t3;case 32:if(!a.t0){a.next=36;break}return a.next=35,s.hmPlushm(e.startTime,"00:01");case 35:i=a.sent;case 36:return a.next=38,s.compareDate(e.startTime,e.endTime);case 38:if(a.t6=!a.sent,!a.t6){a.next=41;break}a.t6=l<0;case 41:if(a.t5=a.t6,!a.t5){a.next=46;break}return a.next=45,s.compareDate(e.startTime,i);case 45:a.t5=!a.sent;case 46:if(!a.t5){a.next=50;break}return a.next=49,s.hmPlushm(e.startTime,"00:01");case 49:i=a.sent;case 50:return a.next=52,s.compareDate(i,o);case 52:if(a.sent){a.next=56;break}return r.push([i+":00","23:59:00"].join("-")),r.push(["00:00:00",o+":00"].join("-")),a.abrupt("return",r);case 56:return a.abrupt("return",[[i+":00",o+":00"].join("-")]);case 57:case"end":return a.stop()}},a,t)}))()},changeTimeRange:function(e){var t=this;return o()(n.a.mark(function a(){var s;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(s=t,!e){a.next=6;break}return a.next=4,s.setRangeData();case 4:a.next=8;break;case 6:return a.next=8,s.setDefaultRangeData();case 8:case"end":return a.stop()}},a,t)}))()},handleChangeLate:function(e){e?this.formData.lateRuleJson.push({lateDate:2.5,allowLateDate:1}):this.formData.lateRuleJson=[]},addLateSet:function(){this.formData.lateRuleJson.push({lateDate:Number(this.formData.lateRuleJson[this.formData.lateRuleJson.length-1].lateDate)+.5,allowLateDate:Number(this.formData.lateRuleJson[this.formData.lateRuleJson.length-1].allowLateDate)+.5})},deleteLateRule:function(e){this.formData.lateRuleJson.splice(e,1)},handleClose:function(e){e(),this.hideDialog()},customCancel:function(){this.hideDialog()},checkLateSet:function(){var e=!0,t=[],a=[];this.formData.lateRuleJson.forEach(function(e){t.push(e.lateDate),a.push(e.allowLateDate)});for(var s=0;s<t.length-1;s++){for(var r=s+1;r<t.length;r++)if(t[s]>=t[r]){e=!1;break}if(!e)break}for(var n=0;n<a.length-1;n++){for(var i=n+1;i<a.length;i++)if(a[n]>=a[i]){e=!1;break}if(!e)break}return e},customConfirm:Object(p.a)((s=o()(n.a.mark(function e(t){var a,s;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a=this).formData.relaxFlag||a.formData.relaxStartDate&&a.formData.relaxEndDate){e.next=4;break}return d.a.showmsg("请填写休息时间","warning"),e.abrupt("return",!1);case 4:if(!a.formData.allowLateFlag||a.formData.allowLateDate){e.next=7;break}return d.a.showmsg("请填写允许迟到时间","warning"),e.abrupt("return",!1);case 7:if(!a.formData.moreLateFlag||a.formData.moreLateDate){e.next=10;break}return d.a.showmsg("请填写严重迟到时间","warning"),e.abrupt("return",!1);case 10:if(!(a.formData.allowLateFlag&&a.formData.moreLateFlag&&a.formData.allowLateDate>=a.formData.moreLateDate)){e.next=13;break}return d.a.showmsg("严重迟到时间必须大于迟到允许时间","warning"),e.abrupt("return",!1);case 13:if(!a.formData.mostLateFlag||a.formData.mostLateDate){e.next=16;break}return d.a.showmsg("请填写旷工迟到时间","warning"),e.abrupt("return",!1);case 16:if(!(a.formData.moreLateFlag&&a.formData.mostLateFlag&&a.formData.moreLateDate>=a.formData.mostLateDate)){e.next=19;break}return d.a.showmsg("旷工迟到时间必须大于严重迟到时间","warning"),e.abrupt("return",!1);case 19:if(a.formData.clockType){e.next=22;break}return e.next=22,a.setDefaultRangeData();case 22:if(s=!0,!(a.formData.lateRule&&a.formData.lateRuleJson.length>1)){e.next=27;break}return e.next=26,a.checkLateSet();case 26:s=e.sent;case 27:if(s){e.next=30;break}return d.a.showmsg("晚走晚到后面的规则时间必须大于前面的时间","warning"),e.abrupt("return",!1);case 30:a.$refs[t].validate(function(e){if(!e)return!1;a.setData()});case 31:case"end":return e.stop()}},e,this)})),function(e){return s.apply(this,arguments)}),300),setData:function(e){var t=this,a={classesId:t.conditionObj.classesId,enterpriseId:t.enterpriseId,classesName:t.formData.classesName,times:t.formData.times,classessTimesJson:c()(t.formData.classessTimesJson),clockType:t.formData.clockType?1:0,relaxFlag:t.formData.relaxFlag?1:0,relaxStartDate:t.formData.relaxStartDate,relaxEndDate:t.formData.relaxEndDate,allowLateFlag:t.formData.allowLateFlag?1:0,mostLateFlag:t.formData.mostLateFlag?1:0,moreLateFlag:t.formData.moreLateFlag?1:0,allowLateDate:t.formData.allowLateDate,mostLateDate:t.formData.mostLateDate,moreLateDate:t.formData.moreLateDate,lateRule:t.formData.lateRule?1:0,lateRuleJson:c()(t.formData.lateRuleJson)};Object(u.e)(t.conditionObj.classesId?"/haoban-app-attence-web/classes-edit":"/haoban-app-attence-web/classes-add",a).then(function(e){var a=e.data;if(1==a.errorCode)return t.conditionObj.classesId?d.a.showmsg("编辑成功","success"):d.a.showmsg("新建成功","success"),t.hideDialog(),!1;f.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},hideDialog:function(){this.customDialog=!1,this.$emit("hideDetailDialog")},handleData:function(){var e=this;return o()(n.a.mark(function t(){var a;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(a=e).formData.clockType){t.next=6;break}return t.next=4,a.setRangeData();case 4:t.next=8;break;case 6:return t.next=8,a.setDefaultRangeData();case 8:return t.next=10,a.setLateHours();case 10:case"end":return t.stop()}},t,e)}))()},getData:function(e){var t=this,a={classesId:t.conditionObj.classesId,enterpriseId:t.enterpriseId};Object(u.a)("/haoban-app-attence-web/classes-detail",a).then(function(e){var a=e.data;if(1==a.errorCode)return a.result.clockType=1==a.result.clockType,a.result.relaxFlag=1==a.result.relaxFlag,a.result.allowLateFlag=1==a.result.allowLateFlag,a.result.mostLateFlag=1==a.result.mostLateFlag,a.result.moreLateFlag=1==a.result.moreLateFlag,a.result.lateRule=1==a.result.lateRule,a.result.classessTimesJson&&(a.result.classessTimesJson=JSON.parse(a.result.classessTimesJson)),a.result.lateRuleJson&&(a.result.lateRuleJson=JSON.parse(a.result.lateRuleJson)),t.formData=a.result,t.handleData(),!1;f.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},resetForm:function(){this.conditionObj.classesId="",this.formData={classesId:"",classesName:"",times:"1",classessTimesJson:[{startTime:"9:00",endTime:"18:00",allowStartBeginTime:"",forbidStartBeginTime:[],allowStartEndTime:"",forbidStartEndTime:[],allowEndStartTime:"",forbidEndStartTime:[],allowEndEndTime:"",forbidEndEndTime:[]}],clockType:!1,relaxFlag:!1,relaxStartDate:"12:00",relaxEndDate:"13:00",allowLateFlag:!1,moreLateFlag:!1,mostLateFlag:!1,allowLateDate:"30",moreLateDate:"35",mostLateDate:"60",lateRule:!1,lateRuleJson:[]}}},watch:{workClassShow:function(e,t){this.customDialog=e,this.classesId||this.resetForm()},classesId:function(e,t){e&&(this.conditionObj.classesId=e,this.getData())}},mounted:function(){this.customDialog=this.workClassShow,this.classesId&&(this.conditionObj.classesId=this.classesId,this.getData())}},h={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"show",rawName:"v-show",value:e.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:e.classesId?"编辑班次":"新建班次",visible:e.customDialog,width:"820px","before-close":e.handleClose},on:{"update:visible":function(t){e.customDialog=t}}},[a("div",{staticClass:"edit-dialog-body"},[a("el-form",{ref:"ruleForm",attrs:{"label-width":"114px",model:e.formData,rules:e.rules}},[a("el-form-item",{attrs:{label:"班次名称:",prop:"classesName"}},[a("limitInput",{attrs:{inputWidth:210,inputValue:e.formData.classesName,holder:"请输入班次名称",getByType:"word",maxLength:10},on:{"update:inputValue":function(t){e.$set(e.formData,"classesName",t)}}})],1),e._v(" "),a("el-form-item",{attrs:{label:"次数限制:",prop:"times"}},[a("div",{staticClass:"times-set-wrap avatar-wrap m-b-10"},[a("el-radio-group",{on:{change:e.changeTimes},model:{value:e.formData.times,callback:function(t){e.$set(e.formData,"times",t)},expression:"formData.times"}},[a("el-radio-button",{attrs:{label:"1"}},[e._v("1天1次上下班")])],1),a("el-checkbox",{staticClass:"m-l-20",on:{change:e.changeTimeRange},model:{value:e.formData.clockType,callback:function(t){e.$set(e.formData,"clockType",t)},expression:"formData.clockType"}},[e._v("打卡时段设置")])],1),e._v(" "),a("div",{staticClass:"times-set-content m-b-20"},[e.formData.clockType?e._e():a("ul",e._l(e.formData.classessTimesJson,function(t,s){return a("li",{key:s+"time"},[a("span",[e._v("第"+e._s(s+1)+"次")]),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("上班")]),e._v(" "),a("el-time-picker",{staticClass:"w-106",attrs:{clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm"},on:{change:function(a){e.changeStart(a,t)}},model:{value:t.startTime,callback:function(a){e.$set(t,"startTime",a)},expression:"item.startTime"}}),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("下班")]),e._v(" "),a("el-time-picker",{staticClass:"w-106",attrs:{clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm"},on:{change:function(a){e.changeEnd(a,t)}},model:{value:t.endTime,callback:function(a){e.$set(t,"endTime",a)},expression:"item.endTime"}}),e._v(" "),Number(t.endTime.split(":")[0])<=Number(t.startTime.split(":")[0])&&Number(t.endTime.split(":")[1])<=Number(t.startTime.split(":")[1])?a("el-tag",{staticClass:"across-tag",attrs:{type:"danger"}},[e._v("次日")]):e._e()],1)})),e._v(" "),e.formData.clockType?a("div",[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.formData.classessTimesJson}},[a("el-table-column",{attrs:{prop:"",label:"",width:"70"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n 第"+e._s(t.$index+1)+"次\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"上下班时间",width:"226"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"cell"},[a("span",{staticClass:"font-12 color-606266"},[e._v("上班")]),e._v(" "),a("el-time-picker",{staticClass:"w-106",attrs:{clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm"},on:{change:function(a){e.changeStart(a,t.row)}},model:{value:t.row.startTime,callback:function(a){e.$set(t.row,"startTime",a)},expression:"scope.row.startTime"}}),e._v(" "),t.$index>0?a("el-tag",{staticClass:"across-tag",attrs:{type:"danger"}},[e._v("次日")]):e._e()],1),e._v(" "),a("div",{staticClass:"cell m-t-20"},[a("span",{staticClass:"font-12 color-606266"},[e._v("下班")]),e._v(" "),a("el-time-picker",{staticClass:"w-106",attrs:{clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm"},on:{change:function(a){e.changeEnd(a,t.row)}},model:{value:t.row.endTime,callback:function(a){e.$set(t.row,"endTime",a)},expression:"scope.row.endTime"}}),e._v(" "),e.checkNextFlag(t.row.startTime,t.row.endTime)?a("el-tag",{staticClass:"across-tag",attrs:{type:"danger"}},[e._v("次日")]):e._e()],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"address",label:"打卡时间范围限制"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"cell"},[a("el-time-picker",{staticClass:"w-106",attrs:{disabled:t.row.startTime==t.row.endTime,"picker-options":{selectableRange:t.row.forbidStartBeginTime},clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm",placeholder:""},model:{value:t.row.allowStartBeginTime,callback:function(a){e.$set(t.row,"allowStartBeginTime",a)},expression:"scope.row.allowStartBeginTime"}}),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("至")]),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("至")]),e._v(" "),a("el-time-picker",{staticClass:"w-106",attrs:{clearable:!1,"picker-options":{selectableRange:t.row.forbidStartEndTime},editable:!1,format:"HH:mm","value-format":"HH:mm",placeholder:""},model:{value:t.row.allowStartEndTime,callback:function(a){e.$set(t.row,"allowStartEndTime",a)},expression:"scope.row.allowStartEndTime"}}),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("可打上班卡")])],1),e._v(" "),a("div",{staticClass:"cell m-t-20"},[a("el-time-picker",{staticClass:"w-106",attrs:{clearable:!1,"picker-options":{selectableRange:t.row.forbidEndStartTime},editable:!1,format:"HH:mm","value-format":"HH:mm",placeholder:""},model:{value:t.row.allowEndStartTime,callback:function(a){e.$set(t.row,"allowEndStartTime",a)},expression:"scope.row.allowEndStartTime"}}),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("至")]),e._v(" "),a("el-time-picker",{staticClass:"w-106",attrs:{disabled:t.row.startTime==t.row.endTime,"picker-options":{selectableRange:t.row.forbidEndEndTime},clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm",placeholder:""},model:{value:t.row.allowEndEndTime,callback:function(a){e.$set(t.row,"allowEndEndTime",a)},expression:"scope.row.allowEndEndTime"}}),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("可打下班卡")])],1)]}}])})],1)],1):e._e()]),e._v(" "),1==e.formData.times?a("div",{staticClass:"rest-time-set"},[a("el-checkbox",{model:{value:e.formData.relaxFlag,callback:function(t){e.$set(e.formData,"relaxFlag",t)},expression:"formData.relaxFlag"}},[e._v("休息时间")]),e._v(" "),e.formData.relaxFlag?a("el-time-picker",{staticClass:"w-120",attrs:{clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm",placeholder:"休息开始"},model:{value:e.formData.relaxStartDate,callback:function(t){e.$set(e.formData,"relaxStartDate",t)},expression:"formData.relaxStartDate"}}):e._e(),e.formData.relaxFlag?a("el-time-picker",{staticClass:"w-120 m-l-20",attrs:{clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm",placeholder:"休息结束"},model:{value:e.formData.relaxEndDate,callback:function(t){e.$set(e.formData,"relaxEndDate",t)},expression:"formData.relaxEndDate"}}):e._e()],1):e._e()]),e._v(" "),a("el-form-item",{attrs:{label:"个性化设置:",prop:""}},[a("div",{staticClass:"m-b-10"},[a("el-checkbox",{model:{value:e.formData.allowLateFlag,callback:function(t){e.$set(e.formData,"allowLateFlag",t)},expression:"formData.allowLateFlag"}},[e._v("允许迟到")]),e._v(" "),e.formData.allowLateFlag?a("el-input-number",{staticClass:"w-90 m-l-20",attrs:{"controls-position":"right",min:1,max:3600},model:{value:e.formData.allowLateDate,callback:function(t){e.$set(e.formData,"allowLateDate",t)},expression:"formData.allowLateDate"}}):e._e(),e._v(" "),e.formData.allowLateFlag?a("span",{staticClass:"font-14 color-606266"},[e._v("分钟以内打上班卡不算迟到")]):e._e()],1),e._v(" "),a("div",{staticClass:"m-b-10"},[a("el-checkbox",{model:{value:e.formData.moreLateFlag,callback:function(t){e.$set(e.formData,"moreLateFlag",t)},expression:"formData.moreLateFlag"}},[e._v("严重迟到")]),e._v(" "),e.formData.moreLateFlag?a("el-input-number",{staticClass:"w-90 m-l-20",attrs:{"controls-position":"right",min:1,max:3600},model:{value:e.formData.moreLateDate,callback:function(t){e.$set(e.formData,"moreLateDate",t)},expression:"formData.moreLateDate"}}):e._e(),e._v(" "),e.formData.moreLateFlag?a("span",{staticClass:"font-14 color-606266"},[e._v("分钟以上打上班卡算严重迟到")]):e._e()],1),e._v(" "),a("div",{staticClass:"m-b-10"},[a("el-checkbox",{model:{value:e.formData.mostLateFlag,callback:function(t){e.$set(e.formData,"mostLateFlag",t)},expression:"formData.mostLateFlag"}},[e._v("旷工迟到")]),e._v(" "),e.formData.mostLateFlag?a("el-input-number",{staticClass:"w-90 m-l-20",attrs:{"controls-position":"right",min:1,max:3600},model:{value:e.formData.mostLateDate,callback:function(t){e.$set(e.formData,"mostLateDate",t)},expression:"formData.mostLateDate"}}):e._e(),e._v(" "),e.formData.mostLateFlag?a("span",{staticClass:"font-14 color-606266"},[e._v("分钟以上打上班卡算旷工")]):e._e()],1),e._v(" "),a("div",{staticClass:"m-b-10"},[a("el-checkbox",{attrs:{disabled:e.maxLate<1.5},on:{change:e.handleChangeLate},model:{value:e.formData.lateRule,callback:function(t){e.$set(e.formData,"lateRule",t)},expression:"formData.lateRule"}},[e._v("晚走次日晚到")]),e._v(" "),a("span",{staticClass:"font-12 color-909399 p-l-10"},[e._v("仅支持固定班制内勤打卡")])],1),e._v(" "),e.formData.lateRule?a("div",{staticClass:"late-rule-wrap border-box"},[a("ul",[e._l(e.formData.lateRuleJson,function(t,s){return a("li",{key:s+"late"},[a("div",{staticClass:"late-rule-text"},[a("span",{staticClass:"font-14 color-909399 p-r-10"},[e._v("晚走规则"+e._s(s+1))]),0!=s?a("el-button",{attrs:{type:"text"},on:{click:function(t){t.stopPropagation(),e.deleteLateRule(s)}}},[e._v("删除")]):e._e()],1),e._v(" "),a("div",{staticClass:"late-rule-body"},[a("span",{staticClass:"font-12 color-909399"},[e._v("第一天下班后晚走")]),e._v(" "),a("el-input-number",{staticClass:"w-90",attrs:{"controls-position":"right",step:.5,min:1,max:10},model:{value:t.lateDate,callback:function(a){e.$set(t,"lateDate",a)},expression:"item.lateDate"}}),e._v(" "),a("span",{staticClass:"font-12 color-909399"},[e._v("小时,第二天上班后晚到")]),e._v(" "),a("el-input-number",{staticClass:"w-90",attrs:{"controls-position":"right",step:.5,min:1,max:e.maxLate},model:{value:t.allowLateDate,callback:function(a){e.$set(t,"allowLateDate",a)},expression:"item.allowLateDate"}}),e._v(" "),a("span",{staticClass:"font-12 color-909399"},[e._v("小时")]),e._v(" "),a("span",{staticClass:"font-12 color-909399"},[e._v("第一天"+e._s(e.hmPlushm(e.formData.classessTimesJson[e.formData.classessTimesJson.length-1].endTime,e.hourTohm(t.lateDate)))+"(次日)下班,第二天"+e._s(e.hmPlushm(e.formData.classessTimesJson[0].startTime,e.hourTohm(t.allowLateDate)))+"上班不算迟到")])],1)])}),e._v(" "),e.formData.lateRuleJson.length<3?a("li",{staticClass:"text-center cursor-pointer",on:{click:function(t){return t.stopPropagation(),e.addLateSet(t)}}},[a("i",{staticClass:"el-icon-plus color-1890ff"}),a("span",{staticClass:"color-1890ff font-14 p-l-10"},[e._v("新建晚走规则")])]):e._e()],2)]):e._e()])],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){return t.stopPropagation(),e.customCancel(t)}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){t.stopPropagation(),e.customConfirm("ruleForm")}}},[e._v("确定")])],1)])],1)},staticRenderFns:[]};var x={name:"app-detail",components:{createWorkClass:a("VU/8")(b,h,!1,function(e){a("rqX9")},"data-v-795d1417",null).exports},props:{brandId:{type:String,default:function(){return""}},tabType:{type:String,default:function(){return"1"}},activeGroupId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",activeName:"first",activeBrand:this.brandId,activeGroup:this.activeGroupId,enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,conditionObj:{attenceGroupName:"",classesName:""},groupListData:[],classifyList:[],currentPage:1,pageSize:20,total:0,workClassShow:!1,classesId:""}},methods:{handleTabClick:function(e,t){var a=this;return o()(n.a.mark(function e(){var t;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:(t=a).pageSize=20,t.currentPage=1,t.getTableList(t.brandId);case 4:case"end":return e.stop()}},e,a)}))()},toWorkGroupSet:function(){this.$router.push("/workGroupSet?appIcon="+this.$route.query.appIcon)},toEditWorkTime:function(e,t){this.$router.push("/workTimeManage?appIcon="+this.$route.query.appIcon+"&attenceGroupId="+t.attenceGroupId)},toEditGroup:function(e,t){this.$router.push("/workTimeManage?appIcon="+this.$route.query.appIcon+"&attenceGroupId="+t.attenceGroupId)},toWorkClassSet:function(){this.workClassShow=!0},toEditClass:function(e,t){this.workClassShow=!0,this.classesId=t.classesId},hideDetailDialog:function(){this.workClassShow=!1,this.classesId="",this.currentPage=1,this.getTableList(this.brandId)},toDel:function(e,t){var a=this;a.$confirm("是否要删除该"+("first"==a.activeName?"考勤组":"班次")+"?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDel(e,t)}).catch(function(){})},postDel:function(e,t){var a=this,s={};"first"==a.activeName?s.attenceGroupId=t.attenceGroupId:s.classesId=t.classesId,Object(u.e)("first"==a.activeName?"/haoban-app-attence-web/attence-del":"/haoban-app-attence-web/classes-del",s).then(function(e){var t=e.data;if(1==t.errorCode)return d.a.showmsg("删除成功","success"),void a.getTableList();f.a.errorMsg(t)}).catch(function(e){a.$message.error({duration:1e3,message:e.message})})},toInput:Object(p.a)(function(e,t){this.currentPage=1,this.getTableList(this.brandId)},500),clearInput:function(){this.currentPage=1,this.getTableList(this.brandId)},changeCondition:function(){this.currentPage=1,this.getTableList(this.brandId)},handleSizeChange:function(e){this.pageSize=e,this.getTableList(this.brandId)},handleCurrentChange:function(e){this.currentPage=e,this.getTableList(this.brandId)},getTableList:function(e){var t=this,a={brandId:e||t.activeBrand,enterpriseId:t.enterpriseId,attenceGroupName:t.conditionObj.attenceGroupName,classesName:t.conditionObj.classesName,pageNum:t.currentPage,pageSize:t.pageSize};Object(u.e)("first"==t.activeName?"/haoban-app-attence-web/attence-list":"/haoban-app-attence-web/classes-page",a).then(function(e){var a=e.data;if(1==a.errorCode)return"first"==t.activeName?(t.groupListData=a.result.list||[],t.classifyList=[]):(t.groupListData=[],a.result.list&&a.result.list.length&&a.result.list.forEach(function(e){e.classessTimesJson&&(e.classessTimesJson=JSON.parse(e.classessTimesJson))}),t.classifyList=a.result.list||[]),void(t.total=a.result.total);f.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},submit:Object(p.a)(function(e){this.setData(e)},500)},watch:{brandId:function(e,t){e&&(this.activeBrand=e)},activeGroupId:function(e,t){e&&(this.activeGroup=e)},tabType:function(e,t){}},mounted:function(){this.$emit("showTab","2"),this.brandId&&1!=this.brandId&&(this.activeBrand=this.brandId),this.getTableList(this.brandId)}},v={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-detail-wrap"},[a("div",[a("div",{staticClass:"common-detail-tab"},[a("el-tabs",{staticClass:"daily-set-tab",on:{"tab-click":e.handleTabClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"考勤组管理",name:"first"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"班次管理",name:"second"}})],1)],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:"first"==e.activeName,expression:"activeName == 'first'"}],staticClass:"app-detail-pane border-box p-20"},[a("div",{staticClass:"m-b-20"},[a("div",{staticClass:"switch-wrap"},[a("div",{staticClass:"flex flex-space-between"},[a("div",[a("el-input",{staticClass:"w-264",staticStyle:{width:"264px"},attrs:{placeholder:"请输入考勤组名称","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.conditionObj.attenceGroupName);var a}},model:{value:e.conditionObj.attenceGroupName,callback:function(t){e.$set(e.conditionObj,"attenceGroupName",t)},expression:"conditionObj.attenceGroupName"}})],1),e._v(" "),a("div",[a("span",{staticClass:"font-14 color-606266 p-r-10"},[e._v("配置说明:考勤组管理,可以添加不同部门或分组的考勤")]),a("el-button",{attrs:{type:"primary"},on:{click:e.toWorkGroupSet}},[e._v("新建考勤组")])],1)])])]),e._v(" "),a("div",[a("el-table",{ref:"multipleTable",staticClass:"select-table",style:{width:"100%"},attrs:{data:e.groupListData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"考勤组名称",width:"120","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.attenceGroupName))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"人数"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.personCount))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"类型","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(1==t.row.attenceType?"固定排班":2==t.row.attenceType?"排班制":"自由排班"))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"考勤时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.attenceTimeDesc)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"最近更新时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("timeStampToYmd")(t.row.updateTime)))]),e._v(" "),a("div",[e._v(e._s(e._f("timeStampToHms")(t.row.updateTime)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[2==t.row.attenceType||t.row.personCount?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.toEditWorkTime(t.$index,t.row)}}},[e._v("编辑排班")]):e._e(),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.toEditGroup(t.$index,t.row)}}},[e._v("修改规则")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.toDel(t.$index,t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),0!=e.groupListData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[20,40,60,80],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)]),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:"second"==e.activeName,expression:"activeName == 'second'"}],staticClass:"app-detail-pane border-box p-20"},[a("div",{staticClass:"m-b-20"},[a("div",{staticClass:"switch-wrap"},[a("div",{staticClass:"flex flex-space-between"},[a("div",[a("el-input",{staticClass:"w-264",staticStyle:{width:"264px"},attrs:{placeholder:"请输入班次名称","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.conditionObj.classesName);var a}},model:{value:e.conditionObj.classesName,callback:function(t){e.$set(e.conditionObj,"classesName",t)},expression:"conditionObj.classesName"}})],1),e._v(" "),a("div",[a("el-button",{attrs:{type:"primary"},on:{click:e.toWorkClassSet}},[e._v("新建班次")])],1)])])]),e._v(" "),a("div",[a("el-table",{ref:"multipleTable",staticClass:"select-table",style:{width:"100%"},attrs:{data:e.classifyList,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"班次名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.classesName))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"考勤时间"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.classessTimesJson,function(t,s){return a("div",{key:s+"time"},[e._v(e._s(t.startTime)+"-"+e._s(t.endTime))])})}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.toEditClass(t.$index,t.row)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.toDel(t.$index,t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),0!=e.classifyList.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[20,40,60,80],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])]),e._v(" "),a("create-work-class",{attrs:{classesId:e.classesId,workClassShow:e.workClassShow},on:{hideDetailDialog:e.hideDetailDialog}})],1)},staticRenderFns:[]};var T=a("VU/8")(x,v,!1,function(e){a("0UFt")},"data-v-14b21f93",null);t.default=T.exports},rqX9:function(e,t){}});
\ No newline at end of file
webpackJsonp([39],{"04pW":function(e,t){},"0UFt":function(e,t){},"A/XQ":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s,r=a("Xxa5"),n=a.n(r),o=a("exGp"),i=a.n(o),l=a("mvHQ"),c=a.n(l),m=a("l46T"),u=a("P9l9"),d=a("Ch4/"),f=a("3E4D"),p=a("PI0u"),b={name:"create-work-class",components:{limitInput:m.a},props:{workClassShow:{type:Boolean,default:!1},classesId:{type:String,default:""}},data:function(){var e=this;return{enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,customDialog:!1,tableData:[],conditionObj:{searchInput:"",classesId:this.classesId},formData:{classesId:"",classesName:"",times:"1",classessTimesJson:[{startTime:"9:00",endTime:"18:00",allowStartBeginTime:"",forbidStartBeginTime:[],allowStartEndTime:"",forbidStartEndTime:[],allowEndStartTime:"",forbidEndStartTime:[],allowEndEndTime:"",forbidEndEndTime:[]}],clockType:!1,relaxFlag:!1,relaxStartDate:"12:00",relaxEndDate:"13:00",allowLateFlag:!1,moreLateFlag:!1,mostLateFlag:!1,allowLateDate:"30",moreLateDate:"35",mostLateDate:"60",lateRule:!1,lateRuleJson:[]},rules:{classesName:[{required:!0,message:"请输入班次名称",trigger:"blur"}],times:[{required:!0,validator:function(t,a,s){""===a?s(new Error("请设置次数")):e.formData.classessTimesJson.map(function(e){return e.startTime}).includes("")||e.formData.classessTimesJson.map(function(e){return e.endTime}).includes("")?s(new Error("请完善次数限制")):e.formData.clockType&&(e.formData.classessTimesJson.map(function(e){return e.allowStartBeginTime}).includes("")||e.formData.classessTimesJson.map(function(e){return e.allowStartEndTime}).includes("")||e.formData.classessTimesJson.map(function(e){return e.allowEndStartTime}).includes("")||e.formData.classessTimesJson.map(function(e){return e.allowEndEndTime}).includes(""))?s(new Error("请完善次数限制")):s()},trigger:"change"}]},maxLate:10}},methods:{checkNextFlag:function(e,t){var a=String(e).split(":"),s=String(t).split(":");return parseInt(a[0])>parseInt(s[0])||parseInt(a[0])>=parseInt(s[0])&&parseInt(a[1])>=parseInt(s[1])},changeTimes:function(e){if(console.log(e),1==e&&this.formData.classessTimesJson.length>=2&&this.formData.classessTimesJson.splice(1,2),2==e)if(this.formData.classessTimesJson.length>=2)this.formData.classessTimesJson.splice(2,1);else{var t=this.formData.classessTimesJson[0].endTime.split(":");this.formData.classessTimesJson.push({startTime:(1+Number(t[0])<24?1+Number(t[0]):1+Number(t[0])-24)+":"+t[1],endTime:(4+Number(t[0])<24?4+Number(t[0]):4+Number(t[0])-24)+":"+t[1],allowStartBeginTime:"",allowStartEndTime:"",allowEndStartTime:"",allowEndEndTime:""})}if(3==e)if(this.formData.classessTimesJson.length>=2){var a=this.formData.classessTimesJson[1].endTime.split(":");this.formData.classessTimesJson.push({startTime:(1+Number(a[0])<24?1+Number(a[0]):1+Number(a[0])-24)+":"+a[1],endTime:(4+Number(a[0])<24?4+Number(a[0]):4+Number(a[0])-24)+":"+a[1],allowStartBeginTime:"",allowStartEndTime:"",allowEndStartTime:"",allowEndEndTime:""})}else{var s=this.formData.classessTimesJson[0].endTime.split(":");this.formData.classessTimesJson.push({startTime:(1+Number(s[0])<24?1+Number(s[0]):1+Number(s[0])-24)+":"+s[1],endTime:(4+Number(s[0])<24?4+Number(s[0]):4+Number(s[0])-24)+":"+s[1],allowStartBeginTime:"",allowStartEndTime:"",allowEndStartTime:"",allowEndEndTime:""})}},hourTohm:function(e){var t=String(e)+":00";return String(e).includes(".")&&(t=String(e).split(".")[0]+":"+60*String(e).split(".")[1]/10),t},hmPlushm:function(e,t){var a=String(e),s=String(t),r=parseInt(a.split(":")[0])+parseInt(s.split(":")[0]),n=parseInt(a.split(":")[1])+parseInt(s.split(":")[1]);return n>=60&&(n-=60,r+=1),r>=24&&(r-=24),(r<10?"0"+r:r)+":"+(n<10?"0"+n:n)},hmMinuxhm:function(e,t){var a=String(e),s=String(t),r=parseInt(a.split(":")[0])-parseInt(s.split(":")[0]),n=parseInt(a.split(":")[1])-parseInt(s.split(":")[1]);return n<0&&(n+=60,r-=1),r<0&&(r+=24),(r<10?"0"+r:r)+":"+(n<10?"0"+n:n)},timeDifference:function(e,t){var a=e.split(":"),s=parseInt(60*a[0])+parseInt(a[1]),r=t.split(":"),n=parseInt(60*r[0])+parseInt(r[1]);return Number((n-s)/60).toFixed(1)},compareDate:function(e,t){var a=new Date,s=String(e).split(":"),r=String(t).split(":");return a.setHours(s[0],s[1])<a.setHours(r[0],r[1])},forbidStartBeginTime:function(e){var t=this;return i()(n.a.mark(function a(){var s,r,o,i,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.t0=s,a.t1=e.startTime,a.next=6,s.hourTohm(8);case 6:return a.t2=a.sent,a.next=9,a.t0.hmMinuxhm.call(a.t0,a.t1,a.t2);case 9:return o=a.sent,a.next=12,s.hmMinuxhm(e.startTime,"00:01");case 12:return i=a.sent,console.log(o),a.t3=console,a.next=17,s.compareDate(o,e.endTime);case 17:if(a.t4=a.sent,a.t3.log.call(a.t3,"上班时间-8之后和下班时间比较:",a.t4),l=parseInt(e.startTime.split(":")[0])-8,console.log("上班时间-8:",l),a.t5=l<0,!a.t5){a.next=26;break}return a.next=25,s.compareDate(o,e.endTime);case 25:a.t5=a.sent;case 26:if(!a.t5){a.next=30;break}return a.next=29,s.hmMinuxhm(e.endTime,"00:01");case 29:o=a.sent;case 30:return a.next=32,s.compareDate(e.startTime,e.endTime);case 32:if(a.t7=!a.sent,!a.t7){a.next=35;break}a.t7=l<0;case 35:if(a.t6=a.t7,!a.t6){a.next=40;break}return a.next=39,s.compareDate(o,e.endTime);case 39:a.t6=!a.sent;case 40:if(!a.t6){a.next=44;break}return a.next=43,s.hmPlushm(e.endTime,"00:01");case 43:o=a.sent;case 44:return a.next=46,s.compareDate(e.startTime,e.endTime);case 46:if(a.t9=!a.sent,!a.t9){a.next=49;break}a.t9=l>0;case 49:if(a.t8=a.t9,!a.t8){a.next=54;break}return a.next=53,s.compareDate(o,e.endTime);case 53:a.t8=a.sent;case 54:if(!a.t8){a.next=58;break}return a.next=57,s.hmPlushm(e.endTime,"00:01");case 57:o=a.sent;case 58:return a.next=60,s.compareDate(o,i);case 60:if(a.sent){a.next=64;break}return r.push([o+":00","23:59:00"].join("-")),r.push(["00:00:00",i+":00"].join("-")),a.abrupt("return",r);case 64:return a.abrupt("return",[[o+":00",i+":00"].join("-")]);case 65:case"end":return a.stop()}},a,t)}))()},forbidStartEndTime:function(e){var t=this;return i()(n.a.mark(function a(){var s,r,o,i,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.next=4,s.hmPlushm(e.startTime,"00:01");case 4:return o=a.sent,a.next=7,s.hmPlushm(e.startTime,"12:00");case 7:return i=a.sent,a.t0=console,a.next=11,s.compareDate(i,e.endTime);case 11:return a.t1=a.sent,a.t0.log.call(a.t0,"下班时间+12 之后和上班时间比较:",a.t1),l=parseInt(e.startTime.split(":")[0])+12,a.t2=console,a.t3=l,a.t4=i,a.next=19,s.compareDate(e.endTime,i);case 19:return a.t5=a.sent,a.t2.log.call(a.t2,"下班时间+12:",a.t3,a.t4,a.t5),a.next=23,s.compareDate(e.startTime,e.endTime);case 23:if(a.t7=a.sent,!a.t7){a.next=26;break}a.t7=l<24;case 26:if(a.t6=a.t7,!a.t6){a.next=31;break}return a.next=30,s.compareDate(e.endTime,i);case 30:a.t6=a.sent;case 31:if(!a.t6){a.next=35;break}return a.next=34,s.hmMinuxhm(e.endTime,"00:01");case 34:i=a.sent;case 35:return a.next=37,s.compareDate(e.startTime,e.endTime);case 37:if(a.t9=a.sent,!a.t9){a.next=40;break}a.t9=l>24;case 40:if(a.t8=a.t9,!a.t8){a.next=45;break}return a.next=44,s.compareDate(e.endTime,i);case 44:a.t8=!a.sent;case 45:if(!a.t8){a.next=49;break}return a.next=48,s.hmMinuxhm(e.endTime,"00:01");case 48:i=a.sent;case 49:return a.next=51,s.compareDate(e.startTime,e.endTime);case 51:if(a.t11=!a.sent,!a.t11){a.next=54;break}a.t11=l>24;case 54:if(a.t10=a.t11,!a.t10){a.next=59;break}return a.next=58,s.compareDate(e.endTime,i);case 58:a.t10=a.sent;case 59:if(!a.t10){a.next=63;break}return a.next=62,s.hmMinuxhm(e.endTime,"00:01");case 62:i=a.sent;case 63:return a.next=65,s.compareDate(o,i);case 65:if(a.sent){a.next=69;break}return r.push([o+":00","23:59:00"].join("-")),r.push(["00:00:00",i+":00"].join("-")),a.abrupt("return",r);case 69:return a.abrupt("return",[[o+":00",i+":00"].join("-")]);case 70:case"end":return a.stop()}},a,t)}))()},forbidEndStartTime:function(e){var t=this;return i()(n.a.mark(function a(){var s,r,o,i,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.next=4,s.hmMinuxhm(e.endTime,"08:00");case 4:return o=a.sent,a.next=7,s.hmMinuxhm(e.endTime,"00:01");case 7:return i=a.sent,a.t0=console,a.next=11,s.compareDate(e.startTime,o);case 11:return a.t1=a.sent,a.t0.log.call(a.t0,"下班时间-8 之后和上班时间比较:",a.t1),l=parseInt(e.endTime.split(":")[0])-8,a.t2=console,a.t3=l,a.t4=o,a.next=19,s.compareDate(e.startTime,o);case 19:return a.t5=a.sent,a.t2.log.call(a.t2,"下班时间-8:",a.t3,a.t4,a.t5),a.next=23,s.compareDate(e.startTime,e.endTime);case 23:if(a.t8=a.sent,!a.t8){a.next=26;break}a.t8=l<0;case 26:if(a.t7=a.t8,!a.t7){a.next=31;break}return a.next=30,s.compareDate(e.startTime,o);case 30:a.t7=a.sent;case 31:if(a.t6=a.t7,a.t6){a.next=44;break}return a.next=35,s.compareDate(e.startTime,e.endTime);case 35:if(a.t10=a.sent,!a.t10){a.next=38;break}a.t10=l>0;case 38:if(a.t9=a.t10,!a.t9){a.next=43;break}return a.next=42,s.compareDate(e.startTime,o);case 42:a.t9=!a.sent;case 43:a.t6=a.t9;case 44:if(!a.t6){a.next=49;break}return console.log(1),a.next=48,s.hmPlushm(e.startTime,"00:01");case 48:o=a.sent;case 49:return console.log(o),a.next=52,s.compareDate(e.startTime,e.endTime);case 52:if(a.t12=!a.sent,!a.t12){a.next=55;break}a.t12=l<0;case 55:if(a.t11=a.t12,!a.t11){a.next=60;break}return a.next=59,s.compareDate(e.startTime,o);case 59:a.t11=!a.sent;case 60:if(!a.t11){a.next=65;break}return console.log(2),a.next=64,s.hmPlushm(e.startTime,"00:01");case 64:o=a.sent;case 65:return a.t13=console,a.next=68,s.compareDate(e.startTime,e.endTime);case 68:return a.t14=!a.sent,a.t13.log.call(a.t13,"是否跨天:",a.t14),console.log("下班可以开始时间:",o,i),a.next=73,s.compareDate(o,i);case 73:if(a.sent){a.next=77;break}return r.push([o+":00","23:59:00"].join("-")),r.push(["00:00:00",i+":00"].join("-")),a.abrupt("return",r);case 77:return a.abrupt("return",[[o+":00",i+":00"].join("-")]);case 78:case"end":return a.stop()}},a,t)}))()},forbidEndEndTime:function(e){var t=this;return i()(n.a.mark(function a(){var s,r,o,i,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.next=4,s.hmPlushm(e.endTime,"00:01");case 4:return o=a.sent,a.next=7,s.hmPlushm(e.endTime,"12:00");case 7:return i=a.sent,a.t0=console,a.next=11,s.compareDate(i,e.startTime);case 11:return a.t1=a.sent,a.t0.log.call(a.t0,"下班时间+12 之后和上班时间比较:",a.t1),l=parseInt(e.endTime.split(":")[0])+12,a.t2=console,a.t3=l,a.t4=i,a.next=19,s.compareDate(e.startTime,i);case 19:if(a.t5=a.sent,a.t2.log.call(a.t2,"下班时间+12:",a.t3,a.t4,a.t5),a.t6=l>24,!a.t6){a.next=26;break}return a.next=25,s.compareDate(e.startTime,i);case 25:a.t6=a.sent;case 26:if(!a.t6){a.next=30;break}return a.next=29,s.hmMinuxhm(e.startTime,"00:01");case 29:i=a.sent;case 30:return a.next=32,s.compareDate(e.startTime,e.endTime);case 32:if(a.t8=!a.sent,!a.t8){a.next=35;break}a.t8=l<24;case 35:if(a.t7=a.t8,!a.t7){a.next=40;break}return a.next=39,s.compareDate(e.startTime,i);case 39:a.t7=a.sent;case 40:if(!a.t7){a.next=44;break}return a.next=43,s.hmMinuxhm(e.startTime,"00:01");case 43:i=a.sent;case 44:return a.next=46,s.compareDate(o,i);case 46:if(a.sent){a.next=50;break}return r.push([o+":00","23:59:00"].join("-")),r.push(["00:00:00",i+":00"].join("-")),a.abrupt("return",r);case 50:return a.abrupt("return",[[o+":00",i+":00"].join("-")]);case 51:case"end":return a.stop()}},a,t)}))()},changeStart:function(e,t){var a=this;return i()(n.a.mark(function e(){var s;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=a,e.next=3,s.setLateHours();case 3:return e.next=5,s.forbidStartBeginTime(t);case 5:return t.forbidStartBeginTime=e.sent,e.next=8,s.forbidStartEndTime(t);case 8:return t.forbidStartEndTime=e.sent,e.next=11,s.forbidEndStartTime(t);case 11:return t.forbidEndStartTime=e.sent,e.next=14,s.forbidEndEndTime(t);case 14:t.forbidEndEndTime=e.sent,console.log(t),s.$forceUpdate();case 17:case"end":return e.stop()}},e,a)}))()},changeEnd:function(e,t){var a=this;return i()(n.a.mark(function e(){var s;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=a,e.next=3,s.setLateHours();case 3:return e.next=5,s.forbidStartBeginTime(t);case 5:return t.forbidStartBeginTime=e.sent,e.next=8,s.forbidStartEndTime(t);case 8:return t.forbidStartEndTime=e.sent,e.next=11,s.forbidEndStartTime(t);case 11:return t.forbidEndStartTime=e.sent,e.next=14,s.forbidEndEndTime(t);case 14:t.forbidEndEndTime=e.sent,s.$forceUpdate();case 16:case"end":return e.stop()}},e,a)}))()},setLateHours:function(){var e=this;return i()(n.a.mark(function t(){var a,s,r,o;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=10.5,r=(a=e).formData.classessTimesJson[0].startTime,o=a.formData.classessTimesJson[0].endTime,t.next=6,a.compareDate(r,o);case 6:if(!t.sent){t.next=12;break}return t.next=9,a.timeDifference(r,o);case 9:s=t.sent,t.next=23;break;case 12:return t.t0=Number,t.next=15,a.timeDifference(r,"24:00");case 15:return t.t1=t.sent,t.t2=(0,t.t0)(t.t1),t.t3=Number,t.next=20,a.timeDifference("00:00",o);case 20:t.t4=t.sent,t.t5=(0,t.t3)(t.t4),s=t.t2+t.t5;case 23:a.maxLate=s-.5,console.log(a.maxLate),a.maxLate<1.5&&(a.formData.lateRule=!1,a.formData.lateRuleJson=[]),a.maxLate>=10.5&&(a.maxLate=10);case 27:case"end":return t.stop()}},t,e)}))()},setRangeData:function(){var e=this;return i()(n.a.mark(function t(){var a,s;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=(a=e).formData.classessTimesJson[0],t.next=4,a.forbidStartBeginTime(s);case 4:return s.forbidStartBeginTime=t.sent,t.next=7,a.forbidStartEndTime(s);case 7:return s.forbidStartEndTime=t.sent,t.next=10,a.forbidEndStartTime(s);case 10:return s.forbidEndStartTime=t.sent,t.next=13,a.forbidEndEndTime(s);case 13:s.forbidEndEndTime=t.sent,a.$forceUpdate();case 15:case"end":return t.stop()}},t,e)}))()},setDefaultRangeData:function(){var e=this;return i()(n.a.mark(function t(){var a,s;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=(a=e).formData.classessTimesJson[0],t.next=4,a.defaultForbidStartBeginTime(s);case 4:return s.forbidStartBeginTime=t.sent,t.next=7,a.defaultForbidStartEndTime(s);case 7:return s.forbidStartEndTime=t.sent,t.next=10,a.defaultForbidEndStartTime(s);case 10:return s.forbidEndStartTime=t.sent,t.next=13,a.forbidEndEndTime(s);case 13:s.forbidEndEndTime=t.sent,a.$forceUpdate();case 15:case"end":return t.stop()}},t,e)}))()},defaultForbidStartBeginTime:function(e){var t=this;return i()(n.a.mark(function a(){var s,r,o,i,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.t0=s,a.t1=e.startTime,a.next=6,s.hourTohm(4);case 6:return a.t2=a.sent,a.next=9,a.t0.hmMinuxhm.call(a.t0,a.t1,a.t2);case 9:return o=a.sent,a.next=12,s.hmMinuxhm(e.startTime,"00:01");case 12:return i=a.sent,console.log(o),a.t3=console,a.next=17,s.compareDate(o,e.endTime);case 17:if(a.t4=a.sent,a.t3.log.call(a.t3,"上班时间-4之后和下班时间比较:",a.t4),l=parseInt(e.startTime.split(":")[0])-4,console.log("上班时间-4:",l),a.t5=l<0,!a.t5){a.next=26;break}return a.next=25,s.compareDate(o,e.endTime);case 25:a.t5=a.sent;case 26:if(!a.t5){a.next=30;break}return a.next=29,s.hmMinuxhm(e.endTime,"00:01");case 29:o=a.sent;case 30:return a.next=32,s.compareDate(e.startTime,e.endTime);case 32:if(a.t7=!a.sent,!a.t7){a.next=35;break}a.t7=l<0;case 35:if(a.t6=a.t7,!a.t6){a.next=40;break}return a.next=39,s.compareDate(o,e.endTime);case 39:a.t6=!a.sent;case 40:if(!a.t6){a.next=44;break}return a.next=43,s.hmPlushm(e.endTime,"00:01");case 43:o=a.sent;case 44:return a.next=46,s.compareDate(e.startTime,e.endTime);case 46:if(a.t9=!a.sent,!a.t9){a.next=49;break}a.t9=l>0;case 49:if(a.t8=a.t9,!a.t8){a.next=54;break}return a.next=53,s.compareDate(o,e.endTime);case 53:a.t8=a.sent;case 54:if(!a.t8){a.next=58;break}return a.next=57,s.hmPlushm(e.endTime,"00:01");case 57:o=a.sent;case 58:return a.next=60,s.compareDate(o,i);case 60:if(a.sent){a.next=64;break}return r.push([o+":00","23:59:00"].join("-")),r.push(["00:00:00",i+":00"].join("-")),a.abrupt("return",r);case 64:return a.abrupt("return",[[o+":00",i+":00"].join("-")]);case 65:case"end":return a.stop()}},a,t)}))()},defaultForbidStartEndTime:function(e){var t=this;return i()(n.a.mark(function a(){var s,r,o,i,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.next=4,s.hmPlushm(e.startTime,"00:01");case 4:return o=a.sent,a.next=7,s.hmPlushm(e.startTime,"02:00");case 7:return i=a.sent,a.t0=console,a.next=11,s.compareDate(i,e.endTime);case 11:return a.t1=a.sent,a.t0.log.call(a.t0,"下班时间+2 之后和上班时间比较:",a.t1),l=parseInt(e.startTime.split(":")[0])+2,a.t2=console,a.t3=l,a.t4=i,a.next=19,s.compareDate(e.endTime,i);case 19:return a.t5=a.sent,a.t2.log.call(a.t2,"下班时间+2:",a.t3,a.t4,a.t5),a.next=23,s.compareDate(e.startTime,e.endTime);case 23:if(a.t7=a.sent,!a.t7){a.next=26;break}a.t7=l<24;case 26:if(a.t6=a.t7,!a.t6){a.next=31;break}return a.next=30,s.compareDate(e.endTime,i);case 30:a.t6=a.sent;case 31:if(!a.t6){a.next=35;break}return a.next=34,s.hmMinuxhm(e.endTime,"00:01");case 34:i=a.sent;case 35:return a.next=37,s.compareDate(e.startTime,e.endTime);case 37:if(a.t9=a.sent,!a.t9){a.next=40;break}a.t9=l>24;case 40:if(a.t8=a.t9,!a.t8){a.next=45;break}return a.next=44,s.compareDate(e.endTime,i);case 44:a.t8=!a.sent;case 45:if(!a.t8){a.next=49;break}return a.next=48,s.hmMinuxhm(e.endTime,"00:01");case 48:i=a.sent;case 49:return a.next=51,s.compareDate(e.startTime,e.endTime);case 51:if(a.t11=!a.sent,!a.t11){a.next=54;break}a.t11=l>24;case 54:if(a.t10=a.t11,!a.t10){a.next=59;break}return a.next=58,s.compareDate(e.endTime,i);case 58:a.t10=a.sent;case 59:if(!a.t10){a.next=63;break}return a.next=62,s.hmMinuxhm(e.endTime,"00:01");case 62:i=a.sent;case 63:return a.next=65,s.compareDate(o,i);case 65:if(a.sent){a.next=69;break}return r.push([o+":00","23:59:00"].join("-")),r.push(["00:00:00",i+":00"].join("-")),a.abrupt("return",r);case 69:return a.abrupt("return",[[o+":00",i+":00"].join("-")]);case 70:case"end":return a.stop()}},a,t)}))()},defaultForbidEndStartTime:function(e){var t=this;return i()(n.a.mark(function a(){var s,r,o,i,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=t,r=[],a.next=4,s.hmMinuxhm(e.endTime,"04:00");case 4:return o=a.sent,a.next=7,s.hmMinuxhm(e.endTime,"00:01");case 7:return i=a.sent,a.t0=console,a.next=11,s.compareDate(e.startTime,o);case 11:return a.t1=a.sent,a.t0.log.call(a.t0,"下班时间-4 之后和上班时间比较:",a.t1),l=parseInt(e.endTime.split(":")[0])-4,a.t2=console,a.t3=l,a.t4=o,a.next=19,s.compareDate(e.startTime,o);case 19:return a.t5=a.sent,a.t2.log.call(a.t2,"下班时间-4:",a.t3,a.t4,a.t5),a.next=23,s.compareDate(e.startTime,e.endTime);case 23:if(a.t8=a.sent,!a.t8){a.next=26;break}a.t8=l<0;case 26:if(a.t7=a.t8,!a.t7){a.next=31;break}return a.next=30,s.compareDate(e.startTime,o);case 30:a.t7=a.sent;case 31:if(a.t6=a.t7,a.t6){a.next=44;break}return a.next=35,s.compareDate(e.startTime,e.endTime);case 35:if(a.t10=a.sent,!a.t10){a.next=38;break}a.t10=l>0;case 38:if(a.t9=a.t10,!a.t9){a.next=43;break}return a.next=42,s.compareDate(e.startTime,o);case 42:a.t9=!a.sent;case 43:a.t6=a.t9;case 44:if(!a.t6){a.next=49;break}return console.log(1),a.next=48,s.hmPlushm(e.startTime,"00:01");case 48:o=a.sent;case 49:return console.log(o),a.next=52,s.compareDate(e.startTime,e.endTime);case 52:if(a.t12=!a.sent,!a.t12){a.next=55;break}a.t12=l<0;case 55:if(a.t11=a.t12,!a.t11){a.next=60;break}return a.next=59,s.compareDate(e.startTime,o);case 59:a.t11=!a.sent;case 60:if(!a.t11){a.next=65;break}return console.log(2),a.next=64,s.hmPlushm(e.startTime,"00:01");case 64:o=a.sent;case 65:return a.t13=console,a.next=68,s.compareDate(e.startTime,e.endTime);case 68:return a.t14=!a.sent,a.t13.log.call(a.t13,"是否跨天:",a.t14),console.log("下班可以开始时间:",o,i),a.next=73,s.compareDate(o,i);case 73:if(a.sent){a.next=77;break}return r.push([o+":00","23:59:00"].join("-")),r.push(["00:00:00",i+":00"].join("-")),a.abrupt("return",r);case 77:return a.abrupt("return",[[o+":00",i+":00"].join("-")]);case 78:case"end":return a.stop()}},a,t)}))()},changeTimeRange:function(e){var t=this;return i()(n.a.mark(function a(){var s;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(s=t,!e){a.next=6;break}return a.next=4,s.setRangeData();case 4:a.next=8;break;case 6:return a.next=8,s.setDefaultRangeData();case 8:case"end":return a.stop()}},a,t)}))()},handleChangeLate:function(e){console.log("开启晚走:",e),e?this.formData.lateRuleJson.push({lateDate:2.5,allowLateDate:1}):this.formData.lateRuleJson=[],console.log(this.formData.lateRuleJson)},addLateSet:function(){this.formData.lateRuleJson.push({lateDate:Number(this.formData.lateRuleJson[this.formData.lateRuleJson.length-1].lateDate)+.5,allowLateDate:Number(this.formData.lateRuleJson[this.formData.lateRuleJson.length-1].allowLateDate)+.5})},deleteLateRule:function(e){this.formData.lateRuleJson.splice(e,1)},handleClose:function(e){e(),this.hideDialog()},customCancel:function(){this.hideDialog()},checkLateSet:function(){var e=!0,t=[],a=[];this.formData.lateRuleJson.forEach(function(e){t.push(e.lateDate),a.push(e.allowLateDate)});for(var s=0;s<t.length-1;s++){for(var r=s+1;r<t.length;r++)if(t[s]>=t[r]){e=!1;break}if(!e)break}for(var n=0;n<a.length-1;n++){for(var o=n+1;o<a.length;o++)if(a[n]>=a[o]){e=!1;break}if(!e)break}return e},customConfirm:Object(p.a)((s=i()(n.a.mark(function e(t){var a,s;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a=this).formData.relaxFlag||a.formData.relaxStartDate&&a.formData.relaxEndDate){e.next=4;break}return f.a.showmsg("请填写休息时间","warning"),e.abrupt("return",!1);case 4:if(!a.formData.allowLateFlag||a.formData.allowLateDate){e.next=7;break}return f.a.showmsg("请填写允许迟到时间","warning"),e.abrupt("return",!1);case 7:if(!a.formData.moreLateFlag||a.formData.moreLateDate){e.next=10;break}return f.a.showmsg("请填写严重迟到时间","warning"),e.abrupt("return",!1);case 10:if(!(a.formData.allowLateFlag&&a.formData.moreLateFlag&&a.formData.allowLateDate>=a.formData.moreLateDate)){e.next=13;break}return f.a.showmsg("严重迟到时间必须大于迟到允许时间","warning"),e.abrupt("return",!1);case 13:if(!a.formData.mostLateFlag||a.formData.mostLateDate){e.next=16;break}return f.a.showmsg("请填写旷工迟到时间","warning"),e.abrupt("return",!1);case 16:if(!(a.formData.moreLateFlag&&a.formData.mostLateFlag&&a.formData.moreLateDate>=a.formData.mostLateDate)){e.next=19;break}return f.a.showmsg("旷工迟到时间必须大于严重迟到时间","warning"),e.abrupt("return",!1);case 19:if(a.formData.clockType){e.next=22;break}return e.next=22,a.setDefaultRangeData();case 22:if(s=!0,!(a.formData.lateRule&&a.formData.lateRuleJson.length>1)){e.next=27;break}return e.next=26,a.checkLateSet();case 26:s=e.sent;case 27:if(s){e.next=30;break}return f.a.showmsg("晚走晚到后面的规则时间必须大于前面的时间","warning"),e.abrupt("return",!1);case 30:a.$refs[t].validate(function(e){if(!e)return!1;a.setData()});case 31:case"end":return e.stop()}},e,this)})),function(e){return s.apply(this,arguments)}),300),setData:function(e){var t=this,a={classesId:t.conditionObj.classesId,enterpriseId:t.enterpriseId,classesName:t.formData.classesName,times:t.formData.times,classessTimesJson:c()(t.formData.classessTimesJson),clockType:t.formData.clockType?1:0,relaxFlag:t.formData.relaxFlag?1:0,relaxStartDate:t.formData.relaxStartDate,relaxEndDate:t.formData.relaxEndDate,allowLateFlag:t.formData.allowLateFlag?1:0,mostLateFlag:t.formData.mostLateFlag?1:0,moreLateFlag:t.formData.moreLateFlag?1:0,allowLateDate:t.formData.allowLateDate,mostLateDate:t.formData.mostLateDate,moreLateDate:t.formData.moreLateDate,lateRule:t.formData.lateRule?1:0,lateRuleJson:c()(t.formData.lateRuleJson)};Object(u.e)(t.conditionObj.classesId?"/haoban-app-attence-web/classes-edit":"/haoban-app-attence-web/classes-add",a).then(function(e){var a=e.data;if(1==a.errorCode)return t.conditionObj.classesId?f.a.showmsg("编辑成功","success"):f.a.showmsg("新建成功","success"),t.hideDialog(),!1;d.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},hideDialog:function(){this.customDialog=!1,this.$emit("hideDetailDialog")},handleData:function(){var e=this;return i()(n.a.mark(function t(){var a;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(a=e).formData.clockType){t.next=6;break}return t.next=4,a.setRangeData();case 4:t.next=8;break;case 6:return t.next=8,a.setDefaultRangeData();case 8:return t.next=10,a.setLateHours();case 10:case"end":return t.stop()}},t,e)}))()},getData:function(e){var t=this,a={classesId:t.conditionObj.classesId,enterpriseId:t.enterpriseId};Object(u.a)("/haoban-app-attence-web/classes-detail",a).then(function(e){var a=e.data;if(1==a.errorCode)return a.result.clockType=1==a.result.clockType,a.result.relaxFlag=1==a.result.relaxFlag,a.result.allowLateFlag=1==a.result.allowLateFlag,a.result.mostLateFlag=1==a.result.mostLateFlag,a.result.moreLateFlag=1==a.result.moreLateFlag,a.result.lateRule=1==a.result.lateRule,a.result.classessTimesJson&&(a.result.classessTimesJson=JSON.parse(a.result.classessTimesJson)),a.result.lateRuleJson&&(a.result.lateRuleJson=JSON.parse(a.result.lateRuleJson)),t.formData=a.result,t.handleData(),!1;d.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},resetForm:function(){this.conditionObj.classesId="",this.formData={classesId:"",classesName:"",times:"1",classessTimesJson:[{startTime:"9:00",endTime:"18:00",allowStartBeginTime:"",forbidStartBeginTime:[],allowStartEndTime:"",forbidStartEndTime:[],allowEndStartTime:"",forbidEndStartTime:[],allowEndEndTime:"",forbidEndEndTime:[]}],clockType:!1,relaxFlag:!1,relaxStartDate:"12:00",relaxEndDate:"13:00",allowLateFlag:!1,moreLateFlag:!1,mostLateFlag:!1,allowLateDate:"30",moreLateDate:"35",mostLateDate:"60",lateRule:!1,lateRuleJson:[]}}},watch:{workClassShow:function(e,t){this.customDialog=e,this.classesId||this.resetForm()},classesId:function(e,t){e&&(this.conditionObj.classesId=e,this.getData())}},mounted:function(){this.customDialog=this.workClassShow,this.classesId&&(this.conditionObj.classesId=this.classesId,this.getData())}},h={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"show",rawName:"v-show",value:e.customDialog,expression:"customDialog"}]},[a("el-dialog",{staticClass:"edit-dialog",attrs:{title:e.classesId?"编辑班次":"新建班次",visible:e.customDialog,width:"820px","before-close":e.handleClose},on:{"update:visible":function(t){e.customDialog=t}}},[a("div",{staticClass:"edit-dialog-body"},[a("el-form",{ref:"ruleForm",attrs:{"label-width":"114px",model:e.formData,rules:e.rules}},[a("el-form-item",{attrs:{label:"班次名称:",prop:"classesName"}},[a("limitInput",{attrs:{inputWidth:210,inputValue:e.formData.classesName,holder:"请输入班次名称",getByType:"word",maxLength:10},on:{"update:inputValue":function(t){e.$set(e.formData,"classesName",t)}}})],1),e._v(" "),a("el-form-item",{attrs:{label:"次数限制:",prop:"times"}},[a("div",{staticClass:"times-set-wrap avatar-wrap m-b-10"},[a("el-radio-group",{on:{change:e.changeTimes},model:{value:e.formData.times,callback:function(t){e.$set(e.formData,"times",t)},expression:"formData.times"}},[a("el-radio-button",{attrs:{label:"1"}},[e._v("1天1次上下班")])],1),a("el-checkbox",{staticClass:"m-l-20",on:{change:e.changeTimeRange},model:{value:e.formData.clockType,callback:function(t){e.$set(e.formData,"clockType",t)},expression:"formData.clockType"}},[e._v("打卡时段设置")])],1),e._v(" "),a("div",{staticClass:"times-set-content m-b-20"},[e.formData.clockType?e._e():a("ul",e._l(e.formData.classessTimesJson,function(t,s){return a("li",{key:s+"time"},[a("span",[e._v("第"+e._s(s+1)+"次")]),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("上班")]),e._v(" "),a("el-time-picker",{staticClass:"w-106",attrs:{clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm"},on:{change:function(a){e.changeStart(a,t)}},model:{value:t.startTime,callback:function(a){e.$set(t,"startTime",a)},expression:"item.startTime"}}),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("下班")]),e._v(" "),a("el-time-picker",{staticClass:"w-106",attrs:{clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm"},on:{change:function(a){e.changeEnd(a,t)}},model:{value:t.endTime,callback:function(a){e.$set(t,"endTime",a)},expression:"item.endTime"}}),e._v(" "),Number(t.endTime.split(":")[0])<=Number(t.startTime.split(":")[0])&&Number(t.endTime.split(":")[1])<=Number(t.startTime.split(":")[1])?a("el-tag",{staticClass:"across-tag",attrs:{type:"danger"}},[e._v("次日")]):e._e()],1)})),e._v(" "),e.formData.clockType?a("div",[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.formData.classessTimesJson}},[a("el-table-column",{attrs:{prop:"",label:"",width:"70"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n 第"+e._s(t.$index+1)+"次\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"上下班时间",width:"226"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"cell"},[a("span",{staticClass:"font-12 color-606266"},[e._v("上班")]),e._v(" "),a("el-time-picker",{staticClass:"w-106",attrs:{clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm"},on:{change:function(a){e.changeStart(a,t.row)}},model:{value:t.row.startTime,callback:function(a){e.$set(t.row,"startTime",a)},expression:"scope.row.startTime"}}),e._v(" "),t.$index>0?a("el-tag",{staticClass:"across-tag",attrs:{type:"danger"}},[e._v("次日")]):e._e()],1),e._v(" "),a("div",{staticClass:"cell m-t-20"},[a("span",{staticClass:"font-12 color-606266"},[e._v("下班")]),e._v(" "),a("el-time-picker",{staticClass:"w-106",attrs:{clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm"},on:{change:function(a){e.changeEnd(a,t.row)}},model:{value:t.row.endTime,callback:function(a){e.$set(t.row,"endTime",a)},expression:"scope.row.endTime"}}),e._v(" "),e.checkNextFlag(t.row.startTime,t.row.endTime)?a("el-tag",{staticClass:"across-tag",attrs:{type:"danger"}},[e._v("次日")]):e._e()],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"address",label:"打卡时间范围限制"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"cell"},[a("el-time-picker",{staticClass:"w-106",attrs:{disabled:t.row.startTime==t.row.endTime,"picker-options":{selectableRange:t.row.forbidStartBeginTime},clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm",placeholder:""},model:{value:t.row.allowStartBeginTime,callback:function(a){e.$set(t.row,"allowStartBeginTime",a)},expression:"scope.row.allowStartBeginTime"}}),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("至")]),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("至")]),e._v(" "),a("el-time-picker",{staticClass:"w-106",attrs:{clearable:!1,"picker-options":{selectableRange:t.row.forbidStartEndTime},editable:!1,format:"HH:mm","value-format":"HH:mm",placeholder:""},model:{value:t.row.allowStartEndTime,callback:function(a){e.$set(t.row,"allowStartEndTime",a)},expression:"scope.row.allowStartEndTime"}}),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("可打上班卡")])],1),e._v(" "),a("div",{staticClass:"cell m-t-20"},[a("el-time-picker",{staticClass:"w-106",attrs:{clearable:!1,"picker-options":{selectableRange:t.row.forbidEndStartTime},editable:!1,format:"HH:mm","value-format":"HH:mm",placeholder:""},model:{value:t.row.allowEndStartTime,callback:function(a){e.$set(t.row,"allowEndStartTime",a)},expression:"scope.row.allowEndStartTime"}}),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("至")]),e._v(" "),a("el-time-picker",{staticClass:"w-106",attrs:{disabled:t.row.startTime==t.row.endTime,"picker-options":{selectableRange:t.row.forbidEndEndTime},clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm",placeholder:""},model:{value:t.row.allowEndEndTime,callback:function(a){e.$set(t.row,"allowEndEndTime",a)},expression:"scope.row.allowEndEndTime"}}),e._v(" "),a("span",{staticClass:"font-12 color-606266"},[e._v("可打下班卡")])],1)]}}])})],1)],1):e._e()]),e._v(" "),1==e.formData.times?a("div",{staticClass:"rest-time-set"},[a("el-checkbox",{model:{value:e.formData.relaxFlag,callback:function(t){e.$set(e.formData,"relaxFlag",t)},expression:"formData.relaxFlag"}},[e._v("休息时间")]),e._v(" "),e.formData.relaxFlag?a("el-time-picker",{staticClass:"w-120",attrs:{clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm",placeholder:"休息开始"},model:{value:e.formData.relaxStartDate,callback:function(t){e.$set(e.formData,"relaxStartDate",t)},expression:"formData.relaxStartDate"}}):e._e(),e.formData.relaxFlag?a("el-time-picker",{staticClass:"w-120 m-l-20",attrs:{clearable:!1,editable:!1,format:"HH:mm","value-format":"HH:mm",placeholder:"休息结束"},model:{value:e.formData.relaxEndDate,callback:function(t){e.$set(e.formData,"relaxEndDate",t)},expression:"formData.relaxEndDate"}}):e._e()],1):e._e()]),e._v(" "),a("el-form-item",{attrs:{label:"个性化设置:",prop:""}},[a("div",{staticClass:"m-b-10"},[a("el-checkbox",{model:{value:e.formData.allowLateFlag,callback:function(t){e.$set(e.formData,"allowLateFlag",t)},expression:"formData.allowLateFlag"}},[e._v("允许迟到")]),e._v(" "),e.formData.allowLateFlag?a("el-input-number",{staticClass:"w-90 m-l-20",attrs:{"controls-position":"right",min:1,max:3600},model:{value:e.formData.allowLateDate,callback:function(t){e.$set(e.formData,"allowLateDate",t)},expression:"formData.allowLateDate"}}):e._e(),e._v(" "),e.formData.allowLateFlag?a("span",{staticClass:"font-14 color-606266"},[e._v("分钟以内打上班卡不算迟到")]):e._e()],1),e._v(" "),a("div",{staticClass:"m-b-10"},[a("el-checkbox",{model:{value:e.formData.moreLateFlag,callback:function(t){e.$set(e.formData,"moreLateFlag",t)},expression:"formData.moreLateFlag"}},[e._v("严重迟到")]),e._v(" "),e.formData.moreLateFlag?a("el-input-number",{staticClass:"w-90 m-l-20",attrs:{"controls-position":"right",min:1,max:3600},model:{value:e.formData.moreLateDate,callback:function(t){e.$set(e.formData,"moreLateDate",t)},expression:"formData.moreLateDate"}}):e._e(),e._v(" "),e.formData.moreLateFlag?a("span",{staticClass:"font-14 color-606266"},[e._v("分钟以上打上班卡算严重迟到")]):e._e()],1),e._v(" "),a("div",{staticClass:"m-b-10"},[a("el-checkbox",{model:{value:e.formData.mostLateFlag,callback:function(t){e.$set(e.formData,"mostLateFlag",t)},expression:"formData.mostLateFlag"}},[e._v("旷工迟到")]),e._v(" "),e.formData.mostLateFlag?a("el-input-number",{staticClass:"w-90 m-l-20",attrs:{"controls-position":"right",min:1,max:3600},model:{value:e.formData.mostLateDate,callback:function(t){e.$set(e.formData,"mostLateDate",t)},expression:"formData.mostLateDate"}}):e._e(),e._v(" "),e.formData.mostLateFlag?a("span",{staticClass:"font-14 color-606266"},[e._v("分钟以上打上班卡算旷工")]):e._e()],1),e._v(" "),a("div",{staticClass:"m-b-10"},[a("el-checkbox",{attrs:{disabled:e.maxLate<1.5},on:{change:e.handleChangeLate},model:{value:e.formData.lateRule,callback:function(t){e.$set(e.formData,"lateRule",t)},expression:"formData.lateRule"}},[e._v("晚走次日晚到")]),e._v(" "),a("span",{staticClass:"font-12 color-909399 p-l-10"},[e._v("仅支持固定班制内勤打卡")])],1),e._v(" "),e.formData.lateRule?a("div",{staticClass:"late-rule-wrap border-box"},[a("ul",[e._l(e.formData.lateRuleJson,function(t,s){return a("li",{key:s+"late"},[a("div",{staticClass:"late-rule-text"},[a("span",{staticClass:"font-14 color-909399 p-r-10"},[e._v("晚走规则"+e._s(s+1))]),0!=s?a("el-button",{attrs:{type:"text"},on:{click:function(t){t.stopPropagation(),e.deleteLateRule(s)}}},[e._v("删除")]):e._e()],1),e._v(" "),a("div",{staticClass:"late-rule-body"},[a("span",{staticClass:"font-12 color-909399"},[e._v("第一天下班后晚走")]),e._v(" "),a("el-input-number",{staticClass:"w-90",attrs:{"controls-position":"right",step:.5,min:1,max:10},model:{value:t.lateDate,callback:function(a){e.$set(t,"lateDate",a)},expression:"item.lateDate"}}),e._v(" "),a("span",{staticClass:"font-12 color-909399"},[e._v("小时,第二天上班后晚到")]),e._v(" "),a("el-input-number",{staticClass:"w-90",attrs:{"controls-position":"right",step:.5,min:1,max:e.maxLate},model:{value:t.allowLateDate,callback:function(a){e.$set(t,"allowLateDate",a)},expression:"item.allowLateDate"}}),e._v(" "),a("span",{staticClass:"font-12 color-909399"},[e._v("小时")]),e._v(" "),a("span",{staticClass:"font-12 color-909399"},[e._v("第一天"+e._s(e.hmPlushm(e.formData.classessTimesJson[e.formData.classessTimesJson.length-1].endTime,e.hourTohm(t.lateDate)))+"(次日)下班,第二天"+e._s(e.hmPlushm(e.formData.classessTimesJson[0].startTime,e.hourTohm(t.allowLateDate)))+"上班不算迟到")])],1)])}),e._v(" "),e.formData.lateRuleJson.length<3?a("li",{staticClass:"text-center cursor-pointer",on:{click:function(t){return t.stopPropagation(),e.addLateSet(t)}}},[a("i",{staticClass:"el-icon-plus color-1890ff"}),a("span",{staticClass:"color-1890ff font-14 p-l-10"},[e._v("新建晚走规则")])]):e._e()],2)]):e._e()])],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){return t.stopPropagation(),e.customCancel(t)}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){t.stopPropagation(),e.customConfirm("ruleForm")}}},[e._v("确定")])],1)])],1)},staticRenderFns:[]};var x={name:"app-detail",components:{createWorkClass:a("VU/8")(b,h,!1,function(e){a("04pW")},"data-v-a03ec7f0",null).exports},props:{brandId:{type:String,default:function(){return""}},tabType:{type:String,default:function(){return"1"}},activeGroupId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",activeName:"first",activeBrand:this.brandId,activeGroup:this.activeGroupId,enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,conditionObj:{attenceGroupName:"",classesName:""},groupListData:[],classifyList:[],currentPage:1,pageSize:20,total:0,workClassShow:!1,classesId:""}},methods:{handleTabClick:function(e,t){var a=this;return i()(n.a.mark(function e(){var t;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:(t=a).pageSize=20,t.currentPage=1,t.getTableList(t.brandId);case 4:case"end":return e.stop()}},e,a)}))()},toWorkGroupSet:function(){this.$router.push("/workGroupSet?appIcon="+this.$route.query.appIcon)},toEditWorkTime:function(e,t){this.$router.push("/workTimeManage?appIcon="+this.$route.query.appIcon+"&attenceGroupId="+t.attenceGroupId)},toEditGroup:function(e,t){this.$router.push("/workTimeManage?appIcon="+this.$route.query.appIcon+"&attenceGroupId="+t.attenceGroupId)},toWorkClassSet:function(){this.workClassShow=!0},toEditClass:function(e,t){this.workClassShow=!0,this.classesId=t.classesId},hideDetailDialog:function(){this.workClassShow=!1,this.classesId="",this.currentPage=1,this.getTableList(this.brandId)},toDel:function(e,t){var a=this;a.$confirm("是否要删除该"+("first"==a.activeName?"考勤组":"班次")+"?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDel(e,t)}).catch(function(){})},postDel:function(e,t){var a=this,s={};"first"==a.activeName?s.attenceGroupId=t.attenceGroupId:s.classesId=t.classesId,Object(u.e)("first"==a.activeName?"/haoban-app-attence-web/attence-del":"/haoban-app-attence-web/classes-del",s).then(function(e){var t=e.data;if(1==t.errorCode)return f.a.showmsg("删除成功","success"),void a.getTableList();d.a.errorMsg(t)}).catch(function(e){a.$message.error({duration:1e3,message:e.message})})},toInput:Object(p.a)(function(e,t){this.currentPage=1,this.getTableList(this.brandId)},500),clearInput:function(){this.currentPage=1,this.getTableList(this.brandId)},changeCondition:function(){this.currentPage=1,this.getTableList(this.brandId)},handleSizeChange:function(e){this.pageSize=e,this.getTableList(this.brandId)},handleCurrentChange:function(e){this.currentPage=e,this.getTableList(this.brandId)},getTableList:function(e){var t=this,a={brandId:e||t.activeBrand,enterpriseId:t.enterpriseId,attenceGroupName:t.conditionObj.attenceGroupName,classesName:t.conditionObj.classesName,pageNum:t.currentPage,pageSize:t.pageSize};Object(u.e)("first"==t.activeName?"/haoban-app-attence-web/attence-list":"/haoban-app-attence-web/classes-page",a).then(function(e){var a=e.data;if(1==a.errorCode)return"first"==t.activeName?(t.groupListData=a.result.list||[],t.classifyList=[]):(t.groupListData=[],a.result.list&&a.result.list.length&&a.result.list.forEach(function(e){e.classessTimesJson&&(e.classessTimesJson=JSON.parse(e.classessTimesJson))}),t.classifyList=a.result.list||[]),void(t.total=a.result.total);d.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},submit:Object(p.a)(function(e){this.setData(e)},500)},watch:{brandId:function(e,t){e&&(this.activeBrand=e)},activeGroupId:function(e,t){e&&(this.activeGroup=e)},tabType:function(e,t){}},mounted:function(){this.$emit("showTab","2"),this.brandId&&1!=this.brandId&&(this.activeBrand=this.brandId),this.getTableList(this.brandId)}},T={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-detail-wrap"},[a("div",[a("div",{staticClass:"common-detail-tab"},[a("el-tabs",{staticClass:"daily-set-tab",on:{"tab-click":e.handleTabClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"考勤组管理",name:"first"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"班次管理",name:"second"}})],1)],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:"first"==e.activeName,expression:"activeName == 'first'"}],staticClass:"app-detail-pane border-box p-20"},[a("div",{staticClass:"m-b-20"},[a("div",{staticClass:"switch-wrap"},[a("div",{staticClass:"flex flex-space-between"},[a("div",[a("el-input",{staticClass:"w-264",staticStyle:{width:"264px"},attrs:{placeholder:"请输入考勤组名称","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.conditionObj.attenceGroupName);var a}},model:{value:e.conditionObj.attenceGroupName,callback:function(t){e.$set(e.conditionObj,"attenceGroupName",t)},expression:"conditionObj.attenceGroupName"}})],1),e._v(" "),a("div",[a("span",{staticClass:"font-14 color-606266 p-r-10"},[e._v("配置说明:考勤组管理,可以添加不同部门或分组的考勤")]),a("el-button",{attrs:{type:"primary"},on:{click:e.toWorkGroupSet}},[e._v("新建考勤组")])],1)])])]),e._v(" "),a("div",[a("el-table",{ref:"multipleTable",staticClass:"select-table",style:{width:"100%"},attrs:{data:e.groupListData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"考勤组名称",width:"120","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.attenceGroupName))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"人数"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.personCount))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"类型","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(1==t.row.attenceType?"固定排班":2==t.row.attenceType?"排班制":"自由排班"))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"考勤时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.attenceTimeDesc)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"最近更新时间","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("timeStampToYmd")(t.row.updateTime)))]),e._v(" "),a("div",[e._v(e._s(e._f("timeStampToHms")(t.row.updateTime)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[2==t.row.attenceType||t.row.personCount?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.toEditWorkTime(t.$index,t.row)}}},[e._v("编辑排班")]):e._e(),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.toEditGroup(t.$index,t.row)}}},[e._v("修改规则")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.toDel(t.$index,t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),0!=e.groupListData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[20,40,60,80],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)]),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:"second"==e.activeName,expression:"activeName == 'second'"}],staticClass:"app-detail-pane border-box p-20"},[a("div",{staticClass:"m-b-20"},[a("div",{staticClass:"switch-wrap"},[a("div",{staticClass:"flex flex-space-between"},[a("div",[a("el-input",{staticClass:"w-264",staticStyle:{width:"264px"},attrs:{placeholder:"请输入班次名称","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.conditionObj.classesName);var a}},model:{value:e.conditionObj.classesName,callback:function(t){e.$set(e.conditionObj,"classesName",t)},expression:"conditionObj.classesName"}})],1),e._v(" "),a("div",[a("el-button",{attrs:{type:"primary"},on:{click:e.toWorkClassSet}},[e._v("新建班次")])],1)])])]),e._v(" "),a("div",[a("el-table",{ref:"multipleTable",staticClass:"select-table",style:{width:"100%"},attrs:{data:e.classifyList,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"班次名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.classesName))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"考勤时间"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.classessTimesJson,function(t,s){return a("div",{key:s+"time"},[e._v(e._s(t.startTime)+"-"+e._s(t.endTime))])})}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.toEditClass(t.$index,t.row)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.toDel(t.$index,t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),0!=e.classifyList.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[20,40,60,80],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)])]),e._v(" "),a("create-work-class",{attrs:{classesId:e.classesId,workClassShow:e.workClassShow},on:{hideDetailDialog:e.hideDetailDialog}})],1)},staticRenderFns:[]};var g=a("VU/8")(x,T,!1,function(e){a("0UFt")},"data-v-14b21f93",null);t.default=g.exports}});
\ No newline at end of file
webpackJsonp([87],{DH1q:function(e,t){},lFAe:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i("//Fk"),a=i.n(s),l=i("gBtx"),n=i.n(l),d=i("mvHQ"),o=i.n(d),r=i("DAYN"),f=i.n(r),c=i("Isrn"),p=i("l46T"),m=i("fPyK"),u=[{parentCode:"defineInfo",fieldCode:"-1",fieldName:"单行输入框",systemFlag:!1,fieldEdited:1,fieldType:"0",fixed:!1,fieldDescription:"请输入",fieldOperations:{ruleContent:[],fieldContent:[]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"多行输入框",systemFlag:!1,fieldEdited:1,fieldType:"1",fixed:!1,fieldDescription:"请输入",fieldOperations:{ruleContent:[],fieldContent:[]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"单选框",systemFlag:!1,fieldEdited:1,fieldType:"2",fixed:!1,fieldDescription:"请选择",fieldOperations:{ruleContent:[],fieldContent:[{type:"radio",name:"选项1"},{type:"radio",name:"选项2"},{type:"radio",name:"选项3"}]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"多选框",systemFlag:!1,fieldEdited:1,fieldType:"3",fixed:!1,fieldDescription:"请选择",fieldOperations:{ruleContent:[],fieldContent:[{type:"checkbox",name:"选项1"},{type:"checkbox",name:"选项2"},{type:"checkbox",name:"选项3"}]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"日期",systemFlag:!1,fieldEdited:1,fieldType:"4",fixed:!1,fieldDescription:"请选择",fieldOperations:{typeValue:"yyyy-MM-dd",ruleContent:[{type:"radio",name:"年-月-日",key:"yyyy-MM-dd",isEdit:1},{type:"radio",name:"年-月",key:"yyyy-MM",isEdit:1}],fieldContent:[]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"日期区间",systemFlag:!1,fieldEdited:1,fieldType:"5",fixed:!1,fieldOperations:{startName:"开始时间",endName:"结束时间",startDescription:"请选择开始时间",endDescription:"请选择结束时间",typeValue:"yyyy-MM-dd",ruleContent:[{type:"radio",name:"年-月-日",key:"yyyy-MM-dd",isEdit:1},{type:"radio",name:"年-月",key:"yyyy-MM",isEdit:1}],fieldContent:[]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"数字输入框",systemFlag:!1,fieldType:"6",fieldEdited:1,fixed:!1,fieldDescription:"请输入",fieldOperations:{ruleContent:[],fieldContent:[],unit:"元"},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"图片",systemFlag:!1,fieldType:"7",fieldEdited:1,fixed:!1,fieldDescription:"最多上传9张图片",fieldOperations:{ruleContent:[],fieldContent:[]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}}],v=function(){return u},C=i("3E4D"),g=i("Ch4/"),h=i("PI0u"),y=i("P9l9"),_={name:"staffRecordsTemplate",data:function(){return{activeName:"first",rightName:"first",dialogVisible:!1,bodyHeight:(document.documentElement.clientHeight||document.body.clientHeight)+"px",isDragging:!1,delayedDragging:!1,leftOption:{group:{name:"people",pull:"clone",put:!1},sort:!1,disabled:!1},leftDefineOption:{group:{name:"people",pull:"clone",put:!1},sort:!1,disabled:!1},selectKey:"",baseInfo:[],jobInfo:[],selfInfo:[],eduInfo:[],contractInfo:[],contactInfo:[],personalInfo:[],defineInfo:v(),currentIndex:0,currentChildKey:null,currentChildIndex:null,childIndex:0,tempaletDataList:[{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"baseInfo",fieldName:"基本信息",fieldEdited:!1,fieldOperations:{ruleContent:[],fieldContent:[]},isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""},{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"jobInfo",fieldName:"工作信息",fieldEdited:!1,isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""},{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"selfInfo",fieldName:"个人信息",fieldEdited:!1,isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""},{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"eduInfo",fieldName:"学历信息",fieldEdited:!1,isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""},{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"contractInfo",fieldName:"合同信息",fieldEdited:!1,isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""},{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"contactInfo",fieldName:"紧急联系人",fieldEdited:!1,isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""},{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"personalInfo",fieldName:"个人资料",fieldEdited:!1,isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""}],fieldParent:{baseInfo:{},jobInfo:{},selfInfo:{},eduInfo:{},contractInfo:{},contactInfo:{},personalInfo:{}},setList:[]}},created:function(){},methods:{baseInfoClone:function(){},clickItem:function(e){this.tempaletDataList.map(function(e){return e.fieldCode}).includes(e.parentCode)||"defineInfo"===e.parentCode||(this.tempaletDataList.push(this.fieldParent[e.parentCode]),this.tempaletDataList=JSON.parse(o()(this.tempaletDataList)))},checkMove:function(e){var t=!0;return"baseInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("baseInfo")||(t=!1),"jobInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("jobInfo")||(t=!1),"selfInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("selfInfo")||(t=!1),"eduInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("eduInfo")||(t=!1),"contractInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("contractInfo")||(t=!1),"contactInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("contactInfo")||(t=!1),"personalInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("personalInfo")||(t=!1),t},onMove:function(e){return!!this.checkMove(e)&&!e.draggedContext.element.fixed},onChildMove:function(e){return-1!=e.dragged.className.indexOf("block-class")&&e.to.className.indexOf("block-wrap"),!0},itemMoveEnd:function(e){var t=this;t.isDragging=!1,t.selectKey="",t.selectKey=e.clone.dataset.type,t.tempaletDataList.forEach(function(e,i){e.children.forEach(function(e,i){var s;e.systemFlag&&e.fieldCode==t.selectKey&&(s=e.parentCode,t[s].forEach(function(e,i){e.fieldCode==t.selectKey&&(e.fixed=!0)}))})}),t.selectKey="",t.tempaletDataList=JSON.parse(o()(t.tempaletDataList)),t.$forceUpdate()},selectItem:function(e,t){this.currentIndex=t,this.currentChildIndex=null},deleteItem:function(e,t){this.tempaletDataList.splice(t,1),this.currentIndex--,this.currentIndex<=0&&(this.currentIndex=0),this[e].forEach(function(e,t){e.fixed=!1})},addDragItem:function(e){return!1},selectChildItem:function(e,t,i,s){this.currentIndex=null,this.currentChildKey=e,this.childIndex=t,this.currentChildIndex=i},deleteChildItem:function(e,t,i,s,a){this.childIndex=t,this.currentIndex=null,this.currentChildKey=this.tempaletDataList[t].children[i].fieldCode,this.currentChildIndex--,this.currentChildIndex<=0&&(this.currentChildIndex=0),this.tempaletDataList=JSON.parse(o()(this.tempaletDataList)),this.tempaletDataList[t].children.splice(i,1),this[a.parentCode].forEach(function(t,i){t.fieldCode===e&&(t.fixed=!1)})},delChildItem:function(e,t,i){i.fieldOperations.fieldContent.splice(t,1)},addChildItem:function(e,t,i){if(19!=t){var s="radio";i.systemFlag||3!==parseInt(i.fieldType)||(s="checkbox"),i.fieldOperations.fieldContent.push({type:s,name:"请输入选项"});var a=i.fieldOperations.fieldContent.map(function(e){return e.name});this.isRepeat(a)&&(i.fieldOperations.fieldContent.splice(i.fieldOperations.fieldContent.length-1,1),a.splice(i.fieldOperations.fieldContent.length-1,1),this.$message.error({duration:1e3,message:"选项不能重复"}))}else this.$message.error({duration:1e3,message:"最多可添加 20 项"})},isRepeat:function(e){var t={};for(var i in e){if(t[e[i]])return!0;t[e[i]]=!0}return!1},changeRoute:function(e){this.$router.push(e)},checkTag:function(e){var t={filedFlag:!0,filedRepeat:!1},i=[];return e.forEach(function(e,s){if(""==e.fieldName)return t.filedFlag=!1,t.name=e.fieldName||"",!1;e.children.length&&e.children.forEach(function(e,s){if(e.systemFlag&&""==e.fieldName)return t.filedFlag=!1,t.name=e.fieldName||"",!1;i.push(e.fieldName)})}),this.isRepeat(i)&&(t.filedRepeat=!0),t},getUuid:function(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},saveAndBack:Object(h.a)(function(e){var t=JSON.parse(o()(this.tempaletDataList)),i=this.checkTag(t),s=[];if(i.filedFlag)if(i.filedRepeat)this.$message.error({duration:1e3,message:"字段标题不能重复"});else{if(t.forEach(function(e,t){e.sort=t,e.fixed=!0===e.fixed?1:0,e.isMust=!0===e.isMust?1:0,e.systemFlag=!0===e.systemFlag?1:0,e.parentFieldTemplateId=e.parentFieldTemplateId?e.parentFieldTemplateId:-1,e.fieldTemplateId=e.fieldTemplateId?e.fieldTemplateId:-1,e.children.forEach(function(t,i){s.push(t),t.sort=i,t.fixed=!0===t.fixed?1:0,t.isMust=!0===t.isMust?1:0,t.systemFlag=!0===t.systemFlag?1:0,e.systemFlag||(t.fieldEdited=1),2!==parseInt(t.fieldType)&&3!==parseInt(t.fieldType)||t.fieldOperations.fieldContent.forEach(function(e,i){e.key=String(e.key)?String(e.key):"",t.systemFlag||e.hasOwnProperty("key")&&""!=e.key&&"undefined"!=e.key||(e.key=e.name)}),t.systemFlag||(t.parentCode=e.fieldCode),t.fieldTemplateId=t.fieldTemplateId?t.fieldTemplateId:-1,t.parentFieldTemplateId=e.fieldTemplateId})}),s.length>40)return this.$message.error({duration:1e3,message:"最多设置 40 个字段"}),!1;"save"===e?this.saveAllData(t):this.postPreview(t)}else this.$message.error({duration:1e3,message:i.name+"字段标题不能为空"})},500),saveAllData:function(e){var t=this,i={templateContent:o()(e)};Object(y.e)("/haoban-manage-web/record/record-template-save.json",i).then(function(e){var i=e.data;if(1==i.errorCode)return C.a.showmsg("保存成功","success"),void t.changeRoute("/fileSet");g.a.errorMsg(i)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},postPreview:function(e){var t=this,i={templateContent:o()(e)};Object(y.e)("/haoban-manage-web/record/record-template-preview.json",i).then(function(e){var i=e.data;if(1==i.errorCode){var s=window.location.origin+"/office-mobile/#/staffRecordsTemplate?enterpriseId="+i.result;return t.$refs.qrcodePreview.qrcode(s,"record"),void(t.dialogVisible=!0)}g.a.errorMsg(i)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},closeDialog:function(){this.dialogVisible=!1},getAllFields:function(){var e=this;Object(y.e)("/haoban-manage-web/record/employee-find-system-template.json",{}).then(function(t){var i=t.data;1!=i.errorCode?g.a.errorMsg(i):e.handleAllFields(i.result)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},handleAllFields:function(e){var t=this;e.forEach(function(e,i){t.hasOwnProperty(e.parentCode)&&(e.fixed=1===parseInt(e.fixed),e.isMust=1===parseInt(e.isMust),e.systemFlag=!0,e.fieldOperations=e.fieldOperations?JSON.parse(e.fieldOperations):{},e.staffRecordsIds=e.staffRecordsIds?JSON.parse(e.staffRecordsIds):[],t[e.parentCode].push(e)),t.fieldParent.hasOwnProperty(e.fieldCode)&&(e.children=[],t.fieldParent[e.fieldCode]=e,e.systemFlag=!0)})},getInfo:function(){var e=this;Object(y.e)("/haoban-manage-web/record/employee-find-template.json",{}).then(function(t){var i=t.data;if(1==i.errorCode)return e.setList=[],void(i.result&&i.result.length&&e.handleGetInfo(i.result));g.a.errorMsg(i)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},treeData:function(e){var t=e.filter(function(t){var i=e.filter(function(e){return t.fieldCode==e.parentCode});return i.length>0?t.children=i:t.children=[],0==t.parentCode});return t.sort(function(e,t){return e.sort-t.sort}),t.forEach(function(e,t){e.children&&e.children.length&&e.children.sort(function(e,t){return e.sort-t.sort})}),t},handleGetInfo:function(e){var t=this,i=JSON.parse(o()(e));t.setParent=[],i.forEach(function(e,i){e.fixed=1===n()(e.fixed),e.isMust=1===n()(e.isMust),e.systemFlag=1===n()(e.systemFlag),e.fieldOperations=e.fieldOperations?JSON.parse(e.fieldOperations):{},e.staffRecordsIds=e.staffRecordsIds?JSON.parse(e.staffRecordsIds):[],e.systemFlag&&0==e.parentCode&&t.setParent.push(e.fieldCode),e.systemFlag&&0!=e.parentCode&&t.setList.push(e.fieldCode)}),t.tempaletDataList=t.treeData(i),setTimeout(function(){t.setFixed()},100)},setFixed:function(){var e=this;e.setParent.forEach(function(t,i){e[t].forEach(function(t,i){e.setList.includes(t.fieldCode)&&(t.fixed=!0)})})}},watch:{isDragging:function(e){var t=this;e?t.delayedDragging=!0:t.$nextTick(function(){t.delayedDragging=!1})}},components:{draggable:f.a,AddInput:c.a,limitInput:p.a,qrcodeDialog:m.a},mounted:function(){a.a.all([this.getAllFields(),this.getInfo()]),document.body.ondrop=function(e){e.preventDefault(),e.stopPropagation()}}},I={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"template-wrap",style:{height:e.bodyHeight}},[s("div",{staticClass:"template-contain"},[s("div",{staticClass:"template-head"},[e._m(0),e._v(" "),s("div",{staticClass:"template-btns flex-1 flex-r"},[s("el-button",{attrs:{type:"primary",plain:""},on:{click:function(t){e.saveAndBack("preview")}}},[e._v("预 览")]),e._v(" "),s("el-button",{attrs:{type:"primary",plain:""},on:{click:function(t){e.changeRoute("/fileSet")}}},[e._v("返 回")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:function(t){e.saveAndBack("save")}}},[e._v("保存并启用")])],1)]),e._v(" "),s("div",{staticClass:"template-body"},[s("div",{staticClass:"template-cell template-cell-l"},[s("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[s("el-tab-pane",{attrs:{label:"系统字段",name:"first"}},[s("div",{staticClass:"filed-item-title"},[e._v("基本信息")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list1",list:e.baseInfo,options:e.leftOption,move:e.onMove},on:{clone:e.baseInfoClone,start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.baseInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode,"aria-hidden":"true"},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1),e._v(" "),s("div",{staticClass:"filed-item-title"},[e._v("工作信息")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list2",list:e.jobInfo,options:e.leftOption,move:e.onMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.jobInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1),e._v(" "),s("div",{staticClass:"filed-item-title"},[e._v("个人信息")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list3",list:e.selfInfo,options:e.leftOption,move:e.onMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.selfInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1),e._v(" "),s("div",{staticClass:"filed-item-title"},[e._v("学历信息")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list4",list:e.eduInfo,options:e.leftOption,move:e.onMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.eduInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1),e._v(" "),s("div",{staticClass:"filed-item-title"},[e._v("合同信息")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list5",list:e.contractInfo,options:e.leftOption,move:e.onMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.contractInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1),e._v(" "),s("div",{staticClass:"filed-item-title"},[e._v("紧急联系人")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list5",list:e.contactInfo,options:e.leftOption,move:e.onMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.contactInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1),e._v(" "),s("div",{staticClass:"filed-item-title"},[e._v("个人材料")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list5",list:e.personalInfo,options:e.leftOption,move:e.onMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.personalInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1)]),e._v(" "),s("el-tab-pane",{attrs:{label:"自定义字段",name:"second"}},[s("div",{staticClass:"filed-item-title"}),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list5",list:e.defineInfo,options:e.leftDefineOption,move:e.onChildMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.defineInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[t.systemFlag||0!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||1!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||2!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||3!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||4!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||5!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||6!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||7!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||0!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-one"}),e._v(" "),t.systemFlag||1!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-two"}),e._v(" "),t.systemFlag||2!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-three"}),e._v(" "),t.systemFlag||3!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-four"}),e._v(" "),t.systemFlag||4!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-five"}),e._v(" "),t.systemFlag||5!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-six"}),e._v(" "),t.systemFlag||6!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-seven"}),e._v(" "),t.systemFlag||7!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-eight"})])}))],1)])],1)],1),e._v(" "),s("div",{staticClass:"template-cell template-cell-m"},[s("div",{staticClass:"phone-view"},[s("div",{staticClass:"phone-show-content"},[s("div",{staticClass:"drag-show-content"},[s("div",{staticClass:"view-container"},[s("ul",{staticClass:"view-content",attrs:{id:"showPhoneView"}},[0==e.tempaletDataList.length?[s("img",{staticClass:"templet-null-img",attrs:{src:i("Y7wY")}})]:e._e(),e._v(" "),s("draggable",{staticClass:"drag-wrap",attrs:{options:{group:{name:"people",pull:!1,put:!1},sort:!0}},model:{value:e.tempaletDataList,callback:function(t){e.tempaletDataList=t},expression:"tempaletDataList"}},e._l(e.tempaletDataList,function(t,i){return s("li",{key:"li1"+i,class:["filed-item",e.currentIndex==i?"active-item":"","li-block"],on:{click:function(s){e.selectItem(t.fieldCode,i)}}},["baseInfo"!=t.fieldCode&&"jobInfo"!=t.fieldCode&&"selfInfo"!=t.fieldCode?s("span",{staticClass:"item-close p-item-close",on:{click:function(s){s.stopPropagation(),e.deleteItem(t.fieldCode,i)}}},[s("i",{staticClass:"el-icon-close"})]):e._e(),e._v(" "),[s("div",{staticClass:"block"},[s("div",{staticClass:"block-head"},[s("div",{class:["opencard-item-title",t.fieldName.length>6?"block-pre-wrap":""]},[e._v(e._s(t.fieldName))])]),e._v(" "),s("ul",{staticClass:"view-content"},[s("draggable",{class:["drag-wrap","block-wrap",t.fieldCode],attrs:{options:{group:{name:"people",pull:!1,put:!0},sort:!0}},on:{add:e.addDragItem},model:{value:t.children,callback:function(i){e.$set(t,"children",i)},expression:"item.children"}},e._l(t.children,function(a,l){return s("li",{key:"li"+l,class:["filed-item","child-filed-item",e.currentChildKey==a.fieldCode&&e.currentChildIndex==l?"active-item":""],on:{click:function(s){s.stopPropagation(),e.selectChildItem(a.fieldCode,i,l,t.children)}}},["clerkPhone"!=a.fieldCode&&"clerkName"!=a.fieldCode&&"groupName"!=a.fieldCode&&"clerkCode"!=a.fieldCode&&"positionName"!=a.fieldCode&&"clerkType"!=a.fieldCode&&"clerkStatus"!=a.fieldCode&&"sex"!=a.fieldCode&&"hireDate"!=a.fieldCode&&"nation"!=a.fieldCode?s("span",{staticClass:"item-close child-item-close",on:{click:function(s){s.stopPropagation(),e.deleteChildItem(a.fieldCode,i,l,t.children,a)}}},[s("i",{staticClass:"el-icon-close"})]):e._e(),e._v(" "),2==a.fieldType||3==a.fieldType||4==a.fieldType?s("div",{staticClass:"flex"},[s("div",{class:["opencard-item-title",a.fieldName.length>6?"title-pre-wrap":""]},[e._v(e._s(a.fieldName))]),e._v(" "),s("div",{staticClass:"draged-item-show"},[s("span",{staticClass:"show-warm-text show-warm-text-flag select-flag"},[e._v(e._s(a.fieldDescription)+" "),s("i",{staticClass:"el-icon-arrow-right"})])])]):e._e(),e._v(" "),5==a.fieldType?s("div",{staticClass:"flex flex-column"},[s("div",[s("div",{class:["opencard-item-title",a.fieldOperations.startName.length>6?"title-pre-wrap":""]},[e._v(e._s(a.fieldOperations.startName))]),e._v(" "),s("div",{staticClass:"draged-item-show"},[s("span",{staticClass:"show-warm-text show-warm-text-flag select-flag"},[e._v(e._s(a.fieldOperations.startDescription)),s("i",{staticClass:"el-icon-arrow-right"})])])]),e._v(" "),s("div",{staticClass:"b-t-1"},[s("div",{class:["opencard-item-title",a.fieldOperations.endName.length>6?"title-pre-wrap":""]},[e._v(e._s(a.fieldOperations.endName))]),e._v(" "),s("div",{staticClass:"draged-item-show"},[s("span",{staticClass:"show-warm-text show-warm-text-flag select-flag"},[e._v(e._s(a.fieldOperations.endDescription)),s("i",{staticClass:"el-icon-arrow-right"})])])])]):e._e(),e._v(" "),7==a.fieldType?s("div",{staticClass:"flex"},[s("div",{class:["opencard-item-title",a.fieldName.length>6?"title-pre-wrap":""]},[e._v(e._s(a.fieldName))]),e._v(" "),s("div",{staticClass:"draged-item-show"},[s("span",{staticClass:"show-warm-text show-warm-text-flag select-flag"},[s("i",{staticClass:"iconfont icon-icon"})])])]):e._e(),e._v(" "),0==a.fieldType||1==a.fieldType||6==a.fieldType?s("div",[s("div",{class:["opencard-item-title",a.fieldName.length>6?"title-pre-wrap":""]},[e._v(e._s(a.fieldName))]),e._v(" "),s("div",{staticClass:"draged-item-show"},[s("span",{staticClass:"show-warm-text show-warm-text-flag"},[e._v(e._s(a.fieldDescription))])])]):e._e()])}))],1)])]],2)}))],2)])])])])]),e._v(" "),s("div",{staticClass:"template-cell template-cell-r"},[s("el-tabs",{model:{value:e.rightName,callback:function(t){e.rightName=t},expression:"rightName"}},[s("el-tab-pane",{attrs:{label:"控件设置",name:"first"}},[s("div",{attrs:{id:"edit-box"}},[s("div",{staticClass:"edit-view baby-info-flag baby-info"},[e._l(e.tempaletDataList,function(t,i){return[e.currentIndex==i&&"0"==t.parentCode?[s("div",{key:"parent"+i,staticClass:"edit-item "},[s("div",{staticClass:"edit-item-title edit-title-padding"},[e._v("标题")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldName,holder:"",disflag:!0,getByType:"word",maxLength:10},on:{"update:inputValue":function(i){e.$set(t,"fieldName",i)}}})],1)]:e._e(),e._v(" "),e.childIndex==i&&t.children&&t.children.length?[e._l(t.children,function(t,a){return[e.currentChildIndex==a?[s("div",{key:"child"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("标题")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldName,holder:"",disflag:t.systemFlag,getByType:"word",maxLength:10},on:{"update:inputValue":function(i){e.$set(t,"fieldName",i)}}}),e._v(" "),7==t.fieldType?s("p",{staticStyle:{"margin-top":"8px","font-size":"12px",color:"rgba(255, 255, 255, 0.7)"}},[e._v("\n "+e._s(t.fieldDescription)+"\n ")]):e._e()],1)]:e._e(),e._v(" "),e.currentChildIndex==a&&5!=t.fieldType&&7!=t.fieldType?[s("div",{key:"child1"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("提示文字")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldDescription,holder:"",disflag:!1,getByType:"word",maxLength:20},on:{"update:inputValue":function(i){e.$set(t,"fieldDescription",i)}}})],1)]:e._e(),e._v(" "),e.currentChildIndex==a&&5==t.fieldType?[s("div",{key:"child2"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("开始时间")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldOperations.startName,holder:"",disflag:t.systemFlag,getByType:"word",maxLength:10},on:{"update:inputValue":function(i){e.$set(t.fieldOperations,"startName",i)}}})],1),e._v(" "),s("div",{key:"child3"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("提示文字")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldOperations.startDescription,holder:"",disflag:!1,getByType:"word",maxLength:20},on:{"update:inputValue":function(i){e.$set(t.fieldOperations,"startDescription",i)}}})],1),e._v(" "),s("div",{key:"child4"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("结束时间")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldOperations.endName,holder:"",disflag:t.systemFlag,getByType:"word",maxLength:10},on:{"update:inputValue":function(i){e.$set(t.fieldOperations,"endName",i)}}})],1),e._v(" "),s("div",{key:"child5"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("提示文字")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldOperations.endDescription,holder:"",disflag:!1,getByType:"word",maxLength:20},on:{"update:inputValue":function(i){e.$set(t.fieldOperations,"endDescription",i)}}})],1)]:e._e(),e._v(" "),e.currentChildIndex==a&&6==t.fieldType?[s("div",{key:"child6"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("单位")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldOperations.unit,holder:"",disflag:!1,getByType:"word",maxLength:20},on:{"update:inputValue":function(i){e.$set(t.fieldOperations,"unit",i)}}})],1)]:e._e(),e._v(" "),e.currentChildIndex!=a||4!=t.fieldType&&5!=t.fieldType?e._e():[s("div",{key:"child7"+a,staticClass:"edit-item "},[s("div",{staticClass:"edit-item-title"},[e._v("日期类型")]),e._v(" "),e._l(t.fieldOperations.ruleContent,function(i,a){return[s("el-radio",{key:"child8"+a,attrs:{label:i.key},model:{value:t.fieldOperations.typeValue,callback:function(i){e.$set(t.fieldOperations,"typeValue",i)},expression:"childItem.fieldOperations.typeValue"}},[e._v("\n "+e._s(i.name)+"\n ")])]})],2)],e._v(" "),e.currentChildIndex!=a||"2"!=t.fieldType&&"3"!=t.fieldType?e._e():[s("div",{key:"child9"+a,staticClass:"edit-item "},[s("div",{staticClass:"edit-item-title"},[e._v("选项 "),t.systemFlag?e._e():s("span",[e._v("最多20项,每项最多10个字")])]),e._v(" "),e._l(t.fieldOperations.fieldContent,function(a,l){return[s("div",{key:"child10"+l,staticClass:"margin-t-15 limit-w-340",style:0==l?"margin-top: 0":""},[s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:a.name,holder:"",disflag:t.systemFlag,getByType:"word",maxLength:10},on:{"update:inputValue":function(t){e.$set(a,"name",t)}}}),e._v(" "),!t.systemFlag&&t.fieldOperations.fieldContent.length>1?s("i",{staticClass:"opt-btn el-icon-remove del-item",on:{click:function(s){e.delChildItem(i,l,t)}}}):e._e(),e._v(" "),!t.systemFlag&&l<19?[l==t.fieldOperations.fieldContent.length-1?s("i",{staticClass:"opt-btn el-icon-circle-plus add-item",on:{click:function(s){e.addChildItem(i,l,t)}}}):e._e()]:e._e()],2)]})],2)],e._v(" "),e.currentChildIndex==a?[s("div",{key:"child11"+a,staticClass:"edit-item"},[s("div",{staticClass:"edit-item-title"},[e._v("验证")]),e._v(" "),s("el-checkbox",{model:{value:t.isMust,callback:function(i){e.$set(t,"isMust",i)},expression:"childItem.isMust"}},[e._v("必填")])],1)]:e._e(),e._v(" "),e.currentChildIndex==a?[s("div",{key:"parent2"+a,staticClass:"edit-item "},[s("div",{staticClass:"edit-item-title"},[e._v("员工档案中")]),e._v(" "),s("div",{staticClass:"staffRecords-limit"},[s("el-radio",{staticClass:"label-cell",attrs:{disabled:"clerkPhone"==t.fieldCode||"groupName"==t.fieldCode||"clerkCode"==t.fieldCode||"positionName"==t.fieldCode,label:"1"},model:{value:t.staffRecordsIds.staffVisible,callback:function(i){e.$set(t.staffRecordsIds,"staffVisible",i)},expression:"childItem.staffRecordsIds.staffVisible"}},[e._v("对员工可见")]),e._v(" "),s("el-radio",{staticClass:"label-cell",attrs:{disabled:"clerkPhone"==t.fieldCode||"groupName"==t.fieldCode||"clerkCode"==t.fieldCode||"positionName"==t.fieldCode,label:"0"},model:{value:t.staffRecordsIds.staffVisible,callback:function(i){e.$set(t.staffRecordsIds,"staffVisible",i)},expression:"childItem.staffRecordsIds.staffVisible"}},[e._v("对员工不可见")])],1),e._v(" "),s("div",{staticClass:"staffRecords-limit"},[s("el-radio",{staticClass:"label-cell",attrs:{disabled:"clerkPhone"==t.fieldCode||"groupName"==t.fieldCode||"clerkCode"==t.fieldCode||"positionName"==t.fieldCode,label:"1"},model:{value:t.staffRecordsIds.staffModify,callback:function(i){e.$set(t.staffRecordsIds,"staffModify",i)},expression:"childItem.staffRecordsIds.staffModify"}},[e._v("对员工可修改")]),e._v(" "),s("el-radio",{staticClass:"label-cell",attrs:{disabled:"clerkPhone"==t.fieldCode||"groupName"==t.fieldCode||"clerkCode"==t.fieldCode||"positionName"==t.fieldCode,label:"0"},model:{value:t.staffRecordsIds.staffModify,callback:function(i){e.$set(t.staffRecordsIds,"staffModify",i)},expression:"childItem.staffRecordsIds.staffModify"}},[e._v("对员工不可修改")])],1)])]:e._e()]})]:e._e()]})],2)])])],1)],1)])]),e._v(" "),s("qrcode-dialog",{ref:"qrcodePreview",model:{value:e.dialogVisible,callback:function(t){e.dialogVisible=t},expression:"dialogVisible"}})],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"template-title flex-1"},[t("img",{attrs:{src:i("LbEI"),alt:"logo"}}),this._v(" "),t("span",{staticClass:"template-title-span"},[this._v("员工档案设置")])])}]};var x=i("VU/8")(_,I,!1,function(e){i("DH1q")},"data-v-20a80646",null);t.default=x.exports}});
\ No newline at end of file
webpackJsonp([87],{"G/J9":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("Ke24"),r=a("Ie7z"),o=a("P9l9"),n=a("3E4D"),l=a("Ch4/"),i=a("PI0u"),c={name:"chat-log",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},components:{commonDetailTop:s.a,vueSelectStore:r.a},data:function(){var e=this;return{activeBrand:this.brandId,activeGroup:this.activeGroupId,activeId:"3",topMenuData:[{id:"1",name:"在线沟通设置",path:"/onlineChatSet?appIcon="+this.$route.query.appIcon+"&activeTab="+this.$route.query.activeTab},{id:"2",name:"卡券列表",path:"/onlineChatSet?appIcon="+this.$route.query.appIcon+"&activeTab="+this.$route.query.activeTab},{id:"3",name:this.$route.query.coupCardId?"编辑卡券":"新增卡券"}],selectCoupCardId:"",selectList:"",tableData:[],conditionObj:{searchInput:""},appScene:2,defaultStoreList:[],selectType:"store",storeTreeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1},groupTreeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1},currentPage:1,pageSize:6,total:0,formData:{id:"",coupCardId:"",sendRange:"0",selectList:[],eachSendTimes:3,sendType:"0",totalSendTimes:0},rules:{coupCardId:[{required:!0,message:"请选择卡券",trigger:"change"}],sendRange:[{validator:function(t,a,s){return""==a?s(new Error("请选择发送范围")):"1"!=a&&"2"!=a||e.formData.selectList.length?void s():s(new Error("请选择发送范围"))},trigger:"change"}],sendType:[{validator:function(t,a,s){return""==a?s(new Error("请选择券发放总数")):"1"!=a||e.formData.totalSendTimes?void s():s(new Error("请选择券发放总数"))},trigger:"change"}],eachSendTimes:[{required:!0,message:"请输入券发放张数",trigger:"blur"}]}}},methods:{submitForm:function(e,t){var a=this;return a.formData.coupCardId=a.selectCoupCardId,!!("1"!=a.formData.sendRange&&"2"!=a.formData.sendRange||a.formData.selectList.length)&&(!("1"==a.formData.sendType&&!a.formData.totalSendTimes)&&(!("1"==a.formData.receiveType&&!a.formData.totalReceiveTimes)&&void a.$refs[e].validate(function(e){e&&a.postSaveCard(t)})))},postSaveCard:function(e){var t=this,a={id:t.formData.id,coupCardId:t.formData.coupCardId,sendRange:t.formData.sendRange,selectList:1==t.formData.sendRange?t.formData.selectList.map(function(e){return e.groupId||e.id}).join(","):2==t.formData.sendRange?t.formData.selectList.map(function(e){return e.storeId||e.id}).join(","):"",eachSendTimes:t.formData.eachSendTimes,sendType:t.formData.sendType,totalSendTimes:t.formData.totalSendTimes,brandId:t.brandId};Object(o.e)(t.$route.query.coupCardId?"/haoban-app-member-web/cardCoupon/edit-card-coup":"/haoban-app-member-web/cardCoupon/add-card-coup",a).then(function(a){var s=a.data;1==s.errorCode&&(n.a.showmsg(t.$route.query.coupCardId?"编辑卡券成功":"新建卡券成功","success"),e?(t.formData={id:"",coupCardId:"",sendRange:"0",selectList:[],eachSendTimes:3,sendType:"0",totalSendTimes:0},t.tableData.forEach(function(e){e.coupCardId==t.selectCoupCardId&&(e.selected=1)}),t.$nextTick(function(){t.selectCoupCardId=""})):t.$router.push("/onlineChatSet?activeTab="+t.$route.query.activeTab+"&appIcon="+t.$route.query.appIcon)),l.a.errorMsg(s)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},toReturn:function(){this.$router.go(-1)},toInput:Object(i.a)(function(e,t){this.currentPage=1,this.getTableList()},200),clearInput:function(){this.currentPage=1,this.getTableList()},changeRange:function(e){this.formData.selectList=[]},showDialogLayer:function(e,t){this.selectType=e,this.defaultStoreList=t,"store"==e?this.storeTreeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0,openNextBool:!0}:this.groupTreeSet={isSelectPerson:!1,dialogVisible:!0,isSingle:!1,openNextBool:!0}},handleSelectedList:function(e){this.formData.selectList=e,this.defaultStoreList=e},delDepart:function(e,t,a){t.splice(e,1)},handleSizeChange:function(e){this.pageSize=e,this.getTableList()},handleCurrentChange:function(e){this.currentPage=e,this.getTableList()},getCardData:function(){var e=this,t={coupCardId:e.$route.query.coupCardId,brandId:e.brandId};Object(o.a)("/haoban-app-member-web/cardCoupon/find-card-coup-detail",t).then(function(t){var a=t.data;if(1==a.errorCode)return a.result.list&&a.result.list.forEach(function(e){e.label=e.name}),e.formData={id:a.result.detail.id,coupCardId:a.result.detail.coupCardId,sendRange:String(a.result.detail.sendRange),selectList:0!=a.result.detail.sendRange?a.result.list:[],eachSendTimes:a.result.detail.eachSendTimes,sendType:String(a.result.detail.sendType),totalSendTimes:a.result.detail.totalSendTimes},e.defaultStoreList=0!=a.result.detail.sendRange?a.result.list:[],e.selectCoupCardId=a.result.detail.coupCardId,!1;l.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getTableList:function(e){var t=this,a={cardName:t.searchInput||"",pageNum:t.currentPage,pageSize:t.pageSize,brandId:t.activeBrand};Object(o.a)("/haoban-app-member-web/cardCoupon/find-select-card-page",a).then(function(e){var a=e.data;if(1==a.errorCode)return t.tableData=a.result.list||[],t.total=a.result.pageInfo.total,t.$route.query.coupCardId&&t.getCardData(),!1;l.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{brandId:function(e,t){e&&(this.activeBrand=e,this.getTableList())},activeGroupId:function(e,t){e&&(this.activeGroup=e)}},mounted:function(){this.$emit("showTab","2"),this.brandId&&this.getTableList()}},d={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"chat-log boder-box"},[a("common-detail-top",{attrs:{topMenuData:e.topMenuData,activeId:e.activeId}}),e._v(" "),a("div",{staticClass:"new-card-body"},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.formData,rules:e.rules,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"选择卡券:",prop:"coupCardId"}},[a("div",{staticClass:"search-div"},[a("el-input",{staticClass:"w-264",staticStyle:{width:"264px"},attrs:{placeholder:"请输入卡券名称",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.searchInput);var a}},model:{value:e.searchInput,callback:function(t){e.searchInput=t},expression:"searchInput"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),a("span",{staticClass:"search-tip p-l-20 font-14 color-909399"},[e._v("领取限制<100的卡券不支持选择,系统已过滤,符合条件共"+e._s(e.total)+"张")])],1),e._v(" "),a("div",{staticClass:"chat-log-content boder-box m-t-20"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{label:"",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-radio",{attrs:{disabled:1==t.row.selected,label:t.row.coupCardId},model:{value:e.selectCoupCardId,callback:function(t){e.selectCoupCardId=t},expression:"selectCoupCardId"}},[e._v(e._s(""))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"cardName",label:"卡券名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"备注名","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.subName)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"effectDateString",label:"有效期","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"cardLimit",label:"领取限制","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"storeMode",label:"适用门店","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(0==t.row.storeMode?"所有门店":1==t.row.storeMode?"部分分组":"部分门店")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"couponStock",label:"库存","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"getedQuantity",label:"领取次数","show-overflow-tooltip":""}})],1),e._v(" "),0!=e.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,layout:" prev, pager, next",total:e.total},on:{"current-change":e.handleCurrentChange}})],1):e._e()],1)]),e._v(" "),a("div",{staticClass:"el-form-item el-form-item--large"},[a("label",{staticClass:"el-form-item__label",staticStyle:{width:"120px",cursor:"pointer"},attrs:{for:"name"}},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"卡券的发送范围设置",placement:"top-start"}},[a("span",[e._v("选择发送范围"),a("span",{staticClass:"el-icon-info font-12 color-909399"}),e._v(" :")])])],1),e._v(" "),a("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"120px"}},[a("el-radio",{attrs:{label:"0"},on:{change:e.changeRange},model:{value:e.formData.sendRange,callback:function(t){e.$set(e.formData,"sendRange",t)},expression:"formData.sendRange"}},[e._v("所有门店")]),e._v(" "),a("el-radio",{staticClass:"m-l-40",attrs:{label:"1"},on:{change:e.changeRange},model:{value:e.formData.sendRange,callback:function(t){e.$set(e.formData,"sendRange",t)},expression:"formData.sendRange"}},[e._v("部分分组")]),e._v(" "),1==e.formData.sendRange?a("div",{staticClass:"w-240 inline-block item-cell-select"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"213px"},on:{click:function(t){e.showDialogLayer("group",e.formData.selectList)}}},[a("div",{staticClass:"el-select__tags",staticStyle:{"max-width":"181px"}},[a("span",[e._l(e.formData.selectList,function(t,s){return[a("span",{key:s,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(s,e.formData.selectList)}}})])]})],2)])])])]):e._e(),e._v(" "),a("el-radio",{staticClass:"m-l-40",attrs:{label:"2"},on:{change:e.changeRange},model:{value:e.formData.sendRange,callback:function(t){e.$set(e.formData,"sendRange",t)},expression:"formData.sendRange"}},[e._v("部分门店")]),e._v(" "),2==e.formData.sendRange?a("div",{staticClass:"w-240 inline-block item-cell-select"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"213px"},on:{click:function(t){e.showDialogLayer("store",e.formData.selectList)}}},[a("div",{staticClass:"el-select__tags",staticStyle:{"max-width":"181px"}},[a("span",[e._l(e.formData.selectList,function(t,s){return[a("span",{key:s,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(s,e.formData.selectList)}}})])]})],2)])])])]):e._e(),e._v(" "),"1"!=e.formData.sendRange&&"2"!=e.formData.sendRange||e.formData.selectList.length?e._e():a("div",{staticClass:"el-form-item__error"},[e._v("请选择发送范围")])],1)]),e._v(" "),a("div",{staticClass:"el-form-item el-form-item--large"},[a("label",{staticClass:"el-form-item__label",staticStyle:{width:"120px",cursor:"pointer"},attrs:{for:"name"}},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"卡券限制每个会员最大发放次数",placement:"top-start"}},[a("span",[e._v("券发放张数"),a("span",{staticClass:"el-icon-info font-12 color-909399"}),e._v(" :")])])],1),e._v(" "),a("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"120px"}},[a("el-input-number",{staticClass:"w-90",attrs:{"controls-position":"right",min:0,max:20},model:{value:e.formData.eachSendTimes,callback:function(t){e.$set(e.formData,"eachSendTimes",t)},expression:"formData.eachSendTimes"}}),a("span",{staticClass:"font-14 color-c0c4cc p-l-20"},[e._v("最多20张每人")])],1)]),e._v(" "),a("div",{staticClass:"el-form-item el-form-item--large"},[a("label",{staticClass:"el-form-item__label",staticStyle:{width:"120px",cursor:"pointer"},attrs:{for:"name"}},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"卡券发放总数,不得超过券库存数",placement:"top-start"}},[a("span",[e._v("券发放总数"),a("span",{staticClass:"el-icon-info font-12 color-909399"}),e._v(" :")])])],1),e._v(" "),a("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"120px"}},[a("el-radio",{attrs:{label:"0"},model:{value:e.formData.sendType,callback:function(t){e.$set(e.formData,"sendType",t)},expression:"formData.sendType"}},[e._v("无限制")]),e._v(" "),a("el-radio",{staticClass:"m-l-40",attrs:{label:"1"},model:{value:e.formData.sendType,callback:function(t){e.$set(e.formData,"sendType",t)},expression:"formData.sendType"}},[e._v("限制总数")]),1==e.formData.sendType?a("el-input-number",{staticClass:"m-l-10",attrs:{"controls-position":"right",min:1},model:{value:e.formData.totalSendTimes,callback:function(t){e.$set(e.formData,"totalSendTimes",t)},expression:"formData.totalSendTimes"}}):e._e()],1)]),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.submitForm("ruleForm")}}},[e._v("确认"+e._s(e.$route.query.coupCardId?"编辑":"新建"))]),e._v(" "),e.$route.query.coupCardId?e._e():a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.submitForm("ruleForm","flag")}}},[e._v("保存并继续")]),e._v(" "),a("el-button",{on:{click:e.toReturn}},[e._v("取消")])],1)],1)],1)],1),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{currentBrand:e.activeGroup,appScene:e.appScene,treeSet:e.storeTreeSet,selectType:"store",defaultList:e.defaultStoreList},on:{handleSelectedList:e.handleSelectedList}}),e._v(" "),a("vue-select-store",{ref:"storeSelectorGroup",attrs:{currentBrand:e.activeGroup,appScene:e.appScene,treeSet:e.groupTreeSet,selectType:"group",defaultList:e.defaultStoreList},on:{handleSelectedList:e.handleSelectedList}})],1)},staticRenderFns:[]};var u=a("VU/8")(c,d,!1,function(e){a("hALC")},"data-v-1e122884",null);t.default=u.exports},hALC:function(e,t){}});
\ No newline at end of file
webpackJsonp([88],{"G/J9":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("Ke24"),r=a("Ie7z"),o=a("P9l9"),n=a("3E4D"),l=a("Ch4/"),i=a("PI0u"),c={name:"chat-log",props:{brandId:{type:String,default:function(){return""}},activeGroupId:{type:String,default:function(){return""}}},components:{commonDetailTop:s.a,vueSelectStore:r.a},data:function(){var e=this;return{activeBrand:this.brandId,activeGroup:this.activeGroupId,activeId:"3",topMenuData:[{id:"1",name:"在线沟通设置",path:"/onlineChatSet?appIcon="+this.$route.query.appIcon+"&activeTab="+this.$route.query.activeTab},{id:"2",name:"卡券列表",path:"/onlineChatSet?appIcon="+this.$route.query.appIcon+"&activeTab="+this.$route.query.activeTab},{id:"3",name:this.$route.query.coupCardId?"编辑卡券":"新增卡券"}],selectCoupCardId:"",selectList:"",tableData:[],conditionObj:{searchInput:""},appScene:2,defaultStoreList:[],selectType:"store",storeTreeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1},groupTreeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!1},currentPage:1,pageSize:6,total:0,formData:{id:"",coupCardId:"",sendRange:"0",selectList:[],eachSendTimes:3,sendType:"0",totalSendTimes:0},rules:{coupCardId:[{required:!0,message:"请选择卡券",trigger:"change"}],sendRange:[{validator:function(t,a,s){return""==a?s(new Error("请选择发送范围")):"1"!=a&&"2"!=a||e.formData.selectList.length?void s():s(new Error("请选择发送范围"))},trigger:"change"}],sendType:[{validator:function(t,a,s){return""==a?s(new Error("请选择券发放总数")):"1"!=a||e.formData.totalSendTimes?void s():s(new Error("请选择券发放总数"))},trigger:"change"}],eachSendTimes:[{required:!0,message:"请输入券发放张数",trigger:"blur"}]}}},methods:{submitForm:function(e,t){var a=this;return a.formData.coupCardId=a.selectCoupCardId,!!("1"!=a.formData.sendRange&&"2"!=a.formData.sendRange||a.formData.selectList.length)&&(!("1"==a.formData.sendType&&!a.formData.totalSendTimes)&&(!("1"==a.formData.receiveType&&!a.formData.totalReceiveTimes)&&void a.$refs[e].validate(function(e){e&&a.postSaveCard(t)})))},postSaveCard:function(e){var t=this,a={id:t.formData.id,coupCardId:t.formData.coupCardId,sendRange:t.formData.sendRange,selectList:1==t.formData.sendRange?t.formData.selectList.map(function(e){return e.groupId||e.id}).join(","):2==t.formData.sendRange?t.formData.selectList.map(function(e){return e.storeId||e.id}).join(","):"",eachSendTimes:t.formData.eachSendTimes,sendType:t.formData.sendType,totalSendTimes:t.formData.totalSendTimes,brandId:t.brandId};Object(o.e)(t.$route.query.coupCardId?"/haoban-app-member-web/cardCoupon/edit-card-coup":"/haoban-app-member-web/cardCoupon/add-card-coup",a).then(function(a){var s=a.data;1==s.errorCode&&(n.a.showmsg(t.$route.query.coupCardId?"编辑卡券成功":"新建卡券成功","success"),e?(t.formData={id:"",coupCardId:"",sendRange:"0",selectList:[],eachSendTimes:3,sendType:"0",totalSendTimes:0},t.tableData.forEach(function(e){e.coupCardId==t.selectCoupCardId&&(e.selected=1)}),t.$nextTick(function(){t.selectCoupCardId=""})):t.$router.push("/onlineChatSet?activeTab="+t.$route.query.activeTab+"&appIcon="+t.$route.query.appIcon)),l.a.errorMsg(s)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},toReturn:function(){this.$router.go(-1)},toInput:Object(i.a)(function(e,t){this.currentPage=1,this.getTableList()},200),clearInput:function(){this.currentPage=1,this.getTableList()},changeRange:function(e){this.formData.selectList=[]},showDialogLayer:function(e,t){this.selectType=e,this.defaultStoreList=t,"store"==e?this.storeTreeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0,openNextBool:!0}:this.groupTreeSet={isSelectPerson:!1,dialogVisible:!0,isSingle:!1,openNextBool:!0}},handleSelectedList:function(e){this.formData.selectList=e,this.defaultStoreList=e},delDepart:function(e,t,a){t.splice(e,1)},handleSizeChange:function(e){this.pageSize=e,this.getTableList()},handleCurrentChange:function(e){this.currentPage=e,this.getTableList()},getCardData:function(){var e=this,t={coupCardId:e.$route.query.coupCardId,brandId:e.brandId};Object(o.a)("/haoban-app-member-web/cardCoupon/find-card-coup-detail",t).then(function(t){var a=t.data;if(1==a.errorCode)return a.result.list&&a.result.list.forEach(function(e){e.label=e.name}),e.formData={id:a.result.detail.id,coupCardId:a.result.detail.coupCardId,sendRange:String(a.result.detail.sendRange),selectList:0!=a.result.detail.sendRange?a.result.list:[],eachSendTimes:a.result.detail.eachSendTimes,sendType:String(a.result.detail.sendType),totalSendTimes:a.result.detail.totalSendTimes},e.defaultStoreList=0!=a.result.detail.sendRange?a.result.list:[],e.selectCoupCardId=a.result.detail.coupCardId,!1;l.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getTableList:function(e){var t=this,a={cardName:t.searchInput||"",pageNum:t.currentPage,pageSize:t.pageSize,brandId:t.activeBrand};Object(o.a)("/haoban-app-member-web/cardCoupon/find-select-card-page",a).then(function(e){var a=e.data;if(1==a.errorCode)return t.tableData=a.result.list||[],t.total=a.result.pageInfo.total,t.$route.query.coupCardId&&t.getCardData(),!1;l.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{brandId:function(e,t){e&&(this.activeBrand=e,this.getTableList())},activeGroupId:function(e,t){e&&(this.activeGroup=e)}},mounted:function(){this.$emit("showTab","2"),this.brandId&&this.getTableList()}},d={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"chat-log boder-box"},[a("common-detail-top",{attrs:{topMenuData:e.topMenuData,activeId:e.activeId}}),e._v(" "),a("div",{staticClass:"new-card-body"},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.formData,rules:e.rules,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"选择卡券:",prop:"coupCardId"}},[a("div",{staticClass:"search-div"},[a("el-input",{staticClass:"w-264",staticStyle:{width:"264px"},attrs:{placeholder:"请输入卡券名称",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.searchInput);var a}},model:{value:e.searchInput,callback:function(t){e.searchInput=t},expression:"searchInput"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),a("span",{staticClass:"search-tip p-l-20 font-14 color-909399"},[e._v("领取限制<100的卡券不支持选择,系统已过滤,符合条件共"+e._s(e.total)+"张")])],1),e._v(" "),a("div",{staticClass:"chat-log-content boder-box m-t-20"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{label:"",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-radio",{attrs:{disabled:1==t.row.selected,label:t.row.coupCardId},model:{value:e.selectCoupCardId,callback:function(t){e.selectCoupCardId=t},expression:"selectCoupCardId"}},[e._v(e._s(""))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"cardName",label:"卡券名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"备注名","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.subName)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"effectDateString",label:"有效期","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"cardLimit",label:"领取限制","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"storeMode",label:"适用门店","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(0==t.row.storeMode?"所有门店":1==t.row.storeMode?"部分分组":"部分门店")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"couponStock",label:"库存","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"getedQuantity",label:"领取次数","show-overflow-tooltip":""}})],1),e._v(" "),0!=e.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,layout:" prev, pager, next",total:e.total},on:{"current-change":e.handleCurrentChange}})],1):e._e()],1)]),e._v(" "),a("div",{staticClass:"el-form-item el-form-item--large"},[a("label",{staticClass:"el-form-item__label",staticStyle:{width:"120px",cursor:"pointer"},attrs:{for:"name"}},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"卡券的发送范围设置",placement:"top-start"}},[a("span",[e._v("选择发送范围"),a("span",{staticClass:"el-icon-info font-12 color-909399"}),e._v(" :")])])],1),e._v(" "),a("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"120px"}},[a("el-radio",{attrs:{label:"0"},on:{change:e.changeRange},model:{value:e.formData.sendRange,callback:function(t){e.$set(e.formData,"sendRange",t)},expression:"formData.sendRange"}},[e._v("所有门店")]),e._v(" "),a("el-radio",{staticClass:"m-l-40",attrs:{label:"1"},on:{change:e.changeRange},model:{value:e.formData.sendRange,callback:function(t){e.$set(e.formData,"sendRange",t)},expression:"formData.sendRange"}},[e._v("部分分组")]),e._v(" "),1==e.formData.sendRange?a("div",{staticClass:"w-240 inline-block item-cell-select"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"213px"},on:{click:function(t){e.showDialogLayer("group",e.formData.selectList)}}},[a("div",{staticClass:"el-select__tags",staticStyle:{"max-width":"181px"}},[a("span",[e._l(e.formData.selectList,function(t,s){return[a("span",{key:s,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(s,e.formData.selectList)}}})])]})],2)])])])]):e._e(),e._v(" "),a("el-radio",{staticClass:"m-l-40",attrs:{label:"2"},on:{change:e.changeRange},model:{value:e.formData.sendRange,callback:function(t){e.$set(e.formData,"sendRange",t)},expression:"formData.sendRange"}},[e._v("部分门店")]),e._v(" "),2==e.formData.sendRange?a("div",{staticClass:"w-240 inline-block item-cell-select"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",staticStyle:{width:"213px"},on:{click:function(t){e.showDialogLayer("store",e.formData.selectList)}}},[a("div",{staticClass:"el-select__tags",staticStyle:{"max-width":"181px"}},[a("span",[e._l(e.formData.selectList,function(t,s){return[a("span",{key:s,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.name||t.storeName))]),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(s,e.formData.selectList)}}})])]})],2)])])])]):e._e(),e._v(" "),"1"!=e.formData.sendRange&&"2"!=e.formData.sendRange||e.formData.selectList.length?e._e():a("div",{staticClass:"el-form-item__error"},[e._v("请选择发送范围")])],1)]),e._v(" "),a("div",{staticClass:"el-form-item el-form-item--large"},[a("label",{staticClass:"el-form-item__label",staticStyle:{width:"120px",cursor:"pointer"},attrs:{for:"name"}},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"卡券限制每个会员最大发放次数",placement:"top-start"}},[a("span",[e._v("券发放张数"),a("span",{staticClass:"el-icon-info font-12 color-909399"}),e._v(" :")])])],1),e._v(" "),a("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"120px"}},[a("el-input-number",{staticClass:"w-90",attrs:{"controls-position":"right",min:0,max:20},model:{value:e.formData.eachSendTimes,callback:function(t){e.$set(e.formData,"eachSendTimes",t)},expression:"formData.eachSendTimes"}}),a("span",{staticClass:"font-14 color-c0c4cc p-l-20"},[e._v("最多20张每人")])],1)]),e._v(" "),a("div",{staticClass:"el-form-item el-form-item--large"},[a("label",{staticClass:"el-form-item__label",staticStyle:{width:"120px",cursor:"pointer"},attrs:{for:"name"}},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"卡券发放总数,不得超过券库存数",placement:"top-start"}},[a("span",[e._v("券发放总数"),a("span",{staticClass:"el-icon-info font-12 color-909399"}),e._v(" :")])])],1),e._v(" "),a("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"120px"}},[a("el-radio",{attrs:{label:"0"},model:{value:e.formData.sendType,callback:function(t){e.$set(e.formData,"sendType",t)},expression:"formData.sendType"}},[e._v("无限制")]),e._v(" "),a("el-radio",{staticClass:"m-l-40",attrs:{label:"1"},model:{value:e.formData.sendType,callback:function(t){e.$set(e.formData,"sendType",t)},expression:"formData.sendType"}},[e._v("限制总数")]),1==e.formData.sendType?a("el-input-number",{staticClass:"m-l-10",attrs:{"controls-position":"right",min:1},model:{value:e.formData.totalSendTimes,callback:function(t){e.$set(e.formData,"totalSendTimes",t)},expression:"formData.totalSendTimes"}}):e._e()],1)]),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.submitForm("ruleForm")}}},[e._v("确认"+e._s(e.$route.query.coupCardId?"编辑":"新建"))]),e._v(" "),e.$route.query.coupCardId?e._e():a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.submitForm("ruleForm","flag")}}},[e._v("保存并继续")]),e._v(" "),a("el-button",{on:{click:e.toReturn}},[e._v("取消")])],1)],1)],1)],1),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{currentBrand:e.activeGroup,appScene:e.appScene,treeSet:e.storeTreeSet,selectType:"store",defaultList:e.defaultStoreList},on:{handleSelectedList:e.handleSelectedList}}),e._v(" "),a("vue-select-store",{ref:"storeSelectorGroup",attrs:{currentBrand:e.activeGroup,appScene:e.appScene,treeSet:e.groupTreeSet,selectType:"group",defaultList:e.defaultStoreList},on:{handleSelectedList:e.handleSelectedList}})],1)},staticRenderFns:[]};var u=a("VU/8")(c,d,!1,function(e){a("hALC")},"data-v-1e122884",null);t.default=u.exports},hALC:function(e,t){}});
\ No newline at end of file
webpackJsonp([88],{"9zht":function(e,t){},ys9I:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("fZjL"),a=n.n(r),o=n("3Xzz"),s=n("c4uw"),i=n("XDyb"),l=n("PI0u"),c=n("Ch4/"),u=n("3E4D"),m=n("P9l9"),d={name:"replaceAdmin",data:function(){return{navpath:[{name:"首页",path:"/index"},{name:"设置",path:"/companyAddress"},{name:"更换超级管理员",path:""}],subNavText:"更换超级管理员,需要先验证当前超级管理员身份",active:0,ruleForm:{name:"",phone:1334444444,code:"",nationcode:""},rules:{name:[{required:!0,message:"请输入当前绑定账号",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}]},disableBtn:!1,countNum:60,newFormLoad:!1,newRuleForm:{name:"",id:"",label:"",type:""},newRules:{name:[{required:!0,message:"请输入手机号/姓名",trigger:["blur","change"]}]},treeSet:{isSelectPerson:!0,dialogVisible:!1,isSingle:!0},treeData:{},defaultSelection:[],onlyPerson:!0,changed:""}},computed:{},methods:{showSelect:function(){this.treeSet={dialogVisible:!0,isSingle:!0,isSelectPerson:!0}},handleSelectedList:function(e){e&&a()(e).length&&(this.defaultSelection=[e],this.newRuleForm.name=e.name,this.newRuleForm.id=e.id)},countDown:function(){var e=this,t=setInterval(function(){if(0===e.countNum)return clearInterval(t),e.countNum=60,e.disableBtn=!1,!1;e.countNum--},1e3)},sendCode:Object(l.a)(function(e){this.disableBtn=!0,this.postSendCode(e)},500),postSendCode:function(e){var t=this;Object(m.e)("/haoban-manage-web/enterprise-setting/send-admin-valid-code",{}).then(function(n){var r=n.data;if(1!=r.errorCode)c.a.errorMsg(r);else{t.countDown();var a=String(e).substr(0,3)+"****"+e.substr(7,e.length-1);t.$message({message:"验证码已发送到您的手机:+"+t.ruleForm.nationcode+a,type:"success"})}}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},submitForm:Object(l.a)(function(e){var t=this;t.$refs[e].validate(function(e){if(!e)return!1;t.checkSendCode()})},500),checkSendCode:function(){var e=this,t={code:e.ruleForm.code};Object(m.e)("/haoban-manage-web/enterprise-setting/check-admin-valid-code",t).then(function(t){var n=t.data;1!=n.errorCode?c.a.errorMsg(n):e.active++>2&&e.active}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},newSubmitForm:Object(l.a)(function(e){var t=this;t.newRuleForm.name=t.newRuleForm.name.replace(/(^\s+)|(\s+$)/g,""),t.$refs[e].validate(function(e){if(!e)return!1;t.postReplace()})},500),postReplace:function(){var e=this,t={adminClerkId:e.newRuleForm.id};Object(m.e)("/haoban-manage-web/enterprise-setting/change-admin",t).then(function(t){var n=t.data;if(1==n.errorCode)return e.active++,u.a.showmsg("保存成功,请重新登录!","success"),void e.loginOut();c.a.errorMsg(n)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},submitFormBack:function(){this.$refs.newRuleForm.resetFields(),this.active&&this.active--},loginOut:function(){var e=this;Object(m.e)("/haoban-manage-web/logout",{}).then(function(e){var t=e.data;1!=t.errorCode?c.a.errorMsg(t):window.location.href=window.location.origin+"/haoban-web/#/login"}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getCurrentUser:function(){var e=this,t=JSON.parse(localStorage.getItem("userInfo"));Object(m.e)("/haoban-manage-web/enterprise/find-super-manager",{}).then(function(n){var r=n.data;if(1==r.errorCode)return e.ruleForm.name=r.result.name,e.ruleForm.phone=r.result.phoneNumber,e.ruleForm.nationcode=r.result.nationcode,void(t.phoneNumber!=r.result.phoneNumber?e.disableBtn=!0:e.disableBtn=!1);c.a.errorMsg(r)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},mounted:function(){this.getCurrentUser()},components:{navCrumb:o.a,vueSelectEmployee:s.a,countryMobile:i.a}},h={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"replaceAdmin-wrap common-set-wrap"},[n("nav-crumb",{attrs:{navpath:e.navpath}}),e._v(" "),n("div",{staticClass:"right-content"},[n("div",{staticClass:"right-box",style:{height:e.$store.state.bgHeight}},[n("el-steps",{attrs:{active:e.active,"finish-status":"success","align-center":""}},[n("el-step",{attrs:{title:"获取验证码"}}),e._v(" "),n("el-step",{attrs:{title:"绑定新的超级管理员"}}),e._v(" "),n("el-step",{attrs:{title:"完成"}})],1),e._v(" "),n("div",{staticClass:"w-514 replaceAdmin-wrap-form m-t-45"},[0==e.active?n("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"110px"}},[n("el-form-item",{attrs:{label:"当前绑定账号",prop:"name"}},[n("el-input",{staticClass:"w-280",attrs:{disabled:"",placeholder:""},model:{value:e.ruleForm.name,callback:function(t){e.$set(e.ruleForm,"name",t)},expression:"ruleForm.name"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[n("countryMobile",{attrs:{inputWidth:280,nationCode:e.ruleForm.nationcode,holder:"",disflag:"true"},on:{"update:nationCode":function(t){e.$set(e.ruleForm,"nationcode",t)}},model:{value:e.ruleForm.phone,callback:function(t){e.$set(e.ruleForm,"phone",t)},expression:"ruleForm.phone"}}),n("el-button",{staticClass:"m-l-20 v-align-b",attrs:{type:"primary",plain:"",disabled:e.disableBtn},on:{click:function(t){e.sendCode(e.ruleForm.phone)}}},[e._v(e._s(e.disableBtn&&60==e.countNum||!e.disableBtn&&e.countNum?"获取验证码":e.countNum+"s")+" ")])],1),e._v(" "),n("el-form-item",{attrs:{label:"验证码",prop:"code"}},[n("el-input",{staticClass:"w-280",attrs:{placeholder:"请输入验证码"},model:{value:e.ruleForm.code,callback:function(t){e.$set(e.ruleForm,"code",t)},expression:"ruleForm.code"}})],1),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:function(t){e.submitForm("ruleForm")}}},[e._v("下一步")])],1)],1):e._e(),e._v(" "),n("el-form",{directives:[{name:"show",rawName:"v-show",value:1==e.active,expression:"active == 1"}],ref:"newRuleForm",staticClass:"demo-ruleForm",attrs:{model:e.newRuleForm,rules:e.newRules,"label-width":"140px"}},[n("el-form-item",{attrs:{label:"新绑定超级管理员",prop:"name"}},[n("div",{staticClass:"master-select w-280",on:{click:e.showSelect}},[e._v("\n "+e._s(e.newRuleForm.name?e.newRuleForm.name:"请选择")+"\n ")])]),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary",loading:e.newFormLoad},on:{click:function(t){e.newSubmitForm("newRuleForm")}}},[e._v("提 交")]),e._v(" "),n("el-button",{attrs:{plain:""},on:{click:e.submitFormBack}},[e._v("上一步")])],1)],1),e._v(" "),2==e.active?n("div",{staticClass:"replaceAdmin-wrap-success"},[e._m(0),e._v(" "),n("p",{staticClass:"font-w-500"},[e._v("操作成功")])]):e._e()],1)],1)]),e._v(" "),n("vue-select-employee",{attrs:{defaultSelection:e.defaultSelection,treeSet:e.treeSet,onlyPerson:e.onlyPerson,changed:e.changed},on:{handleSelectedList:e.handleSelectedList}}),e._v(" "),n("vue-gic-footer")],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"icon-outer"},[t("i",{staticClass:"el-icon-success"})])}]};var v=n("VU/8")(d,h,!1,function(e){n("9zht")},"data-v-1d079368",null);t.default=v.exports}});
\ No newline at end of file
webpackJsonp([89],{"9zht":function(e,t){},ys9I:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("fZjL"),a=n.n(r),o=n("3Xzz"),s=n("c4uw"),i=n("XDyb"),l=n("PI0u"),c=n("Ch4/"),u=n("3E4D"),m=n("P9l9"),d={name:"replaceAdmin",data:function(){return{navpath:[{name:"首页",path:"/index"},{name:"设置",path:"/companyAddress"},{name:"更换超级管理员",path:""}],subNavText:"更换超级管理员,需要先验证当前超级管理员身份",active:0,ruleForm:{name:"",phone:1334444444,code:"",nationcode:""},rules:{name:[{required:!0,message:"请输入当前绑定账号",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}]},disableBtn:!1,countNum:60,newFormLoad:!1,newRuleForm:{name:"",id:"",label:"",type:""},newRules:{name:[{required:!0,message:"请输入手机号/姓名",trigger:["blur","change"]}]},treeSet:{isSelectPerson:!0,dialogVisible:!1,isSingle:!0},treeData:{},defaultSelection:[],onlyPerson:!0,changed:""}},computed:{},methods:{showSelect:function(){this.treeSet={dialogVisible:!0,isSingle:!0,isSelectPerson:!0}},handleSelectedList:function(e){e&&a()(e).length&&(this.defaultSelection=[e],this.newRuleForm.name=e.name,this.newRuleForm.id=e.id)},countDown:function(){var e=this,t=setInterval(function(){if(0===e.countNum)return clearInterval(t),e.countNum=60,e.disableBtn=!1,!1;e.countNum--},1e3)},sendCode:Object(l.a)(function(e){this.disableBtn=!0,this.postSendCode(e)},500),postSendCode:function(e){var t=this;Object(m.e)("/haoban-manage-web/enterprise-setting/send-admin-valid-code",{}).then(function(n){var r=n.data;if(1!=r.errorCode)c.a.errorMsg(r);else{t.countDown();var a=String(e).substr(0,3)+"****"+e.substr(7,e.length-1);t.$message({message:"验证码已发送到您的手机:+"+t.ruleForm.nationcode+a,type:"success"})}}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},submitForm:Object(l.a)(function(e){var t=this;t.$refs[e].validate(function(e){if(!e)return!1;t.checkSendCode()})},500),checkSendCode:function(){var e=this,t={code:e.ruleForm.code};Object(m.e)("/haoban-manage-web/enterprise-setting/check-admin-valid-code",t).then(function(t){var n=t.data;1!=n.errorCode?c.a.errorMsg(n):e.active++>2&&e.active}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},newSubmitForm:Object(l.a)(function(e){var t=this;t.newRuleForm.name=t.newRuleForm.name.replace(/(^\s+)|(\s+$)/g,""),t.$refs[e].validate(function(e){if(!e)return!1;t.postReplace()})},500),postReplace:function(){var e=this,t={adminClerkId:e.newRuleForm.id};Object(m.e)("/haoban-manage-web/enterprise-setting/change-admin",t).then(function(t){var n=t.data;if(1==n.errorCode)return e.active++,u.a.showmsg("保存成功,请重新登录!","success"),void e.loginOut();c.a.errorMsg(n)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},submitFormBack:function(){this.$refs.newRuleForm.resetFields(),this.active&&this.active--},loginOut:function(){var e=this;Object(m.e)("/haoban-manage-web/logout",{}).then(function(e){var t=e.data;1!=t.errorCode?c.a.errorMsg(t):window.location.href=window.location.origin+"/haoban-web/#/login"}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getCurrentUser:function(){var e=this,t=JSON.parse(localStorage.getItem("userInfo"));Object(m.e)("/haoban-manage-web/enterprise/find-super-manager",{}).then(function(n){var r=n.data;if(1==r.errorCode)return e.ruleForm.name=r.result.name,e.ruleForm.phone=r.result.phoneNumber,e.ruleForm.nationcode=r.result.nationcode,void(t.phoneNumber!=r.result.phoneNumber?e.disableBtn=!0:e.disableBtn=!1);c.a.errorMsg(r)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},mounted:function(){this.getCurrentUser()},components:{navCrumb:o.a,vueSelectEmployee:s.a,countryMobile:i.a}},h={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"replaceAdmin-wrap common-set-wrap"},[n("nav-crumb",{attrs:{navpath:e.navpath}}),e._v(" "),n("div",{staticClass:"right-content"},[n("div",{staticClass:"right-box",style:{height:e.$store.state.bgHeight}},[n("el-steps",{attrs:{active:e.active,"finish-status":"success","align-center":""}},[n("el-step",{attrs:{title:"获取验证码"}}),e._v(" "),n("el-step",{attrs:{title:"绑定新的超级管理员"}}),e._v(" "),n("el-step",{attrs:{title:"完成"}})],1),e._v(" "),n("div",{staticClass:"w-514 replaceAdmin-wrap-form m-t-45"},[0==e.active?n("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"110px"}},[n("el-form-item",{attrs:{label:"当前绑定账号",prop:"name"}},[n("el-input",{staticClass:"w-280",attrs:{disabled:"",placeholder:""},model:{value:e.ruleForm.name,callback:function(t){e.$set(e.ruleForm,"name",t)},expression:"ruleForm.name"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[n("countryMobile",{attrs:{inputWidth:280,nationCode:e.ruleForm.nationcode,holder:"",disflag:"true"},on:{"update:nationCode":function(t){e.$set(e.ruleForm,"nationcode",t)}},model:{value:e.ruleForm.phone,callback:function(t){e.$set(e.ruleForm,"phone",t)},expression:"ruleForm.phone"}}),n("el-button",{staticClass:"m-l-20 v-align-b",attrs:{type:"primary",plain:"",disabled:e.disableBtn},on:{click:function(t){e.sendCode(e.ruleForm.phone)}}},[e._v(e._s(e.disableBtn&&60==e.countNum||!e.disableBtn&&e.countNum?"获取验证码":e.countNum+"s")+" ")])],1),e._v(" "),n("el-form-item",{attrs:{label:"验证码",prop:"code"}},[n("el-input",{staticClass:"w-280",attrs:{placeholder:"请输入验证码"},model:{value:e.ruleForm.code,callback:function(t){e.$set(e.ruleForm,"code",t)},expression:"ruleForm.code"}})],1),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:function(t){e.submitForm("ruleForm")}}},[e._v("下一步")])],1)],1):e._e(),e._v(" "),n("el-form",{directives:[{name:"show",rawName:"v-show",value:1==e.active,expression:"active == 1"}],ref:"newRuleForm",staticClass:"demo-ruleForm",attrs:{model:e.newRuleForm,rules:e.newRules,"label-width":"140px"}},[n("el-form-item",{attrs:{label:"新绑定超级管理员",prop:"name"}},[n("div",{staticClass:"master-select w-280",on:{click:e.showSelect}},[e._v("\n "+e._s(e.newRuleForm.name?e.newRuleForm.name:"请选择")+"\n ")])]),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary",loading:e.newFormLoad},on:{click:function(t){e.newSubmitForm("newRuleForm")}}},[e._v("提 交")]),e._v(" "),n("el-button",{attrs:{plain:""},on:{click:e.submitFormBack}},[e._v("上一步")])],1)],1),e._v(" "),2==e.active?n("div",{staticClass:"replaceAdmin-wrap-success"},[e._m(0),e._v(" "),n("p",{staticClass:"font-w-500"},[e._v("操作成功")])]):e._e()],1)],1)]),e._v(" "),n("vue-select-employee",{attrs:{defaultSelection:e.defaultSelection,treeSet:e.treeSet,onlyPerson:e.onlyPerson,changed:e.changed},on:{handleSelectedList:e.handleSelectedList}}),e._v(" "),n("vue-gic-footer")],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"icon-outer"},[t("i",{staticClass:"el-icon-success"})])}]};var v=n("VU/8")(d,h,!1,function(e){n("9zht")},"data-v-1d079368",null);t.default=v.exports}});
\ No newline at end of file
webpackJsonp([89],{lFAe:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i("//Fk"),a=i.n(s),l=i("gBtx"),n=i.n(l),d=i("mvHQ"),o=i.n(d),r=i("DAYN"),f=i.n(r),c=i("Isrn"),p=i("l46T"),m=i("fPyK"),u=[{parentCode:"defineInfo",fieldCode:"-1",fieldName:"单行输入框",systemFlag:!1,fieldEdited:1,fieldType:"0",fixed:!1,fieldDescription:"请输入",fieldOperations:{ruleContent:[],fieldContent:[]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"多行输入框",systemFlag:!1,fieldEdited:1,fieldType:"1",fixed:!1,fieldDescription:"请输入",fieldOperations:{ruleContent:[],fieldContent:[]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"单选框",systemFlag:!1,fieldEdited:1,fieldType:"2",fixed:!1,fieldDescription:"请选择",fieldOperations:{ruleContent:[],fieldContent:[{type:"radio",name:"选项1"},{type:"radio",name:"选项2"},{type:"radio",name:"选项3"}]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"多选框",systemFlag:!1,fieldEdited:1,fieldType:"3",fixed:!1,fieldDescription:"请选择",fieldOperations:{ruleContent:[],fieldContent:[{type:"checkbox",name:"选项1"},{type:"checkbox",name:"选项2"},{type:"checkbox",name:"选项3"}]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"日期",systemFlag:!1,fieldEdited:1,fieldType:"4",fixed:!1,fieldDescription:"请选择",fieldOperations:{typeValue:"yyyy-MM-dd",ruleContent:[{type:"radio",name:"年-月-日",key:"yyyy-MM-dd",isEdit:1},{type:"radio",name:"年-月",key:"yyyy-MM",isEdit:1}],fieldContent:[]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"日期区间",systemFlag:!1,fieldEdited:1,fieldType:"5",fixed:!1,fieldOperations:{startName:"开始时间",endName:"结束时间",startDescription:"请选择开始时间",endDescription:"请选择结束时间",typeValue:"yyyy-MM-dd",ruleContent:[{type:"radio",name:"年-月-日",key:"yyyy-MM-dd",isEdit:1},{type:"radio",name:"年-月",key:"yyyy-MM",isEdit:1}],fieldContent:[]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"数字输入框",systemFlag:!1,fieldType:"6",fieldEdited:1,fixed:!1,fieldDescription:"请输入",fieldOperations:{ruleContent:[],fieldContent:[],unit:"元"},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}},{parentCode:"defineInfo",fieldCode:"-1",fieldName:"图片",systemFlag:!1,fieldType:"7",fieldEdited:1,fixed:!1,fieldDescription:"最多上传9张图片",fieldOperations:{ruleContent:[],fieldContent:[]},isMust:!1,staffRecordsIds:{staffVisible:"1",staffModify:"1"}}],v=function(){return u},C=i("3E4D"),g=i("Ch4/"),h=i("PI0u"),y=i("P9l9"),_={name:"staffRecordsTemplate",data:function(){return{activeName:"first",rightName:"first",dialogVisible:!1,bodyHeight:(document.documentElement.clientHeight||document.body.clientHeight)+"px",isDragging:!1,delayedDragging:!1,leftOption:{group:{name:"people",pull:"clone",put:!1},sort:!1,disabled:!1},leftDefineOption:{group:{name:"people",pull:"clone",put:!1},sort:!1,disabled:!1},selectKey:"",baseInfo:[],jobInfo:[],selfInfo:[],eduInfo:[],contractInfo:[],contactInfo:[],personalInfo:[],defineInfo:v(),currentIndex:0,currentChildKey:null,currentChildIndex:null,childIndex:0,tempaletDataList:[{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"baseInfo",fieldName:"基本信息",fieldEdited:!1,fieldOperations:{ruleContent:[],fieldContent:[]},isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""},{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"jobInfo",fieldName:"工作信息",fieldEdited:!1,isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""},{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"selfInfo",fieldName:"个人信息",fieldEdited:!1,isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""},{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"eduInfo",fieldName:"学历信息",fieldEdited:!1,isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""},{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"contractInfo",fieldName:"合同信息",fieldEdited:!1,isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""},{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"contactInfo",fieldName:"紧急联系人",fieldEdited:!1,isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""},{parentCode:"0",fieldTemplateId:"",parentFieldTemplateId:"0",minCount:10,maxCount:20,fieldCode:"personalInfo",fieldName:"个人资料",fieldEdited:!1,isMust:!1,fieldDescription:"",children:[],fieldType:"",staffRecordsIds:{},status:""}],fieldParent:{baseInfo:{},jobInfo:{},selfInfo:{},eduInfo:{},contractInfo:{},contactInfo:{},personalInfo:{}},setList:[]}},created:function(){},methods:{baseInfoClone:function(){},clickItem:function(e){this.tempaletDataList.map(function(e){return e.fieldCode}).includes(e.parentCode)||"defineInfo"===e.parentCode||(this.tempaletDataList.push(this.fieldParent[e.parentCode]),this.tempaletDataList=JSON.parse(o()(this.tempaletDataList)))},checkMove:function(e){var t=!0;return"baseInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("baseInfo")||(t=!1),"jobInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("jobInfo")||(t=!1),"selfInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("selfInfo")||(t=!1),"eduInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("eduInfo")||(t=!1),"contractInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("contractInfo")||(t=!1),"contactInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("contactInfo")||(t=!1),"personalInfo"!=e.draggedContext.element.parentCode||e.to.className.includes("personalInfo")||(t=!1),t},onMove:function(e){return!!this.checkMove(e)&&!e.draggedContext.element.fixed},onChildMove:function(e){return-1!=e.dragged.className.indexOf("block-class")&&e.to.className.indexOf("block-wrap"),!0},itemMoveEnd:function(e){var t=this;t.isDragging=!1,t.selectKey="",t.selectKey=e.clone.dataset.type,t.tempaletDataList.forEach(function(e,i){e.children.forEach(function(e,i){var s;e.systemFlag&&e.fieldCode==t.selectKey&&(s=e.parentCode,t[s].forEach(function(e,i){e.fieldCode==t.selectKey&&(e.fixed=!0)}))})}),t.selectKey="",t.tempaletDataList=JSON.parse(o()(t.tempaletDataList)),t.$forceUpdate()},selectItem:function(e,t){this.currentIndex=t,this.currentChildIndex=null},deleteItem:function(e,t){this.tempaletDataList.splice(t,1),this.currentIndex--,this.currentIndex<=0&&(this.currentIndex=0),this[e].forEach(function(e,t){e.fixed=!1})},addDragItem:function(e){return!1},selectChildItem:function(e,t,i,s){this.currentIndex=null,this.currentChildKey=e,this.childIndex=t,this.currentChildIndex=i},deleteChildItem:function(e,t,i,s,a){this.childIndex=t,this.currentIndex=null,this.currentChildKey=this.tempaletDataList[t].children[i].fieldCode,this.currentChildIndex--,this.currentChildIndex<=0&&(this.currentChildIndex=0),this.tempaletDataList=JSON.parse(o()(this.tempaletDataList)),this.tempaletDataList[t].children.splice(i,1),this[a.parentCode].forEach(function(t,i){t.fieldCode===e&&(t.fixed=!1)})},delChildItem:function(e,t,i){i.fieldOperations.fieldContent.splice(t,1)},addChildItem:function(e,t,i){if(19!=t){var s="radio";i.systemFlag||3!==parseInt(i.fieldType)||(s="checkbox"),i.fieldOperations.fieldContent.push({type:s,name:"请输入选项"});var a=i.fieldOperations.fieldContent.map(function(e){return e.name});this.isRepeat(a)&&(i.fieldOperations.fieldContent.splice(i.fieldOperations.fieldContent.length-1,1),a.splice(i.fieldOperations.fieldContent.length-1,1),this.$message.error({duration:1e3,message:"选项不能重复"}))}else this.$message.error({duration:1e3,message:"最多可添加 20 项"})},isRepeat:function(e){var t={};for(var i in e){if(t[e[i]])return!0;t[e[i]]=!0}return!1},changeRoute:function(e){this.$router.push(e)},checkTag:function(e){var t={filedFlag:!0,filedRepeat:!1},i=[];return e.forEach(function(e,s){if(""==e.fieldName)return t.filedFlag=!1,t.name=e.fieldName||"",!1;e.children.length&&e.children.forEach(function(e,s){if(e.systemFlag&&""==e.fieldName)return t.filedFlag=!1,t.name=e.fieldName||"",!1;i.push(e.fieldName)})}),this.isRepeat(i)&&(t.filedRepeat=!0),t},getUuid:function(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},saveAndBack:Object(h.a)(function(e){var t=JSON.parse(o()(this.tempaletDataList)),i=this.checkTag(t),s=[];if(i.filedFlag)if(i.filedRepeat)this.$message.error({duration:1e3,message:"字段标题不能重复"});else{if(t.forEach(function(e,t){e.sort=t,e.fixed=!0===e.fixed?1:0,e.isMust=!0===e.isMust?1:0,e.systemFlag=!0===e.systemFlag?1:0,e.parentFieldTemplateId=e.parentFieldTemplateId?e.parentFieldTemplateId:-1,e.fieldTemplateId=e.fieldTemplateId?e.fieldTemplateId:-1,e.children.forEach(function(t,i){s.push(t),t.sort=i,t.fixed=!0===t.fixed?1:0,t.isMust=!0===t.isMust?1:0,t.systemFlag=!0===t.systemFlag?1:0,e.systemFlag||(t.fieldEdited=1),2!==parseInt(t.fieldType)&&3!==parseInt(t.fieldType)||t.fieldOperations.fieldContent.forEach(function(e,i){e.key=String(e.key)?String(e.key):"",t.systemFlag||e.hasOwnProperty("key")&&""!=e.key&&"undefined"!=e.key||(e.key=e.name)}),t.systemFlag||(t.parentCode=e.fieldCode),t.fieldTemplateId=t.fieldTemplateId?t.fieldTemplateId:-1,t.parentFieldTemplateId=e.fieldTemplateId})}),s.length>40)return this.$message.error({duration:1e3,message:"最多设置 40 个字段"}),!1;"save"===e?this.saveAllData(t):this.postPreview(t)}else this.$message.error({duration:1e3,message:i.name+"字段标题不能为空"})},500),saveAllData:function(e){var t=this,i={templateContent:o()(e)};Object(y.e)("/haoban-manage-web/record/record-template-save.json",i).then(function(e){var i=e.data;if(1==i.errorCode)return C.a.showmsg("保存成功","success"),void t.changeRoute("/fileSet");g.a.errorMsg(i)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},postPreview:function(e){var t=this,i={templateContent:o()(e)};Object(y.e)("/haoban-manage-web/record/record-template-preview.json",i).then(function(e){var i=e.data;if(1==i.errorCode){var s=window.location.origin+"/office-mobile/#/staffRecordsTemplate?enterpriseId="+i.result;return t.$refs.qrcodePreview.qrcode(s,"record"),void(t.dialogVisible=!0)}g.a.errorMsg(i)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},closeDialog:function(){this.dialogVisible=!1},getAllFields:function(){var e=this;Object(y.e)("/haoban-manage-web/record/employee-find-system-template.json",{}).then(function(t){var i=t.data;1!=i.errorCode?g.a.errorMsg(i):e.handleAllFields(i.result)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},handleAllFields:function(e){var t=this;e.forEach(function(e,i){t.hasOwnProperty(e.parentCode)&&(e.fixed=1===parseInt(e.fixed),e.isMust=1===parseInt(e.isMust),e.systemFlag=!0,e.fieldOperations=e.fieldOperations?JSON.parse(e.fieldOperations):{},e.staffRecordsIds=e.staffRecordsIds?JSON.parse(e.staffRecordsIds):[],t[e.parentCode].push(e)),t.fieldParent.hasOwnProperty(e.fieldCode)&&(e.children=[],t.fieldParent[e.fieldCode]=e,e.systemFlag=!0)})},getInfo:function(){var e=this;Object(y.e)("/haoban-manage-web/record/employee-find-template.json",{}).then(function(t){var i=t.data;if(1==i.errorCode)return e.setList=[],void(i.result&&i.result.length&&e.handleGetInfo(i.result));g.a.errorMsg(i)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},treeData:function(e){var t=e.filter(function(t){var i=e.filter(function(e){return t.fieldCode==e.parentCode});return i.length>0?t.children=i:t.children=[],0==t.parentCode});return t.sort(function(e,t){return e.sort-t.sort}),t.forEach(function(e,t){e.children&&e.children.length&&e.children.sort(function(e,t){return e.sort-t.sort})}),t},handleGetInfo:function(e){var t=this,i=JSON.parse(o()(e));t.setParent=[],i.forEach(function(e,i){e.fixed=1===n()(e.fixed),e.isMust=1===n()(e.isMust),e.systemFlag=1===n()(e.systemFlag),e.fieldOperations=e.fieldOperations?JSON.parse(e.fieldOperations):{},e.staffRecordsIds=e.staffRecordsIds?JSON.parse(e.staffRecordsIds):[],e.systemFlag&&0==e.parentCode&&t.setParent.push(e.fieldCode),e.systemFlag&&0!=e.parentCode&&t.setList.push(e.fieldCode)}),t.tempaletDataList=t.treeData(i),setTimeout(function(){t.setFixed()},100)},setFixed:function(){var e=this;e.setParent.forEach(function(t,i){e[t].forEach(function(t,i){e.setList.includes(t.fieldCode)&&(t.fixed=!0)})})}},watch:{isDragging:function(e){var t=this;e?t.delayedDragging=!0:t.$nextTick(function(){t.delayedDragging=!1})}},components:{draggable:f.a,AddInput:c.a,limitInput:p.a,qrcodeDialog:m.a},mounted:function(){a.a.all([this.getAllFields(),this.getInfo()]),document.body.ondrop=function(e){e.preventDefault(),e.stopPropagation()}}},I={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"template-wrap",style:{height:e.bodyHeight}},[s("div",{staticClass:"template-contain"},[s("div",{staticClass:"template-head"},[e._m(0),e._v(" "),s("div",{staticClass:"template-btns flex-1 flex-r"},[s("el-button",{attrs:{type:"primary",plain:""},on:{click:function(t){e.saveAndBack("preview")}}},[e._v("预 览")]),e._v(" "),s("el-button",{attrs:{type:"primary",plain:""},on:{click:function(t){e.changeRoute("/fileSet")}}},[e._v("返 回")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:function(t){e.saveAndBack("save")}}},[e._v("保存并启用")])],1)]),e._v(" "),s("div",{staticClass:"template-body"},[s("div",{staticClass:"template-cell template-cell-l"},[s("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[s("el-tab-pane",{attrs:{label:"系统字段",name:"first"}},[s("div",{staticClass:"filed-item-title"},[e._v("基本信息")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list1",list:e.baseInfo,options:e.leftOption,move:e.onMove},on:{clone:e.baseInfoClone,start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.baseInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode,"aria-hidden":"true"},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1),e._v(" "),s("div",{staticClass:"filed-item-title"},[e._v("工作信息")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list2",list:e.jobInfo,options:e.leftOption,move:e.onMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.jobInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1),e._v(" "),s("div",{staticClass:"filed-item-title"},[e._v("个人信息")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list3",list:e.selfInfo,options:e.leftOption,move:e.onMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.selfInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1),e._v(" "),s("div",{staticClass:"filed-item-title"},[e._v("学历信息")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list4",list:e.eduInfo,options:e.leftOption,move:e.onMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.eduInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1),e._v(" "),s("div",{staticClass:"filed-item-title"},[e._v("合同信息")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list5",list:e.contractInfo,options:e.leftOption,move:e.onMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.contractInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1),e._v(" "),s("div",{staticClass:"filed-item-title"},[e._v("紧急联系人")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list5",list:e.contactInfo,options:e.leftOption,move:e.onMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.contactInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1),e._v(" "),s("div",{staticClass:"filed-item-title"},[e._v("个人材料")]),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list5",list:e.personalInfo,options:e.leftOption,move:e.onMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.personalInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[s("span",[e._v(e._s(t.fieldName))])])}))],1)]),e._v(" "),s("el-tab-pane",{attrs:{label:"自定义字段",name:"second"}},[s("div",{staticClass:"filed-item-title"}),e._v(" "),s("ul",[s("draggable",{staticClass:"compenent",attrs:{id:"list5",list:e.defineInfo,options:e.leftDefineOption,move:e.onChildMove},on:{start:function(t){e.isDragging=!0},end:e.itemMoveEnd}},e._l(e.defineInfo,function(t,i){return s("li",{key:i,class:["compenent-item",1==t.fixed?"fixed-item":""],attrs:{"data-type":t.fieldCode},on:{mousedown:function(i){e.clickItem(t)}}},[t.systemFlag||0!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||1!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||2!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||3!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||4!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||5!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||6!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||7!=t.fieldType?e._e():s("span",[e._v(e._s(t.fieldName))]),e._v(" "),t.systemFlag||0!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-one"}),e._v(" "),t.systemFlag||1!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-two"}),e._v(" "),t.systemFlag||2!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-three"}),e._v(" "),t.systemFlag||3!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-four"}),e._v(" "),t.systemFlag||4!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-five"}),e._v(" "),t.systemFlag||5!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-six"}),e._v(" "),t.systemFlag||6!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-seven"}),e._v(" "),t.systemFlag||7!=t.fieldType?e._e():s("i",{staticClass:"bg-icon bg-icon-eight"})])}))],1)])],1)],1),e._v(" "),s("div",{staticClass:"template-cell template-cell-m"},[s("div",{staticClass:"phone-view"},[s("div",{staticClass:"phone-show-content"},[s("div",{staticClass:"drag-show-content"},[s("div",{staticClass:"view-container"},[s("ul",{staticClass:"view-content",attrs:{id:"showPhoneView"}},[0==e.tempaletDataList.length?[s("img",{staticClass:"templet-null-img",attrs:{src:i("Y7wY")}})]:e._e(),e._v(" "),s("draggable",{staticClass:"drag-wrap",attrs:{options:{group:{name:"people",pull:!1,put:!1},sort:!0}},model:{value:e.tempaletDataList,callback:function(t){e.tempaletDataList=t},expression:"tempaletDataList"}},e._l(e.tempaletDataList,function(t,i){return s("li",{key:"li1"+i,class:["filed-item",e.currentIndex==i?"active-item":"","li-block"],on:{click:function(s){e.selectItem(t.fieldCode,i)}}},["baseInfo"!=t.fieldCode&&"jobInfo"!=t.fieldCode&&"selfInfo"!=t.fieldCode?s("span",{staticClass:"item-close p-item-close",on:{click:function(s){s.stopPropagation(),e.deleteItem(t.fieldCode,i)}}},[s("i",{staticClass:"el-icon-close"})]):e._e(),e._v(" "),[s("div",{staticClass:"block"},[s("div",{staticClass:"block-head"},[s("div",{class:["opencard-item-title",t.fieldName.length>6?"block-pre-wrap":""]},[e._v(e._s(t.fieldName))])]),e._v(" "),s("ul",{staticClass:"view-content"},[s("draggable",{class:["drag-wrap","block-wrap",t.fieldCode],attrs:{options:{group:{name:"people",pull:!1,put:!0},sort:!0}},on:{add:e.addDragItem},model:{value:t.children,callback:function(i){e.$set(t,"children",i)},expression:"item.children"}},e._l(t.children,function(a,l){return s("li",{key:"li"+l,class:["filed-item","child-filed-item",e.currentChildKey==a.fieldCode&&e.currentChildIndex==l?"active-item":""],on:{click:function(s){s.stopPropagation(),e.selectChildItem(a.fieldCode,i,l,t.children)}}},["clerkPhone"!=a.fieldCode&&"clerkName"!=a.fieldCode&&"groupName"!=a.fieldCode&&"clerkCode"!=a.fieldCode&&"positionName"!=a.fieldCode&&"clerkType"!=a.fieldCode&&"clerkStatus"!=a.fieldCode&&"sex"!=a.fieldCode&&"hireDate"!=a.fieldCode&&"nation"!=a.fieldCode?s("span",{staticClass:"item-close child-item-close",on:{click:function(s){s.stopPropagation(),e.deleteChildItem(a.fieldCode,i,l,t.children,a)}}},[s("i",{staticClass:"el-icon-close"})]):e._e(),e._v(" "),2==a.fieldType||3==a.fieldType||4==a.fieldType?s("div",{staticClass:"flex"},[s("div",{class:["opencard-item-title",a.fieldName.length>6?"title-pre-wrap":""]},[e._v(e._s(a.fieldName))]),e._v(" "),s("div",{staticClass:"draged-item-show"},[s("span",{staticClass:"show-warm-text show-warm-text-flag select-flag"},[e._v(e._s(a.fieldDescription)+" "),s("i",{staticClass:"el-icon-arrow-right"})])])]):e._e(),e._v(" "),5==a.fieldType?s("div",{staticClass:"flex"},[s("div",[s("div",{class:["opencard-item-title",a.fieldOperations.startName.length>6?"title-pre-wrap":""]},[e._v(e._s(a.fieldOperations.startName))]),e._v(" "),s("div",{staticClass:"draged-item-show"},[s("span",{staticClass:"show-warm-text show-warm-text-flag select-flag"},[e._v(e._s(a.fieldOperations.startDescription)),s("i",{staticClass:"el-icon-arrow-right"})])])]),e._v(" "),s("div",{staticClass:"b-t-1"},[s("div",{class:["opencard-item-title",a.fieldOperations.endName.length>6?"title-pre-wrap":""]},[e._v(e._s(a.fieldOperations.endName))]),e._v(" "),s("div",{staticClass:"draged-item-show"},[s("span",{staticClass:"show-warm-text show-warm-text-flag select-flag"},[e._v(e._s(a.fieldOperations.endDescription)),s("i",{staticClass:"el-icon-arrow-right"})])])])]):e._e(),e._v(" "),7==a.fieldType?s("div",{staticClass:"flex"},[s("div",{class:["opencard-item-title",a.fieldName.length>6?"title-pre-wrap":""]},[e._v(e._s(a.fieldName))]),e._v(" "),s("div",{staticClass:"draged-item-show"},[s("span",{staticClass:"show-warm-text show-warm-text-flag select-flag"},[s("i",{staticClass:"iconfont icon-icon"})])])]):e._e(),e._v(" "),0==a.fieldType||1==a.fieldType||6==a.fieldType?s("div",[s("div",{class:["opencard-item-title",a.fieldName.length>6?"title-pre-wrap":""]},[e._v(e._s(a.fieldName))]),e._v(" "),s("div",{staticClass:"draged-item-show"},[s("span",{staticClass:"show-warm-text show-warm-text-flag"},[e._v(e._s(a.fieldDescription))])])]):e._e()])}))],1)])]],2)}))],2)])])])])]),e._v(" "),s("div",{staticClass:"template-cell template-cell-r"},[s("el-tabs",{model:{value:e.rightName,callback:function(t){e.rightName=t},expression:"rightName"}},[s("el-tab-pane",{attrs:{label:"控件设置",name:"first"}},[s("div",{attrs:{id:"edit-box"}},[s("div",{staticClass:"edit-view baby-info-flag baby-info"},[e._l(e.tempaletDataList,function(t,i){return[e.currentIndex==i&&"0"==t.parentCode?[s("div",{key:"parent"+i,staticClass:"edit-item "},[s("div",{staticClass:"edit-item-title edit-title-padding"},[e._v("标题")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldName,holder:"",disflag:!0,getByType:"word",maxLength:10},on:{"update:inputValue":function(i){e.$set(t,"fieldName",i)}}})],1)]:e._e(),e._v(" "),e.childIndex==i&&t.children&&t.children.length?[e._l(t.children,function(t,a){return[e.currentChildIndex==a?[s("div",{key:"child"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("标题")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldName,holder:"",disflag:t.systemFlag,getByType:"word",maxLength:10},on:{"update:inputValue":function(i){e.$set(t,"fieldName",i)}}}),e._v(" "),7==t.fieldType?s("p",{staticStyle:{"margin-top":"8px","font-size":"12px",color:"rgba(255, 255, 255, 0.7)"}},[e._v("\n "+e._s(t.fieldDescription)+"\n ")]):e._e()],1)]:e._e(),e._v(" "),e.currentChildIndex==a&&5!=t.fieldType&&7!=t.fieldType?[s("div",{key:"child1"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("提示文字")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldDescription,holder:"",disflag:!1,getByType:"word",maxLength:20},on:{"update:inputValue":function(i){e.$set(t,"fieldDescription",i)}}})],1)]:e._e(),e._v(" "),e.currentChildIndex==a&&5==t.fieldType?[s("div",{key:"child2"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("开始时间")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldOperations.startName,holder:"",disflag:t.systemFlag,getByType:"word",maxLength:10},on:{"update:inputValue":function(i){e.$set(t.fieldOperations,"startName",i)}}})],1),e._v(" "),s("div",{key:"child3"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("提示文字")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldOperations.startDescription,holder:"",disflag:!1,getByType:"word",maxLength:20},on:{"update:inputValue":function(i){e.$set(t.fieldOperations,"startDescription",i)}}})],1),e._v(" "),s("div",{key:"child4"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("结束时间")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldOperations.endName,holder:"",disflag:t.systemFlag,getByType:"word",maxLength:10},on:{"update:inputValue":function(i){e.$set(t.fieldOperations,"endName",i)}}})],1),e._v(" "),s("div",{key:"child5"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("提示文字")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldOperations.endDescription,holder:"",disflag:!1,getByType:"word",maxLength:20},on:{"update:inputValue":function(i){e.$set(t.fieldOperations,"endDescription",i)}}})],1)]:e._e(),e._v(" "),e.currentChildIndex==a&&6==t.fieldType?[s("div",{key:"child6"+a,staticClass:"edit-item test-title limit-w-340"},[s("div",{staticClass:"edit-item-title"},[e._v("单位")]),e._v(" "),s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:t.fieldOperations.unit,holder:"",disflag:!1,getByType:"word",maxLength:20},on:{"update:inputValue":function(i){e.$set(t.fieldOperations,"unit",i)}}})],1)]:e._e(),e._v(" "),e.currentChildIndex!=a||4!=t.fieldType&&5!=t.fieldType?e._e():[s("div",{key:"child7"+a,staticClass:"edit-item "},[s("div",{staticClass:"edit-item-title"},[e._v("日期类型")]),e._v(" "),e._l(t.fieldOperations.ruleContent,function(i,a){return[s("el-radio",{key:"child8"+a,attrs:{label:i.key},model:{value:t.fieldOperations.typeValue,callback:function(i){e.$set(t.fieldOperations,"typeValue",i)},expression:"childItem.fieldOperations.typeValue"}},[e._v("\n "+e._s(i.name)+"\n ")])]})],2)],e._v(" "),e.currentChildIndex!=a||"2"!=t.fieldType&&"3"!=t.fieldType?e._e():[s("div",{key:"child9"+a,staticClass:"edit-item "},[s("div",{staticClass:"edit-item-title"},[e._v("选项 "),t.systemFlag?e._e():s("span",[e._v("最多20项,每项最多10个字")])]),e._v(" "),e._l(t.fieldOperations.fieldContent,function(a,l){return[s("div",{key:"child10"+l,staticClass:"margin-t-15 limit-w-340",style:0==l?"margin-top: 0":""},[s("limitInput",{attrs:{inputWidth:340,limitClass:"limit-color",inputValue:a.name,holder:"",disflag:t.systemFlag,getByType:"word",maxLength:10},on:{"update:inputValue":function(t){e.$set(a,"name",t)}}}),e._v(" "),!t.systemFlag&&t.fieldOperations.fieldContent.length>1?s("i",{staticClass:"opt-btn el-icon-remove del-item",on:{click:function(s){e.delChildItem(i,l,t)}}}):e._e(),e._v(" "),!t.systemFlag&&l<19?[l==t.fieldOperations.fieldContent.length-1?s("i",{staticClass:"opt-btn el-icon-circle-plus add-item",on:{click:function(s){e.addChildItem(i,l,t)}}}):e._e()]:e._e()],2)]})],2)],e._v(" "),e.currentChildIndex==a?[s("div",{key:"child11"+a,staticClass:"edit-item"},[s("div",{staticClass:"edit-item-title"},[e._v("验证")]),e._v(" "),s("el-checkbox",{model:{value:t.isMust,callback:function(i){e.$set(t,"isMust",i)},expression:"childItem.isMust"}},[e._v("必填")])],1)]:e._e(),e._v(" "),e.currentChildIndex==a?[s("div",{key:"parent2"+a,staticClass:"edit-item "},[s("div",{staticClass:"edit-item-title"},[e._v("员工档案中")]),e._v(" "),s("div",{staticClass:"staffRecords-limit"},[s("el-radio",{staticClass:"label-cell",attrs:{disabled:"clerkPhone"==t.fieldCode||"groupName"==t.fieldCode||"clerkCode"==t.fieldCode||"positionName"==t.fieldCode,label:"1"},model:{value:t.staffRecordsIds.staffVisible,callback:function(i){e.$set(t.staffRecordsIds,"staffVisible",i)},expression:"childItem.staffRecordsIds.staffVisible"}},[e._v("对员工可见")]),e._v(" "),s("el-radio",{staticClass:"label-cell",attrs:{disabled:"clerkPhone"==t.fieldCode||"groupName"==t.fieldCode||"clerkCode"==t.fieldCode||"positionName"==t.fieldCode,label:"0"},model:{value:t.staffRecordsIds.staffVisible,callback:function(i){e.$set(t.staffRecordsIds,"staffVisible",i)},expression:"childItem.staffRecordsIds.staffVisible"}},[e._v("对员工不可见")])],1),e._v(" "),s("div",{staticClass:"staffRecords-limit"},[s("el-radio",{staticClass:"label-cell",attrs:{disabled:"clerkPhone"==t.fieldCode||"groupName"==t.fieldCode||"clerkCode"==t.fieldCode||"positionName"==t.fieldCode,label:"1"},model:{value:t.staffRecordsIds.staffModify,callback:function(i){e.$set(t.staffRecordsIds,"staffModify",i)},expression:"childItem.staffRecordsIds.staffModify"}},[e._v("对员工可修改")]),e._v(" "),s("el-radio",{staticClass:"label-cell",attrs:{disabled:"clerkPhone"==t.fieldCode||"groupName"==t.fieldCode||"clerkCode"==t.fieldCode||"positionName"==t.fieldCode,label:"0"},model:{value:t.staffRecordsIds.staffModify,callback:function(i){e.$set(t.staffRecordsIds,"staffModify",i)},expression:"childItem.staffRecordsIds.staffModify"}},[e._v("对员工不可修改")])],1)])]:e._e()]})]:e._e()]})],2)])])],1)],1)])]),e._v(" "),s("qrcode-dialog",{ref:"qrcodePreview",model:{value:e.dialogVisible,callback:function(t){e.dialogVisible=t},expression:"dialogVisible"}})],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"template-title flex-1"},[t("img",{attrs:{src:i("LbEI"),alt:"logo"}}),this._v(" "),t("span",{staticClass:"template-title-span"},[this._v("员工档案设置")])])}]};var x=i("VU/8")(_,I,!1,function(e){i("q0cL")},"data-v-19ab8c07",null);t.default=x.exports},q0cL:function(e,t){}});
\ No newline at end of file
webpackJsonp([101],{"/NA0":function(e,t){},0:function(e,t,n){n("j1ja"),e.exports=n("NHnr")},"4qCZ":function(e,t){},"5tgt":function(e,t,n){e.exports=function(e,t){return function(a){n("Opzk")("./"+e+"/"+t+".vue").then(function(e){a(e)})}}},NHnr:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n("mvHQ"),r=n.n(a),o=n("fZjL"),p=n.n(o),i=(n("j1ja"),n("hKoQ")),s=n.n(i),c={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"app"}},[t("transition",{attrs:{name:"fade",mode:"out-in"}},[t("router-view")],1)],1)},staticRenderFns:[]};var m=n("VU/8")({name:"App",data:function(){return{}}},c,!1,function(e){n("/NA0")},null,null).exports,d=n("lRwf"),u=n.n(d),l=n("pRNm"),h=n.n(l),v=n("5tgt"),g=n.n(v);u.a.use(h.a);var A=function(e){n.e(1).then(n.bind(null,"ODjX")).then(function(t){e(t)})};window.sessionStorage.getItem("token")&&store.commit(types.LOGIN,window.sessionStorage.getItem("token"));var f,y=[{path:"/",name:"/",redirect:"login"},{path:"/login",name:"登录",component:g()("login","index")},{path:"/download",name:"下载",component:g()("download","index")},{path:"/index",name:"index",component:g()("index","index")},{path:"/sign",name:"index",component:g()("sign","index")},{path:"/contacts",name:"通讯录",redirect:"administrativeFrame",component:g()("contacts","index"),children:[{path:"/administrativeFrame",name:"行政架构",component:g()("contacts","administrativeFrame")},{path:"/employeeIo",name:"批量导入/导出",component:g()("contacts","employeeIo")},{path:"/addDepartment",name:"添加部门",component:g()("contacts","addDepartment")},{path:"/addClerk",name:"添加店员",component:g()("contacts","addClerk")},{path:"/storeFrame",name:"门店架构",component:g()("contacts","storeFrame")},{path:"/addGroup",name:"添加子分组",component:g()("contacts","addGroup")},{path:"/storeIo",name:"门店导入/导出",component:g()("contacts","storeIo")},{path:"/storeInfo",name:"编辑门店",component:g()("contacts","storeInfo")},{path:"/recycle",name:"门店回收站",component:g()("contacts","recycle")},{path:"/employee",name:"编辑员工",component:g()("contacts","employee")},{path:"/unemployee",name:"离职员工",component:g()("contacts","unemployee")},{path:"/fileSet",name:"档案设置",component:g()("contacts","fileSet")},{path:"/recordInfo",name:"编辑员工信息",component:g()("contacts","recordInfo")},{path:"/recordIo",name:"导入导出员工档案",component:g()("contacts","recordIo")},{path:"/shareContact",name:"共享通讯录",component:g()("contacts","shareContact")},{path:"/shareCode",name:"共享通讯录二维码",component:g()("contacts","shareCode")},{path:"/employeeRecord",name:"在职员工",component:g()("contacts","employeeRecord")}]},{path:"/enterpriseApp",name:"企业应用",redirect:"appcenter",component:g()("enterpriseApp","index"),children:[{path:"/appcenter",name:"企业应用中心",component:g()("enterpriseApp","appcenter")},{path:"/mycustomer",name:"我的顾客的",redirect:"/memeberBaseSet",component:g()("enterpriseApp/myCustomer","index"),children:[{path:"/memeberBaseSet",name:"会员基础设置",component:g()("enterpriseApp/myCustomer","memeberBaseSet")},{path:"/onlineChatSet",name:"在线沟通设置",component:g()("enterpriseApp/myCustomer","onlineChatSet")},{path:"/chatRecord",name:"聊天记录",component:g()("enterpriseApp/myCustomer","chatRecord")},{path:"/sendRecord",name:"发送记录",component:g()("enterpriseApp/myCustomer","sendRecord")},{path:"/newCard",name:"新建卡券",component:g()("enterpriseApp/myCustomer","newCard")},{path:"/cardSendRecord",name:"卡券发送记录",component:g()("enterpriseApp/myCustomer","cardSendRecord")},{path:"/cardGetRecord",name:"卡券领取卡券",component:g()("enterpriseApp/myCustomer","cardGetRecord")}]},{path:"/marketing",name:"营销素材",redirect:"/imageText",component:g()("enterpriseApp/marketingMaterial","index"),children:[{path:"/imageText",name:"图文素材",component:g()("enterpriseApp/marketingMaterial","imageText")},{path:"/newImageText",name:"选择图文",component:g()("enterpriseApp/marketingMaterial","newImageText")},{path:"/enjoyMaterial",name:"纷享素材",component:g()("enterpriseApp/marketingMaterial","enjoyMaterial")},{path:"/newEnjoy",name:"新建素材",component:g()("enterpriseApp/marketingMaterial","newEnjoy")}]},{path:"/cloudDaily",name:"云日报",redirect:"/dailyRecord",component:g()("enterpriseApp/cloudDaily","index"),children:[{path:"/dailyRecord",name:"云日报记录",component:g()("enterpriseApp/cloudDaily","dailyRecord")},{path:"/dailyDetail",name:"日报详情",component:g()("enterpriseApp/cloudDaily","dailyDetail")},{path:"/taskAssign",name:"任务下发设置",component:g()("enterpriseApp/cloudDaily","taskAssign")},{path:"/systemReport",name:"系统报表",component:g()("enterpriseApp/cloudDaily","systemReport")},{path:"/customReport",name:"自定义报表",component:g()("enterpriseApp/cloudDaily","customReport")}]},{path:"/trafficTask",name:"话务任务",redirect:"/taskRecord",component:g()("enterpriseApp/trafficTask","index"),children:[{path:"/taskRecord",name:"话务任务记录",component:g()("enterpriseApp/trafficTask","taskRecord")},{path:"/taskDetail",name:"话务任务详情",component:g()("enterpriseApp/trafficTask","taskDetail")},{path:"/taskViewDetail",name:"话务任务详情",component:g()("enterpriseApp/trafficTask","taskViewDetail")},{path:"/trafficTaskSet",name:"话务任务设置",component:g()("enterpriseApp/trafficTask","trafficTaskSet")},{path:"/badEvaluateSet",name:"不良评价设置",component:g()("enterpriseApp/badEvaluate","badEvaluateSet")}]},{path:"/noticeList",name:"企业公告",redirect:"/noticeList",component:g()("enterpriseApp/notice","index"),children:[{path:"/noticeList",name:"企业公告列表",component:g()("enterpriseApp/notice","noticeList")},{path:"/addNotice",name:"新建公告",component:g()("enterpriseApp/notice","addNotice")}]},{path:"/badEvaluate",name:"不良评价",redirect:"/badEvaluateRecord",component:g()("enterpriseApp/badEvaluate","index"),children:[{path:"/badEvaluateRecord",name:"不良评价记录",component:g()("enterpriseApp/badEvaluate","badEvaluateRecord")},{path:"/badEvaluateDetail",name:"不良评价详情",component:g()("enterpriseApp/badEvaluate","badEvaluateDetail")}]},{path:"/quota",name:"指标管理",redirect:"/monthList",component:g()("enterpriseApp/quota","index"),children:[{path:"/monthList",name:"月指标列表",component:g()("enterpriseApp/quota","monthList")},{path:"/storeMonthTask",name:"门店月指标",component:g()("enterpriseApp/quota","storeMonthTask")},{path:"/salerMonthDetail",name:"导购月指标详情",component:g()("enterpriseApp/quota","salerMonthDetail")},{path:"/companyDaySet",name:"商户日权重",component:g()("enterpriseApp/quota","companyDaySet")},{path:"/monthTask",name:"月指标任务",component:g()("enterpriseApp/quota","monthTask"),meta:{keepAlive:!0}},{path:"/monthTaskDetail",name:"月指标任务详情",component:g()("enterpriseApp/quota","monthTaskDetail"),meta:{keepAlive:!0}}]},{path:"/signList",name:"企业公告",redirect:"/signList",component:g()("enterpriseApp/signApp","index"),children:[{path:"/signList",name:"企业公告列表",component:g()("enterpriseApp/signApp","signList")}]},{path:"/clockin",name:"考勤打卡",redirect:"/dayStatistics",component:g()("enterpriseApp/dailyAttendance","index"),children:[{path:"/dayStatistics",name:"日统计",component:g()("enterpriseApp/dailyAttendance","dayStatistics")},{path:"/monthStatistics",name:"月统计",component:g()("enterpriseApp/dailyAttendance","monthStatistics")},{path:"/workSet",name:"考勤设置",component:g()("enterpriseApp/dailyAttendance","workSet")},{path:"/workGroupSet",name:"考勤设置",component:g()("enterpriseApp/dailyAttendance","workGroupSet")},{path:"/workTimeManage",name:"排班管理",component:g()("enterpriseApp/dailyAttendance","workTimeManage")}]}]},{path:"/reviewCenter",name:"审核中心",redirect:"unreview",component:g()("reviewCenter","index"),children:[{path:"/reviewed",name:"已审核",component:g()("reviewCenter","reviewed")},{path:"/unreview",name:"未审核",component:g()("reviewCenter","unreview")}]},{path:"/setCenter",name:"设置",redirect:"companyAddress",component:g()("setting","index"),children:[{path:"/companyAddress",name:"企业地址",component:g()("setting","companyAddress")},{path:"/companyCertify",name:"企业认证",component:g()("setting","companyCertify")},{path:"/staffDetails",name:"员工详情字段",component:g()("setting","staffDetails")},{path:"/storePermission",name:"门店权限设置",component:g()("setting","storePermission")},{path:"/contactPermission",name:"通讯录控制",component:g()("setting","contactPermission")},{path:"/replaceAdmin",name:"更换超级管理员",component:g()("setting","replaceAdmin")},{path:"/setChildAdmin",name:"设置子管理员",component:g()("setting","setChildAdmin")},{path:"/addAdmin",name:"添加管理员",component:g()("setting","addAdmin")},{path:"/addAdminRole",name:"添加管理员角色",component:g()("setting","addAdminRole")}]},{path:"/staffRecordsTemplate",name:"员工档案设置",component:g()("contacts","staffRecordsTemplate")},{path:"/systemReportSet",name:"系统报表设置",component:g()("enterpriseApp/cloudDaily","systemReportSet")},{path:"/template",name:"模板设置",component:g()("enterpriseApp/cloudDaily","template")},{path:"/gic-error",name:"gic跳转失败页",component:g()("errorPage","gic-error")},{path:"/403",name:"无权访问",component:A},{path:"/404",name:"error404",component:A},{path:"/500",name:"error500",component:A},{path:"*",redirect:"/404",hidden:!0}],k=new h.a({routes:y,scrollBehavior:function(){return{y:0}}}),w=n("zL8q"),D=n.n(w),x=n("Rf8U"),S=n.n(x),R=n("mtWM"),C=n.n(R),T=n("bOdI"),M=n.n(T),E=n("SJI6"),b=n.n(E);u.a.use(b.a);var I=new b.a.Store({state:{user:{},token:null,title:"",show:!1,bgHeight:window.screen.availHeight-440-24+"px"},mutations:(f={},M()(f,"login",function(e,t){sessionStorage.token=t,e.token=t}),M()(f,"logout",function(e){sessionStorage.removeItem("token"),e.token=null}),M()(f,"title",function(e,t){e.title=t}),M()(f,"show",function(e,t){e.show=t}),f)}),j=(n("4qCZ"),n("uKUT"),n("Xcu2"),{dateFormat:function(e,t){if(e){e=10===e.toString().length?1e3*e:e;var n=new Date(e),a={"M+":n.getMonth()+1,"D+":n.getDate(),W:"日一二三四五六".charAt(n.getDay()),"h+":n.getHours(),"m+":n.getMinutes(),"s+":n.getSeconds(),"q+":Math.floor((n.getMonth()+3)/3),S:n.getMilliseconds()};for(var r in/(Y+)/.test(t)&&(t=t.replace(RegExp.$1,(n.getFullYear()+"").substr(4-RegExp.$1.length))),a)new RegExp("("+r+")").test(t)&&(t=t.replace(RegExp.$1,1===RegExp.$1.length?a[r]:("00"+a[r]).substr((""+a[r]).length)));return t}},formatTimeStamp:function(e){if(e){var t=new Date(e),n=t.getMonth()+1,a=t.getDate()<10?"0"+t.getDate():t.getDate(),r=n<10?"0"+n:n,o=t.getHours()<10?"0"+t.getHours():t.getHours(),p=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),i=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return t.getFullYear()+"-"+r+"-"+a+" "+o+":"+p+":"+i}},timeStampToYmd:function(e){if(e){var t=new Date(e),n=t.getMonth()+1,a=t.getDate()<10?"0"+t.getDate():t.getDate(),r=n<10?"0"+n:n;return t.getFullYear()+"-"+r+"-"+a}},timeStampToHms:function(e){if(e){var t=new Date(e);return(t.getHours()<10?"0"+t.getHours():t.getHours())+":"+(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":"+(t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds())}},formatTimeYmdHms:function(e){if(e){var t=new Date(e),n=t.getMonth()+1,a=t.getDate()<10?"0"+t.getDate():t.getDate(),r=n<10?"0"+n:n,o=t.getHours()<10?"0"+t.getHours():t.getHours(),p=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),i=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return t.getFullYear()+"."+r+"."+a+" "+o+":"+p+":"+i}}}),V=n("TUaa"),q=n.n(V),P=n("tyqE"),G=n.n(P),H=n("pRVe"),L=n.n(H),F=n("SE7k"),O=n.n(F),N=n("XsK6"),z=n.n(N),Y=n("QRL9"),J=n.n(Y),K=n("2Pnh"),B=n.n(K),U=n("l9mu"),X=n.n(U),Q={install:function(e,t){e.prototype.getPdf=function(){var e=this.htmlTitle;B()(document.querySelector("#pdfDom"),{allowTaint:!0,foreignObjectRendering:!0}).then(function(t){var n=t.width,a=t.height,r=n/592.28*841.89,o=a,p=0,i=592.28/n*a,s=t.toDataURL("image/jpeg",1),c=new X.a("","pt","a4");if(o<r)c.addImage(s,"JPEG",0,0,595.28,i);else for(;o>0;)c.addImage(s,"JPEG",0,p,595.28,i),p-=841.89,(o-=r)>0&&c.addPage();c.save(e+".pdf")})}}},Z=n("/IwO"),W=n.n(Z);s.a.polyfill(),Vue.use(W.a),W.a.initAMapApiLoader({key:"d53a58848be368a7398dc56d5670fe9c",plugin:["Autocomplete","PlaceSearch","Scale","OverView","Geocoder","ToolBar","MapType","PolyEditor","AMap.CircleEditor"],v:"1.4.4"}),Vue.use(Q),Vue.use(z.a),Vue.use(J.a),Vue.use(O.a),Vue.use(L.a),Vue.use(G.a),Vue.use(q.a),Vue.config.productionTip=!1,Vue.use(D.a,{size:"large"}),Vue.use(S.a,C.a),Vue.axios.defaults.withCredentials=!0,p()(j).forEach(function(e){Vue.filter(e,j[e])}),k.beforeEach(function(e,t,n){var a=void 0,o=window.location.origin;a=-1!=o.indexOf("localhost")?"http://www.gicdev.com":o,localStorage.getItem("userInfo")||C.a.get(a+"/haoban-manage-web/emp/get-user-info",{}).then(function(e){var t=e.data;1!=t.errorCode||localStorage.setItem("userInfo",r()(t.result))}).catch(function(e){w.Message.error({duration:1e3,message:e.message})}),"/"==e.path?n({path:"/login"}):n()}),new Vue({el:"#app",router:k,store:I,components:{App:m},template:"<App/>"})},Opzk:function(e,t,n){var a={"./contacts/addClerk.vue":["27o1",0,22],"./contacts/addDepartment.vue":["HHRu",0,20],"./contacts/addEmployee.vue":["00Sv",60],"./contacts/addGroup.vue":["mPjx",0,69],"./contacts/administrativeFrame.vue":["kLcy",0,4],"./contacts/employee.vue":["AdJp",0,59],"./contacts/employeeIo.vue":["Rwbg",0,80],"./contacts/employeeRecord.vue":["zGJY",0,9],"./contacts/fileSet.vue":["CSjr",0,11],"./contacts/index.vue":["41Rh",0,66],"./contacts/recordInfo.vue":["67iC",0,16],"./contacts/recordIo.vue":["738z",0,23],"./contacts/recycle.vue":["HkK0",0,36],"./contacts/shareAddDepartment.vue":["q5Ri",0,19],"./contacts/shareCode.vue":["JsWW",0,42],"./contacts/shareContact.vue":["Gfms",0,3],"./contacts/staffRecordsTemplate.vue":["lFAe",0,89],"./contacts/storeFrame.vue":["7SJI",0,6],"./contacts/storeInfo.vue":["h/6A",0,57],"./contacts/storeIo.vue":["RHxA",0,86],"./contacts/unemployee.vue":["TGrv",0,18],"./download/index.vue":["ASGJ",0,8],"./enterpriseApp/appcenter.vue":["yuVF",0,38],"./enterpriseApp/badEvaluate/badEvaluateDetail.vue":["4m/B",0,58],"./enterpriseApp/badEvaluate/badEvaluateRecord.vue":["r//C",0,51],"./enterpriseApp/badEvaluate/badEvaluateSet.vue":["XzAK",0,79],"./enterpriseApp/badEvaluate/index.vue":["W0k8",0,49],"./enterpriseApp/cloudDaily/customReport.vue":["DxdI",0,84],"./enterpriseApp/cloudDaily/dailyDetail.vue":["5nNU",0,64],"./enterpriseApp/cloudDaily/dailyRecord.vue":["Ujni",0,40],"./enterpriseApp/cloudDaily/index.vue":["Knd1",0,97],"./enterpriseApp/cloudDaily/systemReport.vue":["Y8F9",0,41],"./enterpriseApp/cloudDaily/systemReportSet.vue":["VE2c",0,7],"./enterpriseApp/cloudDaily/taskAssign.vue":["5x7s",0,81],"./enterpriseApp/cloudDaily/template.vue":["IA9l",0,5],"./enterpriseApp/cloudDaily/template/block.vue":["PAYw",54],"./enterpriseApp/cloudDaily/template/date-range.vue":["79Bk",95],"./enterpriseApp/cloudDaily/template/image.vue":["H8Kg",61],"./enterpriseApp/cloudDaily/template/input.vue":["s4D+",71],"./enterpriseApp/cloudDaily/template/select.vue":["t0b0",78],"./enterpriseApp/dailyAttendance/dayStatistics.vue":["gncU",99],"./enterpriseApp/dailyAttendance/index.vue":["vgwM",0,52],"./enterpriseApp/dailyAttendance/monthStatistics.vue":["z8Gq",98],"./enterpriseApp/dailyAttendance/workGroupSet.vue":["estW",0,25],"./enterpriseApp/dailyAttendance/workSet.vue":["A/XQ",0,39],"./enterpriseApp/dailyAttendance/workTimeManage.vue":["/n/x",32],"./enterpriseApp/index.vue":["da9f",50],"./enterpriseApp/marketingMaterial/enjoyMaterial.vue":["SB6x",0,26],"./enterpriseApp/marketingMaterial/imageText.vue":["0qiV",0,28],"./enterpriseApp/marketingMaterial/index.vue":["m0O4",0,67],"./enterpriseApp/marketingMaterial/newEnjoy.vue":["7fkC",0,17],"./enterpriseApp/marketingMaterial/newImageText.vue":["NajC",0,14],"./enterpriseApp/myCustomer/cardGetRecord.vue":["YqmZ",0,74],"./enterpriseApp/myCustomer/cardSendRecord.vue":["+Q5U",0,94],"./enterpriseApp/myCustomer/chatRecord.vue":["gjw3",0,56],"./enterpriseApp/myCustomer/index.vue":["/rje",0,96],"./enterpriseApp/myCustomer/memeberBaseSet.vue":["N+Or",0,46],"./enterpriseApp/myCustomer/newCard.vue":["G/J9",0,87],"./enterpriseApp/myCustomer/onlineChatSet.vue":["ahzF",0,27],"./enterpriseApp/myCustomer/sendRecord.vue":["8msp",0,83],"./enterpriseApp/mycustomer.vue":["cuIN",0,47],"./enterpriseApp/notice/addNotice.vue":["G5PL",0,2],"./enterpriseApp/notice/index.vue":["av/3",0,65],"./enterpriseApp/notice/noticeList.vue":["OVYO",0,13],"./enterpriseApp/quota/companyDaySet.vue":["xk7v",0,45],"./enterpriseApp/quota/index.vue":["FB5x",0,85],"./enterpriseApp/quota/monthList.vue":["ZxDn",0,76],"./enterpriseApp/quota/monthTask.vue":["cK0D",0,82],"./enterpriseApp/quota/monthTaskDetail.vue":["jMbb",0,75],"./enterpriseApp/quota/salerMonthDetail.vue":["IKv2",0,62],"./enterpriseApp/quota/storeMonthTask.vue":["kF1j",0,44],"./enterpriseApp/signApp/index.vue":["Gk4o",0,70],"./enterpriseApp/signApp/signList.vue":["kCy7",0,63],"./enterpriseApp/trafficTask/index.vue":["e88N",0,68],"./enterpriseApp/trafficTask/taskDetail.vue":["A33E",0,48],"./enterpriseApp/trafficTask/taskRecord.vue":["iG3v",0,33],"./enterpriseApp/trafficTask/taskViewDetail.vue":["Akas",0,73],"./enterpriseApp/trafficTask/trafficTaskSet.vue":["4H54",0,93],"./errorPage/403.vue":["6XGN",34],"./errorPage/404.vue":["AejC",37],"./errorPage/500.vue":["FskK",29],"./errorPage/gic-error.vue":["Q3j/",31],"./errorPage/index.vue":["ODjX",1],"./index/index.vue":["JXTs",0,35],"./login/index.vue":["T+/8",0,10],"./reviewCenter/index.vue":["+lem",90],"./reviewCenter/reviewed.vue":["CLYF",0,21],"./reviewCenter/unreview.vue":["xCEU",0,12],"./setting/addAdmin.vue":["rs/A",0,55],"./setting/addAdminRole.vue":["fZsz",0,77],"./setting/companyAddress.vue":["SKyE",0,53],"./setting/companyCertify.vue":["3zYh",0,15],"./setting/contactPermission.vue":["6zFj",0,72],"./setting/index.vue":["VlR1",43],"./setting/replaceAdmin.vue":["ys9I",0,88],"./setting/setChildAdmin.vue":["VqB7",0,91],"./setting/staffDetails.vue":["Zyzf",0,30],"./setting/storePermission.vue":["Xwfy",0,24],"./sign/index.vue":["RQuk",0,92]};function r(e){var t=a[e];return t?Promise.all(t.slice(1).map(n.e)).then(function(){return n(t[0])}):Promise.reject(new Error("Cannot find module '"+e+"'."))}r.keys=function(){return Object.keys(a)},r.id="Opzk",e.exports=r},SJI6:function(e,t){e.exports=Vuex},Xcu2:function(e,t){},lRwf:function(e,t){e.exports=Vue},pRNm:function(e,t){e.exports=VueRouter},uKUT:function(e,t){}},[0]);
\ No newline at end of file
webpackJsonp([101],{"/NA0":function(e,t){},0:function(e,t,n){n("j1ja"),e.exports=n("NHnr")},"4qCZ":function(e,t){},"5tgt":function(e,t,n){e.exports=function(e,t){return function(a){n("Opzk")("./"+e+"/"+t+".vue").then(function(e){a(e)})}}},NHnr:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n("mvHQ"),r=n.n(a),o=n("fZjL"),p=n.n(o),i=(n("j1ja"),n("hKoQ")),s=n.n(i),c={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"app"}},[t("transition",{attrs:{name:"fade",mode:"out-in"}},[t("router-view")],1)],1)},staticRenderFns:[]};var m=n("VU/8")({name:"App",data:function(){return{}}},c,!1,function(e){n("/NA0")},null,null).exports,d=n("lRwf"),u=n.n(d),l=n("pRNm"),h=n.n(l),v=n("5tgt"),g=n.n(v);u.a.use(h.a);var A=function(e){n.e(1).then(n.bind(null,"ODjX")).then(function(t){e(t)})};window.sessionStorage.getItem("token")&&store.commit(types.LOGIN,window.sessionStorage.getItem("token"));var f,y=[{path:"/",name:"/",redirect:"login"},{path:"/login",name:"登录",component:g()("login","index")},{path:"/download",name:"下载",component:g()("download","index")},{path:"/index",name:"index",component:g()("index","index")},{path:"/sign",name:"index",component:g()("sign","index")},{path:"/contacts",name:"通讯录",redirect:"administrativeFrame",component:g()("contacts","index"),children:[{path:"/administrativeFrame",name:"行政架构",component:g()("contacts","administrativeFrame")},{path:"/employeeIo",name:"批量导入/导出",component:g()("contacts","employeeIo")},{path:"/addDepartment",name:"添加部门",component:g()("contacts","addDepartment")},{path:"/addClerk",name:"添加店员",component:g()("contacts","addClerk")},{path:"/storeFrame",name:"门店架构",component:g()("contacts","storeFrame")},{path:"/addGroup",name:"添加子分组",component:g()("contacts","addGroup")},{path:"/storeIo",name:"门店导入/导出",component:g()("contacts","storeIo")},{path:"/storeInfo",name:"编辑门店",component:g()("contacts","storeInfo")},{path:"/recycle",name:"门店回收站",component:g()("contacts","recycle")},{path:"/employee",name:"编辑员工",component:g()("contacts","employee")},{path:"/unemployee",name:"离职员工",component:g()("contacts","unemployee")},{path:"/fileSet",name:"档案设置",component:g()("contacts","fileSet")},{path:"/recordInfo",name:"编辑员工信息",component:g()("contacts","recordInfo")},{path:"/recordIo",name:"导入导出员工档案",component:g()("contacts","recordIo")},{path:"/shareContact",name:"共享通讯录",component:g()("contacts","shareContact")},{path:"/shareCode",name:"共享通讯录二维码",component:g()("contacts","shareCode")},{path:"/employeeRecord",name:"在职员工",component:g()("contacts","employeeRecord")}]},{path:"/enterpriseApp",name:"企业应用",redirect:"appcenter",component:g()("enterpriseApp","index"),children:[{path:"/appcenter",name:"企业应用中心",component:g()("enterpriseApp","appcenter")},{path:"/mycustomer",name:"我的顾客的",redirect:"/memeberBaseSet",component:g()("enterpriseApp/myCustomer","index"),children:[{path:"/memeberBaseSet",name:"会员基础设置",component:g()("enterpriseApp/myCustomer","memeberBaseSet")},{path:"/onlineChatSet",name:"在线沟通设置",component:g()("enterpriseApp/myCustomer","onlineChatSet")},{path:"/chatRecord",name:"聊天记录",component:g()("enterpriseApp/myCustomer","chatRecord")},{path:"/sendRecord",name:"发送记录",component:g()("enterpriseApp/myCustomer","sendRecord")},{path:"/newCard",name:"新建卡券",component:g()("enterpriseApp/myCustomer","newCard")},{path:"/cardSendRecord",name:"卡券发送记录",component:g()("enterpriseApp/myCustomer","cardSendRecord")},{path:"/cardGetRecord",name:"卡券领取卡券",component:g()("enterpriseApp/myCustomer","cardGetRecord")}]},{path:"/marketing",name:"营销素材",redirect:"/imageText",component:g()("enterpriseApp/marketingMaterial","index"),children:[{path:"/imageText",name:"图文素材",component:g()("enterpriseApp/marketingMaterial","imageText")},{path:"/newImageText",name:"选择图文",component:g()("enterpriseApp/marketingMaterial","newImageText")},{path:"/enjoyMaterial",name:"纷享素材",component:g()("enterpriseApp/marketingMaterial","enjoyMaterial")},{path:"/newEnjoy",name:"新建素材",component:g()("enterpriseApp/marketingMaterial","newEnjoy")}]},{path:"/cloudDaily",name:"云日报",redirect:"/dailyRecord",component:g()("enterpriseApp/cloudDaily","index"),children:[{path:"/dailyRecord",name:"云日报记录",component:g()("enterpriseApp/cloudDaily","dailyRecord")},{path:"/dailyDetail",name:"日报详情",component:g()("enterpriseApp/cloudDaily","dailyDetail")},{path:"/taskAssign",name:"任务下发设置",component:g()("enterpriseApp/cloudDaily","taskAssign")},{path:"/systemReport",name:"系统报表",component:g()("enterpriseApp/cloudDaily","systemReport")},{path:"/customReport",name:"自定义报表",component:g()("enterpriseApp/cloudDaily","customReport")}]},{path:"/trafficTask",name:"话务任务",redirect:"/taskRecord",component:g()("enterpriseApp/trafficTask","index"),children:[{path:"/taskRecord",name:"话务任务记录",component:g()("enterpriseApp/trafficTask","taskRecord")},{path:"/taskDetail",name:"话务任务详情",component:g()("enterpriseApp/trafficTask","taskDetail")},{path:"/taskViewDetail",name:"话务任务详情",component:g()("enterpriseApp/trafficTask","taskViewDetail")},{path:"/trafficTaskSet",name:"话务任务设置",component:g()("enterpriseApp/trafficTask","trafficTaskSet")},{path:"/badEvaluateSet",name:"不良评价设置",component:g()("enterpriseApp/badEvaluate","badEvaluateSet")}]},{path:"/noticeList",name:"企业公告",redirect:"/noticeList",component:g()("enterpriseApp/notice","index"),children:[{path:"/noticeList",name:"企业公告列表",component:g()("enterpriseApp/notice","noticeList")},{path:"/addNotice",name:"新建公告",component:g()("enterpriseApp/notice","addNotice")}]},{path:"/badEvaluate",name:"不良评价",redirect:"/badEvaluateRecord",component:g()("enterpriseApp/badEvaluate","index"),children:[{path:"/badEvaluateRecord",name:"不良评价记录",component:g()("enterpriseApp/badEvaluate","badEvaluateRecord")},{path:"/badEvaluateDetail",name:"不良评价详情",component:g()("enterpriseApp/badEvaluate","badEvaluateDetail")}]},{path:"/quota",name:"指标管理",redirect:"/monthList",component:g()("enterpriseApp/quota","index"),children:[{path:"/monthList",name:"月指标列表",component:g()("enterpriseApp/quota","monthList")},{path:"/storeMonthTask",name:"门店月指标",component:g()("enterpriseApp/quota","storeMonthTask")},{path:"/salerMonthDetail",name:"导购月指标详情",component:g()("enterpriseApp/quota","salerMonthDetail")},{path:"/companyDaySet",name:"商户日权重",component:g()("enterpriseApp/quota","companyDaySet")},{path:"/monthTask",name:"月指标任务",component:g()("enterpriseApp/quota","monthTask"),meta:{keepAlive:!0}},{path:"/monthTaskDetail",name:"月指标任务详情",component:g()("enterpriseApp/quota","monthTaskDetail"),meta:{keepAlive:!0}}]},{path:"/signList",name:"企业公告",redirect:"/signList",component:g()("enterpriseApp/signApp","index"),children:[{path:"/signList",name:"企业公告列表",component:g()("enterpriseApp/signApp","signList")}]},{path:"/clockin",name:"考勤打卡",redirect:"/dayStatistics",component:g()("enterpriseApp/dailyAttendance","index"),children:[{path:"/dayStatistics",name:"日统计",component:g()("enterpriseApp/dailyAttendance","dayStatistics")},{path:"/monthStatistics",name:"月统计",component:g()("enterpriseApp/dailyAttendance","monthStatistics")},{path:"/workSet",name:"考勤设置",component:g()("enterpriseApp/dailyAttendance","workSet")},{path:"/workGroupSet",name:"考勤设置",component:g()("enterpriseApp/dailyAttendance","workGroupSet")},{path:"/workTimeManage",name:"排班管理",component:g()("enterpriseApp/dailyAttendance","workTimeManage")}]}]},{path:"/reviewCenter",name:"审核中心",redirect:"unreview",component:g()("reviewCenter","index"),children:[{path:"/reviewed",name:"已审核",component:g()("reviewCenter","reviewed")},{path:"/unreview",name:"未审核",component:g()("reviewCenter","unreview")}]},{path:"/setCenter",name:"设置",redirect:"companyAddress",component:g()("setting","index"),children:[{path:"/companyAddress",name:"企业地址",component:g()("setting","companyAddress")},{path:"/companyCertify",name:"企业认证",component:g()("setting","companyCertify")},{path:"/staffDetails",name:"员工详情字段",component:g()("setting","staffDetails")},{path:"/storePermission",name:"门店权限设置",component:g()("setting","storePermission")},{path:"/contactPermission",name:"通讯录控制",component:g()("setting","contactPermission")},{path:"/replaceAdmin",name:"更换超级管理员",component:g()("setting","replaceAdmin")},{path:"/setChildAdmin",name:"设置子管理员",component:g()("setting","setChildAdmin")},{path:"/addAdmin",name:"添加管理员",component:g()("setting","addAdmin")},{path:"/addAdminRole",name:"添加管理员角色",component:g()("setting","addAdminRole")}]},{path:"/staffRecordsTemplate",name:"员工档案设置",component:g()("contacts","staffRecordsTemplate")},{path:"/systemReportSet",name:"系统报表设置",component:g()("enterpriseApp/cloudDaily","systemReportSet")},{path:"/template",name:"模板设置",component:g()("enterpriseApp/cloudDaily","template")},{path:"/gic-error",name:"gic跳转失败页",component:g()("errorPage","gic-error")},{path:"/403",name:"无权访问",component:A},{path:"/404",name:"error404",component:A},{path:"/500",name:"error500",component:A},{path:"*",redirect:"/404",hidden:!0}],k=new h.a({routes:y,scrollBehavior:function(){return{y:0}}}),w=n("zL8q"),D=n.n(w),x=n("Rf8U"),S=n.n(x),R=n("mtWM"),C=n.n(R),T=n("bOdI"),M=n.n(T),E=n("SJI6"),b=n.n(E);u.a.use(b.a);var I=new b.a.Store({state:{user:{},token:null,title:"",show:!1,bgHeight:window.screen.availHeight-440-24+"px"},mutations:(f={},M()(f,"login",function(e,t){sessionStorage.token=t,e.token=t}),M()(f,"logout",function(e){sessionStorage.removeItem("token"),e.token=null}),M()(f,"title",function(e,t){e.title=t}),M()(f,"show",function(e,t){e.show=t}),f)}),j=(n("4qCZ"),n("uKUT"),n("Xcu2"),{dateFormat:function(e,t){if(e){e=10===e.toString().length?1e3*e:e;var n=new Date(e),a={"M+":n.getMonth()+1,"D+":n.getDate(),W:"日一二三四五六".charAt(n.getDay()),"h+":n.getHours(),"m+":n.getMinutes(),"s+":n.getSeconds(),"q+":Math.floor((n.getMonth()+3)/3),S:n.getMilliseconds()};for(var r in/(Y+)/.test(t)&&(t=t.replace(RegExp.$1,(n.getFullYear()+"").substr(4-RegExp.$1.length))),a)new RegExp("("+r+")").test(t)&&(t=t.replace(RegExp.$1,1===RegExp.$1.length?a[r]:("00"+a[r]).substr((""+a[r]).length)));return t}},formatTimeStamp:function(e){if(e){var t=new Date(e),n=t.getMonth()+1,a=t.getDate()<10?"0"+t.getDate():t.getDate(),r=n<10?"0"+n:n,o=t.getHours()<10?"0"+t.getHours():t.getHours(),p=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),i=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return t.getFullYear()+"-"+r+"-"+a+" "+o+":"+p+":"+i}},timeStampToYmd:function(e){if(e){var t=new Date(e),n=t.getMonth()+1,a=t.getDate()<10?"0"+t.getDate():t.getDate(),r=n<10?"0"+n:n;return t.getFullYear()+"-"+r+"-"+a}},timeStampToHms:function(e){if(e){var t=new Date(e);return(t.getHours()<10?"0"+t.getHours():t.getHours())+":"+(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":"+(t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds())}},formatTimeYmdHms:function(e){if(e){var t=new Date(e),n=t.getMonth()+1,a=t.getDate()<10?"0"+t.getDate():t.getDate(),r=n<10?"0"+n:n,o=t.getHours()<10?"0"+t.getHours():t.getHours(),p=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),i=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return t.getFullYear()+"."+r+"."+a+" "+o+":"+p+":"+i}}}),V=n("TUaa"),q=n.n(V),P=n("tyqE"),G=n.n(P),H=n("pRVe"),L=n.n(H),F=n("SE7k"),O=n.n(F),N=n("XsK6"),z=n.n(N),Y=n("QRL9"),J=n.n(Y),K=n("2Pnh"),B=n.n(K),U=n("l9mu"),X=n.n(U),Q={install:function(e,t){e.prototype.getPdf=function(){var e=this.htmlTitle;B()(document.querySelector("#pdfDom"),{allowTaint:!0,foreignObjectRendering:!0}).then(function(t){var n=t.width,a=t.height,r=n/592.28*841.89,o=a,p=0,i=592.28/n*a,s=t.toDataURL("image/jpeg",1),c=new X.a("","pt","a4");if(o<r)c.addImage(s,"JPEG",0,0,595.28,i);else for(;o>0;)c.addImage(s,"JPEG",0,p,595.28,i),p-=841.89,(o-=r)>0&&c.addPage();c.save(e+".pdf")})}}},Z=n("/IwO"),W=n.n(Z);s.a.polyfill(),Vue.use(W.a),W.a.initAMapApiLoader({key:"d53a58848be368a7398dc56d5670fe9c",plugin:["Autocomplete","PlaceSearch","Scale","OverView","Geocoder","ToolBar","MapType","PolyEditor","AMap.CircleEditor"],v:"1.4.4"}),Vue.use(Q),Vue.use(z.a),Vue.use(J.a),Vue.use(O.a),Vue.use(L.a),Vue.use(G.a),Vue.use(q.a),Vue.config.productionTip=!1,Vue.use(D.a,{size:"large"}),Vue.use(S.a,C.a),Vue.axios.defaults.withCredentials=!0,p()(j).forEach(function(e){Vue.filter(e,j[e])}),k.beforeEach(function(e,t,n){var a=void 0,o=window.location.origin;a=-1!=o.indexOf("localhost")?"http://www.gicdev.com":o,localStorage.getItem("userInfo")||C.a.get(a+"/haoban-manage-web/emp/get-user-info",{}).then(function(e){var t=e.data;1!=t.errorCode||localStorage.setItem("userInfo",r()(t.result))}).catch(function(e){w.Message.error({duration:1e3,message:e.message})}),"/"==e.path?n({path:"/login"}):n()}),new Vue({el:"#app",router:k,store:I,components:{App:m},template:"<App/>"})},Opzk:function(e,t,n){var a={"./contacts/addClerk.vue":["27o1",0,22],"./contacts/addDepartment.vue":["HHRu",0,20],"./contacts/addEmployee.vue":["00Sv",60],"./contacts/addGroup.vue":["mPjx",0,69],"./contacts/administrativeFrame.vue":["kLcy",0,4],"./contacts/employee.vue":["AdJp",0,59],"./contacts/employeeIo.vue":["Rwbg",0,80],"./contacts/employeeRecord.vue":["zGJY",0,9],"./contacts/fileSet.vue":["CSjr",0,11],"./contacts/index.vue":["41Rh",0,66],"./contacts/recordInfo.vue":["67iC",0,16],"./contacts/recordIo.vue":["738z",0,25],"./contacts/recycle.vue":["HkK0",0,36],"./contacts/shareAddDepartment.vue":["q5Ri",0,19],"./contacts/shareCode.vue":["JsWW",0,42],"./contacts/shareContact.vue":["Gfms",0,3],"./contacts/staffRecordsTemplate.vue":["lFAe",0,87],"./contacts/storeFrame.vue":["7SJI",0,6],"./contacts/storeInfo.vue":["h/6A",0,57],"./contacts/storeIo.vue":["RHxA",0,86],"./contacts/unemployee.vue":["TGrv",0,18],"./download/index.vue":["ASGJ",0,8],"./enterpriseApp/appcenter.vue":["yuVF",0,38],"./enterpriseApp/badEvaluate/badEvaluateDetail.vue":["4m/B",0,58],"./enterpriseApp/badEvaluate/badEvaluateRecord.vue":["r//C",0,51],"./enterpriseApp/badEvaluate/badEvaluateSet.vue":["XzAK",0,79],"./enterpriseApp/badEvaluate/index.vue":["W0k8",0,49],"./enterpriseApp/cloudDaily/customReport.vue":["DxdI",0,84],"./enterpriseApp/cloudDaily/dailyDetail.vue":["5nNU",0,64],"./enterpriseApp/cloudDaily/dailyRecord.vue":["Ujni",0,40],"./enterpriseApp/cloudDaily/index.vue":["Knd1",0,97],"./enterpriseApp/cloudDaily/systemReport.vue":["Y8F9",0,41],"./enterpriseApp/cloudDaily/systemReportSet.vue":["VE2c",0,7],"./enterpriseApp/cloudDaily/taskAssign.vue":["5x7s",0,81],"./enterpriseApp/cloudDaily/template.vue":["IA9l",0,5],"./enterpriseApp/cloudDaily/template/block.vue":["PAYw",54],"./enterpriseApp/cloudDaily/template/date-range.vue":["79Bk",95],"./enterpriseApp/cloudDaily/template/image.vue":["H8Kg",61],"./enterpriseApp/cloudDaily/template/input.vue":["s4D+",71],"./enterpriseApp/cloudDaily/template/select.vue":["t0b0",78],"./enterpriseApp/dailyAttendance/dayStatistics.vue":["gncU",99],"./enterpriseApp/dailyAttendance/index.vue":["vgwM",0,52],"./enterpriseApp/dailyAttendance/monthStatistics.vue":["z8Gq",98],"./enterpriseApp/dailyAttendance/workGroupSet.vue":["estW",0,27],"./enterpriseApp/dailyAttendance/workSet.vue":["A/XQ",0,39],"./enterpriseApp/dailyAttendance/workTimeManage.vue":["/n/x",32],"./enterpriseApp/index.vue":["da9f",50],"./enterpriseApp/marketingMaterial/enjoyMaterial.vue":["SB6x",0,23],"./enterpriseApp/marketingMaterial/imageText.vue":["0qiV",0,24],"./enterpriseApp/marketingMaterial/index.vue":["m0O4",0,67],"./enterpriseApp/marketingMaterial/newEnjoy.vue":["7fkC",0,17],"./enterpriseApp/marketingMaterial/newImageText.vue":["NajC",0,14],"./enterpriseApp/myCustomer/cardGetRecord.vue":["YqmZ",0,74],"./enterpriseApp/myCustomer/cardSendRecord.vue":["+Q5U",0,94],"./enterpriseApp/myCustomer/chatRecord.vue":["gjw3",0,56],"./enterpriseApp/myCustomer/index.vue":["/rje",0,96],"./enterpriseApp/myCustomer/memeberBaseSet.vue":["N+Or",0,46],"./enterpriseApp/myCustomer/newCard.vue":["G/J9",0,88],"./enterpriseApp/myCustomer/onlineChatSet.vue":["ahzF",0,28],"./enterpriseApp/myCustomer/sendRecord.vue":["8msp",0,83],"./enterpriseApp/mycustomer.vue":["cuIN",0,47],"./enterpriseApp/notice/addNotice.vue":["G5PL",0,2],"./enterpriseApp/notice/index.vue":["av/3",0,65],"./enterpriseApp/notice/noticeList.vue":["OVYO",0,13],"./enterpriseApp/quota/companyDaySet.vue":["xk7v",0,45],"./enterpriseApp/quota/index.vue":["FB5x",0,85],"./enterpriseApp/quota/monthList.vue":["ZxDn",0,76],"./enterpriseApp/quota/monthTask.vue":["cK0D",0,82],"./enterpriseApp/quota/monthTaskDetail.vue":["jMbb",0,75],"./enterpriseApp/quota/salerMonthDetail.vue":["IKv2",0,62],"./enterpriseApp/quota/storeMonthTask.vue":["kF1j",0,44],"./enterpriseApp/signApp/index.vue":["Gk4o",0,70],"./enterpriseApp/signApp/signList.vue":["kCy7",0,63],"./enterpriseApp/trafficTask/index.vue":["e88N",0,68],"./enterpriseApp/trafficTask/taskDetail.vue":["A33E",0,48],"./enterpriseApp/trafficTask/taskRecord.vue":["iG3v",0,33],"./enterpriseApp/trafficTask/taskViewDetail.vue":["Akas",0,73],"./enterpriseApp/trafficTask/trafficTaskSet.vue":["4H54",0,93],"./errorPage/403.vue":["6XGN",34],"./errorPage/404.vue":["AejC",37],"./errorPage/500.vue":["FskK",29],"./errorPage/gic-error.vue":["Q3j/",31],"./errorPage/index.vue":["ODjX",1],"./index/index.vue":["JXTs",0,35],"./login/index.vue":["T+/8",0,10],"./reviewCenter/index.vue":["+lem",90],"./reviewCenter/reviewed.vue":["CLYF",0,21],"./reviewCenter/unreview.vue":["xCEU",0,12],"./setting/addAdmin.vue":["rs/A",0,55],"./setting/addAdminRole.vue":["fZsz",0,77],"./setting/companyAddress.vue":["SKyE",0,53],"./setting/companyCertify.vue":["3zYh",0,15],"./setting/contactPermission.vue":["6zFj",0,72],"./setting/index.vue":["VlR1",43],"./setting/replaceAdmin.vue":["ys9I",0,89],"./setting/setChildAdmin.vue":["VqB7",0,91],"./setting/staffDetails.vue":["Zyzf",0,30],"./setting/storePermission.vue":["Xwfy",0,26],"./sign/index.vue":["RQuk",0,92]};function r(e){var t=a[e];return t?Promise.all(t.slice(1).map(n.e)).then(function(){return n(t[0])}):Promise.reject(new Error("Cannot find module '"+e+"'."))}r.keys=function(){return Object.keys(a)},r.id="Opzk",e.exports=r},SJI6:function(e,t){e.exports=Vuex},Xcu2:function(e,t){},lRwf:function(e,t){e.exports=Vue},pRNm:function(e,t){e.exports=VueRouter},uKUT:function(e,t){}},[0]);
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,d,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],b[t]&&u.push(b[t][0]),b[t]=0;for(r in d)Object.prototype.hasOwnProperty.call(d,r)&&(e[r]=d[r]);for(c&&c(a,d,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=f(f.s=n[i]);return o};var a={},b={103:0};function f(c){if(a[c])return a[c].exports;var b=a[c]={i:c,l:!1,exports:{}};return e[c].call(b.exports,b,b.exports,f),b.l=!0,b.exports}f.e=function(e){var c=b[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,f){c=b[e]=[a,f]});c[2]=a;var d=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,f.nc&&n.setAttribute("nonce",f.nc),n.src=f.p+"static/js/"+e+"."+{0:"ab616832b6f6019a8690",1:"fe9dec1f31b04053fd7e",2:"54aabab28c7735d34c10",3:"b7e6d57d97174b75b050",4:"11254d7e3a102121b8ec",5:"330c91a0a9fe8490c0e7",6:"124ad8222f7b043b44ae",7:"ebad93a8c5bffffd9e98",8:"f1c9fb5c9212483138d8",9:"b5aae16b3951516573ad",10:"ebbed2d956a1376f014a",11:"59c7813cc972f62b1d18",12:"879536ae7ce46f0c54ec",13:"57e51fc1b6342003f25d",14:"d4577e674687596a82fe",15:"26e240debc0e9e519cfc",16:"3764f209950b5a339958",17:"cd897e152428f8fe12c6",18:"f7633d51986d0c6798f1",19:"60cda7a1997f26103e8b",20:"9978a0294be1004d697d",21:"ed8d46095e29b1e8d098",22:"537abc52bc237952c65a",23:"6586d8dbbc88ff9e7868",24:"ae973093bb8dd3a5b495",25:"38c7fffee3988d031ec9",26:"88e76d9c9f4d5e2d0c27",27:"c3f7fb68797f235ad906",28:"8eb2bb1afe16d964a0b2",29:"c5bb15e8e1bd17cdc0f7",30:"ea05d43b99177823fbdc",31:"b8b827be7489c76082e9",32:"fa08375056ae64364bce",33:"f4e32fc6846aa744ee48",34:"0fb2eb67d47b9ecbd519",35:"e64c33855b455bcdd9a2",36:"8615782328f743c5f783",37:"8d599976023acb79bef4",38:"6620399d71206af0621b",39:"823bd52fe45b0b574689",40:"52567857be12ee835446",41:"7264f33d2c3cf44d63a5",42:"9cacb9b0dc2a83864afe",43:"2324b3155ba3e3fe67b2",44:"a899f81af77b5d1b6daf",45:"d4e2ecd5b9efc4c430de",46:"03ae66bfca82c8ffa033",47:"393792502b1faedfd75b",48:"e413bb6ddbf0598e75ed",49:"8be0d341bf9560ab91d8",50:"edc711153403cc5a63ed",51:"5996349b24bab60188ec",52:"4b670e09f79ed49e862d",53:"ec91f2b143d0b1e708b5",54:"31eed9c38748896262d1",55:"4f96191ae2c44c6f18f7",56:"99063bd3b07926595af4",57:"ba6530916d934b70d218",58:"2241679269f18e7f14c3",59:"5c336f6f4d119300c1d8",60:"d43c13d5c29feb45e864",61:"0806aac37bd2b86e8bc2",62:"8ef5c75f77376ecd8873",63:"bbe4da77ef31a0aa9150",64:"f26939887c305ec6f7fc",65:"069ccaf5f8e5b5f3c59d",66:"5f0382c9cb76b57ba778",67:"745b9621e5297c575b33",68:"aaaa125fb978b59c2cbf",69:"bb6a8bab41cac9f11bd4",70:"a226d330de7ebb2a4c5f",71:"9551ae81326c57064dec",72:"cb1b3985b92be4556fc1",73:"b6b1fb51b601c0fafcda",74:"6206c00744e77bc84fec",75:"93eb5a61daaa3a1df425",76:"78e5a422e9fecbbd255a",77:"b3f7cf4d2b54d306c522",78:"1fc3472c5f95a0a66979",79:"69811ba75d1fceae9737",80:"12442b543aff65f2c05d",81:"00a94b58ac2affb758dc",82:"1fa56152d6bdcfd4ec14",83:"976088a6ee120b8caa17",84:"45dae077c86a1a0050ff",85:"0c7635a15cceae31d981",86:"d0d0607a424156f2d88d",87:"8c62418c0b2cc9b8e750",88:"d451f8cffee0abe026c6",89:"b528547071d6c896cf0f",90:"57319965505945b3ae7e",91:"446342439ce97b19c84f",92:"09a5823b00d6180576b9",93:"e801fdd8bbd27a68d8ee",94:"0667cc1720cd56e116d9",95:"a08b7e730d57a7f096a5",96:"37acaa2f6f812ee7216b",97:"84d009afd65fa1e0cb42",98:"d54541a3a62bae3a075b",99:"b2c0b52f472168172ad5",102:"2c7e1d628bd2f4ac709c"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=b[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),b[e]=void 0)}return n.onerror=n.onload=t,d.appendChild(n),a},f.m=e,f.c=a,f.d=function(e,c,a){f.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},f.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(c,"a",c),c},f.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},f.p="./",f.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,d,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],b[t]&&u.push(b[t][0]),b[t]=0;for(r in d)Object.prototype.hasOwnProperty.call(d,r)&&(e[r]=d[r]);for(c&&c(a,d,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=f(f.s=n[i]);return o};var a={},b={103:0};function f(c){if(a[c])return a[c].exports;var b=a[c]={i:c,l:!1,exports:{}};return e[c].call(b.exports,b,b.exports,f),b.l=!0,b.exports}f.e=function(e){var c=b[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,f){c=b[e]=[a,f]});c[2]=a;var d=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,f.nc&&n.setAttribute("nonce",f.nc),n.src=f.p+"static/js/"+e+"."+{0:"ab616832b6f6019a8690",1:"fe9dec1f31b04053fd7e",2:"54aabab28c7735d34c10",3:"b7e6d57d97174b75b050",4:"11254d7e3a102121b8ec",5:"330c91a0a9fe8490c0e7",6:"124ad8222f7b043b44ae",7:"ebad93a8c5bffffd9e98",8:"f1c9fb5c9212483138d8",9:"b5aae16b3951516573ad",10:"ebbed2d956a1376f014a",11:"59c7813cc972f62b1d18",12:"879536ae7ce46f0c54ec",13:"57e51fc1b6342003f25d",14:"9cf830eb000e3ac61f70",15:"26e240debc0e9e519cfc",16:"3764f209950b5a339958",17:"80614395bb09ceff9e99",18:"f7633d51986d0c6798f1",19:"60cda7a1997f26103e8b",20:"9978a0294be1004d697d",21:"ed8d46095e29b1e8d098",22:"537abc52bc237952c65a",23:"6c7d16c176cd4c63a794",24:"c3c8797fe7e9c079e5b6",25:"d3508ee6e53c11c834a8",26:"2a9f825a5856b483326c",27:"dc616e41a0fbc9cfcc29",28:"70cb3f87bd69723dbd41",29:"c5bb15e8e1bd17cdc0f7",30:"ea05d43b99177823fbdc",31:"b8b827be7489c76082e9",32:"fa08375056ae64364bce",33:"f4e32fc6846aa744ee48",34:"0fb2eb67d47b9ecbd519",35:"e64c33855b455bcdd9a2",36:"8615782328f743c5f783",37:"8d599976023acb79bef4",38:"6620399d71206af0621b",39:"05129f36074d6ce75507",40:"52567857be12ee835446",41:"7264f33d2c3cf44d63a5",42:"9cacb9b0dc2a83864afe",43:"2324b3155ba3e3fe67b2",44:"a899f81af77b5d1b6daf",45:"d4e2ecd5b9efc4c430de",46:"03ae66bfca82c8ffa033",47:"393792502b1faedfd75b",48:"e413bb6ddbf0598e75ed",49:"8be0d341bf9560ab91d8",50:"edc711153403cc5a63ed",51:"5996349b24bab60188ec",52:"4b670e09f79ed49e862d",53:"ec91f2b143d0b1e708b5",54:"31eed9c38748896262d1",55:"4f96191ae2c44c6f18f7",56:"99063bd3b07926595af4",57:"ba6530916d934b70d218",58:"2241679269f18e7f14c3",59:"5c336f6f4d119300c1d8",60:"d43c13d5c29feb45e864",61:"0806aac37bd2b86e8bc2",62:"8ef5c75f77376ecd8873",63:"bbe4da77ef31a0aa9150",64:"f26939887c305ec6f7fc",65:"069ccaf5f8e5b5f3c59d",66:"5f0382c9cb76b57ba778",67:"745b9621e5297c575b33",68:"aaaa125fb978b59c2cbf",69:"bb6a8bab41cac9f11bd4",70:"a226d330de7ebb2a4c5f",71:"9551ae81326c57064dec",72:"cb1b3985b92be4556fc1",73:"b6b1fb51b601c0fafcda",74:"6206c00744e77bc84fec",75:"93eb5a61daaa3a1df425",76:"78e5a422e9fecbbd255a",77:"b3f7cf4d2b54d306c522",78:"1fc3472c5f95a0a66979",79:"69811ba75d1fceae9737",80:"12442b543aff65f2c05d",81:"00a94b58ac2affb758dc",82:"1fa56152d6bdcfd4ec14",83:"976088a6ee120b8caa17",84:"45dae077c86a1a0050ff",85:"0c7635a15cceae31d981",86:"d0d0607a424156f2d88d",87:"aee44c25b8d252c44b6e",88:"9617b600ff0f73479a43",89:"8d513b9c9d7970a612c0",90:"57319965505945b3ae7e",91:"446342439ce97b19c84f",92:"09a5823b00d6180576b9",93:"e801fdd8bbd27a68d8ee",94:"0667cc1720cd56e116d9",95:"a08b7e730d57a7f096a5",96:"37acaa2f6f812ee7216b",97:"84d009afd65fa1e0cb42",98:"d54541a3a62bae3a075b",99:"b2c0b52f472168172ad5",102:"2629d20834840d0da10e"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=b[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),b[e]=void 0)}return n.onerror=n.onload=t,d.appendChild(n),a},f.m=e,f.c=a,f.d=function(e,c,a){f.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},f.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(c,"a",c),c},f.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},f.p="./",f.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-12-17 09:40:42
* @LastEditors: 无尘
* @LastEditTime: 2019-12-17 16:43:31
* @LastEditTime: 2019-12-18 12:53:47
-->
<!--
......@@ -154,7 +154,6 @@ export default {
}
});
}
console.log(resData.result);
that.tableData = resData.result || [];
}
})
......@@ -182,7 +181,6 @@ export default {
},
mounted() {
const that = this;
console.log(that.classesId);
that.getClassifyData();
if (that.classesId) {
that.selClassesId = that.classesId;
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-10-21 14:27:29
* @LastEditors: 无尘
* @LastEditTime: 2019-12-17 16:14:14
* @LastEditTime: 2019-12-18 12:49:48
-->
<!--
......@@ -281,7 +281,6 @@ export default {
*/
changeTimes(e) {
const that = this;
console.log(e);
if (e == 1) {
that.formData.classessTimesJson.length >= 2 ? that.formData.classessTimesJson.splice(1, 2) : '';
}
......@@ -399,11 +398,9 @@ export default {
let arr = [];
let rangeStart = await that.hmMinuxhm(item.startTime, await that.hourTohm(8));
let rangeEnd = await that.hmMinuxhm(item.startTime, '00:01');
console.log(rangeStart);
// 判断是否小于下班时间
console.log('上班时间-8之后和下班时间比较:', await that.compareDate(rangeStart, item.endTime));
// console.log('上班时间-8之后和下班时间比较:', await that.compareDate(rangeStart, item.endTime));
const diff = parseInt(item.startTime.split(':')[0]) - 8;
console.log('上班时间-8:', diff);
if (diff < 0 && (await that.compareDate(rangeStart, item.endTime))) {
rangeStart = await that.hmMinuxhm(item.endTime, '00:01'); // 上班时间 - 8 ,如果比下班时间还小,就把下班时间作为可打卡开始的最小时间
}
......@@ -433,9 +430,9 @@ export default {
let rangeStart = await that.hmPlushm(item.startTime, '00:01');
let rangeEnd = await that.hmPlushm(item.startTime, '12:00');
// 判断是否大于上班时间
console.log('下班时间+12 之后和上班时间比较:', await that.compareDate(rangeEnd, item.endTime));
// console.log('下班时间+12 之后和上班时间比较:', await that.compareDate(rangeEnd, item.endTime));
const diff = parseInt(item.startTime.split(':')[0]) + 12;
console.log('下班时间+12:', diff, rangeEnd, await that.compareDate(item.endTime, rangeEnd));
// console.log('下班时间+12:', diff, rangeEnd, await that.compareDate(item.endTime, rangeEnd));
if ((await that.compareDate(item.startTime, item.endTime)) && diff < 24 && (await that.compareDate(item.endTime, rangeEnd))) {
// 如: 07:00-17:00 17 < 7+12 可是 06:00-02:00,符合,但是不能走这个,所以加 是否跨日
rangeEnd = await that.hmMinuxhm(item.endTime, '00:01');
......@@ -466,27 +463,24 @@ export default {
let rangeStart = await that.hmMinuxhm(item.endTime, '08:00');
let rangeEnd = await that.hmMinuxhm(item.endTime, '00:01');
// 判断是否大于上班时间
console.log('下班时间-8 之后和上班时间比较:', await that.compareDate(item.startTime, rangeStart));
// console.log('下班时间-8 之后和上班时间比较:', await that.compareDate(item.startTime, rangeStart));
const diff = parseInt(item.endTime.split(':')[0]) - 8;
console.log('下班时间-8:', diff, rangeStart, await that.compareDate(item.startTime, rangeStart));
// console.log('下班时间-8:', diff, rangeStart, await that.compareDate(item.startTime, rangeStart));
if (((await that.compareDate(item.startTime, item.endTime)) && diff < 0 && (await that.compareDate(item.startTime, rangeStart))) || ((await that.compareDate(item.startTime, item.endTime)) && diff > 0 && !(await that.compareDate(item.startTime, rangeStart)))) {
// 如 00:00-07:00 12:00-18:00
console.log(1);
rangeStart = await that.hmPlushm(item.startTime, '00:01'); // 下班时间 - 8 ,如果比上班时间还小,就把上班时间之前作为可打卡开始的最小时间
}
console.log(rangeStart);
// 跨天了(次日)
if (!(await that.compareDate(item.startTime, item.endTime)) && diff < 0 && !(await that.compareDate(item.startTime, rangeStart))) {
// 这个是特殊情况,不一定能走进来 23:00 -22:00, 假如 上班 22-8 = 14如果小于 23, diff > 0 的,默认的就可以,不走这个里面
console.log(2);
rangeStart = await that.hmPlushm(item.startTime, '00:01'); // 下班时间 - 8 ,如果比上班时间还小,就把上班时间之前作为可打卡开始的最小时间
}
console.log('是否跨天:', !(await that.compareDate(item.startTime, item.endTime)));
// console.log('是否跨天:', !(await that.compareDate(item.startTime, item.endTime)));
/* if (!(await that.compareDate(item.startTime, item.endTime)) && diff > 0 && !(await that.compareDate(item.startTime, rangeStart))) {
// 09:07-09:05
rangeStart = await that.hmPlushm(item.startTime, '00:01'); // 下班时间 - 8 ,如果比上班时间还小,就把上班时间之前作为可打卡开始的最小时间
} */
console.log('下班可以开始时间:', rangeStart, rangeEnd);
// console.log('下班可以开始时间:', rangeStart, rangeEnd);
// 比较开始于结束,如果开始大于结束,分段计算
if (!(await that.compareDate(rangeStart, rangeEnd))) {
arr.push([rangeStart + ':00', '23:59:00'].join('-'));
......@@ -504,9 +498,9 @@ export default {
let rangeStart = await that.hmPlushm(item.endTime, '00:01');
let rangeEnd = await that.hmPlushm(item.endTime, '12:00');
// 判断是否大于上班时间
console.log('下班时间+12 之后和上班时间比较:', await that.compareDate(rangeEnd, item.startTime));
// console.log('下班时间+12 之后和上班时间比较:', await that.compareDate(rangeEnd, item.startTime));
const diff = parseInt(item.endTime.split(':')[0]) + 12;
console.log('下班时间+12:', diff, rangeEnd, await that.compareDate(item.startTime, rangeEnd));
// console.log('下班时间+12:', diff, rangeEnd, await that.compareDate(item.startTime, rangeEnd));
if (diff > 24 && (await that.compareDate(item.startTime, rangeEnd))) {
rangeEnd = await that.hmMinuxhm(item.startTime, '00:01'); // 上班时间 - 8 ,如果比下班时间还小,就把下班时间作为可打卡开始的最小时间
}
......@@ -534,7 +528,6 @@ export default {
item.forbidStartEndTime = await that.forbidStartEndTime(item);
item.forbidEndStartTime = await that.forbidEndStartTime(item);
item.forbidEndEndTime = await that.forbidEndEndTime(item);
console.log(item);
that.$forceUpdate();
},
/**
......@@ -566,7 +559,7 @@ export default {
}
// 计算时间间隔
that.maxLate = hours - 0.5; // 可设置的时间数必须小于最大的限制数 0.5
console.log(that.maxLate);
// console.log(that.maxLate);
if (that.maxLate < 1.5) {
that.formData.lateRule = false; // 最大时间间隔小于 2小时,不能设置晚到规则
that.formData.lateRuleJson = [];
......@@ -609,11 +602,10 @@ export default {
let arr = [];
let rangeStart = await that.hmMinuxhm(item.startTime, await that.hourTohm(4));
let rangeEnd = await that.hmMinuxhm(item.startTime, '00:01');
console.log(rangeStart);
// 判断是否小于下班时间
console.log('上班时间-4之后和下班时间比较:', await that.compareDate(rangeStart, item.endTime));
// console.log('上班时间-4之后和下班时间比较:', await that.compareDate(rangeStart, item.endTime));
const diff = parseInt(item.startTime.split(':')[0]) - 4;
console.log('上班时间-4:', diff);
// console.log('上班时间-4:', diff);
if (diff < 0 && (await that.compareDate(rangeStart, item.endTime))) {
rangeStart = await that.hmMinuxhm(item.endTime, '00:01'); // 上班时间 - 4 ,如果比下班时间还小,就把下班时间作为可打卡开始的最小时间
}
......@@ -640,9 +632,9 @@ export default {
let rangeStart = await that.hmPlushm(item.startTime, '00:01');
let rangeEnd = await that.hmPlushm(item.startTime, '02:00');
// 判断是否大于上班时间
console.log('下班时间+2 之后和上班时间比较:', await that.compareDate(rangeEnd, item.endTime));
// console.log('下班时间+2 之后和上班时间比较:', await that.compareDate(rangeEnd, item.endTime));
const diff = parseInt(item.startTime.split(':')[0]) + 2;
console.log('下班时间+2:', diff, rangeEnd, await that.compareDate(item.endTime, rangeEnd));
// console.log('下班时间+2:', diff, rangeEnd, await that.compareDate(item.endTime, rangeEnd));
if ((await that.compareDate(item.startTime, item.endTime)) && diff < 24 && (await that.compareDate(item.endTime, rangeEnd))) {
// 如: 07:00-17:00 17 < 7+2 可是 06:00-02:00,符合,但是不能走这个,所以加 是否跨日
rangeEnd = await that.hmMinuxhm(item.endTime, '00:01');
......@@ -670,27 +662,25 @@ export default {
let rangeStart = await that.hmMinuxhm(item.endTime, '04:00');
let rangeEnd = await that.hmMinuxhm(item.endTime, '00:01');
// 判断是否大于上班时间
console.log('下班时间-4 之后和上班时间比较:', await that.compareDate(item.startTime, rangeStart));
// console.log('下班时间-4 之后和上班时间比较:', await that.compareDate(item.startTime, rangeStart));
const diff = parseInt(item.endTime.split(':')[0]) - 4;
console.log('下班时间-4:', diff, rangeStart, await that.compareDate(item.startTime, rangeStart));
// console.log('下班时间-4:', diff, rangeStart, await that.compareDate(item.startTime, rangeStart));
if (((await that.compareDate(item.startTime, item.endTime)) && diff < 0 && (await that.compareDate(item.startTime, rangeStart))) || ((await that.compareDate(item.startTime, item.endTime)) && diff > 0 && !(await that.compareDate(item.startTime, rangeStart)))) {
// 如 00:00-07:00 12:00-18:00
console.log(1);
rangeStart = await that.hmPlushm(item.startTime, '00:01'); // 下班时间 - 4 ,如果比上班时间还小,就把上班时间之前作为可打卡开始的最小时间
}
console.log(rangeStart);
// console.log(rangeStart);
// 跨天了(次日)
if (!(await that.compareDate(item.startTime, item.endTime)) && diff < 0 && !(await that.compareDate(item.startTime, rangeStart))) {
// 这个是特殊情况,不一定能走进来 23:00 -22:00, 假如 上班 22-4 = 14如果小于 23, diff > 0 的,默认的就可以,不走这个里面
console.log(2);
rangeStart = await that.hmPlushm(item.startTime, '00:01'); // 下班时间 - 4 ,如果比上班时间还小,就把上班时间之前作为可打卡开始的最小时间
}
console.log('是否跨天:', !(await that.compareDate(item.startTime, item.endTime)));
// console.log('是否跨天:', !(await that.compareDate(item.startTime, item.endTime)));
/* if (!(await that.compareDate(item.startTime, item.endTime)) && diff > 0 && !(await that.compareDate(item.startTime, rangeStart))) {
// 09:07-09:05
rangeStart = await that.hmPlushm(item.startTime, '00:01'); // 下班时间 - 4 ,如果比上班时间还小,就把上班时间之前作为可打卡开始的最小时间
} */
console.log('下班可以开始时间:', rangeStart, rangeEnd);
// console.log('下班可以开始时间:', rangeStart, rangeEnd);
// 比较开始于结束,如果开始大于结束,分段计算
if (!(await that.compareDate(rangeStart, rangeEnd))) {
arr.push([rangeStart + ':00', '23:59:00'].join('-'));
......@@ -715,7 +705,6 @@ export default {
*/
handleChangeLate(e) {
const that = this;
console.log('开启晚走:', e);
if (e) {
that.formData.lateRuleJson.push({
lateDate: 2.5,
......@@ -724,7 +713,6 @@ export default {
} else {
that.formData.lateRuleJson = [];
}
console.log(that.formData.lateRuleJson);
},
/**
* 添加晚走规则
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-12-17 09:40:42
* @LastEditors: 无尘
* @LastEditTime: 2019-12-17 17:04:29
* @LastEditTime: 2019-12-18 12:53:29
-->
<!--
......@@ -91,6 +91,7 @@ export default {
geocoder.getAddress([lng, lat], function(status, result) {
if (status === 'complete' && result.info === 'OK') {
if (result && result.regeocode) {
/* eslint-disable */
console.log(result);
that.address = result.regeocode.formattedAddress;
that.ruleForm.address = result.regeocode.formattedAddress;
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-10-22 15:12:41
* @LastEditors: 无尘
* @LastEditTime: 2019-12-10 20:06:38
* @LastEditTime: 2019-12-18 12:47:45
-->
<!--
......@@ -28,6 +28,7 @@ previewVisible: false,
<div class="notice-date-right font-10 color-4d7fd0"></div>
</div>
<div class="notice-body border-box font-14 color-222" v-htmlContent="materialData.materialContent"></div>
<div v-if="!!materialData.imgUrlList && !!materialData.imgUrlList.length" class="img-list-wrap">
<ul class="flex flex-wrap">
<li v-for="(item, index) in materialData.imgUrlList" :key="index + 'img'" class="border-box flex flex-align-center flex-pack-center">
......@@ -36,7 +37,7 @@ previewVisible: false,
</ul>
</div>
<div v-if="!!materialData.imageTextWechatId" class="image-text-link">
<div class="flex">
<div class="flex cursor-pointer" @click="toUrl(materialData.mediaUrl)">
<div class="flex-left-img flex flex-align-center flex-pack-center">
<img :src="materialData.imageUrl" alt="" />
</div>
......@@ -72,6 +73,7 @@ export default {
imageTextGicId: '', // 选择的参数
titleName: '', //预览需要
imageUrl: '', //预览需要
mediaUrl: '',
rangeList: [],
imgUrlList: [],
materialTitle: '', // 标题
......@@ -100,6 +102,7 @@ export default {
imageTextGicId: '', // 选择的参数
rangeList: [],
imgUrlList: [],
mediaUrl: '',
materialTitle: '', // 标题
materialContent: '', // 发送内容
topFlag: false // 置顶
......@@ -107,6 +110,9 @@ export default {
};
},
methods: {
toUrl(url) {
window.open(url);
},
/**
* 关闭预览窗口
*/
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘
* @LastEditTime: 2018-10-10 14:44:45
* @LastEditTime: 2019-12-18 12:27:54
-->
<template>
<div class="template-wrap" :style="{ height: bodyHeight }">
......@@ -154,7 +154,7 @@
</div>
</div>
<!-- 日期区间 -->
<div v-if="childItem.fieldType == 5" class="flex">
<div v-if="childItem.fieldType == 5" class="flex flex-column">
<div>
<div :class="['opencard-item-title', childItem.fieldOperations.startName.length > 6 ? 'title-pre-wrap' : '']">{{ childItem.fieldOperations.startName }}</div>
<div class="draged-item-show">
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-04-12 17:56:45
* @LastEditors: 无尘
* @LastEditTime: 2019-12-17 17:36:44
* @LastEditTime: 2019-12-18 12:56:14
-->
<template>
<div class="notice-list-wrap">
......@@ -19,7 +19,7 @@
<el-checkbox :disabled="$route.query.attenceGroupId ? true : false" v-model="ruleFormData.attenceRangeType">行政架构</el-checkbox>
<div v-if="ruleFormData.attenceRangeType" class="flex-column item-cell-select inline-block m-l-10">
<div class="depart-item-wrap">
<div style="width:470px" class="el-select el-select--large depart-item-content" @click="showDialogLayer('depart', ruleFormData.adminList)">
<div style="width:470px" class="el-select el-select--large depart-item-content" @click="showDialogMust('depart', ruleFormData.adminList)">
<span class="font-14 color-c0c4cc p-l-10" v-if="!ruleFormData.adminList.length">请选择行政架构</span>
<div class="el-select__tags">
<span>
......@@ -39,7 +39,7 @@
<el-checkbox :disabled="$route.query.attenceGroupId ? true : false" v-model="ruleFormData.attenceRangeStoreType">门店架构</el-checkbox>
<div v-if="ruleFormData.attenceRangeStoreType" class="flex-column item-cell-select inline-block m-l-10">
<div class="depart-item-wrap">
<div style="width:330px" class="el-select el-select--large depart-item-content" @click="showDialogLayer('store', ruleFormData.storeList)">
<div style="width:470px" class="el-select el-select--large depart-item-content" @click="showDialogMust('store', ruleFormData.storeList)">
<span class="font-14 color-c0c4cc p-l-10" v-if="!ruleFormData.storeList.length">请选择门店架构</span>
<div class="el-select__tags">
<span>
......@@ -61,7 +61,7 @@
<el-checkbox :disabled="$route.query.attenceGroupId ? true : false" v-model="ruleFormData.noAttenceRangeType">行政架构</el-checkbox>
<div v-if="ruleFormData.noAttenceRangeType" class="flex-column item-cell-select inline-block m-l-10">
<div class="depart-item-wrap">
<div style="width:470px" class="el-select el-select--large depart-item-content" @click="showDialogLayer('depart', ruleFormData.noAdminList)">
<div style="width:470px" class="el-select el-select--large depart-item-content" @click="showDialogNo('depart', ruleFormData.noAdminList)">
<span class="font-14 color-c0c4cc p-l-10" v-if="!ruleFormData.noAdminList.length">请选择行政架构</span>
<div class="el-select__tags">
<span>
......@@ -81,7 +81,7 @@
<el-checkbox :disabled="$route.query.attenceGroupId ? true : false" v-model="ruleFormData.noAttenceRangeStoreType">门店架构</el-checkbox>
<div v-if="ruleFormData.noAttenceRangeStoreType" class="flex-column item-cell-select inline-block m-l-10">
<div class="depart-item-wrap">
<div style="width:330px" class="el-select el-select--large depart-item-content" @click="showDialogLayer('store', ruleFormData.noStoreList)">
<div style="width:470px" class="el-select el-select--large depart-item-content" @click="showDialogNo('store', ruleFormData.noStoreList)">
<span class="font-14 color-c0c4cc p-l-10" v-if="!ruleFormData.noStoreList.length">请选择门店架构</span>
<div class="el-select__tags">
<span>
......@@ -250,9 +250,15 @@
</el-form-item>
</el-form>
</div>
<vue-select-employee :appScene="appScene" :defaultSelection="defaultSelection" :onlyPerson="onlyPerson" :treeSet="treeSet" :changed="changed" @handleSelectedList="handleSelectedList"> </vue-select-employee>
<!-- 发送范围的门店选择 -->
<vue-select-store ref="storeSelector" :currentBrand="activeGroup" :appScene="appScene" :treeSet="storeTreeSet" :selectType="'group-store'" :defaultList="defaultStoreList" @handleSelectedList="handleSelectedList"> </vue-select-store>
<!-- 考勤行政架构 -->
<vue-select-employee :appScene="appScene" :defaultSelection="mustSelection" :onlyPerson="onlyPerson" :treeSet="treeSet" :changed="changed" @handleSelectedList="handleMustList"> </vue-select-employee>
<!-- 考勤门店选择 :currentBrand="activeGroup"-->
<vue-select-store ref="storeSelector" :appScene="appScene" :treeSet="storeTreeSet" :selectType="'all'" :defaultList="mustStoreList" @handleSelectedList="handleMustList"> </vue-select-store>
<!-- 白名单行政架构 -->
<vue-select-employee :appScene="appScene" :defaultSelection="noSelection" :onlyPerson="true" :treeSet="noTreeSet" :changed="changedNo" @handleSelectedList="handleNoList"> </vue-select-employee>
<!-- 白名单门店选择 :currentBrand="activeGroup"-->
<vue-select-store ref="storeSelector" :appScene="appScene" :treeSet="noStoreTreeSet" :selectType="'person'" :defaultList="noStoreList" @handleSelectedList="handleNoList"> </vue-select-store>
<el-dialog title="选择规则生效时间" :visible.sync="showEffect" width="420px" :before-close="handleClose">
<span>立即生效:今日考勤结果将按新规则重算</span>
<span slot="footer" class="dialog-footer">
......@@ -351,25 +357,43 @@ export default {
actionUrl: '/haoban-manage-web/upload-img',
datePickerBool: false,
dateValue: '',
// 行政
selectType: '',
// 考勤行政
mustType: '', // 考勤 行政、门店区分
selectNoType: '', // 白名单 行政、门店区分
treeSet: {
isSelectPerson: false, // 控制只能选部门(false)
dialogVisible: false, // 控制显示/隐藏
isSingle: false, // 是否单选
openNextBool: true // 展开下级不调用接口
},
defaultSelection: [],
mustSelection: [], // 默认行政架构
changed: '',
onlyPerson: false, // 控制只能选人(true)
// 门店选择
appScene: 2,
defaultStoreList: [], // 默认的数据
// 考勤门店选择
appScene: 1,
mustStoreList: [], // 默认的门店数据
storeTreeSet: {
isSelectPerson: true, // 控制只能选部门(false)
dialogVisible: false, // 控制显示/隐藏
isSingle: false // 是否单选
},
// 白名单
changedNo: '',
noTreeSet: {
isSelectPerson: false, // 控制只能选部门(false)
dialogVisible: false, // 控制显示/隐藏
isSingle: false, // 是否单选
openNextBool: true // 展开下级不调用接口
},
noSelection: [], // 默认行政架构
noStoreList: [], // 默认的门店数据
noStoreTreeSet: {
isSelectPerson: true, // 控制只能选部门(false)
dialogVisible: false, // 控制显示/隐藏
isSingle: false // 是否单选
},
defaultStoreBool: false,
// 是否保存的标识
saveDataBool: true,
......@@ -409,6 +433,7 @@ export default {
},
hideMapDialog(obj) {
const that = this;
/* eslint-disable */
console.log(obj);
that.mapShow = false;
if (!obj) {
......@@ -434,6 +459,7 @@ export default {
},
modClasses(index, row) {
const that = this;
/* eslint-disable*/
console.log(row);
that.modIndex = index;
that.modRow = row;
......@@ -455,7 +481,6 @@ export default {
},
handleSelectionChange(val) {
const that = this;
console.log(val);
that.multipleSelection = val;
// 设置班次
},
......@@ -483,17 +508,17 @@ export default {
})
.catch(() => {});
},
// 门店弹窗显示
showDialogLayer(type, selData) {
// 考勤门店弹窗显示
showDialogMust(type, selData) {
const that = this;
// 查看不能操作
if (that.$route.query.attenceGroupId) {
return false;
}
that.selectType = type;
that.mustType = type;
that.changed = type;
if (type === 'store') {
that.defaultStoreList = selData;
that.nustStoreList = selData;
that.storeTreeSet = {
dialogVisible: true,
isSingle: false,
......@@ -508,22 +533,65 @@ export default {
isSelectPerson: true,
openNextBool: true // 展开下级不调用接口
};
that.defaultSelection = selData;
that.nustSelection = selData;
},
// 白名单门店弹窗显示
showDialogNo(type, selData) {
const that = this;
// 查看不能操作
if (that.$route.query.attenceGroupId) {
return false;
}
that.selectNoType = type;
that.changedNo = type;
if (type === 'store') {
that.noStoreList = selData;
that.noStoreTreeSet = {
dialogVisible: true,
isSingle: false,
isSelectPerson: true,
openNextBool: true // 展开下级不调用接口
};
return;
}
that.noTreeSet = {
dialogVisible: true,
isSingle: false,
isSelectPerson: true,
openNextBool: true // 展开下级不调用接口
};
that.noSelection = selData;
},
/**
* 处理已选部门
*/
handleSelectedList(group) {
handleMustList(group) {
// type: 1:员工,2:部门,3:门店;
const that = this;
if (that.selectType === 'store') {
that.ruleFormData.storeStructor = group;
that.defaultStoreList = group;
console.log(group);
if (that.mustType === 'store') {
that.ruleFormData.storeList = group;
that.mustStoreList = group;
} else {
that.ruleFormData.adminStructor = group;
that.defaultSelection = group;
that.ruleFormData.adminList = group;
that.mustSelection = group;
}
},
/**
* 处理已选部门
*/
handleNoList(group) {
// type: 1:员工,2:部门,3:门店;
const that = this;
/* eslint-disable */
console.log(group);
if (that.selectNoType === 'store') {
that.ruleFormData.noStoreList = group;
that.noStoreList = group;
} else {
that.ruleFormData.noAdminList = group;
that.noSelection = group;
}
that.ruleFormData.sendArea = group;
},
/**
* 删除选的部门
......@@ -552,31 +620,13 @@ export default {
// 发布
sendData: _debounce(function(formName) {
const that = this;
// 发送范围
if (!that.ruleFormData.adminCheck && !that.ruleFormData.storeCheck) {
that.defaultStoreBool = true;
that.saveDataBool = false;
}
if (that.ruleFormData.adminCheck && !that.ruleFormData.adminStructor.length) {
that.defaultStoreBool = true;
that.saveDataBool = false;
}
if (that.ruleFormData.storeCheck && !that.ruleFormData.storeStructor.length) {
that.defaultStoreBool = true;
that.saveDataBool = false;
}
// 发送方式
if (that.ruleFormData.sendType == '1' && !that.dateValue) {
that.datePickerBool = true;
that.saveDataBool = false;
}
if (that.$refs.tinymceWrap.tinymceHtml != '') {
that.ruleFormData.content = that.$refs.tinymceWrap.tinymceHtml;
}
let adminStructor = [];
if (that.ruleFormData.adminCheck && that.ruleFormData.adminStructor.length) {
adminStructor = that.ruleFormData.adminStructor.map(item => {
if (that.ruleFormData.attenceRangeType && that.ruleFormData.adminList.length) {
adminStructor = that.ruleFormData.adminList.map(item => {
return {
rangeType: 1,
storeFlag: 0,
id: item.id,
name: item.name || item.label,
type: item.type
......@@ -584,35 +634,66 @@ export default {
});
}
let storeStructor = [];
if (that.ruleFormData.storeCheck && that.ruleFormData.storeStructor.length) {
storeStructor = that.ruleFormData.storeStructor.map(item => {
if (that.ruleFormData.attenceRangeStoreType && that.ruleFormData.storeList.length) {
storeStructor = that.ruleFormData.storeList.map(item => {
return {
rangeType: 1,
storeFlag: 1,
id: item.id,
name: item.name || item.label,
type: item.type
};
});
}
let noAdminStructor = [];
if (that.ruleFormData.noAttenceRangeType && that.ruleFormData.noAdminList.length) {
noAdminStructor = that.ruleFormData.noAdminList.map(item => {
return {
rangeType: 2,
storeFlag: 0,
id: item.id,
name: item.name || item.label,
type: item.type
};
});
}
let noStoreStructor = [];
if (that.ruleFormData.noAttenceRangeStoreType && that.ruleFormData.noStoreList.length) {
storeStructor = that.ruleFormData.noStoreList.map(item => {
return {
rangeType: 2,
storeFlag: 1,
id: item.id,
name: item.name || item.label,
type: item.type
};
});
}
that.ruleFormData.attenceRangeJson = [...adminStructor, ...storeStructor, ...noAdminStructor, ...noStoreStructor];
/* eslint-disabled */
console.log(that.ruleFormData);
that.$refs[formName].validate(valid => {
if (valid) {
let para = {
adminCheck: that.ruleFormData.adminCheck ? 1 : 0,
storeCheck: that.ruleFormData.storeCheck ? 1 : 0,
adminStructor: JSON.stringify(adminStructor),
storeStructor: JSON.stringify(storeStructor),
receiveType: that.ruleFormData.receiveType,
labelId: that.ruleFormData.labelId || '',
title: that.ruleFormData.title,
imgUrl: that.ruleFormData.imgUrl,
content: that.ruleFormData.content,
sendType: that.ruleFormData.sendType,
sendTime: that.dateValue,
brandId: that.brandId,
userId: that.userId,
enterpriseId: that.enterpriseId,
pageTop: that.ruleFormData.pageTop ? 1 : 0,
newSeeFlag: that.ruleFormData.newSeeFlag ? 1 : 0,
watermarkFlag: that.ruleFormData.watermarkFlag ? 1 : 0
attenceGroupId: that.ruleFormData.attenceGroupId,
attenceType: that.ruleFormData.attenceType, // 考勤组类型1固定排班2排班制3自由排班
attenceRangeType: that.ruleFormData.attenceRangeType ? 1 : 0, // 是否设置行政架构考勤名单 1是0否
attenceRangeStoreType: that.ruleFormData.attenceRangeStoreType ? 1 : 0, // 是否选择考勤范围门店结构1是0否
noAttenceRangeType: that.ruleFormData.noAttenceRangeType ? 1 : 0, // 是否设置白名单行政架构考勤名单 1是0否
noAttenceRangeStoreType: that.ruleFormData.noAttenceRangeStoreType ? 1 : 0, // 是否选择考勤范围门店结构1是0否
lawFreeFlag: that.ruleFormData.lawFreeFlag ? 1 : 0, // 是否法定节假日自动排休
clockDistance: 300, // 考勤距离
storeClockFlag: that.ruleFormData.storeClockFlag ? 1 : 0, // 是否开启门店打卡
gpsFlag: that.ruleFormData.gpsFlag ? 1 : 0, // 是否gps打卡1是0否
distanceAddress: JSON.stringify(that.ruleFormData.distanceAddress), // 考勤地址范围集合{ address: '', longitude: '', latitude: '' }
attenceRangeJson: JSON.stringify(that.ruleFormData.attenceRangeJson),
// 需要打卡的范围1需要打卡的2无须打卡的 storeFlag 1门店架构0行政架构{ rangeType: '', userId: '', storeId: '', groupId: '', storeFlag: '' }
sperialRangeJson: [{ attenceDate: '', sperialType: '' }],
//特殊考勤日期sperialType 1必须打卡0无须打卡
attenceWorkJson: JSON.stringify(that.ruleFormData.attenceWorkJson),
// 类型上班还是休息1上班0休息
attenceClassesRangeJSON: [],
classesJson: JSON.stringify(that.ruleFormData.classesJson)
};
if (that.saveDataBool) {
postRequest('/haoban-app-attence-web/attence-add', para).then(res => {
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-09-18 15:25:12
* @LastEditors: 无尘
* @LastEditTime: 2019-12-11 10:31:02
* @LastEditTime: 2019-12-17 20:54:07
-->
<!--
......@@ -35,7 +35,7 @@ components: {
</el-table-column>
<el-table-column prop="" label="图片">
<template slot-scope="scope">
<img class="table-img" v-for="(item, i) in scope.row.imgUrlList" :key="i + 'img'" :src="item.imgUrl" alt="" />
<img class="table-img" v-for="(item, i) in scope.row.imgList" :key="i + 'img'" :src="item.imgUrl" alt="" />
</template>
</el-table-column>
<el-table-column prop="" label="点赞数" show-overflow-tooltip>
......@@ -50,7 +50,7 @@ components: {
<div>{{ scope.row.createTime | timeStampToHms }}</div>
</template>
</el-table-column>
<el-table-column label="操作" width="219">
<el-table-column label="操作" width="219" fixed="right">
<template slot-scope="scope">
<el-button @click="toSetTop(scope.row.materialId, scope.row.topFlag)" type="text">{{ scope.row.topFlag == 1 ? '取消置顶' : '置顶' }}</el-button>
<el-button type="text" size="small" @click="showDetail(scope.$index, scope.row)">查看</el-button>
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-09-18 15:25:12
* @LastEditors: 无尘
* @LastEditTime: 2019-12-11 10:30:49
* @LastEditTime: 2019-12-17 20:53:03
-->
<!--
......@@ -37,7 +37,7 @@ components: {
<template slot-scope="scope">
<div class="flex">
<div class="img-wrap border-box flex flex-align-center flex-pack-center">
<img v-if="scope.row.imageTextUrl" :src="scope.row.imageTextUrl" alt="" />
<img v-if="scope.row.mainUrl" :src="scope.row.mainUrl" alt="" />
</div>
<div class="article-title font-14 color-606266 p-l-10">
{{ scope.row.imageTextTitle }}
......@@ -413,7 +413,11 @@ export default {
.img-wrap {
width: 40px;
height: 40px;
margin-right: 10px;
// margin-right: 10px;
img {
max-width: 40px;
max-height: 40px;
}
}
.el-button--primary.is-plain {
color: #1890ff;
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-09-18 15:25:12
* @LastEditors: 无尘
* @LastEditTime: 2019-12-12 18:06:07
* @LastEditTime: 2019-12-17 20:48:15
-->
<!--
......@@ -271,12 +271,13 @@ export default {
* 预览
*/
showPreviewDetail(row) {
const that = this;
that.materialPreviewData = {
window.open(row.mediaUrl);
/* that.materialPreviewData = {
materialTitle: row.titleName, // 标题
materialContent: row.mediaUrl // 发送内容
materialContent: row.mediaUrl, // 发送内容
mediaUrl: row.mediaUrl
};
that.previewVisible = true;
that.previewVisible = true; */
},
/**
......@@ -359,6 +360,7 @@ export default {
if (ele.imageTextWechatId == that.formData.imageTextWechatId) {
that.formData.imageUrl = ele.imageUrl;
that.formData.titleName = ele.titleName;
that.formData.mediaUrl = ele.mediaUrl;
}
});
that.materialPreviewData = that.formData;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment