option.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <fieldset>
  3. <legend>
  4. <el-tag type="info">按需操作</el-tag>
  5. </legend>
  6. <div class="op-header">
  7. <div class="left-panel">
  8. <sc-file-export :apiObj="$API.storeOrder.export" :data="searchKey" :fileName="name+'_'+(new Date().getTime())" async>
  9. <template #default="{ open }">
  10. <el-button type="primary" icon="sc-icon-download" @click="open">导出</el-button>
  11. </template>
  12. </sc-file-export>
  13. </div>
  14. </div>
  15. </fieldset>
  16. </template>
  17. <script>
  18. import scFileExport from '@/components/scFileExport'
  19. export default {
  20. components: {
  21. scFileExport
  22. },
  23. props: {
  24. status: { type: String, default: "1" },
  25. name: { type: String, default: "已预约订单" },
  26. dataSelect: { type: Array, default: () => [] },
  27. searchKey: { type: Object, default: () => {} },
  28. dataSelectFull: { type: Array, default: () => [] }
  29. },
  30. data(){
  31. return {
  32. }
  33. },
  34. methods: {
  35. table_export(){
  36. },
  37. async table_batch_status(status){
  38. if (this.dataSelect.length == 0) {
  39. return this.$message.error("请选择修改数据")
  40. }
  41. let submitData = {"id":this.dataSelect,"value":status,"field":"status","type":"batch"};
  42. var resp = await this.$API.merGoods.batch.post(submitData);
  43. if (resp.code == 0) {
  44. return this.$message.error(resp.msg);
  45. }
  46. this.$message.success(resp.msg);
  47. this.$emit("success");
  48. },
  49. handleSuccess(){
  50. this.$emit("success");
  51. },
  52. }
  53. }
  54. </script>