请教一个可能很简单或者无聊的问题

blacklogo 2022-09-07 14:02:47

想实现一个功能,如:共有三个生产线,可以调节生产线的每日生产量,用于计划生产。请问怎么实现这个功能,怎么开发个小程序或者应用软件,并能前端展示,还能手工调节每日生产量?但是每日生产量有最大限额,调节一个生产线,必须相应减少或增加其他生产线产量。

...全文
82 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
辉门小弟子 2022-09-11
  • 打赏
  • 举报
回复 1
<div style="border: 2px;height: 340px;width: 242px;border-style: dashed;border-radius: 10px;
position: relative;top: 18px;left: 12px;
">

<br>
&nbsp;
<strong>生产线一<span style="float: right;"><strong>总计产量:
   </strong><span 
   id="tatil1"
   style="border: 1px;width:42px;height: 24px;
   border-style: double;float: right;
   ">100</span>
   </span></strong><br>
<div style="border: 2px;height: 56px;width: 226px;border-style:dotted;
position: relative;top: 20px;left: 5px;"
>
<span>

  


当前产量:30
剩余未分配:10

<br>&nbsp;<strong>生产线二</strong><br>
<div

style="border: 2px;height: 56px;width: 226px;border-style:dotted;
position: relative;top: 20px;left: 5px;">
  


当前产量:30

</strong><strong style="float: right;">剩余未分配:
<strong class="qia">10</strong>
</strong></div> 

<br>&nbsp;<strong>生产线三</strong><br>
 <div style="border: 2px;height: 56px;width: 226px;border-style:dotted;
 position: relative;top: 20px;left: 5px;">

  

当前产量:30剩余未分配:
10


<script>window.onload;

function func1(){
var txt=document.getElementById("txt1");
var c=document.getElementById("count1");
var d=document.getElementsByClassName("qia")
var d1=d[0];
var d2=d[1];
var d3=d[2];
if((txt.value<(d1.firstChild.nodeValue+1))&(txt.value>0)){
c.firstChild.nodeValue=(parseInt(txt.value)+parseInt(c.firstChild.nodeValue))
;var ni1=(parseInt(d1.firstChild.nodeValue)-parseInt(txt.value))
d1.firstChild.nodeValue=ni1;
d2.firstChild.nodeValue=ni1;
d3.firstChild.nodeValue=ni1;
}else{alert("请输入正确范围的数")}
txt.value="";}
function func2(){
var txt=document.getElementById("txt2");
var c=document.getElementById("count2");
var d=document.getElementsByClassName("qia")
var d1=d[0];
var d2=d[1];
var d3=d[2];
if((txt.value<(d2.firstChild.nodeValue+1))&(txt.value>0))
{c.firstChild.nodeValue=(parseInt(txt.value)+parseInt(c.firstChild.nodeValue))
;var ni1=(parseInt(d1.firstChild.nodeValue)-parseInt(txt.value))
d1.firstChild.nodeValue=ni1;
d2.firstChild.nodeValue=ni1;
d3.firstChild.nodeValue=ni1;}else{alert("请输入正确范围的数")}
txt.value="";}
function func3(){var txt=document.getElementById("txt3");
var c=document.getElementById("count3");
var d=document.getElementsByClassName("qia")
var d1=d[0];
var d2=d[1];
var d3=d[2];
if((txt.value<(d3.firstChild.nodeValue+1))&(txt.value>0))
{c.firstChild.nodeValue=(parseInt(txt.value)+parseInt(c.firstChild.nodeValue))
;var ni1=(parseInt(d3.firstChild.nodeValue)-parseInt(txt.value))
d1.firstChild.nodeValue=ni1;
d2.firstChild.nodeValue=ni1;
d3.firstChild.nodeValue=ni1;}else{alert("请输入正确范围的数")}
txt.value="";}
function func4(){var txt=document.getElementById("txt1");
var c=document.getElementById("count1")
var d=document.getElementsByClassName("qia")
var d1=d[0];
var d2=d[1];
var d3=d[2];
if((txt.value<(c.firstChild.nodeValue+1))&(txt.value>0))
{c.firstChild.nodeValue=(parseInt(c.firstChild.nodeValue)-parseInt(txt.value))
;var bn1=(parseInt(txt.value)+parseInt(d2.firstChild.nodeValue))
d1.firstChild.nodeValue=bn1;
d2.firstChild.nodeValue=bn1;
d3.firstChild.nodeValue=bn1;}else{alert("请输入正确范围的数")}
txt.value="";}
function func5(){var txt=document.getElementById("txt2");
var c=document.getElementById("count2")
var d=document.getElementsByClassName("qia")
var d1=d[0];
var d2=d[1];
var d3=d[2];
if((txt.value<(c.firstChild.nodeValue+1))&(txt.value>0))
{c.firstChild.nodeValue=(parseInt(c.firstChild.nodeValue)-parseInt(txt.value))
;var bn1=(parseInt(txt.value)+parseInt(d2.firstChild.nodeValue))
d1.firstChild.nodeValue=bn1;
d2.firstChild.nodeValue=bn1;
d3.firstChild.nodeValue=bn1;}else{alert("请输入正确范围的数")}
txt.value="";}
function func7(){var txt=document.getElementById("txt3");
var c=document.getElementById("count3")
var d=document.getElementsByClassName("qia")
var d1=d[0];
var d2=d[1];
var d3=d[2];
if((txt.value<(c.firstChild.nodeValue+1))&(txt.value>0))
{c.firstChild.nodeValue=(parseInt(c.firstChild.nodeValue)-parseInt(txt.value))
;var bn1=(parseInt(txt.value)+parseInt(d2.firstChild.nodeValue))
d1.firstChild.nodeValue=bn1;
d2.firstChild.nodeValue=bn1;
d3.firstChild.nodeValue=bn1;}else{alert("请输入正确范围的数")}
txt.value="";}

87,987

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧