Menu.vue 16.4 KB
Newer Older
zhujiazhan committed
1 2 3 4 5 6 7 8 9 10 11
<template>
  <div class="eibs-tab">

    <el-form
          ref="paramsForm"
          label-position="right"
          label-width="110px"
          size="small"
      >
      <c-col :span="24">
        <!---------左边------------>
373963566@qq.com committed
12
          <c-col :span="12" style="padding-right: 20px">
zhujiazhan committed
13
               <c-col :span="24">
373963566@qq.com committed
14
                   <c-col :span="19">
zhujiazhan committed
15 16 17 18 19
                    <el-form-item :label="$t('ordrel.filter')" prop="usfmod.flt">
                        <c-select v-model="model.usfmod.flt" style="width:100%" :placeholder="$t('other.please_enter')+ $t('ordrel.filter')" :code="codes.flt_ordrel">
                          </c-select>
                    </el-form-item>
                   </c-col>
373963566@qq.com committed
20 21
                   <c-col :span="5">
                    <c-button style="float:right" size="small" type="primary"  @click="onUsfmodShwflt">
zhujiazhan committed
22 23 24 25 26 27
                         {{$t('usfmod.CF000033')}}
                    </c-button>
                   </c-col>
               </c-col>

               <c-col :span="24" v-if="model.usfmod.flt ==='<SELU>'">
nanrui committed
28 29
                <c-form-item :label="$t('ordrel.SF000050')" prop="usfmod.usr.extkey">
                    <c-input  v-model="model.usfmod.usr.extkey" maxlength="8"  :placeholder="$t('other.please_enter')+$t('ordrel.SF000050')"></c-input>
zhujiazhan committed
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
                </c-form-item>
               </c-col>

           <c-col :span="24">
               <!-- S0000075 : Between -->
               <c-col :span="12">
                    <el-form-item :label="$t('ordrel.S0000075')" prop="inidatfro">
                        <c-date-picker type="date"  v-model="model.inidatfro" style="width:100%"  :placeholder="$t('other.please_enter')+$t('ordrel.S0000075')"></c-date-picker>
                    </el-form-item>
               </c-col>

                 <!-- S0000076 : and -->
               <c-col :span="12">
                <el-form-item :label="$t('ordrel.S0000076')" prop="inidattil" label-width ="80px">
                    <c-date-picker type="date"  v-model="model.inidattil" style="width:100%"  :placeholder="$t('other.please_enter')+$t('ordrel.S0000075')"></c-date-picker>
                </el-form-item>
               </c-col>

           </c-col>

         <!-- SG000156 : 信用证标志 -->
           <c-col :span="24">
            <el-form-item :label="$t('ordrel.SG000156')" prop="dflg">
                <c-select v-model="model.dflg" style="width:100%" :placeholder="$t('other.please_enter')+$t('ordrel.SG000156')" :code="codes.dflg_ordrel">
                  </c-select>
            </el-form-item>
           </c-col>


          </c-col>
         <!---------右边------------>
373963566@qq.com committed
61
          <c-col :span="12" style="padding-left: 20px">
zhujiazhan committed
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
                 <!-- SF000050 : Reference -->

                   <c-col :span="24">
                    <c-form-item :label="$t('ordrel.SF000050')" prop="seltxt">
                        <c-input  v-model="model.seltxt" maxlength="32"  :placeholder="$t('other.please_enter')+$t('ordrel.SF000050')"></c-input>
                    </c-form-item>
                   </c-col>
                <!-- SG000138 : Status -->

                  <c-col :span="24">
                   <el-form-item :label="$t('ordrel.SG000138')" prop="sta">
                       <c-select v-model="model.sta" style="width:100%" :placeholder="$t('other.please_enter')+$t('ordrel.SG000138')" :code="codes.sta_ordrel">
                         </c-select>
                   </el-form-item>
                  </c-col>
                   <!-- S0000073 : Transaction Type  -->
                 <c-col :span="24">
                  <c-form-item :label="$t('ordrel.S0000073')" prop="atp.cod">
                      <c-input  v-model="model.atp.cod" maxlength="6"  :placeholder="$t('other.please_enter')+$t('ordrel.S0000073')"></c-input>
                  </c-form-item>
                 </c-col>

                <!-- S0000074 : Transaction Text -->
                   <c-col :span="24">
                    <c-form-item :label="$t('ordrel.S0000074')" prop="atptxt">
                        <c-input  v-model="model.atptxt" maxlength="37"  :placeholder="$t('other.please_enter')+$t('ordrel.S0000074')" disabled></c-input>
                    </c-form-item>
                   </c-col>
                </c-col>
             </c-col>
        <c-col :span="24" style="text-align: right; height: 36.8px;padding-right: 75px" >
             <el-button icon="el-icon-search" size="small" @click="handleOpen1" >
                {{$t('ordrel.CG000160')}}
             </el-button>
             <el-button type="primary" size="small" @click="handleOpen2" >
                复核任务
             </el-button>
            <el-button size="small" @click="handleReset">重置</el-button>
            <el-button
              type="primary"
              icon="el-icon-search"
              size="small"
              @click="handleSearch"
              >查询</el-button>

            </c-col>
        </el-form>

        <c-col :span="24">

             <c-istream-table
                :list="stmData.data"
                :columns="stmData.columns"
                :showButtonFlg=true
                >
                 <el-table-column fixed="right" prop="op" label="操作" width="180px">
                             <template slot-scope="scope">
                                 <c-button
                                   style="margin-left: 0"
                                   size="small"
                                   type="primary"
                                   @click="getButtons2(scope.row)"
                                 >
                                   工作流程
                                 </c-button>
                                <c-button
                                  style="margin-left: 2"
                                  size="small"
                                  type="primary"
                                  @click="getButtons(scope.row)"
                                >
                                  处理
                                </c-button>
                            </template>
                        </el-table-column>
            </c-istream-table>
      </c-col>

   <el-dialog
        :visible.sync="initdialog"
        :title="'操作列表'"
        append-to-body
      >
        <div class="m-list-btns">
          <div class="busnavbar">
            <div class="busnavbar-items">
              <c-button
                style="margin-left: 7px"
                size="medium"
                type="primary"
                class="medium_bcs"
                @click.native="onOperate('relrow')"
                title="$t('ordrel.CG000158')">
                    {{$t('ordrel.CG000158')}}
                </c-button>
                <c-button
                  style="margin-left: 7px"
                  size="medium"
                  type="primary"
                  class="medium_bcs"
                  @click.native="onButRelrow"
                  :disabled = this.button
                  title="$t('ordrel.CF000069')">
                    {{$t('ordrel.CF000069')}}
                  </c-button>
                <c-button
                    style="margin-left: 7px"
                    size="medium"
                    type="primary"
                    class="medium_bcs"
                    :disabled = this.button
                    @click.native="onButReprow"
                    title="$t('ordrel.CF000070')">
                        {{$t('ordrel.CF000070')}}
                </c-button>
               <c-button
                    style="margin-left: 7px"
                    size="medium"
                    type="primary"
                    class="medium_bcs"
                    :disabled = this.button
                    @click.native="onButRejrow"
                    title="$t('ordrel.CF000071')">
                        {{$t('ordrel.CF000071')}}
                </c-button>
                   <c-button
                        style="margin-left: 7px"
                        size="medium"
                        type="primary"
                        class="medium_bcs"
                        @click.native="onOperate"
                        disabled
                        title="$t('ordrel.CF000077')">
                            {{$t('ordrel.CF000077')}}
                    </c-button>
                   <c-button
                        style="margin-left: 7px"
                        size="medium"
                        type="primary"
                        class="medium_bcs"
                        @click.native="showGridPromptDialog('events')"
                        title="$t('ordrel.CG000140')">
                            {{$t('ordrel.CG000140')}}
                    </c-button>
                   <c-button
                        style="margin-left: 7px"
                        size="medium"
                        type="primary"
                        class="medium_bcs"
                        @click.native="onOperate"
                        title="$t('ordrel.CG000152')">
                            {{$t('ordrel.CG000152')}}
                    </c-button>
            </div>
          </div>
        </div>
      </el-dialog>




  </div>
</template>
<script>
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Ordrel/Event"

export default {
    inject: ['root'],
    props:["model","codes"],
    mixins: [commonProcess],
    data(){
        return {
             button:false,
             initdialog:false,
             stmData: {
                 columns: [
373963566@qq.com committed
241 242
                     "1 1 \"交易代码\" 100",
                     "2 2  \"交易名称\" ",
nanrui committed
243 244
                      {index:3,position:3,width:160,pattern:'code',label:'交易状态',code:'sptDetSta'},
                     "4 4 \"创建时间\" 200",
373963566@qq.com committed
245
                     "5 5 \"对于用户\" 100",
nanrui committed
246
                     "6 6 \"工作用户\" 200",
zhujiazhan committed
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
                 ],
                 data: []
             }
        }
    },
    methods:{...Event,
        async onOperate(){
                  this.$notify.error({title: '错误',message: '开发中'});
             },
        async getButtons2(row){
               this.$emit("changeTab");
               let index = row.IDX+1;
               const selIds = [index]; //rowno选中行
               const selDst = "ordstm" //列表对应后台模型中的stream
               let params = { selDst: selDst, selIds: selIds };
               let rtnmsg = await this.executeRule("ordstm",params);
               if(rtnmsg.respCode == SUCCESS)
               {
                  this.updateModel(rtnmsg.data)
                  //TODO 处理数据逻辑
                  this.model.clmmod.wfestm = rtnmsg.data.clmmod.wfestm;
               }
               else
               {
nanrui committed
271
                   if(row.交易代码){
zhujiazhan committed
272 273 274 275 276 277 278 279 280 281
                        const items = row.srcStr.split("\t");
                        this.model.clmmod.wfs.objtyp="ORD";
                        this.model.clmmod.wfs.objinr=items[0];
                        this.model.clmmod.wfs.objnam=row.Name;
                   }
                   this.$notify.error({title: '错误',message: rtnmsg.respMsg});
               }
        },
       async getButtons(row){
               this.index=row['IDX'];
nanrui committed
282
                let status = row['交易状态'];
zhujiazhan committed
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
                //控制订单确认按钮是否可用
                let buttonflg="";
                if(status == "PUR" || status == "CMP"){
                    buttonflg = "Y";
                }else{
                    buttonflg = "N";
                }
                if(this.model.ordstm.rows.length  == 0  || buttonflg  == "N"){
                    this.button=false
                }else{
                    this.button=true
                }

               //初始化选中行
               const selIds = [row['IDX'] + 1 ]; //rowno选中行
               const selDst = "ordstm" //列表对应后台模型中的stream
               let params = { selDst: selDst, selIds: selIds };
               let rtnmsg = await this.executeRule("ordstm",params);
               if (rtnmsg.respCode == SUCCESS) {
                 this.initdialog = true
                } else {
                 this.initdialog = false
                }



         },
         onButRelrow(){
               this.$confirm('确定是否要授权此笔交易?','提示',{
wangna committed
312 313
                   confirmButtonText: '是',
                   cancelButtonText: '否',
zhujiazhan committed
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336
                   type: 'warning',
                   showClose:false
                 }).then(async () => {//yes的执行在这里写
                          let index = this.index+1;
                          const selIds = [index]; //rowno选中行
                          const selDst = "ordstm" //列表对应后台模型中的stream
                          let params = { selDst: selDst, selIds: selIds };
                          let rtnmsg = await this.executeRule('relrow',params);
                          if (rtnmsg.respCode == SUCCESS) {
                             this.initdialog = false
                             this.stmData.data = rtnmsg.data.ordstm.rows;
                             this.model.ordstm = rtnmsg.data.ordstm;
                           } else {
                              this.initdialog = false
                           }

                 }).catch(() => {//No的功能在这里写

                 });

         },
         onButReprow(){
                this.$confirm('确定是否要退回此笔交易?','提示',{
wangna committed
337 338
                    confirmButtonText: '是',
                    cancelButtonText: '否',
zhujiazhan committed
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
                    type: 'warning',
                    showClose:false
                  }).then(async () => {//yes的执行在这里写
                           let index = this.index+1;
                           const selIds = [index]; //rowno选中行
                           const selDst = "ordstm" //列表对应后台模型中的stream
                           let params = { selDst: selDst, selIds: selIds };
                           let rtnmsg = await this.executeRule('reprow',params);
                           if (rtnmsg.respCode == SUCCESS) {
                              this.initdialog = false
                              this.stmData.data = rtnmsg.data.ordstm.rows;
                              this.model.ordstm = rtnmsg.data.ordstm;
                            } else {
                               this.initdialog = false
                            }

                  }).catch(() => {//No的功能在这里写

                  });

          },
          onButRejrow(){
              this.$confirm('确定是否要删除此笔交易?','提示',{
wangna committed
362 363
                  confirmButtonText: '是',
                  cancelButtonText: '否',
zhujiazhan committed
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416
                  type: 'warning',
                  showClose:false
                }).then(async () => {//yes的执行在这里写
                         let index = this.index+1;
                         const selIds = [index]; //rowno选中行
                         const selDst = "ordstm" //列表对应后台模型中的stream
                         let params = { selDst: selDst, selIds: selIds };
                         let rtnmsg = await this.executeRule('rejrow',params);
                         if (rtnmsg.respCode == SUCCESS) {
                            this.initdialog = false
                            this.stmData.data = rtnmsg.data.ordstm.rows;
                            this.model.ordstm = rtnmsg.data.ordstm;
                          } else {
                             this.initdialog = false
                          }

                }).catch(() => {//No的功能在这里写

                });

        },
        async onButEvents(){
            let index = this.index+1;
            const selIds = [index]; //rowno选中行
            const selDst = "ordstm" //列表对应后台模型中的stream
            let params = { selDst: selDst, selIds: selIds };
            let rtnmsg = await this.executeRule('events',params);
            if (rtnmsg.respCode == SUCCESS) {
               this.initdialog = false
               this.stmData.data = rtnmsg.data.ordstm.rows;
               this.model.ordstm = rtnmsg.data.ordstm;
             } else {
                this.initdialog = false
             }

       },
        handleOpen1(){
          window.location.href="#/business/inflsb"
        },
         handleOpen2(){
          window.location.href="#/business/trnrel"
        },
    },
    created:function(){

    }
}
</script>
<style>
.m-table-search {
    padding: 20px 0px 10px 0px;
}
</style>