FormInfo.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737
  1. <template>
  2. <div>
  3. <el-card>
  4. <template slot="header">
  5. <div
  6. class="card-title"
  7. style="display:flex;"
  8. v-if="currentTicket">
  9. <div style="display:flex;">
  10. <div class="top-title">当前票种:<b>{{ currentTicket.name || '无' }}</b></div>
  11. <span v-if="currentTicket.isSale === 0" style="color: red">(停售)</span>
  12. <div v-if="category === 'batch'" style="margin-left: 20px;">当前场次:<b>{{ currentBatchName || '无' }}</b></div>
  13. </div>
  14. <div>{{ form.playDateBegin | formatDate }} 票价:<span class="price"><b>{{ currentPrice }}</b> 元</span></div>
  15. </div>
  16. <span
  17. v-else
  18. style="color:red">请选择门票</span>
  19. </template>
  20. <el-form
  21. v-loading="loading"
  22. class="sale-form-wrap"
  23. ref="form"
  24. :model="form"
  25. :inline="true"
  26. label-width="100px">
  27. <el-form-item
  28. v-if="isTeam"
  29. verify
  30. required
  31. label="团体">
  32. <el-select
  33. filterable
  34. v-model="form.teamId">
  35. <el-option
  36. v-for="item in teamList"
  37. :key="item.id"
  38. :label="item.name"
  39. :value="item.id">
  40. </el-option>
  41. </el-select>
  42. </el-form-item>
  43. <el-form-item
  44. v-if="isTeam"
  45. label="导游">
  46. <el-select
  47. filterable
  48. v-model="form.guideId">
  49. <el-option
  50. v-for="item in guideList"
  51. :key="item.id"
  52. :label="item.name"
  53. :value="item.id">
  54. </el-option>
  55. </el-select>
  56. </el-form-item>
  57. <el-form-item
  58. verify
  59. can-be-empty
  60. label="顾客姓名"
  61. prop="buyerName">
  62. <el-input
  63. v-model="form.buyerName"></el-input>
  64. </el-form-item>
  65. <el-form-item
  66. can-be-empty
  67. :verify="verifyPhone"
  68. label="顾客电话"
  69. prop="buyerPhone">
  70. <el-input
  71. v-model="form.buyerPhone"></el-input>
  72. </el-form-item>
  73. <el-form-item
  74. label="证件类型"
  75. prop="buyerIdentifyType">
  76. <el-select
  77. :disabled="identifyLockCheckStyle"
  78. v-model="form.buyerIdentifyType"
  79. placeholder="请选择">
  80. <el-option
  81. v-for="(item, idx) in papersType"
  82. :key="`id-${idx}`"
  83. :label="item.label"
  84. :value="item.value">
  85. </el-option>
  86. </el-select>
  87. <el-checkbox
  88. style="margin-left:10px"
  89. v-model="identifyLockCheckStyle">
  90. 锁定
  91. </el-checkbox>
  92. </el-form-item>
  93. <!-- <el-form-item
  94. key="id1"
  95. :verify="form.buyerIdentifyType === 0 ? verifyId : ''"
  96. can-be-empty
  97. v-if="form.buyerIdentifyType === 0"
  98. label="证件号码"
  99. prop="buyerIdentify">
  100. <ReaderInput
  101. type="ID"
  102. @change="form.buyerName = $event.Name,Certificate=$event"
  103. @input="form.buyerIdentify = $event"
  104. v-model="form.buyerIdentify"></ReaderInput>
  105. </el-form-item> -->
  106. <el-form-item
  107. key="id2"
  108. label="证件号码"
  109. prop="buyerIdentify">
  110. <!-- <el-input v-model="form.buyerIdentify"></el-input> -->
  111. <ReaderInput
  112. type="ID"
  113. v-model="form.buyerIdentify"></ReaderInput>
  114. </el-form-item>
  115. <el-form-item
  116. v-if="Certificate.Nation"
  117. label="国家"
  118. >
  119. {{ Certificate.Nation }}
  120. </el-form-item>
  121. <el-form-item
  122. v-if="Certificate.Sex"
  123. label="性别"
  124. >
  125. {{ Certificate.Sex }}
  126. </el-form-item>
  127. <el-form-item
  128. v-if="Certificate.ValidDate"
  129. label="有效截止日期"
  130. >
  131. {{ Certificate.ValidDate }}
  132. </el-form-item>
  133. <el-form-item
  134. prop="playDateBegin"
  135. label="游玩日期">
  136. <el-date-picker
  137. :clearable="false"
  138. type="date"
  139. :editable="false"
  140. disabled
  141. :picker-options="dateOption"
  142. v-model="form.playDateBegin"
  143. >
  144. </el-date-picker>
  145. </el-form-item>
  146. <el-form-item
  147. prop="playDateEnd"
  148. label="结束日期">
  149. <el-date-picker
  150. :clearable="false"
  151. :editable="false"
  152. disabled
  153. :picker-options="dateOption"
  154. v-model="form.playDateEnd"
  155. type="date"
  156. >
  157. </el-date-picker>
  158. </el-form-item>
  159. <el-form-item
  160. verify
  161. number
  162. label="购买数量"
  163. prop="count"
  164. >
  165. <el-input-number
  166. ref="ticketCount"
  167. name="ticket-count"
  168. v-model.number="form.count"
  169. :min="1"
  170. :max="10000"
  171. :precision="0"
  172. ></el-input-number>
  173. </el-form-item>
  174. <el-form-item
  175. label="检票方式"
  176. prop="checkWay">
  177. <el-select
  178. v-model="form.checkWay"
  179. :disabled="retailLockCheckStyle">
  180. <el-option
  181. v-for="item in checkWayList"
  182. :key="item.val"
  183. :value="item.val"
  184. :label="item.name"
  185. ></el-option>
  186. </el-select>
  187. <el-checkbox
  188. style="margin-left:10px"
  189. v-model="retailLockCheckStyle">
  190. 锁定
  191. </el-checkbox>
  192. </el-form-item>
  193. <!-- v-if="form.checkWay === 3 || form.checkWay === 4" -->
  194. <el-form-item
  195. label="游客信息"
  196. >
  197. <div
  198. v-if="currentTicket"
  199. class="input-space"
  200. >
  201. <el-button
  202. type="primary"
  203. size="small"
  204. icon="el-icon-edit"
  205. @click="showTouristList"
  206. >
  207. 编辑查看
  208. </el-button>
  209. </div>
  210. </el-form-item>
  211. </el-form>
  212. <div class="btn-wrap">
  213. <el-button
  214. @click="resetForm"
  215. style="margin-right:20px">
  216. 重置表单
  217. </el-button>
  218. <el-button
  219. type="primary"
  220. @click="addToOrder">
  221. 加入订单
  222. </el-button>
  223. </div>
  224. </el-card>
  225. <!-- 游客列表 -->
  226. <TouristList
  227. :check-ticket-no="needCheckTicket"
  228. :check-face="needCheckFace"
  229. :check-id="needCheckId"
  230. :check-ic="needCheckIc"
  231. :tourist-list="touristList"
  232. :update-tourist="updateTourist"
  233. ref="touristList"></TouristList>
  234. </div>
  235. </template>
  236. <script>
  237. import { randomString } from '@/utils'
  238. import { verifyId, verifyPhone } from '@/utils/validate'
  239. import { checkWayList } from '@/assets/staticData'
  240. import { setTourist } from '@/pages/common'
  241. import TouristList from '../common/TouristList'
  242. import ReaderInput from '@/components/ReaderInput'
  243. import moment from 'moment'
  244. import { IDENTIFY_TYPES } from '@/const'
  245. import { getTeamList, getGuideList } from '@/api/checker'
  246. import { EventBus } from '@/utils/eventBus'
  247. export default {
  248. props: {
  249. currentTicket: {
  250. type: Object,
  251. default: () => null
  252. },
  253. currentBatch: {
  254. type: Object,
  255. default: () => null
  256. },
  257. orderItems: {
  258. type: Array,
  259. default: () => []
  260. }
  261. },
  262. components: {
  263. TouristList,
  264. ReaderInput
  265. },
  266. computed: {
  267. totalPrice () {
  268. if (!this.currentTicket) {
  269. return 0
  270. }
  271. return this.$NP.times(this.currentPrice, this.form.count)
  272. },
  273. scenicName () {
  274. return this.$store.state.user.scenicName
  275. },
  276. currentBatchName () {
  277. if (!this.currentTicket || !this.currentBatch) return ''
  278. const { name, startTime, endTime } = this.currentBatch
  279. return name ? `${name} ${startTime} - ${endTime}` : ''
  280. },
  281. needCheckTicket () {
  282. return this.form.checkWay === 5
  283. },
  284. needCheckId () {
  285. const { category, currentTicket } = this
  286. return category === 'member' && currentTicket.checkType.includes('idcard')
  287. },
  288. needCheckFace () {
  289. const { category, currentTicket } = this
  290. return category === 'member' && currentTicket.checkType.includes('face')
  291. },
  292. needCheckIc () {
  293. const { category, currentTicket } = this
  294. return category === 'member' && currentTicket.checkType.includes('card')
  295. }
  296. },
  297. data () {
  298. const category = this.$route.meta.category || 'ticket'
  299. const type = this.$route.meta.type
  300. console.log('category', category, type)
  301. return {
  302. category,
  303. isTeam: type === 'team',
  304. loading: false,
  305. keyControl: 2, // 键盘控制:1,2,3标识选中顺序
  306. isFocus: false, // 当前组件是否选中
  307. papersType: IDENTIFY_TYPES,
  308. checkWayList,
  309. pricePlan: [],
  310. currentPrice: 0,
  311. currentPlan: null,
  312. retailLockCheckStyle: (() => {
  313. let prefix = 'single'
  314. if (category === 'batch') prefix = 'batch'
  315. else if (category === 'member') prefix = 'member'
  316. else if (type === 'team') prefix = 'team'
  317. return !!this.$localStore.get(`${prefix}_lockCheckStyle`) || false
  318. })(),
  319. identifyLockCheckStyle: (() => {
  320. let prefix = 'single'
  321. if (category === 'batch') prefix = 'batch'
  322. else if (category === 'member') prefix = 'member'
  323. else if (type === 'team') prefix = 'team'
  324. return !!this.$localStore.get(`${prefix}_identifyLockCheckStyle`) || false
  325. })(),
  326. saleType: (() => {
  327. if (category === 'batch') return 'batch'
  328. else if (category === 'member') return 'member'
  329. else if (type === 'team') return 'team'
  330. else return 'single'
  331. })(),
  332. touristList: [{
  333. batchConfigId: randomString(),
  334. guestName: '',
  335. guestPhone: '',
  336. guestIdentify: '',
  337. guestIdentifyType: 0,
  338. ticketTypeId: 0,
  339. checkNum: 1,
  340. price: 0,
  341. seatId: 0,
  342. playDateBegin: new Date(moment().startOf('day').valueOf()),
  343. lock: false // 是否可编辑
  344. }],
  345. form: {
  346. buyerIdentify: '',
  347. buyerName: '',
  348. buyerIdentifyType: 0,
  349. buyerPhone: '',
  350. groupIndividual: 1,
  351. teamIndividual: type === 'team' ? 2 : 1,
  352. count: this.$localStore.get('initNum') === '空' ? undefined : 1,
  353. payChannel: '现金',
  354. playDateBegin: new Date(moment().startOf('day').valueOf()),
  355. playDateEnd: '',
  356. price: 0,
  357. teamId: '',
  358. guideId: '',
  359. checkWay: type === 'team' ? 2 : 1,
  360. actualMoney: 0 // 实付金额,不需要传给后台
  361. },
  362. Certificate: {
  363. },
  364. dateOption: {
  365. // 日历禁用日期
  366. disabledDate () {
  367. return false
  368. }
  369. },
  370. disablePlayDateBegin: false,
  371. teamList: [],
  372. guideList: [],
  373. ticketAutoAddMap: {}
  374. }
  375. },
  376. created () {
  377. if (this.isTeam) {
  378. getTeamList({ pageSize: -1, pageNum: 1 }).then(res => {
  379. this.teamList = res.data.records || []
  380. this.form.teamId = this.teamList.length > 0 ? this.teamList[0].id : ''
  381. })
  382. getGuideList({ pageSize: -1, pageNum: 1 }).then(res => {
  383. this.guideList = res.data.records || []
  384. })
  385. }
  386. },
  387. methods: {
  388. verifyId,
  389. verifyPhone,
  390. randomString,
  391. setFocus () {
  392. this.$refs.ticketCount.focus()
  393. this.$refs.ticketCount.select()
  394. },
  395. resetForm () {
  396. this.touristList = [{
  397. batchConfigId: randomString(),
  398. guestName: '',
  399. guestPhone: '',
  400. guestIdentify: '',
  401. guestIdentifyType: 0,
  402. lock: false // 是否可编辑
  403. }]
  404. this.$refs.form.resetFields()
  405. if (this.retailLockCheckStyle) {
  406. this.form.checkWay = this.$localStore.get(`${this.saleType}_checkWay`) || (this.isTeam ? 2 : 1)
  407. } else {
  408. this.form.checkWay = this.isTeam ? 2 : 1
  409. }
  410. this.Certificate = {}
  411. },
  412. setEndDate (val) {
  413. const { category, currentTicket } = this
  414. const { useDateType, memberUseDateType, useDays } = currentTicket
  415. if ((category === 'ticket' && useDateType === 1) || (category === 'member' && memberUseDateType === 2)) {
  416. this.form.playDateEnd = moment(val).add((useDays || 1) - 1, 'days').format('YYYY-MM-DD')
  417. }
  418. if (category === 'batch') {
  419. this.form.playDateEnd = moment(val).format('YYYY-MM-DD')
  420. }
  421. if (category === 'member' && memberUseDateType === 1) {
  422. this.form.playDateEnd = moment(val).add((useDays || 1) - 1, 'days').format('YYYY-MM-DD')
  423. }
  424. },
  425. // 更新游客列表
  426. updateTourist (data) {
  427. this.form.count = data.length
  428. this.touristList = data
  429. },
  430. // 同步游客数据与游客数
  431. syncTouristList () {
  432. let num = this.form.count - this.touristList.length
  433. setTourist(this.touristList, num)
  434. },
  435. // 显示游客弹窗
  436. showTouristList () {
  437. this.syncTouristList()
  438. this.$refs.touristList.show()
  439. },
  440. isPlayToday () {
  441. const isBefore = moment(this.form.playDateBegin).isBefore(moment().format('YYYY-MM-DD'))
  442. const isAfter = moment(this.form.playDateBegin).isAfter(moment().format('YYYY-MM-DD'))
  443. return !(isBefore || isAfter)
  444. },
  445. addToOrder (callback) {
  446. if (this.currentTicket && this.currentTicket.isSale === 0) {
  447. return this.$message.error('当前票种已停售')
  448. }
  449. if (!this.isPlayToday()) {
  450. // 期票不提示日期不是今天
  451. const isPeriodTicket = this.currentTicket && this.currentTicket.useDateType === 2
  452. if (!isPeriodTicket) {
  453. // 客户端下单的时候游玩日期不是当天,提示一下
  454. this.$message.warning('友情提示:您下单的游玩日期不是今天!')
  455. }
  456. }
  457. if (!this.currentTicket?.id) {
  458. return this.$message.error('请选择门票')
  459. }
  460. if (this.category === 'batch') {
  461. if (!this.currentBatch) {
  462. return this.$message.error('请选场次')
  463. }
  464. if (this.currentBatch.leftNums !== -1) {
  465. if (this.currentBatch.leftNums === 0) {
  466. return this.$message.error('当前场次已售罄')
  467. }
  468. if (this.currentBatch.leftNums < this.form.count) {
  469. return this.$message.error('当前场次剩余票数不足')
  470. }
  471. }
  472. }
  473. if (this.loading) return
  474. this.$refs.form.validate((valid) => {
  475. if (valid) {
  476. this.syncTouristList()
  477. const { playDateBegin, playDateEnd } = this.form
  478. const { currentBatch } = this
  479. const { id, name, checkCount, isUseDateLimit, printTemplateId, price } = this.currentTicket
  480. // const price = this.currentPrice
  481. const originalPrice = price
  482. if (this.isTeam) {
  483. if (!this.form.teamId) {
  484. this.$message.error('请选择团队')
  485. return
  486. }
  487. }
  488. if (this.form.checkWay === 3) {
  489. // 是否存在未填写的内容
  490. let blankData = this.touristList.find(item => {
  491. return !item.guestName || !item.guestIdentify
  492. })
  493. if (blankData) {
  494. this.$message.error('游客信息不完整,请编辑查看')
  495. return
  496. }
  497. }
  498. if (this.form.checkWay === 4) {
  499. // 是否存在未填写的内容
  500. let blankData = this.touristList.find(item => {
  501. return !item.face
  502. })
  503. if (blankData) {
  504. this.$message.error('游客人脸信息不完整,请编辑查看')
  505. return
  506. }
  507. }
  508. const pdb = moment(playDateBegin).format('YYYY-MM-DD')
  509. const pde = moment(playDateEnd).format('YYYY-MM-DD')
  510. let tickets = this.touristList.map(item => {
  511. return {
  512. ...item,
  513. ticketTypeId: id,
  514. checkNum: checkCount,
  515. price,
  516. originalPrice,
  517. discountPrice: 0,
  518. ticketNo: item.ticketNo,
  519. batchConfigId: currentBatch?.id || '',
  520. face: item.face,
  521. isPrepare: this.form.checkWay === 5 ? 1 : 0,
  522. pricePlanId: this.currentPlan || 0,
  523. playDateBegin: pdb,
  524. playDateEnd: pde,
  525. printTemplateId
  526. }
  527. })
  528. const ticketNum = tickets.length
  529. // 合并游玩日期相同的票种数据
  530. const existItem = this.orderItems.find(i => {
  531. let dateIsEque
  532. if (isUseDateLimit) {
  533. dateIsEque = JSON.stringify(i.playDateBegin) === JSON.stringify(pdb)
  534. } else {
  535. dateIsEque = true
  536. }
  537. // 日期对象不全等
  538. return i.id === id && dateIsEque && i.price === price
  539. })
  540. if (existItem) {
  541. Object.assign(existItem, this.form)
  542. existItem.tickets = existItem.tickets.concat(tickets)
  543. existItem.count = existItem.tickets.length
  544. existItem.total = this.$NP.plus(existItem.total, this.totalPrice)
  545. } else {
  546. this.orderItems.push({
  547. ...this.form,
  548. keyId: randomString(), // 唯一标识
  549. id, // 票种Id
  550. ticketName: name,
  551. count: ticketNum,
  552. price,
  553. originalPrice,
  554. discountPrice: 0,
  555. total: ticketNum * price,
  556. playDateBegin: pdb,
  557. currentTicket: {
  558. ...this.currentTicket,
  559. pricePlanId:
  560. this.currentPlan,
  561. price,
  562. playDateBegin: pdb,
  563. playDateEnd: pde,
  564. printTemplateId
  565. },
  566. tickets
  567. })
  568. }
  569. // 重置游客数量
  570. this.touristList = [{
  571. batchConfigId: randomString(),
  572. guestName: '',
  573. guestPhone: '',
  574. guestIdentify: '',
  575. guestIdentifyType: 0,
  576. playDateBegin: moment().format('YYYY-MM-DD'),
  577. lock: false // 是否可编辑
  578. }]
  579. this.form.count = this.$localStore.get('initNum') === '空' ? undefined : 1
  580. if (callback && typeof callback === 'function') {
  581. callback()
  582. }
  583. this.$nextTick(() => {
  584. this.$refs.form.clearValidate()
  585. })
  586. }
  587. })
  588. },
  589. setPrice (price) {
  590. this.currentPrice = price || this.currentTicket.price
  591. this.form.price = this.currentPrice
  592. },
  593. defaultPapersType () {
  594. if (process.env.VUE_APP_PROJECT === 'zql') {
  595. return 0
  596. } else if (this.$localStore.get(`${this.saleType}_identify`)) {
  597. return this.$localStore.get(`${this.saleType}_identify`)
  598. } else {
  599. return ''
  600. }
  601. }
  602. },
  603. mounted () {
  604. EventBus.$on('ticketChanged', (ticket) => {
  605. if (!ticket) return
  606. this.currentTicket = ticket
  607. setTimeout(() => {
  608. if (this.category === 'batch') return
  609. // if (!this.ticketAutoAddMap[this.currentTicket.id]) {
  610. // this.ticketAutoAddMap[this.currentTicket.id] = true
  611. // }
  612. this.addToOrder()
  613. }, 600)
  614. })
  615. if (this.retailLockCheckStyle) {
  616. this.form.checkWay = this.$localStore.get(`${this.saleType}_checkWay`) || (this.isTeam ? 2 : 1)
  617. } else {
  618. this.form.checkWay = this.isTeam ? 2 : 1
  619. }
  620. },
  621. beforeDestroy () {
  622. EventBus.$off('ticketChanged')
  623. },
  624. watch: {
  625. async currentTicket (val, oldVal) {
  626. if (!val) return
  627. await this.$nextTick()
  628. this.resetForm()
  629. const { useDateType, useDateStart, useDateEnd, useDays, memberUseDateType, playDate } = val
  630. this.disablePlayDateBegin = false
  631. switch (this.category) {
  632. case 'ticket':
  633. if (useDateType === 2) {
  634. this.form.playDateBegin = moment(useDateStart).format('YYYY-MM-DD')
  635. this.form.playDateEnd = moment(useDateEnd).format('YYYY-MM-DD')
  636. this.disablePlayDateBegin = true
  637. } else {
  638. this.form.playDateBegin = moment(playDate).format('YYYY-MM-DD')
  639. this.form.playDateEnd = moment(playDate).add((useDays || 1) - 1, 'days').format('YYYY-MM-DD')
  640. }
  641. break
  642. case 'batch':
  643. this.form.playDateBegin = moment(playDate).format('YYYY-MM-DD')
  644. this.form.playDateEnd = moment(playDate).format('YYYY-MM-DD')
  645. this.disablePlayDateBegin = true
  646. break
  647. case 'member':
  648. if (memberUseDateType === 1) {
  649. this.form.playDateBegin = moment(playDate).format('YYYY-MM-DD')
  650. this.form.playDateEnd = moment(playDate).add((useDays || 1) - 1, 'days').format('YYYY-MM-DD')
  651. } else {
  652. this.form.playDateBegin = moment(useDateStart).format('YYYY-MM-DD')
  653. this.form.playDateEnd = moment(useDateEnd).format('YYYY-MM-DD')
  654. }
  655. this.disablePlayDateBegin = true
  656. break
  657. default :
  658. break
  659. }
  660. // 设置不可选日期
  661. this.dateOption.disabledDate = (date) => {
  662. let beforeToday = moment().subtract(1, 'days').isAfter(date)
  663. let beforeStart = moment(val.useDateStart).isAfter(date)
  664. let afterEnd = moment(val.useDateEnd).isBefore(date)
  665. return beforeToday || beforeStart || afterEnd
  666. }
  667. this.timer && clearTimeout(this.timer)
  668. this.timer = setTimeout(() => {
  669. this.setPrice(this.currentTicket.price)
  670. }, 300)
  671. },
  672. retailLockCheckStyle (val) {
  673. if (val) {
  674. this.$localStore.set(`${this.saleType}_checkWay`, this.form.checkWay)
  675. }
  676. this.$localStore.set(`${this.saleType}_lockCheckStyle`, val)
  677. },
  678. identifyLockCheckStyle (val) {
  679. if (val) {
  680. this.$localStore.set(`${this.saleType}_identify`, this.form.buyerIdentifyType)
  681. }
  682. this.$localStore.set(`${this.saleType}_identifyLockCheckStyle`, val)
  683. },
  684. 'form.playDateBegin' (val) {
  685. if (val) {
  686. this.setEndDate(val)
  687. this.currentPlan = null
  688. this.$emit('changePlayDate', moment(val).format('YYYY-MM-DD'))
  689. this.timer && clearTimeout(this.timer)
  690. }
  691. }
  692. }
  693. }
  694. </script>
  695. <style lang="scss" scoped>
  696. .el-input,.el-select,.el-date-editor,.el-date-editor.el-input,.el-input-number {
  697. width: 200px;
  698. }
  699. </style>