cuikaidong
3 天以前 b9aa93af26450229b9a67ee78fc012107301e7a3
设备台账模块修改
已修改3个文件
212 ■■■■ 文件已修改
src/views/eam/equipment/EamEquipmentList.vue 165 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/modules/EamEquipmentFluidList.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/modules/EamEquipmentModal.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/EamEquipmentList.vue
@@ -96,7 +96,83 @@
                </a-tree-select>
              </a-form-item>
            </a-col>
            <a-col
              :xl="6"
              :lg="7"
              :md="8"
              :sm="24"
            >
            <a-form-item label="机床厂家">
              <a-input
                placeholder="请输入机床厂家"
                v-model="queryParam.manufacturingEnterprise"
              ></a-input>
            </a-form-item>
            </a-col>
            <a-col
              :xl="6"
              :lg="7"
              :md="8"
              :sm="24"
            >
            <a-form-item label="原值(元)">
              <a-input
                placeholder="请输入原值(元)"
                v-model="queryParam.originalValue"
              ></a-input>
            </a-form-item>
            </a-col>
            <a-col
              :xl="6"
              :lg="7"
              :md="8"
              :sm="24"
            >
            <a-form-item label="性能指标">
              <a-input
                placeholder="请输入性能指标"
                v-model="queryParam.performanceIndicators"
              ></a-input>
            </a-form-item>
            </a-col>
            <a-col
              :xl="6"
              :lg="7"
              :md="8"
              :sm="24"
            >
              <a-form-item label="出厂日期">
                <a-range-picker v-model="leaveFactoryDate" value-format="YYYY-MM-DD HH:mm:ss"
                                @change="leaveFactoryRangeChange"
                                style="width: 100%"/>
              </a-form-item>
            </a-col>
            <a-col
              :xl="6"
              :lg="7"
              :md="8"
              :sm="24"
            >
              <a-form-item label="投用日期">
                <a-range-picker v-model="acceptanceCheckDate" value-format="YYYY-MM-DD"
                                @change="acceptanceCheckRangeChange"
                                style="width: 100%"/>
              </a-form-item>
            </a-col>
            <a-col
              :xl="6"
              :lg="7"
              :md="8"
              :sm="24"
            >
              <a-form-item label="设备用途">
                <j-dict-select-tag
                  dict-code="equipment_use"
                  placeholder="请选择设备用途"
                  v-model="queryParam.equipmentUse"
                ></j-dict-select-tag>
              </a-form-item>
            </a-col>
          </template>
          <a-col
            :xl="6"
@@ -451,16 +527,33 @@
          fixed: 'left'
        },
        {
          title: '管理分类',
          title: '设备型号',
          align: 'center',
          width: 120,
          dataIndex: 'equipmentImportance_dictText',
          width: 200,
          dataIndex: 'equipmentModel'
        },
        {
          title: '技术状态',
          title: '出厂日期',
          align: 'center',
          width: 100,
          dataIndex: 'technologyStatus_dictText'
          dataIndex: 'leaveFactoryDate'
        },
        {
          title: '投用日期',
          align: 'center',
          width: 100,
          dataIndex: 'acceptanceCheckDate'
        },
        {
          title: '原值(元)',
          align: 'center',
          dataIndex: 'originalValue'
        },
        {
          title: '使用车间',
          align: 'center',
          width: 100,
          dataIndex: 'orgId_dictText'
        },
        {
          title: '资产使用状态',
@@ -481,13 +574,31 @@
          dataIndex: 'maintenanceStatus_dictText'
        },
        {
          title: '使用车间',
          title: '设备用途',
          align: 'center',
          width: 100,
          dataIndex: 'orgId_dictText'
          dataIndex: 'equipmentUse_dictText'
        },
        {
          title: '设备管理员',
          title: '操作工',
          align: 'center',
          width: 100,
          dataIndex: 'operator'
        },
        {
          title: '管理分类',
          align: 'center',
          width: 120,
          dataIndex: 'equipmentImportance_dictText',
        },
        {
          title: '技术状态',
          align: 'center',
          width: 100,
          dataIndex: 'technologyStatus_dictText'
        },
        {
          title: '设备责任人',
          align: 'center',
          width: 100,
          dataIndex: 'equipmentManager_dictText'
@@ -501,12 +612,6 @@
          title: '设备种类',
          align: 'center',
          dataIndex: 'equipmentType_dictText'
        },
        {
          title: '设备型号',
          align: 'center',
          width: 200,
          dataIndex: 'equipmentModel'
        },
        {
          title: '设备规格',
@@ -562,18 +667,6 @@
          dataIndex: 'supplier'
        },
        {
          title: '出厂日期',
          align: 'center',
          width: 100,
          dataIndex: 'leaveFactoryDate'
        },
        {
          title: '投用日期',
          align: 'center',
          width: 100,
          dataIndex: 'acceptanceCheckDate'
        },
        {
          title: '有无工艺参数',
          align: 'center',
          width: 120,
@@ -591,11 +684,6 @@
          title: '外形尺寸',
          align: 'center',
          dataIndex: 'overallDimensions'
        },
        {
          title: '原值(元)',
          align: 'center',
          dataIndex: 'originalValue'
        },
        {
          title: '资金来源',
@@ -671,6 +759,8 @@
      isOpenProcess: false,
      isOpenPrecision: false,
      treeDataAlias: [],
      leaveFactoryDate: [],
      acceptanceCheckDate: [],
    }
  },
  computed: {
@@ -683,6 +773,14 @@
    this.loadAppHomeUrlConfigValue()
  },
  methods: {
    leaveFactoryRangeChange(valueArray) {
      this.queryParam.leaveFactoryStartTime = valueArray[0]
      this.queryParam.leaveFactoryEndTime = valueArray[1]
    },
    acceptanceCheckRangeChange(valueArray) {
      this.queryParam.acceptanceCheckStartTime = valueArray[0]
      this.queryParam.acceptanceCheckEndTime = valueArray[1]
    },
    loadAllProductionTree() {
      //加载车间选择树
      getAction(this.url.loadProductionOptions).then(res => {
@@ -831,8 +929,9 @@
      }
      return newObj;
    },
    searchReset() {
      this.leaveFactoryDate = []
      this.acceptanceCheckDate = []
      this.queryParam = {}
      this.onClearSelected()
      this.loadTabPaneTableData('-1')
src/views/eam/equipment/modules/EamEquipmentFluidList.vue
@@ -25,6 +25,27 @@
      <vxe-table-column title="油液名称" field="fluidId" align="center"
                        :edit-render="{name : '$select', options: fluidList, optionProps: {label:'fluidName', value:'id'}, props: {clearable:true}, events: {change:handleParamSelectChange}}"></vxe-table-column>
      <vxe-table-column title="参数编码" field="fluidCode" align="center"></vxe-table-column>
      <vxe-table-column title="使用数量" field="usageQuantity" align="center"
                        :edit-render="{name: '$input',props: {type: 'number',min: 0,step: 1,precision: 0 }}"></vxe-table-column>
      <vxe-table-column title="加入部位" field="additionSite" align="center" :edit-render="{name : '$input'}"></vxe-table-column>
      <vxe-table-column
        title="时间"
        field="oilTime"
        align="center"
        :edit-render="{
    name: 'ADatePicker',
    props: {
      type: 'datetime',
      format: 'YYYY-MM-DD HH:mm:ss',
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
    events: {
      change: (value, context) => {
        context.row.oilTime = value
      }
    }
  }":formatter="formatDate"
      ></vxe-table-column>
      <vxe-table-column title="操作" width="160">
        <template v-slot="{row}">
          <template v-if="hasEditStatus(row)">
@@ -93,6 +114,15 @@
    this.loadFluidList()
  },
  methods: {
    formatDate({ cellValue }) {
      // 检查是否为有效的日期对象
      if (cellValue && (cellValue instanceof Date || !isNaN(Date.parse(cellValue)))) {
        const date = cellValue instanceof Date ? cellValue : new Date(cellValue);
        // 手动格式化日期
        return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}:${date.getSeconds().toString().padStart(2, '0')}`;
      }
      return cellValue; // 非日期类型直接返回原值
    },
    handleParamSelectChange($event, value) {
      console.log(value)
      let parameter = this.fluidList.find(item => item.id === value.value)
src/views/eam/equipment/modules/EamEquipmentModal.vue
@@ -127,6 +127,17 @@
                                 disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-form-model-item prop="equipmentUse" label="设备用途">
              <j-dict-select-tag dict-code="equipment_use" v-model="model.equipmentUse"
                                 placeholder="请选择设备用途" :disabled="disableSubmit"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-form-model-item prop="operator" label="操作工">
              <a-input :placeholder="disableSubmit?'':'请输入操作工'" v-model="model.operator" :disabled="disableSubmit"/>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 出厂信息
@@ -197,8 +208,8 @@
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-form-model-item prop="equipmentManager" label="设备管理员">
              <j-search-select-tag  placeholder="请选择设备管理员" v-model="model.equipmentManager" dict="sys_user,realname, username, del_flag=0 and post='PCR0004' and status=1" :disabled="disableSubmit"/>
            <a-form-model-item prop="equipmentManager" label="设备责任人">
              <j-search-select-tag  placeholder="请选择设备责任人" v-model="model.equipmentManager" dict="sys_user,realname, username, del_flag=0 and post='PCR0004' and status=1" :disabled="disableSubmit"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
@@ -280,7 +291,7 @@
          { required: true, message: '请选择使用车间' }
        ],
        equipmentManager: [
          { required: true, message: '请选择设备管理员' }
          { required: true, message: '请选择设备责任人' }
        ],
        deviceType: [
          { required: false, message: '请选择设备类型' }