|
@@ -549,7 +549,7 @@ Page({
|
|
|
const userid = wx.getStorageSync('userMsg').userid;
|
|
const userid = wx.getStorageSync('userMsg').userid;
|
|
|
const team = this.data.detail.team || [];
|
|
const team = this.data.detail.team || [];
|
|
|
const options = wx.getStorageSync('auth').wWorkOrder.options || [];
|
|
const options = wx.getStorageSync('auth').wWorkOrder.options || [];
|
|
|
- const isInTeam = team.some(v => v.userid == userid);
|
|
|
|
|
|
|
+ const isLeader = team.some(v => v.userid == userid && v.isleader == 1);
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
const tabbarList = [];
|
|
const tabbarList = [];
|
|
@@ -557,12 +557,12 @@ Page({
|
|
|
const canCancel = options.some(v => v == 'cancellation');
|
|
const canCancel = options.some(v => v == 'cancellation');
|
|
|
|
|
|
|
|
if (status === '待开始') {
|
|
if (status === '待开始') {
|
|
|
- if (isInTeam) tabbarList.push({ icon: "icon-kaishigongdan", label: "开始工单" });
|
|
|
|
|
|
|
+ if (isLeader) tabbarList.push({ icon: "icon-kaishigongdan", label: "开始工单" });
|
|
|
if (canCancel) tabbarList.push({ icon: "icon-zuofei", label: "作废" });
|
|
if (canCancel) tabbarList.push({ icon: "icon-zuofei", label: "作废" });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (status === '进行中') {
|
|
if (status === '进行中') {
|
|
|
- if (isInTeam) tabbarList.push({ icon: "icon-wanjiegongdan", label: "完结工单" });
|
|
|
|
|
|
|
+ if (isLeader) tabbarList.push({ icon: "icon-wanjiegongdan", label: "完结工单" });
|
|
|
if (canStartOrStop) tabbarList.push({ icon: "icon-zanting", label: "暂停" });
|
|
if (canStartOrStop) tabbarList.push({ icon: "icon-zanting", label: "暂停" });
|
|
|
if (canCancel) tabbarList.push({ icon: "icon-zuofei", label: "作废" });
|
|
if (canCancel) tabbarList.push({ icon: "icon-zuofei", label: "作废" });
|
|
|
}
|
|
}
|