更新市场部长任务
This commit is contained in:
parent
b276f6f126
commit
d09a14803d
@ -124,7 +124,7 @@
|
|||||||
taskRoleTypeList: ['town_task_type', 'town_task_type_marketing_director', 'town_task_type_master'],
|
taskRoleTypeList: ['town_task_type', 'town_task_type_marketing_director', 'town_task_type_master'],
|
||||||
townServiceList: [44,45,46,47,48,49,50], // 镇农科服务部长任务
|
townServiceList: [44,45,46,47,48,49,50], // 镇农科服务部长任务
|
||||||
navToTownServiceList: [44,45,46,48,49,50], // 镇农科服务部长跳转/subpkg/townTask/townTask的任务 0
|
navToTownServiceList: [44,45,46,48,49,50], // 镇农科服务部长跳转/subpkg/townTask/townTask的任务 0
|
||||||
navToTownMarketList: [51,53,54,55,57,58,59] // 镇农科市场部长跳转/subpkg/townTask/townTask的任务 1
|
navToTownMarketList: [51,52,53,54,55,57,58,59] // 镇农科市场部长跳转/subpkg/townTask/townTask的任务 1
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -8,15 +8,21 @@
|
|||||||
<view class="c_title">{{`任务名称: ${taskInfo.title||''}`}}</view>
|
<view class="c_title">{{`任务名称: ${taskInfo.title||''}`}}</view>
|
||||||
<view>{{taskInfo.content||''}}</view>
|
<view>{{taskInfo.content||''}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="card" v-if="taskInfo.approve_status==3">
|
||||||
|
<view class="c_title" style="color: #FF7C32;">驳回提示</view>
|
||||||
|
<u-line style="margin: 14rpx 0;"></u-line>
|
||||||
|
<view class="text" style="color: #FF7C32;">{{taskInfo.deny_notes}}</view>
|
||||||
|
<button v-if="other.is_commit==1" class="btn" @click="toUpdate">去修改</button>
|
||||||
|
</view>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="c_title">任务完成证明</view>
|
<view class="c_title">任务完成证明</view>
|
||||||
<view class="file">
|
<view class="file">
|
||||||
<view class="file_item" v-for="(item, index) in imgList" :key="'file'+index">
|
<view class="file_item" v-for="(item, index) in imgList" :key="'file'+index">
|
||||||
<image class="image" :src="item" @click="priview(index)"></image>
|
<image class="image" :src="item" @click="priview(index)"></image>
|
||||||
<image v-if="taskInfo.status==2" class="del" src="/static/icons/delete.png" @click.stop="deleteFile(index)">
|
<image v-if="taskInfo.status==2 && other.is_commit==0" class="del" src="/static/icons/delete.png" @click.stop="deleteFile(index)">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="taskInfo.status==2" class="file_btn" @click="chooseFile">
|
<view v-if="taskInfo.status==2 && other.is_commit==0" class="file_btn" @click="chooseFile">
|
||||||
<image src="/static/icons/plus.png"></image>
|
<image src="/static/icons/plus.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="file_empty" v-for="k in placeholderLength" :key="'empty'+k"></view>
|
<view class="file_empty" v-for="k in placeholderLength" :key="'empty'+k"></view>
|
||||||
@ -28,10 +34,10 @@
|
|||||||
placeholderStyle="font-size: 22rpx;" count maxlength="500" autoHeight
|
placeholderStyle="font-size: 22rpx;" count maxlength="500" autoHeight
|
||||||
style="font-size: 28rpx;background-color: #eee;min-height: 100px;padding-bottom: 50rpx;"></u--textarea>
|
style="font-size: 28rpx;background-color: #eee;min-height: 100px;padding-bottom: 50rpx;"></u--textarea>
|
||||||
</view>
|
</view>
|
||||||
<mybtn v-if="taskInfo.status==2" text="确认提交" @click="$u.throttle(submit, 1500)"></mybtn>
|
<mybtn v-if="taskInfo.status==2&&other.is_commit==0" text="确认提交" @click="$u.throttle(submit, 1500)"></mybtn>
|
||||||
<mybtn v-else-if="taskInfo.status==3" text="已完成" :my_btn_disabled="true" @click="showToast('任务已完成!')"></mybtn>
|
<mybtn v-else-if="taskInfo.status==3" text="已完成" :my_btn_disabled="true" @click="showToast('任务已完成!')"></mybtn>
|
||||||
<mybtn v-else-if="taskInfo.status==5" text="已关闭" :my_btn_disabled="true" @click="showToast('任务已关闭!')"></mybtn>
|
<mybtn v-else-if="taskInfo.status==5" text="已关闭" :my_btn_disabled="true" @click="showToast('任务已关闭!')"></mybtn>
|
||||||
<!-- <mybtn v-else-if="approve_status==3" text="已驳回,请重新提交" @click="toUpdate"></mybtn> -->
|
<mybtn v-else-if="taskInfo.approve_status==3" text="已驳回,请重新提交" @click="toUpdate"></mybtn>
|
||||||
<mybtn v-else text="已提交,请等待审核" :my_btn_disabled="true" @click="showToast('请耐心等待审核结果')"></mybtn>
|
<mybtn v-else text="已提交,请等待审核" :my_btn_disabled="true" @click="showToast('请耐心等待审核结果')"></mybtn>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
@ -42,7 +48,7 @@
|
|||||||
upLoadImage,
|
upLoadImage,
|
||||||
} from "@/api/file.js";
|
} from "@/api/file.js";
|
||||||
import { Toast } from "../../libs/uniApi";
|
import { Toast } from "../../libs/uniApi";
|
||||||
import { townTaskDetails, marketTask10Commit } from "@/api/task.js"
|
import { marketTask10Detail, marketTask10Commit } from "@/api/task.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -79,26 +85,62 @@
|
|||||||
computed: {
|
computed: {
|
||||||
// 占位长度
|
// 占位长度
|
||||||
placeholderLength() {
|
placeholderLength() {
|
||||||
if (this.taskInfo.status != 2) return this.imgList.length % 3 == 0 ? 0 : 3 - this.imgList.length % 3;
|
if (this.taskInfo.status != 2||this.other.is_commit==1) return this.imgList.length % 3 == 0 ? 0 : 3 - this.imgList.length % 3;
|
||||||
return (this.imgList.length + 1) % 3 == 0 ? 0 : 3 - (this.imgList.length + 1) % 3;
|
return (this.imgList.length + 1) % 3 == 0 ? 0 : 3 - (this.imgList.length + 1) % 3;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async initTask() {
|
async initTask() {
|
||||||
this.skeleton = true;
|
this.skeleton = true;
|
||||||
let res = await townTaskDetails({
|
let res = await marketTask10Detail({
|
||||||
id: this.taskInfo.id
|
id: this.taskInfo.id
|
||||||
});
|
});
|
||||||
|
// approve_status 状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核
|
||||||
this.taskInfo = res.data;
|
this.taskInfo = res.data;
|
||||||
// console.log(this.taskInfo);
|
if(!this.taskInfo.approve_status)this.taskInfo.approve_status=0;
|
||||||
|
if(this.taskInfo?.extend?.file){
|
||||||
|
// 判断该任务是否提交过
|
||||||
|
if(this.taskInfo.extend.stage4?.is_commit==1)this.other.is_commit = 1;
|
||||||
|
else if(this.taskInfo.extend.stage3?.is_commit==1)this.other.is_commit = 1;
|
||||||
|
else if(this.taskInfo.extend.stage2?.is_commit==1)this.other.is_commit = 1;
|
||||||
|
else if(this.taskInfo.extend.stage1?.is_commit==1)this.other.is_commit = 1;
|
||||||
|
else this.other.is_commit = 0;
|
||||||
|
let task = JSON.parse(JSON.stringify(this.taskInfo.extend))
|
||||||
|
this.imgList = task.file;
|
||||||
|
this.remark = task.remark;
|
||||||
|
}
|
||||||
// this.sign_in_table = this.taskInfo?.extend?.town_task_type_4?.sign_in_table;
|
// this.sign_in_table = this.taskInfo?.extend?.town_task_type_4?.sign_in_table;
|
||||||
// this.remark = this.taskInfo?.extend?.town_task_type_4?.remark;
|
// this.remark = this.taskInfo?.extend?.town_task_type_4?.remark;
|
||||||
// this.imgList = JSON.parse(JSON.stringify(this.taskInfo?.extend?.town_task_type_4?.imgList || []));
|
// this.imgList = JSON.parse(JSON.stringify(this.taskInfo?.extend?.town_task_type_4?.imgList || []));
|
||||||
this.skeleton = false;
|
this.skeleton = false;
|
||||||
},
|
},
|
||||||
|
// 被驳回时点击重新修改
|
||||||
|
toUpdate() {
|
||||||
|
this.other.is_commit = 0;
|
||||||
|
},
|
||||||
|
// 判断内容是否更改, 返回true代表更改
|
||||||
|
isReject(){
|
||||||
|
if (this.taskInfo.approve_status == 3) { // 被驳回,重新提交需要修改内容后方可提交
|
||||||
|
let other = {
|
||||||
|
file: this.imgList,
|
||||||
|
remark: this.remark
|
||||||
|
}
|
||||||
|
let flag = true;
|
||||||
|
if(JSON.stringify(other)==JSON.stringify({
|
||||||
|
file: this.taskInfo.extend.file,
|
||||||
|
remark: this.taskInfo.extend.remark
|
||||||
|
})) flag = false;
|
||||||
|
if (!flag) {
|
||||||
|
Toast('未检测到您的修改,请修改后提交')
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
else return true;
|
||||||
|
},
|
||||||
// 提交
|
// 提交
|
||||||
async submit() {
|
async submit() {
|
||||||
if (this.imgList.length < 1) return Toast('证明数量不得小于1');
|
if (this.imgList.length < 1) return Toast('证明数量不得小于1');
|
||||||
|
if(!this.isReject()) return;
|
||||||
let that = this;
|
let that = this;
|
||||||
switch (that.stage) {
|
switch (that.stage) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -131,7 +173,7 @@
|
|||||||
},
|
},
|
||||||
chooseFile() {
|
chooseFile() {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 5,
|
count: 9,
|
||||||
sizeType: ['compressed'],
|
sizeType: ['compressed'],
|
||||||
success: async (res) => {
|
success: async (res) => {
|
||||||
for (let item of res.tempFiles) {
|
for (let item of res.tempFiles) {
|
||||||
@ -209,6 +251,15 @@
|
|||||||
color: #333333;
|
color: #333333;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background-color: $theme-oa-color;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 28rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
margin-top: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.file {
|
.file {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user