From 24e540f151c11e4da12ab3f3676923f116a41420 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Thu, 31 Oct 2024 17:18:21 +0800 Subject: [PATCH 1/3] sc --- src/views/Clue/Order/Comp/Reback.vue | 151 ++++++++++++++++++++--- src/views/Clue/Set/Comp/DialogSource.vue | 24 ++-- 2 files changed, 147 insertions(+), 28 deletions(-) diff --git a/src/views/Clue/Order/Comp/Reback.vue b/src/views/Clue/Order/Comp/Reback.vue index cbc2026..92ec83c 100644 --- a/src/views/Clue/Order/Comp/Reback.vue +++ b/src/views/Clue/Order/Comp/Reback.vue @@ -18,22 +18,83 @@ - - - - - + {{ row.isPayoff }} + + + + import * as FeebackApi from '@/api/clue/payment' import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user' +import { getPlaceList } from '@/api/school/place' +import { getClassTypeList } from '@/api/school/class' +import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { useUserStore } from '@/store/modules/user' import DialogFeebackAudit from './DialogFeebackAudit.vue' @@ -352,6 +440,13 @@ const searchForm = ref({ const userOptions = ref([]) const allUserOptions = ref([]) +const schoolOptions = ref([]) +const allPlaceOptions = ref([]) + +const placeOptions = computed(() => { + return allPlaceOptions.value.filter((it) => it.schoolId == searchForm.value.signSchool) +}) + const tableList = ref([]) const total = ref(0) @@ -373,11 +468,30 @@ function handleReset() { applyUser: undefined, checkTime: [], mobile: undefined, + signSchool: undefined, + signPlace: undefined, + signClass: undefined, pageNo: 1, pageSize: 20 } } +function changeSchool() { + searchForm.value.signPlace = undefined + searchForm.value.signClass = undefined +} + +function changePlace() { + searchForm.value.signClass = undefined + getClassTypeOptions() +} + +const classOptions = ref([]) +async function getClassTypeOptions() { + const data = await getClassTypeList({ placeId: searchForm.value.signPlace, status: 0 }) + classOptions.value = data +} + const totalInfo = ref({}) const loading = ref(false) async function getList() { @@ -428,6 +542,11 @@ function handleAudit(row) { } function getOptions() { + // 驾校 + getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => { + schoolOptions.value = data.schoolList + allPlaceOptions.value = data.placeList + }) getUserOption().then((data) => { userOptions.value = data }) diff --git a/src/views/Clue/Set/Comp/DialogSource.vue b/src/views/Clue/Set/Comp/DialogSource.vue index 02c22a1..5ada67f 100644 --- a/src/views/Clue/Set/Comp/DialogSource.vue +++ b/src/views/Clue/Set/Comp/DialogSource.vue @@ -24,8 +24,8 @@ - - + + 总价 单价 @@ -56,7 +56,7 @@ 线索成本 添加年份 - + @@ -238,6 +257,7 @@ + @@ -252,6 +272,7 @@ import DialogFeeback from './DialogFeeback.vue' import DialogAfterSale from './DialogAfterSale.vue' import DialogExtraFee from './DialogExtraPay.vue' import DialogDelivery from './DialogDelivery.vue' +import DialogAddProduct from './DialogAddProduct.vue' import { removeNullField } from '@/utils' import { formatDate } from '@/utils/formatTime' @@ -404,6 +425,11 @@ function handleDelivery(row) { deliveryDialog.value.open(row) } +const addProductDialog = ref() +function handleAddProduct(row) { + addProductDialog.value.open(row.signId, prodOptions.value) +} + const batchIds = ref([]) function handleSelectionChange(val) { batchIds.value = val.map((it) => it.signId) @@ -460,6 +486,18 @@ function handleBatchUpdateInstall() { } } +async function handleRemoveProduct(row) { + try { + // 修改状态的二次确认 + await message.confirm(`确认要删除${row.productName}吗?`) + // 发起修改状态 + await SignApi.removeOrderProduct(row.id) + message.success('删除成功') + // 刷新列表 + getTableList() + } catch {} +} + async function handleChangeProdoce(row) { try { // 修改状态的二次确认 diff --git a/src/views/Clue/Order/Comp/MallSettle.vue b/src/views/Clue/Order/Comp/MallSettle.vue index 3117194..e6d00af 100644 --- a/src/views/Clue/Order/Comp/MallSettle.vue +++ b/src/views/Clue/Order/Comp/MallSettle.vue @@ -116,9 +116,9 @@ > @@ -267,7 +267,7 @@ import { getSimpleUserList as getUserOption } from '@/api/system/user' import { getSimpleProductList } from '@/api/mall/product' import * as SettleApi from '@/api/clue/settle' -import { getDictOptions } from '@/utils/dict' +import { getSupplierSimpleList } from '@/api/school/setting/supplier' import { removeNullField } from '@/utils/index' import { dateFormatter } from '@/utils/formatTime' @@ -419,9 +419,12 @@ async function handleSaveSettle() { const userOptions = ref([]) const prodOptions = ref([]) -const supplierOptions = getDictOptions('erp_supplier') +const supplierOptions = ref([]) function getOptions() { + getSupplierSimpleList().then((data) => { + supplierOptions.value = data + }) // 产品 getSimpleProductList().then((data) => { prodOptions.value = data diff --git a/src/views/Clue/Set/Comp/DialogSource.vue b/src/views/Clue/Set/Comp/DialogSource.vue index 282b3e6..9ee9ee2 100644 --- a/src/views/Clue/Set/Comp/DialogSource.vue +++ b/src/views/Clue/Set/Comp/DialogSource.vue @@ -42,9 +42,9 @@ - + - +