Commit 97a65a0c by suwenhao

trnrel代码格式问题;

parent dca93a98
import Utils from '~/utils/index';
import Utils from "~/utils/index"; import Api from "~/service/Api";
export default { export default {
methods: { methods: {
//重置 //重置
async handleReset() { async handleReset() {
this.model.bchcon = ""; this.model.bchcon = '';
this.model.trncorco.ownref = ""; this.model.trncorco.ownref = '';
this.model.trncorco.relflg = "ALL"; this.model.trncorco.relflg = 'ALL';
this.model.usrcon = ""; this.model.usrcon = '';
this.model.trncorco.inidatfro = ""; this.model.trncorco.inidatfro = '';
this.model.trncorco.inidattil = ""; this.model.trncorco.inidattil = '';
this.model.atp.cod = ""; this.model.atp.cod = '';
this.model.trncorco.dflg = "ALL"; this.model.trncorco.dflg = 'ALL';
this.model.atptxt = ""; this.model.atptxt = '';
this.model.searchAllUsers = false; 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)
},
//交易代码 //查询列表
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) { async onWaitDetail(idx, row) {
let viewurl = "business/inftrnpsDetail"; let viewurl = 'business/inftrnpsDetail';
const selIds = [idx + 1]; const selIds = [idx + 1];
const selDst = "trncorco.trnstm" //列表对应后台模型中的stream const selDst = 'trncorco.trnstm'; //列表对应后台模型中的stream
let params = { selDst, selIds }; let params = { selDst, selIds };
this.executeRule("dsp",params).then((res) => { this.executeRule('dsp', params).then((res) => {
if ((res.respCode == SUCCESS)) { if (res.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
sessionStorage.setItem('InftrnpsDetail', JSON.stringify(this.model)); sessionStorage.setItem('InftrnpsDetail', JSON.stringify(this.model));
this.$router.push({ path: viewurl, query: {} }); this.$router.push({ path: viewurl, query: {} });
}else{ } else {
const h = this.$createElement; const h = this.$createElement;
const msg = res.respMsg||'请求执行失败!' const msg = res.respMsg || '请求执行失败!';
this.$notify.error({ title: '错误', message: h('p',{style: 'word-break:break-all;'}, msg) }) this.$notify.error({
} title: '错误',
}); message: h('p', { style: 'word-break:break-all;' }, msg),
}, });
}
});
},
//处理 //处理
async onHandle(idx, row) { async onHandle(idx, row) {
let trnName = row.trnName; let trnName = row.trnName;
const operateId = await this.$store.dispatch('Transaction/setOperateFuns', { const operateId = await this.$store.dispatch(
pass: this.onRelrow.bind(this, idx), 'Transaction/setOperateFuns',
refuse: this.onReprow.bind(this, idx), {
}); pass: this.onRelrow.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 } }); refuse: this.onReprow.bind(this, idx),
}, }
} );
} this.$router.push({
\ No newline at end of file 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 @@ ...@@ -127,14 +127,13 @@
</div> </div>
</template> </template>
<script> <script>
import commonProcess from "~/mixin/commonProcess"; import event from "../event";
import event from "../event/inftrnps"; import Inftrnps from "../model";
import Inftrnps from "../model/inftrnps";
export default { export default {
inject: ["root"], inject: ["root"],
props: ["codes"], props: ["codes"],
mixins: [commonProcess, event], mixins: [event],
components: {}, components: {},
data() { data() {
return { return {
...@@ -149,20 +148,20 @@ ...@@ -149,20 +148,20 @@
earnAmt: 0, earnAmt: 0,
}, },
stmData: { stmData: {
columns: [ columns: [
{ label: "交易代码", prop: "" }, { label: "交易代码", prop: "" },
{ label: "业务编号", prop: "" }, { label: "业务编号", prop: "" },
{ label: "摘要信息", prop: "" }, { label: "摘要信息", prop: "" },
{ label: "币种", prop: "" }, { label: "币种", prop: "" },
{ label: "金额", prop: "" }, { label: "金额", prop: "" },
{ label: "创建时间", prop: "" }, { label: "创建时间", prop: "" },
{ label: "签名要求", prop: "" }, { label: "签名要求", prop: "" },
{ label: "签名状态", prop: "" }, { label: "签名状态", prop: "" },
{ label: "经办柜员", prop: "" }, { label: "经办柜员", prop: "" },
{ label: "业务状态", prop: "" }, { label: "业务状态", prop: "" },
{ label: "业务机构", prop: "" }, { label: "业务机构", prop: "" },
], ],
data: [], data: [],
}, },
relrowDisabled: true, relrowDisabled: true,
relflgCodes: [], relflgCodes: [],
...@@ -176,7 +175,7 @@ ...@@ -176,7 +175,7 @@
this.model.trncorco.inidatfro = new Date(datetime); this.model.trncorco.inidatfro = new Date(datetime);
} }
}, },
created: function () { created() {
this.getInidatfro(); this.getInidatfro();
}, },
async mounted() { async mounted() {
...@@ -190,7 +189,6 @@ ...@@ -190,7 +189,6 @@
]; ];
}, },
computed: {},
}; };
</script> </script>
<style> <style>
......
...@@ -510,14 +510,12 @@ ...@@ -510,14 +510,12 @@
<script> <script>
import Trnrel from "../model"; import Trnrel from "../model";
import Api from "~/service/Api"; import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"; import CodeTable from "~/config/CodeTable";
import Event from "../event"; import event from "../event";
import DocUtils from "~/utils/DocUtils";
export default { export default {
name: "InftrnpsDetail", name: "InftrnpsDetail",
mixins: [commonProcess], mixins: [event],
data() { data() {
return { return {
model: new Trnrel().data, model: new Trnrel().data,
...@@ -593,7 +591,6 @@ ...@@ -593,7 +591,6 @@
this.loadData(); this.loadData();
}, },
methods: { methods: {
...Event,
async handleDetail(index, row) { async handleDetail(index, row) {
const params = { const params = {
index: row.idx, index: row.idx,
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
</template> </template>
<script> <script>
import CodeTable from "~/config/CodeTable"; import CodeTable from "~/config/CodeTable";
import commonProcess from "~/mixin/commonProcess";
import Utils from "~/utils/index";
import Inftrnps from "./Inftrnps"; import Inftrnps from "./Inftrnps";
export default { export default {
...@@ -32,7 +30,7 @@ ...@@ -32,7 +30,7 @@
components: { components: {
"m-inftrnps": Inftrnps, "m-inftrnps": Inftrnps,
}, },
mixins: [commonProcess], // 里面包含了Default、Check等的公共处理 mixins: [],
provide() { provide() {
return { return {
root: this, root: this,
...@@ -49,38 +47,6 @@ ...@@ -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> </script>
<style> <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