whj 11 months ago
parent
commit
5889281cb5
2 changed files with 25 additions and 13 deletions
  1. 20 4
      src/views/sb/info/SbInfoC.vue
  2. 5 9
      src/views/sb/info/modules/BackForm.vue

+ 20 - 4
src/views/sb/info/SbInfoC.vue

@@ -279,7 +279,7 @@
               <span slot="measureStatus" slot-scope="text">
                 <badge :status="DictCache.COLOR.SB_MEASURE_STATUS[text]" :text="yesNoMap[text]" />
               </span>
-              <div slot="expandedRowRender" slot-scope="record" style="width:100%;padding-right:120px;">
+              <div slot="expandedRowRender" slot-scope="record" style="width:100%;padding-right:250px;">
                 <a-card :bordered="false" style="width:100%;position: relative; z-inde:9999">
                   <div slot="title">
                     <a-row :gutter="20">
@@ -670,6 +670,12 @@ export default {
             }
           }
         }, */
+        {
+          title: '报废日期',
+          dataIndex: 'scrapedDate',
+          width: 120,
+          checked: true
+        },
         {
           title: '有效期限',
           dataIndex: 'nextCheckDate',
@@ -710,6 +716,16 @@ export default {
           dataIndex: 'remark',
           width: 100
         },
+        {
+          title: '状态',
+          checked: true,
+          dataIndex: 'status',
+          fixed: 'right',
+          align: 'center',
+          width: 100,
+          scopedSlots: { customRender: 'status' }
+
+        },
         {
           title: '操作',
           key: 'action',
@@ -979,15 +995,15 @@ export default {
       })
     },
     handleBackBatch (status) {
-      let ids = []
+      let sbIds = []
       const length = this.selectedRows.length
       if (length === 0) {
         this.$message.info('请选择设备')
         return
       }
-      ids = this.selectedRows.map((item) => item.id)
+      sbIds = this.selectedRows.map((item) => item.id)
       const modal = this.$refs.backForm
-      modal.base(ids, status)
+      modal.base(sbIds, status)
     },
     handleStart (record) {
       const modal = this.$refs.baseModalStatusLog

+ 5 - 9
src/views/sb/info/modules/BackForm.vue

@@ -39,7 +39,7 @@ export default {
       form: this.$form.createForm(this),
       visible: false,
       // 下拉框map
-      ids: [],
+      sbIds: [],
       status: 0
     }
   },
@@ -49,11 +49,11 @@ export default {
     // 下拉框map
   },
   methods: {
-    base (ids, status) {
+    base (sbIds, status) {
       this.visible = true
       // 如果是空标识添加
       this.modalTitle = status === 4 ? '报废' : '退库'
-      this.ids = ids
+      this.sbIds = sbIds
       this.status = status
     },
     save () {
@@ -64,7 +64,7 @@ export default {
           this.confirmLoading = false
           return
         }
-        values.ids = this.ids
+        values.sbIds = this.sbIds
         values.status = this.status
         batchBack(values).then(res => {
           this.confirmLoading = false
@@ -76,11 +76,7 @@ export default {
       this.visible = false
       this.confirmLoading = false
       this.form.resetFields()
-      console.log(values)
-      if (this.BaseTool.Object.isNotBlank(values)) {
-        console.log(values)
-        this.$emit('ok', values)
-      }
+      this.$emit('ok', values)
     }
   }
 }