浏览代码

汽保档案安装日期

caojunjie 1 年之前
父节点
当前提交
b5d1837894
共有 2 个文件被更改,包括 37 次插入4 次删除
  1. 20 3
      src/views/EquipmentArchives/detailsPage.vue
  2. 17 1
      src/views/EquipmentArchives/js/optionList.js

+ 20 - 3
src/views/EquipmentArchives/detailsPage.vue

@@ -74,6 +74,20 @@
                 <span v-else>{{ row.maintenanceDate }}</span>
             </template>
 
+            <template slot="installDate" slot-scope="{ row, index }">
+                <el-date-picker
+                    v-if="row.$cellEdit"
+                    v-model="row.installDate"
+                    type="date"
+                    value-format="yyyy-MM-dd"
+                    size="small"
+                    placeholder="选择日期">
+                </el-date-picker>
+                <span v-else>{{ row.installDate }}</span>
+            </template>
+
+
+
           <template slot="menu" slot-scope="{ row, index }">
               <el-button size="small" type="text" v-if="row.url" @click="imgurlfun(row)">信息码
               </el-button>
@@ -620,15 +634,15 @@ export default {
         //     this.findObject(this.optionList.column, "brand").dicData = res.data.data.records
         //     this.findObject(this.optionTwo.column, "brand").dicData = res.data.data.records
         // })
-
       // 品牌
       var type = {
         type: 'PP'
       }
       listAllP(type).then(res => {
-        this.findObject(this.optionTwo.column, "brandId").dicData = res.data.data.records
+        this.findObject(this.optionTwo.column, "brandId").dicData = res.data.data
+          // 设备详情的品牌编辑
+          this.findObject(this.optionList.column, "brand").dicData = res.data.data
       })
-
         // 获取供应商厂家数据
         GYSgetList(1,20, {corpType:'GYS'}).then(res=>{
             this.findObject(this.optionTwo.column, "corpId").dicData = res.data.data.records
@@ -802,6 +816,7 @@ export default {
                     maintenanceSecond:item.maintenanceSecond?item.maintenanceSecond:0,
                     exitDate:item.exitDate?item.exitDate + ' 00:00:00':item.exitDate,
                     maintenanceDate:item.maintenanceDate?item.maintenanceDate + ' 00:00:00':item.maintenanceDate,
+                    installDate:item.installDate?item.installDate + ' 00:00:00':item.installDate, // 安装日期
                     repairReportDate:item.repairReportDate,
                     url:item.url?item.url:null,
                     factoryId:item.factoryId?item.factoryId:null,
@@ -914,6 +929,7 @@ export default {
                       factoryName:item.corpName,
                       ...item,
                       code:'',
+                      installDate:'',
                       equipmentDescribe:item.cname,
                   })
               }
@@ -929,6 +945,7 @@ export default {
                       factoryName:item.corpName,
                       ...item,
                       code:'',
+                      installDate:'',
                       equipmentDescribe:item.cname,
                   })
               }

+ 17 - 1
src/views/EquipmentArchives/js/optionList.js

@@ -265,6 +265,11 @@ export const optionList = {
       overHidden: true
     },
     {
+      label: "安装日期",
+      prop: "installDate",
+      overHidden: true
+    },
+    {
       label: "维修次数",
       prop: "maintenanceSecond",
       overHidden: true
@@ -298,6 +303,7 @@ export const optionList = {
     {
       label: "规格",
       prop: "specs",
+      cell:true,
     },
     {
       label: "品牌",
@@ -305,9 +311,19 @@ export const optionList = {
       type: "select",
       props: {
         label: "cname",
-        value: "id"
+        value: "cname"
       },
       dicData: [],
+      cell: true,
+      change:(val)=>{
+        for(let item of val.column.dicData) {
+          if (val.value == item.cname) {
+            val.row.brandId = item.id
+            break;
+          }
+        }
+
+      }
     },
     {
       label: "备注",