| 
					
				 | 
			
			
				@@ -71,7 +71,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         label="审核人"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <template slot-scope="scope"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-select v-model="scope.row.auditUserId" :disabled="scope.row.iffixAuditUser === 'F'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-select v-model="scope.row.auditUserId" v-if="scope.row.iffixAuditUser === 'T'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                      filterable multiple collapse-tags placeholder="审核人" style="width: 100%"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-option 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               v-for="item in optionsUsers" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -80,6 +80,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :value="item.userId"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </el-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-select v-model="scope.row.auditUserId" v-if="scope.row.iffixAuditUser === 'F'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                     filterable multiple collapse-tags placeholder="审核人" style="width: 100%"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-option 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              v-for="item in optionsUsers_s" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :key="item.userId" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :label="item.userName" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :value="item.userId"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-table-column 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -124,20 +133,23 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { addCharge, delCharge } from '@/api/system/toConfigure' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import {addCharge,reviewer,modify} from '@/api/system/auditPaths-add-or-update' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { queryUserVal } from '@/api/warehouseBusiness/agreement' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { listUser } from '@/api/system/user' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     data () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataForm: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          status: 'A' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          status: 'A', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         visible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataRule: {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataList: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         optionsUsers: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        optionsUsers_s:[], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         optionsiffixAudit: [{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          id: 'S', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          id: 'T', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           name: '是' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           id: 'F', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -164,54 +176,61 @@ import { addCharge, delCharge } from '@/api/system/toConfigure' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.optionsUsers = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.visible = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (typeof val !== 'undefined') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log(val) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.queryAuditPath(val) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.queryUsers() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.queryUsers() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       queryUsers () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.$http({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          url: this.$http.adornUrl('/sys/user/selectUser'), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          method: 'post', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          data: ({mobile: 'auditUser'}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }).then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if (typeof data.list !== 'undefined' && data.list !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (typeof data.list.users !== 'undefined' && data.list.users !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              this.optionsUsers = data.list.users 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        queryUserVal().then((response)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          // this.contrastList.createBy = response.user.userName 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          // this.dataForm.opUserName = response.user.userName 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log(response) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$set(this.dataForm, "opUserName", response.user.userName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.$set(this.dataForm, "opDate", response.date.slice(0,10)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log(this.dataForm) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //请求所有审核人角色 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        reviewer().then(data =>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.optionsUsers = data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log(data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //请求所有用户名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        listUser().then(response => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.optionsUsers_s = response.rows 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log(response.rows) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // this.$http({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   url: this.$http.adornUrl('/sys/user/selectUser'), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   method: 'post', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   data: ({mobile: 'auditUser'}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // }).then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   if (typeof data.list !== 'undefined' && data.list !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //     if (typeof data.list.users !== 'undefined' && data.list.users !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //       this.optionsUsers = data.list.users 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       queryAuditPath (val) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.$http({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          url: this.$http.adornUrl('/engineering/auditPaths/queryAuditPath'), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          method: 'post', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          data: ({id: val}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }).then(({data}) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if (typeof data.list !== 'undefined' && data.list !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (typeof data.list.users !== 'undefined' && data.list.users !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              this.optionsUsers = data.list.users 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (typeof data.list.audit !== 'undefined' && data.list.audit !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              this.dataForm = data.list.audit 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (typeof data.list.auditPathsLevels !== 'undefined' && data.list.auditPathsLevels !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              this.dataList = data.list.auditPathsLevels 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              if (typeof data.list.auditUserIds !== 'undefined' && data.list.auditUserIds !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                for (let use in data.list.auditUserIds) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  this.$set(this.dataList[use], 'auditUserId', data.list.auditUserIds[use]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        modify(val).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log(res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          let data = res.data.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.dataForm = data.auditPaths 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.dataList = data.auditPathsLevels 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          for (let index in this.dataList){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.dataList[index].auditUserId = data.auditUserIds[index] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       addRow () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let val = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           levelName: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          auditUserId: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          auditUserName: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          iffixAuditUser: 'S', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          auditUserId: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          // auditUserName: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          iffixAuditUser: 'T', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           iffinalItem: 'T', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           remarks: null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -221,13 +240,12 @@ import { addCharge, delCharge } from '@/api/system/toConfigure' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         rows.splice(index, 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       changeIffixAudit (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (row.iffixAuditUser === 'F') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          row.auditUserId = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          row.auditUserName = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        row.auditUserId = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 表单提交 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       dataFormSubmit () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log(this.dataForm) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log(this.dataList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (this.dataList.length === 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.$message.error('请维护审批级次') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           return false 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -240,25 +258,23 @@ import { addCharge, delCharge } from '@/api/system/toConfigure' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let formData = new FormData() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        formData.append('auditPaths', JSON.stringify(this.dataForm)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        formData.append('auditPathsLevels', JSON.stringify(this.dataList)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.$confirm(`是否提交?`, '提示', { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           confirmButtonText: '确定', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           cancelButtonText: '取消', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           type: 'warning' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }).then(function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          let formData = new FormData() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          formData.append('auditPaths', JSON.stringify(this.dataForm)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          formData.append('auditPathsLevels', JSON.stringify(this.dataList)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          return delCharge(formData) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }).then(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (data && data.code === 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          return addCharge(formData) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }).then((data) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log(data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (data && data.code === 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               this.$message({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 message: '操作成功', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                type: 'success', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                duration: 600, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                onClose: () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                  this.closeDia() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                type: 'success' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.closeDia() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               this.$message.error(data.msg) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 |