Inftrnps.vue 14.8 KB
Newer Older
fukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
<template>
	<div class="eibs-tab">
		<c-list-search @form-reset="handleReset" @form-search="searchUnAssign" :formCount="formCount">
      <!-- 持续展示区 -->
      <template v-slot="searchSlot">
				<el-row>
					<c-col :span="24">
						<c-col :span="8">
							<el-form-item label="业务编号" prop="trncorco.ownref" style="width: 100%">
								<c-input v-model="model.trncorco.ownref" maxlength="16" clearable placeholder="请输入业务编号"></c-input>
							</el-form-item>
						</c-col>
						<c-col :span="8">
							<el-form-item label="创建时间" style="width: 100%" prop="trncorco.inidatfro">
								<c-col :span="11">
									<c-date-picker type="date" v-model="model.trncorco.inidatfro" clearable style="width: 100%" placeholder="请选择创建时间">
									</c-date-picker>
								</c-col>
								<c-col :span="2" style="text-align: center">
									<label style="display: inline-block; width: 100%">-</label>
								</c-col>
								<c-col :span="11">
									<c-date-picker type="date" v-model="model.trncorco.inidattil" clearable style="width: 100%" placeholder="请选择创建时间">
									</c-date-picker>
								</c-col>
							</el-form-item>
						</c-col>

            <c-col :span="8">
							<el-form-item label="" v-if="roletypeName==='押汇中心复核'" prop="assignFlag" style="width: 100%">
                	<el-checkbox-group @change="searchUnAssign" v-model="model.assignFlag">
									<el-checkbox :key="sta.value" :label="sta.value" class="el-checkbox-width" v-for="sta in assignList">{{sta.label}}
									</el-checkbox>
								</el-checkbox-group>
							</el-form-item>
						</c-col>
					</c-col>
				</el-row>
      </template>
    </c-list-search>
    <el-row style="margin-bottom: 3px;">
        <c-button v-if="isHeadCenter" :disabled="isShowMsgDisable" @click="showMsg" class="medium_bcs" size="medium" style="margin-left: 20" type="primary">查看报文
				</c-button>
      	<c-button :disabled="isRoutingDisable" @click="reRoutingMethod" class="medium_bcs" size="medium"
           style="margin-left: 20" type="primary">ReRouting
				</c-button>
        <c-button v-if="isHeadCenter" @click="deleteMethod" class="medium_bcs" size="medium" style="margin-left: 20" type="primary">
					删除
				</c-button>
    </el-row>
		<el-row>
			<c-col :span="24">
				 <el-table id='tableRef' border size="small"  height="calc(100vh - 400px)" @sort-change="sortChange" @selection-change="handleSelectionChange" :data="stmData.data"  >
           			<el-table-column :selectable="selectableFn" type="selection" min-width="55">
						</el-table-column>
              <el-table-column sortable="custom" label="交易代码" prop="frm"   min-width="110px" show-overflow-tooltip>
                <template slot-scope="scope">{{scope.row.frm}}</template>
              </el-table-column>
               <el-table-column sortable="custom" label="交易名称" prop="inifrmname"   min-width="140px" show-overflow-tooltip>
                <template slot-scope="scope">{{scope.row.inifrmname}}</template>
              </el-table-column>
              <el-table-column sortable="custom" label="业务编号" prop="objref"   min-width="160px" show-overflow-tooltip>
                <template slot-scope="scope">{{scope.row.objref}}</template>
              </el-table-column>
                <el-table-column sortable="custom" label="业务状态" prop="status"  min-width="140px" show-overflow-tooltip>
                <template slot-scope="scope">{{getCodelabel(scope.row.status,'status')}}</template>
              </el-table-column>
               <el-table-column sortable="custom" label="币种" prop="relcur"  min-width="80px"  show-overflow-tooltip>
                <template slot-scope="scope">{{scope.row.relcur}}</template>
              </el-table-column>
              <el-table-column sortable="custom" label="金额" prop="relamt"   min-width="130px" show-overflow-tooltip>
                <template slot-scope="scope">{{moneyFormat(scope.row.relamt)}}</template>
              </el-table-column>
              <el-table-column sortable="custom" label="创建时间" prop="tardattim"  min-width="160px" show-overflow-tooltip>
                <template slot-scope="scope">{{scope.row.tardattim}}</template>
              </el-table-column>  
                <el-table-column sortable="custom" label="经办柜员"  prop="usrcon"  min-width="150px" show-overflow-tooltip>
                <template slot-scope="scope">{{tranName(scope.row.usrcon,scope.row.usrconName)}}</template>
                 </el-table-column>
                <el-table-column sortable="custom" label="分配柜员" prop="usr" v-if="currentOrg==='1000' && roletypeName==='押汇中心复核'" min-width="140px" show-overflow-tooltip>
                <template slot-scope="scope">{{tranName(scope.row.usr,scope.row.usrName)}}</template>
                 </el-table-column>
                  <el-table-column sortable="custom" label="业务机构" v-if="currentOrg==='1000' && roletypeName.indexOf('押汇中心')>=0 " prop="accbchinr"  min-width="180px"  show-overflow-tooltip>
                <template slot-scope="scope">{{bchFormat(scope.row.accbchinr)}}</template>
              </el-table-column>
                <el-table-column sortable="custom" label="业务机构" v-if="currentOrg==='1000' && roletypeName.indexOf('单证中心')>=0 " prop="accbchinr"  min-width="180px"  show-overflow-tooltip>
                <template slot-scope="scope">{{scope.row.bchname}}</template>
              </el-table-column>
              <el-table-column sortable="custom" label="业务机构" v-if="currentOrg!=='1000'" prop="bchkeyinr"  min-width="180px"  show-overflow-tooltip>
                <template slot-scope="scope">{{bchFormat(scope.row.bchkeyinr)}}</template>
              </el-table-column>
              	<el-table-column fixed="right" prop="op" label="操作" min-width="200px">
						<template slot-scope="scope">
							<!-- <c-button style="margin-left: 5px;" size="small" type="text" @click="onHandle(scope.$index,scope.row)">快照</c-button> -->
              <c-button size="small" type="text"  @click="onViewImgList(scope.$index,scope.row)" >影像</c-button>
              <c-button	size="small" type="text"	@click="onNodeStatus(scope.$index, scope.row)">交易节点</c-button>
              <c-button	size="small" type="text"	@click="handleShowRemark(scope.row)">备注</c-button>
            </template>
					</el-table-column>
      </el-table>
      <el-pagination :current-page.sync="pagination.pageIndex" :page-sizes="[5, 10, 20]" :page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" @size-change="handleSizeChange" @current-change="handleCurrentChange"></el-pagination>
			</c-col>
		</el-row>

    <el-dialog :modal-append-to-body="false" :visible.sync="messageVisible"  destroy-on-close title="报文展示" v-dialogDrag v-if="messageVisible" width="60%">
			<div class="contentTable">
				<el-table :data="messageData" style="width: 100%">
					<el-table-column :show-overflow-tooltip="true" fixed="left" label="报文标识号" prop="docfil" width="140">
					</el-table-column>
					<el-table-column :show-overflow-tooltip="true" label="业务编号" prop="extkey" width="120">
					</el-table-column>
					<el-table-column :show-overflow-tooltip="true" label="报文路径" prop="docpth" width="120">
					</el-table-column>
					<el-table-column :show-overflow-tooltip="true" label="报文描述" prop="nam" width="120">
					</el-table-column>
					<el-table-column :show-overflow-tooltip="true" label="收报行" prop="sndkey" width="120">
					</el-table-column>
					<el-table-column label="报文类型" prop="cortyp" width="120">
					</el-table-column>
					<el-table-column :show-overflow-tooltip="true" label="收报时间" prop="credattim" width="120">
					</el-table-column>
					<c-table-column fixed="right" label="操作" prop="op" width="220px">
						<template slot-scope="{ scope }">
							<el-button @click="showDoc(scope.row)" type="primary">show</el-button>
						</template>
					</c-table-column>
				</el-table>
			</div>
		</el-dialog>

    	<reroutingDialog :isShowReRouting="isShowReRouting" :modelInfo="modelInfo" @closeDialog="closeDialog" ref="reroutingDialog" />

		<nodeStatusDialog ref="nodeStatus" :activities="activities" :nextNode="nextNode"/>

       <RemarkDialog  ref="remark" :remarkModel="remarkModel" ></RemarkDialog>

       	<message-view ref="msgView"></message-view>
      <!-- 影像 -->
    <imgListDialog ref="sunscanRef"
			:visible.sync="showimgListDialogDialog"
			:tradeCode="imgParams.tradeCode"
			:imginr="imgParams.imginr"
			:sdhflg="imgParams.sdhflg"
			:smhinr="imgParams.smhinr"
			:trnName="imgParams.trnName"
			:limit="imgParams.limit"
      :channel="imgParams.channel"
      :businessInr="imgParams.businessInr"
		></imgListDialog>
	</div>
</template>
  <script>
import event from "../event";
import moment from 'moment';
import Api from "~/service/Api";
import reroutingDialog from "./reroutingDialog.vue";
import RemarkDialog from "./RemarkDialog.vue";
import nodeStatusDialog from "~/page/Business/Quesel/views/nodeStatusDialog";
import MessageView from "~/components/business/docpan/views/MessageView";
import { setTimeout } from 'timers';
import imgListDialog from '~/components/business/FunctionBtn/image/imgListDialog.vue';
export default {
  inject: ["root"],
  props: ["codes", "model"],
  mixins: [event],
  data() {
    return {
      formCount:2,
      isShowReRouting:false,
      messageVisible: false,
      modelInfo:{},
      sortObj:{},
      currentOrg: JSON.parse(window.sessionStorage.currentOrg).departmentNumber,
      roletypeName: JSON.parse(window.sessionStorage.curRole).name,
      multipleSelection:[],
      multipleSelectionRow: {},
      dialogTableVisible: false, // 控制弹框的展示和隐藏
      loadingFlag: true,
      total: 0,
      activities:[],
      nextNode:[],
      remarkModel:{},
      currentPage: 1,
      pageSizes: [5, 10, 20, 30, 40, 50, 100],
      pageSize: 5,
      tableList: [],
      assignList: [
        { label: "待分配", value: "N" },
        { label: "已分配", value: "Y" }
      ],
      inputValue: "",
      tableColumn:[
				{ label: "序号", prop: "index" },
				{ label: "交易代码", prop: "cod" },
				{ label: "交易名称", prop: "txt"}
			],//交易代码模态框--end
      initdialog: false,
      transactionStatus: {
        busiNo: "",
        modTimes: 0,
        postCount: 0,
        accCount: 0,
        earnCount: 0,
        earnAmt: 0
      },
      stmData: {
        columns: [
        ],
        data: []
      },
      maxHeight: 0,
      pagination: {
        pageIndex: 1,
        pageSize: 20,
        total: 0
      },
      dbCodes:{
        cla:[],
        status:[],
        distStatus:[],
        bizPosition:[],
      },
      relrowDisabled: true,
      bchtypList:[],
      userList:[],
			Trnp0Visible: false,
			// 手工分配相关
      multipleSelection: [],
      multipleSelectionObj:[],
      isShowManualAssign: false,
      // 影像
      showimgListDialogDialog: false,
      imgParams: {
        tradeCode: '',
        imginr: '',
        sdhflg: '',
        smhinr: '',
        trnName: '',
        limit: false,
        channel: '1',
        businessInr: ''
      }
    };
  },
  components: {
    reroutingDialog,nodeStatusDialog,RemarkDialog,MessageView,imgListDialog
  },
  methods: {
    getInidatfro() {
			// this.model.trncorco.inidatfro = moment(new Date()).subtract(10, "days").format("YYYY-MM-DD") + ' 00:00:00'
			this.model.trncorco.inidattil = moment(new Date()).format("YYYY-MM-DD") + ' 23:59:59'
    },
     tranName(usr,usrName){
        if(usr==='-')
            return '-';
        if(usr && usrName){
          return usr+"-"+usrName;
        }
        return "";
    },
    async onNodeStatus(index, row) {
      this.$refs.nodeStatus.nodeStatusVisible = true;
      let params = {
        queinr: row.inr
      };
      let res = await Api.post("/public/quesel/getNodeList", params);
      if (res.respCode == SUCCESS) {
        this.nextNode=res.data.nextNode;
        this.activities = res.data.data.filter(item => {
          return item.typ !== "MAN";
        });
      }
    },
    handleShowRemark(row) {
        this.remarkModel=row;
        // this.init();
        setTimeout(()=>{
            this.$refs.remark.remarkVisible=true;
        },500)
        
    },
    async init() {
          let params = {
            queinr: this.remarkModel.inr
          }
          let res = await Api.post("/public/quesel/getAllOreList", params);
          if (res.respCode == SUCCESS) {
            let oreArray= res.data.filter((item) => {
              return "-MAN-".indexOf(item.typ)>0;
            });
             this.loadHistoryRemark(oreArray);
          }
    },
    loadHistoryRemark(oreArray){
      let historyRemark ="";
      for(let i=0;i<oreArray.length;i++){
        if("-MAN-".indexOf(oreArray[i].typ)<=0 || (oreArray[i].remark && !oreArray[i].remark.trim())){
          continue;
        }
        let remark=oreArray[i].remark?oreArray[i].remark:"";
        if(i===0){
          historyRemark=oreArray[i].begdattim+"\n"+oreArray[i].usr +":"+ remark;
        }else{
          historyRemark=historyRemark+"\n"+oreArray[i].begdattim+"\n"+oreArray[i].usr +":"+remark;
        }
      }
       this.remarkModel.historyRemark=historyRemark;
    },
  },
  mounted() {
    this.getBranchList();
    this.getInidatfro();
    this.getdbCode('quecla','','cla');
    this.getdbCode('tsksta','','status');
    this.getdbCode('dststa','','distStatus');
    this.getdbCode('bizpst','','bizPosition');
    this.searchUnAssign();
  },
  activated() {
    this.searchUnAssign();
  },
  computed: {
     isHeadCenter() {
      let roleName = JSON.parse(window.sessionStorage.curRole).name;
      let roleId=JSON.parse(window.sessionStorage.curRole).id;
      if ("-单证中心".indexOf(roleName)>0 ){
              return true;
      }
       if ("-10253-".indexOf(roleId)>0 ){
              return true;
      }
      
      return false;
    },
    isShowMsgDisable() {
      if (this.multipleSelection && this.multipleSelection.length > 1) {
        return true;
      }
      if (
        this.multipleSelectionRow &&
        this.multipleSelectionRow.channel &&
        this.multipleSelectionRow.channel.trim()
      ) {
        return false;
      }
      return true;
    },
    isRoutingDisable() {
      if (this.multipleSelection.length===0) {
        return true;
      }
      // if (this.multipleSelection && this.multipleSelection.length > 1) {
      //   return true;
      // }
      return false;
    },
  },
};
</script>
<style scoped lang="less">
::v-deep .el-dialog__body {
	height: calc(100% - 32px)
}
::v-deep .el-table th > .cell {
    padding-right: 14px !important;
}
.el-checkbox-width {
  margin-right: 0px;
  float: left;
  text-align: left !important;
  width: 150px;
}
::v-deep .el-button--small.el-button--text {
	margin-left: 0;
	padding: 0px 10px!important;
}
</style>