diff --git a/fe/PDA/api/index.js b/fe/PDA/api/index.js
index 55613b8ce..0067792a5 100644
--- a/fe/PDA/api/index.js
+++ b/fe/PDA/api/index.js
@@ -1521,7 +1521,7 @@ export const getThirdLocationRequestDetail = (id) => request(
});
//三方库发料申请 完成
-export const thirdLocationRequestFinish = (id) => promise(
+export const thirdLocationRequestFinish = (id) => request(
devUrl + "/api/pda/store/third-location-request/complete/"+id, {
method: 'post',
data: {}
@@ -1529,14 +1529,14 @@ export const thirdLocationRequestFinish = (id) => promise(
//三方库发料申请 取消
-export const thirdLocationRequestCancel = (id) => promise(
+export const thirdLocationRequestCancel = (id) => request(
devUrl + "/api/pda/store/third-location-request/cancel/"+id, {
method: 'post',
data: {}
})
-//三方库发料申请 终止
-export const thirdLocationRequestClose = (id) => promise(
- devUrl + "/api/pda/job/third-location/close-job/"+id, {
+//三方库发料任务 终止
+export const thirdLocationRequestComplete = (id) => request(
+ devUrl + "/api/pda/job/third-location/Complete/"+id, {
method: 'post',
data: {}
})
@@ -1548,14 +1548,6 @@ export const getThirdLocationList = (params) => request(
data: params
});
-export const getThirdLocationList1 = (params) => request(
- devUrl + "/api/pda/job/third-location/list", {
- method: 'post',
- data: {"condition":{"filters":[]},"Sorting":"","SkipCount":0,"MaxResultCount":20}
- });
-
-
-
//根据Number 获取三方库收货任务
export const getThirdLocationJobByNumber = (number) => request(
@@ -1579,8 +1571,8 @@ export const cancelTakeThirdLocationJob = (id) => request(
});
//提交三方库收货任务
-export const finshThirdLocationJob = (id, params) => request(
- devUrl + "/api/pda/job/third-location/finish/" + id, { //
+export const finshThirdLocationJob = (params) => request(
+ devUrl + "/api/pda/job/third-location/ExecuteDetail", { //
data: params,
method: "post"
})
diff --git a/fe/PDA/common/basic.js b/fe/PDA/common/basic.js
index 830c9cc03..8246fc391 100644
--- a/fe/PDA/common/basic.js
+++ b/fe/PDA/common/basic.js
@@ -432,4 +432,23 @@ export function navigateBack(backIndex) {
} else {
history.back();
}
+}
+
+/**
+ * 深度克隆对象
+ * @param {*} target
+ */
+export function deepCopyData(target) {
+ // 克隆原始类型和null
+ if (!(target !== null && (typeof target === 'object' || typeof target === 'function'))) {
+ return target;
+ }
+
+ let cloneTarget = Array.isArray(target) ? [] : {};
+ // 克隆对象和数组
+ for (const key in target) {
+ cloneTarget[key] = deepCopyData(target[key]);
+ }
+
+ return cloneTarget;
}
\ No newline at end of file
diff --git a/fe/PDA/common/calc.js b/fe/PDA/common/calc.js
new file mode 100644
index 000000000..2b48e481d
--- /dev/null
+++ b/fe/PDA/common/calc.js
@@ -0,0 +1,17 @@
+/* 解决js计算精度问题 */
+import { Decimal } from 'decimal.js';//引入
+class Calc {
+ add(num1,num2) {
+ return new Decimal(num1).add(new Decimal(num2)).toNumber()
+ }
+ sub(num1,num2) {
+ return new Decimal(num1).sub(new Decimal(num2)).toNumber()
+ }
+ mul(num1,num2) {
+ return new Decimal(num1).mul(new Decimal(num2)).toNumber()
+ }
+ div(num1,num2) {
+ return new Decimal(num1).div(new Decimal(num2)).toNumber()
+ }
+}
+export const calc = new Calc();
\ No newline at end of file
diff --git a/fe/PDA/mycomponents/comjob/comJobScanDetail.vue b/fe/PDA/mycomponents/comjob/comJobScanDetail.vue
index 1c2d5bbee..b4e0d3bdc 100644
--- a/fe/PDA/mycomponents/comjob/comJobScanDetail.vue
+++ b/fe/PDA/mycomponents/comjob/comJobScanDetail.vue
@@ -20,7 +20,7 @@
{{showOther}}
- {{ allCount-scanCount}}
+ {{calcCount(allCount,scanCount)}}
收容数
@@ -35,6 +35,9 @@
getJobStatuStyle,
getJobStatuDesc,
} from '@/common/basic.js';
+ import {
+ calc
+ } from '@/common/calc.js';
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue'
export default {
@@ -97,12 +100,16 @@
},
statusColor: function(val) {
return getJobStatuDesc(val);
- },
+ }
},
mounted() {
},
- methods: {}
+ methods: {
+ calcCount(a,b){
+ return calc.sub(a,b)
+ }
+ }
}
diff --git a/fe/PDA/pages/task/thirdLocationJob.vue b/fe/PDA/pages/task/thirdLocationJob.vue
index ae5a4aa3d..30e88d752 100644
--- a/fe/PDA/pages/task/thirdLocationJob.vue
+++ b/fe/PDA/pages/task/thirdLocationJob.vue
@@ -16,9 +16,9 @@