From 2a85fae4da4d698cfe5b5d3f4f75485d50b5cd00 Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Thu, 8 Jan 2026 13:15:00 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=85=B3=E8=81=94=E6=94=BF?=
=?UTF-8?q?=E7=AD=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../order/component/PolicySelectModal.vue | 104 ++++++++++++++++++
src/views/order/orderList.vue | 64 ++++++++++-
vue.config.js | 2 +-
3 files changed, 167 insertions(+), 3 deletions(-)
create mode 100644 src/views/order/component/PolicySelectModal.vue
diff --git a/src/views/order/component/PolicySelectModal.vue b/src/views/order/component/PolicySelectModal.vue
new file mode 100644
index 0000000..f71b282
--- /dev/null
+++ b/src/views/order/component/PolicySelectModal.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/order/orderList.vue b/src/views/order/orderList.vue
index 7a5ee36..b0d11ea 100644
--- a/src/views/order/orderList.vue
+++ b/src/views/order/orderList.vue
@@ -157,6 +157,11 @@
+
@@ -164,7 +169,8 @@
import {
getList,
index as getTypes,
- clone as cloneOrder
+ clone as cloneOrder,
+ save as saveOrder
} from "@/api/order"
import {
parseTime
@@ -180,17 +186,21 @@
import orderLog from '@/views/order/component/orderLog'
import actions from '@/views/order/component/actions'
import orderEdit from '@/views/order/component/orderEdit'
+ import policySelectModal from '@/views/order/component/PolicySelectModal'
export default {
components: {
orderLog,
actions,
- orderEdit
+ orderEdit,
+ policySelectModal
},
data() {
return {
selectId: null,
isShowLog: false,
isShowEdit: false,
+ isShowPolicySelect: false,
+ currentOrderId: null,
memberId:"",
merchants: [],
orderItemStates: [],
@@ -398,6 +408,30 @@
label: "预产期",
width: 120
},
+ {
+ label: "关联政策",
+ prop: 'order_policy.name',
+ width: 150,
+ align: 'left',
+ customFn: (row) => {
+ const policyName = row.order_policy?.name || ''
+ return (
+
+ {policyName}
+ {
+ this.currentOrderId = row.order?.id
+ this.isShowPolicySelect = true
+ }
+ }}
+ >
+
+ )
+ }
+ },
{
prop: "product_type.name",
label: "产品类型",
@@ -408,6 +442,12 @@
label: "产品型号",
width: 100
},
+ {
+ prop: "product.merchant.username",
+ label: "商品商家",
+ align: "left",
+ width: 160
+ },
{
prop: "merchant.username",
label: "服务商家",
@@ -706,6 +746,26 @@
// 用户取消操作,不做任何处理
})
},
+ selectPolicy(row) {
+ if (!this.currentOrderId || !row) {
+ return
+ }
+ saveOrder({
+ id: this.currentOrderId,
+ policy_id: row.id
+ }).then(res => {
+ Message({
+ type: 'success',
+ message: '更新关联政策成功'
+ })
+ this.getOrders()
+ }).catch(err => {
+ Message({
+ type: 'error',
+ message: err?.errmsg || '更新关联政策失败'
+ })
+ })
+ },
downloadExel() {
diff --git a/vue.config.js b/vue.config.js
index 8daba2c..079ca25 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: '/admin/',
- outputDir: '/Users/mac/Documents/朗业/2022/y-孕育邦/后端代码/yunyubang/public/admin_test',
+ outputDir: '/Users/mac/Documents/朗业/2022/y-孕育邦/后端代码/yunyubang/public/admin',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项