|
|
@@ -1,74 +1,67 @@
|
|
|
<!-- 搜索表单 -->
|
|
|
<template>
|
|
|
<ele-card :body-style="{ paddingBottom: '8px' }">
|
|
|
- <ProSearch :columns="columns" v-model:form="form" ref="searchRef">
|
|
|
- <el-col :span="6" style="min-width: 160px">
|
|
|
- <el-button style="width: 90px" type="primary" @click="search"
|
|
|
- >查询</el-button
|
|
|
- >
|
|
|
- <el-button style="width: 90px" type="info" @click="reset"
|
|
|
- >重置</el-button
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- </ProSearch>
|
|
|
+ <ProSearch
|
|
|
+ :items="formItems"
|
|
|
+ ref="searchRef"
|
|
|
+ @search="search"
|
|
|
+ :initKeys="initKeys"
|
|
|
+ ></ProSearch>
|
|
|
</ele-card>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { reactive, ref, defineEmits } from 'vue';
|
|
|
- import { useFormData } from '@/utils/use-form-data';
|
|
|
- import ProSearch from '@/components/CommonPage/ProSearch.vue';
|
|
|
+ import ProSearch from '@/components/CommonPage/ProSearch2.vue';
|
|
|
|
|
|
const emit = defineEmits(['search']);
|
|
|
- const columns = reactive([
|
|
|
- { tag: 'el-input', label: '退回编号', prop: 'refundOrderId', span: 4 },
|
|
|
- { tag: 'el-input', label: '原始订单ID', prop: 'originOrderId', span: 4 },
|
|
|
- { tag: 'el-input', label: '物流单号', prop: 'waybillCode', span: 4 },
|
|
|
- { tag: 'el-input', label: '收件人姓名', prop: 'receiveName', span: 4 },
|
|
|
- { tag: 'el-input', label: '收件人手机', prop: 'receiveMobile', span: 4 },
|
|
|
- { tag: 'el-input', label: '收件地址', prop: 'receiveAddress', span: 4 },
|
|
|
- {
|
|
|
- tag: 'dict-data',
|
|
|
- label: '状态',
|
|
|
- prop: 'status',
|
|
|
- span: 4,
|
|
|
- tagAttrs: { code: 'refund_status', type: 'select' }
|
|
|
- },
|
|
|
- {
|
|
|
- tag: 'dict-data',
|
|
|
- label: '是否首单',
|
|
|
- prop: 'firstOrder',
|
|
|
- span: 4,
|
|
|
- tagAttrs: { code: 'is_first_order', type: 'select' }
|
|
|
- },
|
|
|
- // {
|
|
|
- // tag: 'dict-data',
|
|
|
- // label: '是否推送',
|
|
|
- // prop: 'isPush',
|
|
|
- // span: 4,
|
|
|
- // tagAttrs: { code: 'is_push', type: 'select' }
|
|
|
- // }
|
|
|
- ]);
|
|
|
|
|
|
- const initKeys = {};
|
|
|
- for (let i = 0; i < columns.length; i++) {
|
|
|
- initKeys[columns[i].prop] = '';
|
|
|
- }
|
|
|
+ const formItems = computed(() => {
|
|
|
+ return [
|
|
|
+ { type: 'input', label: '退回编号', prop: 'refundOrderId' },
|
|
|
+ { type: 'input', label: '回收订单', prop: 'originOrderId' },
|
|
|
+ { type: 'input', label: '物流单号', prop: 'waybillCode' },
|
|
|
+ { type: 'input', label: '收件人姓名', prop: 'receiveName' },
|
|
|
+ { type: 'input', label: '收件人手机', prop: 'receiveMobile' },
|
|
|
+ { type: 'input', label: '收货地址', prop: 'receiveAddress' },
|
|
|
+ {
|
|
|
+ type: 'dictSelect',
|
|
|
+ label: '全部订单',
|
|
|
+ prop: 'status',
|
|
|
+ props: {
|
|
|
+ code: 'refund_status'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'dictSelect',
|
|
|
+ label: '是否首单',
|
|
|
+ prop: 'firstOrder',
|
|
|
+ props: {
|
|
|
+ code: 'is_first_order'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'dictSelect',
|
|
|
+ label: '是否推送',
|
|
|
+ prop: 'checkStatus',
|
|
|
+ props: {
|
|
|
+ code: 'is_push'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ });
|
|
|
|
|
|
- /** 表单数据 */
|
|
|
- const [form, resetFields] = useFormData({
|
|
|
- ...initKeys
|
|
|
+ const initKeys = reactive({
|
|
|
+ name: '',
|
|
|
+ nickName: '',
|
|
|
+ openId: '',
|
|
|
+ phone: '',
|
|
|
+ status: ''
|
|
|
});
|
|
|
|
|
|
const searchRef = ref(null);
|
|
|
/** 搜索 */
|
|
|
- const search = () => {
|
|
|
- emit('search', { ...form });
|
|
|
- };
|
|
|
-
|
|
|
- /** 重置 */
|
|
|
- const reset = () => {
|
|
|
- resetFields();
|
|
|
- search();
|
|
|
+ const search = (data) => {
|
|
|
+ emit('search', { ...data });
|
|
|
};
|
|
|
</script>
|