This commit is contained in:
qsh
2024-07-30 18:55:30 +08:00
parent 60231e4005
commit 1e40357e51
8 changed files with 71 additions and 31 deletions

View File

@@ -200,7 +200,7 @@
<script setup name="ClueOrderList">
import { getSimpleFieldList } from '@/api/clue/orderField'
import * as SignApi from '@/api/clue/sign'
import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
import { getSimpleProductList } from '@/api/mall/product'
import DialogOrder from './DialogOrder.vue'
@@ -213,11 +213,8 @@ import { removeNullField } from '@/utils'
import { formatDate } from '@/utils/formatTime'
const userOptions = ref([])
const allUserOptions = ref([])
onMounted(() => {
getUserOption().then((data) => {
userOptions.value = data
getCurdSchemas()
})
getOptions()
})
@@ -286,8 +283,10 @@ async function getCurdSchemas() {
try {
const data = await getSimpleFieldList()
data.forEach((elem) => {
if (['createUser', 'convertPeople', 'receiver'].includes(elem.field)) {
if (['createUser'].includes(elem.field)) {
elem.search.options = userOptions.value
} else if (['convertPeople', 'receiver'].includes(elem.field)) {
elem.search.options = allUserOptions.value
}
})
allSchemas.value = useCrudSchemas(data).allSchemas
@@ -343,11 +342,15 @@ function handleAddFee(row) {
extraFeeDialog.value.open(row.signId)
}
function getOptions() {
async function getOptions() {
// 产品
getSimpleProductList().then((data) => {
prodOptions.value = data
})
userOptions.value = await getUserOption()
allUserOptions.value = await getAllUserList()
getCurdSchemas()
}
const deliveryDialog = ref()
function handleDelivery(row) {