From 07ed1a4d311753e2b999b9d6eb3faace50831b51 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期五, 16 一月 2026 13:38:13 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215
---
项目代码/WIDESEA_WMSClient/src/views/index/Message.vue | 253 ++++++++++++++++++++++++++++++++++++--------------
1 files changed, 180 insertions(+), 73 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/index/Message.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/index/Message.vue"
index e051ab6..a335b0d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/index/Message.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/index/Message.vue"
@@ -1,56 +1,51 @@
<template>
<div class="message-container">
- <div class="item" v-for="(item, index) in list" :key="index">
- <div class="title">{{ item.title }}({{ item.date }})</div>
- <div class="content">
- <el-row>
- <el-col :span="8">
- <label>鏀惰揣鍗曞彿锛歿{ item.formData.receiveOrderNo }}</label>
- </el-col>
- <el-col :span="8">
- <label>璐ㄦ鍗曞彿锛歿{ item.formData.checkOrderNo }}</label>
- </el-col>
- <el-col :span="8">
- <label>鏀惰揣鏄庣粏琛屽彿锛歿{ item.formData.receiveDetailRowNo }}</label>
- </el-col>
- </el-row>
+ <!-- 鍔犺浇鐘舵�� -->
+ <div v-if="loading" class="loading">鍔犺浇涓�...</div>
+
+ <!-- 绌烘暟鎹彁绀� -->
+ <div v-else-if="!list.length" class="empty">鏆傛棤娑堟伅</div>
+
+ <!-- 娑堟伅鍒楄〃 -->
+ <div v-else class="list-wrap">
+ <div class="item" v-for="(item, index) in list" :key="index">
+ <div class="title">{{ item.title }}({{ item.date }})</div>
+ <div class="content">
+ <el-row>
+ <el-col :span="8">
+ <label>璐ㄦ缁撴灉锛歿{ item.formData.result || '鏈~鍐�' }}</label>
+ </el-col>
+ <el-col :span="8">
+ <label>璐ㄦ鍗曞彿锛歿{ item.formData.checkOrderNo || '鏈~鍐�' }}</label>
+ </el-col>
+ <el-col :span="8">
+ <label>鎵规锛歿{ item.formData.batchNo || item.formData.receiveDetailRowNo || '鏈~鍐�' }}</label>
+ </el-col>
+ </el-row>
- <el-row>
- <el-col :span="8">
- <label>鐗╂枡缂栧彿锛歿{ item.formData.materielCode }}</label>
- </el-col>
- <el-col :span="8">
- <label>鍚堟牸鏁伴噺锛歿{ item.formData.qualifiedQuantity }}</label>
- </el-col>
- <el-col :span="8">
- <label>鐗归噰鏁伴噺锛歿{ item.formData.defectedQuantity }}</label>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="8">
+ <label>鐗╂枡缂栧彿锛歿{ item.formData.materielCode || '鏈~鍐�' }}</label>
+ </el-col>
+ <el-col :span="8">
+ <label>璐ㄦ鏁伴噺锛歿{ item.formData.receivedQuantity || '鏈~鍐�' }}</label>
+ </el-col>
+ <el-col :span="8">
+ <label>妫�楠屾鏁帮細{{ item.formData.inspectionNumber || '鏈~鍐�' }}</label>
+ </el-col>
+ </el-row>
- <el-row>
- <el-col :span="8">
- <label>閫�璐ф暟閲忥細{{ item.formData.returnQuantity }}</label>
- </el-col>
- <el-col :span="8">
- <label>鎶ュ簾鏁伴噺锛歿{ item.formData.scrappedQuantity }}</label>
- </el-col>
- <el-col :span="8">
- <label>璐ㄦ鎬绘暟锛歿{ item.formData.receivedQuantity }}</label>
- </el-col>
- </el-row>
-
- <el-row>
- <el-col :span="16">
- <label>鐗归噰璇存槑锛歿{ item.formData.defectedNote }}</label>
- </el-col>
- <el-col :span="8">
- <label>妫�楠屼汉锛歿{ item.formData.checkUserName }}</label>
- </el-col>
- </el-row>
- </div>
- <div style="margin-top: 20px">
- <el-button type="primary">鍚屾剰</el-button
- ><el-button type="danger">椹冲洖</el-button>
+ <!-- 琛ュ厖灞曠ず鏇村瀛楁 -->
+ <el-row v-if="item.formData.message" style="margin-top: 10px">
+ <el-col :span="24">
+ <label>澶囨敞锛歿{ item.formData.message }}</label>
+ </el-col>
+ </el-row>
+ </div>
+ <div style="margin-top: 20px">
+ <el-button type="primary" @click="handleAgree(item)">鍚屾剰</el-button>
+ <el-button type="danger" @click="handleReject(item)">椹冲洖</el-button>
+ </div>
</div>
</div>
</div>
@@ -58,51 +53,163 @@
<script>
export default {
+ name: 'CheckOrderApproval',
props: {
list: {
type: Array,
- default: () => {
- return [];
- },
+ default: () => [],
},
},
+ data() {
+ return {
+ // 鏈湴缁存姢鍒楄〃鏁版嵁锛堟棤鍒濆妯℃嫙鏁版嵁锛�
+ localList: [],
+ loading: false, // 鍔犺浇鐘舵��
+ };
+ },
created() {
- // if (!this.list.length) {
- // this.list.push({
- // title: "IQC璐ㄦ缁撴灉瀹℃壒",
- // formData: {
- // receiveOrderNo: "鏀惰揣鍗曞彿",
- // checkOrderNo: "璐ㄦ鍗曞彿",
- // receiveDetailRowNo: "鏀惰揣鏄庣粏琛屽彿",
- // materielCode: "鐗╂枡缂栧彿",
- // qualifiedQuantity: "鍚堟牸鏁伴噺",
- // defectedQuantity: "鐗归噰鏁伴噺",
- // returnQuantity: "閫�璐ф暟閲�",
- // scrappedQuantity: "鎶ュ簾鏁伴噺",
- // receivedQuantity: "璐ㄦ鎬绘暟",
- // defectedNote: "鐗归噰璇存槑",
- // checkUserName: "妫�楠屼汉",
- // message: "娑堟伅娴嬭瘯鍐呭娑堟伅娴嬭瘯鍐呭娑堟伅娴嬭瘯鍐呭娑堟伅娴嬭瘯鍐呭",
- // },
- // date: "2022-05-02 03:10",
- // });
- // }
+ // 浠呰皟鐢ㄦ帴鍙o紝鏃犳祴璇曟暟鎹~鍏�
+ this.fetchCheckOrderList();
+ },
+ methods: {
+ /**
+ * 璇锋眰璐ㄦ瀹℃壒鍒楄〃锛堟棤鍏滃簳鏁版嵁锛�
+ */
+ fetchCheckOrderList() {
+ const _this = this;
+ _this.loading = true;
+
+ _this.http
+ .post(`api/CheckOrder/ReceiveReCheckOrder`, {}, "鍔犺浇璐ㄦ瀹℃壒鏁版嵁涓�...")
+ .then((x) => {
+ _this.loading = false;
+ if (x.status) {
+ // 浠呰祴鍊兼帴鍙h繑鍥炵殑鐪熷疄鏁版嵁
+ _this.localList = x.data || [];
+ } else {
+ // 鏃犲厹搴曟暟鎹紝浠呮彁绀洪敊璇紝鍒楄〃缃┖
+ _this.$Message.error('鍔犺浇璐ㄦ瀹℃壒鏁版嵁澶辫触');
+ _this.localList = [];
+ }
+ })
+ .catch((error) => {
+ _this.loading = false;
+ console.error('鍔犺浇璐ㄦ瀹℃壒鏁版嵁寮傚父锛�', error);
+ _this.$Message.error('鍔犺浇璐ㄦ瀹℃壒鏁版嵁寮傚父锛岃绋嶅悗閲嶈瘯');
+ // 寮傚父鏃跺垪琛ㄧ疆绌猴紝鏃犲厹搴曟暟鎹�
+ _this.localList = [];
+ });
+ },
+
+ /**
+ * 鍚屾剰瀹℃壒锛堟棤娴嬭瘯閫昏緫锛�
+ */
+ handleAgree(item) {
+ const _this = this;
+ _this.$confirm('纭畾鍚屾剰璇ヨ川妫�瀹℃壒鍚楋紵', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'info',
+ }).then(() => {
+ _this.http
+ .post(`api/CheckOrder/AgreeReCheckOrder?orderNo=${item.formData.checkOrderNo}`, {}, "瀹℃壒澶勭悊涓�...")
+ .then((x) => {
+ if (x.status) {
+ _this.$Message.success('瀹℃壒鍚屾剰瀹屾垚');
+ _this.fetchCheckOrderList(); // 鍒锋柊鍒楄〃
+ } else {
+ return _this.$Message.error('瀹℃壒鍚屾剰澶辫触');
+ }
+ })
+ .catch((error) => {
+ console.error('鍚屾剰瀹℃壒寮傚父锛�', error);
+ _this.$Message.error('瀹℃壒鍚屾剰寮傚父锛岃绋嶅悗閲嶈瘯');
+ });
+ }).catch(() => {
+ _this.$Message.info('宸插彇娑堝悓鎰�');
+ });
+ },
+
+ /**
+ * 椹冲洖瀹℃壒锛堟棤娴嬭瘯閫昏緫锛�
+ */
+ handleReject(item) {
+ const _this = this;
+ _this.$prompt('璇疯緭鍏ラ┏鍥炲師鍥�', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ }).then(({ value }) => {
+ _this.http
+ .post(
+ `api/CheckOrder/RejectReCheckOrder?orderNo=${item.formData.checkOrderNo}`,
+ { rejectReason: value },
+ "瀹℃壒椹冲洖澶勭悊涓�..."
+ )
+ .then((x) => {
+ if (x.status) {
+ _this.$Message.success('瀹℃壒椹冲洖瀹屾垚');
+ _this.fetchCheckOrderList(); // 鍒锋柊鍒楄〃
+ } else {
+ return _this.$Message.error('瀹℃壒椹冲洖澶辫触');
+ }
+ })
+ .catch((error) => {
+ console.error('椹冲洖瀹℃壒寮傚父锛�', error);
+ _this.$Message.error('瀹℃壒椹冲洖寮傚父锛岃绋嶅悗閲嶈瘯');
+ });
+ }).catch(() => {
+ _this.$Message.info('宸插彇娑堥┏鍥�');
+ });
+ },
+ },
+ computed: {
+ list() {
+ return this.localList.length ? this.localList : this.$props.list;
+ },
},
};
</script>
+
<style scoped lang="less">
.message-container {
+ min-height: 300px;
+ padding: 10px;
+
+ .loading,
+ .empty {
+ text-align: center;
+ padding: 50px 0;
+ color: #999;
+ font-size: 14px;
+ }
+
.title {
padding-bottom: 10px;
font-weight: bold;
+ font-size: 15px;
}
+
.item {
border-bottom: 1px solid #eee;
padding: 10px 20px;
+ margin-bottom: 10px;
+ background: #fafafa;
+ border-radius: 4px;
}
+
.content {
color: #1b1b1b;
font-size: 14px;
+ line-height: 1.8;
+
+ label {
+ display: block;
+ word-break: break-all;
+ }
+ }
+
+ .list-wrap {
+ margin-top: 10px;
}
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.3