Commit 1126e085 by 张立顺

fix

1 parent 7af1e439
...@@ -50,46 +50,46 @@ Component({ ...@@ -50,46 +50,46 @@ Component({
IMG_URL, IMG_URL,
// 订单状态 (0待报价、1待确认、2待支付、3已支付、5已完成、6已退款、9已撤销、11错误订单、-1战败) // 订单状态 (0待报价、1待确认、2待支付、3已支付、5已完成、6已退款、9已撤销、11错误订单、-1战败)
orderStatus: [{ orderStatus: [{
name: '全部', name: '全部',
active: true, active: true,
value: '' value: ''
}, },
{ {
name: '待报价', name: '待报价',
value: '0' value: '0'
}, },
// { // {
// name: '待确认', // name: '待确认',
// value: '1' // value: '1'
// }, // },
{ {
name: '待支付', name: '待支付',
value: '2' value: '2'
}, },
{ {
name: '已支付', name: '已支付',
value: '3' value: '3'
}, },
{ {
name: '已完成', name: '已完成',
value: '5' value: '5'
}, },
{ {
name: '已退款', name: '已退款',
value: '6' value: '6'
}, },
{ {
name: '已撤销', name: '已撤销',
value: '9' value: '9'
}, },
{ {
name: '错误订单', name: '错误订单',
value: '11' value: '11'
}, },
{ {
name: '战败', name: '战败',
value: '-1' value: '-1'
}, },
], ],
maxDate: new Date().format('yyyy-MM-dd'), maxDate: new Date().format('yyyy-MM-dd'),
orderTimeList: [{ orderTimeList: [{
...@@ -127,13 +127,13 @@ Component({ ...@@ -127,13 +127,13 @@ Component({
employShowMore: false, employShowMore: false,
salesmanShowMore: false, salesmanShowMore: false,
payTypeList: [{ payTypeList: [{
name: '门店收款', name: '门店收款',
value: 2 value: 2
}, },
{ {
name: '微信支付', name: '微信支付',
value: 1 value: 1
}, },
], ],
storeType: 1, // 门店数据类型 默认园区店 storeType: 1, // 门店数据类型 默认园区店
showStoreSelectPopup: false showStoreSelectPopup: false
...@@ -253,11 +253,11 @@ Component({ ...@@ -253,11 +253,11 @@ Component({
orderEndDate: end, orderEndDate: end,
type: 'custom' type: 'custom'
} : { } : {
active: true, active: true,
payStartDate: start, payStartDate: start,
payEndDate: end, payEndDate: end,
type: 'custom' type: 'custom'
} }
data[index] = obj data[index] = obj
this.setData({ this.setData({
[`form.${name}`]: data, [`form.${name}`]: data,
...@@ -343,12 +343,12 @@ Component({ ...@@ -343,12 +343,12 @@ Component({
e.value = [e.uuid] e.value = [e.uuid]
arr.push(e) arr.push(e)
}) })
if (!(userInfo?.isSuper || userInfo.loginRole == 3)) arr.map(e => { // if (!(userInfo?.isSuper || userInfo.loginRole == 3)) arr.map(e => {
if (type == 0) { // if (type == 0) {
e.active = false // e.active = false
if (e.uuid == userInfo.uuid) e.active = true // if (e.uuid == userInfo.uuid) e.active = true
} // }
}) // })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
...@@ -446,7 +446,7 @@ Component({ ...@@ -446,7 +446,7 @@ Component({
} }
}) })
}) })
if ((userInfo?.isSuper || userInfo.loginRole == 3))['selectedYqMerchantList', 'selectedMerchantList'].map(e => { if ((userInfo?.isSuper || userInfo.loginRole == 3)) ['selectedYqMerchantList', 'selectedMerchantList'].map(e => {
delete obj[e] delete obj[e]
}) })
if (isReset) obj = {} if (isReset) obj = {}
......
...@@ -339,7 +339,7 @@ Page({ ...@@ -339,7 +339,7 @@ Page({
merchantRange, merchantRange,
}); });
}) })
.catch((err) => {}); .catch((err) => { });
}, },
changePicker(e, value) { changePicker(e, value) {
let { let {
...@@ -492,6 +492,7 @@ Page({ ...@@ -492,6 +492,7 @@ Page({
if (!value) { if (!value) {
startDate = data.format("yyyy-MM-dd"); startDate = data.format("yyyy-MM-dd");
endDate = data.format("yyyy-MM-dd"); endDate = data.format("yyyy-MM-dd");
} else { } else {
// 选择 本月 // 选择 本月
const year = data.getFullYear(); const year = data.getFullYear();
...@@ -506,6 +507,7 @@ Page({ ...@@ -506,6 +507,7 @@ Page({
this.setData({ this.setData({
startDate, startDate,
endDate, endDate,
["tableBtn[1].text"]: '本月'
}); });
this.setTab(tableBtn, value); this.setTab(tableBtn, value);
this.getMerchantCouponList(); this.getMerchantCouponList();
...@@ -625,20 +627,20 @@ Page({ ...@@ -625,20 +627,20 @@ Page({
} = this.data; } = this.data;
isStaff && isStaff &&
api api
.waitinputorder() .waitinputorder()
.then((result) => { .then((result) => {
let { let {
code, code,
data data
} = result; } = result;
this.setTime(); this.setTime();
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
waitInputCount: data.waitInputCount, waitInputCount: data.waitInputCount,
}); });
} }
}) })
.catch((err) => {}); .catch((err) => { });
}, },
getMerchantCouponList() { getMerchantCouponList() {
...@@ -776,7 +778,7 @@ Page({ ...@@ -776,7 +778,7 @@ Page({
}); });
} }
}) })
.catch((err) => {}); .catch((err) => { });
}, },
getUserStat(userInfo) { getUserStat(userInfo) {
api api
...@@ -806,7 +808,7 @@ Page({ ...@@ -806,7 +808,7 @@ Page({
}); });
} }
}) })
.catch((err) => {}); .catch((err) => { });
}, },
totalListSet() { totalListSet() {
let { let {
...@@ -815,24 +817,24 @@ Page({ ...@@ -815,24 +817,24 @@ Page({
if (userInfo.subLoginUser?.loginRole == 3 || userInfo.isSuper) { if (userInfo.subLoginUser?.loginRole == 3 || userInfo.isSuper) {
this.setData({ this.setData({
totalList: [{ totalList: [{
name: "转化订单", name: "转化订单",
itemName: "totalUpgrade", itemName: "totalUpgrade",
index: 4, index: 4,
icon: "icon_17", icon: "icon_17",
}, },
{ {
name: "战败订单", name: "战败订单",
itemName: "totalNotUpgrade", itemName: "totalNotUpgrade",
index: 5, index: 5,
icon: "icon_16", icon: "icon_16",
}, },
{ {
name: "客单价", name: "客单价",
itemName: "customerUnitPrice", itemName: "customerUnitPrice",
unit: "¥", unit: "¥",
index: 6, index: 6,
icon: "icon_7", icon: "icon_7",
}, },
], ],
}); });
} }
...@@ -922,7 +924,7 @@ Page({ ...@@ -922,7 +924,7 @@ Page({
// if (wx.__HAS_NOREPORT_MODAL || wx.__HAS_NOTLOGIN_MODAL) return false; // if (wx.__HAS_NOREPORT_MODAL || wx.__HAS_NOTLOGIN_MODAL) return false;
// wx.__HAS_NOREPORT_MODAL = true; // wx.__HAS_NOREPORT_MODAL = true;
if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3) return false if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3) return false
this.addModalToQueue('开单预警', '您已超过三天未开单', '确定', false, 1, () => {}) this.addModalToQueue('开单预警', '您已超过三天未开单', '确定', false, 1, () => { })
// this.showNextModal() // this.showNextModal()
// wx.showModal({ // wx.showModal({
// title: "开单预警", // title: "开单预警",
...@@ -1116,17 +1118,17 @@ Page({ ...@@ -1116,17 +1118,17 @@ Page({
// status 1待跟进(有inviteRecordId跳转预约详情无跳转待跟进工单页面 微信支付跳转工单确认页面)3待支付(跳转工单确认页面)constructionFlag(已施工页面) // status 1待跟进(有inviteRecordId跳转预约详情无跳转待跟进工单页面 微信支付跳转工单确认页面)3待支付(跳转工单确认页面)constructionFlag(已施工页面)
let pageName = let pageName =
options?.status == 1 && options?.pageParams?.id ? options?.status == 1 && options?.pageParams?.id ?
"tabDate.detail" : "tabDate.detail" :
options.status == 3 || options.status == 3 ||
(options.status == 1 && options.selectPayType == 1) ? (options.status == 1 && options.selectPayType == 1) ?
"tabWorkOrder.confirmOrder" : "tabWorkOrder.confirmOrder" :
options.constructionFlag == "Y" && options.status != 10 ? options.constructionFlag == "Y" && options.status != 10 ?
"tabWorkOrder.constructionOrderDetail" : "tabWorkOrder.constructionOrderDetail" :
"tabWorkOrder.orderDetail"; "tabWorkOrder.orderDetail";
wx.$router.go( wx.$router.go(
`${pageName}?id=${options?.pageParams?.id}&orderCode=${options?.pageParams?.orderCode}`, { `${pageName}?id=${options?.pageParams?.id}&orderCode=${options?.pageParams?.orderCode}`, {
...options?.pageParams, ...options?.pageParams,
} }
); );
} }
// 产品需求:强制填写(04-17版本) // 产品需求:强制填写(04-17版本)
...@@ -1177,49 +1179,49 @@ Page({ ...@@ -1177,49 +1179,49 @@ Page({
if (userInfo?.isSuper || userInfo?.loginRole == 3) return if (userInfo?.isSuper || userInfo?.loginRole == 3) return
userInfo?.default4SStoreInfo?.merchantId && userInfo?.default4SStoreInfo?.merchantId &&
commonApi commonApi
.getStaffTargetTaskApi({ .getStaffTargetTaskApi({
sceneType: 1, sceneType: 1,
merchantId: userInfo?.default4SStoreInfo?.merchantId, merchantId: userInfo?.default4SStoreInfo?.merchantId,
}) })
.then((res) => { .then((res) => {
let { let {
code, code,
data, data,
message message
} = res; } = res;
if (code == 0) { if (code == 0) {
// 切换门店 需删除入口 重新请求判断显示入口 // 切换门店 需删除入口 重新请求判断显示入口
let index = menu.findIndex((v) => v.name == "驻店目标"); let index = menu.findIndex((v) => v.name == "驻店目标");
if (index > -1) menu.splice(index, 1); if (index > -1) menu.splice(index, 1);
if (data?.length && menu.every((item) => item.name != "驻店目标")) { if (data?.length && menu.every((item) => item.name != "驻店目标")) {
menu.push({ menu.push({
name: "驻店目标", name: "驻店目标",
url: "packageEquity.residentTarget", url: "packageEquity.residentTarget",
icon: "resident_target", icon: "resident_target",
noRead: data[0]?.readFlag == "N", noRead: data[0]?.readFlag == "N",
}); });
} }
this.setData({
taskId: data[0]?.id,
menu,
});
// 当前周期未弹起过查看任务明细提示弹窗
if (data[0]?.promptFlag == "N") {
this.setData({ this.setData({
showTaskDialog: true, taskId: data[0]?.id,
taskInfo: data[0], menu,
}); });
// 将当前周期的员工目标任务弹窗标记为已弹起 // 当前周期未弹起过查看任务明细提示弹窗
commonApi if (data[0]?.promptFlag == "N") {
.setTaskDialog({ this.setData({
id: data[0]?.id, showTaskDialog: true,
}) taskInfo: data[0],
.then(() => {}); });
// 将当前周期的员工目标任务弹窗标记为已弹起
commonApi
.setTaskDialog({
id: data[0]?.id,
})
.then(() => { });
}
} else {
wx.$util.showToast(message);
} }
} else { });
wx.$util.showToast(message);
}
});
}, },
getIsBusinessSchoolEnableCurrentUser() { getIsBusinessSchoolEnableCurrentUser() {
getBusinessSchoolScene({}).then((res) => { getBusinessSchoolScene({}).then((res) => {
...@@ -1280,7 +1282,7 @@ Page({ ...@@ -1280,7 +1282,7 @@ Page({
url: "pages.tabDateIndex", url: "pages.tabDateIndex",
recordId: 8, recordId: 8,
icon: "booking_management", icon: "booking_management",
}, ]; },];
// 判断是超管再加 这个菜单 // 判断是超管再加 这个菜单
// if (userInfo.isSuper) { // if (userInfo.isSuper) {
// menu.push({ // menu.push({
...@@ -1467,14 +1469,14 @@ Page({ ...@@ -1467,14 +1469,14 @@ Page({
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () {}, onPullDownRefresh: function () { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}, onReachBottom: function () { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {}, onShareAppMessage: function () { },
}); });
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!