update: 优化细节
This commit is contained in:
parent
b0e31d9d9e
commit
a761ecbeba
22
src/App.vue
22
src/App.vue
|
@ -1,7 +1,19 @@
|
||||||
<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("App Launch");
|
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");
|
||||||
|
@ -12,9 +24,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>
|
||||||
|
|
|
@ -30,12 +30,14 @@ const props = withDefaults(
|
||||||
show: false
|
show: false
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const emit = defineEmits(["handleModal", "handleOk"]);
|
const emit = defineEmits(["handleModal", "handleOk", "handleCancel"]);
|
||||||
const handleClose = (v: string) => {
|
const handleClose = (v: string) => {
|
||||||
emit("handleModal", false);
|
emit("handleModal", false);
|
||||||
if (v === 'ok') {
|
if (v === 'ok') {
|
||||||
// 走确认操作
|
// 走确认操作
|
||||||
emit("handleOk");
|
emit("handleOk");
|
||||||
|
} else {
|
||||||
|
emit("handleCancel")
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,85 +1,96 @@
|
||||||
{
|
{
|
||||||
"name": "",
|
"name" : "在生万有",
|
||||||
// 应用标识 由DCloud 云端分配 (安卓 ios)
|
// 应用标识 由DCloud 云端分配 (安卓 ios)
|
||||||
"appid": "",
|
"appid" : "__UNI__898003A",
|
||||||
"description": "",
|
"description" : "",
|
||||||
"versionName": "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode": "100",
|
"versionCode" : "100",
|
||||||
"transformPx": false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus": {
|
"app-plus" : {
|
||||||
"usingComponents": true,
|
"ignoreVersion": false,
|
||||||
"nvueStyleCompiler": "uni-app",
|
"usingComponents" : true,
|
||||||
"compilerVersion": 3,
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"splashscreen": {
|
"compilerVersion" : 3,
|
||||||
"alwaysShowBeforeRender": true,
|
"splashscreen" : {
|
||||||
"waiting": true,
|
"alwaysShowBeforeRender" : true,
|
||||||
"autoclose": true,
|
"waiting" : true,
|
||||||
"delay": 0
|
"autoclose" : true,
|
||||||
|
"delay" : 0
|
||||||
|
},
|
||||||
|
/* 模块配置 */
|
||||||
|
"modules" : {},
|
||||||
|
/* 应用发布信息 */
|
||||||
|
"distribute" : {
|
||||||
|
/* android打包配置 */
|
||||||
|
"android" : {
|
||||||
|
"permissions" : [
|
||||||
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
/* ios打包配置 */
|
||||||
|
"ios" : {
|
||||||
|
"dSYMs" : false
|
||||||
|
},
|
||||||
|
/* SDK配置 */
|
||||||
|
"sdkConfigs" : {
|
||||||
|
"ad" : {}
|
||||||
|
},
|
||||||
|
"icons" : {
|
||||||
|
"android" : {
|
||||||
|
"hdpi" : "/Users/admin/workspace/aifanda/project/在生万有/logo 72 x 72.png",
|
||||||
|
"xhdpi" : "/Users/admin/workspace/aifanda/project/在生万有/logo 96 x 96.png",
|
||||||
|
"xxhdpi" : "/Users/admin/workspace/aifanda/project/在生万有/logo 144 x144.png",
|
||||||
|
"xxxhdpi" : "/Users/admin/workspace/aifanda/project/在生万有/logo 192 x192.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
/* 快应用特有相关 */
|
||||||
"modules": {},
|
"quickapp" : {},
|
||||||
/* 应用发布信息 */
|
// h5
|
||||||
"distribute": {
|
"h5" : {
|
||||||
/* android打包配置 */
|
"router" : {
|
||||||
"android": {
|
"base" : "./"
|
||||||
"permissions": [
|
}
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* ios打包配置 */
|
|
||||||
"ios": {},
|
|
||||||
/* SDK配置 */
|
|
||||||
"sdkConfigs": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/* 快应用特有相关 */
|
|
||||||
"quickapp": {},
|
|
||||||
// h5
|
|
||||||
"h5": {
|
|
||||||
"router": {
|
|
||||||
"base": "./"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/* 小程序特有相关 */
|
|
||||||
"mp-weixin": {
|
|
||||||
"appid": "wx9251d74fe0e87028",
|
|
||||||
"logoPath": "https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/logo-simple.png",
|
|
||||||
"setting": {
|
|
||||||
"urlCheck": false
|
|
||||||
},
|
},
|
||||||
"usingComponents": true,
|
/* 小程序特有相关 */
|
||||||
"optimization": {
|
"mp-weixin" : {
|
||||||
"subPackages": true //是否启用分包优化
|
"appid" : "wx9251d74fe0e87028",
|
||||||
|
"logoPath" : "https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/logo-simple.png",
|
||||||
|
"setting" : {
|
||||||
|
"urlCheck" : false
|
||||||
|
},
|
||||||
|
"usingComponents" : true,
|
||||||
|
"optimization" : {
|
||||||
|
"subPackages" : true //是否启用分包优化
|
||||||
|
},
|
||||||
|
"lazyCodeLoading" : "requiredComponents"
|
||||||
},
|
},
|
||||||
"lazyCodeLoading": "requiredComponents"
|
"mp-alipay" : {
|
||||||
},
|
"usingComponents" : true
|
||||||
"mp-alipay": {
|
},
|
||||||
"usingComponents": true
|
"mp-baidu" : {
|
||||||
},
|
"usingComponents" : true
|
||||||
"mp-baidu": {
|
},
|
||||||
"usingComponents": true
|
"mp-toutiao" : {
|
||||||
},
|
"usingComponents" : true
|
||||||
"mp-toutiao": {
|
},
|
||||||
"usingComponents": true
|
"uniStatistics" : {
|
||||||
},
|
"enable" : false
|
||||||
"uniStatistics": {
|
},
|
||||||
"enable": false
|
"vueVersion" : "3"
|
||||||
},
|
|
||||||
"vueVersion": "3"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -247,8 +247,8 @@ const state = reactive({
|
||||||
const currentSpl = ref<any>(null);
|
const currentSpl = ref<any>(null);
|
||||||
const splBtnList = [
|
const splBtnList = [
|
||||||
{ key: null, name: "全部" },
|
{ key: null, name: "全部" },
|
||||||
{ key: false, name: "手工补单" },
|
{ key: true, name: "手工补单" },
|
||||||
{ key: true, name: "系统单" },
|
{ key: false, name: "系统单" },
|
||||||
];
|
];
|
||||||
const deliveryMethod = ref<any>(null);
|
const deliveryMethod = ref<any>(null);
|
||||||
const deliveryMethodBtnList = [
|
const deliveryMethodBtnList = [
|
||||||
|
|
|
@ -32,7 +32,9 @@
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.type === 'select'"
|
:disabled="item.type === 'select'"
|
||||||
:disabledColor="['卡号'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="
|
||||||
|
['卡号'].indexOf(item.name) > -1 ? '#ffffff' : '#f5f7fa'
|
||||||
|
"
|
||||||
@clear="handleClear(item)"
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
|
@ -61,6 +63,16 @@
|
||||||
<view class="btn-box">
|
<view class="btn-box">
|
||||||
<u-button type="primary" text="保存" @click="save()"></u-button>
|
<u-button type="primary" text="保存" @click="save()"></u-button>
|
||||||
</view>
|
</view>
|
||||||
|
<SmallModal
|
||||||
|
:title="'确认作废旧卡号吗?'"
|
||||||
|
:content="`确认作废${model1.formData.cardCode}后,不能恢复!`"
|
||||||
|
:okText="'确认作废'"
|
||||||
|
:isMain="true"
|
||||||
|
:show="isShowCancelModal"
|
||||||
|
@handleModal="(v:boolean) => {handleModal(v)}"
|
||||||
|
@handleOk="handleOk()"
|
||||||
|
@handleCancel="handleCancel()"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { CustomerApi, StockCardApi } from "@/services";
|
import { CustomerApi, StockCardApi } from "@/services";
|
||||||
|
@ -68,9 +80,22 @@ import { formatDate } from "@/utils";
|
||||||
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
const handleClear = (item:any) => {
|
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||||
(model1.formData as any)[item.key] = '';
|
const isShowCancelModal = ref(false);
|
||||||
}
|
|
||||||
|
const handleModal = (v: boolean) => {
|
||||||
|
isShowCancelModal.value = v;
|
||||||
|
};
|
||||||
|
const handleOk = () => {
|
||||||
|
handleCheck(true);
|
||||||
|
};
|
||||||
|
const handleCancel = () => {
|
||||||
|
handleCheck(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleClear = (item: any) => {
|
||||||
|
(model1.formData as any)[item.key] = "";
|
||||||
|
};
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {},
|
||||||
});
|
});
|
||||||
|
@ -116,8 +141,8 @@ const formAttrList = reactive<any>([
|
||||||
required: true,
|
required: true,
|
||||||
fn: () => {
|
fn: () => {
|
||||||
if (contrlModalParams.stockCard.list.length === 0) {
|
if (contrlModalParams.stockCard.list.length === 0) {
|
||||||
uni.showToast({icon: 'none', title: '当前无可用卡号,请添加出库卡'})
|
uni.showToast({ icon: "none", title: "当前无可用卡号,请添加出库卡" });
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
contrlModalParams.stockCard.isShow = true;
|
contrlModalParams.stockCard.isShow = true;
|
||||||
contrlModalParams.stockCard.title = "卡号";
|
contrlModalParams.stockCard.title = "卡号";
|
||||||
|
@ -165,36 +190,47 @@ const check = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const save = () => {
|
const save = () => {
|
||||||
|
if (
|
||||||
|
model1.formData.cardCode &&
|
||||||
|
model1.formData.stockCardName !== model1.formData.cardCode
|
||||||
|
) {
|
||||||
|
handleModal(true);
|
||||||
|
} else {
|
||||||
|
handleCheck(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleCheck = (v: boolean) => {
|
||||||
check().then((res) => {
|
check().then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
startSave();
|
startSave(v);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const startSave = () => {
|
|
||||||
|
const startSave = (v: boolean) => {
|
||||||
if (model1.formData.id) {
|
if (model1.formData.id) {
|
||||||
CustomerApi.updateCustomUser(model1.formData).then((res) => {
|
CustomerApi.updateCustomUser({ ...model1.formData, delCard: v }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.navigateBack()
|
uni.navigateBack();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
CustomerApi.addCustomUser(model1.formData).then((res) => {
|
CustomerApi.addCustomUser(model1.formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.navigateBack()
|
uni.navigateBack();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getStockCardList = () => {
|
const getStockCardList = () => {
|
||||||
StockCardApi.getStockCardListInfo({ vincolante: StockCardType.Shipment }).then((res) => {
|
StockCardApi.getStockCardListInfo({
|
||||||
|
vincolante: StockCardType.Shipment,
|
||||||
|
}).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
contrlModalParams.stockCard.list = (res.data as any).map(
|
contrlModalParams.stockCard.list = (res.data as any).map((item: any) => {
|
||||||
(item: any) => {
|
return { ...item, name: item.cardCode };
|
||||||
return { ...item, name: item.cardCode };
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -64,8 +64,19 @@
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-box">
|
<view class="btn-box">
|
||||||
<u-button type="primary" text="保存" @click="save()"></u-button>
|
<u-button type="primary" text="保存" @click="save"></u-button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<SmallModal
|
||||||
|
:title="'确认作废旧卡号吗?'"
|
||||||
|
:content="`确认作废${model1.formData.cardCode}后,不能恢复!`"
|
||||||
|
:okText="'确认作废'"
|
||||||
|
:isMain="true"
|
||||||
|
:show="isShowCancelModal"
|
||||||
|
@handleModal="(v:boolean) => {handleModal(v)}"
|
||||||
|
@handleOk="handleOk()"
|
||||||
|
@handleCancel="handleCancel()"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { StockCardApi, SupplierApi } from "@/services";
|
import { StockCardApi, SupplierApi } from "@/services";
|
||||||
|
@ -74,6 +85,18 @@ import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
|
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||||
|
const isShowCancelModal = ref(false);
|
||||||
|
|
||||||
|
const handleModal = (v: boolean) => {
|
||||||
|
isShowCancelModal.value = v;
|
||||||
|
};
|
||||||
|
const handleOk = () => {
|
||||||
|
handleCheck(true);
|
||||||
|
};
|
||||||
|
const handleCancel = () => {
|
||||||
|
handleCheck(false);
|
||||||
|
};
|
||||||
const handleClear = (item: any) => {
|
const handleClear = (item: any) => {
|
||||||
(model1.formData as any)[item.key] = "";
|
(model1.formData as any)[item.key] = "";
|
||||||
};
|
};
|
||||||
|
@ -270,19 +293,32 @@ const save = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
model1.formData.cardCode &&
|
||||||
|
model1.formData.stockCardName !== model1.formData.cardCode
|
||||||
|
) {
|
||||||
|
handleModal(true);
|
||||||
|
} else {
|
||||||
|
handleCheck(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleCheck = (v: boolean) => {
|
||||||
check().then((res) => {
|
check().then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
startSave();
|
startSave(v);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const startSave = () => {
|
const startSave = (v: boolean) => {
|
||||||
if (model1.formData.id) {
|
if (model1.formData.id) {
|
||||||
SupplierApi.updateSupplierUser(model1.formData).then((res) => {
|
SupplierApi.updateSupplierUser({ ...model1.formData, delCard: v }).then(
|
||||||
if (res.code === 200) {
|
(res) => {
|
||||||
uni.navigateBack();
|
if (res.code === 200) {
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
} else {
|
} else {
|
||||||
SupplierApi.addSupplierUser(model1.formData).then((res) => {
|
SupplierApi.addSupplierUser(model1.formData).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
@ -319,26 +355,24 @@ onMounted(() => {
|
||||||
getStockCardList();
|
getStockCardList();
|
||||||
});
|
});
|
||||||
|
|
||||||
onLoad((option:any) => {
|
onLoad((option: any) => {
|
||||||
// 接收传递的标题参数
|
// 接收传递的标题参数
|
||||||
const title = option.title;
|
const title = option.title;
|
||||||
SupplierApi.getSupplierUserList({ id: option.item }).then(
|
SupplierApi.getSupplierUserList({ id: option.item }).then((res: any) => {
|
||||||
(res: any) => {
|
if (res.code === 200) {
|
||||||
if (res.code === 200) {
|
if (res.data.length > 0) {
|
||||||
if (res.data.length > 0) {
|
model1.formData = res.data[0];
|
||||||
model1.formData = res.data[0]
|
if (model1.formData.cardCode) {
|
||||||
} else {
|
model1.formData.stockCardName = model1.formData.cardCode;
|
||||||
uni.showToast({ title: "未查询到供应商" });
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
uni.showToast({ title: "未查询到供应商" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
// 新增供应商卡号必填 编辑供应商卡号非必填
|
// 新增供应商卡号必填 编辑供应商卡号非必填
|
||||||
if (!option.item) {
|
if (!option.item) {
|
||||||
formAttrList[1].required = true
|
formAttrList[1].required = true;
|
||||||
}
|
|
||||||
if (model1.formData.cardCode) {
|
|
||||||
model1.formData.stockCardName = model1.formData.cardCode;
|
|
||||||
}
|
}
|
||||||
// 设置页面标题
|
// 设置页面标题
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
|
|
|
@ -20,10 +20,24 @@
|
||||||
><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><u-icon name="arrow-down"></u-icon
|
><text>{{
|
||||||
></view>
|
state.currentScaleStatus === -1
|
||||||
|
? "单据状态"
|
||||||
|
: getScaleStatus(state.currentScaleStatus)
|
||||||
|
}}</text
|
||||||
|
><u-icon name="arrow-down"></u-icon>
|
||||||
|
</view>
|
||||||
<view @click="state.isShowSort = true"
|
<view @click="state.isShowSort = true"
|
||||||
><text>排序</text><u-icon name="arrow-down"></u-icon
|
><text>{{
|
||||||
|
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>
|
||||||
|
@ -201,6 +215,10 @@ const state = reactive({
|
||||||
],
|
],
|
||||||
isShowSort: false,
|
isShowSort: false,
|
||||||
sortList: [
|
sortList: [
|
||||||
|
{
|
||||||
|
name: "全部",
|
||||||
|
key: undefined,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "按创建时间降序",
|
name: "按创建时间降序",
|
||||||
key: "create_time",
|
key: "create_time",
|
||||||
|
|
|
@ -94,7 +94,7 @@ const edit = (item: any) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const deleteType = (item: any) => {
|
const deleteType = (item: any) => {
|
||||||
GoodsApi.editReceiveCategory({ isDeleted: true, id: item.id }).then((res) => {
|
GoodsApi.deleteReceiveCategory({ id: item.id }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
resetPageList();
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
|
|
|
@ -20,10 +20,24 @@
|
||||||
><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><u-icon name="arrow-down"></u-icon
|
><text>{{
|
||||||
|
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><u-icon name="arrow-down"></u-icon
|
><text>{{
|
||||||
|
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>
|
||||||
|
@ -92,8 +106,14 @@
|
||||||
<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 v-if="item[cItem.enName as string] === DeliveryMethod.Deliver">送货</text>
|
<text
|
||||||
<text v-if="item[cItem.enName as string] === DeliveryMethod.SelfPickup">自提</text>
|
v-if="item[cItem.enName as string] === DeliveryMethod.Deliver"
|
||||||
|
>送货</text
|
||||||
|
>
|
||||||
|
<text
|
||||||
|
v-if="item[cItem.enName as string] === DeliveryMethod.SelfPickup"
|
||||||
|
>自提</text
|
||||||
|
>
|
||||||
{{ cItem.isBefore ? "" : cItem.unit }}
|
{{ cItem.isBefore ? "" : cItem.unit }}
|
||||||
</text>
|
</text>
|
||||||
</block>
|
</block>
|
||||||
|
@ -183,7 +203,7 @@ const state = reactive({
|
||||||
currentSortName: undefined,
|
currentSortName: undefined,
|
||||||
isShowStatus: false,
|
isShowStatus: false,
|
||||||
statusList: [
|
statusList: [
|
||||||
{
|
{
|
||||||
name: "全部",
|
name: "全部",
|
||||||
key: -1,
|
key: -1,
|
||||||
},
|
},
|
||||||
|
@ -210,6 +230,10 @@ const state = reactive({
|
||||||
],
|
],
|
||||||
isShowSort: false,
|
isShowSort: false,
|
||||||
sortList: [
|
sortList: [
|
||||||
|
{
|
||||||
|
name: "全部",
|
||||||
|
key: undefined,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "按创建时间降序",
|
name: "按创建时间降序",
|
||||||
key: "create_time",
|
key: "create_time",
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
>
|
>
|
||||||
<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 :src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLaunch/${item.imgUrl}`"></image>
|
<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>
|
||||||
|
@ -22,6 +24,10 @@
|
||||||
</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: "智能回收 智慧未来!",
|
||||||
|
@ -41,9 +47,16 @@ const list = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const start = () => {
|
const start = () => {
|
||||||
uni.navigateTo({
|
// 若当前存在token 直接跳到首页 若不存在则跳转登录页
|
||||||
url: "/pagesLogin/login/index", // 要跳转到的页面路径
|
if (profile.token) {
|
||||||
});
|
uni.navigateTo({
|
||||||
|
url: "/pagesHome/index", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesLogin/login/index", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<view class="c-login-container">
|
<view class="c-login-container">
|
||||||
<!-- logo -->
|
<!-- logo -->
|
||||||
<view class="logo">
|
<view class="logo">
|
||||||
<image :src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/logo.png`" height="60rpx"></image>
|
<image :src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/logo2.png`" ></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- form表单 -->
|
<!-- form表单 -->
|
||||||
<view class="login-form">
|
<view class="login-form">
|
||||||
|
@ -16,13 +16,15 @@
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.c-login-container {
|
.c-login-container {
|
||||||
height: 80vh;
|
height: 85vh;
|
||||||
margin-top: 20vh;
|
margin-top: 15vh;
|
||||||
.logo {
|
.logo {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
image {
|
image {
|
||||||
width: 234.62rpx;
|
// width: 234.62rpx;
|
||||||
height: 62.18rpx;
|
// height: 62.18rpx;
|
||||||
|
width: 300rpx;
|
||||||
|
height: 100rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.login-form {
|
.login-form {
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
:customStyle="{
|
:customStyle="{
|
||||||
'border-radius': '43rpx',
|
'border-radius': '43rpx',
|
||||||
}"
|
}"
|
||||||
>保存并登录</u-button
|
>保存</u-button
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -559,7 +559,6 @@ const save = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
check().then((res) => {
|
check().then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
startSave();
|
startSave();
|
||||||
|
|
Loading…
Reference in New Issue