零售出库进价字段改为零售价
This commit is contained in:
1 parent
6f7e4446db
commit
65bbf91006
1 file changed
+7
-45
@@ -15,10 +15,6 @@
|
|||||||
<span class="font-bold">经办人:</span>
|
<span class="font-bold">经办人:</span>
|
||||||
<span>{{ baseDataForm.handlerUserId }}</span>
|
<span>{{ baseDataForm.handlerUserId }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 33.33%; height: 28px; line-height: 28px">
|
|
||||||
<span class="font-bold">关联补货申请:</span>
|
|
||||||
<span>{{ baseDataForm.linkCode }}</span>
|
|
||||||
</div>
|
|
||||||
<div style="width: 33.33%; height: 28px; line-height: 28px">
|
<div style="width: 33.33%; height: 28px; line-height: 28px">
|
||||||
<span class="font-bold">货商:</span>
|
<span class="font-bold">货商:</span>
|
||||||
<span>{{ baseDataForm.supplierId }}</span>
|
<span>{{ baseDataForm.supplierId }}</span>
|
||||||
@@ -37,17 +33,6 @@
|
|||||||
<el-form-item label="单据日期" prop="inventoryDate">
|
<el-form-item label="单据日期" prop="inventoryDate">
|
||||||
<el-input v-model.trim="baseDataForm.inventoryDate" readonly style="width: 200px" :disabled="disabled" />
|
<el-input v-model.trim="baseDataForm.inventoryDate" readonly style="width: 200px" :disabled="disabled" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联采购订单" prop="linkCode">
|
|
||||||
<el-input
|
|
||||||
v-model="baseDataForm.linkCode"
|
|
||||||
:suffix-icon="Search"
|
|
||||||
@click="handleClickLinkCode"
|
|
||||||
readonly
|
|
||||||
placeholder="请选择采购订单"
|
|
||||||
style="width: 200px"
|
|
||||||
:disabled="disabled"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="经办人" prop="handlerUserId">
|
<el-form-item label="经办人" prop="handlerUserId">
|
||||||
<SelectHandlerUser
|
<SelectHandlerUser
|
||||||
v-model.trim="baseDataForm.handlerUserId"
|
v-model.trim="baseDataForm.handlerUserId"
|
||||||
@@ -135,12 +120,12 @@
|
|||||||
<el-input v-model="row.quantity" />
|
<el-input v-model="row.quantity" />
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="unitPrice" title="进价">
|
<vxe-column field="unitPrice" title="零售价">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{
|
{{
|
||||||
row.purchasePrice
|
row.retailPrice
|
||||||
? displayPrice(row.purchasePrice)
|
? displayPrice(row.retailPrice)
|
||||||
: displayPrice(row.erpUnitVos?.find((item: any) => item.id == row.unitId)?.purchasePrice)
|
: displayPrice(row.erpUnitVos?.find((item: any) => item.id == row.unitId)?.retailPrice)
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
@@ -197,13 +182,6 @@
|
|||||||
|
|
||||||
<!-- 商品选择对话框 -->
|
<!-- 商品选择对话框 -->
|
||||||
<select-dialog ref="erpSpuSelectDialogRef" :selectedRows="state.editableTableData" @getSelectedRows="getSelectedRows" />
|
<select-dialog ref="erpSpuSelectDialogRef" :selectedRows="state.editableTableData" @getSelectedRows="getSelectedRows" />
|
||||||
|
|
||||||
<link-code-dialog
|
|
||||||
ref="linkCodeDialogRef"
|
|
||||||
title="关联采购订单"
|
|
||||||
:getTableData="getCgddPage"
|
|
||||||
@getSelectedLinkCode="getSelectedLinkCode"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -211,11 +189,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, computed, onMounted } from "vue"
|
import { ref, reactive, computed, onMounted } from "vue"
|
||||||
import { getObj, addObj, putObj } from "/@/api/supermarketerp/smErpInventoryRecords"
|
import { getObj, addObj, putObj } from "/@/api/supermarketerp/smErpInventoryRecords"
|
||||||
import { getPlanCode, getErpSpuSimpleAll, getCgddPage } from "/@/api/supermarketerp/common"
|
import { getPlanCode, getErpSpuSimpleAll } from "/@/api/supermarketerp/common"
|
||||||
import { VxeTableEvents, VxeTablePropTypes, type VxeTableInstance } from "vxe-table"
|
import { VxeTableEvents, VxeTablePropTypes, type VxeTableInstance } from "vxe-table"
|
||||||
import { formatDate } from "/@/utils/formatTime"
|
import { formatDate } from "/@/utils/formatTime"
|
||||||
import { Search } from "@element-plus/icons-vue"
|
|
||||||
import LinkCodeDialog from "/@/views/supermarketerp/components/link-code-dialog.vue"
|
|
||||||
import { displayPrice, storePrice } from "/@/utils/formatMoney"
|
import { displayPrice, storePrice } from "/@/utils/formatMoney"
|
||||||
import { tablePrint } from "../../supermarketUtils"
|
import { tablePrint } from "../../supermarketUtils"
|
||||||
import { useSmProcessFormAction } from "/@/hooks/smProcessFormAction"
|
import { useSmProcessFormAction } from "/@/hooks/smProcessFormAction"
|
||||||
@@ -237,7 +213,6 @@ const emit = defineEmits(["close"])
|
|||||||
const loading = ref(false) // 采购计划加载
|
const loading = ref(false) // 采购计划加载
|
||||||
const disabled = ref(false)
|
const disabled = ref(false)
|
||||||
const erpSpuSelectDialogRef = ref() // 商品选择对话框ref
|
const erpSpuSelectDialogRef = ref() // 商品选择对话框ref
|
||||||
const linkCodeDialogRef = ref() // 关联采购申请单对话框ref
|
|
||||||
const baseDataFormRef = ref() // 基本数据表单ref
|
const baseDataFormRef = ref() // 基本数据表单ref
|
||||||
const editableTableRef = ref<VxeTableInstance<any>>() // 可编辑表格ref
|
const editableTableRef = ref<VxeTableInstance<any>>() // 可编辑表格ref
|
||||||
const baseDataInfoRef = ref() // 基本信息ref
|
const baseDataInfoRef = ref() // 基本信息ref
|
||||||
@@ -278,7 +253,6 @@ const receiveAmountForm = reactive<{ receiveAmount: number }>({
|
|||||||
const dataRules = ref({
|
const dataRules = ref({
|
||||||
inventoryCode: [{ required: true, message: "出入库记录表编号不能为空", trigger: "blur" }],
|
inventoryCode: [{ required: true, message: "出入库记录表编号不能为空", trigger: "blur" }],
|
||||||
inventoryDate: [{ required: true, message: "出入库记录表单据日期不能为空", trigger: "blur" }],
|
inventoryDate: [{ required: true, message: "出入库记录表单据日期不能为空", trigger: "blur" }],
|
||||||
// handlerUserId: [{ required: true, message: "经办人不能为空", trigger: "blur" }],
|
|
||||||
supplierId: [{ required: true, message: "货商不能为空", trigger: "blur" }],
|
supplierId: [{ required: true, message: "货商不能为空", trigger: "blur" }],
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -330,18 +304,6 @@ const getInitData = async () => {
|
|||||||
erpSpuSimpleAll && erpSpuSimpleAll.code === 0 && (state.erpSpuSimpleAll = erpSpuSimpleAll.data)
|
erpSpuSimpleAll && erpSpuSimpleAll.code === 0 && (state.erpSpuSimpleAll = erpSpuSimpleAll.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击关联采购申请编号
|
|
||||||
const handleClickLinkCode = () => linkCodeDialogRef.value.openLinkCodeDialog(2)
|
|
||||||
|
|
||||||
// 获取选择的采购申请
|
|
||||||
const getSelectedLinkCode = (selectionRows: any) => {
|
|
||||||
console.log("被选择的关联数据", selectionRows)
|
|
||||||
|
|
||||||
baseDataForm.linkCode = selectionRows.code
|
|
||||||
state.editableTableData = selectionRows.items
|
|
||||||
state.erpSpuItemsMemo = selectionRows.items
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除选中的行
|
// 删除选中的行
|
||||||
const removeSelectRowEvent = () => {
|
const removeSelectRowEvent = () => {
|
||||||
const $table = editableTableRef.value
|
const $table = editableTableRef.value
|
||||||
@@ -408,7 +370,7 @@ const cgPlanSpuItems = computed(() => {
|
|||||||
id: item.isNew ? undefined : item.id,
|
id: item.isNew ? undefined : item.id,
|
||||||
erpSpuId: item.erpSpuId,
|
erpSpuId: item.erpSpuId,
|
||||||
quantity: item.quantity,
|
quantity: item.quantity,
|
||||||
unitPrice: unit?.purchasePrice ? Number(unit?.purchasePrice) : 0,
|
unitPrice: unit?.retailPrice ? Number(unit?.retailPrice) : 0,
|
||||||
totalAmount: unit?.purchasePrice && item.quantity ? Number(unit.purchasePrice) * item.quantity : 0,
|
totalAmount: unit?.purchasePrice && item.quantity ? Number(unit.purchasePrice) * item.quantity : 0,
|
||||||
remark: item.remark,
|
remark: item.remark,
|
||||||
unitId: item.unitId,
|
unitId: item.unitId,
|
||||||
@@ -419,7 +381,7 @@ const cgPlanSpuItems = computed(() => {
|
|||||||
id: item.isNew ? undefined : item.id,
|
id: item.isNew ? undefined : item.id,
|
||||||
erpSpuId: item.erpSpuId,
|
erpSpuId: item.erpSpuId,
|
||||||
quantity: item.quantity,
|
quantity: item.quantity,
|
||||||
unitPrice: item.purchasePrice ? Number(item.purchasePrice) : 0,
|
unitPrice: item.retailPrice ? Number(item.retailPrice) : 0,
|
||||||
totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0,
|
totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0,
|
||||||
remark: item.remark,
|
remark: item.remark,
|
||||||
unitId: item.unitId,
|
unitId: item.unitId,
|
||||||
|
|||||||
Reference in new issue
Block a user