|
|
@@ -8,7 +8,7 @@
|
|
|
{{ $t("lang.approveComment.approveStatus") }}
|
|
|
<span class="label label-primary m-label">
|
|
|
{{
|
|
|
- processInstanceDescription.isActive
|
|
|
+ !processInstanceDescription.suspended
|
|
|
? $t("lang.approveComment.running")
|
|
|
: $t("lang.approveComment.finished")
|
|
|
}}
|
|
|
@@ -17,58 +17,22 @@
|
|
|
<span class="label label-info m-label">
|
|
|
{{ $t("lang.approveComment.needApprove") }}:
|
|
|
{{
|
|
|
- processInstanceDescription.activeTaskDescriptions == undefined
|
|
|
+ processInstanceDescription.taskDescriptions == undefined
|
|
|
? "0"
|
|
|
- : processInstanceDescription.activeTaskDescriptions.length
|
|
|
+ : processInstanceDescription.taskDescriptions.length
|
|
|
}}
|
|
|
</span>
|
|
|
|
|
|
<span class="label label-success m-label">
|
|
|
{{ $t("lang.approveComment.approved") }}:
|
|
|
{{
|
|
|
- processInstanceDescription.taskComments == undefined
|
|
|
+ processInstanceDescription.historicTaskInstanceDescriptions == undefined
|
|
|
? "0"
|
|
|
- : processInstanceDescription.taskComments.length
|
|
|
+ : processInstanceDescription.historicTaskInstanceDescriptions.length
|
|
|
}}
|
|
|
</span>
|
|
|
-
|
|
|
- <span class="label label-warning m-label">
|
|
|
- {{ $t("lang.approveComment.abandon") }}:
|
|
|
- {{
|
|
|
- processInstanceDescription.abandonCount == undefined
|
|
|
- ? "0"
|
|
|
- : processInstanceDescription.abandonCount
|
|
|
- }}
|
|
|
- </span>
|
|
|
-
|
|
|
- <span v-if="windowNo == '20220707_162600'" class="label label-primary m-label" @click="viewApprovalProcess()">
|
|
|
- {{ $t("lang.approveComment.viewApprovalProcess") }}
|
|
|
- </span>
|
|
|
- <span v-if="windowNo == '20220703_174047'" class="label label-primary m-label" @click="viewApprovalProcess()">
|
|
|
- {{ $t("lang.approveComment.viewApprovalProcess") }}
|
|
|
- </span>
|
|
|
</div>
|
|
|
<div class="panel-body">
|
|
|
- <div class="progress">
|
|
|
- <div
|
|
|
- class="progress-bar progress-bar-success progress-bar-striped"
|
|
|
- role="progressbar"
|
|
|
- aria-valuenow="40"
|
|
|
- aria-valuemin="0"
|
|
|
- aria-valuemax="100"
|
|
|
- :style="{
|
|
|
- width: processInstanceDescription.isActive ? '50%' : '100%',
|
|
|
- }"
|
|
|
- >
|
|
|
- <span class="sr-only">{{
|
|
|
- processInstanceDescription.isActive
|
|
|
- ? $t("lang.approveComment.running")
|
|
|
- : $t("lang.approveComment.finished")
|
|
|
- }}</span>
|
|
|
- <!-- <span>查看审批流程</span> -->
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
<div v-if="showChoiceButton && isActiveTask" class="form">
|
|
|
<PreviousNodeSelectUser
|
|
|
ref="previousNodeSelectUser"
|
|
|
@@ -145,48 +109,7 @@
|
|
|
<textarea v-model="comment" class="form-control" rows="3" />
|
|
|
</div>
|
|
|
|
|
|
- <div class="form-group" :class="{ 'image-height': hasImage() }">
|
|
|
- <label class="control-label">{{ $t("lang.approveComment.picture") }}</label>
|
|
|
- <div class="input-group">
|
|
|
- <ImageListWidget ref="imageListWidget" :class-name="className" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="form-group">
|
|
|
- <div id="uploadAttachmentForm">
|
|
|
- <label class="control-label" for="uploadAttachmentForm">{{
|
|
|
- $t("lang.approveComment.attachment")
|
|
|
- }}</label>
|
|
|
- <div class="input-group">
|
|
|
- <div
|
|
|
- v-for="(item, index) in attachments"
|
|
|
- :key="item.id"
|
|
|
- class="file-box"
|
|
|
- >
|
|
|
- <FileImage
|
|
|
- :file-property="generateFileProperty(item)"
|
|
|
- :show-image="true"
|
|
|
- />
|
|
|
- <span
|
|
|
- class="glyphicon glyphicon-trash file-remove"
|
|
|
- @click="removeFile(index)"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <label for="exampleInputFile" class="label-btn">
|
|
|
- {{ $t("lang.approveComment.chooseFile") }}
|
|
|
- </label>
|
|
|
- <input
|
|
|
- id="exampleInputFile"
|
|
|
- autocomplete="off"
|
|
|
- type="file"
|
|
|
- class="inputfile"
|
|
|
- @change="uploadFile"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <ApproveTaskAttachmentEdit :task-id="taskInfoId" />
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@@ -215,14 +138,14 @@
|
|
|
}}</small>
|
|
|
</h4>
|
|
|
<h5 class="m-h5">{{ processInstanceDescription.startTime }}</h5>
|
|
|
- <p>{{ $t("lang.approveComment.submitApprove") }}</p>
|
|
|
+ <p class="comment-text">{{ $t("lang.approveComment.submitApprove") }}</p>
|
|
|
</div>
|
|
|
</li>
|
|
|
|
|
|
- <template v-if="processInstanceDescription.taskComments != undefined">
|
|
|
+ <template v-if="processInstanceDescription.historicTaskInstanceDescriptions != undefined">
|
|
|
<li
|
|
|
- v-for="taskComment in processInstanceDescription.taskComments"
|
|
|
- :key="taskComment.id"
|
|
|
+ v-for="historicTaskInstanceDescription in processInstanceDescription.historicTaskInstanceDescriptions"
|
|
|
+ :key="historicTaskInstanceDescription.id"
|
|
|
class="media"
|
|
|
>
|
|
|
<div class="media-left">
|
|
|
@@ -231,7 +154,7 @@
|
|
|
:auth-src="
|
|
|
Common.getThumbnailImageSrc(
|
|
|
'com.leanwo.prodog.base.model.User',
|
|
|
- taskComment.userImageUrl
|
|
|
+ historicTaskInstanceDescription.assigneeImageUrl
|
|
|
)
|
|
|
"
|
|
|
class="media-object thumbnail m-image"
|
|
|
@@ -240,52 +163,32 @@
|
|
|
</div>
|
|
|
<div class="media-body">
|
|
|
<h4 class="media-heading">
|
|
|
- {{ taskComment.userName }}
|
|
|
+ {{ historicTaskInstanceDescription.assigneeName }}
|
|
|
<small class="badge alert-success">{{
|
|
|
- taskComment.taskName
|
|
|
+ historicTaskInstanceDescription.name
|
|
|
}}</small>
|
|
|
</h4>
|
|
|
|
|
|
- <div v-if="taskComment.comments != undefined">
|
|
|
+ <div v-if="historicTaskInstanceDescription.comments != undefined">
|
|
|
<div
|
|
|
- v-for="commentItem in taskComment.comments"
|
|
|
+ v-for="commentItem in historicTaskInstanceDescription.comments"
|
|
|
:key="commentItem.id"
|
|
|
>
|
|
|
- <h5 class="m-h5">{{ commentItem.commentDate }}</h5>
|
|
|
- <p>{{ commentItem.comment }}</p>
|
|
|
+ <h5 class="m-h5">{{ commentItem.time }}</h5>
|
|
|
+ <p class="comment-text">{{ commentItem.message }}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div v-if="taskComment.imageNames != undefined">
|
|
|
- <AuthImage
|
|
|
- v-for="(imageName, index) in taskComment.imageNames"
|
|
|
- :key="index"
|
|
|
- :auth-src="getCommentImageSrc(imageName)"
|
|
|
- class="thumbnail m-image1"
|
|
|
- @click="openImageAttachment(imageName)"
|
|
|
- />
|
|
|
- </div>
|
|
|
-
|
|
|
- <div v-if="taskComment.attachmentNames != undefined">
|
|
|
- <a
|
|
|
- v-for="(
|
|
|
- attachmentName, index
|
|
|
- ) in taskComment.attachmentNames"
|
|
|
- :key="index"
|
|
|
- :href="getAttachmentsUrl(attachmentName)"
|
|
|
- target="view_window"
|
|
|
- class="btn btn-primary btn-sm btn-block"
|
|
|
- >{{ attachmentName }}</a>
|
|
|
- </div>
|
|
|
+ <ApproveTaskAttachmentView :enable-delete="false" :attachments="historicTaskInstanceDescription.attachments" />
|
|
|
</div>
|
|
|
</li>
|
|
|
</template>
|
|
|
|
|
|
- <template v-for="activeTask in processInstanceDescription.activeTaskDescriptions" :key="activeTask.id">
|
|
|
+ <template v-for="activeTask in processInstanceDescription.taskDescriptions" :key="activeTask.id">
|
|
|
<li
|
|
|
|
|
|
v-if="
|
|
|
- processInstanceDescription.activeTaskDescriptions != undefined
|
|
|
+ processInstanceDescription.taskDescriptions != undefined
|
|
|
"
|
|
|
|
|
|
class="media"
|
|
|
@@ -305,11 +208,13 @@
|
|
|
</div>
|
|
|
<div class="media-body">
|
|
|
<h4 class="media-heading">
|
|
|
- {{ activeTask.assignee }}
|
|
|
+ {{ activeTask.assigneeName }}
|
|
|
<small class="badge alert-info">{{ activeTask.name }}</small>
|
|
|
</h4>
|
|
|
<h5 class="m-h5">{{ activeTask.startTime }}</h5>
|
|
|
- <p>{{ $t("lang.approveComment.processing") }}</p>
|
|
|
+ <p class="comment-text">{{ $t("lang.approveComment.processing") }}</p>
|
|
|
+
|
|
|
+ <ApproveTaskAttachmentView :enable-delete="activeTask.id == taskInfoId" :attachments="activeTask.attachments" />
|
|
|
</div>
|
|
|
</li>
|
|
|
</template>
|
|
|
@@ -464,27 +369,27 @@ import UserStorageResource from '../api/base/UserStorageResource.js';
|
|
|
import UserResource from '../api/base/UserResource.js';
|
|
|
import WorkflowResource from '../api/workflow/WorkflowResource.js';
|
|
|
|
|
|
-import ImageListWidget from './ImageListWidget.vue';
|
|
|
import PreviousNodeSelectUser from './PreviousNodeSelectUser.vue';
|
|
|
|
|
|
|
|
|
-import FileImage from '../widget/FileImage.vue';
|
|
|
-
|
|
|
import AuthImage from '../widget/AuthImage.vue';
|
|
|
import ApproveForm from './ApproveForm.vue';
|
|
|
|
|
|
import vSelect from 'vue-select';
|
|
|
import 'vue-select/dist/vue-select.css';
|
|
|
import { Notify, Uuid } from 'pc-component-v3';
|
|
|
+import ApproveTaskAttachmentEdit from './ApproveTaskAttachmentEdit.vue';
|
|
|
+import ApproveTaskAttachmentView from './ApproveTaskAttachmentView.vue';
|
|
|
+
|
|
|
export default {
|
|
|
|
|
|
components: {
|
|
|
- ImageListWidget,
|
|
|
- FileImage,
|
|
|
AuthImage,
|
|
|
vSelect,
|
|
|
PreviousNodeSelectUser,
|
|
|
ApproveForm,
|
|
|
+ ApproveTaskAttachmentEdit,
|
|
|
+ ApproveTaskAttachmentView,
|
|
|
},
|
|
|
|
|
|
props: {
|
|
|
@@ -543,7 +448,6 @@ export default {
|
|
|
this.Common = Common;
|
|
|
return {
|
|
|
processInstanceDescription: {},
|
|
|
- attachments: [],
|
|
|
comment: '',
|
|
|
className: 'WorkFlow',
|
|
|
infoWindowNo: '050408',
|
|
|
@@ -671,82 +575,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * 查看审批流程
|
|
|
- * @author XiongLiuJie 20221952
|
|
|
- */
|
|
|
- viewApprovalProcess: function(){
|
|
|
- let _self = this;
|
|
|
- if(_self.windowNo == '20220707_162600'){
|
|
|
- let isAutoFlow = _self.modelData.data.isAutoFlow.displayValue[0];
|
|
|
- if(isAutoFlow == 'false'){
|
|
|
- let totalAmountUSD = _self.modelData.data.totalAmountUSD.displayValue[0];
|
|
|
- if(totalAmountUSD < 5000){
|
|
|
- let url = '/static/x-spreadsheet/index.html?processReportNo=20221110_200758&recordId=' + _self.recordId;
|
|
|
- window.open(url);
|
|
|
- // window.layer.open({
|
|
|
- // title: '查看ADA审批人报告',
|
|
|
- // type: 2,
|
|
|
- // area: ['1280px', '720px'],
|
|
|
- // fixed: false, //不固定
|
|
|
- // maxmin: true,
|
|
|
- // content: url,
|
|
|
- // });
|
|
|
- }
|
|
|
- if(totalAmountUSD > 5000){
|
|
|
- let url = '/static/x-spreadsheet/index.html?processReportNo=20221117_022208&recordId=' + _self.recordId;
|
|
|
- window.open(url);
|
|
|
- // window.layer.open({
|
|
|
- // title: '查看ADA审批人报告',
|
|
|
- // type: 2,
|
|
|
- // area: ['1280px', '720px'],
|
|
|
- // fixed: false, //不固定
|
|
|
- // maxmin: true,
|
|
|
- // content: url,
|
|
|
- // });
|
|
|
- }
|
|
|
-
|
|
|
- }else{
|
|
|
- let url = '/static/x-spreadsheet/index.html?processReportNo=20221117_013808&recordId=' + _self.recordId;
|
|
|
- window.open(url);
|
|
|
- // window.layer.open({
|
|
|
- // title: '查看Auto_ADA审批人报告',
|
|
|
- // type: 2,
|
|
|
- // area: ['1280px', '720px'],
|
|
|
- // fixed: false, //不固定
|
|
|
- // maxmin: true,
|
|
|
- // content: url,
|
|
|
- // });
|
|
|
- }
|
|
|
- }
|
|
|
- if(_self.windowNo == '20220703_174047'){
|
|
|
- let totalAmountUSD = _self.modelData.data.totalAmountUSD.displayValue[0];
|
|
|
- if(totalAmountUSD < 5000){
|
|
|
- let url = '/static/x-spreadsheet/index.html?processReportNo=20221110_204424&recordId=' + _self.recordId;
|
|
|
- window.open(url);
|
|
|
- // window.layer.open({
|
|
|
- // title: '查看ATA审批人报告',
|
|
|
- // type: 2,
|
|
|
- // area: ['1280px', '720px'],
|
|
|
- // fixed: false, //不固定
|
|
|
- // maxmin: true,
|
|
|
- // content: url,
|
|
|
- // });
|
|
|
- }
|
|
|
- if(totalAmountUSD > 5000){
|
|
|
- let url = '/static/x-spreadsheet/index.html?processReportNo=20221117_025516&recordId=' + _self.recordId;
|
|
|
- window.open(url);
|
|
|
- // window.layer.open({
|
|
|
- // title: '查看ATA审批人报告',
|
|
|
- // type: 2,
|
|
|
- // area: ['1280px', '720px'],
|
|
|
- // fixed: false, //不固定
|
|
|
- // maxmin: true,
|
|
|
- // content: url,
|
|
|
- // });
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
|
|
|
/**
|
|
|
* 转批
|
|
|
@@ -801,12 +629,6 @@ export default {
|
|
|
var _self = this;
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * 删除文件
|
|
|
- */
|
|
|
- removeFile: function (index) {
|
|
|
- this.attachments.splice(index, 1);
|
|
|
- },
|
|
|
|
|
|
/**
|
|
|
* 生成文件属性
|
|
|
@@ -861,52 +683,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * 上传文件
|
|
|
- */
|
|
|
- uploadFile: function (event) {
|
|
|
- var _self = this;
|
|
|
-
|
|
|
- let fileList = event.target.files;
|
|
|
- var selectedFile = null;
|
|
|
- if (fileList.length > 0) {
|
|
|
- selectedFile = fileList[0];
|
|
|
- }
|
|
|
- if (selectedFile == null) {
|
|
|
- return;
|
|
|
- }
|
|
|
- var formData = new FormData();
|
|
|
- formData.append('file', selectedFile);
|
|
|
- formData.append('className', _self.className);
|
|
|
- _self.loading=true;
|
|
|
-
|
|
|
- $.ajax({
|
|
|
- url: Common.getApiURL('file/multipleAttachmentUpload'),
|
|
|
- type: 'post',
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- data: formData,
|
|
|
- contentType: false,
|
|
|
- processData: false,
|
|
|
- success: function (data) {
|
|
|
- _self.loading=false;
|
|
|
- if (data.success) {
|
|
|
- var fileNames = data.fileNames;
|
|
|
- if (fileNames != undefined && fileNames.length > 0) {
|
|
|
- fileNames.forEach(function (item) {
|
|
|
- // _self.attachments = [item.nameAfterSave];
|
|
|
- _self.attachments.push(item.nameAfterSave);
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- _self.loading=false;
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
|
|
|
/**
|
|
|
* 拒绝
|
|
|
@@ -953,25 +729,23 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- var chooseTask = {
|
|
|
+ var addCommentRequest = {
|
|
|
taskId: _self.taskInfoId,
|
|
|
comment: _self.comment,
|
|
|
- imageNames: _self.$refs.imageListWidget.getImages(),
|
|
|
- attachmentNames: _self.attachments,
|
|
|
};
|
|
|
|
|
|
_self.loading=true;
|
|
|
|
|
|
$.ajax({
|
|
|
- url: Common.getApiURL('WorkflowResource/AddComment'),
|
|
|
+ url: Common.getApiURL('WorkflowResource/addComment'),
|
|
|
type: 'post',
|
|
|
beforeSend: function (request) {
|
|
|
Common.addTokenToRequest(request);
|
|
|
},
|
|
|
contentType: 'application/json',
|
|
|
- data: JSON.stringify(chooseTask),
|
|
|
+ data: JSON.stringify(addCommentRequest),
|
|
|
success: function (data) {
|
|
|
- _self.loading=false;
|
|
|
+ _self.loading = false;
|
|
|
_self.comment = '';
|
|
|
_self.refresh();
|
|
|
},
|
|
|
@@ -1000,12 +774,6 @@ export default {
|
|
|
chooseTask.modelData = modelData;
|
|
|
chooseTask.className = _self.workflowClassName;
|
|
|
|
|
|
- //var images = _self.$refs.imageListWidget.getImages();
|
|
|
- //console.log(images);
|
|
|
- //chooseTask.imageNames = images;
|
|
|
- //chooseTask.attachmentNames = _self.attachments;
|
|
|
-
|
|
|
- // 添加工作流表单数据
|
|
|
|
|
|
if (command === 'APPROVE') {
|
|
|
try {
|
|
|
@@ -1051,16 +819,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- hasImage: function () {
|
|
|
- var _self = this;
|
|
|
- if (_self.$refs.imageListWidget) {
|
|
|
- var images = _self.$refs.imageListWidget.getImages();
|
|
|
- if (images != undefined && images.length > 0) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
- },
|
|
|
|
|
|
/**
|
|
|
* 获取评论的图片
|
|
|
@@ -1089,15 +847,6 @@ export default {
|
|
|
window.open(fullPath);
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * 获取附件的URL
|
|
|
- * @param {[type]} url [description]
|
|
|
- * @return {[type]} [description]
|
|
|
- */
|
|
|
- getAttachmentsUrl: function (url) {
|
|
|
- console.log(url);
|
|
|
- return Common.getAttachmentsSrc(this.className, url);
|
|
|
- },
|
|
|
|
|
|
/**
|
|
|
* 打开自定义窗口
|
|
|
@@ -1206,6 +955,7 @@ export default {
|
|
|
.m-image {
|
|
|
width: 64px;
|
|
|
height: 64px;
|
|
|
+ margin-bottom: 0px;
|
|
|
}
|
|
|
|
|
|
.m-image1 {
|
|
|
@@ -1215,29 +965,6 @@ export default {
|
|
|
cursor: pointer;
|
|
|
margin-right: 5px;
|
|
|
}
|
|
|
-.inputfile {
|
|
|
- width: 0.1px;
|
|
|
- height: 0.1px;
|
|
|
- opacity: 0;
|
|
|
- overflow: hidden;
|
|
|
- position: absolute;
|
|
|
- z-index: -1;
|
|
|
-}
|
|
|
-.label-btn {
|
|
|
- color: white;
|
|
|
- background-color: #006699;
|
|
|
- display: inline-block;
|
|
|
- padding: 5px 15px;
|
|
|
- border-radius: 5px;
|
|
|
-}
|
|
|
-.label-btn:hover {
|
|
|
- color: white;
|
|
|
- background-color: #003399;
|
|
|
- display: inline-block;
|
|
|
- padding: 5px 15px;
|
|
|
- border-radius: 5px;
|
|
|
- cursor: pointer;
|
|
|
-}
|
|
|
.file-box {
|
|
|
width: 150px;
|
|
|
position: relative;
|
|
|
@@ -1328,4 +1055,7 @@ button.forSaleOrder {
|
|
|
animation: go 3s infinite;
|
|
|
text-shadow: 1px 1px 1px black;
|
|
|
}
|
|
|
+.comment-text{
|
|
|
+ margin-bottom: 0px;
|
|
|
+}
|
|
|
</style>
|