Merge remote-tracking branch 'origin/master'

This commit is contained in:
zjf committed 2025-06-04 20:25:09 +08:00
commit 7cab441b5e
8 files changed
+47 -87

No files matched your search

@@ -174,9 +174,8 @@
<!-- 商品选择对话框 -->
<select-dialog ref="erpSpuSelectDialogRef" :selectedRows="state.editableTableData" @getSelectedRows="getSelectedRows" />
<linkCodeDialog
ref="linkCgPlanDialogRef"
v-model="state.linkCgPlanDialogVisible"
<link-code-dialog
ref="linkCodeDialogRef"
title="关联采购订单"
:getTableData="() => getCgInventoryPage({ inventoryType: '3' })"
@getSelectedLinkCode="getSelectedLinkCode"
@@ -192,7 +191,7 @@ import { getPlanCode, getErpSpuSimpleAll, getCgInventoryPage } from "/@/api/supe
import { VxeTableEvents, VxeTablePropTypes, type VxeTableInstance } from "vxe-table"
import { formatDate } from "/@/utils/formatTime"
import { Search } from "@element-plus/icons-vue"
import linkCodeDialog from "/@/views/supermarketerp/components/linkCodeDialog.vue"
import LinkCodeDialog from "/@/views/supermarketerp/components/link-code-dialog.vue"
import { displayPrice } from "/@/utils/formatMoney"
import { tablePrint } from "../../supermarketUtils"
import { useSmProcessFormAction } from "/@/hooks/smProcessFormAction"
@@ -214,7 +213,7 @@ const emit = defineEmits(["close"])
const loading = ref(false) // 采购计划加载
const disabled = ref(false)
const erpSpuSelectDialogRef = ref() // 商品选择对话框ref
const linkCgPlanDialogRef = ref() // 关联采购申请单对话框ref
const linkCodeDialogRef = ref() // 关联采购申请单对话框ref
const baseDataFormRef = ref() // 基本数据表单ref
const editableTableRef = ref<VxeTableInstance<any>>() // 可编辑表格ref
const baseDataInfoRef = ref() // 基本信息ref
@@ -238,16 +237,11 @@ const state = reactive<{
erpSpuItemsMemo: any[]
selectedRowsErpSpuIds: string[]
erpSpuSimpleAll: any
linkCodeVisible: boolean
linkCgPlanDialogVisible: boolean
}>({
editableTableData: [], // 可编辑表格数据
erpSpuItemsMemo: [], // 请求到的可编辑表格商品数据的缓存
selectedRowsErpSpuIds: [], // 可编辑表格已选行的ErpSpuId
erpSpuSimpleAll: [], // 简要商品列表
linkCodeVisible: false, // 关联采购申请单对话框开关
linkCgPlanDialogVisible: false, // 关联采购申请单对话框开关
})
// 基本信息表单校验规则
@@ -299,7 +293,7 @@ const getInitData = async () => {
}
// 点击关联采购申请编号
const handleClickLinkCode = () => linkCgPlanDialogRef.value.openLinkCodeDialog(3)
const handleClickLinkCode = () => linkCodeDialogRef.value.openLinkCodeDialog(3)
// 获取选择的采购申请
const getSelectedLinkCode = (selectionRows: any) => {
@@ -308,7 +302,6 @@ const getSelectedLinkCode = (selectionRows: any) => {
baseDataForm.linkCode = selectionRows.inventoryCode
state.editableTableData = selectionRows.items
state.erpSpuItemsMemo = selectionRows.items
state.linkCgPlanDialogVisible = false
}
// 删除选中的行
@@ -179,9 +179,8 @@
<!-- 商品选择对话框 -->
<select-dialog ref="erpSpuSelectDialogRef" :selectedRows="state.editableTableData" @getSelectedRows="getSelectedRows" />
<linkCodeDialog
ref="linkCgPlanDialogRef"
v-model="state.linkCgPlanDialogVisible"
<link-code-dialog
ref="linkCodeDialogRef"
title="关联补货申请"
:getTableData="getCgsqPage"
@getSelectedLinkCode="getSelectedLinkCode"
@@ -197,7 +196,7 @@ import { getPlanCode, getErpSpuSimpleAll, getCgsqPage } from "/@/api/supermarket
import { VxeTableEvents, VxeTablePropTypes, type VxeTableInstance } from "vxe-table"
import { formatDate } from "/@/utils/formatTime"
import { Search } from "@element-plus/icons-vue"
import linkCodeDialog from "/@/views/supermarketerp/components/linkCodeDialog.vue"
import LinkCodeDialog from "/@/views/supermarketerp/components/link-code-dialog.vue"
import { displayPrice } from "/@/utils/formatMoney"
import { tablePrint } from "../../supermarketUtils"
import { useSmProcessFormAction } from "/@/hooks/smProcessFormAction"
@@ -219,7 +218,7 @@ const emit = defineEmits(["close"])
const loading = ref(false) // 采购计划加载
const disabled = ref(false)
const erpSpuSelectDialogRef = ref() // 商品选择对话框ref
const linkCgPlanDialogRef = ref() // 关联采购申请单对话框ref
const linkCodeDialogRef = ref() // 关联采购申请单对话框ref
const baseDataFormRef = ref() // 基本数据表单ref
const editableTableRef = ref<VxeTableInstance<any>>() // 可编辑表格ref
const baseDataInfoRef = ref() // 基本信息ref
@@ -244,15 +243,11 @@ const state = reactive<{
erpSpuItemsMemo: any[]
selectedRowsErpSpuIds: string[]
erpSpuSimpleAll: any
linkCodeVisible: boolean
linkCgPlanDialogVisible: boolean
}>({
editableTableData: [], // 可编辑表格数据
erpSpuItemsMemo: [], // 请求到的可编辑表格商品数据的缓存
selectedRowsErpSpuIds: [], // 可编辑表格已选行的ErpSpuId
erpSpuSimpleAll: [], // 简要商品列表
linkCodeVisible: false, // 关联采购申请单对话框开关
linkCgPlanDialogVisible: false, // 关联采购申请单对话框开关
})
// 基本信息表单校验规则
@@ -304,7 +299,7 @@ const getInitData = async () => {
}
// 点击关联采购申请编号
const handleClickLinkCode = () => linkCgPlanDialogRef.value.openLinkCodeDialog(1)
const handleClickLinkCode = () => linkCodeDialogRef.value.openLinkCodeDialog(1)
// 获取选择的采购申请
const getSelectedLinkCode = (selectionRows: any) => {
@@ -313,7 +308,6 @@ const getSelectedLinkCode = (selectionRows: any) => {
baseDataForm.linkCode = selectionRows.planCode
state.editableTableData = selectionRows.items
state.erpSpuItemsMemo = selectionRows.items
state.linkCgPlanDialogVisible = false
}
// 删除选中的行
@@ -180,9 +180,8 @@
<!-- 商品选择对话框 -->
<select-dialog ref="erpSpuSelectDialogRef" :selectedRows="state.editableTableData" @getSelectedRows="getSelectedRows" />
<linkCodeDialog
ref="linkCgPlanDialogRef"
v-model="state.linkCgPlanDialogVisible"
<link-code-dialog
ref="linkCodeDialogRef"
title="关联采购订单"
:getTableData="getCgddPage"
@getSelectedLinkCode="getSelectedLinkCode"
@@ -198,7 +197,7 @@ import { getPlanCode, getErpSpuSimpleAll, getCgddPage } from "/@/api/supermarket
import { VxeTableEvents, VxeTablePropTypes, type VxeTableInstance } from "vxe-table"
import { formatDate } from "/@/utils/formatTime"
import { Search } from "@element-plus/icons-vue"
import linkCodeDialog from "/@/views/supermarketerp/components/linkCodeDialog.vue"
import LinkCodeDialog from "/@/views/supermarketerp/components/link-code-dialog.vue"
import { displayPrice, storePrice } from "/@/utils/formatMoney"
import { tablePrint } from "../../supermarketUtils"
import { useSmProcessFormAction } from "/@/hooks/smProcessFormAction"
@@ -220,7 +219,7 @@ const emit = defineEmits(["close"])
const loading = ref(false) // 采购计划加载
const disabled = ref(false)
const erpSpuSelectDialogRef = ref() // 商品选择对话框ref
const linkCgPlanDialogRef = ref() // 关联采购申请单对话框ref
const linkCodeDialogRef = ref() // 关联采购申请单对话框ref
const baseDataFormRef = ref() // 基本数据表单ref
const editableTableRef = ref<VxeTableInstance<any>>() // 可编辑表格ref
const baseDataInfoRef = ref() // 基本信息ref
@@ -244,16 +243,11 @@ const state = reactive<{
erpSpuItemsMemo: any[]
selectedRowsErpSpuIds: string[]
erpSpuSimpleAll: any
linkCodeVisible: boolean
linkCgPlanDialogVisible: boolean
}>({
editableTableData: [], // 可编辑表格数据
erpSpuItemsMemo: [], // 请求到的可编辑表格商品数据的缓存
selectedRowsErpSpuIds: [], // 可编辑表格已选行的ErpSpuId
erpSpuSimpleAll: [], // 简要商品列表
linkCodeVisible: false, // 关联采购申请单对话框开关
linkCgPlanDialogVisible: false, // 关联采购申请单对话框开关
})
// 基本信息表单校验规则
@@ -317,7 +311,7 @@ const getInitData = async () => {
}
// 点击关联采购申请编号
const handleClickLinkCode = () => linkCgPlanDialogRef.value.openLinkCodeDialog(2)
const handleClickLinkCode = () => linkCodeDialogRef.value.openLinkCodeDialog(2)
// 获取选择的采购申请
const getSelectedLinkCode = (selectionRows: any) => {
@@ -334,7 +328,6 @@ const getSelectedLinkCode = (selectionRows: any) => {
unitObj: {},
realPrice: displayPrice(item.purchasePrice, ""),
}))
state.linkCgPlanDialogVisible = false
}
// 删除选中的行
@@ -206,9 +206,8 @@
<!-- 商品选择对话框 -->
<select-dialog ref="erpSpuSelectDialogRef" :selectedRows="state.editableTableData" @getSelectedRows="getSelectedRows" />
<linkCodeDialog
ref="linkCgPlanDialogRef"
v-model="state.linkCgPlanDialogVisible"
<link-code-dialog
ref="linkCodeDialogRef"
title="关联采购订单"
:getTableData="() => getCgInventoryPage({ inventoryType: '5' })"
@getSelectedLinkCode="getSelectedLinkCode"
@@ -224,7 +223,7 @@ import { getPlanCode, getErpSpuSimpleAll, getCgInventoryPage } from "/@/api/supe
import { VxeTableEvents, VxeTablePropTypes, type VxeTableInstance } from "vxe-table"
import { formatDate } from "/@/utils/formatTime"
import { Search } from "@element-plus/icons-vue"
import linkCodeDialog from "/@/views/supermarketerp/components/linkCodeDialog.vue"
import LinkCodeDialog from "/@/views/supermarketerp/components/link-code-dialog.vue"
import { displayPrice, storePrice } from "/@/utils/formatMoney"
import { tablePrint } from "../../supermarketUtils"
import { useSmProcessFormAction } from "/@/hooks/smProcessFormAction"
@@ -246,7 +245,7 @@ const emit = defineEmits(["close"])
const loading = ref(false) // 采购计划加载
const disabled = ref(false)
const erpSpuSelectDialogRef = ref() // 商品选择对话框ref
const linkCgPlanDialogRef = ref() // 关联采购申请单对话框ref
const linkCodeDialogRef = ref() // 关联采购申请单对话框ref
const baseDataFormRef = ref() // 基本数据表单ref
const editableTableRef = ref<VxeTableInstance<any>>() // 可编辑表格ref
const baseDataInfoRef = ref() // 基本信息ref
@@ -271,16 +270,11 @@ const state = reactive<{
erpSpuItemsMemo: any[]
selectedRowsErpSpuIds: string[]
erpSpuSimpleAll: any
linkCodeVisible: boolean
linkCgPlanDialogVisible: boolean
}>({
editableTableData: [], // 可编辑表格数据
erpSpuItemsMemo: [], // 请求到的可编辑表格商品数据的缓存
selectedRowsErpSpuIds: [], // 可编辑表格已选行的ErpSpuId
erpSpuSimpleAll: [], // 简要商品列表
linkCodeVisible: false, // 关联采购申请单对话框开关
linkCgPlanDialogVisible: false, // 关联采购申请单对话框开关
})
// 合计金额表单数据
@@ -345,7 +339,7 @@ const getInitData = async () => {
}
// 点击关联采购申请编号
const handleClickLinkCode = () => linkCgPlanDialogRef.value.openLinkCodeDialog(3)
const handleClickLinkCode = () => linkCodeDialogRef.value.openLinkCodeDialog(3)
// 获取选择的采购申请
const getSelectedLinkCode = (selectionRows: any) => {
@@ -354,7 +348,6 @@ const getSelectedLinkCode = (selectionRows: any) => {
baseDataForm.linkCode = selectionRows.inventoryCode
state.editableTableData = selectionRows.items
state.erpSpuItemsMemo = selectionRows.items
state.linkCgPlanDialogVisible = false
}
// 删除选中的行
@@ -198,9 +198,8 @@
<!-- 商品选择对话框 -->
<select-dialog ref="erpSpuSelectDialogRef" :selectedRows="state.editableTableData" @getSelectedRows="getSelectedRows" />
<linkCodeDialog
ref="linkCgPlanDialogRef"
v-model="state.linkCgPlanDialogVisible"
<link-code-dialog
ref="linkCodeDialogRef"
title="关联采购订单"
:getTableData="getCgddPage"
@getSelectedLinkCode="getSelectedLinkCode"
@@ -216,7 +215,7 @@ import { getPlanCode, getErpSpuSimpleAll, getCgddPage } from "/@/api/supermarket
import { VxeTableEvents, VxeTablePropTypes, type VxeTableInstance } from "vxe-table"
import { formatDate } from "/@/utils/formatTime"
import { Search } from "@element-plus/icons-vue"
import linkCodeDialog from "/@/views/supermarketerp/components/linkCodeDialog.vue"
import LinkCodeDialog from "/@/views/supermarketerp/components/link-code-dialog.vue"
import { displayPrice, storePrice } from "/@/utils/formatMoney"
import { tablePrint } from "../../supermarketUtils"
import { useSmProcessFormAction } from "/@/hooks/smProcessFormAction"
@@ -238,7 +237,7 @@ const emit = defineEmits(["close"])
const loading = ref(false) // 采购计划加载
const disabled = ref(false)
const erpSpuSelectDialogRef = ref() // 商品选择对话框ref
const linkCgPlanDialogRef = ref() // 关联采购申请单对话框ref
const linkCodeDialogRef = ref() // 关联采购申请单对话框ref
const baseDataFormRef = ref() // 基本数据表单ref
const editableTableRef = ref<VxeTableInstance<any>>() // 可编辑表格ref
const baseDataInfoRef = ref() // 基本信息ref
@@ -263,16 +262,11 @@ const state = reactive<{
erpSpuItemsMemo: any[]
selectedRowsErpSpuIds: string[]
erpSpuSimpleAll: any
linkCodeVisible: boolean
linkCgPlanDialogVisible: boolean
}>({
editableTableData: [], // 可编辑表格数据
erpSpuItemsMemo: [], // 请求到的可编辑表格商品数据的缓存
selectedRowsErpSpuIds: [], // 可编辑表格已选行的ErpSpuId
erpSpuSimpleAll: [], // 简要商品列表
linkCodeVisible: false, // 关联采购申请单对话框开关
linkCgPlanDialogVisible: false, // 关联采购申请单对话框开关
})
// 合计金额表单数据
@@ -337,7 +331,7 @@ const getInitData = async () => {
}
// 点击关联采购申请编号
const handleClickLinkCode = () => linkCgPlanDialogRef.value.openLinkCodeDialog(2)
const handleClickLinkCode = () => linkCodeDialogRef.value.openLinkCodeDialog(2)
// 获取选择的采购申请
const getSelectedLinkCode = (selectionRows: any) => {
@@ -346,7 +340,6 @@ const getSelectedLinkCode = (selectionRows: any) => {
baseDataForm.linkCode = selectionRows.code
state.editableTableData = selectionRows.items
state.erpSpuItemsMemo = selectionRows.items
state.linkCgPlanDialogVisible = false
}
// 删除选中的行
@@ -51,10 +51,8 @@
<!-- <pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" /> -->
<template #footer>
<div class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<!-- <el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button> -->
</div>
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
</template>
</el-dialog>
</template>
@@ -85,10 +83,11 @@ const form = reactive({
salesCount: "",
erpSpuName: "",
})
const dialogVisible = ref(false)
// 定义校验规则
const dataRules = ref({
// sliderPicUrls: [{ required: true, message: "请上传轮播图", trigger: "blur" }],
sliderPicUrls: [{ required: true, message: "请上传轮播图", trigger: "blur" }],
})
// 打开弹窗
@@ -143,29 +142,29 @@ const state: BasicTableProps = reactive<BasicTableProps>({
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
// const resetQuery = () => {
// getDataList()
// }
const resetQuery = () => {
getDataList()
}
// 点击选择库存商品
// const handleClickSelectSpu = () => {
// loading.value = true
// resetQuery()
// spuSelectDialogVisible.value = true
// try {
// getDataList()
// } catch (error) {
// state.dataList = []
// loading.value = false
// }
// loading.value = false
// }
const handleClickSelectSpu = () => {
loading.value = true
resetQuery()
dialogVisible.value = true
try {
getDataList()
} catch (error) {
state.dataList = []
loading.value = false
}
loading.value = false
}
// 线上商品列表表格行点击
const handleRowClick = (row: any) => {
// spuSelectDialogVisible.value = false
// form.erpSpuId = row.id
// form.erpSpuName = row.productName
dialogVisible.value = false
form.erpSpuId = row.id
form.erpSpuName = row.productName
}
// 暴露变量
@@ -243,16 +243,11 @@ const state = reactive<{
erpSpuItemsMemo: any[]
selectedRowsErpSpuIds: string[]
erpSpuSimpleAll: any
linkCodeVisible: boolean
linkCgPlanDialogVisible: boolean
}>({
editableTableData: [], // 可编辑表格数据
erpSpuItemsMemo: [], // 请求到的可编辑表格商品数据的缓存
selectedRowsErpSpuIds: [], // 可编辑表格已选行的ErpSpuId
erpSpuSimpleAll: [], // 简要商品列表
linkCodeVisible: false, // 关联采购申请单对话框开关
linkCgPlanDialogVisible: false, // 关联采购申请单对话框开关
})
// 基本信息表单校验规则