1
This commit is contained in:
1 parent
b88909e0ea
commit
626c29c049
3 files changed
+29
-13
No files matched your search
+5
-5
@@ -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/ # 正式环境
|
||||
|
||||
# 代码生成服务地址
|
||||
|
||||
@@ -55,3 +55,11 @@ export function getCgPlanSpuPage() {
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
||||
// 获取简要商品列表
|
||||
export function getErpSpuSimpleAll() {
|
||||
return request({
|
||||
url: "/supermarket/supermarketSpu/SimpleAll",
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
@@ -60,7 +60,7 @@
|
||||
行新增
|
||||
</el-button>
|
||||
<el-button @click="removeSelectRowEvent" :disabled="state.selectedRowsErpSpuIds.length <= 0">删除选中</el-button>
|
||||
<el-button @click="clearData">重置数据</el-button>
|
||||
<el-button @click="clearData">清空数据</el-button>
|
||||
<el-button @click="handleClickSpuSelect">商品选择</el-button>
|
||||
</el-row>
|
||||
|
||||
@@ -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<any[]>([]) // 货商下拉选项
|
||||
|
||||
// 基本信息表单数据
|
||||
const baseDataForm = reactive<FormVO>({
|
||||
id: undefined,
|
||||
planCode: "",
|
||||
orderNumber: "",
|
||||
planDate: "",
|
||||
@@ -328,6 +330,7 @@ const validRules = ref<VxeTablePropTypes.EditRules<RowVO>>({
|
||||
|
||||
// 初始化数据
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user