Bladeren bron

按采购申请id删除采购计划

lamphua 7 maanden geleden
bovenliggende
commit
90f79444ea

+ 3
- 3
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProcurePlanController.java Bestand weergeven

@@ -89,9 +89,9 @@ public class CmcProcurePlanController extends BaseController
89 89
      * 删除采购计划
90 90
      */
91 91
     @Log(title = "采购计划", businessType = BusinessType.DELETE)
92
-	@DeleteMapping("/{procurePlanIds}")
93
-    public AjaxResult remove(@PathVariable Integer[] procurePlanIds)
92
+	@DeleteMapping("/{procureApplyId}")
93
+    public AjaxResult remove(@PathVariable String[] procureApplyId)
94 94
     {
95
-        return toAjax(cmcProcurePlanService.deleteCmcProcurePlanByProcurePlanIds(procurePlanIds));
95
+        return toAjax(cmcProcurePlanService.deleteCmcProcurePlanByProcureApplyIds(procureApplyId));
96 96
     }
97 97
 }

+ 2
- 1
oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java Bestand weergeven

@@ -1656,7 +1656,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
1656 1656
         }
1657 1657
         if (flowTaskDto.getProcDefName().equals("采购审批")) {
1658 1658
             CmcProcureApproval cmcProcureApproval = cmcProcureApprovalService.selectCmcProcureApprovalByProcureApplyId(formId);
1659
-            flowTaskDto.setTitle(cmcProcureApproval.getApplyReason());
1659
+            if (cmcProcureApproval != null)
1660
+                flowTaskDto.setTitle(cmcProcureApproval.getApplyReason());
1660 1661
         }
1661 1662
         if (flowTaskDto.getProcDefName().equals("项目委外")) {
1662 1663
             CmcOutsource cmcOutsource = cmcOutsourceService.selectCmcOutsourceByOutsoureId(formId);

+ 5
- 5
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcProcureApproval.java Bestand weergeven

@@ -8,7 +8,7 @@ import com.ruoyi.common.annotation.Excel;
8 8
 import com.ruoyi.common.core.domain.BaseEntity;
9 9
 
10 10
 /**
11
- * 采购审批对象 cmc_buy_approval
11
+ * 采购审批对象 cmc_procure_approval
12 12
  * 
13 13
  * @author cmc
14 14
  * @date 2024-09-18
@@ -18,7 +18,7 @@ public class CmcProcureApproval extends BaseEntity
18 18
     private static final long serialVersionUID = 1L;
19 19
 
20 20
     /** 采购申请id */
21
-    private String buyApplyId;
21
+    private String procureApplyId;
22 22
 
23 23
     /** 购置说明 */
24 24
     @Excel(name = "购置说明")
@@ -78,12 +78,12 @@ public class CmcProcureApproval extends BaseEntity
78 78
 
79 79
     public void setProcureApplyId(String procureApplyId) 
80 80
     {
81
-        this.buyApplyId = buyApplyId;
81
+        this.procureApplyId = procureApplyId;
82 82
     }
83 83
 
84 84
     public String getProcureApplyId() 
85 85
     {
86
-        return buyApplyId;
86
+        return procureApplyId;
87 87
     }
88 88
     public void setApplyReason(String applyReason) 
89 89
     {
@@ -206,7 +206,7 @@ public class CmcProcureApproval extends BaseEntity
206 206
     @Override
207 207
     public String toString() {
208 208
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
209
-            .append("buyApplyId", getProcureApplyId())
209
+            .append("procureApplyId", getProcureApplyId())
210 210
             .append("applyReason", getApplyReason())
211 211
             .append("applier", getApplier())
212 212
             .append("applyDept", getApplyDept())

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcProcurePlanMapper.java Bestand weergeven

@@ -54,8 +54,8 @@ public interface CmcProcurePlanMapper
54 54
     /**
55 55
      * 批量删除采购计划
56 56
      * 
57
-     * @param procurePlanIds 需要删除的数据主键集合
57
+     * @param procureApplyId 需要删除的数据主键集合
58 58
      * @return 结果
59 59
      */
60
-    public int deleteCmcProcurePlanByProcurePlanIds(Integer[] procurePlanIds);
60
+    public int deleteCmcProcurePlanByProcureApplyIds(String[] procureApplyId);
61 61
 }

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcProcurePlanService.java Bestand weergeven

@@ -46,10 +46,10 @@ public interface ICmcProcurePlanService
46 46
     /**
47 47
      * 批量删除采购计划
48 48
      * 
49
-     * @param procurePlanIds 需要删除的采购计划主键集合
49
+     * @param procureApplyId 需要删除的采购计划主键集合
50 50
      * @return 结果
51 51
      */
52
-    public int deleteCmcProcurePlanByProcurePlanIds(Integer[] procurePlanIds);
52
+    public int deleteCmcProcurePlanByProcureApplyIds(String[] procureApplyId);
53 53
 
54 54
     /**
55 55
      * 删除采购计划信息

+ 3
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcProcurePlanServiceImpl.java Bestand weergeven

@@ -70,13 +70,13 @@ public class CmcProcurePlanServiceImpl implements ICmcProcurePlanService
70 70
     /**
71 71
      * 批量删除采购计划
72 72
      * 
73
-     * @param procurePlanIds 需要删除的采购计划主键
73
+     * @param procureApplyId 需要删除的采购计划主键
74 74
      * @return 结果
75 75
      */
76 76
     @Override
77
-    public int deleteCmcProcurePlanByProcurePlanIds(Integer[] procurePlanIds)
77
+    public int deleteCmcProcurePlanByProcureApplyIds(String[] procureApplyId)
78 78
     {
79
-        return cmcProcurePlanMapper.deleteCmcProcurePlanByProcurePlanIds(procurePlanIds);
79
+        return cmcProcurePlanMapper.deleteCmcProcurePlanByProcureApplyIds(procureApplyId);
80 80
     }
81 81
 
82 82
     /**

+ 1
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetCarMapper.xml Bestand weergeven

@@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
33 33
     </resultMap>
34 34
 
35 35
     <sql id="selectCmcBudgetCarVo">
36
-        select bc.budget_car_id, bc.budget_id, bc.car_id, c.license_plate, c.driver, c.brand, u.nick_name, c.day_cost, bc.days, bc.depreciation, bc.distance, bc.mileage, bc.toll,, bc.expense, bc.remark from cmc_budget_car as bc
36
+        select bc.budget_car_id, bc.budget_id, bc.car_id, c.license_plate, c.driver, c.brand, u.nick_name, c.day_cost, bc.days, bc.depreciation, bc.distance, bc.mileage, bc.toll, bc.expense, bc.remark from cmc_budget_car as bc
37 37
         left join cmc_car as c on c.car_id = bc.car_id
38 38
         left join sys_user as u on c.driver = u.user_id
39 39
     </sql>

+ 4
- 4
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProcurePlanMapper.xml Bestand weergeven

@@ -91,10 +91,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
91 91
         delete from cmc_procure_plan where procure_plan_id = #{procurePlanId}
92 92
     </delete>
93 93
 
94
-    <delete id="deleteCmcProcurePlanByProcurePlanIds" parameterType="String">
95
-        delete from cmc_procure_plan where procure_plan_id in 
96
-        <foreach item="procurePlanId" collection="array" open="(" separator="," close=")">
97
-            #{procurePlanId}
94
+    <delete id="deleteCmcProcurePlanByProcureApplyIds" parameterType="String">
95
+        delete from cmc_procure_plan where procure_apply_id in
96
+        <foreach item="procureApplyId" collection="array" open="(" separator="," close=")">
97
+            #{procureApplyId}
98 98
         </foreach>
99 99
     </delete>
100 100
 </mapper>

+ 1
- 0
oa-ui/src/assets/icons/svg/pay.svg Bestand weergeven

@@ -0,0 +1 @@
1
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1726735850919" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1920" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M841.984 768V182.016a96.128 96.128 0 0 0-96.768-96.64H153.6a92.736 92.736 0 0 0-96.704 96.64V256h153.6v585.984a93.888 93.888 0 0 0 85.312 96.64H870.4a96.128 96.128 0 0 0 96.704-96.64V768h-125.12zM210.496 199.104H113.792v-17.088a38.656 38.656 0 0 1 39.808-39.808h22.784c20.096 2.112 35.136 19.584 34.112 39.808v17.088z m170.688 642.88c0 11.328-5.76 28.416-5.76 39.808H307.2a38.656 38.656 0 0 1-39.808-39.808V136.512h483.52a38.656 38.656 0 0 1 39.872 39.872v585.92h-409.6v79.68z m529.024 0a38.656 38.656 0 0 1-39.808 39.808H432.384c5.056-12.608 7.04-26.24 5.632-39.808V819.2h472.192v22.784z m-250.24-523.392l-28.48-28.48-102.4 102.4-102.4-102.4-34.176 28.48 108.16 108.096h-108.16v45.44h113.792v68.288H392.512v45.568h113.792v91.008h45.504V585.984H665.6v-45.568H551.808V472.192H665.6v-45.504H557.504l102.4-108.16z" p-id="1921"></path></svg>

+ 8
- 4
oa-ui/src/views/flowable/form/budget/addBudget.vue Bestand weergeven

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-25 15:05:59
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-08-01 14:13:16
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-09-19 17:06:19
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -169,6 +169,7 @@
169 169
                   <td style="width: 100px">总里程</td>
170 170
                   <td style="width: 110px">折旧成本(天)</td>
171 171
                   <td style="width: 110px">预算天数</td>
172
+                  <td style="width: 110px">过路费</td>
172 173
                   <td style="width: 100px">总额</td>
173 174
                 </tr>
174 175
                 <tr v-for="car in chooseCar" :key="car.carId">
@@ -184,8 +185,11 @@
184 185
                   </td>
185 186
                   <td>
186 187
                     <el-input v-model="car.days" placeholder="请输入天数" @blur="calculateCarTotal(car)"></el-input>
188
+                  </td>                 
189
+                  <td>
190
+                    <el-input v-model="car.toll" placeholder="请输入过路费" @blur="calculateCarTotal(car)"></el-input>
187 191
                   </td>
188
-                  <td class="carCost">{{ car.expense }}</td>
192
+                  <td class="carCost">{{ car.expense }}</td> 
189 193
                 </tr>
190 194
                 <tr>
191 195
                   <td colspan="5">合计</td>
@@ -720,7 +724,7 @@ export default {
720 724
     calculateCarTotal(car) {
721 725
       let total1 = Number(car.mileage) * Number(car.distance);
722 726
       let total2 = Number(car.dayCost) * Number(car.days);
723
-      let sum = (total1 + total2).toFixed(2);
727
+      let sum = (total1 + total2 + Number(car.toll)).toFixed(2);
724 728
       this.$set(car, "depreciation", total2.toFixed(2));
725 729
       this.$set(car, "expense", sum);
726 730
       this.getCost("expense", "carCost", this.chooseCar);

Laden…
Annuleren
Opslaan