option.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.orderlife.export" :data="searchKey" :fileName="'来客订单_'+(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. type: { type: String, default: "1" },
  25. dataSelect: { type: Array, default: () => [] },
  26. searchKey: { type: Object, default: () => {} },
  27. dataSelectFull: { type: Array, default: () => [] }
  28. },
  29. data(){
  30. return {
  31. }
  32. },
  33. methods: {
  34. table_export(){
  35. },
  36. async table_batch_status(status){
  37. if (this.dataSelect.length == 0) {
  38. return this.$message.error("请选择修改数据")
  39. }
  40. let submitData = {"id":this.dataSelect,"value":status,"field":"status","type":"batch"};
  41. var resp = await this.$API.merGoods.batch.post(submitData);
  42. if (resp.code == 0) {
  43. return this.$message.error(resp.msg);
  44. }
  45. this.$message.success(resp.msg);
  46. this.$emit("success");
  47. },
  48. handleSuccess(){
  49. this.$emit("success");
  50. },
  51. }
  52. }
  53. </script>