zenglf
2023-08-19 8611a1ba1696e76cced04ff5d658ba138a05dafd
src/views/eam/modules/equipmentUnseal/EquipmentUnsealForm.vue
@@ -2,29 +2,70 @@
  <a-spin :spinning="confirmLoading">
    <j-form-container :disabled="formDisabled">
      <!-- 主表单区域 -->
      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
      <a-form-model
        ref="form"
        :model="model"
        :rules="validatorRules"
        slot="detail"
      >
        <a-row>
          <a-col :span="24">
            <a-form-model-item label="单据号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
              <a-input v-model="model.num" placeholder="请输入单据号"></a-input>
            <a-form-model-item
              label="单据号"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="num"
            >
              <a-input
                v-model="model.num"
                placeholder="请输入单据号"
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" :hidden=true>
            <a-form-model-item label="变动方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="changeMethod">
              <a-input v-model="model.changeMethod" placeholder="请输入变动方式" defaultValue="unseal"></a-input>
          <a-col
            :span="12"
            :hidden=true
          >
            <a-form-model-item
              label="变动方式"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="changeMethod"
            >
              <a-input
                v-model="model.changeMethod"
                placeholder="请输入变动方式"
                defaultValue="unseal"
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
              <a-textarea v-model="model.remark" rows="4" placeholder="请输入备注" />
            <a-form-model-item
              label="备注"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="remark"
            >
              <a-textarea
                v-model="model.remark"
                rows="4"
                placeholder="请输入备注"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-form-model>
    </j-form-container>
    <!-- 子表单区域 -->
    <a-tabs v-model="activeKey" @change="handleChangeTabs">
      <a-tab-pane tab="设备启封明细" :key="refKeys[0]" :forceRender="true">
    <a-tabs
      v-model="activeKey"
      @change="handleChangeTabs"
    >
      <a-tab-pane
        tab="设备启封明细"
        :key="refKeys[0]"
        :forceRender="true"
      >
        <j-vxe-table
          keep-source
          :ref="refKeys[0]"
@@ -37,25 +78,43 @@
          :rowSelection="true"
          :toolbar="true"
          :toolbarConfig="toolbarConfig"
          :alwaysEdit='true'
          :bordered='true'
        >
          <template slot="toolbarPrefix">
            <a-button type="primary" @click="selectEquipmentList" :disabled="formDisabled">选择设备
            <a-button
              type="primary"
              @click="selectEquipmentList"
              :disabled="formDisabled"
            >选择设备
            </a-button>
          </template>
          <!-- 设备图片插槽 -->
          <template v-slot:equipmentPhoto='props'>
          <!-- <template v-slot:equipmentPhoto='props'>
            <Tooltip
          placement="top"
          title="预览图片"
          >
            <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
            <img v-else :src="getImgView(text)" :preview="props.rowId" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
              <span
                v-if="!text"
                style="font-size: 12px;font-style: italic;"
              >无图片</span>
              <img
                v-else
                :src="getImgView(text)"
                :preview="props.rowId"
                height="25px"
                alt=""
                style="max-width:80px;font-size: 12px;font-style: italic;"
              />
          </Tooltip>
          </template>
          </template> -->
          <template v-slot:action="props">
            <a-popconfirm title="确定删除吗?" @confirm="handleDL(props)">
            <a-popconfirm
              title="确定删除吗?"
              @confirm="handleDL(props)"
            >
              <a>删除</a>
            </a-popconfirm>
          </template>
@@ -145,27 +204,51 @@
            title: '设备ID',
            key: 'equipmentId',
            type: JVXETypes.hidden,
            defaultValue: ''
          },
          {
            title: '设备编码',
            key: 'equipmentNum',
            type: JVXETypes.normal,
            width: '120px',
            // placeholder: '请输入${title}',
            fixed: 'left'
            width: '150px',
            align: "center",
          },
          // fixed: 'left'
          {
            title: '设备名称',
            key: 'equipmentName',
            type: JVXETypes.normal,
            disabled: true,
            width: '150px',
            align: "center",
            defaultValue: ''
          },
          // fixed: 'left',
          {
            title: '设备型号',
            key: 'model',
            type: JVXETypes.normal,
            disabled: true,
            width: '150px',
            align: "center",
            defaultValue: ''
          },
          {
            title: '设备规格',
            key: 'specification',
            type: JVXETypes.normal,
            disabled: true,
            width: '150px',
            align: "center",
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '资产编码',
            key: 'assetNumber',
            type: JVXETypes.normal,
            width: '120px',
            fixed: 'left',
            width: '150px',
            align: "center",
            defaultValue: ''
          },
          {
@@ -173,26 +256,26 @@
            key: 'sealReason',
            type: JVXETypes.normal,
            disabled: true,
            width: '200px'
            width: '200px',
            align: "center",
          },
          {
            title: '封存日期',
            key: 'sealDate',
            type: JVXETypes.normal,
            disabled: true,
            width: '120px'
            width: '150px',
            align: "center",
          },
          {
            title: '启封日期',
            key: 'unsealDate',
            type: JVXETypes.datetime,
            width: '200px',
            width: '150px',
            align: "center",
            placeholder: '请输入${title}',
            defaultValue: '',
            validateRules: [
              {
            validateRules: [{
                required: true, // 必填
                message: '${title}不能为空' // 提示的文本
              }]
@@ -202,21 +285,21 @@
            key: 'unsealReason',
            type: JVXETypes.textarea,
            width: '200px',
            align: "center",
            placeholder: '请输入${title}',
            defaultValue: '',
            validateRules: [
              {
            validateRules: [{
                required: true, // 必填
                message: '${title}不能为空' // 提示的文本
              }]
          },
          {
            title: '特种设备',
            key: 'specificEquipment',
            type: JVXETypes.hidden,
            disabled: true,
            width: '150px',
            align: "center",
            defaultValue: ''
          },
          {
@@ -224,42 +307,18 @@
            key: 'specificEquipment_dictText',
            type: JVXETypes.normal,
            disabled: true,
            width: '100px',
            width: '150px',
            align: "center",
            defaultValue: ''
          },
          {
            title: '设备名称',
            key: 'equipmentName',
            type: JVXETypes.normal,
            disabled: true,
            width: '200px',
            defaultValue: ''
          },
          {
            title: '设备型号',
            key: 'model',
            type: JVXETypes.normal,
            disabled: true,
            width: '120px',
            defaultValue: ''
          },
          {
            title: '设备规格',
            key: 'specification',
            type: JVXETypes.normal,
            disabled: true,
            width: '120px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '设备状态',
            key: 'equipmentStatus_dictText',
            type: JVXETypes.normal,
            disabled: true,
            width: '100px',
            // placeholder: '请输入${title}',
            width: '150px',
            align: "center",
            defaultValue: ''
          },
          // {
@@ -278,7 +337,8 @@
            key: 'technologyStatus_dictText',
            type: JVXETypes.normal,
            disabled: true,
            width: '100px',
            width: '150px',
            align: "center",
            defaultValue: ''
          },
          {
@@ -286,15 +346,16 @@
            key: 'location',
            type: JVXETypes.normal,
            disabled: true,
            width: '120px'
            width: '150px',
            align: "center",
          },
          {
            title: '重要度',
            key: 'equipmentImportanceId_dictText',
            type: JVXETypes.normal,
            disabled: true,
            width: '100px',
            width: '150px',
            align: "center",
            // placeholder: '请输入${title}',
            defaultValue: ''
          },
@@ -303,23 +364,22 @@
            key: 'equipmentImportanceId',
            type: JVXETypes.hidden
          },
          {
            title: '设备图片',
            key: 'equipmentPhoto',
            type: JVXETypes.slot,
            disabled: true,
            width: '120px',
            slotName:'equipmentPhoto'
          },
          {
            title: '操作',
            key: 'action',
            type: JVXETypes.slot,
            disabled: true,
            width: '100px',
            slotName: 'action',
          },
          // {
          //   title: '设备图片',
          //   key: 'equipmentPhoto',
          //   type: JVXETypes.slot,
          //   disabled: true,
          //   width: '120px',
          //   slotName: 'equipmentPhoto'
          // },
          // {
          //   title: '操作',
          //   key: 'action',
          //   type: JVXETypes.slot,
          //   disabled: true,
          //   width: '100px',
          //   slotName: 'action',
          // },
        ]
      },
      url: {