ERP:采购退货 70%(详情)

This commit is contained in:
YunaiV 2024-02-12 21:03:29 +08:00
parent ee35056767
commit db446330c3
7 changed files with 26 additions and 48 deletions

View File

@ -167,13 +167,12 @@
<script setup lang="ts">
import { PurchaseInApi, PurchaseInVO } from '@/api/erp/purchase/in'
import PurchaseInItemForm from './components/PurchaseInItemForm.vue'
// import { CustomerApi, CustomerVO } from '@/api/erp/purchase/customer'
import { AccountApi, AccountVO } from '@/api/erp/finance/account'
import { erpPriceInputFormatter, erpPriceMultiply } from '@/utils'
import PurchaseOrderInEnableList from '@/views/erp/purchase/order/components/PurchaseOrderInEnableList.vue'
import { PurchaseOrderVO } from '@/api/erp/purchase/order'
import * as UserApi from '@/api/system/user'
import { SupplierApi } from '@/api/erp/purchase/supplier'
import { SupplierApi, SupplierVO } from '@/api/erp/purchase/supplier'
/** ERP 销售入库表单 */
defineOptions({ name: 'PurchaseInForm' })
@ -208,7 +207,7 @@ const formRules = reactive({
})
const disabled = computed(() => formType.value === 'detail')
const formRef = ref() // Ref
const supplierList = ref<CustomerVO[]>([]) //
const supplierList = ref<SupplierVO[]>([]) //
const accountList = ref<AccountVO[]>([]) //
const userList = ref<UserApi.UserVO[]>([]) //

View File

@ -44,9 +44,9 @@
class="!w-240px"
/>
</el-form-item>
<el-form-item label="供应商" prop="customerId">
<el-form-item label="供应商" prop="supplierId">
<el-select
v-model="queryParams.customerId"
v-model="queryParams.supplierId"
clearable
filterable
placeholder="请选择供供应商"
@ -332,7 +332,7 @@ const queryParams = reactive({
pageNo: 1,
pageSize: 10,
no: undefined,
customerId: undefined,
supplierId: undefined,
productId: undefined,
warehouseId: undefined,
inTime: [],

View File

@ -73,7 +73,7 @@
</template>
</el-table-column>
<el-table-column min-width="180" label="订单单号" align="center" prop="no" />
<el-table-column label="客户" align="center" prop="customerName" />
<el-table-column label="客户" align="center" prop="supplierName" />
<el-table-column label="产品信息" align="center" prop="productNames" min-width="200" />
<el-table-column
label="订单时间"

View File

@ -73,7 +73,7 @@
</template>
</el-table-column>
<el-table-column min-width="180" label="订单单号" align="center" prop="no" />
<el-table-column label="客户" align="center" prop="customerName" />
<el-table-column label="供应商" align="center" prop="supplierName" />
<el-table-column label="产品信息" align="center" prop="productNames" min-width="200" />
<el-table-column
label="订单时间"

View File

@ -37,17 +37,17 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户" prop="customerId">
<el-form-item label="供应商" prop="supplierId">
<el-select
v-model="formData.customerId"
v-model="formData.supplierId"
clearable
filterable
disabled
placeholder="请选择客户"
placeholder="请选择供应商"
class="!w-1/1"
>
<el-option
v-for="item in customerList"
v-for="item in supplierList"
:key="item.id"
:label="item.name"
:value="item.id"
@ -55,24 +55,6 @@
</el-select>
</el-form-item>
</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-form-item label="备注" prop="remark">
<el-input
@ -181,18 +163,18 @@
</Dialog>
<!-- 可退货的订单列表 -->
<PurchaseOrderReturnEnableList
ref="purchaseOrderReturnEnableListRef"
@success="handlePurchaseOrderChange"
/>
<!-- <PurchaseOrderReturnEnableList-->
<!-- ref="purchaseOrderReturnEnableListRef"-->
<!-- @success="handlePurchaseOrderChange"-->
<!-- />-->
</template>
<script setup lang="ts">
import { PurchaseReturnApi, PurchaseReturnVO } from '@/api/erp/purchase/return'
import PurchaseReturnItemForm from './components/PurchaseReturnItemForm.vue'
import { CustomerApi, CustomerVO } from '@/api/erp/purchase/customer'
import { SupplierApi, SupplierVO } from '@/api/erp/purchase/supplier'
import { AccountApi, AccountVO } from '@/api/erp/finance/account'
import { erpPriceInputFormatter, erpPriceMultiply } from '@/utils'
import PurchaseOrderReturnEnableList from '@/views/erp/purchase/order/components/PurchaseOrderReturnEnableList.vue'
// import PurchaseOrderReturnEnableList from '@/views/erp/purchase/order/components/PurchaseOrderReturnEnableList.vue'
import { PurchaseOrderVO } from '@/api/erp/purchase/order'
import * as UserApi from '@/api/system/user'
@ -208,9 +190,8 @@ const formLoading = ref(false) // 表单的加载中1修改时的数据加
const formType = ref('') // create - update - detail -
const formData = ref({
id: undefined,
customerId: undefined,
supplierId: undefined,
accountId: undefined,
purchaseUserId: undefined,
returnTime: undefined,
remark: undefined,
fileUrl: '',
@ -224,13 +205,13 @@ const formData = ref({
no: undefined // 退
})
const formRules = reactive({
customerId: [{ required: true, message: '客户不能为空', trigger: 'blur' }],
supplierId: [{ required: true, message: '供应商不能为空', trigger: 'blur' }],
returnTime: [{ required: true, message: '退货时间不能为空', trigger: 'blur' }],
refundPrice: [{ required: true, message: '本次退款不能为空', trigger: 'blur' }]
})
const disabled = computed(() => formType.value === 'detail')
const formRef = ref() // Ref
const customerList = ref<CustomerVO[]>([]) //
const supplierList = ref<SupplierVO[]>([]) //
const accountList = ref<AccountVO[]>([]) //
const userList = ref<UserApi.UserVO[]>([]) //
@ -276,8 +257,8 @@ const open = async (type: string, id?: number) => {
formLoading.value = false
}
}
//
customerList.value = await CustomerApi.getCustomerSimpleList()
//
supplierList.value = await SupplierApi.getSupplierSimpleList()
//
userList.value = await UserApi.getSimpleUserList()
//
@ -299,9 +280,8 @@ const handlePurchaseOrderChange = (order: PurchaseOrderVO) => {
// 退
formData.value.orderId = order.id
formData.value.orderNo = order.no
formData.value.customerId = order.customerId
formData.value.supplierId = order.supplierId
formData.value.accountId = order.accountId
formData.value.purchaseUserId = order.purchaseUserId
formData.value.discountPercent = order.discountPercent
formData.value.remark = order.remark
formData.value.fileUrl = order.fileUrl
@ -343,9 +323,8 @@ const submitForm = async () => {
const resetForm = () => {
formData.value = {
id: undefined,
customerId: undefined,
supplierId: undefined,
accountId: undefined,
purchaseUserId: undefined,
returnTime: undefined,
remark: undefined,
fileUrl: undefined,

View File

@ -287,7 +287,7 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<!-- <PurchaseReturnForm ref="formRef" @success="getList" />-->
<PurchaseReturnForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
@ -295,7 +295,7 @@ import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter2 } from '@/utils/formatTime'
import download from '@/utils/download'
import { PurchaseReturnApi, PurchaseReturnVO } from '@/api/erp/purchase/return'
// import PurchaseReturnForm from './PurchaseReturnForm.vue'
import PurchaseReturnForm from './PurchaseReturnForm.vue'
import { ProductApi, ProductVO } from '@/api/erp/product/product'
import { UserVO } from '@/api/system/user'
import * as UserApi from '@/api/system/user'