feat: 修改已知问题
This commit is contained in:
@@ -928,7 +928,7 @@
|
||||
index: item.index,
|
||||
enableEdit,
|
||||
labelS,
|
||||
name: this.config.name,
|
||||
name: this.config.tableTitle,
|
||||
billNoPrefix: this.config.billNoPrefix
|
||||
}
|
||||
console.log(config,'config12233')
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 底部操作按钮区域 -->
|
||||
<view v-if="!loading && (dataForm.approveStatus != 4 || !dataForm.id || config.current && config.current == 2) && !isProcess" class="buttom-actions">
|
||||
<view v-if="!loading && isShowBtn" class="buttom-actions">
|
||||
<u-button v-if="(!dataForm.approveStatus && dataForm.id) || dataForm.approveStatus == 3" class="buttom-btn launch-flow-btn" type="primary" @click.stop="handleLaunchFlow" :disabled="idDsabled" :loading="btnLoading">
|
||||
发起流程
|
||||
</u-button>
|
||||
@@ -66,6 +66,9 @@
|
||||
<u-button v-if="!config.current && (dataForm.approveStatus == 1 || dataForm.approveStatus == 2)" class="buttom-btn" type="primary" @click.stop="goProcess">
|
||||
查看流程
|
||||
</u-button>
|
||||
<u-button v-if="config.current == 1 && dataForm.approveStatus && dataForm.approveStatus !==0" class="buttom-btn" type="error" @click.stop="handleCancle">
|
||||
取消
|
||||
</u-button>
|
||||
<u-button v-if="config.current == 2" class="buttom-btn" type="error" @click.stop="handleFail" :disabled="idDsabled" :loading="btnLoading">
|
||||
不通过
|
||||
</u-button>
|
||||
@@ -197,7 +200,10 @@
|
||||
|
||||
<!-- 输入框区域 -->
|
||||
<view class="dialog-content">
|
||||
<view class="input-label">审批意见</view>
|
||||
<view class="input-label">
|
||||
审批意见
|
||||
<text style="color: red;">*</text>
|
||||
</view>
|
||||
<u-input
|
||||
v-model="approvalReason"
|
||||
type="textarea"
|
||||
@@ -255,7 +261,10 @@
|
||||
<!-- </u-select> -->
|
||||
<!-- </view> -->
|
||||
<view class="form-item-user required">
|
||||
<view>
|
||||
<text class="label">指定用户</text>
|
||||
<text style="color: red;">*</text>
|
||||
</view>
|
||||
<view>
|
||||
<user-select
|
||||
v-model="copyForm.options"
|
||||
@@ -282,6 +291,32 @@
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 取消原因弹框 -->
|
||||
<u-popup v-model="showCacleDialog" mode="center" :round="10">
|
||||
<view class="copy-dialog">
|
||||
<view class="dialog-header">
|
||||
<text class="dialog-title">取消流程</text>
|
||||
<u-icon name="close" size="24" color="#999" @click="showCacleDialog = false" class="close-icon"></u-icon>
|
||||
</view>
|
||||
|
||||
<view class="dialog-content">
|
||||
<view class="form-item required">
|
||||
<text class="label">取消原因</text>
|
||||
<u-input
|
||||
v-model="cacleReason"
|
||||
type="textarea"
|
||||
placeholder="请输入取消原因"
|
||||
:rows="3"
|
||||
border="surround"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="dialog-footer">
|
||||
<u-button class="footer-btn cancel-btn" @click="showCacleDialog = false">取消</u-button>
|
||||
<u-button class="footer-btn submit-btn" type="primary" @click="submitCancel" :loading="cacleSubmitting">确定</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -362,7 +397,11 @@
|
||||
processInstanceName: '',
|
||||
options: {},
|
||||
reason: ''
|
||||
}
|
||||
},
|
||||
// 取消
|
||||
showCacleDialog: false,
|
||||
cacleReason: '',
|
||||
cacleSubmitting: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -386,6 +425,17 @@
|
||||
isApproval(){
|
||||
const {current} = this.config
|
||||
return !!current || this.isProcess
|
||||
},
|
||||
// 是否显示底部按钮
|
||||
isShowBtn(){
|
||||
const {approveStatus,id} = this.dataForm
|
||||
const {config,isProcess} = this
|
||||
if(!isProcess) return true
|
||||
console.log(approveStatus,'approveStatus--')
|
||||
console.log(config.current,'config.current--')
|
||||
if(approveStatus == 3 &&config.current ==3 ) return false
|
||||
if(approveStatus !== 4 || !id || config.current && config.current == 2 ) return true
|
||||
return false
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -496,6 +546,9 @@
|
||||
case 'fail':
|
||||
name = '审批不通过成功'
|
||||
break;
|
||||
case 'cancel':
|
||||
name = '取消成功'
|
||||
break;
|
||||
}
|
||||
|
||||
uni.showToast({
|
||||
@@ -589,7 +642,7 @@
|
||||
if (res.code === 0 || res.code === 200) {
|
||||
this.processList = res.data || []
|
||||
if(this.processList.length === 1){
|
||||
this.selectProcess(res.data[0])
|
||||
this.selectProcess(res.data[0].id)
|
||||
}
|
||||
if (this.processList.length === 0) {
|
||||
uni.showToast({
|
||||
@@ -621,6 +674,15 @@
|
||||
},
|
||||
// 抄送-提交
|
||||
submitCopyRule(){
|
||||
const {options,reason} = this.copyForm
|
||||
if(!options.length || !reason){
|
||||
const name = !options.length ? '指定用户不能为空' : '抄送原因不能为空'
|
||||
uni.showToast({
|
||||
title: name,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
const {id,processInstance} = this.approvalData[0]
|
||||
const params = {
|
||||
processType: '4',
|
||||
@@ -758,6 +820,47 @@
|
||||
this.approvalReason = '' // 清空之前的意见
|
||||
this.showApprovalReasonDialog = true
|
||||
},
|
||||
// 取消
|
||||
handleCancle() {
|
||||
this.approvalType = 'cancel'
|
||||
this.cacleReason = ''
|
||||
this.showCacleDialog = true
|
||||
},
|
||||
// 取消弹框确认
|
||||
submitCancel() {
|
||||
if(!this.cacleReason){
|
||||
uni.showToast({
|
||||
title: '请输入取消原因',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
try {
|
||||
this.cacleSubmitting = true
|
||||
//参数
|
||||
const params = {
|
||||
processType: 5,
|
||||
processInstanceId: this.formData.processInstanceId, // 流程实例ID
|
||||
id: this.formData.id,
|
||||
data: {
|
||||
dbFormId : this.modelId,
|
||||
id: this.approvalData && this.approvalData[0].id, // 审批记录第一条id
|
||||
reason: this.cacleReason || '',
|
||||
}
|
||||
}
|
||||
//调用
|
||||
this.getListCreateData(params)
|
||||
|
||||
} catch (err) {
|
||||
console.error('取消失败:', err)
|
||||
uni.showToast({
|
||||
title: '取消失败,请重试',
|
||||
icon: 'none'
|
||||
})
|
||||
} finally {
|
||||
this.cacleSubmitting = false
|
||||
}
|
||||
},
|
||||
// 查看流程
|
||||
goProcess(){
|
||||
this.isProcess = true
|
||||
@@ -769,6 +872,13 @@
|
||||
|
||||
// 提交审批结果(通过/不通过)
|
||||
async submitApprovalResult() {
|
||||
if(!this.approvalReason){
|
||||
uni.showToast({
|
||||
title: '请填写审批意见',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
try {
|
||||
this.approvalSubmitting = true
|
||||
// 构造审批参数(
|
||||
|
||||
@@ -46,7 +46,7 @@ import { computed } from "vue";
|
||||
this.config = JSON.parse(this.jnpf.base64.decode(obj.config)) || {};
|
||||
this.isPreview = this.config.isPreview || false;
|
||||
this.enableFlow = this.config.type === 9 ? 1 : 0;
|
||||
this.title = this.config.name || "";
|
||||
this.title = this.config.tableTitle || "";
|
||||
this.modelId = this.config.id || "";
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.title,
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
},
|
||||
// 跳转待办
|
||||
openToDoPage() {
|
||||
uni.setStorageSync('fromNonTabBar', true);
|
||||
uni.setStorageSync('fromNonTabBar', 1);
|
||||
uni.switchTab({
|
||||
url: '/pages/workFlow/flowTodo/index',
|
||||
});
|
||||
|
||||
@@ -65,14 +65,23 @@
|
||||
},
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
current:{
|
||||
handler(val){
|
||||
uni.setStorageSync('fromNonTabBar', val);
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
const fromNonTabBar = uni.getStorageSync('fromNonTabBar');
|
||||
console.log(fromNonTabBar,'fromNonTabBar---')
|
||||
if(!fromNonTabBar){
|
||||
this.current = 1
|
||||
}else {
|
||||
this.current = 0
|
||||
}
|
||||
this.current = fromNonTabBar && Number(fromNonTabBar)
|
||||
// if(!fromNonTabBar){
|
||||
// this.current = 1
|
||||
// }else {
|
||||
// this.current = 0
|
||||
// }
|
||||
uni.removeStorageSync('fromNonTabBar');
|
||||
uni.$off('operate')
|
||||
uni.$on('refresh', () => {
|
||||
|
||||
Reference in New Issue
Block a user