浏览代码

新增杂需求

刘洋 1 年之前
父节点
当前提交
cd4fd73861

+ 11 - 0
src/views/resource-guard/device-guard/registration-query/index.vue

@@ -151,6 +151,15 @@ const fields = ref([
       clearable: true,
     },
   },
+  {
+    prop: 'deviceSerialNo',
+    label: '设备序列号',
+    labelWidth: 90,
+    colSpan: 6,
+    attrs: {
+      clearable: true,
+    },
+  },
   {
     prop: 'customName',
     label: '客户名称',
@@ -194,6 +203,7 @@ const params = reactive({
   userId: '',
   deviceStatus: '',
   deviceNo: '',
+  deviceSerialNo: '',
   inOutTime: [],
   customName: '',
   location: '',
@@ -213,6 +223,7 @@ const columns = [
   { colKey: 'serviceUnitName', title: '服务单元名称', width: 160 },
   { colKey: 'usageType', title: '用途类型', width: 100, cell: 'usage' },
   { colKey: 'deviceNo', title: '设备编号', width: 120 },
+  { colKey: 'deviceSerialNo', title: '设备序列号', width: 120 },
   { colKey: 'deviceStatus', title: '运行状态', width: 100, cell: 'status' },
   {
     colKey: 'inOutTime',

+ 7 - 6
src/views/sop/components/dynamic-form-item/device-table/edit-column-dialog.vue

@@ -15,10 +15,10 @@
       :labelWidth="120"
       colon
     >
-      <t-form-item label="设备编号" name="deviceNo">
+      <t-form-item label="设备序列号" name="serialNo">
         <t-select
           :disabled="!isOutType"
-          v-model="formData.deviceNo"
+          v-model="formData.serialNo"
           :options="deviceOptions"
           @change="deviceChange"
           filterable
@@ -114,7 +114,7 @@ const title = computed(() => {
 });
 
 const rules = {
-  deviceNo: [
+  serialNo: [
     {
       required: true,
       message: '不能为空',
@@ -166,11 +166,11 @@ const getDeviceOptions = async () => {
   deviceOptions.value = res
     .filter(
       (item) =>
-        !(props.tableData || []).find((v) => v.deviceNo == item.deviceNo)
+        !(props.tableData || []).find((v) => v.serialNo == item.serialNo)
     )
     .map((item) => ({
       ...item,
-      value: item.deviceNo,
+      value: item.serialNo,
       label: item.deviceNo + '_' + item.serialNo + '_' + item.deviceBrand,
     }));
 };
@@ -185,7 +185,8 @@ const deviceChange = (val, { option }) => {
   formData.deviceBrand = option.deviceBrand;
   formData.scanCount = option.scanCount;
   formData.location = option.location;
-  formData.serialNo = option.serialNo;
+  // formData.serialNo = option.serialNo;
+  formData.deviceNo = option.deviceNo;
   if (!props.isOutType) {
     formData.address = option.supplierName;
   } else {

+ 7 - 6
src/views/sop/sop-manage/device-out-in/device-table/edit-column-dialog.vue

@@ -15,9 +15,9 @@
       :labelWidth="120"
       colon
     >
-      <t-form-item label="设备编号" name="deviceNo">
+      <t-form-item label="设备序列号" name="serialNo">
         <t-select
-          v-model="formData.deviceNo"
+          v-model="formData.serialNo"
           :options="deviceOptions"
           @change="deviceChange"
           filterable
@@ -103,7 +103,7 @@ const title = computed(() => {
 });
 
 const rules = {
-  deviceNo: [
+  serialNo: [
     {
       required: true,
       message: '不能为空',
@@ -155,11 +155,11 @@ const getDeviceOptions = async () => {
   deviceOptions.value = res
     .filter(
       (item) =>
-        !(props.tableData || []).find((v) => v.deviceNo == item.deviceNo)
+        !(props.tableData || []).find((v) => v.serialNo == item.serialNo)
     )
     .map((item) => ({
       ...item,
-      value: item.deviceNo,
+      value: item.serialNo,
       label: item.deviceNo + '_' + item.serialNo + '_' + item.deviceBrand,
     }));
 };
@@ -173,7 +173,8 @@ const deviceChange = (val, { option }) => {
   formData.deviceBrand = option.deviceBrand;
   formData.scanCount = option.scanCount;
   formData.location = option.location;
-  formData.serialNo = option.serialNo;
+  // formData.serialNo = option.serialNo;
+  formData.deviceNo = option.deviceNo;
   if (!props.isOutType) {
     formData.address = option.supplierName;
   }

+ 8 - 0
src/views/sop/sop-manage/device-out-in/index.vue

@@ -126,6 +126,7 @@ const columns = [
   { colKey: 'serviceUnitName', title: '服务单元', width: 120 },
   { colKey: 'usageType', title: '用途类型', width: 120 },
   { colKey: 'deviceNo', title: '设备编号', width: 200 },
+  { colKey: 'deviceSerialNo', title: '设备序列号', width: 200 },
   { colKey: 'deviceStatus', title: '运行状态', width: 120, cell: 'status' },
   { colKey: 'inOutTime', title: '出/入库时间', width: 180, cell: 'inouttime' },
   { colKey: 'userName', title: '登记人', width: 140 },
@@ -196,6 +197,12 @@ const fields = ref([
       valueType: 'time-stamp',
     },
   },
+  {
+    prop: 'deviceSerialNo',
+    label: '设备序列号',
+    labelWidth: 70,
+    colSpan: 6,
+  },
   {
     type: 'buttons',
     colSpan: 2,
@@ -231,6 +238,7 @@ const params = reactive({
   deviceStatus: '',
   time: [],
   deviceNo: '',
+  deviceSerialNo: '',
   customName: '',
   location: '',
   address: '',