|
@@ -8,12 +8,19 @@
|
|
:inline="true"
|
|
:inline="true"
|
|
label-width="68px"
|
|
label-width="68px"
|
|
>
|
|
>
|
|
- <el-form-item label-width="90px" :label="customerType==='supplier'?'供应商名称':'制造商名称'" prop="name">
|
|
|
|
|
|
+ <el-form-item label-width="90px" label="客商名称" prop="name" >
|
|
<el-input
|
|
<el-input
|
|
|
|
+ @keyup.enter="handleQuery"
|
|
v-model="queryParams.name"
|
|
v-model="queryParams.name"
|
|
placeholder="请输入名称"
|
|
placeholder="请输入名称"
|
|
- clearable
|
|
|
|
|
|
+ class="!w-240px"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label-width="90px" label="客商编号" prop="code" >
|
|
|
|
+ <el-input
|
|
@keyup.enter="handleQuery"
|
|
@keyup.enter="handleQuery"
|
|
|
|
+ v-model="queryParams.code"
|
|
|
|
+ placeholder="请输入名称"
|
|
class="!w-240px"
|
|
class="!w-240px"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -35,8 +42,9 @@
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column :label="customerType==='supplier'?'供应商名称':'制造商名称'" align="center" prop="name" />
|
|
|
|
- <el-table-column :label="customerType==='supplier'?'供应商分类':'制造商分类'" align="center" prop="classification" >
|
|
|
|
|
|
+ <el-table-column label="客商名称" align="center" prop="name" />
|
|
|
|
+ <el-table-column label="客商编号" align="center" prop="code" />
|
|
|
|
+ <el-table-column label="客商分类" align="center" prop="classification" >
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<dict-tag :type="DICT_TYPE.SUPPLIER_TYPE" :value="scope.row.classification" />
|
|
<dict-tag :type="DICT_TYPE.SUPPLIER_TYPE" :value="scope.row.classification" />
|
|
</template>
|
|
</template>
|
|
@@ -79,9 +87,9 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import {DictDataVO} from "@/api/system/dict/dict.data";
|
|
import {DictDataVO} from "@/api/system/dict/dict.data";
|
|
- import {DICT_TYPE} from "@/utils/dict";
|
|
|
|
|
|
+ import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
|
|
import {dateFormatter} from "@/utils/formatTime";
|
|
import {dateFormatter} from "@/utils/formatTime";
|
|
- import { Api } from '@/api/supplier/base'
|
|
|
|
|
|
+ import {Api, SupplierVO} from '@/api/supplier/base'
|
|
import { propTypes } from '@/utils/propTypes'
|
|
import { propTypes } from '@/utils/propTypes'
|
|
const emit = defineEmits(['choose']) // 定义 success 事件,用于操作成功后的回调
|
|
const emit = defineEmits(['choose']) // 定义 success 事件,用于操作成功后的回调
|
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
@@ -89,7 +97,7 @@
|
|
const customerType = ref('') // 弹窗的是否展示
|
|
const customerType = ref('') // 弹窗的是否展示
|
|
const loading = ref(true) // 列表的加载中
|
|
const loading = ref(true) // 列表的加载中
|
|
const queryFormRef = ref() // 搜索的表单
|
|
const queryFormRef = ref() // 搜索的表单
|
|
- const list = ref<DictDataVO[]>([]) // 列表的数据
|
|
|
|
|
|
+ const list = ref<SupplierVO[]>([]) // 列表的数据
|
|
const total = ref(0) // 列表的总页数
|
|
const total = ref(0) // 列表的总页数
|
|
// const props = defineProps({
|
|
// const props = defineProps({
|
|
// type: propTypes.bool.def(), // 是否作为详情组件
|
|
// type: propTypes.bool.def(), // 是否作为详情组件
|
|
@@ -132,15 +140,9 @@
|
|
})
|
|
})
|
|
const open = async (type: string) => {
|
|
const open = async (type: string) => {
|
|
dialogVisible.value = true
|
|
dialogVisible.value = true
|
|
- selectedRow.value = null
|
|
|
|
- customerType.value = type
|
|
|
|
- //queryParams.customerNature = type
|
|
|
|
- console.log('----------'+type)
|
|
|
|
- await getList()
|
|
|
|
- dialogTitle.value = type==='supplier'?'供应商':'制造商';
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
-
|
|
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
loading.value = true
|
|
loading.value = true
|
|
try {
|
|
try {
|
|
@@ -166,6 +168,13 @@
|
|
queryFormRef.value.resetFields()
|
|
queryFormRef.value.resetFields()
|
|
handleQuery()
|
|
handleQuery()
|
|
}
|
|
}
|
|
|
|
+ onMounted(async ()=>{
|
|
|
|
+ selectedRow.value = null
|
|
|
|
+ // customerType.value = type
|
|
|
|
+ //
|
|
|
|
+ // dialogTitle.value = type==='supplier'?'供应商':'制造商';
|
|
|
|
+ await getList();
|
|
|
|
+ })
|
|
</script>
|
|
</script>
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
|
|