<template>
  <div class="app-container">
    <el-form
        :model="queryParams"
        ref="queryRef"
        :inline="true"
        v-show="showSearch"
        label-width="68px"
    >
      <el-form-item label="订单编号" prop="orderNo">
        <el-input
            v-model="queryParams.orderNo"
            placeholder="请输入订单编号"
            clearable
            @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="商品类别" prop="category">
        <el-select
            v-model="queryParams.category"
            placeholder="请选择商品类别"
            clearable
        >
          <el-option
              v-for="dict in application_category"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="型号" prop="model">
        <el-select
            v-model="queryParams.model"
            placeholder="请选择型号"
            clearable
        >
          <el-option
              v-for="dict in model"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="CPU" prop="cpu">
        <el-select v-model="queryParams.cpu" placeholder="请选择CPU" clearable>
          <el-option
              v-for="dict in cpu_type"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="GPU" prop="gpu">
        <el-select v-model="queryParams.gpu" placeholder="请选择GPU" clearable>
          <el-option
              v-for="dict in gpu_type"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="内存" prop="memory">
        <el-select
            v-model="queryParams.memory"
            placeholder="请选择内存"
            clearable
        >
          <el-option
              v-for="dict in memory_type"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <!--      <el-form-item label="存储硬盘" prop="storage">-->
      <!--        <el-select-->
      <!--            v-model="queryParams.storage"-->
      <!--            placeholder="请选择存储硬盘"-->
      <!--            clearable-->
      <!--        >-->
      <!--          <el-option-->
      <!--              v-for="dict in storage_type"-->
      <!--              :key="dict.value"-->
      <!--              :label="dict.label"-->
      <!--              :value="dict.value"-->
      <!--          />-->
      <!--        </el-select>-->
      <!--      </el-form-item>-->
      <el-form-item label="算力金额" prop="price">
        <el-input
            v-model="queryParams.price"
            placeholder="请输入算力金额"
            clearable
            @keyup.enter="handleQuery"
        />
      </el-form-item>
      <!--      <el-form-item label="状态" prop="orderStatus">-->
      <!--        <el-select-->
      <!--            v-model="queryParams.orderStatus"-->
      <!--            placeholder="请选择状态"-->
      <!--            clearable-->
      <!--        >-->
      <!--          <el-option-->
      <!--              v-for="dict in order_status"-->
      <!--              :key="dict.value"-->
      <!--              :label="dict.label"-->
      <!--              :value="dict.value"-->
      <!--          />-->
      <!--        </el-select>-->
      <!--      </el-form-item>-->
      <!--      <el-form-item label="网络带宽" prop="networkId">-->
      <!--        <el-input-->
      <!--            v-model="queryParams.networkId"-->
      <!--            placeholder="请输入网络带宽"-->
      <!--            clearable-->
      <!--            @keyup.enter="handleQuery"-->
      <!--        />-->
      <!--      </el-form-item>-->
      <!--      <el-form-item label="额外IP数量" prop="ipNum">-->
      <!--        <el-input-->
      <!--            v-model="queryParams.ipNum"-->
      <!--            placeholder="请输入额外IP数量"-->
      <!--            clearable-->
      <!--            @keyup.enter="handleQuery"-->
      <!--        />-->
      <!--      </el-form-item>-->
      <!--      <el-form-item label="虚拟机存储" prop="vmStorage">-->
      <!--        <el-input-->
      <!--            v-model="queryParams.vmStorage"-->
      <!--            placeholder="请输入虚拟机存储"-->
      <!--            clearable-->
      <!--            @keyup.enter="handleQuery"-->
      <!--        />-->
      <!--      </el-form-item>-->
<!--      <el-form-item label="申请时间" prop="submitTime">-->
<!--        <el-date-picker-->
<!--            clearable-->
<!--            v-model="queryParams.submitTime"-->
<!--            type="date"-->
<!--            value-format="YYYY-MM-DD"-->
<!--            placeholder="请选择申请时间"-->
<!--        >-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
      <!--      <el-form-item label="应用人" prop="applyUser">-->
      <!--        <el-input-->
      <!--            v-model="queryParams.applyUser"-->
      <!--            placeholder="请输入应用人"-->
      <!--            clearable-->
      <!--            @keyup.enter="handleQuery"-->
      <!--        />-->
      <!--      </el-form-item>-->
      <!--      <el-form-item label="使用期限" prop="useTime">-->
      <!--        <el-input-->
      <!--            v-model="queryParams.useTime"-->
      <!--            placeholder="请输入使用期限"-->
      <!--            clearable-->
      <!--            @keyup.enter="handleQuery"-->
      <!--        />-->
      <!--      </el-form-item>-->
      <el-form-item>
        <el-button type="primary" icon="Search" @click="handleQuery"
        >搜索
        </el-button
        >
        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <!--    <el-row :gutter="10" class="mb8">-->
    <!--      <el-col :span="1.5">-->
    <!--        <el-button-->
    <!--            type="primary"-->
    <!--            plain-->
    <!--            icon="Plus"-->
    <!--            @click="handleAdd"-->
    <!--            v-hasPermi="['computility:order:add']"-->
    <!--        >新增</el-button-->
    <!--        >-->
    <!--      </el-col>-->
    <!--      <el-col :span="1.5">-->
    <!--        <el-button-->
    <!--            type="success"-->
    <!--            plain-->
    <!--            icon="Edit"-->
    <!--            :disabled="single"-->
    <!--            @click="handleUpdate"-->
    <!--            v-hasPermi="['computility:order:edit']"-->
    <!--        >修改</el-button-->
    <!--        >-->
    <!--      </el-col>-->
    <!--      <el-col :span="1.5">-->
    <!--        <el-button-->
    <!--            type="danger"-->
    <!--            plain-->
    <!--            icon="Delete"-->
    <!--            :disabled="multiple"-->
    <!--            @click="handleDelete"-->
    <!--            v-hasPermi="['computility:order:remove']"-->
    <!--        >删除</el-button-->
    <!--        >-->
    <!--      </el-col>-->
    <!--      <el-col :span="1.5">-->
    <!--        <el-button-->
    <!--            type="warning"-->
    <!--            plain-->
    <!--            icon="Download"-->
    <!--            @click="handleExport"-->
    <!--            v-hasPermi="['computility:order:export']"-->
    <!--        >导出</el-button-->
    <!--        >-->
    <!--      </el-col>-->
    <!--      <right-toolbar-->
    <!--          v-model:showSearch="showSearch"-->
    <!--          @queryTable="getList"-->
    <!--      ></right-toolbar>-->
    <!--    </el-row>-->

    <el-table
        v-loading="loading"
        :data="orderList"
        :max-height="620"
        @selection-change="handleSelectionChange"
    >
      <el-table-column type="selection" width="45" align="center"/>
      <el-table-column label="序号" align="center" prop="id"/>
      <el-table-column label="订单编号" align="center" prop="orderNo"/>
      <el-table-column label="商品类别" align="center" prop="category">
        <template #default="scope">
          <dict-tag
              :options="application_category"
              :value="scope.row.category"
          />
        </template>
      </el-table-column>
      <el-table-column label="型号" align="center" prop="model">
        <template #default="scope">
          <dict-tag :options="model" :value="scope.row.model"/>
        </template>
      </el-table-column>
      <el-table-column label="CPU" align="center" prop="cpu">
        <template #default="scope">
          <dict-tag :options="cpu_type" :value="scope.row.cpu"/>
        </template>
      </el-table-column>
      <el-table-column label="GPU" align="center" prop="gpu">
        <template #default="scope">
          <dict-tag :options="gpu_type" :value="scope.row.gpu"/>
        </template>
      </el-table-column>
      <el-table-column label="内存" align="center" prop="memory">
        <template #default="scope">
          <dict-tag :options="memory_type" :value="scope.row.memory"/>
        </template>
      </el-table-column>
      <el-table-column label="存储" align="center" prop="storage">
        <template #default="scope">
          <dict-tag :options="storage_type" :value="scope.row.storage"/>
        </template>
      </el-table-column>
<!--      <el-table-column label="购买方" align="center" prop=""/>-->
      <el-table-column label="算力金额" align="center" prop="publicTotalPrice"/>
      <el-table-column label="实际金额" align="center" prop="innerTotalPrice"/>
      <el-table-column label="订单状态" align="center" prop="orderStatus">
        <template #default="scope">
          <dict-tag :options="order_status" :value="scope.row.orderStatus"/>
        </template>
      </el-table-column>
      <el-table-column label="申请时间"
                       align="center"
                       prop="submitTime"
                       width="180">
        <template #default="scope">
          <span>{{ parseTime(scope.row.submitTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column
          label="操作"
          align="center"
          fixed="right"
          class-name="small-padding fixed-width">
        <template #default="scope">
          <el-button
              v-if="scope.row.orderStatus === 2"
              link
              type="primary"
              @click="handleViewReason(scope.row)"
          >
            查看驳回理由
          </el-button>

          <el-button
              v-if="scope.row.orderStatus === 1"
              link
              type="primary"
              @click="handleCancel(scope.row)"
          >
            取消
          </el-button>

          <!--          <el-button-->
          <!--              link-->
          <!--              type="primary"-->
          <!--              icon="Edit"-->
          <!--              @click="handleUpdate(scope.row)"-->
          <!--              v-hasPermi="['computility:order:edit']">-->
          <!--            详情-->
          <!--          </el-button>-->
          <!--          <el-button-->
          <!--              link-->
          <!--              type="primary"-->
          <!--              icon="Delete"-->
          <!--              @click="handleDelete(scope.row)"-->
          <!--              v-hasPermi="['computility:order:remove']">-->
          <!--            删除-->
          <!--          </el-button>-->
          <!--          <el-button-->
          <!--              link-->
          <!--              type="primary"-->
          <!--              icon="Edit"-->
          <!--              @click="handleUpdate(scope.row)"-->
          <!--              v-hasPermi="['computility:order:edit']">-->
          <!--            修改-->
          <!--          </el-button>-->
        </template>
      </el-table-column>
    </el-table>

    <pagination
        v-show="total > 0"
        :total="total"
        v-model:page="queryParams.pageNum"
        v-model:limit="queryParams.pageSize"
        @pagination="getList"
    />

    <!-- 添加或修改订单管理-需求单管理对话框 -->
    <el-dialog :title="title" v-model="open" width="500px" append-to-body>
      <el-form ref="orderRef" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="订单编号" prop="orderNo">
          <el-input v-model="form.orderNo" placeholder="请输入订单编号"/>
        </el-form-item>
        <el-form-item label="商品类别" prop="category">
          <el-select v-model="form.category" placeholder="请选择商品类别">
            <el-option
                v-for="dict in application_category"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="型号" prop="model">
          <el-select v-model="form.model" placeholder="请选择型号">
            <el-option
                v-for="dict in model"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="CPU" prop="cpu">
          <el-select v-model="form.cpu" placeholder="请选择CPU">
            <el-option
                v-for="dict in cpu_type"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="GPU" prop="gpu">
          <el-select v-model="form.gpu" placeholder="请选择GPU">
            <el-option
                v-for="dict in gpu_type"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="内存" prop="memory">
          <el-select v-model="form.memory" placeholder="请选择内存">
            <el-option
                v-for="dict in memory_type"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="存储硬盘" prop="storage">
          <el-select v-model="form.storage" placeholder="请选择存储硬盘">
            <el-option
                v-for="dict in storage_type"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="算力金额" prop="publicTotalPrice">
          <el-input v-model="form.publicTotalPrice" placeholder="请输入算力金额"/>
        </el-form-item>
        <el-form-item label="实际金额" prop="innerTotalPrice">
          <el-input v-model="form.innerTotalPrice" placeholder="请输入实际金额"/>
        </el-form-item>
        <el-form-item label="状态" prop="orderStatus">
          <el-radio-group v-model="form.orderStatus">
            <el-radio
                v-for="dict in order_status"
                :key="dict.value"
                :label="parseInt(dict.value)"
            >{{ dict.label }}
            </el-radio
            >
          </el-radio-group>
        </el-form-item>
        <el-form-item label="网络带宽" prop="networkId">
          <el-input v-model="form.networkId" placeholder="请输入网络带宽"/>
        </el-form-item>
        <el-form-item label="额外IP数量" prop="ipNum">
          <el-input v-model="form.ipNum" placeholder="请输入额外IP数量"/>
        </el-form-item>
        <el-form-item label="虚拟机存储" prop="vmStorage">
          <el-input v-model="form.vmStorage" placeholder="请输入虚拟机存储"/>
        </el-form-item>
        <el-form-item label="申请时间" prop="submitTime">
          <el-date-picker
              clearable
              v-model="form.submitTime"
              type="date"
              value-format="YYYY-MM-DD"
              placeholder="请选择申请时间"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="应用人" prop="applyUser">
          <el-input v-model="form.applyUser" placeholder="请输入应用人"/>
        </el-form-item>
        <el-form-item label="使用期限" prop="useTime">
          <el-input v-model="form.useTime" placeholder="请输入使用期限"/>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" placeholder="请输入备注"/>
        </el-form-item>
      </el-form>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="submitForm">确 定</el-button>
          <el-button @click="cancel">取 消</el-button>
        </div>
      </template>
    </el-dialog>

    <!-- 详情订单管理-需求单管理对话框 -->
    <el-dialog :title="title" v-model="sOpen" width="500px" append-to-body>
      <el-form ref="orderRef" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="订单编号" prop="orderNo">
          <el-input v-model="form.orderNo" placeholder="请输入订单编号"/>
        </el-form-item>
        <el-form-item label="商品类别" prop="category">
          <el-select v-model="form.category" placeholder="请选择商品类别">
            <el-option
                v-for="dict in application_category"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="型号" prop="model">
          <el-select v-model="form.model" placeholder="请选择型号">
            <el-option
                v-for="dict in model"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="CPU" prop="cpu">
          <el-select v-model="form.cpu" placeholder="请选择CPU">
            <el-option
                v-for="dict in cpu_type"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="GPU" prop="gpu">
          <el-select v-model="form.gpu" placeholder="请选择GPU">
            <el-option
                v-for="dict in gpu_type"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="内存" prop="memory">
          <el-select v-model="form.memory" placeholder="请选择内存">
            <el-option
                v-for="dict in memory_type"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="存储硬盘" prop="storage">
          <el-select v-model="form.storage" placeholder="请选择存储硬盘">
            <el-option
                v-for="dict in storage_type"
                :key="dict.value"
                :label="dict.label"
                :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="算力金额" prop="price">
          <el-input v-model="form.price" placeholder="请输入算力金额"/>
        </el-form-item>
        <el-form-item label="状态" prop="orderStatus">
          <el-radio-group v-model="form.orderStatus">
            <el-radio
                v-for="dict in order_status"
                :key="dict.value"
                :label="parseInt(dict.value)"
            >{{ dict.label }}
            </el-radio
            >
          </el-radio-group>
        </el-form-item>
        <el-form-item label="网络带宽" prop="networkId">
          <el-input v-model="form.networkId" placeholder="请输入网络带宽"/>
        </el-form-item>
        <el-form-item label="额外IP数量" prop="ipNum">
          <el-input v-model="form.ipNum" placeholder="请输入额外IP数量"/>
        </el-form-item>
        <el-form-item label="虚拟机存储" prop="vmStorage">
          <el-input v-model="form.vmStorage" placeholder="请输入虚拟机存储"/>
        </el-form-item>
        <el-form-item label="申请时间" prop="submitTime">
          <el-date-picker
              clearable
              v-model="form.submitTime"
              type="date"
              value-format="YYYY-MM-DD"
              placeholder="请选择申请时间"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="应用人" prop="applyUser">
          <el-input v-model="form.applyUser" placeholder="请输入应用人"/>
        </el-form-item>
        <el-form-item label="使用期限" prop="useTime">
          <el-input v-model="form.useTime" placeholder="请输入使用期限"/>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" placeholder="请输入备注"/>
        </el-form-item>

      </el-form>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="submitForm">确 定</el-button>
          <el-button @click="cancel">取 消</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<script setup name="MyOrder">
import {
  listOrder,
  getOrder,
  delOrder,
  addOrder,
  updateOrder,
  cancelOrder,
  orderReason
} from '@/api/computility/order'
import { ElMessageBox } from 'element-plus'

const {proxy} = getCurrentInstance()
const {
  memory_type,
  cpu_type,
  storage_type,
  order_status,
  model,
  application_category,
  gpu_type
} = proxy.useDict(
    'memory_type',
    'cpu_type',
    'storage_type',
    'order_status',
    'model',
    'application_category',
    'gpu_type'
)

const orderList = ref([])
const open = ref(false)
const sOpen = ref(false)
const loading = ref(true)
const showSearch = ref(true)
const ids = ref([])
const single = ref(true)
const multiple = ref(true)
const total = ref(0)
const title = ref('')

const data = reactive({
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    orderNo: null,
    category: null,
    model: null,
    cpu: null,
    gpu: null,
    memory: null,
    storage: null,
    price: null,
    orderStatus: null,
    networkId: null,
    ipNum: null,
    vmStorage: null,
    submitTime: null,
    applyUser: null,
    useTime: null
  },
  rules: {
    category: [
      {required: true, message: '商品类别不能为空', trigger: 'change'}
    ],
    model: [{required: true, message: '型号不能为空', trigger: 'change'}],
    cpu: [{required: true, message: 'CPU不能为空', trigger: 'change'}],
    gpu: [{required: true, message: 'GPU不能为空', trigger: 'change'}],
    memory: [{required: true, message: '内存不能为空', trigger: 'change'}],
    storage: [
      {required: true, message: '存储硬盘不能为空', trigger: 'change'}
    ],
    orderStatus: [
      {required: true, message: '状态不能为空', trigger: 'change'}
    ],
    networkId: [
      {required: true, message: '网络带宽不能为空', trigger: 'blur'}
    ],
    submitTime: [
      {required: true, message: '申请时间不能为空', trigger: 'blur'}
    ],
    applyUser: [{required: true, message: '应用人不能为空', trigger: 'blur'}],
    useTime: [{required: true, message: '使用期限不能为空', trigger: 'blur'}],
    createTime: [
      {required: true, message: '创建时间不能为空', trigger: 'blur'}
    ]
  }
})

const {queryParams, form, rules} = toRefs(data)

/** 查询订单管理-需求单管理列表 */
function getList () {
  loading.value = true
  listOrder(queryParams.value).then((response) => {
    orderList.value = response.rows
    total.value = response.total
    loading.value = false
  })
}

// 取消按钮
function cancel () {
  open.value = false
  reset()
}

// 表单重置
function reset () {
  form.value = {
    id: null,
    orderNo: null,
    category: null,
    model: null,
    cpu: null,
    gpu: null,
    memory: null,
    storage: null,
    price: null,
    orderStatus: null,
    networkId: null,
    ipNum: null,
    vmStorage: null,
    submitTime: null,
    applyUser: null,
    useTime: null,
    createTime: null,
    createBy: null,
    updateBy: null,
    updateTime: null,
    remark: null,
    delFlag: null
  }
  proxy.resetForm('orderRef')
}

/** 搜索按钮操作 */
function handleQuery () {
  queryParams.value.pageNum = 1
  getList()
}

/** 重置按钮操作 */
function resetQuery () {
  proxy.resetForm('queryRef')
  handleQuery()
}

// 多选框选中数据
function handleSelectionChange (selection) {
  ids.value = selection.map((item) => item.id)
  single.value = selection.length != 1
  multiple.value = !selection.length
}

/** 新增按钮操作 */
function handleAdd () {
  reset()
  open.value = true
  title.value = '添加订单管理-需求单管理'
}

/** 修改按钮操作 */
function handleUpdate (row) {
  reset()
  const _id = row.id || ids.value
  getOrder(_id).then((response) => {
    form.value = response.data
    open.value = true
    title.value = '修改订单管理-需求单管理'
  })
}

/** 提交按钮 */
function submitForm () {
  proxy.$refs['orderRef'].validate((valid) => {
    if (valid) {
      if (form.value.id != null) {
        updateOrder(form.value).then((response) => {
          proxy.$modal.msgSuccess('修改成功')
          open.value = false
          getList()
        })
      } else {
        addOrder(form.value).then((response) => {
          proxy.$modal.msgSuccess('新增成功')
          open.value = false
          getList()
        })
      }
    }
  })
}

/** 删除按钮操作 */
function handleDelete (row) {
  const _ids = row.id || ids.value
  proxy.$modal
      .confirm('是否确认删除订单管理-需求单管理编号为"' + _ids + '"的数据项？')
      .then(function () {
        return delOrder(_ids)
      })
      .then(() => {
        getList()
        proxy.$modal.msgSuccess('删除成功')
      })
      .catch(() => {
      })
}

/** 取消按钮操作 */
function handleCancel (row) {
  proxy.$modal
      .confirm('是否取消该订单申请')
      .then(function () {
        return cancelOrder({id: row.id})
      })
      .then(() => {
        getList()
        proxy.$modal.msgSuccess('取消成功')
      })
      .catch(() => {
      })
}

/** 查看驳回理由按钮操作 */
function handleViewReason (row) {
  orderReason(row.id).then(res => {
    console.log(res)
    ElMessageBox.alert(res.data, '驳回理由', {
      confirmButtonText: '关闭',
      callback: (action) => {
      }
    })
  })
}

/** 导出按钮操作 */
function handleExport () {
  proxy.download(
      'computility/order/export',
      {
        ...queryParams.value
      },
      `order_${new Date().getTime()}.xlsx`
  )
}

getList()
</script>


<style lang="scss" scoped>
.el-form {
  padding: 20px 20px 0 20px;
  border-radius: 4px;
  background-color: #FFFFFF;
  margin-bottom: 20px;
}

.pagination-container {
  background-color: transparent;
}
</style>
