salary
qsh 5 months ago
parent 013a93e668
commit 44e45349c2
  1. 21
      src/api/clue/delivery.js
  2. 5
      src/api/clue/sign.js
  3. 175
      src/views/Clue/Order/Comp/Delivery.vue
  4. 83
      src/views/Clue/Order/Comp/DialogDelivery.vue
  5. 117
      src/views/Clue/Order/Comp/DialogExtraPay.vue
  6. 6
      src/views/Clue/Order/Comp/DialogOrder.vue
  7. 313
      src/views/Clue/Order/Comp/MallOrderList.vue
  8. 174
      src/views/Clue/Order/Comp/OrderList.vue
  9. 9
      src/views/Clue/Order/index.vue
  10. 20
      src/views/Clue/Pool/Comp/DialogSuccess.vue
  11. 2
      src/views/Clue/Pool/index.vue
  12. 107
      src/views/Clue/Set/Comp/DialogOtherPay.vue
  13. 2
      src/views/Clue/Set/Comp/FieldClue.vue
  14. 2
      src/views/Clue/Set/Comp/FieldOrder.vue
  15. 126
      src/views/Clue/Set/Comp/OtherPayType.vue
  16. 4
      src/views/Clue/Set/index.vue
  17. 22
      src/views/MiniMall/MallSet/Comp/CategorySet.vue
  18. 2
      src/views/MiniMall/MallSet/Comp/FieldProduct.vue

@ -0,0 +1,21 @@
import request from '@/config/axios'
// 查询(精简)列表
export const getDeliveryList = async (params) => {
return await request.get({ url: '/admin-api/crm/sign-send/list', params })
}
// 查询(精简)列表
export const getDeliveryPage = async (params) => {
return await request.get({ url: '/admin-api/crm/sign-send/page', params })
}
// 新增
export const createDelivery = async (data) => {
return await request.post({ url: '/admin-api/crm/sign-send/create', data })
}
// 查询详情
export const getDeliveryDetail = async (params) => {
return await request.get({ url: '/admin-api/crm/sign-send/get', params })
}

@ -19,3 +19,8 @@ export const createSign = async (data) => {
export const cancelDeal = async (id) => {
return await request.delete({ url: '/admin-api/crm/sign/delete?id=' + id })
}
// 新增支出
export const signAddPay = async (data) => {
return await request.post({ url: '/admin-api/crm/sign/extra-pay/save', data: data })
}

@ -0,0 +1,175 @@
<template>
<div>
<el-form :model="searchForm" label-width="0" inline>
<el-form-item>
<el-input v-model="searchForm.signId" placeholder="成交单号" clearable />
</el-form-item>
<el-form-item>
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
</el-form-item>
<el-form-item>
<el-select v-model="searchForm.signUser" placeholder="登记人" clearable filterable>
<el-option
v-for="item in userOptions"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="searchForm.dealDate"
type="daterange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
range-separator="-"
start-placeholder="登记日期"
end-placeholder="登记日期"
/>
</el-form-item>
<el-form-item>
<el-select
v-model="searchForm.signProduct"
placeholder="选择成交产品"
filterable
@change="searchForm.specsId = undefined"
>
<el-option
v-for="item in prodOptions"
:key="item.productId"
:label="item.productName"
:value="item.productId"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-select
v-model="searchForm.specsId"
placeholder="选择规格"
filterable
:disabled="!searchForm.signProduct"
>
<el-option
v-for="item in specsOptions(searchForm.signProduct)"
:key="item.specsId"
:label="item.specsName"
:value="item.specsId"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="handleSearch">查询</el-button>
<el-button @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableList" border>
<el-table-column prop="signId" label="成交单号" min-width="150px" />
<el-table-column prop="name" label="线索名称" min-width="200px" />
<el-table-column prop="phone" label="联系方式" min-width="150px" />
<el-table-column prop="signUserName" label="登记人" min-width="90" />
<el-table-column prop="dealDate" label="登记时间" min-width="150px" />
<el-table-column prop="" label="成交产品" min-width="150px" />
<el-table-column prop="" label="产品规格" min-width="150px" />
<el-table-column prop="" label="发货时间" min-width="150px" />
<el-table-column prop="" label="发货仓库" min-width="100px" />
<el-table-column prop="" label="备注" min-width="100px" />
<el-table-column label="操作" width="150px" fixed="right">
<template #default="{ row }">
<el-button type="primary" style="padding: 0" text @click="handleDetail(row.id)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
<Pagination
v-model:limit="searchForm.pageSize"
v-model:page="searchForm.pageNo"
:total="total"
@pagination="getList"
/>
</div>
</template>
<script setup name="Delivery">
import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { getSimpleProductList } from '@/api/mall/product'
// const message = useMessage() //
const searchForm = ref({
signId: undefined,
name: undefined,
dealDate: [],
signUser: undefined,
pageNo: 1,
pageSize: 20
})
const userOptions = ref([])
const tableList = ref([])
const total = ref(0)
function handleSearch() {
searchForm.value.pageNo = 1
getList()
}
function handleReset() {
searchForm.value = {
signId: undefined,
name: undefined,
dealDate: [],
signUser: undefined,
pageNo: 1,
pageSize: 20
}
}
const loading = ref(false)
async function getList() {
loading.value = true
try {
tableList.value = []
// const data = await FeebackApi.getPaymentPage(searchForm.value)
// tableList.value = data.list
// total.value = data.total
} finally {
loading.value = false
}
}
function handleDetail(id) {
console.log(id)
}
const prodOptions = ref([])
const specsOptions = computed({
get() {
return (prodId) => {
if (prodId) {
return prodOptions.value.find((it) => it.productId == prodId).productSpecList
}
return []
}
}
})
function getOptions() {
getUserOption().then((data) => {
userOptions.value = data
})
//
getSimpleProductList().then((data) => {
prodOptions.value = data
})
}
onMounted(() => {
getOptions()
handleSearch()
})
</script>
<style lang="scss" scoped></style>

@ -0,0 +1,83 @@
<template>
<el-dialog title="发货" v-model="show" width="600px">
<el-form :model="form" ref="formRef" :rules="rules" label-width="80px">
<el-form-item label="发货仓库" prop="warehouseId">
<el-select v-model="form.warehouseId" placeholder="选择仓库" filterable>
<el-option
v-for="item in warehouseOptions"
:key="item.warehouseId"
:label="item.warehouseName"
:value="item.warehouseId"
/>
</el-select>
</el-form-item>
<el-form-item label="备注">
<Editor v-model:modelValue="form.remark" />
</el-form-item>
</el-form>
<template #footer>
<span>
<el-button @click="show = false"> </el-button>
<el-button :disabled="formLoading" type="primary" @click="onSubmit"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script setup name="DialogDelivery">
import { getSimpleWarehouseList } from '@/api/mall/warehouse'
import { createDelivery } from '@/api/clue/delivery'
const warehouseOptions = ref([])
function getOptions() {
getSimpleWarehouseList().then((data) => {
warehouseOptions.value = data
})
}
const show = ref(false)
function open(id) {
show.value = true
resetForm(id)
}
defineExpose({
open
})
const form = ref({})
const rules = ref({
warehouseId: { required: true, message: '仓库不可为空', trigger: 'change' }
})
function resetForm(id) {
form.value = {
signId: id,
warehouseId: undefined,
remark: undefined
}
}
const emit = defineEmits(['success'])
const formLoading = ref(false)
async function onSubmit() {
//
if (!formRef.value) return
const valid = await formRef.value.validate()
if (!valid) return
//
formLoading.value = true
try {
await createDelivery(form.value)
message.success('发货成功!')
show.value = false
emit('success')
} finally {
formLoading.value = false
}
}
onMounted(() => {
getOptions()
})
</script>
<style lang="scss" scoped></style>

@ -0,0 +1,117 @@
<template>
<el-dialog title="额外支出" v-model="show" width="800px">
<el-button
class="mb-5px"
type="primary"
size="small"
@click="
form.extraPay.push({
extraPayType: undefined,
extraPayMoney: 0,
dictType: 'extra_pay_type'
})
"
>
添加额外支出
</el-button>
<el-table :data="form.extraPay" border size="small">
<el-table-column type="index" width="50" />
<el-table-column prop="extraPayType" label="费用类型" width="200px">
<template #default="{ row }">
<el-select v-model="row.extraPayType" size="small" placeholder="其他费用类型" filterable>
<el-option
v-for="item in extraPayOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="extraPayMoney" label="费用金额" width="180px">
<template #default="{ row }">
<el-input-number v-model="row.extraPayMoney" size="small" :controls="false" />
</template>
</el-table-column>
<el-table-column prop="remark" label="备注">
<template #default="{ row }">
<el-input v-model="row.remark" size="small" placeholder="备注信息" />
</template>
</el-table-column>
<el-table-column label="操作" width="60px">
<template #default="{ row, $index }">
<Icon
icon="ep:remove-filled"
class="text-red-500"
:disabled="row.id"
@click="handleRemove('extraPay', $index)"
/>
</template>
</el-table-column>
</el-table>
<template #footer>
<span>
<el-button @click="show = false"> </el-button>
<el-button :disabled="formLoading" type="primary" @click="onSubmit"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script setup name="DialogExtraPay">
import { signAddPay } from '@/api/clue/sign'
import { getDictOptions } from '@/utils/dict'
const extraPayOptions = getDictOptions('extra_pay_type')
const message = useMessage() //
const show = ref(false)
function open(id) {
show.value = true
resetForm(id)
}
defineExpose({
open
})
const form = ref({})
function resetForm(id) {
form.value = {
signId: id,
extraPay: []
}
}
const formLoading = ref(false)
async function onSubmit() {
//
if (form.value.extraPay.length) {
if (form.value.extraPay.some((it) => !it.extraPayType || it.extraPayMoney == null)) {
message.info('请想额外支出信息填写完整!')
return
}
} else {
message.info('请添加额外支出')
return
}
//
formLoading.value = true
try {
const params = {
signId: form.value.id,
extraPay: form.value.extraPay.filter((it) => !it.id)
}
await signAddPay(params)
message.success('添加额外支出成功!')
} finally {
formLoading.value = false
}
}
function handleRemove(type, index) {
form.value[type].splice(index, 1)
}
</script>
<style lang="scss" scoped></style>

@ -6,11 +6,11 @@
</el-tab-pane>
<el-tab-pane label="成交信息" name="orderInfo">
<Descriptions :data="orderInfo" :schema="orderSchema" :columns="2" labelWidth="130px" />
<el-divider direction="horizontal" content-position="left">额外支出</el-divider>
<el-divider direction="horizontal" content-position="left">其他费用</el-divider>
<el-table :data="orderInfo.extraPay" border stripe>
<el-table-column type="index" width="50" />
<el-table-column prop="extraPayType" label="额外支出项" />
<el-table-column prop="extraPayMoney" label="支出金额" />
<el-table-column prop="extraPayType" label="费用项" />
<el-table-column prop="extraPayMoney" label="金额" />
<el-table-column prop="remark" label="备注" />
</el-table>
</el-tab-pane>

@ -0,0 +1,313 @@
<template>
<div>
<!-- 搜索工作栏 -->
<div>
<el-form
:model="searchForm"
ref="moreSearchRef"
inline
label-width="0"
style="display: inline"
>
<el-form-item style="margin-bottom: 10px">
<el-select
v-model="searchForm.signProduct"
placeholder="选择成交产品"
filterable
@change="searchForm.specsId = undefined"
>
<el-option
v-for="item in prodOptions"
:key="item.productId"
:label="item.productName"
:value="item.productId"
/>
</el-select>
</el-form-item>
<el-form-item style="margin-bottom: 10px">
<el-select
v-model="searchForm.specsId"
placeholder="选择规格"
filterable
:disabled="!searchForm.signProduct"
>
<el-option
v-for="item in specsOptions(searchForm.signProduct)"
:key="item.specsId"
:label="item.specsName"
:value="item.specsId"
/>
</el-select>
</el-form-item>
</el-form>
<Search
v-if="!loading"
ref="searchRef"
:schema="allSchemas.searchSchema"
inlineBlock
labelWidth="0"
>
<template #actionMore>
<el-button @click="getTableList" v-hasPermi="['clue:order:search']"> 搜索 </el-button>
<el-button @click="resetQuery" v-hasPermi="['clue:order:reset']"> 重置 </el-button>
</template>
</Search>
</div>
<!-- 列表 -->
<SSTable
v-if="!loading"
class="mt-10px"
v-model:tableObject="tableObject"
:tableColumns="allSchemas.tableColumns"
@get-list="getTableList"
>
<el-table-column type="expand">
<template #default="{ row }">
<div class="p-10px flex justify-center">
<el-table :data="row.signProducts" stripe style="width: 900px">
<el-table-column prop="productName" label="成交产品" />
<el-table-column prop="specsName" label="产品规格" />
<el-table-column prop="signNum" label="成交数量" />
<el-table-column prop="" label="发货仓库" />
<el-table-column label="操作" width="100px">
<template #default="scope">
<el-button
type="primary"
class="mr-10px"
link
style="padding: 0; margin-left: 0"
v-hasPermi="['clue:order:send']"
@click="handleDelivery(scope.row)"
>
发货
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
</el-table-column>
<el-table-column
v-for="item in allSchemas.tableColumns"
:key="item.field"
:prop="item.field"
:label="item.label"
min-width="120px"
/>
<el-table-column label="操作" width="240px" fixed="right">
<template #default="scope">
<el-button
type="primary"
class="mr-10px"
link
style="padding: 0; margin-left: 0"
v-hasPermi="['clue:order:detail']"
@click="handleDetail(scope.row)"
>
详情
</el-button>
<el-button
type="primary"
class="mr-10px"
link
style="padding: 0; margin-left: 0"
v-hasPermi="['clue:order:after-sale']"
@click="sellAfter(scope.row)"
>
售后
</el-button>
<el-button
type="primary"
class="mr-10px"
link
style="padding: 0; margin-left: 0"
v-if="scope.row.isPayoff == false"
v-hasPermi="['clue:order:return']"
@click="feeBack(scope.row)"
>
回款
</el-button>
<el-button
type="primary"
class="mr-10px"
link
style="padding: 0; margin-left: 0"
v-hasPermi="['clue:order:add-fee']"
@click="handleAddFee(scope.row)"
>
添加支出
</el-button>
<el-button
type="primary"
class="mr-10px"
link
style="padding: 0; margin-left: 0"
v-hasPermi="['clue:pool:enroll']"
@click="cancelDeal(scope.row)"
>
取消登记
</el-button>
</template>
</el-table-column>
</SSTable>
<!-- 详情 -->
<DialogOrder ref="orderDetailDialog" />
<DialogFeeback ref="feedbackDialog" />
<DialogAfterSale ref="afterSaleDialog" />
<DialogExtraFee ref="extraFeeDialog" />
<DialogDelivery ref="deliveryDialog" @success="getTableList" />
</div>
</template>
<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 { getSimpleProductList } from '@/api/mall/product'
import DialogOrder from './DialogOrder.vue'
import DialogFeeback from './DialogFeeback.vue'
import DialogAfterSale from './DialogAfterSale.vue'
import DialogExtraFee from './DialogExtraPay.vue'
import DialogDelivery from './DialogDelivery.vue'
import { removeNullField } from '@/utils'
const message = useMessage() //
const allSchemas = ref({})
const orderDetailDialog = ref()
const searchRef = ref()
const prodOptions = ref([])
const specsOptions = computed({
get() {
return (prodId) => {
if (prodId) {
return prodOptions.value.find((it) => it.productId == prodId).productSpecList
}
return []
}
}
})
const searchForm = ref({
signProduct: undefined
})
const tableObject = ref({
tableList: [],
loading: false,
total: 1,
pageSize: 20,
currentPage: 1
})
function resetQuery() {
searchForm.value = {
signProduct: undefined
}
searchRef.value.reset()
tableObject.value.currentPage = 1
getTableList()
}
//
async function getTableList() {
//
tableObject.value.loading = true
try {
const queryParams = await searchRef.value.getFormModel()
const params = {
...queryParams,
...searchForm.value,
pageNo: tableObject.value.currentPage,
pageSize: tableObject.value.pageSize
}
const data = await SignApi.getSignPage(removeNullField(params))
tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.diyParams }))
tableObject.value.total = data.total
} finally {
tableObject.value.loading = false
}
}
const loading = ref(true)
async function getCurdSchemas() {
loading.value = true
try {
const data = await getSimpleFieldList()
data.forEach((elem) => {
if (elem.field == 'createUser') {
elem.search.options = userOptions.value
}
})
allSchemas.value = useCrudSchemas(data).allSchemas
} finally {
loading.value = false
nextTick(() => {
getTableList()
})
}
}
//
function handleDetail(row) {
orderDetailDialog.value.open(row.clueId, row.signId)
}
const feedbackDialog = ref()
const afterSaleDialog = ref()
//
function sellAfter(row) {
afterSaleDialog.value.open(row.signId)
}
//
function feeBack(row) {
feedbackDialog.value.open(row.signId)
}
//
async function cancelDeal(row) {
try {
//
await message.confirm('是否确认取消登记该线索?')
//
await SignApi.cancelDeal(row.signId)
message.success('取消登记成功!')
//
await getTableList()
} catch (err) {
console.log(err)
}
}
const extraFeeDialog = ref()
function handleAddFee(row) {
extraFeeDialog.value.open(row.signId)
}
function getOptions() {
//
getSimpleProductList().then((data) => {
prodOptions.value = data
})
}
const deliveryDialog = ref()
function handleDelivery(row) {
deliveryDialog.value.open(row.signId)
}
const userOptions = ref([])
onMounted(() => {
getUserOption().then((data) => {
userOptions.value = data
getCurdSchemas()
})
getOptions()
})
</script>
<style lang="scss" scoped></style>

@ -9,89 +9,55 @@
label-width="0"
style="display: inline"
>
<template v-if="appStore.getAppInfo?.instanceType == 1">
<el-form-item style="margin-bottom: 10px">
<el-select
v-model="searchForm.signSchool"
placeholder="选择驾校"
filterable
clearable
@change="changeSchool"
>
<el-option
v-for="item in schoolOptions"
:key="item.schoolId"
:label="item.schoolName"
:value="item.schoolId"
/>
</el-select>
</el-form-item>
<el-form-item style="margin-bottom: 10px">
<el-select
v-model="searchForm.signPlace"
placeholder="选择场地"
filterable
clearable
:disabled="!searchForm.signSchool"
@change="changePlace"
>
<el-option
v-for="item in placeOptions"
:key="item.placeId"
:label="item.name"
:value="item.placeId"
/>
</el-select>
</el-form-item>
<el-form-item style="margin-bottom: 10px">
<el-select
v-model="searchForm.signClass"
:disabled="!searchForm.signPlace"
placeholder="选择班型"
filterable
clearable
>
<el-option
v-for="item in classOptions"
:key="item.typeId"
:label="item.typeName"
:value="item.typeId"
/>
</el-select>
</el-form-item>
</template>
<template v-else-if="appStore.getAppInfo?.instanceType == 2">
<el-form-item>
<el-select
v-model="searchForm.signProduct"
placeholder="选择成交产品"
filterable
@change="searchForm.specsId = undefined"
>
<el-option
v-for="item in prodOptions"
:key="item.productId"
:label="item.productName"
:value="item.productId"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-select
v-model="searchForm.specsId"
placeholder="选择规格"
filterable
:disabled="!searchForm.signProduct"
>
<el-option
v-for="item in specsOptions(searchForm.signProduct)"
:key="item.specsId"
:label="item.specsName"
:value="item.specsId"
/>
</el-select>
</el-form-item>
</template>
<el-form-item style="margin-bottom: 10px">
<el-select
v-model="searchForm.signSchool"
placeholder="选择驾校"
filterable
clearable
@change="changeSchool"
>
<el-option
v-for="item in schoolOptions"
:key="item.schoolId"
:label="item.schoolName"
:value="item.schoolId"
/>
</el-select>
</el-form-item>
<el-form-item style="margin-bottom: 10px">
<el-select
v-model="searchForm.signPlace"
placeholder="选择场地"
filterable
clearable
:disabled="!searchForm.signSchool"
@change="changePlace"
>
<el-option
v-for="item in placeOptions"
:key="item.placeId"
:label="item.name"
:value="item.placeId"
/>
</el-select>
</el-form-item>
<el-form-item style="margin-bottom: 10px">
<el-select
v-model="searchForm.signClass"
:disabled="!searchForm.signPlace"
placeholder="选择班型"
filterable
clearable
>
<el-option
v-for="item in classOptions"
:key="item.typeId"
:label="item.typeName"
:value="item.typeId"
/>
</el-select>
</el-form-item>
</el-form>
<Search
v-if="!loading"
@ -143,16 +109,6 @@
>
售后
</el-button>
<el-button
type="primary"
class="mr-10px"
link
v-if="appStore.getAppInfo?.instanceType == 2"
style="padding: 0; margin-left: 0"
v-hasPermi="['clue:order:send']"
>
发货
</el-button>
<el-button
type="primary"
class="mr-10px"
@ -191,16 +147,13 @@ import * as SignApi from '@/api/clue/sign'
import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { getPlaceList } from '@/api/school/place'
import { getClassTypePage } from '@/api/school/class'
import { getSimpleProductList } from '@/api/mall/product'
import DialogOrder from './DialogOrder.vue'
import DialogFeeback from './DialogFeeback.vue'
import DialogAfterSale from './DialogAfterSale.vue'
import { removeNullField } from '@/utils'
import { useAppStore } from '@/store/modules/app'
const appStore = useAppStore()
const message = useMessage() //
const allSchemas = ref({})
@ -209,18 +162,6 @@ const orderDetailDialog = ref()
const searchRef = ref()
const schoolOptions = ref([])
const allPlaceOptions = ref([])
const prodOptions = ref([])
const specsOptions = computed({
get() {
return (prodId) => {
if (prodId) {
return prodOptions.value.find((it) => it.productId == prodId).productSpecList
}
return []
}
}
})
const searchForm = ref({
signSchool: undefined,
@ -340,18 +281,11 @@ async function getClassTypeOptions() {
}
function getOptions() {
if (appStore.getAppInfo?.instanceType == 1) {
//
getPlaceList().then((data) => {
schoolOptions.value = data.schoolList
allPlaceOptions.value = data.placeList
})
} else {
//
getSimpleProductList().then((data) => {
prodOptions.value = data
})
}
//
getPlaceList().then((data) => {
schoolOptions.value = data.schoolList
allPlaceOptions.value = data.placeList
})
}
const userOptions = ref([])

@ -1,7 +1,10 @@
<template>
<el-tabs v-model="tabName">
<el-tab-pane label="成交列表" name="list">
<OrderList v-if="tabName == 'list'" />
<template v-if="tabName == 'list'">
<OrderList v-if="appStore.getAppInfo?.instanceType == 1" />
<MallOrderList v-else-if="appStore.getAppInfo?.instanceType == 2" />
</template>
</el-tab-pane>
<el-tab-pane label="回款申请" name="commission">
<Reback v-if="tabName == 'commission'" />
@ -10,7 +13,7 @@
<AfterSales v-if="tabName == 'aftersale'" />
</el-tab-pane>
<el-tab-pane label="发货列表" name="delivery" v-if="appStore.getAppInfo?.instanceType == 2">
<OrderList v-if="tabName == 'delivery'" />
<Delivery v-if="tabName == 'delivery'" />
</el-tab-pane>
</el-tabs>
</template>
@ -18,8 +21,10 @@
<script setup name="ClueOrder">
import { useAppStore } from '@/store/modules/app'
import OrderList from './Comp/OrderList.vue'
import MallOrderList from './Comp/MallOrderList.vue'
import Reback from './Comp/Reback.vue'
import AfterSales from './Comp/AfterSales.vue'
import Delivery from './Comp/Delivery.vue'
const appStore = useAppStore()
const tabName = ref('list')

@ -199,23 +199,23 @@
</el-table>
</el-col>
<el-col :span="24" :offset="0" class="mb-18px">
<el-divider direction="horizontal" content-position="left">额外支出</el-divider>
<el-divider direction="horizontal" content-position="left">其他费用</el-divider>
<el-button
class="mb-5px"
type="primary"
size="small"
@click="form.extraPay.push({ extraPayType: undefined, extraPayMoney: 0 })"
>
添加额外支出
添加其他费用
</el-button>
<el-table :data="form.extraPay" border size="small">
<el-table-column type="index" width="50" />
<el-table-column prop="extraPayType" label="额外支出类型" width="200px">
<el-table-column prop="extraPayType" label="费用类型" width="200px">
<template #default="{ row }">
<el-select
v-model="row.extraPayType"
size="small"
placeholder="额外支出类型"
placeholder="其他费用类型"
filterable
>
<el-option
@ -227,7 +227,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="extraPayMoney" label="额外支出金额" width="180px">
<el-table-column prop="extraPayMoney" label="费用金额" width="180px">
<template #default="{ row }">
<el-input-number v-model="row.extraPayMoney" size="small" :controls="false" />
</template>
@ -294,7 +294,6 @@ const info = ref({})
const formLoading = ref(false)
const appStore = useAppStore()
const { t } = useI18n() //
const message = useMessage() //
const props = defineProps({
@ -320,7 +319,7 @@ const showSchema = computed(() => {
return [...props.schema, ...arr]
})
const extraPayOptions = getDictOptions('extra_pay_type')
const extraPayOptions = getDictOptions('other_pay_type')
async function open(id) {
try {
@ -346,6 +345,7 @@ function resetForm(id) {
}
}
const emit = defineEmits(['success'])
const formRef = ref()
async function handleSave() {
//
@ -354,11 +354,11 @@ async function handleSave() {
if (!valid) return
if (form.value.extraPay.some((it) => !it.extraPayType || it.extraPayMoney == null)) {
message.info('请将支付类型及支出金额填写完整!')
message.info('请将费用类型及费用金额填写完整!')
return
}
if (form.value.signProducts.some((it) => !it.productId || !item.specsId || !it.signNum)) {
if (form.value.signProducts.some((it) => !it.productId || !it.specsId || !it.signNum)) {
message.info('请将成交产品信息填写完整!')
return
}
@ -377,7 +377,7 @@ async function handleSave() {
}
}
await createSign(params)
message.success(t('common.createSuccess'))
message.success('登记成功!')
show.value = false
//
emit('success')

@ -109,7 +109,7 @@
<el-button
type="primary"
link
:disabled="scope.row.state"
:disabled="scope.row.state == '已成交'"
@click="handleSuccess(scope.row)"
v-hasPermi="['clue:pool:enroll']"
>

@ -0,0 +1,107 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
<el-form
ref="formRef"
v-loading="formLoading"
:model="formData"
:rules="formRules"
label-width="80px"
>
<el-form-item label="费用项" prop="label">
<el-input v-model="formData.label" placeholder="请输入费用项" />
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input v-model="formData.sort" placeholder="请输入排序" type="number" :min="0" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
type="textarea"
v-model="formData.remark"
placeholder="请输入备注"
:autosize="{ minRows: 4, maxRows: 8 }"
/>
</el-form-item>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script name="DialogOtherPay" setup>
import * as dictApi from '@/api/system/dict/dict.data'
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
label: '',
sort: 1,
remark: ''
})
const formRules = reactive({
label: [{ required: true, message: '费用项不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type, id) => {
dialogVisible.value = true
dialogTitle.value = type == 'update' ? '修改费用项' : '新增费用项'
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await dictApi.getDictData(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!formRef.value) return
const valid = await formRef.value.validate()
if (!valid) return
//
formLoading.value = true
try {
if (!formData.value.value) {
formData.value.value = formData.value.label
}
if (formType.value === 'create') {
await dictApi.createDictData(formData.value)
message.success(t('common.createSuccess'))
} else {
await dictApi.updateDictData(formData.value)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
label: '',
sort: 1,
status: 0,
dictType: 'other_pay_type',
remark: ''
}
formRef.value?.resetFields()
}
</script>

@ -20,7 +20,7 @@
/>
</template>
</el-table-column>
<el-table-column label="操作" width="80px">
<el-table-column label="操作" width="80px" fixed="right">
<template #default="{ row }">
<el-button type="primary" text style="padding: 0" @click="remove(row.clueParamId)"
>删除</el-button

@ -20,7 +20,7 @@
/>
</template>
</el-table-column>
<el-table-column label="操作" width="80px">
<el-table-column label="操作" width="80px" fixed="right">
<template #default="{ row }">
<el-button type="primary" text style="padding: 0" @click="remove(row.clueParamId)"
>删除</el-button

@ -0,0 +1,126 @@
<template>
<div>
<el-form ref="queryForm" :model="searchForm" label-width="0" inline>
<el-form-item>
<el-input
v-model="searchForm.name"
placeholder="请输入名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
<el-button type="primary" @click="openForm('create', null)">新增</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableList">
<el-table-column prop="label" label="费用项" />
<el-table-column prop="sort" label="排序" width="100px" />
<el-table-column prop="remark" label="备注" />
<el-table-column
label="创建时间"
prop="createTime"
width="180px"
:formatter="dateFormatter"
/>
<el-table-column label="操作">
<template #default="scope">
<el-button
type="primary"
:disabled="!scope.row.editable"
text
@click="openForm('update', scope.row.id)"
>
修改
</el-button>
<el-button
type="danger"
:disabled="!scope.row.editable"
text
@click="handleDelete(scope.row.id)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<Pagination
v-model:limit="searchForm.pageSize"
v-model:page="searchForm.pageNo"
:total="total"
@pagination="getList"
/>
<DialogOtherPay ref="otherOayDialog" @success="handleQuery" />
</div>
</template>
<script setup name="OtherPayType">
import { dateFormatter } from '@/utils/formatTime'
import DialogOtherPay from './DialogOtherPay.vue'
import * as dictApi from '@/api/system/dict/dict.data'
const { t } = useI18n() //
const message = useMessage() //
const searchForm = ref({
label: '',
pageSize: 20,
pageNo: 1,
dictType: 'other_pay_type'
})
const total = ref(0)
const otherOayDialog = ref()
const tableList = ref([])
const loading = ref(false)
function handleQuery() {
searchForm.value.pageNo = 1
getList()
}
function resetQuery() {
searchForm.value = {
label: '',
pageSize: 20,
pageNo: 1,
dictType: 'other_pay_type'
}
getList()
}
async function getList() {
loading.value = true
try {
const data = await dictApi.getDictDataPage(searchForm.value)
tableList.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
function openForm(type, id) {
otherOayDialog.value.open(type, id)
}
async function handleDelete(id) {
try {
//
await message.delConfirm()
//
await dictApi.deleteDictData(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
onMounted(() => {
handleQuery()
})
</script>
<style lang="scss" scoped></style>

@ -30,6 +30,9 @@
<el-tab-pane label="额外支出项" :name="36" v-if="checkPermi(['clue:setting:extra-fee'])">
<ExtraFeeType v-if="tabIndex == 36" />
</el-tab-pane>
<el-tab-pane label="其他费用项" :name="37" v-if="checkPermi(['clue:setting:other-pay'])">
<OtherPayType v-if="tabIndex == 37" />
</el-tab-pane>
<el-tab-pane label="常规设置" :name="40" v-if="checkPermi(['clue:setting:general-setting'])">
<GeneralSet v-if="tabIndex == 40" />
</el-tab-pane>
@ -49,6 +52,7 @@ import ClueSend from './Comp/ClueSend.vue'
// import MsgSend from './Comp/MsgSend.vue'
import IntentionStatus from './Comp/IntentionStatus.vue'
import ExtraFeeType from './Comp/ExtraFeeType.vue'
import OtherPayType from './Comp/OtherPayType.vue'
import GeneralSet from './Comp/GeneralSet.vue'
import { checkPermi } from '@/utils/permission'

@ -30,13 +30,27 @@
width="180px"
:formatter="dateFormatter"
/>
<el-table-column label="操作">
<el-table-column label="操作" width="150px">
<template #default="scope">
<el-button type="primary" text @click="openForm('update', scope.row)">修改</el-button>
<el-button type="primary" text @click="openForm('createChildren', scope.row)">
<el-button
type="primary"
style="padding: 0px"
text
@click="openForm('update', scope.row)"
>
修改
</el-button>
<el-button
type="primary"
style="padding: 0px"
text
@click="openForm('createChildren', scope.row)"
>
新增
</el-button>
<el-button type="danger" text @click="handleDelete(scope.row.id)">删除</el-button>
<el-button type="danger" style="padding: 0px" text @click="handleDelete(scope.row.id)">
删除
</el-button>
</template>
</el-table-column>
</el-table>

@ -20,7 +20,7 @@
/>
</template>
</el-table-column>
<el-table-column label="操作" width="80px">
<el-table-column label="操作" width="80px" fixed="right">
<template #default="{ row }">
<el-button type="primary" text style="padding: 0" @click="remove(row.clueParamId)"
>删除</el-button

Loading…
Cancel
Save