代码提交

test
zhangdi 1 year ago
parent df9fd2f09c
commit 7099fed766
  1. 640
      common/betone_components/betone-list.vue
  2. 6
      pages.json
  3. 2
      pages/home/index.vue
  4. 626
      pages/submission/records.vue
  5. 6
      store/index.js
  6. 6
      utils/tabbar.js

@ -1,640 +0,0 @@
<template>
<view class="page-box">
<view class="page-search-top">
<betone-new-input v-model="searchInfo.requirementCode" :placeholder="dataTypes == 1 ? '搜索单号' : '搜索单号或单位名称'"
icon="search" style="margin-bottom: 32rpx" @changevalue="searchData()" />
<u-tabs :list="tabList" :is-scroll="true" :current="current" @change="changeTab"></u-tabs>
</view>
<view class="order-box">
<!-- @click="goPage(item, 'details')" -->
<view class="order-item" v-for="(item, index) in orderData" :key="index">
<view class="item-top">
<view class="item-left" v-if="dataTypes == 1">
<text class="item-orderNo" v-if="item.status != -1">单号{{ item.requirementCode }}</text>
<text class="item-time"> {{ item.fillingTime }}</text>
</view>
<view class="item-left" v-else>
<text class="item-orderNo">{{ item.reportUnit ? item.reportUnit : '单位' }}</text>
<text class="item-time"> 单号{{ item.requirementCode }}</text>
</view>
<view class="item-right">
<u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle"
:bg-color="tagColor[statusName(item.status)]" />
</view>
</view>
<view class="item-con">
<view class="con-left">
<image src="@/static/images/pic-default.png" alt="" />
</view>
<view class="con-right">
<text class="con-title">提报类型{{ item.faultType }}</text>
<view class="con-content">
<text>{{ item.faultDescribe }}</text>
</view>
<view class="con-btn">
<!-- 客户 -->
<u-button size="mini" plain style="margin-right:16rpx"
@click.stop="openWorkOrder(item)">查看</u-button>
<u-button size="mini" plain style="margin-right:16rpx"
@click="openModel(item, 'details')">下载</u-button>
<block v-if="dataTypes == 1">
<!-- 工单详情 查看维修详情 -->
<u-button v-if="item.status == -1" size="mini" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="subOrder(item)">提报</u-button>
<u-button size="mini" v-if="item.status == -1" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="orderUpdate(item)">修改</u-button>
<u-button v-if="item.status == 4" size="mini" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="orderConfirm(item)">确认方案</u-button>
<u-button v-if="item.status == 5" size="mini" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="goPageLocation(item)">查看位置</u-button>
<u-button v-if="item.status == 6" size="mini" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="openEvaluate(item)">评价</u-button>
</block>
<!-- 客服 -->
<block v-if="dataTypes == 2">
<!-- 查看的提报单 -->
<u-button v-if="item.status == 0" size="mini" :plain="true" style="margin-right:16rpx"
@click.stop="sendOrders(item)" type="primary">接单</u-button>
<u-button v-if="item.status == 7" size="mini" :plain="true" style="margin-right:16rpx"
@click.stop="openModel(item, 'paymentInfo')" type="primary">确认付款</u-button>
<u-button v-if="item.status == 0" size="mini" plain type="primary"
style="margin-right:16rpx" @click="openModel(item, 'close')">关闭</u-button>
</block>
<!-- 维修负责人 -->
<block v-if="dataTypes == 3">
<!-- 查看维修详情 -->
<u-button v-if="item.status == 3" size="mini" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="orderConfirm(item)">审批</u-button>
</block>
<!-- 维修人员 -->
<block v-if="dataTypes == 4">
<!-- 查看维修详情 -->
<u-button v-if="item.status == 1" size="mini" :plain="true" style="margin-right:16rpx"
type="primary" @click="orderConfirm(item)">确认</u-button>
<u-button v-if="item.status == 1" size="mini" :plain="true" style="margin-right:16rpx"
type="primary" @click="openModel(item, 'turn')">驳回</u-button>
<u-button v-if="item.status == 2" size="mini" :plain="true" style="margin-right:16rpx"
type="primary" @click="orderConfirm(item)">提交</u-button>
<u-button v-if="item.status == 5" size="mini" :plain="true" style="margin-right:16rpx"
type="primary" @click="openModel(item, 'repair')">维修完成</u-button>
</block>
</view>
</view>
</view>
</view>
</view>
<u-loadmore margin-top="10" margin-bottom="40" :status="loadingState" />
<!-- 关闭 弹框 -->
<betone-modal :title="'关闭原因'" :confirmText="'确认'" v-model="cloneVisible" @cancel="cloneVisible = false"
@confirm="confirmCloseSub">
<view class="modal-text">
<u-input :border="true" v-model="closeReason" placeholder="请输入" style="margin-bottom: 32rpx" />
</view>
</betone-modal>
<!-- 维修人员驳回 -->
<betone-modal v-model="turnShow" :title="'驳回原因'" @confirm="turnFn" @cancel="turnShow = false">
<view class="modal-text">
<u-input :border="true" v-model="repaiRejectReason" placeholder="请输入" style="margin-bottom: 32rpx" />
</view>
</betone-modal>
<!-- 维修人员 确认 维修完成 -->
<betone-modal v-model="repairShow" :title="'提示'" @confirm="repairFn" @cancel="repairShow = false">
<view class="modal-text">
请确认维修是否已经完成
</view>
</betone-modal>
<!-- 客服确认付款 -->
<betone-modal v-model="paymentShow" :title="'提示'" @confirm="paymentFn" @cancel="paymentShow = false">
<view class="modal-text">
请确认付款是否已经完成
</view>
</betone-modal>
<!-- 维修人员确认接单 -->
<betone-modal v-model="submitOrderShow" :title="'提示'" @confirm="submitOrderShowFn"
@cancel="submitOrderShow = false">
<view class="modal-text">
请确认是否进行接单
</view>
</betone-modal>
<betone-loading ref="BetLoading" />
<betone-modal v-model="detailsShow" :title="'下载内容'" @confirm="detailsShowFn" @cancel="detailsShow = false">
<recordsdetails :data="rowInfo" :detailId="rowInfo.id" id="capture"></recordsdetails>
</betone-modal>
<sp-html2canvas-render domId="capture" ref="renderRef" @renderOver="renderOver" pdfFileName="这是一个pdf文件"
@beforeSavePDF="beforeSavePDF" @successSavePDF="successSavePDF"></sp-html2canvas-render>
</view>
</template>
<script>
import recordsdetails from '@/pages/submission/components/details.vue'
import { tabList, tabListColor } from '@/config/status.js'
export default {
props: {
// tabList: {
// type: Array,
// default: []
// },
type: {
type: String,
default: ''
}
},
components: {
recordsdetails
},
data() {
return {
searchInfo: {
requirementCode: "",
statusSearch: '',//
reportUnit: '',//
},
current: 0,
loadingState: "loadmore",
isNomore: false,
noDataFlag: false,
orderData: [],
page: {
currentPage: 1,
pageSize: 10,
},
sendOrdersShow: false,//
sendOrdersList: [],
cloneVisible: false,//
closeReason: '',//
rowInfo: {},//
turnShow: false,//
repaiRejectReason: '',//
repairShow: false,//
paymentShow: false,//
submitOrderShow: false,//
detailsShow: false,//
tabList: [],//tab
};
},
computed: {
noData() {
return this.orderData && this.orderData.length == 0;
},
dataTypes() {
this.tabList = tabList[this.$store.state.dataType]
return this.$store.state.dataType
},
tagColor() {
return tabListColor
},
},
mounted() {
this.$nextTick(() => {
this.getRecordsList()
//
uni.$on('onReachBottom', () => {
if (this.isNomore) {
return;
}
this.page.currentPage++;
this.getRecordsList();
})
//
uni.$on('onPullDownRefresh', () => {
this.isNomore = false
this.page.currentPage = 1;
this.getRecordsList();
uni.stopPullDownRefresh();
});
});
},
methods: {
//
getRecordsList() {
this.BetLoading.show();
this.loadingState = "loading";
let query = {
current: this.page.currentPage, //
size: this.page.pageSize, //
dataType: this.dataTypes,//
...this.searchInfo
}
this.$u.api.getWorkOrderRecords(query).then(res => {
if (res.code == 200) {
var totalPage = res.data.total;
var newOrders = res.data.records;
if (this.page.currentPage == 1) {
this.orderData = [];
}
this.orderData = [...this.orderData, ...(res.data.records || [])];
if (newOrders.length == 0) {
this.loadingState = "nomore";
this.isNomore = true;
}
if (totalPage == this.orderData.length) {
this.loadingState = "nomore";
this.isNomore = true;
}
this.BetLoading.hide();
}
}).catch(err => {
})
},
//
searchData() {
if (this.dataTypes != 1) {
//
this.searchInfo.reportUnit = this.searchInfo.requirementCode
} else {
this.searchInfo.reportUnit = ''
}
this.isNomore = false
this.page.currentPage = 1;
this.getRecordsList()
},
// tab
changeTab(index) {
this.current = index;
this.searchInfo.statusSearch = this.tabList[index].key == '9999' ? '' : this.tabList[index].key
this.isNomore = false
this.page.currentPage = 1;
this.getRecordsList()
},
//
statusName(item) {
if (this.tabList.length > 0) {
let newArr = this.tabList.filter(i => {
let sta = i.key.split(',')
return sta.includes(item + '')
})
return newArr[0].name
}
},
//
subOrder(row) {
let query_ = [row]
this.$u.api.workOrderSave(query_).then(res => {
this.BetLoading.hide();
if (res.code == 200) {
this.page.currentPage = 1;
this.getRecordsList()
}
}).catch(err => {
this.BetLoading.hide();
})
},
//
sendOrders(item) {
let param = {
id: item.id
}
uni.navigateTo({
url: `/pages/submission/sendOrders${this.$u.queryParams(param)}`,
});
},
//
orderConfirm(row) {
let param = {
id: row.id
}
uni.navigateTo({
url: `/pages/submission/sendOrders${this.$u.queryParams(param)}`,
});
},
//
getRepairPersons() {
this.$u.api.getRepairPersons().then(res => {
if (res.code == 200) {
let data_ = res.data
data_.forEach(i => {
this.sendOrdersList.push({ ...i, label: i.name })
})
}
})
},
//
openModel(item, type) {
if (type == 'close') {
this.cloneVisible = true
}
if (type == 'turn') {
this.turnShow = true
}
if (type == 'repair') {
this.repairShow = true
}
if (type == 'paymentInfo') {
this.paymentShow = true
}
if (type == 'submitOrder') {
this.submitOrderShow = true
}
if (type == 'details') {
this.detailsShow = true
}
this.rowInfo = item
},
confirmCloseSub() {
if (this.closeReason == '') {
uni.showToast({ title: "请填写关闭原因", icon: "none" });
return false;
}
let query = {
id: this.rowInfo.id,
closeReason: this.closeReason,
}
this.BetLoading.show();
this.$u.api.cloneOrder(query).then(res => {
this.cloneVisible = false
this.BetLoading.hide();
if (res.code == 200) {
uni.showToast({ title: "关闭成功", icon: "none" });
this.getRecordsList()
}
})
},
//
openWorkOrder(row) {
let param = {
id: row.id,
type: 'breakdownView'
}
uni.navigateTo({
url: `/pages/submission/recordsdetails${this.$u.queryParams(param)}`,
});
},
//
orderUpdate(item) {
let param = {
id: item.id,
type: 'breakdownUpdate'
}
uni.navigateTo({
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`,
});
},
//
turnFn() {
if (this.repaiRejectReason == '') {
uni.showToast({ title: "请输入驳回原因", icon: "none" });
return false
}
let query = {
id: this.rowInfo.id,
repaiRejectReason: this.repaiRejectReason,
}
this.$u.api.repairReject(query).then(res => {
if (res.code == 200) {
this.turnShow = false
uni.showToast({ title: "驳回成功", icon: "none" });
this.getRecordsList()
}
})
},
//
repairFn() {
let query = {
id: this.rowInfo.id,
}
this.$u.api.servicemanRepairSubmit(query).then(res => {
if (res.code == 200) {
this.repairShow = false
uni.showToast({ title: "维修完成", icon: "none" });
this.getRecordsList()
}
})
},
//
openEvaluate(item) {
let param = {
id: item.id,
}
uni.navigateTo({
url: `/pages/submission/evaluate${this.$u.queryParams(param)}`,
});
},
//
paymentFn() {
let query = {
id: this.rowInfo.id,
}
this.BetLoading.show();
this.$u.api.cloneOrder(query).then(res => {
this.paymentShow = false
this.BetLoading.hide();
if (res.code == 200) {
uni.showToast({ title: "确认成功", icon: "none" });
this.submitOrderShow = false
this.getRecordsList()
}
})
},
//
submitOrderShowFn() {
let query_ = {
id: this.rowInfo.id
}
this.$u.api.servicemanReceive(query_).then(res => {
if (res.code == 200) {
uni.showToast({ title: "确认成功", icon: "none" });
this.getRecordsList()
}
})
},
goPageLocation(item) {
let param = {
userid: item.repairPerson,
}
//
uni.navigateTo({
url: `/pages/order/location${this.$u.queryParams(param)}`,
})
},
detailsShowFn() {
// h2cRenderDom
this.$refs.renderRef.h2pRenderDom();
},
renderOver(e) {
// ebase64
// this.imageSrc = e
console.log("==== renderOver :", e);
// canvas
},
beforeSavePDF(e) {
// epdfbase64
console.log("==== beforeSavePDF :", e);
},
successSavePDF(path) {
// epdf
console.log("==== successSavePDF :", path);
},
},
};
</script>
<style lang="scss" scoped>
.page-box {
padding: 0;
.page-search-top {
background-color: #fff;
padding: 0 40rpx 0;
}
.order-box {
margin-top: 20rpx;
.order-item {
height: 414rpx;
margin: 0 24rpx 20rpx;
border-radius: 20rpx;
background: #fff;
display: flex;
flex-direction: column;
.item-top {
height: 114rpx;
border-bottom: 1px solid rgba(239, 239, 239, 1);
display: flex;
flex-direction: row;
width: 100%;
.item-left {
flex: 1;
text {
display: block;
}
.item-orderNo {
color: rgba(51, 51, 51, 1);
font-size: 28rpx;
padding: 12rpx 0 0 26rpx;
}
.item-time {
color: rgba(190, 190, 190, 1);
font-size: 24rpx;
padding: 12rpx 0 0 26rpx;
}
}
.item-right {
max-width: 162rpx;
height: 48rpx;
margin: 36rpx 24rpx 0 0;
}
}
.item-con {
flex: 1;
display: flex;
flex-direction: row;
.con-left {
width: 150rpx;
height: 150rpx;
margin: 24rpx 28rpx 0 28rpx;
image {
width: 100%;
height: 100%;
}
}
.con-right {
flex: 1;
margin-right: 24rpx;
display: flex;
flex-direction: column;
text {
display: block;
}
.con-title {
margin-top: 12rpx;
line-height: 60rpx;
color: rgba(0, 0, 0, 1);
font-size: 28rpx;
}
.con-content {
color: rgba(108, 108, 108, 1);
font-size: 24rpx;
// line-height: 36rpx;
margin-top: 14rpx;
flex: 1;
text {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.5em;
/* 这个值根据你的需求调整,这里假设为1.5倍行高 */
max-height: 3em;
/* 3行的高度 */
width: 100%;
/* 根据需要设置宽度 */
word-wrap: break-word;
/* 允许在单词内换行 */
word-break: break-all;
/* 允许在任意字符处换行 */
}
}
.con-btn {
margin-top: 56rpx;
margin-bottom: 32rpx;
display: inline-block;
text-align: right;
}
}
}
}
}
}
</style>

@ -167,10 +167,8 @@
{
"path": "records",
"style": {
"navigationBarTitleText": "报送记录",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#fff",
"enablePullDownRefresh": true
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{

@ -77,7 +77,7 @@ export default {
item.img = require("@/static/images/home/lab_xj.png")
}
if (item.name.indexOf('记录') > 0) {
item.pagePath = '/pages/submission/records'
item.pagePath = '/pages/submission/records?type=submission'
item.img = require("@/static/images/home/bs_jl.png")
}
if (item.name.indexOf('报警') > 0) {

@ -1,40 +1,510 @@
<template>
<view class="page-css">
<betone-list type="submission" ref="tablist"></betone-list>
<!-- <betone-tabbar ref="tabbarRef" /> -->
<!-- <betone-list type="submission" ref="tablist"></betone-list> -->
<u-navbar v-if="type != ''" title="报送记录" back-icon-color="rgb(0, 0, 0)" back-icon-size="54" :title-bold="true"
:title-size="38" title-color="rgb(0, 0, 0)"></u-navbar>
<view class="page-header-txt" v-if="type == ''">科研医疗建筑运维平台</view>
<view class="page-box">
<view class="page-search-top">
<betone-new-input v-model="searchInfo.requirementCode" :placeholder="dataTypes == 1 ? '搜索单号' : '搜索单号或单位名称'"
icon="search" style="margin-bottom: 32rpx" @changevalue="searchData()" />
<u-tabs :list="tabList" :is-scroll="true" :current="current" @change="changeTab"></u-tabs>
</view>
<view class="order-box">
<view class="order-item" v-for="(item, index) in orderData" :key="index">
<view class="item-top">
<view class="item-left" v-if="dataTypes == 1">
<text class="item-orderNo" v-if="item.status != -1">单号{{ item.requirementCode }}</text>
<text class="item-time"> {{ item.fillingTime }}</text>
</view>
<view class="item-left" v-else>
<text class="item-orderNo">{{ item.reportUnit ? item.reportUnit : '单位' }}</text>
<text class="item-time"> 单号{{ item.requirementCode }}</text>
</view>
<view class="item-right">
<u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle"
:bg-color="tagColor[statusName(item.status)]" />
</view>
</view>
<view class="item-con">
<view class="con-left">
<image src="@/static/images/pic-default.png" alt="" />
</view>
<view class="con-right">
<text class="con-title">提报类型{{ item.faultType }}</text>
<view class="con-content">
<text>{{ item.faultDescribe }}</text>
</view>
<view class="con-btn">
<!-- 客户 -->
<u-button size="mini" plain style="margin-right:16rpx" @click.stop="openWorkOrder(item)">查看</u-button>
<u-button size="mini" plain style="margin-right:16rpx" @click="openModel(item, 'details')">下载</u-button>
<block v-if="dataTypes == 1">
<!-- 工单详情 查看维修详情 -->
<u-button v-if="item.status == -1" size="mini" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="subOrder(item)">提报</u-button>
<u-button size="mini" v-if="item.status == -1" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="orderUpdate(item)">修改</u-button>
<u-button v-if="item.status == 4" size="mini" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="orderConfirm(item)">确认方案</u-button>
<u-button v-if="item.status == 5" size="mini" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="goPageLocation(item)">查看位置</u-button>
<u-button v-if="item.status == 6" size="mini" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="openEvaluate(item)">评价</u-button>
</block>
<!-- 客服 -->
<block v-if="dataTypes == 2">
<!-- 查看的提报单 -->
<u-button v-if="item.status == 0" size="mini" :plain="true" style="margin-right:16rpx"
@click.stop="sendOrders(item)" type="primary">接单</u-button>
<u-button v-if="item.status == 7" size="mini" :plain="true" style="margin-right:16rpx"
@click.stop="openModel(item, 'paymentInfo')" type="primary">确认付款</u-button>
<u-button v-if="item.status == 0" size="mini" plain type="primary" style="margin-right:16rpx"
@click="openModel(item, 'close')">关闭</u-button>
</block>
<!-- 维修负责人 -->
<block v-if="dataTypes == 3">
<!-- 查看维修详情 -->
<u-button v-if="item.status == 3" size="mini" :plain="true" style="margin-right:16rpx"
:hair-line="true" type="primary" @click="orderConfirm(item)">审批</u-button>
</block>
<!-- 维修人员 -->
<block v-if="dataTypes == 4">
<!-- 查看维修详情 -->
<u-button v-if="item.status == 1" size="mini" :plain="true" style="margin-right:16rpx" type="primary"
@click="orderConfirm(item)">确认</u-button>
<u-button v-if="item.status == 1" size="mini" :plain="true" style="margin-right:16rpx" type="primary"
@click="openModel(item, 'turn')">驳回</u-button>
<u-button v-if="item.status == 2" size="mini" :plain="true" style="margin-right:16rpx" type="primary"
@click="orderConfirm(item)">提交</u-button>
<u-button v-if="item.status == 5" size="mini" :plain="true" style="margin-right:16rpx" type="primary"
@click="openModel(item, 'repair')">维修完成</u-button>
</block>
</view>
</view>
</view>
</view>
</view>
<u-loadmore margin-top="10" margin-bottom="40" :status="loadingState" />
<!-- 关闭 弹框 -->
<betone-modal :title="'关闭原因'" :confirmText="'确认'" v-model="cloneVisible" @cancel="cloneVisible = false"
@confirm="confirmCloseSub">
<view class="modal-text">
<u-input :border="true" v-model="closeReason" placeholder="请输入" style="margin-bottom: 32rpx" />
</view>
</betone-modal>
<!-- 维修人员驳回 -->
<betone-modal v-model="turnShow" :title="'驳回原因'" @confirm="turnFn" @cancel="turnShow = false">
<view class="modal-text">
<u-input :border="true" v-model="repaiRejectReason" placeholder="请输入" style="margin-bottom: 32rpx" />
</view>
</betone-modal>
<!-- 维修人员 确认 维修完成 -->
<betone-modal v-model="repairShow" :title="'提示'" @confirm="repairFn" @cancel="repairShow = false">
<view class="modal-text">
请确认维修是否已经完成
</view>
</betone-modal>
<!-- 客服确认付款 -->
<betone-modal v-model="paymentShow" :title="'提示'" @confirm="paymentFn" @cancel="paymentShow = false">
<view class="modal-text">
请确认付款是否已经完成
</view>
</betone-modal>
<!-- 维修人员确认接单 -->
<betone-modal v-model="submitOrderShow" :title="'提示'" @confirm="submitOrderShowFn"
@cancel="submitOrderShow = false">
<view class="modal-text">
请确认是否进行接单
</view>
</betone-modal>
<betone-loading ref="BetLoading" />
<betone-modal v-model="detailsShow" :title="'下载内容'" @confirm="detailsShowFn" @cancel="detailsShow = false">
<recordsDetails :data="rowInfo" :detailId="rowInfo.id" id="capture"></recordsDetails>
</betone-modal>
<sp-html2pdf-render domId="capture" ref="renderRef" @renderOver="renderOver" pdfFileName="这是一个pdf文件"
@beforeSavePDF="beforeSavePDF" @successSavePDF="successSavePDF"></sp-html2pdf-render>
</view>
<betone-tabbar ref="tabbarRef" v-if="type == ''" />
</view>
</template>
<script>
import recordsDetails from './components/details.vue'
import { tabList, tabListColor } from '@/config/status.js'
export default {
components: {
recordsDetails
},
data() {
return {
type: '',
searchInfo: {
requirementCode: "",
statusSearch: '',//
reportUnit: '',//
},
current: 0,
loadingState: "loadmore",
isNomore: false,
noDataFlag: false,
orderData: [],
page: {
currentPage: 1,
pageSize: 10,
},
sendOrdersShow: false,//
sendOrdersList: [],
cloneVisible: false,//
closeReason: '',//
rowInfo: {},//
turnShow: false,//
repaiRejectReason: '',//
repairShow: false,//
paymentShow: false,//
submitOrderShow: false,//
detailsShow: false,//
tabList: [],//tab
};
},
onReachBottom() {
uni.$emit('onReachBottom');
computed: {
noData() {
return this.orderData && this.orderData.length == 0;
},
dataTypes() {
this.tabList = tabList[this.$store.state.dataType]
return this.$store.state.dataType
},
tagColor() {
return tabListColor
},
},
onPullDownRefresh() {
uni.$emit('onPullDownRefresh');
this.isNomore = false
this.page.currentPage = 1;
this.getRecordsList();
uni.stopPullDownRefresh();
},
onReachBottom() {
if (this.isNomore) {
return;
}
this.page.currentPage++;
this.getRecordsList();
},
onBackPress() {
uni.reLaunch({
url: '/pages/home/index'
})
return true;
onLoad(options) {
this.type = options.type?options.type:''
},
onShow() {
mounted() {
this.$nextTick(() => {
this.$refs.tablist.getRecordsList()
// this.$refs.tabbarRef.getPermission();
this.getRecordsList()
if(this.type==''){
this.$refs.tabbarRef.getPermission();
}
});
},
methods: {
//
getRecordsList() {
this.BetLoading.show();
this.loadingState = "loading";
let query = {
current: this.page.currentPage, //
size: this.page.pageSize, //
dataType: this.dataTypes,//
...this.searchInfo
}
this.$u.api.getWorkOrderRecords(query).then(res => {
if (res.code == 200) {
var totalPage = res.data.total;
var newOrders = res.data.records;
if (this.page.currentPage == 1) {
this.orderData = [];
}
this.orderData = [...this.orderData, ...(res.data.records || [])];
if (newOrders.length == 0) {
this.loadingState = "nomore";
this.isNomore = true;
}
if (totalPage == this.orderData.length) {
this.loadingState = "nomore";
this.isNomore = true;
}
this.BetLoading.hide();
}
}).catch(err => {
})
},
//
searchData() {
if (this.dataTypes != 1) {
//
this.searchInfo.reportUnit = this.searchInfo.requirementCode
} else {
this.searchInfo.reportUnit = ''
}
this.isNomore = false
this.page.currentPage = 1;
this.getRecordsList()
},
// tab
changeTab(index) {
this.current = index;
this.searchInfo.statusSearch = this.tabList[index].key == '9999' ? '' : this.tabList[index].key
this.isNomore = false
this.page.currentPage = 1;
this.getRecordsList()
},
//
statusName(item) {
if (this.tabList.length > 0) {
let newArr = this.tabList.filter(i => {
let sta = i.key.split(',')
return sta.includes(item + '')
})
return newArr[0].name
}
},
//
subOrder(row) {
let query_ = [row]
this.$u.api.workOrderSave(query_).then(res => {
this.BetLoading.hide();
if (res.code == 200) {
this.page.currentPage = 1;
this.getRecordsList()
}
}).catch(err => {
this.BetLoading.hide();
})
},
//
sendOrders(item) {
let param = {
id: item.id
}
uni.navigateTo({
url: `/pages/submission/sendOrders${this.$u.queryParams(param)}`,
});
},
//
orderConfirm(row) {
let param = {
id: row.id
}
uni.navigateTo({
url: `/pages/submission/sendOrders${this.$u.queryParams(param)}`,
});
},
//
getRepairPersons() {
this.$u.api.getRepairPersons().then(res => {
if (res.code == 200) {
let data_ = res.data
data_.forEach(i => {
this.sendOrdersList.push({ ...i, label: i.name })
})
}
})
},
//
openModel(item, type) {
if (type == 'close') {
this.cloneVisible = true
}
if (type == 'turn') {
this.turnShow = true
}
if (type == 'repair') {
this.repairShow = true
}
if (type == 'paymentInfo') {
this.paymentShow = true
}
if (type == 'submitOrder') {
this.submitOrderShow = true
}
if (type == 'details') {
this.detailsShow = true
}
this.rowInfo = item
},
confirmCloseSub() {
if (this.closeReason == '') {
uni.showToast({ title: "请填写关闭原因", icon: "none" });
return false;
}
let query = {
id: this.rowInfo.id,
closeReason: this.closeReason,
}
this.BetLoading.show();
this.$u.api.cloneOrder(query).then(res => {
this.cloneVisible = false
this.BetLoading.hide();
if (res.code == 200) {
uni.showToast({ title: "关闭成功", icon: "none" });
this.getRecordsList()
}
})
},
//
openWorkOrder(row) {
let param = {
id: row.id,
type: 'breakdownView'
}
uni.navigateTo({
url: `/pages/submission/recordsdetails${this.$u.queryParams(param)}`,
});
},
//
orderUpdate(item) {
let param = {
id: item.id,
type: 'breakdownUpdate'
}
uni.navigateTo({
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`,
});
},
//
turnFn() {
if (this.repaiRejectReason == '') {
uni.showToast({ title: "请输入驳回原因", icon: "none" });
return false
}
let query = {
id: this.rowInfo.id,
repaiRejectReason: this.repaiRejectReason,
}
this.$u.api.repairReject(query).then(res => {
if (res.code == 200) {
this.turnShow = false
uni.showToast({ title: "驳回成功", icon: "none" });
this.getRecordsList()
}
})
},
//
repairFn() {
let query = {
id: this.rowInfo.id,
}
this.$u.api.servicemanRepairSubmit(query).then(res => {
if (res.code == 200) {
this.repairShow = false
uni.showToast({ title: "维修完成", icon: "none" });
this.getRecordsList()
}
})
},
//
openEvaluate(item) {
let param = {
id: item.id,
}
uni.navigateTo({
url: `/pages/submission/evaluate${this.$u.queryParams(param)}`,
});
},
//
paymentFn() {
let query = {
id: this.rowInfo.id,
}
this.BetLoading.show();
this.$u.api.cloneOrder(query).then(res => {
this.paymentShow = false
this.BetLoading.hide();
if (res.code == 200) {
uni.showToast({ title: "确认成功", icon: "none" });
this.submitOrderShow = false
this.getRecordsList()
}
})
},
//
submitOrderShowFn() {
let query_ = {
id: this.rowInfo.id
}
this.$u.api.servicemanReceive(query_).then(res => {
if (res.code == 200) {
uni.showToast({ title: "确认成功", icon: "none" });
this.getRecordsList()
}
})
},
goPageLocation(item) {
let param = {
userid: item.repairPerson,
}
//
uni.navigateTo({
url: `/pages/order/location${this.$u.queryParams(param)}`,
})
},
detailsShowFn() {
// h2cRenderDom
this.$refs.renderRef.h2pRenderDom();
},
renderOver(e) {
// ebase64
// this.imageSrc = e
console.log("==== renderOver :", e);
// canvas
},
beforeSavePDF(e) {
// epdfbase64
console.log("==== beforeSavePDF :", e);
},
successSavePDF(path) {
// epdf
console.log("==== successSavePDF :", path);
},
},
};
</script>
@ -42,6 +512,130 @@ export default {
<style lang="scss" scoped>
.page-css {
padding: 0;
padding-top: var(--status-bar-height);
.page-box {
padding: 0;
.page-search-top {
background-color: #fff;
padding: 0 40rpx 0;
}
.order-box {
margin-top: 20rpx;
.order-item {
height: 414rpx;
margin: 0 24rpx 20rpx;
border-radius: 20rpx;
background: #fff;
display: flex;
flex-direction: column;
.item-top {
height: 114rpx;
border-bottom: 1px solid rgba(239, 239, 239, 1);
display: flex;
flex-direction: row;
width: 100%;
.item-left {
flex: 1;
text {
display: block;
}
.item-orderNo {
color: rgba(51, 51, 51, 1);
font-size: 28rpx;
padding: 12rpx 0 0 26rpx;
}
.item-time {
color: rgba(190, 190, 190, 1);
font-size: 24rpx;
padding: 12rpx 0 0 26rpx;
}
}
.item-right {
max-width: 162rpx;
height: 48rpx;
margin: 36rpx 24rpx 0 0;
}
}
.item-con {
flex: 1;
display: flex;
flex-direction: row;
.con-left {
width: 150rpx;
height: 150rpx;
margin: 24rpx 28rpx 0 28rpx;
image {
width: 100%;
height: 100%;
}
}
.con-right {
flex: 1;
margin-right: 24rpx;
display: flex;
flex-direction: column;
text {
display: block;
}
.con-title {
margin-top: 12rpx;
line-height: 60rpx;
color: rgba(0, 0, 0, 1);
font-size: 28rpx;
}
.con-content {
color: rgba(108, 108, 108, 1);
font-size: 24rpx;
// line-height: 36rpx;
margin-top: 14rpx;
flex: 1;
text {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.5em;
/* 这个值根据你的需求调整,这里假设为1.5倍行高 */
max-height: 3em;
/* 3行的高度 */
width: 100%;
/* 根据需要设置宽度 */
word-wrap: break-word;
/* 允许在单词内换行 */
word-break: break-all;
/* 允许在任意字符处换行 */
}
}
.con-btn {
margin-top: 56rpx;
margin-bottom: 32rpx;
display: inline-block;
text-align: right;
}
}
}
}
}
}
}
</style>

@ -41,7 +41,7 @@ const store = new Vuex.Store({
commit('updateTabbar', tabBar.ordinary)
uni.reLaunch({
url: "/pages/order/tasking",
url: "/pages/submission/records",
});
@ -51,7 +51,7 @@ const store = new Vuex.Store({
commit('updateTabbar', tabBar.manage)
uni.reLaunch({
url: "/pages/order/tasking",
url: "/pages/submission/records",
});
// this.$u.api.updateCoordinate().then(res=>{
@ -63,7 +63,7 @@ const store = new Vuex.Store({
commit('updateTabbar', tabBar.repair)
uni.reLaunch({
url: "/pages/order/tasking",
url: "/pages/submission/records",
});

@ -3,7 +3,7 @@ const ordinary = [{
iconPath: "photo",
selectedIconPath: "photo-fill",
text: "接单记录",
pagePath: "/pages/order/tasking",
pagePath: "/pages/submission/records",
}, {
iconPath: "setting",
selectedIconPath: "setting-fill",
@ -39,7 +39,7 @@ const manage = [{
iconPath: "photo",
selectedIconPath: "photo-fill",
text: "接单记录",
pagePath: "/pages/order/tasking",
pagePath: "/pages/submission/records",
}, {
iconPath: "setting",
selectedIconPath: "setting-fill",
@ -56,7 +56,7 @@ const repair = [{
iconPath: "photo",
selectedIconPath: "photo-fill",
text: "维修任务",
pagePath: "/pages/order/tasking",
pagePath: "/pages/submission/records",
}, {
iconPath: "setting",
selectedIconPath: "setting-fill",

Loading…
Cancel
Save