parent
2453d3fb8d
commit
ddc618a5ec
|
@ -37,9 +37,9 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="供应商" prop="customerId">
|
<el-form-item label="供应商" prop="supplierId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.customerId"
|
v-model="formData.supplierId"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
disabled
|
disabled
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
class="!w-1/1"
|
class="!w-1/1"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in customerList"
|
v-for="item in supplierList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
|
@ -55,24 +55,6 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="销售人员" prop="purchaseUserId">
|
|
||||||
<el-select
|
|
||||||
v-model="formData.purchaseUserId"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
placeholder="请选择销售人员"
|
|
||||||
class="!w-1/1"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in userList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.nickname"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input
|
<el-input
|
||||||
|
@ -111,7 +93,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="收款优惠" prop="discountPrice">
|
<el-form-item label="付款优惠" prop="discountPrice">
|
||||||
<el-input
|
<el-input
|
||||||
disabled
|
disabled
|
||||||
v-model="formData.discountPrice"
|
v-model="formData.discountPrice"
|
||||||
|
@ -155,13 +137,13 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="本次收款" prop="payPrice">
|
<el-form-item label="本次付款" prop="refundPrice">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="formData.payPrice"
|
v-model="formData.refundPrice"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
:min="0"
|
:min="0"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
placeholder="请输入本次收款"
|
placeholder="请输入本次付款"
|
||||||
class="!w-1/1"
|
class="!w-1/1"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -177,10 +159,10 @@
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<!-- 可入库的订单列表 -->
|
<!-- 可入库的订单列表 -->
|
||||||
<!-- <PurchaseOrderInEnableList-->
|
<PurchaseOrderInEnableList
|
||||||
<!-- ref="purchaseOrderInEnableListRef"-->
|
ref="purchaseOrderInEnableListRef"
|
||||||
<!-- @success="handlePurchaseOrderChange"-->
|
@success="handlePurchaseOrderChange"
|
||||||
<!-- />-->
|
/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PurchaseInApi, PurchaseInVO } from '@/api/erp/purchase/in'
|
import { PurchaseInApi, PurchaseInVO } from '@/api/erp/purchase/in'
|
||||||
|
@ -188,9 +170,10 @@ import PurchaseInItemForm from './components/PurchaseInItemForm.vue'
|
||||||
// import { CustomerApi, CustomerVO } from '@/api/erp/purchase/customer'
|
// import { CustomerApi, CustomerVO } from '@/api/erp/purchase/customer'
|
||||||
import { AccountApi, AccountVO } from '@/api/erp/finance/account'
|
import { AccountApi, AccountVO } from '@/api/erp/finance/account'
|
||||||
import { erpPriceInputFormatter, erpPriceMultiply } from '@/utils'
|
import { erpPriceInputFormatter, erpPriceMultiply } from '@/utils'
|
||||||
// import PurchaseOrderInEnableList from '@/views/erp/purchase/order/components/PurchaseOrderInEnableList.vue'
|
import PurchaseOrderInEnableList from '@/views/erp/purchase/order/components/PurchaseOrderInEnableList.vue'
|
||||||
import { PurchaseOrderVO } from '@/api/erp/purchase/order'
|
import { PurchaseOrderVO } from '@/api/erp/purchase/order'
|
||||||
import * as UserApi from '@/api/system/user'
|
import * as UserApi from '@/api/system/user'
|
||||||
|
import { SupplierApi } from '@/api/erp/purchase/supplier'
|
||||||
|
|
||||||
/** ERP 销售入库表单 */
|
/** ERP 销售入库表单 */
|
||||||
defineOptions({ name: 'PurchaseInForm' })
|
defineOptions({ name: 'PurchaseInForm' })
|
||||||
|
@ -204,9 +187,8 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改;detail - 详情
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改;detail - 详情
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: undefined,
|
id: undefined,
|
||||||
customerId: undefined,
|
supplierId: undefined,
|
||||||
accountId: undefined,
|
accountId: undefined,
|
||||||
purchaseUserId: undefined,
|
|
||||||
inTime: undefined,
|
inTime: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
fileUrl: '',
|
fileUrl: '',
|
||||||
|
@ -214,19 +196,19 @@ const formData = ref({
|
||||||
discountPrice: 0,
|
discountPrice: 0,
|
||||||
totalPrice: 0,
|
totalPrice: 0,
|
||||||
otherPrice: 0,
|
otherPrice: 0,
|
||||||
payPrice: undefined,
|
refundPrice: undefined,
|
||||||
orderNo: undefined,
|
orderNo: undefined,
|
||||||
items: [],
|
items: [],
|
||||||
no: undefined // 入库单号,后端返回
|
no: undefined // 入库单号,后端返回
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
customerId: [{ required: true, message: '供应商不能为空', trigger: 'blur' }],
|
supplierId: [{ required: true, message: '供应商不能为空', trigger: 'blur' }],
|
||||||
inTime: [{ required: true, message: '入库时间不能为空', trigger: 'blur' }],
|
inTime: [{ required: true, message: '入库时间不能为空', trigger: 'blur' }],
|
||||||
payPrice: [{ required: true, message: '本次收款不能为空', trigger: 'blur' }]
|
refundPrice: [{ required: true, message: '本次付款不能为空', trigger: 'blur' }]
|
||||||
})
|
})
|
||||||
const disabled = computed(() => formType.value === 'detail')
|
const disabled = computed(() => formType.value === 'detail')
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
const customerList = ref<CustomerVO[]>([]) // 供应商列表
|
const supplierList = ref<CustomerVO[]>([]) // 供应商列表
|
||||||
const accountList = ref<AccountVO[]>([]) // 账户列表
|
const accountList = ref<AccountVO[]>([]) // 账户列表
|
||||||
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||||
|
|
||||||
|
@ -246,13 +228,13 @@ watch(
|
||||||
const discountPrice =
|
const discountPrice =
|
||||||
val.discountPercent != null ? erpPriceMultiply(totalPrice, val.discountPercent / 100.0) : 0
|
val.discountPercent != null ? erpPriceMultiply(totalPrice, val.discountPercent / 100.0) : 0
|
||||||
// debugger
|
// debugger
|
||||||
// TODO 芋艿:payPrice 自动计算会有问题,界面上看到修改了,传递到后端还是没改过来
|
// TODO 芋艿:refundPrice 自动计算会有问题,界面上看到修改了,传递到后端还是没改过来
|
||||||
// const payPrice = totalPrice - discountPrice + val.otherPrice
|
// const refundPrice = totalPrice - discountPrice + val.otherPrice
|
||||||
// 赋值
|
// 赋值
|
||||||
formData.value.discountPrice = discountPrice
|
formData.value.discountPrice = discountPrice
|
||||||
formData.value.totalPrice = totalPrice - discountPrice
|
formData.value.totalPrice = totalPrice - discountPrice
|
||||||
// val.payPrice = payPrice
|
// val.refundPrice = refundPrice
|
||||||
// formData.value.payPrice = payPrice
|
// formData.value.refundPrice = refundPrice
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
)
|
)
|
||||||
|
@ -273,7 +255,7 @@ const open = async (type: string, id?: number) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 加载供应商列表
|
// 加载供应商列表
|
||||||
customerList.value = await CustomerApi.getCustomerSimpleList()
|
supplierList.value = await SupplierApi.getSupplierSimpleList()
|
||||||
// 加载用户列表
|
// 加载用户列表
|
||||||
userList.value = await UserApi.getSimpleUserList()
|
userList.value = await UserApi.getSimpleUserList()
|
||||||
// 加载账户列表
|
// 加载账户列表
|
||||||
|
@ -295,9 +277,8 @@ const handlePurchaseOrderChange = (order: PurchaseOrderVO) => {
|
||||||
// 将订单设置到入库单
|
// 将订单设置到入库单
|
||||||
formData.value.orderId = order.id
|
formData.value.orderId = order.id
|
||||||
formData.value.orderNo = order.no
|
formData.value.orderNo = order.no
|
||||||
formData.value.customerId = order.customerId
|
formData.value.supplierId = order.supplierId
|
||||||
formData.value.accountId = order.accountId
|
formData.value.accountId = order.accountId
|
||||||
formData.value.purchaseUserId = order.purchaseUserId
|
|
||||||
formData.value.discountPercent = order.discountPercent
|
formData.value.discountPercent = order.discountPercent
|
||||||
formData.value.remark = order.remark
|
formData.value.remark = order.remark
|
||||||
formData.value.fileUrl = order.fileUrl
|
formData.value.fileUrl = order.fileUrl
|
||||||
|
@ -340,9 +321,8 @@ const submitForm = async () => {
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
customerId: undefined,
|
supplierId: undefined,
|
||||||
accountId: undefined,
|
accountId: undefined,
|
||||||
purchaseUserId: undefined,
|
|
||||||
inTime: undefined,
|
inTime: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
fileUrl: undefined,
|
fileUrl: undefined,
|
||||||
|
@ -350,7 +330,7 @@ const resetForm = () => {
|
||||||
discountPrice: 0,
|
discountPrice: 0,
|
||||||
totalPrice: 0,
|
totalPrice: 0,
|
||||||
otherPrice: 0,
|
otherPrice: 0,
|
||||||
payPrice: undefined,
|
refundPrice: undefined,
|
||||||
items: []
|
items: []
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
|
|
|
@ -221,13 +221,13 @@
|
||||||
/>
|
/>
|
||||||
<el-table-column label="待收金额" align="center">
|
<el-table-column label="待收金额" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ erpPriceInputFormatter(scope.row.payPrice + scope.row.debtPrice) }}
|
{{ erpPriceInputFormatter(scope.row.refundPrice + scope.row.debtPrice) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="本次收款"
|
label="本次付款"
|
||||||
align="center"
|
align="center"
|
||||||
prop="payPrice"
|
prop="refundPrice"
|
||||||
:formatter="erpPriceTableColumnFormatter"
|
:formatter="erpPriceTableColumnFormatter"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="本次欠款" align="center" prop="debtPrice">
|
<el-table-column label="本次欠款" align="center" prop="debtPrice">
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="收款优惠" prop="discountPrice">
|
<el-form-item label="付款优惠" prop="discountPrice">
|
||||||
<el-input
|
<el-input
|
||||||
disabled
|
disabled
|
||||||
v-model="formData.discountPrice"
|
v-model="formData.discountPrice"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!-- 可入库的订单列表 -->
|
<!-- 可入库的订单列表 -->
|
||||||
<template>
|
<template>
|
||||||
<Dialog
|
<Dialog
|
||||||
title="选择销售订单(仅展示可入库)"
|
title="选择采购订单(仅展示可入库)"
|
||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
:appendToBody="true"
|
:appendToBody="true"
|
||||||
:scroll="true"
|
:scroll="true"
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="入库数量"
|
label="入库数量"
|
||||||
align="center"
|
align="center"
|
||||||
prop="outCount"
|
prop="inCount"
|
||||||
:formatter="erpCountTableColumnFormatter"
|
:formatter="erpCountTableColumnFormatter"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -122,7 +122,6 @@
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ElTable } from 'element-plus'
|
import { ElTable } from 'element-plus'
|
||||||
import { PurchaseOrderApi, PurchaseOrderVO } from '@/api/erp/purchase/order'
|
import { PurchaseOrderApi, PurchaseOrderVO } from '@/api/erp/purchase/order'
|
||||||
|
@ -142,7 +141,7 @@ const queryParams = reactive({
|
||||||
no: undefined,
|
no: undefined,
|
||||||
productId: undefined,
|
productId: undefined,
|
||||||
orderTime: [],
|
orderTime: [],
|
||||||
outEnable: true
|
inEnable: true
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
const productList = ref<ProductVO[]>([]) // 产品列表
|
const productList = ref<ProductVO[]>([]) // 产品列表
|
|
@ -1,7 +1,7 @@
|
||||||
<!-- 可退货的订单列表 -->
|
<!-- 可退货的订单列表 -->
|
||||||
<template>
|
<template>
|
||||||
<Dialog
|
<Dialog
|
||||||
title="选择销售订单(仅展示可退货)"
|
title="选择采购订单(仅展示可退货)"
|
||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
:appendToBody="true"
|
:appendToBody="true"
|
||||||
:scroll="true"
|
:scroll="true"
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="入库数量"
|
label="入库数量"
|
||||||
align="center"
|
align="center"
|
||||||
prop="outCount"
|
prop="inCount"
|
||||||
:formatter="erpCountTableColumnFormatter"
|
:formatter="erpCountTableColumnFormatter"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
|
@ -95,9 +95,9 @@
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="入库数量" prop="outStatus">
|
<el-form-item label="入库数量" prop="inStatus">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.outStatus"
|
v-model="queryParams.inStatus"
|
||||||
placeholder="请选择入库数量"
|
placeholder="请选择入库数量"
|
||||||
clearable
|
clearable
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
|
@ -305,7 +305,7 @@ const queryParams = reactive({
|
||||||
status: undefined,
|
status: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
creator: undefined,
|
creator: undefined,
|
||||||
outStatus: undefined,
|
inStatus: undefined,
|
||||||
returnStatus: undefined
|
returnStatus: undefined
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
|
Loading…
Reference in New Issue