Forráskód Böngészése

Merge branch 'master' of http://git.dongkesoft.com:9001/DK-MES-3.0/mes-web

jiangn 3 éve
szülő
commit
bae3f0f44d

BIN
src/assets/images/app-image/icon_role.png


BIN
src/assets/images/app-image/logo-small.jpg


+ 3 - 3
src/components-app/base/dk-app-table/dk-app-table.vue

@@ -90,7 +90,7 @@
             </div>
             <!-- 字段参数值-->
             <div :style="{width:(checkboxFlag ? '85%' : '100%')} ">
-              <div class="row" style="display: flow" v-for="(rowsItem,rowsIndex) in rows" :key="rowsIndex">
+              <div class="app-row " style="display: flow" v-for="(rowsItem,rowsIndex) in rows" :key="rowsIndex">
                 <div style="width: 100%;display: flex">
                   <div v-if="!rowsItem.collapseFlag  && !rowsItem.sidePullFlag  && !rowsItem.sidePullDateFlag" style="width: 100%">
                     <!-- 输入框-->
@@ -144,7 +144,7 @@
               <div :style="checkboxFlag ? 'width: 88%;' : 'width: 100%;'">
                 <van-collapse v-model="tableDataItem.collapse" accordion>
                   <van-collapse-item :title="$t('appSeeMore')" name="1">
-                    <div class="row" style="display: flow" v-for="(rowsItem,rowsIndex) in rows" :key="rowsIndex">
+                    <div class="app-row " style="display: flow" v-for="(rowsItem,rowsIndex) in rows" :key="rowsIndex">
                       <div style="width: 100%;display: flex">
                         <!-- 标题字段-->
                         <div v-if="rowsItem.collapseFlag  && !rowsItem.sidePullFlag && !rowsItem.sidePullDateFlag" style="width: 100%">
@@ -500,7 +500,7 @@ export default {
 .van-cell{
   padding: 4px 0px !important;
 }
-.row {
+.app-row {
   font-family: 'PingFang HK';
   /*font-style: normal;*/
   font-weight: 400;

+ 119 - 60
src/components-app/business/dk-app-muti-dropdown/dk-app-muti-dropdown.vue

@@ -93,6 +93,14 @@ export default {
       type: String,
       default: ''
     },
+    typeFlag:{
+      type: Boolean,
+      default: true
+    },
+    dataListDef: {
+      type: Array,
+      default: () => [] //默认值
+    },
     ids: {
       type: Array,
       default: () => []  //已选id 数组
@@ -133,73 +141,21 @@ export default {
       if (dataList.length === 0 || this.linkageId) {
         let dataSourceCode = this.dataSourceCode
         let typeName = this.typeName
-        this.getData(dataSourceCode).then(res => {
-          let list = []
-          if (this.typeName === 'staff') {
-            list = res.data.list
-          } else {
-            list = res.data
-          }
-
-          if (list == null || list.length <= 0) return
-          let dataList = []
 
-          if (typeName === 'user') {
-            list.forEach(item2 => {
-              let item = {
-                id: item2.id,
-                name: item2.name,
-                code: item2.code,
-
-                checked: false
-              }
-              dataList.push(item)
-            })
-          } else if (this.typeName === 'staff') {
-            list.forEach(item2 => {
+        if(this.dataListDef && this.dataListDef .length > 0){
+          dataList = []
+          if(this.typeName === 'staff' ){
+            this.dataListDef.forEach(item2 => {
               let item = {
                 id: item2.staffId,
                 name: item2.staffName,
                 code: item2.staffCode,
-                jobId: item2.jobId,
-                checked: false
-              }
-              dataList.push(item)
-            })
-          } else if (this.typeName === 'processNode') { //盘点工序
-            list.forEach(item2 => {
-              let item = {
-                id: item2.nodeId,
-                name: item2.nodeName,
-                checked: false
-              }
-              dataList.push(item)
-            })
-
-          } else if (this.typeName === 'modelProduct') { //产品分类
-            list.forEach(item2 => {
-              let item = {
-                id: item2.id,
-                name: item2.name,
-                code: item2.code,
-                checked: false
-              }
-              dataList.push(item)
-            })
 
-          } else {
-            list.forEach(item2 => {
-              let item = {
-                id: item2.id,
-                name: item2.name,
-                code: item2.code,
                 checked: false
               }
               dataList.push(item)
             })
           }
-
-
           let finalList = [...dataList]
           this.dataList_p = dataList
 
@@ -230,8 +186,112 @@ export default {
           } else {
             this.setCheck()
           }
+        }else {
+          this.getData(dataSourceCode).then(res => {
+            let list = []
+            if (this.typeName === 'staff' ) {
+              list = res.data.list
+            } else {
+              list = res.data
+            }
+            if(!this.typeFlag){
+              list = []
+            }
+            if (list == null || list.length <= 0) return
+            let dataList = []
+
+            if (typeName === 'user') {
+              list.forEach(item2 => {
+                let item = {
+                  id: item2.id,
+                  name: item2.name,
+                  code: item2.code,
+
+                  checked: false
+                }
+                dataList.push(item)
+              })
+            } else if (this.typeName === 'staff' ) {
+              list.forEach(item2 => {
+                let item = {
+                  id: item2.staffId,
+                  name: item2.staffName,
+                  code: item2.staffCode,
+                  jobId: item2.jobId,
+                  checked: false
+                }
+                dataList.push(item)
+              })
+            } else if (this.typeName === 'processNode') { //盘点工序
+              list.forEach(item2 => {
+                let item = {
+                  id: item2.nodeId,
+                  name: item2.nodeName,
+                  checked: false
+                }
+                dataList.push(item)
+              })
+
+            } else if (this.typeName === 'modelProduct') { //产品分类
+              list.forEach(item2 => {
+                let item = {
+                  id: item2.id,
+                  name: item2.name,
+                  code: item2.code,
+                  checked: false
+                }
+                dataList.push(item)
+              })
+
+            } else {
+              list.forEach(item2 => {
+                let item = {
+                  id: item2.id,
+                  name: item2.name,
+                  code: item2.code,
+                  checked: false
+                }
+                dataList.push(item)
+              })
+            }
+
+
+            let finalList = [...dataList]
+            this.dataList_p = dataList
+
+            this.finalList = finalList
+            // 如果父级画面的组件需要默认值
+            // 则在调用父级画面使用方法setDefault 给组件赋初始值,默认取第一个值
+            if (this.$parent.setDefault && this.getDataInItFlag) {
+              this.$parent.setDefault(this.typeName, this.dataList_p.size() > 0 ? this.dataList_p[0] : [])
+              //打开侧拉默认选中
+              let ids = [this.dataList_p[0].id]
+
+              this.dataList_p.forEach(it => {
+                if (ids && ids.some(it2 => it2 === it.id)) {
+                  it.checked = true
+                }
+              })
+              let countList = this.dataList_p.filter(res => {
+                return res.checked
+              })
+              if (countList.length === 0) {
+                this.count = 0
+                this.label_title = '可选'
+              } else {
+                this.count = countList.length
+                this.label_title = '已选(' + countList.length + ')'
+              }
+
+            } else {
+              this.setCheck()
+            }
+
+          })
+        }
+
+
 
-        })
 
 
       }
@@ -276,7 +336,7 @@ export default {
         }
       })
       this.dataList_p = dataList
-      console.log('搜搜', this.dataList_p)
+
     },
     /**
      * 焦点离开事件
@@ -384,8 +444,7 @@ export default {
       }
       this.dataList_p = dataList
       this.finalList = finalList
-      console.log(this.dataList_p)
-      console.log(this.finalList)
+=
       this.count = count
       this.label_title = label_title
     },

+ 65 - 16
src/components-app/business/dk-app-single-dropdown/dk-app-single-dropdown.vue

@@ -113,6 +113,10 @@ export default {
       type: Number,
       default: null
     },
+    productId: {
+      type: Number,
+      default: null
+    },
     barCodeId: {
       type: Number,
       default: null
@@ -157,7 +161,7 @@ export default {
         let finalList = [...dataList_Temp]
         this.dataList_p = dataList_Temp
         this.finalList = finalList
-      } else if (this.dataSourceCode === 'defectDeduction') {
+      } else if (this.dataSourceCode === 'defectDeduction' ) {
 
         let dataList_Temp = []
         let list = this.dataListDef
@@ -174,7 +178,7 @@ export default {
         let finalList = [...dataList_Temp]
         this.dataList_p = dataList_Temp
         this.finalList = finalList
-      } else if (this.dataSourceCode === 'dutyFlowNode') { //责任工序
+      } else if (this.dataSourceCode === 'dutyFlowNode' && this.dataListDef.length > 0) { //责任工序
 
         let dataList_Temp = []
         let list = this.dataListDef
@@ -183,8 +187,11 @@ export default {
           item = {
             id: item2.nodeId,
             name: item2.nodeName,
-            jobList: item2.jobList,
-            userList: item2.userList,
+            jobId: item2.jobId,
+            jobName: item2.jobName,
+            userId: item2.userId,
+            userName: item2.userName,
+            clockList: item2.clockList,
             checked: false
           }
           dataList_Temp.push(item)
@@ -192,7 +199,7 @@ export default {
         let finalList = [...dataList_Temp]
         this.dataList_p = dataList_Temp
         this.finalList = finalList
-      } else if (this.dataSourceCode === 'dutyUserCode') { //责任工号
+      } else if (this.dataSourceCode === 'dutyUserCode'  && this.dataListDef.length > 0) { //责任工号
         let dataList_Temp = []
         let list = this.dataListDef
         list.forEach(item2 => {
@@ -207,7 +214,7 @@ export default {
         let finalList = [...dataList_Temp]
         this.dataList_p = dataList_Temp
         this.finalList = finalList
-      } else if (this.dataSourceCode === 'dutyKindWork') { //责任工种
+      } else if (this.dataSourceCode === 'dutyKindWork' && this.dataListDef.length > 0) { //责任工种
         let dataList_Temp = []
         let list = this.dataListDef
         list.forEach(item2 => {
@@ -277,7 +284,13 @@ export default {
             let dataSourceCode = this.dataSourceCode
             let typeName = this.typeName
             this.getdata(dataSourceCode).then(res => {
-              let list = res.data
+              let list = []
+              if(res.data.length > 0){
+                list = res.data
+              }else {
+                list = res.data.list ?  res.data.list : []
+              }
+
               if (list == null || list.length <= 0) return
               let dataList = []
               // 部门
@@ -310,7 +323,7 @@ export default {
                     code: item2.stationCode,
                     checked: false
                   }
-                }else if (this.typeName === 'productClassification') { //产品分级
+                } else if (this.typeName === 'productClassification') { //产品分级
                   item = {
                     id: item2.gradeId,
                     name: item2.gradeName,
@@ -325,6 +338,13 @@ export default {
                     code: item2.rangeNo,
                     checked: false
                   }
+                } else if (this.typeName === 'dutyUserCode') { //工号
+                  item = {
+                    id: item2.userId,
+                    name: item2.userName,
+                    code: item2.userCode,
+                    checked: false
+                  }
                 } else {
                   item = {
                     id: item2.id,
@@ -391,7 +411,6 @@ export default {
      * @param {*} e
      */
     onChangeInput(e) {
-      console.log('过滤数据1', e)
       let finalList = this.finalList
       if (finalList === null || finalList.length === 0) return
       // 复制
@@ -422,7 +441,6 @@ export default {
      * 焦点离开事件
      */
     blurInput(e) {
-      console.log('2', e)
       if (this.dataList.length <= 0) {
         this.reset()
       }
@@ -466,6 +484,12 @@ export default {
       let outputStdSum = ""
       let modelMouldOutput = ""
       let modelProduct = ""
+
+      let jobId = null
+      let jobName = ''
+      let userId = null
+      let userName = ''
+      let clockList = []
       dataList.forEach(item => {
         if (item.checked) {
           ids.push(item.id)
@@ -483,6 +507,11 @@ export default {
           userCode.push(item.userCode)
           jobList = item.jobList
           userList = item.userList
+          jobId = item.jobId
+          jobName = item.jobName
+          userId = item.userId
+          userName = item.userName
+          clockList = item.clockList
         }
       })
       let returnValue = {}
@@ -516,8 +545,11 @@ export default {
         returnValue = {
           ids: ids.join(','),
           names: names.join(','),
-          jobList: jobList,
-          userList: userList,
+          jobId: jobId,
+          jobName: jobName,
+          userId: userId,
+          userName: userName,
+          clockList: clockList,
         }
 
       } else if (this.typeName === 'productClassification') {
@@ -576,22 +608,39 @@ export default {
         param.dataSourceCode = dataSourceCode
         return this.excute(this.$service.commonService, this.$service.commonService.getWorkStation, param)
 
-      }else  if (dataSourceCode === 'wsStation') {//工位打卡- 选择工位
+      } else if (dataSourceCode === 'wsStation') {//工位打卡- 选择工位
         if (this.userId) {
           param.userId = this.userId
         }
         param.dataSourceCode = dataSourceCode
-        return   this.excute(this.$service.commonService, this.$service.commonService.getWsStation, param)
+        return this.excute(this.$service.commonService, this.$service.commonService.getWsStation, param)
 
       } else if (dataSourceCode === 'productClassification') {//产品分级
         param.nodeId = this.flowNodeId
         return this.excute(this.$service.commonService, this.$service.commonService.getProductGrade, param)
 
-      } else if (dataSourceCode === 'dutyFlowNode' || dataSourceCode === 'dutyUserCode' || dataSourceCode === 'dutyKindWork') { //查询责任工序、工号、工种
+      } else if (dataSourceCode === 'dutyFlowNode' ) { //查询责任工序、工号、工种
         param.pdtDefectId = this.pdtDefectId
         param.barCodeId = this.barCodeId
         return this.excute(this.$service.appCollectService, this.$service.appCollectService.getBlameNode, param)
       }
+
+      if (dataSourceCode === 'dutyUserCode') { //工号
+        param.productId = this.productId
+        param.leafFlag = true
+        param.flgValid = true
+        param.limit = 999
+        return this.excute(this.$service.commonService, this.$service.commonService.getUserByPage, param)
+      }
+       if (dataSourceCode === 'dutyKindWork') { //工种
+        param.productId = this.productId
+        param.leafFlag = true
+        param.flgValid = true
+         param.limit = 999
+        return this.excute(this.$service.commonService, this.$service.commonService.getJobByPage, param)
+      }
+
+
       if (dataSourceCode === 'carrierRange') {// 窑车位置
         param.carModelId = null
         return this.excute(this.$service.commonService, this.$service.commonService.getKilnCarPlace, param)
@@ -651,7 +700,7 @@ export default {
     } else if (this.typeName === 'wsStation') {  //工位打卡里的选择工位
       this.dataSourceCode = 'wsStation'
       this.name = '打卡工位'
-    }else if (this.typeName === 'materialType') {
+    } else if (this.typeName === 'materialType') {
       this.dataSourceCode = 'materialType'
       this.name = '原料类型'
     } else if (this.typeName === 'productLogo') { //产品商标

+ 1 - 0
src/config/index.js

@@ -40,6 +40,7 @@ export default {
   sysUuid: '00000002-b4ac-4912-a4c5-0945a775647f',
   appUuid: '6d2208ba-7ca9-41b2-96d3-b39a109ba811',
   appRegistMenuUuid: 'd891a6cc-8a94-47dd-8bda-2cfddee0710f',// pda数据采集的
+  appReportMenuUuid: 'd891a6cc-8a94-47dd-8bda-2cfddee0710f',// pda数据采集的
   redirectUrl: null,
 
   dkMallUrl: 'https://ibossmp.dongkesoft.com:7050/', /* 菜单查询的类型 1:change 2:Enter */

+ 34 - 8
src/view-app/app/piecework-procedure/finish-check/index.vue

@@ -95,7 +95,7 @@
         {{ $t('appRecordProcess') }}
       </dk-app-button>
       <dk-app-button :disabled="loading" @click="saveCollectData" style="margin: 1px">
-        {{ $t('appSave') + (tableRowData.length > 0 ?   '(' + tableRowData.length + ')' : '')}}
+        {{ $t('appSave') + (tableRowData.length > 0 ? '(' + tableRowData.length + ')' : '') }}
       </dk-app-button>
     </div>
 
@@ -292,6 +292,27 @@ export default {
           this.formData.defectNoName = res.data.defectName //缺陷名称
           this.formData.defectFines = res.data.defectFines //赏罚
           this.formData.defectId = res.data.defectId //缺陷id
+          this.getBlameNode(res.data.defectId)
+        }
+      })
+    },
+    /**
+     * @desc   : 获取工序
+     * @author : 于继渤
+     * @date   : 2023/3/21 14:29
+     */
+    getBlameNode(pdtDefectId) {
+      let params = {}
+      params.ftyId = this.$store.state.user.ftyId
+      params.barCode = this.formData.barCode
+      params.barCodeId = this.formData.uniqueId
+      params.flowNodeId = this.formData.flowNodeId
+      params.pdtDefectId = pdtDefectId
+      this.excute(this.$service.appCollectService, this.$service.appCollectService.getBlameNode, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          if (res.data && res.data.length > 0) {
+            this.responsibleProcessList = res.data //工序、工号、工种
+          }
         }
       })
     },
@@ -363,15 +384,20 @@ export default {
         this.$appToast(this.$t('inputWords', {'search-name': this.$t('appDefectCode')}))
         return false;
       }
-      if (!this.formData.defectId) { //验证缺陷编码
-        this.$appDialog.alert({message: this.$t('appDefectNoIsTrue')}).then(res => {
-          this.$refs.defectNo.$refs.input.focus()
-        })
-        return false;
-      }
+      // if (!this.formData.defectId) { //验证缺陷编码
+      //   this.$appDialog.alert({message: this.$t('appDefectNoIsTrue')}).then(res => {
+      //     this.$refs.defectNo.$refs.input.focus()
+      //   })
+      //   return false;
+      // }
       this.$router.push({
         name: 'app-record-process',
-        params: {item: this.formData, tableRowData: this.tableRowData, productionDefectList: this.productionDefectList}
+        params: {
+          item: this.formData,
+          tableRowData: this.tableRowData,
+          productionDefectList: this.productionDefectList,
+          responsibleProcessList: this.responsibleProcessList
+        }
       })
     },
     /**

+ 37 - 9
src/view-app/app/piecework-procedure/half-check/index.vue

@@ -87,7 +87,7 @@
     <div v-if="productionDefectList.length > 0" style="margin: 10px">{{ $t('appDefectInformationDetail') }}</div>
     <!--    历史缺陷明细-->
     <dk-app-table :rows="productionDefectListRows" v-if="productionDefectList.length > 0"
-                  :tableRowData="productionDefectList"     >
+                  :tableRowData="productionDefectList">
     </dk-app-table>
 
 
@@ -305,13 +305,35 @@ export default {
           this.formData.defectNoName = res.data.defectName //缺陷名称
           this.formData.defectFines = res.data.defectFines //赏罚
           this.formData.defectId = res.data.defectId //缺陷id
-
+          this.getBlameNode(res.data.defectId)
           //焦点缺陷号
           //this.$refs.defectNo.$refs.input.focus()
         }
       })
     },
 
+    /**
+     * @desc   : 获取工序
+     * @author : 于继渤
+     * @date   : 2023/3/21 14:29
+     */
+    getBlameNode(pdtDefectId) {
+      let params = {}
+      params.ftyId = this.$store.state.user.ftyId
+      params.barCode = this.formData.barCode
+      params.barCodeId = this.formData.uniqueId
+      params.flowNodeId = this.formData.flowNodeId
+      params.pdtDefectId = pdtDefectId
+      this.excute(this.$service.appCollectService, this.$service.appCollectService.getBlameNode, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          if (res.data && res.data.length > 0) {
+            this.responsibleProcessList = res.data //工序、工号、工种
+          }
+        }
+      })
+    },
+
+
     // endregion
 
     //region 控件 回调
@@ -380,15 +402,20 @@ export default {
         this.$appToast(this.$t('inputWords', {'search-name': this.$t('appDefectCode')}))
         return false;
       }
-      if (!this.formData.defectId) { //验证缺陷编码
-        this.$appDialog.alert({message: this.$t('appDefectNoIsTrue')}).then(res => {
-          this.$refs.defectNo.$refs.input.focus()
-        })
-        return false;
-      }
+      // if (!this.formData.defectId) { //验证缺陷编码
+      //   this.$appDialog.alert({message: this.$t('appDefectNoIsTrue')}).then(res => {
+      //     this.$refs.defectNo.$refs.input.focus()
+      //   })
+      //   return false;
+      // }
       this.$router.push({
         name: 'app-record-process',
-        params: {item: this.formData, tableRowData: this.tableRowData, productionDefectList: this.productionDefectList}
+        params: {
+          item: this.formData,
+          tableRowData: this.tableRowData,
+          productionDefectList: this.productionDefectList,
+          responsibleProcessList: this.responsibleProcessList
+        }
       })
     },
     /**
@@ -463,6 +490,7 @@ export default {
      * @date   : 2023/2/10 11:46
      */
     validData(flag) {
+
       // 生产工号不能为空
       if (!this.formData.prodUserId) {
         this.$appToast((this.$t('appProductionJobNumbeWrong')));

+ 75 - 20
src/view-app/app/piecework-procedure/half-check/record-process.vue

@@ -88,24 +88,22 @@
     <!-- 责任工序-->
     <dk-app-single-dropdown typeName="dutyFlowNode" :show="dutyFlowNodeFlag" :pdtDefectId="pdtDefectId"
                             :barCodeId="barCodeId" :dataListDef="responsibleProcessList"
-
+                            :ids="[formData.responsibleProcessId]"
                             @mutiClose="singleClose('dutyFlowNode')"
                             @mutiCommit="singleCommit($event,'dutyFlowNode')"></dk-app-single-dropdown>
     <!-- 责任工号-->
-    <dk-app-single-dropdown typeName="dutyUserCode" :show="dutyUserCodeFlag" :pdtDefectId="pdtDefectId"
-                            :barCodeId="barCodeId" :dataListDef="userList"
-
+    <dk-app-single-dropdown typeName="dutyUserCode" :show="dutyUserCodeFlag" :productId="formData.uniqueId"
+                            :dataListDef="userList"
+                            :ids="[formData.userId]"
                             @mutiClose="singleClose('dutyUserCode')"
                             @mutiCommit="singleCommit($event,'dutyUserCode')"></dk-app-single-dropdown>
     <!-- 责任工种-->
-    <dk-app-single-dropdown typeName="dutyKindWork" :show="dutyKindWorkFlag" :pdtDefectId="pdtDefectId"
-                            :barCodeId="barCodeId" :dataListDef="jobList"
-
+    <dk-app-single-dropdown typeName="dutyKindWork" :show="dutyKindWorkFlag" :productId="formData.uniqueId"
                             @mutiClose="singleClose('dutyKindWork')"
                             @mutiCommit="singleCommit($event,'dutyKindWork')"></dk-app-single-dropdown>
     <!-- 责任员工-->
-    <dk-app-muti-dropdown typeName="staff" :show="staffFlag"
-                          @mutiClose="mutiClose('staff')"
+    <dk-app-muti-dropdown typeName="staff" :show="staffFlag" :ids="formData.staffIds" :typeFlag="false"
+                          @mutiClose="mutiClose('staff')" :dataListDef="clockList"
                           @mutiCommit="mutiCommit($event,'staff')"></dk-app-muti-dropdown>
     <!-- 加载页面   -->
     <dk-app-loading :loading="loading"></dk-app-loading>
@@ -121,6 +119,9 @@ export default {
   mixins: [appFormMixin],
   data() {
     return {
+      clockListIds: [],
+      clockList: [],
+      productId: null,
       defectDeductionFlag: false, //缺陷扣罚标识
       dutyFlowNodeFlag: false, //责任工序
       dutyUserCodeFlag: false, //责任工号
@@ -157,6 +158,7 @@ export default {
       this.excute(this.$service.appCommonService, this.$service.appCommonService.getCheckPlaceCode, params).then(res => {
         if (res.data) {
           this.formData.placeId = res.data.placeId
+          this.getBlameNode()
         }
       })
     },
@@ -166,13 +168,12 @@ export default {
      * @author : 于继渤
      * @date   : 2023/3/15 8:47
      */
-    getBlameNode(pdtDefectId) {
+    getBlameNode() {
       let params = {}
       params.ftyId = this.$store.state.user.ftyId
       params.barCode = this.formData.barCode
       params.barCodeId = this.formData.uniqueId
       params.flowNodeId = this.formData.flowNodeId
-      params.pdtDefectId = pdtDefectId
       this.excute(this.$service.appCollectService, this.$service.appCollectService.getBlameNode, params).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
           if (res.data && res.data.length > 0) {
@@ -182,6 +183,34 @@ export default {
       })
     },
 
+    /**
+     * @desc   : 获取责任员工
+     * @author : 于继渤
+     * @date   : 2023/3/21 14:19
+     */
+    getTeamStaff() {
+      let params = {}
+      params.ftyId = this.$store.state.user.ftyId
+      params.userId = this.formData.userId
+      this.excute(this.$service.commonService, this.$service.commonService.getTeamStaff, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+
+          if (res.data.list && res.data.list.length > 0) {
+            this.clockList = res.data.list
+            let ids = []
+            let names = []
+            res.data.list.forEach(it => {
+              ids.push(it.staffId)
+              names.push(it.staffName)
+            })
+            this.formData.staffIds = ids
+            this.formData.staffNames = names.join(',')
+          }
+
+        }
+      })
+    },
+
     // region 控件 回调
 
     /**
@@ -194,22 +223,36 @@ export default {
         this.formData.defectDeductionId = Number(e.ids)
         this.formData.defectDeductionName = e.names
         this.formData.deductNum = Number(e.deductNum)
-        if (Number(e.ids)) {
-          // 查询责任工序、工号、工种
-          this.getBlameNode(Number(e.ids))
-        }
+
       }
       if (typeName === 'dutyFlowNode') {  //责任工序
         this.formData.responsibleProcessId = e.ids
         this.formData.responsibleProcess = e.names
-        this.jobList = e.jobList
-        this.userList = e.userList
-        this.formData.jobId = 0
+
+        this.clockList = e.clockList
+        let staffNamesTemp = []
+        let staffIdsTemp = []
+        e.clockList.forEach(it => {
+          staffIdsTemp.push(it.staffId)
+          staffNamesTemp.push(it.staffName)
+
+        })
+        this.formData.staffNames = staffNamesTemp.join(',')
+        this.formData.staffIds = staffIdsTemp
+
+        this.formData.userId = e.userId
+        this.formData.userName = e.userName
+        this.formData.jobId = e.jobId
+        this.formData.jobName = e.jobName
       }
 
       if (typeName === 'dutyUserCode') {  //责任工号
         this.formData.userId = Number(e.ids)
         this.formData.userName = e.names
+        if (Number(e.ids)) {
+          this.getTeamStaff()
+        }
+
       }
 
       if (typeName === 'dutyKindWork') {  //责任工种
@@ -334,7 +377,7 @@ export default {
       }
       //校验缺陷信息位置重复数据
       for (let i = 0; i < this.tableRowData.length; i++) {
-        if (this.tableRowData[i].placeId === this.formData.placeId && this.tableRowData[i].defectId ===this.formData.defectId ) {
+        if (this.tableRowData[i].placeId === this.formData.placeId && this.tableRowData[i].defectId === this.formData.defectId) {
           this.$appDialog.alert({message: this.$t('appDataDuplication')}).then(res => {
             this.formData.placeCode = ''
             this.formData.placeId = null
@@ -345,7 +388,7 @@ export default {
       }
       //校验缺陷明细位置重复数据
       for (let i = 0; i < this.productionDefectList.length; i++) {
-        if (this.productionDefectList[i].pdtPlaceId === this.formData.placeId && this.productionDefectList[i].prodDefectId ===this.formData.defectId ) {
+        if (this.productionDefectList[i].pdtPlaceId === this.formData.placeId && this.productionDefectList[i].prodDefectId === this.formData.defectId) {
           this.$appDialog.alert({message: this.$t('appDataDuplication')}).then(res => {
             this.formData.placeCode = ''
             this.formData.placeId = null
@@ -383,6 +426,15 @@ export default {
      */
     saveCollectData() {
       if (this.validData()) {
+        if(this.clockList && this.clockList.length > 0){
+          this.clockList.forEach(res => {
+            this.formData.blameStaff.push(
+              {
+                blameStaffId:res.staffId
+              }
+            )
+          })
+        }
         localStorage.setItem("app-record-process-data", JSON.stringify(this.formData))
         this.$router.go(-1)
       }
@@ -411,6 +463,9 @@ export default {
     if (this.$route.params.productionDefectList) {
       this.productionDefectList = this.$route.params.productionDefectList
     }
+    if (this.$route.params.responsibleProcessList) {
+      this.responsibleProcessList = this.$route.params.responsibleProcessList
+    }
   }
 }
 </script>

+ 40 - 28
src/view-app/app/piecework-procedure/register/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <!--  计件工序(单点 和 集中)     功能(functionCode) index : 预干(0101) 打磨(0102) 擦洗(0103) 施釉(0104) -->
+  <!--  计件工序(单点 和 集中)     -->
   <div class="main-app-form">
     <!-- 顶部导航栏 -->
     <dk-app-nav-bar :title="appActiveTitle"
@@ -30,7 +30,7 @@
                     (opnKind ==$config.processType.unloadKilnCar?$t('unloadKilnCar'):
                     (opnKind ==$config.processType.kilnCode?$t('vehicleCode'):$t('newCarCode'))
                     )"
-      :readonly ="(opnKind && (opnKind ==$config.processType.exchangeKilnCar ||opnKind ==$config.processType.dressKilnCar) && tableRowData.length>0)"
+      :readonly="(opnKind && (opnKind ==$config.processType.exchangeKilnCar ||opnKind ==$config.processType.dressKilnCar) && tableRowData.length>0)"
       ref="carCode"
       v-model="formData.carCode"
       @changeBarCode="onCarCode('carCode')"
@@ -57,7 +57,7 @@
     <div ref="scrollTable" class="main-app-table">
       <div v-if="tableRowData.length>0" style="margin: 10px">{{ $t('appProductInformation') }}</div>
       <!--    列表-->
-      <dk-app-table :rows="rows" :tableRowData="tableRowData" >
+      <dk-app-table :rows="rows" :tableRowData="tableRowData">
       </dk-app-table>
     </div>
     <!--  保存按钮 (集中才可以显示)-->
@@ -168,14 +168,13 @@ export default {
 
             this.IsPieceSingleFlag = false;
           }
-          if (!this.userKind || this.userKind == this.$config.operationUserType.produceUse) {//生产工号是只读得状态
-            // 焦点 优先给到 原载具 没有原载具就给到载具码 没有载具码 就给到生产条码
-            if (this.opnKind && (this.opnKind == this.$config.processType.exchangeKilnCar)) {
-              this.setFocus("productCode") //焦点给到原载具
-            } else if (this.opnKind && (this.opnKind != this.$config.processType.productCode)) {
+
+          if (!this.userKind || this.userKind == this.$config.operationUserType.produceUser) {//生产工号是只读得状态
+            // 焦点 优先给到 载具码   载具码不显示得话 焦点给到产品条码
+            if (this.opnKind && (this.opnKind != this.$config.processType.productCode)) {
               this.setFocus("carCode")     //焦点给到载具码
-            } else if (this.opnKind && (this.opnKind == this.$config.processType.productCode || this.opnKind == this.$config.processType.dressKilnCar)) {
-              this.setFocus("barCode")     //焦点给到产品条码
+            }   else if (this.opnKind && (this.opnKind == this.$config.processType.productCode || this.opnKind == this.$config.processType.dressKilnCar)) {
+              this.setFocus("barCode")     //焦点
             }
           } else {
             //接收参数
@@ -222,19 +221,17 @@ export default {
       this.excute(this.$service.appCollectService, this.$service.appCollectService.checkProdUserCode, params, 'queryUser').then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
           this.formData.prodUserId = parseInt(res.data)
-          // 焦点 优先给到 原载具 没有原载具就给到载具码 没有载具码 就给到生产条码
-          if (this.opnKind && (this.opnKind == this.$config.processType.exchangeKilnCar)) {
-            this.setFocus("productCode") //焦点给到原载具
-          } else if (this.opnKind && (this.opnKind != this.$config.processType.productCode)) {
+          // 焦点 优先给到 载具码   载具码不显示得话 焦点给到产品条码
+          if (this.opnKind && (this.opnKind != this.$config.processType.productCode)) {
             this.setFocus("carCode")     //焦点给到载具码
-          } else if (this.opnKind && (this.opnKind == this.$config.processType.productCode || this.opnKind == this.$config.processType.dressKilnCar)) {
-            this.setFocus("barCode")     //焦点给到产品条码
+          }   else if (this.opnKind && (this.opnKind == this.$config.processType.productCode || this.opnKind == this.$config.processType.dressKilnCar)) {
+            this.setFocus("barCode")     //焦点
           }
         }
       })
     },
     /**
-     * @desc   : 产品条码失焦事件
+     * @desc   : 产品条码扫描
      * @author : 王英杰
      * @date   : 2023/2/10 9:16
      */
@@ -299,22 +296,26 @@ export default {
               this.opnKind == this.$config.processType.kilnCode) {
               this.tableRowData = res.data.productList
               //单品并且不是装载具触发保存
-              if (this.$config.registerType.singleProduct == this.pieceKind &&  this.$config.processType.dressKilnCar != this.opnKind) {
+              if (this.$config.registerType.singleProduct == this.pieceKind && this.$config.processType.dressKilnCar != this.opnKind) {
                 this.barCodeList = []
                 this.barCodeList.push(this.formData.barCode)
                 this.save()
               }
             }
-            if (type == "productCode") { //如果有原载具 那么就一定有新载具 故焦点给到新载具上
-              this.setFocus("carCode")
-            } else if (this.opnKind && (this.opnKind == this.$config.processType.productCode || this.opnKind == this.$config.processType.dressKilnCar)) {
-              //新载具调完接口 如果 产品条码存在 把焦点给到产品条码
+            if (type == "carCode") { //新载具 完事后 原载具存在 焦点给原 不存在给到产品条码
+              if (this.opnKind && (this.opnKind == this.$config.processType.exchangeKilnCar)) {
+                this.setFocus("productCode") //焦点给到原载具
+              } else {
+                this.setFocus("barCode")
+              }
+            } else if (type == "productCode") {//如果是原载具 下面是 产品条码
               this.setFocus("barCode")
             }
+
           }
 
         })
-       }
+      }
     },
 
     /**
@@ -393,13 +394,24 @@ export default {
       if (!this.IsPieceSingleFlag) {
         this.tableRowData = []
       }
-      if((this.opnKind == this.$config.processType.unloadKilnCar )
-        ||(this.opnKind == this.$config.processType.kilnCode )){//卸载具 载具码  清载具码
-          this.formData.carCode = ""    //模具码
+      if ((this.opnKind == this.$config.processType.unloadKilnCar)
+        || (this.opnKind == this.$config.processType.kilnCode)) {//卸载具 载具码  清载具码
+        this.formData.carCode = ""    //模具码
       }
       this.barCodeList = []
-      this.setFocus("prodUser") //保存完事 焦点回落到生产工号
-      //todo  焦点问题
+      // 下面是焦点问题
+      if (!this.userKind || this.userKind == this.$config.operationUserType.produceUser) {//生产工号是只读得状态
+        // 焦点 优先给到 载具码   载具码不显示得话 焦点给到产品条码
+        if (this.opnKind && (this.opnKind != this.$config.processType.productCode)) {
+          this.setFocus("carCode")     //焦点给到载具码
+        }   else if (this.opnKind && (this.opnKind == this.$config.processType.productCode || this.opnKind == this.$config.processType.dressKilnCar)) {
+          this.setFocus("barCode")     //焦点
+        }
+      } else {
+        //接收参数
+        this.setFocus("prodUser") //集中得话 保存之后 焦点给到生产工号
+      }
+
     },
     /**
      * @desc   : 给参数赋值

+ 148 - 3
src/view-app/main/mine.vue

@@ -1,16 +1,161 @@
 <template>
   <!--app主页-我的-->
-  <div>
-我的
+  <div class="menu-box">
+    <div class="head">
+      <!-- logo -->
+      <div style="display: flex;align-items: center;">
+        <van-image style="width: 150px;height: 33px; margin: 20px " :src="hgLogon"></van-image>
+      </div>
+      <div class="nick-name" style="display: flex;align-items: center; margin: 20px">
+        <van-image
+          round
+          width="60"
+          height="60"
+          :src="userImg"
+        />
+        <div style="margin-left: 20px">
+          {{ userName }}
+        </div>
+      </div>
+    </div>
+
+
+    <div style="background-color:#f8f9fd;border-radius:20px 20px 0px 0px; ">
+      <div style="height: 18px;"></div >
+      <div class="todo-view">
+        <div class="todo-view-title">待办工作</div >
+        <div class="todo-view-app">
+
+
+
+        </div >
+      </div >
+
+
+
+
+
+
+      <div style="height: 20px;"></div >
+
+    </div >
   </div>
 </template>
 
 <script>
 export default {
-  name: "mini"
+  name: "mini",
+  data() {
+    return {
+      hgLogon: require('@/assets/images/app-image/hg-logo.png'),
+      userName: this.$store.state.user.userName,
+      userImg: require('@/assets/images/app-image/icon_role.png'),
+    }
+  },
 }
 </script>
 
 <style scoped>
+.menu-box {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  background: white;
+}
+
+.head {
+  z-index: 1;
+  height: 192px;
+  width: 100%;
+  background: #1B365D;
+}
+
+.head-center {
+  position: absolute;
+  width: 39px;
+  height: 40px;
+  top: 102px;
+}
+
+.nick-name {
+  width: 70% !important;
+  position: absolute;
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 600;
+  font-size: 16px;
+  line-height: 23px;
+  color: #FFFFFF;
+}
+
+.todo-view {
+  margin-left: 17px;
+  width: calc(100% - 34px  );
+  background: #FFFFFF;
+  box-shadow: 0px 10px 20px rgba(225, 229, 238, 0.6);
+  border-radius: 8px;
+  padding: 12px;
+  /* margin-top: 35rpx; */
+  z-index: 2;
+}
+
+.todo-view-title {
+  font-style: normal;
+  font-weight: 500;
+  font-size: 16px;
+  font-family: 'PingFang SC';
+}
+
+.todo-view-app {
+  padding-top: 12px;
+  display: -webkit-box;
+  overflow: auto;
+  width: 100%;
+}
+
+.todo-view-app-item {
+  width: 25%;
+  display: grid;
+  justify-items: center;
+}
+
+.todo-view-app-item-icon {
+  width: 33px;
+  height: 33px;
+  /* background-color: #B280E4; */
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 50%;
+  position: relative;
+}
+
+.todo-view-app-item-icon-tip {
+  position: absolute;
+  width: 13px;
+  height: 1px;
+  top: -3px;
+  right: -3px;
+  font-size: 9px;
+  font-family: 'PingFang SC';
+  background: #FF594E;
+  border: 1px solid #FFFFFF;
+  border-radius: 50%;
+  color: #fff;
+  text-align: center;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 
+.todo-view-app-item-name {
+  font-style: normal;
+  font-weight: 400;
+  font-size: 14px;
+  font-family: 'PingFang SC';
+  /* font-family: 'SimSun'; */
+  color: #1B365D;
+  margin-top: 5px;
+}
 </style>

+ 116 - 50
src/view-app/main/report.vue

@@ -1,128 +1,189 @@
 <template>
   <!--app主页-报表-->
-  <div class="main-app">
+  <div>
     <div class="menu-box">
       <div style="width:32%;background:white;">
         <!-- 顶部下拉-->
         <van-dropdown-menu>
-          <van-dropdown-item id="functionItem" title-class="title-class" v-model="value1" :options="optionFunc">
-            <dk-app-dropdown-switch></dk-app-dropdown-switch>
+          <van-dropdown-item ref="functionItem" title-class="title-class" :title="functionalPartition">
+            <dk-app-dropdown-switch :data-list="optionFunc" @commit='dropdowncommit'></dk-app-dropdown-switch>
           </van-dropdown-item>
         </van-dropdown-menu>
       </div>
       <!-- 顶部搜索-->
       <div style="width:69%;background:white;display:flex; align-items: center;">
-        <dk-app-search :placeholder="placeholder"></dk-app-search>
+        <dk-app-search v-model="allCondition"
+                       @search="filterFunction" :placeholder="placeholder"></dk-app-search>
       </div>
     </div>
-    <div class="panel-class" v-for="(item,index) in regions" v-if="hasAuth(functionRegions,item.menuName)">
-      <!--  模块名称-->
-      <div class="app-name">{{ item.menuName }}</div>
-      <div style="background: #fff;border-radius: 7px;">
-        <div style="display: flex;flex-wrap: wrap;padding: 21px 0px;align-items: center;">
-          <div class="app-item" v-for="(item2,index2) in functionItems"
-               v-if="item.menuUuid==item2.parentUuid" @click="toApp(item2.objectCode,item2.objectCode)"
-               style="width:25%;text-align: center;" icon-class="index-grid-item-icon-class"
-               text-class="index-grid-item-text-class" content-class="index-grid-item-class">
-            <van-image width="40" height="40" :src="(item2.ImageUri)"/>
-            <div class="index-grid-item-text-class">{{ item2.menuName }}</div>
+    <div :style="{height:(tableHeight-60-60-60)+'px'}" style="width: 100%; overflow-y: auto;overflow-x: hidden;">
+      <div class="panel-class" v-for="(item,index) in regions" v-if="hasAuth(functionRegions,item.menuName)">
+        <!--  模块名称-->
+        <div class="app-name">{{ item.menuName }}</div>
+        <div style="background: #fff;border-radius: 7px;">
+          <div style="display: flex;flex-wrap: wrap;padding: 21px 0px;align-items: flex-start;  ">
+            <div class="app-item" v-for="(item2,index2) in functionItems" :id="'btn' + index + '-' + index2"
+                 v-if="item.menuUuid==item2.parentUuid" @click="toApp(item2.objectCode,item2.objectCode, 'btn' + index + '-' + index2)"
+                 style="width:25%;text-align: center; " icon-class="index-grid-item-icon-class"
+                 text-class="index-grid-item-text-class" content-class="index-grid-item-class">
+              <van-image width="40" height="40" :src="(item2.ImageUri)"/>
+              <div class="index-grid-item-text-class  van-grid-item__text">{{ item2.menuName }}</div>
+            </div>
+
           </div>
 
         </div>
-
       </div>
     </div>
+
   </div>
 </template>
 
 <script>
+import {localRead, localSave,localRemove} from "@/libs/base/util";
+import {mapMutations} from "vuex";
+
 export default {
   name: "report",
   data() {
+    const vm = window.vm;
     return {
+      vm: vm,
       // 选择值
       value1: 0,
+      //搜索菜单
+      allCondition: '',
+      // 功能区分
+      functionalPartition: this.$t('appFunctionalPartition'),
       // placeholder
       placeholder: this.$t('appSearchMenu'),
       // 选择值
-      optionFunc: [
-        {text: this.$t('appFunctionalPartition'), value: 0}
-      ],
+      optionFunc: [],
       //功能分类-大功能模块
       regions: [],
       //功能分类-大功能模块-页面
       functionItems: [],
       // 区域
       functionRegions: [],
+      // 列表的高度
+      tableHeight: 667,
+      //图标的id,当出现滚动条时候,定位到当前可是区域的位置
+      btnId: null
     }
   },
-  methods:{
+  methods: {
+    ...mapMutations([
+      'setTagNavList',
+    ]),
+
+    /**
+     * @desc   : 验证权限
+     * @author : 姜永辉
+     * @date   : 2023/2/17 10:28
+     */
+    hasAuth(array, auth) {
+      return array.indexOf(auth) !== -1;
+    },
+
+    /**
+     * @desc   : 功能跳转
+     * @author : 姜永辉
+     * @date   : 2023/2/17 10:29
+     */
+    toApp(url, FunctionCode, btnId) {
+      this.btnId = btnId
+      let route = {name: url, params: {FunctionCode: FunctionCode}, meta: {notCache: false}}
+      // 功能跳转
+      this.$router.push(route)
+    },
+
+    /**
+     * @desc   : 选择下拉后查询
+     * @author : 姜永辉
+     * @date   : 2023/3/3 9:04
+     */
+    dropdowncommit(e) {
+      this.functionRegions = e.dataList
+      this.$refs.functionItem.toggle();
+    },
+
     /**
-     * @desc   : 获取常用功能的菜单
-     * @author : jyh
-     * @date   : 2022/8/22 10:47
+     * @desc   : 过滤菜单
+     * @author : 姜永辉
+     * @date   : 2023/3/3 9:27
      */
-    getCommonMenu() {
+    filterFunction() {
       let menuList = [...this.$store.state.app.menuList]
+      let searchtext = this.allCondition
+      this.optionFunc = []
+      this.functionItems = []
+      this.regions = []
+      this.functionRegions = []
       //默认是一行数据
       if (menuList && menuList.length > 0) {
         let funcList = []
         menuList.forEach(itMenu => {
-          let funcItem = {}
           // 查询子级
           if (itMenu.children && itMenu.children.length > 0) {
             itMenu.children.forEach(it => {
               // 导航的管理模块
-              this.regions.push(it)
-              this.functionRegions.push(it.menuName)
+              // 排除数据采集 和报表的模块
+              if (it.menuUuid != this.$config.appRegistMenuUuid) {
+                return;
+              }
+              let tmpFunctionItems = []
               // 如果还有子级,需要去查询子级
               if (it.children && it.children.length > 0) {
                 if (it.children && it.children.length > 0) {
                   it.children.forEach(c => {
+                    if (c.menuName.indexOf(searchtext) < 0) {
+                      // 没有查到 数据
+                      return
+                    }
                     // 主页显示图标
-                    if (c.fastImage){
+                    if (c.fastImage) {
                       c.ImageUri = require("@/assets/images/app-image/" + c.fastImage + "\.png")
                     }
-                    if (c.flgRight){
+                    if (c.flgRight) {
                       this.functionItems.push(c)
+                      tmpFunctionItems.push(c)
                     }
                   })
                 }
               }
+              // 查到子集后将管理模块的名称加入
+              if (tmpFunctionItems.size() > 0){
+                this.regions.push(it)
+                let functionRegionItem = {
+                  text: it.menuName,
+                  checked: true,
+                }
+                this.optionFunc.push(functionRegionItem)
+                this.functionRegions.push(it.menuName)
+              }
             })
           }
         })
       }
     },
 
-    /**
-     * @desc   : 验证权限
-     * @author : 姜永辉
-     * @date   : 2023/2/17 10:28
-     */
-    hasAuth(array, auth) {
-      return array.indexOf(auth) !== -1;
-    },
-
-    /**
-     * @desc   : 功能跳转
-     * @author : 姜永辉
-     * @date   : 2023/2/17 10:29
-     */
-    toApp(url, FunctionCode) {
-      // 功能跳转
-      this.$router.push({name: url, params: {FunctionCode: FunctionCode}})
-    },
   },
   created() {
+    this.tableHeight = window.screen.height;
     // 获取常用功能的菜单
-    //this.getCommonMenu()
+    this.filterFunction()
+  },
+  activated() {
+    // 表示元素的底部与当前区域的可见部分的尾部对齐(前提是当前区域可滚动)
+    if (this.btnId) {
+      document.getElementById(this.btnId).scrollIntoView(false)
+    }
   }
 
 }
 </script>
 
-<style scoped>
+<style lang="scss">
 
 .menu-box {
   width: 100%;
@@ -152,6 +213,11 @@ export default {
 }
 
 .app-item:nth-child(n+5) {
-  margin-top: 25px;
+  margin-top:  20px;
+}
+
+.title-class {
+  font-size: 16px !important;
+  color: #2E3853 !important;
 }
 </style>