Revert "update: 增加启动页优化"

This reverts commit 5743217148.
This commit is contained in:
admin 2024-05-06 11:10:27 +08:00
parent 5743217148
commit 22180697ec
13 changed files with 1207 additions and 1362 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app"; import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
const isFirstLaunch = ref(true);
onLaunch(() => { onLaunch(() => {
console.log(uni.getStorageSync("hasLaunched")) console.log("App Launch");
//
if (Boolean(uni.getStorageSync("hasLaunched"))) {
//
isFirstLaunch.value = false;
console.log('不再显示启动页')
} else {
//
uni.setStorageSync("hasLaunched", true);
uni.redirectTo({url: 'pagesLaunch/index'})
}
}); });
onShow(() => { onShow(() => {
console.log("App Show"); console.log("App Show");
@ -23,9 +12,9 @@ onHide(() => {
</script> </script>
<style lang="scss"> <style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */ /* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "uview-plus/index.scss"; @import "uview-plus/index.scss";
body { body {
font-size: 12px; font-size: 12px;
} }
</style> </style>

View File

@ -1,19 +1,19 @@
<template> <template>
<view class="layout-box"> <view class="layout-box">
<view class="filter"> <view class="filter">
<u-input <up-input
v-model="state.startTime" v-model="state.startTime"
disabled disabled
disabledColor="" disabledColor=""
placeholder="请选择开始时间" placeholder="请选择开始时间"
></u-input> ></up-input>
<text>-</text> <text>-</text>
<u-input <up-input
v-model="state.endTime" v-model="state.endTime"
disabled disabled
disabledColor="" disabledColor=""
placeholder="请选择结束时间" placeholder="请选择结束时间"
></u-input> ></up-input>
<u-icon <u-icon
name="arrow-down" name="arrow-down"
@click="handleDialog('showTime', true)" @click="handleDialog('showTime', true)"
@ -63,7 +63,7 @@
<view class="num highlight">{{ <view class="num highlight">{{
formatMoney(state.summary.totalPayment) formatMoney(state.summary.totalPayment)
}}</view> }}</view>
<view>付款金额/</view> <view>结算金额/</view>
</view> </view>
</up-col> </up-col>
<up-col span="4"> <up-col span="4">
@ -71,7 +71,7 @@
<view class="num">{{ <view class="num">{{
formatMoney(state.summary.totalPaidPrice) formatMoney(state.summary.totalPaidPrice)
}}</view> }}</view>
<view>金额</view> <view>金额</view>
</view> </view>
</up-col> </up-col>
<up-col span="4"> <up-col span="4">
@ -269,7 +269,7 @@ onMounted(() => {
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-size: 28rpx; font-size: 28rpx;
color: #000000; color: #000000;
::v-deep .u-input { ::v-deep .up-input {
padding: 0rpx 16.03rpx !important; padding: 0rpx 16.03rpx !important;
input { input {
font-family: Source Han Sans CN; font-family: Source Han Sans CN;

View File

@ -1,19 +1,19 @@
<template> <template>
<view class="layout-box"> <view class="layout-box">
<view class="filter"> <view class="filter">
<u-input <up-input
v-model="state.startTime" v-model="state.startTime"
disabled disabled
disabledColor="" disabledColor=""
placeholder="请选择开始时间" placeholder="请选择开始时间"
></u-input> ></up-input>
<text>-</text> <text>-</text>
<u-input <up-input
v-model="state.endTime" v-model="state.endTime"
disabled disabled
disabledColor="" disabledColor=""
placeholder="请选择结束时间" placeholder="请选择结束时间"
></u-input> ></up-input>
<u-icon <u-icon
name="arrow-down" name="arrow-down"
@click="handleDialog('showTime', true)" @click="handleDialog('showTime', true)"
@ -266,7 +266,7 @@ onMounted(() => {
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-size: 28rpx; font-size: 28rpx;
color: #000000; color: #000000;
::v-deep .u-input { ::v-deep .up-input {
padding: 0rpx 16.03rpx !important; padding: 0rpx 16.03rpx !important;
input { input {
font-family: Source Han Sans CN; font-family: Source Han Sans CN;

View File

@ -1,7 +1,7 @@
{ {
"name": "在生万有", "name": "",
// DCloud ios // DCloud ios
"appid": "__UNI__898003A", "appid": "",
"description": "", "description": "",
"versionName": "1.0.0", "versionName": "1.0.0",
"versionCode": "100", "versionCode": "100",

View File

@ -20,24 +20,10 @@
><u-icon name="arrow-down"></u-icon ><u-icon name="arrow-down"></u-icon
></view> ></view>
<view @click="state.isShowStatus = true" <view @click="state.isShowStatus = true"
><text>{{ ><text>单据状态</text><u-icon name="arrow-down"></u-icon
state.currentScaleStatus === -1
? "单据状态"
: getScaleStatus(state.currentScaleStatus)
}}</text
><u-icon name="arrow-down"></u-icon
></view> ></view>
<view @click="state.isShowSort = true" <view @click="state.isShowSort = true"
><text>{{ ><text>排序</text><u-icon name="arrow-down"></u-icon
state.currentSortName === undefined
? "排序"
: `${
state.currentSortName === "create_time"
? "创建时间"
: "更新时间"
}降序`
}}</text
><u-icon name="arrow-down"></u-icon
></view> ></view>
<view class="btn" @click="handleDialog('showFilter', true)">筛选</view> <view class="btn" @click="handleDialog('showFilter', true)">筛选</view>
</view> </view>
@ -215,10 +201,6 @@ const state = reactive({
], ],
isShowSort: false, isShowSort: false,
sortList: [ sortList: [
{
name: "全部",
key: undefined,
},
{ {
name: "按创建时间降序", name: "按创建时间降序",
key: "create_time", key: "create_time",

View File

@ -32,12 +32,7 @@
:customStyle="{}" :customStyle="{}"
border="none" border="none"
:disabled="item.disabled || item.type === 'select'" :disabled="item.disabled || item.type === 'select'"
:disabledColor=" :disabledColor="['补单时间','站点磅秤','供应商','收货产品'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
['补单时间', '站点磅秤', '供应商', '收货产品'].indexOf(item.name) >
-1
? '#ffffff'
: '#f5f7fa'
"
@change="(e:any) => {handleInput(e, item)}" @change="(e:any) => {handleInput(e, item)}"
@clear="handleClear(item)" @clear="handleClear(item)"
> >
@ -52,16 +47,6 @@
</up-input> </up-input>
<!-- @afterRead="afterRead" <!-- @afterRead="afterRead"
@delete="deletePic" --> @delete="deletePic" -->
<!-- <up-upload
v-if="item.type === 'upload'"
:fileList="model1.order.fileLists"
@delete="handleDelete"
name="1"
multiple
:maxCount="10"
></up-upload> -->
<uni-file-picker <uni-file-picker
v-if="item.type === 'upload'" v-if="item.type === 'upload'"
v-model="model1.order.fileLists" v-model="model1.order.fileLists"
@ -146,9 +131,9 @@ import SupplierDialog from "./components/SupplierDialog.vue";
import ProductDialog from "./components/ProductDialog.vue"; import ProductDialog from "./components/ProductDialog.vue";
import valid from "@/utils/validate"; import valid from "@/utils/validate";
const handleClear = (item: any) => { const handleClear = (item:any) => {
(model1.order as any)[item.key] = ""; (model1.order as any)[item.key] = '';
}; }
// //
const showDialog = < const showDialog = <
{ {
@ -241,7 +226,7 @@ const model1 = reactive<any>({
splTime: "", splTime: "",
subtractType: 1, subtractType: 1,
netWeight: 0, netWeight: 0,
totalPrice: 0, totalPrice: 0
}, },
}); });
const rules = reactive({ const rules = reactive({
@ -451,9 +436,7 @@ watch(
预估总价 结算单价*结算重量 预估总价 结算单价*结算重量
实际收入实际结算金额-运费-杂费 实际收入实际结算金额-运费-杂费
*/ */
model1.order.netWeight = ( model1.order.netWeight = ((parseFloat(grossWeightNew) || 0) - (parseFloat(tareNew) || 0)).toFixed(2);
(parseFloat(grossWeightNew) || 0) - (parseFloat(tareNew) || 0)
).toFixed(2);
if (model1.order.buttonType === 0) { if (model1.order.buttonType === 0) {
if (model1.order.subtractNum) { if (model1.order.subtractNum) {
model1.order.netWeight = model1.order.netWeight =
@ -616,7 +599,7 @@ const startSave = () => {
if (res.code === 200) { if (res.code === 200) {
model1.order.id = res.data; model1.order.id = res.data;
upload(); upload();
uni.navigateBack(); uni.navigateBack()
} }
}); });
}; };

View File

@ -20,24 +20,10 @@
><u-icon name="arrow-down"></u-icon ><u-icon name="arrow-down"></u-icon
></view> ></view>
<view @click="state.isShowStatus = true" <view @click="state.isShowStatus = true"
><text>{{ ><text>单据状态</text><u-icon name="arrow-down"></u-icon
state.currentScaleStatus === -1
? "单据状态"
: getScaleStatus(state.currentScaleStatus)
}}</text
><u-icon name="arrow-down"></u-icon
></view> ></view>
<view @click="state.isShowSort = true" <view @click="state.isShowSort = true"
><text>{{ ><text>排序</text><u-icon name="arrow-down"></u-icon
state.currentSortName === undefined
? "排序"
: `${
state.currentSortName === "create_time"
? "创建时间"
: "更新时间"
}降序`
}}</text
><u-icon name="arrow-down"></u-icon
></view> ></view>
<view class="btn" @click="handleDialog('showFilter', true)">筛选</view> <view class="btn" @click="handleDialog('showFilter', true)">筛选</view>
</view> </view>
@ -106,14 +92,8 @@
<text v-if="cItem.name">{{ cItem.name }}</text <text v-if="cItem.name">{{ cItem.name }}</text
><text ><text
>{{ cItem.isBefore ? cItem.unit : "" }} >{{ cItem.isBefore ? cItem.unit : "" }}
<text <text v-if="item[cItem.enName as string] === DeliveryMethod.Deliver">送货</text>
v-if="item[cItem.enName as string] === DeliveryMethod.Deliver" <text v-if="item[cItem.enName as string] === DeliveryMethod.SelfPickup">自提</text>
>送货</text
>
<text
v-if="item[cItem.enName as string] === DeliveryMethod.SelfPickup"
>自提</text
>
{{ cItem.isBefore ? "" : cItem.unit }} {{ cItem.isBefore ? "" : cItem.unit }}
</text> </text>
</block> </block>
@ -230,10 +210,6 @@ const state = reactive({
], ],
isShowSort: false, isShowSort: false,
sortList: [ sortList: [
{
name: "全部",
key: undefined,
},
{ {
name: "按创建时间降序", name: "按创建时间降序",
key: "create_time", key: "create_time",

View File

@ -10,9 +10,7 @@
> >
<swiper-item v-for="(item, index) in list" :key="index"> <swiper-item v-for="(item, index) in list" :key="index">
<view class="image-box"> <view class="image-box">
<image <image :src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLaunch/${item.imgUrl}`"></image>
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLaunch/${item.imgUrl}`"
></image>
<view class="title"> <view class="title">
{{ item.title }} {{ item.title }}
</view> </view>
@ -24,9 +22,6 @@
</swiper> </swiper>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useMemberStore } from "@/store/index";
const store = useMemberStore();
const profile = store.profile;
const list = [ const list = [
{ {
title: "智能回收 智慧未来!", title: "智能回收 智慧未来!",
@ -46,16 +41,9 @@ const list = [
}, },
]; ];
const start = () => { const start = () => {
// token
if (profile.token) {
uni.navigateTo({
url: "/pagesHome/index", //
});
} else {
uni.navigateTo({ uni.navigateTo({
url: "/pagesLogin/login/index", // url: "/pagesLogin/login/index", //
}); });
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -13,8 +13,8 @@
:key="index" :key="index"
:prop="`userInfo.${item.modelName}`" :prop="`userInfo.${item.modelName}`"
> >
<u-input <view v-if="item.type === 'text'">
v-if="item.type === 'text'" <up-input
v-model="model1.userInfo[`${item.modelName}`]" v-model="model1.userInfo[`${item.modelName}`]"
:placeholder="item.placeholder" :placeholder="item.placeholder"
:shape="'circle'" :shape="'circle'"
@ -41,10 +41,10 @@
> >
</text> </text>
</template> </template>
</u-input> </up-input>
</view>
<u-input <view v-if="item.type === 'password'">
v-if="item.type === 'password'" <up-input
v-model="model1.userInfo[`${item.modelName}`]" v-model="model1.userInfo[`${item.modelName}`]"
:placeholder="item.placeholder" :placeholder="item.placeholder"
:shape="'circle'" :shape="'circle'"
@ -73,7 +73,8 @@
@click="item.isShowPwd = false" @click="item.isShowPwd = false"
></image> ></image>
</template> </template>
</u-input> </up-input>
</view>
</u-form-item> </u-form-item>
</u-form> </u-form>
@ -84,7 +85,7 @@
:customStyle="{ :customStyle="{
'border-radius': '43rpx', 'border-radius': '43rpx',
}" }"
>保存</u-button >保存并登录</u-button
> >
</view> </view>
</template> </template>
@ -95,9 +96,9 @@
import { ProfileApi } from "@/services/index"; import { ProfileApi } from "@/services/index";
import LoginLayout from "./components/loginLayout.vue"; import LoginLayout from "./components/loginLayout.vue";
import valid from "@/utils/validate"; import valid from "@/utils/validate";
const handleClear = (item: any) => { const handleClear = (item:any) => {
(model1.userInfo as any)[item.modelName] = ""; (model1.userInfo as any)[item.modelName] = '';
}; }
const loginForm = ref(null); const loginForm = ref(null);
const model1 = <any>reactive({ const model1 = <any>reactive({
userInfo: { userInfo: {

View File

@ -14,23 +14,6 @@
<view class="u-page"> <view class="u-page">
<u-list :height="'auto'"> <u-list :height="'auto'">
<u-list-item v-for="(item, index) in pageList.list" :key="index"> <u-list-item v-for="(item, index) in pageList.list" :key="index">
<!-- #ifdef H5 -->
<view class="msg-content">
<view class="u-slot-title" @click="handleItem(item)">
<view>
<view class="u-cell-text title"
>{{ item.title }}
<text class="title-badge" v-if="item.status === 0"> </text>
</view>
<view class="u-cell-text desc">{{ item.content }}</view>
</view>
</view>
<view>
<text class="u-slot-value time">{{ item.createTime }}</text>
</view>
</view>
<!-- #endif -->
<!-- #ifdef APP-PLUS || MP-WEIXIN -->
<u-cell @click="handleItem(item)"> <u-cell @click="handleItem(item)">
<view slot="title" class="u-slot-title"> <view slot="title" class="u-slot-title">
<view> <view>
@ -41,12 +24,10 @@
<view class="u-cell-text desc">{{ item.content }}</view> <view class="u-cell-text desc">{{ item.content }}</view>
</view> </view>
</view> </view>
<template #value> <template #value>
<text class="u-slot-value time">{{ item.createTime }}</text> <text class="u-slot-value time">{{ item.createTime }}</text>
</template> </template>
</u-cell> </u-cell>
<!-- #endif -->
</u-list-item> </u-list-item>
</u-list> </u-list>
</view> </view>
@ -127,17 +108,11 @@ const handleItem = (item: any) => {
}); });
return; return;
} else { } else {
if ( if (res.data.list[0].scaleStatus === ScaleStatus.ToBePriced && MsgType.ToBePriced === item.msgType) {
res.data.list[0].scaleStatus === ScaleStatus.ToBePriced &&
MsgType.ToBePriced === item.msgType
) {
uni.navigateTo({ uni.navigateTo({
url: "/pagesReceive/pricing?scaleStatus=0", // url: "/pagesReceive/pricing?scaleStatus=0", //
}); });
} else if ( } else if (res.data.list[0].scaleStatus === ScaleStatus.ToBeReview && MsgType.ToBeReview === item.msgType) {
res.data.list[0].scaleStatus === ScaleStatus.ToBeReview &&
MsgType.ToBeReview === item.msgType
) {
uni.navigateTo({ uni.navigateTo({
url: "/pagesReceive/payReview?scaleStatus=2", // url: "/pagesReceive/payReview?scaleStatus=2", //
}); });
@ -167,16 +142,12 @@ const handleItem = (item: any) => {
}); });
return; return;
} else { } else {
if ( if (res.data.list[0].scaleStatus === ScaleStatus.ToBeShipment && MsgType.ToBeShipment === item.msgType) {
res.data.list[0].scaleStatus === ScaleStatus.ToBeShipment &&
MsgType.ToBeShipment === item.msgType
) {
uni.navigateTo({ uni.navigateTo({
url: "/pagesShipment/shipmenting?scaleStatus=0", // url: "/pagesShipment/shipmenting?scaleStatus=0", //
}); });
} else if ( } else if (
res.data.list[0].scaleStatus === ScaleStatus.ToBeShipmentReview && res.data.list[0].scaleStatus === ScaleStatus.ToBeShipmentReview && MsgType.ToBeShipmentReview === item.msgType
MsgType.ToBeShipmentReview === item.msgType
) { ) {
uni.navigateTo({ uni.navigateTo({
url: "/pagesShipment/shipmentSettlement?scaleStatus=2", // url: "/pagesShipment/shipmentSettlement?scaleStatus=2", //
@ -231,11 +202,5 @@ onMounted(() => {
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
} }
// h5
.msg-content {
padding: 30rpx;
border-bottom: 1px solid rgba(0,0,0, 0.2);
}
} }
</style> </style>

View File

@ -61,9 +61,7 @@
</view> </view>
<view class="more"> <view class="more">
<view v-if="getIsShow()"> <view v-if="getIsShow()"> 收货单号{{ state.order.receiptNumber }} </view>
收货单号{{ state.order.receiptNumber }}
</view>
<view v-if="getIsShow()"></view> <view v-if="getIsShow()"></view>
<view v-for="(item, index) in gridList1" :key="index"> <view v-for="(item, index) in gridList1" :key="index">
<text v-if="item.name">{{ item.name }}</text <text v-if="item.name">{{ item.name }}</text
@ -72,10 +70,7 @@
{{ item.num }} {{ item.num }}
{{ item.isBefore ? "" : item.unit }} {{ item.isBefore ? "" : item.unit }}
<text <text
v-if=" v-if="item.name === '货款金额' && ScaleStatus.ToBeReview === state.order.scaleStatus"
item.name === '货款金额' &&
ScaleStatus.ToBeReview === state.order.scaleStatus
"
@click="handleEdit()" @click="handleEdit()"
:style="{ :style="{
color: 'rgba(0, 220, 238, 1)', color: 'rgba(0, 220, 238, 1)',
@ -83,7 +78,7 @@
'border-radius': '20rpx', 'border-radius': '20rpx',
fontSize: '12px', fontSize: '12px',
padding: '1px 10px', padding: '1px 10px',
marginLeft: '10rpx', marginLeft: '10rpx'
}" }"
> >
编辑 编辑
@ -220,7 +215,7 @@ const state = reactive<{
[attrName: string]: any; [attrName: string]: any;
}>({ }>({
order: { order: {
carNumber: "", carNumber: ''
}, },
sheetList: [ sheetList: [
{ {
@ -294,9 +289,7 @@ const handleScenePhoto = (id: any) => {
}; };
// // 3 // // 3
const handleReviewNoPay = () => { const handleReviewNoPay = () => {
ReceiveApi.updateOrderIn({ ReceiveApi.updateOne({ ...state.order, scaleStatus: 3 }).then((res) => {
orderInPos: [{ ...state.order, scaleStatus: 3 }],
}).then((res) => {
if (res.code === 200) { if (res.code === 200) {
uni.redirectTo({ uni.redirectTo({
url: "/pagesReceive/payReview?scaleStatus=3", // url: "/pagesReceive/payReview?scaleStatus=3", //
@ -334,15 +327,10 @@ const handleSelect = (key: string, v: any) => {
contrlModalParams[key].isShow = false; contrlModalParams[key].isShow = false;
if (key === "paySelect") { if (key === "paySelect") {
// //
ReceiveApi.updateOne({
ReceiveApi.updateOrderIn({
orderInPos: [
{
...state.order, ...state.order,
scaleStatus: 4, scaleStatus: 4,
paymentMethod: v.key, paymentMethod: v.key,
},
],
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
uni.showToast({ uni.showToast({
@ -381,11 +369,7 @@ const handleUpdateOrder = () => {
}; };
// //
const handleReWeight = () => { const handleReWeight = () => {
ReceiveApi.reTare({ ReceiveApi.reTare({ id: state.order.id, userId: state.order.userId, deviceId: state.order.deviceId }).then((res) => {
id: state.order.id,
userId: state.order.userId,
deviceId: state.order.deviceId,
}).then((res) => {
if (res.code === 200) { if (res.code === 200) {
uni.redirectTo({ uni.redirectTo({
url: "/pagesReceive/pricing?scaleStatus=1", // url: "/pagesReceive/pricing?scaleStatus=1", //
@ -403,7 +387,7 @@ onLoad((option) => {
ReceiveApi.getDetailById({ id: state.order.id }).then((res) => { ReceiveApi.getDetailById({ id: state.order.id }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
state.order = res.data; state.order = res.data;
gridList1.map((item: any) => { gridList1.map((item:any) => {
if (item.name === "扣杂" || item.name === "扣点") { if (item.name === "扣杂" || item.name === "扣点") {
if (state.order.buttonType === 0) { if (state.order.buttonType === 0) {
item.name = "扣杂"; item.name = "扣杂";
@ -419,11 +403,12 @@ onLoad((option) => {
if (state.order[item.enName as string]) { if (state.order[item.enName as string]) {
item.num = state.order[item.enName as string]; item.num = state.order[item.enName as string];
} else { } else {
item.num = state.order["totalPrice"]; item.num = state.order['totalPrice'];
} }
} else { } else {
item.num = state.order[item.enName as string]; item.num = state.order[item.enName as string];
} }
}); });
} }
}); });

View File

@ -2,7 +2,7 @@
"extends": "@vue/tsconfig/tsconfig.json", "extends": "@vue/tsconfig/tsconfig.json",
"compilerOptions": { "compilerOptions": {
"ignoreDeprecations": "5.0", "ignoreDeprecations": "5.0",
"sourceMap": false, "sourceMap": true,
"baseUrl": "./", "baseUrl": "./",
"paths": { "paths": {
"@/*": ["src/*"] "@/*": ["src/*"]