Selp.vue 17.1 KB
Newer Older
1 2
<template>
  <div class="eibs-tab">
liushikai committed
3 4
    <!-- <c-list-search @form-reset="selpHandleReset" @form-search="selpHandleSearch">
      <template v-slot="searchSlot"> -->
5 6 7
        <el-form
          class="m-table-search-form"
          ref="paramsForm"
jianglong committed
8
          
9 10 11 12
          label-position="right"
          label-width="110px"
          size="small"
        >
jianglong committed
13
         <!--line1-->
14
          <el-row>
潘际乾 committed
15
            <c-col :span="24" style=""> 
jianglong committed
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

              <c-col :span="8">
              <el-form-item label="申报类型" prop="bopquep.boptyp" style="width: 100%">
                <c-select
                  v-model="model.bopquep.boptyp"
                  style="width: 100%"
                  placeholder="请选择申报类型"
                >
                  <el-option
                    v-for="item in codes.boptyp"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </c-select>
              </el-form-item>
            </c-col>


<c-col :span="8">
              <el-form-item label="查询日期类型" prop="bopquep.dattyp" style="width: 100%">
                <c-select
                  v-model="model.bopquep.dattyp"
                  style="width: 100%"
                  placeholder="请选择查询日期类型"
                >
                  <el-option
                    v-for="item in codes.dattyp"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </c-select>
51 52
              </el-form-item>
            </c-col>
53

jianglong committed
54 55
           

liushikai committed
56
            <c-col :span="8">
57 58
                <el-form-item label="起止日期" style="width: 100%">
                  <c-col :span="11">
59
                    <c-date-picker
60 61 62 63 64
                      type="date"
                      v-model="model.bopquep.frmdat"
                      value-format="yyyy-MM-dd"
                      style="width: 100%"
                      placeholder="请选择From"
65
                    ></c-date-picker>
66 67 68 69 70
                  </c-col>
                  <c-col :span="2" style="text-align: center">
                    <label style="display: inline-block; width: 100%">-</label>
                  </c-col>
                  <c-col :span="11">
71
                    <c-date-picker
72 73 74 75 76
                      type="date"
                      v-model="model.bopquep.tildat"
                      value-format="yyyy-MM-dd"
                      style="width: 100%"
                      placeholder="请选择Until"
77
                    ></c-date-picker>
78 79 80
                  </c-col>
                </el-form-item>
              </c-col>
liushikai committed
81
           
jianglong committed
82
            
liushikai committed
83
              </c-col>
liushikai committed
84
                
潘际乾 committed
85
          <c-col :span="24" style="text-align: right;height:36.8px" v-if="!searchToggle">
liushikai committed
86 87 88 89 90 91 92 93 94 95 96 97 98
            <el-button size="small" @click="selpHandleReset">重置</el-button>
            <el-button
              type="primary"
              icon="el-icon-search"
              size="small"
              @click="selpHandleSearch"
              >查询</el-button
            >
            <el-button type="text" @click="searchToggle=true">
                展开
              <i class="el-icon-arrow-down"></i>
            </el-button>
          </c-col>
99 100 101
           
          </el-row>

jianglong committed
102 103 104 105 106 107 108 109 110

     

      

      <!--line3-->

      <!--line4-->

liushikai committed
111
          <el-row v-show="searchToggle">
jianglong committed
112
            <!--line2-->
潘际乾 committed
113
            <c-col :span="24" style="">
114 115
             <c-col :span="8">
              <el-form-item label="申报号码" prop="bopquep.rptno" style="width: 100%">
116 117 118 119 120 121 122 123
                <c-input
                  v-model="model.bopquep.rptno"
                  maxlength="22"
                  placeholder="请输入申报号码"
                ></c-input>
              </el-form-item>
            </c-col>
            <c-col :span="8">
124
              <el-form-item label="业务所属行" prop="bopquep.ownextkey" style="width: 100%">
125 126 127 128 129 130 131 132
                <c-select
                  v-model="model.bopquep.ownextkey"
                  style="width: 100%"
                  placeholder="请选择Initial Code"
                >
                </c-select>
              </el-form-item>
            </c-col>
jianglong committed
133

134
            <c-col :span="8">
jianglong committed
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
              <el-form-item label="业务编号" prop="bopquep.ownref" style="width: 100%">
                <c-input
                  v-model="model.bopquep.ownref"
                  maxlength="16"
                  placeholder="请输入业务编号"
                ></c-input>
              </el-form-item>
            </c-col>

            
            </c-col>
            
            <c-col :span="24" style="">

              <c-col :span="8">
150
              <el-form-item label="客户类型" prop="bopquep.ptytyp" style="width: 100%">
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
                <c-select
                  v-model="model.bopquep.ptytyp"
                  style="width: 100%"
                  placeholder="请选择客户类型"
                >
                  <el-option
                    v-for="item in codes.ptytyp"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </c-select>
              </el-form-item>
            </c-col>
jianglong committed
166

167
            <c-col :span="8">
168
              <el-form-item label="客户名称" prop="bopquep.ptynam" style="width: 100%">
169 170 171 172 173 174 175 176 177
                <c-input
                  v-model="model.bopquep.ptynam"
                  style="width: 100%"
                  placeholder="请输入客户名称"
                ></c-input>
              </el-form-item>
            </c-col>

            <c-col :span="8">
178
              <el-form-item label="结算方式" prop="bopquep.medtyp" style="width: 100%">
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
                <c-select
                  v-model="model.bopquep.medtyp"
                  style="width: 100%"
                  placeholder="请选择结算方式"
                >
                  <el-option
                    v-for="item in codes.medtyp"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </c-select>
              </el-form-item>
            </c-col>

jianglong committed
195
             
liushikai committed
196

liushikai committed
197 198
            </c-col>
            
潘际乾 committed
199
            <c-col :span="24" style="">
200
            <c-col :span="8">
201
              <el-form-item label="笔数" prop="bopquep.sum" style="width: 100%">
202 203 204 205 206 207 208 209
                <c-input
                  v-model="model.bopquep.sum"
                  placeholder="请输入笔数"
                ></c-input>
              </el-form-item>
            </c-col>

            <c-col :span="8">
210
              <el-form-item label="业务状态" prop="bopquep.staflg" style="width: 100%">
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
                <c-select
                  v-model="model.bopquep.staflg"
                  style="width: 100%"
                  placeholder="请选择业务状态"
                >
                  <el-option
                    v-for="item in codes.staflg"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </c-select>
              </el-form-item>
            </c-col>
liushikai committed
226 227 228 229 230 231 232 233 234 235
            <c-col :span="8" style="text-align: right;height:36.8px" v-if="searchToggle">
            <el-button size="small" @click="selpHandleReset">重置</el-button>
            <el-button
              type="primary"
              icon="el-icon-search"
              size="small"
              @click="selpHandleSearch"
              >查询</el-button
            >
            <el-button type="text" @click="searchToggle=false">
liushikai committed
236
                收起
liushikai committed
237 238 239
              <i class="el-icon-arrow-up"></i>
            </el-button>
          </c-col>
liushikai committed
240
            </c-col>
241
          </el-row>
242
        </el-form>
liushikai committed
243 244
      <!-- </template>
    </c-list-search> -->
245

潘际乾 committed
246
    <c-col :span="24" style="">
潘际乾 committed
247 248 249 250 251
      <div style="border-bottom: 10px solid rgb(232, 232, 232)">
      </div>
    </c-col>

    <c-row style="margin-top: 20px">
潘际乾 committed
252
      <c-col style="">
liushikai committed
253 254
        <c-button size="small" type="primary" style="margin-left:0">导出Excel</c-button>
        <c-button size="small" type="primary" style="margin-left:0">应急导出</c-button>
jianglong committed
255 256
        <c-button v-if="model.bopquep.boptyp=='DBJ'" size="small" type="primary" style="margin-left:0" @click="onWaitAdd(model.bopquep.boptyp.toLowerCase() +'add')">新增结汇申请书</c-button>
        <c-button v-if="model.bopquep.boptyp=='DBW'" size="small" type="primary" style="margin-left:0" @click="onWaitAdd(model.bopquep.boptyp.toLowerCase() +'add')">新增购汇申请书</c-button>
257 258 259 260
      </c-col>
    </c-row>

    <el-row>
潘际乾 committed
261
      <c-col :span="24" style="">
jianglong committed
262
        <c-istream-table :list="stmData.data" :columns="stmData.columns" style="width:100%" :showButtonFlg="true">
潘际乾 committed
263 264 265 266 267 268
          <el-table-column fixed="right" prop="op" label="操作" width="200px">
            <template slot="header">
                <c-col :span="11" style="text-align:left"><span>操作</span></c-col>
                <!-- <c-col :span="12" style="text-align:right"><c-button icon="el-icon-s-tools"></c-button></c-col> -->
              </template>
            <template slot-scope="scope">
jianglong committed
269 270 271 272 273 274 275 276 277 278 279 280
              <c-button style="margin-left: 0" size="small" @click="onWaitDetail(scope.$index,scope.row)">
                详情
              </c-button>
              <c-button style="margin-left: 3px" size="small"  @click="onWaitAmend(scope.$index,scope.row)">
                修改
              </c-button>
              <c-button style="margin-left: 3px" size="small" @click="onWaitDelete(scope.$index,scope.row)">
                删除
              </c-button>


              
liushikai committed
281
            </template>
潘际乾 committed
282 283 284
          </el-table-column>
        </c-istream-table>
      </c-col>
285 286
    </el-row>

jianglong committed
287
   
288 289 290 291
  </div>
</template>
<script>
import Api from "~/service/Api";
wangren committed
292
import commonProcess from "~/mixin/commonProcess";
293 294
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Bopsel/Event";
295
import Utils from "~/utils";
296 297 298 299

export default {
  inject: ["root"],
  props: ["model", "codes"],
wangren committed
300
  mixins: [commonProcess],
301
  data() {
302
    return {
liushikai committed
303
      searchToggle:false,
304 305
      stmData: {
        columns: [
jianglong committed
306 307 308 309 310
          //{index:3,position:3,width:110,pattern:'date',label:'日期'},
          //{index:4,position:4,width:100,pattern:'code',label:'状态',code:this.codes.relstaEN},
          '0 1 "申报号码" 170 ',
          '1 2 "客户" 100',
          '16 3 "组织机构代码" 120',
311 312
          // '2 4 "基础" 80',
          {index:2,position:4,width:80,pattern:'code',label:'基础',code:this.codes.staflg},
jianglong committed
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
          '5 5 "银行业务编号" 150',
          //'6 6, "收付汇日期" 200',
          {index:6,position:6,width:150,pattern:'date',label:'收付汇日期'},
          //'7 7, "申报类型" 198',
          {index:7,position:7,width:190,pattern:'code',label:'申报类型',code:this.codes.boptyp},
          '8 8, "币别" 80',
          //'9 9, "金额" 120',
          {index:9,position:9,width:120,pattern:'amt',label:'金额'},
          //'10 10, "客户类型" 120',
          {index:10,position:10,width:150,pattern:'code',label:'客户类型',code:this.codes.ptytyp},
          //'11 11, "结算方式" 100',
          {index:11,position:11,width:100,pattern:'code',label:'结算方式',code:this.codes.medtyp},
          '3 12, "申报" 80',
          '4 13, "管理" 80',
          '17 14, "对方客户名称" 120',
          '18 15, "结汇金额" 100',
          '19 16, "账号" 120',
          '20 17, "现汇金额" 100',
          '21 18, "账号" 120',
          '22 19, "其他金额" 100',
          '23 20, "账号" 120',
          '24, 21, "牌价" 80',
          '26, 22, "国内扣费金额" 120',
          '27, 23, "国外扣费金额" 120',
          '28, 24, "地区机构号" 110',
          '29, 25, "外汇账户账号" 120',
          '30, 26, "人民币账户账号" 160',
          '31, 27, "外汇账户开户行" 200',
          '32, 28, "人民币账户开户行" 160',
          '33, 29, "交易编码" 100',
          '34, 30, "外汇局批件号/备案表号/业务编号" 350',
          '35, 31, "结汇用途" 100',
          '36, 32, "结汇详细用途" 150',
          '37, 33, "填报人" 120',
          '38, 34, "填报人电话" 120',
348 349 350 351
        ],
        data: [],
      },
    };
352
  },
jianglong committed
353
  methods: { ...Event ,
354 355 356 357 358 359 360 361 362 363 364
  // async onWaitDetail(idx, row) {
  //      console.log(idx);
  //      console.log(row);
  //      console.log(row.申报类型);
  //      let business=row.申报类型.toLowerCase() +"inf";
  //      let url = "/business/"+business;
  //      console.log(url);
  //      //url ="/business/"+"litopn";
  //      console.log(url);
  //      this.$router.history.push(url);
  //   },
jianglong committed
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381

  async onWaitAdd(business) {
        let viewurl = "/business/"+business;
        let params = {  };
        this.executeRule("addbut",params).then((res) => {
            if ((res.respCode == SUCCESS)) {
                Utils.copyValueFromVO(this.model, res.data);
                // this.$router.push({ path: "business/inftrnpsDetail", query: { idx: idx}});
                this.$router.push({ path: viewurl, query: {} });
            }else{
                const h = this.$createElement;
                const msg = res.respMsg||'请求执行失败!'
                this.$notify.error({ title: '错误', message: h('p',{style: 'word-break:break-all;'}, msg) })
            }
        });
    },

jianglong committed
382
  async onWaitDetail(idx, row) {
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
        let business=row.申报类型.toLowerCase() +"inf";
        let viewurl = "/business/"+business;
        const selIds = [idx + 1];
        const selDst = "dblstm" //列表对应后台模型中的stream
        let params = { selDst, selIds };
        this.executeRule("dtlbut",params).then((res) => {
            if ((res.respCode == SUCCESS)) {
                Utils.copyValueFromVO(this.model, res.data);
                // this.$router.push({ path: "business/inftrnpsDetail", query: { idx: idx}});
                this.$router.push({ path: viewurl, query: {} });
            }else{
                const h = this.$createElement;
                const msg = res.respMsg||'请求执行失败!'
                this.$notify.error({ title: '错误', message: h('p',{style: 'word-break:break-all;'}, msg) })
            }
        });
jianglong committed
399 400 401
    },

    async onWaitAmend(idx, row) {
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417
        let business=row.申报类型.toLowerCase() +"ame";
        let viewurl = "/business/"+business;
        const selIds = [idx + 1];
        const selDst = "dblstm" //列表对应后台模型中的stream
        let params = { selDst, selIds };
        this.executeRule("amebut",params).then((res) => {
            if ((res.respCode == SUCCESS)) {
                Utils.copyValueFromVO(this.model, res.data);
                // this.$router.push({ path: "business/inftrnpsDetail", query: { idx: idx}});
                this.$router.push({ path: viewurl, query: {} });
            }else{
                const h = this.$createElement;
                const msg = res.respMsg||'请求执行失败!'
                this.$notify.error({ title: '错误', message: h('p',{style: 'word-break:break-all;'}, msg) })
            }
        });
jianglong committed
418 419 420
    },

    async onWaitDelete(idx, row) {
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436
        let business=row.申报类型.toLowerCase() +"del";
        let viewurl = "/business/"+business;
        const selIds = [idx + 1];
        const selDst = "dblstm" //列表对应后台模型中的stream
        let params = { selDst, selIds };
        this.executeRule("delbut",params).then((res) => {
            if ((res.respCode == SUCCESS)) {
                Utils.copyValueFromVO(this.model, res.data);
                // this.$router.push({ path: "business/inftrnpsDetail", query: { idx: idx}});
                this.$router.push({ path: viewurl, query: {} });
            }else{
                const h = this.$createElement;
                const msg = res.respMsg||'请求执行失败!'
                this.$notify.error({ title: '错误', message: h('p',{style: 'word-break:break-all;'}, msg) })
            }
        });
jianglong committed
437
    },
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461

    // async onWaitAmend(idx, row) {
    //    console.log(idx);
    //    console.log(row);
    //    console.log(row.申报类型);
    //    let business=row.申报类型.toLowerCase() +"ame";
    //    let url = "/business/"+business;
    //    console.log(url);
    //    //url ="/business/"+"litopn";
    //    console.log(url);
    //    this.$router.history.push(url);
    // },

    // async onWaitDelete(idx, row) {
    //    console.log(idx);
    //    console.log(row);
    //    console.log(row.申报类型);
    //    let business=row.申报类型.toLowerCase() +"del";
    //    let url = "/business/"+business;
    //    console.log(url);
    //    //url ="/business/"+"litopn";
    //    console.log(url);
    //    this.$router.history.push(url);
    // },
jianglong committed
462
    },
463 464 465 466 467
  created: function () {
    this.model.bopquep.boptyp = "ALL";
    this.model.bopquep.frmdat = new Date();
    this.model.bopquep.tildat = new Date();
  },
jianglong committed
468 469 470

  

471 472
};
</script>
潘际乾 committed
473 474 475 476 477 478 479
<style scoped>
.eibs-tab >>> .m-table-search{
  border-bottom: 0;
}
.eibs-tab >>> .m-table-search-operation-top {
  width: calc(95.833333% + 9px);
}
480
</style>