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

       <c-col :span="24">
          <el-form-item label="Type of Items" prop="">
              <c-checkbox v-model="model.chkinc" disabled>Incoming</c-checkbox>
              <c-checkbox v-model="model.chkrim" >Registered</c-checkbox>
              <c-checkbox v-model="model.chkpen" disabled>Pending</c-checkbox>
              <c-checkbox v-model="model.chkcor" disabled>Correction</c-checkbox>
              <c-checkbox v-model="model.chkaut" disabled>Automatic</c-checkbox>
           </el-form-item>
jianglong committed
12
       </c-col>
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


       <c-col :span="24">
            <!-------------左边---------------->
            <c-col :span="11">
                <c-col :span="24">
                    <el-form-item label="Reference" prop="selobj">
                        <c-input  v-model="model.selobj" maxlength="32"  placeholder="请输入Reference"></c-input>
                    </el-form-item>
               </c-col>
                <c-col :span="24">
                    <c-col :span="20">
                        <el-form-item label="Selection of Users" prop="usfmod.flt">
                            <c-select v-model="model.usfmod.flt" style="width:100%" placeholder="请选择Users">
                                  <el-option
                                    v-for="item in codes.flt"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                  ></el-option>
                              </c-select>
                        </el-form-item>
                   </c-col>
                  <c-col :span="4">
                   <c-button size="small" type="primary"  @click="onUsfmodShwflt">
zhujiazhan committed
38
                       Show & Set
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
                   </c-button>
                  </c-col>
               </c-col>

               <c-col :span="24">
                <el-form-item label="Selected User" prop="usfmod.usr.extkey" v-if="model.usfmod.flt ==='<SELU>'">
                    <c-input  v-model="model.usfmod.usr.extkey" maxlength="8"  placeholder="请输入User ID"></c-input>
                </el-form-item>
               </c-col>


               <c-col :span="24">
                <el-form-item label="Selected branch" prop="usfmod.selusb" v-if="model.usfmod.flt ==='<SELB>'">
                    <c-select v-model="model.usfmod.selusb" style="width:100%" placeholder="请选择Select user branch" :code="codes.selusg">
                      </c-select>
                </el-form-item>
               </c-col>

            </c-col>
             <!-------------右边---------------->
            <c-col :span="11" :offset="1">
                   <c-col :span="24">
                        <el-form-item label="Name" prop="seltxt">
                            <c-input  v-model="model.seltxt" maxlength="32"  placeholder="请输入Selection Name"></c-input>
                        </el-form-item>
                   </c-col>
                <c-col :span="24">
                    <br>
                </c-col>
                  <c-col :span="24" style="text-align: right" >
                   <c-button size="small" type="primary"
                        @click="showGridPromptDialog('negcnt', null, null,{COD: 'cptp.draweecountcode'}, {COD: true},'doxpDialog')"
                   >
                       未分配业务
                   </c-button>
                      <c-button size="small" type="primary"
                           @click="onButreg"
                      >
                          分配获取
                      </c-button>
                  </c-col>

            </c-col>

              <!-------------隐藏---------------->
            <c-col :span="24" v-show="false">
                     <c-col :span="12">
                        <span  v-text="model.usfmod.usftxt"   data-path=".usfmod.usftxt" > </span>
                    </c-col>
                    <c-col :span="12">
                        <span  v-text="model.usfmod.labtxt"   data-path=".usfmod.labtxt" > </span>
                    </c-col>

                    <c-col :span="12">
                     <el-form-item label="Selected User Group Set" prop="usfmod.selusgset">
                         <c-select v-model="model.usfmod.selusgset" style="width:100%" placeholder="请选择Selected User Group Set">
                           </c-select>
                     </el-form-item>
                    </c-col>
                    <c-col :span="12">
                     <el-form-item label="Selected User Group" prop="usfmod.selusg">
                         <c-select v-model="model.usfmod.selusg" style="width:100%" placeholder="请选择Selected User Group">
                           </c-select>
                     </el-form-item>
                    </c-col>
                 <!--
                    <c-col :span="12">
                     <el-form-item label="" prop="usfmod.usrget.sdamod.seainf">
                         <c-input  v-model="model.usfmod.usrget.sdamod.seainf"  placeholder="请输入"></c-input>
                     </el-form-item>
                    </c-col>

                    <c-col :span="12">
                     <el-form-item label="List of SPT records" prop="sptstm">
                         <c-input  v-model="model.sptstm"  placeholder="请输入List of SPT records"></c-input>
                     </el-form-item>
                    </c-col>
                    -->
            </c-col>

jianglong committed
119
       </c-col>
120 121 122 123 124 125 126 127 128 129

        <c-col :span="24">

              <c-istream-table :list="stmData.data" :columns="stmData.columns">
               <el-table-column fixed="right" prop="op" label="操作" width="140px">
                    <template slot-scope="scope">
                        <c-button
                           style="margin-left: 0"
                           size="small"
                           type="primary"
zhujiazhan committed
130
                            @click="getButtons(scope.row)"
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
                       >
                           详情
                       </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"
zhujiazhan committed
159
                            @click.native="onButpan('rettocus')"
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
                            :disabled=this.flag
                            title="butpan">
                                退回
                            </c-button>
                            <c-button
                              style="margin-left: 7px"
                              size="medium"
                              type="primary"
                              class="medium_bcs"
                              @click.native="onOperate('rou')"
                              :disabled=this.flag
                              title="ReRouting">
                                    ReRouting
                              </c-button>
                            <c-button
                                style="margin-left: 7px"
                                size="medium"
                                type="primary"
                                class="medium_bcs"
                                @click.native="onOperate('Connect11111')"
                                title="Connect"
zhujiazhan committed
181
                                disabled=false >
182 183 184 185 186 187 188 189 190
                                    Connect
                            </c-button>
                                <c-button
                                    style="margin-left: 7px"
                                    size="medium"
                                    type="primary"
                                    class="medium_bcs"
                                    @click.native="onOperate('Infotext11111')"
                                    title="Infotext"
zhujiazhan committed
191
                                    disabled=false >
192 193 194 195 196 197 198 199 200
                                        Infotext
                                </c-button>
                                <c-button
                                    style="margin-left: 7px"
                                    size="medium"
                                    type="primary"
                                    class="medium_bcs"
                                    @click.native="onOperate('inc11111')"
                                    title="Inc"
zhujiazhan committed
201
                                    disabled=false >
202 203
                                        Show Inc.
                                </c-button>
zhujiazhan committed
204 205 206 207 208 209 210 211 212 213
                             <!--   <c-button
                                    style="margin-left: 7px"
                                    size="medium"
                                    type="primary"
                                    class="medium_bcs"
                                    @click.native="onShow()"
                                    title="Remove"
                                    :disabled=this.flag >
                                        Remove
                                </c-button>  -->
214 215 216 217 218
                                <c-button
                                    style="margin-left: 7px"
                                    size="medium"
                                    type="primary"
                                    class="medium_bcs"
zhujiazhan committed
219
                                    @click.native="onShow()"
220 221 222 223 224 225 226 227 228 229 230
                                    title="Show2"
                                    :disabled=this.flag >
                                        Show
                                </c-button>
                                   <c-button
                                        style="margin-left: 7px"
                                        size="medium"
                                        type="primary"
                                        class="medium_bcs"
                                        @click.native="onOperate('Reject111111')"
                                        title="Reject"
zhujiazhan committed
231
                                        disabled=false >
232 233 234 235 236 237 238
                                            Reject
                                    </c-button>
                        </div>
                      </div>
                    </div>
                  </el-dialog>

zhujiazhan committed
239 240
            <m-sptp0 ref="childs" :model="model" :codes="codes" @onSptp="onSptpButord"></m-sptp0>
            <m-ordp0 ref="childs2" :model="model" :codes="codes"></m-ordp0>
jianglong committed
241 242 243 244 245 246 247
  </div>
</template>
<script>
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Sptneg/Event"
zhujiazhan committed
248
import Sptp0 from "./Sptp0"
zhujiazhan committed
249 250
import Ordp0 from "./Ordp0"

jianglong committed
251 252 253 254 255

export default {
    inject: ['root'],
    props:["model","codes"],
    mixins: [commonProcess],
zhujiazhan committed
256 257
     components:{
            "m-sptp0" : Sptp0,
zhujiazhan committed
258
            "m-ordp0" : Ordp0,
zhujiazhan committed
259
        },
jianglong committed
260 261
    data(){
        return {
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
             initdialog: false,
             flag:false,
             stmData: {
                columns: [
                  '4 1 "TRN" 100',
                  '5 2 "Reference" 150',
                  '6 3 "Name" 150',
                  {index:7,position:5,width:200,pattern:'time',label:'Creation'},
                  {index:1,position:6,width:120,pattern:'code',label:'Status',code:'sptrelstatus'},
                  '8 7 "By User" 100',
                  '14 8 "Work User" 120',
                  '3 9 "Info" 100',
                  '10 10 "Infotext" 500',
                ],
                data: [],
              },
        }
    },
    watch:{
       "model.chkrim":function(){
          this.executeDefault("sptstm").then((res) => {
               if ((res.respCode == SUCCESS)) {
                  this.stmData.data = res.data.sptstm.rows;
                  this.model.sptstm = res.data.sptstm;
               }
             });
       }
    },
    methods:{...Event,
        onButreg(){
           this.executeRule("butreg").then((res) => {
                   if ((res.respCode == SUCCESS)) {
                      this.stmData.data = res.data.sptstm.rows;
                      this.model.sptstm = res.data.sptstm;
                   }
                 });
        },
        async getButtons(row){
                   let status = row['Status'];
                   this.index=row['IDX'];
                   this.initdialog = true
                   let index2 = row['IDX']+1;
                   const selIds = [index2]; //rowno选中行
                   const selDst = "sptstm" //列表对应后台模型中的stream
                   let params = { selDst: selDst, selIds: selIds };
                   this.executeRule("sptstm",params).then((res) => {
                      if ((res.respCode == SUCCESS)) {

                      }
                    });
         },

        //各入口按钮请求
        async onOperate(vul){
            let index = this.index+1;
            const selIds = [index]; //rowno选中行
            const selDst = "sptstm" //列表对应后台模型中的stream
            let params = { selDst: selDst, selIds: selIds };
            let rtnmsg = await this.executeRule(vul,params);
            if (rtnmsg.respCode == SUCCESS) {
              this.initdialog = false
               this.stmData.data = rtnmsg.data.sptstm.rows;
               this.model.sptstm = rtnmsg.data.sptstm;
             } else {
              this.initdialog = false
             }
        },
zhujiazhan committed
329
        onButpan(){
330 331 332 333 334 335 336 337 338 339
              this.$confirm('Are you sure that you want to return selected items?','提示',{
                  confirmButtonText: 'Yes',
                  cancelButtonText: 'No',
                  type: 'warning',
                  showClose:false
                }).then(async () => {//yes的执行在这里写
                         let index = this.index+1;
                         const selIds = [index]; //rowno选中行
                         const selDst = "sptstm" //列表对应后台模型中的stream
                         let params = { selDst: selDst, selIds: selIds };
zhujiazhan committed
340
                         let rtnmsg = await this.executeRule('rettocus',params);
341 342 343 344 345 346 347 348 349 350 351
                         if (rtnmsg.respCode == SUCCESS) {
                            this.initdialog = false
                            this.stmData.data = rtnmsg.data.sptstm.rows;
                            this.model.sptstm = rtnmsg.data.sptstm;
                          } else {
                             this.initdialog = false
                          }

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

                });
jianglong committed
352

zhujiazhan committed
353 354 355 356
        },
       async onShow(row){
           this.initdialog = false
           this.$refs.childs.initdialog2 = true
zhujiazhan committed
357 358 359 360
       },
       async onSptpButord(){
         this.$refs.childs2.initdialog3 = true
       }
jianglong committed
361 362 363 364 365 366 367 368 369
    },
    created:function(){

    }
}
</script>
<style>

</style>