Setp.vue 14.4 KB
Newer Older
nanrui committed
1 2 3 4
<template>
    <div class="eibs-tab">
        <c-col :span="24">
            <c-col :span="11">
nanrui committed
5
                <el-form-item label="托收业务编号" prop="bodgrp.rec.ownref">
nanrui committed
6
                    <c-fullbox>
nanrui committed
7
                        <c-input v-model="model.bodgrp.rec.ownref" maxlength="16" placeholder="请输入托收业务编号"
nanrui committed
8 9 10
                            style="width: 100%" disabled></c-input>
                        <template slot="footer">
                            <c-button style="margin-left:8px; padding: 0 12px" size="small" type="primary" @click="">
nanrui committed
11
                                <i class="el-icon-info"></i>
nanrui committed
12 13 14 15 16 17
                            </c-button>
                        </template>
                    </c-fullbox>
                </el-form-item>
            </c-col>
            <c-col :span="11" :offset="1">
nanrui committed
18
                <el-form-item label="简略信息" prop="bodgrp.rec.nam" style="width: 100%">
nanrui committed
19
                    <c-input v-model="model.bodgrp.rec.nam" maxlength="40" style="width: 100%" placeholder="请输入简略信息"
nanrui committed
20 21 22 23 24 25 26 27
                        disabled></c-input>
                </el-form-item>
            </c-col>
        </c-col>

        <c-col :span="24">
            <c-col :span="11">
                <c-col :span="12">
nanrui committed
28 29
                    <el-form-item label="托收金额" prop="bodgrp.cbs.max.cur">
                        <c-input v-model="model.bodgrp.cbs.max.cur" style="width:100%" placeholder="请选择托收金额"
nanrui committed
30 31 32 33
                            disabled>
                        </c-input>
                    </el-form-item>
                </c-col>
nanrui committed
34 35
                <c-col :span="11" :offset="1">
                    <el-form-item label="" prop="bodgrp.cbs.max.amt" label-width="0">
nanrui committed
36
                        <c-input v-model.number="model.bodgrp.cbs.max.amt" placeholder="请输入托收金额" disabled>
nanrui committed
37
                        </c-input>
nanrui committed
38 39 40 41
                    </el-form-item>
                </c-col>
            </c-col>
            <c-col :span="11" :offset="1">
nanrui committed
42
                <el-form-item label="收款人参考号" prop="bodgrp.drr.pts.ref">
wangna committed
43
                    <c-input v-model="model.bodgrp.drr.pts.ref" maxlength="16" placeholder="请输入" disabled>
nanrui committed
44 45 46 47 48 49 50 51
                    </c-input>
                </el-form-item>
            </c-col>
        </c-col>

        <c-col :span="24">
            <c-col :span="11">
                <c-col :span="12">
nanrui committed
52
                    <el-form-item label="托收余额" prop="bodgrp.cbs.opn1.cur">
nanrui committed
53
                        <c-input v-model="model.bodgrp.cbs.opn1.cur" style="width:100%"
wangna committed
54
                            placeholder="请选择" disabled>
nanrui committed
55 56 57
                        </c-input>
                    </el-form-item>
                </c-col>
nanrui committed
58 59
                <c-col :span="11" :offset="1">
                    <el-form-item label="" label-width="0" prop="bodgrp.cbs.opn1.amt">
nanrui committed
60
                        <c-input v-model.number="model.bodgrp.cbs.opn1.amt" style="width:100%"
nanrui committed
61
                            placeholder="请输入托收余额" disabled></c-input>
nanrui committed
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
                    </el-form-item>
                </c-col>
            </c-col>
            <c-col :span="11" :offset="1">
                <c-col :span="24">
                    <el-form-item label="" prop="bodgrp.drr.pts.nam">
                        <c-input v-model="model.bodgrp.drr.pts.nam" placeholder="bodgrp.drr.pts.nam" disabled></c-input>
                    </el-form-item>
                </c-col>
            </c-col>
        </c-col>


        <c-col :span="24">
            <c-col :span="11">
nanrui committed
77
                <el-form-item label="交单条件" prop="bodgrp.rec.doctypcod">
nanrui committed
78
                    <c-select v-model="model.bodgrp.rec.doctypcod" style="width: 100%"
nanrui committed
79
                        placeholder="请选择交单条件" disabled>
nanrui committed
80 81 82 83
                        <el-option v-for="item in codes.doctypcod" :key="item.value" :label="item.label"
                            :value="item.value">
                        </el-option>
                    </c-select>
nanrui committed
84 85 86 87
                </el-form-item>
            </c-col>

            <c-col :span="11" :offset="1">
nanrui committed
88
                <el-form-item label="代收行参考号" prop="bodgrp.col.pts.ref">
nanrui committed
89
                    <c-input v-model="model.bodgrp.col.pts.ref" maxlength="16" placeholder="请输入代收行"
nanrui committed
90 91 92 93 94 95 96 97
                        disabled></c-input>
                </el-form-item>
            </c-col>
        </c-col>

        <c-col :span="24">
            <c-col :span="11">
                <c-col :span="24">
nanrui committed
98
                    <el-form-item label="单据状态" prop="bodgrp.rec.docsta">
nanrui committed
99
                        <c-select v-model="model.bodgrp.rec.docsta" style="width: 100%"
nanrui committed
100
                            placeholder="请输入单据状态" disabled>
nanrui committed
101 102 103 104
                            <el-option v-for="item in codes.docstabot" :key="item.value" :label="item.label"
                                :value="item.value">
                            </el-option>
                        </c-select>
nanrui committed
105 106 107 108 109 110
                    </el-form-item>
                </c-col>
            </c-col>
            <c-col :span="11" :offset="1">
                <c-col :span="24">
                    <el-form-item label="" prop="bodgrp.col.pts.nam">
wangna committed
111
                        <c-input v-model="model.bodgrp.col.pts.nam" maxlength="40" placeholder=""
nanrui committed
112 113 114 115 116 117 118 119 120 121
                            disabled>
                        </c-input>
                    </el-form-item>
                </c-col>
            </c-col>
        </c-col>

        <c-col :span="24">
            <c-col :span="11">
                <c-col :span="12">
nanrui committed
122
                    <el-form-item label="单据期限" prop="bodgrp.rec.matdat">
nanrui committed
123 124 125 126 127 128
                        <c-input v-model="model.bodgrp.rec.matdat" placeholder="" disabled>
                        </c-input>
                    </el-form-item>
                </c-col>
                <c-col :span="9">
                    <el-form-item label="" prop="bodgrp.rec.matpercnt">
wangna committed
129
                        <c-input v-model="model.bodgrp.rec.matpercnt" placeholder="请输入" disabled>
nanrui committed
130 131 132 133
                        </c-input>
                    </el-form-item>
                </c-col>
                <c-col :span="2" :offset="1">
nanrui committed
134
                    <span></span>
nanrui committed
135 136 137
                </c-col>
                <c-col :span="24">
                    <el-form-item label="" prop="bodgrp.rec.matperbeg">
nanrui committed
138
                        <c-select v-model="model.bodgrp.rec.matperbeg" style="width: 100%"
wangna committed
139
                            placeholder="请选择" disabled>
nanrui committed
140 141 142 143
                            <el-option v-for="item in codes.matperbeg" :key="item.value" :label="item.label"
                                :value="item.value">
                            </el-option>
                        </c-select>
nanrui committed
144 145 146 147 148 149
                    </el-form-item>
                </c-col>
            </c-col>

            <c-col :span="11" :offset="1">
                <c-col :span="24">
nanrui committed
150
                    <el-form-item label="付款人参考号" prop="bodgrp.dre.pts.ref">
nanrui committed
151 152 153 154 155 156
                        <c-input v-model="model.bodgrp.dre.pts.ref" maxlength="16" disabled>
                        </c-input>
                    </el-form-item>
                </c-col>
                <c-col :span="24">
                    <el-form-item label="" prop="bodgrp.dre.pts.nam">
wangna committed
157
                        <c-input v-model="model.bodgrp.dre.pts.nam" maxlength="40" placeholder=""
nanrui committed
158 159 160 161 162 163 164 165 166 167
                            disabled>
                        </c-input>
                    </el-form-item>
                </c-col>
            </c-col>
        </c-col>

        <c-col :span="24">
            <c-col :span="11">
                <c-col :span="12">
nanrui committed
168
                    <el-form-item label="收单日期" prop="bodgrp.rec.rcvdat">
nanrui committed
169
                        <c-date-picker type="date" v-model="model.bodgrp.rec.rcvdat" style="width:100%"
nanrui committed
170
                            placeholder="请选择收单日期" disabled></c-date-picker>
nanrui committed
171 172 173
                    </el-form-item>
                </c-col>
                <c-col :span="12">
nanrui committed
174
                    <el-form-item label="寄单日期" prop="bodgrp.rec.predat">
nanrui committed
175
                        <c-date-picker type="date" v-model="model.bodgrp.rec.predat" style="width:100%"
nanrui committed
176
                            placeholder="请选择寄单日期" disabled></c-date-picker>
nanrui committed
177 178 179 180 181 182 183 184
                    </el-form-item>
                </c-col>
            </c-col>
        </c-col>

        <c-col :span="24" style="margin-top:15px;border-top:2px solid #ddd;padding-top:15px">
            <c-col :span="11">
                <c-col :span="12">
nanrui committed
185
                    <el-form-item label="接受金额" prop="setmod.doccur">
wangna committed
186
                        <c-input v-model="model.setmod.doccur" style="width:100%" placeholder="请选择"
nanrui committed
187 188 189 190 191 192
                            disabled>
                        </c-input>
                    </el-form-item>
                </c-col>
                <c-col :span="11" :offset="1">
                    <el-form-item label-width="0" prop="setmod.docamt">
wangna committed
193
                        <c-input v-model.number="model.setmod.docamt" placeholder="请输入" disabled>
nanrui committed
194
                        </c-input>
nanrui committed
195 196 197 198
                    </el-form-item>
                </c-col>
            </c-col>
            <c-col :span="11" :offset="1">
nanrui committed
199
                <c-checkbox v-model="model.mtabut.clsflg" :disabled="model.mtabut.clsflg !== 'O'">闭卷</c-checkbox>
nanrui committed
200 201 202 203 204 205 206
            </c-col>
        </c-col>


        <c-col :span="24">
            <c-col :span="11">
                <c-col :span="12">
nanrui committed
207
                    <el-form-item label="扣减金额" prop="setmod.doccur">
wangna committed
208
                        <c-input v-model="model.setmod.doccur" style="width:100%" placeholder="请选择"
nanrui committed
209 210 211 212 213 214
                            disabled>
                        </c-input>
                    </el-form-item>
                </c-col>
                <c-col :span="11" :offset="1">
                    <el-form-item label-width="0" prop="setmod.redamt">
wangna committed
215
                        <c-input v-model.number="model.setmod.redamt" placeholder="请输入"
nanrui committed
216
                            :disabled="model.bodgrp.rec.focflg == 'X'">
217
                        </c-input>
nanrui committed
218 219 220 221
                    </el-form-item>
                </c-col>
            </c-col>
            <c-col :span="11" :offset="1">
nanrui committed
222
                <c-checkbox v-model="model.bodgrp.rec.focflg" @change="change">无偿放单选项</c-checkbox>
nanrui committed
223 224
            </c-col>
        </c-col>
nanrui committed
225 226

        <c-col :span="24" style="margin-top: 30px">
nanrui committed
227
            <span style="font-size:14px">归还押汇款:</span>
nanrui committed
228
        </c-col>
nanrui committed
229
        <c-col :span="24" style="margin-top: -10px">
nanrui committed
230 231
            <c-col :span="12">
                <c-edit-table :model="model" v-bind="docgrd" style="margin-left:-30px">
232 233 234 235 236 237
                </c-edit-table>
            </c-col>
        </c-col>
        <c-col :span="24">
            <c-col :span="11">
                <c-istream-table ref="table" :list="model.liaall.tenstm.rows || []" :columns="stmData.columns"
238
                    :showSelection="true" v-on:multipleSelect="multipleSelect" prop="liaall.tenstm">
239 240
                </c-istream-table>
            </c-col>
nanrui committed
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
        </c-col>
    </div>
</template>
<script>
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Botpay/Event"

export default {
    inject: ['root'],
    props: ["model", "codes"],
    mixins: [commonProcess],
    data() {
        return {
256 257
            stmData: {
                columns: [
wangna committed
258
                    '1 1 "类型" 80',
259 260
                    '2 2 "Dbt" 80',
                    '3 3 "Cdt" 80',
wangna committed
261 262
                    '4 4 "币种" 80',
                    '5 5 "金额" 113 2 8 1 4',
263 264 265 266
                    // '6 6 "Mat.Dat." 80 4 7 1',
                    { index: 6, position: 6, width: 113, render: (item, scope) => { return scope.row[item.prop] === 'null' ? '' : scope.row[item.prop] }, label: 'Mat.Dat.' },
                ],
            },
nanrui committed
267 268
            docgrd: {
                columns: [{
nanrui committed
269
                    title: "业务编号",
nanrui committed
270 271 272 273 274
                    width: "80px",
                    dataIndex: "ownref",
                    show: "input",
                },
                {
nanrui committed
275
                    title: "币种",
nanrui committed
276 277 278 279 280
                    width: "80px",
                    dataIndex: "opncur",
                    show: "input",
                },
                {
nanrui committed
281
                    title: "托收余额",
282
                    width: "100px",
nanrui committed
283 284 285 286
                    dataIndex: "opnamt",
                    show: "input",
                },
                {
nanrui committed
287
                    title: "已结数额",
288
                    width: "100px",
nanrui committed
289 290 291
                    dataIndex: "bckamt",
                    show: "input",
                },
292
                {
wangna committed
293
                    title: "按钮",
294 295 296 297 298
                    width: "100px",
                    dataIndex: "butcal",
                    show: "button",
                },

nanrui committed
299 300 301 302 303 304
                ],
                urls: "bptbck.bptbckg.docgrd",
            },

        }
    },
305
    methods: {
306
        ...Event,
307 308
        async change() {
            if (this.model.bodgrp.rec.focflg === "X") {
309
                this.model.setmod.redamt = this.model.setmod.docamt;
nanrui committed
310

311 312 313
            } else {
                this.model.setmod.redamt = "0.00";
            }
314 315
            let rtnmsg = await this.executeDefault("liaall.tenstm");
            this.model.bodgrp.rec.docsta = rtnmsg.data.bodgrp_rec_docsta;
316
        },
317
        async multipleSelect(selection) {
318
            let rtnmsg = await this.executeDefault("executeNotify");
319 320
            if (selection.length > 1) {
                this.$notify({
wangna committed
321
                    title: "错误",
wangna committed
322
                    message: "您不能选择多个期限",
323 324 325
                    type: "error",
                });
            } else {
nanrui committed
326
                let chkIds;
327
                if (selection.length === 0) {
nanrui committed
328
                    chkIds = [];
329 330
                    this.model.liaall.tensetstm.rows = [];
                } else {
nanrui committed
331
                    chkIds = [selection[0] + 1];
332 333 334
                }
                //
                console.log(this.model.liaall.tensetstm);
nanrui committed
335 336
                let params = { chkDst: "liaall.tenstm", chkIds };
                console.log(params);
337
                const rtnmsg = await this.executeRule("liaall.tenstm", params);
nanrui committed
338
                console.log(rtnmsg);
339 340 341 342 343 344 345
                if (rtnmsg.respCode == SUCCESS) {
                    this.updateModel(rtnmsg.data);
                } else {
                    this.$notify.error({ title: "错误", message: "服务请求失败!" });
                }
            }
        },
346
    },
nanrui committed
347 348 349 350 351 352 353
    created: function () {

    }
}
</script>
<style>
</style>