李红攀:V2.6.975,添加采购询比、采购统计
This commit is contained in:
@@ -20,6 +20,7 @@ export interface PurchaseInItem {
|
||||
productCategoryName?: string
|
||||
stockCount?: number
|
||||
totalCount?: number
|
||||
inCount?: number
|
||||
totalPrice?: number
|
||||
totalProductPrice?: number
|
||||
orderItemId?: number
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -8,7 +8,7 @@
|
||||
/>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<!-- 基础信息 -->
|
||||
<wd-cell-group title="基础信息" border>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="客户管理"
|
||||
@@ -137,7 +137,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<Customer[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -8,7 +8,7 @@
|
||||
/>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<wd-cell-group title="基本信息" border>
|
||||
<wd-input
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="农户管理"
|
||||
@@ -162,7 +162,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<Farmer[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="采摘记录详情"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -8,7 +8,7 @@
|
||||
/>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<!-- 基本信息 -->
|
||||
<wd-cell-group title="基本信息" border>
|
||||
@@ -249,7 +249,7 @@ async function loadDropdownData() {
|
||||
productList.value = products || []
|
||||
// 提取田间编号
|
||||
const farmingList = farmingResult?.list || []
|
||||
fieldList.value = [...new Set(farmingList.filter(f => f.code?.trim()).map(f => f.code))]
|
||||
fieldList.value = Array.from(new Set(farmingList.filter(f => f.code?.trim()).map(f => f.code)))
|
||||
// 提取框编号
|
||||
const boxList = boxResult?.list || []
|
||||
basketList.value = boxList.filter(b => b.boxNumber?.trim()).map(b => b.boxNumber)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="采摘管理"
|
||||
@@ -147,7 +147,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<PickBroccoli[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="采购入库详情"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -84,8 +84,8 @@
|
||||
</view>
|
||||
|
||||
<!-- 入库明细 -->
|
||||
<view class="mx-24rpx mt-24rpx pb-180rpx">
|
||||
<view class="mb-16rpx flex items-center justify-between">
|
||||
<view class="erp-form-body">
|
||||
<view class="erp-form-section-heading">
|
||||
<view class="text-32rpx text-[#333] font-semibold">
|
||||
入库明细({{ formData.items?.length || 0 }}项)
|
||||
</view>
|
||||
@@ -93,9 +93,9 @@
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mb-16rpx overflow-hidden rounded-12rpx bg-white shadow-sm"
|
||||
class="erp-form-item-card"
|
||||
>
|
||||
<view class="flex items-center justify-between bg-[#f8f8f8] px-24rpx py-12rpx">
|
||||
<view class="erp-form-item-card__header">
|
||||
<text class="text-28rpx text-[#333] font-semibold">产品 #{{ index + 1 }} {{ item.productName || '' }}</text>
|
||||
<wd-button
|
||||
v-if="formData.items && formData.items.length > 1"
|
||||
@@ -104,7 +104,7 @@
|
||||
删除
|
||||
</wd-button>
|
||||
</view>
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<!-- 仓库选择 -->
|
||||
<view class="mb-16rpx">
|
||||
<text class="mb-8rpx block text-24rpx text-[#999]">仓库</text>
|
||||
@@ -116,7 +116,7 @@
|
||||
/>
|
||||
</view>
|
||||
<!-- 自动填充的产品信息(只读) -->
|
||||
<view v-if="item.productId" class="mb-16rpx rounded-8rpx bg-[#f9f9f9] p-16rpx">
|
||||
<view v-if="item.productId" class="erp-form-info-card">
|
||||
<view class="mb-8rpx flex justify-between text-24rpx">
|
||||
<text class="text-[#999]">产品名称</text>
|
||||
<text class="text-[#333]">{{ item.productName || '-' }}</text>
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
<!-- 采购订单选择弹窗 -->
|
||||
<wd-popup v-model="orderSelectVisible" position="right" custom-style="width: 100%; height: 100%;">
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
title="选择采购订单"
|
||||
left-arrow placeholder safe-area-inset-top fixed
|
||||
@@ -226,11 +226,11 @@
|
||||
<view
|
||||
v-for="item in orderList"
|
||||
:key="item.id"
|
||||
class="mb-20rpx overflow-hidden rounded-12rpx bg-white shadow-sm"
|
||||
class="erp-form-item-card"
|
||||
:class="{ 'border-2 border-[#1890ff]': selectedOrderId === item.id }"
|
||||
@click="handleSelectOrder(item)"
|
||||
>
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<view class="mb-12rpx flex items-center justify-between">
|
||||
<view class="text-30rpx text-[#333] font-semibold">{{ item.no }}</view>
|
||||
<wd-icon v-if="selectedOrderId === item.id" name="check" color="#1890ff" size="40rpx" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="采购入库"
|
||||
@@ -215,7 +215,7 @@ const total = ref(0)
|
||||
const list = ref<PurchaseIn[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const activeStatus = ref<number | undefined>(undefined)
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="采购订单详情"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -101,8 +101,8 @@
|
||||
</view>
|
||||
|
||||
<!-- 订单明细 -->
|
||||
<view class="mx-24rpx mt-24rpx pb-180rpx">
|
||||
<view class="mb-16rpx flex items-center justify-between">
|
||||
<view class="erp-form-body">
|
||||
<view class="erp-form-section-heading">
|
||||
<view class="text-32rpx text-[#333] font-semibold">
|
||||
订单明细({{ formData.items?.length || 0 }}项)
|
||||
</view>
|
||||
@@ -113,15 +113,15 @@
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mb-16rpx overflow-hidden rounded-12rpx bg-white shadow-sm"
|
||||
class="erp-form-item-card"
|
||||
>
|
||||
<view class="flex items-center justify-between bg-[#f8f8f8] px-24rpx py-12rpx">
|
||||
<view class="erp-form-item-card__header">
|
||||
<text class="text-28rpx text-[#333] font-semibold">产品 #{{ index + 1 }} {{ item.productName || '' }}</text>
|
||||
<wd-button size="small" type="error" plain @click="handleRemoveItem(index)">
|
||||
删除
|
||||
</wd-button>
|
||||
</view>
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<view class="mb-16rpx">
|
||||
<text class="mb-8rpx block text-24rpx text-[#999]">选择产品</text>
|
||||
<wd-picker
|
||||
@@ -132,7 +132,7 @@
|
||||
/>
|
||||
</view>
|
||||
<!-- 自动填充的产品信息(只读) -->
|
||||
<view v-if="item.productId" class="mb-16rpx rounded-8rpx bg-[#f9f9f9] p-16rpx">
|
||||
<view v-if="item.productId" class="erp-form-info-card">
|
||||
<view class="mb-8rpx flex justify-between text-24rpx">
|
||||
<text class="text-[#999]">规格</text>
|
||||
<text class="text-[#333]">{{ item.productSpec || '-' }}</text>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="采购订单"
|
||||
@@ -165,7 +165,7 @@ const total = ref(0)
|
||||
const list = ref<PurchaseOrder[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const activeStatus = ref<number | undefined>(undefined)
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="请购单详情"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -66,8 +66,8 @@
|
||||
</view>
|
||||
|
||||
<!-- 请购产品清单 -->
|
||||
<view class="mx-24rpx mt-24rpx pb-180rpx">
|
||||
<view class="mb-16rpx flex items-center justify-between">
|
||||
<view class="erp-form-body">
|
||||
<view class="erp-form-section-heading">
|
||||
<view class="text-32rpx text-[#333] font-semibold">
|
||||
请购产品清单({{ formData.items?.length || 0 }}项)
|
||||
</view>
|
||||
@@ -78,15 +78,15 @@
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mb-16rpx overflow-hidden rounded-12rpx bg-white shadow-sm"
|
||||
class="erp-form-item-card"
|
||||
>
|
||||
<view class="flex items-center justify-between bg-[#f8f8f8] px-24rpx py-12rpx">
|
||||
<view class="erp-form-item-card__header">
|
||||
<text class="text-28rpx text-[#333] font-semibold">产品 #{{ index + 1 }} {{ item.productName || '' }}</text>
|
||||
<wd-button size="small" type="error" plain @click="handleRemoveItem(index)">
|
||||
删除
|
||||
</wd-button>
|
||||
</view>
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<view class="mb-16rpx">
|
||||
<text class="mb-8rpx block text-24rpx text-[#999]">选择产品</text>
|
||||
<wd-picker
|
||||
@@ -97,7 +97,7 @@
|
||||
/>
|
||||
</view>
|
||||
<!-- 自动填充的产品信息(只读) -->
|
||||
<view v-if="item.productId" class="mb-16rpx rounded-8rpx bg-[#f9f9f9] p-16rpx">
|
||||
<view v-if="item.productId" class="erp-form-info-card">
|
||||
<view class="mb-8rpx flex justify-between text-24rpx">
|
||||
<text class="text-[#999]">规格</text>
|
||||
<text class="text-[#333]">{{ item.productSpec || '-' }}</text>
|
||||
@@ -213,22 +213,19 @@
|
||||
</view>
|
||||
|
||||
<!-- 请购类型选择器 -->
|
||||
<wd-picker
|
||||
v-model="typePickerVisible"
|
||||
<wd-picker v-model:show="typePickerVisible"
|
||||
:columns="typeColumns"
|
||||
@confirm="onTypeConfirm"
|
||||
/>
|
||||
|
||||
<!-- 优先级选择器 -->
|
||||
<wd-picker
|
||||
v-model="priorityPickerVisible"
|
||||
<wd-picker v-model:show="priorityPickerVisible"
|
||||
:columns="priorityColumns"
|
||||
@confirm="onPriorityConfirm"
|
||||
/>
|
||||
|
||||
<!-- 紧急程度选择器 -->
|
||||
<wd-picker
|
||||
v-model="emergencyPickerVisible"
|
||||
<wd-picker v-model:show="emergencyPickerVisible"
|
||||
:columns="emergencyColumns"
|
||||
@confirm="onEmergencyConfirm"
|
||||
/>
|
||||
@@ -318,8 +315,8 @@ const emergencyColumns = computed(() =>
|
||||
)
|
||||
|
||||
// 日期选择器
|
||||
const requestDatePickerVisible = ref(false)
|
||||
const expectedDatePickerVisible = ref(false)
|
||||
const requestDatePickerVisible = ref<any>(false)
|
||||
const expectedDatePickerVisible = ref<any>(false)
|
||||
|
||||
// 产品列表
|
||||
const productList = ref<ProductSimple[]>([])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="采购申请"
|
||||
@@ -233,7 +233,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<PurchaseRequisition[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
status: undefined,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="采购退货详情"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -81,8 +81,8 @@
|
||||
</view>
|
||||
|
||||
<!-- 退货明细 -->
|
||||
<view class="mx-24rpx mt-24rpx pb-180rpx">
|
||||
<view class="mb-16rpx flex items-center justify-between">
|
||||
<view class="erp-form-body">
|
||||
<view class="erp-form-section-heading">
|
||||
<view class="text-32rpx text-[#333] font-semibold">
|
||||
退货明细({{ formData.items?.length || 0 }}项)
|
||||
</view>
|
||||
@@ -90,9 +90,9 @@
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mb-16rpx overflow-hidden rounded-12rpx bg-white shadow-sm"
|
||||
class="erp-form-item-card"
|
||||
>
|
||||
<view class="flex items-center justify-between bg-[#f8f8f8] px-24rpx py-12rpx">
|
||||
<view class="erp-form-item-card__header">
|
||||
<text class="text-28rpx text-[#333] font-semibold">产品 #{{ index + 1 }} {{ item.productName || '' }}</text>
|
||||
<wd-button
|
||||
v-if="formData.items && formData.items.length > 1"
|
||||
@@ -101,7 +101,7 @@
|
||||
删除
|
||||
</wd-button>
|
||||
</view>
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<!-- 仓库选择 -->
|
||||
<view class="mb-16rpx">
|
||||
<text class="mb-8rpx block text-24rpx text-[#999]">仓库</text>
|
||||
@@ -113,7 +113,7 @@
|
||||
/>
|
||||
</view>
|
||||
<!-- 自动填充的产品信息(只读) -->
|
||||
<view v-if="item.productId" class="mb-16rpx rounded-8rpx bg-[#f9f9f9] p-16rpx">
|
||||
<view v-if="item.productId" class="erp-form-info-card">
|
||||
<view class="mb-8rpx flex justify-between text-24rpx">
|
||||
<text class="text-[#999]">产品名称</text>
|
||||
<text class="text-[#333]">{{ item.productName || '-' }}</text>
|
||||
@@ -207,7 +207,7 @@
|
||||
|
||||
<!-- 采购订单选择弹窗(可退货订单) -->
|
||||
<wd-popup v-model="orderSelectVisible" position="right" custom-style="width: 100%; height: 100%;">
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
title="选择采购订单"
|
||||
left-arrow placeholder safe-area-inset-top fixed
|
||||
@@ -223,11 +223,11 @@
|
||||
<view
|
||||
v-for="item in orderList"
|
||||
:key="item.id"
|
||||
class="mb-20rpx overflow-hidden rounded-12rpx bg-white shadow-sm"
|
||||
class="erp-form-item-card"
|
||||
:class="{ 'border-2 border-[#1890ff]': selectedOrderId === item.id }"
|
||||
@click="handleSelectOrder(item)"
|
||||
>
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<view class="mb-12rpx flex items-center justify-between">
|
||||
<view class="text-30rpx text-[#333] font-semibold">{{ item.no }}</view>
|
||||
<wd-icon v-if="selectedOrderId === item.id" name="check" color="#1890ff" size="40rpx" />
|
||||
@@ -325,7 +325,7 @@ const formData = ref<PurchaseReturn>({
|
||||
no: undefined,
|
||||
supplierId: undefined,
|
||||
accountId: undefined,
|
||||
returnTime: Date.now(),
|
||||
returnTime: new Date().toISOString(),
|
||||
orderId: undefined,
|
||||
orderNo: undefined,
|
||||
discountPercent: 0,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="采购退货"
|
||||
@@ -174,7 +174,7 @@ const total = ref(0)
|
||||
const list = ref<PurchaseReturn[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const activeStatus = ref<number | undefined>(undefined)
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="订单详情"
|
||||
@@ -7,10 +7,10 @@
|
||||
@click-left="handleBack"
|
||||
/>
|
||||
|
||||
<view class="p-24rpx" :class="{ 'opacity-60': loading }">
|
||||
<view class="erp-page__body" :class="{ 'opacity-60': loading }">
|
||||
<!-- 基本信息 -->
|
||||
<view class="bg-white rounded-12rpx p-24rpx mb-24rpx">
|
||||
<view class="text-32rpx font-semibold mb-24rpx text-[#333]">基本信息</view>
|
||||
<view class="erp-section">
|
||||
<view class="erp-section__title">基本信息</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">订单单号</text>
|
||||
<text class="info-value">{{ detail.no || '-' }}</text>
|
||||
@@ -32,8 +32,8 @@
|
||||
</view>
|
||||
|
||||
<!-- 付款信息 -->
|
||||
<view class="bg-white rounded-12rpx p-24rpx mb-24rpx" v-if="detail.depositPrice || detail.paymentCondition">
|
||||
<view class="text-32rpx font-semibold mb-24rpx text-[#333]">付款信息</view>
|
||||
<view class="erp-section" v-if="detail.depositPrice || detail.paymentCondition">
|
||||
<view class="erp-section__title">付款信息</view>
|
||||
<view class="info-row" v-if="detail.paymentCondition">
|
||||
<text class="info-label">付款条件</text>
|
||||
<text class="info-value">{{ getPaymentConditionText(detail.paymentCondition) }}</text>
|
||||
@@ -49,8 +49,8 @@
|
||||
</view>
|
||||
|
||||
<!-- 产品清单 -->
|
||||
<view class="bg-white rounded-12rpx p-24rpx mb-24rpx">
|
||||
<view class="text-32rpx font-semibold mb-24rpx text-[#333]">产品清单</view>
|
||||
<view class="erp-section">
|
||||
<view class="erp-section__title">产品清单</view>
|
||||
<view
|
||||
v-for="(item, index) in detail.items"
|
||||
:key="index"
|
||||
@@ -65,14 +65,14 @@
|
||||
<text class="text-[#409eff]">小计: ¥{{ formatPrice(item.totalPrice) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="!detail.items || detail.items.length === 0" class="text-center text-26rpx text-[#999] py-20rpx">
|
||||
<view v-if="!detail.items || detail.items.length === 0" class="erp-empty">
|
||||
暂无产品
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 金额汇总 -->
|
||||
<view class="bg-white rounded-12rpx p-24rpx mb-24rpx">
|
||||
<view class="text-32rpx font-semibold mb-24rpx text-[#333]">金额汇总</view>
|
||||
<view class="erp-section">
|
||||
<view class="erp-section__title">金额汇总</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">总数量</text>
|
||||
<text class="info-value">{{ formatCount(detail.totalCount) }}</text>
|
||||
@@ -96,9 +96,9 @@
|
||||
</view>
|
||||
|
||||
<!-- 其他信息 -->
|
||||
<view class="bg-white rounded-12rpx p-24rpx mb-24rpx" v-if="detail.remark">
|
||||
<view class="text-32rpx font-semibold mb-24rpx text-[#333]">备注</view>
|
||||
<view class="text-26rpx text-[#666]">{{ detail.remark }}</view>
|
||||
<view class="erp-section" v-if="detail.remark">
|
||||
<view class="erp-section__title">备注</view>
|
||||
<view class="text-26rpx text-[#606266] leading-1.6">{{ detail.remark }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -266,14 +266,14 @@ onMounted(() => {
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16rpx 0;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
border-bottom: 1rpx solid #f5f7fa;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
color: #999;
|
||||
color: #909399;
|
||||
font-size: 28rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
@@ -299,10 +299,10 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.product-item {
|
||||
padding: 16rpx;
|
||||
background: #fafafa;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 12rpx;
|
||||
padding: 20rpx;
|
||||
background: #f8fafc;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<template>
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
left-arrow
|
||||
@@ -9,7 +9,7 @@
|
||||
@click-left="handleBack"
|
||||
/>
|
||||
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<wd-cell-group title="基本信息" border>
|
||||
<wd-picker
|
||||
@@ -69,18 +69,18 @@
|
||||
</wd-cell-group>
|
||||
|
||||
<wd-cell-group title="订单产品" border>
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mb-16rpx rounded-8rpx bg-gray-50 p-24rpx"
|
||||
class="erp-form-item-card erp-form-item-card--padded"
|
||||
>
|
||||
<view class="mb-12rpx flex items-center justify-between">
|
||||
<text class="text-28rpx font-semibold">{{ item.productName || `产品${index + 1}` }}</text>
|
||||
<text class="erp-card-title">{{ item.productName || `产品${index + 1}` }}</text>
|
||||
<wd-button size="small" type="error" plain @click="removeItem(index)">删除</wd-button>
|
||||
</view>
|
||||
<view class="mb-12rpx flex items-center">
|
||||
<text class="w-140rpx text-24rpx text-gray-500">数量</text>
|
||||
<view class="erp-form-input-row">
|
||||
<text class="erp-form-input-label">数量</text>
|
||||
<wd-input
|
||||
v-model="item.count"
|
||||
type="number"
|
||||
@@ -89,8 +89,8 @@
|
||||
@change="calculateTotal"
|
||||
/>
|
||||
</view>
|
||||
<view class="mb-12rpx flex items-center">
|
||||
<text class="w-140rpx text-24rpx text-gray-500">单价</text>
|
||||
<view class="erp-form-input-row">
|
||||
<text class="erp-form-input-label">单价</text>
|
||||
<wd-input
|
||||
v-model="item.unitPrice"
|
||||
type="number"
|
||||
@@ -99,9 +99,9 @@
|
||||
@change="calculateTotal"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center">
|
||||
<text class="w-140rpx text-24rpx text-gray-500">小计</text>
|
||||
<text class="text-28rpx text-[#409eff]">{{ formatPrice(calculateItemTotal(item)) }}</text>
|
||||
<view class="erp-form-total-row">
|
||||
<text class="erp-form-input-label">小计</text>
|
||||
<text class="text-28rpx text-[#409eff] font-semibold">{{ formatPrice(calculateItemTotal(item)) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<wd-button type="primary" plain block @click="showProductPicker = true">添加产品</wd-button>
|
||||
@@ -155,7 +155,7 @@
|
||||
</view>
|
||||
|
||||
<wd-popup v-model="showProductPicker" position="bottom" custom-style="height: 60%">
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<view class="mb-24rpx flex items-center justify-between">
|
||||
<text class="text-32rpx font-semibold">选择产品</text>
|
||||
<wd-button size="small" @click="showProductPicker = false">关闭</wd-button>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="销售订单"
|
||||
@@ -35,58 +35,58 @@
|
||||
</view>
|
||||
|
||||
<!-- 订单列表 -->
|
||||
<view class="px-24rpx">
|
||||
<view class="erp-list">
|
||||
<view
|
||||
v-for="item in list"
|
||||
:key="item.id"
|
||||
class="mb-20rpx overflow-hidden rounded-12rpx bg-white shadow-sm"
|
||||
class="erp-list-card"
|
||||
>
|
||||
<view class="p-24rpx" @click="handleDetail(item)">
|
||||
<view class="erp-list-card__body" @click="handleDetail(item)">
|
||||
<!-- 头部:单号 + 状态 -->
|
||||
<view class="mb-16rpx flex items-center justify-between">
|
||||
<view class="text-28rpx text-[#333] font-semibold">
|
||||
<view class="erp-card-title">
|
||||
{{ item.no || '-' }}
|
||||
</view>
|
||||
<view
|
||||
class="rounded-8rpx px-16rpx py-4rpx text-24rpx"
|
||||
class="erp-status-tag"
|
||||
:class="getStatusClass(item.status)"
|
||||
>
|
||||
{{ getStatusText(item.status) }}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 客户 -->
|
||||
<view class="mb-8rpx flex items-center justify-between text-26rpx text-[#666]">
|
||||
<text class="text-[#999]">客户</text>
|
||||
<text>{{ item.customerName || '-' }}</text>
|
||||
<view class="erp-field-row">
|
||||
<text class="erp-field-row__label">客户</text>
|
||||
<text class="erp-field-row__value">{{ item.customerName || '-' }}</text>
|
||||
</view>
|
||||
<!-- 产品 -->
|
||||
<view class="mb-8rpx flex items-center justify-between text-26rpx text-[#666]">
|
||||
<text class="text-[#999]">产品</text>
|
||||
<text class="ml-16rpx line-clamp-1 text-right" style="max-width: 400rpx;">{{ item.productNames || '-' }}</text>
|
||||
<view class="erp-field-row">
|
||||
<text class="erp-field-row__label">产品</text>
|
||||
<text class="erp-field-row__value line-clamp-1">{{ item.productNames || '-' }}</text>
|
||||
</view>
|
||||
<!-- 订单时间 -->
|
||||
<view class="mb-8rpx flex items-center justify-between text-26rpx text-[#666]">
|
||||
<text class="text-[#999]">订单时间</text>
|
||||
<text>{{ formatDate(item.orderTime) || '-' }}</text>
|
||||
<view class="erp-field-row">
|
||||
<text class="erp-field-row__label">订单时间</text>
|
||||
<text class="erp-field-row__value">{{ formatDate(item.orderTime) || '-' }}</text>
|
||||
</view>
|
||||
<!-- 数量统计 -->
|
||||
<view class="flex justify-around pt-16rpx border-t border-[#f0f0f0]">
|
||||
<view class="text-center">
|
||||
<view class="text-28rpx font-semibold text-[#333]">{{ formatCount(item.totalCount) }}</view>
|
||||
<view class="text-22rpx text-[#999]">总数量</view>
|
||||
<view class="erp-metric-grid">
|
||||
<view class="erp-metric">
|
||||
<view class="erp-metric__value">{{ formatCount(item.totalCount) }}</view>
|
||||
<view class="erp-metric__label">总数量</view>
|
||||
</view>
|
||||
<view class="text-center">
|
||||
<view class="text-28rpx font-semibold text-[#333]">{{ formatCount(item.outCount) }}</view>
|
||||
<view class="text-22rpx text-[#999]">出库数</view>
|
||||
<view class="erp-metric">
|
||||
<view class="erp-metric__value">{{ formatCount(item.outCount) }}</view>
|
||||
<view class="erp-metric__label">出库数</view>
|
||||
</view>
|
||||
<view class="text-center">
|
||||
<view class="text-28rpx font-semibold text-[#409eff]">¥{{ formatPrice(item.totalPrice) }}</view>
|
||||
<view class="text-22rpx text-[#999]">含税金额</view>
|
||||
<view class="erp-metric">
|
||||
<view class="erp-metric__value text-[#409eff]">¥{{ formatPrice(item.totalPrice) }}</view>
|
||||
<view class="erp-metric__label">含税金额</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 操作按钮 -->
|
||||
<view class="flex flex-wrap gap-12rpx px-24rpx pb-20rpx" @click.stop>
|
||||
<view class="erp-list-card__actions" @click.stop>
|
||||
<wd-button
|
||||
size="small" plain @click="handleDetail(item)"
|
||||
>
|
||||
@@ -159,6 +159,8 @@ import { deleteSaleOrder, getSaleOrderPage, updateSaleOrderStatus } from '@/api/
|
||||
import { useAccess } from '@/hooks/useAccess'
|
||||
import { navigateBackPlus } from '@/utils'
|
||||
|
||||
type SaleOrderQueryParams = Parameters<typeof getSaleOrderPage>[0]
|
||||
|
||||
definePage({
|
||||
style: {
|
||||
navigationBarTitleText: '',
|
||||
@@ -176,7 +178,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<SaleOrder[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<SaleOrderQueryParams>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
status: undefined as number | undefined,
|
||||
@@ -209,7 +211,7 @@ function onStatusTabChange(status: number | undefined) {
|
||||
}
|
||||
|
||||
/** 格式化日期 */
|
||||
function formatDate(date?: string) {
|
||||
function formatDate(date?: string | number) {
|
||||
if (!date) return '-'
|
||||
return new Date(date).toLocaleDateString('zh-CN')
|
||||
}
|
||||
@@ -365,9 +367,9 @@ onMounted(() => {
|
||||
display: flex;
|
||||
margin: 0 24rpx 16rpx;
|
||||
background: #fff;
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid #ebeef5;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
|
||||
&__item {
|
||||
flex: 1;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
title="销售出库详情"
|
||||
left-arrow
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
:title="pageTitle"
|
||||
left-arrow
|
||||
@@ -9,7 +9,7 @@
|
||||
@click-left="handleBack"
|
||||
/>
|
||||
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<wd-cell-group title="基本信息" border>
|
||||
<wd-cell title="出库单号" :value="formData.no || '保存后自动生成'" />
|
||||
@@ -75,7 +75,7 @@
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="item.id || `${item.productId}-${index}`"
|
||||
class="mx-24rpx mb-20rpx rounded-12rpx bg-[#f9f9f9] p-24rpx"
|
||||
class="erp-form-item-card erp-form-item-card--padded"
|
||||
>
|
||||
<view class="mb-12rpx text-28rpx text-[#333] font-semibold">
|
||||
{{ item.productName || `产品${index + 1}` }}
|
||||
@@ -177,7 +177,7 @@
|
||||
</view>
|
||||
|
||||
<wd-popup v-model="orderPickerVisible" position="right" custom-style="width: 100%; height: 100%;">
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
title="选择销售订单"
|
||||
left-arrow
|
||||
@@ -198,11 +198,11 @@
|
||||
<view
|
||||
v-for="item in orderList"
|
||||
:key="item.id"
|
||||
class="mb-20rpx overflow-hidden rounded-12rpx bg-white shadow-sm"
|
||||
class="erp-form-item-card"
|
||||
:class="{ 'border-2 border-[#1890ff]': selectedOrderId === item.id }"
|
||||
@click="handleSelectOrder(item)"
|
||||
>
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<view class="mb-12rpx flex items-center justify-between">
|
||||
<view class="text-30rpx text-[#333] font-semibold">
|
||||
{{ item.no }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
title="销售出库"
|
||||
left-arrow
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
title="销售计划详情"
|
||||
left-arrow
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
left-arrow
|
||||
@@ -9,7 +9,7 @@
|
||||
@click-left="handleBack"
|
||||
/>
|
||||
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<wd-cell-group title="基本信息" border>
|
||||
<wd-cell title="计划编号" title-width="180rpx" center>
|
||||
@@ -55,13 +55,13 @@
|
||||
</wd-cell-group>
|
||||
|
||||
<wd-cell-group title="计划产品" border>
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mb-16rpx rounded-12rpx bg-[#fafafa] p-24rpx"
|
||||
class="erp-form-item-card erp-form-item-card--padded"
|
||||
>
|
||||
<view class="mb-16rpx flex items-center justify-between">
|
||||
<view class="erp-form-section-heading">
|
||||
<text class="text-28rpx font-semibold text-[#333]">
|
||||
{{ item.productName || `产品${index + 1}` }}
|
||||
</text>
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
<view
|
||||
v-if="item.completedAmount !== undefined || item.progress !== undefined"
|
||||
class="mb-12rpx rounded-8rpx bg-white p-16rpx"
|
||||
class="erp-form-info-card"
|
||||
>
|
||||
<view class="mb-8rpx flex items-center justify-between text-24rpx text-[#666]">
|
||||
<text class="text-[#999]">已完成金额</text>
|
||||
@@ -172,7 +172,7 @@
|
||||
</view>
|
||||
|
||||
<wd-popup v-model="showProductPicker" position="bottom" custom-style="height: 60%">
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<view class="mb-24rpx flex items-center justify-between">
|
||||
<text class="text-32rpx font-semibold">选择产品</text>
|
||||
<wd-button size="small" @click="showProductPicker = false">关闭</wd-button>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
title="销售计划"
|
||||
left-arrow
|
||||
@@ -199,7 +199,7 @@ const total = ref(0)
|
||||
const list = ref<SalePlan[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const activeStatus = ref<number | undefined>(undefined)
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
status: undefined as number | undefined,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
title="销售退货详情"
|
||||
left-arrow
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
left-arrow
|
||||
@@ -84,8 +84,8 @@
|
||||
</wd-form>
|
||||
</view>
|
||||
|
||||
<view class="mx-24rpx mt-24rpx pb-180rpx">
|
||||
<view class="mb-16rpx flex items-center justify-between">
|
||||
<view class="erp-form-body">
|
||||
<view class="erp-form-section-heading">
|
||||
<view class="text-32rpx text-[#333] font-semibold">
|
||||
退货明细({{ formData.items?.length || 0 }}项)
|
||||
</view>
|
||||
@@ -93,9 +93,9 @@
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mb-16rpx overflow-hidden rounded-12rpx bg-white shadow-sm"
|
||||
class="erp-form-item-card"
|
||||
>
|
||||
<view class="flex items-center justify-between bg-[#f8f8f8] px-24rpx py-12rpx">
|
||||
<view class="erp-form-item-card__header">
|
||||
<text class="text-28rpx text-[#333] font-semibold">产品 #{{ index + 1 }} {{ item.productName || '' }}</text>
|
||||
<wd-button
|
||||
v-if="formData.items && formData.items.length > 1"
|
||||
@@ -107,7 +107,7 @@
|
||||
删除
|
||||
</wd-button>
|
||||
</view>
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<view class="mb-16rpx">
|
||||
<text class="mb-8rpx block text-24rpx text-[#999]">仓库</text>
|
||||
<wd-picker
|
||||
@@ -118,7 +118,7 @@
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view v-if="item.productId" class="mb-16rpx rounded-8rpx bg-[#f9f9f9] p-16rpx">
|
||||
<view v-if="item.productId" class="erp-form-info-card">
|
||||
<view class="mb-8rpx flex justify-between text-24rpx">
|
||||
<text class="text-[#999]">产品名称</text>
|
||||
<text class="text-[#333]">{{ item.productName || '-' }}</text>
|
||||
@@ -211,7 +211,7 @@
|
||||
</view>
|
||||
|
||||
<wd-popup v-model="orderSelectVisible" position="right" custom-style="width: 100%; height: 100%;">
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
title="选择销售订单"
|
||||
left-arrow
|
||||
@@ -230,11 +230,11 @@
|
||||
<view
|
||||
v-for="item in orderList"
|
||||
:key="item.id"
|
||||
class="mb-20rpx overflow-hidden rounded-12rpx bg-white shadow-sm"
|
||||
class="erp-form-item-card"
|
||||
:class="{ 'border-2 border-[#1890ff]': selectedOrderId === item.id }"
|
||||
@click="handleSelectOrder(item)"
|
||||
>
|
||||
<view class="p-24rpx">
|
||||
<view class="erp-form-item-list">
|
||||
<view class="mb-12rpx flex items-center justify-between">
|
||||
<view class="text-30rpx text-[#333] font-semibold">{{ item.no }}</view>
|
||||
<wd-icon v-if="selectedOrderId === item.id" name="check" color="#1890ff" size="40rpx" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<wd-navbar
|
||||
title="销售退货"
|
||||
left-arrow
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="盘点单详情"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -8,7 +8,7 @@
|
||||
/>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<wd-cell-group title="基本信息" border>
|
||||
<wd-cell title="盘点单号" :value="formData.no || '保存时自动生成'" />
|
||||
@@ -39,7 +39,7 @@
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mx-24rpx mb-20rpx rounded-12rpx bg-[#f9f9f9] p-24rpx"
|
||||
class="erp-form-item-card erp-form-item-card--padded"
|
||||
>
|
||||
<view class="mb-12rpx flex items-center justify-between">
|
||||
<view class="text-28rpx text-[#333] font-semibold">
|
||||
@@ -147,15 +147,13 @@
|
||||
/>
|
||||
|
||||
<!-- 仓库选择器 -->
|
||||
<wd-picker
|
||||
v-model="warehousePickerVisible"
|
||||
<wd-picker v-model:show="warehousePickerVisible"
|
||||
:columns="warehouseColumns"
|
||||
@confirm="onWarehouseConfirm"
|
||||
/>
|
||||
|
||||
<!-- 产品选择器 -->
|
||||
<wd-picker
|
||||
v-model="productPickerVisible"
|
||||
<wd-picker v-model:show="productPickerVisible"
|
||||
:columns="productColumns"
|
||||
@confirm="onProductConfirm"
|
||||
/>
|
||||
@@ -198,7 +196,7 @@ const formRules = {
|
||||
const formRef = ref<FormInstance>()
|
||||
|
||||
// 仓库列表
|
||||
const warehouseList = ref<{ id: number, name: string }[]>([])
|
||||
const warehouseList = ref<{ id?: number, name?: string }[]>([])
|
||||
const warehousePickerVisible = ref(false)
|
||||
const warehouseColumns = computed(() => [
|
||||
warehouseList.value.map(v => ({ value: v.id, label: v.name })),
|
||||
@@ -212,7 +210,7 @@ const productColumns = computed(() => [
|
||||
])
|
||||
|
||||
// 日期选择器
|
||||
const datePickerVisible = ref(false)
|
||||
const datePickerVisible = ref<any>(false)
|
||||
|
||||
// 当前编辑的产品项索引
|
||||
const currentItemIndex = ref(-1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="库存盘点"
|
||||
@@ -178,7 +178,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<StockCheck[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
status: undefined,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="报溢单详情"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -8,7 +8,7 @@
|
||||
/>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<wd-cell-group title="基本信息" border>
|
||||
<wd-cell title="报溢单号" :value="formData.no || '保存时自动生成'" />
|
||||
@@ -46,7 +46,7 @@
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mx-24rpx mb-20rpx rounded-12rpx bg-[#f9f9f9] p-24rpx"
|
||||
class="erp-form-item-card erp-form-item-card--padded"
|
||||
>
|
||||
<view class="mb-12rpx flex items-center justify-between">
|
||||
<view class="text-28rpx text-[#333] font-semibold">
|
||||
@@ -135,15 +135,13 @@
|
||||
/>
|
||||
|
||||
<!-- 仓库选择器 -->
|
||||
<wd-picker
|
||||
v-model="warehousePickerVisible"
|
||||
<wd-picker v-model:show="warehousePickerVisible"
|
||||
:columns="warehouseColumns"
|
||||
@confirm="onWarehouseConfirm"
|
||||
/>
|
||||
|
||||
<!-- 产品选择器 -->
|
||||
<wd-picker
|
||||
v-model="productPickerVisible"
|
||||
<wd-picker v-model:show="productPickerVisible"
|
||||
:columns="productColumns"
|
||||
@confirm="onProductConfirm"
|
||||
/>
|
||||
@@ -187,7 +185,7 @@ const formRules = {
|
||||
const formRef = ref<FormInstance>()
|
||||
|
||||
// 仓库列表
|
||||
const warehouseList = ref<{ id: number, name: string }[]>([])
|
||||
const warehouseList = ref<{ id?: number, name?: string }[]>([])
|
||||
const warehousePickerVisible = ref(false)
|
||||
const warehouseColumns = computed(() => [
|
||||
warehouseList.value.map(v => ({ value: v.id, label: v.name })),
|
||||
@@ -201,7 +199,7 @@ const productColumns = computed(() => [
|
||||
])
|
||||
|
||||
// 日期选择器
|
||||
const datePickerVisible = ref(false)
|
||||
const datePickerVisible = ref<any>(false)
|
||||
|
||||
// 当前编辑的产品项索引
|
||||
const currentItemIndex = ref(-1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="库存报溢"
|
||||
@@ -183,7 +183,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<StockGain[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
status: undefined,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="入库单详情"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -8,7 +8,7 @@
|
||||
/>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<wd-cell-group title="基本信息" border>
|
||||
<wd-cell title="入库单号" :value="formData.no || '保存时自动生成'" />
|
||||
@@ -46,7 +46,7 @@
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mx-24rpx mb-20rpx rounded-12rpx bg-[#f9f9f9] p-24rpx"
|
||||
class="erp-form-item-card erp-form-item-card--padded"
|
||||
>
|
||||
<view class="mb-12rpx flex items-center justify-between">
|
||||
<view class="text-28rpx text-[#333] font-semibold">
|
||||
@@ -143,22 +143,19 @@
|
||||
/>
|
||||
|
||||
<!-- 供应商选择器 -->
|
||||
<wd-picker
|
||||
v-model="supplierPickerVisible"
|
||||
<wd-picker v-model:show="supplierPickerVisible"
|
||||
:columns="supplierColumns"
|
||||
@confirm="onSupplierConfirm"
|
||||
/>
|
||||
|
||||
<!-- 仓库选择器 -->
|
||||
<wd-picker
|
||||
v-model="warehousePickerVisible"
|
||||
<wd-picker v-model:show="warehousePickerVisible"
|
||||
:columns="warehouseColumns"
|
||||
@confirm="onWarehouseConfirm"
|
||||
/>
|
||||
|
||||
<!-- 产品选择器 -->
|
||||
<wd-picker
|
||||
v-model="productPickerVisible"
|
||||
<wd-picker v-model:show="productPickerVisible"
|
||||
:columns="productColumns"
|
||||
@confirm="onProductConfirm"
|
||||
/>
|
||||
@@ -210,7 +207,7 @@ const supplierColumns = computed(() => [
|
||||
])
|
||||
|
||||
// 仓库列表
|
||||
const warehouseList = ref<{ id: number, name: string }[]>([])
|
||||
const warehouseList = ref<{ id?: number, name?: string }[]>([])
|
||||
const warehousePickerVisible = ref(false)
|
||||
const warehouseColumns = computed(() => [
|
||||
warehouseList.value.map(v => ({ value: v.id, label: v.name })),
|
||||
@@ -224,7 +221,7 @@ const productColumns = computed(() => [
|
||||
])
|
||||
|
||||
// 日期选择器
|
||||
const datePickerVisible = ref(false)
|
||||
const datePickerVisible = ref<any>(false)
|
||||
|
||||
// 当前编辑的产品项索引
|
||||
const currentItemIndex = ref(-1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="其他入库"
|
||||
@@ -183,7 +183,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<StockIn[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
status: undefined,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container scan-page">
|
||||
<view class="yd-page-container erp-page scan-page">
|
||||
<wd-navbar
|
||||
title="扫码入库"
|
||||
left-arrow
|
||||
@@ -273,7 +273,12 @@ async function handleWarehouseScan(rawValue?: string) {
|
||||
try {
|
||||
try {
|
||||
const warehouse = await getWarehouseByBarCode(code)
|
||||
currentWarehouse.value = warehouse
|
||||
currentWarehouse.value = warehouse?.id
|
||||
? {
|
||||
id: warehouse.id,
|
||||
name: warehouse.name || '-',
|
||||
}
|
||||
: null
|
||||
} catch {
|
||||
setErrorFeedback(`仓库码 ${code} 不存在`)
|
||||
resetToIdle()
|
||||
@@ -558,7 +563,7 @@ function normalizeScanCode(value: string): string {
|
||||
/** 规范化相机扫码结果 */
|
||||
function normalizeScanResult(result: UniApp.ScanCodeSuccessRes): string {
|
||||
if (!result) return ''
|
||||
const value = result.result || result.code || ''
|
||||
const value = result.result || (result as UniApp.ScanCodeSuccessRes & { code?: string }).code || ''
|
||||
return normalizeScanCode(value)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="报损单详情"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -8,7 +8,7 @@
|
||||
/>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<wd-cell-group title="基本信息" border>
|
||||
<wd-cell title="报损单号" :value="formData.no || '保存时自动生成'" />
|
||||
@@ -46,7 +46,7 @@
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mx-24rpx mb-20rpx rounded-12rpx bg-[#f9f9f9] p-24rpx"
|
||||
class="erp-form-item-card erp-form-item-card--padded"
|
||||
>
|
||||
<view class="mb-12rpx flex items-center justify-between">
|
||||
<view class="text-28rpx text-[#333] font-semibold">
|
||||
@@ -135,15 +135,13 @@
|
||||
/>
|
||||
|
||||
<!-- 仓库选择器 -->
|
||||
<wd-picker
|
||||
v-model="warehousePickerVisible"
|
||||
<wd-picker v-model:show="warehousePickerVisible"
|
||||
:columns="warehouseColumns"
|
||||
@confirm="onWarehouseConfirm"
|
||||
/>
|
||||
|
||||
<!-- 产品选择器 -->
|
||||
<wd-picker
|
||||
v-model="productPickerVisible"
|
||||
<wd-picker v-model:show="productPickerVisible"
|
||||
:columns="productColumns"
|
||||
@confirm="onProductConfirm"
|
||||
/>
|
||||
@@ -187,7 +185,7 @@ const formRules = {
|
||||
const formRef = ref<FormInstance>()
|
||||
|
||||
// 仓库列表
|
||||
const warehouseList = ref<{ id: number, name: string }[]>([])
|
||||
const warehouseList = ref<{ id?: number, name?: string }[]>([])
|
||||
const warehousePickerVisible = ref(false)
|
||||
const warehouseColumns = computed(() => [
|
||||
warehouseList.value.map(v => ({ value: v.id, label: v.name })),
|
||||
@@ -201,7 +199,7 @@ const productColumns = computed(() => [
|
||||
])
|
||||
|
||||
// 日期选择器
|
||||
const datePickerVisible = ref(false)
|
||||
const datePickerVisible = ref<any>(false)
|
||||
|
||||
// 当前编辑的产品项索引
|
||||
const currentItemIndex = ref(-1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="库存报损"
|
||||
@@ -183,7 +183,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<StockLoss[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
status: undefined,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="调拨单详情"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -8,7 +8,7 @@
|
||||
/>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<wd-cell-group title="基本信息" border>
|
||||
<wd-cell title="调拨单号" :value="formData.no || '保存时自动生成'" />
|
||||
@@ -39,7 +39,7 @@
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mx-24rpx mb-20rpx rounded-12rpx bg-[#f9f9f9] p-24rpx"
|
||||
class="erp-form-item-card erp-form-item-card--padded"
|
||||
>
|
||||
<view class="mb-12rpx flex items-center justify-between">
|
||||
<view class="text-28rpx text-[#333] font-semibold">
|
||||
@@ -137,22 +137,19 @@
|
||||
/>
|
||||
|
||||
<!-- 调出仓库选择器 -->
|
||||
<wd-picker
|
||||
v-model="fromWarehousePickerVisible"
|
||||
<wd-picker v-model:show="fromWarehousePickerVisible"
|
||||
:columns="warehouseColumns"
|
||||
@confirm="onFromWarehouseConfirm"
|
||||
/>
|
||||
|
||||
<!-- 调入仓库选择器 -->
|
||||
<wd-picker
|
||||
v-model="toWarehousePickerVisible"
|
||||
<wd-picker v-model:show="toWarehousePickerVisible"
|
||||
:columns="warehouseColumns"
|
||||
@confirm="onToWarehouseConfirm"
|
||||
/>
|
||||
|
||||
<!-- 产品选择器 -->
|
||||
<wd-picker
|
||||
v-model="productPickerVisible"
|
||||
<wd-picker v-model:show="productPickerVisible"
|
||||
:columns="productColumns"
|
||||
@confirm="onProductConfirm"
|
||||
/>
|
||||
@@ -195,7 +192,7 @@ const formRules = {
|
||||
const formRef = ref<FormInstance>()
|
||||
|
||||
// 仓库列表
|
||||
const warehouseList = ref<{ id: number, name: string }[]>([])
|
||||
const warehouseList = ref<{ id?: number, name?: string }[]>([])
|
||||
const fromWarehousePickerVisible = ref(false)
|
||||
const toWarehousePickerVisible = ref(false)
|
||||
const warehouseColumns = computed(() => [
|
||||
@@ -210,7 +207,7 @@ const productColumns = computed(() => [
|
||||
])
|
||||
|
||||
// 日期选择器
|
||||
const datePickerVisible = ref(false)
|
||||
const datePickerVisible = ref<any>(false)
|
||||
|
||||
// 当前编辑的产品项索引
|
||||
const currentItemIndex = ref(-1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="库存调拨"
|
||||
@@ -178,7 +178,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<StockMove[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
status: undefined,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="出库单详情"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -8,7 +8,7 @@
|
||||
/>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<wd-cell-group title="基本信息" border>
|
||||
<wd-cell title="出库单号" :value="formData.no || '保存时自动生成'" />
|
||||
@@ -46,7 +46,7 @@
|
||||
<view
|
||||
v-for="(item, index) in formData.items"
|
||||
:key="index"
|
||||
class="mx-24rpx mb-20rpx rounded-12rpx bg-[#f9f9f9] p-24rpx"
|
||||
class="erp-form-item-card erp-form-item-card--padded"
|
||||
>
|
||||
<view class="mb-12rpx flex items-center justify-between">
|
||||
<view class="text-28rpx text-[#333] font-semibold">
|
||||
@@ -143,22 +143,19 @@
|
||||
/>
|
||||
|
||||
<!-- 客户选择器 -->
|
||||
<wd-picker
|
||||
v-model="customerPickerVisible"
|
||||
<wd-picker v-model:show="customerPickerVisible"
|
||||
:columns="customerColumns"
|
||||
@confirm="onCustomerConfirm"
|
||||
/>
|
||||
|
||||
<!-- 仓库选择器 -->
|
||||
<wd-picker
|
||||
v-model="warehousePickerVisible"
|
||||
<wd-picker v-model:show="warehousePickerVisible"
|
||||
:columns="warehouseColumns"
|
||||
@confirm="onWarehouseConfirm"
|
||||
/>
|
||||
|
||||
<!-- 产品选择器 -->
|
||||
<wd-picker
|
||||
v-model="productPickerVisible"
|
||||
<wd-picker v-model:show="productPickerVisible"
|
||||
:columns="productColumns"
|
||||
@confirm="onProductConfirm"
|
||||
/>
|
||||
@@ -209,7 +206,7 @@ const customerColumns = computed(() => [
|
||||
])
|
||||
|
||||
// 仓库列表
|
||||
const warehouseList = ref<{ id: number, name: string }[]>([])
|
||||
const warehouseList = ref<{ id?: number, name?: string }[]>([])
|
||||
const warehousePickerVisible = ref(false)
|
||||
const warehouseColumns = computed(() => [
|
||||
warehouseList.value.map(v => ({ value: v.id, label: v.name })),
|
||||
@@ -223,7 +220,7 @@ const productColumns = computed(() => [
|
||||
])
|
||||
|
||||
// 日期选择器
|
||||
const datePickerVisible = ref(false)
|
||||
const datePickerVisible = ref<any>(false)
|
||||
|
||||
// 当前编辑的产品项索引
|
||||
const currentItemIndex = ref(-1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="其他出库"
|
||||
@@ -193,7 +193,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<StockOut[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
status: undefined,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container scan-page">
|
||||
<view class="yd-page-container erp-page scan-page">
|
||||
<wd-navbar
|
||||
title="扫码出库"
|
||||
left-arrow
|
||||
@@ -316,7 +316,12 @@ async function handleWarehouseScan(rawValue?: string) {
|
||||
try {
|
||||
try {
|
||||
const warehouse = await getWarehouseByBarCode(code)
|
||||
currentWarehouse.value = warehouse
|
||||
currentWarehouse.value = warehouse?.id
|
||||
? {
|
||||
id: warehouse.id,
|
||||
name: warehouse.name || '-',
|
||||
}
|
||||
: null
|
||||
} catch {
|
||||
setErrorFeedback(`仓库码 ${code} 不存在`)
|
||||
resetToIdle()
|
||||
@@ -606,7 +611,7 @@ function normalizeScanCode(value: string): string {
|
||||
/** 规范化相机扫码结果 */
|
||||
function normalizeScanResult(result: UniApp.ScanCodeSuccessRes): string {
|
||||
if (!result) return ''
|
||||
const value = result.result || result.code || ''
|
||||
const value = result.result || (result as UniApp.ScanCodeSuccessRes & { code?: string }).code || ''
|
||||
return normalizeScanCode(value)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="库存记录"
|
||||
@@ -142,7 +142,7 @@ definePage({
|
||||
const total = ref(0)
|
||||
const list = ref<StockRecord[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
@@ -156,7 +156,7 @@ const searchForm = reactive({
|
||||
})
|
||||
|
||||
// 仓库列表
|
||||
const warehouseList = ref<{ id: number, name: string }[]>([])
|
||||
const warehouseList = ref<{ id?: number, name?: string }[]>([])
|
||||
|
||||
/** 业务类型下拉列 */
|
||||
const bizTypeColumns = computed(() => [
|
||||
@@ -233,7 +233,7 @@ function handleBack() {
|
||||
async function getList() {
|
||||
loadMoreState.value = 'loading'
|
||||
try {
|
||||
const params: Record<string, any> = { ...queryParams.value }
|
||||
const params = { ...queryParams.value }
|
||||
if (searchForm.bizNo) params.bizNo = searchForm.bizNo
|
||||
if (searchForm.bizType !== undefined) params.bizType = searchForm.bizType
|
||||
if (searchForm.warehouseId) params.warehouseId = searchForm.warehouseId
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="库存查询"
|
||||
@@ -111,7 +111,7 @@ definePage({
|
||||
const total = ref(0)
|
||||
const list = ref<Stock[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
@@ -125,7 +125,7 @@ const searchForm = reactive({
|
||||
|
||||
// 产品和仓库列表
|
||||
const productList = ref<{ id: number, name: string }[]>([])
|
||||
const warehouseList = ref<{ id: number, name: string }[]>([])
|
||||
const warehouseList = ref<{ id?: number, name?: string }[]>([])
|
||||
|
||||
/** 产品下拉列 */
|
||||
const productColumns = computed(() => [
|
||||
@@ -176,7 +176,7 @@ function handleBack() {
|
||||
async function getList() {
|
||||
loadMoreState.value = 'loading'
|
||||
try {
|
||||
const params: Record<string, any> = { ...queryParams.value }
|
||||
const params = { ...queryParams.value }
|
||||
if (searchForm.productId) {
|
||||
params.productIds = [searchForm.productId]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -8,7 +8,7 @@
|
||||
/>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<wd-cell-group title="基础信息" border>
|
||||
<wd-input
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="供应商管理"
|
||||
@@ -142,7 +142,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<Supplier[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
:title="getTitle"
|
||||
@@ -8,7 +8,7 @@
|
||||
/>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<view class="pb-180rpx">
|
||||
<view class="erp-form-body">
|
||||
<wd-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<wd-cell-group title="基础信息" border>
|
||||
<wd-input
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="yd-page-container erp-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<wd-navbar
|
||||
title="仓库管理"
|
||||
@@ -151,7 +151,7 @@ const toast = useToast()
|
||||
const total = ref(0)
|
||||
const list = ref<Warehouse[]>([])
|
||||
const loadMoreState = ref<LoadMoreState>('loading')
|
||||
const queryParams = ref<Record<string, any>>({
|
||||
const queryParams = ref<{ pageNo: number; pageSize: number } & Record<string, any>>({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
|
||||
@@ -86,6 +86,22 @@ const menuGroupsData: MenuGroup[] = [
|
||||
iconColor: '#eb2f96',
|
||||
permission: 'erp:pick-broccoli:query',
|
||||
},
|
||||
{
|
||||
key: 'purchaseInquiry',
|
||||
name: '采购询比',
|
||||
icon: 'comment',
|
||||
url: '/pages-erp/purchase-inquiry/index',
|
||||
iconColor: '#13c2c2',
|
||||
permission: 'erp:purchase-inquiry:query',
|
||||
},
|
||||
{
|
||||
key: 'purchaseStatistics',
|
||||
name: '采购统计',
|
||||
icon: 'chart',
|
||||
url: '/pages-erp/purchase-statistics/index',
|
||||
iconColor: '#52c41a',
|
||||
permission: 'erp:purchase-order:query',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -111,3 +111,279 @@ border-t-1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== ERP mobile styles ====================
|
||||
.erp-page {
|
||||
min-height: 100vh;
|
||||
background: #f5f7fa;
|
||||
color: #303133;
|
||||
|
||||
.wd-search {
|
||||
margin: 16rpx 24rpx;
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wd-cell-group {
|
||||
margin: 24rpx;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.wd-cell-group__title {
|
||||
padding: 24rpx 24rpx 16rpx;
|
||||
border-bottom: 1rpx solid #f0f2f5;
|
||||
color: #303133;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.wd-cell-group__body {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.wd-cell,
|
||||
.wd-input,
|
||||
.wd-textarea {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.wd-cell__title,
|
||||
.wd-input__label,
|
||||
.wd-textarea__label {
|
||||
color: #606266;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.erp-page__body {
|
||||
padding: 24rpx 24rpx 180rpx;
|
||||
}
|
||||
|
||||
.erp-list {
|
||||
padding: 0 24rpx 32rpx;
|
||||
}
|
||||
|
||||
.erp-list-card,
|
||||
.erp-section {
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
border: 1rpx solid #ebeef5;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.erp-list-card {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.erp-list-card__body,
|
||||
.erp-section {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.erp-list-card__actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12rpx;
|
||||
padding: 0 24rpx 20rpx;
|
||||
}
|
||||
|
||||
.erp-section {
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.erp-section__title {
|
||||
margin-bottom: 24rpx;
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1rpx solid #f0f2f5;
|
||||
color: #303133;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.erp-card-title {
|
||||
color: #303133;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.erp-field-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 24rpx;
|
||||
padding: 16rpx 0;
|
||||
border-bottom: 1rpx solid #f5f7fa;
|
||||
font-size: 26rpx;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.erp-field-row__label {
|
||||
flex-shrink: 0;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.erp-field-row__value {
|
||||
flex: 1;
|
||||
color: #303133;
|
||||
text-align: right;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.erp-metric-grid {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
gap: 16rpx;
|
||||
padding-top: 18rpx;
|
||||
border-top: 1rpx solid #f0f2f5;
|
||||
}
|
||||
|
||||
.erp-metric {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.erp-metric__value {
|
||||
color: #303133;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.erp-metric__label {
|
||||
margin-top: 4rpx;
|
||||
color: #909399;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.erp-status-tag {
|
||||
flex-shrink: 0;
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 8rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.erp-inline-card {
|
||||
padding: 20rpx;
|
||||
background: #f8fafc;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.erp-empty {
|
||||
padding: 48rpx 24rpx;
|
||||
color: #909399;
|
||||
font-size: 26rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.erp-form-body {
|
||||
padding-bottom: 180rpx;
|
||||
}
|
||||
|
||||
.erp-form-item-list {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.erp-form-section-heading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16rpx;
|
||||
margin: 0 24rpx 16rpx;
|
||||
}
|
||||
|
||||
.erp-form-item-card .erp-form-section-heading {
|
||||
margin: 0 0 16rpx;
|
||||
}
|
||||
|
||||
.erp-form-item-card {
|
||||
margin-bottom: 16rpx;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
border: 1rpx solid #ebeef5;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.wd-cell-group .erp-form-item-card {
|
||||
margin: 0 24rpx 20rpx;
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
.erp-form-body > .erp-form-item-card {
|
||||
margin-right: 24rpx;
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
|
||||
.erp-form-item-card--padded {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.erp-form-item-card__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16rpx;
|
||||
padding: 18rpx 24rpx;
|
||||
background: #f8fafc;
|
||||
border-bottom: 1rpx solid #eef2f7;
|
||||
}
|
||||
|
||||
.erp-form-item-card__body {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.erp-form-info-card {
|
||||
margin-bottom: 16rpx;
|
||||
padding: 18rpx;
|
||||
background: #fff;
|
||||
border: 1rpx solid #eef2f7;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.erp-form-field {
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.erp-form-field__label {
|
||||
display: block;
|
||||
margin-bottom: 8rpx;
|
||||
color: #909399;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.erp-form-inline-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16rpx;
|
||||
color: #606266;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.erp-form-input-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.erp-form-input-label {
|
||||
flex-shrink: 0;
|
||||
width: 140rpx;
|
||||
color: #909399;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.erp-form-total-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 12rpx;
|
||||
border-top: 1rpx solid #eef2f7;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user