shi'sen'yuan 3 年之前
父節點
當前提交
7eb782eb6d
共有 2 個文件被更改,包括 36 次插入12 次删除
  1. 17 5
      ui/src/views/invoicing/hazardwork/index.vue
  2. 19 7
      ui/src/views/invoicing/signcard/index.vue

+ 17 - 5
ui/src/views/invoicing/hazardwork/index.vue

@@ -127,6 +127,9 @@
                         签名:
                         <el-input style="width: 100px;" v-model="form.aSafeLiaisonSign"
                                   :disabled="this.form.aIsNeedSafeLiaison==1?false:true"/>
+                        <el-button type="primary" slot="append" @click="signCard('aSafeLiaisonSign')"
+                                   icon="el-icon-edit"
+                                   :disabled="this.form.aIsNeedSafeLiaison==1?false:true"></el-button>
                       </td>
                       <td>
                         <i class="el-icon-phone">:</i>
@@ -1280,15 +1283,15 @@
                     </td>
                     <td colspan="6">
                       参与交底人签名/日期
-                      <el-input style="width: 120px;" v-model="form.dPartakeBriefingSign" :disabled="this.form.dIsSafeBriefing==1?false:true"/>
-                      <el-button type="primary" slot="append" @click="signCard('dPartakeBriefingSign')"
-                                 icon="el-icon-edit"
-                                 :disabled="this.form.dIsSafeBriefing==1?false:true"></el-button>
+                      <el-input style="width: 250px;" v-model="form.dPartakeBriefingSign" clearable :disabled="this.form.dIsSafeBriefing==1?false:true"/>
                       <el-date-picker format="yyyy-MM-dd HH:mm:ss"
                                       value-format="yyyy-MM-dd HH:mm:ss" style="width: 200px"
                                       v-model="form.dPartakeBriefingDate" type="date"
                                       :disabled="this.form.dIsSafeBriefing==1?false:true">
                       </el-date-picker>
+                      <el-button type="primary" slot="append" @click="signCard('dPartakeBriefingSign')"
+                                 icon="el-icon-edit"
+                                 :disabled="this.form.dIsSafeBriefing==1?false:true"></el-button>
                     </td>
                   </tr>
                   <tr>
@@ -3132,6 +3135,11 @@ export default {
     //获取签名结果
     getSignRes(res) {
       console.log(res)
+      //A
+      if (res.signType == 'aSafeLiaisonSign') {
+        this.form.aSafeLiaisonSign = res.staffName
+        console.log('刷卡人姓名:' + this.form.aSafeLiaisonSign)
+      }
       //D[1]
       if (res.signType == 'dSafeImplSign11') {
         this.form.dSafeImplSign11 = res.staffName
@@ -3307,7 +3315,11 @@ export default {
       }
       //D[6]
       if (res.signType == 'dPartakeBriefingSign') {
-        this.form.dPartakeBriefingSign = res.staffName
+        if (this.form.dPartakeBriefingSign == null || this.form.dPartakeBriefingSign == '') {
+          this.form.dPartakeBriefingSign = res.staffName
+        }else {
+          this.form.dPartakeBriefingSign = this.form.dPartakeBriefingSign + "," + res.staffName
+        }
         this.form.dPartakeBriefingDate = this.dateformat('y-M-d h:m:s')
         this.$set(this.value1, 0, this.form.dPartakeBriefingDate);
         console.log('刷卡人姓名:' + this.form.dPartakeBriefingSign)

+ 19 - 7
ui/src/views/invoicing/signcard/index.vue

@@ -48,6 +48,8 @@ export default {
       this.visible = true
       this.loading = true
       this.signType = type
+      this.staffInfo.staffName = null
+      this.staffInfo.staffId = null
       this.initWebSocket();
     },
     initWebSocket() { //初始化websocket
@@ -174,24 +176,34 @@ export default {
     },
     // 查询IC卡号人员
     findStaffmgr(cardId) {
+      console.info("卡号:" + cardId)
       getStaffmgrByIC(cardId).then(response => {
-        this.staffInfo = response.data
+        if (response.data != null) {
+          this.staffInfo = response.data
+        }else {
+          this.$message({
+            type: 'warning',
+            message: `当前IC卡未录入系统`
+          });
+          this.visible = false;
+        }
       });
     },
     // 取消按钮
     cancel() {
       this.visible = false;
-      this.reset();
     },
     /** 确定按钮 */
     submitForm() {
       //传参给父类卡号
       this.visible = false;
-      console.log("卡号:" + this.cardId)
-      let signRes = {
-        cardId: this.cardId,
-        staffName: this.staffInfo.staffName,
-        signType: this.signType
+      let signRes = null;
+      if (this.staffInfo.staffName != null) {
+        signRes = {
+          cardId: this.cardId,
+          staffName: this.staffInfo.staffName,
+          signType: this.signType
+        }
       }
       this.$emit('signRes', signRes); //自定义事件,并传参
     },