Commit 97a65a0c by suwenhao

trnrel代码格式问题;

parent dca93a98
import Utils from "~/utils/index";
import Utils from '~/utils/index';
import Api from "~/service/Api";
export default {
methods: {
//重置
async handleReset() {
this.model.bchcon = "";
this.model.trncorco.ownref = "";
this.model.trncorco.relflg = "ALL";
this.model.usrcon = "";
this.model.trncorco.inidatfro = "";
this.model.trncorco.inidattil = "";
this.model.atp.cod = "";
this.model.trncorco.dflg = "ALL";
this.model.atptxt = "";
this.model.searchAllUsers = false;
},
//查询列表
async handleSearch() {
if(this.model.trncorco.relflg == ''){
this.model.trncorco.relflg = '0';
}
let params = {
ownref: this.model.trncorco.ownref,
inidattil: this.model.trncorco.inidattil,
inidatfro: this.model.trncorco.inidatfro,
usrcon: this.model.usrcon,
relflg: this.model.trncorco.relflg,
bchcon: this.model.bchcon,
cod: this.model.atp.cod,
dflg: this.model.trncorco.dflg,
atptxt: this.model.atptxt,
bchtyp: "",
iniusr: "",
userId: "ZL"
}
//查询接口
const res = await Api.post("/service/trnrel/getTenrelList", params);
that.$refs.inftrnps.stmData.data = res.data.trncorco_trnstm.rows;
this.model.trncorco.trnstm = res.data.trncorco_trnstm;
this.$store.commit("setTaskList", {key: "trnrel", val: this.stmData.data.length});
this.$refs.paramsForm.clearValidate();
Utils.positioningErrorMsg(res.fieldErrors, this.$refs.paramsForm.fields)
},
methods: {
//重置
async handleReset() {
this.model.bchcon = '';
this.model.trncorco.ownref = '';
this.model.trncorco.relflg = 'ALL';
this.model.usrcon = '';
this.model.trncorco.inidatfro = '';
this.model.trncorco.inidattil = '';
this.model.atp.cod = '';
this.model.trncorco.dflg = 'ALL';
this.model.atptxt = '';
this.model.searchAllUsers = false;
},
//交易代码
async onSeainf() {
//查询列表
async handleSearch() {
if (this.model.trncorco.relflg == '') {
this.model.trncorco.relflg = '0';
}
let params = {
ownref: this.model.trncorco.ownref,
inidattil: this.model.trncorco.inidattil,
inidatfro: this.model.trncorco.inidatfro,
usrcon: this.model.usrcon,
relflg: this.model.trncorco.relflg,
bchcon: this.model.bchcon,
cod: this.model.atp.cod,
dflg: this.model.trncorco.dflg,
atptxt: this.model.atptxt,
bchtyp: '',
iniusr: '',
userId: 'ZL',
};
//查询接口
const res = await Api.post('/service/trnrel/getTenrelList', params);
this.stmData.data = res.data && res.data.trncorco_trnstm.rows;
this.model.trncorco.trnstm = res.data && res.data.trncorco_trnstm;
this.$store.commit('setTaskList', {
key: 'trnrel',
val: this.stmData.data && this.stmData.data.length,
});
this.$refs.paramsForm.clearValidate();
Utils.positioningErrorMsg(res.fieldErrors || [], this.$refs.paramsForm.fields);
},
},
//交易代码
async onSeainf() {},
//交易详情
async onWaitDetail(idx, row) {
let viewurl = "business/inftrnpsDetail";
const selIds = [idx + 1];
const selDst = "trncorco.trnstm" //列表对应后台模型中的stream
let params = { selDst, selIds };
this.executeRule("dsp",params).then((res) => {
if ((res.respCode == SUCCESS)) {
Utils.copyValueFromVO(this.model, res.data);
sessionStorage.setItem('InftrnpsDetail', JSON.stringify(this.model));
this.$router.push({ path: viewurl, query: {} });
}else{
const h = this.$createElement;
const msg = res.respMsg||'请求执行失败!'
this.$notify.error({ title: '错误', message: h('p',{style: 'word-break:break-all;'}, msg) })
}
});
},
//交易详情
async onWaitDetail(idx, row) {
let viewurl = 'business/inftrnpsDetail';
const selIds = [idx + 1];
const selDst = 'trncorco.trnstm'; //列表对应后台模型中的stream
let params = { selDst, selIds };
this.executeRule('dsp', params).then((res) => {
if (res.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model, res.data);
sessionStorage.setItem('InftrnpsDetail', JSON.stringify(this.model));
this.$router.push({ path: viewurl, query: {} });
} else {
const h = this.$createElement;
const msg = res.respMsg || '请求执行失败!';
this.$notify.error({
title: '错误',
message: h('p', { style: 'word-break:break-all;' }, msg),
});
}
});
},
//处理
async onHandle(idx, row) {
let trnName = row.trnName;
const operateId = await this.$store.dispatch('Transaction/setOperateFuns', {
pass: this.onRelrow.bind(this, idx),
refuse: this.onReprow.bind(this, idx),
});
this.$router.push({ name: 'Review' + trnName.charAt(0).toUpperCase() + trnName.substring(1), query: { trn: row['INR'], operateId: operateId }, params: { prePageId: this.model.pageId } });
},
}
}
\ No newline at end of file
//处理
async onHandle(idx, row) {
let trnName = row.trnName;
const operateId = await this.$store.dispatch(
'Transaction/setOperateFuns',
{
pass: this.onRelrow.bind(this, idx),
refuse: this.onReprow.bind(this, idx),
}
);
this.$router.push({
name: 'Review' + trnName.charAt(0).toUpperCase() + trnName.substring(1),
query: { trn: row['INR'], operateId: operateId },
params: { prePageId: this.model.pageId },
});
},
},
};
export default class Inftrnps {
constructor() {
this.data = {
trncorco: {
ownref: '', // Reference .trncorco.ownref
relflg: '', // Status .trncorco.relflg
inidatfro: '', // Date of entry of Transaction .trncorco.inidatfro
inidattil: new Date(), // Date of entry of Transaction until .trncorco.inidattil
trnstm: '', // List of transaction sfor display .trncorco.trnstm
dflg: '', // 国内证标志 .trncorco.dflg
selinr: {},
},
atp: {
cod: '', // Transaction Type .atp.cod
},
atptxt: '', // Transaction Text .atptxt
usrcon: '', // User .usrcon
bchcon: '', // Branch .bchcon
};
}
}
export default class Inftrnps {
constructor() {
this.data = {
trncorco: {
ownref: "", // Reference .trncorco.ownref
relflg: "", // Status .trncorco.relflg
inidatfro: "", // Date of entry of Transaction .trncorco.inidatfro
inidattil: new Date(), // Date of entry of Transaction until .trncorco.inidattil
trnstm: "", // List of transaction sfor display .trncorco.trnstm
dflg: "", // 国内证标志 .trncorco.dflg
selinr: {},
},
atp: {
cod: "", // Transaction Type .atp.cod
},
atptxt: "", // Transaction Text .atptxt
usrcon: "", // User .usrcon
bchcon: "", // Branch .bchcon
}
}
}
\ No newline at end of file
......@@ -127,14 +127,13 @@
</div>
</template>
<script>
import commonProcess from "~/mixin/commonProcess";
import event from "../event/inftrnps";
import Inftrnps from "../model/inftrnps";
import event from "../event";
import Inftrnps from "../model";
export default {
inject: ["root"],
props: ["codes"],
mixins: [commonProcess, event],
mixins: [event],
components: {},
data() {
return {
......@@ -149,20 +148,20 @@
earnAmt: 0,
},
stmData: {
columns: [
{ label: "交易代码", prop: "" },
{ label: "业务编号", prop: "" },
{ label: "摘要信息", prop: "" },
{ label: "币种", prop: "" },
{ label: "金额", prop: "" },
{ label: "创建时间", prop: "" },
{ label: "签名要求", prop: "" },
{ label: "签名状态", prop: "" },
{ label: "经办柜员", prop: "" },
{ label: "业务状态", prop: "" },
{ label: "业务机构", prop: "" },
],
data: [],
columns: [
{ label: "交易代码", prop: "" },
{ label: "业务编号", prop: "" },
{ label: "摘要信息", prop: "" },
{ label: "币种", prop: "" },
{ label: "金额", prop: "" },
{ label: "创建时间", prop: "" },
{ label: "签名要求", prop: "" },
{ label: "签名状态", prop: "" },
{ label: "经办柜员", prop: "" },
{ label: "业务状态", prop: "" },
{ label: "业务机构", prop: "" },
],
data: [],
},
relrowDisabled: true,
relflgCodes: [],
......@@ -176,7 +175,7 @@
this.model.trncorco.inidatfro = new Date(datetime);
}
},
created: function () {
created() {
this.getInidatfro();
},
async mounted() {
......@@ -190,7 +189,6 @@
];
},
computed: {},
};
</script>
<style>
......
......@@ -510,14 +510,12 @@
<script>
import Trnrel from "../model";
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "../event";
import DocUtils from "~/utils/DocUtils";
import event from "../event";
export default {
name: "InftrnpsDetail",
mixins: [commonProcess],
mixins: [event],
data() {
return {
model: new Trnrel().data,
......@@ -593,7 +591,6 @@
this.loadData();
},
methods: {
...Event,
async handleDetail(index, row) {
const params = {
index: row.idx,
......
......@@ -23,8 +23,6 @@
</template>
<script>
import CodeTable from "~/config/CodeTable";
import commonProcess from "~/mixin/commonProcess";
import Utils from "~/utils/index";
import Inftrnps from "./Inftrnps";
export default {
......@@ -32,7 +30,7 @@
components: {
"m-inftrnps": Inftrnps,
},
mixins: [commonProcess], // 里面包含了Default、Check等的公共处理
mixins: [],
provide() {
return {
root: this,
......@@ -49,38 +47,6 @@
},
};
},
created() {
const that = this;
that.init().then((res) => {
//TODO 处理数据逻辑
that.model = Utils.copyValueFromVO(that.model, res.data);
this.$refs.inftrnps.handleSearch();
});
},
methods: {
},
computed: {
reload: function(){
return this.$store.state.Status.loading.freshReview;
}
},
watch:{
reload: function(val, oldVal){
if(val){
const that = this;
that.init(that.model).then((res) => {
//TODO 处理数据逻辑
that.model = Utils.copyValueFromVO(that.model, res.data);
this.$refs.inftrnps.handleSearch();
//刷新页面后重置刷新状态为不刷新
this.$store.commit("setLoadingFreshReview", false)
});
}
},
},
};
</script>
<style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment