刘洋 1 year ago
parent
commit
5c8b38d430

+ 2 - 2
src/components/common/device-manage-new/tab1.vue

@@ -16,14 +16,14 @@
     <template #operate="{ row }">
       <div class="table-operations" @click.stop>
         <t-link
-          :theme="row.status == 'DELIVER' ? 'primary' : 'default'"
+          theme="primary"
           :disabled="row.status != 'DELIVER'"
           hover="color"
           @click="sign(row)"
           >签收</t-link
         >
         <t-link
-          :theme="row.status === 'USING' ? 'primary' : 'default'"
+          theme="primary"
           :disabled="row.status !== 'USING'"
           hover="color"
           @click="notSign(row)"

+ 13 - 18
src/components/common/device-manage-new/tab2.vue

@@ -13,36 +13,27 @@
     <template #status="{ row }">
       {{ DEVICE_SIGN_STATUS[row.status] }}
     </template>
+    <template #transferMode="{ row }">
+      {{ DEVICE_TRANSPORT_METHOD[row.transferMode] }}
+    </template>
     <template #operate="{ row }">
       <div class="table-operations" @click.stop>
         <t-link
-          :theme="
-            row.haveSign || ['TRANSFER', 'IN'].includes(row.status)
-              ? 'default'
-              : 'primary'
-          "
+          theme="primary"
           :disabled="row.haveSign || ['TRANSFER', 'IN'].includes(row.status)"
           hover="color"
           @click="enter(row)"
           >入库</t-link
         >
         <t-link
-          :theme="
-            row.haveSign || ['TRANSFER', 'IN'].includes(row.status)
-              ? 'default'
-              : 'primary'
-          "
+          theme="primary"
           :disabled="row.haveSign || ['TRANSFER', 'IN'].includes(row.status)"
           hover="color"
           @click="middle(row)"
           >中转</t-link
         >
         <t-link
-          :theme="
-            row.haveSign || ['USING'].includes(row.status)
-              ? 'default'
-              : 'primary'
-          "
+          theme="primary"
           :disabled="row.haveSign || ['USING'].includes(row.status)"
           hover="color"
           @click="edit(row)"
@@ -107,7 +98,11 @@
 </template>
 <script name="DeviceManageNewTab2" setup>
 import { ref, computed, onMounted } from 'vue';
-import { RUNNING_STATUS, DEVICE_SIGN_STATUS } from '@/config/constants';
+import {
+  RUNNING_STATUS,
+  DEVICE_SIGN_STATUS,
+  DEVICE_TRANSPORT_METHOD,
+} from '@/config/constants';
 import { dictToOptionList } from '@/utils/tool';
 import { cloneDeep, omit } from 'lodash-es';
 import {
@@ -441,8 +436,8 @@ const columns = [
   { colKey: 'model', title: '设备型号' },
   { colKey: 'deviceStatus', title: '状态', cell: 'deviceStatus' },
   { colKey: 'supplierName', title: '设备归属' },
-  { colKey: 'transportMode', title: '运输方式' },
-  { colKey: 'status', title: '使用状态', cell: 'fff' },
+  { colKey: 'transferMode', title: '运输方式', cell: 'transferMode' },
+  { colKey: 'status', title: '使用状态', cell: 'status' },
   { colKey: 'receiveCrmNo', title: '接收方单号' },
   {
     title: '管理',

+ 3 - 4
src/config/constants.js

@@ -261,8 +261,7 @@ export const DEVICE_SIGN_STATUS = {
   RETURN: '已返还',
 };
 
-export const DEVICE_USE_STATUS = {
-  1: '入库',
-  2: '中转',
-  3: '使用中',
+export const DEVICE_TRANSPORT_METHOD = {
+  MAIL: '邮寄',
+  OTHER: '其它',
 };

+ 13 - 3
src/views/service-unit/dispatch/dispatch-manage/create-sop.vue

@@ -131,14 +131,24 @@
         }}</template>
         <template #operate="{ row }">
           <div class="table-operations" @click.stop>
-            <t-link theme="primary" hover="color" @click="allocation(row)">
+            <t-link
+              theme="primary"
+              hover="color"
+              @click="allocation(row)"
+              :disabled="row.sopStatus === 'START'"
+            >
               人员配置
             </t-link>
-            <t-link theme="primary" hover="color" @click="editSopItem(row)">
+            <t-link
+              theme="primary"
+              hover="color"
+              @click="editSopItem(row)"
+              :disabled="row.sopStatus === 'START'"
+            >
               编辑
             </t-link>
             <t-link
-              :theme="row.status === 'UN_PUBLISH' ? 'primary' : 'default'"
+              theme="primary"
               hover="color"
               :disabled="row.status === 'PUBLISH'"
               @click="publishSopItem(row)"