| | |
| | | <template> |
| | | <view class="sales-account"> |
| | | <PageHeader title="采购退货单" @back="goBack"/> |
| | | <PageHeader title="采购退货单" |
| | | @back="goBack" /> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="请输入退料单号" |
| | | v-model="searchNo" |
| | | @change="getList" |
| | | clearable |
| | | /> |
| | | <up-input class="search-text" |
| | | placeholder="请输入退料单号" |
| | | v-model="searchNo" |
| | | @change="getList" |
| | | clearable /> |
| | | </view> |
| | | <view class="filter-button" @click="getList"> |
| | | <up-icon name="search" size="24" color="#999"></up-icon> |
| | | <view class="filter-button" |
| | | @click="getList"> |
| | | <up-icon name="search" |
| | | size="24" |
| | | color="#999"></up-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="ledger-list" v-if="list.length > 0"> |
| | | <view v-for="item in list" :key="item.id"> |
| | | <view class="ledger-list" |
| | | v-if="list.length > 0"> |
| | | <view v-for="item in list" |
| | | :key="item.id"> |
| | | <view class="ledger-item"> |
| | | <view class="item-header"> |
| | | <view class="item-left"> |
| | | <view class="document-icon"> |
| | | <up-icon name="file-text" size="16" color="#ffffff"></up-icon> |
| | | <up-icon name="file-text" |
| | | size="16" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-id">{{ item.no || "-" }}</text> |
| | | </view> |
| | |
| | | <text class="detail-value">{{ getProjectPhaseLabel(item.projectPhase) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">采购合同号</text> |
| | | <text class="detail-value">{{ item.purchaseContractNumber || "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">制作日期</text> |
| | | <text class="detail-value">{{ item.preparedAt || "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">制单人</text> |
| | | <text class="detail-value">{{ item.preparedUserName || "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">退料人</text> |
| | | <text class="detail-value">{{ item.returnUserName || "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">成交金额(元)</text> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="action-buttons"> |
| | | <u-button size="small" class="action-btn" @click="goView(item)">详情</u-button> |
| | | <u-button size="small" |
| | | class="action-btn" |
| | | @click="goView(item)">详情</u-button> |
| | | <u-button size="small" |
| | | class="action-btn" |
| | | type="error" |
| | | @click="handleDelete(item)">删除</u-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view v-else class="no-data"> |
| | | <view v-else |
| | | class="no-data"> |
| | | <text>暂无采购退货单数据</text> |
| | | </view> |
| | | <view class="fab-button" |
| | | @click="goAdd"> |
| | | <up-icon name="plus" |
| | | size="24" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | <script setup> |
| | | import { ref } from "vue"; |
| | | import { onShow } from "@dcloudio/uni-app"; |
| | | import { findPurchaseReturnOrderListPage, deletePurchaseReturnOrder } from "@/api/procurementManagement/purchaseReturnOrder"; |
| | | import { |
| | | findPurchaseReturnOrderListPage, |
| | | deletePurchaseReturnOrder, |
| | | } from "@/api/procurementManagement/purchaseReturnOrder"; |
| | | |
| | | const searchNo = ref(""); |
| | | const list = ref([]); |
| | |
| | | no: searchNo.value, |
| | | }) |
| | | .then(res => { |
| | | list.value = res?.data?.records || []; |
| | | const payload = res?.data; |
| | | if (Array.isArray(payload)) { |
| | | list.value = payload; |
| | | } else if (payload && typeof payload === "object") { |
| | | list.value = payload.records || payload.rows || []; |
| | | } else { |
| | | list.value = []; |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | uni.showToast({ title: "查询失败", icon: "error" }); |