option.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. <el-button type="danger" icon="el-icon-download" @click="table_download()">下载打印插件</el-button>
  14. </div>
  15. </div>
  16. </fieldset>
  17. </template>
  18. <script>
  19. import scFileExport from '@/components/scFileExport'
  20. export default {
  21. components: {
  22. scFileExport
  23. },
  24. props: {
  25. type: { type: String, default: "1" },
  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_download(){
  36. window.location.href="https://scp-tcdn.sf-express.com/scp/soft/SCPPrint_Win32NT_6.570CN.exe"
  37. },
  38. table_export(){
  39. },
  40. async table_batch_status(status){
  41. if (this.dataSelect.length == 0) {
  42. return this.$message.error("请选择修改数据")
  43. }
  44. let submitData = {"id":this.dataSelect,"value":status,"field":"status","type":"batch"};
  45. var resp = await this.$API.merGoods.batch.post(submitData);
  46. if (resp.code == 0) {
  47. return this.$message.error(resp.msg);
  48. }
  49. this.$message.success(resp.msg);
  50. this.$emit("success");
  51. },
  52. handleSuccess(){
  53. this.$emit("success");
  54. },
  55. }
  56. }
  57. </script>