瀏覽代碼

feat(订单列表): 实现订单编码点击直达详情功能

yz 1 周之前
父節點
當前提交
ebdf049cc1
共有 3 個文件被更改,包括 17 次插入2 次删除
  1. 1 1
      README.md
  2. 14 0
      src/views/order/order/index-avue.vue
  3. 2 1
      src/views/order/order/option.js

+ 1 - 1
README.md

@@ -54,7 +54,7 @@ npm install --registry=https://registry.npmmirror.com
   - [ ] 库存不足可提交订单,仅提示不限制(中)
   - [ ] 订单主表显示行数;查询页可见每单行数(中)
   - [ ] 支持模糊搜索物料,弹窗多选添加(中)
-  - [ ] 订单列表:订单编码可点击直达详情,移除“查看”按钮(急)
+  - [x] 订单列表:订单编码可点击直达详情,移除“查看”按钮(急)
   - [ ] 订单提交后状态应变更,排查为何仍为“草稿”(急)
   - [ ] 已提交订单禁用“提交”按钮,状态列展示“已提交”(急)
   - [ ] 搜索新增“物料”条件,可查含某物料的订单(中)

+ 14 - 0
src/views/order/order/index-avue.vue

@@ -57,6 +57,12 @@
       </template>
 
       <!-- 订单类型显示 -->
+      <template slot="orderCode" slot-scope="{row}">
+        <el-link type="primary" :underline="true" @click="handleView(row)">
+          {{ row.orderCode }}
+        </el-link>
+      </template>
+
       <template slot="orderType" slot-scope="{row}">
         <el-tag :type="getOrderTypeTagType(row.orderType)">
           {{ getOrderTypeLabel(row.orderType) }}
@@ -338,6 +344,14 @@ export default {
       this.orderFormVisible = true
     },
 
+    // 新增:点击订单编码查看详情
+    handleView(row) {
+      if (!row || !row.id) return
+      this.isEditMode = true
+      this.editOrderId = row.id
+      this.orderFormVisible = true
+    },
+
     /**
      * 同步数据(调用通用unification接口)
      * @returns {Promise<void>}

+ 2 - 1
src/views/order/order/option.js

@@ -53,7 +53,7 @@ export const option = {
   searchMenuSpan: 6,
   border: true,
   index: true,
-  viewBtn: true,
+  viewBtn: false,
   editBtn: true,
   delBtn: false, // 禁用删除按钮
   selection: true,
@@ -69,6 +69,7 @@ export const option = {
       label: '订单编码',
       prop: 'orderCode',
       minWidth: 150,
+      slot: true,
       search: true,
       editDisabled: true,
       addDisplay: false,