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[]> => { export const getSimpleUserList = (): Promise<UserVO[]> => {
return request.get({ url: '/admin-api/system/user/list-all-simple' }) 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 { wsCache } = useCache()
const { value } = binding const { value } = binding
const all_permission = '*:*:*' 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) { if (value && value instanceof Array && value.length > 0) {
const permissionFlag = value const permissionFlag = value

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

@ -174,7 +174,7 @@
<script setup name="ClueOrderList"> <script setup name="ClueOrderList">
import { getSimpleFieldList } from '@/api/clue/orderField' import { getSimpleFieldList } from '@/api/clue/orderField'
import * as SignApi from '@/api/clue/sign' 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 { getPlaceList } from '@/api/school/place'
import { getClassTypeList } from '@/api/school/class' import { getClassTypeList } from '@/api/school/class'
@ -187,11 +187,8 @@ import { removeNullField } from '@/utils'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
const userOptions = ref([]) const userOptions = ref([])
const allUserOptions = ref([])
onMounted(() => { onMounted(() => {
getUserOption().then((data) => {
userOptions.value = data
getCurdSchemas()
})
getOptions() getOptions()
}) })
@ -260,8 +257,10 @@ async function getCurdSchemas() {
try { try {
const data = await getSimpleFieldList() const data = await getSimpleFieldList()
data.forEach((elem) => { data.forEach((elem) => {
if (['createUser', 'convertPeople', 'receiver'].includes(elem.field)) { if (['createUser'].includes(elem.field)) {
elem.search.options = userOptions.value elem.search.options = userOptions.value
} else if (['convertPeople', 'receiver'].includes(elem.field)) {
elem.search.options = allUserOptions.value
} }
}) })
allSchemas.value = useCrudSchemas(data).allSchemas allSchemas.value = useCrudSchemas(data).allSchemas
@ -333,12 +332,15 @@ async function getClassTypeOptions() {
classOptions.value = data classOptions.value = data
} }
function getOptions() { async function getOptions() {
// //
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => { getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
schoolOptions.value = data.schoolList schoolOptions.value = data.schoolList
allPlaceOptions.value = data.placeList allPlaceOptions.value = data.placeList
}) })
userOptions.value = await getUserOption()
allUserOptions.value = await getAllUserList()
getCurdSchemas()
} }
</script> </script>

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

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

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

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

Loading…
Cancel
Save