Commit f65a8f7a authored by 朱彩云's avatar 朱彩云

Merge branch 'func_eccs_2801' into 'master'

ECCs-2801:账单列表增加是否已回款查询条件

See merge request !88
parents a476fbc4 c54ee8e6
This source diff could not be displayed because it is too large. You can view the blob instead.
import Vue from "vue";
import Vue from 'vue'
import {
Row,
Col,
......@@ -12,6 +12,7 @@ import {
DatePicker,
Input,
InputNumber,
Checkbox,
Radio,
upload,
Button,
......@@ -25,7 +26,7 @@ import {
Tooltip,
Popover,
Empty
} from "ant-design-vue";
} from 'ant-design-vue'
export default () => {
let els = [
......@@ -41,6 +42,7 @@ export default () => {
DatePicker,
Input,
InputNumber,
Checkbox,
Radio,
upload,
Button,
......@@ -54,13 +56,13 @@ export default () => {
Tooltip,
Popover,
Empty
];
]
// 注册
els.forEach((item) => {
Vue.use(item);
});
Vue.use(item)
})
// 全局提示
Vue.prototype.$msg = notification;
Vue.prototype.$message = message;
Vue.prototype.$modal = Modal;
};
Vue.prototype.$msg = notification
Vue.prototype.$message = message
Vue.prototype.$modal = Modal
}
......@@ -4,62 +4,67 @@
export function arrToObj(arr) {
// 参数必须是一个数组
if (!Array.isArray(arr)) {
throw new Error("type err: arr 必须是一个数组");
throw new Error('type err: arr 必须是一个数组')
}
// 存放返回结果
const obj = {};
const obj = {}
arr.map((item) => {
obj[Object.keys(item)[0]] = item[Object.keys(item)[0]];
});
return obj;
obj[Object.keys(item)[0]] = item[Object.keys(item)[0]]
})
return obj
}
/*
* 文件流转换为url
* @params file 文件流
* @return url
*/
* 文件流转换为url
* @params file 文件流
* @return url
*/
export function getObjectURL(file) {
console.log(file)
let url = null;
if (window.createObjectURL != undefined) { // basic
url = window.createObjectURL(file);
} else if (window.webkitURL != undefined) { // webkit or chrome
url = window.webkitURL.createObjectURL(file);
} else if (window.URL != undefined) { // mozilla(firefox)
url = window.URL.createObjectURL(file);
}
return url;
let url = null
if (window.createObjectURL != undefined) {
// basic
url = window.createObjectURL(file)
} else if (window.webkitURL != undefined) {
// webkit or chrome
url = window.webkitURL.createObjectURL(file)
} else if (window.URL != undefined) {
// mozilla(firefox)
url = window.URL.createObjectURL(file)
}
return url
}
/**
* @description 文件下载(兼容IE)
* @param {Object} response options 接口响应的数据 包括文件流及保文信息
* @param {String} file_name 文件名称
* @returns {undefined} undefined
*/
export function downloadFile(response, file_name = "ExportFile") {
const fileType = response.headers["content-type"] || "application/pdf";
const disposition = response.headers["content-disposition"]
* @description 文件下载(兼容IE)
* @param {Object} response options 接口响应的数据 包括文件流及保文信息
* @param {String} file_name 文件名称
* @returns {undefined} undefined
*/
export function downloadFile(response, file_name = 'ExportFile') {
const fileType = response.headers['content-type'] || 'application/pdf'
const disposition = response.headers['content-disposition']
if (disposition) {
file_name = disposition.split("filename=")[1]
file_name = disposition.split('filename=')[1]
}
const blob = new Blob([response.data], { type: `${fileType};charset=utf-8` });
const blob = new Blob([response.data], { type: `${fileType};charset=utf-8` })
const ie = navigator.userAgent.match(/MSIE\s([\d.]+)/),
ie11 = navigator.userAgent.match(/Trident\/7.0/) && navigator.userAgent.match(/rv:11/),
ie11 =
navigator.userAgent.match(/Trident\/7.0/) &&
navigator.userAgent.match(/rv:11/),
ieEDGE = navigator.userAgent.match(/Edge/g),
ieVer = ie ? ie[1] : ie11 ? 11 : ieEDGE ? 12 : -1;
ieVer = ie ? ie[1] : ie11 ? 11 : ieEDGE ? 12 : -1
if (ie && ieVer < 10) {
this.message.error('No blobs on IE<10');
return;
this.message.error('No blobs on IE<10')
return
}
if (ieVer > -1) {
window.navigator.msSaveBlob(blob, file_name);
window.navigator.msSaveBlob(blob, file_name)
return {}
} else {
const url = window.URL.createObjectURL(blob);
const url = window.URL.createObjectURL(blob)
return {
url,
file_name
......@@ -70,17 +75,17 @@ export function downloadFile(response, file_name = "ExportFile") {
//导出excel
export function exportFile(res, file_name) {
let blob = new Blob([res.data], {
type:"application/vnd.ms-excel;charset=utf-8"
});
let url=window.URL.createObjectURL(blob);
let aLink=document.createElement("a");
aLink.style.display="none";
aLink.href=url;
aLink.setAttribute("download", file_name);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink);
window.URL.revokeObjectURL(url);
type: 'application/vnd.ms-excel;charset=utf-8'
})
let url = window.URL.createObjectURL(blob)
let aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', file_name)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink)
window.URL.revokeObjectURL(url)
}
export const numValid = /^([1-9][0-9]*|0)([.][0-9]+)?$/
......@@ -88,13 +93,13 @@ export const numValid = /^([1-9][0-9]*|0)([.][0-9]+)?$/
// 对象转换成query字符串
export const toQuery = (params) => {
if (!params) {
return "";
return ''
}
let query = [];
let query = []
for (let i in params) {
query.push(`${i}=${params[i]}`);
query.push(`${i}=${encodeURIComponent(params[i])}`)
}
return query.join("&");
return query.join('&')
}
// 数值计算
export const accuracy = {
......@@ -103,104 +108,107 @@ export const accuracy = {
var t1 = 0,
t2 = 0,
r1,
r2;
r2
try {
t1 = arg1.toString().split('.')[1].length;
} catch(e) {
console.log(e);
t1 = arg1.toString().split('.')[1].length
} catch (e) {
console.log(e)
}
try {
t2 = arg2.toString().split('.')[1].length;
} catch(e) {
console.log(e);
t2 = arg2.toString().split('.')[1].length
} catch (e) {
console.log(e)
}
if(Math) {
r1 = Number(arg1.toString().replace('.', ''));
r2 = Number(arg2.toString().replace('.', ''));
return this.multiply(r1 / r2, Math.pow(10, t2 - t1));
if (Math) {
r1 = Number(arg1.toString().replace('.', ''))
r2 = Number(arg2.toString().replace('.', ''))
return this.multiply(r1 / r2, Math.pow(10, t2 - t1))
}
},
multiply(arg1, arg2) {
//乘法
var m = 0,
s1 = arg1.toString(),
s2 = arg2.toString();
s2 = arg2.toString()
try {
m += s1.split('.')[1].length;
} catch(e) {
m += s1.split('.')[1].length
} catch (e) {
console.log(e)
}
try {
m += s2.split('.')[1].length;
} catch(e) {
m += s2.split('.')[1].length
} catch (e) {
console.log(e)
}
return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m);
return (
(Number(s1.replace('.', '')) * Number(s2.replace('.', ''))) /
Math.pow(10, m)
)
},
add(arg1, arg2) {
//加法
var r1, r2, m;
var r1, r2, m
try {
r1 = arg1.toString().split('.')[1].length;
} catch(e) {
r1 = 0;
r1 = arg1.toString().split('.')[1].length
} catch (e) {
r1 = 0
}
try {
r2 = arg2.toString().split('.')[1].length;
} catch(e) {
r2 = 0;
r2 = arg2.toString().split('.')[1].length
} catch (e) {
r2 = 0
}
m = Math.pow(10, Math.max(r1, r2));
m = Math.pow(10, Math.max(r1, r2))
console.log(this.multiply(arg1, m), this.multiply(arg2, m))
return(this.multiply(arg1, m) + this.multiply(arg2, m)) / m;
return (this.multiply(arg1, m) + this.multiply(arg2, m)) / m
},
subtract(arg1, arg2) {
//减法
var r1, r2, m, n;
var r1, r2, m, n
try {
r1 = arg1.toString().split('.')[1].length;
} catch(e) {
r1 = 0;
r1 = arg1.toString().split('.')[1].length
} catch (e) {
r1 = 0
}
try {
r2 = arg2.toString().split('.')[1].length;
} catch(e) {
r2 = 0;
r2 = arg2.toString().split('.')[1].length
} catch (e) {
r2 = 0
}
m = Math.pow(10, Math.max(r1, r2));
n = r1 >= r2 ? r1 : r2;
return((arg1 * m - arg2 * m) / m).toFixed(n);
m = Math.pow(10, Math.max(r1, r2))
n = r1 >= r2 ? r1 : r2
return ((arg1 * m - arg2 * m) / m).toFixed(n)
},
// 计算一个数组的总和
sum(arr) {
let result = 0;
arr.forEach(item => {
result = this.add(result, item);
let result = 0
arr.forEach((item) => {
result = this.add(result, item)
})
return result;
return result
},
// 计算一个数组的总和 fn是对每项数据的处理方式
sumBy(arr, fn) {
let result = 0;
arr.forEach(item => {
let val = item;
if(fn) {
let result = 0
arr.forEach((item) => {
let val = item
if (fn) {
val = fn(item)
}
result = this.add(result, val);
result = this.add(result, val)
})
return result;
return result
},
toCeil(num, p = 4) {
num = isNaN(num) ? 0 : num;
p = isNaN(p) ? 0 : p;
let precision = Math.pow(10, p);
return Math.ceil((num * precision).toFixed(1)) / precision;
num = isNaN(num) ? 0 : num
p = isNaN(p) ? 0 : p
let precision = Math.pow(10, p)
return Math.ceil((num * precision).toFixed(1)) / precision
},
toFloor(num, p = 4) {
num = isNaN(num) ? 0 : num;
p = isNaN(p) ? 0 : p;
let precision = Math.pow(10, p);
return Math.floor((num * precision).toFixed(1)) / precision;
num = isNaN(num) ? 0 : num
p = isNaN(p) ? 0 : p
let precision = Math.pow(10, p)
return Math.floor((num * precision).toFixed(1)) / precision
}
};
\ No newline at end of file
}
......@@ -222,7 +222,7 @@
:model="searchForm"
>
<a-row>
<a-col :lg="4" :sm="12">
<a-col :lg="6" :sm="12">
<a-form-model-item label="账单日期">
<a-range-picker
format="YYYY-MM-DD"
......@@ -232,7 +232,7 @@
/>
</a-form-model-item>
</a-col>
<a-col :lg="4" :sm="12">
<a-col :lg="6" :sm="12">
<a-form-model-item label="病历号">
<a-input
v-model="searchForm.mrnNo"
......@@ -242,7 +242,7 @@
/>
</a-form-model-item>
</a-col>
<a-col :lg="4" :sm="12">
<a-col :lg="6" :sm="12">
<a-form-model-item label="客户名称">
<a-input
v-model="searchForm.patientName"
......@@ -252,7 +252,7 @@
/>
</a-form-model-item>
</a-col>
<a-col :lg="4" :sm="12">
<a-col :lg="6" :sm="12">
<a-form-model-item
label="状态"
:labelCol="{ span: 7 }"
......@@ -273,7 +273,7 @@
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="4" :sm="12">
<a-col :lg="6" :sm="12">
<a-form-model-item label="账单编号">
<a-input
v-model="searchForm.receiptNo"
......@@ -283,6 +283,15 @@
/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12" v-if="activeKey1 === '1'">
<a-form-model-item label="" class="mar_l40">
<a-checkbox
:checked="searchForm.hasBack == 'Y'"
@change="($event) => changeHasBack($event)"
/>
<span class="lable">是否已回款</span>
</a-form-model-item>
</a-col>
<a-col class="flex-col" :lg="4" :sm="12">
<div>
<a-button type="primary" @click="searchData">
......@@ -463,7 +472,8 @@ export default {
searchForm: {
billDate: [],
mrnNo: '', // 病历号
patientName: '' // 客户名字
patientName: '', // 客户名字
hasBack: 'N'
},
savedStatus: false, //是否已保存
relatedList: [],
......@@ -592,24 +602,6 @@ export default {
const base = JSON.parse(JSON.stringify(this.columns))
const changeAmount = this.changeAmount
const delRecord = this.delRecord
// base[1] = {
// title: '账单状态',
// dataIndex: 'status',
// ellipsis: true,
// width: 100,
// fixed: 'left',
// customRender: (val, row) => {
// return (
// <span
// style={{
// color: row.staus == 2 ? 'red' : ''
// }}
// >
// {row.staus == 1 ? '有效' : row.staus == 2 ? '无效' : ''}
// </span>
// )
// }
// }
base[7] = {
title: '回款金额',
dataIndex: 'backAmount',
......@@ -746,7 +738,8 @@ export default {
this.searchForm = {
billDate: [],
mrnNo: '', // 病历号
patientName: '' // 客户名字
patientName: '', // 客户名字
hasBack: 'N'
}
}
},
......@@ -786,6 +779,11 @@ export default {
},
methods: {
moment,
// 切换是否已回款
changeHasBack(e) {
let val = e.target.checked
this.searchForm.hasBack = val ? 'Y' : 'N'
},
// 获取未清余额合计
getBackMoneyReportCount(params) {
this.$apis
......@@ -1217,6 +1215,14 @@ export default {
opacity: 0;
}
}
.lable {
margin-left: 10px;
font-weight: bold;
color: rgba(0, 0, 0, 0.85);
}
.mar_l40 {
margin-left: 60px;
}
.all-list_box {
height: calc(100vh - 400px);
overflow-y: auto;
......
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