## v1.3.1 更新列表

1. 【修复】申请退款后积分等操作可能出现错误的问题
	2. 【修复】拼团支付可能出现支付错误的问题
	3. 【修复】退款申请后的订单流程优化和积分赠送的问题
	4. 【修复】回收站中的商品无法恢复的问题
	5. 【修复】一号通短信查询记录不完整的问题
	6. 【修复】用户管理批量加分组,标签的问题
	7. 【修复】积分日志搜索显示有误的问题
	8. 【修复】手动发送优惠券可能会出错的问题
	9. 【修复】核销订单创建在某种条件下会出错的问题
	10. 【修复】移动端商品详情,购物车等样式兼容问题
	11. 【修复】业务流程性的优化
This commit is contained in:
337031187
2021-01-19 10:16:45 +08:00
parent 3b8397e4b1
commit 81a16a76df
136 changed files with 19904 additions and 23329 deletions

View File

@@ -40,4 +40,42 @@ export function addTreeListLabelForCasCard(treeData, child) {
})
}
//加法函数,用来得到精确的加法结果
//说明javascript的加法结果会有误差在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。
//调用:$h.Add(arg1,arg2)
//返回值arg1加上arg2的精确结果
export function Add(arg1, arg2) {
arg2 = parseFloat(arg2);
var r1, r2, m;
try {
r1 = arg1.toString().split(".")[1].length
} catch (e) {
r1 = 0
}
try {
r2 = arg2.toString().split(".")[1].length
} catch (e) {
r2 = 0
}
m = Math.pow(100, Math.max(r1, r2));
return (this.Mul(arg1, m) + this.Mul(arg2, m)) / m;
}
//乘法函数,用来得到精确的乘法结果
//说明javascript的乘法结果会有误差在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。
//调用:$h.Mul(arg1,arg2)
//返回值arg1乘以arg2的精确结果
export function Mul(arg1, arg2) {
arg1 = parseFloat(arg1);
arg2 = parseFloat(arg2);
var m = 0,
s1 = arg1.toString(),
s2 = arg2.toString();
try {
m += s1.split(".")[1].length
} catch (e) {}
try {
m += s2.split(".")[1].length
} catch (e) {}
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
}

52
admin/src/utils/utils.js Normal file
View File

@@ -0,0 +1,52 @@
export default {// 设置选中的方法
// 记忆选择核心方法
changePageCoreRecordData: function (multipleSelectionAll, multipleSelection, tableData, successFn) {
// 标识当前行的唯一键的名称
const idKey = 'uid'
const that = this
// 如果总记忆中还没有选择的数据,那么就直接取当前页选中的数据,不需要后面一系列计算
if (multipleSelectionAll.length <= 0) {
multipleSelectionAll=multipleSelection
console.log(multipleSelectionAll)
successFn(multipleSelectionAll)
return
}
// 总选择里面的key集合
const selectAllIds = []
multipleSelectionAll.forEach(row => {
selectAllIds.push(row[idKey])
})
const selectIds = []
// 获取当前页选中的id
multipleSelection.forEach(row => {
selectIds.push(row[idKey])
// 如果总选择里面不包含当前页选中的数据,那么就加入到总选择集合里
if (selectAllIds.indexOf(row[idKey]) < 0) {
multipleSelectionAll.push(row)
console.log(multipleSelectionAll)
// successFn(multipleSelectionAll)
}
})
const noSelectIds = []
// 得到当前页没有选中的id
tableData.forEach(row => {
if (selectIds.indexOf(row[idKey]) < 0) {
noSelectIds.push(row[idKey])
}
})
noSelectIds.forEach(uid => {
if (selectAllIds.indexOf(uid) >= 0) {
for (let i = 0; i < multipleSelectionAll.length; i++) {
if (multipleSelectionAll[i][idKey] == uid) {
// 如果总选择中有未被选中的,那么就删除这条
multipleSelectionAll.splice(i, 1)
console.log(multipleSelectionAll)
//successFn(multipleSelectionAll)
break
}
}
}
})
successFn(multipleSelectionAll)
}
}