Infsea.vue 7.84 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
<template>
	<div class="eibs-tab">
		<c-list-search @form-reset="handleReset" @form-search="handleSearch" v-if = "judgementConditionShow == false">
			<!-- 持续展示区 -->
			<template v-slot="searchSlot">
				<el-form class="m-table-search-form" ref="paramsForm" label-position="right" label-width="110px" size="small" :model="model">
					<el-row>
						<c-col :span="8">
							<el-form-item label="保函编号" style="width: 100%">
								<c-input v-model="model.ownref" maxlength="16" placeholder="请输入保函编号"></c-input>
							</el-form-item>
						</c-col>
						<c-col :span="8">
							<el-form-item label="开立日期" style="width: 100%">
								<c-col :span="11">
									<c-date-picker type="date" v-model="model.stadat" style="width: 100%" placeholder="请选择起始日期" value-format="yyyy-MM-dd"></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.enddat" style="width: 100%" placeholder="请选择截止日期" value-format="yyyy-MM-dd"></c-date-picker>
								</c-col>
							</el-form-item>
						</c-col>
						<c-col :span="8">
							<el-form-item label="选择机构" style="width: 100%">
								<c-select
									v-model="model.bchkey"
									style="width: 100%"
									placeholder="请选择机构"
								>
									<el-option
										v-for="item in orgList"
										:key="item.value"
										:label="item.label"
										:value="item.value"
									></el-option>
								</c-select>
							</el-form-item>
						</c-col>
					</el-row>
				</el-form>
			</template>
		</c-list-search>

		<el-col :span="24" style="margin-top: 10px">
			<div style="height: 90%">
				<c-col :span="24">
					<el-table
						id='infgidBSTableRef'
						v-loading="load"
						:data="tableData"
						style="width:100%"
						size="small"
						:highlight-current-row="true"
						@selection-change="handleSelectionChange"
					>
						<el-table-column
							type="selection"
							width="55">
						</el-table-column>
						<el-table-column
							v-for="(item,key) in columns"
							:key="key"
							:prop="item.prop"
							:label="item.label"
							sortable
						>
						</el-table-column>
            <el-table-column fixed="right" label="操作" width="340px">
              <template slot-scope="scope">
								<c-button size="small" @click="handleUpdateStatus(scope.row)" :disabled="scope.row.opnsta !='R' && scope.row.opnsta !='A' && scope.row.opnsta !='N' && scope.row.amesta !='N' && scope.row.amesta !='R' && scope.row.cansta !='N' && scope.row.cansta !='R'">海关状态更新</c-button>
                <c-button size="small" @click="handleChangeStatus(scope.row)" :disabled="!isJinB">人工状态变更</c-button>
								<c-button size="small" @click="handleDetailData(scope.row)">变动金额明细</c-button>	
              </template>
            </el-table-column>
					</el-table>
					<el-pagination
						layout="prev, pager, next, jumper"
						:total="pagination.total"
						:page-size="pagination.pageSize"
						:current-page="pagination.pageNum"
						@current-change="currentChange"
					>
					</el-pagination>
					<el-dialog
						v-dialogDrag
						v-if="dialogTableVisible"
						width="80%"
						title="变动金额明细"
						:visible.sync="dialogTableVisible"
						:close-on-click-modal="false"
						:close-on-press-escape="false"
					>
						
						<div  style="width: 100%;height: 100%;">
							<el-table id='tableRef' style="width: 100%;" v-loading="tableLoading" :data="tableList">
								<el-table-column v-for="(item,key) in tableColumn" :key="key" :prop="item.prop" :label="item.label">
								</el-table-column>
							</el-table>
							<el-pagination
								class="eContainer-pagination"
								layout="prev, pager, next, jumper, ->, sizes, total"
								:page-sizes="pageSizes"
								:page-size="pageSize"
								:current-page="currentPage"
								:total="total"
								@size-change="sizeChange"
								@current-change="currentChanges"
							></el-pagination>
						</div>
					</el-dialog>
				</c-col>
			</div>
		</el-col>
	</div>
</template>
<script>
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import event from "../event";
export default {
  props: ["model", "codes"],
  mixins: [event],
  components: {},
  data() {
    return {
			// 机构列表
			orgList: [],
			load: false,
			dialogTableVisible: false,
			tableLoading: false,
      total: 0,
      currentPage: 1, // 页数
      pageSizes: [5, 10, 20, 30, 40, 50, 100],
      pageSize: 10, // 条数
      tableList: [],
      inputValue: "",
			tableColumn: [
				{
          prop: "limitchangetime",
          label: "变更日期",
          width: 130,
          isShow: true
        },
        {
          prop: "noticetype",
          label: "通知类型",
          width: 100,
          isShow: true
        },
        {
					prop: "traamt",
          label: "变动金额",
          isShow: false,
          width: 150
				},],
      tableColumns: [
        {
          prop: "ownref",
          label: "业务编号",
          width: 130,
          isShow: true
        },
        {
          prop: "bchkey",
          label: "分行行号",
          width: 100,
          isShow: true
        },
        {
					prop: "opnsta",
          label: "开立状态",
          isShow: false,
          width: 150
				},
				{
					prop: "opnstaName",
          label: "开立状态",
          isShow: true,
          width: 150
        },
        {
          prop: "amesta",
          label: "修改状态",
          isShow: false,
          width: 150
				},
				{
          prop: "amestaName",
          label: "修改状态",
          isShow: true,
          width: 150
        },
        {
          prop: "cansta",
          label: "撤销状态",
          isShow: false,
          width: 150
				},
				{
          prop: "canstaName",
          label: "撤销状态",
          isShow: true,
          width: 150
        },
        {
					prop: "errmsg",
          label: "错误信息",
          isShow: true,
          width: 200
				},
				{
					prop: "hbhamt",
          label: "应缴税款",
          isShow: true,
          width: 200
        }
      ],
      tableData: [],
      pagination: {
        pageNum: 1,
        pageSize: 10,
        total: 0
			},
			multipleSelection: []
    };
  },
  mounted() {
		this.queryOrgList()
    this.handleSearch();
	},
	methods:{
		    // 明细方法
		    sizeChange(num){
					this.pagination.pageSize = num;
				  this.dealChangePagenum();
				},
				currentChanges(num) {
					this.pagination.pageNum = num;
				  this.dealChangePagenum();
				},
				// 页面方法
				currentChange(num) {
					this.currentPage = num;
				  this.getTableData();
				},

		async getTableData() {
			let rtnmsg = await Api.post("/business/hitsta/getDataInfo", {
        ...this.model,
        inr: this.$route.query.inr,
				pageNum: this.currentPage,
				pageSize: this.pageSize,
				deptNo: this.$store.state.UserContext.currentOrg.departmentNumber
			});
			if (rtnmsg.respCode == SUCCESS) {
				this.tableData = rtnmsg.data.list || [];
				this.pagination = {
					total: rtnmsg.data.total
				};
			}
		},
	},
  computed: {
    isJinB() {
      let roleName = JSON.parse(window.sessionStorage.curRole).name;
      let headId=JSON.parse(window.sessionStorage.currentOrg).departmentNumber;
      if (roleName.indexOf("经办")>0  && headId!=="1000"){
        return true;
      }
      return false;
    },
    columns() {
      return this.tableColumns.filter(item => item.isShow);
		},
		judgementConditionShow(){
			let judgeFlag = false;
      if (this.$route.query.inr) {
        judgeFlag = true;
      }
      return judgeFlag;
		}
  },
};
</script>
<style scoped>
.eibs-tabs >>> .m-table-search {
  padding: 20px 0px 10px 0px;
}
</style>