#
Junjie
2025-02-14 ac4341ea6b66ae02427d39d35f41d42d78b2eb2e
zy-asrs-admin/src/components/order/order/orderOut.vue
@@ -1,7 +1,7 @@
<script setup>
import { getCurrentInstance, ref, computed, reactive, defineProps } from 'vue';
import { useRouter } from "vue-router";
import { get, post, postBlob } from '@/utils/request.js'
import { get, post, postBlob, postForm } from '@/utils/request.js'
import { message, Modal } from 'ant-design-vue';
import { globalState, logout } from '@/config.js';
import EditView from './edit.vue'
@@ -27,6 +27,11 @@
let currentPage = 1;
let pageSize = 10;
const searchInput = ref("")
const searchParam = ref({
    orderNo: null,
    orderType: null,
    orderSettle: null,
})
const editChild = ref(null)
const showOrderDetlChild = ref(null)
@@ -135,6 +140,7 @@
        dataIndex: 'oper',
        key: 'oper',
        width: 240,
        fixed: 'right',
    },
];
@@ -166,6 +172,7 @@
        current: currentPage,
        pageSize: pageSize,
        condition: searchInput.value,
        _param: searchParam.value,
    }).then((resp) => {
        let result = resp.data;
        if (result.code == 200) {
@@ -220,7 +227,9 @@
const handleExport = async (intl) => {
    postBlob('/api/order/export', {
        ioModel: props.ioModel
        ioModel: props.ioModel,
        condition: searchInput.value,
        _param: searchParam.value,
    }).then(result => {
        const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' });
        window.location.href = window.URL.createObjectURL(blob);
@@ -333,6 +342,25 @@
    })
}
const orderTypeQueryList = ref(null);
orderTypeQuery();
function orderTypeQuery() {
    postForm('/api/orderType/query', {
        type: 2
    }).then(resp => {
        let result = resp.data;
        orderTypeQueryList.value = result.data;
    })
}
const orderSettleQueryList = ref(null);
orderSettleQuery();
function orderSettleQuery() {
    postForm('/api/orderSettle/query', {}).then(resp => {
        let result = resp.data;
        orderSettleQueryList.value = result.data;
    })
}
</script>
<script>
@@ -348,6 +376,20 @@
        <div class="table-header">
            <div style="display: flex;">
                <div style="margin-right: 10px;">
                    <a-input v-model:value="searchParam.orderNo"
                        :placeholder="formatMessage('page.order.orderNo.input', '请输入订单编号')"
                        style="width: 140px;margin-right: 10px;" />
                    <a-select v-model:value="searchParam.orderSettle"
                        :placeholder="formatMessage('page.order.orderSettle.select', '请选择单据状态')"
                        style="width: 140px;margin-right: 10px;" show-search allowClear :options="orderSettleQueryList"
                        optionFilterProp="label" optionLabelProp="label">
                    </a-select>
                    <a-select v-model:value="searchParam.orderType"
                        :placeholder="formatMessage('page.order.orderType.select', '请选择单据类型')"
                        style="width: 140px;margin-right: 10px;" show-search allowClear :options="orderTypeQueryList"
                        optionFilterProp="label" optionLabelProp="label">
                    </a-select>
                    <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')"
                        style="width: 200px;" @search="onSearch" />
                </div>