<template>
  <c-page title="">
    <c-content :height="120">
    <div class="eibs-tab">
      <el-form
        :model="model"
        ref="modelForm"
        tokenKey="modelForm"
        :validate-on-rule-change="false"
        label-width="150px"
        size="small"
      >
       
       <c-col :span="21" style="height:24px">
          <el-form-item label="基本信息" class="messageLabel">
          </el-form-item>
        </c-col>
        <c-col :span="2" style="text-align:right">
         <c-button size="small" @click="exit">返回</c-button>
       </c-col>
        <c-col :span="24" style="height: 10px">
          <el-divider></el-divider>
        </c-col>
        

        <c-col :span="11">
          <el-form-item label="Type" prop="spt.sta" style="width: 100%">
            <c-select
              v-model="model.spt.sta"
              style="width: 100%"
              placeholder="请选择Type"
              disabled
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="11" :offset="1">
          <el-form-item label="Status" prop="spt.hldflg" style="width: 100%">
            <c-select
              v-model="model.spt.hldflg"
              style="width: 100%"
              placeholder="请选择Hold Flag"
              :code="codes.hldflg"
              disabled
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="11">
          <el-form-item label="Reference" prop="spt.objnam" style="width: 100%">
            <c-input
              v-model="model.spt.objnam"
              maxlength="40"
              style="width: 100%"
              placeholder="请输入Reference"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="11" :offset="1">
          <el-form-item label="Ident No" prop="spt.inr" style="width: 100%">
            <c-input
              v-model="model.spt.inr"
              maxlength="8"
              style="width: 100%"
              placeholder="请输入Internal Unique ID of Pending Transaction"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>

          <c-col :span="11">
            <el-form-item label="Name" prop="spt.txt" style="width: 100%">
              <c-input
                v-model="model.spt.txt"
                maxlength="40"
                style="width: 100%"
                placeholder="请输入Name"
                disabled
              ></c-input>
            </el-form-item>
          </c-col>

          <c-col :span="11" :offset="1">
            <c-col :span="13">
              <el-form-item label="Transaction " prop="spt.frm">
                <c-input
                  v-model="model.spt.frm"
                  maxlength="6"
                  style="width: 95%"
                  placeholder="请输入Transaction "
                  disabled
                ></c-input>
              </el-form-item>
            </c-col>
            <c-col :span="11">
              <el-form-item label="" prop="spt.frm" label-width="0">
                <c-select
                  v-model="model.spt.frm"
                  maxlength="16"
                  placeholder="请输入Transaction "
                  :code="codes.frm"
                  style="width:100%"
                  disabled
                ></c-select>
              </el-form-item>
            </c-col>
          </c-col>

        <c-col :span="11">
          <el-form-item label="Responsible User " prop="spt.ownusr">
            <c-input
              v-model="model.spt.ownusr"
              maxlength="8"
              placeholder="请输入Responsible User "
              disabled
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="11" :offset="1">
          <el-form-item label="Responsible Group" prop="spt.ownusg">
            <c-select
              v-model="model.spt.ownusg"
              style="width: 100%"
              placeholder="请选择Responsible Group"
              disabled
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="11">
          <c-col :span="19">
            <el-form-item label="Infotext" prop="spt.inftxt">
              <c-input
                type="textarea"
                v-model="model.spt.inftxt"
                maxlength="65"
                style="width: 100%"
                show-word-limit
                placeholder="请输入Infotext"
                disabled
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="5">
            <el-form-item label="" prop="spt.infdsp" label-width="5px">
              <c-select
                v-model="model.spt.infdsp"
                style="width: 100%; padding-left: 0px"
                placeholder="请选择Infotext"
                :code="codes.infdsp"
                disabled
              >
              </c-select>
            </el-form-item>
          </c-col>
        </c-col>

        <c-col :span="11" :offset="1">
          <c-col :span="10">
            <el-form-item label="Entered by" prop="spt.usr">
              <c-input
                v-model="model.spt.usr"
                maxlength="8"
                placeholder="请输入Entered by"
                disabled
              ></c-input>
            </el-form-item>
          </c-col>

          <c-col :span="7">
            <el-form-item label="at" prop="spt.dattim" label-width="50px">
              <c-input
                v-model="model.spt.dattim"
                placeholder="请输入Time of Creation"
                disabled
              ></c-input>
            </el-form-item>
          </c-col>

          <c-col :span="7">
            <el-form-item label="in TRN" prop="spt.cretrn" label-width="70px">
              <c-input
                v-model="model.spt.cretrn"
                maxlength="6"
                placeholder="请输入Creating Transaction ID"
                disabled
              ></c-input>
            </el-form-item>
          </c-col>
        </c-col>
        <c-col :span="24">
          <c-col :span="11">
            <el-form-item label="Target for Completion" prop="spt.tardattim">
              <c-input
                v-model="model.spt.tardattim"
                placeholder="请输入Target for Completion"
                disabled
              ></c-input>
            </el-form-item>
          </c-col>
        </c-col>
         
         <c-col :span="24" style="height:24px;margin-top:8px">
          <el-form-item label="报文信息" class="messageLabel">
          </el-form-item>
        </c-col>
        <c-col :span="24" style="height: 0px">
          <el-divider></el-divider>
        </c-col>

        <!-- <c-col :span="12">
        <c-button size="small" type="primary"  @click="onSptpButord">
            Order
        </c-button>
       </c-col> -->

        <!-- 
                                   
       <c-col :span="12">
        <el-form-item label="Message Type " prop="sptp.smh.msgtyp">
            <c-input  v-model="model.sptp.smh.msgtyp" maxlength="20"  placeholder="请输入Message Type "></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Receiver Key " prop="sptp.smh.sndkey">
            <c-input  v-model="model.sptp.smh.sndkey" maxlength="50"  placeholder="请输入Receiver Key "></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Relevant Amount" prop="sptp.smh.relcur">
            <c-input  v-model="model.sptp.smh.relcur" maxlength="3"  placeholder="请输入Relevant Amount"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Relevant Amount Optional" prop="sptp.smh.relamt">
            <c-input  v-model="model.sptp.smh.relamt"  placeholder="请输入Relevant Amount Optional"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onSptpButcls">
            &Close
        </c-button>
       </c-col> -->
        <c-col :span="23" style="margin-left: 9px">
          <!-- <el-form-item label-width="500px"> -->
          <c-table :paginationShow="false" :border="true">
            <el-table-column
              label="Seq.No"
              prop="groseq"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="Msg.Type"
              prop="cortyp"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="Message references"
              prop="nam"
              width="150px"
            ></el-table-column>
            <el-table-column
              label="User"
              prop="creusr"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="Length"
              prop="msglen"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="File name"
              prop="docfil"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="File ext"
              prop="docfxt"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="DB-INR"
              prop="inr"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="CREFRM"
              prop="crefrm"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="CREDATTIM"
              prop="credattim"
              width="120px"
            ></el-table-column>
            <el-table-column
              label="PARTFLG"
              prop=""
              width="partflg"
            ></el-table-column>
            <el-table-column
              label="MSGTYP"
              prop="msgtyp"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="RELCUR"
              prop="relcur"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="RELAMT"
              prop="relamt"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="SYSNO"
              prop="sysno"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="STAFLG"
              prop="staflg"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="F20"
              prop="f20"
              width="auto"
            ></el-table-column>
            <el-table-column
              label="STP"
              prop="spt"
              width="auto"
            ></el-table-column>
          </c-table>
          <!-- </el-form-item> -->
        </c-col>

        <c-col :span="24" style="height:24px;margin-top:20px">
          <el-form-item label="工作流信息" class="messageLabel">
          </el-form-item>
        </c-col>
        <c-col :span="24" style="height: 0px">
          <el-divider></el-divider>
        </c-col>

        <c-col :span="23" style="margin-left: 9px">
          <!-- <el-form-item label-width="500px"> -->
          <!-- <c-table :paginationShow="false" :border="true">
            <el-table-column label="Start" width="auto"></el-table-column>
            <el-table-column label="Type" width="auto"></el-table-column>
            <el-table-column label="User" width="auto"></el-table-column>
            <el-table-column label="TRN" width="auto"></el-table-column>
            <el-table-column label="End" width="auto"></el-table-column>
            <el-table-column label="Text" width="auto"></el-table-column>
          </c-table> -->
          <!-- </el-form-item> -->
          <c-istream-table :list="stmData2.data" :columns="stmData2.columns" :paginationShow="false" style="width:100%">
          </c-istream-table>
          
        </c-col>
      </el-form>
    </div>
    </c-content>
  </c-page>
</template>
<script>
import Sptsel from "~/Model/Sptsel";
import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Sptsel/Event";

export default {
  // inject: ['root'],
  // props:["model","codes"],
  mixins: [CommonProcess],
  data() {
    return {
      model: new Sptsel().data,
      codes: { hldflg: CodeTable.hldflg ,...CodeTable},
      trnName:"sptsel",
      stmData2:{
        columns:[
          "7 1 \"Start\" 0",
          "1 2 \"Type\" 0",
          "8 3 \"User\" 0",
          "4 4 \"TRN\" 0",
          "7 5 \"End\" 0",
          "6 6 \"Text\" 0",
        ],
        data:[],
      }
    };
  },
  mounted() {
    this.loadData();
  },
  methods: {
    ...Event,
    loadData() {
      this.model = JSON.parse(sessionStorage.getItem("Sptpopup"));
      this.executeRule("sptp.ordp0.butore").then((res) => {
        this.stmData2.data=res.data.sptstm.rows;
      });

    },
    exit() {
      this.$store.dispatch("TagsView/delView", this.$route);
      this.$router.history.push("/taskList");
    },
  },
  created: function () {},
};
</script>
<style scoped>
.el-col >>> .el-divider--horizontal {
  margin-top: 5px;
}
.messageLabel >>> .el-form-item__label{
    text-align: left;
    font-weight:bold;
    font-size: 12px;
}
</style>
