Compare commits
14 Commits
f87e508efd
...
f433f725cd
Author | SHA1 | Date |
---|---|---|
![]() |
f433f725cd | |
![]() |
aea5e834d0 | |
![]() |
a761ecbeba | |
![]() |
b0e31d9d9e | |
![]() |
dc95484bf5 | |
![]() |
b71988a8f0 | |
![]() |
e5bb761556 | |
![]() |
6118bbeccf | |
![]() |
9c225b6bc6 | |
![]() |
7402e4ee5c | |
![]() |
f3fd202083 | |
![]() |
426640fc6a | |
![]() |
baa0db4871 | |
![]() |
ce8cb31b5b |
49
package.json
49
package.json
|
@ -39,25 +39,28 @@
|
|||
"type-check": "vue-tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dcloudio/uni-app": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-app-plus": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-components": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-h5": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-mp-alipay": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-mp-baidu": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-mp-jd": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-mp-kuaishou": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-mp-lark": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-mp-qq": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-mp-toutiao": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-mp-weixin": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-quickapp-webview": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-app": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-app-plus": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-components": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-h5": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-mp-alipay": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-mp-baidu": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-mp-jd": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-mp-lark": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-mp-qq": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-mp-xhs": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-ui": "^1.5.2",
|
||||
"@esbuild/darwin-x64": "^0.20.2",
|
||||
"@rollup/rollup-darwin-x64": "^4.17.2",
|
||||
"amfe-flexible": "^2.2.1",
|
||||
"clipboard": "^2.0.11",
|
||||
"dayjs": "^1.11.10",
|
||||
"echarts": "^5.5.0",
|
||||
"esbuild": "0.17.19",
|
||||
"esbuild": "^0.20.2",
|
||||
"luch-request": "^3.1.1",
|
||||
"pinia": "2.0.33",
|
||||
"pinia-plugin-persistedstate": "^3.2.1",
|
||||
|
@ -65,26 +68,26 @@
|
|||
"underscore": "^1.13.6",
|
||||
"unplugin-auto-import": "^0.17.3",
|
||||
"uview-plus": "^3.2.14",
|
||||
"vue": "^3.2.45",
|
||||
"vue-i18n": "^9.1.9"
|
||||
"vue": "^3.4.27",
|
||||
"vue-i18n": "^9.13.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dcloudio/types": "^3.3.2",
|
||||
"@dcloudio/uni-automator": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-cli-shared": "3.0.0-3081220230817001",
|
||||
"@dcloudio/uni-stacktracey": "3.0.0-3081220230817001",
|
||||
"@dcloudio/vite-plugin-uni": "3.0.0-3081220230817001",
|
||||
"@dcloudio/types": "^3.4.8",
|
||||
"@dcloudio/uni-automator": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-cli-shared": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/uni-stacktracey": "3.0.0-alpha-4010520240507001",
|
||||
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-4010520240507001",
|
||||
"@types/node": "^20.11.22",
|
||||
"@types/underscore": "^1.11.15",
|
||||
"@types/wechat-miniprogram": "^3.4.7",
|
||||
"@uni-helper/uni-app-types": "^0.5.12",
|
||||
"@uni-helper/uni-ui-types": "^0.5.11",
|
||||
"@vue/runtime-core": "^3.2.45",
|
||||
"@vue/runtime-core": "^3.4.27",
|
||||
"@vue/tsconfig": "^0.1.3",
|
||||
"sass": "^1.69.7",
|
||||
"sass-loader": "10",
|
||||
"typescript": "^4.9.4",
|
||||
"vite": "4.1.4",
|
||||
"vite": "5.2.8",
|
||||
"vue-tsc": "^1.0.24"
|
||||
}
|
||||
}
|
||||
|
|
3427
pnpm-lock.yaml
3427
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
22
src/App.vue
22
src/App.vue
|
@ -1,7 +1,19 @@
|
|||
<script setup lang="ts">
|
||||
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
|
||||
const isFirstLaunch = ref(true);
|
||||
|
||||
onLaunch(() => {
|
||||
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(() => {
|
||||
console.log("App Show");
|
||||
|
@ -12,9 +24,9 @@ onHide(() => {
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
||||
@import "uview-plus/index.scss";
|
||||
body {
|
||||
font-size: 12px;
|
||||
}
|
||||
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
||||
@import "uview-plus/index.scss";
|
||||
body {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -56,8 +56,9 @@ import Title from "@/components/Title/index.vue";
|
|||
import TabBar from "@/components/TabBar/index.vue";
|
||||
import { useMemberStore } from "@/store/index";
|
||||
import { ProfileApi } from "@/services";
|
||||
import pinia from '@/store'
|
||||
|
||||
const store = useMemberStore();
|
||||
const store = useMemberStore(pinia);
|
||||
const list = reactive([
|
||||
{
|
||||
title: "收货",
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<view class="num">{{
|
||||
formatMoney(state.summary.totalPaidPrice)
|
||||
}}</view>
|
||||
<view>实收金额</view>
|
||||
<view>已付金额</view>
|
||||
</view>
|
||||
</up-col>
|
||||
<up-col span="4">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view
|
||||
:class="{'box': isShow}"
|
||||
:class="{ box: isShow }"
|
||||
:style="{
|
||||
marginTop: navbarRect.height + navbarRect.top + 'px',
|
||||
height: navbarRect.safeHeight + 'px',
|
||||
|
@ -15,7 +15,7 @@ const props = withDefaults(
|
|||
isShow: boolean;
|
||||
}>(),
|
||||
{
|
||||
isShow: false
|
||||
isShow: false,
|
||||
}
|
||||
);
|
||||
const navbarRect = reactive({
|
||||
|
@ -39,12 +39,17 @@ const getSafeHeight = () => {
|
|||
// #endif
|
||||
};
|
||||
onMounted(() => {
|
||||
// #ifdef APP-PLUS || MP-WEIXIN
|
||||
// #ifdef MP-WEIXIN
|
||||
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
navbarRect.height = menuButtonInfo.height;
|
||||
navbarRect.top = menuButtonInfo.top;
|
||||
getSafeHeight();
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
navbarRect.safeHeight = (systemInfo.safeArea as any).height;
|
||||
getSafeHeight();
|
||||
// #endif
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
|
|
@ -30,12 +30,14 @@ const props = withDefaults(
|
|||
show: false
|
||||
}
|
||||
);
|
||||
const emit = defineEmits(["handleModal", "handleOk"]);
|
||||
const emit = defineEmits(["handleModal", "handleOk", "handleCancel"]);
|
||||
const handleClose = (v: string) => {
|
||||
emit("handleModal", false);
|
||||
if (v === 'ok') {
|
||||
// 走确认操作
|
||||
emit("handleOk");
|
||||
} else {
|
||||
emit("handleCancel")
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -22,19 +22,47 @@
|
|||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ProfileApi,ReceiveApi,ShipmentApi,PictureApi,ReceiveProductApi,DeviceApi,StockCardApi,GoodsApi,SupplierApi,CustomerApi,FinanceApi,MessageApi } from '@/services';
|
||||
import {
|
||||
ProfileApi,
|
||||
ReceiveApi,
|
||||
ShipmentApi,
|
||||
PictureApi,
|
||||
ReceiveProductApi,
|
||||
DeviceApi,
|
||||
StockCardApi,
|
||||
GoodsApi,
|
||||
SupplierApi,
|
||||
CustomerApi,
|
||||
FinanceApi,
|
||||
MessageApi,
|
||||
} from "@/services";
|
||||
import { formatDate } from "@/utils";
|
||||
import { UsersType } from "@/utils/enum";
|
||||
import valid from "@/utils/validate";
|
||||
console.log(ProfileApi,ReceiveApi,ShipmentApi,PictureApi,ReceiveProductApi,DeviceApi,StockCardApi,GoodsApi,SupplierApi,CustomerApi,FinanceApi,formatDate,UsersType, valid)
|
||||
console.log(
|
||||
ProfileApi,
|
||||
ReceiveApi,
|
||||
ShipmentApi,
|
||||
PictureApi,
|
||||
ReceiveProductApi,
|
||||
DeviceApi,
|
||||
StockCardApi,
|
||||
GoodsApi,
|
||||
SupplierApi,
|
||||
CustomerApi,
|
||||
FinanceApi,
|
||||
formatDate,
|
||||
UsersType,
|
||||
valid
|
||||
);
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
count: number,
|
||||
title: string
|
||||
count: number;
|
||||
title: string;
|
||||
}>(),
|
||||
{
|
||||
count: 0
|
||||
count: 0,
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -44,7 +72,7 @@ const navbarRect = reactive({
|
|||
msgCount: 10,
|
||||
});
|
||||
onMounted(() => {
|
||||
// #ifdef APP-PLUS || MP-WEIXIN
|
||||
// #ifdef MP-WEIXIN
|
||||
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
navbarRect.height = menuButtonInfo.height;
|
||||
navbarRect.top = menuButtonInfo.top;
|
||||
|
|
|
@ -21,7 +21,7 @@ const navbarRect = reactive({
|
|||
});
|
||||
|
||||
onMounted(() => {
|
||||
// #ifdef APP-PLUS || MP-WEIXIN
|
||||
// #ifdef MP-WEIXIN
|
||||
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
navbarRect.height = menuButtonInfo.height;
|
||||
navbarRect.top = menuButtonInfo.top;
|
||||
|
|
|
@ -86,7 +86,7 @@ watch(
|
|||
// ,{ deep: true, immediate:true}
|
||||
|
||||
onLoad(() => {
|
||||
// #ifdef APP-PLUS || MP-WEIXIN
|
||||
// #ifdef APP-PLUS || MP-WEIXIN || H5
|
||||
getClineHeight();
|
||||
// #endif
|
||||
});
|
||||
|
|
|
@ -1,85 +1,96 @@
|
|||
{
|
||||
"name": "",
|
||||
// 应用标识 由DCloud 云端分配 (安卓 ios)
|
||||
"appid": "",
|
||||
"description": "",
|
||||
"versionName": "1.0.0",
|
||||
"versionCode": "100",
|
||||
"transformPx": false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
"name" : "在生万有",
|
||||
// 应用标识 由DCloud 云端分配 (安卓 ios)
|
||||
"appid" : "__UNI__898003A",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"ignoreVersion": false,
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"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": {},
|
||||
/* 应用发布信息 */
|
||||
"distribute": {
|
||||
/* android打包配置 */
|
||||
"android": {
|
||||
"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
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
// h5
|
||||
"h5" : {
|
||||
"router" : {
|
||||
"base" : "./"
|
||||
}
|
||||
},
|
||||
"usingComponents": true,
|
||||
"optimization": {
|
||||
"subPackages": true //是否启用分包优化
|
||||
/* 小程序特有相关 */
|
||||
"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" : {
|
||||
"subPackages" : true //是否启用分包优化
|
||||
},
|
||||
"lazyCodeLoading" : "requiredComponents"
|
||||
},
|
||||
"lazyCodeLoading": "requiredComponents"
|
||||
},
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-baidu": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-toutiao": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"vueVersion": "3"
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "3"
|
||||
}
|
||||
|
|
|
@ -241,13 +241,7 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "客户详情"
|
||||
}
|
||||
},
|
||||
// {
|
||||
// "path": "uni_modules/lime-echart",
|
||||
// "style": {
|
||||
// "navigationBarTitleText": "组件库"
|
||||
// }
|
||||
// }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -247,8 +247,8 @@ const state = reactive({
|
|||
const currentSpl = ref<any>(null);
|
||||
const splBtnList = [
|
||||
{ key: null, name: "全部" },
|
||||
{ key: false, name: "补单" },
|
||||
{ key: true, name: "未补单" },
|
||||
{ key: true, name: "手工补单" },
|
||||
{ key: false, name: "系统单" },
|
||||
];
|
||||
const deliveryMethod = ref<any>(null);
|
||||
const deliveryMethodBtnList = [
|
||||
|
@ -441,7 +441,7 @@ const getFilter = () => {
|
|||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
padding: 60rpx 30rpx;
|
||||
padding: 60rpx 30rpx 150rpx;
|
||||
::v-deep .u-cell__value {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,9 @@
|
|||
:customStyle="{}"
|
||||
border="none"
|
||||
:disabled="item.type === 'select'"
|
||||
:disabledColor="['卡号'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||
:disabledColor="
|
||||
['卡号'].indexOf(item.name) > -1 ? '#ffffff' : '#f5f7fa'
|
||||
"
|
||||
@clear="handleClear(item)"
|
||||
>
|
||||
<template #suffix>
|
||||
|
@ -61,6 +63,16 @@
|
|||
<view class="btn-box">
|
||||
<u-button type="primary" text="保存" @click="save()"></u-button>
|
||||
</view>
|
||||
<SmallModal
|
||||
:title="'确认作废旧卡号吗?'"
|
||||
:content="`确认作废${model1.formData.cardCode}后,不能恢复!`"
|
||||
:okText="'确认作废'"
|
||||
:isMain="true"
|
||||
:show="isShowCancelModal"
|
||||
@handleModal="(v:boolean) => {handleModal(v)}"
|
||||
@handleOk="handleOk()"
|
||||
@handleCancel="handleCancel()"
|
||||
/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { CustomerApi, StockCardApi } from "@/services";
|
||||
|
@ -68,9 +80,22 @@ import { formatDate } from "@/utils";
|
|||
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import _ from "underscore";
|
||||
const handleClear = (item:any) => {
|
||||
(model1.formData as any)[item.key] = '';
|
||||
}
|
||||
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) => {
|
||||
(model1.formData as any)[item.key] = "";
|
||||
};
|
||||
const model1 = reactive<any>({
|
||||
formData: {},
|
||||
});
|
||||
|
@ -116,8 +141,8 @@ const formAttrList = reactive<any>([
|
|||
required: true,
|
||||
fn: () => {
|
||||
if (contrlModalParams.stockCard.list.length === 0) {
|
||||
uni.showToast({icon: 'none', title: '当前无可用卡号,请添加出库卡'})
|
||||
return
|
||||
uni.showToast({ icon: "none", title: "当前无可用卡号,请添加出库卡" });
|
||||
return;
|
||||
}
|
||||
contrlModalParams.stockCard.isShow = true;
|
||||
contrlModalParams.stockCard.title = "卡号";
|
||||
|
@ -165,36 +190,47 @@ const check = () => {
|
|||
};
|
||||
|
||||
const save = () => {
|
||||
if (
|
||||
model1.formData.cardCode &&
|
||||
model1.formData.stockCardName !== model1.formData.cardCode
|
||||
) {
|
||||
handleModal(true);
|
||||
} else {
|
||||
handleCheck(false);
|
||||
}
|
||||
};
|
||||
const handleCheck = (v: boolean) => {
|
||||
check().then((res) => {
|
||||
if (res) {
|
||||
startSave();
|
||||
startSave(v);
|
||||
}
|
||||
});
|
||||
};
|
||||
const startSave = () => {
|
||||
|
||||
const startSave = (v: boolean) => {
|
||||
if (model1.formData.id) {
|
||||
CustomerApi.updateCustomUser(model1.formData).then((res) => {
|
||||
CustomerApi.updateCustomUser({ ...model1.formData, delCard: v }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.navigateBack()
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
CustomerApi.addCustomUser(model1.formData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.navigateBack()
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const getStockCardList = () => {
|
||||
StockCardApi.getStockCardListInfo({ vincolante: StockCardType.Shipment }).then((res) => {
|
||||
StockCardApi.getStockCardListInfo({
|
||||
vincolante: StockCardType.Shipment,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
contrlModalParams.stockCard.list = (res.data as any).map(
|
||||
(item: any) => {
|
||||
return { ...item, name: item.cardCode };
|
||||
}
|
||||
);
|
||||
contrlModalParams.stockCard.list = (res.data as any).map((item: any) => {
|
||||
return { ...item, name: item.cardCode };
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -159,7 +159,7 @@ const startSave = () => {
|
|||
if (model1.formData.id) {
|
||||
GoodsApi.editShipmentCategory({
|
||||
id: model1.formData.id,
|
||||
shmCategoryName: model1.formData.name,
|
||||
shmCategoryName: model1.formData.shmCategoryName,
|
||||
parentId: model1.formData.parentId,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<u-form
|
||||
labelPosition="left"
|
||||
:model="model1"
|
||||
:rules="rules"
|
||||
:rules="model1.formData.id ? rules1 : rules2"
|
||||
ref="form"
|
||||
:labelWidth="100"
|
||||
:labelStyle="{ padding: '0rpx 10rpx' }"
|
||||
|
@ -33,7 +33,11 @@
|
|||
border="none"
|
||||
@change="(e:any) => {handleInput(e, item)}"
|
||||
:disabled="item.type === 'select'"
|
||||
:disabledColor="['卡号', '供应商分类'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||
:disabledColor="
|
||||
['卡号', '供应商分类'].indexOf(item.name) > -1
|
||||
? '#ffffff'
|
||||
: '#f5f7fa'
|
||||
"
|
||||
@clear="handleClear(item)"
|
||||
>
|
||||
<template #suffix>
|
||||
|
@ -60,8 +64,19 @@
|
|||
</block>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button type="primary" text="保存" @click="save()"></u-button>
|
||||
<u-button type="primary" text="保存" @click="save"></u-button>
|
||||
</view>
|
||||
|
||||
<SmallModal
|
||||
:title="'确认作废旧卡号吗?'"
|
||||
:content="`确认作废${model1.formData.cardCode}后,不能恢复!`"
|
||||
:okText="'确认作废'"
|
||||
:isMain="true"
|
||||
:show="isShowCancelModal"
|
||||
@handleModal="(v:boolean) => {handleModal(v)}"
|
||||
@handleOk="handleOk()"
|
||||
@handleCancel="handleCancel()"
|
||||
/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { StockCardApi, SupplierApi } from "@/services";
|
||||
|
@ -70,11 +85,23 @@ import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
|||
import valid from "@/utils/validate";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import _ from "underscore";
|
||||
const handleClear = (item:any) => {
|
||||
(model1.formData as any)[item.key] = '';
|
||||
}
|
||||
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) => {
|
||||
(model1.formData as any)[item.key] = "";
|
||||
};
|
||||
const handleInput = (e: any, item: any) => {
|
||||
if (item.key === "phone" || item.key === 'bankNumber') {
|
||||
if (item.key === "phone" || item.key === "bankNumber") {
|
||||
const temp = e?.replace(valid.valid_number, "");
|
||||
setTimeout(() => {
|
||||
model1.formData[item.key] = temp;
|
||||
|
@ -84,7 +111,21 @@ const handleInput = (e: any, item: any) => {
|
|||
const model1 = reactive<any>({
|
||||
formData: {},
|
||||
});
|
||||
const rules = ref({
|
||||
const rules1 = ref({
|
||||
"formData.name": {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入供应商",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
"formData.supplierTypeName": {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择供应商分类",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
});
|
||||
const rules2 = ref({
|
||||
"formData.stockCardName": {
|
||||
type: "string",
|
||||
required: true,
|
||||
|
@ -127,11 +168,11 @@ const formAttrList = reactive<any>([
|
|||
key: "stockCardName",
|
||||
type: "select",
|
||||
childKey: "stockCard",
|
||||
required: true,
|
||||
// required: true,
|
||||
fn: () => {
|
||||
if (contrlModalParams.stockCard.list.length === 0) {
|
||||
uni.showToast({icon: 'none', title: '当前无可用卡号,请添加入库卡'})
|
||||
return
|
||||
uni.showToast({ icon: "none", title: "当前无可用卡号,请添加入库卡" });
|
||||
return;
|
||||
}
|
||||
contrlModalParams.stockCard.isShow = true;
|
||||
contrlModalParams.stockCard.title = "卡号";
|
||||
|
@ -252,23 +293,44 @@ const save = () => {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
model1.formData.cardCode &&
|
||||
model1.formData.stockCardName !== model1.formData.cardCode
|
||||
) {
|
||||
handleModal(true);
|
||||
} else {
|
||||
handleCheck(false);
|
||||
}
|
||||
};
|
||||
const handleCheck = (v: boolean) => {
|
||||
check().then((res) => {
|
||||
if (res) {
|
||||
startSave();
|
||||
startSave(v);
|
||||
}
|
||||
});
|
||||
};
|
||||
const startSave = () => {
|
||||
const startSave = (v: boolean) => {
|
||||
if (model1.formData.id) {
|
||||
SupplierApi.updateSupplierUser(model1.formData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.navigateBack()
|
||||
}
|
||||
});
|
||||
SupplierApi.updateSupplierUser({ ...model1.formData, delCard: v }).then(
|
||||
(res) => {
|
||||
if (res.code === 200) {
|
||||
// uni.navigateBack();
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
success: (res) => {
|
||||
uni.$emit("pricingParams", {
|
||||
name: model1.formData.name
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
SupplierApi.addSupplierUser(model1.formData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.navigateBack()
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -283,15 +345,17 @@ const getSupplierTypeList = () => {
|
|||
};
|
||||
|
||||
const getStockCardList = () => {
|
||||
StockCardApi.getStockCardListInfo({ vincolante: StockCardType.Receive }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
contrlModalParams.stockCard.list = (res.data as any).map(
|
||||
(item: any) => {
|
||||
return { ...item, name: item.cardCode };
|
||||
}
|
||||
);
|
||||
StockCardApi.getStockCardListInfo({ vincolante: StockCardType.Receive }).then(
|
||||
(res) => {
|
||||
if (res.code === 200) {
|
||||
contrlModalParams.stockCard.list = (res.data as any).map(
|
||||
(item: any) => {
|
||||
return { ...item, name: item.cardCode };
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
|
@ -299,12 +363,24 @@ onMounted(() => {
|
|||
getStockCardList();
|
||||
});
|
||||
|
||||
onLoad((option) => {
|
||||
onLoad((option: any) => {
|
||||
// 接收传递的标题参数
|
||||
const title = (option as any).title;
|
||||
model1.formData = JSON.parse((option as any).item);
|
||||
if (model1.formData.cardCode) {
|
||||
model1.formData.stockCardName = model1.formData.cardCode;
|
||||
const title = option.title;
|
||||
SupplierApi.getSupplierUserList({ id: option.item }).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
if (res.data.length > 0) {
|
||||
model1.formData = res.data[0];
|
||||
if (model1.formData.cardCode) {
|
||||
model1.formData.stockCardName = model1.formData.cardCode;
|
||||
}
|
||||
} else {
|
||||
uni.showToast({ title: "未查询到供应商" });
|
||||
}
|
||||
}
|
||||
});
|
||||
// 新增供应商卡号必填 编辑供应商卡号非必填
|
||||
if (!option.item) {
|
||||
formAttrList[1].required = true;
|
||||
}
|
||||
// 设置页面标题
|
||||
uni.setNavigationBarTitle({
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<u-form
|
||||
labelPosition="left"
|
||||
:model="model1"
|
||||
:rules="rules"
|
||||
:rules="model1.formData.id ? rules2 : rules1"
|
||||
ref="form"
|
||||
:labelWidth="100"
|
||||
:labelStyle="{ padding: '0rpx 10rpx' }"
|
||||
|
@ -13,7 +13,7 @@
|
|||
:prop="`formData.${item.key}`"
|
||||
:label="item.name"
|
||||
:required="item.required"
|
||||
v-for="(item, index) in formAttrList"
|
||||
v-for="(item, index) in model1.formData.id ? formAttrList2 : formAttrList1"
|
||||
:key="index"
|
||||
@click="item.fn"
|
||||
>
|
||||
|
@ -32,10 +32,12 @@
|
|||
clearable
|
||||
:customStyle="{}"
|
||||
border="none"
|
||||
:maxlength="item.key === 'password' ? 6 : -1"
|
||||
:maxlength="item.key === 'password' ? 8 : -1"
|
||||
@change="(e:any) => {handleInput(e, item)}"
|
||||
:disabled="item.type === 'select'"
|
||||
:disabledColor="['性别', '用户角色'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||
:disabledColor="
|
||||
['性别', '用户角色'].indexOf(item.name) > -1 ? '#ffffff' : '#f5f7fa'
|
||||
"
|
||||
@clear="handleClear(item)"
|
||||
>
|
||||
<template #suffix>
|
||||
|
@ -49,7 +51,7 @@
|
|||
</template>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<block v-for="(item, index) in formAttrList" :key="index">
|
||||
<block v-for="(item, index) in model1.formData.id ? formAttrList2 : formAttrList1" :key="index">
|
||||
<u-action-sheet
|
||||
v-if="item.type === 'select'"
|
||||
:actions="contrlModalParams[item.childKey].list"
|
||||
|
@ -72,9 +74,9 @@ import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
|||
import valid from "@/utils/validate";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import _ from "underscore";
|
||||
const handleClear = (item:any) => {
|
||||
(model1.formData as any)[item.key] = '';
|
||||
}
|
||||
const handleClear = (item: any) => {
|
||||
(model1.formData as any)[item.key] = "";
|
||||
};
|
||||
const handleInput = (e: any, item: any) => {
|
||||
if (item.key === "phone") {
|
||||
const temp = e?.replace(valid.valid_number, "");
|
||||
|
@ -82,12 +84,23 @@ const handleInput = (e: any, item: any) => {
|
|||
model1.formData[item.key] = temp;
|
||||
}, 10);
|
||||
}
|
||||
if (item.key === "password") {
|
||||
const temp = e?.replace(valid.valid_no_cn, "");
|
||||
setTimeout(() => {
|
||||
(model1.formData as any)[item.key] = temp;
|
||||
}, 10);
|
||||
}
|
||||
};
|
||||
const model1 = reactive<any>({
|
||||
formData: {
|
||||
},
|
||||
formData: {},
|
||||
});
|
||||
const rules = ref({
|
||||
const rules1 = ref({
|
||||
"formData.roleName": {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择用户角色",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
"formData.userName": {
|
||||
type: "string",
|
||||
required: true,
|
||||
|
@ -101,6 +114,20 @@ const rules = ref({
|
|||
trigger: ["blur", "change"],
|
||||
},
|
||||
});
|
||||
const rules2 = ref({
|
||||
"formData.roleName": {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择用户角色",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
"formData.userName": {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入账号",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
});
|
||||
const contrlModalParams = reactive<any>({
|
||||
role: {
|
||||
isShow: false,
|
||||
|
@ -123,7 +150,7 @@ const contrlModalParams = reactive<any>({
|
|||
},
|
||||
});
|
||||
|
||||
const formAttrList = reactive<any>([
|
||||
const formAttrList1 = reactive<any>([
|
||||
{
|
||||
name: "姓名",
|
||||
key: "name",
|
||||
|
@ -144,6 +171,7 @@ const formAttrList = reactive<any>([
|
|||
key: "roleName",
|
||||
type: "select",
|
||||
childKey: "role",
|
||||
required: true,
|
||||
fn: () => {
|
||||
contrlModalParams.role.isShow = true;
|
||||
contrlModalParams.role.title = "选择角色";
|
||||
|
@ -168,6 +196,46 @@ const formAttrList = reactive<any>([
|
|||
},
|
||||
]);
|
||||
|
||||
const formAttrList2 = reactive<any>([
|
||||
{
|
||||
name: "姓名",
|
||||
key: "name",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
name: "性别",
|
||||
key: "genderName",
|
||||
type: "select",
|
||||
childKey: "gender",
|
||||
fn: () => {
|
||||
contrlModalParams.gender.isShow = true;
|
||||
contrlModalParams.gender.title = "选择性别";
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "用户角色",
|
||||
key: "roleName",
|
||||
type: "select",
|
||||
childKey: "role",
|
||||
required: true,
|
||||
fn: () => {
|
||||
contrlModalParams.role.isShow = true;
|
||||
contrlModalParams.role.title = "选择角色";
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "账号",
|
||||
key: "userName",
|
||||
type: "input",
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: "联系手机",
|
||||
key: "phone",
|
||||
type: "input",
|
||||
},
|
||||
]);
|
||||
|
||||
const handleSelect = (key: string, v: any) => {
|
||||
contrlModalParams[key].isShow = false;
|
||||
if (key === "role") {
|
||||
|
@ -205,6 +273,18 @@ const save = () => {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (!model1.formData.id) {
|
||||
if (model1.formData.password) {
|
||||
if (!valid.valid_password.pattern.test(model1.formData.password)) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: valid.valid_password.message,
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
check().then((res) => {
|
||||
if (res) {
|
||||
startSave();
|
||||
|
@ -214,15 +294,22 @@ const save = () => {
|
|||
|
||||
const startSave = () => {
|
||||
if (model1.formData.id) {
|
||||
ProfileApi.updateUserById(model1.formData).then((res) => {
|
||||
ProfileApi.updateUserById({
|
||||
name: model1.formData.name,
|
||||
id: model1.formData.id,
|
||||
roleIds: model1.formData.roleIds,
|
||||
userName: model1.formData.userName,
|
||||
phone: model1.formData.phone,
|
||||
gender: model1.formData.gender,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.navigateBack()
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ProfileApi.addUser({ userType: 1, ...model1.formData }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.navigateBack()
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -246,11 +333,11 @@ onMounted(() => {
|
|||
onLoad((option) => {
|
||||
// 接收传递的标题参数;
|
||||
const title = (option as any).title;
|
||||
const obj = JSON.parse((option as any).item)
|
||||
model1.formData = {...obj, genderName: ['未知','男','女'][obj.gender]};
|
||||
const obj = JSON.parse((option as any).item);
|
||||
model1.formData = { ...obj, genderName: ["未知", "男", "女"][obj.gender] };
|
||||
if (obj.roleVos.length > 0) {
|
||||
model1.formData.roleIds = [obj.roleVos[0].id]
|
||||
model1.formData.roleName = obj.roleVos[0].roleName
|
||||
model1.formData.roleIds = [obj.roleVos[0].id];
|
||||
model1.formData.roleName = obj.roleVos[0].roleName;
|
||||
}
|
||||
// 设置页面标题;
|
||||
if (title) {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
>{{ obj.paymentType === 0 ? "收货" : "出货" }}单号:
|
||||
<text>{{ obj.orderNumber }}</text></view
|
||||
>
|
||||
<up-image :show-loading="true" v-for="(item, index) in obj.fileLists" :key="index" :src="item.url" width="80px" height="80px"></up-image>
|
||||
<up-image :show-loading="true" v-for="(item, index) in state.fileLists" :key="index" :src="item.url" width="80px" height="80px"></up-image>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
@ -37,6 +37,9 @@ import { FinanceApi, PictureApi } from "@/services";
|
|||
import { ImagesType, OrderType } from "@/utils/enum";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
const obj = ref<any>({});
|
||||
const state = reactive<any>({
|
||||
fileLists: []
|
||||
})
|
||||
const getPayment = (item: any) => {
|
||||
return ["供应商付款", "客户付款", "客户(手动)", "供应商(手动)"][
|
||||
item.paymentType
|
||||
|
@ -58,7 +61,7 @@ onLoad((option: any) => {
|
|||
imagesType: ImagesType.NORMARL,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
obj.value.fileLists = res.data;
|
||||
state.fileLists = res.data;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -20,10 +20,24 @@
|
|||
><u-icon name="arrow-down"></u-icon
|
||||
></view>
|
||||
<view @click="state.isShowStatus = true"
|
||||
><text>单据状态</text><u-icon name="arrow-down"></u-icon
|
||||
></view>
|
||||
><text>{{
|
||||
state.currentScaleStatus === -1
|
||||
? "单据状态"
|
||||
: getScaleStatus(state.currentScaleStatus)
|
||||
}}</text
|
||||
><u-icon name="arrow-down"></u-icon>
|
||||
</view>
|
||||
<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 class="btn" @click="handleDialog('showFilter', true)">筛选</view>
|
||||
</view>
|
||||
|
@ -201,6 +215,10 @@ const state = reactive({
|
|||
],
|
||||
isShowSort: false,
|
||||
sortList: [
|
||||
{
|
||||
name: "全部",
|
||||
key: undefined,
|
||||
},
|
||||
{
|
||||
name: "按创建时间降序",
|
||||
key: "create_time",
|
||||
|
|
|
@ -97,7 +97,7 @@ const handleSearch = () => {
|
|||
|
||||
const update = (item: any) => {
|
||||
|
||||
GoodsApi.EditReceiveProduct({ isDeleted: true, id: item.id }).then((res) => {
|
||||
GoodsApi.deleteReceiveProduct({ id: item.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
resetPageList();
|
||||
getList();
|
||||
|
|
|
@ -94,7 +94,7 @@ const edit = (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) {
|
||||
resetPageList();
|
||||
getList();
|
||||
|
|
|
@ -91,7 +91,7 @@ const add = () => {
|
|||
const edit = (item: any) => {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pagesApp/components/addRole?title=新增角色&item=" +
|
||||
"/pagesApp/components/addRole?title=编辑角色&item=" +
|
||||
JSON.stringify(item), // 要跳转到的页面路径
|
||||
});
|
||||
};
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<text v-if="cItem.name">{{ cItem.name }}:</text
|
||||
><text
|
||||
>{{ cItem.isBefore ? cItem.unit : "" }}
|
||||
{{ cItem.num }}
|
||||
{{ cItem.name === '送货方式' ? item[`${cItem.enName}`] === DeliveryMethod.Deliver ? '送货' : '自提' : item[`${cItem.enName}`] }}
|
||||
{{ cItem.isBefore ? "" : cItem.unit }}
|
||||
</text>
|
||||
</view>
|
||||
|
@ -68,7 +68,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ReceiveApi, ShipmentApi } from "@/services";
|
||||
import PageView from "@/components/PageView/index.vue";
|
||||
import { ScaleStatus } from "@/utils/enum";
|
||||
import { DeliveryMethod, ScaleStatus } from "@/utils/enum";
|
||||
|
||||
const keyword = ref("");
|
||||
const gridList1 = reactive([
|
||||
|
@ -156,7 +156,7 @@ const gridList1 = reactive([
|
|||
},
|
||||
{
|
||||
name: "作废人",
|
||||
enName: "updateUserName",
|
||||
enName: "updateName",
|
||||
unit: "",
|
||||
isBefore: false,
|
||||
isCustomStyle: true,
|
||||
|
|
|
@ -20,10 +20,24 @@
|
|||
><u-icon name="arrow-down"></u-icon
|
||||
></view>
|
||||
<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 @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 class="btn" @click="handleDialog('showFilter', true)">筛选</view>
|
||||
</view>
|
||||
|
@ -92,8 +106,14 @@
|
|||
<text v-if="cItem.name">{{ cItem.name }}:</text
|
||||
><text
|
||||
>{{ cItem.isBefore ? cItem.unit : "" }}
|
||||
<text v-if="item[cItem.enName as string] === DeliveryMethod.Deliver">送货</text>
|
||||
<text v-if="item[cItem.enName as string] === DeliveryMethod.SelfPickup">自提</text>
|
||||
<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 }}
|
||||
</text>
|
||||
</block>
|
||||
|
@ -183,7 +203,7 @@ const state = reactive({
|
|||
currentSortName: undefined,
|
||||
isShowStatus: false,
|
||||
statusList: [
|
||||
{
|
||||
{
|
||||
name: "全部",
|
||||
key: -1,
|
||||
},
|
||||
|
@ -200,16 +220,20 @@ const state = reactive({
|
|||
key: 2,
|
||||
},
|
||||
{
|
||||
name: "已审未付",
|
||||
name: "待结算",
|
||||
key: 3,
|
||||
},
|
||||
{
|
||||
name: "已审已付",
|
||||
name: "已结算",
|
||||
key: 4,
|
||||
},
|
||||
],
|
||||
isShowSort: false,
|
||||
sortList: [
|
||||
{
|
||||
name: "全部",
|
||||
key: undefined,
|
||||
},
|
||||
{
|
||||
name: "按创建时间降序",
|
||||
key: "create_time",
|
||||
|
@ -334,9 +358,9 @@ const getScaleStatus = (type: number) => {
|
|||
} else if (type === ScaleStatus.ToBeShipmentReview) {
|
||||
return "待审核";
|
||||
} else if (type === ScaleStatus.ToBeShipmentPay) {
|
||||
return "待支付";
|
||||
return "待结算";
|
||||
} else if (type === ScaleStatus.ShipmentPaid) {
|
||||
return "已支付";
|
||||
return "已结算";
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ const update = (item: any) => {
|
|||
const edit = (item: any) => {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pagesApp/components/addShipmentProduct?title=编辑收货产品&item=" +
|
||||
"/pagesApp/components/addShipmentProduct?title=编辑出货产品&item=" +
|
||||
JSON.stringify(item), // 要跳转到的页面路径
|
||||
});
|
||||
};
|
||||
|
|
|
@ -541,6 +541,14 @@ const save = () => {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (parseFloat(model1.order.tare) > parseFloat(model1.order.grossWeight)) {
|
||||
uni.showToast({
|
||||
title: `毛重需大于皮重`,
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
check().then((res) => {
|
||||
if (res) {
|
||||
startSave();
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<view
|
||||
>{{
|
||||
item.type === StockCardType.Shipment ? "客户" : "供应商"
|
||||
}}:{{ item.name }}</view
|
||||
}}:{{ item.customUserName }}</view
|
||||
>
|
||||
<view>卡号:{{ item.cardCode }}</view>
|
||||
<view
|
||||
|
|
|
@ -118,10 +118,11 @@ const update = (item: any) => {
|
|||
};
|
||||
|
||||
const edit = (item: any) => {
|
||||
console.log(JSON.stringify(item))
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pagesApp/components/addSupplier?title=编辑供应商&item=" +
|
||||
JSON.stringify(item), // 要跳转到的页面路径
|
||||
item.id, // 要跳转到的页面路径
|
||||
});
|
||||
};
|
||||
const getList = (v?: boolean) => {
|
||||
|
|
|
@ -165,7 +165,9 @@ import {
|
|||
import TabBar from "@/components/TabBar/index.vue";
|
||||
import { formatMoney } from "@/utils";
|
||||
import { onBackPress, onShow } from "@dcloudio/uni-app";
|
||||
const store = useMemberStore();
|
||||
import pinia from "@/store";
|
||||
|
||||
const store = useMemberStore(pinia);
|
||||
const navbarRect = reactive({
|
||||
height: 32,
|
||||
top: 28,
|
||||
|
@ -550,12 +552,17 @@ const init = () => {
|
|||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
// #ifdef APP-PLUS || MP-WEIXIN
|
||||
// #ifdef MP-WEIXIN
|
||||
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
navbarRect.height = menuButtonInfo.height;
|
||||
navbarRect.top = menuButtonInfo.top;
|
||||
getSafeHeight();
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
navbarRect.safeHeight = (systemInfo.safeArea as any).height;
|
||||
getSafeHeight();
|
||||
// #endif
|
||||
});
|
||||
onShow(() => {
|
||||
init();
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
>
|
||||
<swiper-item v-for="(item, index) in list" :key="index">
|
||||
<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">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
|
@ -22,6 +24,10 @@
|
|||
</swiper>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useMemberStore } from "@/store/index";
|
||||
const store = useMemberStore();
|
||||
const profile = store.profile;
|
||||
|
||||
const list = [
|
||||
{
|
||||
title: "智能回收 智慧未来!",
|
||||
|
@ -41,9 +47,16 @@ const list = [
|
|||
},
|
||||
];
|
||||
const start = () => {
|
||||
uni.navigateTo({
|
||||
url: "/pagesLogin/login/index", // 要跳转到的页面路径
|
||||
});
|
||||
// 若当前存在token 直接跳到首页 若不存在则跳转登录页
|
||||
if (profile.token) {
|
||||
uni.navigateTo({
|
||||
url: "/pagesHome/index", // 要跳转到的页面路径
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pagesLogin/login/index", // 要跳转到的页面路径
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<view class="c-login-container">
|
||||
<!-- 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>
|
||||
<!-- form表单 -->
|
||||
<view class="login-form">
|
||||
|
@ -16,13 +16,15 @@
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.c-login-container {
|
||||
height: 80vh;
|
||||
margin-top: 20vh;
|
||||
height: 85vh;
|
||||
margin-top: 15vh;
|
||||
.logo {
|
||||
text-align: center;
|
||||
image {
|
||||
width: 234.62rpx;
|
||||
height: 62.18rpx;
|
||||
// width: 234.62rpx;
|
||||
// height: 62.18rpx;
|
||||
width: 300rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
.login-form {
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
:customStyle="{
|
||||
'border-radius': '43rpx',
|
||||
}"
|
||||
>保存并登录</u-button
|
||||
>保存</u-button
|
||||
>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
@ -116,13 +116,15 @@ import { ProfileApi } from "@/services/index";
|
|||
import LoginLayout from "./components/loginLayout.vue";
|
||||
import { useMemberStore } from "@/store/index";
|
||||
import valid from "@/utils/validate";
|
||||
import pinia from '@/store'
|
||||
|
||||
|
||||
const handleClear = (item: any) => {
|
||||
setTimeout(() => {
|
||||
(model1.userInfo as any)[item.key] = "";
|
||||
}, 100);
|
||||
};
|
||||
const store = useMemberStore();
|
||||
const store = useMemberStore(pinia);
|
||||
const loginForm = ref(null);
|
||||
const model1 = reactive({
|
||||
userInfo: {
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<template>
|
||||
<view class="baseinfo">
|
||||
<view class="box">
|
||||
<view> 用户名: {{ profile.userName }} </view>
|
||||
<view> 姓名: {{ profile.userName }} </view>
|
||||
<view> 手机号码: {{ profile.phone }} </view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useMemberStore } from '@/store/index'
|
||||
const store = useMemberStore()
|
||||
import pinia from '@/store'
|
||||
|
||||
const store = useMemberStore(pinia)
|
||||
const profile = store.profile.userInfo
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
|
|
@ -67,6 +67,8 @@ import { useMemberStore } from "@/store/index";
|
|||
import TabBar from "@/components/TabBar/index.vue";
|
||||
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||
import Box from "@/components/Box/index.vue";
|
||||
import pinia from '@/store'
|
||||
|
||||
|
||||
const isShowCancelModal = ref(false);
|
||||
|
||||
|
@ -82,7 +84,7 @@ const handleOk = () => {
|
|||
}
|
||||
});
|
||||
};
|
||||
const store = useMemberStore();
|
||||
const store = useMemberStore(pinia);
|
||||
const profile = store.profile.userInfo;
|
||||
const list = reactive([
|
||||
{
|
||||
|
@ -113,7 +115,7 @@ const hanldeClick = (item: any) => {
|
|||
.bg {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: -60rpx;
|
||||
top: 0rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
.baseinfo {
|
||||
|
|
|
@ -60,10 +60,14 @@
|
|||
v-model="model1.order.fileLists"
|
||||
@delete="handleDelete"
|
||||
></uni-file-picker>
|
||||
<!-- 当定价后编辑入库单 不能更改称重方式 -->
|
||||
<u-radio-group
|
||||
v-if="item.type === 'radio'"
|
||||
v-model="(model1.order as any)[item.key]"
|
||||
placement="row"
|
||||
:disabled="
|
||||
model1.order.scaleStatus === 1 && item.key === 'weighingMethod'
|
||||
"
|
||||
>
|
||||
<u-radio
|
||||
v-for="(c, index) in item.child"
|
||||
|
@ -126,15 +130,15 @@ import {
|
|||
SupplierApi,
|
||||
} from "@/services/index";
|
||||
import _ from "underscore";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { ImagesType, OrderType } from "@/utils/enum";
|
||||
import SupplierDialog from "../components/SupplierDialog.vue";
|
||||
import ProductDialog from "../components/ProductDialog.vue";
|
||||
import valid from "@/utils/validate";
|
||||
import { countDots } from "@/utils";
|
||||
const handleClear = (item:any) => {
|
||||
(model1.order as any)[item.key] = '';
|
||||
}
|
||||
const handleClear = (item: any) => {
|
||||
(model1.order as any)[item.key] = "";
|
||||
};
|
||||
// 供应商选择
|
||||
const showDialog = <
|
||||
{
|
||||
|
@ -220,6 +224,7 @@ const model1 = reactive<{ order: Order }>({
|
|||
fileLists: [],
|
||||
scaleStatus: 1,
|
||||
netWeight: 0,
|
||||
balanceTotalPrice: 0,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -287,7 +292,12 @@ const formAttrList = reactive<ComType>([
|
|||
childKey: "userSelect",
|
||||
required: true,
|
||||
fn: () => {
|
||||
// handleDialog("showSupplier", true);
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pagesApp/components/addSupplier?title=编辑供应商&item=" +
|
||||
model1.order.userId, // 要跳转到的页面路径
|
||||
});
|
||||
|
||||
uni.hideKeyboard();
|
||||
},
|
||||
},
|
||||
|
@ -521,9 +531,14 @@ watch(
|
|||
实际收入:实际结算金额-运费-杂费
|
||||
*/
|
||||
if (model1.order.scaleStatus === 0) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
model1.order.netWeight = parseFloat(((parseFloat(grossWeightNew as any) || 0) - (parseFloat(tareNew as any) || 0)).toFixed(2));
|
||||
model1.order.netWeight = parseFloat(
|
||||
(
|
||||
(parseFloat(grossWeightNew as any) || 0) -
|
||||
(parseFloat(tareNew as any) || 0)
|
||||
).toFixed(2)
|
||||
);
|
||||
if (model1.order.buttonType === 0) {
|
||||
if (model1.order.subtractNum) {
|
||||
model1.order.netWeight =
|
||||
|
@ -537,16 +552,16 @@ watch(
|
|||
}
|
||||
model1.order.totalPrice =
|
||||
(model1.order.price || 0) * (model1.order.netWeight || 0);
|
||||
// 货款金额默认=预估总价,当系统自动算出预估总价时,值需同步
|
||||
// 货款金额默认=预估总价,当系统自动算出预估总价时,值需同步
|
||||
model1.order.balanceTotalPrice = model1.order.totalPrice;
|
||||
}
|
||||
);
|
||||
|
||||
SupplierApi.getSupplierUserList({}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
contrlModalParams.userSelect.list = res.data;
|
||||
}
|
||||
});
|
||||
// SupplierApi.getSupplierUserList({}).then((res) => {
|
||||
// if (res.code === 200) {
|
||||
// contrlModalParams.userSelect.list = res.data;
|
||||
// }
|
||||
// });
|
||||
ReceiveProductApi.getAllReProducts().then((res) => {
|
||||
if (res.code === 200) {
|
||||
contrlModalParams.productSelect.list = _.map(
|
||||
|
@ -646,7 +661,8 @@ const save = () => {
|
|||
}
|
||||
if (
|
||||
model1.order.price &&
|
||||
model1.order.price.toString()[model1.order.price.toString().length - 1] === "."
|
||||
model1.order.price.toString()[model1.order.price.toString().length - 1] ===
|
||||
"."
|
||||
) {
|
||||
uni.showToast({
|
||||
title: "请输入正确的单价",
|
||||
|
@ -759,6 +775,7 @@ onLoad((option) => {
|
|||
title: "编辑信息",
|
||||
});
|
||||
}
|
||||
|
||||
if (model1.order.id) {
|
||||
ReceiveApi.getDetailById({ id: model1.order.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
|
@ -793,6 +810,16 @@ onLoad((option) => {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
uni.$on("pricingParams", (data) => {
|
||||
model1.order.userName = data.name
|
||||
});
|
||||
});
|
||||
|
||||
onShow(() => {});
|
||||
|
||||
onUnmounted(() => {
|
||||
uni.$off("pricingParams", () => {});
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -74,7 +74,9 @@
|
|||
>
|
||||
</view>
|
||||
<view class="flex-box">
|
||||
<text>货款金额:{{ item.balanceTotalPrice || 0 }}元</text>
|
||||
<!-- 若是等待审核显示预估总价 其他显示货款金额 -->
|
||||
<text v-if="currentTab === 2">预估总价:{{ item.totalPrice || 0 }}元</text>
|
||||
<text v-else>货款金额:{{ item.balanceTotalPrice || 0 }}元</text>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
<text class="address">{{ item.deviceName || "-" }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="number"
|
||||
>收货单号:{{ item.receiptNumber }}</text
|
||||
>
|
||||
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="name">{{ item.userName }}</text>
|
||||
|
@ -42,7 +40,11 @@
|
|||
</view>
|
||||
<view class="flex-box">
|
||||
<text>毛重:{{ item.grossWeight }}kg</text>
|
||||
<text>单价:{{ state.scaleStatus === 0 ? '未定价' : item.price + '元/KG'}}</text>
|
||||
<text
|
||||
>单价:{{
|
||||
state.scaleStatus === 0 ? "未定价" : item.price + "元/KG"
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button
|
||||
|
@ -85,9 +87,16 @@ const pageList: PageResult<Order> = reactive({
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const resetPageList = () => {
|
||||
pageList.noMoreData = false;
|
||||
pageList.total = 0;
|
||||
pageList.list = [];
|
||||
pageList.pageNum = 1;
|
||||
pageList.pageSize = 10;
|
||||
};
|
||||
const state = reactive({
|
||||
scaleStatus: 0
|
||||
})
|
||||
scaleStatus: 0,
|
||||
});
|
||||
const isShowCancelModal = ref(false);
|
||||
const deleteId = ref(0);
|
||||
const handleModal = (v: boolean, id: number) => {
|
||||
|
@ -100,8 +109,19 @@ const handleScenePhoto = (imagesId: number) => {
|
|||
});
|
||||
};
|
||||
const pricingDetail = (id: number) => {
|
||||
uni.redirectTo({
|
||||
url: "/pagesReceive/form/pricingForm?id=" + id, // 要跳转到的页面路径
|
||||
// 待过皮的时候 编辑前先查询当前状态 若是待过皮,则可继续编辑 否则提示该数据已处理 刷新当前页面
|
||||
ReceiveApi.getDetailById({ id: id }).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
if (res.data.scaleStatus > 1) {
|
||||
uni.showToast({title : '当前订单已处理'});
|
||||
resetPageList();
|
||||
getList();
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: "/pagesReceive/form/pricingForm?id=" + id, // 要跳转到的页面路径
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -143,14 +163,14 @@ onMounted(() => {
|
|||
onLoad((option) => {
|
||||
// 接收传递的标题参数
|
||||
state.scaleStatus = parseInt((option as any).scaleStatus);
|
||||
// 设置页面标题
|
||||
// 设置页面标题
|
||||
if (state.scaleStatus === ScaleStatus.ToBePriced) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '待定价',
|
||||
title: "待定价",
|
||||
});
|
||||
} else if (state.scaleStatus === ScaleStatus.ToBeTare) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '待过皮重',
|
||||
title: "待过皮重",
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -97,7 +97,10 @@
|
|||
<view @click="handleReviewNoPay"> 审核暂不支付 </view>
|
||||
<view class="active" @click="handleReviewPay"> 审核立即支付 </view>
|
||||
</view>
|
||||
<view v-if="state.order.scaleStatus === 2">
|
||||
<!-- 零皮重不需要重新过皮 -->
|
||||
<view
|
||||
v-if="state.order.scaleStatus === 2 && state.order.weighingMethod === 0"
|
||||
>
|
||||
<u-button
|
||||
text="重新过皮"
|
||||
plain
|
||||
|
@ -122,6 +125,7 @@
|
|||
text="打印"
|
||||
type="primary"
|
||||
:customStyle="{ 'border-radius': '43rpx' }"
|
||||
@click="handlePrint"
|
||||
></u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -163,10 +167,10 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ReceiveApi } from "@/services/index";
|
||||
import { DeviceApi, ReceiveApi } from "@/services/index";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||
import { ScaleStatus } from "@/utils/enum";
|
||||
import { OrderType, ScaleStatus } from "@/utils/enum";
|
||||
const keyword = ref("");
|
||||
const contrlModalParams = reactive<{ [attrName: string]: any }>({
|
||||
paySelect: {
|
||||
|
@ -221,6 +225,7 @@ const state = reactive<{
|
|||
}>({
|
||||
order: {
|
||||
carNumber: "",
|
||||
balanceTotalPrice: 0,
|
||||
},
|
||||
sheetList: [
|
||||
{
|
||||
|
@ -317,6 +322,7 @@ const handleConfirm = () => {
|
|||
],
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
state.order.balanceTotalPrice = amount.value || 0;
|
||||
uni.showToast({ title: "修改成功" });
|
||||
gridList1[gridList1.length - 1].num = amount.value || "";
|
||||
isInput.value = false;
|
||||
|
@ -384,6 +390,20 @@ const handleReWeight = () => {
|
|||
}
|
||||
});
|
||||
};
|
||||
|
||||
const handlePrint = () => {
|
||||
DeviceApi.print({
|
||||
id: state.order.id,
|
||||
orderType: OrderType.Receive,
|
||||
userId: state.order.deviceId
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: "打印成功",
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
onLoad((option) => {
|
||||
state.order.id = parseInt((option as any).id);
|
||||
state.scaleStatus = parseInt((option as any).scaleStatus);
|
||||
|
|
|
@ -108,9 +108,9 @@ import {
|
|||
} from "@/utils/enum";
|
||||
import valid from "@/utils/validate";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
const handleClear = (item:any) => {
|
||||
(model1.order as any)[item.key] = '';
|
||||
}
|
||||
const handleClear = (item: any) => {
|
||||
(model1.order as any)[item.key] = "";
|
||||
};
|
||||
const isShowFormItem = (item: any) => {
|
||||
if (model1.scaleStatusBtnType === ScaleStatusBtnType.ShipmentPay) {
|
||||
return true;
|
||||
|
@ -175,6 +175,8 @@ const model1 = reactive<{
|
|||
unitPrice: 0,
|
||||
estimatePrice: 0,
|
||||
subtractNum: 0,
|
||||
grossWeight: 0, //毛重
|
||||
tare: 0, //皮重
|
||||
},
|
||||
});
|
||||
const rules = reactive({
|
||||
|
@ -462,9 +464,9 @@ watch(
|
|||
(model1.order.unitPrice || 0) * (model1.order.settlementWeight || 0)
|
||||
).toFixed(2)
|
||||
);
|
||||
if (!model1.order.totalPrice) {
|
||||
model1.order.totalPrice = model1.order.estimatePrice;
|
||||
}
|
||||
// if (!model1.order.totalPrice) {
|
||||
// model1.order.totalPrice = model1.order.estimatePrice;
|
||||
// }
|
||||
|
||||
model1.order.realIncome =
|
||||
(model1.order.totalPrice || 0) -
|
||||
|
@ -562,6 +564,27 @@ const save = () => {
|
|||
|
||||
check().then((res) => {
|
||||
if (res) {
|
||||
if (
|
||||
!model1.order.paymentMethodName &&
|
||||
model1.scaleStatusBtnType === ScaleStatusBtnType.ShipmentPay
|
||||
) {
|
||||
uni.showToast({
|
||||
title: "请选择结算方式",
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
parseFloat(model1.order.settlementTare.toString()) >
|
||||
parseFloat(model1.order.settlementGross.toString())
|
||||
) {
|
||||
uni.showToast({
|
||||
title: `毛重需大于皮重`,
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
startSave();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<text class="btn" @click="handleScenePhoto((item.imagesId as number))"
|
||||
<text class="btn" @click="handleScenePhoto(item.imagesId as number)"
|
||||
>现场照片</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<text class="desc">过磅时间:{{ item.grossTime || '-' }}</text>
|
||||
<text class="desc">过磅时间:{{ item.grossTime || "-" }}</text>
|
||||
</view>
|
||||
<view class="flex-box">
|
||||
<text>皮重:{{ item.tare }}kg</text>
|
||||
|
@ -29,12 +29,12 @@
|
|||
text="点击作废"
|
||||
color="#E8E8E8"
|
||||
:customStyle="{ color: '#999' }"
|
||||
@click="handleModal(true, (item.id as any))"
|
||||
@click="handleModal(true, item.id as any)"
|
||||
></u-button>
|
||||
<u-button
|
||||
type="primary"
|
||||
text="点击编辑"
|
||||
@click="pricingDetail((item.id as any))"
|
||||
@click="pricingDetail(item.id as any)"
|
||||
></u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -53,18 +53,20 @@
|
|||
import { ShipmentApi } from "@/services/index";
|
||||
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||
|
||||
interface PageResult<T> {
|
||||
total: number;
|
||||
list: T[];
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
}
|
||||
const pageList: PageResult<Shipment> = reactive({
|
||||
const pageList: PageResult<Order> = reactive({
|
||||
noMoreData: false,
|
||||
total: 0,
|
||||
list: [],
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const resetPageList = () => {
|
||||
pageList.noMoreData = false;
|
||||
pageList.total = 0;
|
||||
pageList.list = [];
|
||||
pageList.pageNum = 1;
|
||||
pageList.pageSize = 10;
|
||||
};
|
||||
const isShowCancelModal = ref(false);
|
||||
const deleteId = ref(0);
|
||||
const handleModal = (v: boolean, id: number) => {
|
||||
|
@ -77,28 +79,57 @@ const handleScenePhoto = (imagesId: number) => {
|
|||
});
|
||||
};
|
||||
const pricingDetail = (id: string) => {
|
||||
uni.navigateTo({
|
||||
url: "/pagesShipment/form/shipmentForm?id=" + id, // 要跳转到的页面路径
|
||||
// 待过皮的时候 编辑前先查询当前状态 若是待过皮,则可继续编辑 否则提示该数据已处理 刷新当前页面
|
||||
debugger
|
||||
ShipmentApi.getDetailById({ id: id }).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
if (res.data.scaleStatus > 1) {
|
||||
uni.showToast({ title: "当前订单已处理" });
|
||||
resetPageList();
|
||||
getList();
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pagesShipment/form/shipmentForm?id=" + id, // 要跳转到的页面路径
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const getOrderList = () => {
|
||||
ShipmentApi.getOrderPage({ pageNumber: 1, pageSize: 10, scaleStatus: 1 }).then((res) => {
|
||||
|
||||
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,
|
||||
pageNumber: pageList.pageNum,
|
||||
scaleStatus: 1,
|
||||
};
|
||||
pageList.isLoading = true;
|
||||
ShipmentApi.getOrderPage(params).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
(pageList as any).list = res.data.list;
|
||||
pageList.isLoading = false;
|
||||
(pageList as any).list = pageList.list.concat(res.data.list);
|
||||
pageList.total = (res.data as any).total;
|
||||
}
|
||||
});
|
||||
};
|
||||
const handleOk = () => {
|
||||
console.log(deleteId.value);
|
||||
ShipmentApi.deleteOrder({ids:[deleteId.value]}).then((res) => {
|
||||
ShipmentApi.deleteOrder({ ids: [deleteId.value] }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
getOrderList();
|
||||
getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getOrderList();
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
></view>
|
||||
<view
|
||||
><u-tag
|
||||
text="收货单作废"
|
||||
text="出货单作废"
|
||||
plain
|
||||
shape="circle"
|
||||
:borderColor="'rgba(255, 147, 68, 1) !important'"
|
||||
|
@ -155,6 +155,7 @@
|
|||
"
|
||||
>
|
||||
<u-button
|
||||
v-if="!state.order.repairFlag"
|
||||
text="重新过毛"
|
||||
plain
|
||||
:customStyle="{
|
||||
|
@ -179,6 +180,7 @@
|
|||
text="打印"
|
||||
type="primary"
|
||||
:customStyle="{ 'border-radius': '43rpx' }"
|
||||
@click="handlePrint"
|
||||
></u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -206,8 +208,8 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ShipmentApi } from "@/services/index";
|
||||
import { ScaleStatusBtnType } from "@/utils/enum";
|
||||
import { DeviceApi, ShipmentApi } from "@/services/index";
|
||||
import { OrderType, ScaleStatusBtnType } from "@/utils/enum";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||
const payMethodMap: any = {
|
||||
|
@ -474,7 +476,7 @@ const handleSettlement = () => {
|
|||
};
|
||||
const handleScenePhoto = (id: string) => {
|
||||
uni.navigateTo({
|
||||
url: "/pagesScenePhoto/index?orderType=1&imagesType=1&id=" + id, // 要跳转到的页面路径
|
||||
url: "/pagesScenePhoto/index?orderType=2&imagesType=1&id=" + id, // 要跳转到的页面路径
|
||||
});
|
||||
};
|
||||
// 出货未结算 // 先填写结算信息后更新状态为3
|
||||
|
@ -584,9 +586,22 @@ const init = () => {
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
const handlePrint = () => {
|
||||
DeviceApi.print({
|
||||
id: state.order.id,
|
||||
orderType: OrderType.Shipment,
|
||||
userId: state.order.deviceId
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: "打印成功",
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
onShow(() => {
|
||||
init()
|
||||
init();
|
||||
});
|
||||
onLoad((option) => {
|
||||
state.order.id = (option as any).id;
|
||||
|
@ -596,7 +611,7 @@ onLoad((option) => {
|
|||
console.log(data);
|
||||
state.order.id = data.id;
|
||||
state.scaleStatusBtnType = data.scaleStatusBtnType;
|
||||
init()
|
||||
init();
|
||||
});
|
||||
});
|
||||
onUnmounted(() => {
|
||||
|
|
|
@ -123,6 +123,7 @@
|
|||
import { ShipmentApi } from "@/services/index";
|
||||
import { ScaleStatus, ScaleStatusBtnType } from "@/utils/enum";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
import PageView from "@/components/PageView/index.vue";
|
||||
// scaleStatus
|
||||
const pageList: PageResult<Shipment> = reactive({
|
||||
|
@ -251,7 +252,8 @@ const getList = (v?: boolean) => {
|
|||
}
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
onShow(() => {
|
||||
resetPageList()
|
||||
getList();
|
||||
});
|
||||
onLoad((option) => {
|
||||
|
|
|
@ -102,9 +102,21 @@ const handleScenePhoto = (id: any) => {
|
|||
});
|
||||
};
|
||||
const pricingDetail = (id: string) => {
|
||||
console.log(state.scaleStatus)
|
||||
uni.navigateTo({
|
||||
url: "/pagesShipment/form/shipmentForm?id=" + id + `&scaleStatus=${state.scaleStatus}`, // 要跳转到的页面路径
|
||||
ShipmentApi.getDetailById({ id: id }).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
if (res.data.scaleStatus > 1) {
|
||||
uni.showToast({ title: "当前订单已处理" });
|
||||
resetPageList();
|
||||
getList();
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pagesShipment/form/shipmentForm?id=" +
|
||||
id +
|
||||
`&scaleStatus=${state.scaleStatus}`, // 要跳转到的页面路径
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const getList = (v?: boolean) => {
|
||||
|
@ -124,10 +136,8 @@ const getList = (v?: boolean) => {
|
|||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
pageList.isLoading = false;
|
||||
(pageList as any).list = (
|
||||
pageList as any
|
||||
).list.concat(res.data.list);
|
||||
pageList.total = (res.data as any).total;
|
||||
(pageList as any).list = (pageList as any).list.concat(res.data.list);
|
||||
pageList.total = (res.data as any).total;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -146,19 +156,19 @@ onShow(() => {
|
|||
});
|
||||
|
||||
const state = reactive({
|
||||
scaleStatus: 0
|
||||
})
|
||||
scaleStatus: 0,
|
||||
});
|
||||
onLoad((option) => {
|
||||
// 接收传递的标题参数
|
||||
state.scaleStatus = parseInt((option as any).scaleStatus);
|
||||
// 设置页面标题
|
||||
// 设置页面标题
|
||||
if (state.scaleStatus === ScaleStatus.ToBeShipment) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '待出货',
|
||||
title: "待出货",
|
||||
});
|
||||
} else if (state.scaleStatus === ScaleStatus.ToBeGrossWeight) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '待过毛重',
|
||||
title: "待过毛重",
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,46 +1,54 @@
|
|||
import { http } from '@/utils/http'
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
// 设备信息新增
|
||||
export const addDevice = (data: any) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/api/device/addDevice',
|
||||
method: "POST",
|
||||
url: "/api/device/addDevice",
|
||||
data,
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
// 设备信息修改
|
||||
export const editDevice = (data: any) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/api/device/edit',
|
||||
method: "POST",
|
||||
url: "/api/device/edit",
|
||||
data,
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 设备信息逻辑删除
|
||||
export const deleteDevice = (data: any) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/api/device/deleteDevice',
|
||||
method: "POST",
|
||||
url: "/api/device/deleteDevice",
|
||||
data,
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
// 设备信息根据id查询
|
||||
export const selectDeviceId = (data: any) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/api/device/selectDeviceId',
|
||||
method: "POST",
|
||||
url: "/api/device/selectDeviceId",
|
||||
data,
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 设备信息根据id查询
|
||||
export const getDeviceList = (data: any) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/api/device/getDeviceList',
|
||||
method: "POST",
|
||||
url: "/api/device/getDeviceList",
|
||||
data,
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 打印
|
||||
|
||||
export const print = (data: any) => {
|
||||
return http({
|
||||
method: "POST",
|
||||
url: "/api/machine/print",
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -113,9 +113,9 @@ interface Shipment {
|
|||
carNumber?: string; //车牌号
|
||||
scaleStatus?: number; //出库单状态
|
||||
orderNumber?: string; //订单编号
|
||||
grossWeight?: number; //毛重
|
||||
grossWeight: number; //毛重
|
||||
grossTime?: string; //过毛时间
|
||||
tare?: number; //皮重
|
||||
tare: number; //皮重
|
||||
tareTime?: string; //过皮时间
|
||||
netWeight?: number; //净重
|
||||
number?: number; //数量
|
||||
|
@ -144,8 +144,8 @@ interface Shipment {
|
|||
updateTime?: string; //undefined
|
||||
isDeleted?: string; //删除标识true删除,false未删除
|
||||
settlementWeight?: number; // 结算重量
|
||||
settlementGross?: number; // 结算毛重
|
||||
settlementTare?: number; // 结算皮重
|
||||
settlementGross: number; // 结算毛重
|
||||
settlementTare: number; // 结算皮重
|
||||
settlementNet?: number; // 结算净重
|
||||
signTime?: string; // 签收时间
|
||||
paymentMethod?: string; //支付方式:0:未支付,1:现金支付,2:银行卡支付,3:线上支付(微信)4:支付宝
|
||||
|
@ -211,5 +211,6 @@ interface StockCard {
|
|||
cardCode?: string,
|
||||
type?: number, // 库存卡类型1=出库2=入库
|
||||
cardCode?: string,
|
||||
name?: string
|
||||
name?: string,
|
||||
customUserName?:string
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { useMemberStore } from "@/store/modules/member";
|
||||
import ENV_CONFIG from "../config/env";
|
||||
import pinia from '@/store'
|
||||
|
||||
// 基础地址
|
||||
let baseUrl = "";
|
||||
|
@ -10,7 +11,7 @@ let baseUrl = "";
|
|||
baseUrl = (process.env as any).config[(process.env as any).NODE_ENV]
|
||||
.VITE_APP_BASE_URL;
|
||||
|
||||
const store = useMemberStore();
|
||||
const store = useMemberStore(pinia);
|
||||
|
||||
const obj = {
|
||||
// 拦截前触发
|
||||
|
|
|
@ -4,9 +4,10 @@ import AutoImport from "unplugin-auto-import/vite";
|
|||
import path from "path"; // 引入pnpm install @types/node --save-dev
|
||||
import ENV_CONFIG from "./src/config/env";
|
||||
// https://vitejs.dev/config/
|
||||
// process.env.NODE_ENV === "development"
|
||||
export default defineConfig({
|
||||
build: {
|
||||
sourcemap: process.env.NODE_ENV === "development",
|
||||
sourcemap: false,
|
||||
},
|
||||
define: {
|
||||
"process.env.config": ENV_CONFIG,
|
||||
|
|
Loading…
Reference in New Issue