Commit 99d9841d by 袁成

Merge branch 'develop' of ssh://nvwa.jiuqi.com.cn:2222/GFP/RBC/rbc-frontend into develop-yuancheng

parents cf919340 0686fa40
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
"viewerjs": "^1.10.2", "viewerjs": "^1.10.2",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-router": "^3.2.0", "vue-router": "^3.2.0",
"vuex": "^3.4.0" "vuex": "^3.4.0",
"currency.js": "^1.2.2"
}, },
"files": [ "files": [
"dist", "dist",
......
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
GMS.$hideContainer.$Message.error('未找到下一节点的审批人'); GMS.$hideContainer.$Message.error('未找到下一节点的审批人');
}) })
} else { } else {
alert('缺少参数'); GMS.$hideContainer.$Message.error('缺少参数');
} }
}, },
executeApproval: function(bill, param) { executeApproval: function(bill, param) {
......
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
this.approval(bill, param); this.approval(bill, param);
} }
}else{ }else{
alert('缺少参数'); GMS.$hideContainer.$Message.error('缺少参数');
} }
}, },
approval: function(bill, param){ approval: function(bill, param){
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
style="width: 250px" style="width: 250px"
/> />
<div slot="footer"> <div slot="footer">
<Button type="primary" @click="asyncOK">确定</Button> <Button type="primary" :loading="loading" @click="asyncOK">确定</Button>
</div> </div>
</Modal> </Modal>
</div> </div>
...@@ -28,6 +28,7 @@ export default { ...@@ -28,6 +28,7 @@ export default {
draftModal: false, draftModal: false,
value: "", value: "",
billDefineName: null, billDefineName: null,
loading:false
}; };
}, },
mounted() {}, mounted() {},
...@@ -37,6 +38,7 @@ export default { ...@@ -37,6 +38,7 @@ export default {
this.$Message.info('请输入草稿名称'); this.$Message.info('请输入草稿名称');
return return
} }
this.loading = true;
//掉接口保存当前json 和value //掉接口保存当前json 和value
let obj = { let obj = {
billDefineName: this.billDefineName, billDefineName: this.billDefineName,
...@@ -51,6 +53,7 @@ export default { ...@@ -51,6 +53,7 @@ export default {
}) })
.then( .then(
function (data, textStatus, response) { function (data, textStatus, response) {
this.loading = false;
if(data.code == 0){ if(data.code == 0){
this.$Message.info("保存成功"); this.$Message.info("保存成功");
this.draftModal = false; this.draftModal = false;
...@@ -60,6 +63,7 @@ export default { ...@@ -60,6 +63,7 @@ export default {
}.bind(this) }.bind(this)
) )
.catch((XMLHttpRequest, textStatus, errorThrown) => { .catch((XMLHttpRequest, textStatus, errorThrown) => {
this.loading = false;
}); });
}, },
}, },
......
...@@ -8,14 +8,12 @@ ...@@ -8,14 +8,12 @@
class-name="yc" class-name="yc"
> >
<Table <Table
width="100%"
:height="maxHeight" :height="maxHeight"
border border
:columns="columns" :columns="columns"
:data="queryData" :data="queryData"
ref="table" ref="table"
style="height:100%" style="height:100%">
>
<template slot-scope="{ row }" slot="name"> <template slot-scope="{ row }" slot="name">
{{ row.name }} {{ row.name }}
</template> </template>
...@@ -52,7 +50,7 @@ ...@@ -52,7 +50,7 @@
style="width: 250px" style="width: 250px"
/> />
<div slot="footer"> <div slot="footer">
<Button type="primary" @click="asyncOK">确定</Button> <Button type="primary" :loading="loading" @click="asyncOK">确定</Button>
</div> </div>
</Modal> </Modal>
</div> </div>
...@@ -77,6 +75,7 @@ export default { ...@@ -77,6 +75,7 @@ export default {
templateName: "", templateName: "",
queryData: [], queryData: [],
currentId: null, currentId: null,
loading:false,
columns: [ columns: [
{ {
title: "草稿名称", title: "草稿名称",
...@@ -148,6 +147,7 @@ export default { ...@@ -148,6 +147,7 @@ export default {
title: this.value, title: this.value,
id: this.currentId, id: this.currentId,
}; };
this.loading = true;
GAMS.Util.invokeServer({ GAMS.Util.invokeServer({
path: "rbcfunc/billdraft/update", path: "rbcfunc/billdraft/update",
type: "POST", type: "POST",
...@@ -156,6 +156,7 @@ export default { ...@@ -156,6 +156,7 @@ export default {
}) })
.then( .then(
function (data, textStatus, response) { function (data, textStatus, response) {
this.loading = false;
if(data.code == 0){ if(data.code == 0){
this.getList(); this.getList();
this.draftModal = false; this.draftModal = false;
...@@ -164,7 +165,9 @@ export default { ...@@ -164,7 +165,9 @@ export default {
} }
}.bind(this) }.bind(this)
) )
.catch((XMLHttpRequest, textStatus, errorThrown) => {}); .catch((XMLHttpRequest, textStatus, errorThrown) => {
this.loading = false;
});
}, },
showData(row) { showData(row) {
let billObj = this.bill.getBuillData(); let billObj = this.bill.getBuillData();
...@@ -223,16 +226,10 @@ export default { ...@@ -223,16 +226,10 @@ export default {
}, },
convertOnlyReadBillDefine(billDefine){ convertOnlyReadBillDefine(billDefine){
// 解决遗留问题,接待单子的只读界面标识特殊处理 // 解决遗留问题,接待单子的只读界面标识特殊处理
let temp = billDefine if (billDefine == 'bill.JDHDFYZCDJD') {
if (temp) { billDefine = 'bill.JDHDFYZC';
switch(temp){
case 'bill.JDHDFYZCDJD':
temp = 'bill.JDHDFYZC';
break;
default:
}
} }
return temp return billDefine
} }
}, },
}; };
......
...@@ -1303,7 +1303,8 @@ export default { ...@@ -1303,7 +1303,8 @@ export default {
}, },
"description": "", "description": "",
"title": "查看详情[showDetailAction]", "title": "查看详情[showDetailAction]",
"value": "showDetailAction" "value": "showDetailAction",
"alwaysUse":true
}, },
{ {
"discard": false, "discard": false,
...@@ -1574,7 +1575,8 @@ export default { ...@@ -1574,7 +1575,8 @@ export default {
}, },
"description": "", "description": "",
"title": "编辑常用审批意见", "title": "编辑常用审批意见",
"value": "approvalEditModalOpen" "value": "approvalEditModalOpen",
"alwaysUse":true
}, },
{ {
"discard": false, "discard": false,
...@@ -1636,7 +1638,8 @@ export default { ...@@ -1636,7 +1638,8 @@ export default {
}, },
"description": "", "description": "",
"title": "添加常用审批意见", "title": "添加常用审批意见",
"value": "approvalMessageAdd" "value": "approvalMessageAdd",
"alwaysUse":true
}, },
{ {
"discard": false, "discard": false,
......
import _ from "./FormulaConstants"; import _ from "./FormulaConstants";
import currency from "./currencyUtil.js" import currency from 'currency.js/dist/currency.js'
/** /**
* 金额比较公式 * 金额比较公式
* 比较左右两个操作数是否相等 参数可以是返回值类型为number的公式 * 比较左右两个操作数是否相等 参数可以是返回值类型为number的公式
......
...@@ -63,7 +63,6 @@ export default { ...@@ -63,7 +63,6 @@ export default {
var decimalNum; //金额小数部分 var decimalNum; //金额小数部分
//输出的中文金额字符串 //输出的中文金额字符串
var chineseStr = ''; var chineseStr = '';
var parts; //分离金额后用的数组,预定义
if (money == '') { return ''; } if (money == '') { return ''; }
money = parseFloat(money); money = parseFloat(money);
...@@ -85,8 +84,8 @@ export default { ...@@ -85,8 +84,8 @@ export default {
if (parseInt(integerNum, 10) > 0) { if (parseInt(integerNum, 10) > 0) {
var zeroCount = 0; var zeroCount = 0;
var IntLen = integerNum.length; var IntLen = integerNum.length;
for (var i = 0; i < IntLen; i++) { for (let i = 0; i < IntLen; i++) {
var n = integerNum.substr(i, 1); let n = integerNum.substr(i, 1);
var p = IntLen - i - 1; var p = IntLen - i - 1;
var q = p / 4; var q = p / 4;
var m = p % 4; var m = p % 4;
...@@ -109,8 +108,8 @@ export default { ...@@ -109,8 +108,8 @@ export default {
//小数部分 //小数部分
if (decimalNum != '') { if (decimalNum != '') {
var decLen = decimalNum.length; var decLen = decimalNum.length;
for (var i = 0; i < decLen; i++) { for (let i = 0; i < decLen; i++) {
var n = decimalNum.substr(i, 1); let n = decimalNum.substr(i, 1);
if (n != '0') { if (n != '0') {
if(decLen == 1){ if(decLen == 1){
chineseStr += cnNums[Number(n)] + cnDecUnits[i+1]; chineseStr += cnNums[Number(n)] + cnDecUnits[i+1];
......
/*!
* currency.js - v2.0.4
* http://scurker.github.io/currency.js
*
* Copyright (c) 2021 Jason Wilson
* Released under MIT license
*/
'use strict';
var defaults = {
symbol: '$',
separator: ',',
decimal: '.',
errorOnInvalid: false,
precision: 2,
pattern: '!#',
negativePattern: '-!#',
format: format,
fromCents: false
};
var round = function round(v) {
return Math.round(v);
};
var pow = function pow(p) {
return Math.pow(10, p);
};
var rounding = function rounding(value, increment) {
return round(value / increment) * increment;
};
var groupRegex = /(\d)(?=(\d{3})+\b)/g;
var vedicRegex = /(\d)(?=(\d\d)+\d\b)/g;
/**
* Create a new instance of currency.js
* @param {number|string|currency} value
* @param {object} [opts]
*/
function currency(value, opts) {
var that = this;
if (!(that instanceof currency)) {
return new currency(value, opts);
}
var settings = Object.assign({}, defaults, opts),
precision = pow(settings.precision),
v = parse(value, settings);
that.intValue = v;
that.value = v / precision; // Set default incremental value
settings.increment = settings.increment || 1 / precision; // Support vedic numbering systems
// see: https://en.wikipedia.org/wiki/Indian_numbering_system
if (settings.useVedic) {
settings.groups = vedicRegex;
} else {
settings.groups = groupRegex;
} // Intended for internal usage only - subject to change
this.s = settings;
this.p = precision;
}
function parse(value, opts) {
var useRounding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
var v = 0,
decimal = opts.decimal,
errorOnInvalid = opts.errorOnInvalid,
decimals = opts.precision,
fromCents = opts.fromCents,
precision = pow(decimals),
isNumber = typeof value === 'number',
isCurrency = value instanceof currency;
if (isCurrency && fromCents) {
return value.intValue;
}
if (isNumber || isCurrency) {
v = isCurrency ? value.value : value;
} else if (typeof value === 'string') {
var regex = new RegExp('[^-\\d' + decimal + ']', 'g'),
decimalString = new RegExp('\\' + decimal, 'g');
v = value.replace(/\((.*)\)/, '-$1') // allow negative e.g. (1.99)
.replace(regex, '') // replace any non numeric values
.replace(decimalString, '.'); // convert any decimal values
v = v || 0;
} else {
if (errorOnInvalid) {
throw Error('Invalid Input');
}
v = 0;
}
if (!fromCents) {
v *= precision; // scale number to integer value
v = v.toFixed(4); // Handle additional decimal for proper rounding.
}
return useRounding ? round(v) : v;
}
/**
* Formats a currency object
* @param currency
* @param {object} [opts]
*/
function format(currency, settings) {
var pattern = settings.pattern,
negativePattern = settings.negativePattern,
symbol = settings.symbol,
separator = settings.separator,
decimal = settings.decimal,
groups = settings.groups,
split = ('' + currency).replace(/^-/, '').split('.'),
dollars = split[0],
cents = split[1];
return (currency.value >= 0 ? pattern : negativePattern).replace('!', symbol).replace('#', dollars.replace(groups, '$1' + separator) + (cents ? decimal + cents : ''));
}
currency.prototype = {
/**
* Adds values together.
* @param {number} number
* @returns {currency}
*/
add: function add(number) {
var intValue = this.intValue,
_settings = this.s,
_precision = this.p;
return currency((intValue += parse(number, _settings)) / (_settings.fromCents ? 1 : _precision), _settings);
},
/**
* Subtracts value.
* @param {number} number
* @returns {currency}
*/
subtract: function subtract(number) {
var intValue = this.intValue,
_settings = this.s,
_precision = this.p;
return currency((intValue -= parse(number, _settings)) / (_settings.fromCents ? 1 : _precision), _settings);
},
/**
* Multiplies values.
* @param {number} number
* @returns {currency}
*/
multiply: function multiply(number) {
var intValue = this.intValue,
_settings = this.s;
return currency((intValue *= number) / (_settings.fromCents ? 1 : pow(_settings.precision)), _settings);
},
/**
* Divides value.
* @param {number} number
* @returns {currency}
*/
divide: function divide(number) {
var intValue = this.intValue,
_settings = this.s;
return currency(intValue /= parse(number, _settings, false), _settings);
},
/**
* Takes the currency amount and distributes the values evenly. Any extra pennies
* left over from the distribution will be stacked onto the first set of entries.
* @param {number} count
* @returns {array}
*/
distribute: function distribute(count) {
var intValue = this.intValue,
_precision = this.p,
_settings = this.s,
distribution = [],
split = Math[intValue >= 0 ? 'floor' : 'ceil'](intValue / count),
pennies = Math.abs(intValue - split * count),
precision = _settings.fromCents ? 1 : _precision;
for (; count !== 0; count--) {
var item = currency(split / precision, _settings); // Add any left over pennies
pennies-- > 0 && (item = item[intValue >= 0 ? 'add' : 'subtract'](1 / precision));
distribution.push(item);
}
return distribution;
},
/**
* Returns the dollar value.
* @returns {number}
*/
dollars: function dollars() {
return ~~this.value;
},
/**
* Returns the cent value.
* @returns {number}
*/
cents: function cents() {
var intValue = this.intValue,
_precision = this.p;
return ~~(intValue % _precision);
},
/**
* Formats the value as a string according to the formatting settings.
* @param {boolean} useSymbol - format with currency symbol
* @returns {string}
*/
format: function format(options) {
var _settings = this.s;
if (typeof options === 'function') {
return options(this, _settings);
}
return _settings.format(this, Object.assign({}, _settings, options));
},
/**
* Formats the value as a string according to the formatting settings.
* @returns {string}
*/
toString: function toString() {
var intValue = this.intValue,
_precision = this.p,
_settings = this.s;
return rounding(intValue / _precision, _settings.increment).toFixed(_settings.precision);
},
/**
* Value for JSON serialization.
* @returns {float}
*/
toJSON: function toJSON() {
return this.value;
}
};
module.exports = currency;
...@@ -23,12 +23,11 @@ export default { ...@@ -23,12 +23,11 @@ export default {
let arr = []; let arr = [];
let arrApi = []; let arrApi = [];
Promise.all(arrApi1).then((list) => { Promise.all(arrApi1).then((list) => {
list.forEach((v,i)=>{ list.forEach((res,i)=>{
let res = v;
if(res && res[subTable]){ if(res && res[subTable]){
res[subTable].forEach(v=>{ res[subTable].forEach(v=>{
let billDefine = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, ""); let billDefine1 = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
arrApi.push(that.searchBillObj(billDefine,v.BILLID,i)) arrApi.push(that.searchBillObj(billDefine1,v.BILLID,i))
}) })
} }
arr.push({//直接生成 arr.push({//直接生成
......
/* /*
* @Description:通用/单张生成 * @Description:通用/单张生成
*/ */
import axios from 'axios'
export default { export default {
execute(context, param) { execute(context, param) {
let subTable = param.subTable||'BXMXZB'; let subTable = param.subTable||'BXMXZB';
...@@ -23,12 +22,11 @@ export default { ...@@ -23,12 +22,11 @@ export default {
let arr = []; let arr = [];
let arrApi = []; let arrApi = [];
Promise.all(arrApi1).then((list) => { Promise.all(arrApi1).then((list) => {
list.forEach((v,i)=>{ list.forEach((res,i)=>{
let res = v;
if(res && res[subTable]){ if(res && res[subTable]){
res[subTable].forEach(v=>{ res[subTable].forEach(v=>{
let billDefine = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, ""); let billDefine1 = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
arrApi.push(that.searchBillObj(billDefine,v.BILLID,i)) arrApi.push(that.searchBillObj(billDefine1,v.BILLID,i))
}) })
} }
arr.push({//直接生成 arr.push({//直接生成
...@@ -54,15 +52,10 @@ export default { ...@@ -54,15 +52,10 @@ export default {
}) })
}, },
generateVoucher(list,context){ generateVoucher(list,context){
axios({ GMS.$http.post('/mechanismVchr/singleCreateVchr',{
          method: 'POST', data:list
          url:GMS.url+'/mechanismVchr/singleCreateVchr',//单张生成接口     }).then(res => {
          headers: {            if (res.status === 200) {
              Authorization:GMS.token,
          },
data:list
        }).then(res => {
          if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证 if(res.data.data.showVoucher){//展示凭证
GMS.vbus.$emit('previewVoucher',res.data.data); GMS.vbus.$emit('previewVoucher',res.data.data);
}else{ }else{
...@@ -76,13 +69,13 @@ export default { ...@@ -76,13 +69,13 @@ export default {
onOk: () => {}, onOk: () => {},
}); });
} }
          }            }
        })         })
}, },
searchBillObj(billDefine, billId, index) { searchBillObj(billDefine, billId, index) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
GMS.$http.get( GMS.$http.get(
`/gms/bill/${billDefine}/${billId}?withSubs=true` `/gms/bill/bill.${billDefine}/${billId}?withSubs=true`
).then((data) => { ).then((data) => {
if (data.status == 200 && data.data.code == 0) { if (data.status == 200 && data.data.code == 0) {
let obj = data.data.content let obj = data.data.content
......
...@@ -23,12 +23,11 @@ export default { ...@@ -23,12 +23,11 @@ export default {
let arr = []; let arr = [];
let arrApi = []; let arrApi = [];
Promise.all(arrApi1).then((list) => { Promise.all(arrApi1).then((list) => {
list.forEach((v,i)=>{ list.forEach((res,i)=>{
let res = v;
if(res && res[subTable]){ if(res && res[subTable]){
res[subTable].forEach(v=>{ res[subTable].forEach(v=>{
let billDefine = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, ""); let billDefine1 = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
arrApi.push(that.searchBillObj(billDefine,v.BILLID,i)) arrApi.push(that.searchBillObj(billDefine1,v.BILLID,i))
}) })
} }
arr.push({//直接生成 arr.push({//直接生成
......
/* /*
* @Description:通用/汇总生成 * @Description:通用/汇总生成
*/ */
import axios from 'axios'
export default { export default {
execute(context, param) { execute(context, param) {
let subTable = param.subTable||'BXMXZB'; let subTable = param.subTable||'BXMXZB';
...@@ -23,12 +22,11 @@ export default { ...@@ -23,12 +22,11 @@ export default {
let arr = []; let arr = [];
let arrApi = []; let arrApi = [];
Promise.all(arrApi1).then((list) => { Promise.all(arrApi1).then((list) => {
list.forEach((v,i)=>{ list.forEach((res,i)=>{
let res = v;
if(res && res[subTable]){ if(res && res[subTable]){
res[subTable].forEach(v=>{ res[subTable].forEach(v=>{
let billDefine = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, ""); let billDefine1 = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
arrApi.push(that.searchBillObj(billDefine,v.BILLID,i)) arrApi.push(that.searchBillObj(billDefine1,v.BILLID,i))
}) })
} }
arr.push({//直接生成 arr.push({//直接生成
...@@ -54,35 +52,30 @@ export default { ...@@ -54,35 +52,30 @@ export default {
}) })
}, },
generateVoucher(list,context){ generateVoucher(list,context){
axios({ GMS.$http.post('/mechanismVchr/combineCreateVchr',{
          method: 'POST', data:list
url:GMS.url+'/mechanismVchr/combineCreateVchr',//汇总生成     }).then(res => {
          headers: {           if (res.status === 200) {
              Authorization:GMS.token, if(res.data.data.showVoucher){//展示凭证
          }, GMS.vbus.$emit('previewVoucher',res.data.data);
data:list }else{
        }).then(res => { if(res.data.data.successVchrs && res.data.data.successVchrs.length > 0){
          if (res.status === 200) { GMS.vbus.$emit('custom-query-refresh');
if(res.data.data.showVoucher){//展示凭证 GMS.vbus.$emit('tab-count-refresh');
GMS.vbus.$emit('previewVoucher',res.data.data);
}else{
if(res.data.data.successVchrs && res.data.data.successVchrs.length > 0){
GMS.vbus.$emit('custom-query-refresh');
GMS.vbus.$emit('tab-count-refresh');
}
context.dom.$Modal.warning({
title: '信息提示',
content: res.data.data.processMsg,
onOk: () => {},
});
} }
          } context.dom.$Modal.warning({
        }) title: '信息提示',
content: res.data.data.processMsg,
onOk: () => {},
});
}
          }
        })
}, },
searchBillObj(billDefine, billId ,index) { searchBillObj(billDefine, billId ,index) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
GMS.$http.get( GMS.$http.get(
`/gms/bill/${billDefine}/${billId}?withSubs=true` `/gms/bill/bill.${billDefine}/${billId}?withSubs=true`
).then((data) => { ).then((data) => {
if (data.status == 200 && data.data.code == 0) { if (data.status == 200 && data.data.code == 0) {
let obj = data.data.content let obj = data.data.content
......
/* /*
* @Description:通用/撤销生成 * @Description:通用/撤销生成
*/ */
import axios from 'axios'
export default { export default {
execute(context, param) { execute(context, param) {
if (!param.billId || !param.billDefine) { if (!param.billId || !param.billDefine) {
...@@ -25,15 +24,10 @@ export default { ...@@ -25,15 +24,10 @@ export default {
that.deleteVchrAsync(arr,context); that.deleteVchrAsync(arr,context);
}, },
deleteVchrAsync(list,context){ deleteVchrAsync(list,context){
axios({ GMS.$http.post('/mechanismVchr/deleteVchr',{
          method: 'POST', data:list
          url:GMS.url+'/mechanismVchr/deleteVchr',//撤销凭证     }).then(res => {
          headers: {         if (res.status === 200) {
              Authorization:GMS.token,
          },
data:list
        }).then(res => {
          if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证 if(res.data.data.showVoucher){//展示凭证
GMS.vbus.$emit('previewVoucher',res.data.data); GMS.vbus.$emit('previewVoucher',res.data.data);
}else{ }else{
...@@ -48,6 +42,6 @@ export default { ...@@ -48,6 +42,6 @@ export default {
}); });
} }
          }           }
        })         })
} }
} }
\ No newline at end of file
...@@ -41,8 +41,8 @@ export default { ...@@ -41,8 +41,8 @@ export default {
        }).then(res => {         }).then(res => {
          if (res.status === 200) {           if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证 if(res.data.data.showVoucher){//展示凭证
let obj = res.data.data; let resObj = res.data.data;
obj.previewState = 'readonly'; resObj.previewState = 'readonly';
GMS.vbus.$emit('previewVoucher',res.data.data); GMS.vbus.$emit('previewVoucher',res.data.data);
}else{ }else{
context.dom.$Modal.warning({ context.dom.$Modal.warning({
......
/* /*
* @Description:通用/联查凭证 * @Description:通用/联查凭证
*/ */
import axios from 'axios'
export default { export default {
execute(context, param) { execute(context, param) {
if (!param.billId || !param.billDefine) { if (!param.billId || !param.billDefine) {
...@@ -31,18 +30,13 @@ export default { ...@@ -31,18 +30,13 @@ export default {
that.showVchrAsync(obj,context); that.showVchrAsync(obj,context);
}, },
showVchrAsync(obj,context){ showVchrAsync(obj,context){
axios({ GMS.$http.post('/mechanismVchr/showVchr',{
          method: 'POST', data:obj
          url:GMS.url+'/mechanismVchr/showVchr',//查看凭证     }).then(res => {
          headers: {         if (res.status === 200) {
              Authorization:GMS.token,
          },
data:obj
        }).then(res => {
          if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证 if(res.data.data.showVoucher){//展示凭证
let obj = res.data.data; let resObj = res.data.data;
obj.previewState = 'readonly'; resObj.previewState = 'readonly';
GMS.vbus.$emit('previewVoucher',res.data.data); GMS.vbus.$emit('previewVoucher',res.data.data);
}else{ }else{
context.dom.$Modal.warning({ context.dom.$Modal.warning({
...@@ -51,7 +45,7 @@ export default { ...@@ -51,7 +45,7 @@ export default {
onOk: () => {}, onOk: () => {},
}); });
} }
          }         }
        })     })
} }
} }
\ No newline at end of file
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
"less": "^4.1.1", "less": "^4.1.1",
"less-loader": "^7.3.0", "less-loader": "^7.3.0",
"node-sass": "^4.12.0", "node-sass": "^4.12.0",
"resize-observer-polyfill": "^1.5.1",
"sass-loader": "^8.0.2", "sass-loader": "^8.0.2",
"svg-sprite-loader": "^6.0.11", "svg-sprite-loader": "^6.0.11",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
...@@ -14099,8 +14100,8 @@ ...@@ -14099,8 +14100,8 @@
}, },
"node_modules/resize-observer-polyfill": { "node_modules/resize-observer-polyfill": {
"version": "1.5.1", "version": "1.5.1",
"resolved": "http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-public/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", "resolved": "http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-group/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ=", "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/resolve": { "node_modules/resolve": {
...@@ -29167,8 +29168,8 @@ ...@@ -29167,8 +29168,8 @@
}, },
"resize-observer-polyfill": { "resize-observer-polyfill": {
"version": "1.5.1", "version": "1.5.1",
"resolved": "http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-public/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", "resolved": "http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-group/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ=" "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
}, },
"resolve": { "resolve": {
"version": "1.20.0", "version": "1.20.0",
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"build-dev": "vue-cli-service build --mode development", "build-dev": "vue-cli-service build --mode development",
"build-dev-watch": "vue-cli-service build --mode development --watch",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
...@@ -32,6 +33,7 @@ ...@@ -32,6 +33,7 @@
"less": "^4.1.1", "less": "^4.1.1",
"less-loader": "^7.3.0", "less-loader": "^7.3.0",
"node-sass": "^4.12.0", "node-sass": "^4.12.0",
"resize-observer-polyfill": "^1.5.1",
"sass-loader": "^8.0.2", "sass-loader": "^8.0.2",
"svg-sprite-loader": "^6.0.11", "svg-sprite-loader": "^6.0.11",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
......
<template> <template>
<div <div
class="commonfunctions-card" class="commonfunctions-card"
@click="gotoQuery(item)"
> >
<div class="icon"> <div class="click-area" @click="gotoQuery(item)">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <div class="icon">
<title>{{item.function.title}}</title> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<use :xlink:href="`${item.icon}`"></use> <title>{{item.function.title}}</title>
</svg> <use :xlink:href="`${item.icon}`"></use>
</div> </svg>
<div class="title"> </div>
{{item.function.title}} <div class="title">
{{item.function.title}}
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -105,25 +106,30 @@ export default { ...@@ -105,25 +106,30 @@ export default {
background: #FFFFFF; background: #FFFFFF;
padding: 24px 16px 16px 16px; padding: 24px 16px 16px 16px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
cursor: pointer; .click-area {
.icon { height: 100%;
width: 46px; width: fit-content;
height: 46px; margin: 0 auto;
margin: 0 auto 12px auto; cursor: pointer;
svg { .icon {
width: 46px;
height: 46px;
margin: 0 auto 12px auto;
svg {
width: 100%;
height: 100%;
}
}
.title {
height: 20px;
font-size: 14px;
font-weight: 400;
color: #424242;
line-height: 20px;
width: 100%; width: 100%;
height: 100%; overflow: hidden;
text-overflow: ellipsis;
} }
} }
.title {
height: 20px;
font-size: 14px;
font-weight: 400;
color: #424242;
line-height: 20px;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
} }
</style> </style>
\ No newline at end of file
...@@ -2,35 +2,6 @@ ...@@ -2,35 +2,6 @@
<Collapse v-model="value1" class="property"> <Collapse v-model="value1" class="property">
<Panel name="1"> <Panel name="1">
列表设置 列表设置
<div slot="content">
<Form :label-width="80">
<FormItem label="每行图标数目">
<Input v-model="properties.rowIconNum" />
</FormItem>
</Form>
<Divider />
<div class="property-item" v-for="(config, index) in properties.configList" :key="index">
<Form :model="config" :label-width="80">
<FormItem label="功能">
<Select v-model="config.function" filterable>
<Option v-for="item in functionList" :value="item.id" :key="item.id">
{{item.title}}
</Option>
</Select>
</FormItem>
<FormItem label="图标">
<Select v-model="config.icon">
<Option v-for="item in iconList" :key="item.value" :value="item.value">
{{item.name}}
</Option>
</Select>
</FormItem>
</Form>
<Button size="small" type="error" @click="removeItem(index)">删除</Button>
<Divider />
</div>
<Button size="small" type="primary" @click="addItem">添加</Button>
</div>
</Panel> </Panel>
</Collapse> </Collapse>
</template> </template>
...@@ -38,17 +9,6 @@ ...@@ -38,17 +9,6 @@
<script> <script>
export default { export default {
watch: { watch: {
'properties.configList': {
handler(newVal) {
window.GMS.vbus.$emit('widgetPluginPropertiesChange', { id: this.type + this.id, properties: this.properties })
this.itemSetting.properties = this.properties
},
deep: true,
},
'properties.rowIconNum'() {
window.GMS.vbus.$emit('widgetPluginPropertiesChange', { id: this.type + this.id, properties: this.properties })
this.itemSetting.properties = this.properties
}
}, },
props: { props: {
itemSetting: { itemSetting: {
...@@ -62,40 +22,7 @@ export default { ...@@ -62,40 +22,7 @@ export default {
properties: { configList: [] }, properties: { configList: [] },
configList: [], configList: [],
functionList: [], functionList: [],
iconList: [
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_1',
name: '常用功能1',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_2',
name: '常用功能2',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_3',
name: '常用功能3',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_4',
name: '常用功能4',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_5',
name: '常用功能5',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_6',
name: '常用功能6',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_7',
name: '常用功能7',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng',
name: '常用功能8',
},
],
} }
}, },
computed: { computed: {
...@@ -130,13 +57,6 @@ export default { ...@@ -130,13 +57,6 @@ export default {
}, },
}, },
created() { created() {
window.GMS.util.nvwa.getRoutes().then((res) => {
this.addFunction(res.data.children)
})
let prop = this.itemSetting.properties
if (prop && prop.configList) {
this.properties = prop
}
}, },
} }
</script> </script>
......
<style>
</style>
<template> <template>
<div> <div>
<Form ref="formInline"> <Form ref="formInline">
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
:templateName="config.name" :templateName="config.name"
v-if="config.name" v-if="config.name"
:extrCondition="extrCondition" :extrCondition="extrCondition"
:tableHeight="tableHeight"
></gms-query> ></gms-query>
<p v-else>没有查询模板定义!</p> <p v-else>没有查询模板定义!</p>
</template> </template>
...@@ -18,8 +19,16 @@ export default { ...@@ -18,8 +19,16 @@ export default {
}, },
}, },
data() { data() {
let height = window.innerHeight - 245
if (window.osConfig.appOpenMode == 'apploader') {
height -= 32
}
if (window.osConfig.showAcctbookBar) {
height -= 32
}
return { return {
extrCondition: [], extrCondition: [],
tableHeight: height,
}; };
}, },
mounted() { mounted() {
......
...@@ -7,7 +7,8 @@ const service = axios.create({ ...@@ -7,7 +7,8 @@ const service = axios.create({
}) })
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
config.headers.Authorization = nros.SDK.utils.getToken() let token = window.nros.SDK.utils.getToken();
config.headers.Authorization = token;
return config return config
}) })
......
...@@ -51,43 +51,51 @@ export default { ...@@ -51,43 +51,51 @@ export default {
window.GMS.vbus.$emit('tab-count-refresh'); window.GMS.vbus.$emit('tab-count-refresh');
}, },
async getCerSerName(){ async getCerSerName(){
const res = await getCertifyServiceName(); try {
if (res.data.content){ const res = await getCertifyServiceName();
this.certifyServiceName = res.data.content; if (res.data.content){
this.getNvwaCertifyData(this.certifyServiceName); this.certifyServiceName = res.data.content;
this.getNvwaCertifyData(this.certifyServiceName);
}
} catch (e) {
console.log(e)
} }
}, },
/** /**
* 获取认证服务url和token信息 * 获取认证服务url和token信息
*/ */
async getNvwaCertifyData (certifyServiceId) { async getNvwaCertifyData (certifyServiceId) {
let url = null; try {
const getCurrentUrl = await getCertifyServiceUrl(); let url = null;
const res = await getIdUrl(certifyServiceId); const getCurrentUrl = await getCertifyServiceUrl();
if(getCurrentUrl.data.content){ const res = await getIdUrl(certifyServiceId);
url = getCurrentUrl.data.content; if(getCurrentUrl.data.content){
}else{ url = getCurrentUrl.data.content;
url = res.data.url; }else{
} url = res.data.url;
if (url){ }
window.GMS.url = url; if (url){
const res1 = await getSso({ window.GMS.url = url;
appId: res.data.id, const res1 = await getSso({
location: '', appId: res.data.id,
params:''}) location: '',
if (res1.data.success){ params:''})
let num = res1.data.data.lastIndexOf('?'); if (res1.data.success){
let urlStr = res1.data.data.substring(num); let num = res1.data.data.lastIndexOf('?');
const { status, data:data1 } = await axios({ let urlStr = res1.data.data.substring(num);
method: 'GET', const { status, data:data1 } = await axios({
url: url + 'nvwa-login-sso/sso/login'+urlStr, method: 'GET',
}) url: url + 'nvwa-login-sso/sso/login'+urlStr,
if (status === 200) { })
if (data1.success) { if (status === 200) {
window.GMS.token = data1.token; if (data1.success) {
window.GMS.token = data1.token;
}
} }
} }
} }
} catch (e) {
console.log(e)
} }
}, },
handleTag(name) { handleTag(name) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "nvwa", "name": "nvwa",
"index": { "index": {
"name": "@gms/gms-entry", "name": "@gms/gms-entry",
"version": "0.2.90-rbc" "version": "latest"
}, },
"login": { "login": {
"name": "@rbc/rbc-login", "name": "@rbc/rbc-login",
......
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