feat: 版本迭代

This commit is contained in:
admin 2024-09-25 15:51:24 +08:00
parent 390ca4a892
commit 6fddf740a5
21 changed files with 880 additions and 378 deletions

View File

@ -0,0 +1,76 @@
<template>
<u-modal :show="show" >
<view class="slot-content">
<view class="title"> {{ title }} </view>
<view class="content">
<text :class="{ isMain: isMain }">{{ content }}</text>
</view>
</view>
<template #confirmButton>
<view class="btn-box">
<text class="cancel" @click="handleClose('cancel')">取消</text>
<text class="ok" @click="handleClose('ok')">{{ okText }}</text>
</view>
</template>
</u-modal>
</template>
<script setup lang="ts">
const props = withDefaults(
defineProps<{
title: string;
content: string;
okText: string;
isMain: boolean;
show: boolean;
}>(),
{
okText: "确认",
isMain: false,
show: false
}
);
const emit = defineEmits(["handleModal", "handleOk", "handleCancel"]);
const handleClose = (v: string) => {
emit("handleModal", false);
if (v === 'ok') {
//
emit("handleOk");
} else {
emit("handleCancel")
}
};
</script>
<style lang="scss" scoped>
.title {
text-align: center;
font-weight: 400;
font-size: 32rpx;
color: #000000;
margin-top: 25px;
}
.content {
padding-top: 25px;
font-weight: 400;
font-size: 27rpx;
color: #999999;
}
.isMain {
color: #ec0f3e;
}
.btn-box {
display: flex;
justify-content: space-between;
margin-bottom: 25px;
.cancel {
font-weight: 500;
font-size: 32rpx;
color: #999999;
}
.ok {
font-weight: 500;
font-size: 32rpx;
color: $u-primary;
}
}
</style>

View File

@ -1,17 +1,17 @@
<template>
<view
@click="handleOnline"
style="
position: fixed;
bottom: 100px;
z-index: 999;
right: 20px;
background: #294ac7;
border-radius: 50%;
padding: 5px;
"
><up-icon name="chat" color="#fff" size="28"></up-icon
></view>
style="position: fixed; bottom: 100px; z-index: 999; right: 20px"
>
<image
:src="`${url}/static/img/service.png`"
style="width: 100rpx; height: 100rpx"
/>
<!-- <up-icon name="chat" color="#fff" size="28">
</up-icon
> -->
</view>
<!-- <view class="content">
<movable-area class="movableArea">
<movable-view
@ -31,6 +31,10 @@
</view> -->
</template>
<script setup lang="ts">
import { url } from "@/utils/data";
import { useMemberStore } from "@/store/index";
import pinia from "@/store";
const store = useMemberStore(pinia);
const x = ref(300);
const y = ref(500);
const x1 = ref(0);
@ -43,6 +47,13 @@ const move = reactive({
});
const handleOnline = () => {
console.log(store)
if (!store.profile.token) {
uni.navigateTo({
url: "/pagesLogin/index", //
});
return;
}
//webviewurl
uni.navigateTo({
url: "/pagesOnline/index",

View File

@ -12,13 +12,6 @@
}
},
"pages": [
// {
// "path": "pagesLogin/index",
// "style": {
// // "navigationStyle": "custom", //
// "navigationBarTitleText": "登陆"
// }
// },
{
"path": "pagesHome/index",
"style": {
@ -32,6 +25,13 @@
// "navigationStyle": "custom", //
"navigationBarTitleText": "我的"
}
},
{
"path": "pagesLogin/index",
"style": {
// "navigationStyle": "custom", //
"navigationBarTitleText": "登陆"
}
}
//pageshttps://uniapp.dcloud.io/collocation/pages
],
@ -157,9 +157,15 @@
}
},
{
"path": "battery/detail",
"path": "joinus/index",
"style": {
"navigationBarTitleText": "订单详情"
"navigationBarTitleText": "加入我们"
}
},
{
"path": "collection",
"style": {
"navigationBarTitleText": "收款信息"
}
}
]

View File

@ -95,6 +95,9 @@
import CustomSwiper from "@/components/CustomSwiper/index.vue";
import OpOnline from "@/components/OpOnline/index.vue";
import { url } from "@/utils/data";
import { useMemberStore } from "@/store/index";
import pinia from "@/store";
const store = useMemberStore(pinia);
const bannerList = [
{
@ -183,6 +186,12 @@ const questionList = ref([
]);
const handleClick = (item: any) => {
if (!store.profile.token) {
uni.navigateTo({
url: '/pagesLogin/index', //
});
return
}
uni.navigateTo({
url: item.url, //
});

View File

@ -9,10 +9,10 @@
></image>
<view>
<view>
<text class="name">{{ "用户" || "-" }}</text>
<text class="name">{{ profile.name || "-" }}</text>
</view>
<view>
<text class="company">{{ "-" || "-" }}</text>
<text class="company">{{ profile.phone || "-" }}</text>
</view>
</view>
</view>
@ -68,16 +68,31 @@
</view>
</view>
</view>
<SmallModal
:title="'确认退出吗?'"
:content="'退出后将返回至登陆页'"
:okText="'确认退出'"
:isMain="true"
:show="isShowCancelModal"
@handleModal="(v:boolean) => {handleModal(v)}"
@handleOk="handleOk()"
/>
</Layout>
</template>
<script setup lang="ts">
import Layout from "@/components/Layout/index.vue";
import { useMemberStore } from "@/store/index";
import pinia from "@/store";
import { url } from "@/utils/data";
import { UserApi } from "@/services";
import SmallModal from "@/components/Modal/smallModal.vue";
const store = useMemberStore(pinia);
const profile = store.profile.userInfo;
const list = reactive([
{
name: "收款信息",
icon: "4.png",
icon: "pay.png",
},
{
name: "用户协议",
@ -87,23 +102,28 @@ const list = reactive([
name: "隐私政策",
icon: "5.png",
},
{
name: "退出登录",
icon: "3.png",
path: "",
},
]);
const entryItemList = ref([
{
path: "1.png",
path: "p1.png",
name: "报废车辆回收",
url: "/pagesOrder/vehicle/index",
},
{
path: "2.png",
path: "p2.png",
name: "电池回收",
url: "/pagesOrder/battery/index",
},
{
path: "3.png",
path: "p3.png",
name: "加入我们",
url: "/pagesScrapSteel/index",
url: "/pagesOrder/joinus/index",
},
]);
@ -118,9 +138,30 @@ const hanldeClick = (item: any) => {
openDoc("在生万有用户协议");
} else if (item.name === "隐私政策") {
openDoc("在生万有隐私政策");
} else if (item.name === "收款信息") {
uni.navigateTo({
url: '/pagesOrder/collection', //
});
} else if (item.name === "退出登录") {
handleModal(true);
}
};
const isShowCancelModal = ref(false);
const handleModal = (v: boolean) => {
isShowCancelModal.value = v;
};
const handleOk = () => {
UserApi.logOut({}).then((res: any) => {
if (res.code === 200) {
uni.reLaunch({
url: "/pagesLogin/index", //
});
}
});
};
const openDoc = (item: string) => {
//
const isWX = uni.getSystemInfoSync().uniPlatform === "mp-weixin";

View File

@ -60,7 +60,7 @@
<u-checkbox
:key="1"
:size="'28rpx'"
:activeColor="'#00dcee'"
:activeColor="'#294AC7'"
:name="1"
:usedAlone="true"
:checked="checkGroup.agreeCheck"
@ -93,6 +93,7 @@ import valid from "@/utils/validate";
import pinia from "@/store";
import { onShow } from "@dcloudio/uni-app";
import { url } from "@/utils/data";
import { UserApi } from "@/services";
const handleClear = (item: any) => {
setTimeout(() => {
@ -135,36 +136,22 @@ const getCode = () => {
uni.showToast({ icon: "none", title: "请输入正确的手机号" });
return;
}
// ProfileApi.getCommonDbPhone({ phone: model1.userInfo.phone }).then(
// (res: any) => {
// if (res.code === 200) {
// if (res.data.length > 0) {
// store.setMechanism({mechanismCode: res.data[0].mechanismCode, mechanismName: res.data[0].mechanismName});
// sendMsg();
// } else {
// uni.showToast({
// title: "",
// icon: 'none'
// });
// }
// }
// }
// );
sendMsg();
};
const sendMsg = () => {
// ProfileApi.sendMsg({ phone: model1.userInfo.phone }).then((res) => {
// if (res.code === 200) {
// uni.$u.toast("");
// seconds.value = 60;
// let countDownTimer = setInterval(() => {
// if (seconds.value > 0) {
// --seconds.value;
// } else {
// clearInterval(countDownTimer);
// }
// }, 1000);
// }
// });
UserApi.sendMsg({ phone: model1.userInfo.phone }).then((res) => {
if (res.code === 200) {
uni.$u.toast("验证码已发送");
seconds.value = 60;
let countDownTimer = setInterval(() => {
if (seconds.value > 0) {
--seconds.value;
} else {
clearInterval(countDownTimer);
}
}, 1000);
}
});
};
const handleInput = (e: any, key: string) => {
if (key === "phone") {
@ -195,14 +182,14 @@ const submit = () => {
});
return;
}
// ProfileApi.loginPhone(model1.userInfo).then((res: any) => {
// if (res.code === 200) {
// store.setProfile(res.data);
// uni.reLaunch({
// url: "/pagesHome/index", //
// });
// }
// });
UserApi.loginPhone(model1.userInfo).then((res: any) => {
if (res.code === 200) {
store.setProfile(res.data);
uni.reLaunch({
url: "/pagesHome/index", //
});
}
});
}
});
};

View File

@ -6,5 +6,8 @@
</template>
<script setup lang="ts">
let url = 'https://ykf-weixin01.7moor.com/wapchat.html?accessId=2c6004e0-7631-11ef-90d7-f1a5ae18c977&fromUrl=http://&urlTitle=001&language=ZHCN&wechatOrAppImplant=true&otherParams={"nickName":"test001"}&clientId=13918346152'
import { useMemberStore } from "@/store/index";
import pinia from "@/store";
const store = useMemberStore(pinia);
let url = `https://ykf-weixin01.7moor.com/wapchat.html?accessId=2c6004e0-7631-11ef-90d7-f1a5ae18c977&fromUrl=http://&urlTitle=001&language=ZHCN&wechatOrAppImplant=true&otherParams={"nickName":"${store.profile.userName}"}&clientId=${store.profile.userId}`
</script>

View File

@ -1,250 +0,0 @@
<template>
<view class="detail">
<!-- 订单状态0已取消1待登记2待处理3待上门4待打款5已完结 -->
<block v-for="(item, value) in listMap" :key="value">
<view v-if="statusInfo[model1.status].indexOf(value) > -1">
<view>
<view class="title">{{ item.name }}</view>
<view class="content">
<view v-for="(iitem, index) in item.attrList" :key="index">
{{ iitem.name }}:
<view v-if="iitem.name === '行驶证'" class="license">
<up-row customStyle="flex-wrap: wrap" :gutter="8">
<up-col span="6">
<view class="grid-item">
<image
v-if="model1.formData[iitem.key]"
:src="model1.formData[iitem.key]"
:mode="'widthFix'"
:width="'100%'"
></image>
</view>
</up-col>
<up-col span="6">
<view class="grid-item">
<image
v-if="model1.formData['licenseBackUrl']"
:src="model1.formData['licenseBackUrl']"
:mode="'widthFix'"
:width="'100%'"
></image>
</view>
</up-col>
</up-row>
<view> </view>
</view>
<text v-else
>{{ model1.formData[iitem.key] || "-" }} {{ iitem.unit }}</text
>
</view></view
>
</view>
</view>
</block>
</view>
</template>
<script setup lang="ts">
import { VehicleApi } from "@/services";
import { onLoad } from "@dcloudio/uni-app";
import { reactive } from "vue";
const model1 = reactive<any>({
formData: {},
status: 0,
});
const statusInfo = reactive<any>({
0: ["regis", "car", "vehicle"],
1: ["vehicle"],
2: ["regis", "car", "vehicle"],
3: ["room", "regis", "car", "vehicle"],
4: ["settle", "room", "regis", "car", "vehicle"],
5: ["payment", "settle", "room", "regis", "car", "vehicle"],
});
const listMap = reactive<any>({
payment: {
name: "打款信息",
attrList: [
{
name: "打款时间",
value: "",
key: "paymentTime",
unit: "",
},
{
name: "打款金额",
value: "",
key: "paymentPrice",
unit: "元",
},
],
},
settle: {
name: "结算信息",
attrList: [
{
name: "过磅重量",
value: "",
key: "netWeight",
unit: "KG",
},
{
name: "结算金额",
value: "",
key: "paymentPrice",
unit: "元",
},
],
},
room: {
name: "上门服务",
attrList: [
{
name: "上门时间",
value: "",
key: "upDoorTime",
},
],
},
regis: {
name: "登记信息",
attrList: [
{
name: "车辆所属",
value: "",
key: "ownerType",
},
{
name: "联系人",
value: "",
key: "owner_name",
},
{
name: "联系方式",
value: "",
key: "owner_phone",
},
{
name: "上门地址",
value: "",
key: "location",
},
],
},
car: {
name: "我要选新车",
attrList: [
{
name: "选择品牌",
value: "",
key: "brandName",
},
{
name: "预算范围",
value: "",
key: "budgetRange",
},
],
},
vehicle: {
name: "车辆信息",
attrList: [
{
name: "行驶证",
value: "",
key: "licensePhotoUrl",
},
{
name: "车辆类型",
value: "",
key: "vehicleType",
},
{
name: "燃油类别",
value: "",
key: "fuelType",
},
{
name: "钢圈材质",
value: "",
key: "wheelMaterial",
},
{
name: "整车质量",
value: "",
key: "curbWeight",
unit: "KG",
},
{
name: "车架号",
value: "",
key: "vin",
},
{
name: "品牌型号",
value: "",
key: "brandModel",
},
{
name: "系列",
value: "",
key: "series",
},
{
name: "总重量",
value: "",
key: "totalWeight",
unit: "KG",
},
{
name: "车牌号",
value: "",
key: "licensePlate",
},
],
},
});
onLoad((option: any) => {
//
if (option.id) {
model1.formData.id = option.id;
model1.status = option.status;
VehicleApi.getDetail({ id: option.id }).then((res: any) => {
if (res.code === 200) {
model1.formData = {
...res.data,
ownerType: res.data.ownerType ? "单位" : "个人",
};
}
});
}
});
</script>
<style lang="scss" scoped>
.detail {
padding: 40rpx;
font-size: 32rpx;
.title {
font-weight: bold;
font-size: 34rpx;
line-height: 80rpx;
}
.content {
> view {
line-height: 60rpx;
}
.license {
.grid-item {
position: relative;
padding: 10rpx;
image {
width: 100% !important;
}
}
}
}
}
</style>

View File

@ -1,5 +1,11 @@
<template>
<view>
<view class="custom-tab">
<up-tabs
:list="[{ name: '询价列表' }, { name: '登记列表' }]"
@click="handleTab"
></up-tabs>
</view>
<view class="filter">
<view @click="handleSort"
>创建时间<u-icon :name="state.isUp ? 'arrow-up' : 'arrow-down'"></u-icon
@ -32,7 +38,7 @@
"
:noMoreData="pageList.noMoreData"
:list="pageList.list"
:height="204"
:height="294"
:isLoading="pageList.isLoading"
>
<view class="box">
@ -40,16 +46,33 @@
<uni-table stripe emptyText="">
<!-- 表头行 -->
<uni-tr>
<uni-th v-for="(item, index) in tableTitleList" :key="index"
>{{ item.name }}
</uni-th>
<block
v-for="(item, index) in state.tab === 1
? tableTitleList1
: tableTitleList"
:key="index"
>
<uni-th>{{ item.name }} </uni-th>
</block>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="(item, index) in pageList.list" :key="index">
<uni-td v-for="(tItem, index) in tableTitleList" :key="index">
<view @click="goDetail(item)">
<uni-td
v-for="(tItem, index) in state.tab === 1
? tableTitleList1
: tableTitleList"
:key="index"
>
<view>
<text v-if="tItem.key === 'status'">
{{ ['已取消', '待登记', '待处理', '待上门', '待打款', '已完结'][item[tItem.key]] }}
{{ item[tItem.key] ? "已处理" : "待处理" }}
</text>
<text
v-else-if="tItem.key === 'photoUrl'"
class="btn"
@click="showImage(item)"
>
照片
</text>
<text v-else>
{{ item[tItem.key] }}
@ -92,10 +115,11 @@
<script setup lang="ts">
import PageView from "@/components/PageView/index.vue";
import TimeRangeFilter from "@/components/Dialog/TimeRangeFilter.vue";
import { VehicleApi } from "@/services";
import { BatteryApi } from "@/services";
import pinia from "@/store";
import { useMemberStore } from "@/store/index";
const state = reactive({
tab: 0,
startTime: "",
endTime: "",
showTime: false,
@ -126,24 +150,42 @@ const tableTitleList = reactive([
key: "status",
},
{
name: "品牌型号",
key: "brandModel",
name: "回收种类",
key: "recyclingType",
},
{
name: "重量",
key: "totalWeight",
name: "回收重量",
key: "recyclingWeight",
},
{
name: "预估价格",
key: "totalPrice",
name: "照片",
key: "photoUrl",
},
]);
const tableTitleList1 = reactive([
{
name: "时间",
key: "createdTime",
},
{
name: "过磅重量",
key: "netWeight",
name: "状态",
key: "status",
},
{
name: "实际价格",
key: "paymentPrice",
name: "回收种类",
key: "recyclingType",
},
{
name: "回收重量",
key: "recyclingWeight",
},
{
name: "上门时间",
key: "preferredVisitTime",
},
{
name: "照片",
key: "photoUrl",
},
]);
const actionSheet = reactive({
@ -153,32 +195,29 @@ const actionSheet = reactive({
key: -1,
},
{
name: "已取消",
name: "待处理",
key: 0,
},
{
name: "待登记",
name: "已处理",
key: 1,
},
{
name: "待处理",
key: 2,
},
{
name: "待上门",
key: 3,
},
{
name: "待打款",
key: 4,
},
{
name: "已完结",
key: 5,
},
],
});
const showImage = (item: any) => {
uni.previewImage({
urls: [item.photoUrl], //
current: 0, //
indicator: "default", //
loop: true,
});
};
function handleTab(item: any) {
state.tab = item.index;
resetPageList();
getList();
}
const changeTime = (obj: any) => {
state.startTime = obj.startTime;
state.endTime = obj.endTime;
@ -201,7 +240,7 @@ const handleSort = () => {
const goInquiry = () => {
uni.navigateTo({
url: "/pagesVehicle/inquiry", //
url: "/pagesBattery/inquiry", //
});
};
@ -225,28 +264,41 @@ const getList = (v?: boolean) => {
params.startTime = state.startTime;
params.endTime = state.endTime;
}
if (state.isUp) {
params.isUp = state.isUp;
}
params.isUp = state.isUp;
pageList.isLoading = true;
VehicleApi.getRegisList(params).then((res: any) => {
if (res.code === 200) {
pageList.isLoading = false;
pageList.list = pageList.list = pageList.list.concat(res.data.list);
pageList.total = res.data.total;
}
});
if (state.tab === 1) {
BatteryApi.queryRegis(params).then((res: any) => {
if (res.code === 200) {
pageList.isLoading = false;
pageList.list = pageList.list = pageList.list.concat(res.data.list);
pageList.total = res.data.total;
}
});
} else {
BatteryApi.queryInquiry(params).then((res: any) => {
if (res.code === 200) {
pageList.isLoading = false;
pageList.list = pageList.list = pageList.list.concat(res.data.list);
pageList.total = res.data.total;
}
});
}
};
function goDetail(item: any) {
uni.navigateTo({
url: "/pagesOrder/vehicle/detail?id=" + item.id + `&status=${item.status}`,
});
}
// function goDetail(item: any) {
// uni.navigateTo({
// url: "/pagesOrder/vehicle/detail?id=" + item.id + `&status=${item.status}`,
// });
// }
getList();
</script>
<style lang="scss" scoped>
.custom-tab {
width: 100%;
display: flex;
justify-content: center;
}
.filter {
display: flex;
justify-content: space-around;
@ -262,6 +314,9 @@ getList();
}
.box {
padding: 28rpx 20rpx;
.btn {
color: $u-primary;
}
.scroll-view {
white-space: nowrap;
width: 100%;

View File

@ -0,0 +1,218 @@
<template>
<uni-card
:shadow="'0rpx 0rpx 10rpx 0rpx rgba(5,68,37,0.12)'"
:margin="'20px'"
:border="false"
>
<view class="title">收款信息</view>
<u-form
labelPosition="left"
:model="model1"
:rules="rules"
ref="form"
:labelWidth="80"
:labelStyle="{ padding: '0rpx 10rpx' }"
:errorType="'border-bottom'"
>
<u-form-item
:prop="`formData.${item.key}`"
:label="item.name"
:required="item.required"
v-for="(item, index) in formAttrList"
:key="index"
@click="item.fn"
>
<u-input
v-if="item.type === 'input'"
v-model="(model1.formData as any)[item.key]"
:placeholder="`请输入${item.name}`"
clearable
:customStyle="{}"
border="none"
:disabled="item.disabled"
:type="['contactPhone'].indexOf(item.key) > -1 ? 'number' : 'text'"
>
<template #suffix>
<text v-if="item.unit">
{{ item.unit }}
</text>
</template>
</u-input>
<u-input
v-if="item.type === 'select'"
:disabled="true"
:disabledColor="'#ffffff'"
v-model="(model1.formData as any)[item.key]"
:placeholder="`请选择${item.name}`"
clearable
:customStyle="{}"
border="none"
>
<template #suffix>
<text v-if="item.unit">
{{ item.unit }}
</text>
</template>
</u-input>
<template #right v-if="item.type === 'select'">
<u-icon name="arrow-right" @click="item.fn"></u-icon>
</template>
</u-form-item>
</u-form>
</uni-card>
<view class="btn-box-fix-btn">
<view
><u-button type="primary" shape="circle" @click="save"
>保存</u-button
></view
>
</view>
</template>
<script setup lang="ts">
import { UserApi } from "@/services";
import pinia from "@/store";
import { useMemberStore } from "@/store/index";
import { onMounted } from "vue";
const store = useMemberStore(pinia);
const model1 = reactive<any>({
formData: {},
});
const formAttrList = reactive<any>([
{
name: "收款账号",
key: "paymentAccount",
type: "input",
required: true,
unit: "",
},
{
name: "收款名称",
key: "paymentName",
type: "input",
required: true,
unit: "",
},
{
name: "开户行",
key: "bankName",
type: "input",
required: true,
unit: "",
},
]);
const rules = reactive({
"formData.paymentAccount": {
type: "string",
required: true,
message: "请输入收款账号",
trigger: ["blur", "change"],
},
"formData.paymentName": {
type: "string",
required: true,
message: "请输入收款名称",
trigger: ["blur", "change"],
},
"formData.bankName": {
type: "string",
required: true,
message: "请输入开户行",
trigger: ["blur", "change"],
},
});
/**
* 校验
*/
const form = ref();
const check = () => {
return new Promise((resolve) => {
form.value
.validate()
.then((res: boolean) => {
resolve(res);
})
.catch((errors: any) => {
resolve(false);
uni.showToast({
icon: "none",
title: errors[0].message || "校验失败",
});
});
});
};
const save = () => {
check().then((res) => {
if (res) {
startSave();
}
});
// if (store.profile?.token) {
// check().then((res) => {
// if (res) {
// startSave();
// }
// });
// } else {
// uni.login({
// provider: "toutiao",
// success: function (loginRes) {
// UserApi.login({ code: loginRes.code }).then((res) => {
// });
// },
// });
// }
};
const startSave = () => {
UserApi.updatePay(model1.formData).then((res) => {
if (res.code === 200) {
uni.showToast({
title: "提交成功",
});
uni.navigateBack();
}
});
};
onMounted(() => {
UserApi.getPayInfo({}).then((res) => {
if (res.code === 200) {
if (res.data) {
model1.formData = res.data;
}
}
});
});
</script>
<style lang="scss" scoped>
::v-deep .uni-card__content {
padding: 20rpx !important;
height: calc(100vh - 200px);
overflow: auto;
}
::v-deep .uni-card--shadow {
padding: 0px !important;
}
::v-deep .u-form-item {
height: auto;
border-bottom: 1rpx solid rgba(233, 233, 233, 0.76);
margin: 0px 20rpx;
padding: 0px 20rpx;
}
.title {
font-weight: 500;
font-size: 32rpx;
color: #000000;
}
.btn-box-fix-btn {
justify-content: center;
view {
width: 70%;
}
}
</style>

View File

@ -0,0 +1,224 @@
<template>
<view>
<!-- <view class="filter">
<view @click="handleSort"
>创建时间<u-icon :name="state.isUp ? 'arrow-up' : 'arrow-down'"></u-icon
></view>
<view @click="state.isShowStatus = true"
>状态<u-icon name="arrow-down"></u-icon
></view>
<view style="width: 65%" @click="state.showTime = true">
<u-input
v-model="state.startTime"
disabled
disabledColor=""
placeholder="开始时间"
></u-input>
<text>-</text>
<u-input
v-model="state.endTime"
disabled
disabledColor=""
placeholder="结束时间"
></u-input>
<u-icon name="arrow-down"></u-icon>
</view>
</view> -->
<page-view
@loadList="
(v) => {
getList(v);
}
"
:noMoreData="pageList.noMoreData"
:list="pageList.list"
:height="150"
:isLoading="pageList.isLoading"
>
<view class="box">
<scroll-view scroll-x class="scroll-view">
<uni-table stripe emptyText="">
<!-- 表头行 -->
<uni-tr>
<uni-th v-for="(item, index) in tableTitleList" :key="index"
>{{ item.name }}
</uni-th>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="(item, index) in pageList.list" :key="index">
<uni-td v-for="(tItem, index) in tableTitleList" :key="index">
<view>
<text v-if="tItem.key === 'status'">
{{ item[tItem.key] ? "已处理" : "未处理" }}
</text>
<text v-else>
{{ item[tItem.key] }}
</text>
</view></uni-td
>
<!-- <uni-td>
<text class="btn" @click="handleCancel(item)"> 撤销 </text>
</uni-td> -->
</uni-tr>
</uni-table>
</scroll-view>
</view>
</page-view>
<view class="btn-box-fix-btn">
<view
><u-button type="primary" shape="circle" @click="goInquiry()"
>加入我们</u-button
>
</view>
</view>
<!-- 状态 -->
<!-- <u-action-sheet
:closeOnClickOverlay="true"
:closeOnClickAction="true"
:actions="actionSheet.statusList"
:title="'单据状态'"
:show="state.isShowStatus"
@select="handleSelectStatus"
@close="state.isShowStatus = false"
></u-action-sheet>
<TimeRangeFilter
:show="state.showTime"
@handleDialog="(v:boolean) => {state.showTime = v}"
@handleOk="changeTime"
/> -->
</view>
</template>
<script setup lang="ts">
import PageView from "@/components/PageView/index.vue";
import TimeRangeFilter from "@/components/Dialog/TimeRangeFilter.vue";
import { SteelApi } from "@/services";
import pinia from "@/store";
import { useMemberStore } from "@/store/index";
import { onLoad, onShow } from "@dcloudio/uni-app";
const state = reactive({
startTime: "",
endTime: "",
showTime: false,
status: -1,
isShowStatus: false,
isUp: false,
});
const pageList: PageResult<any> = reactive({
total: 0,
list: [],
pageNum: 1,
pageSize: 100,
});
const resetPageList = () => {
pageList.noMoreData = false;
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 100;
};
const tableTitleList = reactive([
{
name: "时间",
key: "createdTime",
},
{
name: "状态",
key: "status",
},
{
name: "公司名称",
key: "companyName",
},
]);
const goInquiry = () => {
uni.navigateTo({
url: "/pagesScrapSteel/registration", //
});
};
const getList = (v?: boolean) => {
if (v) {
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
pageList.pageNum++;
} else {
pageList.noMoreData = true;
return;
}
}
let params: any = {
pageSize: pageList.pageSize,
pageNum: pageList.pageNum,
};
pageList.isLoading = true;
SteelApi.getApplyList(params).then((res: any) => {
if (res.code === 200) {
pageList.isLoading = false;
pageList.list = pageList.list = pageList.list.concat(res.data.list);
pageList.total = res.data.total;
}
});
};
// function goDetail(item: any) {
// uni.navigateTo({
// url: "/pagesOrder/vehicle/detail?id=" + item.id + `&status=${item.status}`,
// });
// }
onShow(() => {
resetPageList()
getList();
})
</script>
<style lang="scss" scoped>
.filter {
display: flex;
justify-content: space-around;
font-size: 28rpx;
padding: 10rpx 20rpx;
> view {
display: flex;
align-items: center;
}
::v-deep.u-input__content__field-wrapper__field {
font-size: 14px !important;
}
}
.box {
padding: 28rpx 20rpx;
.btn {
color: $u-primary;
}
.scroll-view {
white-space: nowrap;
width: 100%;
overflow: auto;
}
::v-deep.uni-table {
min-width: 300px !important;
}
}
.btn-box-fix-btn {
justify-content: center;
view {
width: 70%;
}
}
.regis {
font-size: 12px;
text-align: center;
padding-top: 15px;
width: 100% !important;
color: $u-primary;
font-weight: bold;
}
</style>

View File

@ -225,9 +225,7 @@ const getList = (v?: boolean) => {
params.startTime = state.startTime;
params.endTime = state.endTime;
}
if (state.isUp) {
params.isUp = state.isUp;
}
params.isUp = state.isUp;
pageList.isLoading = true;
VehicleApi.getRegisList(params).then((res: any) => {
if (res.code === 200) {

View File

@ -77,7 +77,7 @@
>
</view>
</uni-card>
<OpOnline/>
<OpOnline />
</view>
</template>
@ -85,6 +85,9 @@
import CustomSwiper from "@/components/CustomSwiper/index.vue";
import OpOnline from "@/components/OpOnline/index.vue";
import { url } from "@/utils/data";
import { useMemberStore } from "@/store/index";
import pinia from "@/store";
const store = useMemberStore(pinia);
const bannerList = [
{
imgUrl: "v-a1.png",
@ -180,6 +183,14 @@ const questionList = ref([
]);
const handleClick = (item: any) => {
if (item.name === "我要询价" || item.name === "我要登记") {
if (!store.profile.token) {
uni.navigateTo({
url: '/pagesLogin/index', //
});
return
}
}
uni.navigateTo({
url: item.url, //
});

View File

@ -258,7 +258,7 @@
contentTextAlign="center"
>
<view>
<view class="price"> {{totalPrice}}</view>
<view class="price"> {{ totalPrice }}</view>
<view class="tip">
该价格为参考价格实际价格根据过磅重量进行结算</view
>
@ -820,7 +820,24 @@ const beforeSave = () => {
check().then((res) => {
if (res) {
// startSave();
isShowPrice.value = true;
//
VehicleApi.queryPrice({ name: model1.formData.wheelMaterial }).then(
(res: any) => {
if (res.code === 200) {
if (res.data) {
isShowPrice.value = true;
totalPrice.value = parseInt(
(res.data.price * model1.formData.totalWeight).toFixed(0)
);
} else {
uni.showToast({
icon: "none",
title: "当前材质未定价,联系人工客服处理",
});
}
}
}
);
}
});
};
@ -863,7 +880,7 @@ const startSave = (type: number) => {
...model1.formData,
ownerType: model1.formData.ownerType === "个人",
status: 1, //
totalPrice: totalPrice.value
totalPrice: totalPrice.value,
}).then((res) => {
if (res.code === 200) {
uni.showToast({

View File

@ -826,7 +826,7 @@ const startSave = () => {
uni.showToast({
title: "提交成功",
});
uni.navigateBack();
uni.redirectTo({ url: '/pagesVehicle/index' });
}
});
};

View File

@ -20,6 +20,24 @@ export const addRegis = (data: any) => {
});
};
export const queryInquiry = (data: any) => {
return http({
method: "GET",
url: "/api/v1/batteryInquiry/findPage",
data,
});
};
export const queryRegis = (data: any) => {
return http({
method: "GET",
url: "/api/v1/batteryRegistration/findPage",
data,
});
};

View File

@ -4,10 +4,11 @@ import { http } from "@/utils/http";
// 新增咨询
export const upload = (data: any) => {
return http({
method: "POST",
header: {type: 'UPLOAD'},
url: "/api/v1/upload/file/upload?front=" + data.front,
url: "/api/v1/upload/file/upload" + `${data.front !== undefined ? `?front=${data.front}` : ''}`,
data,
});
};

View File

@ -12,6 +12,15 @@ export const add = (data: any) => {
};
export const getApplyList = (data: any) => {
return http({
method: "GET",
url: "/api/v1/trialApplication/findPage",
data,
});
};

View File

@ -11,6 +11,62 @@ export const login = (data: any) => {
});
};
export const addPay = (data: any) => {
return http({
method: "POST",
url: "/api/paymentInfo/insert",
data,
});
};
export const sendMsg = (data: any) => {
return http({
method: "GET",
url: "/api/admin/sendMsg",
data,
});
};
export const loginPhone = (data: any) => {
return http({
method: "GET",
url: "/api/admin/loginPhone",
data,
});
};
export const getPayInfo = (data: any) => {
return http({
method: "GET",
url: "/api/paymentInfo/findById",
data,
});
};
export const updatePay = (data: any) => {
return http({
method: "PUT",
url: "/api/paymentInfo",
data,
});
};
export const logOut = (data: any) => {
return http({
method: "POST",
url: "/api/admin/logOut",
data,
});
};

View File

@ -70,6 +70,16 @@ export const getDetail = (data: any) => {
});
};
export const queryPrice = (data: any) => {
return http({
method: "GET",
url: "/api/quote/findByName",
data,
});
};

View File

@ -96,8 +96,10 @@ export const http = <T>(options: UniApp.RequestOptions) => {
} else {
console.log(options)
uni.request({
...options,
data: Object.assign({...(options as any).data}, {isUser: true}),
dataType: "string", //1.先将dataType设置为string
success(res) {
var json = (res.data as any).replace(
@ -117,7 +119,7 @@ export const http = <T>(options: UniApp.RequestOptions) => {
});
store.clearProfile();
uni.reLaunch({
url: "/pagesLogin/login/index",
url: "/pagesLogin/index",
});
return;
} else if ([500, 5001, 10001].indexOf(res1.code) > -1) {