pull/2/head
qsh 4 months ago
parent 60231e4005
commit 1e40357e51
  1. 5
      src/api/system/user/index.ts
  2. 2
      src/directives/permission/hasPermi.ts
  3. 17
      src/views/Clue/Order/Comp/MallOrderList.vue
  4. 16
      src/views/Clue/Order/Comp/OrderList.vue
  5. 38
      src/views/Clue/Order/Comp/Reback.vue
  6. 5
      src/views/Clue/Pool/Comp/DialogClue.vue
  7. 5
      src/views/Clue/Pool/Comp/DialogSuccess.vue
  8. 14
      src/views/Clue/Pool/index.vue

@ -74,3 +74,8 @@ export const updateUserStatus = (id: number, status: number) => {
export const getSimpleUserList = (): Promise<UserVO[]> => {
return request.get({ url: '/admin-api/system/user/list-all-simple' })
}
// 获取所有用户列表-无权限限制
export const getAllUserList = (): Promise<UserVO[]> => {
return request.get({ url: '/admin-api/system/user/no/permission/list-all-simple' })
}

@ -8,7 +8,7 @@ export function hasPermi(app: App<Element>) {
const { wsCache } = useCache()
const { value } = binding
const all_permission = '*:*:*'
const permissions = wsCache.get(CACHE_KEY.USER).permissions
const permissions = wsCache.get(CACHE_KEY.USER)?.permissions || []
if (value && value instanceof Array && value.length > 0) {
const permissionFlag = value

@ -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) {

@ -174,7 +174,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 { getPlaceList } from '@/api/school/place'
import { getClassTypeList } from '@/api/school/class'
@ -187,11 +187,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()
})
@ -260,8 +257,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
@ -333,12 +332,15 @@ async function getClassTypeOptions() {
classOptions.value = data
}
function getOptions() {
async function getOptions() {
//
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
schoolOptions.value = data.schoolList
allPlaceOptions.value = data.placeList
})
userOptions.value = await getUserOption()
allUserOptions.value = await getAllUserList()
getCurdSchemas()
}
</script>

@ -18,7 +18,7 @@
<el-form-item v-if="appStore.getAppInfo?.instanceType == 1">
<el-select v-model="searchForm.receiver" placeholder="接待人" clearable filterable>
<el-option
v-for="item in userOptions"
v-for="item in allUserOptions"
:key="item.id"
:label="item.nickname"
:value="item.id"
@ -28,7 +28,7 @@
<el-form-item v-else-if="appStore.getAppInfo?.instanceType == 2">
<el-select v-model="searchForm.convertPeople" placeholder="转化人" clearable filterable>
<el-option
v-for="item in userOptions"
v-for="item in allUserOptions"
:key="item.id"
:label="item.nickname"
:value="item.id"
@ -88,13 +88,15 @@
v-loading="loading"
:data="tableList"
border
show-summary
:summary-method="getSummaries"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" :selectable="(row) => row.state == 1" />
<el-table-column prop="signId" label="成交单号" min-width="150px" />
<el-table-column prop="name" label="线索名称" min-width="200px" />
<el-table-column type="selection" width="60" :selectable="(row) => row.state == 1" />
<el-table-column prop="signId" label="成交单号" min-width="180px" />
<el-table-column prop="name" label="线索名称" min-width="150px" />
<el-table-column prop="phone" label="联系方式" min-width="150px" />
<el-table-column prop="money" label="回款金额" min-width="90" />
<el-table-column prop="money" label="回款金额" min-width="150px" />
<el-table-column prop="isPayoff" label="是否结清" min-width="90" />
<el-table-column
v-if="appStore.getAppInfo?.instanceType == 1"
@ -166,7 +168,7 @@
<script setup name="Reback">
import * as FeebackApi from '@/api/clue/payment'
import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
import { useUserStore } from '@/store/modules/user'
import DialogFeebackAudit from './DialogFeebackAudit.vue'
@ -198,6 +200,7 @@ const searchForm = ref({
})
const userOptions = ref([])
const allUserOptions = ref([])
const tableList = ref([])
const total = ref(0)
@ -223,6 +226,7 @@ function handleReset() {
}
}
const totalMoney = ref(0)
const loading = ref(false)
async function getList() {
loading.value = true
@ -230,6 +234,7 @@ async function getList() {
const data = await FeebackApi.getPaymentPage(removeNullField(searchForm.value))
tableList.value = data.list
total.value = data.total
totalMoney.value = data.totalAmount
} finally {
loading.value = false
}
@ -274,6 +279,25 @@ function getOptions() {
getUserOption().then((data) => {
userOptions.value = data
})
getAllUserList().then((data) => {
allUserOptions.value = data
})
}
function getSummaries(param) {
const { columns } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
} else if (column.property == 'money') {
sums[index] = totalMoney.value
} else {
sums[index] = ''
}
})
return sums
}
onMounted(() => {

@ -157,6 +157,9 @@ const props = defineProps({
},
userOptions: {
type: Array
},
allUserOptions: {
type: Array
}
})
@ -168,7 +171,7 @@ const formSchema = computed(() => {
it.componentProps['disabled'] = formType.value != 'create'
}
if (it.field == 'convertPeople') {
it.options = props.userOptions.map((it) => ({ ...it, name: it.nickname }))
it.options = props.allUserOptions.map((it) => ({ ...it, name: it.nickname }))
}
})
return [

@ -122,7 +122,7 @@
<el-form-item label="接待人" prop="receiver">
<el-select v-model="form.receiver" placeholder="选择接待人" clearable filterable>
<el-option
v-for="item in userOptions"
v-for="item in allUserOptions"
:key="item.id"
:label="item.nickname"
:value="item.id"
@ -328,6 +328,7 @@ import { getDiyFieldList } from '@/api/clue/orderField'
import { getPlaceList } from '@/api/school/place'
import { getClassTypeList } from '@/api/school/class'
import { getSimpleProductList } from '@/api/mall/product'
// import { getSimpleWarehouseList } from '@/api/mall/warehouse'
import { formatDate } from '@/utils/formatTime'
import { getDictOptions } from '@/utils/dict'
@ -358,7 +359,7 @@ const props = defineProps({
schema: {
type: Array
},
userOptions: {
allUserOptions: {
type: Array
}
})

@ -159,6 +159,7 @@
v-if="!loading"
ref="formRef"
:userOptions="userOptions"
:allUserOptions="allUserOptions"
:schema="allSchemas.formSchema"
@success="getTableList"
/>
@ -172,6 +173,7 @@
<DialogSuccess
ref="successRef"
:schema="allSchemas.detailSchema"
:allUserOptions="allUserOptions"
:userOptions="userOptions"
@success="getTableList"
/>
@ -187,7 +189,7 @@ import DrawerClue from './Comp/DrawerClue.vue'
import DialogSuccess from './Comp/DialogSuccess.vue'
import DialogFollow from './Comp/DialogFollow.vue'
import ClueMap from './Comp/ClueMap.vue'
import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
import { removeNullField } from '@/utils'
import { formatDate } from '@/utils/formatTime'
@ -356,12 +358,12 @@ function handleGain(id) {
}
const userOptions = ref([])
const allUserOptions = ref([])
onMounted(() => {
getUserOption().then((data) => {
userOptions.value = data
getCurdSchemas()
})
onMounted(async () => {
userOptions.value = await getUserOption()
allUserOptions.value = await getAllUserList()
getCurdSchemas()
})
</script>

Loading…
Cancel
Save