zhangjie пре 1 година
родитељ
комит
78b458226c

+ 18 - 11
src/views/sop/sop-manage/device-out-in/index.vue

@@ -48,6 +48,12 @@
         :selected-row-keys="selectedRowKeys"
         @select-change="selectChange"
       >
+        <template #inouttime="{ col, row }">
+          {{ timestampFilter(row[col.colKey]) }}
+        </template>
+        <template #status="{ col, row }">
+          {{ runningStatusFilter(row[col.colKey]) }}
+        </template>
       </t-table>
     </div>
     <AddDeviceDialog
@@ -65,9 +71,10 @@ import { deviceOutInSearch } from '@/api/sop';
 import { omit } from 'lodash';
 import { DEVICE_USAGE_TYPE, RUNNING_STATUS } from '@/config/constants';
 import { dictToOptionList } from '@/utils/tool';
+import { timestampFilter, runningStatusFilter } from '@/utils/filter';
 
 const selectedRowKeys = ref([]);
-const selectChange = (value, { selectedRowData }) => {
+const selectChange = (value) => {
   selectedRowKeys.value = value;
 };
 const showAddDeviceDialog = ref(false);
@@ -78,16 +85,16 @@ const columns = [
     width: 50,
     fixed: 'left',
   },
-  { colKey: 'serviceUnitName', title: '服务单元' },
-  { colKey: 'usageType', title: '用途类型' },
-  { colKey: 'deviceNo', title: '设备编号' },
-  { colKey: 'deviceStatus', title: '运行状态' },
-  { colKey: 'inOutTime', title: '出/入库时间', width: 150 },
-  { colKey: 'userName', title: '登记人' },
-  { colKey: 'customName', title: '客户名称' },
-  { colKey: 'inOutType', title: '出库/入库' },
-  { colKey: 'location', title: '当前地' },
-  { colKey: 'address', title: '发往地' },
+  { colKey: 'serviceUnitName', title: '服务单元', width: 120 },
+  { colKey: 'usageType', title: '用途类型', width: 120 },
+  { colKey: 'deviceNo', title: '设备编号', width: 200 },
+  { colKey: 'deviceStatus', title: '运行状态', width: 120, cell: 'status' },
+  { colKey: 'inOutTime', title: '出/入库时间', width: 180, cell: 'inouttime' },
+  { colKey: 'userName', title: '登记人', width: 140 },
+  { colKey: 'customName', title: '客户名称', width: 140 },
+  { colKey: 'inOutType', title: '出库/入库', width: 120 },
+  { colKey: 'location', title: '当前地', width: 120 },
+  { colKey: 'address', title: '发往地', width: 120 },
 ];
 const fields = ref([
   {

+ 13 - 34
src/views/sop/sop-manage/project-change-report/index.vue

@@ -1,12 +1,5 @@
 <template>
   <div class="office-sop flex flex-col h-full">
-    <!-- <div class="page-action">
-      <t-space size="small">
-        <t-button theme="default" :disabled="!selectedRowKeys.length"
-          >作废</t-button
-        >
-      </t-space>
-    </div> -->
     <SearchForm :fields="fields" :params="params">
       <template #service="{ item, params }">
         <select-service-unit v-model="params[item.prop]"></select-service-unit>
@@ -37,6 +30,13 @@
         :selected-row-keys="selectedRowKeys"
         @select-change="selectChange"
       >
+        <template #operate="{ row }">
+          <div class="table-operations">
+            <t-link theme="primary" hover="color" @click="handleApply(row)">
+              处理申请
+            </t-link>
+          </div>
+        </template>
       </t-table>
     </div>
   </div>
@@ -54,22 +54,17 @@ import {
   CUSTOMER_TYPE,
   FLOW_CHECK_STATUS,
 } from '@/config/constants';
+
 const router = useRouter();
 const selectedRowKeys = ref([]);
 const selectChange = (value, { selectedRowData }) => {
   selectedRowKeys.value = value;
 };
 const columns = [
-  // {
-  //   colKey: 'row-select',
-  //   type: 'multiple',
-  //   width: 50,
-  //   fixed: 'left',
-  // },
-  { colKey: 'code', title: '变更申请编号', minWidth: 120 },
-  { colKey: 'serviceName', title: '服务单元', minWidth: 80 },
-  { colKey: 'customTypeStr', title: '客户类型', width: 100 },
-  { colKey: 'customName', title: '客户名称', minWidth: 80 },
+  { colKey: 'code', title: '变更申请编号', width: 200 },
+  { colKey: 'serviceName', title: '服务单元', width: 140 },
+  { colKey: 'customTypeStr', title: '客户类型', width: 120 },
+  { colKey: 'customName', title: '客户名称', width: 140 },
   { colKey: 'crmNo', title: '项目单号' },
   { colKey: 'crmName', title: '项目名称' },
   { colKey: 'reason', title: '变更原因' },
@@ -83,23 +78,7 @@ const columns = [
     title: '管理',
     colKey: 'operate',
     fixed: 'right',
-    width: 400,
-    cell: (h, { row }) => {
-      return (
-        <div class="table-operations">
-          <t-link
-            theme="primary"
-            hover="color"
-            onClick={(e) => {
-              e.stopPropagation();
-              handleApply(row);
-            }}
-          >
-            处理申请
-          </t-link>
-        </div>
-      );
-    },
+    width: 120,
   },
 ];
 const handleApply = (row) => {

+ 1 - 1
src/views/system/config-manage/device-manage/edit-device-dialog.vue

@@ -211,7 +211,7 @@ const brandChange = () => {
 };
 
 const getBrandModelList = (brand) => {
-  const curBrand = props.brandList.value.find((item) => item.value === brand);
+  const curBrand = props.brandList.find((item) => item.value === brand);
   if (!curBrand) {
     brandModelList.value = [];
     return;