From 91a509d49d664e28f2dfbde9c5c0872f8fc66aad Mon Sep 17 00:00:00 2001
From: qsh <>
Date: Fri, 1 Nov 2024 18:13:44 +0800
Subject: [PATCH] sc
---
src/api/clue/sign.js | 10 ++
src/api/school/setting/supplier.js | 33 +++++
.../Clue/Order/Comp/DialogAddProduct.vue | 130 ++++++++++++++++++
src/views/Clue/Order/Comp/DialogDelivery.vue | 13 +-
src/views/Clue/Order/Comp/MallOrderList.vue | 38 +++++
src/views/Clue/Order/Comp/MallSettle.vue | 13 +-
src/views/Clue/Set/Comp/DialogSource.vue | 19 +--
.../MiniMall/MallSet/Comp/DialogSupplier.vue | 38 ++---
.../MiniMall/MallSet/Comp/SupplierSet.vue | 27 ++--
src/views/MiniMall/Purchase/index.vue | 12 +-
10 files changed, 280 insertions(+), 53 deletions(-)
create mode 100644 src/api/school/setting/supplier.js
create mode 100644 src/views/Clue/Order/Comp/DialogAddProduct.vue
diff --git a/src/api/clue/sign.js b/src/api/clue/sign.js
index 48e2c36..2cc2d5f 100644
--- a/src/api/clue/sign.js
+++ b/src/api/clue/sign.js
@@ -51,3 +51,13 @@ export const updateProduceSort = (data) => {
export const getSignProfit = (params) => {
return request.get({ url: '/admin-api/crm/sign/profit', params })
}
+
+// 新增产品
+export const addOrderProduct = (data) => {
+ return request.post({ url: '/admin-api/crm/sign-prodcut/create', data })
+}
+
+// 新增产品
+export const removeOrderProduct = (id) => {
+ return request.delete({ url: '/admin-api/crm/sign-prodcut/delete?id=' + id })
+}
diff --git a/src/api/school/setting/supplier.js b/src/api/school/setting/supplier.js
new file mode 100644
index 0000000..483ad6f
--- /dev/null
+++ b/src/api/school/setting/supplier.js
@@ -0,0 +1,33 @@
+import request from '@/config/axios'
+// 查询列表
+export const getSupplierPage = async (params) => {
+ return await request.get({ url: '/admin-api/crm/erp-supplier/page', params })
+}
+
+export const getSupplierSimpleList = async (params) => {
+ return await request.get({ url: '/admin-api/crm/erp-supplier/simple-list', params })
+}
+
+// 查询详情
+export const getSupplier = async (id) => {
+ return await request.get({ url: '/admin-api/crm/erp-supplier/get?id=' + id })
+}
+
+// 新增
+export const createSupplier = async (data) => {
+ return await request.post({
+ url: '/admin-api/crm/erp-supplier/create',
+ data: data,
+ isSubmitForm: true
+ })
+}
+
+// 修改
+export const updateSupplier = async (params) => {
+ return await request.put({ url: '/admin-api/crm/erp-supplier/update', data: params })
+}
+
+// 删除
+export const deleteSupplier = async (id) => {
+ return await request.delete({ url: '/admin-api/crm/erp-supplier/delete?id=' + id })
+}
diff --git a/src/views/Clue/Order/Comp/DialogAddProduct.vue b/src/views/Clue/Order/Comp/DialogAddProduct.vue
new file mode 100644
index 0000000..204c71d
--- /dev/null
+++ b/src/views/Clue/Order/Comp/DialogAddProduct.vue
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
diff --git a/src/views/Clue/Order/Comp/DialogDelivery.vue b/src/views/Clue/Order/Comp/DialogDelivery.vue
index 544eb9a..d4c4a6e 100644
--- a/src/views/Clue/Order/Comp/DialogDelivery.vue
+++ b/src/views/Clue/Order/Comp/DialogDelivery.vue
@@ -28,9 +28,9 @@
@@ -141,15 +141,18 @@
import { getSimpleWarehouseList, getRemainInventoryList } from '@/api/mall/warehouse'
import { createDelivery } from '@/api/clue/delivery'
import { getConfigList } from '@/api/system/set'
-import { getDictOptions } from '@/utils/dict'
+import { getSupplierSimpleList } from '@/api/school/setting/supplier'
import { getExtraFeeSimpleList } from '@/api/clue/extraFee'
const message = useMessage() // 消息弹窗
const warehouseOptions = ref([])
const extraPayOptions = ref([])
-const supplierOptions = getDictOptions('erp_supplier')
+const supplierOptions = ref([])
function getOptions() {
+ getSupplierSimpleList().then((data) => {
+ supplierOptions.value = data
+ })
getSimpleWarehouseList().then((data) => {
warehouseOptions.value = data
})
diff --git a/src/views/Clue/Order/Comp/MallOrderList.vue b/src/views/Clue/Order/Comp/MallOrderList.vue
index 31907e2..e20a70c 100644
--- a/src/views/Clue/Order/Comp/MallOrderList.vue
+++ b/src/views/Clue/Order/Comp/MallOrderList.vue
@@ -147,6 +147,15 @@
>
发货
+
+ 删除
+
@@ -228,6 +237,16 @@
>
取消登记
+
+ 添加产品
+
@@ -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 @@
-
+
-
+
@@ -108,9 +109,10 @@
@@ -147,6 +149,7 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
sourceName: '',
+ accountFee: undefined,
sort: 1,
remark: ''
})
@@ -224,8 +227,8 @@ function handleAddPrice() {
for (let i = 1; i <= 12; i++) {
obj.monthData.push({
month: i,
- costMoney: undefined,
- rechargeMoney: undefined,
+ consumeFee: 0,
+ rechargeFee: 0,
clueNum: 0
})
}
diff --git a/src/views/MiniMall/MallSet/Comp/DialogSupplier.vue b/src/views/MiniMall/MallSet/Comp/DialogSupplier.vue
index 0581691..bc31b19 100644
--- a/src/views/MiniMall/MallSet/Comp/DialogSupplier.vue
+++ b/src/views/MiniMall/MallSet/Comp/DialogSupplier.vue
@@ -1,5 +1,5 @@
-