|
|
<template>
|
|
|
<view>
|
|
|
<view class="nav">
|
|
|
<view class="navLeft">
|
|
|
<text class="iconfont iconBack iconTop" @tap="back"></text>
|
|
|
<text class="navTitle" v-if="!seachBoxShow">{{pageTitle}}</text>
|
|
|
</view>
|
|
|
<view class="navRight">
|
|
|
<view class="searchBox" v-if="seachBoxShow">
|
|
|
<input type="text" class="searchBoxInput" :focus="focusSet" @input='bindKeyWord'
|
|
|
@confirm="loadPage(1)"></input>
|
|
|
<text class='iconTop iconfont iconCloseSearch' @tap="bindCloseSearch"></text>
|
|
|
</view>
|
|
|
<text class='iconMoreSeach iconTop iconfont' v-if="!seachBoxShow" @tap="showDrawer"></text>
|
|
|
<text class='iconSeach iconTop iconfont' @tap="bindSearch"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="navTab">
|
|
|
<block v-for="(item, index) in tabs">
|
|
|
<view class="tabItem" @tap="bindNavChange" :data-index="index" :data-status="status">
|
|
|
<text class="tabTxt tabItemOn" v-if="item.checked">{{item.title}}({{item.count}})</text>
|
|
|
<text class="tabTxt " v-else>{{item.title}}({{item.count}})</text>
|
|
|
<view class="tabItemOnLine" v-if="item.checked"></view>
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
<view class="content">
|
|
|
<view class="listOrder">
|
|
|
<list>
|
|
|
<cell v-for="(item, index) in orders" :key="item.id">
|
|
|
<view class="orderBox">
|
|
|
<navigator :url="'../../package/packageorder/pages/orderinfo/orderinfo?id='+item.id">
|
|
|
<view class="orderHeader">
|
|
|
<text class="orderNo">订单编号:{{item.serial}}</text>
|
|
|
<text class="orderStatus">{{item.status_name}}</text>
|
|
|
</view>
|
|
|
|
|
|
<view class="orderBody">
|
|
|
<view class="orderLine">
|
|
|
<text class="iconfont iconLocation icon"></text>
|
|
|
<text class="orderTxt">{{item.project.name}}</text>
|
|
|
<text class="orderGe">|</text>
|
|
|
<text
|
|
|
class="orderTxt">{{item.bed.building_name}}-{{item.bed.area_name}}-{{item.bed.room_name}}-{{item.bed.name+'床'}}</text>
|
|
|
</view>
|
|
|
<view class="orderLine">
|
|
|
<text class="iconfont iconLocation icon"></text>
|
|
|
<text class="orderTxt">{{item.patient.name}}</text>
|
|
|
<text class="orderGe">|</text>
|
|
|
<text class="orderTxt">{{item.patient.sex==null?'男':item.patient.sex}}</text>
|
|
|
<text class="orderGe">|</text>
|
|
|
<text class="orderTxt">{{item.mobile}}</text>
|
|
|
</view>
|
|
|
<view class="orderLine">
|
|
|
<text class="iconfont iconLocation icon"></text>
|
|
|
<text
|
|
|
class="orderTxt">{{item.from_date}}~{{item.to_date}}共预约{{item.days}}天</text>
|
|
|
</view>
|
|
|
<view class="orderLine" style="padding-left: 43rpx;">
|
|
|
<block v-for="(m,i) in item.factorjson">
|
|
|
<view class="orderTag tagBox1">
|
|
|
<text class="orderTagTxt tag1">{{m.factor_item_name}}</text>
|
|
|
</view>
|
|
|
</block>
|
|
|
<view class="orderTag tagBox2" v-if="item.product_item!=null">
|
|
|
<text class="orderTagTxt tag2">{{item.product_item.name}}</text>
|
|
|
</view>
|
|
|
<view class="orderTag tagBox3" v-if="item.paramedic_level!=null">
|
|
|
<text class="orderTagTxt tag3">{{item.paramedic_level.name}}</text>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="orderPrice">
|
|
|
<view class="priceBox">
|
|
|
<text class="priceTitle">合计:</text>
|
|
|
<text class="priceInfo">¥{{item.total}}</text>
|
|
|
</view>
|
|
|
<view class="priceBox">
|
|
|
<text class="priceTitle">已扣:</text>
|
|
|
<text class="priceInfo">¥{{item.paid_total}}</text>
|
|
|
</view>
|
|
|
<view class="priceBox">
|
|
|
<text class="priceTitle">余额:</text>
|
|
|
<text class="priceInfo">¥{{item.customer.balance}}</text>
|
|
|
</view>
|
|
|
|
|
|
<view class="priceBox">
|
|
|
<text class="priceTitle">护工:</text>
|
|
|
<text class="priceInfo">{{item.paramedic?item.paramedic.name:''}}</text>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
</navigator>
|
|
|
<view class="orderFooter" v-if="item.status!=100">
|
|
|
<view class="btn btnCancel" v-if="item.status==0||item.status==10">
|
|
|
<text class="btnTxt btnCancelTxt" @click="bindAction" data-type="doCancel"
|
|
|
:data-id='item.id'>取消</text>
|
|
|
</view>
|
|
|
|
|
|
<view class="btn btnEdit" v-if="item.status==0||item.status==10||item.status==20">
|
|
|
<text class="btnTxt btnEditTxt" @click="bindAction" data-type="doEdit"
|
|
|
:data-id='item.id'>修改</text>
|
|
|
</view>
|
|
|
<view class="btn btnConfirm" @click="bindAction" data-type='toAssign' :data-id='item.id'
|
|
|
v-if="item.status==0||item.status==10">
|
|
|
<text class="btnTxt btnConfirmTxt">派单</text>
|
|
|
</view>
|
|
|
<view class="btn btnConfirm" style="background-color: #3C91F5;border-color: #3C91F5;"
|
|
|
@click="bindAction" data-type='toZhongBuget' :data-id='item.id'
|
|
|
v-if="item.status==20">
|
|
|
<text class="btnTxt btnConfirmTxt">中途结算</text>
|
|
|
</view>
|
|
|
|
|
|
<view class="btn btnConfirm" @click="bindAction" data-type='toBuget' :data-id='item.id'
|
|
|
v-if="item.status==20">
|
|
|
<text class="btnTxt btnConfirmTxt">结算</text>
|
|
|
</view>
|
|
|
|
|
|
<view class="btn btnPay" @click="bindAction" data-type='toPay' :data-id='item.id'>
|
|
|
<text class="btnTxt btnConfirmTxt">收款</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="orderFooter" v-else>
|
|
|
<view class="btn btnEdit">
|
|
|
<text class="btnTxt btnEditTxt" @click="bindAction" data-type="doNewEdit"
|
|
|
:data-id='item.id'>再来一单</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</cell>
|
|
|
</list>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<uni-drawer ref="showRight" mode="right" :width='drawerwidth' :mask-click="false">
|
|
|
<view class="popupbox" :style="[{ height:windowHeight+'px'}]">
|
|
|
<view class="indexheader">
|
|
|
<view class="indexHeaderBox">
|
|
|
<view class="indexheaderLeft">
|
|
|
<view class="">订单筛选</view>
|
|
|
<view class="headerBorder"></view>
|
|
|
</view>
|
|
|
<view class="indexheaderRight">
|
|
|
<text class="icon_close iconfont" @tap="closeDrawer"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<scroll-view style="height: 100%;" scroll-y="true">
|
|
|
<view class="popupBody">
|
|
|
<view class="searchBox" style="background-color: #E4E4E4;">
|
|
|
<input type="text" class="searchBoxInput" :focus="focusSet" style="color: black;"
|
|
|
@input='bindKeyWord' @confirm="loadPage(1)"></input>
|
|
|
<text class='iconTop iconfont iconSeach'></text>
|
|
|
</view>
|
|
|
<view class="tagBoxAll">
|
|
|
<block v-for="(item, index) in searchData">
|
|
|
<view class="tagBox">
|
|
|
<view class="tagTitle">
|
|
|
<text class="tagTitleText">{{item.name}}</text>
|
|
|
</view>
|
|
|
<view class="tagBody">
|
|
|
<block v-for="(tag, tindex) in item.list">
|
|
|
<view class="tagInfo" :class="{tagInfoOn:tag.checked}" :data-pindex='index'
|
|
|
:data-index='tindex' @tap="bindTagTap">
|
|
|
<text class="tagInfoText "
|
|
|
:class="{tagInfoTextOn:tag.checked}">{{tag.name}}</text>
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
<view class="tagBox">
|
|
|
<view class="tagTitle">
|
|
|
<text class="tagTitleText">楼栋</text>
|
|
|
</view>
|
|
|
<view class="tagBody">
|
|
|
<block v-for="(tag, tindex) in multiArray">
|
|
|
<view class="tagInfo" :class="{tagInfoOn:tag.checked}" :data-pindex='index'
|
|
|
:data-index='tindex' @tap="bindBuildTap">
|
|
|
<text class="tagInfoText "
|
|
|
:class="{tagInfoTextOn:tag.checked}">{{tag.text}}</text>
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="tagBox">
|
|
|
<view class="tagTitle">
|
|
|
<text class="tagTitleText">楼层</text>
|
|
|
</view>
|
|
|
<view class="tagBody" v-if="multiArray[buildIndex]">
|
|
|
<block v-for="(tag, tindex) in multiArray[buildIndex].children">
|
|
|
<view class="tagInfo" :class="{tagInfoOn:tag.checked}" :data-pindex='index'
|
|
|
:data-index='tindex' @tap="bindAreaTap">
|
|
|
<text class="tagInfoText "
|
|
|
:class="{tagInfoTextOn:tag.checked}">{{tag.text}}</text>
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
|
|
|
<view class="popupFooter">
|
|
|
<view class='popbtn pop-btnReset' :style="[{width:windowWidth*0.8*0.5+'px'}]" @tap="bindreset">
|
|
|
<text class='pop-btnReset-text'>重置</text>
|
|
|
</view>
|
|
|
<view class='popbtn pop-btnSubmit' :style="[{width:windowWidth*0.8*0.5+'px'}]"
|
|
|
@tap="bindMoreSearch">
|
|
|
<text class='pop-btnSubmit-text'>提交</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</uni-drawer>
|
|
|
|
|
|
<view class="neworder" @click="bindCreate">
|
|
|
<text class="iconfont icon-add2"></text>
|
|
|
</view>
|
|
|
<view class="backTop" @click="bindBackTop" v-if="showbacktop==true">
|
|
|
<text class="backTopText">返回顶部</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
var util = require("../../utils/util.js");
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
searchData: [{
|
|
|
name: "天数",
|
|
|
list: [{
|
|
|
name: "1天",
|
|
|
value: 1,
|
|
|
checked: false
|
|
|
}, {
|
|
|
name: "2天",
|
|
|
value: 2,
|
|
|
checked: false
|
|
|
}, {
|
|
|
name: "3天",
|
|
|
value: 3,
|
|
|
checked: false
|
|
|
}, {
|
|
|
name: "4天",
|
|
|
value: 4,
|
|
|
checked: false
|
|
|
}, {
|
|
|
name: "5天",
|
|
|
value: 5,
|
|
|
checked: false
|
|
|
}, {
|
|
|
name: "6天",
|
|
|
value: 6,
|
|
|
checked: false
|
|
|
}]
|
|
|
},
|
|
|
{
|
|
|
name: "服务开始日期",
|
|
|
list: [{
|
|
|
name: "当天",
|
|
|
value: 1,
|
|
|
checked: false
|
|
|
}, {
|
|
|
name: "当周",
|
|
|
value: 2,
|
|
|
checked: false
|
|
|
}, {
|
|
|
name: "当月",
|
|
|
value: 3,
|
|
|
checked: false
|
|
|
}]
|
|
|
|
|
|
}
|
|
|
],
|
|
|
orders: [],
|
|
|
pageTitle: "订单管理",
|
|
|
tabs: [{
|
|
|
title: "全部",
|
|
|
count: 0,
|
|
|
checked: true,
|
|
|
status: ""
|
|
|
}, {
|
|
|
title: "待处理",
|
|
|
count: 0,
|
|
|
checked: false,
|
|
|
status: "pending"
|
|
|
}, {
|
|
|
title: "进行中",
|
|
|
count: 0,
|
|
|
checked: false,
|
|
|
status: "ongoing"
|
|
|
}, {
|
|
|
title: "已完成",
|
|
|
count: 0,
|
|
|
checked: false,
|
|
|
status: "finished"
|
|
|
}],
|
|
|
moreSearch: false,
|
|
|
currentPage: 0,
|
|
|
drawerwidth: 0,
|
|
|
activeKey: "",
|
|
|
seachBoxShow: false,
|
|
|
windowHeight: 1000,
|
|
|
windowWidth: 720,
|
|
|
keyword: "",
|
|
|
focusSet: false,
|
|
|
showbacktop: false,
|
|
|
host: "",
|
|
|
multiItems: [],
|
|
|
multiArray: [],
|
|
|
selectBuild: "",
|
|
|
selectArea: "",
|
|
|
selectDays: "",
|
|
|
selectSDate: "",
|
|
|
selectEDate: "",
|
|
|
buildIndex: 0
|
|
|
}
|
|
|
},
|
|
|
beforeCreate() {
|
|
|
|
|
|
this.host = util.HOST;
|
|
|
var url = this.host + "/fonts/font_2461474_cghgs0oe0r.ttf"
|
|
|
console.log(url);
|
|
|
var domModule = weex.requireModule('dom');
|
|
|
domModule.addRule('fontFace', {
|
|
|
'fontFamily': "iconfont5",
|
|
|
'src': "url('" + url + "')"
|
|
|
});
|
|
|
|
|
|
},
|
|
|
onReachBottom: function(e) {
|
|
|
this.loadPage(this.currentPage + 1);
|
|
|
},
|
|
|
onPullDownRefresh: function(e) {
|
|
|
this.loadPage(1);
|
|
|
},
|
|
|
onShow: function() {
|
|
|
var that = this;
|
|
|
this.loadPage(1);
|
|
|
this.loadData();
|
|
|
uni.getSystemInfo({
|
|
|
success: function(res) {
|
|
|
that.windowHeight = res.windowHeight;
|
|
|
that.windowWidth = res.windowWidth;
|
|
|
that.drawerwidth = that.windowWidth * .8;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
onLoad: function(option) {
|
|
|
console.log(option)
|
|
|
this.loadAreas();
|
|
|
if (option.from == "indexSearch") {
|
|
|
this.seachBoxShow = true;
|
|
|
this.focusSet = true;
|
|
|
}
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
//tag中楼层点击
|
|
|
bindAreaTap: function(e) {
|
|
|
var index = e.currentTarget.dataset.index;
|
|
|
var _tags = this.multiArray[this.buildIndex].children;
|
|
|
console.log(_tags)
|
|
|
for (var m of _tags) {
|
|
|
m.checked = false
|
|
|
}
|
|
|
_tags[index].checked = true;
|
|
|
this.multiArray[this.buildIndex].children = _tags;
|
|
|
this.selectArea = _tags[index].value;
|
|
|
|
|
|
},
|
|
|
//tag中楼栋点击
|
|
|
bindBuildTap: function(e) {
|
|
|
this.selectArea = "";
|
|
|
var index = e.currentTarget.dataset.index;
|
|
|
this.buildIndex = index;
|
|
|
var _tags = this.multiArray;
|
|
|
console.log(_tags)
|
|
|
for (var m of _tags) {
|
|
|
m.checked = false
|
|
|
}
|
|
|
_tags[index].checked = true;
|
|
|
this.selectBuild = _tags[index].value;
|
|
|
this.multiArray = _tags;
|
|
|
|
|
|
},
|
|
|
//加载楼层楼栋
|
|
|
loadAreas: function() {
|
|
|
var that = this;
|
|
|
var currentProject = uni.getStorageSync('currentProject');
|
|
|
util.request({
|
|
|
api: 'manager/get-project-areas/' + currentProject.id,
|
|
|
utilSuccess: function(res) {
|
|
|
var arr = [];
|
|
|
var objectArr = [];
|
|
|
var parr = [];
|
|
|
res.forEach(function(item, index) {
|
|
|
//arr.push(item.building_name + "-" + item.name);
|
|
|
if (parr.filter(function(a) {
|
|
|
return a.id == item.building_id
|
|
|
}).length == 0) {
|
|
|
|
|
|
parr.push({
|
|
|
id: item.building_id,
|
|
|
name: item.building_name
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
objectArr.push({
|
|
|
id: item.id,
|
|
|
name: item.building_name + "-" + item.name
|
|
|
|
|
|
});
|
|
|
})
|
|
|
|
|
|
parr.forEach(function(citem, cindex) {
|
|
|
var mod = {};
|
|
|
mod.text = citem.name;
|
|
|
mod.value = citem.id;
|
|
|
mod.checked = false;
|
|
|
var _carr = [];
|
|
|
res.forEach(function(item, index) {
|
|
|
if (citem.id == item.building_id) {
|
|
|
_carr.push({
|
|
|
"text": item.name,
|
|
|
"value": item.id,
|
|
|
"checked": false
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
|
|
|
mod.children = _carr;
|
|
|
arr.push(mod);
|
|
|
})
|
|
|
that.multiArray = arr;
|
|
|
that.multiItems = JSON.parse(JSON.stringify(arr));
|
|
|
},
|
|
|
utilFail: function(err) {
|
|
|
util.alert(err);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
//打开更多搜索的抽屉
|
|
|
showDrawer() {
|
|
|
this.$refs.showRight.open();
|
|
|
},
|
|
|
closeDrawer() {
|
|
|
this.$refs.showRight.close();
|
|
|
},
|
|
|
|
|
|
bindKeyWord: function(e) {
|
|
|
this.keyword = e.detail.value;
|
|
|
console.log(this.keyword)
|
|
|
},
|
|
|
bindBackTop: function() {
|
|
|
this.loadPage(1);
|
|
|
},
|
|
|
bindCreate: function() {
|
|
|
uni.navigateTo({
|
|
|
url: "../../package/packageorder/pages/createorder/createorder"
|
|
|
})
|
|
|
},
|
|
|
bindCloseSearch: function() {
|
|
|
this.seachBoxShow = false;
|
|
|
this.focusSet = true;
|
|
|
this.keyword="";
|
|
|
this.loadPage(1);
|
|
|
},
|
|
|
bindMoreSearch: function() {
|
|
|
this.loadPage(1);
|
|
|
this.closeDrawer();
|
|
|
},
|
|
|
bindSearch: function() {
|
|
|
if (this.seachBoxShow) {
|
|
|
this.loadPage(1);
|
|
|
}
|
|
|
this.seachBoxShow = true;
|
|
|
},
|
|
|
loadData: function() {
|
|
|
var that = this;
|
|
|
|
|
|
var currentProject = uni.getStorageSync('currentProject');
|
|
|
util.request({
|
|
|
bindThis: that,
|
|
|
api: 'manager/get-project-orders-count/' + currentProject.id,
|
|
|
customLoading: false,
|
|
|
utilSuccess: function(res) {
|
|
|
console.log(res);
|
|
|
that.tabs[0].count = res.orders_count.all;
|
|
|
that.tabs[1].count = res.orders_count.pending;
|
|
|
that.tabs[2].count = res.orders_count.ongoing;
|
|
|
that.tabs[3].count = res.orders_count.finished;
|
|
|
},
|
|
|
utilFail: function(res) {
|
|
|
util.alert(res);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
bindTagTap: function(e) {
|
|
|
var index = e.currentTarget.dataset.index;
|
|
|
var pindex = e.currentTarget.dataset.pindex;
|
|
|
var _searchData = this.searchData;
|
|
|
var _tags = _searchData[pindex].list;
|
|
|
console.log(_tags)
|
|
|
for (var m of _tags) {
|
|
|
m.checked = false
|
|
|
}
|
|
|
_tags[index].checked = true;
|
|
|
this.searchData = _searchData;
|
|
|
console.log(pindex)
|
|
|
if (pindex == 0) {
|
|
|
console.log("_tags[index]",_tags[index])
|
|
|
this.selectDays = _tags[index].value;
|
|
|
} else {
|
|
|
switch (_tags[index].value) {
|
|
|
case 1:
|
|
|
this.selectSDate = this.$moment().format("YYYY-MM-DD");
|
|
|
this.selectEDate = this.$moment().format("YYYY-MM-DD");
|
|
|
break;
|
|
|
case 2:
|
|
|
this.selectSDate = this.$moment().startOf('week').add(1, 'day').format('YYYY-MM-DD')
|
|
|
this.selectEDate = this.$moment().endOf('week').add(1, 'day').format('YYYY-MM-DD')
|
|
|
break;
|
|
|
case 3: //当月
|
|
|
this.selectSDate = this.$moment().startOf('month').format(
|
|
|
'YYYY-MM-DD'); //2020-12-01//本月第一天
|
|
|
this.selectEDate = this.$moment().endOf('month').format('YYYY-MM-DD'); //2020-12-31
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
},
|
|
|
bindNavChange: function(e) {
|
|
|
var index = e.currentTarget.dataset.index;
|
|
|
var _tabs = this.tabs;
|
|
|
for (var m of _tabs) {
|
|
|
m.checked = false
|
|
|
}
|
|
|
_tabs[index].checked = true;
|
|
|
this.tabs = _tabs;
|
|
|
this.activeKey = _tabs[index].status;
|
|
|
this.loadPage(1);
|
|
|
},
|
|
|
back: function() {
|
|
|
uni.navigateBack({
|
|
|
|
|
|
})
|
|
|
},
|
|
|
closepop: function() {
|
|
|
this.moreSearch = false;
|
|
|
},
|
|
|
bindreset: function() {
|
|
|
var _searchData = this.searchData;
|
|
|
for (var m of _searchData) {
|
|
|
var _tags = m.list;
|
|
|
for (var m of _tags) {
|
|
|
m.checked = false
|
|
|
}
|
|
|
}
|
|
|
this.searchData = _searchData;
|
|
|
|
|
|
this.keyword="";
|
|
|
this.selectArea = "";
|
|
|
this.selectBuild = "";
|
|
|
var _data = this.multiItems;
|
|
|
this.multiArray = _data;
|
|
|
this.selectSDate="";
|
|
|
this.selectEDate="";
|
|
|
this.selectDays="";
|
|
|
this.loadPage(1);
|
|
|
},
|
|
|
loadPage: function(page) {
|
|
|
console.log(this.keyword)
|
|
|
uni.hideKeyboard()
|
|
|
var that = this;
|
|
|
var currentProject = uni.getStorageSync('currentProject');
|
|
|
util.request({
|
|
|
bindThis: that,
|
|
|
api: 'manager/get-project-orders/' + currentProject.id,
|
|
|
customLoading: false,
|
|
|
data: {
|
|
|
page: page,
|
|
|
page_size: 5,
|
|
|
keyword: that.keyword,
|
|
|
status: that.activeKey,
|
|
|
building_id: that.selectBuild,
|
|
|
area_id: that.selectArea,
|
|
|
days: that.selectDays,
|
|
|
start_date_from:this.selectSDate,
|
|
|
start_date_to:this.selectEDate
|
|
|
},
|
|
|
utilSuccess: function(r) {
|
|
|
var res = r.data;
|
|
|
uni.stopPullDownRefresh(); // 服务器总条数 < 每页条数, 会将第一页的条数重新返回
|
|
|
|
|
|
var hasNoMore = that.orders.length < 5 && page > 1;
|
|
|
if (hasNoMore || res.length == 0 && page > 1) {
|
|
|
// 已加载到最后一页
|
|
|
uni.showToast({
|
|
|
title: '已加载到最后一页',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
that.showbacktop = false;
|
|
|
return;
|
|
|
} else {
|
|
|
that.showbacktop = true;
|
|
|
}
|
|
|
|
|
|
var orders = that.orders;
|
|
|
for (var m of res) {
|
|
|
m.factorjson = JSON.parse(m.factors);
|
|
|
}
|
|
|
|
|
|
console.log(res)
|
|
|
if (page == 1) {
|
|
|
orders = res;
|
|
|
} else {
|
|
|
orders.push(...res);
|
|
|
}
|
|
|
|
|
|
that.currentPage = page;
|
|
|
that.orders = orders;
|
|
|
},
|
|
|
utilFail: function(res) {
|
|
|
uni.stopPullDownRefresh();
|
|
|
|
|
|
if (page == 1) {
|
|
|
|
|
|
that.currentPage = page;
|
|
|
that.orders = [];
|
|
|
}
|
|
|
|
|
|
util.alert(res);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
bindAction: function(e) {
|
|
|
var type = e.currentTarget.dataset.type;
|
|
|
var id = e.currentTarget.dataset.id;
|
|
|
switch (type) {
|
|
|
case "toPay":
|
|
|
this.toPay(id);
|
|
|
break;
|
|
|
case "doCancel":
|
|
|
this.doCancel(id);
|
|
|
break;
|
|
|
case "toAssign":
|
|
|
this.toAssign(id);
|
|
|
break;
|
|
|
case "toZhongBuget":
|
|
|
this.toZhongBuget(id);
|
|
|
break;
|
|
|
case "toBuget":
|
|
|
this.toBuget(id);
|
|
|
break;
|
|
|
case "doEdit":
|
|
|
this.toEdit(id, 0);
|
|
|
break;
|
|
|
case "doNewEdit":
|
|
|
this.toEdit(id, 1);
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
|
toEdit: function(id, iscopy) { //是否为copy订单
|
|
|
uni.navigateTo({
|
|
|
url: "../../package/packageorder/pages/createorder/createorder?iscopy=" + iscopy + "&id=" +
|
|
|
id
|
|
|
})
|
|
|
},
|
|
|
toPay: function(id) {
|
|
|
uni.navigateTo({
|
|
|
url: "../pay/pay?id=" + id
|
|
|
})
|
|
|
},
|
|
|
toZhongBuget: function(id) {
|
|
|
uni.navigateTo({
|
|
|
url: "../../package/packageorder/pages/budgetorder/budgetorder?id=" + id
|
|
|
})
|
|
|
},
|
|
|
toBuget: function(id) {
|
|
|
uni.navigateTo({
|
|
|
url: "../../package/packageorder/pages/finishorder/finishorder?id=" + id
|
|
|
})
|
|
|
},
|
|
|
toAssign: function(id) {
|
|
|
uni.navigateTo({
|
|
|
url: "../../package/packageorder/pages/assignorder/assignorder?id=" + id
|
|
|
})
|
|
|
},
|
|
|
doCancel: function(id) {
|
|
|
var that = this;
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: "确认取消",
|
|
|
confirmText: "确认",
|
|
|
confirmColor: "#000",
|
|
|
cancelColor: "#eee",
|
|
|
success(res) {
|
|
|
if (res.confirm) {
|
|
|
util.request({
|
|
|
customLoading: true,
|
|
|
api: 'manager/cancel-order/' + id,
|
|
|
method: "POST",
|
|
|
utilSuccess: function(res) {
|
|
|
that.loadPage(1);
|
|
|
},
|
|
|
utilFail: function(err) {
|
|
|
util.alert(err);
|
|
|
}
|
|
|
});
|
|
|
} else if (res.cancel) {}
|
|
|
}
|
|
|
|
|
|
});
|
|
|
},
|
|
|
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style>
|
|
|
.backTop {
|
|
|
width: 140rpx;
|
|
|
height: 60rpx;
|
|
|
background-image: linear-gradient(to right, #52D5A6, #43C9CF);
|
|
|
border-radius: 100rpx 0 0 100rpx;
|
|
|
justify-content: center;
|
|
|
z-index: 88;
|
|
|
right: 0rpx;
|
|
|
position: fixed;
|
|
|
bottom: 54rpx;
|
|
|
}
|
|
|
|
|
|
.backTopText {
|
|
|
font-family: SourceHanSansCN-Normal;
|
|
|
font-size: 24rpx;
|
|
|
color: #FFFFFF;
|
|
|
text-align: center;
|
|
|
}
|
|
|
|
|
|
.iconfont {
|
|
|
font-family: iconfont5;
|
|
|
}
|
|
|
|
|
|
.neworder {
|
|
|
background-image: linear-gradient(to right, #52D5A6, #43C9CF);
|
|
|
box-shadow: 0 8rpx 10px 0 rgba(0, 0, 0, 0.20);
|
|
|
width: 112rpx;
|
|
|
height: 112rpx;
|
|
|
border-radius: 100%;
|
|
|
position: fixed;
|
|
|
right: 40rpx;
|
|
|
bottom: 154rpx;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
z-index: 88;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btnEditTxt {
|
|
|
color: #FFFFFF;
|
|
|
}
|
|
|
|
|
|
.btnEdit {
|
|
|
background: #3C91F5;
|
|
|
border: 1rpx solid #3C91F5;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.nav {
|
|
|
height: 140rpx;
|
|
|
background-image: linear-gradient(to right, #52D5A6, #43C9CF);
|
|
|
width: 750rpx;
|
|
|
overflow: hidden;
|
|
|
z-index: 999;
|
|
|
padding-top: 68rpx;
|
|
|
padding-left: 40rpx;
|
|
|
padding-right: 40rpx;
|
|
|
flex-direction: row;
|
|
|
position: fixed;
|
|
|
top: 0rpx;
|
|
|
left: 0rpx;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.content {
|
|
|
padding-top: 210rpx;
|
|
|
}
|
|
|
|
|
|
.navLeft {
|
|
|
flex-direction: row;
|
|
|
}
|
|
|
|
|
|
.navTitle {
|
|
|
font-size: 36rpx;
|
|
|
color: #FFFFFF;
|
|
|
margin-left: 40rpx;
|
|
|
width: 160rpx;
|
|
|
font-weight: 600;
|
|
|
}
|
|
|
|
|
|
.orderLine {
|
|
|
flex-direction: row;
|
|
|
margin-top: 16rpx;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.orderTxt {
|
|
|
font-family: SourceHanSansCN-Normal;
|
|
|
font-size: 28rpx;
|
|
|
color: #333333;
|
|
|
line-height: 36rpx;
|
|
|
}
|
|
|
|
|
|
.iconback {
|
|
|
width: 40rpx;
|
|
|
height: 40rpx;
|
|
|
}
|
|
|
|
|
|
.navTab {
|
|
|
background: #FAFAFA;
|
|
|
box-shadow: 0 1px 0 0 #E6E6E6;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-around;
|
|
|
top: 140rpx;
|
|
|
left: 0;
|
|
|
position: fixed;
|
|
|
z-index: 999;
|
|
|
width: 750rpx;
|
|
|
}
|
|
|
|
|
|
.tabItem {
|
|
|
align-items: center;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
.orderGe {
|
|
|
color: #D8D8D8;
|
|
|
margin-left: 16rpx;
|
|
|
margin-right: 16rpx;
|
|
|
font-size: 28rpx;
|
|
|
}
|
|
|
|
|
|
.tabTxt {
|
|
|
font-size: 28rpx;
|
|
|
color: #666666;
|
|
|
text-align: left;
|
|
|
height: 70rpx;
|
|
|
line-height: 70rpx;
|
|
|
}
|
|
|
|
|
|
.tabItemOn {
|
|
|
color: #0DC99E;
|
|
|
}
|
|
|
|
|
|
.tabItemOnLine {
|
|
|
background: #0DC99E;
|
|
|
height: 4rpx;
|
|
|
width: 100rpx;
|
|
|
position: absolute;
|
|
|
bottom: -2rpx;
|
|
|
left: 0;
|
|
|
}
|
|
|
|
|
|
.orderBox {
|
|
|
padding-top: 16rpx;
|
|
|
padding-bottom: 16rpx;
|
|
|
padding-left: 30rpx;
|
|
|
padding-right: 30rpx;
|
|
|
background: #ffffff;
|
|
|
margin-top: 20rpx;
|
|
|
}
|
|
|
|
|
|
.orderHeader {
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
padding-bottom: 16rpx;
|
|
|
border-bottom: 1rpx solid #E4E4E4;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.orderBody {
|
|
|
|
|
|
border-bottom: 1rpx solid #E4E4E4;
|
|
|
padding-bottom: 16rpx;
|
|
|
}
|
|
|
|
|
|
.orderStatus {
|
|
|
font-family: PingFangSC-Regular;
|
|
|
font-size: 28rpx;
|
|
|
color: #FD8C30;
|
|
|
text-align: left;
|
|
|
line-height: 40rpx;
|
|
|
}
|
|
|
|
|
|
.orderNo {
|
|
|
font-family: SourceHanSansCN-Normal;
|
|
|
font-size: 24rpx;
|
|
|
color: #999999;
|
|
|
line-height: 24rpx;
|
|
|
}
|
|
|
|
|
|
.orderTag {
|
|
|
background: rgba(13, 201, 158, 0.10);
|
|
|
border-radius: 2px;
|
|
|
padding: 4rpx 10rpx;
|
|
|
margin-right: 10rpx;
|
|
|
}
|
|
|
|
|
|
.orderTagTxt {
|
|
|
font-family: SourceHanSansCN-Normal;
|
|
|
font-size: 20rpx;
|
|
|
text-align: center;
|
|
|
}
|
|
|
|
|
|
.tag1 {
|
|
|
color: #0DC99E;
|
|
|
}
|
|
|
|
|
|
.tag2 {
|
|
|
color: #4A90E2;
|
|
|
}
|
|
|
|
|
|
.tag3 {
|
|
|
color: #FD8C30;
|
|
|
}
|
|
|
|
|
|
.tagBox1 {}
|
|
|
|
|
|
.tagBox2 {
|
|
|
background: rgba(60, 145, 245, 0.10);
|
|
|
}
|
|
|
|
|
|
.tagBox3 {
|
|
|
background: rgba(253, 140, 48, 0.10);
|
|
|
}
|
|
|
|
|
|
.orderPrice {
|
|
|
flex-direction: row;
|
|
|
margin-top: 16rpx;
|
|
|
border-bottom: 1rpx solid #E4E4E4;
|
|
|
padding-bottom: 16rpx;
|
|
|
}
|
|
|
|
|
|
.priceBox {
|
|
|
margin-right: 30rpx;
|
|
|
flex-direction: row;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.priceTitle {
|
|
|
font-family: SourceHanSansCN-Normal;
|
|
|
font-size: 24rpx;
|
|
|
color: #999999;
|
|
|
line-height: 28rpx;
|
|
|
}
|
|
|
|
|
|
.priceInfo {
|
|
|
font-family: Roboto-Medium;
|
|
|
font-size: 24rpx;
|
|
|
color: #333333;
|
|
|
text-align: left;
|
|
|
line-height: 40rpx;
|
|
|
}
|
|
|
|
|
|
.orderFooter {
|
|
|
margin-top: 16rpx;
|
|
|
padding-bottom: 16rpx;
|
|
|
flex-direction: row;
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
|
|
|
.btn {
|
|
|
border-radius: 27rpx;
|
|
|
margin-left: 20rpx;
|
|
|
padding: 2rpx 24rpx;
|
|
|
}
|
|
|
|
|
|
.btnCancel {
|
|
|
background: #FFFFFF;
|
|
|
border: 1rpx solid #0DC99E;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.btnTxt {
|
|
|
font-family: SourceHanSansCN-Normal;
|
|
|
font-size: 24rpx;
|
|
|
text-align: center;
|
|
|
height: 54rpx;
|
|
|
line-height: 54rpx;
|
|
|
}
|
|
|
|
|
|
.btnCancelTxt {
|
|
|
color: #0DC99E;
|
|
|
}
|
|
|
|
|
|
.btnConfirm {
|
|
|
background: #0DC99E;
|
|
|
border: 1rpx solid #0DC99E;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
|
|
|
.btnPay {
|
|
|
|
|
|
background: orange;
|
|
|
border: 1rpx solid orange;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.btnConfirmTxt {
|
|
|
color: #FFFFFF;
|
|
|
}
|
|
|
|
|
|
.iconBack {}
|
|
|
|
|
|
.icon {
|
|
|
|
|
|
color: #52D5A6;
|
|
|
margin-right: 12rpx;
|
|
|
font-size: 28rpx;
|
|
|
}
|
|
|
|
|
|
.iconLocation {}
|
|
|
|
|
|
.navRight {
|
|
|
flex-direction: row;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.iconTop {
|
|
|
color: #FFFFFF;
|
|
|
font-size: 45rpx;
|
|
|
}
|
|
|
|
|
|
.iconMoreSeach {
|
|
|
padding-right: 20rpx;
|
|
|
padding-left: 20rpx;
|
|
|
}
|
|
|
|
|
|
.iconSeach {
|
|
|
padding-left: 33rpx;
|
|
|
}
|
|
|
|
|
|
.cover {
|
|
|
background: rgba(0, 0, 0, 0.60);
|
|
|
width: 750rpx;
|
|
|
position: fixed;
|
|
|
top: 0rpx;
|
|
|
left: 0rpx;
|
|
|
z-index: 99;
|
|
|
}
|
|
|
|
|
|
.popup {
|
|
|
background: #ffffff;
|
|
|
position: fixed;
|
|
|
top: 140rpx;
|
|
|
left: 0rpx;
|
|
|
width: 750rpx;
|
|
|
padding-top: 20rpx;
|
|
|
transition: width 2s;
|
|
|
z-index: 999;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.popupbox {
|
|
|
z-index: 999;
|
|
|
position: relative;
|
|
|
height: 100vh;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.indexheader {
|
|
|
|
|
|
padding: 40rpx 30rpx;
|
|
|
}
|
|
|
|
|
|
.indexHeaderBox {
|
|
|
padding-bottom: 22rpx;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
border-bottom: 2rpx solid #F0F0F0;
|
|
|
flex-direction: row;
|
|
|
}
|
|
|
|
|
|
.indexheaderLeftText {
|
|
|
font-family: SourceHanSansCN-Medium;
|
|
|
font-size: 28rpx;
|
|
|
color: #333333;
|
|
|
line-height: 40rpx;
|
|
|
z-index: 2;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.headerBorder {
|
|
|
background-image: linear-gradient(to right, rgba(91, 215, 171, 0.6), rgba(238, 238, 238, 0.00));
|
|
|
border-radius: 8rpx;
|
|
|
width: 60rpx;
|
|
|
height: 16rpx;
|
|
|
position: absolute;
|
|
|
bottom: 2rpx;
|
|
|
left: 0;
|
|
|
z-index: 1;
|
|
|
}
|
|
|
|
|
|
.indexheaderMoreText {
|
|
|
opacity: 0.6;
|
|
|
font-family: SourceHanSansCN-Normal;
|
|
|
font-size: 24rpx;
|
|
|
color: #666666;
|
|
|
line-height: 40rpx;
|
|
|
}
|
|
|
|
|
|
.popupBody {
|
|
|
padding: 0rpx 30rpx;
|
|
|
padding-bottom: 20rpx;
|
|
|
}
|
|
|
|
|
|
.popupFooter {
|
|
|
flex-direction: row;
|
|
|
justify-content: space-around;
|
|
|
position: absolute;
|
|
|
bottom: 0;
|
|
|
left: 0;
|
|
|
}
|
|
|
|
|
|
.popbtn {
|
|
|
height: 100rpx;
|
|
|
}
|
|
|
|
|
|
.pop-btnReset {
|
|
|
background-color: #FAFAFA;
|
|
|
}
|
|
|
|
|
|
.pop-btnSubmit {
|
|
|
background-color: #0DC99E;
|
|
|
}
|
|
|
|
|
|
.pop-btnReset-text {
|
|
|
font-family: SourceHanSansCN-Medium;
|
|
|
font-size: 32rpx;
|
|
|
color: #666666;
|
|
|
text-align: center;
|
|
|
line-height: 90rpx;
|
|
|
}
|
|
|
|
|
|
.pop-btnSubmit-text {
|
|
|
font-family: SourceHanSansCN-Medium;
|
|
|
font-size: 32rpx;
|
|
|
color: #FFFFFF;
|
|
|
text-align: center;
|
|
|
line-height: 90rpx;
|
|
|
}
|
|
|
|
|
|
.icon_close {
|
|
|
color: #CCCCCC;
|
|
|
padding-left: 40rpx;
|
|
|
font-size: 48rpx;
|
|
|
}
|
|
|
|
|
|
.tagTitle {
|
|
|
margin-top: 20rpx;
|
|
|
}
|
|
|
|
|
|
.tagTitleText {
|
|
|
font-family: SourceHanSansCN-Normal;
|
|
|
font-size: 24rpx;
|
|
|
color: #333333;
|
|
|
}
|
|
|
|
|
|
.tagBody {
|
|
|
flex-direction: row;
|
|
|
margin-top: 20rpx;
|
|
|
flex-wrap: wrap;
|
|
|
}
|
|
|
|
|
|
.tagInfo {
|
|
|
background: #FAFAFA;
|
|
|
border: 1rpx solid #E4E4E4;
|
|
|
border-radius: 30rpx;
|
|
|
width: 150rpx;
|
|
|
margin-right: 20rpx;
|
|
|
margin-bottom: 10rpx;
|
|
|
}
|
|
|
|
|
|
.tagInfoText {
|
|
|
font-family: SourceHanSansCN-Normal;
|
|
|
font-size: 28rpx;
|
|
|
color: #666666;
|
|
|
height: 56rpx;
|
|
|
line-height: 56rpx;
|
|
|
text-align: center;
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
white-space: nowrap;
|
|
|
}
|
|
|
|
|
|
.tagInfoOn {
|
|
|
background: rgba(13, 201, 158, 0.10);
|
|
|
border: 1rpx solid #0DC99E;
|
|
|
}
|
|
|
|
|
|
.tagInfoTextOn {
|
|
|
color: #0DC99E;
|
|
|
}
|
|
|
|
|
|
.searchBox {
|
|
|
background: rgba(255, 255, 255, 0.40);
|
|
|
border-radius: 4rpx;
|
|
|
width: 512rpx;
|
|
|
height: 56rpx;
|
|
|
padding: 7rpx 26rpx;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.searchBoxInput {
|
|
|
font-family: SourceHanSansCN-Normal;
|
|
|
font-size: 28rpx;
|
|
|
color: #FFFFFF;
|
|
|
flex: 1;
|
|
|
}
|
|
|
|
|
|
.icon-add2 {
|
|
|
color: #FFFFFF;
|
|
|
}
|
|
|
</style> |