|
@@ -5342,7 +5342,8 @@ const BZhandle_rcl = (val) => {
|
|
|
}
|
|
}
|
|
|
formDatas_rcl.value.code8 = currentBz_rcl.value[9].split(' ')[0];
|
|
formDatas_rcl.value.code8 = currentBz_rcl.value[9].split(' ')[0];
|
|
|
formDatas_rcl.value.name8 = currentBz_rcl.value[9].split(' ')[1]
|
|
formDatas_rcl.value.name8 = currentBz_rcl.value[9].split(' ')[1]
|
|
|
- formDatas_rcl.value.percentage8 = parseFloat(currentBz_rcl.value[9].split(' ')[2].split('(')[1].split(')')[0])/100
|
|
|
|
|
|
|
+ formDatas_rcl.value.percentage8 = Math.round((parseFloat(currentBz_rcl.value[9].split(' ')[2].split('(')[1].split(')')[0]) / 100 * 10000)) / 10000;
|
|
|
|
|
+
|
|
|
for (let i = 1; i <= Math.min(Object.keys(currentBz_rcl.value).length - 5, 6); i++) {
|
|
for (let i = 1; i <= Math.min(Object.keys(currentBz_rcl.value).length - 5, 6); i++) {
|
|
|
sczl_bhkey_rcl = `code${i}`
|
|
sczl_bhkey_rcl = `code${i}`
|
|
|
sczl_namekey_rcl = `name${i}`
|
|
sczl_namekey_rcl = `name${i}`
|
|
@@ -5352,7 +5353,7 @@ const BZhandle_rcl = (val) => {
|
|
|
if(isNaN(parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
|
|
if(isNaN(parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
|
|
|
formDatas_rcl.value[percentagekey_rcl] = currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
|
|
formDatas_rcl.value[percentagekey_rcl] = currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
|
|
|
}else{
|
|
}else{
|
|
|
- formDatas_rcl.value[percentagekey_rcl] = parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0])/100;
|
|
|
|
|
|
|
+ formDatas_rcl.value[percentagekey_rcl] = Math.round((parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]) / 100 * 10000)) / 10000;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -5373,7 +5374,7 @@ const BZhandle_rcl = (val) => {
|
|
|
if(isNaN(parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
|
|
if(isNaN(parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
|
|
|
formDatas_rcl.value[percentagekey_rcl] = currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
|
|
formDatas_rcl.value[percentagekey_rcl] = currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
|
|
|
}else{
|
|
}else{
|
|
|
- formDatas_rcl.value[percentagekey_rcl] = parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0])/100;
|
|
|
|
|
|
|
+ formDatas_rcl.value[percentagekey_rcl] = Math.round((parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]) / 100 * 10000)) / 10000;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -5774,14 +5775,14 @@ const fpsum2 = ref();
|
|
|
//自动计算分配系数和
|
|
//自动计算分配系数和
|
|
|
function updateTotal() {
|
|
function updateTotal() {
|
|
|
//机台班组维护中分配系数字段
|
|
//机台班组维护中分配系数字段
|
|
|
- const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7',];
|
|
|
|
|
- const values = relevantKeys.map(key => Math.round(parseFloat(formDatas.value[key], 10) * 100) || 0); // 转换为整数
|
|
|
|
|
- const sum = values.reduce((sum, value) => sum + value, 0);
|
|
|
|
|
- fpsum.value = sum / 100;// 转换回小数
|
|
|
|
|
|
|
+ const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7'];
|
|
|
|
|
+ const values = relevantKeys.map(key => parseFloat(formDatas.value[key], 10) * 100 || 0); // 转换为百分比
|
|
|
|
|
+ const sum = values.reduce((sum, value) => sum + value, 0);
|
|
|
|
|
+ fpsum.value = sum / 100; // 转换回小数;
|
|
|
|
|
|
|
|
//修改中分配系数字段
|
|
//修改中分配系数字段
|
|
|
const relevantKeys2 = ['组员1', '组员2','组员3','组员4','组员5','组员6','组员7','组员8','组员9',];
|
|
const relevantKeys2 = ['组员1', '组员2','组员3','组员4','组员5','组员6','组员7','组员8','组员9',];
|
|
|
- const valuess = relevantKeys2.map(key => Math.round(parseFloat(formdata3.value[key]['比例'], 10) * 100) || 0);
|
|
|
|
|
|
|
+ const valuess = relevantKeys2.map(key => parseFloat(formdata3.value[key]['比例'], 10) * 100 || 0);
|
|
|
const sum2 = valuess.reduce((sum, value) => sum + value, 0);
|
|
const sum2 = valuess.reduce((sum, value) => sum + value, 0);
|
|
|
fpsum2.value = sum2 / 100; // 转换回小数
|
|
fpsum2.value = sum2 / 100; // 转换回小数
|
|
|
}
|
|
}
|
|
@@ -6164,6 +6165,7 @@ const BZhandle = (val) => {
|
|
|
let sczl_bhkey = ''
|
|
let sczl_bhkey = ''
|
|
|
let sczl_namekey = ''
|
|
let sczl_namekey = ''
|
|
|
let percentagekey = ''
|
|
let percentagekey = ''
|
|
|
|
|
+ console.log(currentBz.value)
|
|
|
if (currentBz.value[9]) {
|
|
if (currentBz.value[9]) {
|
|
|
for (let i = 1; i <= 9; i++) {
|
|
for (let i = 1; i <= 9; i++) {
|
|
|
sczl_bhkey = `code${i}`
|
|
sczl_bhkey = `code${i}`
|
|
@@ -6175,7 +6177,7 @@ const BZhandle = (val) => {
|
|
|
}
|
|
}
|
|
|
formDatas.value.code8 = currentBz.value[9].split(' ')[0];
|
|
formDatas.value.code8 = currentBz.value[9].split(' ')[0];
|
|
|
formDatas.value.name8 = currentBz.value[9].split(' ')[1]
|
|
formDatas.value.name8 = currentBz.value[9].split(' ')[1]
|
|
|
- formDatas.value.percentage8 = parseFloat(currentBz.value[9].split(' ')[2].split('(')[1].split(')')[0])/100
|
|
|
|
|
|
|
+ formDatas.value.percentage8 = Math.round((parseFloat(currentBz.value[9].split(' ')[2].split('(')[1].split(')')[0]) / 100 * 10000)) / 10000;
|
|
|
for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length - 5, 6); i++) {
|
|
for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length - 5, 6); i++) {
|
|
|
sczl_bhkey = `code${i}`
|
|
sczl_bhkey = `code${i}`
|
|
|
sczl_namekey = `name${i}`
|
|
sczl_namekey = `name${i}`
|
|
@@ -6185,7 +6187,7 @@ const BZhandle = (val) => {
|
|
|
if(isNaN(parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
|
|
if(isNaN(parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
|
|
|
formDatas.value[percentagekey] = currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
|
|
formDatas.value[percentagekey] = currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
|
|
|
}else{
|
|
}else{
|
|
|
- formDatas.value[percentagekey] = parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0])/100;
|
|
|
|
|
|
|
+ formDatas.value[percentagekey] = Math.round((parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]) / 100 * 10000)) / 10000;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -6206,7 +6208,7 @@ const BZhandle = (val) => {
|
|
|
if(isNaN(parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
|
|
if(isNaN(parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
|
|
|
formDatas.value[percentagekey] = currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
|
|
formDatas.value[percentagekey] = currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
|
|
|
}else{
|
|
}else{
|
|
|
- formDatas.value[percentagekey] = parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0])/100;
|
|
|
|
|
|
|
+ formDatas.value[percentagekey] = Math.round((parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]) / 100 * 10000)) / 10000;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|