appoint.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688
  1. <template>
  2. <div class="context">
  3. <!-- panel-->
  4. <div class="">
  5. <div class="panel">
  6. <h5>预约管理</h5>
  7. </div>
  8. <div class="timeList">
  9. <ul>
  10. <li :class="[{'active': i == choiceDate}]" v-for="(day,i) in weeks" @click="choiceTime(i)">
  11. <em>{{ day.name }}</em><span>{{ day.data }}</span>
  12. </li>
  13. </ul>
  14. </div>
  15. <el-tabs v-model="activeName" type="card">
  16. <el-tab-pane label="会员预约列表" name="second">
  17. <div class="panel-body">
  18. <div class="panel_control">
  19. <el-row :gutter="20">
  20. <el-col :span="6">
  21. <em>会员名:</em>
  22. <el-input v-model="panel.name" placeholder="请输入会员名"></el-input>
  23. </el-col>
  24. <el-col :span="6">
  25. <em>手机号:</em>
  26. <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
  27. </el-col>
  28. <el-col :span="6">
  29. <em>预约课程:</em>
  30. <el-select v-model="panel.classId">
  31. <el-option
  32. v-for="item in panel.classOptions"
  33. :key="item.value"
  34. :label="item.label"
  35. :value="item.value">
  36. </el-option>
  37. </el-select>
  38. </el-col>
  39. <el-col :span="2">
  40. <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">
  41. 查询
  42. </el-button>
  43. </el-col>
  44. &nbsp;
  45. <el-col :span="4">
  46. <el-button class="pull-right vipAddBtn" type="warning" @click="addMember(1)">本店预约</el-button>
  47. <el-button class="pull-right acrossAddBtn" type="success" @click="addMember(2)">跨店预约</el-button>
  48. </el-col>
  49. </el-row>
  50. </div>
  51. </div>
  52. <br>
  53. <div class="table">
  54. <el-table
  55. :data="tableData2"
  56. border
  57. is-horizontal-resize
  58. :default-sort="{prop: 'date', order: 'descending'}"
  59. element-loading-background="rgba(0, 0, 0, 0.8)"
  60. class=""
  61. @selection-change="handleSelectionChange" @current-change="clickChange"
  62. >
  63. >
  64. <el-table-column label="选择" width="55" fixed>
  65. <template slot-scope="scope">
  66. <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
  67. </template>
  68. </el-table-column>
  69. <el-table-column label="序号" type="index" width="50" align="center" fixed>
  70. <template scope="scope">
  71. <span>{{ (start) + scope.$index + 1 }}</span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column
  75. prop="UserName"
  76. label="会员名"
  77. fixed
  78. >
  79. </el-table-column>
  80. <el-table-column
  81. prop="Phone"
  82. label="手机号"
  83. width="160"
  84. sortable
  85. fixed
  86. >
  87. </el-table-column>
  88. <el-table-column
  89. prop="ClassName"
  90. label="预约课程"
  91. width="120"
  92. sortable
  93. >
  94. <template slot-scope="scope">
  95. <span class="lessons" :style="{ background:scope.row.ClassColor }">{{ scope.row.ClassName }}</span>
  96. </template>
  97. </el-table-column>
  98. <el-table-column
  99. prop="BeginTime"
  100. label="上课时间"
  101. :formatter="filterFmtDate"
  102. width="160"
  103. sortable
  104. >
  105. </el-table-column>
  106. <el-table-column
  107. prop="Base.CreatedAt"
  108. label="会员预约时间"
  109. width="160"
  110. :formatter="filterFmtDate"
  111. sortable
  112. >
  113. </el-table-column>
  114. <el-table-column
  115. prop="ConsumeHour"
  116. label="消耗课时"
  117. sortable
  118. >
  119. </el-table-column>
  120. <el-table-column
  121. prop="RemainHour"
  122. label="剩余课时"
  123. sortable
  124. >
  125. </el-table-column>
  126. <el-table-column
  127. prop="Status"
  128. label="预约状态"
  129. sortable
  130. >
  131. <template slot-scope="scope">
  132. <span v-if="scope.row.Status == 1" style="color: chartreuse">已预约</span>
  133. <span v-if="scope.row.Status == 2" style="color: #ccc">已取消</span>
  134. <span v-if="scope.row.Status == 3" style="color: red">预约未到</span>
  135. <span v-if="scope.row.Status == 4" style="color: #015B9E">已完成</span>
  136. </template>
  137. </el-table-column>
  138. <el-table-column
  139. prop="Status"
  140. label="操作"
  141. >
  142. <template slot-scope="scope">
  143. <el-button type="danger" size="mini" round
  144. @click="BtnOrderCancelByManager(scope.row)">取消预约
  145. </el-button>
  146. </template>
  147. </el-table-column>
  148. </el-table>
  149. <br>
  150. <el-pagination
  151. background
  152. :total="pageination.total"
  153. :page-size="pageination.pageItem"
  154. @current-change="pageChange"
  155. ></el-pagination>
  156. </div>
  157. </el-tab-pane>
  158. <el-tab-pane label="课程预约列表" name="first">
  159. <div class="table">
  160. <el-table
  161. :data="tableData"
  162. border
  163. is-horizontal-resize
  164. :default-sort="{prop: 'date', order: 'descending'}"
  165. element-loading-background="rgba(0, 0, 0, 0.8)"
  166. class=""
  167. @selection-change="handleSelectionChange" @current-change="clickChange"
  168. >
  169. <el-table-column label="序号" type="index" width="50" align="center">
  170. <template scope="scope">
  171. <span>{{ (start) + scope.$index + 1 }}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column
  175. prop="BeginTime"
  176. label="上课时间"
  177. width="160"
  178. :formatter="filterFmtDate"
  179. >
  180. </el-table-column>
  181. <el-table-column
  182. prop="ClassName"
  183. label="课程"
  184. width="110"
  185. sortable
  186. >
  187. <template slot-scope="scope">
  188. <span class="lessons" :style="{ background:scope.row.ClassColor }">{{ scope.row.ClassName }}</span>
  189. </template>
  190. </el-table-column>
  191. <el-table-column
  192. prop="Recovered"
  193. label="预约比例"
  194. width="210px"
  195. sortable
  196. >
  197. <template slot-scope="scope">
  198. <el-progress
  199. :percentage="parseInt((scope.row.OrderCount/scope.row.OrderToplimit * 100))"
  200. :format="format"
  201. ></el-progress>
  202. </template>
  203. </el-table-column>
  204. <el-table-column
  205. prop="OrderToplimit"
  206. label="预约名额"
  207. >
  208. </el-table-column>
  209. <el-table-column
  210. prop="OrderCount"
  211. label="预约人数"
  212. >
  213. </el-table-column>
  214. <el-table-column
  215. prop="ConsumeHour"
  216. label="消耗课时"
  217. >
  218. </el-table-column>
  219. <el-table-column
  220. prop="WxOrder"
  221. label="微信可约"
  222. >
  223. <template slot-scope="scope">
  224. <!-- 0:不可预约 1:可预约-->
  225. <el-switch
  226. v-model="scope.row.WxOrder"
  227. :active-value="1"
  228. :inactive-value="0"
  229. active-color="#409EFF"
  230. inactive-color="#D9D9D9"
  231. @change=changeWechat($event,scope.row)
  232. >
  233. </el-switch>
  234. </template>
  235. </el-table-column>
  236. <el-table-column
  237. prop="StdId"
  238. label="操作"
  239. width=70px
  240. >
  241. <template slot-scope="scope">
  242. <el-button type="text" @click="seeDetail(scope.row)">详情</el-button>
  243. </template>
  244. </el-table-column>
  245. </el-table>
  246. <br>
  247. <el-pagination
  248. background
  249. :total="pageination.total"
  250. :page-size="pageination.pageItem"
  251. @current-change="pageChange"
  252. ></el-pagination>
  253. </div>
  254. </el-tab-pane>
  255. </el-tabs>
  256. </div>
  257. <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
  258. <div class="dialogContent">
  259. <div class="">
  260. <el-form ref="form" :model="form" label-width="160px">
  261. <el-form-item label="当前日期" :required="true">
  262. <el-input v-model="form.displayDay" placeholder="placeholder" :disabled="true"
  263. style="width: 220px"></el-input>
  264. </el-form-item>
  265. <el-form-item label="课程" :required="true">
  266. <el-select v-model="form.stdId" filterable placeholder="请选择"
  267. @change="vipSelect(form.stdId)">
  268. <el-option
  269. v-for="item in form.stdList"
  270. :key="item.value"
  271. :label="item.label"
  272. :value="item.value">
  273. </el-option>
  274. </el-select>
  275. </el-form-item>
  276. <!-- 课程联动查询userlist by classid-->
  277. <el-form-item label="本店会员" :required="true" v-if="form.addType == 1 ">
  278. <el-select v-model="form.userId" filterable placeholder="请选择"
  279. @change="reMainSelect(form.userId)">
  280. <el-option
  281. v-for="item in form.userList"
  282. :key="item.value"
  283. :label="item.label"
  284. :value="item.value">
  285. </el-option>
  286. </el-select>
  287. </el-form-item>
  288. <el-form-item label="跨店会员" :required="true" v-if="form.addType == 2 ">
  289. <el-select v-model="form.userId" filterable placeholder="请选择"
  290. @change="reMainSelect(form.userId)">
  291. <el-option
  292. v-for="item in form.userList"
  293. :key="item.value"
  294. :label="item.label"
  295. :value="item.value">
  296. </el-option>
  297. </el-select>
  298. </el-form-item>
  299. <el-form-item label="消耗课时">
  300. <el-input v-model="form.ConsumeHour" placeholder="placeholder" :disabled="true"
  301. style="width: 220px"></el-input>
  302. </el-form-item>
  303. <el-form-item label="会员剩余课时">
  304. <el-input v-model="form.remain" placeholder="placeholder" :disabled="true"
  305. style="width: 220px"></el-input>
  306. </el-form-item>
  307. </el-form>
  308. </div>
  309. </div>
  310. <div class="dialogFooter">
  311. <el-button type="primary" size="small" @click="ConfirmOrderAddByManager"
  312. :disabeld="BtnConfirmOrderAddByManager">确定
  313. </el-button>
  314. <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
  315. </div>
  316. </el-dialog>
  317. <el-dialog title="预约会员" :visible.sync="dialogTableVisible" width="650px">
  318. <el-table :data="gridData">
  319. <el-table-column property="UserName" label="姓名" width="200"></el-table-column>
  320. <el-table-column property="Phone" label="手机"></el-table-column>
  321. </el-table>
  322. </el-dialog>
  323. </div>
  324. </template>
  325. <script>
  326. import Global from '../Global.js'
  327. import {
  328. TodayClassOrderQuery,
  329. VipUserListQuery,
  330. TodayVipOrderQuery,
  331. ClassOrderQuery,
  332. OrderAddByManager,
  333. ClassListByOrderDate,
  334. VipUserOrderQuery,
  335. OrderCancelByManager,
  336. STTDetailWxOrderEdit,
  337. testTable,
  338. testSelect,
  339. WaitingBeginClassList,
  340. ShopWxStatusEdit,
  341. ClassListQuery,
  342. ClassSimpleQuery,
  343. AcrossUserSimpleQuery,
  344. VipUserSimpleQuery
  345. } from "../api/getApiRes";
  346. let qs = require('qs');
  347. export default {
  348. data() {
  349. return {
  350. BtnConfirmOrderAddByManager: false,
  351. serachBtnStatus: false,
  352. activeName: 'second',
  353. choiceDate: 0,//默认为今天
  354. tableView: true,//其他dialog
  355. dialogVisible: false,//其他dialog
  356. dialogTableVisible: false,//其他dialog
  357. dialogMemberVisible: false,//新增教练dialog
  358. dialogLesson: false,//课时调整
  359. dialogGift: false,//赠送课时调整
  360. dialogExpTime: false,//有效期调整
  361. dialogLessonTable: false,//教练课程
  362. dialogTitle: '增加预约',
  363. current: getNowDate(),
  364. dialogValue: [],
  365. weeks: [],
  366. gridData: [],
  367. start: 0,
  368. draw: 1,
  369. // panel 配置项目
  370. panel: {
  371. name: '',
  372. phone: '',
  373. classId: '0',
  374. usercode: '',
  375. username: '',
  376. compname: '',
  377. keyword: '',
  378. USERCODE: '',
  379. endType: '',
  380. taskstatus: 99,
  381. draw: 1,
  382. start: 0,
  383. recordsTotal: 0,
  384. recordsTotal2: 0,
  385. tableData: [],
  386. allTableData: [],
  387. allTableData2: [],
  388. limit: '10',
  389. multipleSort: false,
  390. loading: false,
  391. fileList: [],
  392. multipleSelection: [],
  393. detectedmac: '',
  394. options: [
  395. {value: 99, label: '全部'},
  396. {value: 1, label: '进行中'},
  397. {value: 2, label: '已完成'},
  398. ],
  399. endTypeOptions: [
  400. {value: 99, label: '全部'},
  401. {value: 30, label: '近一个月'},
  402. {value: 7, label: '近一周'},
  403. {value: 1, label: '当日'},
  404. ],
  405. // time1: globalBt(),
  406. },
  407. multipleSelection: [],
  408. pageination: {
  409. pageItem: 100,
  410. pageoptions: pageOptions(),
  411. total: 100,
  412. pageIndex: 1,
  413. },
  414. form: {
  415. name: '',
  416. displayDay: '',
  417. userCode: '',
  418. shopId: '',
  419. stdId: 0,
  420. userId: 0,
  421. memberType: 1,
  422. lesson: 1,
  423. gift: 1,
  424. btnType: 0,//0新建,1编辑编辑
  425. memo: '',
  426. expTime: '',
  427. dialogdata: [],//穿梭待选
  428. dialogValue: [],//穿梭已选
  429. userList: [],//穿梭已选
  430. stdList: [],//穿梭已选
  431. remain: 0,
  432. ConsumeHour: 0,
  433. addType: 0
  434. },
  435. memberTypes: [
  436. {value: 1, label: '年教练'},
  437. {value: 2, label: '充值教练'},
  438. ],
  439. tableData: [],
  440. tableData2: [],
  441. tableRadio: [],
  442. }
  443. },
  444. mounted() {
  445. if (this.$route.query.page == 'second') {
  446. this.panel.name = this.$route.query.name;
  447. this.activeName = 'second'
  448. } else {
  449. this.activeName = 'second'
  450. }
  451. this.ClassSelect();
  452. this.panelSelect();
  453. // this.getCurrWeekDays();
  454. this.getFurtherDays();
  455. },
  456. methods: {
  457. clickChange(item) {
  458. this.tableRadio = item
  459. },
  460. // .课程表详情微信可预约状态修改
  461. changeWechat(e, appoint) {
  462. let that = this;
  463. let statusText = appoint.WxOrder == 0 ? "关闭" : "开启";
  464. this.$confirm('是否' + statusText + '课程预约?', '微信预约操作', {
  465. confirmButtonText: '确定',
  466. cancelButtonText: '取消',
  467. type: 'warning'
  468. }).then(() => {
  469. let param = {
  470. token: localStorage.token,
  471. stdId: appoint.StdId,
  472. wxOrder: e,
  473. };
  474. let postdata = qs.stringify(param);
  475. STTDetailWxOrderEdit(postdata).then(res => {
  476. let json = res;
  477. if (json.Code == 0) {
  478. that.$message({
  479. showClose: true,
  480. message: '预约已' + statusText + '!',
  481. type: 'success'
  482. });
  483. // table 重载
  484. that.getTableQuery();
  485. } else {
  486. // 状态返回
  487. appoint.WxOrder = e == 0 ? 1 : 0;
  488. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  489. }
  490. })
  491. }).catch(() => {
  492. this.appoint = "0";
  493. this.$message({
  494. type: 'info',
  495. message: '已取消当前操作'
  496. });
  497. });
  498. },
  499. panelSelect() {
  500. let that = this;
  501. let param = {
  502. token: localStorage.token,
  503. };
  504. let postdata = qs.stringify(param);
  505. ClassSimpleQuery(postdata).then(res => {
  506. // ClassListQuery(postdata).then(res => {
  507. let json = res;
  508. if (json.Code == 0) {
  509. if (json.Rs == null) return false;
  510. that.panel.classOptions = turnClassResToOption(json.Rs);
  511. that.panel.classOptions.unshift({value: '0', label: '全部'})
  512. } else {
  513. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  514. }
  515. })
  516. },
  517. vipSelect(stdId) {
  518. let that = this;
  519. // 筛选相同的stdid的classId
  520. that.form.stdList.map(function (item) {
  521. if (item.value == stdId) {
  522. that.form.ConsumeHour = item.ConsumeHour;
  523. let param = {
  524. token: localStorage.token,
  525. // classId: item.classId
  526. };
  527. let postdata = qs.stringify(param);
  528. // VipUserListQuery
  529. // 本店会员添加时
  530. if (that.form.addType == 1) {
  531. VipUserSimpleQuery(postdata).then(res => {
  532. let json = res;
  533. if (json.Code == 0) {
  534. that.form.userId = '';
  535. that.form.userList = turnResToOptionBySimViper(json.Rs);
  536. } else {
  537. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  538. }
  539. })
  540. }
  541. // 跨店会员添加时
  542. if (that.form.addType == 2) {
  543. AcrossUserSimpleQuery(postdata).then(res => {
  544. let json = res;
  545. if (json.Code == 0) {
  546. that.form.userId = '';
  547. that.form.userList = turnResToOptionBySimViper(json.Rs);
  548. } else {
  549. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  550. }
  551. })
  552. }
  553. }
  554. })
  555. },
  556. reMainSelect(userId) {
  557. let that = this;
  558. this.form.userList.filter((v) => {
  559. if (v.key == userId) {
  560. that.form.remain = v.RemainHour;
  561. }
  562. })
  563. },
  564. ClassSelect() {
  565. let that = this;
  566. let param = {
  567. token: localStorage.token,
  568. start: 1,//
  569. tableMax: 9999,//
  570. };
  571. let postdata = qs.stringify(param);
  572. WaitingBeginClassList(postdata).then(res => {
  573. let json = res;
  574. if (json.Code == 0) {
  575. that.form.stdList = turnStdToOption(json.Rs);
  576. } else {
  577. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  578. }
  579. })
  580. },
  581. ConfirmOrderAddByManager() {
  582. let that = this;
  583. that.BtnConfirmOrderAddByManager = true;
  584. let param = {
  585. token: localStorage.token,
  586. stdId: this.form.stdId,
  587. userId: this.form.userId,
  588. };
  589. let postdata = qs.stringify(param);
  590. OrderAddByManager(postdata).then(res => {
  591. let json = res;
  592. that.BtnConfirmOrderAddByManager = false;
  593. if (json.Code == 0) {
  594. that.$message({
  595. showClose: true,
  596. message: '预约添加成功!',
  597. type: 'success'
  598. });
  599. this.getTableQuery2();
  600. that.dialogMemberVisible = false;
  601. } else {
  602. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  603. }
  604. })
  605. },
  606. // 选择日期
  607. choiceTime(i) {
  608. this.choiceDate = parseInt(i);
  609. // 读取当前页
  610. if (this.activeName == 'first') {
  611. this.getTableQuery();
  612. } else {
  613. // second
  614. this.getTableQuery2();
  615. }
  616. },
  617. seeDetail(row) {
  618. let that = this;
  619. let dayIndex = parseInt(this.choiceDate);
  620. let param = {
  621. token: localStorage.token,
  622. classId: row.ClassId,
  623. orderDate: this.weeks[dayIndex].orderDate,
  624. stdId: row.StdId,
  625. };
  626. let postdata = qs.stringify(param);
  627. VipUserOrderQuery(postdata).then(res => {
  628. let json = res;
  629. if (json.Code == 0) {
  630. this.dialogTableVisible = true;
  631. this.gridData = json.Rs;
  632. console.log(123);
  633. } else {
  634. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  635. }
  636. })
  637. },
  638. format(percentage) {
  639. return percentage === 100 ? '已满' : `${percentage}%`;
  640. },
  641. // 编辑
  642. BtnOrderCancelByManager(row) {
  643. let that = this;
  644. this.$confirm('是否取消用户 ' + row.UserName + ' 的预约?', '取消预约', {
  645. confirmButtonText: '确定',
  646. cancelButtonText: '取消',
  647. type: 'warning'
  648. }).then(() => {
  649. let param = {
  650. token: localStorage.token,
  651. orderId: row.OrderId,
  652. };
  653. let postdata = qs.stringify(param);
  654. OrderCancelByManager(postdata).then(res => {
  655. let json = res;
  656. if (json.Code == 0) {
  657. that.$message({
  658. showClose: true,
  659. message: row.UserName + '取消预约成功!',
  660. type: 'success'
  661. });
  662. // table 重载
  663. that.getTableQuery2();
  664. } else {
  665. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  666. }
  667. })
  668. }).catch(() => {
  669. this.$message({
  670. type: 'info',
  671. message: '已取消操作'
  672. });
  673. });
  674. },
  675. // 禁用
  676. pauseRow(row) {
  677. let that = this;
  678. this.$confirm('是否禁用用户' + row.name + '?', '禁用操作', {
  679. confirmButtonText: '确定',
  680. cancelButtonText: '取消',
  681. type: 'warning'
  682. }).then(() => {
  683. let param = {
  684. token: localStorage.token,
  685. Id: row.Id,
  686. status: 0,
  687. };
  688. let postdata = qs.stringify(param);
  689. testTable(postdata).then(res => {
  690. let json = res;
  691. if (json.Code == 0) {
  692. that.$message({
  693. showClose: true,
  694. message: row.name + '禁用成功!',
  695. type: 'success'
  696. });
  697. // table 重载
  698. that.getTableQuery();
  699. } else {
  700. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  701. }
  702. })
  703. }).catch(() => {
  704. this.$message({
  705. type: 'info',
  706. message: '已取消禁用'
  707. });
  708. });
  709. },
  710. // 启用
  711. runRow(row) {
  712. let that = this;
  713. this.$confirm('是否启用用户' + row.name + '?', '启用操作', {
  714. confirmButtonText: '确定',
  715. cancelButtonText: '取消',
  716. type: 'warning'
  717. }).then(() => {
  718. let param = {
  719. token: localStorage.token,
  720. Id: row.Id,
  721. status: 1,
  722. };
  723. let postdata = qs.stringify(param);
  724. testTable(postdata).then(res => {
  725. let json = res;
  726. if (json.Code == 0) {
  727. that.$message({
  728. showClose: true,
  729. message: row.name + '启用成功!',
  730. type: 'success'
  731. });
  732. // table 重载
  733. that.getTableQuery();
  734. } else {
  735. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  736. }
  737. })
  738. }).catch(() => {
  739. this.$message({
  740. type: 'info',
  741. message: '已取消启用'
  742. });
  743. });
  744. },
  745. // 关闭所有
  746. allDialogClose() {
  747. this.dialogVisible = false;
  748. this.dialogGift = false;
  749. this.dialogLesson = false;
  750. this.dialogExpTime = false;
  751. this.dialogLessonTable = false;
  752. },
  753. // 用户禁用 todo
  754. // 用户启用 todo
  755. // 有效期调整
  756. ExpTimeChange() {
  757. // 仅针对年费用户,使用日期格式
  758. this.allDialogClose();
  759. if (!this.multipleSelection.length) {
  760. this.$message({
  761. showClose: true,
  762. message: '错了哦,需要先选中至少一条记录',
  763. type: 'error'
  764. });
  765. return false
  766. }
  767. if (this.multipleSelection.length != 1) {
  768. this.$message({
  769. showClose: true,
  770. message: '错了哦,只能选中一条记录',
  771. type: 'error'
  772. });
  773. return false
  774. }
  775. let row = this.tableRadio;
  776. if (parseInt(row.vipType) == 2) {
  777. this.$message({
  778. showClose: true,
  779. message: '错了哦,充值教练不能调整有效期',
  780. type: 'error'
  781. });
  782. return false
  783. }
  784. this.form.expTime = row.expTime;
  785. this.form.rowName = row.name;
  786. this.dialogVisible = true;
  787. this.dialogExpTime = true;
  788. },
  789. // 课时调整
  790. lessonChange() {
  791. this.allDialogClose();
  792. if (!this.multipleSelection.length) {
  793. this.$message({
  794. showClose: true,
  795. message: '错了哦,需要先选中至少一条记录',
  796. type: 'error'
  797. });
  798. return false
  799. }
  800. if (this.multipleSelection.length != 1) {
  801. this.$message({
  802. showClose: true,
  803. message: '错了哦,只能选中一条记录',
  804. type: 'error'
  805. });
  806. return false
  807. }
  808. let row = this.tableRadio;
  809. this.form.lesson = row.Recovered;
  810. this.form.rowName = row.name;
  811. this.dialogVisible = true;
  812. this.dialogLesson = true;
  813. },
  814. // 赠送调整
  815. giftChange() {
  816. this.allDialogClose();
  817. if (!this.multipleSelection.length) {
  818. this.$message({
  819. showClose: true,
  820. message: '错了哦,需要先选中至少一条记录',
  821. type: 'error'
  822. });
  823. return false
  824. }
  825. if (this.multipleSelection.length != 1) {
  826. this.$message({
  827. showClose: true,
  828. message: '错了哦,只能选中一条记录',
  829. type: 'error'
  830. });
  831. return false
  832. }
  833. let row = this.tableRadio;
  834. this.form.gift = row.Recovered;
  835. this.form.rowName = row.name;
  836. this.dialogVisible = true;
  837. this.dialogGift = true;
  838. },
  839. // 增删教练课程
  840. lessonStudenChange() {
  841. this.allDialogClose();
  842. if (!this.multipleSelection.length) {
  843. this.$message({
  844. showClose: true,
  845. message: '错了哦,需要先选中至少一条记录',
  846. type: 'error'
  847. });
  848. return false
  849. }
  850. if (this.multipleSelection.length != 1) {
  851. this.$message({
  852. showClose: true,
  853. message: '错了哦,只能选中一条记录',
  854. type: 'error'
  855. });
  856. return false
  857. }
  858. let row = this.tableRadio;
  859. this.form.gift = row.Recovered;
  860. this.form.rowName = row.name;
  861. this.dialogVisible = true;
  862. this.dialogLessonTable = true;
  863. },
  864. // 确认提交新增教练
  865. confirmMember() {
  866. let that = this;
  867. // checkNum
  868. if (!that.form.userCode) {
  869. this.$message.error('错了哦,手机号不能为空');
  870. return false
  871. }
  872. if (!globalCheckPhone(that.form.userCode)) {
  873. this.$message.error('错了哦,手机号格式不正确');
  874. return false
  875. }
  876. if (!that.form.name) {
  877. this.$message.error('错了哦,教练名不能为空');
  878. return false
  879. }
  880. if (that.form.name.length > 8) {
  881. this.$message.error('错了哦,教练名字数超过8个字');
  882. return false
  883. }
  884. if (that.form.memo) {
  885. if (that.form.memo.length > 200) {
  886. this.$message.error('错了哦,备注字数超过200个字');
  887. return false
  888. }
  889. }
  890. let param = {
  891. token: localStorage.token,
  892. userCode: that.form.userCode,
  893. name: that.form.name,
  894. memberType: that.form.memberType,
  895. lesson: that.form.lesson,
  896. gift: that.form.gift,
  897. memo: that.form.memo,
  898. dialogValue: that.form.dialogValue,
  899. };
  900. let postdata = qs.stringify(param);
  901. testSelect(postdata).then(res => {
  902. let json = res;
  903. if (json.Code == 0) {
  904. // 关闭弹窗
  905. that.dialogMemberVisible = false;
  906. // 重载列表
  907. that.getTableQuery();
  908. that.$message({
  909. showClose: true,
  910. message: '教练添加成功!',
  911. type: 'success'
  912. });
  913. } else {
  914. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  915. }
  916. })
  917. },
  918. confirmEditMember() {
  919. let that = this;
  920. // checkNum
  921. if (!that.form.userCode) {
  922. this.$message.error('错了哦,手机号不能为空');
  923. return false
  924. }
  925. console.log(that.form.userCode);
  926. if (!globalCheckPhone(that.form.userCode)) {
  927. this.$message.error('错了哦,手机号格式不正确');
  928. return false
  929. }
  930. if (!that.form.name) {
  931. this.$message.error('错了哦,教练名不能为空');
  932. return false
  933. }
  934. if (that.form.name.length > 8) {
  935. this.$message.error('错了哦,教练名字数超过8个字');
  936. return false
  937. }
  938. if (that.form.memo) {
  939. if (that.form.memo.length > 200) {
  940. this.$message.error('错了哦,备注字数超过200个字');
  941. return false
  942. }
  943. }
  944. let param = {
  945. token: localStorage.token,
  946. userCode: that.form.userCode,
  947. name: that.form.name,
  948. memberType: that.form.memberType,
  949. lesson: that.form.lesson,
  950. gift: that.form.gift,
  951. memo: that.form.memo,
  952. dialogValue: that.form.dialogValue,
  953. };
  954. let postdata = qs.stringify(param);
  955. testSelect(postdata).then(res => {
  956. let json = res;
  957. if (json.Code == 0) {
  958. // 关闭弹窗
  959. that.dialogMemberVisible = false;
  960. // 重载列表
  961. that.getTableQuery();
  962. that.$message({
  963. showClose: true,
  964. message: '教练信息编辑成功!',
  965. type: 'success'
  966. });
  967. } else {
  968. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  969. }
  970. })
  971. },
  972. // 确认提交课时
  973. confirmLesson() {
  974. let that = this;
  975. // checkNum
  976. let param = {
  977. token: localStorage.token,
  978. userCode: that.form.userCode,
  979. lesson: that.form.lesson,
  980. };
  981. let postdata = qs.stringify(param);
  982. testSelect(postdata).then(res => {
  983. let json = res;
  984. if (json.Code == 0) {
  985. // 关闭弹窗
  986. that.dialogVisible = false;
  987. // 重载列表
  988. that.getTableQuery();
  989. that.$message({
  990. showClose: true,
  991. message: '课时调整成功!',
  992. type: 'success'
  993. });
  994. } else {
  995. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  996. }
  997. })
  998. },
  999. // 确认提交赠送
  1000. confirmGift() {
  1001. let that = this;
  1002. // checkNum
  1003. let param = {
  1004. token: localStorage.token,
  1005. userCode: that.form.userCode,
  1006. gift: that.form.gift,
  1007. };
  1008. let postdata = qs.stringify(param);
  1009. testSelect(postdata).then(res => {
  1010. let json = res;
  1011. if (json.Code == 0) {
  1012. // 关闭弹窗
  1013. that.dialogVisible = false;
  1014. // 重载列表
  1015. that.getTableQuery();
  1016. that.$message({
  1017. showClose: true,
  1018. message: '赠送课时调整成功!',
  1019. type: 'success'
  1020. });
  1021. } else {
  1022. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  1023. }
  1024. })
  1025. },
  1026. // 确认提交有效期
  1027. confirmExpTime() {
  1028. let that = this;
  1029. // checkNum
  1030. let param = {
  1031. token: localStorage.token,
  1032. userCode: that.form.userCode,
  1033. expTime: that.form.expTime,
  1034. };
  1035. let postdata = qs.stringify(param);
  1036. testSelect(postdata).then(res => {
  1037. let json = res;
  1038. if (json.Code == 0) {
  1039. // 关闭弹窗
  1040. that.dialogVisible = false;
  1041. // 重载列表
  1042. that.getTableQuery();
  1043. that.$message({
  1044. showClose: true,
  1045. message: '赠送课时调整成功!',
  1046. type: 'success'
  1047. });
  1048. } else {
  1049. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  1050. }
  1051. })
  1052. },
  1053. // 确认提交教练课程
  1054. confirmLessonTable() {
  1055. let that = this;
  1056. // checkNum
  1057. let param = {
  1058. token: localStorage.token,
  1059. userCode: that.form.userCode,
  1060. dialogValue: that.form.dialogValue,
  1061. };
  1062. let postdata = qs.stringify(param);
  1063. testSelect(postdata).then(res => {
  1064. let json = res;
  1065. if (json.Code == 0) {
  1066. // 关闭弹窗
  1067. that.dialogVisible = false;
  1068. // 重载列表
  1069. that.getTableQuery();
  1070. that.$message({
  1071. showClose: true,
  1072. message: '教练课程调整成功!',
  1073. type: 'success'
  1074. });
  1075. } else {
  1076. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  1077. }
  1078. })
  1079. },
  1080. // 新增预约
  1081. addMember(type) {
  1082. this.clearForm();
  1083. // 加载当前可选课程
  1084. this.getClassListByOrderDate();
  1085. this.dialogMemberVisible = true;
  1086. this.form.displayDay = this.weeks[this.choiceDate].data + ' ' + this.weeks[this.choiceDate].name;
  1087. this.btnType = 0;
  1088. this.form.ConsumeHour = 0;
  1089. this.form.addType = type
  1090. this.dialogTitle = '新增预约';
  1091. },
  1092. // 加载当前可选课程
  1093. getClassListByOrderDate() {
  1094. let that = this;
  1095. let dayIndex = parseInt(this.choiceDate);
  1096. let param = {
  1097. token: localStorage.token,
  1098. orderDate: this.weeks[dayIndex].orderDate,
  1099. };
  1100. let postdata = qs.stringify(param);
  1101. ClassListByOrderDate(postdata).then(res => {
  1102. let json = res;
  1103. if (json.Code == 0) {
  1104. that.form.stdList = turnStdToOption(json.Rs);
  1105. } else {
  1106. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  1107. }
  1108. })
  1109. },
  1110. // 删除
  1111. delList() {
  1112. let that = this;
  1113. // checkNum
  1114. if (!this.multipleSelection.length) {
  1115. that.$message({
  1116. showClose: true,
  1117. message: '错了哦,需要先选中至少一条记录',
  1118. type: 'error'
  1119. });
  1120. return false
  1121. }
  1122. if (this.multipleSelection.length != 1) {
  1123. that.$message({
  1124. showClose: true,
  1125. message: '错了哦,只能选中一条记录',
  1126. type: 'error'
  1127. });
  1128. return false
  1129. }
  1130. let detectorid = that.tableRadio.Id;
  1131. let param = {
  1132. token: localStorage.token,
  1133. detectorid: detectorid,
  1134. status: 9,//0禁用1启用9删除
  1135. };
  1136. let postdata = qs.stringify(param);
  1137. this.$confirm('此操作将永久删除该教练, 是否继续?', '提示', {
  1138. confirmButtonText: '确定',
  1139. cancelButtonText: '取消',
  1140. type: 'warning'
  1141. }).then(() => {
  1142. testSelect(postdata).then(res => {
  1143. let json = res;
  1144. if (json.Code == 0) {
  1145. that.$message({
  1146. showClose: true,
  1147. message: '选中的教练已删除!',
  1148. type: 'success'
  1149. });
  1150. // 重载列表
  1151. that.getTableQuery();
  1152. } else {
  1153. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  1154. }
  1155. });
  1156. }).catch(() => {
  1157. this.$message({
  1158. type: 'info',
  1159. message: '已取消删除'
  1160. });
  1161. });
  1162. },
  1163. handleSelectionChange(val) {
  1164. this.multipleSelection = val;
  1165. },
  1166. // 查询按钮
  1167. query() {
  1168. let that = this;
  1169. that.serachBtnStatus = true;
  1170. let totalTime = 2
  1171. let clock = window.setInterval(() => {
  1172. totalTime--
  1173. if (totalTime < 0) {
  1174. totalTime = 2;
  1175. that.serachBtnStatus = false;
  1176. }
  1177. }, 1000)
  1178. this.getTableQuery2();
  1179. this.$message.success('查询完毕');
  1180. },
  1181. clearForm() {
  1182. // clear
  1183. this.form.stdId = '';
  1184. this.form.userId = '';
  1185. this.form.name = '';
  1186. this.form.userCode = '';
  1187. this.form.shopId = '';
  1188. this.form.userList = [];
  1189. },
  1190. // 页面数据查询
  1191. getTableQuery() {
  1192. let that = this;
  1193. that.loading = true;
  1194. let dayIndex = parseInt(this.choiceDate);
  1195. let param = {
  1196. token: localStorage.token,
  1197. orderDate: this.weeks[dayIndex].orderDate,
  1198. };
  1199. let postdata = qs.stringify(param);
  1200. ClassOrderQuery(postdata).then(res => {
  1201. let json = res;
  1202. if (json.Code == 0) {
  1203. that.loading = false;
  1204. if (json.Rs) {
  1205. that.allTableData = [];
  1206. that.allTableData = json.Rs;
  1207. that.recordsTotal = json.Rs.length;
  1208. } else {
  1209. that.allTableData = [];
  1210. that.recordsTotal = 0;
  1211. }
  1212. // 设置分页数据
  1213. that.setPaginations();
  1214. } else {
  1215. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  1216. }
  1217. })
  1218. },
  1219. getTableQuery2() {
  1220. let that = this;
  1221. that.loading = true;
  1222. let dayIndex = parseInt(this.choiceDate);
  1223. let param = {
  1224. token: localStorage.token,
  1225. classId: this.panel.classId,//
  1226. stdId: 0,//
  1227. name: this.panel.name,//
  1228. phone: this.panel.phone,//
  1229. orderDate: this.weeks[dayIndex].orderDate,
  1230. };
  1231. let postdata = qs.stringify(param);
  1232. VipUserOrderQuery(postdata).then(res => {
  1233. let json = res;
  1234. if (json.Code == 0) {
  1235. that.loading = false;
  1236. if (json.Rs) {
  1237. that.allTableData2 = json.Rs;
  1238. that.recordsTotal2 = json.Rs.length;
  1239. } else {
  1240. that.allTableData2 = [];
  1241. that.recordsTotal2 = 0;
  1242. }
  1243. // 设置分页数据
  1244. that.setPaginations2();
  1245. } else {
  1246. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  1247. }
  1248. })
  1249. },
  1250. // 设置分页数据
  1251. setPaginations() {
  1252. // 分页属性
  1253. let that = this;
  1254. that.pageination.total = that.recordsTotal;
  1255. // 默认分页
  1256. that.tableData = that.allTableData.filter((item, index) => {
  1257. return index < that.pageination.pageItem;
  1258. });
  1259. },
  1260. // 设置分页数据
  1261. setPaginations2() {
  1262. // 分页属性
  1263. let that = this;
  1264. that.pageination.total = that.recordsTotal2;
  1265. // 默认分页
  1266. that.tableData2 = that.allTableData2.filter((item, index) => {
  1267. return index < that.pageination.pageItem;
  1268. });
  1269. },
  1270. // 每页显示数量
  1271. handleSizeChange() {
  1272. let that = this;
  1273. that.tableData = that.allTableData.filter((item, index) => {
  1274. return index < that.pageination.pageItem;
  1275. });
  1276. that.draw = that.pageination.pageItem;
  1277. that.getTableQuery();
  1278. },
  1279. // 翻页
  1280. pageChange(pageIndex) {
  1281. let that = this;
  1282. // 获取当前页
  1283. let index = that.pageination.pageItem * (pageIndex - 1);
  1284. // 数据总数
  1285. let nums = that.pageination.pageItem * pageIndex;
  1286. // 容器
  1287. let tables = [];
  1288. for (var i = index; i < nums; i++) {
  1289. if (that.allTableData[i]) {
  1290. tables.push(that.allTableData[i])
  1291. }
  1292. this.tableData = tables;
  1293. }
  1294. that.start = index * that.draw;
  1295. // that.getTableQuery();
  1296. },
  1297. // 自动排序
  1298. sortChange(params) {
  1299. console.log(params)
  1300. },
  1301. // 过滤时间
  1302. filterFmtDate(value, row, column) {
  1303. let that = this;
  1304. return nonTfmtDate(column, 11);
  1305. },
  1306. // 过滤金额
  1307. filterMoney(value, row, column) {
  1308. let that = this;
  1309. return parseFloat(column).toFixed(2);
  1310. },
  1311. // 本周
  1312. getCurrWeekDays() {
  1313. let now = new Date();
  1314. let nowTime = now.getTime();
  1315. let day = now.getDay();
  1316. let oneDayTime = 24 * 60 * 60 * 1000;
  1317. let days = '';
  1318. let item = [];
  1319. let month = 0;
  1320. for (let i = 0; i < 7; i++) {
  1321. days = new Date(nowTime + (i - day) * oneDayTime);//显示周日
  1322. month = days.getMonth() + 1;
  1323. item = {
  1324. name: this.numberToWeek(days.getDay()),
  1325. data: month + '月' + days.getDate() + '日',
  1326. orderDate: new Date().getFullYear() + '-' + month + '-' + days.getDate()
  1327. }
  1328. this.weeks.push(item)
  1329. }
  1330. },
  1331. // 获取未来7天的
  1332. getFurtherDays() {
  1333. let now = new Date();
  1334. let nowTime = now.getTime();
  1335. let oneDayTime = 24 * 60 * 60 * 1000;
  1336. let days = '';
  1337. let item = [];
  1338. let month = 0;
  1339. let day = 0;
  1340. for (let i = 0; i < 7; i++) {
  1341. days = new Date(nowTime + (i) * oneDayTime);//显示周日
  1342. month = days.getMonth() + 1;
  1343. day = days.getDate();
  1344. month = month < 10 ? '0' + month : month;
  1345. day = day < 10 ? '0' + day : day;
  1346. item = {
  1347. name: this.numberToWeek(days.getDay()),
  1348. data: days.getMonth() + 1 + '月' + days.getDate() + '日',
  1349. orderDate: days.getFullYear() + '-' + month + '-' + day
  1350. }
  1351. this.weeks.push(item)
  1352. }
  1353. this.getTableQuery();
  1354. this.getTableQuery2();
  1355. },
  1356. numberToWeek(val) {
  1357. switch (parseInt(val)) {
  1358. case 1:
  1359. return '星期一';
  1360. break;
  1361. case 2:
  1362. return '星期二';
  1363. break;
  1364. case 3:
  1365. return '星期三';
  1366. break;
  1367. case 4:
  1368. return '星期四';
  1369. break;
  1370. case 5:
  1371. return '星期五';
  1372. break;
  1373. case 6:
  1374. return '星期六';
  1375. break;
  1376. case 0:
  1377. return '星期天';
  1378. break;
  1379. }
  1380. }
  1381. },
  1382. watch: {
  1383. $route(to) {
  1384. if (to.name == 'appoint') {
  1385. this.panelSelect();
  1386. if (this.$route.query.page == 'second') {
  1387. this.activeName = 'second';
  1388. this.panel.name = this.$route.query.name;
  1389. // second
  1390. this.getTableQuery2();
  1391. }
  1392. }
  1393. },
  1394. activeName(val) {
  1395. // 重置一次选择
  1396. this.tableRadio = [];
  1397. if (val == 'first') {
  1398. this.getTableQuery();
  1399. } else {
  1400. // second
  1401. this.getTableQuery2();
  1402. this.panelSelect();
  1403. }
  1404. },
  1405. }
  1406. }
  1407. </script>
  1408. <style scoped>
  1409. @import "../assets/css/panel.css";
  1410. .context {
  1411. /* height: 770px; */
  1412. overflow-y: scroll;
  1413. display: block;
  1414. margin: 0 auto;
  1415. background-color: #fff !important;
  1416. padding: 30px;
  1417. }
  1418. .panel-body {
  1419. padding: 20px;
  1420. background: #F0F2F5;
  1421. }
  1422. .change {
  1423. width: 100%;
  1424. overflow: hidden;
  1425. display: block;
  1426. margin: 0 auto;
  1427. padding-top: 10px;
  1428. padding-bottom: 10px;
  1429. }
  1430. .change button {
  1431. float: left;
  1432. }
  1433. .change button.pull-right {
  1434. float: right;
  1435. }
  1436. .dialogTitle {
  1437. width: 100%;
  1438. overflow: hidden;
  1439. display: block;
  1440. margin: 0 auto;
  1441. color: #000000;
  1442. font-size: 18px;
  1443. text-align: center;
  1444. }
  1445. .dialogTitle em {
  1446. float: none;
  1447. font-style: normal;
  1448. color: #3799FF;
  1449. margin: 0;
  1450. }
  1451. /deep/ .el-transfer-panel__item .el-checkbox__input {
  1452. left: 40px;
  1453. }
  1454. .dialogFooter {
  1455. width: 90%;
  1456. overflow: hidden;
  1457. display: block;
  1458. margin: 0 auto;
  1459. margin-top: 10px;
  1460. }
  1461. .dialogFooter button {
  1462. float: right;
  1463. margin-left: 10px;
  1464. }
  1465. .dialogContent {
  1466. width: 100%;
  1467. overflow: hidden;
  1468. display: block;
  1469. margin: 0 auto;
  1470. }
  1471. .dialogContent .pull-left {
  1472. width: 30%;
  1473. float: left;
  1474. }
  1475. .dialogContent .pull-right {
  1476. width: 70%;
  1477. float: right;
  1478. }
  1479. .current {
  1480. width: 158px;
  1481. height: 23px;
  1482. /*float: left;*/
  1483. border-radius: 250px;
  1484. text-align: center;
  1485. background: #F0F2F5;
  1486. color: #545454;
  1487. font-size: 14px;
  1488. padding: 3px 10px;
  1489. margin-left: 20px;
  1490. }
  1491. .timeList {
  1492. width: 800px;
  1493. overflow: hidden;
  1494. float: right;
  1495. position: relative;
  1496. z-index: 100;
  1497. cursor: pointer;
  1498. }
  1499. .timeList ul {
  1500. width: 100%;
  1501. overflow: hidden;
  1502. display: block;
  1503. margin: 0 auto;
  1504. list-style: none;
  1505. }
  1506. .timeList li {
  1507. width: 100px;
  1508. overflow: hidden;
  1509. list-style: none;
  1510. float: left;
  1511. margin-right: 6px;
  1512. border: 1px solid #ccc;
  1513. border-bottom: 0;
  1514. text-align: center;
  1515. height: 40px;
  1516. background: #fff;
  1517. z-index: 222;
  1518. }
  1519. em {
  1520. font-style: normal;
  1521. }
  1522. .timeList em {
  1523. width: 100%;
  1524. overflow: hidden;
  1525. display: block;
  1526. margin: 0 auto;
  1527. font-size: 14px;
  1528. text-align: center;
  1529. }
  1530. .timeList span {
  1531. width: 100%;
  1532. overflow: hidden;
  1533. display: block;
  1534. margin: 0 auto;
  1535. font-size: 12px;
  1536. text-align: center;
  1537. }
  1538. .timeList li.active {
  1539. border: 1px solid #3799FF;
  1540. border-bottom: 0;
  1541. }
  1542. .timeList li.active em {
  1543. color: #3799FF;
  1544. }
  1545. .timeList li.active span {
  1546. color: #3799FF;
  1547. }
  1548. .panel_control /deep/ .el-input {
  1549. max-width: 140px;
  1550. float: left;
  1551. }
  1552. .panel-body em {
  1553. float: left;
  1554. line-height: 40px;
  1555. margin-right: 10px;
  1556. }
  1557. .gary {
  1558. border: 1px solid #ccc;
  1559. border-bottom: 0;
  1560. color: #ccc;
  1561. }
  1562. .pull-right {
  1563. float: right;
  1564. }
  1565. .lessons {
  1566. padding: 1px 7px;
  1567. border-radius: 250px;
  1568. float: left;
  1569. color: #000;
  1570. }
  1571. /deep/ .el-progress__text {
  1572. position: relative;
  1573. top: 1px;
  1574. float: right;
  1575. line-height: 14px;
  1576. height: 16px;
  1577. }
  1578. /deep/ .el-progress-bar {
  1579. width: 190px;
  1580. float: left;
  1581. overflow: hidden;
  1582. margin-top: 5px;
  1583. }
  1584. .timeList li.active {
  1585. color: #fff;
  1586. background: #409EFF;
  1587. }
  1588. .timeList li.active span, .timeList li.active em {
  1589. color: #fff;
  1590. }
  1591. .acrossAddBtn {
  1592. margin-right: 10px;
  1593. }
  1594. /*ipad only*/
  1595. @media only screen and (max-width: 1366px) {
  1596. .panel-body em {
  1597. font-size: 12px;
  1598. }
  1599. .timeList {
  1600. width: 510px;
  1601. }
  1602. .timeList li {
  1603. width: 60px;
  1604. font-size: 12px;
  1605. }
  1606. .timeList em {
  1607. font-size: 12px;
  1608. }
  1609. .timeList span {
  1610. font-size: 12px;
  1611. }
  1612. .panel_control /deep/ .el-input {
  1613. width: 130px;
  1614. }
  1615. /deep/ .el-button--warning {
  1616. margin-bottom: 5px;
  1617. }
  1618. .acrossAddBtn {
  1619. margin-right: 0;
  1620. }
  1621. }
  1622. </style>