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 @@ - + - +