index.vue 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310
  1. <template>
  2. <div class="app-container app-container-scheduling" :style="{'--q-height':qHeight}">
  3. <div class="app-container-query" ref="queryFormBox">
  4. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
  5. <el-form-item v-if="queryShow.id" label="订单号">
  6. <el-input
  7. v-model="queryParams.id"
  8. placeholder="请输入订单号"
  9. clearable
  10. style="width: 240px;"
  11. @keyup.enter.native="handleQuery"
  12. />
  13. <span @click="clearQuery('id')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  14. </el-form-item>
  15. <el-form-item v-if="queryShow.teamName" label="团队名称" label-width="100px">
  16. <el-input
  17. v-model="queryParams.teamName"
  18. placeholder="请输入团队名称"
  19. clearable
  20. style="width: 240px;"
  21. @keyup.enter.native="handleQuery"
  22. />
  23. <span @click="clearQuery('teamName')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  24. </el-form-item>
  25. <el-form-item v-if="queryShow.salerPerson" label="销售员" label-width="100px">
  26. <el-input
  27. v-model="queryParams.salerPerson"
  28. placeholder="请输入销售员"
  29. clearable
  30. style="width: 240px;"
  31. @keyup.enter.native="handleQuery"
  32. />
  33. <span @click="clearQuery('salerPerson')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  34. </el-form-item>
  35. <el-form-item v-if="queryShow.teamTypeId" label="团队类型">
  36. <el-select
  37. v-model="queryParams.teamTypeId"
  38. placeholder="请选择团队类型"
  39. clearable
  40. style="width: 240px"
  41. >
  42. <el-option
  43. v-for="dict in dict.type.team_type"
  44. :key="dict.value"
  45. :label="dict.label"
  46. :value="dict.value"
  47. />
  48. </el-select>
  49. <span @click="clearQuery('teamTypeId')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  50. </el-form-item>
  51. <el-form-item v-if="queryShow.ifSuccessInvoice" label="是否成功开票" label-width="100">
  52. <el-select
  53. v-model="queryParams.ifSuccessInvoice"
  54. placeholder="请选择是否成功开票"
  55. clearable
  56. style="width: 100%"
  57. >
  58. <el-option label="否" value="0" />
  59. <el-option label="是" value="1" />
  60. </el-select>
  61. <span @click="clearQuery('ifSuccessInvoice')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  62. </el-form-item>
  63. <el-form-item v-if="queryShow.status" label="订单状态">
  64. <el-select
  65. v-model="queryParams.status"
  66. placeholder="订单状态"
  67. clearable
  68. style="width: 100%"
  69. >
  70. <el-option
  71. v-for="dict in dict.type.order_status_type"
  72. :key="dict.value"
  73. :label="dict.label"
  74. :value="dict.value"
  75. />
  76. </el-select>
  77. <span @click="clearQuery('status')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  78. </el-form-item>
  79. <el-form-item v-if="queryShow.payWay" label="支付方式">
  80. <el-select
  81. v-model="queryParams.payWay"
  82. placeholder="支付方式"
  83. clearable
  84. style="width: 100%"
  85. >
  86. <el-option
  87. v-for="dict in dict.type.pay_way_type"
  88. :key="dict.value"
  89. :label="dict.label"
  90. :value="dict.value"
  91. />
  92. </el-select>
  93. <span @click="clearQuery('payWay')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  94. </el-form-item>
  95. <el-form-item v-if="queryShow.time" label="支付时间">
  96. <el-date-picker
  97. v-model="queryParams.time"
  98. type="daterange"
  99. value-format="yyyy-MM-dd"
  100. range-separator="至"
  101. start-placeholder="开始日期"
  102. end-placeholder="结束日期">
  103. </el-date-picker>
  104. <span @click="clearQuery('time')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  105. </el-form-item>
  106. <el-form-item v-if="queryShow.paymentId" label="支付单号">
  107. <el-input
  108. v-model="queryParams.paymentId"
  109. placeholder="请输入支付单号"
  110. clearable
  111. style="width: 240px;"
  112. @keyup.enter.native="handleQuery"
  113. />
  114. <span @click="clearQuery('paymentId')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  115. </el-form-item>
  116. <!-- <el-form-item label="场次时间">
  117. <el-date-picker
  118. style="width: 230px;"
  119. v-model="queryParams.performDate"
  120. @change="pagePerformTimeListFun"
  121. type="date"
  122. value-format="yyyy-MM-dd"
  123. placeholder="选择日期">
  124. </el-date-picker>
  125. </el-form-item> -->
  126. <el-form-item v-if="queryShow.performDate" label="场次时间" label-width="70px">
  127. <el-date-picker
  128. style="width: 250px;"
  129. v-model="queryParams.performDate"
  130. @change="pagePerformTimeListFun"
  131. type="daterange"
  132. value-format="yyyy-MM-dd"
  133. range-separator="至"
  134. start-placeholder="开始日期"
  135. end-placeholder="结束日期">
  136. </el-date-picker>
  137. <span @click="clearQuery('performDate')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  138. </el-form-item>
  139. <el-form-item label="场次" v-if="!multiPerformDate && queryShow.performDate">
  140. <el-select
  141. v-model="queryParams.performTimeId"
  142. placeholder="场次"
  143. clearable
  144. style="width: 100%"
  145. >
  146. <el-option
  147. v-for="dict in pagePerformTimeList"
  148. :key="dict.id"
  149. :label="dict.timeSnapshot+'('+dict.performTimeStart+'-'+dict.performTimeEnd+')'"
  150. :value="dict.id"
  151. />
  152. </el-select>
  153. <span @click="clearQuery('performDate')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  154. </el-form-item>
  155. <el-form-item v-if="queryShow.invoiceTime" label="开票时间">
  156. <el-date-picker
  157. style="width: 230px;"
  158. v-model="queryParams.invoiceTime"
  159. type="daterange"
  160. value-format="yyyy-MM-dd"
  161. range-separator="至"
  162. start-placeholder="开始日期"
  163. end-placeholder="结束日期">
  164. </el-date-picker>
  165. <span @click="clearQuery('invoiceTime')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  166. </el-form-item>
  167. <el-form-item v-if="queryShow.refundPaymentId" label="商户退款单号" label-width="100px">
  168. <el-input
  169. v-model="queryParams.refundPaymentId"
  170. placeholder="请输入商户退款单号"
  171. clearable
  172. style="width: 240px;"
  173. @keyup.enter.native="handleQuery"
  174. />
  175. <span @click="clearQuery('refundPaymentId')" class="query_clear"><i class="el-icon-circle-close"></i></span>
  176. </el-form-item>
  177. <el-form-item>
  178. <el-dropdown @command="openQuery">
  179. <el-button size="mini" type="primary" icon="el-icon-plus"></el-button>
  180. <el-dropdown-menu slot="dropdown">
  181. <el-dropdown-item command="id">订单号</el-dropdown-item>
  182. <el-dropdown-item command="teamName">团队名称</el-dropdown-item>
  183. <el-dropdown-item command="salerPerson">销售员</el-dropdown-item>
  184. <el-dropdown-item command="teamTypeId">团队类型</el-dropdown-item>
  185. <el-dropdown-item command="ifSuccessInvoice">是否成功开票</el-dropdown-item>
  186. <el-dropdown-item command="status">订单状态</el-dropdown-item>
  187. <el-dropdown-item command="payWay">支付方式</el-dropdown-item>
  188. <el-dropdown-item command="time">支付时间</el-dropdown-item>
  189. <el-dropdown-item command="paymentId">支付单号</el-dropdown-item>
  190. <el-dropdown-item command="performDate">场次时间/场次</el-dropdown-item>
  191. <el-dropdown-item command="invoiceTime">开票时间</el-dropdown-item>
  192. <el-dropdown-item command="refundPaymentId">商户退款单号</el-dropdown-item>
  193. </el-dropdown-menu>
  194. </el-dropdown>
  195. <el-button style="margin-left: 10px;" type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  196. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  197. </el-form-item>
  198. </el-form>
  199. </div>
  200. <div class="app-container-table-box">
  201. <el-row :gutter="10" class="mb8">
  202. <el-button
  203. type="primary"
  204. size="mini"
  205. icon="el-icon-download"
  206. v-hasPermi="['groupBuyingMr:groupBuyingMr:excel']"
  207. @click="handleExport"
  208. v-loading.fullscreen.lock="handleExportLoading"
  209. element-loading-text="正在拼命生成数据中..."
  210. element-loading-spinner="el-icon-loading"
  211. element-loading-background="rgba(0, 0, 0, 0.5)"
  212. >导出excel</el-button>
  213. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  214. </el-row>
  215. <div class="app-container-table-info">
  216. <el-table ref="tables" v-loading="loading" height="100%" :data="dataList" border>
  217. <el-table-column label="序号" align="center" :fixed="fixed" type="index" width="60"></el-table-column>
  218. <el-table-column label="订单号" align="center" :fixed="fixed" prop="id" />
  219. <el-table-column label="团队名称" align="center" :fixed="fixed" prop="teamName" />
  220. <el-table-column label="团队类型" align="center" :fixed="fixed" prop="type">
  221. <template slot-scope="scope">
  222. <dict-tag :options="dict.type.team_type" :value="scope.row.teamType"/>
  223. </template>
  224. </el-table-column>
  225. <el-table-column label="联系电话" align="center" prop="teamMobile" />
  226. <el-table-column label="客户负责人" align="center" prop="teamContact" />
  227. <el-table-column label="销售员" align="center" prop="salerPerson" />
  228. <el-table-column label="剧目名称" align="center" prop="performName" />
  229. <el-table-column label="票务名称" align="center" prop="goodsName" />
  230. <el-table-column label="座位类型" align="center" prop="seatTypeName" />
  231. <el-table-column label="场次时间" align="center" prop="performDate" />
  232. <el-table-column label="场次" width="120" align="center" prop="timeSnapshot">
  233. <template slot-scope="scope">
  234. <span>{{ scope.row.timeSnapshot }} <br /> ({{ scope.row.performTimeStart + '-' + scope.row.performTimeEnd }})</span>
  235. </template>
  236. </el-table-column>
  237. <el-table-column label="团购数量" align="center" prop="quantity" />
  238. <!-- <el-table-column label="支付总额" align="center" prop="orderPrice">
  239. <template slot-scope="scope">
  240. <span>¥{{ scope.row.orderPrice }}</span>
  241. </template>
  242. </el-table-column> -->
  243. <el-table-column label="应收金额" align="center" prop="orderPrice">
  244. <template slot-scope="scope">
  245. <span>¥{{ scope.row.orderPrice }}</span>
  246. </template>
  247. </el-table-column>
  248. <el-table-column label="实收金额" align="center" prop="realPrice">
  249. <template slot-scope="scope">
  250. <span>¥{{ scope.row.realPrice }}</span>
  251. </template>
  252. </el-table-column>
  253. <el-table-column label="支付方式" align="center" prop="type">
  254. <template slot-scope="scope">
  255. <dict-tag :options="dict.type.pay_way_type" :value="scope.row.payWay"/>
  256. </template>
  257. </el-table-column>
  258. <el-table-column label="支付时间" align="center" prop="payTime" width="160" >
  259. <template slot-scope="scope">
  260. <span>{{ parseTime(scope.row.payTime) }}</span>
  261. </template>
  262. </el-table-column>
  263. <el-table-column label="支付单号" align="center" prop="paymentId" />
  264. <el-table-column label="订单状态" align="center" prop="status">
  265. <template slot-scope="scope">
  266. <dict-tag :options="dict.type.order_status_type" :value="scope.row.status"/>
  267. </template>
  268. </el-table-column>
  269. <el-table-column label="商户退款单号" align="center" prop="refundPaymentId" />
  270. <el-table-column label="已核销票数" align="center" prop="usedTotal">
  271. <template slot-scope="scope">
  272. <span>{{ scope.row.usedTotal }}</span>
  273. </template>
  274. </el-table-column>
  275. <el-table-column label="已核销金额" align="center" prop="usedPriceTotal">
  276. <template slot-scope="scope">
  277. <span>{{ scope.row.usedPriceTotal }}</span>
  278. </template>
  279. </el-table-column>
  280. <el-table-column label="退票数量" align="center" prop="refundTotal">
  281. <template slot-scope="scope">
  282. <span>{{ scope.row.refundTotal }}</span>
  283. </template>
  284. </el-table-column>
  285. <el-table-column label="退票金额" align="center" prop="refundPriceTotal">
  286. <template slot-scope="scope">
  287. <span>{{ scope.row.refundPriceTotal && scope.row.refundPriceTotal !=0 ?('-' + scope.row.refundPriceTotal) : '' }}</span>
  288. </template>
  289. </el-table-column>
  290. <el-table-column label="是否成功开票" align="center">
  291. <template slot-scope="scope">
  292. <el-tag type="danger" v-if="scope.row.ifSuccessInvoice == '0'">否</el-tag>
  293. <el-tag type="success" v-else-if="scope.row.ifSuccessInvoice == '1'">是</el-tag>
  294. </template>
  295. </el-table-column>
  296. <el-table-column label="开票时间" align="center" prop="invoiceTime">
  297. <template slot-scope="scope">
  298. <span>{{ scope.row.invoiceTime }}</span>
  299. </template>
  300. </el-table-column>
  301. <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width">
  302. <template slot-scope="scope">
  303. <el-button
  304. size="mini"
  305. type="text"
  306. @click="openDetails(scope.row,'normal')"
  307. v-hasPermi="['groupBuyingMr:groupBuyingMr:details']"
  308. >详情</el-button>
  309. <span v-hasPermi="['groupBuyingMr:groupBuyingMr:details']" style="display: inline-block;">
  310. <el-button
  311. v-if="scope.row.newOrderId"
  312. size="mini"
  313. type="text"
  314. style="margin-left: 10px;"
  315. @click="openDetails(scope.row,'new')"
  316. >新订单</el-button>
  317. </span>
  318. <span v-hasPermi="['groupBuyingMr:groupBuyingMr:details']" style="display: inline-block;">
  319. <el-button
  320. v-if="scope.row.orgOrderId"
  321. size="mini"
  322. type="text"
  323. style="margin-left: 10px;"
  324. @click="openDetails(scope.row,'old')"
  325. >原订单</el-button>
  326. </span>
  327. <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)">
  328. <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
  329. <el-dropdown-menu slot="dropdown">
  330. <!-- (scope.row.payWay == 'corporate'||scope.row.status === 0) -->
  331. <el-dropdown-item
  332. command="1"
  333. v-if="hasPermi('groupBuyingMr:groupBuyingMr:duigong') && (scope.row.status === 0)">代客下单</el-dropdown-item>
  334. <el-dropdown-item
  335. command="2"
  336. v-if="hasPermi('groupBuyingMr:groupBuyingMr:cancel') && scope.row.status == 0">关闭订单</el-dropdown-item>
  337. <el-dropdown-item
  338. command="3"
  339. v-if="hasPermi('groupBuyingMr:groupBuyingMr:print') && (scope.row.status == 3 || scope.row.status == 7)">打印小票</el-dropdown-item>
  340. <el-dropdown-item
  341. command="4"
  342. v-if="hasPermi('groupBuyingMr:groupBuyingMr:reset') && scope.row.status == 0">修改订单</el-dropdown-item>
  343. <!-- <el-dropdown-item
  344. command="5"
  345. v-if="hasPermi('groupBuyingMr:groupBuyingMr:place')"
  346. >代客下单</el-dropdown-item> -->
  347. <el-dropdown-item
  348. command="6"
  349. v-if="hasPermi('groupBuyingMr:groupBuyingMr:rebook') && scope.row.status == 3 && scope.row.allowReSubmit == 1"
  350. >改签</el-dropdown-item>
  351. </el-dropdown-menu>
  352. </el-dropdown>
  353. </template>
  354. </el-table-column>
  355. </el-table>
  356. <pagination
  357. v-show="total>0"
  358. :total="total"
  359. :page.sync="queryParams.pageNum"
  360. :limit.sync="queryParams.pageSize"
  361. @pagination="getList"
  362. />
  363. </div>
  364. </div>
  365. <!-- 详情 -->
  366. <details-dia ref="detailsDia" :dict="dict" @getList="getList"></details-dia>
  367. <!-- 重新生成订单 -->
  368. <resetOrder ref="resetOrder" :dict="dict" @getList="getList" />
  369. <el-dialog
  370. title="选择小票机"
  371. :visible.sync="dialogVisible"
  372. width="30%"
  373. :before-close="handleClose">
  374. <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
  375. <el-form-item label="小票机" prop="region">
  376. <el-select v-model="ruleForm.region" placeholder="选择小票机">
  377. <el-option :label="item.deviceName" :key="item.id" :value="item.id" v-for="(item) in printList"></el-option>
  378. </el-select>
  379. </el-form-item>
  380. </el-form>
  381. <span slot="footer" class="dialog-footer">
  382. <el-button @click="dialogVisible = false">取 消</el-button>
  383. <el-button type="primary" :loading="dialogVisibleLoading" @click="print(viewerList)">{{ dialogVisibleLoading?'打印中...':'打印' }}</el-button>
  384. </span>
  385. </el-dialog>
  386. <el-dialog
  387. title="代客下单"
  388. :visible.sync="showCorporatePay"
  389. width="50%"
  390. @close="handleCorporatePayClose"
  391. :before-close="handleCorporatePayClose">
  392. <el-form v-loading="corporatePayLoading" :model="form" :rules="corporatePayRules" ref="ruleForm1" label-width="120px" class="demo-ruleForm">
  393. <el-form-item v-if="!form.eaitType" label="支付方式" prop="payWay">
  394. <el-radio-group v-model="form.payWay">
  395. <el-radio :label="1">对公转账</el-radio>
  396. <el-radio :label="2">挂账</el-radio>
  397. <el-radio :label="3">链接支付</el-radio>
  398. <el-radio :label="4">授信支付</el-radio>
  399. <el-radio :label="5">储值余额</el-radio>
  400. </el-radio-group>
  401. </el-form-item>
  402. <el-form-item v-if="form.eaitType" label="支付方式" prop="payWay">
  403. <span>{{ getPayWayText(form.payWay) }}</span>
  404. </el-form-item>
  405. <!-- 对公转账和挂账显示原有内容 -->
  406. <template v-if="form.payWay === 1 || form.payWay === 2">
  407. <el-form-item v-if="form.payWay === 2" label="账期" prop="rePaymentTime">
  408. <el-date-picker
  409. v-model="form.rePaymentTime"
  410. type="date"
  411. value-format="yyyy-MM-dd"
  412. placeholder="选择日期">
  413. </el-date-picker>
  414. </el-form-item>
  415. <el-form-item :label="form.payWay === 1 ? '凭证上传' : '挂账类型凭证'" prop="photoList">
  416. <div style="display: flex;flex-wrap: wrap;">
  417. <div
  418. v-for="(item,index) in form.photoList"
  419. :key="index"
  420. style="width: 100px; height: 100px;margin-top: 5px; position: relative;border: 1px solid #999;border-radius: 5px;margin-right: 20px;">
  421. <el-image
  422. style="width: 100%; height: 100%"
  423. :src="item"
  424. :preview-src-list="form.photoList">
  425. </el-image>
  426. <span @click="handleRemove(index)" style="position: absolute;top: -15px;right: -15px;color: red;font-size: 24px;z-index: 999;cursor: pointer;">
  427. <i class="el-icon-error"></i>
  428. </span>
  429. </div>
  430. <div
  431. style="width: 100px; height: 100px;margin-top: 5px;"
  432. v-if="!form.photoList||form.photoList.length<15"
  433. v-loading="actionUrlLoading"
  434. element-loading-text="上传中..."
  435. element-loading-spinner="el-icon-loading"
  436. element-loading-background="rgba(0, 0, 0, 0.8)"
  437. >
  438. <el-upload
  439. class="avatar-uploader"
  440. :action="uploadObj.url"
  441. :headers="uploadObj.headers"
  442. :show-file-list="false"
  443. :before-upload="beforeAvatarUpload"
  444. :on-success="handleAvatarSuccess"
  445. :on-progress="handleAvatarProgress"
  446. :disabled="actionUrlLoading"
  447. :on-error="handleAvatarError"
  448. >
  449. <i class="el-icon-plus avatar-uploader-icon"></i>
  450. </el-upload>
  451. </div>
  452. </div>
  453. </el-form-item>
  454. </template>
  455. <!-- 授信支付显示额度信息 -->
  456. <template v-if="form.payWay === 4 && balanceInfo">
  457. <el-form-item label="剩余授信额度">
  458. <span>¥{{ balanceInfo.grantSurplus }}</span>
  459. </el-form-item>
  460. <el-form-item label="实收金额">
  461. <span>¥{{ currentOrder.realPrice }}</span>
  462. </el-form-item>
  463. </template>
  464. <!-- 储值余额支付显示余额信息 -->
  465. <template v-if="form.payWay === 5 && balanceInfo">
  466. <el-form-item label="剩余储值余额">
  467. <span>¥{{ balanceInfo.balance }}</span>
  468. </el-form-item>
  469. <el-form-item label="实收金额">
  470. <span>¥{{ currentOrder.realPrice }}</span>
  471. </el-form-item>
  472. </template>
  473. <!-- 只有对公转账和挂账显示备注 -->
  474. <el-form-item label="备注" v-if="form.payWay === 1 || form.payWay === 2">
  475. <el-input placeholder="请备注" type="textarea" maxlength="300" show-word-limit v-model="form.corporate.remark"></el-input>
  476. </el-form-item>
  477. </el-form>
  478. <span slot="footer" class="dialog-footer">
  479. <el-button @click="showCorporatePay = false">取 消</el-button>
  480. <el-button type="primary" :loading="corporatePayLoading" @click="corporatePay">{{ dialogVisibleLoading?'操作中...':'确定' }}</el-button>
  481. </span>
  482. </el-dialog>
  483. </div>
  484. </template>
  485. <script>
  486. import { getToken } from "@/utils/auth";
  487. import auth from '@/plugins/auth'
  488. import {
  489. pageList,
  490. gotoCorporatePay,
  491. downOrderListXls,
  492. teamPayOrderUrlApi,
  493. balancePay,
  494. creditPay
  495. } from '@/api/order/groupBuyingMr';
  496. import { getSelectById as getBalanceInfo } from '@/api/team/teamMr'
  497. import { orderInfoCancel } from '@/api/windowTicketSales/ticketingSales';
  498. import detailsDia from "./dialog/details.vue";
  499. import resetOrder from "./dialog/resetOrder.vue";
  500. import { printApi } from '@/api/order/orderMr'
  501. import { getSelectById } from '@/api/order/groupBuyingMr'
  502. import { pageList as getPrintListApi } from "@/api/device/pda";
  503. import { pagePerformTimeList } from "@/api/schedulingMr/schedulingMr"
  504. import { exportExcel } from '@/utils/exportexcel'
  505. import moment from "moment"
  506. const https = require('https');
  507. const axios = require('axios');
  508. export default {
  509. name: "GroupBuyingMr",
  510. dicts: ['agreement_type', 'team_type','order_status_type','pay_way_type'],
  511. components: { detailsDia, resetOrder },
  512. data() {
  513. return {
  514. qHeight: '0px',
  515. resizeObserver: null,
  516. // 遮罩层
  517. loading: true,
  518. // 选中数组
  519. ids: [],
  520. // 非单个禁用
  521. single: true,
  522. // 非多个禁用
  523. multiple: true,
  524. // 显示搜索条件
  525. showSearch: true,
  526. // 总条数
  527. total: 0,
  528. // 用户表格数据
  529. dataList: null,
  530. // 弹出层标题
  531. title: "",
  532. // 是否显示弹出层
  533. open: false,
  534. // 日期范围
  535. dateRange: [],
  536. // 查询参数
  537. queryParams: {
  538. pageNum: 1,
  539. pageSize: 10,
  540. },
  541. visibleStatus: false,
  542. newObj: {},
  543. visibleType: '',
  544. viewerList: [],
  545. printList: [],
  546. dialogVisible: false,
  547. ruleForm: {},
  548. rules: {
  549. region: [
  550. { required: true, message: '请选择打印机', trigger: ['change','blur' ]}
  551. ],
  552. },
  553. dialogVisibleLoading: false,
  554. showCorporatePay:false,
  555. form:{
  556. payOrCredit: '',
  557. orderId:'',
  558. photoList:[],
  559. corporate:{
  560. voucherUrl:'',
  561. remark:'',
  562. }
  563. },
  564. corporatePayRules: {
  565. payWay: [{ required: true, message: "请选择支付方式", trigger: ["change","blur"] }],
  566. rePaymentTime: [{ required: true, message: "请选择账期", trigger: ["change","blur"] }],
  567. photoList: [{ required: true, message: "请上传凭证", trigger: ["change","blur"] }],
  568. },
  569. uploadObj: {
  570. url: process.env.VUE_APP_UPLOAD_FILE_API + "/upload/single/minio",
  571. Headers: { Authorization: "Bearer " + getToken() },
  572. },
  573. corporatePayLoading:false,
  574. handleExportLoading: false,
  575. pagePerformTimeList: [], // 场次列表
  576. multiPerformDate:false,
  577. fixed: 'left',
  578. actionUrlLoading: false,
  579. queryShow: {
  580. id: true,
  581. teamName: true,
  582. salerPerson: false,
  583. teamTypeId: false,
  584. ifSuccessInvoice: false,
  585. payWay: false,
  586. status: false,
  587. time: false,
  588. paymentId: false,
  589. performDate: true,
  590. invoiceTime: false,
  591. refundPaymentId: false,
  592. },
  593. balanceInfo: null, // 余额信息
  594. currentOrder: null, // 当前操作的订单
  595. };
  596. },
  597. created() {
  598. this.$set(this.queryParams,'performDate',[moment().format("yyyy-MM-DD"),moment().format("yyyy-MM-DD")])
  599. this.pagePerformTimeListFun(this.queryParams.performDate)
  600. this.getList();
  601. },
  602. activated(){
  603. this.getList();
  604. },
  605. mounted() {
  606. this.resizeObserver = new ResizeObserver(entries => {
  607. for (let entry of entries) {
  608. const { width, height } = entry.contentRect;
  609. this.qHeight = height + 'px'
  610. }
  611. if(document.body.clientWidth<765) {
  612. this.fixed = false
  613. }else {
  614. this.fixed = 'left'
  615. }
  616. });
  617. this.resizeObserver.observe(this.$refs.queryFormBox);
  618. },
  619. methods: {
  620. moment,
  621. hasPermi(value){
  622. return auth.hasPermi(value)
  623. },
  624. /** 查询列表 */
  625. getList() {
  626. this.loading = true;
  627. let params = {...this.addDateRange(this.queryParams, this.dateRange)};
  628. if(params.id && params.id.length>19) {
  629. this.$message({
  630. type: 'error',
  631. message: '订单号不存在!!!'
  632. });
  633. this.loading = false
  634. return
  635. }
  636. if(params.performDate&&params.performDate.length==2){
  637. params.performDateStart = params.performDate[0];
  638. params.performDateEnd = params.performDate[1];
  639. }else {
  640. params.performDateStart = null
  641. params.performDateEnd =null
  642. }
  643. delete params.performDate;
  644. pageList(params)
  645. .then(response => {
  646. this.dataList = response.data.rows;
  647. this.total = response.data.total;
  648. this.loading = false;
  649. }).catch(()=>{
  650. this.dataList = [];
  651. this.total = 0;
  652. this.loading = false;
  653. })
  654. },
  655. // 取消按钮
  656. cancel() {
  657. this.open = false;
  658. },
  659. /** 搜索按钮操作 */
  660. handleQuery() {
  661. this.queryParams.pageNum = 1;
  662. if(this.queryParams.time){
  663. this.queryParams.beginTime = this.queryParams.time[0];
  664. this.queryParams.endTime = this.queryParams.time[1];
  665. }else{
  666. this.queryParams.beginTime = null
  667. this.queryParams.endTime = null
  668. }
  669. if(this.queryParams.invoiceTime&&this.queryParams.invoiceTime.length==2){
  670. this.queryParams.invoiceBeginTime =this.queryParams.invoiceTime[0];
  671. this.queryParams.invoiceEndTime =this.queryParams.invoiceTime[1];
  672. }else {
  673. this.queryParams.invoiceBeginTime = null
  674. this.queryParams.invoiceEndTime = null
  675. }
  676. this.getList();
  677. },
  678. /** 重置按钮操作 */
  679. resetQuery() {
  680. this.dateRange = [];
  681. this.$set(this.queryParams, 'paymentId', '');
  682. this.$set(this.queryParams, 'id', '');
  683. this.$set(this.queryParams, 'status', '');
  684. this.$set(this.queryParams, 'teamTypeId', '');
  685. this.$set(this.queryParams, 'teamName', '');
  686. this.$set(this.queryParams, 'performName', '');
  687. this.$set(this.queryParams, 'beginTime', '');
  688. this.$set(this.queryParams, 'endTime', '');
  689. this.$set(this.queryParams, 'time', '');
  690. this.$set(this.queryParams, 'performDate', '');
  691. this.$set(this.queryParams, 'performTimeId', '');
  692. this.$set(this.queryParams, 'payWay', '');
  693. this.$set(this.queryParams, 'invoiceTime', '');
  694. this.$set(this.queryParams, 'salerPerson', '');
  695. this.$set(this.queryParams, 'refundPaymentId', '');
  696. this.queryParams.pageNum = 1;
  697. this.handleQuery();
  698. },
  699. /** 详情按钮操作 */
  700. openDetails(row, type) {
  701. this.$refs["detailsDia"].openDialog("详情", row, type);
  702. },
  703. /** 修改订单按钮操作 */
  704. handleResetOpen(row, type) {
  705. /** 关闭订单 */
  706. this.$confirm("原订单以及原订单中已选择的座位将会被一并取消,确认要修改吗?", '修改订单提示', {
  707. confirmButtonText: '确定',
  708. cancelButtonText: '取消',
  709. type: 'warning'
  710. }).then(() => {
  711. orderInfoCancel({ orderId: row.id}).then((res) => {
  712. if (res.code == 200) {
  713. this.$message({
  714. type: 'success',
  715. message: '操作成功!'
  716. });
  717. this.$refs["resetOrder"].openDialog("重新生成订单", row, type);
  718. }else{
  719. this.$message({
  720. type: 'error',
  721. message: '取消失败!!!'
  722. });
  723. }
  724. });
  725. }).catch(() => {});
  726. //this.$refs["resetOrder"].openDialog("重新生成订单", row, type);
  727. },
  728. handleOpen(list=[]){
  729. if(!list||list.length==0) return
  730. let idList = []
  731. list.forEach((item,index)=>{
  732. idList.push(item.id)
  733. })
  734. this.viewerList = idList
  735. this.getPrintListApi()
  736. this.$set(this.ruleForm, 'region', '');
  737. this.$nextTick(()=>{
  738. this.$refs.ruleForm.clearValidate('region')
  739. })
  740. this.dialogVisible = true
  741. },
  742. handleClose(){
  743. this.dialogVisible = false
  744. },
  745. /** 查询打印机列表 */
  746. getPrintListApi() {
  747. getPrintListApi({deviceType:5,pageNum: 1,
  748. pageSize: 999,})
  749. .then(response => {
  750. this.printList = response.data.rows;
  751. }
  752. );
  753. },
  754. /** 选择打印机 */
  755. selectPrint(){
  756. },
  757. // 打印
  758. async print(list = []){
  759. this.$refs.ruleForm.validate(async (valid) => {
  760. if (valid) {
  761. this.dialogVisibleLoading = true
  762. try {
  763. let res = await printApi({
  764. //viewerList:list,
  765. orderId: list[0],
  766. source: 2,
  767. deviceId: this.ruleForm.region
  768. })
  769. if(res.code == 200) {
  770. let url = res.data.linkIp
  771. let printInfo = res.data.printInfo
  772. this.connectPrint(url,printInfo)
  773. }else {
  774. throw new Error(res)
  775. }
  776. } catch (error) {
  777. this.dialogVisible = false
  778. this.dialogVisibleLoading = false
  779. console.error("error=====",error)
  780. }
  781. } else {
  782. console.log('error submit!!');
  783. return false;
  784. }
  785. });
  786. },
  787. /** 连接打印机 */
  788. connectPrint(url,data){
  789. // let xhr = new XMLHttpRequest();
  790. // xhr.onreadystatechange = ()=>{
  791. // if(xhr.readyState == 4){ // 监听请求完成
  792. // if((xhr.status >=200 && xhr.status <300) || xhr.status == 304){
  793. // console.log(xhr.responseText)
  794. // this.dialogVisible = false
  795. // this.dialogVisibleLoading = false
  796. // }else{
  797. // console.log('请求失败')
  798. // this.dialogVisible = false
  799. // this.dialogVisibleLoading = false
  800. // }
  801. // }
  802. // }
  803. // xhr.open("post", url, true); // 异步请求
  804. // xhr.send(JSON.stringify(data));
  805. const ignoreSSL = axios.create({
  806. httpsAgent: new https.Agent({
  807. rejectUnauthorized: false
  808. }),
  809. withCredentials: true, // 跨域请求时发送Cookie
  810. timeout: 60000, // 请求超时
  811. headers: {
  812. "Content-Type": "application/json; charset=UTF-8;"
  813. }
  814. });
  815. ignoreSSL.post(url,
  816. { ...data }
  817. ).then(()=>{
  818. this.dialogVisible = false
  819. this.dialogVisibleLoading = false
  820. }).catch(()=>{
  821. this.dialogVisible = false
  822. this.dialogVisibleLoading = false
  823. })
  824. },
  825. async handleCorporatePay(row) {
  826. this.actionUrlLoading = false
  827. this.showCorporatePay = true
  828. this.corporatePayLoading = true
  829. this.currentOrder = row
  830. let res = await getSelectById(row.id)
  831. this.form.orderId = row.id
  832. this.$set(this.form,'photoList',[])
  833. this.form.eaitType = null
  834. // 获取余额信息
  835. try {
  836. const balanceRes = await getBalanceInfo(row.memberId)
  837. if(balanceRes.code === 200) {
  838. this.balanceInfo = balanceRes.data
  839. }
  840. } catch(err) {
  841. console.error('获取余额信息失败', err)
  842. }
  843. if(res.data.corporate && JSON.stringify(res.data.corporate) != '{}'){
  844. let urlList = res.data.corporate.voucherUrl.split(',')||[]
  845. this.form.eaitType = 1
  846. this.$set(this.form,'payWay',1)
  847. this.$set(this.form,'rePaymentTime','')
  848. this.$set(this.form,'photoList',urlList)
  849. this.$set(this.form.corporate,'remark',res.data.corporate.remark)
  850. }else if(res.data.teamCredit && JSON.stringify(res.data.teamCredit) != '{}'){
  851. this.form.eaitType = 2
  852. let urlList = res.data.teamCredit.voucherUrl.split(',')||[]
  853. this.$set(this.form,'payWay',2)
  854. this.$set(this.form,'rePaymentTime',res.data.teamCredit.repaymentTime)
  855. this.$set(this.form,'photoList',urlList)
  856. this.$set(this.form.corporate,'remark',res.data.teamCredit.remark)
  857. }else {
  858. // 移除eaitType的设置,只设置默认支付方式
  859. this.$set(this.form,'payWay',1)
  860. this.$set(this.form,'rePaymentTime','')
  861. this.$set(this.form,'photoList',[])
  862. this.$set(this.form.corporate,'remark','')
  863. }
  864. this.$nextTick(()=>{
  865. this.$refs.ruleForm1.clearValidate()
  866. })
  867. this.corporatePayLoading = false
  868. },
  869. handleCorporatePayClose(){
  870. this.$set(this.form,'photoList',[])
  871. console.log('1111');
  872. this.corporatePayLoading = false;
  873. this.showCorporatePay = false;
  874. },
  875. async corporatePay() {
  876. this.$refs['ruleForm1'].validate(async (valid) => {
  877. if (valid) {
  878. if(this.form.payWay === 1 || this.form.payWay === 2) {
  879. if(this.form.photoList.length<1){
  880. this.$message.error('请上传凭证')
  881. return
  882. }
  883. }
  884. this.corporatePayLoading = true
  885. try {
  886. let res = null
  887. // 对公转账和挂账
  888. if(this.form.payWay === 1 || this.form.payWay === 2) {
  889. const voucherUrl = this.form.photoList.map(item => item).join(",")
  890. const params = {
  891. orderId: this.form.orderId,
  892. payWay: this.form.payWay,
  893. payOrCredit: this.form.payWay,
  894. corporate: {
  895. voucherUrl,
  896. remark: this.form.corporate.remark
  897. }
  898. }
  899. if(this.form.payWay === 2) {
  900. params.rePaymentTime = this.form.rePaymentTime
  901. }
  902. res = await gotoCorporatePay(params)
  903. }
  904. // 链接支付
  905. if(this.form.payWay === 3) {
  906. this.handPlaceAnOrder(this.currentOrder)
  907. this.handleCorporatePayClose()
  908. return
  909. }
  910. // 授信支付
  911. if(this.form.payWay === 4) {
  912. if(this.balanceInfo.grantSurplus < this.currentOrder.orderPrice) {
  913. this.$message.error('授信额度不足')
  914. return
  915. }
  916. console.log('this.form',this.form);
  917. res = await creditPay({
  918. orderId: this.form.orderId
  919. })
  920. }
  921. // 储值余额支付
  922. if(this.form.payWay === 5) {
  923. if(this.balanceInfo.balance < this.currentOrder.orderPrice) {
  924. this.$message.error('储值余额不足')
  925. return
  926. }
  927. res = await balancePay({
  928. orderId: this.form.orderId
  929. })
  930. }
  931. if(res) {
  932. this.$message.success(res.msg)
  933. this.corporatePayLoading = false
  934. this.handleCorporatePayClose()
  935. this.getList()
  936. }
  937. } catch(err) {
  938. this.corporatePayLoading = false
  939. this.$message.error(err.msg || '操作失败')
  940. }
  941. }
  942. })
  943. },
  944. /**
  945. * 剧目海报上传成功
  946. * @date 2023-11-22
  947. * @param {any} res
  948. * @returns {any}
  949. */
  950. handlePhotoListSuccess(res) {
  951. if (res.code === 200) {
  952. let photo = {
  953. imageUrl: res?.data?.url,
  954. url: res?.data?.url,
  955. photoType: '2'
  956. }
  957. if(!this.form.photoList){
  958. this.form.photoList = []
  959. }
  960. // this.form.photoList.push(photo);
  961. this.$set(this.form.photoList, this.form.photoList.length, photo);
  962. }
  963. },
  964. // handleRemove(file, fileList) {
  965. // this.form.photoList.forEach((item, index) => {
  966. // if(item.uid == file.uid){
  967. // this.form.photoList.splice(index, 1)
  968. // }
  969. // })
  970. // },
  971. /**
  972. * 上传文件之前之前
  973. * @date 2023-11-22
  974. * @param {any} file
  975. * @returns {any}
  976. */
  977. // beforeAvatarUpload(file) {
  978. // const isJPG = file.type === "image/jpeg" || "image/png";
  979. // if (!isJPG) {
  980. // this.$message.error("上传头像图片只能是jpg或png格式!");
  981. // }
  982. // return isJPG;
  983. // },
  984. /**
  985. * 导出报表
  986. * @date 2022-10-24
  987. * @returns {any}
  988. */
  989. handleExport() {
  990. this.$confirm('您确定要导出当前查询的数据吗?', '提示', {
  991. confirmButtonText: '确定 ',
  992. cancelButtonText: '取消 ',
  993. type: 'warning'
  994. })
  995. .then(() => {
  996. this.handleExportLoading = true;
  997. // const { pageNum, pageSize} = this.params;
  998. let postMap = {}
  999. if(this.queryParams.time){
  1000. this.queryParams.beginTime = this.queryParams.time[0];
  1001. this.queryParams.endTime = this.queryParams.time[1];
  1002. }else{
  1003. this.queryParams.beginTime = null
  1004. this.queryParams.endTime = null
  1005. }
  1006. if(this.queryParams.performDate&&this.queryParams.performDate.length==2){
  1007. this.queryParams.performDateStart = this.queryParams.performDate[0];
  1008. this.queryParams.performDateEnd = this.queryParams.performDate[1];
  1009. }else {
  1010. this.queryParams.performDateStart = null
  1011. this.queryParams.performDateEnd =null
  1012. }
  1013. if(this.queryParams.invoiceTime&&this.queryParams.invoiceTime.length==2){
  1014. this.queryParams.invoiceBeginTime =this.queryParams.invoiceTime[0];
  1015. this.queryParams.invoiceEndTime =this.queryParams.invoiceTime[1];
  1016. }else {
  1017. this.queryParams.invoiceBeginTime = null
  1018. this.queryParams.invoiceEndTime = null
  1019. }
  1020. let params = JSON.parse(JSON.stringify(this.queryParams))
  1021. for (let key in params) {
  1022. if(key != 'pageNum' && key != 'pageSize' && key != 'time' && key != 'performDate' && key != 'invoiceTime'){
  1023. postMap[key] = params[key]
  1024. }
  1025. }
  1026. downOrderListXls(postMap)
  1027. .then((res) => {
  1028. exportExcel(res, '团购订单', '.xlsx');
  1029. this.handleExportLoading = false;
  1030. })
  1031. .catch((error) => {
  1032. console.log("error===",error)
  1033. this.handleExportLoading = false;
  1034. });
  1035. })
  1036. .catch(() => {
  1037. this.$message.info('您已取消导出!');
  1038. });
  1039. },
  1040. async pagePerformTimeListFun(value) {
  1041. try {
  1042. this.pagePerformTimeList = []
  1043. this.$set(this.queryParams,'performTimeId',null)
  1044. if(!value){
  1045. return
  1046. }
  1047. if(value.length==2&&value[0]==value[1]){
  1048. this.multiPerformDate = false
  1049. }else{
  1050. this.multiPerformDate = true
  1051. return
  1052. }
  1053. let { data,code } = await pagePerformTimeList({
  1054. performDate: value[0],
  1055. pageNum: 1,
  1056. pageSize: 999
  1057. })
  1058. this.pagePerformTimeList = [].concat(data.rows)
  1059. } catch (error) {
  1060. }
  1061. },
  1062. /** 关闭订单 */
  1063. handleCancelOrder(row) {
  1064. this.$confirm("是否关闭" + row.id + "的订单?", '提示', {
  1065. confirmButtonText: '确定',
  1066. cancelButtonText: '取消',
  1067. type: 'warning'
  1068. }).then(() => {
  1069. orderInfoCancel({ orderId: row.id}).then((res) => {
  1070. if (res.code == 200) {
  1071. this.$message({
  1072. type: 'success',
  1073. message: '操作成功!'
  1074. });
  1075. this.getList();
  1076. }
  1077. });
  1078. }).catch(() => {});
  1079. },
  1080. /** 上传图片 单张 */
  1081. handleAvatarSuccess(response, file, fileList) {
  1082. console.log("res, file",response, file, fileList)
  1083. this.actionUrlLoading = false
  1084. if(response.code == 200) {
  1085. this.form.photoList.push(response.data.url)
  1086. }
  1087. this.$refs.ruleForm1.validateField('photoList')
  1088. },
  1089. beforeAvatarUpload(file) {
  1090. const isLt2M = file.size / 1024 / 1024 <= 100;
  1091. let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
  1092. let typeList = ['png','jepg','jpg','gif']
  1093. const isJPG = typeList.includes(testmsg);
  1094. if (!isJPG) {
  1095. this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
  1096. }
  1097. if (!isLt2M) {
  1098. this.$message.error('上传图片图片大小不能超过 100MB!');
  1099. }
  1100. return isJPG && isLt2M;
  1101. },
  1102. handleAvatarProgress(){
  1103. this.actionUrlLoading = true
  1104. },
  1105. handleAvatarError() {
  1106. this.actionUrlLoading = false
  1107. },
  1108. handleRemove(index) {
  1109. this.form.photoList.splice(index,1)
  1110. this.$refs.ruleForm1.validateField('photoList')
  1111. },
  1112. /** 代课下单 */
  1113. handPlaceAnOrder(row) {
  1114. /** 关闭订单 */
  1115. this.$confirm("确认要生成该订单的支付链接吗?温馨提示:请勿随意将链接发送给陌生人", '提示', {
  1116. confirmButtonText: '生成并复制链接',
  1117. cancelButtonText: '取消',
  1118. type: 'warning'
  1119. }).then(() => {
  1120. teamPayOrderUrlApi({ orderId: row.id }).then((res) => {
  1121. if (res.code == 200) {
  1122. this.$message({
  1123. type: 'success',
  1124. message: res.msg
  1125. });
  1126. this.copyToClipboard(res.data.url)
  1127. }
  1128. });
  1129. }).catch(() => { }).finally(() => {
  1130. });
  1131. },
  1132. /** 复制内容 */
  1133. copyToClipboard(text) {
  1134. // 创建一个临时的textarea元素
  1135. const tempInput = document.createElement('textarea');
  1136. tempInput.value = text;
  1137. document.body.appendChild(tempInput);
  1138. tempInput.select();
  1139. document.execCommand('copy');
  1140. document.body.removeChild(tempInput);
  1141. },
  1142. // 更多操作触发
  1143. handleCommand(command, row) {
  1144. switch (command) {
  1145. case "1":
  1146. this.handleCorporatePay(row);
  1147. break;
  1148. case "2":
  1149. this.handleCancelOrder(row);
  1150. break;
  1151. case "3":
  1152. this.handleOpen(row);
  1153. break;
  1154. case "4":
  1155. this.handleResetOpen(row);
  1156. break;
  1157. case "5":
  1158. this.handPlaceAnOrder(row);
  1159. break;
  1160. case "6":
  1161. this.handGoRebook(row);
  1162. break;
  1163. default:
  1164. break;
  1165. }
  1166. },
  1167. handGoRebook(row) {
  1168. this.$router.push({path:'/windowTicketSales/rebook',query: { id: row.id }})
  1169. },
  1170. clearQuery(key) {
  1171. this.$set(this.queryShow,key,false)
  1172. this.$set(this.queryParams,key,'')
  1173. if(key == 'performDate') {
  1174. this.$set(this.queryParams,'performTimeId','')
  1175. }
  1176. },
  1177. openQuery(key) {
  1178. this.$set(this.queryShow,key,true)
  1179. },
  1180. getPayWayText(payWay) {
  1181. const payWayMap = {
  1182. 1: '对公转账',
  1183. 2: '挂账',
  1184. 3: '链接支付',
  1185. 4: '授信支付',
  1186. 5: '储值余额'
  1187. }
  1188. return payWayMap[payWay] || ''
  1189. },
  1190. },
  1191. beforeDestroy() {
  1192. this.resizeObserver.unobserve(this.$refs.queryFormBox);
  1193. this.resizeObserver.disconnect();
  1194. },
  1195. };
  1196. </script>
  1197. <style lang="scss" scoped>
  1198. .upload-btn {
  1199. width: 100px;
  1200. height: 100px;
  1201. background-color: #fbfdff;
  1202. border: dashed 1px #c0ccda;
  1203. border-radius: 5px;
  1204. i {
  1205. font-size: 30px;
  1206. margin-top: 20px;
  1207. }
  1208. &-text {
  1209. margin-top: -10px;
  1210. }
  1211. }
  1212. .avatar {
  1213. cursor: pointer;
  1214. }
  1215. .app-container {
  1216. height: calc( 100vh - 110px );
  1217. box-sizing: border-box;
  1218. }
  1219. .app-container-query {
  1220. }
  1221. .app-container-table-box {
  1222. height: calc( 100% - var(--q-height) );
  1223. .app-container-table-info {
  1224. height: calc( 100% - 100px );
  1225. }
  1226. }
  1227. .upload-box {
  1228. ::v-deep .el-upload--picture-card {
  1229. display: none;
  1230. }
  1231. }
  1232. ::v-deep .avatar-uploader .el-upload {
  1233. border: 1px dashed #d9d9d9;
  1234. border-radius: 6px;
  1235. cursor: pointer;
  1236. position: relative;
  1237. overflow: hidden;
  1238. }
  1239. ::v-deep .avatar-uploader .el-upload:hover {
  1240. border-color: #409EFF;
  1241. }
  1242. ::v-deep .avatar-uploader-icon {
  1243. font-size: 28px;
  1244. color: #8c939d;
  1245. width: 100px;
  1246. height: 100px;
  1247. line-height: 100px;
  1248. text-align: center;
  1249. }
  1250. ::v-deep .avatar {
  1251. width: 100px;
  1252. height: 100px;
  1253. display: block;
  1254. }
  1255. .app-container-scheduling ::v-deep .el-select__tags {
  1256. flex-wrap: inherit !important;
  1257. overflow-x: auto !important;
  1258. }
  1259. .app-container-scheduling ::v-deep .el-form-item__content {
  1260. position: relative;
  1261. }
  1262. .app-container-scheduling ::v-deep .el-form-item__content .query_clear{
  1263. position: absolute;
  1264. top: -15px;
  1265. right: -10px;
  1266. display: none;
  1267. cursor: pointer;
  1268. z-index: 99;
  1269. }
  1270. .app-container-scheduling ::v-deep .el-form-item__content:hover .query_clear {
  1271. display: block;
  1272. }
  1273. </style>