Ccvpan.vue 12 KB
Newer Older
jianglong committed
1 2
<!-- 保证金公共页面 -->

zhengxiaokui committed
3
<template>
潘际乾 committed
4
  <div class="eibs-tab">
hulei committed
5 6 7 8 9 10 11
    <!--                                        
       <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>
       -->
12
    <c-col :span="24">
Wuyuqiu committed
13 14 15 16 17 18 19 20 21 22 23 24
      <c-col :span="12">
        <el-form-item label="合同金额" prop="liaall.liaccv.concur">
          <c-row>
            <!--                <c-col :span="8">-->
            <!--                    <c-input type="text" :readonly="true" value="CNY"></c-input>-->
            <!--                </c-col>-->
            <c-col :span="8">
              <c-select
                v-model="model.liaall.liaccv.concur"
                disabled
                style="width: 95%"
                placeholder=""
zhengxiaokui committed
25
              >
Wuyuqiu committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
                <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
                :readonly="true"
                v-model="model.liaall.liaccv.newamt"
              ></c-input>
            </c-col>
          </c-row>
        </el-form-item>
      </c-col>

      <c-col :span="12">
        <el-form-item label="应收比例" prop="liaall.liaccv.cshpct">
          <c-row>
jianglong committed
48
            <c-col :span="22">
Wuyuqiu committed
49 50
              <c-input v-model="model.liaall.liaccv.cshpct"></c-input>
            </c-col>
jianglong committed
51
            <c-col :span="1" style="float: right; text-align: right">
Wuyuqiu committed
52 53 54 55 56
              <span>%</span>
            </c-col>
          </c-row>
        </el-form-item>
      </c-col>
57
    </c-col>
zhengxiaokui committed
58

59
    <c-col :span="24">
Wuyuqiu committed
60 61 62 63 64 65 66 67 68
      <c-col :span="12">
        <el-form-item label="保留金额" prop="liaall.liaccv.newresamt">
          <c-row>
            <c-col :span="8">
              <c-select
                v-model="model.liaall.liaccv.concur"
                disabled
                style="width: 95%"
                placeholder=""
zhengxiaokui committed
69
              >
Wuyuqiu committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
                <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
                :readonly="true"
                v-model="model.liaall.liaccv.newresamt"
              ></c-input>
            </c-col>
          </c-row>
        </el-form-item>
      </c-col>
zhengxiaokui committed
88

Wuyuqiu committed
89 90 91
      <c-col :span="12">
        <el-form-item label="实收比例" prop="liaall.liaccv.relcshpct">
          <c-row>
jianglong committed
92
            <c-col :span="22">
Wuyuqiu committed
93 94 95 96 97
              <c-input
                :readonly="true"
                v-model="model.liaall.liaccv.relcshpct"
              ></c-input>
            </c-col>
jianglong committed
98
            <c-col :span="1" style="float: right; text-align: right">
Wuyuqiu committed
99 100 101 102 103 104
              <span>%</span>
            </c-col>
          </c-row>
        </el-form-item>
      </c-col>
    </c-col>
hulei committed
105

Wuyuqiu committed
106 107
    <c-col :span="24">
      <c-col :span="12">
Wuyuqiu committed
108 109 110 111 112 113 114 115 116 117 118
        <el-form-item label="应付金额" prop="liaall.liaccv.concur">
          <c-row>
            <!--                <c-col :span="8">-->
            <!--                    <c-input type="text" :readonly="true" value="CNY"></c-input>-->
            <!--                </c-col>-->
            <c-col :span="8">
              <c-select
                v-model="model.liaall.liaccv.concur"
                disabled
                style="width: 95%"
                placeholder=""
zhengxiaokui committed
119
              >
Wuyuqiu committed
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
                <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
                :readonly="true"
                v-model="model.liaall.liaccv.pctresamt"
              ></c-input>
            </c-col>
          </c-row>
        </el-form-item>
      </c-col>

      <c-col :span="12">
        <!-- <c-col :span="20">

          
        </c-col> -->
        <el-form-item
          label=""
          style="text-align: left"
          prop="liaall.liaccv.gleflg"
        >
149
          <c-col :span="7" class="">
150
            <el-form-item label="" prop="liaall.liaccv.gleflg" class="checkbox-left" label-width="0px">
jianglong committed
151 152
              <c-checkbox v-model="model.liaall.liaccv.gleflg">过账</c-checkbox>
            </el-form-item>
zhengxiaokui committed
153
          </c-col>
Wuyuqiu committed
154 155 156 157 158 159 160 161 162
          <!-- <c-col :span="3" style="float: right;"> -->
          <!-- <c-row> -->
          <!-- <c-col :span="24" style="margin-left:35px;text-align:right"> -->
          <c-button
            size="small"
            type="primary"
            @click="onLiaccvAdd"
            style="margin-left: 0px;float: right;"
          >
163
            添加
zhengxiaokui committed
164
          </c-button>
Wuyuqiu committed
165 166 167 168
          <!-- </c-col> -->
          <!-- </c-col> -->
        </el-form-item>
      </c-col>
Wuyuqiu committed
169
    </c-col>
Wuyuqiu committed
170

liuxin committed
171
    <template>
Wuyuqiu committed
172 173 174 175
      <el-dialog :visible.sync="dialogTableVisible" width="60%" center>
        <c-istream-table
          :list="stmData.data"
          :columns="stmData.columns"
176 177 178
          :paginationShow="true"
          :total="stmData.data.length"
          :tableData="stmData.data"
Wuyuqiu committed
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
        >
          <el-table-column prop="op" label="OP" width="80" fixed="right">
            <template slot-scope="scope">
              <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>
liuxin committed
194
    </template>
195
    <c-col :span="24">
zhengxiaokui committed
196 197 198
      <c-table
        :border="true"
        :list="model.liaall.liaccv.liaccvg"
199
        :total="model.liaall.liaccv.liaccvg.length"
200
        style="width:100%,text-align:center"
zhengxiaokui committed
201
      >
Wuyuqiu committed
202
        <el-table-column prop="ccdflg" label="调整标识" width="70px">
zhengxiaokui committed
203
        </el-table-column>
Wuyuqiu committed
204
        <el-table-column prop="ownref" label="保证金编号" width="180px">
zhengxiaokui committed
205
        </el-table-column>
Wuyuqiu committed
206
        <el-table-column prop="cur" label="币种" width="70px">
zhengxiaokui committed
207
        </el-table-column>
208
        <el-table-column prop="oldamt" label="余额" width="110px">
209
         <!-- <template slot-scope="scope">
210 211 212 213
            <c-input-currency
            v-model="scope.row.oldamt"
            placeholder="0.00"
          ></c-input-currency>
214
          </template>-->
zhengxiaokui committed
215
        </el-table-column>
216
        <el-table-column prop="amt" label="变动金额" width="110px">
217
         <!-- <template slot-scope="scope">
218 219 220 221
            <c-input-currency
            v-model="scope.row.amt"
            placeholder="0.00"
          ></c-input-currency>
222
          </template> -->
zhengxiaokui committed
223
        </el-table-column>
liushikai committed
224
        <el-table-column prop="acc" label="保证金账号" width="180px">
zhengxiaokui committed
225
        </el-table-column>
Wuyuqiu committed
226
        <el-table-column prop="rat" label="汇率" width="150px">
zhengxiaokui committed
227
        </el-table-column>
Wuyuqiu committed
228
        <el-table-column prop="concur" label="币种" width="70px">
zhengxiaokui committed
229
        </el-table-column>
230
        <el-table-column prop="covamt" label="折算后金额" width="110px">
231
         <!-- <template slot-scope="scope">
232 233 234 235
            <c-input-currency
            v-model="scope.row.covamt"
            placeholder="0.00"
          ></c-input-currency>
236 237
          </template>-->
        </el-table-column> 
238
        <el-table-column prop="acccovamt" label="实际折算金额" width="150px">
239
        <!-- <template slot-scope="scope">
240 241 242 243
            <c-input-currency
            v-model="scope.row.acccovamt"
            placeholder="0.00"
          ></c-input-currency>
244
          </template> -->
hulei committed
245
        </el-table-column>
Wuyuqiu committed
246
        <el-table-column label="操作" width="auto" fixed="right" align="center">
hulei committed
247
          <template slot-scope="scope">
Wuyuqiu committed
248 249 250 251 252 253 254 255
            <c-button
              style="margin-left: 0"
              type="primary"
              size="small"
              @click="onLiaccvDel(scope.$index, scope.row)"
            >
              删除</c-button
            >
hulei committed
256 257
          </template>
        </el-table-column>
zhengxiaokui committed
258 259 260
      </c-table>
    </c-col>

Wuyuqiu committed
261
    <c-col :span="12" style="margin-top: 25px">
262
      <c-col :span="24">
Wuyuqiu committed
263 264 265 266 267 268 269 270
        <el-form-item label="折算金额总和">
          <c-row>
            <c-col :span="8">
              <c-select
                v-model="model.liaall.liaccv.concur"
                disabled
                style="width: 95%"
                placeholder=""
271
              >
Wuyuqiu committed
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289
                <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>
        </el-form-item>
      </c-col>
zhengxiaokui committed
290

291
      <c-col :span="24">
Wuyuqiu committed
292 293 294 295 296 297 298 299 300 301
        <el-form-item label="附加信息 " v-if="model.liaall.liaccv.addinf != ''">
          <c-input
            type="textarea"
            :rows="5"
            v-model="model.liaall.liaccv.addinf"
            maxlength="200"
            show-word-limit
            placeholder="请输入附加信息"
          ></c-input>
        </el-form-item>
302
      </c-col>
zhengxiaokui committed
303 304 305 306 307
    </c-col>
  </div>
</template>
<script>
import Api from "~/service/Api";
wangren committed
308
import commonProcess from "~/mixin/commonProcess";
zhengxiaokui committed
309
import CodeTable from "~/config/CodeTable";
Wuyuqiu committed
310
import Utils from "~/utils/index";
zhengxiaokui committed
311 312 313

export default {
  inject: ["root"],
zhengxiaokui committed
314
  props: ["model", "codes"],
wangren committed
315
  mixins: [commonProcess],
zhengxiaokui committed
316 317 318 319 320
  data() {
    return {
      dialogTableVisible: false,
      stmData: {
        columns: [
321 322 323 324 325 326 327 328 329
          '1 1:1 "编号" 150',
          '2 2:1 "用户" 80',
          '3 3:1 "申请人" 100',
          '4 4:1 "账户" 200',
          '5 5:1 "币种" 200',
          '6 6:1 "金额" 100 2 0 1 18.3',
          '7 7:1 "开立日期" 80 4 7',
          '8 8:1 "标志" 150',
          '9 9:1 "备注" 250',
zhengxiaokui committed
330 331 332 333 334 335 336 337 338 339 340
          "P COLORED TRUE",
          "P VERTLINES TRUE",
          "P HORZLINES TRUE",
          "P MULTISELECT FALSE",
          "P COLUMNSIZING TRUE",
        ],
        data: [],
      },
      relrowDisabled: true,
    };
  },
liuxin committed
341 342
  methods: {
    async onLiaccvAdd() {
Wuyuqiu committed
343 344 345 346 347 348 349 350
      let rtnmsg = await this.executeRule("liaall.liaccv.add");
      //const that = this.root;
      if (rtnmsg.respCode == SUCCESS) {
        //TODO 处理数据逻辑
        if (typeof rtnmsg.data.vals != "undefined") {
          this.stmData.data = rtnmsg.data.vals.rows;
        } else {
          this.stmData.data = [];
liuxin committed
351
        }
Wuyuqiu committed
352 353 354 355
        this.dialogTableVisible = true;
      } else {
        this.$notify.error({ title: "错误", message: "服务请求失败!" });
      }
liuxin committed
356
    },
Wuyuqiu committed
357 358 359 360 361 362 363
    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);
      }
liuxin committed
364
    },
Wuyuqiu committed
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
    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: "服务请求失败!" });
      }
liuxin committed
380 381
    },
  },
zhengxiaokui committed
382
  created: function () {},
zhengxiaokui committed
383 384 385
};
</script>
<style>
jianglong committed
386

zhengxiaokui committed
387
</style>