From 9797e46619f64bddb78d4b4eaa03d53069ac2ba4 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期一, 01 九月 2025 17:37:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
manager/src/api/order.js | 4 +
manager/src/views/order/order/orderList.vue | 84 ++++++++++++++++++++++++---
manager/src/views/video/VideoList.vue | 45 +++++++++------
3 files changed, 104 insertions(+), 29 deletions(-)
diff --git a/manager/src/api/order.js b/manager/src/api/order.js
index b46c866..340dbc9 100644
--- a/manager/src/api/order.js
+++ b/manager/src/api/order.js
@@ -22,6 +22,10 @@
export const delAfterSaleReason = (id) => {
return deleteRequest(`/order/afterSaleReason/delByIds/${id}`)
}
+//鏇存柊璁㈠崟鐘舵��
+export const sendMessage = (id) => {
+ return getRequest(`/order/order/sendMessage/${id}`)
+}
// 娣诲姞鍞悗鍘熷洜
export const addAfterSaleReason = (params) => {
diff --git a/manager/src/views/order/order/orderList.vue b/manager/src/views/order/order/orderList.vue
index 78dc30c..2303292 100644
--- a/manager/src/views/order/order/orderList.vue
+++ b/manager/src/views/order/order/orderList.vue
@@ -320,21 +320,47 @@
title: "鎿嶄綔",
key: "action",
align: "center",
- width: 100,
+ width: 150,
render: (h, params) => {
- return h(
- "Button",
- {
- props: { type: "info", size: "small" },
- style: { marginRight: "5px" },
- on: {
- click: () => {
- this.detail(params.row);
+ const buttons = [];
+
+ // 鏌ョ湅鎸夐挳 - 濮嬬粓鏄剧ず
+ buttons.push(
+ h(
+ "Button",
+ {
+ props: { type: "info", size: "small" },
+ style: { marginRight: "5px" },
+ on: {
+ click: () => {
+ this.detail(params.row);
+ },
},
},
- },
- "鏌ョ湅"
+ "鏌ョ湅"
+ )
);
+
+ // 鏍规嵁璁㈠崟鐘舵�佷负'PAID'鏃舵樉绀洪澶栨搷浣滄寜閽�
+ if (params.row.orderStatus === 'PAID') {
+ buttons.push(
+ h(
+ "Button",
+ {
+ props: { type: "primary", size: "small" },
+ style: { marginRight: "5px" },
+ on: {
+ click: () => {
+ this.handlePaidOrder(params.row);
+ },
+ },
+ },
+ "鏇存柊璁㈠崟鐘舵��"
+ )
+ );
+ }
+
+ return h('div', buttons);
},
},
@@ -410,6 +436,42 @@
query: { sn: sn },
})
},
+ // 澶勭悊宸蹭粯娆捐鍗曠殑鎿嶄綔
+ handlePaidOrder(order) {
+ // 杩欓噷鍙互娣诲姞宸蹭粯娆捐鍗曠殑鍏蜂綋鎿嶄綔閫昏緫
+ // 渚嬪锛氭樉绀虹‘璁ゅ璇濇锛屽彂璧峰彂璐ц姹傜瓑
+ this.$Modal.confirm({
+ title: '鏇存柊鐘舵��',
+ content: `纭瀵硅鍗曞彿锛�${order.sn} 杩涜鏇存柊鐘舵搷浣滃悧锛焋,
+ onOk: () => {
+ // 璋冪敤鍙戣揣API
+ this.deliverOrder(order);
+ },
+ onCancel: () => {
+ this.$Message.info('宸插彇娑堟搷浣�');
+ }
+ });
+ },
+ // 鍙戣揣鎿嶄綔
+ deliverOrder(order) {
+ console.log('------------->鑾峰彇璁㈠崟淇℃伅',order);
+ console.log('璁㈠崟sn缂栧彿',order.sn);
+ // 杩欓噷鍙互璋冪敤鐩稿叧鐨凙PI杩涜鍙戣揣鎿嶄綔
+ API_Order.sendMessage(order.sn).then((res) => {
+ console.log('-------------->',res);
+ if (res.success) {
+ this.$Message.success('鏇存柊鐘舵�佹垚鍔�');
+ this.getDataList(); // 鍒锋柊鍒楄〃
+ } else {
+ this.$Message.error('鏇存柊鐘舵�佸け璐�');
+ }
+ });
+
+ // 鏆傛椂妯℃嫙鎿嶄綔
+ this.$Message.success(`璁㈠崟 ${order.sn} 鏇存柊鐘舵�佹垚鍔燂紒`);
+ // 鍒锋柊鍒楄〃鏁版嵁
+ this.getDataList();
+ },
// 瀵煎嚭璁㈠崟
async exportOrder() {
if(this.searchForm.startDate==""||this.searchForm.endDate==""){
diff --git a/manager/src/views/video/VideoList.vue b/manager/src/views/video/VideoList.vue
index ef36837..e3aa4b1 100644
--- a/manager/src/views/video/VideoList.vue
+++ b/manager/src/views/video/VideoList.vue
@@ -954,13 +954,19 @@
this.videoTagList = res.data;
})
this.upLoadVideoShow = true;
- this.chooseTag = row.tagList.map(item => {
- return item.tagName
- })
+ console.log('--------------------->',row.tagList)
+ if (row.tagList){
+ this.chooseTag = row.tagList.map(item => {
+ return item.tagName
+ })
+ }
console.log('閫変腑鍒楄〃---銆�',row.goodsList)
- row.goodsList.forEach(item => {
- item.goodsSkuId = item.id
- })
+ if (row.goodsList){
+ row.goodsList.forEach(item => {
+ item.goodsSkuId = item.id
+ })
+ }
+
this.uploadVideoForm = {
id: '',
title: '',
@@ -977,18 +983,21 @@
}
- // 閬嶅巻宸查�夋嫨鐨勬爣绛�
- row.tagList.forEach(tag => {
- // 妫�鏌ユ爣绛炬槸鍚﹀凡瀛樺湪浜巚ideoTagList涓�
- const exists = this.videoTagList.some(item => item.tagName === tag.tagName);
- // 濡傛灉涓嶅瓨鍦紝鍒欐坊鍔犲埌閫夐」鍒楄〃
- if (!exists) {
- this.videoTagList.push({
- id: tag.id, // 鐢熸垚涓存椂ID
- tagName: tag.tagName
- });
- }
- });
+ if (row.tagList){
+ // 閬嶅巻宸查�夋嫨鐨勬爣绛�
+ row.tagList.forEach(tag => {
+ // 妫�鏌ユ爣绛炬槸鍚﹀凡瀛樺湪浜巚ideoTagList涓�
+ const exists = this.videoTagList.some(item => item.tagName === tag.tagName);
+ // 濡傛灉涓嶅瓨鍦紝鍒欐坊鍔犲埌閫夐」鍒楄〃
+ if (!exists) {
+ this.videoTagList.push({
+ id: tag.id, // 鐢熸垚涓存椂ID
+ tagName: tag.tagName
+ });
+ }
+ });
+ }
+
this.uploadVideoForm = row
console.log("鎵撳嵃鍊�",this.uploadVideoForm)
this.uploadVideoForm.fileInfo= {};
--
Gitblit v1.8.0