Commit 7f8ed9eb by WF1020

Merge branch 'settle-test-20230110' of http://114.115.138.98:8900/fukai/vue-gjjs…

Merge branch 'settle-test-20230110' of http://114.115.138.98:8900/fukai/vue-gjjs into settle-test-20230110
parents 573c634b 4fa427f3
......@@ -14,6 +14,7 @@
"bignumber.js": "^9.0.1",
"cluster": "^0.7.7",
"core-js": "^3.6.4",
"docx-preview": "^0.1.15",
"echarts": "^5.2.2",
"element-ui": "^2.13.2",
"es6-promise": "^4.2.8",
......
......@@ -21,38 +21,47 @@ export default {
},
// 检核
async handleCheck() {
// this.$refs['modelForm'].validate((valid) => {
// console.log('valid', valid)
// })
const loading = this.loading('正在校验数据');
const rtnmsg = await Api.post(this.requestPrefix + '/checkAll', {
const rtnmsg = await Api.post('/service/gitopn/checkAll', {
...this.model,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
});
if (rtnmsg.respCode === SUCCESS) {
this.updateValueSet(rtnmsg.codeSet);
let errorRules = rtnmsg.data
Object.keys(errorRules).map((ruleKey) => {
// 此处判断是为了区分,如果在前端做了校验后端也校验了就不采用自定义校验规则
if (!this.rules[ruleKey]) {
this.rules[ruleKey] = [
{
validator: (rule, value, callback) => {
callback(new Error(errorRules[ruleKey]))
},
trigger: ['change', 'blur']
}
if (rtnmsg.respCode === SUCCESS) {
const fieldErrors = rtnmsg.fieldErrors;
this.updateModel(rtnmsg.data);
if (fieldErrors && Object.keys(fieldErrors).length === 0) {
// 清除之前的校验状态
this.getRoot().$refs.modelForm.clearValidate();
this.$notify({
title: '成功',
message: '校验成功',
type: 'success',
});
return;
]
}
})
console.log('rules', this.rules)
this.$refs['modelForm'].validate((valid) => {
console.log('valid', valid)
})
}
// this.$notify({
// title: '成功',
// message: '校验成功',
// type: 'success',
// });
loading.close();
},
// 暂存
handleStash() {
console.log('暂存');
async handleStash() {
const res = await Api.post('/service/gitopn/txnHold', {
...this.model,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
});
console.log('暂存', res);
},
async tabClick(tab) {
if (this.isInDisplay) {
......@@ -70,8 +79,10 @@ export default {
break;
case 'setpan':
let setfegRequest = buildFn.buildSetfeg(this.model, this.trnName);
let setglgRequest = buildFn.buildSetglg(this.model, this.trnName);
this.processSetpan(setfegRequest, setglgRequest);
// 此处利用回调是为了等setfeg的接口调用完成后才去获取setglg参数,由于setglg参数依赖于setfeg函数的返回值
this.processSetpan(setfegRequest, () => {
return buildFn.buildSetglg(this.model, this.trnName)
});
break;
case 'docpan':
let docpanRequest = buildFn.builDocpan(this.model, this.trnName);
......@@ -84,7 +95,6 @@ export default {
default:
return;
}
},
// 点击获取按钮拉取当前key字段下的表单数据
queryFormData(key) {
......
......@@ -138,6 +138,7 @@ import Docpan from "~/components/business/docpan/views";
import Doctre from "~/views/Public/Doctre";
import Limitbody from "~/views/Public/Limitbody";
import moment from "moment";
import { mapState } from 'vuex';
export default {
name: "Gitopn",
......@@ -172,6 +173,11 @@ export default {
"m-limitbody": Limitbody,
"m-aacp": Aacp,
},
computed: {
...mapState({
toHandleRowData: (state) => state.toHandleRowData
})
},
provide() {
return {
root: this,
......@@ -279,7 +285,7 @@ export default {
this.model.gitp.labissref = 'Issuing Bank\'s Ref.'
this.model.gitp.laborcdat = 'Contract Date'
this.model.gitp.letterlabel = '面函标题'
this.model.gitp.usr.extkey = 'ZL'
this.model.gitp.usr.extkey = window.sessionStorage.userId || 'ZL'
this.model.liaall.exttotamt = '0.000'
this.model.liaall.exttotoldamt = '0.000'
this.model.liaccv.cshpct = '0.00'
......@@ -291,12 +297,23 @@ export default {
this.model.liaall.limmod.ccvamt = '0.000'
this.model.liaall.limmod.comamt = '0.000'
this.model.liaall.misamt = '0.000'
this.model.pageId = 'CtxCache-4079be82-bb5e-4ced-835e-0f20d3268ec2'
this.model.setmod.dspflg = 'CG'
},
async init () {
const params = {
...this.toHandleRowData
}
const res = await Api.post('/service/xxx/xxx', {
...params,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
});
console.log(res)
}
},
created () {
this.initModelData()
// this.initModelData()
// this.init()
this.queryHndtypCodeTableList(this.trnName)
},
mounted () {},
......
......@@ -51,27 +51,12 @@ export default {
this.$router.push({ path: 'business-new/sptpopup', query: { inr: inr } });
},
async continueEdit(row, scope) {
//let rtnmsg = await Api.post("getPendingData",{params:{'selsptinr':row[0]}})
//if (rtnmsg.respCode == SUCCESS) {
//var cacheFileName = rtnmsg.data.cacheFileName;
// this.model.selsptinr = row['INR'];
// const selIds = [];
// selIds.push(row['IDX']);
// let params = { selDst: "sptstm", selIds: selIds };
// let rtnmsg = await this.executeRule("tak", params)
// if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
this.updateToHandleRowData(row)
let trnName = row.frm.toLowerCase();
// let viewurl = "/business/ditopn?selsptinr=" + row[0];
//let viewurl = "/business/"+trnName+"?selsptinr=" + row['INR'];
this.$router.push({
name: trnName.charAt(0).toUpperCase() + trnName.substring(1),
params: { prePageId: this.model.pageId },
});
// }
// else {
// this.$notify.error({ title: '错误', message: '服务请求失败!' });
// }
},
// pageSize改变
handleSizeChange(val) {
......
......@@ -148,6 +148,7 @@
<script>
import Api from '~/service/Api';
import event from '../event'
import { mapMutations } from 'vuex';
export default {
inject: ['root'],
props: ['model', 'codes'],
......@@ -238,6 +239,7 @@ export default {
// this.$store.commit('setTaskList', {key: 'sptsel', val: this.stmData.data.length})
},
methods: {
...mapMutations(['updateToHandleRowData']),
// async choose(idx,row){
// var params = {selDst:"sptstm",selrow:[idx+1]}
// let rtnmsg = await this.executeRule("sptstm" , params) //SPTSTM
......
......@@ -4,7 +4,8 @@ import Utils from '~/utils';
export default {
async processLiaccv(liaccvRequest) {
const loading = this.loading('正在请求数据');
let rtnmsg = await Api.post('/service/liaccv/assertLiaccv', liaccvRequest);
let objtyp = liaccvRequest.rec.objtyp;
let rtnmsg = await Api.post(`/service/${ objtyp.toLowerCase() }/liaccv/assertLiaccv`, liaccvRequest);
if (rtnmsg.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model.liaccv, rtnmsg.data);
}
......
......@@ -33,10 +33,7 @@
</c-select>
</c-col>
<c-col :span="16">
<c-input
:readonly="true"
v-model="model.liaccv.newamt"
></c-input>
<c-input :readonly="true" v-model="model.liaccv.newamt"></c-input>
</c-col>
</c-row>
</el-form-item>
......@@ -141,13 +138,14 @@
</c-col> -->
<el-form-item label="" style="text-align: left" prop="liaccv.gleflg">
<c-col :span="7" class="">
<el-form-item
label=""
style="text-align: left"
prop="liaccv.gleflg"
class="checkbox-left"
label-width="0px"
>
<c-col :span="7" class="">
<el-form-item label="" prop="liaccv.gleflg" class="checkbox-left" label-width="0px">
<c-checkbox v-model="model.liaccv.gleflg">过账</c-checkbox>
</el-form-item>
</c-col>
......@@ -158,7 +156,7 @@
size="small"
type="primary"
@click="onLiaccvAdd"
style="margin-left: 0px;float: right;"
style="margin-left: 0px; float: right"
>
添加
</c-button>
......@@ -307,17 +305,17 @@
</c-col>
</c-col>
</div>
</template>
<script>
import Event from "../event"
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Utils from "~/utils/index";
</template>
<script>
import Event from '../event';
import Api from '~/service/Api';
import commonProcess from '~/mixin/commonProcess';
import CodeTable from '~/config/CodeTable';
import Utils from '~/utils/index';
export default {
inject: ["root"],
props: ["model", "codes"],
export default {
inject: ['root'],
props: ['model', 'codes'],
mixins: [commonProcess],
data() {
return {
......@@ -326,41 +324,41 @@
columns: [
{
label: '编号',
prop: 'ownref'
prop: 'ownref',
},
{
label: '用户',
prop: 'ownusr'
prop: 'ownusr',
},
{
label: '申请人',
prop: 'aplnam',
width: 180
width: 180,
},
{
label: '账户',
prop: 'engact'
prop: 'engact',
},
{
label: '币种',
prop: 'cur'
prop: 'cur',
},
{
label: '金额',
prop: 'amt'
prop: 'amt',
},
{
label: '开立日期',
prop: 'opndat'
prop: 'opndat',
},
{
label: '标志',
prop: 'gleflg'
prop: 'gleflg',
},
{
label: '备注',
prop: 'reason'
}
prop: 'reason',
},
],
data: [],
},
......@@ -370,7 +368,7 @@
methods: {
...Event,
async onLiaccvAdd() {
let rulePath = "/service/liaccv/getFcdList";
let rulePath = '/service/liaccv/getFcdList';
let liaccvRequest = this.buildLiaccv(this.root);
let rtnmsg = await Api.post(rulePath, liaccvRequest);
if (rtnmsg.respCode == SUCCESS) {
......@@ -379,7 +377,7 @@
}
},
async pickDepItem(idx, row) {
let rulePath = "/service/liaccv/addLiaccvg";
let rulePath = '/service/liaccv/addLiaccvg';
let liaccvRequest = this.buildLiaccv(this.root);
liaccvRequest.fcdVo = row;
let rtnmsg = await Api.post(rulePath, liaccvRequest);
......@@ -390,27 +388,24 @@
},
async onLiaccvDel(index, row) {
let fcdVo = {
inr : row.fcdinr
}
let rulePath = "/service/liaccv/deleteLiaccvg";
inr: row.fcdinr,
};
let rulePath = '/service/liaccv/deleteLiaccvg';
let liaccvRequest = this.buildLiaccv(this.root);
liaccvRequest.fcdVo = fcdVo;
let rtnmsg = await Api.post(rulePath, liaccvRequest);
if (rtnmsg.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model.liaccv, rtnmsg.data);
this.$message({
type: "success",
message: "删除成功!",
type: 'success',
message: '删除成功!',
});
} else {
this.$notify.error({ title: "错误", message: "服务请求失败!" });
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
},
created: function () {},
};
</script>
<style>
</style>
\ No newline at end of file
};
</script>
<style></style>
......@@ -4,7 +4,8 @@ import Utils from '~/utils';
export default {
async processTrndoc(trndocRequest) {
const loading = this.loading('正在请求数据')
let rtnmsg = await Api.post('/service/docpan/assertTrndoc', trndocRequest);
let objtyp = trndocRequest.rec.objtyp;
let rtnmsg = await Api.post(`/service/${ objtyp.toLowerCase() }/docpan/assertTrndoc`, trndocRequest);
if (rtnmsg.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model.docpan, rtnmsg.data);
}
......
......@@ -3,9 +3,9 @@ import Utils from '~/utils';
export default {
async processLiaall(liaallRequest) {
//组数据,发post请求
const loading = this.loading('正在请求数据')
let rtnmsg = await Api.post('/service/liaall/assertLiaall', liaallRequest);
let objtyp = liaallRequest.rec.objtyp;
let rtnmsg = await Api.post(`/service/${ objtyp.toLowerCase() }/liaall/assertLiaall`, liaallRequest);
if (rtnmsg.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model.liaall, rtnmsg.data);
}
......
......@@ -88,7 +88,7 @@
label-width="0"
:prop="'liaall.liaallg.' + scope.$index + '.acc'"
>
{{scope.row.acc}}
{{ scope.row.acc }}
<!-- <c-input
v-model="scope.row.acc"
style="width: 100%"
......@@ -103,7 +103,13 @@
{{ dateFormat(scope.row.valdat) }}
</template>
</el-table-column>
<el-table-column label="" prop="det" width="150px" height="0px" fixed="right" >
<el-table-column
label=""
prop="det"
width="150px"
height="0px"
fixed="right"
>
<template slot-scope="scope" slot="header">
<c-button
circle
......@@ -172,7 +178,7 @@
placeholder=""
></c-input>
<c-input
style="width: 40%;margin-left:10px;"
style="width: 40%; margin-left: 10px"
disabled
v-model="model.liaall.misamt"
placeholder="请输入金额"
......@@ -219,18 +225,18 @@
</div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import EngpDialog from "./dialog.vue";
import Api from '~/service/Api';
import commonProcess from '~/mixin/commonProcess';
import CodeTable from '~/config/CodeTable';
import EngpDialog from './dialog.vue';
export default {
inject: ["root"],
inject: ['root'],
components: {
EngpDialog
EngpDialog,
},
mixins: [commonProcess],
props: ["model", "codes"],
props: ['model', 'codes'],
data() {
return {
dialogVisible: false,
......@@ -240,17 +246,17 @@ export default {
},
methods: {
async onLiaallButmisamt() {
let rtnmsg = await this.executeRule("liaall_butmisamt");
let rtnmsg = await this.executeRule('liaall_butmisamt');
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
} else {
this.$notify.error({ title: "错误", message: "服务请求失败!" });
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
detail1(index, row) {
const that = this;
const rule = "liaall.liaallg(" + (index + 1) + ").det";
const rule = 'liaall.liaallg(' + (index + 1) + ').det';
that.executeRule(rule).then((res) => {
that.$refs.engpDialog.visiable = true;
that.$refs.engpDialog.formData = Object.assign(
......@@ -265,5 +271,4 @@ export default {
created: function () {},
};
</script>
<style>
</style>
<style></style>
......@@ -2,9 +2,9 @@ import Api from '~/service/Api';
export default {
async processGlentry(glentryRequest) {
//组数据,发post请求
const loading = this.loading('正在请求数据')
let rtnmsg = await Api.post('/service/gle/assertGle', glentryRequest);
let objtyp = glentryRequest.rec.objtyp;
let rtnmsg = await Api.post(`/service/${ objtyp.toLowerCase() }/gle/assertGle`, glentryRequest);
if (rtnmsg.respCode == SUCCESS) {
this.model.setmod.glemod.gleshwstm = rtnmsg.data.gleshwstm;
}
......
......@@ -6,50 +6,43 @@
</div>
</template>
<script>
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Api from '~/service/Api';
import commonProcess from '~/mixin/commonProcess';
import CodeTable from '~/config/CodeTable';
export default {
inject: ['root'],
mixins: [commonProcess],
props:["model","codes"],
data(){
props: ['model', 'codes'],
data() {
return {
columns: [
"2 1 \"借/贷\" 80 1 0",
"6 2 \"账号\" 200",
"3 3 \"币种\" 70",
"4 4 \"金额\" 150 2 8:1 2 5",
"5 5 \"起息日\" 150",
"7 6 \"牌价类型\" 100",
"8 7 \"牌价\" 100 2 0 1 0",
"9 8 \"会计科目\" 100",
"0 9 \"分录序号\" 100 1 0"
'2 1 "借/贷" 80 1 0',
'6 2 "账号" 200',
'3 3 "币种" 70',
'4 4 "金额" 150 2 8:1 2 5',
'5 5 "起息日" 150',
'7 6 "牌价类型" 100',
'8 7 "牌价" 100 2 0 1 0',
'9 8 "会计科目" 100',
'0 9 "分录序号" 100 1 0',
],
data: [
]
}
data: [],
};
},
watch: {
//this.$refs.glepan.stmData.data = res.data.setmod_glemod_gleshwstm.rows;
'model.setmod.glemod.gleshwstm': {
handler(val, oldVal) {
if (val.rows) {
this.data = val.rows
this.data = val.rows;
}
},
immediate: true
}
immediate: true,
},
methods:{
},
created:function(){
}
}
methods: {},
created: function () {},
};
</script>
<style>
</style>
<style></style>
import Api from '~/service/Api';
export default {
async processSetpan(setfegRequest, setglgRequest) {
async processSetpan(setfegRequest, fn) {
let loading = this.loading('正在请求试算费用');
let rtnmsg = await Api.post('/service/setmod/calcSettleDetail', setfegRequest);
if (rtnmsg.respCode == SUCCESS) {
let objtyp = setfegRequest.rec.objtyp;
let rtnmsg = await Api.post(`/service/${ objtyp.toLowerCase() }/setmod/calcSettleDetail`, setfegRequest);
if (rtnmsg.respCode === SUCCESS) {
this.model.setmod.setfeg = rtnmsg.data.setfeg;
this.model.setmod.ref = rtnmsg.data.ref;
this.model.setmod.doccur = rtnmsg.data.doccur;
this.model.setmod.docamt = rtnmsg.data.docamt;
// 试算账务
if (this.model.setmod.setfeg.setfel.length > 0) {
if (this.model.setmod.setfeg.setfel.length === 0) {
loading = this.loading('正在请求试算账务');
let res = await Api.post('/service/setmod/calcPayDetail', setglgRequest);
let setglgRequestParams = fn()
let res = await Api.post(`/service/${ objtyp.toLowerCase() }/setmod/calcPayDetail`, setglgRequestParams);
if (res.respCode == SUCCESS) {
this.model.setmod.setglg = res.data.setglg;
}
......
......@@ -273,7 +273,11 @@
<c-col :span="16">
<c-col :span="18">
<el-form-item label="费用">
<c-select v-model="dialog.cur" style="width: 100%" :code="codes.curtxt1">
<c-select
v-model="dialog.cur"
style="width: 100%"
:code="codes.curtxt1"
>
<!-- <el-option
v-for="item in codes.cur"
:key="item.value"
......@@ -461,7 +465,7 @@
<c-col :span="24" style="height: 24px; margin-top: 25px">
<el-form-item class="formItemLabel" label="结算:" label-width="48px">
<span style="color: red">{{
this.model.setmod.dspflg == "C" ? "temporary" : ""
this.model.setmod.dspflg == 'C' ? 'temporary' : ''
}}</span>
</el-form-item>
</c-col>
......@@ -510,7 +514,11 @@
</el-table-column>
<el-table-column label="处理方式" width="110px" prop="dsp">
<template #default="scope">
<c-select v-model="scope.row.dsp" @change="dspChange(scope.$index)" v-if="scope.row.debcdtflg=='D'">
<c-select
v-model="scope.row.dsp"
@change="dspChange(scope.$index)"
v-if="scope.row.debcdtflg == 'D'"
>
<el-option
v-for="item in codes.setgll_dsp2"
:key="item.value"
......@@ -523,7 +531,11 @@
}}</span>
</el-option>
</c-select>
<c-select v-model="scope.row.dsp" @change="dspChange(scope.$index)" v-if="scope.row.debcdtflg=='C'">
<c-select
v-model="scope.row.dsp"
@change="dspChange(scope.$index)"
v-if="scope.row.debcdtflg == 'C'"
>
<el-option
v-for="item in codes.setgll_dsp1"
:key="item.value"
......@@ -557,7 +569,6 @@
</template>
</el-table-column>
<el-table-column label="借/贷" prop="debcdtflg" width="70px">
</el-table-column>
<el-table-column label="原始币种" prop="cur" width="70px">
</el-table-column>
......@@ -1351,41 +1362,41 @@
</template>
<script>
// import Event from "~/model/Ditopn/Event";
import commonProcess from "~/mixin/commonProcess";
import SetpanDialog from "./dialog.vue";
import Utils from "~/utils/index";
import commonProcess from '~/mixin/commonProcess';
import SetpanDialog from './dialog.vue';
import Utils from '~/utils/index';
export default {
inject: ["root"],
inject: ['root'],
components: { SetpanDialog },
props: ["model", "codes"],
props: ['model', 'codes'],
mixins: [commonProcess],
data() {
return {
dialogVisible: false,
dialog: {
payee: "",
ptydbt: "",
txtpay: "",
txtdbt: "",
CG00005: "",
payee: '',
ptydbt: '',
txtpay: '',
txtdbt: '',
CG00005: '',
},
newdialog: {
payee: "",
ptydbt: "",
txtpay: "",
txtdbt: "",
CG00005: "",
payee: '',
ptydbt: '',
txtpay: '',
txtdbt: '',
CG00005: '',
},
dialog2: {
feetxtinf: "",
feetxt: "",
feetxtinf: '',
feetxt: '',
},
index: 0,
detpDialogVisible: false,
rattyp: "",
dcbrattyp: "",
scbrattyp: "",
rattyp: '',
dcbrattyp: '',
scbrattyp: '',
dialog3: {
setgrp: {
act: {
......@@ -1403,12 +1414,12 @@ export default {
};
},
watch: {
"model.setmod.setglg.setgll": {
'model.setmod.setglg.setgll': {
handler(val, oldVal) {
var stm = [];
for (let i = 0; i < val.length; i++) {
if (val[i].rol != "") {
val[i]["idx"] = i;
if (val[i].rol != '') {
val[i]['idx'] = i;
stm.push(val[i]);
}
}
......@@ -1442,7 +1453,7 @@ export default {
this.defaultFunction();
},
detail1(index, row) {
this.executeDefault("setfel.det").then((res) => {
this.executeDefault('setfel.det').then((res) => {
this.index = index;
this.dialogVisible = true;
this.dialog = row;
......@@ -1456,7 +1467,7 @@ export default {
// 第二个表格
detail2(index, row) {
const that = this;
const rule = "setmod.setfeg.setfel(" + (index + 1) + ").det";
const rule = 'setmod.setfeg.setfel(' + (index + 1) + ').det';
that.executeRule(rule).then((res) => {
that.index = index;
that.$refs.setpanDialog.visiable = true;
......@@ -1472,7 +1483,7 @@ export default {
},
async handleDetail(index, row) {
const that = this;
const rule = "setmod.setglg.setgll(" + (index + 1) + ").det";
const rule = 'setmod.setglg.setgll(' + (index + 1) + ').det';
let rtnmsg = await this.executeRule(rule);
if (rtnmsg.respCode == SUCCESS) {
that.index = index;
......@@ -1491,14 +1502,14 @@ export default {
}
},
strCalCode(str, code) {
var result = "";
var result = '';
for (let i = 0; i < code.length; i++) {
if (code[i].value === str) {
result = code[i].label;
continue;
}
}
if (result === "") {
if (result === '') {
return str;
} else {
return result;
......@@ -1511,22 +1522,22 @@ export default {
onSetgllCtysel() {},
onSetgllDetget() {},
async onSetmodDet() {
let rtnmsg = await this.executeRule("setmod.det");
let rtnmsg = await this.executeRule('setmod.det');
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
} else {
this.$notify.error({ title: "错误", message: "服务请求失败!" });
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
async accucrChange(index) {
let rtnmsg = await this.executeRule(
"setmod.setglg.setgll(" + (index + 1) + ").acccur"
'setmod.setglg.setgll(' + (index + 1) + ').acccur'
);
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
this.updateModel(rtnmsg.data);
this.$nextTick(() => {
this.executeRule("setmod.glemod.glepan").then((res) => {
this.executeRule('setmod.glemod.glepan').then((res) => {
//TODO 处理数据逻辑
if (res.respCode == SUCCESS) this.updateModel(res.data);
});
......@@ -1535,13 +1546,13 @@ export default {
},
async fmtaccamtChange(index) {
let rtnmsg = await this.executeRule(
"setmod.setglg.setgll(" + (index + 1) + ").fmtaccamt"
'setmod.setglg.setgll(' + (index + 1) + ').fmtaccamt'
);
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
this.updateModel(rtnmsg.data);
this.$nextTick(() => {
this.executeRule("setmod.glemod.glepan").then((res) => {
this.executeRule('setmod.glemod.glepan').then((res) => {
//TODO 处理数据逻辑
if (res.respCode == SUCCESS) this.updateModel(res.data);
});
......@@ -1550,13 +1561,13 @@ export default {
},
async dspChange(index) {
let rtnmsg = await this.executeDefault(
"setmod.setglg.setgll(" + (index + 1) + ").dsp"
'setmod.setglg.setgll(' + (index + 1) + ').dsp'
);
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
this.updateModel(rtnmsg.data);
this.$nextTick(() => {
this.executeRule("setmod.glemod.glepan").then((res) => {
this.executeRule('setmod.glemod.glepan').then((res) => {
//TODO 处理数据逻辑
if (res.respCode == SUCCESS) this.updateModel(res.data);
});
......@@ -1568,10 +1579,10 @@ export default {
computed: {
modifyflg: {
get() {
return this.dialog3.modifyflg === "X";
return this.dialog3.modifyflg === 'X';
},
set(val) {
this.dialog3.modifyflg = val ? "X" : "";
this.dialog3.modifyflg = val ? 'X' : '';
},
},
},
......
......@@ -6,6 +6,7 @@ import TagsView from "./TagsView"
import Transaction from "./Transaction";
import Vuex from 'vuex'
import Vue from 'vue'
import gitopn from './modules/gitopn.js'
Vue.use(Vuex)
......@@ -16,7 +17,8 @@ const store = new Vuex.Store({
Status: Status,
Swift: Swift,
TagsView: TagsView,
Transaction: Transaction
Transaction: Transaction,
gitopn
}
})
......
const store = {
state: {
toHandleRowData: {},
},
mutations: {
updateToHandleRowData(state, params) {
state.toBehandleRowData = params
}
}
}
export default store
<template>
<div>
<div style="height: 800px; overflow: auto">
<embed
v-if="this.model.docXML && pdf"
:src="pdf"
type="application/pdf"
height="100%"
width="100%"
/>
<c-row v-if="!this.model.docXML">
<c-col v-for="(item, index) in model.docTXT" :key="index" >
<c-col :offset="4" :span="8">
{{ item[0] }}
</c-col>
<c-col :span="12">
{{ item[1] }}
</c-col>
</c-col>
</c-row>
</div>
</div>
<div class="width: 100%;height: 100vh;overflow: auto;" ref="file"></div>
</template>
<script>
import { getPdf } from "~/service/business/file";
import { renderAsync } from 'docx-preview';
import Api from '~/service/Api';
import commonProcess from '~/mixin/commonProcess';
export default {
data() {
return {
model: { docXML: "" },
pdf: "",
model: { docXML: '' },
pdf: '',
};
},
created() {
let doclang= window.sessionStorage.doclang||"";
this.model.docXML = window.sessionStorage.docXML;
this.model.docTXT = window.sessionStorage.docTXT
.split("\r\n")
.filter((item) => item)
.map((item) => {
let idx = item.indexOf(":");
return [
item.substring(0, idx).trim(),
item.substring(idx + 1).trim(),
];
});
if (this.model.docXML != "")
getPdf({ xml: this.model.docXML, doclang: window.sessionStorage.docuil }).then((res) => {
mixins: [commonProcess],
mounted() {
this.loadWordBlob()
},
methods: {
async loadWordBlob () {
let routeQuery = this.$route.query
const params = {
index: routeQuery.idx,
};
let res = await Api.post('/service/gitopn/executeDocpan', this.wrapper(params));
if (res.respCode == SUCCESS) {
this.pdf ="data:application/pdf;base64,"+ res.data;
let base64Str = res.data.executeDocpan;
let bstr = window.atob(base64Str); // 解码 base-64 编码的字符串,base-64 编码使用方法是 btoa()
let length = bstr.length;
let u8arr = new Uint8Array(length); // 创建初始化为0的,包含length个元素的无符号整型数组
while (length--) {
u8arr[length] = bstr.charCodeAt(length); // 返回在指定的位置的字符的 Unicode 编码
}
let blob = new Blob([u8arr]);
renderAsync(blob, this.$refs.file)
}
}
}
});
},
};
</script>
<style scoped>
::v-deep .docx-wrapper {
width: 100%;
height: 100vh;
padding: 0;
overflow: auto;
}
</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