xiongchao 3 年之前
父节点
当前提交
fcd7d5104f

+ 22 - 3
src/views/check/checkstandard/modules/BaseForm.vue

@@ -136,7 +136,7 @@
               suffix="分钟"/>
           </a-form-item>
         </row-item>
-        <row-item>
+        <!--        <row-item>
           <a-form-item
             label="类型"
             :labelCol="BaseTool.Constant.labelCol"
@@ -155,7 +155,7 @@
               </a-select-option>
             </a-select>
           </a-form-item>
-        </row-item>
+        </row-item>-->
         <row-item>
           <a-form-item
             label="排序"
@@ -320,7 +320,7 @@
       </template>
       <span slot="action" slot-scope="record">
         <template>
-<!--          <a @click="handleDetailSelect(record)">修改</a>
+          <!--          <a @click="handleDetailSelect(record)">修改</a>
           <a-divider type="vertical" />-->
           <a-popconfirm title="是否要删除该条数据?" @confirm="handleDelOne(record)">
             <a>删除</a>
@@ -477,6 +477,22 @@ export default {
       })
       this.checkImgList = record.checkImgList
       this.checkFileList = record.checkFileList
+      if (record.lastDate != null) {
+        record.lastDate = this.BaseTool.Moment(record.lastDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign(pick(record, [
+            'lastDate'
+          ])))
+        })
+      }
+      if (record.nextDate != null) {
+        record.nextDate = this.BaseTool.Moment(record.nextDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign(pick(record, [
+            'nextDate'
+          ])))
+        })
+      }
       if (this.checkImgList == null) {
         this.defaultCheckImgList = this.BaseTool.UPLOAD.transImg(this.checkImgList)
       }
@@ -519,6 +535,9 @@ export default {
         // 上传文件
         values.checkImgList = this.checkImgList
         values.checkFileList = this.checkFileList
+        values.nextDate = values.nextDate ? this.BaseTool.Date.formatter(values.nextDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
+        values.lastDate = values.lastDate ? this.BaseTool.Date.formatter(values.lastDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
+
         // 备件列表
         values.detailList = this.data
         if (this.BaseTool.String.isBlank(values.id)) {

+ 17 - 8
src/views/check/checkstandard/modules/DetailSbCheck.vue

@@ -39,6 +39,7 @@
       :columns="columns"
       :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
       tableLayout="auto"
+      :scroll="{x: BaseTool.Constant.scrollX, y: BaseTool.Constant.scrollY}"
       rowKey="id">
       <span slot="action" slot-scope="record">
         <template>
@@ -122,57 +123,65 @@ export default {
         {
           title: '序号',
           dataIndex: 'index',
+          width: '100px',
+          checked: true,
           customRender: (text, record, index) => {
             return index + 1
           }
         },
         {
           title: '检查部位',
+          width: '100px',
+          checked: true,
           dataIndex: 'partName'
         },
         {
           title: '名称',
           dataIndex: 'name',
-          width: '300px'
+          checked: true,
+          width: '200px'
         },
         {
           title: '周期',
           dataIndex: 'periodType',
+          width: '100px',
+          checked: true,
           customRender: (text, record, index) => {
             return record.period + this.BaseTool.Table.getMapText(this.periodTypeMap, text)
           }
         },
-   /*     {
+        /*     {
           title: '动作类型',
           dataIndex: 'actionType',
           customRender: (text, record, index) => {
             return this.BaseTool.Table.getMapText(this.actionTypeMap, text)
           }
-        },*/
+        }, */
         {
           title: '标准工时',
+          width: '100px',
+          checked: true,
           dataIndex: 'standardHours'
         },
         {
           title: '上次执行日期',
           dataIndex: 'lastDate',
-          fixed: 'right',
           checked: true,
-          width: '250px'
+          width: '200px'
         },
         {
           title: '预计下次执行日期',
           dataIndex: 'nextDate',
-          fixed: 'right',
           checked: true,
-          width: '250px'
+          width: '200px'
         },
         {
           title: '操作',
           key: 'action',
           checked: true,
           align: 'center',
-          // fixed: 'right',
+          width: '250px',
+          fixed: 'right',
           scopedSlots: { customRender: 'action' }
         }
       ],

+ 1 - 1
src/views/sb/info/SbInfo.vue

@@ -105,7 +105,7 @@
             :data="loadData"
             :alert="options.alert"
             :rowSelection="options.rowSelection"
-            :scroll="{x: 1000}"
+            :scroll="{x: 1000, y: BaseTool.Constant.scrollY}"
             showPagination="auto"
           >
             <span slot="action" slot-scope="record">