✨ ERP:采购退货 70%(详情)
This commit is contained in:
parent
ee35056767
commit
db446330c3
@ -167,13 +167,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PurchaseInApi, PurchaseInVO } from '@/api/erp/purchase/in'
|
import { PurchaseInApi, PurchaseInVO } from '@/api/erp/purchase/in'
|
||||||
import PurchaseInItemForm from './components/PurchaseInItemForm.vue'
|
import PurchaseInItemForm from './components/PurchaseInItemForm.vue'
|
||||||
// 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'
|
import { SupplierApi, SupplierVO } from '@/api/erp/purchase/supplier'
|
||||||
|
|
||||||
/** ERP 销售入库表单 */
|
/** ERP 销售入库表单 */
|
||||||
defineOptions({ name: 'PurchaseInForm' })
|
defineOptions({ name: 'PurchaseInForm' })
|
||||||
@ -208,7 +207,7 @@ const formRules = reactive({
|
|||||||
})
|
})
|
||||||
const disabled = computed(() => formType.value === 'detail')
|
const disabled = computed(() => formType.value === 'detail')
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
const supplierList = ref<CustomerVO[]>([]) // 供应商列表
|
const supplierList = ref<SupplierVO[]>([]) // 供应商列表
|
||||||
const accountList = ref<AccountVO[]>([]) // 账户列表
|
const accountList = ref<AccountVO[]>([]) // 账户列表
|
||||||
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||||
|
|
||||||
|
@ -44,9 +44,9 @@
|
|||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="供应商" prop="customerId">
|
<el-form-item label="供应商" prop="supplierId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.customerId"
|
v-model="queryParams.supplierId"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
placeholder="请选择供供应商"
|
placeholder="请选择供供应商"
|
||||||
@ -332,7 +332,7 @@ const queryParams = reactive({
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
no: undefined,
|
no: undefined,
|
||||||
customerId: undefined,
|
supplierId: undefined,
|
||||||
productId: undefined,
|
productId: undefined,
|
||||||
warehouseId: undefined,
|
warehouseId: undefined,
|
||||||
inTime: [],
|
inTime: [],
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column min-width="180" label="订单单号" align="center" prop="no" />
|
<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="产品信息" align="center" prop="productNames" min-width="200" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="订单时间"
|
label="订单时间"
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column min-width="180" label="订单单号" align="center" prop="no" />
|
<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="产品信息" align="center" prop="productNames" min-width="200" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="订单时间"
|
label="订单时间"
|
||||||
|
@ -37,17 +37,17 @@
|
|||||||
</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
|
||||||
placeholder="请选择客户"
|
placeholder="请选择供应商"
|
||||||
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
|
||||||
@ -181,18 +163,18 @@
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<!-- 可退货的订单列表 -->
|
<!-- 可退货的订单列表 -->
|
||||||
<PurchaseOrderReturnEnableList
|
<!-- <PurchaseOrderReturnEnableList-->
|
||||||
ref="purchaseOrderReturnEnableListRef"
|
<!-- ref="purchaseOrderReturnEnableListRef"-->
|
||||||
@success="handlePurchaseOrderChange"
|
<!-- @success="handlePurchaseOrderChange"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PurchaseReturnApi, PurchaseReturnVO } from '@/api/erp/purchase/return'
|
import { PurchaseReturnApi, PurchaseReturnVO } from '@/api/erp/purchase/return'
|
||||||
import PurchaseReturnItemForm from './components/PurchaseReturnItemForm.vue'
|
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 { AccountApi, AccountVO } from '@/api/erp/finance/account'
|
||||||
import { erpPriceInputFormatter, erpPriceMultiply } from '@/utils'
|
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 { PurchaseOrderVO } from '@/api/erp/purchase/order'
|
||||||
import * as UserApi from '@/api/system/user'
|
import * as UserApi from '@/api/system/user'
|
||||||
|
|
||||||
@ -208,9 +190,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,
|
|
||||||
returnTime: undefined,
|
returnTime: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
fileUrl: '',
|
fileUrl: '',
|
||||||
@ -224,13 +205,13 @@ const formData = ref({
|
|||||||
no: undefined // 退货单号,后端返回
|
no: undefined // 退货单号,后端返回
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
customerId: [{ required: true, message: '客户不能为空', trigger: 'blur' }],
|
supplierId: [{ required: true, message: '供应商不能为空', trigger: 'blur' }],
|
||||||
returnTime: [{ required: true, message: '退货时间不能为空', trigger: 'blur' }],
|
returnTime: [{ required: true, message: '退货时间不能为空', trigger: 'blur' }],
|
||||||
refundPrice: [{ 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<SupplierVO[]>([]) // 供应商列表
|
||||||
const accountList = ref<AccountVO[]>([]) // 账户列表
|
const accountList = ref<AccountVO[]>([]) // 账户列表
|
||||||
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||||
|
|
||||||
@ -276,8 +257,8 @@ const open = async (type: string, id?: number) => {
|
|||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 加载客户列表
|
// 加载供应商列表
|
||||||
customerList.value = await CustomerApi.getCustomerSimpleList()
|
supplierList.value = await SupplierApi.getSupplierSimpleList()
|
||||||
// 加载用户列表
|
// 加载用户列表
|
||||||
userList.value = await UserApi.getSimpleUserList()
|
userList.value = await UserApi.getSimpleUserList()
|
||||||
// 加载账户列表
|
// 加载账户列表
|
||||||
@ -299,9 +280,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
|
||||||
@ -343,9 +323,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,
|
|
||||||
returnTime: undefined,
|
returnTime: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
fileUrl: undefined,
|
fileUrl: undefined,
|
@ -287,7 +287,7 @@
|
|||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<!-- <PurchaseReturnForm ref="formRef" @success="getList" />-->
|
<PurchaseReturnForm ref="formRef" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -295,7 +295,7 @@ import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|||||||
import { dateFormatter2 } from '@/utils/formatTime'
|
import { dateFormatter2 } from '@/utils/formatTime'
|
||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import { PurchaseReturnApi, PurchaseReturnVO } from '@/api/erp/purchase/return'
|
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 { ProductApi, ProductVO } from '@/api/erp/product/product'
|
||||||
import { UserVO } from '@/api/system/user'
|
import { UserVO } from '@/api/system/user'
|
||||||
import * as UserApi from '@/api/system/user'
|
import * as UserApi from '@/api/system/user'
|
||||||
|
Loading…
Reference in New Issue
Block a user