From db42d47f5692ef64e5436c5a6d29dcb537b44596 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 26 一月 2026 16:36:13 +0800
Subject: [PATCH] 浪潮对接单点登录:mis调整

---
 src/views/customerService/expiryAfterSales/index.vue |  258 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 258 insertions(+), 0 deletions(-)

diff --git a/src/views/customerService/expiryAfterSales/index.vue b/src/views/customerService/expiryAfterSales/index.vue
new file mode 100644
index 0000000..df44504
--- /dev/null
+++ b/src/views/customerService/expiryAfterSales/index.vue
@@ -0,0 +1,258 @@
+<template>
+	<div class="app-container">
+		<div class="search_form">
+			<div>
+				<span class="search_title">涓存湡鏃ユ湡锛�</span>
+				<el-date-picker
+					v-model="searchForm.expiryDate"
+					value-format="YYYY-MM-DD"
+					format="YYYY-MM-DD"
+					type="date"
+					placeholder="璇烽�夋嫨"
+					clearable
+					@change="handleQuery"
+				/>
+				<span class="search_title ml10">澶勭悊鏃ユ湡锛�</span>
+				<el-date-picker
+					v-model="searchForm.handleDate"
+					value-format="YYYY-MM-DD"
+					format="YYYY-MM-DD"
+					type="date"
+					placeholder="璇烽�夋嫨"
+					clearable
+					@change="handleQuery"
+				/>
+        <span style = "margin-left: 10px;" class="search_title">澶勭悊鐘舵�侊細</span>
+        <el-select v-model="searchForm.status" placeholder="璇烽�夋嫨鐘舵��" @change="handleQuery" style="width: 140px" clearable>
+          <el-option label="寰呭鐞�" :value="1"></el-option>
+          <el-option label="宸插鐞�" :value="2"></el-option>
+        </el-select>
+				<el-button type="primary" @click="handleQuery" style="margin-left: 10px"
+				>鎼滅储</el-button
+				>
+				<el-button @click="resetQuery" style="margin-left: 10px"
+				>閲嶇疆</el-button
+				>
+			</div>
+		</div>
+		<div class="table_actions" style="margin-bottom: 10px;">
+			<el-button type="primary" @click="openForm('add')">鏂板</el-button>
+			<el-button type="danger" @click="handleDelete">鍒犻櫎</el-button>
+		</div>
+		<div class="table_list">
+			<PIMTable
+				rowKey="id"
+				:column="tableColumn"
+				:tableData="tableData"
+				:page="page"
+				:isSelection="true"
+				@selection-change="handleSelectionChange"
+				:tableLoading="tableLoading"
+				@pagination="pagination"
+			>
+				<!-- 琛ㄦ牸鎻掓Ы -->
+				<template #status="{ row }">
+					<el-tag :type="row.status === 1 ? 'warning' : 'success'">
+						{{ row.status === 1 ? '寰呭鐞�' : '宸插鐞�' }}
+					</el-tag>
+				</template>
+
+				<template #operation="{ row }">
+					<el-button type="primary" link @click="openForm('view', row)">鏌ョ湅</el-button>
+					<el-button type="primary" link @click="openForm('edit', row)" v-if="row.status === 1">缂栬緫</el-button>
+				</template>
+			</PIMTable>
+		</div>
+		<form-dia ref="formDia" @close="handleQuery"></form-dia>
+	</div>
+</template>
+
+<script setup>
+import {Search} from "@element-plus/icons-vue";
+import {onMounted, ref} from "vue";
+import FormDia from "@/views/customerService/expiryAfterSales/components/formDia.vue";
+import {ElMessageBox} from "element-plus";
+// import {expiryAfterSalesDelete, expiryAfterSalesListPage} from "@/api/customerService/index.js"; // 鏆傛椂娉ㄩ噴鎺夛紝浣跨敤鍋囨暟鎹�
+import useUserStore from "@/store/modules/user.js";
+const { proxy } = getCurrentInstance();
+const userStore = useUserStore()
+
+const data = reactive({
+	searchForm: {
+		expiryDate: "",
+		handleDate: "",
+		status: ""
+	},
+	tableData: [],
+	page: {
+		current: 1,
+		size: 10,
+		total: 0,
+	},
+	selectedRows: [],
+	tableLoading: false,
+	formDia: null,
+	tableColumn: [
+		{
+			label: "涓存湡浜у搧鍚嶇О",
+			prop: "productName",
+			width: "",
+		},
+		{
+			label: "浜у搧鎵瑰彿",
+			prop: "batchNumber",
+			width: "",
+		},
+		{
+			label: "涓存湡鏃ユ湡",
+			prop: "expiryDate",
+			width: "",
+		},
+		{
+			label: "搴撳瓨鏁伴噺",
+			prop: "stockQuantity",
+			width: "",
+		},
+		{
+			label: "瀹㈡埛鍚嶇О",
+			prop: "customerName",
+			width: "",
+		},
+		{
+			label: "闂鎻忚堪",
+			prop: "problemDesc",
+			width: "",
+		},
+		{
+			label: "澶勭悊鐘舵��",
+			prop: "status",
+			width: "",
+			slot: true,
+		},
+		{
+			label: "澶勭悊浜�",
+			prop: "handlerName",
+			width: "",
+		},
+		{
+			label: "澶勭悊鏃ユ湡",
+			prop: "handleDate",
+			width: "",
+		},
+		{
+			label: "鎿嶄綔",
+			prop: "operation",
+			slot: true,
+			width: "200",
+		},
+	],
+});
+
+const {
+	searchForm,
+	tableData,
+	page,
+	selectedRows,
+	tableLoading,
+	formDia,
+	tableColumn,
+} = toRefs(data);
+
+// 鏌ヨ
+const handleQuery = () => {
+	page.value.current = 1;
+	getList();
+};
+
+// 閫夋嫨
+const handleSelectionChange = (selection) => {
+	selectedRows.value = selection;
+};
+
+// 閲嶇疆
+const resetQuery = () => {
+	proxy.resetForm("queryRef");
+	searchForm.value = {
+		expiryDate: "",
+		handleDate: "",
+		status: ""
+	};
+	handleQuery();
+};
+
+// 鍒嗛〉
+const pagination = (obj) => {
+	page.value.current = obj.page;
+	page.value.size = obj.limit;
+	getList();
+};
+
+// 鑾峰彇鍒楄〃鏁版嵁
+const getList = () => {
+	tableLoading.value = true;
+	// 鍙栨秷娉ㄩ噴骞朵娇鐢ㄧ湡瀹濧PI
+	// expiryAfterSalesListPage({
+	// 	...searchForm.value,
+	// 	current: page.value.current,
+	// 	size: page.value.size
+	// }).then(res => {
+	// 	tableData.value = res.data.records;
+	// 	page.value.total = res.data.total;
+	// 	tableLoading.value = false;
+	// });
+	
+	// 鏆傛椂杩斿洖绌烘暟鎹�
+	tableData.value = [];
+	page.value.total = 0;
+	tableLoading.value = false;
+};
+
+// 鎵撳紑寮规
+const openForm = (type, row) => {
+	nextTick(() => {
+		formDia.value?.openDialog(type, row)
+	})
+};
+
+// 鍒犻櫎
+const handleDelete = () => {
+	let ids = [];
+	if (selectedRows.value.length > 0) {
+		ids = selectedRows.value.map((item) => item.id);
+	} else {
+		proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+		return;
+	}
+	ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "鍒犻櫎鎻愮ず", {
+		confirmButtonText: "纭",
+		cancelButtonText: "鍙栨秷",
+		type: "warning",
+	})
+		.then(() => {
+			tableLoading.value = true;
+			// 鍙栨秷娉ㄩ噴骞朵娇鐢ㄧ湡瀹濧PI
+			// expiryAfterSalesDelete(ids).then(() => {
+			// 	proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+			// 	getList();
+			// }).finally(() => {
+			// 	tableLoading.value = false;
+			// });
+			
+			// 鏆傛椂妯℃嫙鍒犻櫎鎴愬姛
+			tableLoading.value = false;
+			proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+			getList();
+		})
+		.catch(() => {
+			proxy.$modal.msg("宸插彇娑�");
+		});
+};
+
+onMounted(() => {
+	getList();
+});
+</script>
+
+<style scoped>
+
+</style>

--
Gitblit v1.9.3