Commit 90506276 by shj

生成燃料动力费和测试化验加工费的策略改变,直接取用户输入;生成预算和预算属性页面取消项目年限相关字段;

parent 608b7358
...@@ -161,8 +161,11 @@ public class BudgetService implements IBudgetService { ...@@ -161,8 +161,11 @@ public class BudgetService implements IBudgetService {
*/ */
@Override @Override
public Map<TestAndProcess, Integer> doTestAndProcess(Double number) { public Map<TestAndProcess, Integer> doTestAndProcess(Double number) {
List<TestAndProcess> testAndProcesses = testAndProcessDao.selectAll(); Map<TestAndProcess,Integer> result=new HashMap<>();
return generateMap((List) testAndProcesses, number); TestAndProcess testAndProcess = new TestAndProcess();
testAndProcess.setPrice(number);
result.put(testAndProcess,1);
return result;
} }
/** /**
...@@ -173,8 +176,11 @@ public class BudgetService implements IBudgetService { ...@@ -173,8 +176,11 @@ public class BudgetService implements IBudgetService {
*/ */
@Override @Override
public Map<Power, Integer> doPower(Double number) { public Map<Power, Integer> doPower(Double number) {
List<Power> powers = powerDao.selectAll(); Map<Power,Integer> result=new HashMap<>();
return generateMap((List) powers, number); Power power = new Power();
power.setPrice(number);
result.put(power,1);
return result;
} }
/** /**
......
...@@ -111,7 +111,7 @@ public class BudgetExportUtil { ...@@ -111,7 +111,7 @@ public class BudgetExportUtil {
paragraph = document.createParagraph(); paragraph = document.createParagraph();
run = paragraph.createRun(); run = paragraph.createRun();
run.addTab(); run.addTab();
run.setText("测试化验加工费:万元"); run.setText("测试化验加工费:"+detailService.sumTestAndProcess(budget.getTestAndProcesses())+"万元。【具体用途自行填写】");
//燃料动力费 //燃料动力费
...@@ -123,7 +123,7 @@ public class BudgetExportUtil { ...@@ -123,7 +123,7 @@ public class BudgetExportUtil {
paragraph = document.createParagraph(); paragraph = document.createParagraph();
run = paragraph.createRun(); run = paragraph.createRun();
run.addTab(); run.addTab();
run.setText("燃料动力费:万元"); run.setText("燃料动力费:"+detailService.sumPower(budget.getPowers())+"万元。【具体用途自行填写】");
//差旅费 //差旅费
......
...@@ -78,12 +78,12 @@ ...@@ -78,12 +78,12 @@
</div> </div>
</div> </div>
<div class="form-group"> <%--<div class="form-group">
<label class="control-label col-sm-4">项目周期(年)</label> <label class="control-label col-sm-4">项目周期(年)</label>
<div class="col-sm-4"> <div class="col-sm-4">
<input name="years" type="number" placeholder="填写大于0的数字" class="form-control" required> <input name="years" type="number" placeholder="填写大于0的数字" class="form-control" required>
</div> </div>
</div> </div>--%>
<hr> <hr>
...@@ -97,9 +97,9 @@ ...@@ -97,9 +97,9 @@
<div class="col-sm-4"> <div class="col-sm-4">
<input name="equipment-number" class="form-control" type="number" v-model="budget.equipment.req"> <input name="equipment-number" class="form-control" type="number" v-model="budget.equipment.req">
</div> </div>
<div class="col-sm-2"> <%--<div class="col-sm-2">
<input name="equipment-distribution" class="form-control" type="text" required> <input name="equipment-distribution" class="form-control" type="text" required>
</div> </div>--%>
</div> </div>
<div class="form-group"> <div class="form-group">
......
...@@ -85,12 +85,12 @@ ...@@ -85,12 +85,12 @@
</div> </div>
</div> </div>
<div class="form-group"> <%--<div class="form-group">
<label class="control-label col-sm-4">项目周期(年)</label> <label class="control-label col-sm-4">项目周期(年)</label>
<div class="col-sm-4"> <div class="col-sm-4">
<input name="years" type="number" placeholder="填写大于0的数字" class="form-control" required> <input name="years" type="number" placeholder="填写大于0的数字" class="form-control" required>
</div> </div>
</div> </div>--%>
<hr> <hr>
...@@ -104,9 +104,9 @@ ...@@ -104,9 +104,9 @@
<div class="col-sm-4"> <div class="col-sm-4">
<input name="equipment-number" class="form-control" type="number" v-model="arr[0]"> <input name="equipment-number" class="form-control" type="number" v-model="arr[0]">
</div> </div>
<div class="col-sm-2"> <%--<div class="col-sm-2">
<input name="equipment-distribution" class="form-control" type="text" required> <input name="equipment-distribution" class="form-control" type="text" required>
</div> </div>--%>
</div> </div>
<div class="form-group"> <div class="form-group">
...@@ -208,7 +208,11 @@ ...@@ -208,7 +208,11 @@
<!-- Button --> <!-- Button -->
<div title="所有复选框必须勾选,如果不需要某类费用,后面的数字填0即可"> <div title="所有复选框必须勾选,如果不需要某类费用,后面的数字填0即可">
<button class="btn btn-default btn-lg center-block" type="submit">生成预算</button> <button class="btn btn-default btn-lg center-block" type="submit">生成预算</button>
<p class="help-block" style="color:red">所有复选框必须勾选,如果不需要某类费用,后面的数字填0即可</p> <p class="help-block" style="color:red">
所有复选框必须勾选,如果不需要某类费用,后面的数字填0即可<br>
由于间接经费是自动生成的,并且参与总经费计算,因此最好预留一些经费给间接经费(间接经费等于除设备费之外的其他所有直接经费总和的约20%)。<br>
例如,总经费150万,则以上表单总和建议在120万。
</p>
</div> </div>
</form> </form>
</div> </div>
...@@ -217,7 +221,7 @@ ...@@ -217,7 +221,7 @@
var formVue = new Vue({ var formVue = new Vue({
el: "#form", el: "#form",
data:{ data:{
arr:[20,12,15,0,12,5, 6,8,66,2,0], arr:[20,12,10,0,12,3, 6,5,60,2,0],
total:150 total:150
}, },
computed:{ computed:{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment