派单-人员搜索;账单根据状态搜索;订阅号通知;
This commit is contained in:
parent
9739578501
commit
b8beee15fb
|
|
@ -21,6 +21,16 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
<view class="padding-tb bg-white solid-bottom">
|
||||||
|
<view class="flex justify-between align-center margin-top-xs padding-left">
|
||||||
|
<my-uni-combox class="flex-sub margin-right-xs" :candidates="billingStateList"
|
||||||
|
:showField="'name'" placeholder="筛选账单状态" v-model="billingStateObj"
|
||||||
|
@input="chooseBillingState($event)"></my-uni-combox>
|
||||||
|
<view class="text-xl text-bold">
|
||||||
|
<text class="cuIcon-search margin-right-sm" @click="searchBills"></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<uni-collapse v-model="openStatusArr[index]" ref="collapse" v-for="(billItem, index) in bill">
|
<uni-collapse v-model="openStatusArr[index]" ref="collapse" v-for="(billItem, index) in bill">
|
||||||
<uni-collapse-item>
|
<uni-collapse-item>
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
|
|
@ -58,12 +68,28 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import myUniCombox from '@/components/uni-combox/my-uni-combox.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
myUniCombox
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
openStatusArr: [], //0打开,1收起
|
openStatusArr: [], //0打开,1收起
|
||||||
bill: [],
|
bill: [],
|
||||||
curUserInfo: {}
|
curUserInfo: {},
|
||||||
|
billingStateList: [{
|
||||||
|
code: 1,
|
||||||
|
name: '待到帐'
|
||||||
|
},{
|
||||||
|
code: 6,
|
||||||
|
name: '已取消'
|
||||||
|
},{
|
||||||
|
code: 5,
|
||||||
|
name: '已到帐'
|
||||||
|
}],
|
||||||
|
billingStateObj: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -73,10 +99,15 @@
|
||||||
async loadData() {
|
async loadData() {
|
||||||
this.curUserInfo = this.$request.getCurUserInfo();
|
this.curUserInfo = this.$request.getCurUserInfo();
|
||||||
// 查询账单
|
// 查询账单
|
||||||
|
this.qryBills();
|
||||||
|
},
|
||||||
|
async qryBills(params = {}) {
|
||||||
let billRes = await this.$request.qryFinancialCount({
|
let billRes = await this.$request.qryFinancialCount({
|
||||||
financialDetailTypes: [0,1]
|
financialDetailTypes: [0,1],
|
||||||
|
...params
|
||||||
});
|
});
|
||||||
this.bill = billRes.data;
|
this.bill = billRes.data;
|
||||||
|
this.openStatusArr = [];
|
||||||
for (let i = 0; i < this.bill.length; i++) {
|
for (let i = 0; i < this.bill.length; i++) {
|
||||||
this.openStatusArr.push('1');
|
this.openStatusArr.push('1');
|
||||||
}
|
}
|
||||||
|
|
@ -102,7 +133,8 @@
|
||||||
beginTime: createTimeStr,
|
beginTime: createTimeStr,
|
||||||
endTime: finishTimeStr,
|
endTime: finishTimeStr,
|
||||||
financialDetailTypes: [0,1],
|
financialDetailTypes: [0,1],
|
||||||
payeeId: this.curUserInfo.workerId
|
payeeId: this.curUserInfo.workerId,
|
||||||
|
billingState: this.billingStateObj ? this.billingStateObj.code : null
|
||||||
});
|
});
|
||||||
// let newStatements = this.statements.concat();
|
// let newStatements = this.statements.concat();
|
||||||
// newStatements[curIndex] = res.rows;
|
// newStatements[curIndex] = res.rows;
|
||||||
|
|
@ -123,6 +155,14 @@
|
||||||
url: '/pages/my/statement-desc?statementDesc=' + encodeURIComponent(JSON.stringify(item))
|
url: '/pages/my/statement-desc?statementDesc=' + encodeURIComponent(JSON.stringify(item))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
chooseBillingState(e) {
|
||||||
|
this.billingStateObj = e;
|
||||||
|
},
|
||||||
|
searchBills() {
|
||||||
|
this.qryBills({
|
||||||
|
billingState: this.billingStateObj ? this.billingStateObj.code : null
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,35 @@
|
||||||
<view class="padding-top-sm padding-bottom-xs flex justify-between align-center">
|
<view class="padding-top-sm padding-bottom-xs flex justify-between align-center">
|
||||||
<text class="margin-right-sm">本单可派任务金额:<text class="text-red text-lg">{{curOrder.serverMoney}}</text></text>
|
<text class="margin-right-sm">本单可派任务金额:<text class="text-red text-lg">{{curOrder.serverMoney}}</text></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="padding-bottom-sm solid-bottom flex justify-between align-center">
|
<view class="padding-bottom-sm flex justify-between align-center">
|
||||||
<text class="margin-right-sm" style="width: 150rpx;">派单价格</text>
|
<text class="margin-right-sm" style="width: 150rpx;">派单价格</text>
|
||||||
<input type="digit" class="line-input radius-input" v-model="dispatchTotalPrice" placeholder="请输入派出总额"></input>
|
<input type="digit" class="line-input radius-input" v-model="dispatchTotalPrice" placeholder="请输入派出总额"></input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="solid-top padding-top-sm flex justify-between align-center">
|
||||||
|
<input type="text" class="line-input radius-input margin-right-xs" v-model="workerName" placeholder="请输入师傅名称"></input>
|
||||||
|
<view class="text-xl text-bold">
|
||||||
|
<text class="cuIcon-search margin-right-sm" @click="searchWorkers"></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<!-- 可指派成员 -->
|
<!-- 可指派成员 -->
|
||||||
<scroll-view class="certern-height-with-scroll" :scroll-y="true" :scroll-with-animation="true">
|
<scroll-view class="certern-height-with-scroll" :scroll-y="true" :scroll-with-animation="true">
|
||||||
<view class="bg-white padding" v-for="(member, index) in members">
|
<view v-if="searchedMembers && searchedMembers.length > 0">
|
||||||
|
<view class="bg-white padding" v-for="(member, index) in searchedMembers">
|
||||||
|
<view class="flex justify-between align-center">
|
||||||
|
<view class="flex justify-start align-center">
|
||||||
|
<view class="cu-avatar round"
|
||||||
|
:style="'background-image:url(' + member.workerLogoUrl + ');min-width: 80rpx;min-height: 80rpx'"></view>
|
||||||
|
<view class="text-lg margin-left-sm">{{member.workerName ? member.workerName : member.name}}</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<button class="cu-btn bg-main-color shadow-blur" @click="assignWork(member)">指派</button>
|
||||||
|
<text v-if="singleServ" class="padding-left text-lg text-gray text-bold" data-modal="showDispatchPriceModal" @click="showModal"><text class="cuIcon-right"></text></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bg-white padding" v-for="(member, index) in members" v-else>
|
||||||
<view class="flex justify-between align-center">
|
<view class="flex justify-between align-center">
|
||||||
<view class="flex justify-start align-center">
|
<view class="flex justify-start align-center">
|
||||||
<view class="cu-avatar round"
|
<view class="cu-avatar round"
|
||||||
|
|
@ -88,7 +109,7 @@
|
||||||
},
|
},
|
||||||
members: {
|
members: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: {}
|
default: []
|
||||||
},
|
},
|
||||||
orderNow: {
|
orderNow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
@ -101,7 +122,10 @@
|
||||||
showDispatchPriceModal: false,
|
showDispatchPriceModal: false,
|
||||||
columnTitleArr: ['购买机型', '待派单', '派单量'],
|
columnTitleArr: ['购买机型', '待派单', '派单量'],
|
||||||
curOrder: {},
|
curOrder: {},
|
||||||
pickedList: []
|
pickedList: [],
|
||||||
|
workerName: null,
|
||||||
|
curUserInfo: null,
|
||||||
|
searchedMembers: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -118,9 +142,11 @@
|
||||||
this.dispatchTotalPrice = null;
|
this.dispatchTotalPrice = null;
|
||||||
this.pickedList = [];
|
this.pickedList = [];
|
||||||
this.curOrder = {};
|
this.curOrder = {};
|
||||||
|
this.curUserInfo = null;
|
||||||
},
|
},
|
||||||
loadData(order) {
|
loadData(order) {
|
||||||
this.resetData();
|
this.resetData();
|
||||||
|
this.curUserInfo = this.$request.getCurUserInfo();
|
||||||
this.getCanAssignList(order);
|
this.getCanAssignList(order);
|
||||||
},
|
},
|
||||||
async getCanAssignList(order) {
|
async getCanAssignList(order) {
|
||||||
|
|
@ -136,6 +162,14 @@
|
||||||
this.curOrder = getOrderRes.data;
|
this.curOrder = getOrderRes.data;
|
||||||
this.pickedList = pickedList;
|
this.pickedList = pickedList;
|
||||||
},
|
},
|
||||||
|
async searchWorkers() {
|
||||||
|
let res = await this.$request.getTeamPage({
|
||||||
|
leaderId: this.curUserInfo.workerId,
|
||||||
|
workerId: null,
|
||||||
|
workerName: this.workerName
|
||||||
|
});
|
||||||
|
this.searchedMembers = res.rows;
|
||||||
|
},
|
||||||
assignWork(member) {
|
assignWork(member) {
|
||||||
let goodsToAssign = [];
|
let goodsToAssign = [];
|
||||||
// 标识是否派完所有goods,1为派完,0为未派完
|
// 标识是否派完所有goods,1为派完,0为未派完
|
||||||
|
|
@ -180,8 +214,8 @@
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.certern-height-with-scroll {
|
.certern-height-with-scroll {
|
||||||
height: 280rpx;
|
height: 480rpx;
|
||||||
margin-bottom: calc(100rpx + constant(safe-area-inset-bottom) / 2);
|
/* margin-bottom: calc(100rpx + constant(safe-area-inset-bottom) / 2); */
|
||||||
margin-bottom: calc(100rpx + env(safe-area-inset-bottom) / 2);
|
/* margin-bottom: calc(100rpx + env(safe-area-inset-bottom) / 2); */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -196,8 +196,8 @@
|
||||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">改价</button>
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">改价</button>
|
||||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">转发</button> -->
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">转发</button> -->
|
||||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="showServOrderDetail(order)">查看</button>
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="showServOrderDetail(order)">查看</button>
|
||||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="updateOrderStatus(order.orderMasterId, 1, 'updateMasterOrder')" v-if="order.orderDetailId == null">确认接单</button>
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="acceptOrder(order.orderMasterId, order.orderMasterCode, 1, 'updateMasterOrder')" v-if="order.orderDetailId == null">确认接单</button>
|
||||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="updateOrderStatus(order.orderDetailId, 1, 'updateDetailOrder')" v-else>确认接单</button>
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="acceptOrder(order.orderDetailId, order.orderDetailCode, 1, 'updateDetailOrder')" v-else>确认接单</button>
|
||||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" v-if="order.orderDetailId == null" @click="rejectMasterOrder(order)">拒绝接单</button>
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" v-if="order.orderDetailId == null" @click="rejectMasterOrder(order)">拒绝接单</button>
|
||||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" v-else @click="rejectDetailOrder(order)">拒绝接单</button>
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" v-else @click="rejectDetailOrder(order)">拒绝接单</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -399,7 +399,7 @@
|
||||||
<uni-popup ref="dispatchOrderPopup" type="bottom" @change="changePopupState">
|
<uni-popup ref="dispatchOrderPopup" type="bottom" @change="changePopupState">
|
||||||
<view class="text-bold text-gray text-lg text-center left-top-sm-bar" data-popup="dispatchOrderPopup" @click="togglePopup"><text
|
<view class="text-bold text-gray text-lg text-center left-top-sm-bar" data-popup="dispatchOrderPopup" @click="togglePopup"><text
|
||||||
class="cuIcon-close"></text></view>
|
class="cuIcon-close"></text></view>
|
||||||
<view class="bg-white padding" style="padding-top: 74rpx; min-height: 600rpx;">
|
<view class="bg-white padding" style="padding-top: 74rpx; min-height: 1000rpx;">
|
||||||
<dispatch-order ref="dispatchOrder" v-if="myTeamMembers && myTeamMembers.length > 0" @assignWork="assignWork" :members="myTeamMembers" :totalMoney="curOrder.serverMoney"></dispatch-order>
|
<dispatch-order ref="dispatchOrder" v-if="myTeamMembers && myTeamMembers.length > 0" @assignWork="assignWork" :members="myTeamMembers" :totalMoney="curOrder.serverMoney"></dispatch-order>
|
||||||
<view v-else class="align-center-view text-xl">无可指派的师傅</view>
|
<view v-else class="align-center-view text-xl">无可指派的师傅</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -1054,6 +1054,30 @@
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
acceptOrder(id, code, status, funName) {
|
||||||
|
let _this = this;
|
||||||
|
// 提示订阅消息
|
||||||
|
uni.requestSubscribeMessage({
|
||||||
|
tmplIds: ['Yd2PJIdgBhEadi3EkAGyS4DiFp1Rd5ErsEs_jEt-HX4'],
|
||||||
|
complete(res) {
|
||||||
|
_this.noticeMsg({
|
||||||
|
remind: '接单提醒',
|
||||||
|
name: _this.curUserInfo.name,
|
||||||
|
orderId: code
|
||||||
|
});
|
||||||
|
this.updateOrderStatus(id, status, funName);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async noticeMsg(params = {}) {
|
||||||
|
this.$request.noticeMsg({
|
||||||
|
openId: this.curUserInfo.openId,
|
||||||
|
remind: params.remind,
|
||||||
|
orderId: params.orderId,
|
||||||
|
name: params.name,
|
||||||
|
orderStatus: 'RECEIVE'
|
||||||
|
});
|
||||||
|
},
|
||||||
async updateOrderStatus(id, status, funName) {
|
async updateOrderStatus(id, status, funName) {
|
||||||
let res = await this.$request[funName]({
|
let res = await this.$request[funName]({
|
||||||
id: id,
|
id: id,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue