代码提交

test
zhangdi 1 year ago
parent c047a06d42
commit b917f98738
  1. 216
      common/betone_components/betone-new-header.vue
  2. 50
      common/betone_components/betone-no-data.vue
  3. 66
      pages.json
  4. 6
      pages/inspection/quest.vue
  5. 12
      pages/inspection/questOrder.vue
  6. 10
      pages/login/login.vue
  7. 3
      pages/my/records.vue

@ -1,216 +0,0 @@
<template>
<view class="sp-new-header-wrap">
<view class="heder-box" :class="{ active: isShowBlur }">
<view class="heder-left" @click="gotoPage('../my/my', 1)">
<view class="avatar-item">
<image
mode="widthFix"
:src="securityInfo.avatar || '/static/img/avatar.png'"
/>
</view>
<view class="welcome-css"
>Hi ,
{{
isOkAuth || securityInfo.realName
? securityInfo.nickName
: $t("betPageTMy.notAuthText")
}}</view
>
<view class="auth-icon">
<view
class="iconfont icon-renzheng"
:class="{ isOkAuth: isOkAuth }"
></view>
</view>
</view>
<view class="heder-right">
<view class="right-item" @click="toChat">
<view class="iconfont icon-support"></view>
</view>
<view class="right-item" @click="scanCode">
<view class="iconfont icon-code"></view>
</view>
<view class="right-item" @click="gotoPage('../homeNotice/index')">
<view class="iconfont icon-tongzhi"></view>
<view v-if="unreadNoticeIds" class="sp-header__alt-new">{{
unreadNoticeIds
}}</view>
</view>
</view>
</view>
<view v-if="isShowBlur" class="header-bar-css"> </view>
</view>
</template>
<script>
export default {
name: "BetoneNewHeader",
props: {
isShowBlur: {
type: Boolean,
default: false,
},
userInfo: {
type: Object,
default: () => {
return {
realName: "",
avatar: "",
realName: "",
nickName: "",
};
},
},
},
data() {
return {
securityInfo: {},
unreadNoticeIds: 0,
};
},
computed: {
isOkAuth() {
return uni.getStorageSync("isOkAuth");
},
tCommonToast() {
return this.$t("tCommonToast");
},
},
mounted() {},
methods: {
//
refresh(res, res2 = null, refreshSecurity = false) {
try {
const D = uni.getStorageSync("securityInfo");
this.securityInfo = JSON.parse(D);
} catch (e) {}
if (!refreshSecurity) {
this.getMemberSecurityInfo(res);
}
this.findUnreadNoticeId(res2);
},
findUnreadNoticeId(res2 = null) {
if (!res2) {
this.$u
.get("/message/findUnreadCount")
.then(this.findUnreadNoticeIdCallBack);
} else {
this.findUnreadNoticeIdCallBack(res2);
}
},
findUnreadNoticeIdCallBack(res) {
var that = this;
that.unreadNoticeIds = res.data;
},
getMemberSecurityInfo(res) {
if (res) {
this.rs(res);
} else {
this.$u.get("/member/getMemberSecurityInfo").then(this.rs);
}
},
rs(res) {
this.securityInfo = res.data;
this.$emit("securityInfo", this.securityInfo);
try {
uni.setStorage({
key: "securityInfo",
data: JSON.stringify(this.securityInfo),
});
} catch (e) {}
},
toChat() {
// uni.navigateTo({
// url: "../csChat/csChat?vip=1",
// });
uni.navigateTo({
url: "/pages/cusservice/cusservice",
fail: (err) => {
uni.showToast({
title: this.$t("tCommonToast").toast55,
icon: "none",
duration: 5000,
mask: true,
});
},
});
},
gotoPage(path, ack = 0) {
if (!ack) {
uni.navigateTo({
url: path,
});
} else {
uni.switchTab({
url: path,
});
}
},
lockPreReceiptOrder() {
var that = this;
if (that.orderNo === null || that.orderNo === "") {
//
uni.showToast({
title: this.tCommonToast.toast10,
icon: "none",
});
return;
}
this.$u
.post("/transfer/lockPreReceiptOrder", {
orderNo: that.orderNo,
})
.then((res) => {
that.showC2BModal = false;
uni.navigateTo({
url: "../transferC2B/transferC2B?orderNo=" + that.orderNo,
});
});
},
scanCode() {
var that = this;
// #ifdef APP-PLUS
uni.scanCode({
scanType: ["qrCode"],
autoZoom: true,
success: function (res) {
if (res.result && 1) {
var reg = /^-?[0-9]\d*$/;
if (reg.test(res.result)) {
that.orderNo = res.result;
that.lockPreReceiptOrder();
} else {
that.walletAddr = res.result;
uni.navigateTo({
url: "../transferC2C/transferC2C?walletAddr=" + that.walletAddr,
});
}
} else {
// uni.showToast({
// title: "",
// icon: "none",
// });
}
},
fail: function (res) {
//
uni.showToast({
title: that.tCommonToast.toast11,
icon: "none",
});
},
});
// #endif
// #ifdef H5
uni.navigateTo({
url: "../QRCodeReader/QRCodeReader",
});
// #endif
},
},
};
</script>
<style>
</style>

@ -1,50 +0,0 @@
<template>
<view class="null-box">
<!-- <u-image
class="null-img"
mode="widthFix"
width="100%"
src="@/static/img/betone-sp-component/null.svg"
></u-image>
<view class="null-text">{{ nullText }}</view> -->
<u-empty :text="nullText" mode="list"></u-empty>
</view>
</template>
<script>
export default {
name: "spNoData",
props: {
text: {
type: String,
default: "",
},
},
data() {
return {
nullText: "",
};
},
mounted() {
this.nullText = this.text || '暂无数据';
},
};
</script>
<style lang="scss" scoped>
.null-box {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
.null-img {
width: 100%;
}
.null-text {
padding-top: 24rpx;
font-size: 32rpx;
font-family: PingFangSC-Medium, pingfang;
font-weight: 500;
color: #333333;
line-height: 44rpx;
}
}
</style>

@ -9,34 +9,6 @@
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/login/login",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/login/authInfo",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/register/index",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/register/registerSuccess",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
}
],
"subPackages": [
@ -238,6 +210,44 @@
}
}
]
},
{
"root": "pages/login",
"pages": [
{
"path": "login",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "authInfo",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
}
]
},
{
"root": "pages/register",
"pages": [
{
"path": "index",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "registerSuccess",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
}
]
}
],
"globalStyle": {

@ -41,14 +41,14 @@
<!-- 巡检任务 客户 确认-->
<block v-if="subsectionCurrent == '0' && dataTypes == 1 && item.taskStatus == 3">
<u-button size="mini" plain style="margin-right: 32rpx"
@click.stop="openWorkOrder(item, 'tsak')">确认</u-button>
@click.stop="openWorkOrder(item, 'task')">确认</u-button>
</block>
<!--巡检任务 维修人员 接单 提交-->
<block v-if="subsectionCurrent == '0' && dataTypes == 4">
<u-button v-if="item.taskStatus == 1" size="mini" plain style="margin-right: 32rpx"
@click="openWorkOrder(item, 'tsak')">接单</u-button>
@click="openWorkOrder(item, 'task')">接单</u-button>
<u-button v-if="item.taskStatus == 2" size="mini" plain style="margin-right: 32rpx"
@click="openWorkOrder(item, 'tsak')">巡检</u-button>
@click="openWorkOrder(item, 'task')">巡检</u-button>
</block>
<!--巡检任务 维修主管 指派 -->
<block v-if="subsectionCurrent == '0' && dataTypes == 3">

@ -205,39 +205,39 @@
</view>
<!-- 维修人员接收任务单 -->
<view class="repair-btn" style="margin-right: 32rpx;width:100%"
v-if="dataTypes == 4 && detailForm.taskStatus == 1">
v-if="dataTypes == 4 && detailForm.taskStatus == 1&&detailsType=='task'">
<u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" type="primary" @click="receiveQuest()">接单</u-button>
</view>
<!-- 维修人员提交巡检详情 -->
<view class="repair-btn" style="margin-right: 32rpx;width:100%"
v-if="dataTypes == 4 && detailForm.taskStatus == 2">
v-if="dataTypes == 4 && detailForm.taskStatus == 2&&detailsType=='task'">
<u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" type="primary" @click="submitQuest()">提交</u-button>
</view>
<!-- 客户 确认巡检任务是否完成提交 -->
<view class="repair-btn" style="margin-right: 32rpx;width:100%"
v-if="dataTypes == 1 && detailForm.taskStatus == 3">
v-if="dataTypes == 1 && detailForm.taskStatus == 3&&detailsType=='task'">
<u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" type="primary" @click="customerQuest()">提交</u-button>
</view>
<!-- 维修人员 提交维修方案 -->
<view class="repair-btn" style="margin-right: 32rpx;width:100%"
v-if="dataTypes == 4 && detailForm.repairStatus == 1">
v-if="dataTypes == 4 && detailForm.repairStatus == 1&&detailsType=='repair'">
<u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" type="primary" @click="solutionSubmit()">提交方案</u-button>
</view>
<!-- 维修主管审批 巡检 维修方案 -->
<view class="repair-btn" style="margin-right: 32rpx;width:100%"
v-if="dataTypes == 3 && detailForm.repairStatus == 2">
v-if="dataTypes == 3 && detailForm.repairStatus == 2&&detailsType=='repair'">
<u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" type="primary" @click="repairApproveSubmit()">提交</u-button>
</view>
<!-- 客户审批 巡检 维修方案 确认是否维修-->
<view class="repair-btn" style="margin-right: 32rpx;width:100%"
v-if="dataTypes == 1 && detailForm.repairStatus == 3">
v-if="dataTypes == 1 && detailForm.repairStatus == 3&&detailsType=='repair'">
<u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" type="primary" @click="customerApproveSubmit()">提交</u-button>
</view>

@ -23,13 +23,12 @@
</view>
</view>
</view>
<betone-loading ref="BetLoading"></betone-loading>
<betone-loading ref="BetLoading" id="child-component"></betone-loading>
</view>
</template>
<script>
import { getTopUrl, bjectToQueryString } from "@/utils/util";
import md5 from "@/uni_modules/md5/md5.min.js";
import { bjectToQueryString } from "@/utils/util";
import { sm2 } from 'miniprogram-sm-crypto';
import website from '@/utils/website'
export default {
@ -86,8 +85,9 @@ export default {
uni.showToast({ title: "请输入密码", icon: "none" });
return false;
}
this.BetLoading.show();
// // smCrypto
// this.$refs.BetLoading.show();
console.log(555555555555, this.$refs.BetLoading.show())
// // smCrypto child-component
// const smCryptoInstance = new smCrypto.SM2Instance();
// //
// smCryptoInstance.setKey(website.publicKey);

@ -6,7 +6,8 @@
</view>
<view class="noData" v-if="recordData.length <= 0">
<betone-no-data :nullText="'暂无数据'" />
<!-- <betone-no-data :nullText="'暂无数据'" /> -->
<u-empty :text="'暂无数据'" mode="list"></u-empty>
</view>
<view class="records-box" v-else>
<view v-for="(item, index) in recordData" :key="index">

Loading…
Cancel
Save