Browse Source

新增安全交底打印;

修改人员修改、新增的错误;
修改预算中,重新选择人员重新计算值等。
余思翰 11 months ago
parent
commit
9170a16f23

+ 4
- 4
oa-back/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml View File

@@ -219,8 +219,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
219 219
  			<if test="postLevel != null and postLevel != ''">post_level,</if>
220 220
  			<if test="salaryLevel != null and salaryLevel != ''">salary_level,</if>
221 221
 			<if test="operatorLevel != null and operatorLevel != ''">operator_level,</if>
222
- 			<if test="entryDate != null and entryDate != ''">entry_date,</if>
223
- 			<if test="birthday != null and birthday != ''">birthday,</if>
222
+ 			<if test="entryDate != null">entry_date,</if>
223
+ 			<if test="birthday != null">birthday,</if>
224 224
  			<if test="age != null and age != ''">age,</if>
225 225
 			<if test="idCard != null">id_card,</if>
226 226
 			<if test="nativePlace != null">native_place,</if>
@@ -254,8 +254,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
254 254
  			<if test="postLevel != null and postLevel != ''">#{postLevel},</if>
255 255
  			<if test="salaryLevel != null and salaryLevel != ''">#{salaryLevel},</if>
256 256
 			<if test="operatorLevel != null and operatorLevel != ''">#{operatorLevel},</if>
257
- 			<if test="entryDate != null and entryDate != ''">#{entryDate},</if>
258
- 			<if test="birthday != null and birthday != ''">#{birthday},</if>
257
+ 			<if test="entryDate != null">#{entryDate},</if>
258
+ 			<if test="birthday != null">#{birthday},</if>
259 259
  			<if test="age != null and age != ''">#{age},</if>
260 260
 			<if test="idCard != null">#{idCard},</if>
261 261
 			<if test="nativePlace != null">#{nativePlace},</if>

+ 21
- 12
oa-ui/src/views/flowable/form/budget/addBudget.vue View File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-25 15:05:59
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-08-01 09:46:19
5
+ * @LastEditTime: 2024-08-01 14:13:16
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -105,9 +105,7 @@
105 105
             <el-breadcrumb-item>选择项目</el-breadcrumb-item>
106 106
             <el-breadcrumb-item>{{ projectForm.projectNumber }}</el-breadcrumb-item>
107 107
             <el-breadcrumb-item>{{ projectForm.projectName }}</el-breadcrumb-item>
108
-            <el-breadcrumb-item>{{ projectForm.projectLeaderUser
109
-        ? projectForm.projectLeaderUser.nickName
110
-        : "" }}</el-breadcrumb-item>
108
+            <el-breadcrumb-item>{{ getUserName(projectForm.projectLeader) }}</el-breadcrumb-item>
111 109
           </el-breadcrumb>
112 110
           <el-form ref="form2" :model="peopleForm" style="padding: 20px 100px 0">
113 111
             <!-- 选择人员 -->
@@ -138,13 +136,6 @@
138 136
                   <td>{{ 1780 }}</td>
139 137
                   <td>{{ user.salary.salary }}</td>
140 138
                   <td>{{ parseFloat((user.salary.salary + 1780) / 21.75).toFixed(2) }}</td>
141
-                  <!-- <td>
142
-                    <el-input
143
-                      v-model="user.inOutPrice"
144
-                      placeholder="请输入进出场单价"
145
-                      @change="calculateUserTotal(user)"
146
-                    ></el-input>
147
-                  </td> -->
148 139
                   <td>
149 140
                     <el-input v-model="user.days" placeholder="请输入天数" @blur="calculateUserTotal(user)"></el-input>
150 141
                   </td>
@@ -156,8 +147,10 @@
156 147
                 </tr>
157 148
               </table>
158 149
             </el-form-item>
150
+            <div class="mb20" style="color:red">tips:人员成本=(基础工资+岗位工资)/21.75,固定工资中的年功工资暂忽略不计,绩效工资计入直接成本,津贴补贴、五险一金扣除暂未考虑
151
+            </div>
152
+
159 153
 
160
-            <div style="color:red">tips:人员成本=(基础工资+岗位工资)/21.75,固定工资中的年功工资暂忽略不计,绩效工资计入直接成本,津贴补贴、五险一金扣除暂未考虑</div>
161 154
             <!-- 选择车辆 -->
162 155
             <el-form-item label="选择车辆:">
163 156
               <span v-if="chooseCar.length != 0">
@@ -200,6 +193,8 @@
200 193
                 </tr>
201 194
               </table>
202 195
             </el-form-item>
196
+
197
+
203 198
             <!-- 选择设备 -->
204 199
             <el-form-item label="选择设备:">
205 200
               <span v-if="chooseDevice.length != 0">
@@ -670,6 +665,7 @@ export default {
670 665
     getChooseUser(val) {
671 666
       this.chooseUser = val;
672 667
       this.openPeople = false;
668
+      this.recalculateCost(val,'staffCost','staffCost');
673 669
     },
674 670
     getChooseCar(val) {
675 671
       this.chooseCar = val;
@@ -677,10 +673,23 @@ export default {
677 673
         car.mileage = 1.5
678 674
       }
679 675
       this.openCar = false;
676
+      this.recalculateCost(val,'expense','carCost');
680 677
     },
681 678
     getChooseDevice(val) {
682 679
       this.chooseDevice = val;
683 680
       this.openDevice = false;
681
+      this.recalculateCost(val,'depreciation','deviceCost');
682
+    },
683
+    recalculateCost(arr, name, formName) {
684
+      let sum = arr.reduce((accumulator, item) => {
685
+        // 检查 carCost 属性是否存在且为数字(或可转换为数字)  
686
+        if (item[name] != null && !isNaN(Number(item[name]))) {
687
+          return accumulator + Number(item[name]);
688
+        }
689
+        return accumulator;
690
+      }, 0);
691
+      this.$set(this.budgetForm, formName, sum.toFixed(2));
692
+      this.getFixCost();
684 693
     },
685 694
     getUserSalary(userId) {
686 695
       getSalary(userId).then(res => {

+ 3
- 7
oa-ui/src/views/flowable/form/business/contractForm.vue View File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-05-10 15:31:57
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-24 16:09:37
5
+ * @LastEditTime: 2024-08-01 14:50:10
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -11,7 +11,7 @@
11 11
         <h2 class="text-center"><b>承接合同评审表</b></h2>
12 12
         <el-divider></el-divider>
13 13
         <el-form ref="form" :model="form" :rules="rules" label-width="130px" :disabled="formDisabled">
14
-          <el-row :gutter="20">
14
+          <el-row :gutter="20">
15 15
             <el-col :span="12" :xs="24">
16 16
               <el-form-item label="投标项目名称:" prop="tenderId">
17 17
                 <el-button type="primary" size="mini" @click="tbOpen = true"
@@ -1027,12 +1027,8 @@ export default {
1027 1027
     },
1028 1028
     /** 提交按钮 */
1029 1029
     submitForm() {
1030
-      this.isTenderIdValid = this.validateTenderId(this.form.tenderId);
1030
+      // this.isTenderIdValid = this.validateTenderId(this.form.tenderId);
1031 1031
       this.isDocumentValid = this.validateDocument(this.form.contractDocument)
1032
-      if (!this.isTenderIdValid) {
1033
-        // tenderId无效,阻止提交  
1034
-        return;
1035
-      }
1036 1032
       if (!this.isDocumentValid) {
1037 1033
         return;
1038 1034
       }

+ 160
- 0
oa-ui/src/views/flowable/form/components/safePrint.vue View File

@@ -0,0 +1,160 @@
1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2024-07-30 16:56:08
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-07-31 17:39:52
6
+-->
7
+<template>
8
+  <div>
9
+    <div id="printSafe">
10
+      <h2 class="text-center title">环境、职业健康安全、信息安全管理交底记录表</h2>
11
+      <table border="1">
12
+        <tr>
13
+          <td :colspan="1" class="fontbold">项目名称</td>
14
+          <td :colspan="4">{{ form.projectName }}</td>
15
+          <td :colspan="2" class="fontbold">项目编号</td>
16
+          <td :colspan="2">{{ form.projectNumber }}</td>
17
+        </tr>
18
+        <tr>
19
+          <td :colspan="1" class="fontbold">承担部门</td>
20
+          <td :colspan="4">{{ getDeptName(form.undertakingDept) }}</td>
21
+          <td :colspan="2" class="fontbold">项目负责人</td>
22
+          <td :colspan="2">{{ getUserName(form.projectLeader) }}</td>
23
+        </tr>
24
+        <tr>
25
+          <td :colspan="1" class="fontbold">接受交底人</td>
26
+          <td :colspan="8">{{ getUserName(form.disclosureAccepter) }}</td>
27
+        </tr>
28
+        <tr>
29
+          <td :colspan="1" class="fontbold">环境管理要求</td>
30
+          <td :colspan="8" style="white-space: pre-wrap;">{{ form.environmentComment }}</td>
31
+        </tr>
32
+        <tr>
33
+          <td :colspan="1" class="fontbold">安全生产与职业健康要求</td>
34
+          <td :colspan="8" style="white-space: pre-wrap;">{{ form.outsideComment }}</td>
35
+        </tr>
36
+        <tr>
37
+          <td :colspan="1" class="fontbold">信息安全管理要求</td>
38
+          <td :colspan="8" style="white-space: pre-wrap;">{{ form.insideComment }}</td>
39
+        </tr>
40
+        <tr>
41
+          <td :colspan="1" class="fontbold">安全交底意见</td>
42
+          <td :colspan="4">{{ form.disclosureComment }}</td>
43
+          <td :colspan="2" style="text-align:left;min-width:120px;">签名:<span class="auditor">{{
44
+            getUserName(form.disclosurer) }}</span></td>
45
+          <td :colspan="2" style="text-align:left;width:240px;">日期:{{ form.disclosureTime }}</td>
46
+        </tr>
47
+        <tr>
48
+          <td :colspan="1" class="fontbold">接受交底意见</td>
49
+          <td :colspan="4">{{ form.acceptComment }}</td>
50
+          <td :colspan="2" style="text-align:left;min-width:120px;">
51
+            签名:<span class="auditor">{{ getUserName(form.disclosureAccepter) }}</span>
52
+          </td>
53
+          <td :colspan="2" style="text-align:left;width:240px;">日期:{{ form.acceptTime }}</td>
54
+        </tr>
55
+      </table>
56
+    </div>
57
+    <div class="text-center mt20">
58
+      <el-button type="primary" v-print="print">确认打印</el-button>
59
+      <el-button @click="$emit('cancel')">取消</el-button>
60
+    </div>
61
+  </div>
62
+</template>
63
+
64
+<script>
65
+export default {
66
+  props: {
67
+    form: {
68
+      type: Object
69
+    }
70
+  },
71
+  data() {
72
+    return {
73
+      settleSum: {},
74
+      deptSettleList: [],
75
+      deductionsList: [],
76
+      actualSumSettle: '',
77
+      undertakingDept: [],
78
+      print: {
79
+        id: 'printSafe',
80
+        popTitle: '环境、职业健康安全、信息安全管理交底记录表', // 打印配置页上方标题
81
+        extraHead: '', //最上方的头部文字,附加在head标签上的额外标签,使用逗号分隔
82
+        preview: false, // 是否启动预览模式,默认是false(开启预览模式,可以先预览后打印)
83
+        previewTitle: '', // 打印预览的标题(开启预览模式后出现),
84
+        previewPrintBtnLabel: '', // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现)
85
+        zIndex: '', // 预览的窗口的z-index,默认是 20002(此值要高一些,这涉及到预览模式是否显示在最上面)
86
+        previewBeforeOpenCallback() { }, //预览窗口打开之前的callback(开启预览模式调用)
87
+        previewOpenCallback() { }, // 预览窗口打开之后的callback(开启预览模式调用)
88
+        beforeOpenCallback() { }, // 开启打印前的回调事件
89
+        openCallback() { }, // 调用打印之后的回调事件
90
+        closeCallback() { }, //关闭打印的回调事件(无法确定点击的是确认还是取消)
91
+        url: '',
92
+        standard: '',
93
+        extraCss: ''
94
+      }
95
+    }
96
+  },
97
+}
98
+</script>
99
+
100
+<style lang="scss" scoped>
101
+table {
102
+  /*边框*/
103
+  /* border: 1px solid black; */
104
+  width: 90%;
105
+  // text-align: center;
106
+  border-collapse: collapse;
107
+  margin: 0 auto;
108
+
109
+  /*设置背景颜色*/
110
+  /* background-color: #bfa; */
111
+  td {
112
+    padding: 5px;
113
+    // line-height: 30px;
114
+  }
115
+}
116
+
117
+.header {
118
+  font-family: '黑体';
119
+  font-size: 16px;
120
+  font-weight: bold;
121
+  line-height: 30px;
122
+}
123
+
124
+.bg {
125
+  background-color: #eee;
126
+  -webkit-print-color-adjust: exact;
127
+}
128
+
129
+.title {
130
+  font-family: '黑体';
131
+  font-size: 20px;
132
+  font-weight: bold;
133
+  line-height: 30px;
134
+}
135
+
136
+.fontbold {
137
+  font-weight: bold;
138
+  min-width: 150px;
139
+  text-align: center;
140
+}
141
+
142
+.conment-width {
143
+  // max-width: 200px;
144
+}
145
+
146
+
147
+@page {
148
+  size: auto;
149
+  /* 去除页脚 */
150
+  margin-bottom: 0;
151
+  // 横向A4
152
+  // size:A4 landscape;
153
+}
154
+
155
+@media print {
156
+  #print table {
157
+    width: 100%;
158
+  }
159
+}
160
+</style>

+ 1
- 1
oa-ui/src/views/flowable/form/finance/borrowForm.vue View File

@@ -279,7 +279,7 @@
279 279
             </el-col>
280 280
           </el-row>
281 281
         </el-form>
282
-        <div style="text-align: center;">
282
+        <div style="text-align: center;" v-if="taskName !=''">
283 283
           <el-button type="primary" @click="submitForm">提 交</el-button>
284 284
         </div>
285 285
       </el-col>

+ 10
- 1
oa-ui/src/views/flowable/form/projectProcess/safeTab.vue View File

@@ -2,6 +2,7 @@
2 2
   <div class="app-container" v-loading="loading">
3 3
     <el-empty description="未进行安全交底" v-if="isEmpty"></el-empty>
4 4
     <div v-if="!isEmpty">
5
+      <el-button type="success" @click="openPrint = true">打印</el-button>
5 6
       <h3 class="text-center"><b>{{ form.projectNumber + '-' + form.projectName + ' 安全交底' }}</b></h3>
6 7
       <el-form ref="safeForm" :model="form" :rules="rules" label-width="125px" disabled>
7 8
         <el-form-item label="项目编号:" prop="projectNumber">
@@ -60,6 +61,9 @@
60 61
         </el-row>
61 62
       </el-form>
62 63
     </div>
64
+    <el-dialog title="安全交底表格预览" :visible.sync="openPrint" width="65%" append-to-body>
65
+      <safe-print :form="form"></safe-print>
66
+    </el-dialog>
63 67
   </div>
64 68
 </template>
65 69
 
@@ -67,7 +71,9 @@
67 71
 import { listSafe, getSafe, delSafe, addSafe, updateSafe } from "@/api/oa/safe/safe";
68 72
 import { listUser } from '@/api/system/user';
69 73
 import { getProject } from "@/api/oa/project/project";
74
+import safePrint from '../components/safePrint.vue';
70 75
 export default {
76
+  components: { safePrint },
71 77
   props: {
72 78
     taskForm: {
73 79
       type: Object,
@@ -101,7 +107,8 @@ export default {
101 107
       form: {},
102 108
       rules: {},
103 109
       userList: [],
104
-      loading:false
110
+      loading:false,
111
+      openPrint:false,
105 112
     }
106 113
   },
107 114
   mounted() {
@@ -123,6 +130,8 @@ export default {
123 130
               if (res.data) {
124 131
                 this.$set(this.form, "projectNumber", res.data.projectNumber);
125 132
                 this.$set(this.form, "projectName", res.data.projectName);
133
+                this.$set(this.form, "projectLeader", res.data.projectLeader);
134
+                this.$set(this.form, "undertakingDept", res.data.undertakingDept);
126 135
                 this.loading = false
127 136
               }
128 137
             })

+ 19
- 15
oa-ui/src/views/oa/staff/index.vue View File

@@ -117,9 +117,9 @@
117 117
           <el-table-column label="学历" align="center" key="degree" prop="degree" :formatter="formatterDegree"
118 118
             v-if="columns[12].visible" />
119 119
           <el-table-column label="籍贯" align="center" key="nativePlace" prop="nativePlace" v-if="columns[13].visible" />
120
-          <el-table-column label="政治面貌" align="center" key="politicalAffiliation" :formatter="formatterPoliticalAffiliation" prop="politicalAffiliation"
121
-            v-if="columns[14].visible" />
122
-          <el-table-column label="民族" align="center" key="ethnic" prop="ethnic"  v-if="columns[15].visible" />
120
+          <el-table-column label="政治面貌" align="center" key="politicalAffiliation"
121
+            :formatter="formatterPoliticalAffiliation" prop="politicalAffiliation" v-if="columns[14].visible" />
122
+          <el-table-column label="民族" align="center" key="ethnic" prop="ethnic" v-if="columns[15].visible" />
123 123
 
124 124
           <el-table-column label="合同签订" align="center" key="contractSign" prop="contractSign" v-if="columns[7].visible"
125 125
             :show-overflow-tooltip="true">
@@ -227,14 +227,14 @@
227 227
             </el-form-item>
228 228
             <el-form-item label="入职年月" prop="entryDate">
229 229
               <el-date-picker v-model="form.entryDate" type="month" placeholder="请输入入职年月" style="width:100%;"
230
-                value-format="yyyy-MM" />
230
+                format="yyyy-MM" />
231 231
             </el-form-item>
232 232
             <el-form-item label="合同签订" prop="contractSign">
233
-              <el-date-picker v-model="form.contractSign" type="month" placeholder="请输入合同签订" style="width:100%;"
233
+              <el-date-picker v-model="form.contractSign" type="date" placeholder="请输入合同签订" style="width:100%;"
234 234
                 value-format="yyyy-MM-dd" />
235 235
             </el-form-item>
236 236
             <el-form-item label="合同期满" prop="contractExpire">
237
-              <el-date-picker v-model="form.contractExpire" type="month" placeholder="请输入合同期满" style="width:100%;"
237
+              <el-date-picker v-model="form.contractExpire" type="date" placeholder="请输入合同期满" style="width:100%;"
238 238
                 value-format="yyyy-MM-dd" />
239 239
             </el-form-item>
240 240
             <el-form-item label="出生年月" prop="birthday">
@@ -728,12 +728,16 @@ export default {
728 728
     },
729 729
 
730 730
     getBirthdayByIdCard(idCard) {
731
-      // 使用 substring() 方法和 split() 方法提取出生年月日信息
732
-      const birthday = [idCard.substr(6, 4), idCard.substr(10, 2), idCard.substr(12, 2)].join('-')
733
-      // 使用 Date 对象的 toISOString() 方法将出生年月日信息转换为日期格式
734
-      const date = new Date(birthday);
735
-      const formattedDate = this.parseTime(date, '{y}-{m}-{d}')
736
-      return formattedDate;
731
+      if (idCard) {
732
+        // 使用 substring() 方法和 split() 方法提取出生年月日信息
733
+        const birthday = [idCard.substr(6, 4), idCard.substr(10, 2), idCard.substr(12, 2)].join('-')
734
+        // 使用 Date 对象的 toISOString() 方法将出生年月日信息转换为日期格式
735
+        const date = new Date(birthday);
736
+        const formattedDate = this.parseTime(date, '{y}-{m}-{d}')
737
+        return formattedDate;
738
+      }else{
739
+        return null
740
+      }
737 741
     },
738 742
     getAgeByIdCard(idCard) {
739 743
       const sexAndAge = {}
@@ -741,7 +745,7 @@ export default {
741 745
       const userCard = idCard
742 746
       //如果用户身份证号码为undefined则返回空
743 747
       if (!userCard) {
744
-        return sexAndAge
748
+        return ''
745 749
       }
746 750
       // 获取出生日期
747 751
       const yearBirth = userCard.substring(6, 10)
@@ -791,10 +795,10 @@ export default {
791 795
       return aSalaryLevel - bSalaryLevel;
792 796
     },
793 797
     formatterDegree(row) {
794
-      let v = this.selectDictLabel(this.dict.type.sys_user_degree,row.degree)
798
+      let v = this.selectDictLabel(this.dict.type.sys_user_degree, row.degree)
795 799
       return v
796 800
     },
797
-    formatterPoliticalAffiliation(row){
801
+    formatterPoliticalAffiliation(row) {
798 802
       let v = this.selectDictLabels(this.dict.type.sys_user_political, row.politicalAffiliation, ',')
799 803
       return v
800 804
     }

Loading…
Cancel
Save