wangqiang 2 роки тому
батько
коміт
31eb5df4ce

+ 8 - 0
src/api/notify/NotifyService.js

@@ -17,6 +17,14 @@ export default class NotifyService {
     })
   }
 
+  close (id) {
+    return request({
+      url: '/notify/close',
+      method: 'delete',
+      params: {id: id}
+    })
+  }
+
   queryById (id) {
     return request({
       url: `/notify/queryById`,

+ 4 - 0
src/views/modules/flowable/task/TaskForm.vue

@@ -469,6 +469,8 @@
       // Process_1665383385070 评估-报销申请
       // Process_1665628043339 评估-发票作废
       // Process_1665458731435 评估-发票申请
+      // Process_1669961023358 物资管理-采购申请
+      // Process_1672729521837 物资管理-领用申请
       // Process_1673332958749 财务-报告签章-实体章
       // 驳回
       reject (vars) {
@@ -497,6 +499,8 @@
           this.procDefId.includes('Process_1665383385070') ||
           this.procDefId.includes('Process_1665628043339') ||
           this.procDefId.includes('Process_1665458731435') ||
+          this.procDefId.includes('Process_1669961023358') ||
+          this.procDefId.includes('Process_1672729521837') ||
           this.procDefId.includes('Process_1673332958749')
         ) {
           console.log('进入新版驳回')

+ 58 - 5
src/views/modules/materialManagement/collect/CollectForm.vue

@@ -430,6 +430,16 @@
           })
         }
       },
+      reapplyForm (callback) {
+        this.collectService.findById(this.inputForm.id).then(({data}) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startForm(callback)
+          }
+        })
+      },
       // 暂存
       async saveForm (callback) {
         this.loading = true
@@ -535,12 +545,55 @@
         })
       },
       // 修改状态
-      updateStatusById (type) {
-        if (type === 'reject') {
-          this.inputForm.status = '4'
-          this.collectService.updateStatusById(this.inputForm)
+      async updateStatusById (type, callback) {
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          if (type === 'reject' || type === 'reback') {
+            this.collectService.findById(this.inputForm.id).then(({data}) => {
+              if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                if (type === 'reject') {
+                  // 驳回
+                  this.inputForm.status = '4'
+                }
+                if (type === 'reback') {
+                  // 撤回
+                  this.inputForm.status = '3'
+                }
+                if (type === 'reject' || type === 'reback') {
+                  let param = {status: this.inputForm.status, id: this.inputForm.id}
+                  this.collectService.updateStatusById(param).then(() => {
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.collectService.findById(this.inputForm.id).then(({data}) => {
+              if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                let param = {status: '1', id: this.inputForm.id}
+                this.collectService.updateStatusById(param).then(() => {
+                  callback()
+                })
+              }
+            })
+          }
         }
       },
+      // updateStatusById (type) {
+      //   if (type === 'reject') {
+      //     this.inputForm.status = '4'
+      //     this.collectService.updateStatusById(this.inputForm)
+      //   }
+      // },
       // footerMethod ({ columns, data }) {
       //   const footerData = [
       //     columns.map((column, columnIndex) => {
@@ -682,7 +735,7 @@
             return
           }
           if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].collectNumber)) {
-            if (this.inputForm.detailInfos[j].surplusNumber < this.inputForm.detailInfos[j].collectNumber) {
+            if (parseFloat(this.inputForm.detailInfos[j].surplusNumber) < parseFloat(this.inputForm.detailInfos[j].collectNumber)) {
               this.$message.error('领用数量不能大于剩余数量')
               this.inputForm.detailInfos[j].collectNumber = ''
               return

+ 22 - 15
src/views/modules/materialManagement/collect/CollectList.vue

@@ -9,18 +9,19 @@
         <el-input size="small" v-model="searchForm.goodsName" placeholder="请输入领用物品名称" clearable></el-input>
       </el-form-item>
       <el-form-item label="经办人" prop="handledBy">
-        <SelectUserTree
-          ref="companyTree"
-          :props="{
-                  value: 'id',             // ID字段名
-                  label: 'name',         // 显示名称
-                  children: 'children'    // 子级字段名
-                }"
-          :url="`/sys/user/treeUserDataAllOffice?type=2`"
-          :value="searchForm.handledBy"
-          :clearable="true"
-          :accordion="true"
-          @getValue="(value) => {searchForm.handledBy=value}"/>
+        <UserSelect :limit='1' :userName="searchForm.handledBy" @getValue='(value, label) => {searchForm.handledBy = label}'></UserSelect>
+<!--        <SelectUserTree-->
+<!--          ref="companyTree"-->
+<!--          :props="{-->
+<!--                  value: 'id',             // ID字段名-->
+<!--                  label: 'name',         // 显示名称-->
+<!--                  children: 'children'    // 子级字段名-->
+<!--                }"-->
+<!--          :url="`/sys/user/treeUserDataAllOffice?type=2`"-->
+<!--          :value="searchForm.handledBy"-->
+<!--          :clearable="true"-->
+<!--          :accordion="true"-->
+<!--          @getValue="(value) => {searchForm.handledBy=value}"/>-->
       </el-form-item>
       <el-form-item  prop="handledByOffice" label="经办人部门">
         <SelectTree
@@ -126,6 +127,7 @@
 </template>
 
 <script>
+  import UserSelect from '@/components/userSelect'
   import CollectService from '@/api/materialManagement/CollectService'
   import UpdateCollectInfoForm from './UpdateCollectInfoForm'
   import InputNumber from '@/views/modules/cw/workContract/InputNumber.vue'
@@ -175,6 +177,7 @@
       this.userService = new UserService()
     },
     components: {
+      UserSelect,
       InputNumber,
       SelectUserTree,
       SelectTree,
@@ -284,6 +287,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionAuditId,
                 procDefKey: this.procDefAuditKey,
                 status: 'startAndHold',
@@ -304,8 +308,10 @@
         let title = `发起流程【领用申请】`
         let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[领用申请]`
         let status = 'startAndHold'
-        if (row.status === '3' || row.status === '4') {
+        if (row.status === '3') {
           status = 'startAndClose'
+        } else if (row.status === '4') {
+          status = 'reapplyFlag'
         }
         this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
           businessId: row.id,
@@ -313,6 +319,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionAuditId,
                 procDefKey: this.procDefAuditKey,
                 title: title,
@@ -339,13 +346,13 @@
             this.$router.push({
               path: '/flowable/task/TaskFormDetail',
               query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 isShow: 'false',
                 readOnly: true,
                 title: '质控管理' + '流程详情',
                 formTitle: '质控管理' + '流程详情',
                 businessId: row.id,
-                status: 'reback',
-                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+                status: 'reback'
               }
             })
           })

+ 5 - 2
src/views/modules/materialManagement/collect/PurchasePageForm.vue

@@ -87,7 +87,8 @@
         dataList: [],
         searchForm: {
           wareHouseType: ''
-        }
+        },
+        typeTest: ''
       }
     },
     collectService: null,
@@ -101,6 +102,7 @@
     methods: {
       init (collectType) {
         this.visible = true
+        this.typeTest = collectType
         this.list(collectType)
       },
       // 表单提交
@@ -117,7 +119,7 @@
         this.loading = true
         // this.searchForm.createId = this.$store.state.user.id
         // this.searchForm.status = '5'
-        this.searchForm.wareHouseType = collectType
+        this.searchForm.wareHouseType = this.typeTest
         this.collectService.wareHouseList({
           'current': this.tablePage.currentPage,
           'size': this.tablePage.pageSize,
@@ -142,6 +144,7 @@
       close () {
         this.$refs.searchForm.resetFields()
         this.visible = false
+        this.typeTest = ''
       }
     }
   }

+ 77 - 97
src/views/modules/materialManagement/purchase/PurchaseForm.vue

@@ -227,18 +227,15 @@
 
 <script>
   import UserSelect from '@/components/userSelect'
-  // import UpLoadComponentDialog from '@/views/common/UpLoadComponentDialog'
+  import CommonApi from '@/api/cw/common/CommonApi'
   import MaterialManagementDialog from '../file/MaterialManagementDialog'
-  // import ReimbursementApprovalService from '@/api/cw/reimbursementApproval/ReimbursementApprovalService'
   import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
-  // import ReimbursementApprovalTypeService from '@/api/cw/reimbursementApproval/ReimbursementApprovalTypeService'
   import UpLoadComponent from '@/views/common/UpLoadComponent'
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
   import XEUtils from 'xe-utils'
   import UserService from '@/api/sys/UserService'
   import CwProgramPageForm from '@/views/modules/cw/reimbursementApproval/info/CwProgramPageForm'
-  // import CwReimbursementTypePullForm from '@/views/modules/cw/reimbursementApproval/info/CwReimbursementTypePullForm'
   import MaterialTypePullForm from '../info/MaterialTypePullForm'
   import UserPullForm from '@/views/modules/finance/invoice/UserPullForm'
   export default {
@@ -285,25 +282,20 @@
           purchaseDate: '',
           remarks: '',
           detailInfos: [],
+          procInsId: '',
           // amountInfos: [],
           files: [] // 附件信息
         },
         keyWatch: ''
       }
     },
-    // ReimbursementApprovalService: null,
     MaterialManagementService: null,
-    // reimbursementApprovalTypeService: null,
     userService: null,
+    commonApi: null,
     created () {
-      // this.reimbursementApprovalService = new ReimbursementApprovalService()
       this.materialManagementService = new MaterialManagementService()
-      // this.inputForm.userId = this.userId
-      // this.inputForm.handledBy = this.name
-      // this.inputForm.purchaseDate = new Date()
-      // this.inputForm.deptName = this.officeName
       this.userService = new UserService()
-      // this.reimbursementApprovalTypeService = new ReimbursementApprovalTypeService()
+      this.commonApi = new CommonApi()
     },
     props: {
       businessId: {
@@ -326,7 +318,6 @@
       SelectUserTree,
       SelectTree,
       CwProgramPageForm,
-      // CwReimbursementTypePullForm,
       MaterialTypePullForm,
       UserPullForm
     },
@@ -384,6 +375,7 @@
           purchaseDate: new Date(),
           remarks: '',
           detailInfos: [],
+          procInsId: '',
           // amountInfos: [],
           files: [] // 附件信息
         }
@@ -450,36 +442,6 @@
           if (method !== 'edit' && method !== 'view') {
             this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
           }
-          // if (method === 'edit' || method === 'view') { // 修改或者查看
-          //   this.loading = true
-          //   this.$refs.inputForm.resetFields()
-          //   this.materialManagementService.findById(this.inputForm.id).then(({data}) => {
-          //     this.inputForm = this.recover(this.inputForm, data)
-          //     if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
-          //       this.inputForm.handledByOffice = JSON.parse(localStorage.getItem('user')).officeDTO.id
-          //     }
-          //     if (this.commonJS.isNotEmpty(data.purchaserAgentId)) {
-          //       this.purchaserAgentId = data.purchaserAgentId
-          //     }
-          //     if (this.commonJS.isNotEmpty(data.procurementTypeId)) {
-          //       this.procurementTypeId = data.procurementTypeId
-          //     }
-          //     let i = this.inputForm.detailInfos.length
-          //     for (let j = 0; j < i; j++) {
-          //       if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
-          //         if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
-          //           this.inputForm.detailInfos[j].priceSum = this.inputForm.detailInfos[j].tradePrice * this.inputForm.detailInfos[j].tradeNumber
-          //         }
-          //       }
-          //     }
-          //     this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
-          //     this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-          //     this.loading = false
-          //   })
-          // }
-          // if (method !== 'edit' && method !== 'view') {
-          //   this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
-          // }
         })
       },
       getUpload (p, index) {
@@ -524,14 +486,6 @@
             }).catch(() => {
               this.loading = false
             })
-            // this.reimbursementApprovalService.save(this.inputForm).then(({data}) => {
-            //   this.close()
-            //   this.$message.success(data)
-            //   this.$emit('refreshDataList')
-            //   this.loading = false
-            // }).catch(() => {
-            //   this.loading = false
-            // })
           }
         })
       },
@@ -550,7 +504,6 @@
         }
         if (type === 'amount') {
           this.$refs.amountTable.remove(row)
-          // this.inputForm.amountInfos.splice(rowIndex, 1)
         }
       },
       // 新增
@@ -569,6 +522,16 @@
           })
         }
       },
+      reapplyForm (callback) {
+        this.materialManagementService.findById(this.inputForm.id).then(({data}) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startForm(callback)
+          }
+        })
+      },
       // 暂存
       async saveForm (callback) {
         this.loading = true
@@ -589,14 +552,6 @@
           this.$refs.inputForm.resetFields()
           this.loading = false
         })
-        // this.reimbursementApprovalService.save(this.inputForm).then(({data}) => {
-        //   callback()
-        //   this.$refs.inputForm.resetFields()
-        //   this.loading = false
-        // }).catch(() => {
-        //   this.$refs.inputForm.resetFields()
-        //   this.loading = false
-        // })
       },
       // 送审
       async startForm (callback) {
@@ -655,14 +610,6 @@
               this.$refs.inputForm.resetFields()
               this.loading = false
             })
-            // this.reimbursementApprovalService.save(this.inputForm).then(({data}) => {
-            //   callback(data.businessTable, data.businessId, this.inputForm)
-            //   this.$refs.inputForm.resetFields()
-            //   this.loading = false
-            // }).catch(() => {
-            //   this.$refs.inputForm.resetFields()
-            //   this.loading = false
-            // })
           }
         })
       },
@@ -679,34 +626,75 @@
               this.inputForm.files = []
             }
             this.inputForm.files = this.$refs.uploadComponent.getDataList()
-            await this.userService.is().then(({data}) => {
-              if (data) {
-                this.inputForm.status = '5'
+            console.log('this.inputForm.procInsId', this.inputForm.procInsId)
+            this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(({data}) => {
+              if (this.commonJS.isNotEmpty(data)) {
+                console.log('进来了', data)
+                if (data === '公司领导审批') {
+                  this.inputForm.status = '5'
+                }
               }
+              this.materialManagementService.save(this.inputForm).then(({data}) => {
+                callback(data.businessTable, data.businessId, this.inputForm)
+                this.loading = false
+              }).catch(() => {
+                this.loading = false
+              })
             })
-            this.materialManagementService.save(this.inputForm).then(({data}) => {
-              callback(data.businessTable, data.businessId, this.inputForm)
-              this.loading = false
-            }).catch(() => {
-              this.loading = false
-            })
-            // this.reimbursementApprovalService.save(this.inputForm).then(({data}) => {
-            //   callback(data.businessTable, data.businessId, this.inputForm)
-            //   this.loading = false
-            // }).catch(() => {
-            //   this.loading = false
-            // })
           }
         })
       },
-      // 修改状态
-      updateStatusById (type) {
-        if (type === 'reject') {
-          this.inputForm.status = '4'
-          // this.reimbursementApprovalService.updateStatusById(this.inputForm)
-          this.materialManagementService.updateStatusById(this.inputForm)
+      async updateStatusById (type, callback) {
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          if (type === 'reject' || type === 'reback') {
+            this.materialManagementService.findById(this.inputForm.id).then(({data}) => {
+              if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                if (type === 'reject') {
+                  // 驳回
+                  this.inputForm.status = '4'
+                }
+                if (type === 'reback') {
+                  // 撤回
+                  this.inputForm.status = '3'
+                }
+                if (type === 'reject' || type === 'reback') {
+                  let param = {status: this.inputForm.status, id: this.inputForm.id}
+                  this.materialManagementService.updateStatusById(param).then(() => {
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.materialManagementService.findById(this.inputForm.id).then(({data}) => {
+              if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                let param = {status: '1', id: this.inputForm.id}
+                this.materialManagementService.updateStatusById(param).then(() => {
+                  callback()
+                })
+              }
+            })
+          }
         }
       },
+      // 修改状态
+      // updateStatusById (type) {
+      //   if (type === 'reject') {
+      //     this.inputForm.status = '4'
+      //     // this.reimbursementApprovalService.updateStatusById(this.inputForm)
+      //     this.materialManagementService.updateStatusById(this.inputForm)
+      //   }
+      // },
       footerMethod ({ columns, data }) {
         const footerData = [
           columns.map((column, columnIndex) => {
@@ -778,14 +766,6 @@
         str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
         return str
       },
-      // isExict (row) {
-      //   this.reimbursementApprovalService.checkNumber(row.number).then(({data}) => {
-      //     if (data) {
-      //       this.$message.error('该发票号已存在')
-      //       row.number = ''
-      //     }
-      //   })
-      // },
       countAmount (row) {
         let amount
         let taxAmount

+ 23 - 16
src/views/modules/materialManagement/purchase/PurchaseList.vue

@@ -9,18 +9,19 @@
 <!--        <el-input size="small" v-model="searchForm.handledBy" placeholder="请输入经办人" clearable></el-input>-->
 <!--      </el-form-item>-->
       <el-form-item label="经办人" prop="handledBy">
-        <SelectUserTree
-          ref="companyTree"
-          :props="{
-                  value: 'id',             // ID字段名
-                  label: 'name',         // 显示名称
-                  children: 'children'    // 子级字段名
-                }"
-          :url="`/sys/user/treeUserDataAllOffice?type=2`"
-          :value="searchForm.handledBy"
-          :clearable="true"
-          :accordion="true"
-          @getValue="(value) => {searchForm.handledBy=value}"/>
+        <UserSelect :limit='1' :userName="searchForm.handledBy" @getValue='(value, label) => {searchForm.handledBy = label}'></UserSelect>
+<!--        <SelectUserTree-->
+<!--          ref="companyTree"-->
+<!--          :props="{-->
+<!--                  value: 'id',             // ID字段名-->
+<!--                  label: 'name',         // 显示名称-->
+<!--                  children: 'children'    // 子级字段名-->
+<!--                }"-->
+<!--          :url="`/sys/user/treeUserDataAllOffice?type=2`"-->
+<!--          :value="searchForm.handledBy"-->
+<!--          :clearable="true"-->
+<!--          :accordion="true"-->
+<!--          @getValue="(value) => {searchForm.handledBy=value}"/>-->
       </el-form-item>
       <el-form-item  prop="handledByOffice" label="经办人部门">
         <SelectTree
@@ -165,6 +166,7 @@
 </template>
 
 <script>
+  import UserSelect from '@/components/userSelect'
   import UpdateInfoForm from '../info/UpdateInfoForm'
   import InputNumber from '@/views/modules/cw/workContract/InputNumber.vue'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
@@ -225,7 +227,8 @@
       InputNumber,
       SelectUserTree,
       SelectTree,
-      UpdateInfoForm
+      UpdateInfoForm,
+      UserSelect
     },
     computed: {
       userName () {
@@ -336,6 +339,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionAuditId,
                 procDefKey: this.procDefAuditKey,
                 status: 'startAndHold',
@@ -356,8 +360,10 @@
         let title = `发起流程【采购申请】`
         let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[采购申请]`
         let status = 'startAndHold'
-        if (row.status === '3' || row.status === '4') {
+        if (row.status === '3') {
           status = 'startAndClose'
+        } else if (row.status === '4') {
+          status = 'reapplyFlag'
         }
         this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
           businessId: row.id,
@@ -365,6 +371,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionAuditId,
                 procDefKey: this.procDefAuditKey,
                 title: title,
@@ -391,13 +398,13 @@
             this.$router.push({
               path: '/flowable/task/TaskFormDetail',
               query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 isShow: 'false',
                 readOnly: true,
                 title: '质控管理' + '流程详情',
                 formTitle: '质控管理' + '流程详情',
                 businessId: row.id,
-                status: 'reback',
-                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+                status: 'reback'
               }
             })
           })

+ 2 - 11
src/views/modules/materialManagement/wareHouse/WareHouseAddForm.vue

@@ -61,8 +61,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="采购编号" prop="purchaseNo"
-                          :rules="[{required: true, message:'采购编号不能为空', trigger:'blur'},
-                              {required: true, message:'采购编号不能为空', trigger:'change'}]">
+                          :rules="[]">
               <el-input size="medium" :readonly="true" @focus="openContractForm()" v-model="inputForm.purchaseNo" placeholder="请选择采购编号">
                 <el-button slot="append" icon="el-icon-search" @click="openContractForm()"></el-button>
               </el-input>
@@ -216,7 +215,7 @@
             </vxe-table-column>
             <vxe-table-column field="priceSum" title="商品总价" :edit-render="{}">
               <template v-slot:edit="scope">
-                <el-input v-model="scope.row.priceSum" @blur="scope.row.priceSum = twoDecimalPlaces(scope.row.priceSum)" maxlength="15"></el-input>
+                <el-input :disabled='true' v-model="scope.row.priceSum" @blur="scope.row.priceSum = twoDecimalPlaces(scope.row.priceSum)" maxlength="15"></el-input>
               </template>
             </vxe-table-column>
             <vxe-table-column field="company" title="单位" :edit-render="{}" :rules="[{required: true, message:'请填写单位', trigger:'blur'}]">
@@ -285,9 +284,6 @@
           ],
           tradeNumber: [
             {required: true, message: '商品数量不能为空'}
-          ],
-          tradePrice: [
-            {required: true, message: '商品单价不能为空'}
           ]
         },
         title: '',
@@ -644,11 +640,6 @@
                   this.loading = false
                   return
                 }
-                if (this.commonJS.isEmpty(this.inputForm.wareHouse[j].tradePrice)) {
-                  this.$message.error('入库详情第' + k + '行请输入商品单价')
-                  this.loading = false
-                  return
-                }
               }
             }
             this.inputForm.files = this.$refs.uploadComponent.getDataList()

+ 16 - 13
src/views/modules/materialManagement/wareHouse/WareHouseList.vue

@@ -9,18 +9,19 @@
         <el-input size="small" v-model="searchForm.wareHouseName" placeholder="请输入入库名称" clearable></el-input>
       </el-form-item>
       <el-form-item label="经办人" prop="handledBy">
-        <SelectUserTree
-          ref="companyTree"
-          :props="{
-                  value: 'id',             // ID字段名
-                  label: 'name',         // 显示名称
-                  children: 'children'    // 子级字段名
-                }"
-          :url="`/sys/user/treeUserDataAllOffice?type=2`"
-          :value="searchForm.handledBy"
-          :clearable="true"
-          :accordion="true"
-          @getValue="(value) => {searchForm.handledBy=value}"/>
+        <UserSelect :limit='1' :userName="searchForm.handledBy" @getValue='(value, label) => {searchForm.handledBy = label}'></UserSelect>
+<!--        <SelectUserTree-->
+<!--          ref="companyTree"-->
+<!--          :props="{-->
+<!--                  value: 'id',             // ID字段名-->
+<!--                  label: 'name',         // 显示名称-->
+<!--                  children: 'children'    // 子级字段名-->
+<!--                }"-->
+<!--          :url="`/sys/user/treeUserDataAllOffice?type=2`"-->
+<!--          :value="searchForm.handledBy"-->
+<!--          :clearable="true"-->
+<!--          :accordion="true"-->
+<!--          @getValue="(value) => {searchForm.handledBy=value}"/>-->
       </el-form-item>
       <el-form-item  prop="handledByOffice" label="经办人部门">
         <SelectTree
@@ -119,6 +120,7 @@
 
 <script>
   // import UpdateInfoForm from '../info/UpdateInfoForm'
+  import UserSelect from '@/components/userSelect'
   import WareHouseAddForm from './WareHouseAddForm'
   import InputNumber from '@/views/modules/cw/workContract/InputNumber.vue'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
@@ -176,7 +178,8 @@
       SelectUserTree,
       SelectTree,
       // UpdateInfoForm
-      WareHouseAddForm
+      WareHouseAddForm,
+      UserSelect
     },
     computed: {
       userName () {

+ 15 - 12
src/views/modules/materialManagement/wareHouseSummary/WareHouseSummaryList.vue

@@ -9,18 +9,19 @@
         <el-input size="small" v-model="searchForm.tradeName" placeholder="请输入商品名称" clearable></el-input>
       </el-form-item>
       <el-form-item label="入库人" prop="wareHouseMan">
-        <SelectUserTree
-          ref="companyTree"
-          :props="{
-                  value: 'id',             // ID字段名
-                  label: 'name',         // 显示名称
-                  children: 'children'    // 子级字段名
-                }"
-          :url="`/sys/user/treeUserDataAllOffice?type=2`"
-          :value="searchForm.wareHouseMan"
-          :clearable="true"
-          :accordion="true"
-          @getValue="(value) => {searchForm.wareHouseMan=value}"/>
+        <UserSelect :limit='1' :userName="searchForm.wareHouseMan" @getValue='(value, label) => {searchForm.wareHouseMan = label}'></UserSelect>
+<!--        <SelectUserTree-->
+<!--          ref="companyTree"-->
+<!--          :props="{-->
+<!--                  value: 'id',             // ID字段名-->
+<!--                  label: 'name',         // 显示名称-->
+<!--                  children: 'children'    // 子级字段名-->
+<!--                }"-->
+<!--          :url="`/sys/user/treeUserDataAllOffice?type=2`"-->
+<!--          :value="searchForm.wareHouseMan"-->
+<!--          :clearable="true"-->
+<!--          :accordion="true"-->
+<!--          @getValue="(value) => {searchForm.wareHouseMan=value}"/>-->
       </el-form-item>
       <el-form-item  prop="wareHouseManOffice" label="入库人部门">
         <SelectTree
@@ -101,6 +102,7 @@
 </template>
 
 <script>
+  import UserSelect from '@/components/userSelect'
   import WareHouseAddForm from '../wareHouse/WareHouseAddForm'
   import InputNumber from '@/views/modules/cw/workContract/InputNumber.vue'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
@@ -154,6 +156,7 @@
       this.userService = new UserService()
     },
     components: {
+      UserSelect,
       InputNumber,
       SelectUserTree,
       SelectTree,

+ 18 - 0
src/views/modules/notify/NotifyList.vue

@@ -90,6 +90,7 @@
 
                   <el-button v-if="hasPermission('notify:edit')&&(scope.row.status === '1' || scope.row.status === '3')&&scope.row.createBy.id === $store.state.user.id" type="text" size="small" @click="push(scope.row)">修改</el-button>
                   <el-button v-else-if="(scope.row.status === '1' || scope.row.status === '3' || scope.row.status === '5')&&isAdmin" type="text" size="small" @click="edit(scope.row.id)">修改</el-button>
+                  <el-button v-if="scope.row.status === '5'" type="text" size="small" @click="close(scope.row.id)">关闭</el-button>
 
                   <el-button v-if="hasPermission('notify:edit')&&(scope.row.status === '2')&&scope.row.createBy.id === $store.state.user.id" type="text" size="small" @click="reback(scope.row)">撤回</el-button>
                   <el-button v-if="hasPermission('notify:del')&&(scope.row.status === '1' || scope.row.status === '3')&&(scope.row.createBy.id === $store.state.user.id || isAdmin)"  type="text" size="small" @click="del(scope.row.id)">删除</el-button>
@@ -206,6 +207,23 @@
         }
         this.refreshList()
       },
+      close (id) {
+        id = id || this.$refs.notifyTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.notifyService.close(id).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
       // 新增
       add () {
         this.$refs.notifyForm.init('add', '')

+ 31 - 29
src/views/modules/notify/NotifyTaskForm.vue

@@ -3,39 +3,21 @@
       <el-form size="small" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view' || method === 'read'?'readonly':''" :disabled="method==='view' || method === 'read' || status === 'audit' || status === 'taskFormDetail'"
                label-width="120px" @submit.native.prevent>
         <el-row  :gutter="15">
-          <el-col :span="12">
+          <el-col :span="24">
             <el-form-item label="通告状态" prop="notifyType"
                           :rules="[
                   {required: true, message:'通告状态不能为空', trigger:'blur'}
                  ]">
-              <el-select size="medium" @change="changeNotifyType" v-model="inputForm.notifyType" placeholder="请选择"  style="width: 100%;">
-                <el-option
-                  v-for="item in $dictUtils.getDictList('oa_notify_status')"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12" v-if="inputForm.notifyType === '0'">
-            <el-form-item label="通告时间" prop="dates"
-                          :rules="[
-                                {required: true, message:'通告时间不能为空', trigger:'blur'}
-                   ]">
-              <el-date-picker
-                size="medium"
-                style="width: 100%"
-                placement="bottom-start"
-                format="yyyy-MM-dd HH:mm:ss"
-                value-format="yyyy-MM-dd HH:mm:ss"
-                v-model="inputForm.dates"
-                type="datetimerange"
-                range-separator="至"
-                @input="daterangeChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期">
-              </el-date-picker>
+              <el-radio v-model="inputForm.notifyType" v-for="item in $dictUtils.getDictList('oa_notify_status')" :label="item.value" size="small" style="margin-right: 20px">
+                {{item.label}}</el-radio>
+<!--              <el-select size="medium" @change="changeNotifyType" v-model="inputForm.notifyType" placeholder="请选择"  style="width: 100%;">-->
+<!--                <el-option-->
+<!--                  v-for="item in $dictUtils.getDictList('oa_notify_status')"-->
+<!--                  :key="item.value"-->
+<!--                  :label="item.label"-->
+<!--                  :value="item.value">-->
+<!--                </el-option>-->
+<!--              </el-select>-->
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -68,6 +50,26 @@
               <el-input size="medium" v-model="inputForm.no" placeholder="请填写文号"     ></el-input>
             </el-form-item>
           </el-col>
+          <el-col :span="12" v-if="inputForm.notifyType === '0'">
+            <el-form-item label="通告时间" prop="dates"
+                          :rules="[
+                                {required: true, message:'通告时间不能为空', trigger:'blur'}
+                   ]">
+              <el-date-picker
+                size="medium"
+                style="width: 100%"
+                placement="bottom-start"
+                format="yyyy-MM-dd HH:mm:ss"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                v-model="inputForm.dates"
+                type="datetimerange"
+                range-separator="至"
+                @input="daterangeChange"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
             <el-form-item label="创建人" prop="createBy.name"
                           :rules="[