diff --git a/ruoyi-ui/src/views/measurement/operation/moltenironpound/index.vue b/ruoyi-ui/src/views/measurement/operation/moltenironpound/index.vue index 637b72c..82ce4cf 100644 --- a/ruoyi-ui/src/views/measurement/operation/moltenironpound/index.vue +++ b/ruoyi-ui/src/views/measurement/operation/moltenironpound/index.vue @@ -905,12 +905,13 @@ export default { //检查是否选中磅点。 if (!this.checkPoundSelected())return; // 生成 100 到 10000 的整数(代表 1.00 到 100.00) - const randomInt = Math.floor(Math.random() * 9900 + 100); - getWeight(this.queryParams.poundid).then(response => { - this.queryParams.weight = response; - }) + //const randomInt = Math.floor(Math.random() * 9900 + 100); // 转换为两位小数,内存中是有限小数 //this.queryParams.weight = new Decimal(randomInt / 100); + getWeight(this.queryParams.poundid).then(response => { + this.queryParams.weight = response; + console.log("返参"+response); + }) }, //单击主榜单进行单选。 //主榜单单击选中,并将车号进行赋值。(单选) diff --git a/ruoyi-ui/src/views/measurement/operation/outinpound/index.vue b/ruoyi-ui/src/views/measurement/operation/outinpound/index.vue index 5e78868..08077e5 100644 --- a/ruoyi-ui/src/views/measurement/operation/outinpound/index.vue +++ b/ruoyi-ui/src/views/measurement/operation/outinpound/index.vue @@ -834,10 +834,13 @@ export default { // 生成随机重量(两位小数,避免精度问题) handleGetweight() { // 生成 100 到 10000 的整数(代表 1.00 到 100.00) - const randomInt = Math.floor(Math.random() * 9900 + 100); - + //const randomInt = Math.floor(Math.random() * 9900 + 100); + getWeight(this.queryParams.poundid).then(response => { + this.queryParams.weight = response; + console.log("返参"+response); + }) // 转换为两位小数,内存中是有限小数 - this.queryParams.weight = new Decimal(randomInt / 100); + //this.queryParams.weight = new Decimal(randomInt / 100); }, //手动停止定时器 handleStopTimer() { diff --git a/ruoyi-ui/src/views/measurement/operation/shortdispound/index.vue b/ruoyi-ui/src/views/measurement/operation/shortdispound/index.vue index 61eee4f..72cda5e 100644 --- a/ruoyi-ui/src/views/measurement/operation/shortdispound/index.vue +++ b/ruoyi-ui/src/views/measurement/operation/shortdispound/index.vue @@ -1024,10 +1024,14 @@ watch: { //检查是否选中磅点。 if (!this.checkPoundSelected())return; // 生成 100 到 10000 的整数(代表 1.00 到 100.00) - const randomInt = Math.floor(Math.random() * 9900 + 100); + //const randomInt = Math.floor(Math.random() * 9900 + 100); // 转换为两位小数,内存中是有限小数 - this.queryParams.weight = new Decimal(randomInt / 100); + //this.queryParams.weight = new Decimal(randomInt / 100); + getWeight(this.queryParams.poundid).then(response => { + this.queryParams.weight = response; + console.log("返参"+response); + }) }, //新增皮重,将当前重量上的数据赋值到重量中,并且打开皮重弹窗 getEmpPoundData(){ diff --git a/ruoyi-ui/src/views/measurement/operation/steelpound/index.vue b/ruoyi-ui/src/views/measurement/operation/steelpound/index.vue index 6d7968a..b958166 100644 --- a/ruoyi-ui/src/views/measurement/operation/steelpound/index.vue +++ b/ruoyi-ui/src/views/measurement/operation/steelpound/index.vue @@ -712,10 +712,14 @@ export default { //检查是否选中磅点。 if (!this.checkPoundSelected())return; // 生成 100 到 10000 的整数(代表 1.00 到 100.00) - const randomInt = Math.floor(Math.random() * 9900 + 100); + //const randomInt = Math.floor(Math.random() * 9900 + 100); // 转换为两位小数,内存中是有限小数 - this.queryParams.weight = new Decimal(randomInt / 100); + //this.queryParams.weight = new Decimal(randomInt / 100); + getWeight(this.queryParams.poundid).then(response => { + this.queryParams.weight = response; + console.log("返参"+response); + }) }, //单击主榜单进行单选。