| | |
| | | let rows = this.getSelectRows(); |
| | | console.log('éä¸çæ°æ®è¡:', rows); |
| | | |
| | | if (rows.length === 0 || rows.length > 1) {0 |
| | | if (rows.length === 0 || rows.length > 1) { |
| | | 0 |
| | | return this.$message.warning('è¯·éæ©ä¸æ¡æ°æ®'); |
| | | } else if (rows.length === 1) { |
| | | |
| | | let selectRow = rows; |
| | | let selectRow = rows[0]; |
| | | |
| | | let Id = selectRow.map(item => item.taskId); |
| | | console.log('ä»»å¡IDå表:', Id); |
| | | |
| | | // éåç¶ææ°ç»ï¼å¤ææ¯å¦æä¸ç¬¦åæ¡ä»¶çç¶æ |
| | | // for (let i = 0; i < statusList.length; i++) { |
| | | // const status = statusList[i]; |
| | | |
| | | // if (status === 2 || status === 3 || status === 4) { |
| | | // this.$message.error('æ§è¡ä¸ä»»å¡æ æ³åæ¶'); |
| | | // return; |
| | | // } |
| | | // } |
| | | |
| | | |
| | | // æ¾ç¤ºç¡®è®¤æ¡ï¼è®©ç¨æ·ç¡®è®¤æ¯å¦æ§è¡æä½ |
| | | this.$confirm('ç¡®å®è¦æå¨å®æéä¸ç' + selectRow.map(item => item.taskNum) + 'ä»»å¡å·åï¼', 'æä½ç¡®è®¤', { |
| | | this.$confirm('ç¡®å®è¦æå¨å®æéä¸ç' + selectRow.taskNum + 'ä»»å¡å·åï¼', 'æä½ç¡®è®¤', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' // è¦åç±»åï¼æ¾ç¤ºé»è²å¾æ |
| | | }).then(() => { |
| | | // ç¨æ·ç¹å»"ç¡®å®"åæ§è¡çé»è¾ |
| | | http.post('api/Task/CompletedManually', Id).then(res => { |
| | | if (res && res.status) { |
| | | this.$message.success(res.message || 'æå¨å®æä»»å¡æåï¼'); |
| | | } else { |
| | | this.$message.error(res.message || 'æå¨å®æä»»å¡å¤±è´¥ï¼'); |
| | | } |
| | | }).catch(() => { |
| | | this.$message.error('请æ±å¤±è´¥ï¼è¯·ç¨åéè¯'); |
| | | }); |
| | | var CompletionType = 1; |
| | | http.post(`api/Task/CompletedManually?id=${selectRow.taskId}`).then(res => { |
| | | if (res && res.status) { |
| | | this.$message.success(res.message || 'æå¨å®æä»»å¡æåï¼'); |
| | | this.search(); |
| | | } else { |
| | | this.$message.error(res.message || 'æå¨å®æä»»å¡å¤±è´¥ï¼'); |
| | | } |
| | | }).catch(() => { |
| | | this.$message.error('请æ±å¤±è´¥ï¼è¯·ç¨åéè¯'); |
| | | }); |
| | | }).catch(() => { |
| | | // ç¨æ·ç¹å»"åæ¶"åæ§è¡çé»è¾ï¼éå¸¸æ¯æç¤ºåæ¶æä½ï¼ |
| | | this.$message.info('已忶æå¨å®æä»»å¡'); |
| | |
| | | console.log('éä¸çæ°æ®è¡:', rows); |
| | | |
| | | if (rows.length === 0 || rows.length > 1) { |
| | | return this.$message.warning('è¯·éæ©æå°ä¸æ¡æ°æ®'); |
| | | return this.$message.warning('è¯·éæ©ä¸æ¡æ°æ®'); |
| | | } |
| | | if (rows.length === 1) { |
| | | let selectRow = rows; |
| | |
| | | ).then(res => { |
| | | if (res && res.status) { |
| | | this.$message.success(res.message || '忶任塿åï¼'); |
| | | this.search(); |
| | | } else { |
| | | this.$message.error(res.message || 'åæ¶ä»»å¡å¤±è´¥ï¼'); |
| | | } |