diff --git a/src/api/erp/sale/customer/index.ts b/src/api/erp/sale/customer/index.ts
new file mode 100644
index 00000000..3aaefb56
--- /dev/null
+++ b/src/api/erp/sale/customer/index.ts
@@ -0,0 +1,58 @@
+import request from '@/config/axios'
+
+// ERP 客户 VO
+export interface CustomerVO {
+ id: number // 客户编号
+ name: string // 客户名称
+ contact: string // 联系人
+ mobile: string // 手机号码
+ telephone: string // 联系电话
+ email: string // 电子邮箱
+ fax: string // 传真
+ remark: string // 备注
+ status: number // 开启状态
+ sort: number // 排序
+ taxNo: string // 纳税人识别号
+ taxPercent: number // 税率
+ bankName: string // 开户行
+ bankAccount: string // 开户账号
+ bankAddress: string // 开户地址
+}
+
+// ERP 客户 API
+export const CustomerApi = {
+ // 查询客户分页
+ getCustomerPage: async (params: any) => {
+ return await request.get({ url: `/erp/customer/page`, params })
+ },
+
+ // 查询客户精简列表
+ getCustomerSimpleList: async () => {
+ return await request.get({ url: `/erp/customer/simple-list` })
+ },
+
+ // 查询客户详情
+ getCustomer: async (id: number) => {
+ return await request.get({ url: `/erp/customer/get?id=` + id })
+ },
+
+ // 新增客户
+ createCustomer: async (data: CustomerVO) => {
+ return await request.post({ url: `/erp/customer/create`, data })
+ },
+
+ // 修改客户
+ updateCustomer: async (data: CustomerVO) => {
+ return await request.put({ url: `/erp/customer/update`, data })
+ },
+
+ // 删除客户
+ deleteCustomer: async (id: number) => {
+ return await request.delete({ url: `/erp/customer/delete?id=` + id })
+ },
+
+ // 导出客户 Excel
+ exportCustomer: async (params) => {
+ return await request.download({ url: `/erp/customer/export-excel`, params })
+ }
+}
diff --git a/src/views/erp/sale/customer/CustomerForm.vue b/src/views/erp/sale/customer/CustomerForm.vue
new file mode 100644
index 00000000..da6e004f
--- /dev/null
+++ b/src/views/erp/sale/customer/CustomerForm.vue
@@ -0,0 +1,210 @@
+
+
+
+
diff --git a/src/views/erp/sale/customer/index.vue b/src/views/erp/sale/customer/index.vue
new file mode 100644
index 00000000..e79cccb9
--- /dev/null
+++ b/src/views/erp/sale/customer/index.vue
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/erp/stock/in/index.vue b/src/views/erp/stock/in/index.vue
index dd08c649..e5eb53cc 100644
--- a/src/views/erp/stock/in/index.vue
+++ b/src/views/erp/stock/in/index.vue
@@ -199,7 +199,7 @@
link
type="primary"
@click="handleUpdateStatus(scope.row.id, 20)"
- v-hasPermi="['erp:stock-in:update']"
+ v-hasPermi="['erp:stock-in:update-status']"
v-if="scope.row.status === 10"
>
审批
@@ -208,7 +208,7 @@
link
type="danger"
@click="handleUpdateStatus(scope.row.id, 10)"
- v-hasPermi="['erp:stock-in:update']"
+ v-hasPermi="['erp:stock-in:update-status']"
v-else
>
反审批
diff --git a/src/views/erp/stock/out/StockOutForm.vue b/src/views/erp/stock/out/StockOutForm.vue
index c8f04666..888475c2 100644
--- a/src/views/erp/stock/out/StockOutForm.vue
+++ b/src/views/erp/stock/out/StockOutForm.vue
@@ -34,7 +34,7 @@
class="!w-1/1"
>
formType.value === 'detail')
const formRef = ref() // 表单 Ref
-const supplierList = ref([]) // 客户列表
+const customerList = ref([]) // 客户列表
/** 子表的表单 */
const subTabsName = ref('item')
@@ -125,7 +126,7 @@ const open = async (type: string, id?: number) => {
}
}
// 加载客户列表
- supplierList.value = await SupplierApi.getSupplierSimpleList()
+ customerList.value = await CustomerApi.getCustomerSimpleList()
}
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
diff --git a/src/views/erp/stock/out/index.vue b/src/views/erp/stock/out/index.vue
index 39fd61b3..443fe736 100644
--- a/src/views/erp/stock/out/index.vue
+++ b/src/views/erp/stock/out/index.vue
@@ -51,7 +51,7 @@
class="!w-240px"
>
-
+
审批
@@ -208,7 +208,7 @@
link
type="danger"
@click="handleUpdateStatus(scope.row.id, 10)"
- v-hasPermi="['erp:stock-out:update']"
+ v-hasPermi="['erp:stock-out:update-status']"
v-else
>
反审批
@@ -249,6 +249,7 @@ import { SupplierApi, SupplierVO } from '@/api/erp/purchase/supplier'
import { UserVO } from '@/api/system/user'
import * as UserApi from '@/api/system/user'
import { erpCountTableColumnFormatter, erpPriceTableColumnFormatter } from '@/utils'
+import { CustomerApi, CustomerVO } from '@/api/erp/sale/customer'
/** ERP 其它出库单列表 */
defineOptions({ name: 'ErpStockOut' })
@@ -273,7 +274,7 @@ const queryFormRef = ref() // 搜索的表单
const exportLoading = ref(false) // 导出的加载中
const productList = ref([]) // 产品列表
const warehouseList = ref([]) // 仓库列表
-const supplierList = ref([]) // 客户列表 TODO 芋艿:需要改下
+const customerList = ref([]) // 客户列表
const userList = ref([]) // 用户列表
/** 查询列表 */
@@ -360,7 +361,7 @@ onMounted(async () => {
// 加载产品、仓库列表、客户
productList.value = await ProductApi.getProductSimpleList()
warehouseList.value = await WarehouseApi.getWarehouseSimpleList()
- supplierList.value = await SupplierApi.getSupplierSimpleList()
+ customerList.value = await CustomerApi.getCustomerSimpleList()
userList.value = await UserApi.getSimpleUserList()
})
// TODO 芋艿:可优化功能:列表界面,支持导入