Ccvpan.vue 14.1 KB
Newer Older
zhengxiaokui committed
1
<template>
潘际乾 committed
2
  <div class="eibs-tab">
hulei committed
3 4 5 6 7 8 9
    <!--                                        
       <c-col :span="12">
        <el-form-item label="应付保证金金额">
            <c-input  v-model="model.liaall.liaccv.concur" maxlength="3"  placeholder="请输入应付保证金金额"></c-input>
        </el-form-item>
       </c-col>
       -->
10
    <c-col :span="24">
zhengxiaokui committed
11 12
    <c-col :span="12">
      <el-form-item label="合同金额" prop="liaall.liaccv.concur">
潘际乾 committed
13
        <c-row>
hulei committed
14 15 16
          <!--                <c-col :span="8">-->
          <!--                    <c-input type="text" :readonly="true" value="CNY"></c-input>-->
          <!--                </c-col>-->
zhengxiaokui committed
17 18 19 20
          <c-col :span="8">
            <c-select
              v-model="model.liaall.liaccv.concur"
              disabled
liushikai committed
21
              style="width: 95%"
zhengxiaokui committed
22 23 24 25 26 27 28 29 30 31 32
              placeholder="请选择Type of settlement"
            >
              <el-option
                v-for="item in codes.curtxt"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </c-col>
33
          <c-col :span="16">
zhengxiaokui committed
34 35 36 37 38 39 40 41
            <c-input
              :readonly="true"
              v-model="model.liaall.liaccv.newamt"
            ></c-input>
          </c-col>
        </c-row>
      </el-form-item>
    </c-col>
hulei committed
42 43 44 45 46 47 48 49 50 51 52 53
    <!--
       <c-col :span="12">
        <el-form-item label="合同金额">
            <c-input  v-model="model.liaall.liaccv.newamt"  placeholder="请输入合同金额"></c-input>
        </el-form-item>
       </c-col>                                             
       <c-col :span="12">
        <el-form-item label="保证金应收比例">
            <c-input  v-model="model.liaall.liaccv.cshpct"  placeholder="请输入保证金应收比例"></c-input>
        </el-form-item>
       </c-col>
       -->
zhengxiaokui committed
54 55 56
    <c-col :span="12">
      <el-form-item label="保证金应收比例" prop="liaall.liaccv.cshpct">
        <c-row>
57
          <c-col :span="20">
zhengxiaokui committed
58 59
            <c-input v-model="model.liaall.liaccv.cshpct"></c-input>
          </c-col>
60
          <c-col :span="2" style="margin-left: 20px">
zhengxiaokui committed
61 62 63 64 65
            <span>%</span>
          </c-col>
        </c-row>
      </el-form-item>
    </c-col>
66
    </c-col>
zhengxiaokui committed
67

hulei committed
68 69 70 71 72 73 74
    <!--                                             
       <c-col :span="12">
        <el-form-item label="Reserved Amount">
            <c-input  v-model="model.liaall.liaccv.newresamt"  placeholder="请输入Reserved Amount"></c-input>
        </el-form-item>
       </c-col>
       -->
75
    <c-col :span="24">
zhengxiaokui committed
76 77
    <c-col :span="12">
      <el-form-item label="Reserved Amount" prop="liaall.liaccv.newresamt">
潘际乾 committed
78
        <c-row>
hulei committed
79 80 81
          <!--                <c-col :span="8">-->
          <!--                    <c-input type="text" :readonly="true" value="CNY"></c-input>-->
          <!--                </c-col>-->
zhengxiaokui committed
82 83 84 85
          <c-col :span="8">
            <c-select
              v-model="model.liaall.liaccv.concur"
              disabled
liushikai committed
86
              style="width: 95%"
zhengxiaokui committed
87 88 89 90 91 92 93 94 95 96 97
              placeholder="请选择Type of settlement"
            >
              <el-option
                v-for="item in codes.curtxt"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </c-col>
98
          <c-col :span="16">
zhengxiaokui committed
99 100 101 102 103 104 105 106
            <c-input
              :readonly="true"
              v-model="model.liaall.liaccv.newresamt"
            ></c-input>
          </c-col>
        </c-row>
      </el-form-item>
    </c-col>
hulei committed
107 108 109 110 111 112 113
    <!--                            
       <c-col :span="12">
        <el-form-item label="保证金实收比例">
            <c-input  v-model="model.liaall.liaccv.relcshpct"  placeholder="请输入保证金实收比例"></c-input>
        </el-form-item>
       </c-col>
       -->
zhengxiaokui committed
114
    <c-col :span="12">
hulei committed
115
      <el-form-item label="保证金实收比例" prop="liaall.liaccv.relcshpct">
zhengxiaokui committed
116
        <c-row>
117
          <c-col :span="20">
hulei committed
118 119 120 121
            <c-input
              :readonly="true"
              v-model="model.liaall.liaccv.relcshpct"
            ></c-input>
zhengxiaokui committed
122
          </c-col>
123
          <c-col :span="2" style="margin-left: 20px">
zhengxiaokui committed
124 125 126 127 128
            <span>%</span>
          </c-col>
        </c-row>
      </el-form-item>
    </c-col>
129
    </c-col>
zhengxiaokui committed
130

hulei committed
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
    <!--                            
       <c-col :span="12">
	    <c-checkbox v-model="model.liaall.liaccv.gleflg">Create gle flag</c-checkbox>
       </c-col> 
                                   
       <c-col :span="12">
        <el-form-item label="reserve amount based percent">
            <c-input  v-model="model.liaall.liaccv.pctresamt"  placeholder="请输入reserve amount based percent"></c-input>
        </el-form-item>
       </c-col>                 
                  
       <c-col :span="12">
	    <c-checkbox v-model="model.liaall.liaccv.chgcurflg">Change currency flag</c-checkbox>
       </c-col> 
       -->

zhengxiaokui committed
147 148
    <c-col :span="12">
      <el-form-item label="应付保证金金额" prop="liaall.liaccv.concur">
潘际乾 committed
149
        <c-row>
hulei committed
150 151 152
          <!--                <c-col :span="8">-->
          <!--                    <c-input type="text" :readonly="true" value="CNY"></c-input>-->
          <!--                </c-col>-->
zhengxiaokui committed
153 154 155 156
          <c-col :span="8">
            <c-select
              v-model="model.liaall.liaccv.concur"
              disabled
liushikai committed
157
              style="width: 95%"
zhengxiaokui committed
158 159 160 161 162 163 164 165 166 167 168
              placeholder="请选择Type of settlement"
            >
              <el-option
                v-for="item in codes.curtxt"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </c-col>
169
          <c-col :span="16">
zhengxiaokui committed
170 171 172 173 174 175 176 177
            <c-input
              :readonly="true"
              v-model="model.liaall.liaccv.pctresamt"
            ></c-input>
          </c-col>
        </c-row>
      </el-form-item>
    </c-col>
hulei committed
178 179 180 181 182 183 184 185 186 187 188 189 190
    <!--
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="openMask">
            Add
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small"  icon="el-icon-delete" @click="onLiaccvDel">
            Del
        </c-button>
       </c-col>
       -->
nanrui committed
191
    <c-col :span="7" :offset="1">
192 193 194
      <c-checkbox v-model="model.liaall.liaccv.gleflg">过账</c-checkbox>
    </c-col>
    <c-col :span="3" style="text-align:right">
liushikai committed
195
      <!-- <c-row> -->
潘际乾 committed
196
        <!-- <c-col :span="24" style="margin-left:35px;text-align:right"> -->
zhengxiaokui committed
197
          <c-button size="small" type="primary" @click="onLiaccvAdd">
zhengxiaokui committed
198 199
            Add
          </c-button>
liushikai committed
200
        <!-- </c-col> -->
liuxin committed
201
          
zhengxiaokui committed
202

hulei committed
203 204
        <!-- <c-col :span="2">
          <c-button size="small" icon="el-icon-delete" @click="onLiaccvDel">
zhengxiaokui committed
205 206
            Del
          </c-button>
hulei committed
207
        </c-col> -->
liushikai committed
208
      <!-- </c-row> -->
zhengxiaokui committed
209
    </c-col>
liushikai committed
210
    <!-- <c-col :span="24"><div style="height: 10px"></div></c-col> -->
liuxin committed
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
    <template>
        <el-dialog
            :visible.sync="dialogTableVisible"
            width="60%"
            center
          >
            <c-istream-table :list="stmData.data" :columns="stmData.columns" :paginationShow="false">
            <el-table-column prop="op" label="OP" width="80" fixed="right">
                <template slot-scope="scope">
                <!-- <a href="javascript:void(0)" type="primary" @click="pickDepItem(scope.$index,scope.row)"
                    >选择</a
                > -->
                    <c-button
                        style="margin-left: 0"
                        size="small"
                        type="primary"
                        @click="pickDepItem(scope.$index,scope.row)"
                        >
                        选择
                    </c-button>
                </template>
            </el-table-column>
            </c-istream-table>
          </el-dialog>
    </template>
236
    <c-col :span="24">
zhengxiaokui committed
237 238 239 240 241
      <c-table
        :border="true"
        :list="model.liaall.liaccv.liaccvg"
        style="width:80%,text-align:center"
      >
liushikai committed
242
        <el-table-column prop="ccdflg" label="CF000048" width="78px">
zhengxiaokui committed
243
        </el-table-column>
liushikai committed
244
        <el-table-column prop="ownref" label="保证金编号" width="130px">
zhengxiaokui committed
245
        </el-table-column>
liushikai committed
246
        <el-table-column prop="cur" label="币种" width="55px">
zhengxiaokui committed
247
        </el-table-column>
liushikai committed
248
        <el-table-column prop="oldamt" label="余额" width="150px">
zhengxiaokui committed
249
        </el-table-column>
liushikai committed
250
        <el-table-column prop="amt" label="变动金额" width="150px">
zhengxiaokui committed
251
        </el-table-column>
liushikai committed
252
        <el-table-column prop="acc" label="保证金账号" width="180px">
zhengxiaokui committed
253
        </el-table-column>
liushikai committed
254
        <el-table-column prop="rat" label="汇率" width="120px">
zhengxiaokui committed
255
        </el-table-column>
liushikai committed
256
        <el-table-column prop="concur" label="币种" width="55px">
zhengxiaokui committed
257
        </el-table-column>
liushikai committed
258
        <el-table-column prop="covamt" label="折算后金额" width="150px">
zhengxiaokui committed
259
        </el-table-column>
liushikai committed
260
        <el-table-column prop="acccovamt" label="Acc Amount" width="150px">
hulei committed
261
        </el-table-column>
liushikai committed
262
        <el-table-column label="操作" width="75px" fixed="right">
hulei committed
263
          <template slot-scope="scope">
liushikai committed
264 265
            <c-button style="margin-left:0" type="primary" size="small" @click="onLiaccvDel(scope.$index,scope.row)">
            Del</c-button>
hulei committed
266 267
          </template>
        </el-table-column>
zhengxiaokui committed
268 269 270
      </c-table>
    </c-col>

hulei committed
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
    <!-- <c-col :span="12">
      <el-form-item label="Amount Covered">
        <c-row>
          <c-col :span="8">
            <c-select
              v-model="model.liaall.liaccv.concur"
              disabled
              style="width: 100%"
              placeholder="请选择Type of settlement"
            >
              <el-option
                v-for="item in codes.curtxt"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </c-col>
          <c-col :span="14">
            <c-input
              v-model="model.liaall.liaccv.totcovamt"
              :readonly="true"
            ></c-input>
          </c-col>
        </c-row>
      </el-form-item>
    </c-col> -->

300
    <c-col :span="12" style="margin-top:15px">
301
      <c-col :span="24">
zhengxiaokui committed
302
      <el-form-item label="金额总和">
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
        <c-row>
          <c-col :span="8">
            <c-select
              v-model="model.liaall.liaccv.concur"
              disabled
              style="width: 95%"
              placeholder="请选择Type of settlement"
            >
              <el-option
                v-for="item in codes.curtxt"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </c-col>
          <c-col :span="16">
            <c-input
              v-model="model.liaall.liaccv.totcovamt"
              :readonly="true"
            ></c-input>
          </c-col>
        </c-row>
zhengxiaokui committed
327
      </el-form-item>
328
    </c-col>
zhengxiaokui committed
329

330
      <c-col :span="24">
331 332
      <el-form-item label="Additional Information "
        v-if="model.liaall.liaccv.addinf!=''">
zhengxiaokui committed
333 334
        <c-input
          type="textarea"
hulei committed
335
          :rows="5"
zhengxiaokui committed
336 337 338 339 340 341
          v-model="model.liaall.liaccv.addinf"
          maxlength="200"
          show-word-limit
          placeholder="请输入Additional Information "
        ></c-input>
      </el-form-item>
342
      </c-col>
zhengxiaokui committed
343
    </c-col>
344 345 346 347 348 349 350 351 352 353 354 355 356

    <!-- <c-col :span="12">
      <el-form-item label="Additional Information ">
        <c-input
          type="textarea"
          :rows="5"
          v-model="model.liaall.liaccv.addinf"
          maxlength="200"
          show-word-limit
          placeholder="请输入Additional Information "
        ></c-input>
      </el-form-item>
    </c-col> -->
zhengxiaokui committed
357 358 359 360
  </div>
</template>
<script>
import Api from "~/service/Api";
wangren committed
361
import commonProcess from "~/mixin/commonProcess";
zhengxiaokui committed
362
import CodeTable from "~/config/CodeTable";
liuxin committed
363
import Utils from "~/utils/index"
zhengxiaokui committed
364 365 366

export default {
  inject: ["root"],
zhengxiaokui committed
367
  props: ["model", "codes"],
wangren committed
368
  mixins: [commonProcess],
zhengxiaokui committed
369 370 371 372 373
  data() {
    return {
      dialogTableVisible: false,
      stmData: {
        columns: [
liuxin committed
374
          '1 1:1 "Ref" 150',
zhengxiaokui committed
375
          '2 2:1 "User" 80',
liuxin committed
376 377 378 379
          '3 3:1 "Applicant" 100',
          '4 4:1 "Account" 200',
          '5 5:1 "Cur" 200',
          '6 6:1 "Amt" 100 2 0 1 18.3',
zhengxiaokui committed
380
          '7 7:1 "Open date" 80 4 7',
liuxin committed
381 382
          '8 8:1 "flg" 150',
          '9 9:1 "Remarks" 250',
zhengxiaokui committed
383 384 385 386 387 388 389 390 391 392 393
          "P COLORED TRUE",
          "P VERTLINES TRUE",
          "P HORZLINES TRUE",
          "P MULTISELECT FALSE",
          "P COLUMNSIZING TRUE",
        ],
        data: [],
      },
      relrowDisabled: true,
    };
  },
liuxin committed
394 395 396 397 398 399
  methods: {
    async onLiaccvAdd() {
        let rtnmsg = await this.executeRule("liaall.liaccv.add")
        //const that = this.root;
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑
liuxin committed
400 401 402 403 404
            if(typeof(rtnmsg.data.vals) != "undefined"){
                this.stmData.data = rtnmsg.data.vals.rows;
            }else{
                this.stmData.data = [];
            }
liuxin committed
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437
            this.dialogTableVisible = true;
        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败!' });
        }
    },
    async pickDepItem(idx,row) {
        var params = {selDst:"",selIds:[idx+1]}
        let rtnmsg = await this.executeRule("liaall.liaccv.add", params)
        if (rtnmsg.respCode == SUCCESS) {
            this.dialogTableVisible = false;
            Utils.copyValueFromVO(this.model, rtnmsg.data);
        }
    },
    async onLiaccvDel(index,row) {
        let ids = [index+1];
        let params = {selDst:"liaall.liaccv.liaccvg",selIds:ids};
        let rtnmsg = await this.executeRule("liaall.liaccv.del",params)
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑
            this.$message({
                type: 'success',
                message: '删除成功!'
            });
            //this.model.liaall.liaccv.liaccvg = [];
            Utils.copyValueFromVO(this.model, rtnmsg.data);

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败!' });
        }
    },
  },
zhengxiaokui committed
438
  created: function () {},
zhengxiaokui committed
439 440 441 442
};
</script>
<style>
</style>