Jelajahi Sumber

refactor(订单): 调整订单状态字段在表单和表格中的位置

yz 4 minggu lalu
induk
melakukan
a1e9b86c8b
2 mengubah file dengan 20 tambahan dan 20 penghapusan
  1. 8 8
      src/views/order/order/index.vue
  2. 12 12
      src/views/order/order/option.js

+ 8 - 8
src/views/order/order/index.vue

@@ -149,6 +149,14 @@
         </template>
       </el-table-column>
       
+      <el-table-column prop="status" label="订单状态" width="100" align="center">
+        <template slot-scope="{row}">
+          <el-tag :type="getStatusType(row.status)">
+            {{ getStatusText(row.status) }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      
       <el-table-column prop="totalAmount" label="订单总金额" width="120" align="right">
         <template slot-scope="{row}">
           ¥{{ parseFloat(row.totalAmount || 0).toFixed(2) }}
@@ -164,14 +172,6 @@
       <el-table-column prop="receiverName" label="收货人姓名" width="120" show-overflow-tooltip />
       <el-table-column prop="receiverPhone" label="收货人电话" width="130" show-overflow-tooltip />
       
-      <el-table-column prop="status" label="订单状态" width="100" align="center">
-        <template slot-scope="{row}">
-          <el-tag :type="getStatusType(row.status)">
-            {{ getStatusText(row.status) }}
-          </el-tag>
-        </template>
-      </el-table-column>
-      
       <el-table-column prop="createTime" label="创建时间" width="160" show-overflow-tooltip />
       
       <el-table-column label="操作" width="280" align="center" fixed="right">

+ 12 - 12
src/views/order/order/option.js

@@ -138,6 +138,18 @@ export const option = {
       }]
     },
     {
+      label: '订单状态',
+      prop: 'status',
+      type: 'select',
+      dicData: [...ORDER_STATUS_OPTIONS],
+      search: true,
+      minWidth: 100,
+      align: 'center',
+      slot: true,
+      editDisabled: true,
+      addDisplay: false
+    },
+    {
       label: '订单总金额',
       prop: 'totalAmount',
       type: 'number',
@@ -204,18 +216,6 @@ export const option = {
       }]
     },
     {
-      label: '订单状态',
-      prop: 'status',
-      type: 'select',
-      dicData: [...ORDER_STATUS_OPTIONS],
-      search: true,
-      minWidth: 100,
-      align: 'center',
-      slot: true,
-      editDisabled: true,
-      addDisplay: false
-    },
-    {
       label: '备注',
       prop: 'remark',
       type: 'textarea',