酒店预订平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

719 lines
32 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <!-- import CSS -->
  6. <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  7. </head>
  8. <body>
  9. <div id="app" class="table">
  10. <div>
  11. <div class="header-search">
  12. <span>名称:</span>
  13. <el-input v-model="search.name" style="width: 120px;" placeholder="请输入内容"></el-input>
  14. <span>状态</span>
  15. <el-select v-model="search.status" placeholder="请选择" clearable>
  16. <el-option
  17. v-for="item in status"
  18. :key="item.id"
  19. :label="item.value"
  20. :value="item.id">
  21. </el-option>
  22. </el-select>
  23. <span>成本</span>
  24. <el-input-number v-model="search.startCost" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number>
  25. ~
  26. <el-input-number v-model="search.endCost" style="width: 170px;" placeholder="请输入内容" clearable></el-input-number>
  27. <el-button type="primary" icon="el-icon-search" @click="getData(1)">搜索</el-button>
  28. <el-button type="primary" icon="el-icon-plus" @click="edit(null)">新增付款单</el-button>
  29. </div>
  30. <el-table ref="multipleTable" :data="tableData" border tooltip-effect="dark"
  31. style="font-size:12px;width: 100%;margin-top: 12px">
  32. <el-table-column prop="create_id" label="创建人" min-width="70" :formatter="getUserName"></el-table-column>
  33. <el-table-column prop="id" label="付款单号" min-width="50"></el-table-column>
  34. <el-table-column prop="name" label="付款单名称" min-width="120"></el-table-column>
  35. <el-table-column prop="status" label="付款单状态" :formatter="getStatusName" min-width="150">
  36. <template slot-scope="scope">
  37. <el-radio-group v-model="scope.row.status" size="mini" @change="setStatus(scope.row)">
  38. <el-radio-button label="0">未付款</el-radio-button>
  39. <el-radio-button label="1">付款中</el-radio-button>
  40. <el-radio-button label="2">已付款</el-radio-button>
  41. </el-radio-group>
  42. </template>
  43. </el-table-column>
  44. <el-table-column prop="order_ids" label="酒店" min-width="130">
  45. <template slot-scope="scope">
  46. <div v-html="scope.row.hotel"></div>
  47. </template>
  48. </el-table-column>
  49. <el-table-column prop="total_amount" label="附加项目" min-width="130">
  50. <template slot-scope="scope">
  51. <div v-html="scope.row.item"></div>
  52. </template>
  53. </el-table-column>
  54. <el-table-column prop="create_time" label="创建时间" min-width="80"></el-table-column>
  55. <el-table-column prop="update_time" label="更新时间" min-width="80"></el-table-column>
  56. <el-table-column label="操作" min-width="180">
  57. <template slot-scope="scope">
  58. <el-button-group>
  59. <el-button type="primary" size="mini" @click="edit(scope.row)" icon="el-icon-edit">编辑</el-button>
  60. <el-button type="success" size="mini" @click="editOrderDivShow(scope.row)" icon="el-icon-share">订单</el-button>
  61. <el-button type="danger" size="mini" icon="el-icon-delete" @click="delAll(scope.row.id)">删除</el-button>
  62. </el-button-group>
  63. </template>
  64. </el-table-column>
  65. </el-table>
  66. <el-pagination
  67. :page-size="search.pageSize"
  68. :pager-count="11"
  69. layout="total, sizes, prev, pager, next, jumper"
  70. :total="total"
  71. :current-page="search.pageNum"
  72. :page-sizes="[10, 20, 30, 40, 50]"
  73. @size-change="sizeChange"
  74. @current-change="getData"
  75. @prev-click="getData"
  76. @next-click="getData"
  77. ></el-pagination>
  78. </div>
  79. <transition name="bounce" v-if="editShow">
  80. <el-dialog title="付款单详情" :visible.sync="editShow" width="90%" top="15px">
  81. <el-form ref="form" label-width="100px" style="width: 100%;padding-bottom: 20px">
  82. <div style="display: flex;width: 100%">
  83. <el-form-item v-if="editType" label="付款单ID:" style="width: 80%">
  84. <div v-html="editData.id"></div>
  85. </el-form-item>
  86. </div>
  87. <div>
  88. <el-form-item label="付款单名称:" style="width: 80%">
  89. <el-input v-model="editData.name" style="width: 120px;" placeholder="请输入内容"></el-input>
  90. </el-form-item>
  91. </div>
  92. <div>
  93. <el-form-item v-if="editType" label="付款单状态:" style="width: 80%">
  94. <el-radio-group v-model="editData.status" size="mini" disabled>
  95. <el-radio-button label="0">未付款</el-radio-button>
  96. <el-radio-button label="1">付款中</el-radio-button>
  97. <el-radio-button label="2">已付款</el-radio-button>
  98. </el-radio-group>
  99. </el-form-item>
  100. </div>
  101. <div>
  102. <el-button type="primary" @click="editDoing()" >保存</el-button>
  103. </div>
  104. </el-form>
  105. </el-dialog>
  106. </transition>
  107. <transition name="bounce" v-if="editOrderShow">
  108. <el-dialog title="详情" :visible.sync="editOrderShow" width="100%" top="15px">
  109. <el-form ref="form" label-width="100px" style="width: 100%;padding-bottom: 10px">
  110. <div style="display: flex;width: 100%">
  111. <el-form-item label="付款单ID:" style="width: 80%">
  112. <div v-html="editOrder.id"></div>
  113. </el-form-item>
  114. <el-form-item label="付款单名称:" style="width: 80%">
  115. <div v-html="editOrder.name"></div>
  116. </el-form-item>
  117. <el-form-item label="付款单状态:" style="width: 80%">
  118. <el-radio-group v-model="editOrder.status" size="mini" disabled>
  119. <el-radio-button label="0">未付款</el-radio-button>
  120. <el-radio-button label="1">付款中</el-radio-button>
  121. <el-radio-button label="2">已付款</el-radio-button>
  122. </el-radio-group>
  123. </el-form-item>
  124. </div>
  125. </el-form>
  126. <div>
  127. <div class="header-search" style="width: 100%;margin-bottom: 10px">
  128. <span>主订单ID:</span>
  129. <el-input v-model="orderMainListSearch.order_id" style="width: 120px;" placeholder="请输入内容"></el-input>
  130. <span>子订单ID:</span>
  131. <el-input v-model="orderMainListSearch.sub_order_id" style="width: 120px;" placeholder="请输入内容"></el-input>
  132. <span>订单类型:</span>
  133. <el-select v-model="orderMainListSearch.prod_type" style="width: 120px;" placeholder="请选择" >
  134. <el-option
  135. v-for="item in prodTypeList"
  136. :key="item.id"
  137. :label="item.name"
  138. :value="item.id">
  139. </el-option>
  140. </el-select>
  141. <span>用户名</span>
  142. <el-input v-model="orderMainListSearch.customer_name" style="width: 120px;" placeholder="请输入内容" clearable></el-input>
  143. </div>
  144. <div class="header-search" style="width: 100%;margin-bottom: 10px">
  145. <span>附加项目</span>
  146. <el-select v-model="orderMainListSearch.item_id" style="width: 120px;" placeholder="请选择" clearable>
  147. <el-option
  148. v-for="item in itemList"
  149. :key="item.id"
  150. :label="item.name"
  151. :value="item.id">
  152. </el-option>
  153. </el-select>
  154. <span>酒店</span>
  155. <el-select v-model="orderMainListSearch.hotel_id" style="width: 120px;" placeholder="请选择" clearable>
  156. <el-option
  157. v-for="item in hotelList"
  158. :key="item.id"
  159. :label="item.name"
  160. :value="item.id">
  161. </el-option>
  162. </el-select>
  163. <span>确认单状态:</span>
  164. <el-select v-model="orderMainListSearch.confirm_status" style="width: 120px;" placeholder="请选择" clearable>
  165. <el-option
  166. v-for="item in confirmStatusList"
  167. :key="item.id"
  168. :label="item.name"
  169. :value="item.id">
  170. </el-option>
  171. </el-select>
  172. <span>付款单状态</span>
  173. <el-select v-model="orderMainListSearch.inPayment" style="width: 120px;" placeholder="请选择" clearable>
  174. <el-option
  175. v-for="item in inPaymentList"
  176. :key="item.id"
  177. :label="item.name"
  178. :value="item.id">
  179. </el-option>
  180. </el-select>
  181. <span>供应商:</span>
  182. <el-select v-model="orderMainListSearch.supplier_id" style="width: 120px;" placeholder="请选择" clearable>
  183. <el-option
  184. v-for="item in supplierList"
  185. :key="item.id"
  186. :label="item.name"
  187. :value="item.id">
  188. </el-option>
  189. </el-select>
  190. </div>
  191. <div class="header-search" style="width: 100%;margin-bottom: 10px">
  192. <span>成本</span>
  193. <el-input-number v-model="orderMainListSearch.startMoney" style="width: 180px;" placeholder="请输入内容" clearable></el-input-number>
  194. ~
  195. <el-input-number v-model="orderMainListSearch.endMoney" style="width: 180px;" placeholder="请输入内容" clearable></el-input-number>
  196. <span>时间</span>
  197. <el-date-picker
  198. style="width: 180px;"
  199. v-model="orderMainListSearch.startTime"
  200. type="date"
  201. value-format="yyyy-MM-dd"
  202. placeholder="选择日期">
  203. </el-date-picker>
  204. ~
  205. <el-date-picker
  206. style="width: 180px;"
  207. v-model="orderMainListSearch.endTime"
  208. value-format="yyyy-MM-dd"
  209. type="date"
  210. placeholder="选择日期">
  211. </el-date-picker>
  212. <el-button type="primary" icon="el-icon-search" @click="getOrderMainData(1)">搜索</el-button>
  213. </div>
  214. <div>
  215. <el-table ref="multipleTable" :data="orderMainList" border tooltip-effect="dark" style="font-size:12px;width: 100%;margin-top: 12px" @selection-change="handleSelectionChange">
  216. <el-table-column type="selection" width="30" :selectable="checkSelect"></el-table-column>
  217. <el-table-column prop="order_id" label="主订单ID" min-width="20" ></el-table-column>
  218. <el-table-column prop="id" label="子订单ID" min-width="20" ></el-table-column>
  219. <el-table-column label="订单类型" min-width="30" :formatter="getProdTypeName" ></el-table-column>
  220. <el-table-column prop="supplier_name" label="供应商" min-width="40" ></el-table-column>
  221. <el-table-column prop="trade_order_number" label="第三方订单号" min-width="40" ></el-table-column>
  222. <el-table-column prop="hotel_name" label="酒店/项目类型" min-width="80" :formatter="getTypeName"></el-table-column>
  223. <el-table-column prop="room_name" label="房型/附加项目" min-width="80" ></el-table-column>
  224. <el-table-column prop="plan_name" label="价格方案/计价单位" min-width="40" ></el-table-column>
  225. <el-table-column prop="check_in_date" label="时间" min-width="40" >
  226. <template slot-scope="scope">
  227. <div v-html="scope.row.check_in_date"></div>
  228. <div v-html="scope.row.check_out_date"></div>
  229. </template>
  230. </el-table-column>
  231. <el-table-column prop="count" label="数量" min-width="20" ></el-table-column>
  232. <el-table-column prop="customer_name" label="出游人姓名" min-width="40" ></el-table-column>
  233. <el-table-column prop="total_cost" label="总成本" min-width="30" ></el-table-column>
  234. <el-table-column label="发单状态" min-width="30" :formatter="confirmStatusName"></el-table-column>
  235. <el-table-column prop="create_time" label="子订单生成时间" min-width="60" ></el-table-column>
  236. <el-table-column prop="payment_order_name" label="付款单" min-width="40" >
  237. <template slot-scope="scope">
  238. <div v-html="scope.row.payment_order_id"></div>
  239. <div v-html="scope.row.payment_order_name"></div>
  240. </template>
  241. </el-table-column>
  242. <el-table-column label="操作" >
  243. <template slot-scope="scope">
  244. <el-button-group>
  245. <el-button type="primary" size="mini" v-if="scope.row.payment_order_id==0 && editOrder.status==0" @click="addOrderInfo(scope.row)" icon="el-icon-edit">添加</el-button>
  246. <el-button type="danger" size="mini" v-if="scope.row.payment_order_id==editOrder.id && editOrder.status==0" @click="removeOrderMain(scope.row)" icon="el-icon-delete">移除</el-button>
  247. </el-button-group>
  248. </template>
  249. </el-table-column>
  250. </el-table>
  251. <div style="margin-top: 5px">
  252. <el-button type="primary" icon="el-icon-circle-plus" @click="addOrderAll()" :disabled="multipleSelection.length==0">添加到采购单</el-button>
  253. </div>
  254. <el-pagination
  255. :page-size="orderMainListSearch.pageSize"
  256. :pager-count="11"
  257. layout="total, sizes, prev, pager, next, jumper"
  258. :total="orderMainTotal"
  259. :current-page="orderMainListSearch.pageNum"
  260. :page-sizes="[10, 20, 30, 40, 50]"
  261. @size-change="sizeOrderMainChange"
  262. @current-change="getOrderMainData"
  263. @prev-click="getOrderMainData"
  264. @next-click="getOrderMainData"
  265. ></el-pagination>
  266. </div>
  267. </div>
  268. </el-dialog>
  269. </transition>
  270. </div>
  271. </body>
  272. <!-- import Vue before Element -->
  273. <script src="/assets/js/vue/vue.js"></script>
  274. <!-- import JavaScript -->
  275. <script src="/assets/js/vue/index.js"></script>
  276. <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  277. <script>
  278. new Vue({
  279. el: '#app',
  280. data: function () {
  281. return {
  282. search: {
  283. name: "",
  284. status: "all",
  285. startCost:"",
  286. endCost:"",
  287. pageSize: 10,
  288. pageNum: 1
  289. },
  290. status: [
  291. {"id": "all", "value": "请选择"},
  292. {"id": 0, 'value': "未付款"},
  293. {"id": 1, 'value': "付款中"},
  294. {"id": 2, 'value': "已付款"}
  295. ],
  296. total: 0,
  297. tableData: [],
  298. userList: [],
  299. info: {
  300. id: null,
  301. name: "",
  302. status: 0,
  303. list: []
  304. },
  305. editShow: false,
  306. editType: false,
  307. editData: {},
  308. editOrderShow:false,
  309. editOrder:{},
  310. orderMainListSearch:{
  311. "payment_order_id":"",
  312. "order_id":"",
  313. "sub_order_id":"",
  314. "prod_type":"hotel",
  315. "supplier_id":"",
  316. "inPayment":"",
  317. "confirm_status":"",
  318. "customer_name":"",
  319. "startMoney":"",
  320. "endMoney":"",
  321. "startTime":"",
  322. "endTime":"",
  323. "pageNum":1,
  324. "pageSize":10,
  325. "item_id":"",
  326. "hotel_id":"",
  327. "room_id":"",
  328. "plan_id":""
  329. },
  330. orderMainTotal:0,
  331. orderMainList:[],
  332. inPaymentList:[
  333. {id:1,name:"在此付款单中"},
  334. {id:2,name:"不在此付款单中"},
  335. {id:3,name:"不在任何付款单中"}
  336. ],
  337. //1、未发单/ 2已发单、3已确认、4已取消
  338. confirmStatusList:[
  339. {id:1,name:"未发单"},
  340. {id:2,name:"已发单"},
  341. {id:3,name:"已确认"},
  342. {id:4,name:"已取消"}
  343. ],
  344. prodTypeList:[
  345. {id:"hotel",name:"酒店"},
  346. {id:"item",name:"附加项目"}
  347. ],
  348. supplierList:[],
  349. multipleSelection: [],
  350. hotelList:[],
  351. itemList:[],
  352. type_list:[],
  353. }
  354. },
  355. created() {
  356. this.getAdminUser();
  357. this.getSupplierList();
  358. this.getData(1)
  359. this.getHotelList()
  360. this.getConfig()
  361. this.getItemList()
  362. },
  363. watch: {
  364. "orderMainListSearch.prod_type" : function (newVal,oldVal){
  365. this.getOrderMainData(1)
  366. }
  367. },
  368. methods: {
  369. getTypeName(info) {
  370. for (let i = 0; i < this.type_list.length; i++) {
  371. if (this.type_list[i].id == info.hotel_name) {
  372. return this.type_list[i].name
  373. }
  374. }
  375. return info.hotel_name
  376. },
  377. getConfig(){
  378. axios.post("/hotel.php/general/config/getList?key=site.item_category", {}).then((response) => {
  379. let data = response.data;
  380. this.type_list = data.list;
  381. }).catch(function (error) {
  382. console.log(error);
  383. });
  384. },
  385. getProdTypeName(info){
  386. for (let i = 0; i < this.prodTypeList.length; i++) {
  387. if (this.prodTypeList[i].id == info.prod_type) {
  388. return this.prodTypeList[i].name
  389. }
  390. }
  391. return "-"
  392. },
  393. getHotelList(){
  394. axios.post("/hotel.php/cf_hotel_info/getHotelList", this.search).then((response) => {
  395. console.log(response)
  396. let data = response.data;
  397. this.hotelList = data.list;
  398. }).catch(function (error) {
  399. console.log(error);
  400. });
  401. },
  402. getItemList(){
  403. axios.post("/hotel.php/cf_item/getList", this.search).then((response) => {
  404. console.log(response)
  405. let data = response.data;
  406. this.itemList = data.list;
  407. }).catch(function (error) {
  408. console.log(error);
  409. });
  410. },
  411. checkSelect(row,index){
  412. if (this.editOrder.status != 0) {
  413. return false;
  414. }
  415. if (row.payment_order_id ==0) {
  416. return true;
  417. }
  418. return false;
  419. },
  420. handleSelectionChange(val) {
  421. this.multipleSelection = val;
  422. },
  423. getSupplierList(){
  424. axios.post("/hotel.php/cf_suplier_info/getList", this.search).then((response) => {
  425. console.log(response)
  426. let data = response.data;
  427. this.supplierList = data.list;
  428. }).catch(function (error) {
  429. console.log(error);
  430. });
  431. },
  432. getStatusName(info) {
  433. for (let i = 0; i < this.status.length; i++) {
  434. if (this.status[i].id == info.status) {
  435. return this.status[i].value
  436. }
  437. }
  438. return "-"
  439. },
  440. getUserName(info) {
  441. for (let i = 0; i < this.userList.length; i++) {
  442. if (this.userList[i].id == info.create_id) {
  443. return this.userList[i].name
  444. }
  445. }
  446. return "-"
  447. },
  448. confirmStatusName(info){
  449. for (let i = 0; i < this.confirmStatusList.length; i++) {
  450. if (this.confirmStatusList[i].id == info.confirm_status) {
  451. return this.confirmStatusList[i].name
  452. }
  453. }
  454. return "-"
  455. },
  456. sizeChange(pageSize) {
  457. this.search.pageSize = pageSize;
  458. this.getData(this.search.pageNum)
  459. },
  460. sizeOrderMainChange(pageSize) {
  461. this.orderMainListSearch.pageSize = pageSize;
  462. this.getOrderMainData(this.orderMainListSearch.pageNum)
  463. },
  464. //獲取列表
  465. getData(page) {
  466. this.search.pageNum = page;
  467. axios.post("/hotel.php/payment_order/getList", this.search).then((response) => {
  468. let data = response.data;
  469. console.log(this.tableData);
  470. if (data.flag) {
  471. this.tableData = data.data.list;
  472. this.total = data.data.total;
  473. console.log(this.tableData);
  474. } else {
  475. this.$message.error(response.msg);
  476. }
  477. }).catch(function (error) {
  478. console.log(error);
  479. });
  480. },
  481. getAdminUser() {
  482. axios.post("/hotel.php/auth/admin/getList", this.search).then((response) => {
  483. this.userList = response.data.list;
  484. }).catch(function (error) {
  485. console.log(error);
  486. });
  487. },
  488. edit(info) {
  489. if (info == null) {
  490. this.editType = false;
  491. this.editData = {
  492. name: ""
  493. }
  494. } else {
  495. this.editType = true;
  496. this.editData = {
  497. id:info.id,
  498. name: info.name,
  499. status:info.status
  500. }
  501. }
  502. this.editShow = true;
  503. },
  504. editDoing(){
  505. axios.post("/hotel.php/payment_order/save", this.editData).then( (response)=> {
  506. let data = response.data;
  507. console.log(this.tableData);
  508. if (data.flag) {
  509. this.$message({
  510. message: '保存成功!',
  511. type: 'success'
  512. });
  513. this.editShow = false;
  514. this.getData(1);
  515. } else {
  516. this.$message.error(data.msg);
  517. }
  518. }).catch(function (error) {
  519. this.$message.error("保存失败");
  520. console.log(error);
  521. });
  522. },
  523. setStatus(info){
  524. this.$confirm('确定修改状态?', '提示', {
  525. confirmButtonText: '确定',
  526. cancelButtonText: '取消',
  527. type: 'warning'
  528. }).then(() => {
  529. axios.post("/hotel.php/payment_order/setStatus", info).then( (response)=> {
  530. let data = response.data;
  531. if (data.flag) {
  532. this.$message({
  533. message: '设置成功!',
  534. type: 'success'
  535. });
  536. } else {
  537. this.$message.error(data.msg);
  538. this.getData(this.search.pageNum)
  539. }
  540. }).catch(function (error) {
  541. this.$message.error("保存失败");
  542. console.log(error);
  543. this.getData(this.search.pageNum)
  544. });
  545. }).catch(() => {
  546. this.$message({
  547. type: 'info',
  548. message: '已取消'
  549. });
  550. this.getData(this.search.pageNum)
  551. })
  552. },
  553. editOrderDivShow(info){
  554. console.log(info);
  555. this.editOrder = info;
  556. this.orderMainListSearch.payment_order_id = info.id;
  557. this.orderMainList=[];
  558. this.getOrderMainData(1);
  559. this.editOrderShow = true;
  560. },
  561. getOrderMainData(page){
  562. this.orderMainListSearch.pageNum = page;
  563. axios.post("/hotel.php/payment_order/getSubOrderList", this.orderMainListSearch).then((response) => {
  564. let data = response.data;
  565. console.log(this.tableData);
  566. if (data.flag) {
  567. this.orderMainList = data.data.list;
  568. this.orderMainTotal = data.data.total;
  569. console.log(this.orderMainList);
  570. } else {
  571. this.$message.error(data.msg);
  572. }
  573. }).catch(function (error) {
  574. console.log(error);
  575. });
  576. },
  577. addOrderInfo(info){
  578. let param = {
  579. hotel_id:[],
  580. item_id:[],
  581. id:this.editOrder.id
  582. }
  583. if (info.prod_type=='hotel') {
  584. param.hotel_id.push(info.id)
  585. }else{
  586. param.item_id.push(info.id)
  587. }
  588. this.addOrderMain(param)
  589. },
  590. addOrderMain(param){
  591. axios.post("/hotel.php/payment_order/addOrderMain", param).then((response) => {
  592. let data = response.data;
  593. if (data.flag) {
  594. this.$message({
  595. message: '添加成功!',
  596. type: 'success'
  597. });
  598. this.getOrderMainData(this.orderMainListSearch.pageNum)
  599. this.getData(this.search.pageNum)
  600. } else {
  601. this.$message.error(data.msg);
  602. }
  603. }).catch(function (error) {
  604. console.log(error);
  605. });
  606. },
  607. addOrderAll(){
  608. let param = {
  609. hotel_id:[],
  610. item_id:[],
  611. id:this.editOrder.id
  612. }
  613. let length = this.multipleSelection.length;
  614. for (var k = 0; k < length; k++) {
  615. if (this.multipleSelection[k].prod_type=='hotel'){
  616. param.hotel_id.push(this.multipleSelection[k].id)
  617. }else{
  618. param.item_id.push(this.multipleSelection[k].id)
  619. }
  620. }
  621. this.addOrderMain(param);
  622. },
  623. removeOrderMain(info){
  624. let param = {
  625. hotel_id:[],
  626. item_id:[],
  627. id:this.editOrder.id
  628. }
  629. if (info.prod_type=='hotel') {
  630. param.hotel_id.push(info.id)
  631. }else{
  632. param.item_id.push(info.id)
  633. }
  634. axios.post("/hotel.php/payment_order/removeOrderMain", param).then((response) => {
  635. let data = response.data;
  636. if (data.flag) {
  637. this.$message({
  638. message: '移除成功!',
  639. type: 'success'
  640. });
  641. this.getOrderMainData(this.orderMainListSearch.pageNum)
  642. this.getData(this.search.pageNum)
  643. } else {
  644. this.$message.error(data.msg);
  645. }
  646. }).catch(function (error) {
  647. console.log(error);
  648. });
  649. },
  650. delAll(id){
  651. let param = {
  652. id:id
  653. }
  654. this.$confirm('确定删除采购单?', '提示', {
  655. confirmButtonText: '确定',
  656. cancelButtonText: '取消',
  657. type: 'warning'
  658. }).then(() => {
  659. axios.post("/hotel.php/payment_order/delAll", param).then((response) => {
  660. let data = response.data;
  661. if (data.flag) {
  662. this.$message({
  663. message: '移除成功!',
  664. type: 'success'
  665. });
  666. this.getData(this.search.pageNum)
  667. } else {
  668. this.$message.error(data.msg);
  669. }
  670. }).catch(function (error) {
  671. console.log(error);
  672. });
  673. }).catch(() => {
  674. this.$message({
  675. type: 'info',
  676. message: '已取消'
  677. });
  678. });
  679. }
  680. }
  681. })
  682. </script>
  683. <style lang="scss" scoped>
  684. .el-table thead {
  685. background-color: #5a5e66 !important;
  686. }
  687. .header-search {
  688. font-size: 14px;
  689. font-weight: 900;
  690. }
  691. body {
  692. background-color: white;
  693. }
  694. .table {
  695. width: 100%;
  696. font-size: 12px;
  697. margin-top: 12px;
  698. background-color: white;
  699. }
  700. .el-form-item{
  701. margin-bottom: 5px !important;
  702. }
  703. </style>
  704. </html>