diff --git a/.env.development b/.env.development
index bcbc94e..6480b17 100644
--- a/.env.development
+++ b/.env.development
@@ -8,18 +8,18 @@ VITE_OPEN = true
ENV = 'development'
# ADMIN 服务地址
-# VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 线上
+VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 线上
# VITE_ADMIN_PROXY_PATH = http://pjcloud.center.takin.cc/
# VITE_ADMIN_PROXY_PATH = http://localhost:9999/
-VITE_ADMIN_PROXY_PATH = http://192.168.101.50:9999/ # 邓-本地
-
+# VITE_ADMIN_PROXY_PATH = http://192.168.101.50:9999/ # 邓-本地
# VITE_ADMIN_PROXY_PATH = http://59.202.170.152:81/api # 正式环境
+
# 图片访问基础地址
-# VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api # 线上
+VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api # 线上
# VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc
# VITE_IMAGE_BASE_PATH = http://localhost:9999
-VITE_IMAGE_BASE_PATH = http://192.168.101.50:9999 # 邓-本地
+# VITE_IMAGE_BASE_PATH = http://192.168.101.50:9999 # 邓-本地
# VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api/ # 正式环境
# 代码生成服务地址
diff --git a/src/api/supermarketerp/smErpCgPlan.ts b/src/api/supermarketerp/smErpCgPlan.ts
index 9c2eb15..d8f86ea 100644
--- a/src/api/supermarketerp/smErpCgPlan.ts
+++ b/src/api/supermarketerp/smErpCgPlan.ts
@@ -55,3 +55,11 @@ export function getCgPlanSpuPage() {
method: "get",
})
}
+
+// 获取简要商品列表
+export function getErpSpuSimpleAll() {
+ return request({
+ url: "/supermarket/supermarketSpu/SimpleAll",
+ method: "get",
+ })
+}
diff --git a/src/api/supermarketerp/smErpInventoryRecordsItem.ts b/src/api/supermarketerp/smErpInventoryRecordsItem.ts
new file mode 100644
index 0000000..2ff6071
--- /dev/null
+++ b/src/api/supermarketerp/smErpInventoryRecordsItem.ts
@@ -0,0 +1,41 @@
+import request from "/@/utils/request"
+
+export function fetchList(query?: Object) {
+ return request({
+ url: '/supermarket/smErpInventoryRecordsItem/page',
+ method: 'get',
+ params: query
+ })
+}
+
+export function addObj(obj?: Object) {
+ return request({
+ url: '/supermarket/smErpInventoryRecordsItem',
+ method: 'post',
+ data: obj
+ })
+}
+
+export function getObj(id?: string) {
+ return request({
+ url: '/supermarket/smErpInventoryRecordsItem/' + id,
+ method: 'get'
+ })
+}
+
+export function delObjs(ids?: Object) {
+ return request({
+ url: '/supermarket/smErpInventoryRecordsItem',
+ method: 'delete',
+ data: ids
+ })
+}
+
+export function putObj(obj?: Object) {
+ return request({
+ url: '/supermarket/smErpInventoryRecordsItem',
+ method: 'put',
+ data: obj
+ })
+}
+
diff --git a/src/views/hard/hard-order/index.vue b/src/views/hard/hard-order/index.vue
index d5d8ab7..767c816 100644
--- a/src/views/hard/hard-order/index.vue
+++ b/src/views/hard/hard-order/index.vue
@@ -314,22 +314,22 @@ const print = async (row: any) => {
}
}
-const adminRefund = async (row: any) => {
- let loading: any = null
- try {
- await useMessage().delConfirm("是否同意退款?")
- loading = ElLoading.service({
- lock: true,
- text: "提交中",
- background: "rgba(0, 0, 0, 0.7)",
- })
- await hardInvoice.adminRefund({ id: row.id })
- useMessage().success("操作成功")
- getDataList()
- } finally {
- setTimeout(() => loading.close(), 500)
- }
-}
+// const adminRefund = async (row: any) => {
+// let loading: any = null
+// try {
+// await useMessage().delConfirm("是否同意退款?")
+// loading = ElLoading.service({
+// lock: true,
+// text: "提交中",
+// background: "rgba(0, 0, 0, 0.7)",
+// })
+// await hardInvoice.adminRefund({ id: row.id })
+// useMessage().success("操作成功")
+// getDataList()
+// } finally {
+// setTimeout(() => loading.close(), 500)
+// }
+// }
// 导出excel
const exportExcel = () => {
diff --git a/src/views/supermarketerp/smErpCgPlan/cgPlanOption.vue b/src/views/supermarketerp/smErpCgPlan/cgPlanOption.vue
index ab584a2..5ee1e0c 100644
--- a/src/views/supermarketerp/smErpCgPlan/cgPlanOption.vue
+++ b/src/views/supermarketerp/smErpCgPlan/cgPlanOption.vue
@@ -60,7 +60,7 @@
行新增
删除选中
- 重置数据
+ 清空数据
商品选择
@@ -258,13 +258,14 @@ import { storePrice } from "/@/utils/formatMoney"
// 基本表单数据类型
interface FormVO {
+ id?: string
planCode: string
orderNumber: string
planDate: string
supplierId: string
handlerUserId: string
remark: string
- [key: string]: string
+ [key: string]: string | undefined
}
// 可编辑表格行数据类型
@@ -289,6 +290,7 @@ const supplierTypeDict = ref([]) // 货商下拉选项
// 基本信息表单数据
const baseDataForm = reactive({
+ id: undefined,
planCode: "",
orderNumber: "",
planDate: "",
@@ -328,6 +330,7 @@ const validRules = ref>({
// 初始化数据
const getInitData = async () => {
+ baseDataForm.id = undefined
const id = route.query.id as string
if (id) {
// 获取数据
@@ -335,6 +338,7 @@ const getInitData = async () => {
getObj(id)
.then((res: any) => {
Object.assign(baseDataForm, {
+ id: res.data.id,
planCode: res.data.planCode,
orderNumber: res.data.orderNumber,
planDate: res.data.planDate,
@@ -347,6 +351,13 @@ const getInitData = async () => {
.finally(() => {
loading.value = false
})
+
+ // 获取货商选项 & 获取简要商品列表
+ // const [supplierTypeOptions, planCode] = await Promise.allSettled([getSupplierTypeOptions(), getPlanCode()]).then((results) =>
+ // results.map((result) => (result.status === "fulfilled" ? result.value : null)),
+ // )
+ // supplierTypeOptions && supplierTypeOptions.code === 0 && (supplierTypeDict.value = supplierTypeOptions.data)
+ // planCode && planCode.code === 0 && (baseDataForm.planCode = planCode.data)
}
// 获取货商选项 & 获取采购计划编号
@@ -541,11 +552,8 @@ const handleSelectDialogConfirm = () => {
// 整理数据
const cgPlanSpuItems = computed(() => {
- const a = state.editableTableData
- return a.map((item: any) => {
- console.log("xxxx")
-
- const unit = item.erpUnitVos.find((unitItem: any) => unitItem.id == item.unitId)
+ return state.editableTableData.map((item: any) => {
+ const unit = item.erpUnitVos.find((unitItem: any) => unitItem.id === item.unitId)
return {
id: "",
erpSpuId: item.erpSpuId,
@@ -640,7 +648,7 @@ const submitData = async () => {
// 清空填写的数据 返回 true
const clearData = () => {
for (const key in baseDataForm) {
- if (key === "planCode") continue
+ if (key === "planCode" || key === "id") continue
baseDataForm[key] = ""
}
state.insertedRowNumber = 0
diff --git a/src/views/supermarketerp/smErpCgPlan/smErpCgPlanItem/form.vue b/src/views/supermarketerp/smErpCgPlan/smErpCgPlanItem/form.vue
deleted file mode 100644
index 0fb19a4..0000000
--- a/src/views/supermarketerp/smErpCgPlan/smErpCgPlanItem/form.vue
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/supermarketerp/smErpCgPlan/smErpCgPlanItem/index.vue b/src/views/supermarketerp/smErpCgPlan/smErpCgPlanItem/index.vue
deleted file mode 100644
index 83b99b9..0000000
--- a/src/views/supermarketerp/smErpCgPlan/smErpCgPlanItem/index.vue
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
- 新 增
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/supermarketerp/smErpInventoryRecords/smErpInventoryRecordsItem/form.vue b/src/views/supermarketerp/smErpInventoryRecords/smErpInventoryRecordsItem/form.vue
index b10bebb..1365033 100644
--- a/src/views/supermarketerp/smErpInventoryRecords/smErpInventoryRecordsItem/form.vue
+++ b/src/views/supermarketerp/smErpInventoryRecords/smErpInventoryRecordsItem/form.vue
@@ -1,192 +1,191 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
+ openDialog,
+})
+
diff --git a/src/views/supermarketerp/smErpInventoryRecords/smErpInventoryRecordsItem/index.vue b/src/views/supermarketerp/smErpInventoryRecords/smErpInventoryRecordsItem/index.vue
index 2880359..5adfc7b 100644
--- a/src/views/supermarketerp/smErpInventoryRecords/smErpInventoryRecordsItem/index.vue
+++ b/src/views/supermarketerp/smErpInventoryRecords/smErpInventoryRecordsItem/index.vue
@@ -1,77 +1,110 @@
-
-
-
-
-
- 新 增
-
-
- 删除
-
-
-
-
-
+
+
+
+
+ 新 增
+
+
+ 删除
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
+ @sort-change="sortChangeHandle"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
-
-
-
-
+
+
+
\ No newline at end of file
+ try {
+ await delObjs(ids)
+ getDataList()
+ useMessage().success("删除成功")
+ } catch (err: any) {
+ useMessage().error(err.msg)
+ }
+}
+