|
@@ -93,12 +93,16 @@
|
|
|
>
|
|
|
删除
|
|
|
</el-button>
|
|
|
- <!--
|
|
|
- <el-button type="warning" icon="Download" @click="handleExport" v-hasPermi="['business:outsource:export']">
|
|
|
- 导出
|
|
|
- </el-button>
|
|
|
- <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
- -->
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ icon="Download"
|
|
|
+ :disabled="ids.length != 1"
|
|
|
+ @click="handleExport"
|
|
|
+ v-hasPermi="['business:outsource:export']"
|
|
|
+ >
|
|
|
+ 导出
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
|
|
|
<!-- 渲染数据区 -->
|
|
@@ -239,7 +243,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="Order">
|
|
|
-import { listOrder, delOrder } from "@/api/business/outsourcedOrder";
|
|
|
+import {
|
|
|
+ listOrder,
|
|
|
+ delOrder,
|
|
|
+ exportOutsource,
|
|
|
+} from "@/api/business/outsourcedOrder";
|
|
|
import orderForm from "./form";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
/** 字典数组区 */
|
|
@@ -260,8 +268,8 @@ const queryParams = ref({
|
|
|
pageSize: 10,
|
|
|
formCode: null,
|
|
|
formDate: null,
|
|
|
- startTime:null,
|
|
|
- endTime:null,
|
|
|
+ startTime: null,
|
|
|
+ endTime: null,
|
|
|
supplierName: null,
|
|
|
deliveryMethod: null,
|
|
|
packagingMethod: null,
|
|
@@ -335,13 +343,7 @@ function handleDelete(row) {
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
function handleExport() {
|
|
|
- proxy.download(
|
|
|
- "business/order/export",
|
|
|
- {
|
|
|
- ...queryParams.value,
|
|
|
- },
|
|
|
- `order_${new Date().getTime()}.xlsx`
|
|
|
- );
|
|
|
+ exportOutsource({ id: ids.value[0] });
|
|
|
}
|
|
|
|
|
|
getList();
|